@synnaxlabs/pluto 0.53.1 → 0.54.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 (286) hide show
  1. package/dist/aether-BBeeeA1z.cjs +10 -0
  2. package/dist/aether-Bl3vMZO3.js +716 -0
  3. package/dist/aether-DmSenWd4.js +704 -0
  4. package/dist/aether-VeYJQDcf.cjs +11 -0
  5. package/dist/button-DBdzH6Ky.cjs +1 -0
  6. package/dist/button-KtgabnXL.js +251 -0
  7. package/dist/button.cjs +1 -1
  8. package/dist/button.js +2 -4
  9. package/dist/chunk-DeC0fbbY.js +23 -0
  10. package/dist/chunk-FeXHwk1_.cjs +1 -0
  11. package/dist/color-Cspp5cKp.js +7904 -0
  12. package/dist/color-DCCr0Z1b.cjs +29 -0
  13. package/dist/color.cjs +1 -1
  14. package/dist/color.js +2 -4
  15. package/dist/css-Ce-x3HcK.cjs +1 -0
  16. package/dist/css-UEo6g0SR.js +69 -0
  17. package/dist/css.cjs +1 -1
  18. package/dist/css.js +2 -8
  19. package/dist/dialog-BTCrp5Yv.cjs +1 -0
  20. package/dist/dialog-ClQI4sHo.js +331 -0
  21. package/dist/dialog.cjs +1 -1
  22. package/dist/dialog.js +2 -4
  23. package/dist/divider-BYRH8-5K.js +13 -0
  24. package/dist/divider-CEyntx31.cjs +1 -0
  25. package/dist/ether-CZlE80D0.cjs +53 -0
  26. package/dist/ether-KMGPzrZR.js +6222 -0
  27. package/dist/ether.cjs +1 -1
  28. package/dist/ether.js +4 -104
  29. package/dist/event-Btz3eWg1.cjs +1 -0
  30. package/dist/event-Z4V8c501.js +4 -0
  31. package/dist/flex-Bgtu0DK6.js +62 -0
  32. package/dist/flex-D_GoD3ed.cjs +1 -0
  33. package/dist/flex.cjs +1 -1
  34. package/dist/flex.js +2 -4
  35. package/dist/haul-BdMc4rLJ.js +171 -0
  36. package/dist/haul-ZdSHqhp6.cjs +1 -0
  37. package/dist/header-CNx3pAkx.js +64 -0
  38. package/dist/header-lD0sRjCR.cjs +1 -0
  39. package/dist/header.cjs +1 -1
  40. package/dist/header.js +2 -4
  41. package/dist/input-CdL1OPDU.cjs +74 -0
  42. package/dist/input-h-4axMs7.js +47772 -0
  43. package/dist/input.cjs +1 -1
  44. package/dist/input.js +2 -4
  45. package/dist/list-DacuSBB3.cjs +4 -0
  46. package/dist/list-dZDsxTzd.js +1756 -0
  47. package/dist/list.cjs +1 -1
  48. package/dist/list.js +2 -4
  49. package/dist/menu-eeXfR_zT.js +170 -0
  50. package/dist/menu-yADx33I8.cjs +1 -0
  51. package/dist/menu.cjs +1 -1
  52. package/dist/menu.js +2 -4
  53. package/dist/pluto.cjs +52 -0
  54. package/dist/pluto.css +2 -1
  55. package/dist/pluto.js +36474 -0
  56. package/dist/select-B93mFqvf.js +1328 -0
  57. package/dist/select-gt7wGGO4.cjs +1 -0
  58. package/dist/src/access/policy/queries.d.ts +34 -34
  59. package/dist/src/access/policy/queries.d.ts.map +1 -1
  60. package/dist/src/access/queries.d.ts +1 -1
  61. package/dist/src/access/queries.d.ts.map +1 -1
  62. package/dist/src/access/role/queries.d.ts +2 -12
  63. package/dist/src/access/role/queries.d.ts.map +1 -1
  64. package/dist/src/arc/queries.d.ts +1167 -29
  65. package/dist/src/arc/queries.d.ts.map +1 -1
  66. package/dist/src/channel/LinePlot.d.ts +2 -2
  67. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  68. package/dist/src/channel/queries.d.ts +108 -60
  69. package/dist/src/channel/queries.d.ts.map +1 -1
  70. package/dist/src/color/Provider.d.ts +8 -8
  71. package/dist/src/device/queries.d.ts +148 -363
  72. package/dist/src/device/queries.d.ts.map +1 -1
  73. package/dist/src/flux/result.d.ts +5 -5
  74. package/dist/src/flux/result.d.ts.map +1 -1
  75. package/dist/src/flux/update.d.ts +1 -1
  76. package/dist/src/flux/update.d.ts.map +1 -1
  77. package/dist/src/icon/Icon.d.ts.map +1 -1
  78. package/dist/src/icon/registry.d.ts +1 -0
  79. package/dist/src/icon/registry.d.ts.map +1 -1
  80. package/dist/src/label/queries.d.ts +21 -21
  81. package/dist/src/label/queries.d.ts.map +1 -1
  82. package/dist/src/lineplot/aether/XAxis.d.ts +28 -28
  83. package/dist/src/lineplot/aether/YAxis.d.ts +28 -28
  84. package/dist/src/lineplot/aether/axis.d.ts +14 -14
  85. package/dist/src/lineplot/queries.d.ts +2 -2
  86. package/dist/src/lineplot/queries.d.ts.map +1 -1
  87. package/dist/src/lineplot/range/aether/provider.d.ts +126 -102
  88. package/dist/src/lineplot/range/aether/provider.d.ts.map +1 -1
  89. package/dist/src/lineplot/tooltip/aether/tooltip.d.ts +56 -56
  90. package/dist/src/log/aether/Log.d.ts +21 -21
  91. package/dist/src/log/queries.d.ts +2 -2
  92. package/dist/src/log/queries.d.ts.map +1 -1
  93. package/dist/src/memo/index.d.ts +0 -1
  94. package/dist/src/memo/index.d.ts.map +1 -1
  95. package/dist/src/memo/useMemoCompare.d.ts +0 -1
  96. package/dist/src/memo/useMemoCompare.d.ts.map +1 -1
  97. package/dist/src/rack/queries.d.ts.map +1 -1
  98. package/dist/src/ranger/aether/queries.d.ts.map +1 -1
  99. package/dist/src/ranger/queries.d.ts +19 -19
  100. package/dist/src/ranger/queries.d.ts.map +1 -1
  101. package/dist/src/schematic/queries.d.ts +2 -2
  102. package/dist/src/schematic/queries.d.ts.map +1 -1
  103. package/dist/src/schematic/symbol/Forms.d.ts.map +1 -1
  104. package/dist/src/schematic/symbol/Primitives.d.ts +2 -1
  105. package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
  106. package/dist/src/schematic/symbol/SelectOrientation.d.ts.map +1 -1
  107. package/dist/src/schematic/symbol/Symbols.d.ts +35 -34
  108. package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -1
  109. package/dist/src/schematic/symbol/queries.d.ts +96 -50
  110. package/dist/src/schematic/symbol/queries.d.ts.map +1 -1
  111. package/dist/src/schematic/symbol/registry.d.ts.map +1 -1
  112. package/dist/src/select/Dialog.d.ts +2 -1
  113. package/dist/src/select/Dialog.d.ts.map +1 -1
  114. package/dist/src/status/Select.d.ts.map +1 -1
  115. package/dist/src/status/SelectMulipleVariants.spec.d.ts +2 -0
  116. package/dist/src/status/SelectMulipleVariants.spec.d.ts.map +1 -0
  117. package/dist/src/status/SelectMultipleVariants.d.ts +9 -0
  118. package/dist/src/status/SelectMultipleVariants.d.ts.map +1 -0
  119. package/dist/src/status/SelectVariant.d.ts +2 -2
  120. package/dist/src/status/SelectVariant.d.ts.map +1 -1
  121. package/dist/src/status/SelectVariant.spec.d.ts +2 -0
  122. package/dist/src/status/SelectVariant.spec.d.ts.map +1 -0
  123. package/dist/src/status/aether/aggregator.d.ts +16 -2
  124. package/dist/src/status/aether/aggregator.d.ts.map +1 -1
  125. package/dist/src/status/aether/errorHandler.d.ts +2 -1
  126. package/dist/src/status/aether/errorHandler.d.ts.map +1 -1
  127. package/dist/src/status/base/Aggregator.d.ts +3 -2
  128. package/dist/src/status/base/Aggregator.d.ts.map +1 -1
  129. package/dist/src/status/external.d.ts +1 -0
  130. package/dist/src/status/external.d.ts.map +1 -1
  131. package/dist/src/status/queries.d.ts +25 -9
  132. package/dist/src/status/queries.d.ts.map +1 -1
  133. package/dist/src/status/variantData.d.ts +4 -0
  134. package/dist/src/status/variantData.d.ts.map +1 -0
  135. package/dist/src/table/cells/Cells.d.ts +17 -17
  136. package/dist/src/table/queries.d.ts +2 -2
  137. package/dist/src/table/queries.d.ts.map +1 -1
  138. package/dist/src/task/queries.d.ts +3 -3
  139. package/dist/src/task/queries.d.ts.map +1 -1
  140. package/dist/src/telem/aether/noop.d.ts.map +1 -1
  141. package/dist/src/telem/aether/static.d.ts +10 -10
  142. package/dist/src/telem/aether/telem.d.ts +1 -1
  143. package/dist/src/telem/aether/telem.d.ts.map +1 -1
  144. package/dist/src/telem/aether/transformers.d.ts +15 -15
  145. package/dist/src/telem/aether/transformers.d.ts.map +1 -1
  146. package/dist/src/telem/client/cache/cache.d.ts +1 -1
  147. package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
  148. package/dist/src/telem/client/client.d.ts +4 -4
  149. package/dist/src/telem/client/client.d.ts.map +1 -1
  150. package/dist/src/telem/client/reader.d.ts +1 -1
  151. package/dist/src/telem/client/reader.d.ts.map +1 -1
  152. package/dist/src/telem/client/streamer.d.ts +1 -1
  153. package/dist/src/telem/client/streamer.d.ts.map +1 -1
  154. package/dist/src/telem/control/Controller.d.ts +1 -1
  155. package/dist/src/telem/control/Controller.d.ts.map +1 -1
  156. package/dist/src/telem/control/aether/chip.d.ts +16 -2
  157. package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
  158. package/dist/src/telem/control/aether/controller.d.ts +16 -16
  159. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  160. package/dist/src/telem/control/aether/indicator.d.ts +51 -37
  161. package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
  162. package/dist/src/telem/control/aether/legend.d.ts +18 -16
  163. package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
  164. package/dist/src/telem/control/aether/state.d.ts +9 -8
  165. package/dist/src/telem/control/aether/state.d.ts.map +1 -1
  166. package/dist/src/theming/aether/provider.d.ts +990 -990
  167. package/dist/src/theming/base/theme.d.ts +330 -330
  168. package/dist/src/user/queries.d.ts +2 -2
  169. package/dist/src/view/queries.d.ts +2 -2
  170. package/dist/src/vis/axis/axis.d.ts +14 -14
  171. package/dist/src/vis/gauge/aether/gauge.d.ts +21 -21
  172. package/dist/src/vis/gauge/use.d.ts +7 -7
  173. package/dist/src/vis/line/aether/line.d.ts +7 -7
  174. package/dist/src/vis/measure/aether/measure.d.ts +56 -56
  175. package/dist/src/vis/rule/aether/aether.d.ts +14 -14
  176. package/dist/src/vis/value/aether/value.d.ts +42 -42
  177. package/dist/src/vis/value/redline.d.ts +5 -5
  178. package/dist/src/vis/value/redline.d.ts.map +1 -1
  179. package/dist/src/vis/value/use.d.ts +14 -14
  180. package/dist/src/workspace/queries.d.ts +6 -4
  181. package/dist/src/workspace/queries.d.ts.map +1 -1
  182. package/dist/tabs-CB7d2_0h.cjs +1 -0
  183. package/dist/tabs-DEXXNOZA.js +253 -0
  184. package/dist/tabs.cjs +1 -1
  185. package/dist/tabs.js +2 -4
  186. package/dist/text-Dd6wYgQM.js +142 -0
  187. package/dist/text-n3Fetdk6.cjs +1 -0
  188. package/dist/text.cjs +1 -1
  189. package/dist/text.js +2 -5
  190. package/dist/theming-Blgv4Cvi.js +591 -0
  191. package/dist/theming-KFfFjsRJ.cjs +1 -0
  192. package/dist/theming.cjs +1 -1
  193. package/dist/theming.js +2 -5
  194. package/dist/tree-B4jJAzS1.js +294 -0
  195. package/dist/tree-CsgSEpgy.cjs +1 -0
  196. package/dist/tree.cjs +1 -1
  197. package/dist/tree.js +2 -4
  198. package/dist/triggers-AqBSAR_T.cjs +1 -0
  199. package/dist/triggers-DDlalLoO.js +4748 -0
  200. package/dist/triggers.cjs +1 -1
  201. package/dist/triggers.js +2 -4
  202. package/dist/types-BGbd8pRh.js +73 -0
  203. package/dist/types-ByXvRm2h.cjs +1 -0
  204. package/dist/video-Bnr-2W9p.cjs +1 -0
  205. package/dist/video-ByMlaeKI.js +15 -0
  206. package/dist/video.cjs +1 -1
  207. package/dist/video.js +2 -4
  208. package/package.json +27 -28
  209. package/dist/Animated-B_N04fe6.cjs +0 -1
  210. package/dist/Animated-BsbNkFLg.cjs +0 -1
  211. package/dist/Animated-CLo1CLgn.js +0 -29
  212. package/dist/Animated-CO--9HPM.js +0 -354
  213. package/dist/Box-Bi280MYh.js +0 -96
  214. package/dist/Box-CNUz5BsV.cjs +0 -1
  215. package/dist/Copy-BgRUUzWz.cjs +0 -1
  216. package/dist/Copy-COWBkO_v.js +0 -337
  217. package/dist/Dialog-Bj7FiHJD.js +0 -59
  218. package/dist/Dialog-DBm6Fap1.cjs +0 -1
  219. package/dist/Editable-C17ILP50.js +0 -202
  220. package/dist/Editable-HUPqTaui.cjs +0 -1
  221. package/dist/Haul-CnZK3e-n.js +0 -132
  222. package/dist/Haul-DlwI4b25.cjs +0 -1
  223. package/dist/Items-CXBBG9Ip.cjs +0 -4
  224. package/dist/Items-DQba1BFQ.js +0 -842
  225. package/dist/Menu-BZ6ZGIv3.cjs +0 -1
  226. package/dist/Menu-CniMpPmC.js +0 -139
  227. package/dist/Provider-cSwm-2e_.cjs +0 -1
  228. package/dist/Provider-jFWpR0CX.js +0 -520
  229. package/dist/Tags-CxzMdPpm.cjs +0 -1
  230. package/dist/Tags-DvfGhiWv.js +0 -925
  231. package/dist/Text-2MISZsc5.js +0 -1712
  232. package/dist/Text-XHBXXDRS.cjs +0 -1
  233. package/dist/Video-Bew5_j16.js +0 -10
  234. package/dist/Video-BryrVNlH.cjs +0 -1
  235. package/dist/css-CloSmhZB.cjs +0 -1
  236. package/dist/css-D90kZTM8.js +0 -63
  237. package/dist/dimensions-CdFEW3oU.cjs +0 -1
  238. package/dist/dimensions-DbMN4145.js +0 -19
  239. package/dist/eraser-BShvqlBE.js +0 -958
  240. package/dist/eraser-rFMFKqsg.cjs +0 -11
  241. package/dist/event-BxvV3arE.cjs +0 -1
  242. package/dist/event-nNH_pXSr.js +0 -36
  243. package/dist/external-4jf1Bv96.cjs +0 -1
  244. package/dist/external-B2YeNEwd.cjs +0 -1
  245. package/dist/external-B9PnwQOL.js +0 -29
  246. package/dist/external-BBbkXXN0.js +0 -47
  247. package/dist/external-BByOkVID.cjs +0 -1
  248. package/dist/external-BrEnYrZV.js +0 -32
  249. package/dist/external-BwbypKCk.cjs +0 -1
  250. package/dist/external-C65vBow6.cjs +0 -1
  251. package/dist/external-CCcIJ20u.cjs +0 -1
  252. package/dist/external-CF4uh-dm.js +0 -51423
  253. package/dist/external-Cn6EfkLd.cjs +0 -1
  254. package/dist/external-CovFw1fv.cjs +0 -1
  255. package/dist/external-D2Zb9O5J.js +0 -93
  256. package/dist/external-D6aLGjMg.js +0 -8969
  257. package/dist/external-DDvmnE2k.js +0 -341
  258. package/dist/external-DTi9a-iK.cjs +0 -1
  259. package/dist/external-DYP1_xpd.js +0 -80
  260. package/dist/external-DxsuBuKe.js +0 -392
  261. package/dist/external-DysGdnTb.js +0 -130
  262. package/dist/external-N2L8ffzi.js +0 -71
  263. package/dist/external-UzXlHlr9.js +0 -24
  264. package/dist/external-_Ht_yCRf.cjs +0 -1
  265. package/dist/external-igNfmRSB.cjs +0 -28
  266. package/dist/external-uUEGzmui.cjs +0 -84
  267. package/dist/fontString-76R2eWDd.js +0 -29
  268. package/dist/fontString-BNnhiwug.cjs +0 -1
  269. package/dist/hooks-Co6IVYNw.cjs +0 -1
  270. package/dist/hooks-QNj6PdUo.js +0 -73
  271. package/dist/index.cjs +0 -60
  272. package/dist/index.js +0 -36908
  273. package/dist/jsx-runtime-nZSsnGb7.cjs +0 -6
  274. package/dist/jsx-runtime-tc70JA_2.js +0 -264
  275. package/dist/provider-Bt-E2O6g.js +0 -810
  276. package/dist/provider-DQkVj3tA.cjs +0 -10
  277. package/dist/src/memo/proxyMemo.d.ts +0 -3
  278. package/dist/src/memo/proxyMemo.d.ts.map +0 -1
  279. package/dist/types-CGRCBVD4.js +0 -82
  280. package/dist/types-DI2vtOGs.cjs +0 -1
  281. package/dist/units-Bu36uC6z.cjs +0 -1
  282. package/dist/units-DMip-eZH.js +0 -14
  283. package/dist/useStaticData-BTwIe0Il.cjs +0 -1
  284. package/dist/useStaticData-p8sk2VCJ.js +0 -1051
  285. package/dist/value-BkUH03tl.cjs +0 -53
  286. package/dist/value-D0vfKEY3.js +0 -6821
@@ -1,84 +0,0 @@
1
- "use strict";const De=require("./jsx-runtime-nZSsnGb7.cjs"),kn=require("./Copy-BgRUUzWz.cjs"),Be=require("@synnaxlabs/x"),at=require("./css-CloSmhZB.cjs"),fr=require("react"),LN=require("./Provider-cSwm-2e_.cjs"),Oa=require("./Text-XHBXXDRS.cjs"),Zs=require("./event-BxvV3arE.cjs"),qa=require("./Tags-CxzMdPpm.cjs"),HN=require("./Dialog-DBm6Fap1.cjs"),Ub=require("./Animated-B_N04fe6.cjs"),or=require("./Box-CNUz5BsV.cjs"),sn=require("./Editable-HUPqTaui.cjs");require("./types-DI2vtOGs.cjs");const zl=require("./Items-CXBBG9Ip.cjs"),GN=require("./useStaticData-BTwIe0Il.cjs");;/* empty css */require("./eraser-rFMFKqsg.cjs");require("./Haul-DlwI4b25.cjs");require("./provider-DQkVj3tA.cjs");const Wb=({format:e="dateTime",suppliedTZ:t="UTC",displayTZ:r="local",children:n,...a})=>De.jsxRuntimeExports.jsx(sn.Text,{...a,children:new Be.TimeStamp(n,t).toString(e,r)}),VN=(e,t,r)=>e==="preview"&&r===!0?"var(--pluto-primary-z)":t,Jb=({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})=>De.jsxRuntimeExports.jsx(kn.Button,{el:"label",variant:u,className:at.CSS(at.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:VN(u,y,r),onClick:w,children:u!=="preview"?De.jsxRuntimeExports.jsxs(De.jsxRuntimeExports.Fragment,{children:[De.jsxRuntimeExports.jsx("input",{className:at.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}),De.jsxRuntimeExports.jsx("span",{className:at.CSS.BE("input",o,"indicator"),onClick:w})]}):r?"True":"False"}),UN=e=>De.jsxRuntimeExports.jsx(Jb,{...e,inputType:"checkbox"}),Kb="cursor-style",dh=(e,t=document.head)=>{Yb();const r=document.createElement("style");r.innerHTML=`*{cursor: ${e} !important;}`,r.id=Kb,t.appendChild(r)},Yb=()=>{const e=document.getElementById(Kb);e?.remove()},hh=(e,t,r,n,a)=>{const{x:i,y:o}=n??Be.xy.construct(Be.box.dims(a));if(Be.box.width(t)>i&&Be.box.width(t)>Be.box.height(t)){const s=Be.box.signedWidth(t)<0?i:-i;e+=(Be.box.signedWidth(t)+s)*r.x,dh("ew-resize")}if(Be.box.height(t)>o&&Be.box.height(t)>Be.box.width(t)){const s=Be.box.signedHeight(t)<0?o:-o;e+=(Be.box.signedHeight(t)+s)*r.y,dh("ns-resize")}return e},yc=({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=fr.useRef({dragging:!1,curr:o,prev:o}),f=fr.useRef(null);c.current.dragging||(c.current.prev=o);const m=fr.useMemo(()=>{const p=Be.xy.construct(r);return a==="x"?Be.xy.construct(p.x,0):a==="y"?Be.xy.construct(0,p.y):p},[r,a]),d=fr.useMemo(()=>n!=null?Be.xy.construct(n):null,[n]);LN.useVirtualCursorDragWebKit({ref:f,onMove:fr.useCallback(p=>{if(f.current==null)return;let y=c.current.prev;c.current.dragging=!0,y=hh(y,p,m,d,Be.box.construct(f.current)),c.current.curr=y,i(y)},[i,m,d]),onEnd:fr.useCallback((p,y)=>{if(f.current==null)return;let w=c.current.prev;w=hh(w,p,m,d,Be.box.construct(f.current)),c.current.prev=w,c.current.dragging=!1,Yb(),u?.(w),l.onBlur?.()},[l.onBlur,u,m,d])});const h=fr.useCallback(()=>{i(s??c.current.prev)},[i,s]);return De.jsxRuntimeExports.jsx(kn.Button,{ref:f,variant:"outlined",className:at.CSS(at.CSS.BE("input","drag-btn"),e!=null&&at.CSS.BEM("input","drag-btn","direction",e),t),tabIndex:-1,onDoubleClick:h,onClick:Zs.preventDefault,contrast:0,textColor:9,...l,children:De.jsxRuntimeExports.jsx(Oa.Drag,{})})},WN={x:Number(Be.TimeStamp.HOUR.valueOf()),y:Number(Be.TimeStamp.days(.75).valueOf())},Zb=({value:e,onChange:t})=>{const r=new Be.TimeStamp(e,"UTC");fr.useLayoutEffect(()=>{const i=r.sub(Be.TimeStamp.utcOffset);if(i.remainder(Be.TimeStamp.DAY).isZero)return;const o=i.sub(i.remainder(Be.TimeStamp.DAY));t(Number(new Be.TimeStamp(o,"local").valueOf()))},[e]);const n=i=>{let o;if(typeof i=="number")o=new Be.TimeStamp(i,"UTC");else{if(i.length===0)return;o=new Be.TimeStamp(i,"local")}t(Number(o.valueOf()))};return{value:r.toString("ISODate","local"),onChange:n}},JN=({ref:e,onChange:t,value:r,className:n,showDragHandle:a=!0,children:i,...o})=>{const{value:s,onChange:u}=Zb({value:r,onChange:t});return De.jsxRuntimeExports.jsxs(qa.Text,{ref:e,value:s,className:at.CSS(at.CSS.B("input-date"),n),onChange:u,type:"date",...o,children:[a&&De.jsxRuntimeExports.jsx(yc,{value:r,onChange:u,dragScale:WN}),i]})},KN={one:{},two:{},three:{},four:{}},YN={one:{},two:{},three:{}},ZN={},QN=[],Zf={methods:KN,model:YN,compute:ZN,hooks:QN},XN=e=>Object.prototype.toString.call(e)==="[object Array]",eA={compute:function(e){const{world:t}=this,r=t.compute;return typeof e=="string"&&r.hasOwnProperty(e)?r[e](this):XN(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}},tA=function(e){return this.fullPointer.forEach((r,n)=>{const a=this.update([r]);e(a,n)}),this},rA=function(e,t){const n=this.fullPointer.map((i,o)=>{const 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)},nA=function(e){let t=this.fullPointer;return t=t.filter((n,a)=>{const i=this.update([n]);return e(i,a)}),this.update(t)},aA=function(e){const r=this.fullPointer.find((n,a)=>{const i=this.update([n]);return e(i,a)});return this.update([r])},iA=function(e){return this.fullPointer.some((r,n)=>{const a=this.update([r]);return e(a,n)})},oA=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)},sA={forEach:tA,map:rA,filter:nA,find:aA,some:iA,random:oA},Qn={termList:function(){return this.methods.one.termList(this.docs)},terms:function(e){const t=this.match(".");return typeof e=="number"?t.eq(e):t},groups:function(e){if(e||e===0)return this.update(this._groups[e]||[]);const 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(){const 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(){const 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;const 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(){const 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}};Qn.group=Qn.groups;Qn.fullSentence=Qn.fullSentences;Qn.sentence=Qn.fullSentences;Qn.lastTerm=Qn.lastTerms;Qn.firstTerm=Qn.firstTerms;const Qf=Object.assign({},Qn,eA,sA);Qf.get=Qf.eq;class ui{constructor(t,r,n={}){[["document",t],["world",Zf],["_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=Zf.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(){const{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){const r=new ui(this.document,t);if(this._cache&&t&&t.length>0){const n=[];t.forEach((a,i)=>{const[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 ui(this.document,t||this.pointer)}fromText(t){const{methods:r}=this,n=r.one.tokenize.fromString(t,this.world),a=new ui(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)));const r=this.update(this.pointer);return r.document=t,r._cache=this._cache,r}}Object.assign(ui.prototype,Qf);const uA="14.14.5",ph=function(e){return e&&typeof e=="object"&&!Array.isArray(e)},lA=function(e){return Object.prototype.toString.call(e)==="[object Array]"};function Qb(e,t){if(ph(t))for(const r in t)ph(t[r])?(e[r]||Object.assign(e,{[r]:{}}),Qb(e[r],t[r])):Object.assign(e,{[r]:t[r]});return e}function cA(e,t){for(const r in t)e[r]=e[r]||{},Object.assign(e[r],t[r]);return e}const fA=function(e,t){const 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))})},Xb=function(e,t,r,n){if(lA(e)){e.forEach(u=>Xb(u,t,r,n));return}const{methods:a,model:i,compute:o,hooks:s}=t;e.methods&&cA(a,e.methods),e.model&&Qb(i,e.model),e.irregulars&&fA(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)},mA=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},dA=e=>Object.prototype.toString.call(e)==="[object Object]",Xf=function(e){return Object.prototype.toString.call(e)==="[object Array]"},hA=function(e){return e.map(t=>t.terms.map(r=>(Xf(r.tags)&&(r.tags=new Set(r.tags)),r)))},pA=function(e){return e.map(t=>t.map(r=>({text:r,normal:r,pre:"",post:" ",tags:new Set})))},ew=function(e,t,r){const{methods:n}=r,a=new t([]);if(a.world=r,typeof e=="number"&&(e=String(e)),!e)return a;if(typeof e=="string"){const i=n.one.tokenize.fromString(e,r);return new t(i)}if(dA(e)&&e.isView)return new t(e.document,e.ptrs);if(Xf(e)){if(Xf(e[0])){const o=pA(e);return new t(o)}const i=hA(e);return new t(i)}return a},jl=Object.assign({},Zf),tt=function(e,t){t&&tt.addWords(t);const r=ew(e,ui,jl);return e&&r.compute(jl.hooks),r};Object.defineProperty(tt,"_world",{value:jl,writable:!0});tt.tokenize=function(e,t){const{compute:r}=this._world;t&&tt.addWords(t);const n=ew(e,ui,jl);return r.contractions&&n.compute(["alias","normal","machine","contractions"]),n};tt.plugin=function(e){return Xb(e,this._world,ui,this),this};tt.extend=tt.plugin;tt.world=function(){return this._world};tt.model=function(){return this._world.model};tt.methods=function(){return this._world.methods};tt.hooks=function(){return this._world.hooks};tt.verbose=mA;tt.version=uA;const gA=function(e){return e.map(r=>{const 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));const i=Array.from(a.tags);for(let o=0;o<i.length;o+=1)n.add("#"+i[o])}),n})},vA={one:{cacheDoc:gA}},yA={cache:function(){return this._cache=this.methods.one.cacheDoc(this.document),this},uncache:function(){return this._cache=null,this}},bA=function(e){Object.assign(e.prototype,yA)},wA={cache:function(e){e._cache=e.methods.one.cacheDoc(e.document)}},xA={api:bA,compute:wA,methods:vA},DA={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}},gh=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),NA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),AA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),tw=(e,t,r)=>{if(r.forEach(n=>n.dirty=!0),e){const n=[t,0].concat(r);Array.prototype.splice.apply(e,n)}return e},Bo=function(e){const t=/ $/,r=/[-–—]/,n=e[e.length-1];n&&!t.test(n.post)&&!r.test(n.post)&&(n.post+=" ")},vh=(e,t,r)=>{const n=/[-.?!,;:)–—'"]/g,a=e[t-1];if(!a)return;const i=a.post;if(n.test(i)){const o=i.match(n).join(""),s=r[r.length-1];s.post=o+s.post,a.post=a.post.replace(n,"")}},CA=function(e,t,r){const n=e[t];if(t!==0||!gh(n.text))return;r[0].text=NA(r[0].text);const a=e[t];a.tags.has("ProperNoun")||a.tags.has("Acronym")||gh(a.text)&&a.text.length>1&&(a.text=AA(a.text))},EA=function(e,t,r,n){const[a,i,o]=t;i===0||o===n[a].length?Bo(r):(Bo(r),Bo([e[t[1]]])),CA(e,i,r),tw(e,i,r)},SA=function(e,t,r,n){const[a,,i]=t,o=(n[a]||[]).length;i<o?(vh(e,i,r),Bo(r)):o===i&&(Bo(e),vh(e,i,r),n[a+1]&&(r[r.length-1].post+=" ")),tw(e,t[2],r),t[4]=r[r.length-1].id};let vs=0;const yh=e=>(e=e.length<3?"0"+e:e,e.length<3?"0"+e:e),rw=function(e){let[t,r]=e.index||[0,0];vs+=1,vs=vs>46655?0:vs,t=t>46655?0:t,r=r>1294?0:r;let n=yh(vs.toString(36));n+=yh(t.toString(36));let a=r.toString(36);a=a.length<2?"0"+a:a,n+=a;const i=parseInt(Math.random()*36,10);return n+=i.toString(36),e.normal+"|"+n.toUpperCase()},bh=function(e){e.has("@hasContraction")&&typeof e.contractions=="function"&&e.grow("@hasContraction").contractions().expand()},wh=e=>Object.prototype.toString.call(e)==="[object Array]",TA=function(e){return e=e.map(t=>(t.id=rw(t),t)),e},MA=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]||[]:wh(e)?wh(e[0])?e[0]:e:[]},xh=function(e,t,r){const{document:n,world:a}=t;t.uncache();const i=t.fullPointer,o=t.fullPointer;t.forEach((u,l)=>{const c=u.fullPointer[0],[f]=c,m=n[f];let d=MA(e,a);d.length!==0&&(d=TA(d),r?(bh(t.update([c]).firstTerm()),EA(m,c,d,n)):(bh(t.update([c]).lastTerm()),SA(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)});const 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},Zi={insertAfter:function(e){return xh(e,this,!1)},insertBefore:function(e){return xh(e,this,!0)}};Zi.append=Zi.insertAfter;Zi.prepend=Zi.insertBefore;Zi.insert=Zi.insertAfter;const FA=/\$[0-9a-z]+/g,sd={},PA=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),kA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),OA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),$A=function(e,t,r){return e.forEach(n=>{const a=t(n);n.replaceWith(a,r)}),e},BA=function(e,t){if(typeof e!="string")return e;const r=t.groups();return e=e.replace(FA,n=>{const a=n.replace(/\$/,"");return r.hasOwnProperty(a)?r[a].text():n}),e};sd.replaceWith=function(e,t={}){let r=this.fullPointer;const n=this;if(this.uncache(),typeof e=="function")return $A(n,e,t);const a=n.docs[0];if(!a)return n;const i=t.possessives&&a[a.length-1].tags.has("Possessive"),o=t.case&&PA(a[0].text);e=BA(e,n);const s=this.update(r);r=r.map(m=>m.slice(0,3));const 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){const 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]){const m=n.docs[0][n.docs[0].length-1];m.post.trim()||(m.post=c)}const 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){const m=o?kA:OA;f.docs[0][0].text=m(f.docs[0][0].text)}return f};sd.replace=function(e,t,r){if(e&&!t)return this.replaceWith(e,r);const n=this.match(e);return n.found?(this.soften(),n.replaceWith(t,r)):this};const _A=function(e,t){const 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"))},IA=function(e,t){t.forEach(r=>{const[n,a,i]=r,o=i-a;e[n]&&(i===e[n].length&&i>1&&_A(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])){const n=e[r-1],a=n[n.length-1];a&&(a.post=a.post.trimEnd())}return e},zA=function(e,t){return e=e.map(r=>{const[n]=r;return t[n]&&t[n].forEach(a=>{const 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},em={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));const a=!r.ptrs;n.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction").contractions().expand();let i=r.fullPointer;const o=n.fullPointer.reverse(),s=IA(this.document,o),u=t(o);return i=zA(i,u),r.ptrs=i,r.document=s,r.compute("index"),a&&(r.ptrs=void 0),e?r.toView(i):(this.ptrs=[],r.none())}};em.delete=em.remove;const zs={pre:function(e,t){return e===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(r=>{const n=r[0];t===!0?n.pre+=e:n.pre=e}),this)},post:function(e,t){if(e===void 0){const r=this.docs[this.docs.length-1];return r[r.length-1].post}return this.docs.forEach(r=>{const n=r[r.length-1];t===!0?n.post+=e:n.post=e}),this},trim:function(){if(!this.found)return this;const e=this.docs,t=e[0][0];t.pre=t.pre.trimStart();const 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;const 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;const n=r[r.length-1];n.post=t+n.post}),this}};zs.deHyphenate=zs.dehyphenate;zs.toQuotation=zs.toQuotations;const jA=(e,t)=>e.normal<t.normal?-1:e.normal>t.normal?1:0,qA=(e,t)=>{const r=e.normal.trim().length,n=t.normal.trim().length;return r<n?1:r>n?-1:0},RA=(e,t)=>e.words<t.words?1:e.words>t.words?-1:0,LA=(e,t)=>e[0]<t[0]?1:e[0]>t[0]?-1:e[1]>t[1]?1:-1,HA=function(e){const t={};return e.forEach(r=>{t[r.normal]=t[r.normal]||0,t[r.normal]+=1}),e.sort((r,n)=>{const a=t[r.normal],i=t[n.normal];return a<i?1:a>i?-1:0}),e},Wc={alpha:jA,length:qA,wordCount:RA,sequential:LA,byFreq:HA},GA=new Set(["index","sequence","seq","sequential","chron","chronological"]),VA=new Set(["freq","frequency","topk","repeats"]),UA=new Set(["alpha","alphabetical"]),WA=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},JA=function(e){const{docs:t,pointer:r}=this;if(this.uncache(),typeof e=="function")return WA(this,e);e=e||"alpha";const n=r||t.map((i,o)=>[o]);let a=t.map((i,o)=>({index:o,words:i.length,normal:i.map(s=>s.machine||s.normal||"").join(" "),pointer:n[o]}));return GA.has(e)&&(e="sequential"),UA.has(e)&&(e="alpha"),VA.has(e)?(a=Wc.byFreq(a),this.update(a.map(i=>i.pointer))):typeof Wc[e]=="function"?(a=a.sort(Wc[e]),this.update(a.map(i=>i.pointer))):this},KA=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)},YA=function(){const e=new Set;return this.filter(r=>{const n=r.text("machine");return e.has(n)?!1:(e.add(n),!0)})},ZA={unique:YA,reverse:KA,sort:JA},QA=e=>Object.prototype.toString.call(e)==="[object Array]",nw=function(e,t){if(e.length>0){const r=e[e.length-1],n=r[r.length-1];/ /.test(n.post)===!1&&(n.post+=" ")}return e=e.concat(t),e},XA=function(e,t){if(e.document===t.document){const n=e.fullPointer.concat(t.fullPointer);return e.toView(n).compute("index")}return t.fullPointer.forEach(n=>{n[0]+=e.document.length}),e.document=nw(e.document,t.docs),e.all()},e3={concat:function(e){if(typeof e=="string"){const t=this.fromText(e);if(!this.found||!this.ptrs)this.document=this.document.concat(t.document);else{const 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 XA(this,e);if(QA(e)){const t=nw(this.document,e);return this.document=t,this.all()}return this}},t3=function(){return this.ptrs=this.fullPointer,this},r3=function(){let e=this.ptrs;return!e||e.length<1?this:(e=e.map(t=>t.slice(0,3)),this.ptrs=e,this)},n3={harden:t3,soften:r3},a3=Object.assign({},DA,Zi,sd,em,zs,ZA,e3,n3),i3=function(e){Object.assign(e.prototype,a3)},o3={id:function(e){const t=e.docs;for(let r=0;r<t.length;r+=1)for(let n=0;n<t[r].length;n+=1){const a=t[r][n];a.id=a.id||rw(a)}}},s3={api:i3,compute:o3},u3=[{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"]}],cn=!0,l3={st:cn,nd:cn,rd:cn,th:cn,am:cn,pm:cn,max:cn,"°":cn,s:cn,e:cn,er:cn,ère:cn,ème:cn},c3={one:{contractions:u3,numberSuffixes:l3}},Jc=function(e,t,r){const[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))},f3=/'/,m3=new Set(["what","how","when","where","why"]),d3=new Set(["be","go","start","think","need"]),h3=new Set(["been","gone"]),p3=function(e,t){const r=e[t].normal.split(f3)[0];if(m3.has(r))return[r,"did"];if(e[t+1]){if(h3.has(e[t+1].normal))return[r,"had"];if(d3.has(e[t+1].normal))return[r,"would"]}return null},g3=function(e,t){return e[t].normal==="ain't"||e[t].normal==="aint"?null:[e[t].normal.replace(/n't/,""),"not"]},ud=/'/,v3=/(e|é|aison|sion|tion)$/,y3=/(age|isme|acle|ege|oire)$/,b3=(e,t)=>{const r=e[t].normal.split(ud)[1];return r&&r.endsWith("e")?["la",r]:["le",r]},w3=(e,t)=>{const r=e[t].normal.split(ud)[1];return r&&v3.test(r)&&!y3.test(r)?["du",r]:r&&r.endsWith("s")?["des",r]:["de",r]},x3=(e,t)=>["je",e[t].normal.split(ud)[1]],Kc={preJ:x3,preL:b3,preD:w3},D3=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,N3=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,A3=/^[0-9]{3}-[0-9]{4}$/,C3=function(e,t){const r=e[t];let n=r.text.match(D3);return n!==null?r.tags.has("PhoneNumber")===!0||A3.test(r.text)?null:[n[1],"to",n[2]]:(n=r.text.match(N3),n!==null?[n[1],"to",n[4]]:null)},E3=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,S3=function(e,t,r){const n=r.model.one.numberSuffixes||{},i=e[t].text.match(E3);if(i!==null){const o=i[2].toLowerCase().trim();return n.hasOwnProperty(o)?null:[i[1],o]}return null},Dh=/'/,T3=/^[0-9][^-–—]*[-–—].*?[0-9]/,Nh=function(e,t,r,n){const a=t.update();a.document=[e];let i=r+n;r>0&&(r-=1),e[i]&&(i+=1),a.ptrs=[[0,r,i]]},Ah={t:(e,t)=>g3(e,t),d:(e,t)=>p3(e,t)},Ch={j:(e,t)=>Kc.preJ(e,t),l:(e,t)=>Kc.preL(e,t),d:(e,t)=>Kc.preD(e,t)},M3=function(e,t,r,n){for(let a=0;a<e.length;a+=1){const 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},Yc=function(e,t){const r=t.fromText(e.join(" "));return r.compute(["id","alias"]),r.docs[0]},F3=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"]},P3=e=>{const{world:t,document:r}=e,{model:n,methods:a}=t,i=n.one.contractions||[];r.forEach((o,s)=>{for(let u=o.length-1;u>=0;u-=1){let l=null,c=null;if(Dh.test(o[u].normal)===!0){const m=o[u].normal.split(Dh);l=m[0],c=m[1]}let f=M3(i,o[u],l,c);if(!f&&Ah.hasOwnProperty(c)&&(f=Ah[c](o,u,t)),!f&&Ch.hasOwnProperty(l)&&(f=Ch[l](o,u)),l==="there"&&c==="s"&&(f=F3(o,u)),f){f=Yc(f,e),Jc(r,[s,u],f),Nh(r[s],e,u,f.length);continue}if(T3.test(o[u].normal)){f=C3(o,u),f&&(f=Yc(f,e),Jc(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"),Nh(r[s],e,u,f.length));continue}f=S3(o,u,t),f&&(f=Yc(f,e),Jc(r,[s,u],f),a.one.setTag([f[1]],"Unit",t,null,"contraction-unit"))}})},k3={contractions:P3},O3={model:c3,compute:k3,hooks:["contractions"]},Eh=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){const l=s[u],c=l.machine||l.normal;if(o[c]!==void 0&&s[u+1]){const f=u+o[c]-1;for(let m=f;m>u;m-=1){const 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}}})},$3=function(e){return e.docs.forEach(t=>{t.forEach(r=>{delete r.frozen})}),e},B3={frozen:Eh,freeze:Eh,unfreeze:$3},Sh=e=>"\x1B[34m"+e+"\x1B[0m",Th=e=>"\x1B[3m\x1B[2m"+e+"\x1B[0m",Mh=function(e){e.docs.forEach(t=>{console.log(Sh(`
2
- ┌─────────`)),t.forEach(r=>{let n=` ${Th("│")} `;const a=r.implicit||r.text||"-";r.frozen===!0?n+=`${Sh(a)} ❄️`:n+=Th(a),console.log(n)})})},_3={compute:B3,mutate:e=>{const t=e.methods.one;t.termMethods.isFrozen=r=>r.frozen===!0,t.debug.freeze=Mh,t.debug.frozen=Mh},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"]},I3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,o=n.one._multiCache||{},{lexicon:s}=n.one||{},u=e[t],l=u.machine||u.normal;if(o[l]!==void 0&&e[t+1]){const c=t+o[l]-1;for(let f=c;f>t;f-=1){const m=e.slice(t,f+1);if(m.length<=1)return!1;const d=m.map(h=>h.machine||h.normal).join(" ");if(s.hasOwnProperty(d)===!0){const 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},Fh=/^(under|over|mis|re|un|dis|semi|pre|post)-?/,z3=new Set(["Verb","Infinitive","PastTense","Gerund","PresentTense","Adjective","Participle"]),j3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,{lexicon:o}=n.one,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){const l=s.alias.find(c=>o.hasOwnProperty(c));if(l)return i([s],o[l],r,!1,"1-lexicon-alias"),!0}if(Fh.test(u)===!0){const l=u.replace(Fh,"");if(o.hasOwnProperty(l)&&l.length>3&&z3.has(o[l]))return i([s],o[l],r,!1,"1-lexicon-prefix"),!0}return null},q3=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||I3(r,n,t),a=a||j3(r,n,t)}})},R3={lexicon:q3},L3=function(e){const t={},r={};return Object.keys(e).forEach(n=>{const a=e[n];n=n.toLowerCase().trim(),n=n.replace(/'s\b/,"");const 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}},H3={one:{expandLexicon:L3}},G3=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){const{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){const{lex:s,_multi:u}=n.two.expandLexicon(e,r);Object.assign(a.one.lexicon,s),Object.assign(a.one._multiCache,u)}const{lex:i,_multi:o}=n.one.expandLexicon(e,r);Object.assign(a.one.lexicon,i),Object.assign(a.one._multiCache,o)},V3={addWords:G3},U3={one:{lexicon:{},_multiCache:{},frozenLex:{}}},W3={model:U3,methods:H3,compute:R3,lib:V3,hooks:["lexicon"]},J3=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())},aw=function(e,t){const r=[{}],n=[null],a=[0],i=[];let o=0;e.forEach(function(s){let u=0;const l=J3(s,t);for(let c=0;c<l.length;c++){const 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(const s in r[0])o=r[0][s],a[o]=0,i.push(o);for(;i.length;){const s=i.shift(),u=Object.keys(r[s]);for(let l=0;l<u.length;l+=1){const 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)){const 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}},K3=function(e,t,r){let n=0;const a=[];for(let i=0;i<e.length;i++){const 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])){const s=t.endAs[n];for(let u=0;u<s.length;u++){const l=s[u],c=e[i-l+1],[f,m]=c.index;a.push([f,m,m+l,c.id])}}}return a},Y3=function(e,t){for(let r=0;r<e.length;r+=1)if(t.has(e[r])===!0)return!1;return!0},Z3=function(e,t,r){let n=[];r.form=r.form||"normal";const a=e.docs;if(!t.goNext||!t.goNext[0])return console.error("Compromise invalid lookup trie"),e.none();const i=Object.keys(t.goNext[0]);for(let o=0;o<a.length;o++){if(e._cache&&e._cache[o]&&Y3(i,e._cache[o])===!0)continue;const s=a[o],u=K3(s,t,r);u.length>0&&(n=n.concat(u))}return e.update(n)},Q3=e=>Object.prototype.toString.call(e)==="[object Object]";function X3(e){e.prototype.lookup=function(t,r={}){if(!t)return this.none();typeof t=="string"&&(t=[t]);const n=Q3(t)?t:aw(t,this.world);let a=Z3(this,n,r);return a=a.settle(),a}}const Zc=(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},eC=function(e){return e.goNext=e.goNext.map(t=>{if(Object.keys(t).length!==0)return t}),e.goNext=Zc(e.goNext,void 0),e.failTo=Zc(e.failTo,0),e.endAs=Zc(e.endAs,null),e},tm={buildTrie:function(e){const t=aw(e,this.world());return eC(t)}};tm.compile=tm.buildTrie;const tC={api:X3,lib:tm},Ph=function(e,t){return t&&e.forEach(r=>{const n=r[0];t[n]&&(r[0]=t[n][0],r[1]+=t[n][1],r[2]+=t[n][1])}),e},iw=function(e,t){let{ptrs:r}=e;const{byGroup:n}=e;return r=Ph(r,t),Object.keys(n).forEach(a=>{n[a]=Ph(n[a],t)}),{ptrs:r,byGroup:n}},Qs=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},ow=e=>Object.prototype.toString.call(e)==="[object Object]",Xs=e=>e&&ow(e)&&e.isView===!0,eu=e=>e&&ow(e)&&e.isNet===!0,rC=function(e,t,r){const n=this.methods.one;if(Xs(e))return this.intersection(e);if(eu(e))return this.sweep(e,{tagger:!1}).view.settle();e=Qs(e,r,this.world);const a={regs:e,group:t},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=iw(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},nC=function(e,t,r){const n=this.methods.one;if(Xs(e))return this.intersection(e).eq(0);if(eu(e))return this.sweep(e,{tagger:!1,matchOne:!0}).view;e=Qs(e,r,this.world);const a={regs:e,group:t,justOne:!0},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=iw(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},aC=function(e,t,r){const n=this.methods.one;if(Xs(e))return this.intersection(e).fullPointer.length>0;if(eu(e))return this.sweep(e,{tagger:!1}).view.found;e=Qs(e,r,this.world);const a={regs:e,group:t,justOne:!0};return n.match(this.docs,a,this._cache).ptrs.length>0},iC=function(e,t,r){const n=this.methods.one;if(Xs(e))return this.filter(u=>u.intersection(e).found);if(eu(e)){const u=this.sweep(e,{tagger:!1}).view.settle();return this.if(u)}e=Qs(e,r,this.world);const a={regs:e,group:t,justOne:!0};let i=this.fullPointer;const o=this._cache||[];i=i.filter((u,l)=>{const c=this.update([u]);return n.match(c.docs,a,o[l]).ptrs.length>0});const s=this.update(i);return this._cache&&(s._cache=i.map(u=>o[u[0]])),s},oC=function(e,t,r){const{methods:n}=this,a=n.one;if(Xs(e))return this.filter(s=>!s.intersection(e).found);if(eu(e)){const s=this.sweep(e,{tagger:!1}).view.settle();return this.ifNo(s)}e=Qs(e,r,this.world);const i=this._cache||[],o=this.filter((s,u)=>{const 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},sC={matchOne:nC,match:rC,has:aC,if:iC,ifNo:oC},uC=function(e,t,r){const{indexN:n}=this.methods.one.pointer,a=[],i=n(this.fullPointer);Object.keys(i).forEach(s=>{const u=i[s].sort((l,c)=>l[1]>c[1]?1:-1)[0];u[1]>0&&a.push([u[0],0,u[1]])});const o=this.toView(a);return e?o.match(e,t,r):o},lC=function(e,t,r){const{indexN:n}=this.methods.one.pointer,a=[],i=n(this.fullPointer),o=this.document;Object.keys(i).forEach(u=>{const 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])});const s=this.toView(a);return e?s.match(e,t,r):s},cC=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[e.length-1].end=!0;const n=this.fullPointer;return this.forEach((a,i)=>{const o=a.before(e,t);if(o.found){const s=o.terms();n[i][1]-=s.length,n[i][3]=s.docs[0][0].id}}),this.update(n)},fC=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[0].start=!0;const n=this.fullPointer;return this.forEach((a,i)=>{const o=a.after(e,t);if(o.found){const s=o.terms();n[i][2]+=s.length,n[i][4]=null}}),this.update(n)},mC=function(e,t,r){return this.growRight(e,t,r).growLeft(e,t,r)},dC={before:uC,after:lC,growLeft:cC,growRight:fC,grow:mC},sw=function(e,t){return[e[0],e[1],t[2]]},hC=function(e){return Object.prototype.toString.call(e)==="[object Array]"},ld=(e,t,r)=>typeof e=="string"||hC(e)?t.match(e,r):e||t.none(),cd=function(e,t){const[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},Vo={};Vo.splitOn=function(e,t){const{splitAll:r}=this.methods.one.pointer,n=ld(e,this,t).fullPointer,a=r(this.fullPointer,n);let 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=>cd(o,this)),this.update(i)};Vo.splitBefore=function(e,t){const{splitAll:r}=this.methods.one.pointer,n=ld(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(sw(o.match,o.after)):i.push(o.match)}),i=i.filter(o=>o),i=i.map(o=>cd(o,this)),this.update(i)};Vo.splitAfter=function(e,t){const{splitAll:r}=this.methods.one.pointer,n=ld(e,this,t).fullPointer,a=r(this.fullPointer,n);let i=[];return a.forEach(o=>{i.push(o.passthrough),o.before&&o.match?i.push(sw(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=>cd(o,this)),this.update(i)};Vo.split=Vo.splitAfter;const pC=function(e,t){return!e||!t||e[0]!==t[0]?!1:e[2]===t[1]},kh=function(e,t,r){const n=e.world,a=n.methods.one.parseMatch;t=t||".$",r=r||"^.";const i=a(t,{},n),o=a(r,{},n);i[i.length-1].end=!0,o[0].start=!0;const s=e.fullPointer,u=[s[0]];for(let l=1;l<s.length;l+=1){const c=u[u.length-1],f=s[l],m=e.update([c]),d=e.update([f]);pC(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)},gC={joinIf:function(e,t){return kh(this,e,t)},join:function(){return kh(this)}},Xn=Object.assign({},sC,dC,Vo,gC);Xn.lookBehind=Xn.before;Xn.lookBefore=Xn.before;Xn.lookAhead=Xn.after;Xn.lookAfter=Xn.after;Xn.notIf=Xn.ifNo;const vC=function(e){Object.assign(e.prototype,Xn)},yC=/(?:^|\s)([![^]*(?:<[^<]*>)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/,bC=/([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/,wC=/ /g,xC=e=>/^[![^]*(<[^<]*>)?\(/.test(e)&&/\)[?\]+*$~]*$/.test(e),Oh=e=>/^[![^]*(<[^<]*>)?\//.test(e)&&/\/[?\]+*$~]*$/.test(e),$h=function(e){return e=e.map(t=>t.trim()),e=e.filter(t=>t),e},DC=function(e){const t=e.split(yC);let r=[];t.forEach(a=>{if(Oh(a)){r.push(a);return}r=r.concat(a.split(bC))}),r=$h(r);let n=[];return r.forEach(a=>{xC(a)||Oh(a)?n.push(a):n=n.concat(a.split(wC))}),n=$h(n),n},Bh=/\{([0-9]+)?(, *[0-9]*)?\}/,_h=/&&/,NC=new RegExp(/^<\s*(\S+)\s*>/),Ih=e=>e.charAt(0).toUpperCase()+e.substring(1),Dn=e=>e.charAt(e.length-1),fn=e=>e.charAt(0),ko=e=>e.substring(1),Oo=e=>e.substring(0,e.length-1),ys=function(e){return e=ko(e),e=Oo(e),e},uw=function(e,t){const r={};for(let n=0;n<2;n+=1){if(Dn(e)==="$"&&(r.end=!0,e=Oo(e)),fn(e)==="^"&&(r.start=!0,e=ko(e)),Dn(e)==="?"&&(r.optional=!0,e=Oo(e)),(fn(e)==="["||Dn(e)==="]")&&(r.group=null,fn(e)==="["&&(r.groupStart=!0),Dn(e)==="]"&&(r.groupEnd=!0),e=e.replace(/^\[/,""),e=e.replace(/\]$/,""),fn(e)==="<")){const a=NC.exec(e);a.length>=2&&(r.group=a[1],e=e.replace(a[0],""))}if(Dn(e)==="+"&&(r.greedy=!0,e=Oo(e)),e!=="*"&&Dn(e)==="*"&&e!=="\\*"&&(r.greedy=!0,e=Oo(e)),fn(e)==="!"&&(r.negative=!0,e=ko(e)),fn(e)==="~"&&Dn(e)==="~"&&e.length>2&&(e=ys(e),r.fuzzy=!0,r.min=t.fuzzy||.85,/\(/.test(e)===!1))return r.word=e,r;if(fn(e)==="/"&&Dn(e)==="/")return e=ys(e),t.caseSensitive&&(r.use="text"),r.regex=new RegExp(e),r;if(Bh.test(e)===!0&&(e=e.replace(Bh,(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),""))),fn(e)==="("&&Dn(e)===")"){_h.test(e)?(r.choices=e.split(_h),r.operator="and"):(r.choices=e.split("|"),r.operator="or"),r.choices[0]=ko(r.choices[0]);const a=r.choices.length-1;r.choices[a]=Oo(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=>uw(o,t))),e=""}if(fn(e)==="{"&&Dn(e)==="}"){if(e=ys(e),r.root=e,/\//.test(e)){const 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(fn(e)==="<"&&Dn(e)===">")return e=ys(e),r.chunk=Ih(e),r.greedy=!0,r;if(fn(e)==="%"&&Dn(e)==="%")return e=ys(e),r.switch=e,r}return fn(e)==="#"?(r.tag=ko(e),r.tag=Ih(r.tag),r):fn(e)==="@"?(r.method=ko(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)},AC=/[a-z0-9][-–—][a-z]/i,CC=function(e,t){const r=t.model.one.prefixes;for(let n=e.length-1;n>=0;n-=1){const a=e[n];if(a.word&&AC.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=>{const s=Object.assign({},a);s.word=o,e.splice(n,0,s)})}}return e},zh=function(e,t){const{all:r}=t.methods.two.transform.verb||{},n=e.root;return r?r(n,t.model):[]},jh=function(e,t){const{all:r}=t.methods.two.transform.noun||{};return r?r(e.root,t.model):[e.root]},qh=function(e,t){const{all:r}=t.methods.two.transform.adjective||{};return r?r(e.root,t.model):[e.root]},EC=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(zh(r,t)):r.pos==="Noun"?n=n.concat(jh(r,t)):r.pos==="Adjective"&&(n=n.concat(qh(r,t))):(n=n.concat(zh(r,t)),n=n.concat(jh(r,t)),n=n.concat(qh(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},SC=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},TC=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;const 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})},MC=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))},FC=function(e){return e=SC(e),e=TC(e),e=MC(e),e},PC=function(e,t,r){if(e==null||e==="")return[];t=t||{},typeof e=="number"&&(e=String(e));let n=DC(e);return n=n.map(a=>uw(a,t)),n=CC(n,r),n=EC(n,r),n=FC(n),n},kC=function(e,t){for(const r of t)if(e.has(r))return!0;return!1},OC=function(e,t){for(let r=0;r<e.length;r+=1){const 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&&kC(n.fastOr,t)===!1)return!1}}return!1},$C=function(e,t){const r=e.length,n=t.length;if(r===0)return n;if(n===0)return r;const a=(n>r?n:r)+1;if(Math.abs(r-n)>(a||100))return a||100;const 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]},BC=function(e,t,r=3){if(e===t)return 1;if(e.length<r||t.length<r)return 0;const n=$C(e,t),a=Math.max(e.length,t.length);return 1-(a===0?0:n/a)},_C=/([\u0022\uFF02\u0027\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F])/,IC=/([\u0022\uFF02\u0027\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4])/,Rh=/^[-–—]$/,Lh=/ [-–—]{1,3} /,oa=(e,t)=>e.post.indexOf(t)!==-1,js={hasQuote:e=>_C.test(e.pre)||IC.test(e.post),hasComma:e=>oa(e,","),hasPeriod:e=>oa(e,".")===!0&&oa(e,"...")===!1,hasExclamation:e=>oa(e,"!"),hasQuestionMark:e=>oa(e,"?")||oa(e,"¿"),hasEllipses:e=>oa(e,"..")||oa(e,"…"),hasSemicolon:e=>oa(e,";"),hasColon:e=>oa(e,":"),hasSlash:e=>/\//.test(e.text),hasHyphen:e=>Rh.test(e.post)||Rh.test(e.pre),hasDash:e=>Lh.test(e.post)||Lh.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)};js.hasQuotation=js.hasQuote;let Ar=function(){};const zC=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||BC(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 js[t.method]=="function"&&js[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;const 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=>Ar(e,a,r,n)):t.choices.some(a=>Ar(e,a,r,n)):!1};Ar=function(e,t,r,n){const a=zC(e,t,r,n);return t.negative===!0?!a:a};const jC=function(e,t){const 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&&Ar(e.terms[e.t],t,e.start_i+e.t,e.phrase_length))return e.t;const a=e.t-n+1;if(r.max!==void 0&&a===r.max)return e.t;if(Ar(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},qC=function(e,t){let r=e.t;if(!t)return e.terms.length;for(;r<e.terms.length;r+=1)if(Ar(e.terms[r],t,e.start_i+r,e.phrase_length)===!0)return r;return null},RC=function(e,t){if(e.end===!0&&e.greedy===!0&&t.start_i+t.t<t.phrase_length-1){const r=Object.assign({},e,{end:!1});if(Ar(t.terms[t.t],r,t.start_i+t.t,t.phrase_length)===!0)return!0}return!1},bc=function(e,t){return e.groups[e.inGroup]||(e.groups[e.inGroup]={start:t,length:0}),e.groups[e.inGroup]},LC=function(e){const{regs:t}=e,r=t[e.r],n=qC(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=bc(e,e.t);a.length=n-e.t}return e.t=n,!0},HC=function(e){return Object.prototype.toString.call(e)==="[object Array]"},lw=function(e,t=0){const r=e.regs[e.r];let n=!1;for(let a=0;a<r.choices.length;a+=1){const i=r.choices[a];if(!HC(i))return!1;if(n=i.every((o,s)=>{let u=0;const l=e.t+s+t+u;if(e.terms[l]===void 0)return!1;const c=Ar(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){const m=e.terms[l+f];if(m)if(Ar(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?lw(e,t):t},GC=function(e){let t=0;return e.regs[e.r].choices.every(a=>{const i=a.every((o,s)=>{const u=e.t+s;return e.terms[u]===void 0?!1:Ar(e.terms[u],o,u,e.phrase_length)});return i===!0&&a.length>t&&(t=a.length),i})===!0?t:!1},VC=function(e){const{regs:t}=e,r=t[e.r],n=lw(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=bc(e,e.t);a.length+=n}if(r.end===!0){const 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},UC=function(e){const{regs:t}=e,r=t[e.r],n=GC(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=bc(e,e.t);a.length+=n}if(r.end===!0){const 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},WC=function(e,t,r){let n=0;for(let a=e.t;a<e.terms.length;a+=1){let i=Ar(e.terms[a],t,e.start_i+e.t,e.phrase_length);if(i||r&&(i=Ar(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)},JC=function(e){const{regs:t}=e,r=t[e.r],n=Object.assign({},r);if(n.negative=!1,Ar(e.terms[e.t],n,e.start_i+e.t,e.phrase_length))return!1;if(r.optional){const i=t[e.r+1];i&&(Ar(e.terms[e.t],i,e.start_i+e.t,e.phrase_length)?e.r+=1:i.optional&&t[e.r+2]&&Ar(e.terms[e.t],t[e.r+2],e.start_i+e.t,e.phrase_length)&&(e.r+=2))}return r.greedy?WC(e,n,t[e.r+1]):(e.t+=1,!0)},KC=function(e){const{regs:t}=e,r=t[e.r],n=e.terms[e.t],a=Ar(n,t[e.r+1],e.start_i+e.t,e.phrase_length);if(r.negative||a){const i=e.terms[e.t+1];(!i||!Ar(i,t[e.r+1],e.start_i+e.t,e.phrase_length))&&(e.r+=1)}},YC=function(e){const{regs:t,phrase_length:r}=e,n=t[e.r];return e.t=jC(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},ZC=function(e){const 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)}},QC=function(e,t){const r=e.regs[e.r],n=bc(e,t);e.t>1&&r.greedy?n.length+=e.t-t:n.length++},Qc=function(e){const{regs:t}=e,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]&&KC(e),n.implicit&&e.terms[e.t+1]&&ZC(e),e.t+=1,r.end===!0&&e.t!==e.terms.length&&r.greedy!==!0||r.greedy===!0&&!YC(e)?null:(e.hasGroup===!0&&QC(e,a),!0))},fd=function(e,t,r,n){if(e.length===0||t.length===0)return null;const 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){const 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(!LC(a))return null;continue}if(s.choices!==void 0&&s.operator==="or"){if(!VC(a))return null;continue}if(s.choices!==void 0&&s.operator==="and"){if(!UC(a))return null;continue}if(s.anything===!0){if(s.negative&&s.anything||!Qc(a))return null;continue}if(RC(s,a)===!0){if(!Qc(a))return null;continue}if(s.negative){if(!JC(a))return null;continue}if(Ar(a.terms[a.t],s,a.start_i+a.t,a.phrase_length)===!0){if(!Qc(a))return null;continue}if(s.optional!==!0)return null}const i=[null,r,a.t+r];if(i[1]===i[2])return null;const o={};return Object.keys(a.groups).forEach(s=>{const u=a.groups[s],l=r+u.start;o[s]=[null,l,l+u.length]}),{pointer:i,groups:o}},XC=function(e,t){const 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})},eE=function(e,t,r){return e=e.filter(n=>{const[a,i,o]=n.pointer,s=r[a].slice(i,o);for(let u=0;u<s.length;u+=1){const l=s.slice(u);if(fd(l,t,u,s.length)!==null)return!1}return!0}),e},cw=function(e,t){return e.pointer[0]=t,Object.keys(e.groups).forEach(r=>{e.groups[r][0]=t}),e},tE=function(e,t,r){let n=fd(e,t,0,e.length);return n?(n=cw(n,r),n):null},rE=function(e,t,r){r=r||[];const{regs:n,group:a,justOne:i}=t;let 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){const l=e[u];if(!(r[u]&&OC(n,r[u]))){if(n[0].start===!0){const c=tE(l,n,u);c&&o.push(c);continue}for(let c=0;c<l.length;c+=1){const f=l.slice(c);if(f.length<s)break;let m=fd(f,n,c,l.length);if(m){if(m=cw(m,u),o.push(m),i===!0)break e;const 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=>{const l=u.pointer[0];return e[l].length===u.pointer[2]})),t.notIf&&(o=eE(o,t.notIf,e)),o=XC(o,a),o.ptrs.forEach(u=>{const[l,c,f]=u;u[3]=e[l][c].id,u[4]=e[l][f-1].id}),o},nE={one:{termMethods:js,parseMatch:PC,match:rE}},aE={parseMatch:function(e,t){const r=this.world(),n=r.methods.one.killUnicode;return n&&(e=n(e,r)),r.methods.one.parseMatch(e,t,r)}},iE={api:vC,methods:nE,lib:aE},oE=/^\../,sE=/^#./,uE=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),lE=function(e){let t="",r="</span>";return e=uE(e),oE.test(e)?t=`<span class="${e.replace(/^\./,"")}"`:sE.test(e)?t=`<span id="${e.replace(/^#/,"")}"`:(t=`<${e}`,r=`</${e}>`),t+=">",{start:t,end:r}},cE=function(e,t){const r={},n={};return Object.keys(t).forEach(a=>{let i=t[a];const o=lE(a);typeof i=="string"&&(i=e.match(i)),i.docs.forEach(s=>{if(s.every(c=>c.implicit))return;const u=s[0].id;r[u]=r[u]||[],r[u].push(o.start);const l=s[s.length-1].id;n[l]=n[l]||[],n[l].push(o.end)})}),{starts:r,ends:n}},fE=function(e){const{starts:t,ends:r}=cE(this,e);let n="";return this.docs.forEach(a=>{for(let i=0;i<a.length;i+=1){const 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},mE={html:fE},fw=/[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/,rm=/^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/,dE=/[,:;)('"\u201D\]]/,hE=/^[-–—]$/,pE=/ /,Ii=function(e,t,r=!0){let n="";return e.forEach(a=>{let i=a.pre||"",o=a.post||"";t.punctuation==="some"&&(i=i.replace(rm,""),hE.test(o)&&(o=" "),o=o.replace(dE,""),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(rm,""),o==="-"?o=" ":o=o.replace(fw,""));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||!pE.test(o))&&(o+=" "),n+=i+s+o}),r===!1&&(n=n.trim()),t.lowerCase===!0&&(n=n.toLowerCase()),n},gE=function(e,t){let r="";if(!e||!e[0]||!e[0][0])return r;for(let n=0;n<e.length;n+=1)r+=Ii(e[n],t,!0);if(t.keepSpace||(r=r.trim()),t.keepEndPunct===!1){e[0][0].tags.has("Emoticon")||(r=r.replace(rm,""));const n=e[e.length-1];n[n.length-1].tags.has("Emoticon")||(r=r.replace(fw,"")),r.endsWith("'")&&!r.endsWith("s'")&&(r=r.replace(/'/,""))}return t.cleanWhitespace===!0&&(r=r.trim()),r},fi={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"}};fi.clean=fi.normal;fi.reduced=fi.root;const mw=[];let Li=0;for(;Li<64;)mw[Li]=0|Math.sin(++Li%Math.PI)*4294967296;const md=function(e){let t,r,n,a=decodeURI(encodeURI(e))+"€",i=a.length;const o=[t=1732584193,r=4023233417,~t,~r],s=[];for(e=--i/4+2|15,s[--e]=i*8;~i;)s[i>>2]|=a.charCodeAt(i)<<8*i--;for(Li=a=0;Li<e;Li+=16){for(i=o;a<64;i=[n=i[3],t+((n=i[0]+[t&r|~t&n,n&t|~n&r,t^r^n,r^(t|~n)][i=a>>4]+mw[a]+~~s[Li|[a,5*a+1,3*a+5,7*a][i]&15])<<(i=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*i+a++%4])|n>>>-i),t,r])t=i[1]|0,r=i[2];for(a=4;a;)o[--a]+=i[a]}for(e="";a<32;)e+=(o[a>>3]>>(1^a++)*4&15).toString(16);return e},vE={text:!0,terms:!0},Hh={case:"none",unicode:"some",form:"machine",punctuation:"some"},Xc=function(e,t){return Object.assign({},e,t)},Ra={text:e=>Ii(e,{keepPunct:!0},!1),normal:e=>Ii(e,Xc(fi.normal,{keepPunct:!0}),!1),implicit:e=>Ii(e,Xc(fi.implicit,{keepPunct:!0}),!1),machine:e=>Ii(e,Hh,!1),root:e=>Ii(e,Xc(Hh,{form:"root"}),!1),hash:e=>md(Ii(e,{keepPunct:!0},!1)),offset:e=>{const t=Ra.text(e).length;return{index:e[0].offset.index,start:e[0].offset.start,length:t}},terms:e=>e.map(t=>{const 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)};Ra.sentences=Ra.sentence;Ra.clean=Ra.normal;Ra.reduced=Ra.root;const yE=function(e,t){return t=t||{},typeof t=="string"&&(t={}),t=Object.assign({},vE,t),t.offset&&e.compute("offset"),e.docs.map((r,n)=>{const a={};return Object.keys(t).forEach(i=>{t[i]&&Ra[i]&&(a[i]=Ra[i](r,e,n))}),a})},nm={json:function(e){const t=yE(this,e);return typeof e=="number"?t[e]:t}};nm.data=nm.json;const bE=()=>typeof window<"u"&&window.document,wE=function(e){const t=this.methods.one.debug||{};return e&&t.hasOwnProperty(e)?(t[e](this),this):bE()?(t.clientSide(this),this):(t.tags(this),this)},xE=function(e){const t=e.pre||"",r=e.post||"";return t+e.text+r},DE=function(e,t){const r={};return Object.keys(t).forEach(n=>{e.match(n).fullPointer.forEach(i=>{r[i[3]]={fn:t[n],end:i[2]}})}),r},dw=function(e,t){const r=DE(e,t);let n="";return e.docs.forEach((a,i)=>{for(let o=0;o<a.length;o+=1){const s=a[o];if(r.hasOwnProperty(s.id)){const{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+=xE(s)}}),n},NE=e=>Object.prototype.toString.call(e)==="[object Object]",AE=function(e){const 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)},CE=function(e){if(NE(e))return dw(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 md(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 AE(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()},EE={debug:wE,out:CE,wrap:function(e){return dw(this,e)}},SE=e=>Object.prototype.toString.call(e)==="[object Object]",TE={text:function(e){let t={};if(e&&typeof e=="string"&&fi.hasOwnProperty(e)?t=Object.assign({},fi[e]):e&&SE(e)&&(t=Object.assign({},e)),t.keepSpace===void 0&&!this.isFull()&&(t.keepSpace=!1),t.keepEndPunct===void 0&&this.pointer){const 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),gE(this.docs,t)}},ME=Object.assign({},EE,TE,nm,mE),FE=function(e){Object.assign(e.prototype,ME)},PE=function(e){console.log("%c -=-=- ","background-color:#6699cc;"),e.forEach(t=>{console.groupCollapsed(t.text());const n=t.docs[0].map(a=>{let i=a.text||"-";a.implicit&&(i="["+a.implicit+"]");const o="["+Array.from(a.tags).join(", ")+"]";return{text:i,tags:o}});console.table(n,["text","tags"]),console.groupEnd()})},ya="\x1B[0m",hn={green:e=>"\x1B[32m"+e+ya,red:e=>"\x1B[31m"+e+ya,blue:e=>"\x1B[34m"+e+ya,magenta:e=>"\x1B[35m"+e+ya,cyan:e=>"\x1B[36m"+e+ya,yellow:e=>"\x1B[33m"+e+ya,black:e=>"\x1B[30m"+e+ya,dim:e=>"\x1B[2m"+e+ya,i:e=>"\x1B[3m"+e+ya},kE=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 hn[n](r)})),e.join(", ")},OE=function(e){const{docs:t,model:r}=e;t.length===0&&console.log(hn.blue(`
3
- ──────`)),t.forEach(n=>{console.log(hn.blue(`
4
- ┌─────────`)),n.forEach(a=>{const i=[...a.tags||[]];let o=a.text||"-";a.sense&&(o=`{${a.normal}/${a.sense}}`),a.implicit&&(o="["+a.implicit+"]"),o=hn.yellow(o);let s="'"+o+"'";if(a.reference){const l=e.update([a.reference]).text("normal");s+=` - ${hn.dim(hn.i("["+l+"]"))}`}s=s.padEnd(18);const u=hn.blue(" │ ")+hn.i(s)+" - "+kE(i,r);console.log(u)})}),console.log(`
5
- `)},$E=function(e){const{docs:t}=e;console.log(""),t.forEach(r=>{const n=[];r.forEach(a=>{a.chunk==="Noun"?n.push(hn.blue(a.implicit||a.normal)):a.chunk==="Verb"?n.push(hn.green(a.implicit||a.normal)):a.chunk==="Adjective"?n.push(hn.yellow(a.implicit||a.normal)):a.chunk==="Pivot"?n.push(hn.red(a.implicit||a.normal)):n.push(a.implicit||a.normal)}),console.log(n.join(" "),`
6
- `)}),console.log(`
7
- `)},BE=(e,t,r)=>{const 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]},_E=function(e,t,r){const n=BE(e,t,r);return`${n[0]}${hn.blue(n[1])}${n[2]}`},IE=function(e){if(!e.found)return;const 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=_E(a,s.offset,u)}),console.log(a)}),console.log(`
8
- `)},zE={tags:OE,clientSide:PE,chunks:$E,highlight:IE},jE={api:FE,methods:{one:{hash:md,debug:zE}}},hw=function(e,t){if(e[0]!==t[0])return!1;const[,r,n]=e,[,a,i]=t;return r<=a&&n>a||a<=r&&i>r},qE=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]},wc=function(e){const t={};return e.forEach(r=>{t[r[0]]=t[r[0]]||[],t[r[0]].push(r)}),t},RE=function(e){const t={};for(let r=0;r<e.length;r+=1)t[e[r].join(",")]=e[r];return Object.values(t)},LE=function(e,t){const[r,n]=e,a=t[1],i=t[2],o={};if(n<a){const 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},HE=function(e,t){return e[1]<=t[1]&&t[2]<=e[2]},pw=function(e,t){const r=wc(t),n=[];return e.forEach(a=>{const[i]=a;let o=r[i]||[];if(o=o.filter(u=>HE(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)=>{const c=LE(s,u);o[l+1]?(n.push({before:c.before,match:c.match}),c.after&&(s=c.after)):n.push(c)})}),n},GE=20,VE=function(e,t,r){for(let n=0;n<GE;n+=1){if(t[r-n]){const a=t[r-n].findIndex(i=>i.id===e);if(a!==-1)return[r-n,a]}if(t[r+n]){const a=t[r+n].findIndex(i=>i.id===e);if(a!==-1)return[r+n,a]}}return null},UE=function(e,t){const[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)},WE=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)){const f=VE(u,t,i);if(f!==null){const m=s-o;c=t[f[0]].slice(f[1],f[1]+m);const 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=UE(n,t)),r.push(c))}),r=r.filter(n=>n.length>0),r},JE=function(e){const 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},KE={one:{termList:JE,getDoc:WE,pointer:{indexN:wc,splitAll:pw}}},gw=function(e,t){const r=e.concat(t),n=wc(r);let a=[];return r.forEach(i=>{const[o]=i;if(n[o].length===1){a.push(i);return}const s=n[o].filter(l=>hw(i,l));s.push(i);const u=qE(s);a.push(u)}),a=RE(a),a},vw=function(e,t){const r=[];return pw(e,t).forEach(a=>{a.passthrough&&r.push(a.passthrough),a.before&&r.push(a.before),a.after&&r.push(a.after)}),r},YE=function(e,t){const 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},ZE=function(e,t){const r=wc(t),n=[];return e.forEach(a=>{let i=r[a[0]]||[];i=i.filter(o=>hw(a,o)),i.length!==0&&i.forEach(o=>{const s=YE(a,o);s&&n.push(s)})}),n},QE=function(e){return Object.prototype.toString.call(e)==="[object Array]"},dd=(e,t)=>typeof e=="string"||QE(e)?t.match(e):e||t.none(),tu=function(e,t){return e.map(r=>{const[n,a]=r;return t[n]&&t[n][a]&&(r[3]=t[n][a].id),r})},ma={};ma.union=function(e){e=dd(e,this);let t=gw(this.fullPointer,e.fullPointer);return t=tu(t,this.document),this.toView(t)};ma.and=ma.union;ma.intersection=function(e){e=dd(e,this);let t=ZE(this.fullPointer,e.fullPointer);return t=tu(t,this.document),this.toView(t)};ma.not=function(e){e=dd(e,this);let t=vw(this.fullPointer,e.fullPointer);return t=tu(t,this.document),this.toView(t)};ma.difference=ma.not;ma.complement=function(){const e=this.all();let t=vw(e.fullPointer,this.fullPointer);return t=tu(t,this.document),this.toView(t)};ma.settle=function(){let e=this.fullPointer;return e.forEach(t=>{e=gw(e,[t])}),e=tu(e,this.document),this.update(e)};const XE=function(e){Object.assign(e.prototype,ma)},eS={methods:KE,api:XE},tS={buildNet:function(e){const r=this.methods().one.buildNet(e,this.world());return r.isNet=!0,r}},rS=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=>{const 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});const 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}}},am=function(e){return e.optional===!0||e.negative===!0?null:e.tag?"#"+e.tag:e.word?e.word:e.switch?`%${e.switch}%`:null},nS=function(e){const t=[];return e.forEach(r=>{t.push(am(r)),r.operator==="and"&&r.choices&&r.choices.forEach(n=>{n.forEach(a=>{t.push(am(a))})})}),t.filter(r=>r)},aS=function(e){const t=[];let 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=>{const o=am(i);o&&t.push(o)})}),r+=1)}),{wants:t,count:r}},iS=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=nS(n.regs);const{wants:a,count:i}=aS(n.regs);n.wants=a,n.minWant=i,n.minWords=n.regs.filter(o=>!o.optional).length}),e},oS=function(e,t){e=iS(e,t);const 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=>{const i={};r[a]=r[a].filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0))});const n=e.filter(a=>a.needs.length===0&&a.wants.length===0);return{hooks:r,always:n}},sS=function(e,t){return e.map((r,n)=>{let a=[];Object.keys(t).forEach(o=>{e[n].has(o)&&(a=a.concat(t[o]))});const i={};return a=a.filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0)),a})},uS=function(e,t){return e.map((r,n)=>{const 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})},lS=function(e,t,r,n,a){const i=[];for(let o=0;o<e.length;o+=1)for(let s=0;s<e[o].length;s+=1){const u=e[o][s],l=n.one.match([t[o]],u);if(l.ptrs.length>0&&(l.ptrs.forEach(c=>{c[0]=o;const 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},cS=function(e,t){return e.map((r,n)=>{const a=t[n].length;return r=r.filter(i=>a>=i.minWords),r})},fS=function(e,t,r,n={}){const a=r.one.cacheDoc(e);let i=sS(a,t.hooks);return i=uS(i,a),t.always.length>0&&(i=i.map(s=>s.concat(t.always))),i=cS(i,e),lS(i,e,a,r,n)},mS=function(e,t,r){const n=r.one.tagSet;if(!n.hasOwnProperty(t))return!0;const a=n[t].not||[];for(let i=0;i<e.length;i+=1){const o=e[i];for(let s=0;s<a.length;s+=1)if(o.tags.has(a[s])===!0)return!1}return!0},dS=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;const f=c.reason||c.match,m=i([c.pointer],t)[0];if(!(c.safe===!0&&(mS(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){const 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)}}))},hS={buildNet:oS,bulkMatch:fS,bulkTagger:dS},pS={lib:tS,api:rS,methods:{one:hS}},yw=/ /,Gh=function(e,t){t==="Noun"&&(e.chunk=t),t==="Verb"&&(e.chunk=t)},bw=function(e,t,r,n){if(e.tags.has(t)===!0||t===".")return null;e.frozen===!0&&(n=!0);const 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]),Gh(e,a.parents[i])}return e.tags.add(t),e.dirty=!0,Gh(e,t),!0},gS=function(e,t,r,n){const a=t.split(yw);e.forEach((i,o)=>{let s=a[o];s&&(s=s.replace(/^#/,""),bw(i,s,r,n))})},vS=function(e){return Object.prototype.toString.call(e)==="[object Array]"},yS=(e,t,r="")=>{const n=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",a=o=>"\x1B[3m"+o+"\x1B[0m",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)}`)},ww=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&&yS(e,t,a),vS(t)===!0){t.forEach(s=>ww(e,s,r,n));return}if(typeof t!="string"){console.warn(`compromise: Invalid tag '${t}'`);return}if(t=t.trim(),yw.test(t)){gS(e,t,i,n);return}t=t.replace(/^#/,"");for(let s=0;s<e.length;s+=1)bw(e[s],t,i,n)},bS=function(e,t,r){t=t.trim().replace(/^#/,"");for(let n=0;n<e.length;n+=1){const a=e[n];if(a.frozen===!0)continue;if(t==="*"){a.tags.clear();continue}const 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)}},wS=function(e,t,r){if(!r.hasOwnProperty(t))return!0;const n=r[t].not||[];for(let a=0;a<n.length;a+=1)if(e.tags.has(n[a]))return!1;return!0},ni=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},xS=/^ *(#|\/\/)/,DS=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=>ni({id:s}))),o}return[ni({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]},ka=(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},hd=e=>Object.prototype.toString.call(e)==="[object Array]",wu=e=>(e=e||"").trim(),NS=function(e=[]){return typeof e=="string"?(function(r){let n=r.split(/\r?\n/),a=[];n.forEach((o=>{if(!o.trim()||xS.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:DS(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=ni(i),i})(e):hd(e)?(function(r){let n={};r.forEach((i=>{n[i.id]=i}));let a=ni({});return r.forEach((i=>{if((i=ni(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):(ka(t=e).forEach(ni),t);var t},AS=e=>"\x1B[31m"+e+"\x1B[0m",CS=e=>"\x1B[2m"+e+"\x1B[0m",im=function(e,t){let r="-> ";t&&(r=CS("→ "));let n="";return ka(e).forEach(((a,i)=>{let o=a.id||"";if(t&&(o=AS(o)),i===0&&!a.id)return;let s=a._cache.parents.length;n+=" ".repeat(s)+r+o+`
11
- `})),n},Vh=function(e){let t=ka(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},Uh={text:im,txt:im,array:Vh,flat:Vh},Wh=function(e,t){return t==="nested"||t==="json"?e:t==="debug"?(console.log(im(e,!0)),null):Uh.hasOwnProperty(t)?Uh[t](e):e},ef=e=>{ka(e,((t,r)=>{t.id&&(t._cache.parents=t._cache.parents||[],r._cache.parents=t._cache.parents.concat([t.id]))}))},ES=(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 hd(t[r])?e[r]=t[r].concat(e[r]||[]):e[r]===void 0&&(e[r]=t[r])})),e),SS=/\//;let TS=class Al{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=wu(t),!SS.test(t)){let n=this.json.children.find((a=>a.id===t));return new Al(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)||ni({});return new Al(r)}add(t,r={}){if(hd(t))return t.forEach((a=>this.add(wu(a),r))),this;t=wu(t);let n=ni({id:t,props:r});return this.json.children.push(n),new Al(n)}remove(t){return t=wu(t),this.json.children=this.json.children.filter((r=>r.id!==t)),this}nodes(){return ka(this.json).map((t=>(delete(t=Object.assign({},t)).children,t)))}cache(){return(t=>{let r=ka(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 ka(this.json)}fillDown(){var t;return t=this.json,ka(t,((r,n)=>{n.props=ES(n.props,r.props)})),this}depth(){ef(this.json);let t=ka(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 ef(this.json),Wh(this.json,t)}debug(){return ef(this.json),Wh(this.json,"debug"),this}};const xw=function(e){let t=NS(e);return new TS(t)};xw.prototype.plugin=function(e){e(this)};const go={Noun:"blue",Verb:"green",Negative:"green",Date:"red",Value:"red",Adjective:"magenta",Preposition:"cyan",Conjunction:"cyan",Determiner:"cyan",Hyphenated:"cyan",Adverb:"cyan"},MS=function(e){if(go.hasOwnProperty(e.id))return go[e.id];if(go.hasOwnProperty(e.is))return go[e.is];const t=e._cache.parents.find(r=>go[r]);return go[t]},FS=function(e){const t={};return e.forEach(r=>{const{not:n,also:a,is:i,novel:o}=r.props;let 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:MS(r)}}),Object.keys(t).forEach(r=>{const 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},Jh=function(e){return e?typeof e=="string"?[e]:e:[]},PS=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},kS=function(e,t){return e=PS(e,t),Object.keys(e).forEach(r=>{e[r].children=Jh(e[r].children),e[r].not=Jh(e[r].not)}),Object.keys(e).forEach(r=>{(e[r].not||[]).forEach(a=>{e[a]&&e[a].not&&e[a].not.push(r)})}),e},OS=function(e){const t=Object.keys(e).map(n=>{const a=e[n],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 xw(t).cache().fillDown().out("array")},$S=function(e){return Object.keys(e).forEach(t=>{e[t]=Object.assign({},e[t]),e[t].novel=!0}),e},BS=function(e,t){Object.keys(t).length>0&&(e=$S(e)),e=kS(e,t);const r=Object.assign({},t,e),n=OS(r);return FS(n)},_S={one:{setTag:ww,unTag:bS,addTags:BS,canBe:wS}},Kh=function(e){return Object.prototype.toString.call(e)==="[object Array]"},IS={tag:function(e,t="",r){if(!this.found||!e)return this;const n=this.termList();if(n.length===0)return this;const{methods:a,verbose:i,world:o}=this;return i===!0&&console.log(" + ",e,t||""),Kh(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;const r=this.termList();if(r.length===0)return this;const{methods:n,verbose:a,model:i}=this;a===!0&&console.log(" - ",e,t||"");const o=i.one.tagSet;return Kh(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(/^#/,"");const 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])})});const a=this.update(n);return this.difference(a)}},zS=function(e){Object.assign(e.prototype,IS)},jS=function(e){const{model:t,methods:r}=this.world(),n=t.one.tagSet,a=r.one.addTags,i=a(e,n);return t.one.tagSet=i,this},qS={addTags:jS},Yh=new Set(["Auxiliary","Possessive"]),RS=function(e,t){return e=e.sort((r,n)=>{if(Yh.has(r)||!t.hasOwnProperty(n))return 1;if(Yh.has(n)||!t.hasOwnProperty(r))return-1;let a=t[r].children||[];const i=a.length;a=t[n].children||[];const o=a.length;return i-o}),e},LS=function(e){const{document:t,world:r}=e,n=r.model.one.tagSet;t.forEach(a=>{a.forEach(i=>{const o=Array.from(i.tags);i.tagRank=RS(o,n)})})},HS={model:{one:{tagSet:{}}},compute:{tagRank:LS},methods:_S,api:zS,lib:qS},GS=/([.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s)/g,VS=/^[.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s$/,US=/((?:\r?\n|\r)+)/,WS=function(e){const t=[],r=e.split(US);for(let n=0;n<r.length;n++){const a=r[n].split(GS);for(let i=0;i<a.length;i++)a[i+1]&&VS.test(a[i+1])===!0&&(a[i]+=a[i+1],a[i+1]=""),a[i]!==""&&t.push(a[i])}return t},JS=/[a-z0-9\u00C0-\u00FF\u00a9\u00ae\u2000-\u3300\ud000-\udfff]/i,KS=/\S/,YS=function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(!(n===void 0||n==="")){if(KS.test(n)===!1||JS.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},ZS=function(e){return!!e.match(/\n$/)},QS=function(e,t){const r=t.methods.one.tokenize.isSentence,n=t.model.one.abbreviations||new Set,a=[];for(let i=0;i<e.length;i++){const o=e[i];e[i+1]&&!r(o,n)&&!ZS(o)?e[i+1]=o+(e[i+1]||""):o&&o.length>0&&(a.push(o),e[i]="")}return a},Zh=280,Dw={'"':'"',""":""","“":"”","‟":"”","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","〟":"〞"},XS=RegExp("["+Object.keys(Dw).join("")+"]","g"),e4=RegExp("["+Object.values(Dw).join("")+"]","g"),Qh=function(e){if(!e)return!1;const t=e.match(e4);return t!==null&&t.length===1},t4=function(e){const t=[];for(let r=0;r<e.length;r+=1){const a=e[r].match(XS);if(a!==null&&a.length===1){if(Qh(e[r+1])&&e[r+1].length<Zh){e[r]+=e[r+1],t.push(e[r]),e[r+1]="",r+=1;continue}if(Qh(e[r+2])){const i=e[r+1]+e[r+2];if(i.length<Zh){e[r]+=i,t.push(e[r]),e[r+1]="",e[r+2]="",r+=2;continue}}}t.push(e[r])}return t},r4=250,Xh=/\(/g,n4=/\)/g,a4=function(e){const t=[];for(let r=0;r<e.length;r+=1){const a=e[r].match(Xh);if(a!==null&&a.length===1&&e[r+1]&&e[r+1].length<r4&&e[r+1].match(n4)!==null&&a.length===1&&!Xh.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},i4=/\S/,ep=/^\s+/,o4=function(e,t){if(e=e||"",e=String(e),!e||typeof e!="string"||i4.test(e)===!1)return[];e=e.replace(" "," ");const r=WS(e);let n=YS(r);if(n=QS(n,t),n=t4(n),n=a4(n),n.length===0)return[e];for(let a=1;a<n.length;a+=1){const i=n[a].match(ep);i!==null&&(n[a-1]+=i[0],n[a]=n[a].replace(ep,""))}return n},s4=function(e,t){const 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},u4=function(e){const t=[],r=e.split(/[-–—]/);let n="-";const 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},l4=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},c4=new RegExp("\\p{L} ?\\/ ?\\p{L}+$","u"),f4=function(e){for(let t=1;t<e.length-1;t++)c4.test(e[t])&&(e[t-1]+=e[t]+e[t+1],e[t]=null,e[t+1]=null);return e},m4=/\S/,d4=/^[!?.]+$/,h4=/(\S+)/;let om=[".","?","!",":",";","-","–","—","--","...","(",")","[","]",'"',"'","`","«","»","*","•"];om=om.reduce((e,t)=>(e[t]=!0,e),{});const p4=function(e){return Object.prototype.toString.call(e)==="[object Array]"},g4=function(e,t){let r=[],n=[];if(e=e||"",typeof e=="number"&&(e=String(e)),p4(e))return e;const a=e.split(h4);for(let o=0;o<a.length;o++){if(s4(a[o],t)===!0){n=n.concat(u4(a[o]));continue}n.push(a[o])}let i="";for(let o=0;o<n.length;o++){const s=n[o];m4.test(s)===!0&&om.hasOwnProperty(s)===!1&&d4.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=f4(r),r=l4(r),r=r.filter(o=>o),r},tp=new RegExp("\\p{Letter}","u"),xu=/[\p{Number}\p{Currency_Symbol}]/u,v4=/^[a-z]\.([a-z]\.)+/i,y4=/[sn]['’]$/,b4=function(e,t){const{prePunctuation:r,postPunctuation:n,emoticons:a}=t.one;let i=e,o="",s="";const 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){const f=u[0];if(r[f]!==!0){if((f==="+"||f==="-")&&xu.test(u[1])||f==="'"&&f.length===3&&xu.test(u[1])||tp.test(f)||xu.test(f))break;o+=u.shift()}}l=u.length;for(let c=0;c<l;c+=1){const f=u[u.length-1];if(n[f]!==!0){if(tp.test(f)||xu.test(f))break;f==="."&&v4.test(i)===!0||f==="'"&&y4.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}},w4=(e,t)=>{const{str:r,pre:n,post:a}=b4(e,t);return{text:r,pre:n,post:a,tags:new Set}},x4=function(e,t){const r=t.model.one.unicode||{};e=e||"";const n=e.split("");return n.forEach((a,i)=>{r[a]&&(n[i]=r[a])}),n.join("")},D4=function(e){e=e||"",e=e.toLowerCase(),e=e.trim();const 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},N4=/([A-Z]\.)+[A-Z]?,?$/,A4=/^[A-Z]\.,?$/,C4=/[A-Z]{2,}('s|,)?$/,E4=/([a-z]\.)+[a-z]\.?$/,S4=function(e){return N4.test(e)===!0||E4.test(e)===!0||A4.test(e)===!0||C4.test(e)===!0},T4=function(e){return S4(e)&&(e=e.replace(/\./g,"")),e},Nw=function(e,t){const r=t.methods.one.killUnicode;let n=e.text||"";n=D4(n),n=r(n,t),n=T4(n),e.normal=n},M4=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=>{Nw(c,t)}),l}),e},F4=/[ .][A-Z]\.? *$/i,P4=/(?:\u2026|\.{2,}) *$/,k4=new RegExp("\\p{L}","u"),O4=/\. *$/,$4=/^[A-Z]\. $/,B4=function(e,t){if(k4.test(e)===!1||F4.test(e)===!0||e.length===3&&$4.test(e)||P4.test(e)===!0)return!1;const n=e.replace(/[.!?\u203D\u2E18\u203C\u2047-\u2049] *$/,"").split(" "),a=n[n.length-1].toLowerCase();return!(t.hasOwnProperty(a)===!0&&O4.test(e)===!0)},_4={one:{killUnicode:x4,tokenize:{splitSentences:o4,isSentence:B4,splitTerms:g4,splitWhitespace:w4,fromString:M4}}},I4={"&":"and","@":"at","%":"percent",plz:"please",bein:"being"},z4=["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"],j4=["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"],q4=["jan","feb","mar","apr","jun","jul","aug","sep","sept","oct","nov","dec"],R4=["ad","al","arc","ba","bl","ca","cca","col","corp","ft","fy","ie","lit","ma","md","pd","tce"],L4=["dept","univ","assn","bros","inc","ltd","co"],H4=["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"],G4=["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"],V4=[[z4],[G4,"Unit"],[R4,"Noun"],[j4,"Honorific"],[q4,"Month"],[L4,"Organization"],[H4,"Place"]],Aw={},Cl={};V4.forEach(e=>{e[0].forEach(t=>{Aw[t]=!0,Cl[t]="Abbreviation",e[1]!==void 0&&(Cl[t]=[Cl[t],e[1]])})});const U4=["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),{}),W4={like:!0,ish:!0,less:!0,able:!0,elect:!0,type:!0,designate:!0},rp={"!":"¡","?":"¿Ɂ",'"':'“”"❝❞',"'":"‘‛❛❜’","-":"—–",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:"ŹźŻżŽžƵƶȤȥɀΖ"},Cw={};Object.keys(rp).forEach(function(e){rp[e].split("").forEach(function(t){Cw[t]=e})});const J4={"#":!0,"@":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"\uFEFF":!0},K4={"%":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"\uFEFF":!0},Y4={"<3":!0,"</3":!0,"<\\3":!0,":^P":!0,":^p":!0,":^O":!0,":^3":!0},Z4={one:{aliases:I4,abbreviations:Aw,prefixes:U4,suffixes:W4,prePunctuation:J4,postPunctuation:K4,lexicon:Cl,unicode:Cw,emoticons:Y4}},np=/\//,Q4=/[a-z]\.[a-z]/i,X4=/[0-9]/,eT=function(e,t){const r=e.normal||e.text||e.machine,n=t.model.one.aliases;if(n.hasOwnProperty(r)&&(e.alias=e.alias||[],e.alias.push(n[r])),np.test(r)&&!Q4.test(r)&&!X4.test(r)){const a=r.split(np);a.length<=3&&a.forEach(i=>{i=i.trim(),i!==""&&(e.alias=e.alias||[],e.alias.push(i))})}return e},tT=new RegExp("^\\p{Letter}+-\\p{Letter}+$","u"),rT=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"),tT.test(t)&&(t=t.replace(/-/g,"")),t=t.replace(/^[#@]/,""),t!==e.normal&&(e.machine=t)},nT=function(e){const t=e.docs,r={};for(let n=0;n<t.length;n+=1)for(let a=0;a<t[n].length;a+=1){const 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){const i=t[n][a],o=i.machine||i.normal;i.freq=r[o]}},aT=function(e){let t=0,r=0;const n=e.document;for(let a=0;a<n.length;a+=1)for(let i=0;i<n[a].length;i+=1){const 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}},iT=function(e){const 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]},oT=function(e){let t=0;const 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)},tf=function(e,t){const 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)},sT={alias:e=>tf(e,eT),machine:e=>tf(e,rT),normal:e=>tf(e,Nw),freq:nT,offset:aT,index:iT,wordCount:oT},uT={compute:sT,methods:_4,model:Z4,hooks:["alias","machine","index","id"]},lT=function(e){const t=e.model.one.typeahead,r=e.docs;if(r.length===0||Object.keys(t).length===0)return;const n=r[r.length-1]||[],a=n[n.length-1];if(!a.post&&t.hasOwnProperty(a.normal)){const i=t[a.normal];a.implicit=i,a.machine=i,a.typeahead=!0,e.compute.preTagger&&e.last().unTag("*").compute(["lexicon","preTagger"])}},cT={typeahead:lT},fT=function(){const e=this.docs;if(e.length===0)return this;const 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},mT=function(e){e.prototype.autoFill=fT},dT=function(e,t,r){let n={};const 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){const 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},hT=e=>Object.prototype.toString.call(e)==="[object Object]",pT={safe:!0,min:3},gT=function(e=[],t={}){const r=this.model();t=Object.assign({},pT,t),hT(e)&&(Object.assign(r.one.lexicon,e),e=Object.keys(e));const n=dT(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},vT={typeahead:gT},yT={one:{typeahead:{}}},bT={model:yT,api:mT,lib:vT,compute:cT,hooks:["typeahead"]};tt.extend(s3);tt.extend(jE);tt.extend(iE);tt.extend(eS);tt.extend(HS);tt.plugin(O3);tt.extend(uT);tt.extend(_3);tt.plugin(xA);tt.extend(tC);tt.extend(bT);tt.extend(W3);tt.extend(pS);const Ew={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"},ap={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;aDha4HrCt;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,iDDlBV;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"},Hi=36,sm="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",ip=sm.split("").reduce(function(e,t,r){return e[t]=r,e},{}),wT=function(e){if(sm[e]!==void 0)return sm[e];let t=1,r=Hi,n="";for(;e>=r;e-=r,t++,r*=Hi);for(;t--;){const a=e%Hi;n=String.fromCharCode((a<10?48:55)+a)+n,e=(e-a)/Hi}return n},xT=function(e){if(ip[e]!==void 0)return ip[e];let t=0,r=1,n=Hi,a=1;for(;r<e.length;t+=n,r++,n*=Hi);for(let i=e.length-1;i>=0;i--,a*=Hi){let o=e.charCodeAt(i)-48;o>10&&(o-=7),t+=o*a}return t},um={toAlphaCode:wT,fromAlphaCode:xT},DT=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[um.fromAlphaCode(n[1])]=um.fromAlphaCode(n[2])}e.nodes=e.nodes.slice(e.symCount,e.nodes.length)},NT=function(e,t,r){const n=um.fromAlphaCode(t);return n<e.symCount?e.syms[n]:r+n+1-e.symCount},AT=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=NT(e,l,n);r(f,c)}};return r(0,""),t},CT=function(e){const t={nodes:e.split(";"),syms:[],symCount:0};return e.match(":")&&DT(t),AT(t)},ET=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=CT(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},qn=["Possessive","Pronoun"],ST={"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:qn,his:qn,hers:qn,their:qn,theirs:qn,themselves:qn,your:qn,our:qn,ours:qn,my:qn,its:qn,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"]},TT={"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"},MT=[":(",":)",":P",":p",":O",";(",";)",";P",";p",";O",":3",":|",":/",":\\",":$",":*",":@",":-(",":-)",":-P",":-p",":-O",":-3",":-|",":-/",":-\\",":-$",":-*",":-@",":^(",":^)",":^P",":^p",":^O",":^3",":^|",":^/",":^\\",":^$",":^*",":^@","):","(:","$:","*:",")-:","(-:","$-:","*-:",")^:","(^:","$^:","*^:","<3","</3","<\\3","=("],Du={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"]]},FT=/([xsz]|ch|sh)$/,PT=function(e){const t=e[e.length-1];if(Du.hasOwnProperty(t)===!0)for(let r=0;r<Du[t].length;r+=1){const n=Du[t][r][0];if(n.test(e)===!0)return e.replace(n,Du[t][r][1])}return null},xc=function(e="",t){const{irregularPlurals:r,uncountable:n}=t.two;if(n.hasOwnProperty(e))return e;if(r.hasOwnProperty(e))return r[e];const a=PT(e);return a!==null?a:FT.test(e)?e+"es":e+"s"},kT=/\|/,ts=ST,lm={},OT={two:{irregularPlurals:Ew,uncountable:{}}};Object.keys(ap).forEach(e=>{const t=ET(ap[e]);if(!kT.test(e)){Object.keys(t).forEach(r=>{ts[r]=e});return}Object.keys(t).forEach(r=>{if(lm[r]=e,e==="Noun|Verb"){const n=xc(r,OT);lm[n]="Plural|Verb"}})});MT.forEach(e=>ts[e]="Emoticon");delete ts[""];delete ts[null];delete ts[" "];const he="Singular",Wt={beforeTags:{Determiner:he,Possessive:he,Acronym:he,Noun:he,Adjective:he,PresentTense:he,Gerund:he,PastTense:he,Infinitive:he,Date:he,Ordinal:he,Demonym:he},afterTags:{Value:he,Modal:he,Copula:he,PresentTense:he,PastTense:he,Demonym:he,Actor:he},beforeWords:{the:he,with:he,without:he,of:he,for:he,any:he,all:he,on:he,cut:he,cuts:he,increase:he,decrease:he,raise:he,drop:he,save:he,saved:he,saves:he,make:he,makes:he,made:he,minus:he,plus:he,than:he,another:he,versus:he,neither:he,about:he,favorite:he,best:he,daily:he,weekly:he,linear:he,binary:he,mobile:he,lexical:he,technical:he,computer:he,scientific:he,security:he,government:he,popular:he,formal:he,no:he,more:he,one:he,let:he,her:he,his:he,their:he,our:he,us:he,sheer:he,monthly:he,yearly:he,current:he,previous:he,upcoming:he,last:he,next:he,main:he,initial:he,final:he,beginning:he,end:he,top:he,bottom:he,future:he,past:he,major:he,minor:he,side:he,central:he,peripheral:he,public:he,private:he},afterWords:{of:he,system:he,aid:he,method:he,utility:he,tool:he,reform:he,therapy:he,philosophy:he,room:he,authority:he,says:he,said:he,wants:he,wanted:he,is:he,did:he,do:he,can:he,wise:he}},xe="Infinitive",Ir={beforeTags:{Modal:xe,Adverb:xe,Negative:xe,Plural:xe},afterTags:{Determiner:xe,Adverb:xe,Possessive:xe,Reflexive:xe,Preposition:xe,Cardinal:xe,Comparative:xe,Superlative:xe},beforeWords:{i:xe,we:xe,you:xe,they:xe,to:xe,please:xe,will:xe,have:xe,had:xe,would:xe,could:xe,should:xe,do:xe,did:xe,does:xe,can:xe,must:xe,us:xe,me:xe,let:xe,even:xe,when:xe,help:xe,he:xe,she:xe,it:xe,being:xe,bi:xe,co:xe,contra:xe,de:xe,inter:xe,intra:xe,mis:xe,pre:xe,out:xe,counter:xe,nobody:xe,somebody:xe,anybody:xe,everybody:xe},afterWords:{the:xe,me:xe,you:xe,him:xe,us:xe,her:xe,his:xe,them:xe,they:xe,it:xe,himself:xe,herself:xe,itself:xe,myself:xe,ourselves:xe,themselves:xe,something:xe,anything:xe,a:xe,an:xe,up:xe,down:xe,by:xe,out:xe,off:xe,under:xe,what:xe,all:xe,to:xe,because:xe,although:xe,how:xe,otherwise:xe,together:xe,though:xe,into:xe,yet:xe,more:xe,here:xe,there:xe,away:xe}},$T={beforeTags:Object.assign({},Ir.beforeTags,Wt.beforeTags,{}),afterTags:Object.assign({},Ir.afterTags,Wt.afterTags,{}),beforeWords:Object.assign({},Ir.beforeWords,Wt.beforeWords,{}),afterWords:Object.assign({},Ir.afterWords,Wt.afterWords,{})},Ae="Adjective",sr={beforeTags:{Determiner:Ae,Possessive:Ae,Hyphenated:Ae},afterTags:{Adjective:Ae},beforeWords:{seem:Ae,seemed:Ae,seems:Ae,feel:Ae,feels:Ae,felt:Ae,stay:Ae,appear:Ae,appears:Ae,appeared:Ae,also:Ae,over:Ae,under:Ae,too:Ae,it:Ae,but:Ae,still:Ae,really:Ae,quite:Ae,well:Ae,very:Ae,truly:Ae,how:Ae,deeply:Ae,hella:Ae,profoundly:Ae,extremely:Ae,so:Ae,badly:Ae,mostly:Ae,totally:Ae,awfully:Ae,rather:Ae,nothing:Ae,something:Ae,anything:Ae,not:Ae,me:Ae,is:Ae,face:Ae,faces:Ae,faced:Ae,look:Ae,looks:Ae,looked:Ae,reveal:Ae,reveals:Ae,revealed:Ae,sound:Ae,sounded:Ae,sounds:Ae,remains:Ae,remained:Ae,prove:Ae,proves:Ae,proved:Ae,becomes:Ae,stays:Ae,tastes:Ae,taste:Ae,smells:Ae,smell:Ae,gets:Ae,grows:Ae,as:Ae,rings:Ae,radiates:Ae,conveys:Ae,convey:Ae,conveyed:Ae,of:Ae},afterWords:{too:Ae,also:Ae,or:Ae,enough:Ae,as:Ae}},Ve="Gerund",ai={beforeTags:{Adverb:Ve,Preposition:Ve,Conjunction:Ve},afterTags:{Adverb:Ve,Possessive:Ve,Person:Ve,Pronoun:Ve,Determiner:Ve,Copula:Ve,Preposition:Ve,Conjunction:Ve,Comparative:Ve},beforeWords:{been:Ve,keep:Ve,continue:Ve,stop:Ve,am:Ve,be:Ve,me:Ve,began:Ve,start:Ve,starts:Ve,started:Ve,stops:Ve,stopped:Ve,help:Ve,helps:Ve,avoid:Ve,avoids:Ve,love:Ve,loves:Ve,loved:Ve,hate:Ve,hates:Ve,hated:Ve},afterWords:{you:Ve,me:Ve,her:Ve,him:Ve,his:Ve,them:Ve,their:Ve,it:Ve,this:Ve,there:Ve,on:Ve,about:Ve,for:Ve,up:Ve,down:Ve}},xt="Gerund",Ja="Adjective",BT={beforeTags:Object.assign({},sr.beforeTags,ai.beforeTags,{Imperative:xt,Infinitive:Ja,Plural:xt}),afterTags:Object.assign({},sr.afterTags,ai.afterTags,{Noun:Ja}),beforeWords:Object.assign({},sr.beforeWords,ai.beforeWords,{is:Ja,are:xt,was:Ja,of:Ja,suggest:xt,suggests:xt,suggested:xt,recommend:xt,recommends:xt,recommended:xt,imagine:xt,imagines:xt,imagined:xt,consider:xt,considered:xt,considering:xt,resist:xt,resists:xt,resisted:xt,avoid:xt,avoided:xt,avoiding:xt,except:Ja,accept:Ja,assess:xt,explore:xt,fear:xt,fears:xt,appreciate:xt,question:xt,help:xt,embrace:xt,with:Ja}),afterWords:Object.assign({},sr.afterWords,ai.afterWords,{to:xt,not:xt,the:xt})},op={beforeTags:{Determiner:void 0,Cardinal:"Noun",PhrasalVerb:"Adjective"},afterTags:{}},_T={beforeTags:Object.assign({},sr.beforeTags,Wt.beforeTags,op.beforeTags),afterTags:Object.assign({},sr.afterTags,Wt.afterTags,op.afterTags),beforeWords:Object.assign({},sr.beforeWords,Wt.beforeWords,{are:"Adjective",is:"Adjective",was:"Adjective",be:"Adjective",off:"Adjective",out:"Adjective"}),afterWords:Object.assign({},sr.afterWords,Wt.afterWords)},et="PastTense",bs="Adjective",Nu={beforeTags:{Adverb:et,Pronoun:et,ProperNoun:et,Auxiliary:et,Noun:et},afterTags:{Possessive:et,Pronoun:et,Determiner:et,Adverb:et,Comparative:et,Date:et,Gerund:et},beforeWords:{be:et,who:et,get:bs,had:et,has:et,have:et,been:et,it:et,as:et,for:bs,more:bs,always:bs},afterWords:{by:et,back:et,out:et,in:et,up:et,down:et,before:et,after:et,for:et,the:et,with:et,as:et,on:et,at:et,between:et,to:et,into:et,us:et,them:et,his:et,her:et,their:et,our:et,me:et,about:bs}},IT={beforeTags:Object.assign({},sr.beforeTags,Nu.beforeTags),afterTags:Object.assign({},sr.afterTags,Nu.afterTags),beforeWords:Object.assign({},sr.beforeWords,Nu.beforeWords),afterWords:Object.assign({},sr.afterWords,Nu.afterWords)},zT={afterTags:{Noun:"Adjective",Conjunction:void 0}},jT={beforeTags:Object.assign({},sr.beforeTags,Ir.beforeTags,{Adverb:void 0,Negative:void 0}),afterTags:Object.assign({},sr.afterTags,Ir.afterTags,zT.afterTags),beforeWords:Object.assign({},sr.beforeWords,Ir.beforeWords,{have:void 0,had:void 0,not:void 0,went:"Adjective",goes:"Adjective",got:"Adjective",be:"Adjective"}),afterWords:Object.assign({},sr.afterWords,Ir.afterWords,{to:void 0,as:"Adjective"})},Au={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"}},qT={beforeTags:Object.assign({},ai.beforeTags,Wt.beforeTags,Au.beforeTags),afterTags:Object.assign({},ai.afterTags,Wt.afterTags,Au.afterTags),beforeWords:Object.assign({},ai.beforeWords,Wt.beforeWords,Au.beforeWords),afterWords:Object.assign({},ai.afterWords,Wt.afterWords,Au.afterWords)},vo="Singular",Fi="Infinitive",RT={beforeTags:Object.assign({},Ir.beforeTags,Wt.beforeTags,{Adjective:vo,Particle:vo}),afterTags:Object.assign({},Ir.afterTags,Wt.afterTags,{ProperNoun:Fi,Gerund:Fi,Adjective:Fi,Copula:vo}),beforeWords:Object.assign({},Ir.beforeWords,Wt.beforeWords,{is:vo,was:vo,of:vo,have:null}),afterWords:Object.assign({},Ir.afterWords,Wt.afterWords,{instead:Fi,about:Fi,his:Fi,her:Fi,to:null,by:null,in:null})},Mt="Person",ur={beforeTags:{Honorific:Mt,Person:Mt},afterTags:{Person:Mt,ProperNoun:Mt,Verb:Mt},beforeWords:{hi:Mt,hey:Mt,yo:Mt,dear:Mt,hello:Mt},afterWords:{said:Mt,says:Mt,told:Mt,tells:Mt,feels:Mt,felt:Mt,seems:Mt,thinks:Mt,thought:Mt,spends:Mt,spendt:Mt,plays:Mt,played:Mt,sing:Mt,sang:Mt,learn:Mt,learned:Mt,wants:Mt,wanted:Mt}},Gt="Month",LT="Person",Cu={beforeTags:{Date:Gt,Value:Gt},afterTags:{Date:Gt,Value:Gt},beforeWords:{by:Gt,in:Gt,on:Gt,during:Gt,after:Gt,before:Gt,between:Gt,until:Gt,til:Gt,sometime:Gt,of:Gt,this:Gt,next:Gt,last:Gt,previous:Gt,following:Gt,with:LT},afterWords:{sometime:Gt,in:Gt,of:Gt,until:Gt,the:Gt}},HT={beforeTags:Object.assign({},ur.beforeTags,Cu.beforeTags),afterTags:Object.assign({},ur.afterTags,Cu.afterTags),beforeWords:Object.assign({},ur.beforeWords,Cu.beforeWords),afterWords:Object.assign({},ur.afterWords,Cu.afterWords)},GT={beforeTags:Object.assign({},Wt.beforeTags,ur.beforeTags),afterTags:Object.assign({},Wt.afterTags,ur.afterTags),beforeWords:Object.assign({},Wt.beforeWords,ur.beforeWords,{i:"Infinitive",we:"Infinitive"}),afterWords:Object.assign({},Wt.afterWords,ur.afterWords)},VT={beforeTags:Object.assign({},Wt.beforeTags,ur.beforeTags,Ir.beforeTags),afterTags:Object.assign({},Wt.afterTags,ur.afterTags,Ir.afterTags),beforeWords:Object.assign({},Wt.beforeWords,ur.beforeWords,Ir.beforeWords),afterWords:Object.assign({},Wt.afterWords,ur.afterWords,Ir.afterWords)},Sr="Place",Eu={beforeTags:{Place:Sr},afterTags:{Place:Sr,Abbreviation:Sr},beforeWords:{in:Sr,by:Sr,near:Sr,from:Sr,to:Sr},afterWords:{in:Sr,by:Sr,near:Sr,from:Sr,to:Sr,government:Sr,council:Sr,region:Sr,city:Sr}},UT={beforeTags:Object.assign({},Eu.beforeTags,ur.beforeTags),afterTags:Object.assign({},Eu.afterTags,ur.afterTags),beforeWords:Object.assign({},Eu.beforeWords,ur.beforeWords),afterWords:Object.assign({},Eu.afterWords,ur.afterWords)},WT={beforeTags:Object.assign({},ur.beforeTags,sr.beforeTags),afterTags:Object.assign({},ur.afterTags,sr.afterTags),beforeWords:Object.assign({},ur.beforeWords,sr.beforeWords),afterWords:Object.assign({},ur.afterWords,sr.afterWords)},Nn="Unit",JT={beforeTags:{Value:Nn},afterTags:{},beforeWords:{per:Nn,every:Nn,each:Nn,square:Nn,cubic:Nn,sq:Nn,metric:Nn},afterWords:{per:Nn,squared:Nn,cubed:Nn,long:Nn}},$o={"Actor|Verb":$T,"Adj|Gerund":BT,"Adj|Noun":_T,"Adj|Past":IT,"Adj|Present":jT,"Noun|Verb":RT,"Noun|Gerund":qT,"Person|Noun":GT,"Person|Date":HT,"Person|Verb":VT,"Person|Place":UT,"Person|Adj":WT,"Unit|Noun":JT},Su=(e,t)=>{const r=Object.keys(e).reduce((n,a)=>(n[a]=e[a]==="Infinitive"?"PresentTense":"Plural",n),{});return Object.assign(r,t)};$o["Plural|Verb"]={beforeWords:Su($o["Noun|Verb"].beforeWords,{had:"Plural",have:"Plural"}),afterWords:Su($o["Noun|Verb"].afterWords,{his:"PresentTense",her:"PresentTense",its:"PresentTense",in:null,to:null,is:"PresentTense",by:"PresentTense"}),beforeTags:Su($o["Noun|Verb"].beforeTags,{Conjunction:"PresentTense",Noun:void 0,ProperNoun:"PresentTense"}),afterTags:Su($o["Noun|Verb"].afterTags,{Gerund:"Plural",Noun:"PresentTense",Value:"PresentTense"})};const At="Adjective",gr="Infinitive",Pi="PresentTense",ut="Singular",vr="PastTense",yo="Adverb",mn="Plural",Kt="Actor",Tu="Verb",Or="Noun",KT="ProperNoun",Rn="LastName",sp="Modal",$t="Place",rf="Participle",YT=[null,null,{ea:ut,ia:Or,ic:At,ly:yo,"'n":Tu,"'t":Tu},{oed:vr,ued:vr,xed:vr," so":yo,"'ll":sp,"'re":"Copula",azy:At,eer:Or,end:Tu,ped:vr,ffy:At,ify:gr,ing:"Gerund",ize:gr,ibe:gr,lar:At,mum:At,nes:Pi,nny:At,ous:At,que:At,ger:Or,ber:Or,rol:ut,sis:ut,ogy:ut,oid:ut,ian:ut,zes:Pi,eld:vr,ken:rf,ven:rf,ten:rf,ect:gr,ict:gr,ign:gr,oze:gr,ful:At,bal:At,ton:Or,pur:$t},{amed:vr,aped:vr,ched:vr,lked:vr,rked:vr,reed:vr,nded:vr,mned:At,cted:vr,dged:vr,ield:ut,akis:Rn,cede:gr,chuk:Rn,czyk:Rn,ects:Pi,iend:ut,ends:Tu,enko:Rn,ette:ut,iary:ut,wner:ut,fies:Pi,fore:yo,gate:gr,gone:At,ices:mn,ints:mn,ruct:gr,ines:mn,ions:mn,ners:mn,pers:mn,lers:mn,less:At,llen:At,made:At,nsen:Rn,oses:Pi,ould:sp,some:At,sson:Rn,ians:mn,tion:ut,tage:Or,ique:ut,tive:At,tors:Or,vice:ut,lier:ut,fier:ut,wned:vr,gent:ut,tist:Kt,pist:Kt,rist:Kt,mist:Kt,yist:Kt,vist:Kt,ists:Kt,lite:ut,site:ut,rite:ut,mite:ut,bite:ut,mate:ut,date:ut,ndal:ut,vent:ut,uist:Kt,gist:Kt,note:ut,cide:ut,ence:ut,wide:At,vide:gr,ract:gr,duce:gr,pose:gr,eive:gr,lyze:gr,lyse:gr,iant:At,nary:At,ghty:At,uent:At,erer:Kt,bury:$t,dorf:Or,esty:Or,wych:$t,dale:$t,folk:$t,vale:$t,abad:$t,sham:$t,wick:$t,view:$t},{elist:Kt,holic:ut,phite:ut,tized:vr,urned:vr,eased:vr,ances:mn,bound:At,ettes:mn,fully:yo,ishes:Pi,ities:mn,marek:Rn,nssen:Rn,ology:Or,osome:ut,tment:ut,ports:mn,rough:At,tches:Pi,tieth:"Ordinal",tures:mn,wards:yo,where:yo,archy:Or,pathy:Or,opoly:Or,embly:Or,phate:Or,ndent:ut,scent:ut,onist:Kt,anist:Kt,alist:Kt,olist:Kt,icist:Kt,ounce:gr,iable:At,borne:At,gnant:At,inant:At,igent:At,atory:At,rient:ut,dient:ut,maker:Kt,burgh:$t,mouth:$t,ceter:$t,ville:$t,hurst:$t,stead:$t,endon:$t,brook:$t,shire:$t,worth:Or,field:KT,ridge:$t},{auskas:Rn,parent:ut,cedent:ut,ionary:ut,cklist:ut,brooke:$t,keeper:Kt,logist:Kt,teenth:"Value",worker:Kt,master:Kt,writer:Kt,brough:$t,cester:$t,ington:$t,cliffe:$t,ingham:$t},{chester:$t,logists:Kt,opoulos:Rn,borough:$t,sdottir:Rn}],dn="Adjective",Bt="Noun",ws="Verb",ZT=[null,null,{},{neo:Bt,bio:Bt,"de-":ws,"re-":ws,"un-":ws,"ex-":Bt},{anti:Bt,auto:Bt,faux:dn,hexa:Bt,kilo:Bt,mono:Bt,nano:Bt,octa:Bt,poly:Bt,semi:dn,tele:Bt,"pro-":dn,"mis-":ws,"dis-":ws,"pre-":dn},{anglo:Bt,centi:Bt,ethno:Bt,ferro:Bt,grand:Bt,hepta:Bt,hydro:Bt,intro:Bt,macro:Bt,micro:Bt,milli:Bt,nitro:Bt,penta:Bt,quasi:dn,radio:Bt,tetra:Bt,"omni-":dn,"post-":dn},{pseudo:dn,"extra-":dn,"hyper-":dn,"inter-":dn,"intra-":dn,"deca-":dn},{electro:Bt}],Vt="Adjective",Mu="Infinitive",Fu="PresentTense",ba="Singular",Gr="PastTense",up="Adverb",wa="Expression",lp="Actor",cp="Verb",fp="Noun",Pu="LastName",QT={a:[[/.[aeiou]na$/,fp,"tuna"],[/.[oau][wvl]ska$/,Pu],[/.[^aeiou]ica$/,ba,"harmonica"],[/^([hyj]a+)+$/,wa,"haha"]],c:[[/.[^aeiou]ic$/,Vt]],d:[[/[aeiou](pp|ll|ss|ff|gg|tt|rr|bb|nn|mm)ed$/,Gr,"popped"],[/.[aeo]{2}[bdgmnprvz]ed$/,Gr,"rammed"],[/.[aeiou][sg]hed$/,Gr,"gushed"],[/.[aeiou]red$/,Gr,"hired"],[/.[aeiou]r?ried$/,Gr,"hurried"],[/[^aeiou]ard$/,ba,"steward"],[/[aeiou][^aeiou]id$/,Vt,""],[/.[vrl]id$/,Vt,"livid"],[/..led$/,Gr,"hurled"],[/.[iao]sed$/,Gr,""],[/[aeiou]n?[cs]ed$/,Gr,""],[/[aeiou][rl]?[mnf]ed$/,Gr,""],[/[aeiou][ns]?c?ked$/,Gr,"bunked"],[/[aeiou]gned$/,Gr],[/[aeiou][nl]?ged$/,Gr],[/.[tdbwxyz]ed$/,Gr],[/[^aeiou][aeiou][tvx]ed$/,Gr],[/.[cdflmnprstv]ied$/,Gr,"emptied"]],e:[[/.[lnr]ize$/,Mu,"antagonize"],[/.[^aeiou]ise$/,Mu,"antagonise"],[/.[aeiou]te$/,Mu,"bite"],[/.[^aeiou][ai]ble$/,Vt,"fixable"],[/.[^aeiou]eable$/,Vt,"maleable"],[/.[ts]ive$/,Vt,"festive"],[/[a-z]-like$/,Vt,"woman-like"]],h:[[/.[^aeiouf]ish$/,Vt,"cornish"],[/.v[iy]ch$/,Pu,"..ovich"],[/^ug?h+$/,wa,"ughh"],[/^uh[ -]?oh$/,wa,"uhoh"],[/[a-z]-ish$/,Vt,"cartoon-ish"]],i:[[/.[oau][wvl]ski$/,Pu,"polish-male"]],k:[[/^(k){2}$/,wa,"kkkk"]],l:[[/.[gl]ial$/,Vt,"familial"],[/.[^aeiou]ful$/,Vt,"fitful"],[/.[nrtumcd]al$/,Vt,"natal"],[/.[^aeiou][ei]al$/,Vt,"familial"]],m:[[/.[^aeiou]ium$/,ba,"magnesium"],[/[^aeiou]ism$/,ba,"schism"],[/^[hu]m+$/,wa,"hmm"],[/^\d+ ?[ap]m$/,"Date","3am"]],n:[[/.[lsrnpb]ian$/,Vt,"republican"],[/[^aeiou]ician$/,lp,"musician"],[/[aeiou][ktrp]in'$/,"Gerund","cookin'"]],o:[[/^no+$/,wa,"noooo"],[/^(yo)+$/,wa,"yoo"],[/^wo{2,}[pt]?$/,wa,"woop"]],r:[[/.[bdfklmst]ler$/,"Noun"],[/[aeiou][pns]er$/,ba],[/[^i]fer$/,Mu],[/.[^aeiou][ao]pher$/,lp],[/.[lk]er$/,"Noun"],[/.ier$/,"Comparative"]],t:[[/.[di]est$/,"Superlative"],[/.[icldtgrv]ent$/,Vt],[/[aeiou].*ist$/,Vt],[/^[a-z]et$/,cp]],s:[[/.[^aeiou]ises$/,Fu],[/.[rln]ates$/,Fu],[/.[^z]ens$/,cp],[/.[lstrn]us$/,ba],[/.[aeiou]sks$/,Fu],[/.[aeiou]kes$/,Fu],[/[aeiou][^aeiou]is$/,ba],[/[a-z]'s$/,fp],[/^yes+$/,wa]],v:[[/.[^aeiou][ai][kln]ov$/,Pu]],y:[[/.[cts]hy$/,Vt],[/.[st]ty$/,Vt],[/.[tnl]ary$/,Vt],[/.[oe]ry$/,ba],[/[rdntkbhs]ly$/,up],[/.(gg|bb|zz)ly$/,Vt],[/...lly$/,up],[/.[gk]y$/,Vt],[/[bszmp]{2}y$/,Vt],[/.[ai]my$/,Vt],[/[ea]{2}zy$/,Vt],[/.[^aeiou]ity$/,ba]]},$r="Verb",qt="Noun",XT={leftTags:[["Adjective",qt],["Possessive",qt],["Determiner",qt],["Adverb",$r],["Pronoun",$r],["Value",qt],["Ordinal",qt],["Modal",$r],["Superlative",qt],["Demonym",qt],["Honorific","Person"]],leftWords:[["i",$r],["first",qt],["it",$r],["there",$r],["not",$r],["because",qt],["if",qt],["but",qt],["who",$r],["this",qt],["his",qt],["when",qt],["you",$r],["very","Adjective"],["old",qt],["never",$r],["before",qt],["a",qt],["the",qt],["been",$r]],rightTags:[["Copula",qt],["PastTense",qt],["Conjunction",qt],["Modal",qt]],rightWords:[["there",$r],["me",$r],["man","Adjective"],["him",$r],["it",$r],["were",qt],["took",qt],["himself",$r],["went",qt],["who",qt],["jr","Person"]]},ro={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"}},eM=function(e,t={}){return t.hasOwnProperty(e)?t[e]:null},tM=function(e,t=[]){for(let r=0;r<t.length;r+=1)if(e.endsWith(t[r]))return e;return null},rM=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},gn=function(e="",t={}){let r=eM(e,t.ex);return r=r||tM(e,t.same),r=r||rM(e,t.fwd,t.both),r=r||e,r},mp=function(e){return Object.entries(e).reduce((t,r)=>(t[r[1]]=r[0],t),{})},rs=function(e={}){return{reversed:!0,both:mp(e.both),ex:mp(e.ex),fwd:e.rev||{}}},dp=/^([0-9]+)/,nM=function(e){let t={};return e.split("¦").forEach(r=>{let[n,a]=r.split(":");a=(a||"").split(","),a.forEach(i=>{t[i]=n})}),t},aM=function(e="",t=""){t=String(t);let r=t.match(dp);if(r===null)return t;let n=Number(r[1])||0;return e.substring(0,n)+t.replace(dp,"")},ku=function(e){let t=nM(e);return Object.keys(t).reduce((r,n)=>(r[n]=aM(n,t[n]),r),{})},no=function(e={}){return typeof e=="string"&&(e=JSON.parse(e)),e.fwd=ku(e.fwd||""),e.both=ku(e.both||""),e.rev=ku(e.rev||""),e.ex=ku(e.ex||""),e},Sw=no(ro.PastTense),Tw=no(ro.PresentTense),Mw=no(ro.Gerund),Fw=no(ro.Participle),iM=rs(Sw),oM=rs(Tw),sM=rs(Mw),uM=rs(Fw),Pw=no(ro.Comparative),kw=no(ro.Superlative),lM=rs(Pw),cM=rs(kw),fM=no(ro.AdjToNoun),Ow={fromPast:Sw,fromPresent:Tw,fromGerund:Mw,fromParticiple:Fw,toPast:iM,toPresent:oM,toGerund:sM,toParticiple:uM,toComparative:Pw,toSuperlative:kw,fromComparative:lM,fromSuperlative:cM,adjToNoun:fM},mM=[[/^[\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"]],dM=[[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"]],hM=[[/^@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"]],pM=["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),{}),gM=["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),{}),Ou=[[/([^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,""]],vM=function(e){return Object.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{})},$w=function(e,t){const{irregularPlurals:r}=t.two,n=vM(r);if(n.hasOwnProperty(e))return n[e];for(let a=0;a<Ou.length;a++)if(Ou[a][0].test(e)===!0)return e=e.replace(Ou[a][0],Ou[a][1]),e;return e},yM=function(e,t){const r=[e],n=xc(e,t);n!==e&&r.push(n);const a=$w(e,t);return a!==e&&r.push(a),r},bM={toPlural:xc,toSingular:$w,all:yM};let Gi={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"]};Gi=Object.keys(Gi).reduce((e,t)=>(Gi[t].forEach(r=>e[r]=t),e),{});const Bw=function(e){const t=e.substring(e.length-3);if(Gi.hasOwnProperty(t)===!0)return Gi[t];const r=e.substring(e.length-2);return Gi.hasOwnProperty(r)===!0?Gi[r]:e.substring(e.length-1)==="s"?"PresentTense":null},wM=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}},hp={are:"be",were:"be",been:"be",is:"be",am:"be",was:"be",be:"be",being:"be"},cm=function(e,t,r){const{fromPast:n,fromPresent:a,fromGerund:i,fromParticiple:o}=t.two.models,{prefix:s,verb:u,particle:l}=wM(e,t);let c="";if(r||(r=Bw(e)),hp.hasOwnProperty(e))c=hp[e];else if(r==="Participle")c=gn(u,o);else if(r==="PastTense")c=gn(u,n);else if(r==="PresentTense")c=gn(u,a);else if(r==="Gerund")c=gn(u,i);else return e;return l&&(c+=" "+l),s&&(c=s+" "+c),c},xM=e=>/ /.test(e)?e.split(/ /):[e,""],pd=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"};const[o,s]=xM(e),u={Infinitive:o,PastTense:gn(o,r),PresentTense:gn(o,n),Gerund:gn(o,a),FutureTense:"will "+o};let l=gn(o,i);if(l!==e&&l!==u.PastTense){const 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},DM=function(e,t){const r=pd(e,t);return delete r.FutureTense,Object.values(r).filter(n=>n)},NM={toInfinitive:cm,conjugate:pd,all:DM},gd=function(e,t){const r=t.two.models.toSuperlative;return gn(e,r)},vd=function(e,t){const r=t.two.models.toComparative;return gn(e,r)},AM=function(e,t){const r=t.two.models.fromComparative;return gn(e,r)},CM=function(e,t){const r=t.two.models.fromSuperlative;return gn(e,r)},EM=function(e,t){const r=t.two.models.adjToNoun;return gn(e,r)},_w=function(e="",t=[]){const r=e.length,n=r<=6?r-1:6;for(let a=n;a>=1;a-=1){const i=e.substring(r-a,e.length);if(t[i.length].hasOwnProperty(i)===!0){const o=e.slice(0,r-a),s=t[i.length][i];return o+s}}return null},yt="ically",SM=new Set(["analyt"+yt,"chem"+yt,"class"+yt,"clin"+yt,"crit"+yt,"ecolog"+yt,"electr"+yt,"empir"+yt,"frant"+yt,"grammat"+yt,"ident"+yt,"ideolog"+yt,"log"+yt,"mag"+yt,"mathemat"+yt,"mechan"+yt,"med"+yt,"method"+yt,"method"+yt,"mus"+yt,"phys"+yt,"phys"+yt,"polit"+yt,"pract"+yt,"rad"+yt,"satir"+yt,"statist"+yt,"techn"+yt,"technolog"+yt,"theoret"+yt,"typ"+yt,"vert"+yt,"whims"+yt]),TM=[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"}],MM=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"]),pp={wholly:"whole",fully:"full",truly:"true",gently:"gentle",singly:"single",customarily:"customary",idly:"idle",publically:"public",quickly:"quick",superbly:"superb",cynically:"cynical",well:"good"},FM=function(e){return e.endsWith("ly")?SM.has(e)?e.replace(/ically/,"ical"):MM.has(e)?null:pp.hasOwnProperty(e)?pp[e]:_w(e,TM)||e:null},PM=[null,{y:"ily"},{ly:"ly",ic:"ically"},{ial:"ially",ual:"ually",tle:"tly",ble:"bly",ple:"ply",ary:"arily"},{},{},{}],gp={cool:"cooly",whole:"wholly",full:"fully",good:"well",idle:"idly",public:"publicly",single:"singly",special:"especially"},Iw=function(e){if(gp.hasOwnProperty(e))return gp[e];let t=_w(e,PM);return t||(t=e+"ly"),t},kM=function(e,t){let r=[e];return r.push(gd(e,t)),r.push(vd(e,t)),r.push(Iw(e)),r=r.filter(n=>n),r=new Set(r),Array.from(r)},OM={toSuperlative:gd,toComparative:vd,toAdverb:Iw,toNoun:EM,fromAdverb:FM,fromSuperlative:CM,fromComparative:AM,all:kM},$M={noun:bM,verb:NM,adjective:OM},vp={Singular:(e,t,r,n)=>{const a=n.one.lexicon,i=r.two.transform.noun.toPlural(e,n);a[i]||(t[i]=t[i]||"Plural")},Actor:(e,t,r,n)=>{const 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)=>{const a=n.one.lexicon,{toSuperlative:i,toComparative:o}=r.two.transform.adjective,s=i(e,n);a[s]||(t[s]=t[s]||"Superlative");const u=o(e,n);a[u]||(t[u]=t[u]||"Comparative"),t[e]="Adjective"},Demonym:(e,t,r,n)=>{const a=r.two.transform.noun.toPlural(e,n);t[a]=t[a]||["Demonym","Plural"]},Infinitive:(e,t,r,n)=>{const 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)=>{const a=n.one.lexicon;t[e]=["PhrasalVerb","Infinitive"];const i=n.one._multiCache,[o,s]=e.split(" ");a[o]||(t[o]=t[o]||"Infinitive");const 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;const 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"]}},BM=function(e,t){const{methods:r,model:n}=t,a={},i={};return Object.keys(e).forEach(o=>{const s=e[o];o=o.toLowerCase().trim(),o=o.replace(/'s\b/,"");const u=o.split(/ /);u.length>1&&(i[u[0]]===void 0||u.length>i[u[0]])&&(i[u[0]]=u.length),vp.hasOwnProperty(s)===!0&&vp[s](o,a,r,n),a[o]=a[o]||s}),delete a[""],delete a[null],delete a[" "],{lex:a,_multi:i}},_M=function(e,t){const r=/^[0-9]+$/,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]){const o=e[t-1];if(o.tags.has("Date")||a.has(o.normal)||o.tags.has("Adjective")||n.tags.has("Adjective"))return!1}const i=n.normal;return!((i.length===1||i.length===2||i.length===4)&&r.test(i))},IM=function(e){const t=/[,:;]/,r=[];return e.forEach(n=>{let a=0;n.forEach((i,o)=>{t.test(i.post)&&_M(n,o+1)&&(r.push(n.slice(a,o+1)),a=o+1)}),a<n.length&&r.push(n.slice(a,n.length))}),r},yp={e:["mice","louse","antennae","formulae","nebulae","vertebrae","vitae"],i:["tia","octopi","viri","radii","nuclei","fungi","cacti","stimuli"],n:["men"],t:["feet"]},zM=new Set(["israelis","menus","logos"]),jM=["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"],zw=function(e){if(!e||e.length<=3)return!1;if(zM.has(e))return!0;const t=e[e.length-1];return yp.hasOwnProperty(t)?yp[t].find(r=>e.endsWith(r)):!(t!=="s"||jM.find(r=>e.endsWith(r)))},fm={two:{quickSplit:IM,expandLexicon:BM,transform:$M,looksPlural:zw}},qM=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},mm={one:{lexicon:{}},two:{models:Ow}},RM={"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"},jw=function(e,t){const r={model:t,methods:fm},{lex:n,_multi:a}=fm.two.expandLexicon(e,r);return Object.assign(t.one.lexicon,n),Object.assign(t.one._multiCache,a),t},LM=function(e,t){return Object.keys(e).forEach(r=>{e[r]==="Uncountable"&&(t.two.uncountable[r]=!0,e[r]="Uncountable")}),t},bp=function(e,t,r){const n=pd(e,mm);t[n.PastTense]=t[n.PastTense]||"PastTense",t[n.Gerund]=t[n.Gerund]||"Gerund",r===!0&&(t[n.PresentTense]=t[n.PresentTense]||"PresentTense")},wp=function(e,t,r){const n=gd(e,r);t[n]=t[n]||"Superlative";const a=vd(e,r);t[a]=t[a]||"Comparative"},HM=function(e,t,r){const n=xc(e,r);t[n]=t[n]||"Plural"},GM=function(e,t){const r={},n=t.one.lexicon;return Object.keys(e).forEach(a=>{const i=e[a];if(r[a]=RM[i],(i==="Noun|Verb"||i==="Person|Verb"||i==="Actor|Verb")&&bp(a,n,!1),i==="Adj|Present"&&(bp(a,n,!0),wp(a,n,t)),i==="Person|Adj"&&wp(a,n,t),i==="Adj|Gerund"||i==="Noun|Gerund"){const o=cm(a,mm,"Gerund");n[o]||(r[o]="Infinitive")}if((i==="Noun|Gerund"||i==="Adj|Noun"||i==="Person|Noun")&&HM(a,n,t),i==="Adj|Past"){const o=cm(a,mm,"PastTense");n[o]||(r[o]="Infinitive")}}),t=jw(r,t),t},VM=function(e){return e=jw(e.one.lexicon,e),e=LM(e.one.lexicon,e),e=GM(e.two.switches,e),e=qM(e),e};let dm={one:{_multiCache:{},lexicon:ts,frozenLex:TT},two:{irregularPlurals:Ew,models:Ow,suffixPatterns:YT,prefixPatterns:ZT,endsWith:QT,neighbours:XT,regexNormal:mM,regexText:dM,regexNumbers:hM,switches:lm,clues:$o,uncountable:{},orgWords:pM,placeWords:gM}};dm=VM(dm);const UM=function(e,t,r,n){const a=n.methods.one.setTag;if(e.length>=3){const i=/:/;if(e[0].post.match(i)){const 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''")}}},WM=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''")},xp=/^(under|over|mis|re|un|dis|semi)-?/,JM=function(e,t,r){const n=r.two.switches,a=e[t];if(n.hasOwnProperty(a.normal)){a.switch=n[a.normal];return}if(xp.test(a.normal)){const i=a.normal.replace(xp,"");i.length>3&&n.hasOwnProperty(i)&&(a.switch=n[i])}},KM=(e,t,r="")=>{const n=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",a=o=>"\x1B[3m"+o+"\x1B[0m",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)}`)},nr=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&&KM(e,t,r),e.tags=e.tags||new Set,typeof t=="string"?e.tags.add(t):t.forEach(a=>e.tags.add(a))},YM=["Acronym","Abbreviation","ProperNoun","Uncountable","Possessive","Pronoun","Activity","Honorific","Month"],ZM=function(e){!e.tags.has("Noun")||e.tags.has("Plural")||e.tags.has("Singular")||YM.find(t=>e.tags.has(t))||(zw(e.normal)?nr(e,"Plural","3-plural-guess"):nr(e,"Singular","3-singular-guess"))},QM=function(e){const t=e.tags;if(t.has("Verb")&&t.size===1){const r=Bw(e.normal);r&&nr(e,r,"3-verb-tense-guess")}},ru=function(e,t,r){const n=e[t],a=Array.from(n.tags);for(let i=0;i<a.length;i+=1)if(r.one.tagSet[a[i]]){const o=r.one.tagSet[a[i]].parents;nr(n,o,` -inferred by #${a[i]}`)}ZM(n),QM(n)},XM=new RegExp("^\\p{Lu}[\\p{Ll}'’]","u"),e5=/[0-9]/,t5=["Date","Month","WeekDay","Unit","Expression"],r5=/[IVX]/,n5=/^[IVXLCDM]{2,}$/,a5=/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/,i5={li:!0,dc:!0,md:!0,dm:!0,ml:!0},o5=function(e,t,r){const n=e[t];n.index=n.index||[0,0];const a=n.index[1],i=n.text||"";return a!==0&&XM.test(i)===!0&&e5.test(i)===!1?t5.find(o=>n.tags.has(o))||n.pre.match(/["']$/)||n.normal==="the"?null:(ru(e,t,r),!n.tags.has("Noun")&&!n.frozen&&n.tags.clear(),nr(n,"ProperNoun","2-titlecase"),!0):i.length>=2&&n5.test(i)&&r5.test(i)&&a5.test(i)&&!i5[n.normal]?(nr(n,"RomanNumeral","2-xvii"),!0):null},Dp=function(e="",t=[]){const r=e.length;let n=7;r<=n&&(n=r-1);for(let a=n;a>1;a-=1){const i=e.substring(r-a,r);if(t[i.length].hasOwnProperty(i)===!0)return t[i.length][i]}return null},s5=function(e,t,r){const n=e[t];if(n.tags.size===0){let a=Dp(n.normal,r.two.suffixPatterns);if(a!==null)return nr(n,a,"2-suffix"),n.confidence=.7,!0;if(n.implicit&&(a=Dp(n.implicit,r.two.suffixPatterns),a!==null))return nr(n,a,"2-implicit-suffix"),n.confidence=.7,!0}return null},Np=/['‘’‛‵′`´]/,nf=function(e,t){for(let r=0;r<t.length;r+=1)if(t[r][0].test(e)===!0)return t[r];return null},u5=function(e="",t){const r=e[e.length-1];if(t.hasOwnProperty(r)===!0){const n=t[r]||[];for(let a=0;a<n.length;a+=1)if(n[a][0].test(e)===!0)return n[a]}return null},l5=function(e,t,r,n){const a=n.methods.one.setTag,{regexText:i,regexNormal:o,regexNumbers:s,endsWith:u}=r.two,l=e[t],c=l.machine||l.normal;let f=l.text;Np.test(l.post)&&!Np.test(l.pre)&&(f+=l.post.trim());let m=nf(f,i)||nf(c,o);return!m&&/[0-9]/.test(c)&&(m=nf(c,s)),!m&&l.tags.size===0&&(m=u5(c,u)),m?(a([l],m[1],n,null,`2-regex-'${m[2]||m[0]}'`),l.confidence=.6,!0):null},c5=function(e="",t=[]){const r=e.length;let n=7;n>r-3&&(n=r-3);for(let a=n;a>2;a-=1){const i=e.substring(0,a);if(t[i.length].hasOwnProperty(i)===!0)return t[i.length][i]}return null},f5=function(e,t,r){const n=e[t];if(n.tags.size===0){const a=c5(n.normal,r.two.prefixPatterns);if(a!==null)return nr(n,a,"2-prefix"),n.confidence=.5,!0}return null},m5=1400,d5=2100,h5=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"]),Ap=function(e){if(!e)return!1;const t=e.normal||e.implicit;return!!(h5.has(t)||e.tags.has("Date")||e.tags.has("Month")||e.tags.has("WeekDay")||e.tags.has("Year")||e.tags.has("ProperNoun"))},Cp=function(e){return e?!!(e.tags.has("Ordinal")||e.tags.has("Cardinal")&&e.normal.length<3||e.normal==="is"||e.normal==="was"):!1},Ep=function(e){return e&&(e.tags.has("Date")||e.tags.has("Month")||e.tags.has("WeekDay")||e.tags.has("Year"))},p5=function(e,t){const r=e[t];if(r.tags.has("NumericValue")&&r.tags.has("Cardinal")&&r.normal.length===4){const n=Number(r.normal);if(n&&!isNaN(n)&&n>m5&&n<d5){const a=e[t-1],i=e[t+1];if(Ap(a)||Ap(i))return nr(r,"Year","2-tagYear");if(n>=1920&&n<2025){if(Cp(a)||Cp(i))return nr(r,"Year","2-tagYear-close");if(Ep(e[t-2])||Ep(e[t+2]))return nr(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 nr(r,"Year","2-tagYear-noun")}}}return null},g5=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''"))},qw=/^[A-Z]('s|,)?$/,Rw=/^[A-Z-]+$/,Lw=/^[A-Z]+s$/,v5=/([A-Z]\.)+[A-Z]?,?$/,y5=/[A-Z]{2,}('s|,)?$/,b5=/([a-z]\.)+[a-z]\.?$/,Hw={I:!0,A:!0},w5={la:!0,ny:!0,us:!0,dc:!0,gb:!0},x5=function(e,t){let r=e.text;if(Rw.test(r)===!1)if(r.length>3&&Lw.test(r)===!0)r=r.replace(/s$/,"");else return!1;return r.length>5||Hw.hasOwnProperty(r)||t.one.lexicon.hasOwnProperty(e.normal)?!1:v5.test(r)===!0||b5.test(r)===!0||qw.test(r)===!0||y5.test(r)===!0},D5=function(e,t,r){const n=e[t];return n.tags.has("RomanNumeral")||n.tags.has("Acronym")||n.frozen?null:x5(n,r)?(n.tags.clear(),nr(n,["Acronym","Noun"],"3-no-period-acronym"),w5[n.normal]===!0&&nr(n,"Place","3-place-acronym"),Lw.test(n.text)===!0&&nr(n,"Plural","3-plural-acronym"),!0):!Hw.hasOwnProperty(n.text)&&qw.test(n.text)?(n.tags.clear(),nr(n,["Acronym","Noun"],"3-one-letter-acronym"),!0):n.tags.has("Organization")&&n.text.length<=3?(nr(n,"Acronym","3-org-acronym"),!0):n.tags.has("Organization")&&Rw.test(n.text)&&n.text.length<=6?(nr(n,"Acronym","3-titlecase-acronym"),!0):null},Sp=function(e,t){if(!e)return null;const r=t.find(n=>e.normal===n[0]);return r?r[1]:null},Tp=function(e,t){if(!e)return null;const r=t.find(n=>e.tags.has(n[0]));return r?r[1]:null},N5=function(e,t,r){const{leftTags:n,leftWords:a,rightWords:i,rightTags:o}=r.two.neighbours,s=e[t];if(s.tags.size===0){let u=null;if(u=u||Sp(e[t-1],a),u=u||Sp(e[t+1],i),u=u||Tp(e[t-1],n),u=u||Tp(e[t+1],o),u)return nr(s,u,"3-[neighbour]"),ru(e,t,r),e[t].confidence=.2,!0}return null},A5=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e),Mp=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&&A5(e.text)?t===0?e.tags.has("Singular"):!0:!1},C5=function(e,t,r,n){const a=r.model.two.orgWords,i=r.methods.one.setTag,o=e[t],s=o.machine||o.normal;if(a[s]===!0&&Mp(e[t-1],t-1,n)){i([e[t]],"Organization",r,null,"3-[org-word]");for(let u=t;u>=0&&Mp(e[u],u,n);u-=1)i([e[u]],"Organization",r,null,"3-[org-word]")}return null},E5=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e),S5=/'s$/,Fp=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"]),T5=new Set(["center","centre","way","range","bar","bridge","field","pit"]),Pp=function(e,t,r){if(!e)return!1;const n=e.tags;return n.has("Organization")||n.has("Possessive")||S5.test(e.normal)?!1:n.has("ProperNoun")||n.has("Place")?!0:!r&&E5(e.text)?t===0?n.has("Singular"):!0:!1},M5=function(e,t,r,n){const a=r.model.two.placeWords,i=r.methods.one.setTag,o=e[t],s=o.machine||o.normal;if(a[s]===!0){for(let u=t-1;u>=0;u-=1)if(!Fp.has(e[u].normal)){if(Pp(e[u],u,n)){i(e.slice(u,t+1),"Place",r,null,"3-[place-of-foo]");continue}break}if(T5.has(s))return!1;for(let u=t+1;u<e.length;u+=1){if(Pp(e[u],u,n))return i(e.slice(t,u+1),"Place",r,null,"3-[foo-place]"),!0;if(!(e[u].normal==="of"||Fp.has(e[u].normal)))break}}return null},F5=function(e,t,r){let n=!1;const 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&&(nr(e[t],"Noun","3-[fallback]"),ru(e,t,r),e[t].confidence=.1)},P5=/^[A-Z][a-z]/,Ln=(e,t)=>e[t].tags.has("ProperNoun")&&P5.test(e[t].text)?"Noun":null,kp=(e,t,r)=>t===0&&!e[1]?r:null,k5=function(e,t){return!e[t+1]&&e[t-1]&&e[t-1].tags.has("Determiner")?"Noun":null},O5=function(e,t,r){return t===0&&e.length>3?r:null},Op={"Adj|Gerund":(e,t)=>Ln(e,t),"Adj|Noun":(e,t)=>Ln(e,t)||k5(e,t),"Actor|Verb":(e,t)=>Ln(e,t),"Adj|Past":(e,t)=>Ln(e,t),"Adj|Present":(e,t)=>Ln(e,t),"Noun|Gerund":(e,t)=>Ln(e,t),"Noun|Verb":(e,t)=>t>0&&Ln(e,t)||kp(e,t,"Infinitive"),"Plural|Verb":(e,t)=>Ln(e,t)||kp(e,t,"PresentTense")||O5(e,t,"Plural"),"Person|Noun":(e,t)=>Ln(e,t),"Person|Verb":(e,t)=>t!==0?Ln(e,t):null,"Person|Adj":(e,t)=>t===0&&e.length>1||Ln(e,t)?"Person":null},yd=typeof process>"u"||!process.env?self.env||{}:process.env,$p=/^(under|over|mis|re|un|dis|semi)-?/,Bp=(e,t)=>{if(!e||!t)return null;const r=e.normal||e.implicit;let n=null;return t.hasOwnProperty(r)&&(n=t[r]),n&&yd.DEBUG_TAGS&&console.log(`
12
- \x1B[2m\x1B[3m ↓ - '${r}' \x1B[0m`),n},_p=(e,t={},r)=>{if(!e||!t)return null;let a=Array.from(e.tags).sort((i,o)=>{const 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&&yd.DEBUG_TAGS&&console.log(` \x1B[2m\x1B[3m ↓ - '${e.normal||e.implicit}' (#${a}) \x1B[0m`),a=t[a],a},$5=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=Bp(e[t+1],r.afterWords);return o=o||Bp(e[a],r.beforeWords),o=o||_p(e[a],r.beforeTags,i),o=o||_p(e[t+1],r.afterTags,i),o},B5=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($p.test(u)&&!i[u]&&(u=u.replace($p,"")),s.switch){const l=s.switch;if(s.tags.has("Acronym")||s.tags.has("PhrasalVerb"))return;let c=$5(e,t,o[l],n);Op[l]&&(c=Op[l](e,t)||c),c?(a([s],c,r,null,`3-[switch] (${l})`),ru(e,t,n)):yd.DEBUG_TAGS&&console.log(`
13
- -> X - '${u}' : (${l}) `)}},_5={there:!0,this:!0,it:!0,him:!0,her:!0,us:!0},I5=function(e,t){const r=t.methods.one.setTag,n=t.model.one._multiCache||{},a=e[0];if((a.switch==="Noun|Verb"||a.tags.has("Infinitive"))&&e.length>=2){if(e.length<4&&!_5[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]")}},z5=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))},j5=function(e,t,r){e.forEach(n=>{UM(n,0,t,r)})},q5=function(e,t,r,n){for(let a=0;a<e.length;a+=1)e[a].frozen!==!0&&(JM(e,a,t),n===!1&&o5(e,a,t),s5(e,a,t),l5(e,a,t,r),f5(e,a,t),p5(e,a))},R5=function(e,t,r,n){for(let a=0;a<e.length;a+=1){let i=D5(e,a,t);ru(e,a,t),i=i||N5(e,a,t),i=i||F5(e,a,t)}for(let a=0;a<e.length;a+=1)e[a].frozen!==!0&&(C5(e,a,r,n),M5(e,a,r,n),B5(e,a,r),g5(e,a,t,r),WM(e,a,t,r));I5(e,r)},L5=function(e){const{methods:t,model:r,world:n}=e,a=e.docs;j5(a,r,n);const i=t.two.quickSplit(a);for(let o=0;o<i.length;o+=1){const s=i[o],u=z5(s);q5(s,r,n,u),R5(s,r,n,u)}return i},Ip={Possessive:e=>{let t=e.machine||e.normal||e.text;return t=t.replace(/'s$/,""),t},Plural:(e,t)=>{const r=e.machine||e.normal||e.text;return t.methods.two.transform.noun.toSingular(r,t.model)},Copula:()=>"is",PastTense:(e,t)=>{const r=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(r,t.model,"PastTense")},Gerund:(e,t)=>{const r=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(r,t.model,"Gerund")},PresentTense:(e,t)=>{const 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)=>{const r=e.machine||e.normal||e.text;return t.methods.two.transform.adjective.fromComparative(r,t.model)},Superlative:(e,t)=>{const 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,n=e.machine||e.normal||e.text;return r(n)}},H5=function(e){const t=e.world,r=Object.keys(Ip);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=Ip[r[o]],u=s(i,t);i.normal!==u&&(i.root=u);break}}})},zp={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"},G5=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";const t=e.tagRank||[];for(let r=0;r<t.length;r+=1)if(zp.hasOwnProperty(t[r]))return zp[t[r]];return null},V5=function(e){e.compute("tagRank"),e.docs.forEach(t=>{t.forEach(r=>{r.penn=G5(r)})})},U5={preTagger:L5,root:H5,penn:V5},af=["Person","Place","Organization"],W5={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:af},Actor:{is:"Noun",not:["Place","Organization"]},Activity:{is:"Noun",not:["Person","Place"]},Unit:{is:"Noun",not:af},Demonym:{is:"Noun",also:["ProperNoun"],not:af},Possessive:{is:"Noun"},Reflexive:{is:"Pronoun"}},J5={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"}},K5={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"}},Y5={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"]}},Z5=["Noun","Verb","Adjective","Adverb","Value","QuestionWord"],Q5={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:Z5},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:{}},X5=Object.assign({},W5,J5,K5,Y5,Q5),eF={compute:U5,methods:fm,model:dm,tags:X5,hooks:["preTagger"]},tF=/[,)"';:\-–—.…]/,xa=function(e,t){if(!e.found)return;const r=e.termList();for(let n=0;n<r.length-1;n++){const a=r[n];if(tF.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(/ /,"")},rF=function(){const e=this.not("@hasContraction");let t=e.match("(we|they|you) are");return xa(t,"'re"),t=e.match("(he|she|they|it|we|you) will"),xa(t,"'ll"),t=e.match("(he|she|they|it|we) is"),xa(t,"'s"),t=e.match("#Person is"),xa(t,"'s"),t=e.match("#Person would"),xa(t,"'d"),t=e.match("(is|was|had|would|should|could|do|does|have|has|can) not"),xa(t,"n't"),t=e.match("(i|we|they) have"),xa(t,"'ve"),t=e.match("(would|should|could) have"),xa(t,"'ve"),t=e.match("i am"),xa(t,"'m"),t=e.match("going to"),this},nF=new RegExp("^\\p{Lu}[\\p{Ll}'’]","u"),aF=function(e=""){return e=e.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase()),e},iF=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Contraction"}expand(){return this.docs.forEach(n=>{const a=nF.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=aF(n[0].text))}),this.compute("normal"),this}}e.prototype.contractions=function(){const r=this.match("@hasContraction+");return new t(this.document,r.pointer)},e.prototype.contract=rF},oF=function(e,t,r){const[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))},sF=/'/,uF=new Set(["been","become"]),lF=new Set(["what","how","when","if","too"]),cF=new Set(["too","also","enough"]),fF=(e,t)=>{for(let r=t+1;r<e.length;r+=1){const n=e[r];if(uF.has(n.normal))return"has";if(lF.has(n.normal)||n.tags.has("Gerund")||n.tags.has("Determiner")||n.tags.has("Adjective")||n.switch==="Adj|Past"&&e[r+1]&&(cF.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"},mF=function(e,t){const r=e[t].normal.split(sF)[0];if(r==="let")return[r,"us"];if(r==="there"){const n=e[t+1];if(n&&n.tags.has("Plural"))return[r,"are"]}return fF(e,t)==="has"?[r,"has"]:[r,"is"]},dF=/'/,hF=new Set(["better","done","before","it","had"]),pF=new Set(["have","be"]),gF=(e,t)=>{for(let r=t+1;r<e.length;r+=1){const n=e[r];if(hF.has(n.normal))return"had";if(pF.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},vF=function(e,t){const r=e[t].normal.split(dF)[0];return r==="how"||r==="what"?[r,"did"]:gF(e,t)==="had"?[r,"had"]:[r,"would"]},yF=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},bF=function(e,t){if(e[t].normal==="ain't"||e[t].normal==="aint"){if(e[t+1]&&e[t+1].normal==="never")return["have"];const n=yF(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"]},wF={that:!0,there:!0,let:!0,here:!0,everywhere:!0},xF={in:!0,by:!0,for:!0},DF=new Set(["too","also","enough","about"]),NF=new Set(["is","are","did","were","could","should","must","had","have"]),AF=(e,t)=>{const r=e[t];if(wF.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;const n=e[t+1];if(!n)return!0;if(r.normal==="it's")return!!n.tags.has("#Noun");if(n.switch=="Noun|Gerund"){const 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"){const a=e[t+2];if(!a)return!1;if(NF.has(a.normal))return!0;if(DF.has(a.normal))return!1}if(n.tags.has("Noun")){const 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]&&xF[e[t-1].normal]===!0)return!0;if(n.tags.has("Adjective")){const a=e[t+2];if(!a)return!1;if(a.tags.has("Noun")&&!a.tags.has("Pronoun")){const i=n.normal;return!(i==="above"||i==="below"||i==="behind")}return a.switch==="Noun|Verb"}return!!n.tags.has("Value")},jp=/'/,CF=function(e){e.forEach((t,r)=>{t.index&&(t.index[1]=r)})},EF=function(e,t,r,n){const 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"]),CF(e)},qp={d:(e,t)=>vF(e,t),t:(e,t)=>bF(e,t),s:(e,t,r)=>AF(e,t)?r.methods.one.setTag([e[t]],"Possessive",r,null,"2-contraction"):mF(e,t)},SF=function(e,t){const r=t.fromText(e.join(" "));return r.compute("id"),r.docs[0]},TF=e=>{const{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;jp.test(n[i].normal)===!0&&(o=n[i].normal.split(jp)[1]);let s=null;if(qp.hasOwnProperty(o)&&(s=qp[o](n,i,t)),s){s=SF(s,e),oF(r,[a,i],s),EF(r[a],e,i,s.length);continue}}})},MF={contractionTwo:TF},FF={compute:MF,api:iF,hooks:["contractionTwo"]},PF=[{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"}],kF="(dark|bright|flat|light|soft|pale|dead|dim|faux|little|wee|sheer|most|near|good|extra|all)",Rp="(hard|fast|late|early|high|right|deep|close|direct)",OF=[{match:"#Adverb [#Adverb] (and|or|then)",group:0,tag:"Adjective",reason:"kinda-sparkly-and"},{match:`[${kF}] #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 ${Rp}`,tag:"#PresentTense #Adverb",reason:"studies-hard"},{match:`#Verb [${Rp}] !#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"}],$F=[{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"}],BF=[{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"}],_F=[{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$"}],IF=[{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"}],zF=[{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"}],jF=[{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"}],qF="(feel|sense|process|rush|side|bomb|bully|challenge|cover|crush|dump|exchange|flow|function|issue|lecture|limit|march|process)",RF=[{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 [${qF}] !(#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"}],LF=[{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"}],HF=[{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"}],GF=[{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"}],VF=[{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"}],UF=[{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"}],WF=[{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"}],JF=[{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"}],KF=[{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"}],YF=[{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"}],ZF=[{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"}],of="(i|we|they)",QF=[{match:"^do not? [#Infinitive #Particle?]",notIf:of,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:of,group:0,tag:"Imperative",reason:"do-it-better"},{match:"^[#Infinitive] it (please|now|again|plz)",notIf:of,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"}],XF=[{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"}],eP=[{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"}],tP=[{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"}],rP=[{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"}],nP=[{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"}],aP=[{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"}],iP=[{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"}],oP=[].concat(eP,PF,OF,$F,BF,IF,jF,zF,RF,LF,HF,GF,VF,UF,WF,JF,KF,_F,YF,ZF,QF,XF,tP,rP,nP,aP,iP),sP={two:{matches:oP}};let sf=null;const uP=function(e){const{world:t}=e,{model:r,methods:n}=t;sf=sf||n.one.buildNet(r.two.matches,t);const i=n.two.quickSplit(e.document).map(s=>{const u=s[0];return[u.index[0],u.index[1],u.index[1]+s.length]}),o=e.update(i);return o.cache(),o.sweep(sf),e.uncache(),e.unfreeze(),e},lP=e=>e.compute(["freeze","lexicon","preTagger","postTagger","unfreeze"]),cP={postTagger:uP,tagger:lP},fP=e=>Math.round(e*100)/100;function mP(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:fP(t/r)},e.prototype.tagger=function(){return this.compute(["tagger"])}}const dP={api:mP,compute:cP,model:sP,hooks:["postTagger"]},hP=function(e){return Object.keys(e.hooks).filter(t=>!t.startsWith("#")&&!t.startsWith("%"))},pP=function(e,t){const r=hP(t);if(r.length===0)return e;e._cache||e.cache();const n=e._cache;return e.filter((a,i)=>r.some(o=>n[i].has(o)))},gP=function(e,t){let r=t;typeof t=="string"&&(r=this.buildNet([{match:t}]));const n=this.tokenize(e),a=pP(n,r);return a.found?(a.compute(["index","tagger"]),a.match(t)):n.none()},vP={lib:{lazy:gP}},yP=function(e,t){const r=e.methods.two.transform.verb.conjugate,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},bP=function(e,t){let r=t;return e.forEach(n=>{n.has("#Infinitive")||(r=yP(n,t)),n.replaceWith(r)}),e},wP=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})},xP=function(e,t){const{toAdverb:r}=e.methods.two.transform.adjective,a=r(t);a&&e.replaceWith(a)},DP=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)},NP=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")?bP(a,t):a.has("#Noun")?wP(a,t):a.has("#Adverb")?xP(a,t):a.has("#Adjective")?DP(a,t):this},AP=function(e){e.prototype.swap=NP},CP={api:AP};tt.plugin(eF);tt.plugin(FF);tt.plugin(dP);tt.plugin(vP);tt.plugin(CP);const bo=function(e){const{fromComparative:t,fromSuperlative:r}=e.methods.two.transform.adjective,n=e.text("normal");return e.has("#Comparative")?t(n,e.model):e.has("#Superlative")?r(n,e.model):n},EP=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=>{const l=u.toView().json(n)[0]||{},c=bo(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=>{const l=bo(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=>{const o=bo(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=>{const o=bo(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=>{const o=bo(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=>{const o=bo(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)}},SP={api:EP},TP=function(e){return e.compute("root").text("root")},MP=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=>{const i=TP(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=>{const 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)}},FP={api:MP},PP=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)},kP=function(e){let t=e.parentheses();return t=t.filter(r=>r.wordCount()>=3&&r.has("#Verb")&&r.has("#Noun")),e.splitOn(t)},OP=function(e){let t=e.quotations();return t=t.filter(r=>r.wordCount()>=3&&r.has("#Verb")&&r.has("#Noun")),e.splitOn(t)},$P=function(e){let t=this;t=kP(t),t=OP(t),t=PP(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)");const r=t.match("#Verb .* [but] .* #Verb",0);r.found&&(t=t.splitBefore(r));const n=t.if("if .{2,9} then .").match("then");return t=t.splitBefore(n),typeof e=="number"&&(t=t.get(e)),t},BP=function(e){const t=[];let 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)},_P=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){const a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.chunks=function(r){let n=BP(this);return n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.clauses=$P},Lp={this:"Noun",then:"Pivot"},IP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){const n=e[t][r];if(Lp.hasOwnProperty(n.normal)===!0){n.chunk=Lp[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}}},zP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){const n=e[t][r];if(n.chunk)continue;const 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}}}},jP=[{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 uf=null;const qP=function(e,t,r){const{methods:n}=r;uf=uf||n.one.buildNet(jP,r),e.sweep(uf)},lf=function(e,t){if((typeof process>"u"||!process.env?self.env||{}:process.env).DEBUG_CHUNKS){const n=(e.normal+"'").padEnd(8);console.log(` | '${n} → \x1B[34m${t.padEnd(12)}\x1B[0m \x1B[2m -fallback- \x1B[0m`)}e.chunk=t},RP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){const n=e[t][r];n.chunk===void 0&&(n.tags.has("Conjunction")||n.tags.has("Preposition")?lf(n,"Pivot"):n.tags.has("Adverb")?lf(n,"Verb"):n.chunk="Noun")}},LP=function(e){const t=[];let r=null;e.forEach(n=>{for(let a=0;a<n.length;a+=1){const 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))})},HP=function(e){const{document:t,world:r}=e;IP(t),zP(t),qP(e,t,r),RP(t),LP(t)},GP={chunks:HP},VP={compute:GP,api:_P,hooks:["chunks"]},$u=/\./g,UP=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($u,""),a.normal=a.normal.replace($u,"")})}),this}addPeriods(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace($u,""),a.normal=a.normal.replace($u,""),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)}},Gw=/\(/,Vw=/\)/,WP=function(e,t){for(;t<e.length;t+=1)if(e[t].post&&Vw.test(e[t].post)){let[,r]=e[t].index;return r=r||0,r}return null},JP=function(e){const t=[];return e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1){const a=r[n];if(a.pre&&Gw.test(a.pre)){const i=WP(r,n);if(i!==null){const[o,s]=r[n].index;t.push([o,s,i+1,r[n].id]),n=i}}}}),e.update(t)},KP=function(e){return e.docs.forEach(t=>{t[0].pre=t[0].pre.replace(Gw,"");const r=t[t.length-1];r.post=r.post.replace(Vw,"")}),e},YP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return KP(this)}}e.prototype.parentheses=function(r){let n=JP(this);return n=n.getNth(r),new t(n.document,n.pointer)}},Hp=/'s$/,ZP=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(Hp,""),a.normal=a.normal.replace(Hp,"")})}),this}}e.prototype.possessives=function(r){let n=ZP(this);return n=n.getNth(r),new t(n.document,n.pointer)}},ql={'"':'"',""":""","'":"'","“":"”","‘":"’","‟":"”","‛":"’","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","`":"´","〟":"〞"},bd=RegExp("["+Object.keys(ql).join("")+"]"),XP=RegExp("["+Object.values(ql).join("")+"]"),ek=function(e,t){const r=e[t].pre.match(bd)[0]||"";if(!r||!ql[r])return null;const n=ql[r];for(;t<e.length;t+=1)if(e[t].post&&e[t].post.match(n))return t;return null},tk=function(e){const t=[];return e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1){const a=r[n];if(a.pre&&bd.test(a.pre)){const i=ek(r,n);if(i!==null){const[o,s]=r[n].index;t.push([o,s,i+1,r[n].id]),n=i}}}}),e.update(t)},rk=function(e){e.docs.forEach(t=>{t[0].pre=t[0].pre.replace(bd,"");const r=t[t.length-1];r.post=r.post.replace(XP,"")})},nk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return rk(this)}}e.prototype.quotations=function(r){let n=tk(this);return n=n.getNth(r),new t(n.document,n.pointer)}},ak=function(e){let t=this.splitAfter("@hasComma");return t=t.match("#PhoneNumber+"),t=t.getNth(e),t},ik=[["hyphenated","@hasHyphen ."],["hashTags","#HashTag"],["emails","#Email"],["emoji","#Emoji"],["emoticons","#Emoticon"],["atMentions","#AtMention"],["urls","#Url"],["conjunctions","#Conjunction"],["prepositions","#Preposition"],["abbreviations","#Abbreviation"],["honorifics","#Honorific"]],ok=[["emojis","emoji"],["atmentions","atMentions"]],sk=function(e){ik.forEach(t=>{e.prototype[t[0]]=function(r){const n=this.match(t[1]);return typeof r=="number"?n.get(r):n}}),e.prototype.phoneNumbers=ak,ok.forEach(t=>{e.prototype[t[0]]=e.prototype[t[1]]})},uk=/\//,lk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Slashes"}split(){return this.map(n=>{const i=n.text().split(uk);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)}},ck={api:function(e){UP(e),YP(e),QP(e),nk(e),sk(e),lk(e)}},Bu=function(e,t){e.docs.forEach(r=>{r.forEach(t)})},Gp={case:e=>{Bu(e,t=>{t.text=t.text.toLowerCase()})},unicode:e=>{const t=e.world,r=t.methods.one.killUnicode;Bu(e,n=>n.text=r(n.text,t))},whitespace:e=>{Bu(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=>{Bu(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,"?")});const t=e.docs,r=t[t.length-1];if(r&&r.length>0){const 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}},cf=e=>e.split("|").reduce((t,r)=>(t[r]=!0,t),{}),ff="unicode|punctuation|whitespace|acronyms",Vp="|case|contractions|parentheses|quotations|emoji|honorifics|debullet",fk="|possessives|adverbs|nouns|verbs",mk={light:cf(ff),medium:cf(ff+Vp),heavy:cf(ff+Vp+fk)};function dk(e){e.prototype.normalize=function(t="light"){return typeof t=="string"&&(t=mk[t]),Object.keys(t).forEach(r=>{Gp.hasOwnProperty(r)&&Gp[r](this,t[r])}),this}}const hk={api:dk},pk=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},Up=["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"],gk=function(e){if(e.before("#Preposition$").found)return!0;if(!e.before().found)return!1;for(let r=0;r<Up.length;r+=1)if(e.has(Up[r]))return!0;return!1},vk="(#Pronoun|#Place|#Value|#Person|#Uncountable|#Month|#WeekDay|#Holiday|#Possessive)",yk=function(e,t){if(e.has("#Plural")||e.has("#Noun and #Noun")||e.has("(we|they)"))return!0;if(t.has(vk)===!0||e.has("#Singular"))return!1;const r=t.text("normal");return r.length>3&&r.endsWith("s")&&!r.endsWith("ss")},bk=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},Qa=function(e){const t=bk(e);return{determiner:e.match("#Determiner").eq(0),adjectives:e.match("#Adjective"),number:e.values(),isPlural:yk(e,t),isSubordinate:gk(e),root:t}},Wp=e=>e.text(),wk=e=>e.json({terms:!1,normal:!0}).map(t=>t.normal),xk=function(e){if(!e.found)return null;const r=e.values(0);return r.found?(r.parse()[0]||{}).num:null},Dk=function(e){const t=Qa(e);return{root:Wp(t.root),number:xk(t.number),determiner:Wp(t.determiner),adjectives:wk(t.adjectives),isPlural:t.isPlural,isSubordinate:t.isSubordinate}},Uw=function(e){return!e.has("^(#Uncountable|#ProperNoun|#Place|#Pronoun|#Acronym)+$")},Nk={tags:!0},Ak=function(e,t){if(t.isPlural===!0||(t.root.has("#Possessive")&&(t.root=t.root.possessives().strip()),!Uw(t.root)))return e;const{methods:r,model:n}=e.world,{toPlural:a}=r.two.transform.noun,i=t.root.text({keepPunct:!1}),o=a(i,n);e.match(t.root).replaceWith(o,Nk).tag("Plural","toPlural"),t.determiner.has("(a|an)")&&e.remove(t.determiner);const 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},Ck={tags:!0},Ek=function(e,t){if(t.isPlural===!1)return e;const{methods:r,model:n}=e.world,{toSingular:a}=r.two.transform.noun,i=t.root.text("normal"),o=a(i,n);return e.replace(t.root,o,Ck).tag("Singular","toPlural"),e},Sk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Nouns"}parse(n){return this.getNth(n).map(Qa)}json(n){const a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{const o=i.toView().json(a)[0]||{};return a&&a.noun!==!1&&(o.noun=Dk(i)),o},[])}conjugate(n){const a=this.world.methods.two.transform.noun;return this.getNth(n).map(i=>{const o=Qa(i),s=o.root.compute("root").text("root"),u={Singular:s};return Uw(o.root)&&(u.Plural=a.toPlural(s,this.model)),u.Singular===u.Plural&&delete u.Plural,u},[])}isPlural(n){return this.filter(i=>Qa(i).isPlural).getNth(n)}isSingular(n){return this.filter(i=>!Qa(i).isPlural).getNth(n)}adjectives(n){let a=this.update([]);return this.forEach(i=>{const o=Qa(i).adjectives;o.found&&(a=a.concat(o))}),a.getNth(n)}toPlural(n){return this.getNth(n).map(a=>Ak(a,Qa(a)))}toSingular(n){return this.getNth(n).map(a=>{const i=Qa(a);return Ek(a,i)})}update(n){const a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.nouns=function(r){let n=pk(this);return n=n.getNth(r),new t(this.document,n.pointer)}},Tk={api:Sk},Mk=function(e,t){let r=e.match("#Fraction+");return r=r.filter(n=>!n.lookBehind("#Value and$").found),r=r.notIf("#Value seconds"),r},Fk=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}},ir={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}},Pk=(e,t)=>{if(ir.ones.hasOwnProperty(e)){if(t.ones||t.teens)return!1}else if(ir.teens.hasOwnProperty(e)){if(t.ones||t.teens||t.tens)return!1}else if(ir.tens.hasOwnProperty(e)&&(t.ones||t.teens||t.tens))return!1;return!0},kk=function(e){let t="0.";for(let r=0;r<e.length;r++){const n=e[r];if(ir.ones.hasOwnProperty(n)===!0)t+=ir.ones[n];else if(ir.teens.hasOwnProperty(n)===!0)t+=ir.teens[n];else if(ir.tens.hasOwnProperty(n)===!0)t+=ir.tens[n];else if(/^[0-9]$/.test(n)===!0)t+=n;else return 0}return parseFloat(t)},Ok=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),$k=/^([0-9,. ]+)\/([0-9,. ]+)$/,Jp={"a few":3,"a couple":2,"a dozen":12,"two dozen":24,zero:0},_u=e=>Object.keys(e).reduce((t,r)=>(t+=e[r],t),0),hm=function(e){if(Jp.hasOwnProperty(e)===!0)return Jp[e];if(e==="a"||e==="an")return 1;const t=Fk(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=Ok(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+=_u(n),a+=kk(o.slice(s+1,o.length)),a*=t.amount,a;const l=u.match($k);if(l){const c=parseFloat(l[1].replace(/[, ]/g,"")),f=parseFloat(l[2].replace(/[, ]/g,""));f&&(a+=c/f||0);continue}if(ir.tens.hasOwnProperty(u)&&n.ones&&Object.keys(n).length===1&&(a=n.ones*100,n={}),Pk(u,n)===!1)return null;if(/^[0-9.]+$/.test(u))n.ones=parseFloat(u);else if(ir.ones.hasOwnProperty(u)===!0)n.ones=ir.ones[u];else if(ir.teens.hasOwnProperty(u)===!0)n.teens=ir.teens[u];else if(ir.tens.hasOwnProperty(u)===!0)n.tens=ir.tens[u];else if(ir.multiples.hasOwnProperty(u)===!0){let c=ir.multiples[u];if(c===r)return null;if(c===100&&o[s+1]!==void 0){const f=o[s+1];ir.multiples[f]&&(c*=ir.multiples[f],s+=1)}r===null||c<r?(a+=(_u(n)||1)*c,r=c,n={}):(a+=_u(n),r=c,a=(a||1)*c,n={})}}return a+=_u(n),a*=t.amount,a*=i?-1:1,a===0&&Object.keys(n).length===0?null:a},Kp=/s$/,qs=function(e){const t=e.text("reduced");return hm(t)},Rl={half:2,halve:2,quarter:4},Bk=function(e){const 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},_k=function(e){const 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=qs(r),n=qs(n),!r||!n)?null:typeof r=="number"&&typeof n=="number"?{numerator:r,denominator:n}:null},Ik=function(e){const 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=qs(r);let a=n.text("reduced");return Kp.test(a)&&(a=a.replace(Kp,""),n=n.replaceWith(a)),Rl.hasOwnProperty(a)?n=Rl[a]:n=qs(n),typeof r=="number"&&typeof n=="number"?{numerator:r,denominator:n}:null},zk=function(e){const t=e.match("^#Ordinal$");return t.found!==!0?null:e.lookAhead("^of .")?{numerator:1,denominator:qs(t)}:null},jk=function(e){const t=e.text("reduced");return Rl.hasOwnProperty(t)?{numerator:1,denominator:Rl[t]}:null},qk=e=>{const t=Math.round(e*1e3)/1e3;return t===0&&e!==0?e:t},Sa=function(e){e=e.clone();const t=jk(e)||Bk(e)||_k(e)||Ik(e)||zk(e)||null;return t!==null&&t.numerator&&t.denominator&&(t.decimal=t.numerator/t.denominator,t.decimal=qk(t.decimal)),t},wd=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)})},Iu=[["ninety",90],["eighty",80],["seventy",70],["sixty",60],["fifty",50],["forty",40],["thirty",30],["twenty",20]],Yp=["","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Rk=[[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"]],Lk=function(e){let t=e;const r=[];return Rk.forEach(n=>{if(e>=n[0]){const a=Math.floor(t/n[0]);t-=a*n[0],a&&r.push({unit:n[1],count:a})}}),r},Hk=function(e){const t=[];if(e>100)return t;for(let r=0;r<Iu.length;r++)e>=Iu[r][1]&&(e-=Iu[r][1],t.push(Iu[r][0]));return Yp[e]&&t.push(Yp[e]),t},Gk=e=>{const t=["zero","one","two","three","four","five","six","seven","eight","nine"],r=[],a=wd(e).match(/\.([0-9]+)/);if(!a||!a[0])return r;r.push("point");const i=a[0].split("");for(let o=0;o<i.length;o++)r.push(t[i[o]]);return r},Rs=function(e){let t=e.num;if(t===0||t==="0")return"zero";t>1e21&&(t=wd(t));let r=[];t<0&&(r.push("minus"),t=Math.abs(t));const n=Lk(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(Hk(n[a].count)),r.push(i)}return r=r.concat(Gk(t)),r=r.filter(a=>a),r.length===0&&(r[0]=""),r.join(" ")},Vk=function(e){if(!e.numerator||!e.denominator)return"";const t=Rs({num:e.numerator}),r=Rs({num:e.denominator});return`${t} out of ${r}`},Zp={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"},Ww=e=>{const t=Rs(e).split(" "),r=t[t.length-1];return Zp.hasOwnProperty(r)?t[t.length-1]=Zp[r]:t[t.length-1]=r.replace(/y$/,"i")+"th",t.join(" ")},Uk=function(e){if(!e.numerator||!e.denominator)return"";const t=Rs({num:e.numerator});let r=Ww({num:e.denominator});return e.denominator===2&&(r="half"),t&&r?(e.numerator!==1&&(r+="s"),`${t} ${r}`):""},Wk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Fractions"}parse(n){return this.getNth(n).map(Sa)}get(n){return this.getNth(n).map(Sa)}json(n){return this.getNth(n).map(a=>{const i=a.toView().json(n)[0],o=Sa(a);return i.fraction=o,i},[])}toDecimal(n){return this.getNth(n).forEach(a=>{const{decimal:i}=Sa(a);a=a.replaceWith(String(i),!0),a.tag("NumericValue"),a.unTag("Fraction")}),this}toFraction(n){return this.getNth(n).forEach(a=>{const i=Sa(a);if(i&&typeof i.numerator=="number"&&typeof i.denominator=="number"){const o=`${i.numerator}/${i.denominator}`;this.replace(a,o)}}),this}toOrdinal(n){return this.getNth(n).forEach(a=>{const i=Sa(a);let o=Uk(i);a.after("^#Noun").found&&(o+=" of"),a.replaceWith(o)}),this}toCardinal(n){return this.getNth(n).forEach(a=>{const i=Sa(a),o=Vk(i);a.replaceWith(o)}),this}toPercentage(n){return this.getNth(n).forEach(a=>{const{decimal:i}=Sa(a);let o=i*100;o=Math.round(o*100)/100,a.replaceWith(`${o}%`)}),this}}e.prototype.fractions=function(r){let n=Mk(this);return n=n.getNth(r),new t(this.document,n.pointer)}},Jk="one|two|three|four|five|six|seven|eight|nine",Ka="twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|fourty",Kk="eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen",mf=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("("+Ka+") #Cardinal #Cardinal")&&(t=t.splitAfter("("+Ka+") #Cardinal")),t.has("#Value #Value")){t.has("#NumericValue #NumericValue")&&(t=t.splitOn("#Year")),t.has("("+Ka+") ("+Kk+")")&&(t=t.splitAfter("("+Ka+")"));const r=t.match("#Cardinal #Cardinal");if(r.found&&!t.has("(point|decimal|#Fraction)")&&!r.has("#Cardinal (#Multiple|point|decimal)")){const n=t.has(`(${Jk}) (${Ka})`),a=r.has("("+Ka+") #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("("+Ka+") #Ordinal")||(t=t.splitAfter("#Ordinal"))),t=t.splitBefore("#Ordinal [#Cardinal]",0),t.has("#TextValue #NumericValue")&&!t.has("("+Ka+"|#Multiple)")&&(t=t.splitBefore("#TextValue #NumericValue"))}return t=t.splitAfter("#NumberRange"),t=t.splitBefore("#Year"),t},Yk=function(e,t){e=e.replace(/,/g,"");const r=e.split(/([0-9.,]*)/);let[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},Tr=function(e){if(typeof e=="string")return{num:hm(e)};let t=e.text("reduced");const 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")){const s=Yk(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=Sa(a),e=e.not(a),e=e.not("and$"),t=e.text("reduced"));let o=0;return t&&(o=hm(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}},Zk=function(e){const t=e.num;if(!t&&t!==0)return null;const r=t%100;if(r>10&&r<20)return String(t)+"th";const n={0:"th",1:"st",2:"nd",3:"rd"};let a=wd(t);const i=a.slice(a.length-1,a.length);return n[i]?a+=n[i]:a+="th",a},Qp={"¢":"cents",$:"dollars","£":"pounds","¥":"yen","€":"euros","₡":"colón","฿":"baht","₭":"kip","₩":"won","₹":"rupees","₽":"ruble","₺":"liras"},Xp={"%":"percent","°":"degrees"},eg=function(e){const t={suffix:"",prefix:e.prefix};return Qp.hasOwnProperty(e.prefix)&&(t.suffix+=" "+Qp[e.prefix],t.prefix=""),Xp.hasOwnProperty(e.suffix)&&(t.suffix+=" "+Xp[e.suffix]),t.suffix&&e.num===1&&(t.suffix=t.suffix.replace(/s$/,"")),!t.suffix&&e.suffix&&(t.suffix+=" "+e.suffix),t},ki=function(e,t){if(t==="TextOrdinal"){const{prefix:n,suffix:a}=eg(e);return n+Ww(e)+a}if(t==="Ordinal")return e.prefix+Zk(e)+e.suffix;if(t==="TextCardinal"){const{prefix:n,suffix:a}=eg(e);return n+Rs(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]",Xk=function(e){if(typeof e=="string"||typeof e=="number"){const t={};return t[e]=!0,t}return Qk(e)?e.reduce((t,r)=>(t[r]=!0,t),{}):e||{}},eO=function(e,t={}){return t=Xk(t),e.filter(r=>{const{unit:n}=Tr(r);return!!(n&&t[n]===!0)})},tO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Numbers"}parse(n){return this.getNth(n).map(Tr)}get(n){return this.getNth(n).map(Tr).map(a=>a.num)}json(n){const a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{const o=i.toView().json(a)[0],s=Tr(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 eO(this,n)}isOrdinal(){return this.if("#Ordinal")}isCardinal(){return this.if("#Cardinal")}toNumber(){const n=this.map(a=>{if(!this.has("#TextValue"))return a;const i=Tr(a);if(i.num===null)return a;const o=a.has("#Ordinal")?"Ordinal":"Cardinal",s=ki(i,o);return a.replaceWith(s,{tags:!0}),a.tag("NumericValue")});return new t(n.document,n.pointer)}toLocaleString(){return this.forEach(a=>{const i=Tr(a);if(i.num===null)return;let o=i.num.toLocaleString();if(a.has("#Ordinal")){const u=ki(i,"Ordinal").match(/[a-z]+$/);u&&(o+=u[0]||"")}a.replaceWith(o,{tags:!0})}),this}toText(){const a=this.map(i=>{if(i.has("#TextValue"))return i;const o=Tr(i);if(o.num===null)return i;const s=i.has("#Ordinal")?"TextOrdinal":"TextCardinal",u=ki(o,s);return i.replaceWith(u,{tags:!0}),i.tag("TextValue"),i});return new t(a.document,a.pointer)}toCardinal(){const a=this.map(i=>{if(!i.has("#Ordinal"))return i;const o=Tr(i);if(o.num===null)return i;const s=i.has("#TextValue")?"TextCardinal":"Cardinal",u=ki(o,s);return i.replaceWith(u,{tags:!0}),i.tag("Cardinal"),i});return new t(a.document,a.pointer)}toOrdinal(){const a=this.map(i=>{if(i.has("#Ordinal"))return i;const o=Tr(i);if(o.num===null)return i;const s=i.has("#TextValue")?"TextOrdinal":"Ordinal",u=ki(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=>Tr(a).num===n)}greaterThan(n){return this.filter(a=>Tr(a).num>n)}lessThan(n){return this.filter(a=>Tr(a).num<n)}between(n,a){return this.filter(i=>{const o=Tr(i).num;return o>n&&o<a})}set(n){if(n===void 0)return this;typeof n=="string"&&(n=Tr(n).num);const i=this.map(o=>{const s=Tr(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=ki(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=Tr(n).num);const i=this.map(o=>{const s=Tr(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");const l=ki(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){const 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=mf(this);return n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.percentages=function(r){let n=mf(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=mf(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},rO=function(e){Wk(e),tO(e)},nO={api:rO},aO={people:!0,emails:!0,phoneNumbers:!0,places:!0},iO=function(e={}){return e=Object.assign({},aO,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},oO={api:function(e){e.prototype.redact=iO}},sO=function(e){const 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)$"))},uO=function(e){const t=/\?/,{document:r}=e;return e.filter(n=>{const a=n.docs[0]||[],i=a[a.length-1];return!i||r[i.index[0]].length!==a.length?!1:t.test(i.post)?!0:sO(n)})},lO="(after|although|as|because|before|if|since|than|that|though|when|whenever|where|whereas|wherever|whether|while|why|unless|until|once)",cO="(that|which|whichever|who|whoever|whom|whose|whomever)",fO=function(e){let t=e;return t.length===1||(t=t.if("#Verb"),t.length===1)||(t=t.ifNo(lO),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(cO),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))},mO=function(e){let t=null;return e.has("#PastTense")?t="PastTense":e.has("#FutureTense")?t="FutureTense":e.has("#PresentTense")&&(t="PresentTense"),{tense:t}},Oi=function(e){const t=e.clauses(),n=fO(t).chunks();let 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:mO(i)}},dO=function(e){let t=e.verbs();const 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");const n=e.match("to #Verb+ #Conjunction #Verb").terms();t=t.not(n),t.found&&t.verbs().toPastTense()}return e},hO=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},pO=function(e){let t=e.verbs();if(t.eq(0).toFutureTense(),e=e.fullSentence(),t=e.verbs(),t.length>1){t=t.slice(1);const 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},gO=function(e){return e.verbs().first().toNegative().compute("chunks"),e},vO=function(e){return e.verbs().first().toPositive().compute("chunks"),e},yO=function(e){return e.verbs().toInfinitive(),e},bO=function(e){class t extends e{constructor(a,i,o){super(a,i,o),this.viewType="Sentences"}json(a={}){return this.map(i=>{const o=i.toView().json(a)[0]||{},{subj:s,verb:u,pred:l,grammar:c}=Oi(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=>(Oi(i),dO(i)))}toPresentTense(a){return this.getNth(a).map(i=>(Oi(i),hO(i)))}toFutureTense(a){return this.getNth(a).map(i=>(Oi(i),i=pO(i),i))}toInfinitive(a){return this.getNth(a).map(i=>(Oi(i),yO(i)))}toNegative(a){return this.getNth(a).map(i=>(Oi(i),gO(i)))}toPositive(a){return this.getNth(a).map(i=>(Oi(i),vO(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){const 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 uO(this).getNth(n)}};Object.assign(e.prototype,r)},wO={api:bO},xO=function(e){let t=e.splitAfter("@hasComma");t=t.match("#Honorific+? #Person+");const r=t.match("#Possessive").notIf("(his|her)");return t=t.splitAfter(r),t},tg=function(e){const t={};t.firstName=e.match("#FirstName+"),t.lastName=e.match("#LastName+"),t.honorific=e.match("#Honorific+");const r=t.lastName,n=t.firstName;return(!n.found||!r.found)&&!n.found&&!r.found&&e.has("^#Honorific .$")&&(t.lastName=e.match(".$")),t},Mn="male",Vr="female",rg={mr:Mn,mrs:Vr,miss:Vr,madam:Vr,king:Mn,queen:Vr,duke:Mn,duchess:Vr,baron:Mn,baroness:Vr,count:Mn,countess:Vr,prince:Mn,princess:Vr,sire:Mn,dame:Vr,lady:Vr,ayatullah:Mn,congressman:Mn,congresswoman:Vr,"first lady":Vr,mx:null},DO=function(e,t){const{firstName:r,honorific:n}=e;if(r.has("#FemaleName"))return Vr;if(r.has("#MaleName"))return Mn;if(n.found){let i=n.text("normal");if(i=i.replace(/\./g,""),rg.hasOwnProperty(i))return rg[i];if(/^her /.test(i))return Vr;if(/^his /.test(i))return Mn}const a=t.after();if(!a.has("#Person")&&a.has("#Pronoun")){const i=a.match("#Pronoun");if(i.has("(they|their)"))return null;const o=i.has("(he|his)"),s=i.has("(she|her|hers)");if(o&&!s)return Mn;if(s&&!o)return Vr}return null},NO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="People"}parse(n){return this.getNth(n).map(tg)}json(n){const a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{const o=i.toView().json(a)[0],s=tg(i);return o.person={firstName:s.firstName.text("normal"),lastName:s.lastName.text("normal"),honorific:s.honorific.text("normal"),presumed_gender:DO(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){const a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.people=function(r){let n=xO(this);return n=n.getNth(r),new t(this.document,n.pointer)}},AO=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},CO=function(e){e.prototype.places=function(t){let r=AO(this);return r=r.getNth(t),new e(this.document,r.pointer)}},EO=function(e){e.prototype.organizations=function(t){return this.match("#Organization+").getNth(t)}},SO=function(e){const t=this.clauses();let 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},TO=function(e){e.prototype.topics=SO},MO=function(e){NO(e),CO(e),EO(e),TO(e)},FO={api:MO},PO=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},kO=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},OO=function(e,t){const r={pre:e.none(),post:e.none()};if(!e.has("#Adverb"))return r;const 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)},$O=function(e,t){const r=e.splitBefore(t);if(r.length<=1)return e.none();let n=r.eq(0);return n=n.not("(#Adverb|#Negative|#Prefix)"),n},BO=function(e){return e.match("#Negative")},_O=function(e){if(!e.has("(#Particle|#PhrasalVerb)"))return{verb:e.none(),particle:e.none()};const t=e.match("#Particle$");return{verb:e.not(t),particle:t}},Un=function(e){const t=e.clone();t.contractions().expand();const r=kO(t);return{root:r,prefix:t.match("#Prefix"),adverbs:OO(t,r),auxiliary:$O(t,r),negative:BO(t),phrasal:_O(r)}},Hn={tense:"PresentTense"},zu={conditional:!0},Da={tense:"FutureTense"},wo={progressive:!0},yr={tense:"PastTense"},xo={complete:!0,progressive:!1},Ya={passive:!0},IO={plural:!0},zO={plural:!1},jO=function(e){const t={};return e.forEach(r=>{Object.assign(t,r)}),t},ng={imperative:[["#Imperative",[]]],"want-infinitive":[["^(want|wants|wanted) to #Infinitive$",[Hn]],["^wanted to #Infinitive$",[yr]],["^will want to #Infinitive$",[Da]]],"gerund-phrase":[["^#PastTense #Gerund$",[yr]],["^#PresentTense #Gerund$",[Hn]],["^#Infinitive #Gerund$",[Hn]],["^will #Infinitive #Gerund$",[Da]],["^have #PastTense #Gerund$",[yr]],["^will have #PastTense #Gerund$",[yr]]],"simple-present":[["^#PresentTense$",[Hn]],["^#Infinitive$",[Hn]]],"simple-past":[["^#PastTense$",[yr]]],"simple-future":[["^will #Adverb? #Infinitive",[Da]]],"present-progressive":[["^(is|are|am) #Gerund$",[Hn,wo]]],"past-progressive":[["^(was|were) #Gerund$",[yr,wo]]],"future-progressive":[["^will be #Gerund$",[Da,wo]]],"present-perfect":[["^(has|have) #PastTense$",[yr,xo]]],"past-perfect":[["^had #PastTense$",[yr,xo]],["^had #PastTense to #Infinitive",[yr,xo]]],"future-perfect":[["^will have #PastTense$",[Da,xo]]],"present-perfect-progressive":[["^(has|have) been #Gerund$",[yr,wo]]],"past-perfect-progressive":[["^had been #Gerund$",[yr,wo]]],"future-perfect-progressive":[["^will have been #Gerund$",[Da,wo]]],"passive-past":[["(got|were|was) #Passive",[yr,Ya]],["^(was|were) being #Passive",[yr,Ya]],["^(had|have) been #Passive",[yr,Ya]]],"passive-present":[["^(is|are|am) #Passive",[Hn,Ya]],["^(is|are|am) being #Passive",[Hn,Ya]],["^has been #Passive",[Hn,Ya]]],"passive-future":[["will have been #Passive",[Da,Ya,zu]],["will be being? #Passive",[Da,Ya,zu]]],"present-conditional":[["would be #PastTense",[Hn,zu]]],"past-conditional":[["would have been #PastTense",[yr,zu]]],"auxiliary-future":[["(is|are|am|was) going to (#Infinitive|#PresentTense)",[Da]]],"auxiliary-past":[["^did #Infinitive$",[yr,zO]],["^used to #Infinitive$",[yr,xo]]],"auxiliary-present":[["^(does|do) #Infinitive$",[Hn,xo,IO]]],"modal-past":[["^(could|must|should|shall) have #PastTense$",[yr]]],"modal-infinitive":[["^#Modal #Infinitive$",[]]],infinitive:[["^#Infinitive$",[]]]},pm=[];Object.keys(ng).map(e=>{ng[e].forEach(t=>{pm.push({name:e,match:t[0],data:jO(t[1])})})});const qO=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},RO=function(e){return!!(e.has("#Infinitive")&&e.growLeft("to").has("^to #Infinitive"))},Ta=function(e,t){const r={};e=qO(e,t);for(let n=0;n<pm.length;n+=1){const a=pm[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=RO(e),r},ag=function(e){return e.length<=1?!1:(e.parse()[0]||{}).isSubordinate},LO=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},HO=function(e){let t=e.before();t=LO(t);const r=t.nouns();let n=r.last();const 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(),ag(n)&&(r.remove(n),n=r.last()),ag(n)&&(r.remove(n),n=r.last()),n)},GO=function(e,t){return t.has("(are|were|does)")||e.has("(those|they|we)")?!0:e.found&&e.isPlural?e.isPlural().found:!1},fa=function(e){const t=HO(e);return{subject:t,plural:GO(t,e)}},Lt=e=>e,ks=(e,t)=>{const r=fa(e),n=r.subject;return n.has("i")||n.has("we")?!0:r.plural},VO=(e,t)=>{const{subject:r,plural:n}=fa(e);return n||r.has("we")?"were":"was"},Os=function(e,t){if(e.has("were"))return"are";const{subject:r,plural:n}=fa(e);return r.has("i")?"am":r.has("we")||n?"are":"is"},xd=function(e,t){const r=fa(e),n=r.subject;return n.has("i")||n.has("we")||r.plural?"do":"does"},vn=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"},gm=function(e,t){const{toInfinitive:r}=e.methods.two.transform.verb;let n=t.root.text({keepPunct:!1});return n=r(n,e.model,vn(e)),n&&e.replace(t.root,n),e},ig=e=>e.has("will not")?e.replace("will not","have not"):e.remove("will"),og=function(e){if(!e||!e.isView)return[];const t={normal:!0,terms:!1,text:!1};return e.json(t).map(r=>r.normal)},sg=function(e){return!e||!e.isView?"":e.text("normal")},UO=function(e){const{toInfinitive:t}=e.methods.two.transform.verb,r=e.text("normal");return t(r,e.model,vn(e))},WO=function(e){const t=Un(e);e=e.clone().toView();const r=Ta(e,t);return{root:t.root.text(),preAdverbs:og(t.adverbs.pre),postAdverbs:og(t.adverbs.post),auxiliary:sg(t.auxiliary),negative:t.negative.found,prefix:sg(t.prefix),infinitive:UO(t.root),grammar:r}},JO={tags:!0},KO=function(e,t){const{toInfinitive:r}=e.methods.two.transform.verb,{root:n,auxiliary:a}=t,i=a.terms().harden();let o=n.text("normal");if(o=r(o,e.model,vn(n)),o&&e.replace(n,o,JO).tag("Verb").firstTerm().tag("Infinitive"),i.found&&e.remove(i),t.negative.found){e.has("not")||e.prepend("not");const s=xd(e);e.prepend(s)}return e.fullSentence().compute(["freeze","lexicon","preTagger","postTagger","unfreeze","chunks"]),e},Tn={tags:!0},Ma={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,vn(a)),i=r(i,e.model).PastTense,i=i==="been"?"was":i,i==="was"&&(i=VO(e)),i&&e.replace(a,i,Tn),e},both:function(e,t){return t.negative.found?(e.replace("will","did"),e):(e=Ma.simple(e,t),e=Ma.noAux(e,t),e)},hasHad:e=>(e.replace("has","had",Tn),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,vn(a)),r(i,e.model).Participle}},ug={infinitive:Ma.simple,"simple-present":Ma.simple,"simple-past":Lt,"simple-future":Ma.both,"present-progressive":e=>(e.replace("are","were",Tn),e.replace("(is|are|am)","was",Tn),e),"past-progressive":Lt,"future-progressive":(e,t)=>(e.match(t.root).insertBefore("was"),e.remove("(will|be)"),e),"present-perfect":Ma.hasHad,"past-perfect":Lt,"future-perfect":(e,t)=>(e.match(t.root).insertBefore("had"),e.has("will")&&(e=ig(e)),e.remove("have"),e),"present-perfect-progressive":Ma.hasHad,"past-perfect-progressive":Lt,"future-perfect-progressive":e=>(e.remove("will"),e.replace("have","had",Tn),e),"passive-past":e=>(e.replace("have","had",Tn),e),"passive-present":e=>(e.replace("(is|are)","was",Tn),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",Tn),e.remove("will")),e),"present-conditional":e=>(e.replace("be","have been"),e),"past-conditional":Lt,"auxiliary-future":e=>(e.replace("(is|are|am)","was",Tn),e),"auxiliary-past":Lt,"auxiliary-present":e=>(e.replace("(do|does)","did",Tn),e),"modal-infinitive":(e,t)=>(e.has("can")?e.replace("can","could",Tn):(Ma.simple(e,t),e.match("#Modal").insertAfter("have").tag("Auxiliary")),e),"modal-past":Lt,"want-infinitive":e=>(e.replace("(want|wants)","wanted",Tn),e.remove("will"),e),"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),Ma.simple(e,t),ig(e),e)},YO=function(e,t,r){return ug.hasOwnProperty(r)&&(e=ug[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},vm=function(e,t){const r=fa(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"},ym=(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,vn(a));const s=r(o,e.model);if(o=s.Participle||s.PastTense,o){e=e.replace(a,o);const u=vm(e);e.prepend(u).match(u).tag("Auxiliary"),e.remove(i)}return e},lg={infinitive:ym,"simple-present":ym,"simple-future":(e,t)=>e.replace("will",vm(e)),"present-perfect":Lt,"past-perfect":Lt,"future-perfect":(e,t)=>e.replace("will have",vm(e)),"present-perfect-progressive":Lt,"past-perfect-progressive":Lt,"future-perfect-progressive":Lt},ZO=function(e,t,r){return lg.hasOwnProperty(r)?(e=lg[r](e,t),e.fullSentence().compute(["tagger","chunks"]),e):(e=ym(e,t),e.fullSentence().compute(["tagger","chunks"]),e)},Pa={tags:!0},Do=(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,vn(a)),ks(e)===!1&&(i=r(i,e.model).PresentTense),a.has("#Copula")&&(i=Os(e)),i&&(e=e.replace(a,i,Pa),e.not("#Particle").tag("PresentTense")),e},cg=(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,vn(a)),ks(e)===!1&&(i=r(i,e.model).Gerund),i&&(e=e.replace(a,i,Pa),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,vn(n)),a&&(e=e.replace(t.root,a,Pa)),e},fg={infinitive:Do,"simple-present":(e,t)=>{const{conjugate:r}=e.methods.two.transform.verb,{root:n}=t;if(n.has("#Infinitive")){const i=fa(e).subject;if(ks(e)||i.has("i"))return e;const o=n.text("normal"),s=r(o,e.model).PresentTense;o!==s&&e.replace(n,s,Pa)}else return Do(e,t);return e},"simple-past":Do,"simple-future":(e,t)=>{const{root:r,auxiliary:n}=t;if(n.has("will")&&r.has("be")){const a=Os(e);e.replace(r,a),e=e.remove("will"),e.replace("not "+a,a+" not")}else Do(e,t),e=e.remove("will");return e},"present-progressive":Lt,"past-progressive":(e,t)=>{const r=Os(e);return e.replace("(were|was)",r,Pa)},"future-progressive":e=>(e.match("will").insertBefore("is"),e.remove("be"),e.remove("will")),"present-perfect":(e,t)=>(Do(e,t),e=e.remove("(have|had|has)"),e),"past-perfect":(e,t)=>{const n=fa(e).subject;return ks(e)||n.has("i")?(e=gm(e,t),e.remove("had"),e):(e.replace("had","has",Pa),e)},"future-perfect":e=>(e.match("will").insertBefore("has"),e.remove("have").remove("will")),"present-perfect-progressive":Lt,"past-perfect-progressive":e=>e.replace("had","has",Pa),"future-perfect-progressive":e=>(e.match("will").insertBefore("has"),e.remove("have").remove("will")),"passive-past":(e,t)=>{const r=Os(e);return e.has("(had|have|has)")&&e.has("been")?(e.replace("(had|have|has)",r,Pa),e.replace("been","being"),e):e.replace("(got|was|were)",r)},"passive-present":Lt,"passive-future":e=>(e.replace("will","is"),e.replace("be","being")),"present-conditional":Lt,"past-conditional":e=>(e.replace("been","be"),e.remove("have")),"auxiliary-future":(e,t)=>(cg(e,t),e.remove("(going|to)"),e),"auxiliary-past":(e,t)=>{if(t.auxiliary.has("did")){const r=xd(e);return e.replace(t.auxiliary,r),e}return cg(e,t),e.replace(t.auxiliary,"is"),e},"auxiliary-present":Lt,"modal-infinitive":Lt,"modal-past":(e,t)=>(QO(e,t),e.remove("have")),"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),Do(e,t),e.remove("(will|have)")),"want-infinitive":(e,t)=>{let r="wants";return ks(e)&&(r="want"),e.replace("(want|wanted|wants)",r,Pa),e.remove("will"),e}},XO=function(e,t,r){return fg.hasOwnProperty(r)&&(e=fg[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},Jw={tags:!0},ju=(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,vn(n)),i&&(e=e.replace(n,i,Jw),e.not("#Particle").tag("Verb")),e.prepend("will").match("will").tag("Auxiliary"),e.remove(a),e},mg=(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,vn(a)),o&&(o=r(o,e.model).Gerund,e.replace(a,o,Jw),e.not("#Particle").tag("PresentTense")),e.remove(i),e.prepend("will be").match("will be").tag("Auxiliary"),e},dg={infinitive:ju,"simple-present":ju,"simple-past":ju,"simple-future":Lt,"present-progressive":mg,"past-progressive":mg,"future-progressive":Lt,"present-perfect":e=>(e.match("(have|has)").replaceWith("will have"),e),"past-perfect":e=>e.replace("(had|has)","will have"),"future-perfect":Lt,"present-perfect-progressive":e=>e.replace("has","will have"),"past-perfect-progressive":e=>e.replace("had","will have"),"future-perfect-progressive":Lt,"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":Lt,"present-conditional":e=>e.replace("would","will"),"past-conditional":e=>e.replace("would","will"),"auxiliary-future":Lt,"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":Lt,"modal-past":Lt,"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),ju(e,t),e.remove("(had|have)")),"want-infinitive":e=>(e.replace("(want|wants|wanted)","will want"),e)},e$=function(e,t,r){return e.has("will")||e.has("going to")||dg.hasOwnProperty(r)&&(e=dg[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},t$={tags:!0},r$=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,vn(a));const s=n(o,e.model).Gerund;if(s){const u=Os(e);e.replace(a,s,t$),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},hg={tags:!0},df=function(e,t){const r=xd(e);return e.prepend(r+" not"),e},El=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)},Sl=e=>e.has("(is|was|am|are|will|were|be)"),pg={"simple-present":(e,t)=>Sl(e)===!0?El(e):(e=gm(e,t),e=df(e),e),"simple-past":(e,t)=>Sl(e)===!0?El(e):(e=gm(e,t),e.prepend("did not"),e),imperative:e=>(e.prepend("do not"),e),infinitive:(e,t)=>Sl(e)===!0?El(e):df(e),"passive-past":e=>{if(e.has("got"))return e.replace("got","get",hg),e.prepend("did not"),e;const 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;const t=e.match("(did|does|do)");return t.found&&t.append("not"),e},"want-infinitive":(e,t)=>(e=df(e),e=e.replace("wants","want",hg),e)},n$=function(e,t,r){if(e.has("#Negative"))return e;if(pg.hasOwnProperty(r))return e=pg[r](e,t),e;let n=e.matchOne("be");return n.found?(n.prepend("not"),e):Sl(e)===!0?El(e):(n=e.matchOne("(will|had|have|has|did|does|do|#Modal)"),n.found&&n.append("not"),e)},a$=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Verbs"}parse(n){return this.getNth(n).map(Un)}json(n,a){return this.getNth(a).map(s=>{const u=s.toView().json(n)[0]||{};return u.verb=WO(s),u},[])}subjects(n){return this.getNth(n).map(a=>(Un(a),fa(a).subject))}adverbs(n){return this.getNth(n).map(a=>a.match("#Adverb"))}isSingular(n){return this.getNth(n).filter(a=>fa(a).plural!==!0)}isPlural(n){return this.getNth(n).filter(a=>fa(a).plural===!0)}isImperative(n){return this.getNth(n).filter(a=>a.has("#Imperative"))}toInfinitive(n){return this.getNth(n).map(a=>{const i=Un(a),o=Ta(a,i);return KO(a,i,o.form)})}toPresentTense(n){return this.getNth(n).map(a=>{const i=Un(a),o=Ta(a,i);return o.isInfinitive?a:XO(a,i,o.form)})}toPastTense(n){return this.getNth(n).map(a=>{const i=Un(a),o=Ta(a,i);return o.isInfinitive?a:YO(a,i,o.form)})}toFutureTense(n){return this.getNth(n).map(a=>{const i=Un(a),o=Ta(a,i);return o.isInfinitive?a:e$(a,i,o.form)})}toGerund(n){return this.getNth(n).map(a=>{const i=Un(a),o=Ta(a,i);return o.isInfinitive?a:r$(a,i,o.form)})}toPastParticiple(n){return this.getNth(n).map(a=>{const i=Un(a),o=Ta(a,i);return o.isInfinitive?a:ZO(a,i,o.form)})}conjugate(n){const{conjugate:a,toInfinitive:i}=this.world.methods.two.transform.verb;return this.getNth(n).map(o=>{const s=Un(o),u=Ta(o,s);u.form==="imperative"&&(u.form="simple-present");let l=s.root.text("normal");if(!s.root.has("#Infinitive")){const c=vn(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(){const n=this.match("do not #Verb");return n.found&&n.remove("do not"),this.remove("#Negative")}toNegative(n){return this.getNth(n).map(a=>{const i=Un(a),o=Ta(a,i);return n$(a,i,o.form)})}update(n){const 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=PO(this);return n=n.getNth(r),new t(this.document,n.pointer)}},i$={api:a$},bm=function(e,t){const r=t.match(e);if(r.found){const n=r.pronouns().refersTo();if(n.found)return n}return t.none()},gg=function(e){if(!e.found)return e;const[t]=e.fullPointer[0];return t&&t>0?e.update([[t-1]]):e.none()},o$=function(e,t){return t==="m"?e.filter(r=>!r.presumedFemale().found):t==="f"?e.filter(r=>!r.presumedMale().found):e},vg=function(e,t){let r=e.people();return r=o$(r,t),r.found||(r=e.nouns("#Actor"),r.found)?r.last():t==="f"?bm("(she|her|hers)",e):t==="m"?bm("(he|him|his)",e):e.none()},s$=function(e){const t=e.nouns();let r=t.isPlural().notIf("#Pronoun");if(r.found)return r.last();const n=bm("(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())},u$=function(e,t){if(t&&t.found){const r=e.docs[0][0];r.reference=t.ptrs[0]}},hf=function(e,t){let r=e.before(),n=t(r);return n.found||(r=gg(e),n=t(r),n.found)||(r=gg(r),n=t(r),n.found)?n:e.none()},l$=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=hf(r,a=>vg(a,"m")):r.has("(she|her|hers)")?n=hf(r,a=>vg(a,"f")):r.has("(they|their|theirs)")&&(n=hf(r,s$)),n&&n.found&&u$(r,n)})},c$=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();const a=n.docs[0][0];return a.reference?n.update([a.reference]):n.none()})}update(n){const 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)}},f$={compute:{coreference:l$},api:c$};tt.plugin(SP);tt.plugin(FP);tt.plugin(VP);tt.plugin(f$);tt.plugin(ck);tt.plugin(hk);tt.plugin(Tk);tt.plugin(nO);tt.plugin(oO);tt.plugin(wO);tt.plugin(FO);tt.plugin(i$);const m$=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},d$=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=m$(t),t=t.notIf("(#Money|#Percentage)"),t=t.notIf("^per #Duration"),t},h$={second:!0,minute:!0,hour:!0,day:!0,week:!0,weekend:!0,month:!0,season:!0,quarter:!0,year:!0},yg={wk:"week",min:"minute",sec:"second",weekend:"week"},pf=function(e){let t=e.match("#Duration").text("normal");return t=t.replace(/s$/,""),yg.hasOwnProperty(t)&&(t=yg[t]),t},p$=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=pf(a);h$[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=pf(r);t[a]=.5}if(r=n.match("a (few|couple) [#Duration]",0),r.found){let a=pf(r);t[a]=r.has("few")?3:2}return r=e.match("#DateShift+"),{result:t,m:r}},g$={minute:!0},v$=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 g$[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()}},y$=3600*1e3,bg=(e,t,r)=>{const[n,a]=e.split("/"),[i,o]=a.split(":");return Date.UTC(r,n-1,i,o)-t*y$},Kw=(e,t,r,n,a)=>{const i=new Date(e).getUTCFullYear(),o=bg(t,a,i),s=bg(r,n,i);return e>=o&&e<s},b$=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 Kw(e.epoch,i[0],i[1],n,a)===!0?n:a},wg={"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"},w$=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let Uo={};Object.keys(wg).forEach(e=>{let t=e.split("|"),r={offset:Number(t[0]),hem:t[1]};t[2]&&(r.dst=t[2]),wg[e].split(",").forEach(a=>{a=a.replace(/(^[0-9]+)\//,(i,o)=>(o=Number(o),w$[o]+"/")),Uo[a]=r})});Uo.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;Uo[r]={offset:e*-1,hem:"n"},r="utc/gmt"+t,Uo[r]={offset:e*-1,hem:"n"}}const x$="utc",D$=()=>{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},N$=()=>{let e=D$();return e===null?x$:e},A$=/(-?[0-9]+)h(rs)?/i,C$=/(-?[0-9]+)/,E$=/utc([\-+]?[0-9]+)/i,S$=/gmt([\-+]?[0-9]+)/i,qu=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(A$);if(t!==null||(t=e.match(E$),t!==null))return qu(t[1]);if(t=e.match(S$),t!==null){let r=Number(t[1])*-1;return qu(r)}return t=e.match(C$),t!==null?qu(t[1]):null};let Ru=N$();const xg=Object.keys(Uo).reduce((e,t)=>{let r=t.split("/")[1]||"";return r=r.replace(/_/g," "),e[r]=t,e},{}),M$=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),Ll=(e,t)=>{if(!e)return t.hasOwnProperty(Ru)||(console.warn(`Unrecognized IANA id '${Ru}'. Setting fallback tz to UTC.`),Ru="utc"),Ru;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=M$(r),t.hasOwnProperty(r)===!0))return r;if(xg.hasOwnProperty(r)===!0)return xg[r];if(/[0-9]/.test(r)===!0){let n=T$(r);if(n)return n}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function nu(e){return e%4===0&&e%100!==0||e%400===0}function Yw(e){return Object.prototype.toString.call(e)==="[object Date]"&&!isNaN(e.valueOf())}function F$(e){return Object.prototype.toString.call(e)==="[object Array]"}function ri(e){return Object.prototype.toString.call(e)==="[object Object]"}function P$(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function Ye(e,t=2){let r="0";return e=e+"",e.length>=t?e:new Array(t-e.length+1).join(r)+e}function k$(e){return e?e[0].toUpperCase()+e.substr(1):""}function Na(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 Ro(e){return e=String(e),e=e.replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function ao(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 xs(e){return typeof e=="number"?e:Yw(e)?e.getTime():e.epoch||e.epoch===0?e.epoch:null}function qi(e,t){return ri(e)===!1?t.clone().set(e):e}function Ms(e,t=""){const r=e>0?"+":"-",n=Math.abs(e),a=Ye(parseInt(""+n,10)),i=Ye(n%1*60);return`${r}${a}${t}${i}`}const wm={year:new Date().getFullYear(),month:0,date:1},O$=(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]]||wm[n[a]]||0;e=e[n[a]](i)}return e},$$=(e,t,r)=>{if(Object.keys(t).length===0)return e;t=Object.assign({},wm,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]||wm[i]||0;e=e[i](o)}return e},B$=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},_$={parseArray:O$,parseObject:$$,parseNumber:B$},$i=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach(t=>{typeof e[t]=="function"&&(e=e[t](e._today[t]))}),e},Hl={now:e=>$i(e),today:e=>$i(e),tonight:e=>(e=$i(e),e=e.hour(18),e),tomorrow:e=>(e=$i(e),e=e.add(1,"day"),e=e.startOf("day"),e),yesterday:e=>(e=$i(e),e=e.subtract(1,"day"),e=e.startOf("day"),e),christmas:e=>{let t=$i(e).year();return e=e.set([t,11,25,18,0,0]),e},"new years":e=>{let t=$i(e).year();return e=e.set([t,11,31,18,0,0]),e}};Hl["new years eve"]=Hl["new years"];const I$=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 Et={millisecond:1};Et.second=1e3;Et.minute=6e4;Et.hour=36e5;Et.day=864e5;Et.date=Et.day;Et.month=864e5*29.5;Et.week=6048e5;Et.year=3154e7;Object.keys(Et).forEach(e=>{Et[e+"s"]=Et[e]});const Lu=(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+=Et[n]*u,n==="day"&&Math.abs(u)>28&&t<28&&(e.epoch+=Et.hour),a!==null&&o!==e.d[a]()&&(e.epoch=s);const l=Et[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)},gf={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>Lu(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+=Et.day*(o*28),i!==e.d.getFullYear()&&(e.epoch=a);e.d.getMonth()<t;)e.epoch+=Et.day;for(;e.d.getMonth()>t;)e.epoch-=Et.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>Lu(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>Lu(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>Lu(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}}},Dt=(e,t)=>{let r=Object.keys(gf),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)),!gf[i].valid(o)){e.epoch=null,e.silent===!1&&console.warn("invalid "+i+": "+o);return}gf[i].walkTo(e,o)}},Qi=[31,28,31,30,31,30,31,31,30,31,30,31];let Ls=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],Hs=["january","february","march","april","may","june","july","august","september","october","november","december"];function z$(){const e={sep:8};for(let t=0;t<Ls.length;t++)e[Ls[t]]=t;for(let t=0;t<Hs.length;t++)e[Hs[t]]=t;return e}function Ds(){return Ls}function j$(){return Hs}function Zw(){return z$()}function q$(e){Ls=e.short||Ls,Hs=e.long||Hs}const Qw=(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},R$=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},Ur=(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(R$(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 Dg=Zw();const Wr=e=>{if(Qi.hasOwnProperty(e.month)!==!0)return!1;if(e.month===1)return nu(e.year)&&e.date<=29?!0:e.date<=28;let t=Qi[e.month]||0;return e.date<=t},$a=(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},li=function(e){return e=e.toLowerCase().trim(),e==="sept"?Dg.sep:Dg[e]},L$=[{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 Wr(r)===!1?(e.epoch=null,e):(Qw(e,t[5]),Dt(e,r),e=Ur(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),Wr(r)===!1?(e.epoch=null,e):(Dt(e,r),e=Ur(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:$a(t[1],e._today),month:li(t[2]),date:Ro(t[3]||"")};return Wr(r)===!1?(e.epoch=null,e):(Dt(e,r),e=Ur(e,t[4]),e)}}],H$=[{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:$a(t[3],e._today)||new Date().getFullYear()};return Wr(a)===!1?(e.epoch=null,e):(Dt(e,a),e=Ur(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:$a(t[3],e._today),month:li(t[1]),date:Ro(t[2]||"")};return Wr(r)===!1?(e.epoch=null,e):(Dt(e,r),e=Ur(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:$a(t[3],e._today),month:li(t[1]),date:Ro(t[2]||"")};return Wr(r)===!1?(e.epoch=null,e):(Dt(e,r),e=Ur(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:$a(o,e._today),month:li(r),date:Ro(n||"")};return Wr(s)===!1?(e.epoch=null,e):(Dt(e,s),e=Qw(e,i),e=Ur(e,a),e)}}],G$=[{reg:/^([0-9]{1,2})[-/]([a-z]+)[\-/]?([0-9]{4})?$/i,parse:(e,t)=>{let r={year:$a(t[3],e._today),month:li(t[2]),date:Ro(t[1]||"")};return Wr(r)===!1?(e.epoch=null,e):(Dt(e,r),e=Ur(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:$a(t[3],e._today),month:li(t[2]),date:Ro(t[1])};return!r.month||Wr(r)===!1?(e.epoch=null,e):(Dt(e,r),e=Ur(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:li(t[2]),year:Number(t[3])};return Wr(r)===!1?(e.epoch=null,e):(Dt(e,r),e=e.startOf("day"),e=Ur(e,t[4]),e)}}],V$=[{reg:/^([0-9]{4})[\-/]([0-9]{2})$/,parse:(e,t)=>{let r={year:t[1],month:parseInt(t[2],10)-1,date:1};return Wr(r)===!1?(e.epoch=null,e):(Dt(e,r),e=Ur(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let r={year:$a(t[2],e._today),month:li(t[1]),date:e._today.date||1};return Wr(r)===!1?(e.epoch=null,e):(Dt(e,r),e=Ur(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 Wr(a)===!1?(e.epoch=null,e):(Dt(e,a),e=Ur(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 Wr(a)===!1?(e.epoch=null,e):(Dt(e,a),e=Ur(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:$a(t[0],r),month:r.month||n.getMonth(),date:r.date||n.getDate()};return Wr(a)===!1?(e.epoch=null,e):(Dt(e,a),e=Ur(e),e)}}],vf=[].concat(L$,H$,G$,V$),U$=function(e,t,r){for(let n=0;n<vf.length;n++){let a=t.match(vf[n].reg);if(a){let i=vf[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:W$,parseObject:Ng,parseNumber:J$}=_$,Ag={year:new Date().getFullYear(),month:0,date:1},Xw=(e,t)=>{let r=e._today||Ag;if(typeof t=="number")return J$(e,t);if(e.epoch=Date.now(),e._today&&ri(e._today)&&Object.keys(e._today).length>0){let n=Ng(e,r,Ag);n.isValid()&&(e.epoch=n.epoch)}return t==null||t===""?e:Yw(t)===!0?(e.epoch=t.getTime(),e):F$(t)===!0?(e=W$(e,t,r),e):ri(t)===!0?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):(e=Ng(e,t,r),e):typeof t!="string"?e:(t=I$(t),Hl.hasOwnProperty(t)===!0?(e=Hl[t](e),e):U$(e,t))};let xm=["sun","mon","tue","wed","thu","fri","sat"],Dm=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function Gs(){return xm}function Gl(){return Dm}function K$(e){xm=e.short||xm,Dm=e.long||Dm}const Cg={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 ex=!0;function Y$(){return ex}function Z$(e){ex=e}const Eg=e=>{let t=e.timezone().current.offset;return t?Ms(t,":"):"Z"},Fa=e=>Y$()?k$(e):e,Q$=e=>e>=0?Ye(e,4):(e=Math.abs(e),"-"+Ye(e,4)),_o={day:e=>Fa(e.dayName()),"day-short":e=>Fa(Gs()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>Na(e.day()),"day-pad":e=>Ye(e.day()),date:e=>e.date(),"date-ordinal":e=>Na(e.date()),"date-pad":e=>Ye(e.date()),month:e=>Fa(e.monthName()),"month-short":e=>Fa(Ds()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>Na(e.month()),"month-pad":e=>Ye(e.month()),"iso-month":e=>Ye(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=Ye(Math.abs(t),4);return r&&(n=Ye(n,6),n="-"+n),n},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${Ye(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>Ye(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>Ye(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>Ye(e.minute()),second:e=>e.second(),"second-pad":e=>Ye(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>Ye(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=>Eg(e),numeric:e=>`${e.year()}/${Ye(e.month()+1)}/${Ye(e.date())}`,"numeric-us":e=>`${Ye(e.month()+1)}/${Ye(e.date())}/${e.year()}`,"numeric-uk":e=>`${Ye(e.date())}/${Ye(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${Ye(e.month()+1)}/${Ye(e.date())}`,iso:e=>{let t=e.format("iso-year"),r=Ye(e.month()+1),n=Ye(e.date()),a=Ye(e.h24()),i=Ye(e.minute()),o=Ye(e.second()),s=Ye(e.millisecond(),3),u=Eg(e);return`${t}-${r}-${n}T${a}:${i}:${o}.${s}${u}`},"iso-short":e=>{let t=Ye(e.month()+1),r=Ye(e.date());return`${Q$(e.year())}-${t}-${r}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${Ds()[e.month()]} ${Na(e.date())}, ${e.time()}`,"nice-24":e=>`${Ds()[e.month()]} ${Na(e.date())}, ${e.hour24()}:${Ye(e.minute())}`,"nice-year":e=>`${Ds()[e.month()]} ${Na(e.date())}, ${e.year()}`,"nice-day":e=>`${Gs()[e.day()]} ${Fa(Ds()[e.month()])} ${Na(e.date())}`,"nice-full":e=>`${e.dayName()} ${Fa(e.monthName())} ${Na(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${Fa(e.monthName())} ${Na(e.date())}, ${e.hour24()}:${Ye(e.minute())}`},Sg={"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(Sg).forEach(e=>_o[e]=_o[Sg[e]]);const yf=(e,t="")=>{if(e.isValid()!==!0)return"";if(_o.hasOwnProperty(t)){let r=_o[t](e)||"";return t!=="json"&&(r=String(r),t.toLowerCase()!=="ampm"&&(r=Fa(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()),_o.hasOwnProperty(a)){let i=String(_o[a](e));return a.toLowerCase()!=="ampm"?Fa(i):i}return""}),t}return e.format("iso-short")},Vl={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=>Ye(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=>Ye(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>Ye(e.week()),d:e=>e.date(),dd:e=>Ye(e.date()),D:e=>e.dayOfYear(),DD:e=>Ye(e.dayOfYear()),DDD:e=>Ye(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=>Ye(e.h12()),H:e=>e.hour(),HH:e=>Ye(e.hour()),m:e=>e.minute(),mm:e=>Ye(e.minute()),s:e=>e.second(),ss:e=>Ye(e.second()),SSS:e=>Ye(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=>Ms(e.timezone().current.offset),ZZ:e=>Ms(e.timezone().current.offset),ZZZ:e=>Ms(e.timezone().current.offset),ZZZZ:e=>Ms(e.timezone().current.offset,":")},Va=(e,t,r)=>{let n=e,a=t;for(let i=0;i<r;i+=1)Vl[n]=Vl[a],n+=e,a+=t};Va("q","Q",4);Va("L","M",4);Va("Y","y",4);Va("c","e",4);Va("k","H",2);Va("K","h",2);Va("S","s",2);Va("v","z",4);Va("V","Z",4);const X$=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)},eB=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},tB=(e,t)=>{let r=t.split("");return r=X$(r),r=eB(r),r.reduce((n,a)=>(Vl[a]!==void 0?n+=Vl[a](e)||"":(/^'.+'$/.test(a)&&(a=a.replace(/'/g,"")),n+=a),n),"")},rB=["year","season","quarter","month","week","day","quarterHour","hour","minute"],Tg=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))},nB=(e,t)=>{if(t)return t=ao(t),Tg(e,t);let r={};return rB.forEach(n=>{r[n]=Tg(e,n)}),r},aB=(e,t)=>{let r=e.progress();return t=ao(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},Mg=(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},bf=(e,t,r)=>e.isBefore(t)?Mg(e,t,r):Mg(t,e,r)*-1,iB=(e,t)=>{let r=t.year()-e.year();return e=e.year(t.year()),e.isAfter(t)&&(r-=1),r},oB=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=iB(a,t),a=e.add(n.years,"year"),n.months=n.years*12,a=e.add(n.months,"month"),n.months+=bf(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+=bf(a,t,"week"),n.days=n.weeks*7,a=e.add(n.days,"day"),n.days+=bf(a,t,"day"),n},sB=function(e){return Object.keys(e).forEach(t=>{e[t]*=-1}),e},uB=function(e,t,r){t=qi(t,e);let n=!1;if(e.isAfter(t)){let i=e;e=t,t=i,n=!0}let a=oB(e,t);return n&&(a=sB(a)),r?(r=ao(r),/s$/.test(r)!==!0&&(r+="s"),r==="dates"&&(r="days"),a[r]):a},No=e=>Math.abs(e)||0,lB=function(e){let t="P";return t+=No(e.years)+"Y",t+=No(e.months)+"M",t+=No(e.days)+"DT",t+=No(e.hours)+"H",t+=No(e.minutes)+"M",t+=No(e.seconds)+"S",t};function cB(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 an={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 Fg(e){return an[e]||""}function fB(e={}){an={second:e.second||an.second,seconds:e.seconds||an.seconds,minute:e.minute||an.minute,minutes:e.minutes||an.minutes,hour:e.hour||an.hour,hours:e.hours||an.hours,day:e.day||an.day,days:e.days||an.days,month:e.month||an.month,months:e.months||an.months,year:e.year||an.year,years:e.years||an.years}}let Nm="past",Am="future",Cm="present",Em="now",Sm="almost",Tm="over",Mm=e=>`${e} ago`,Fm=e=>`in ${e}`;function wf(e){return Mm(e)}function xf(e){return Fm(e)}function mB(){return Nm}function dB(){return Am}function hB(){return Cm}function Df(){return Em}function pB(){return Sm}function gB(){return Tm}function vB(e){Mm=e.pastDistance||Mm,Fm=e.futureDistance||Fm,Nm=e.past||Nm,Am=e.future||Am,Cm=e.present||Cm,Em=e.now||Em,Sm=e.almost||Sm,Tm=e.over||Tm}const Pg={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 kg(e,t){return e===1?e+" "+Fg(t.slice(0,-1)):e+" "+Fg(t)}const yB=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=kg(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>Pg[c].almost?(t=kg(u+1,i),r=pB()+" "+t):f>Pg[c].over&&(r=gB()+" "+l)}}),{qualified:r,rounded:t,abbreviated:n,englishValues:a}},bB=(e,t)=>{t=qi(t,e);const r=cB(e,t);if(Object.keys(r).every(f=>!r[f])===!0)return{diff:r,rounded:Df(),qualified:Df(),precise:Df(),abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:hB()};let a,i=dB(),{rounded:o,qualified:s,englishValues:u,abbreviated:l}=yB(r);a=u.splice(0,2).join(", "),e.isAfter(t)===!0?(o=wf(o),s=wf(s),a=wf(a),i=mB()):(o=xf(o),s=xf(s),a=xf(a));let c=lB(r);return{diff:r,rounded:o,qualified:s,precise:a,abbreviated:l,iso:c,direction:i}},wB=[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],xB=[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]],Wn={north:wB,south:xB},Vi=[null,[0,1],[3,1],[6,1],[9,1]],Ki={second:e=>(Dt(e,{millisecond:0}),e),minute:e=>(Dt(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),Dt(e,{second:0,millisecond:0}),e},hour:e=>(Dt(e,{minute:0,second:0,millisecond:0}),e),day:e=>(Dt(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")),Dt(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(Dt(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Vi[t]&&Dt(e,{month:Vi[t][0],date:Vi[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<Wn[r].length;n++)if(Wn[r][n][0]===t){let a=e.year();return t==="winter"&&e.month()<3&&(a-=1),Dt(e,{year:a,month:Wn[r][n][1],date:Wn[r][n][2],hour:0,minute:0,second:0,millisecond:0}),e}return e},year:e=>(Dt(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}};Ki.date=Ki.day;const DB=(e,t)=>{let r=e.clone();return t=ao(t),Ki[t]?Ki[t](r):t==="summer"||t==="winter"?(r=r.season(t),Ki.season(r)):r},NB=(e,t)=>{let r=e.clone();return t=ao(t),Ki[t]&&(r=Ki[t](r),r=r.add(1,t),r=r.subtract(1,"millisecond")),r},AB=function(e){return!!(Gs().find(t=>t===e)||Gl().find(t=>t===e))},CB=function(e,t,r,n=1){if(!t||!r)return[];if(t=ao(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();AB(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},EB=e=>e?e.split("->"):[],SB=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),Ns=e=>{let t=e.timezones,r=e.tz;if(t.hasOwnProperty(r)===!1&&(r=Ll(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:SB(r),hasDst:!!n.dst,default_offset:n.offset,hemisphere:n.hem==="s"?"South":"North",current:{}};if(a.hasDst){let s=EB(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):Kw(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},TB=["century","decade","year","month","date","day","hour","minute","second","millisecond"],mi={set:function(e,t){let r=this.clone();return r=Xw(r,e),t&&(this.tz=Ll(t)),r},timezone:function(){return Ns(this)},isDST:function(){return Ns(this).current.isDST},hasDST:function(){return Ns(this).hasDst},offset:function(){return Ns(this).current.offset*60},hemisphere:function(){return Ns(this).hemisphere},format:function(e){return yf(this,e)},unixFmt:function(e){return tB(this,e)},startOf:function(e){return DB(this,e)},endOf:function(e){return NB(this,e)},leapYear:function(){let e=this.year();return nu(e)},progress:function(e){return nB(this,e)},nearest:function(e){return aB(this,e)},diff:function(e,t){return uB(this,e,t)},since:function(e){return e||(e=this.clone().set()),bB(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=Ll(e,t.timezones),t},every:function(e,t,r){if(typeof e=="object"&&typeof t=="string"){let n=t;t=e,e=n}return CB(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(yf(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(yf(this,"full-short")),this},json:function(){return TB.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=Gs().indexOf(e);t===-1&&(t=Gl().indexOf(e)),t===-1&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};mi.inDST=mi.isDST;mi.round=mi.nearest;mi.each=mi.every;const Ua=e=>(typeof e=="string"&&(e=parseInt(e,10)),e),Nf=["year","month","date","hour","minute","second","millisecond"],Dd=(e,t,r)=>{let n=Nf.indexOf(r),a=Nf.slice(n,Nf.length);for(let i=0;i<a.length;i++){let o=t[a[i]]();e[a[i]](o)}return e},yi=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},MB=function(e,t){t=Ua(t);let n=e.millisecond()-t;return e.epoch-n},FB=function(e,t,r){t=Ua(t);let n=e.clone(),i=(e.second()-t)*Et.second;return e.epoch=e.epoch-i,e=yi(e,n,r,"minute"),e.epoch},Og=function(e,t,r){t=Ua(t);let n=e.clone(),i=(e.minute()-t)*Et.minute;return e.epoch-=i,Dd(e,n,"second"),e=yi(e,n,r,"hour"),e.epoch},Af=function(e,t,r){t=Ua(t),t>=24?t=24:t<0&&(t=0);let n=e.clone(),a=e.hour()-t,i=a*Et.hour;return e.epoch-=i,e.date()!==n.date()&&(e=n.clone(),a>1&&(a-=1),a<1&&(a+=1),i=a*Et.hour,e.epoch-=i),Dt(e,{hour:t}),Dd(e,n,"minute"),e=yi(e,n,r,"day"),e.epoch},PB=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=yi(e,u,r,"day"),e.epoch},kB=function(e,t,r){if(t=Ua(t),t>28){let a=e.month(),i=Qi[a];a===1&&t===29&&nu(e.year())&&(i=29),t>i&&(t=i)}t<=0&&(t=1);let n=e.clone();return Dt(e,{date:t}),e=yi(e,n,r,"month"),e.epoch},OB=function(e,t,r){typeof t=="string"&&(t==="sept"&&(t="sep"),t=Zw()[t.toLowerCase()]),t=Ua(t),t>=12&&(t=11),t<=0&&(t=0);let n=e.date();n>Qi[t]&&(n=Qi[t]);let a=e.clone();return Dt(e,{month:t,d:n}),e=yi(e,a,r,"year"),e.epoch},Cf=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=Ua(t),Dt(e,{year:t}),e.epoch},$B=function(e,t,r){let n=e.clone();return t=Ua(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=yi(e,n,r,"year"),e.epoch},BB=function(e,t,r){t=Ua(t);let n=e.clone();return t-=1,t<=0?t=0:t>=365&&(nu(e.year())?t=365:t=364),e=e.startOf("year"),e=e.add(t,"day"),Dd(e,n,"hour"),e=yi(e,n,r,"year"),e.epoch};let Pm="am",km="pm";function _B(){return Pm}function IB(){return km}function zB(e){Pm=e.am||Pm,km=e.pm||km}const jB={millisecond:function(e){if(e!==void 0){let t=this.clone();return t.epoch=MB(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=FB(r,e,t),r}return this.d.getSeconds()},minute:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=Og(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=Af(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=Af(i,s,t),i.epoch=Og(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=Af(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=PB(r,e,t),r}return`${this.h12()}:${Ye(this.minute())}${this.ampm()}`},ampm:function(e,t){let r=_B(),n=this.hour();if(n>=12&&(r=IB()),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")}},qB={date:function(e,t){if(e!==void 0){let r=this.clone();return e=parseInt(e,10),e&&(r.epoch=kB(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(),Cg.hasOwnProperty(e)?n=Cg[e]:(n=Gs().indexOf(e),n===-1&&(n=Gl().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 Dt(o,{hour:r.hour(),minute:r.minute(),second:r.second()}),o},dayName:function(e,t){if(e===void 0)return Gl()[this.day()];let r=this.clone();return r=r.day(e,t),r}},$g=e=>(e=e.minute(0),e=e.second(0),e=e.millisecond(1),e),RB={dayOfYear:function(e,t){if(e!==void 0){let i=this.clone();return i.epoch=BB(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=$B(this,e,t),s=$g(s),s}let r=this.clone();r=r.month(0),r=r.date(1),r=$g(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+=Et.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=OB(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 j$()[this.month()]},quarter:function(e,t){if(e!==void 0&&(typeof e=="string"&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Vi[e])){let n=this.clone(),a=Vi[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<Vi.length;n++)if(r<Vi[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<Wn[r].length;i++)e===Wn[r][i][0]&&(a=a.month(Wn[r][i][1],t),a=a.date(1),a=a.startOf("day"));return a}let n=this.d.getMonth();for(let a=0;a<Wn[r].length-1;a++)if(n>=Wn[r][a][1]&&n<Wn[r][a+1][1])return Wn[r][a][0];return r==="north"?"winter":"summer"},year:function(e){if(e!==void 0){let t=this.clone();return t.epoch=Cf(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=Cf(t,r*-1)),e==="ad"&&r<0&&(t.epoch=Cf(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}},Cr=Object.assign({},jB,qB,RB);Cr.milliseconds=Cr.millisecond;Cr.seconds=Cr.second;Cr.minutes=Cr.minute;Cr.hours=Cr.hour;Cr.hour24=Cr.hour;Cr.h12=Cr.hour12;Cr.h24=Cr.hour24;Cr.days=Cr.day;const LB=e=>{Object.keys(Cr).forEach(t=>{e.prototype[t]=Cr[t]})},Om=function(e,t){return e===1&&nu(t)?29:Qi[e]},HB=(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},GB=(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=Om(e.month,e.year);e.date+=a}return e},VB=(e,t,r)=>{let n=t.year(),a=t.month(),i=Om(a,n);for(;r>i;)r-=i,a+=1,a>=12&&(a-=12,n+=1),i=Om(a,n);return e.month=a,e.date=r,e},UB=HB,WB=VB,JB=GB,Gn=["millisecond","second","minute","hour","date","month"];let di={second:Gn.slice(0,1),minute:Gn.slice(0,2),quarterhour:Gn.slice(0,2),hour:Gn.slice(0,3),date:Gn.slice(0,4),month:Gn.slice(0,4),quarter:Gn.slice(0,4),season:Gn.slice(0,4),year:Gn,decade:Gn,century:Gn};di.week=di.hour;di.season=di.date;di.quarter=di.date;const KB={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},YB={month:!0,quarter:!0,season:!0,year:!0},ZB=e=>{e.prototype.add=function(t,r){let n=this.clone();if(!r||t===0)return n;let a=this.clone();if(r=ao(r),r==="millisecond")return n.epoch+=t,n;r==="fortnight"&&(t*=2,r="week"),Et[r]?n.epoch+=Et[r]*t:r==="week"||r==="weekend"?n.epoch+=Et.day*(t*7):r==="quarter"||r==="season"?n.epoch+=Et.month*(t*3):r==="quarterhour"&&(n.epoch+=Et.minute*15*t);let i={};if(di[r]&&di[r].forEach(o=>{i[o]=a[o]()}),KB[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=UB(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=JB(i,a,t);else{let o=a.date()+t;i=WB(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(Et.day*u)}else if(s>o){let u=Math.floor(t/4)||1;n.epoch+=Et.day*u}}else r==="decade"?i.year=n.year()+10:r==="century"&&(i.year=n.year()+100);if(YB[r]){let o=Qi[i.month];i.date=a.date(),i.date>o&&(i.date=o)}return Object.keys(i).length>1&&Dt(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},$s={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()};$s.date=$s.day;const QB=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),$s[r]?$s[r](a)===$s[r](t):null}},XB=e=>{const t={isAfter:function(r){r=qi(r,this);let n=xs(r);return n===null?null:this.epoch>n},isBefore:function(r){r=qi(r,this);let n=xs(r);return n===null?null:this.epoch<n},isEqual:function(r){r=qi(r,this);let n=xs(r);return n===null?null:this.epoch===n},isBetween:function(r,n,a=!1){r=qi(r,this),n=qi(n,this);let i=xs(r);if(i===null)return null;let o=xs(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]})},e_=e=>{const t={i18n:function(r){return ri(r.days)&&K$(r.days),ri(r.months)&&q$(r.months),P$(r.useTitleCase)&&Z$(r.useTitleCase),ri(r.ampm)&&zB(r.ampm),ri(r.distance)&&vB(r.distance),ri(r.units)&&fB(r.units),this}};Object.keys(t).forEach(r=>{e.prototype[r]=t[r]})};let Ef=Uo;const Xt=function(e,t,r={}){this.epoch=null,this.tz=Ll(t,Ef),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=b$(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:()=>Ef,set:a=>(Ef=a,a)});let n=Xw(this,e);this.epoch=n.epoch,n.tz&&(this.tz=n.tz)};Object.keys(mi).forEach(e=>{Xt.prototype[e]=mi[e]});Xt.prototype.clone=function(){return new Xt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})};Xt.prototype.toLocalDate=function(){return this.toNativeDate()};Xt.prototype.toNativeDate=function(){return new Date(this.epoch)};LB(Xt);ZB(Xt);QB(Xt);XB(Xt);e_(Xt);const t_=(e,t)=>{let r=new Xt(null),n=new Xt(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 Xt(null,s),l=u.hour();return l>=a&&l<=i?!(l===a&&u.minute()<r.minute()||l===i&&u.minute()>n.minute()):!1})},r_="7.7.0",vt=(e,t,r)=>new Xt(e,t,r),Dc=function(e){let t=e._today||{};return Object.keys(t).forEach(r=>{e=e[r](t[r])}),e};vt.now=(e,t)=>{let r=new Xt(new Date().getTime(),e,t);return r=Dc(r),r};vt.today=(e,t)=>{let r=new Xt(new Date().getTime(),e,t);return r=Dc(r),r.startOf("day")};vt.tomorrow=(e,t)=>{let r=new Xt(new Date().getTime(),e,t);return r=Dc(r),r.add(1,"day").startOf("day")};vt.yesterday=(e,t)=>{let r=new Xt(new Date().getTime(),e,t);return r=Dc(r),r.subtract(1,"day").startOf("day")};vt.extend=function(e={}){return Object.keys(e).forEach(t=>{Xt.prototype[t]=e[t]}),this};vt.timezones=function(){return new Xt().timezones};vt.max=function(e,t){let r=new Xt(null,e,t);return r.epoch=864e13,r};vt.min=function(e,t){let r=new Xt(null,e,t);return r.epoch=-864e13,r};vt.whereIts=t_;vt.version=r_;vt.plugin=vt.extend;const Bg={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"},Io={quarter:15,half:30},Hu=function(e){let t=e.time("6:00am");return e.isBefore(t)?e.ampm("pm"):e},n_=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");Io.hasOwnProperty(a)&&(a=Io[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},Nd=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=vt.now(t.timezone),a=n.clone(),i=r.not("in? the").text("reduced");if(i=i.replace(/^@/,""),Bg.hasOwnProperty(i))return{result:Bg[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=Hu(n),{result:n.time(),m:o}}if(o=r.match("(half|quarter|25|20|15|10|5) (past|after|to) #Cardinal"),o.found&&(n=n_(o,n),n.isValid()&&!n.isEqual(a)))return n=Hu(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=vt(t.today);if(Io.hasOwnProperty(u)&&(u=Io[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=vt(t.today);if(Io.hasOwnProperty(u)&&(u=Io[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=Hu(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=Hu(n)),{result:n.time(),m:r}):t.dayStart?{result:t.dayStart,m:e.none()}:{result:null,m:e.none()}},a_=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()})))},i_=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/",ze="Asia/",Rt="Europe/",Br="Africa/",Yt="Australia/",nn="Pacific/",o_={"british summer time":Rt+"London",bst:Rt+"London","british time":Rt+"London","britain time":Rt+"London","irish summer time":Rt+"Dublin","irish time":Rt+"Dublin",ireland:Rt+"Dublin","central european time":Rt+"Berlin",cet:Rt+"Berlin","central european summer time":Rt+"Berlin",cest:Rt+"Berlin","central europe":Rt+"Berlin","eastern european time":Rt+"Riga",eet:Rt+"Riga","eastern european summer time":Rt+"Riga",eest:Rt+"Riga","eastern europe time":Rt+"Riga","western european time":Rt+"Lisbon","western european summer time":Rt+"Lisbon","western europe":Rt+"Lisbon","turkey standard time":Rt+"Istanbul",trt:Rt+"Istanbul","turkish time":Rt+"Istanbul",etc:Br+"Freetown",utc:Br+"Freetown","greenwich standard time":Br+"Freetown",gmt:Br+"Freetown","east africa time":Br+"Nairobi","east african time":Br+"Nairobi","eastern africa time":Br+"Nairobi","central africa time":Br+"Khartoum","central african time":Br+"Khartoum","south africa standard time":Br+"Johannesburg",sast:Br+"Johannesburg","southern africa":Br+"Johannesburg","south african":Br+"Johannesburg","west africa standard time":Br+"Lagos","western africa time":Br+"Lagos","west african time":Br+"Lagos","australian central standard time":Yt+"Adelaide",acst:Yt+"Adelaide","australian central daylight time":Yt+"Adelaide",acdt:Yt+"Adelaide","australia central":Yt+"Adelaide","australian eastern standard time":Yt+"Brisbane",aest:Yt+"Brisbane","australian eastern daylight time":Yt+"Brisbane",aedt:Yt+"Brisbane","australia east":Yt+"Brisbane","australian western standard time":Yt+"Perth",awst:Yt+"Perth","australian western daylight time":Yt+"Perth",awdt:Yt+"Perth","australia west":Yt+"Perth","australian central western standard time":Yt+"Eucla",acwst:Yt+"Eucla","australia central west":Yt+"Eucla","lord howe standard time":Yt+"Lord_Howe",lhst:Yt+"Lord_Howe","lord howe daylight time":Yt+"Lord_Howe",lhdt:Yt+"Lord_Howe","russian standard time":Rt+"Moscow",msk:Rt+"Moscow",russian:Rt+"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:ze+"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":nn+"Honolulu","hawaiian time":nn+"Honolulu",hst:nn+"Honolulu","aleutian time":nn+"Honolulu","hawaii time":nn+"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:ze+"Jerusalem","arabic standard time":ze+"Baghdad","arabic time":ze+"Baghdad","arab time":ze+"Baghdad","iran standard time":ze+"Tehran","iran time":ze+"Tehran",irst:ze+"Tehran","iran daylight time":ze+"Tehran",irdt:ze+"Tehran",iranian:ze+"Tehran","pakistan standard time":ze+"Karachi","pakistan time":ze+"Karachi",pkt:ze+"Karachi","india standard time":ze+"Kolkata","indian time":ze+"Kolkata","indochina time":ze+"Bangkok",ict:ze+"Bangkok","south east asia":ze+"Bangkok","china standard time":ze+"Shanghai",ct:ze+"Shanghai","chinese time":ze+"Shanghai","alma-ata time":ze+"Almaty",almt:ze+"Almaty","oral time":ze+"Oral","orat time":ze+"Oral","yakutsk time":ze+"Yakutsk",yakt:ze+"Yakutsk","gulf standard time":ze+"Dubai","gulf time":ze+"Dubai",gst:ze+"Dubai",uae:ze+"Dubai","hong kong time":ze+"Hong_Kong",hkt:ze+"Hong_Kong","western indonesian time":ze+"Jakarta",wib:ze+"Jakarta","indonesia time":ze+"Jakarta","central indonesian time":ze+"Makassar",wita:ze+"Makassar","israel daylight time":ze+"Jerusalem",idt:ze+"Jerusalem","israel standard time":ze+"Jerusalem","israel time":ze+"Jerusalem",israeli:ze+"Jerusalem","krasnoyarsk time":ze+"Krasnoyarsk",krat:ze+"Krasnoyarsk","malaysia time":ze+"Kuala_Lumpur",myt:ze+"Kuala_Lumpur","singapore time":ze+"Singapore",sgt:ze+"Singapore","korea standard time":ze+"Seoul","korea time":ze+"Seoul",kst:ze+"Seoul","korean time":ze+"Seoul","uzbekistan time":ze+"Samarkand",uzt:ze+"Samarkand","vladivostok time":ze+"Vladivostok",vlat:ze+"Vladivostok","maldives time":"Indian/Maldives",mvt:"Indian/Maldives","mauritius time":"Indian/Mauritius",mut:"Indian/Mauritius","marshall islands time":nn+"Kwajalein",mht:nn+"Kwajalein","samoa standard time":nn+"Midway",sst:nn+"Midway","somoan time":nn+"Midway","chamorro standard time":nn+"Guam",chst:nn+"Guam","papua new guinea time":nn+"Bougainville",pgt:nn+"Bougainville"};let s_=vt().timezones,u_=Object.keys(s_).reduce((e,t)=>(e[t]=t,e),{});const _g=Object.assign({},o_,u_),l_=/(-?[0-9]+)h(rs)?/i,c_=/(-?[0-9]+)/,f_=/utc([-+]?[0-9]+)/i,m_=/gmt([-+]?[0-9]+)/i,Gu=function(e){return e=Number(e),e>-13&&e<13?(e=e*-1,e=(e>0?"+":"")+e,"Etc/GMT"+e):null},d_=function(e){let t=e.match(l_);if(t!==null||(t=e.match(f_),t!==null))return Gu(t[1]);if(t=e.match(m_),t!==null){let r=Number(t[1])*-1;return Gu(r)}return t=e.match(c_),t!==null?Gu(t[1]):null},h_=function(e){let t=e.match("#Timezone+");t=t.not("(in|for|by|near|at)");let r=t.text("reduced");if(_g.hasOwnProperty(r))return{result:_g[r],m:t};let n=d_(r);return n?{result:n,m:t}:{result:null,m:e.none()}},p_=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()}},g_=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},v_=function(e,t){let r=p$(e),n=r.result;e=e.not(r.m),r=v$(e);let a=r.result;e=e.not(r.m),r=h_(e);let i=r.result;e=e.not(r.m),r=Nd(e,t);let o=r.result;e=e.not(r.m),r=p_(e);let s=r.result;e=e.not(r.m),r=i_(e);let u=r.result;e=e.not(r.m),r=a_(e);let l=r.result;return e=e.not(r.m),e=g_(e),{shift:n,counter:a,tz:i,time:o,weekDay:s,section:u,rel:l,doc:e}};let bn=class tx{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=vt(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 tx(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 On extends bn{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 Jn extends On{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 $m extends On{constructor(t,r,n){super(t,r,n),this.unit="day",this.isWeekDay=!0,typeof t=="string"?(this.d=vt(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 y_ extends Jn{constructor(t,r,n){super(t,r,n),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}}class Tl extends bn{constructor(t,r,n){super(t,r,n,!0),this.unit="hour",this.d.isValid()&&(this.d=this.d.startOf("hour"))}}class rx extends bn{constructor(t,r,n){super(t,r,n,!0),this.unit="minute",this.d.isValid()&&(this.d=this.d.startOf("minute"))}}class la extends bn{constructor(t,r,n){super(t,r,n,!0),this.unit="millisecond"}}class b_ extends bn{constructor(t,r,n){super(t,r,n),this.unit="month",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}}class ii extends bn{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 Ig extends bn{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 Bm extends bn{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 Ad extends bn{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 _m extends bn{constructor(t,r,n){super(t,r,n),this.unit="year",this.d.isValid()&&(this.d=this.d.startOf("year"))}}class Vs extends bn{constructor(t,r,n){super(t,r,n),this.unit="week",this.d.isValid()&&(this.d=this.d.startOf("week"))}clone(){return new Vs(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 nx extends bn{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 Yn={today:e=>new On(e.today,null,e),yesterday:e=>new On(e.today.minus(1,"day"),null,e),tomorrow:e=>new On(e.today.plus(1,"day"),null,e),eom:e=>{let t=e.today.endOf("month");return t=t.startOf("day"),new On(t,null,e)},eoy:e=>{let t=e.today.endOf("year");return t=t.startOf("day"),new On(t,null,e)},now:e=>new la(e.today,null,e)};Yn.tommorrow=Yn.tomorrow;Yn.tmrw=Yn.tomorrow;Yn.anytime=Yn.today;Yn.sometime=Yn.today;const w_=function(e,t,r){let n=null;e.found===!1&&(r.time!==null&&(n=new la(t.today,null,t)),r.shift&&Object.keys(r.shift).length>0&&(r.shift.hour||r.shift.minute?n=new la(t.today,null,t):n=new On(t.today,null,t)));let a=e.text("reduced");return Yn.hasOwnProperty(a)===!0?Yn[a](t):a==="next"&&r.shift&&Object.keys(r.shift).length>0?Yn.tomorrow(t):n},Bi="january",_i="february",zg="march",Vu="april",Ao="may",x_="june",Uu="july",Wu="august",Sf="september",As="october",Za="november",sa="december";var Ju={"new years eve":[sa,31],"new years":[Bi,1],"new years day":[Bi,1],"inauguration day":[Bi,20],"australia day":[Bi,26],"national freedom day":[_i,1],"groundhog day":[_i,2],"rosa parks day":[_i,4],"valentines day":[_i,14],"saint valentines day":[_i,14],"st valentines day ":[_i,14],"saint patricks day":[zg,17],"st patricks day":[zg,17],"april fools":[Vu,1],"april fools day":[Vu,1],"emancipation day":[Vu,16],"tax day":[Vu,15],"labour day":[Ao,1],"cinco de mayo":[Ao,5],"national nurses day":[Ao,6],"harvey milk day":[Ao,22],"victoria day":[Ao,24],juneteenth:[x_,19],"canada day":[Uu,1],"independence day":[Uu,4],"independents day":[Uu,4],"bastille day":[Uu,14],"purple heart day":[Wu,7],"womens equality day":[Wu,26],"16 de septiembre":[Sf,16],"dieciseis de septiembre":[Sf,16],"grito de dolores":[Sf,16],halloween:[As,31],"all hallows eve":[As,31],"day of the dead":[As,31],"dia de muertos":[As,31],"veterans day":[Za,11],"st andrews day":[Za,30],"saint andrews day":[Za,30],"all saints day":[Za,1],"all sts day":[Za,1],"armistice day":[Za,11],"rememberance day":[Za,11],"christmas eve":[sa,24],christmas:[sa,25],xmas:[sa,25],"boxing day":[sa,26],"st stephens day":[sa,26],"saint stephens day":[sa,26],epiphany:[Bi,6],"orthodox christmas day":[Bi,7],"orthodox new year":[Bi,14],"assumption of mary":[Wu,15],"all souls day":[Za,2],"feast of the immaculate conception":[sa,8],"feast of our lady of guadalupe":[sa,12],kwanzaa:[sa,26],imbolc:[_i,2],beltaine:[Ao,1],lughnassadh:[Wu,1],samhain:[As,31]};const D_=function(e,t,r,n){if(Ju.hasOwnProperty(e)||Ju.hasOwnProperty(t)){let a=Ju[e]||Ju[t]||[],i=vt.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 N_=D_;const A_="january",C_="february",E_="march",S_="may",T_="june",M_="september",jg="october",qg="november",Co="monday",F_="thursday",P_="friday",Rg="sunday";let Xi={"martin luther king day":[3,Co,A_],"presidents day":[3,Co,C_],"commonwealth day":[2,Co,E_],"mothers day":[2,Rg,S_],"fathers day":[3,Rg,T_],"labor day":[1,Co,M_],"columbus day":[2,Co,jg],"canadian thanksgiving":[2,Co,jg],thanksgiving:[4,F_,qg],"black friday":[4,P_,qg]};Xi["turday day"]=Xi.thanksgiving;Xi["indigenous peoples day"]=Xi["columbus day"];Xi["mlk day"]=Xi["martin luther king day"];var Ku=Xi;const k_=function(e,t,r,n){if(Ku.hasOwnProperty(e)||Ku.hasOwnProperty(t)){let a=Ku[e]||Ku[t]||[],i=vt.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 O_=k_;let eo={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};eo["easter sunday"]=eo.easter;eo.pentecost=eo["whit sunday"];eo.whitsun=eo["whit sunday"];var Yu=eo;const $_=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 B_=$_;const __=function(e,t,r,n){if(Yu.hasOwnProperty(e)||Yu.hasOwnProperty(t)){let a=Yu[e]||Yu[t]||[],i=B_(r);if(!i)return null;let o=vt(i,n);o=o.year(r);let s=o.add(a,"day");if(s.isValid())return s}return null};var I_=__;const Zu={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]},z_=[2080,2084,2088,2092,2096],j_=function(e){let t={spring:"March 20 "+e,summer:"June 21 "+e,fall:"Sept 22 "+e,winter:"Dec 21 "+e};return Zu.spring.indexOf(e)!==-1&&(t.spring="March 19 "+e),Zu.summer.indexOf(e)!==-1&&(t.summer="June 20 "+e),Zu.fall.indexOf(e)!==-1&&(t.fall="Sept 21 "+e),Zu.winter.indexOf(e)!==-1&&(t.winter="Dec 22 "+e),z_.indexOf(e)!==-1&&(t.winter="Dec 20 "+e),t};var q_=j_;let jt={"spring equinox":"spring","summer solistice":"summer","fall equinox":"fall","winter solstice":"winter"};jt["march equinox"]=jt["spring equinox"];jt["vernal equinox"]=jt["spring equinox"];jt.ostara=jt["spring equinox"];jt["june solstice"]=jt["summer solistice"];jt.litha=jt["summer solistice"];jt["autumn equinox"]=jt["fall equinox"];jt["autumnal equinox"]=jt["fall equinox"];jt["september equinox"]=jt["fall equinox"];jt["sept equinox"]=jt["fall equinox"];jt.mabon=jt["fall equinox"];jt["december solstice"]=jt["winter solistice"];jt["dec solstice"]=jt["winter solistice"];jt.yule=jt["winter solistice"];var Qu=jt;const R_=function(e,t,r,n){if(Qu.hasOwnProperty(e)||Qu.hasOwnProperty(t)){let a=Qu[e]||Qu[t],i=q_(r);if(!a||!i||!i[a])return null;let o=vt(i[a],n);if(o.isValid())return o}return null};var L_=R_;let H_={"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 Xu=H_;const G_=-10.64,V_=function(e,t,r,n){if(Xu.hasOwnProperty(e)||Xu.hasOwnProperty(t)){let a=Xu[e]||Xu[t]||[];if(!a)return null;let i=vt(a+" 2018",n),s=(r-2018)*G_;if(i=i.add(s,"day"),i=i.startOf("day"),i=i.year(r),i.isValid())return i}return null};var U_=V_;const W_=vt.now().year(),Lg=function(e,t,r){t=t||W_,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=N_(e,n,t,r);return a!==null||(a=O_(e,n,t,r),a!==null)||(a=I_(e,n,t,r),a!==null)||(a=L_(e,n,t,r),a!==null)||(a=U_(e,n,t,r),a!==null)?a:null},J_=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=Lg(i,a,t.timezone);return o!==null&&(o.isBefore(t.today)&&a===t.today.year()&&(o=Lg(i,a+1,t.timezone)),r=new y_(o,null,t)),r},Im={day:On,hour:Tl,evening:Tl,second:la,milliscond:la,instant:la,minute:rx,week:Vs,weekend:nx,month:b_,quarter:Ig,year:_m,season:Ad,yr:_m,qtr:Ig,wk:Vs,sec:la,hr:Tl};let K_=`^(${Object.keys(Im).join("|")})$`;const Y_=function(e,t){let r=e.match(K_);if(r.found===!0){let n=r.text("reduced");if(Im.hasOwnProperty(n)){let a=Im[n];return a?new a(null,n,t):null}}if(r=e.match("^#WeekDay$"),r.found===!0){let n=r.text("reduced");return new $m(n,null,t)}return null},el=function(e){return{date:e.today.date(),month:e.today.month(),year:e.today.year()}},Z_=function(e,t){let r=e.match("(spring|summer|winter|fall|autumn) [<year>#Year?]");if(r.found){let n=e.text("reduced"),a=vt(n,t.timezone,{today:el(t)}),i=new Ad(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=vt(n,t.timezone,{today:el(t)});if(r.groups("year")){let o=Number(r.groups("year").text())||t.today.year();a=a.year(o)}let i=new Bm(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=vt(`q${n}`,t.timezone,{today:el(t)});if(r.groups("year")){let o=Number(r.groups("year").text())||t.today.year();a=a.year(o)}let i=new Bm(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("^#Year$"),r.found){let n=e.text("reduced"),a=vt(null,t.timezone,{today:el(t)});a=a.year(n);let i=new _m(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 Jn(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 ii(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 ii(u,null,t);if(c.d.isValid()===!0)return c}let l=new Jn(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 Jn(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 Jn(o,null,t);if(s.d.month()<t.today.month()&&(o.year+=1,s=new Jn(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 ii(o,null,t);if(s.d.month()<t.today.month()&&(o.year+=1,s=new ii(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 Jn(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 Jn(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 la(o,null,t);if(s.d.isValid()===!0)return s}let a=e.text("reduced");if(!a)return new la(t.today,null,t);let i=new On(a,null,t);return i.d.isValid()===!1?null:i},X_=function(e,t,r){let n=null;return n=n||w_(e,t,r),n=n||J_(e,t),n=n||Y_(e,t),n=n||Z_(e,t),n=n||Q_(e,t),n},e6={day:On,week:Vs,weekend:nx,month:ii,quarter:Bm,season:Ad,hour:Tl,minute:rx},t6=function(e,t={}){let r=e6[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},r6=function(e,t,r){if(!e&&r.weekDay&&(e=new $m(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 la(e.d,null,e.context):(n.week||n.day||n.month)&&(e=new On(e.d,null,e.context))}return r.weekDay&&e.unit!=="day"&&(e.applyWeekDay(r.weekDay),e=new $m(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=t6(e,r.counter)),e},n6=typeof process>"u"||!process.env?self.env||{}:process.env,a6=e=>{n6.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())},Ct=function(e,t){let r=v_(e,t);if(e=r.doc,a6(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=X_(e,t,r);return n=r6(n,t,r),n},Hg={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"},tl=function(e){return e.match("(every|each)").found?"AND":e.match("(any|a)").found?"OR":null},i6=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=tl(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=tl(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=Hg[a],a)return n.filter.weekDays[a]=!0,n.choose=tl(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=tl(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=Hg[a],a){n.filter.weekDays[a]=!0,n.choose="OR",e=e.remove(r);let i=r.groups("time");return i.found&&(n.time=Nd(i,t)),{repeat:n}}}return null},Bs=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},Tf=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},o6=[{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=Ct(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=Tf(o)),o=Bs(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=Ct(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=Tf(o)),o=Bs(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=Ct(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=Tf(i)),i=Bs(i),i}}return null}}],s6=[{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=Ct(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=Ct(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=Ct(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=Ct(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=Ct(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=Ct(r,t),i=Ct(n,t);return a&&i?[{start:a,end:a.clone().end()},{start:i,end:i.clone().end()}]:null}}],u6=[{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 ii(o,null,t).start();o={month:n.text("reduced"),year:i};let u=new ii(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=Ct(r,t);let n=e.groups("end");return n=Ct(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=Ct(n,t),n){let a=r.to;if(r.year&&(a=a.append(r.year)),a=Ct(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=Ct(s,t),s){let u=a.prepend(r).append(o);return u=Ct(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=Ct(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=Ct(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=Ct(r,t),a=Ct(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=Bs(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 Jn(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 Jn(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=Ct(r,t),r?{start:new Jn(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 ii(i,null,t);return r.has("(1st|initial)")?{start:o.start(),end:o.clone().middle()}:{start:o.middle(),end:o.clone().end()}}}],l6=function(e,t){return e=e.applyShift(t.punt),e},c6=[{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=Ct(r,t),n=Ct(n,t),r&&n){let a={start:r,end:n.end()};return a=Bs(a),a}return null}},{match:"^due? (by|before) [.+]",desc:"before june",parse:(e,t)=>{e=e.group(0);let r=Ct(e,t);if(r){let n=new bn(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=Ct(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=Ct(e,t);return r?(r=r.after(),{start:r.clone(),end:l6(r.clone(),t)}):null}},{match:"^(middle|center|midpoint) of [.+]",desc:"middle of",parse:(e,t)=>{e=e.group(0);let r=Ct(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=Ct(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=Ct(e,t);if(r){let n=r.clone(),a=r.start();if(r)return{start:a,end:n,unit:"time"}}return null}}],Gg=[].concat(o6,s6,u6,c6),f6=typeof process>"u"||!process.env?self.env||{}:process.env,m6=e=>{f6.DEBUG_DATE&&console.log(`
21
- \x1B[32m ${e} \x1B[0m`)},d6=function(e){return Object.prototype.toString.call(e)==="[object Array]"},h6=function(e,t){let r={start:null,end:null};if(!e.found)return r;let n=Ct(e,t);if(n){let a=n.clone().end();r={start:n,end:a,unit:n.setTime?"time":n.unit}}return r},p6=function(e,t){for(let r=0;r<Gg.length;r+=1){let n=Gg[r],a=e.match(n.match);if(a.found){m6(` ---[${n.desc}]---`);let i=n.parse(a,t);if(i!==null)return d6(i)||(i=[i]),i}}return null},g6=function(e,t){let r=i6(e,t)||{},n=p6(e,t);return n||(n=[h6(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},v6=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},zi=function(e,t){return t=t||{},t.timezone===!1&&(t.timezone="UTC"),t.today=t.today||vt.now(t.timezone),t.today=vt(t.today,t.timezone),e=v6(e),g6(e,t)},y6=function(e){let r=e.end.d.add(1,"millisecond").since(e.start.d).diff;return delete r.milliseconds,delete r.seconds,r},Vg=function(e){if(!e.start)return{start:null,end:null,timezone:null,duration:{}};let t=e.end?y6(e):{};return{start:e.start.format("iso"),end:e.end?e.end.format("iso"):null,timezone:e.start.d.format("timezone"),duration:t}},Mf=function(e,t){let r=e.fromText(t),n=zi(r,e.opts)[0];return!n||!n.start||!n.start.d?null:n.start.d},b6=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=>{zi(i,this.opts).forEach(o=>{let s=Vg(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=zi(a,this.opts);o.length>0&&(i.dates=Vg(o[0]))}return i},[])}format(n){let i=this.map(o=>{let s=zi(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=Mf(this,n);return this.filter(i=>{let o=zi(i,this.opts)[0]||{};return o.start&&o.start.d&&o.start.d.isBefore(a)})}isAfter(n){let a=Mf(this,n);return this.filter(i=>{let o=zi(i,this.opts)[0]||{};return o.start&&o.start.d&&o.start.d.isAfter(a)})}isSame(n,a){let i=Mf(this,a);return this.filter(o=>{let s=zi(o,this.opts)[0]||{};return s.start&&s.start.d&&s.start.d.isSame(i,n)})}}e.prototype.dates=function(r){let n=d$(this);return new t(this.document,n.pointer,null,r)}},w6=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},x6=function(e){return e.match("#Time+ (am|pm)?")},Ff=function(e,t={}){e=w6(e);let r=Nd(e,t);if(!r.result)return{time:null,"24h":null};let n=vt.now().time(r.result);return{time:r.result,"24h":n.format("time-24"),hour:n.hour(),minute:n.minute()}},Ug=(e,t)=>typeof t=="number"?e.eq(t):e,D6=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=Ff(o)||{};if(s.time){let u=vt.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 Ug(this,n).map(Ff)}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};return n&&n.time!==!1&&(i.time=Ff(a)),i},[])}}e.prototype.times=function(r){let n=x6(this);return n=Ug(n,r),new t(this.document,n.pointer)}},Wg={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 Ui={m:"minute",h:"hour",hr:"hour",min:"minute",sec:"second","week end":"weekend",wk:"week",yr:"year",qtr:"quarter"};Object.keys(Ui).forEach(e=>{Ui[e+"s"]=Ui[e]});const Jg=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$/,""),Ui.hasOwnProperty(i)&&(i=Ui[i]),Wg.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,Ui.hasOwnProperty(o)&&(o=Ui[o]),Wg.hasOwnProperty(o)&&i!==null&&(t[o]=Number(i)))}return t},N6=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=Jg(a)),i},[])}get(n){let a=[];return this.forEach(i=>{let o=Jg(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)}},A6=function(e){b6(e),D6(e),N6(e)},Kg="(start|end|middle|starting|ending|midpoint|beginning)",Aa=(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)})},rl=(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)})},C6=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);Aa(n,"date-value-year"),n=t.match("#Date [#Cardinal]",0),rl(n,"date-year"),n=t.match(`${Kg} of [#Cardinal]`),rl(n,"section-year"),n=t.match("#Month #Value [#Cardinal]",0),Aa(n,"month-value-year"),n=t.match("#Month #Value to #Value [#Cardinal]",0),Aa(n,"month-range-year"),n=t.match("(in|of|by|during|before|starting|ending|for|year|since) [#Cardinal]",0),Aa(n,"in-year-1"),n=t.match("(q1|q2|q3|q4) [#Cardinal]",0),Aa(n,"in-year-2"),n=t.match("#Ordinal quarter of? [#Cardinal]",0),Aa(n,"in-year-3"),n=t.match("the year [#Cardinal]",0),Aa(n,"in-year-4"),n=t.match("it (is|was) [#Cardinal]",0),rl(n,"in-year-5"),t.match(`${Kg} of #Year`).tag("Date");let a=t.match("between [#Cardinal] and [#Cardinal]");Aa(a.groups("0"),"between-year-and-year-1"),Aa(a.groups("1"),"between-year-and-year-2")}let r=e.match("^/^20[012][0-9]$/$");return rl(r,"2020-ish"),e},An=function(e,t){e.found&&(e.tag("Date",t),e.numbers().lessThan(31).ifNo("#Year").tag("#Time",t))},E6=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);An(a,"3-4-tuesday"),a=r.match("[#NumberRange+] (on|by|at)? #Month #Value",0),An(a,"3-4 mar 3"),a=r.match("[#NumberRange] to (#NumberRange && #Time)",0),An(a,"3-4pm"),a=r.match("(#NumberRange && #Time) to [#NumberRange]",0),An(a,"3pm-4")}let n=t.match("(from|between) #Cardinal and #Cardinal (in|on)? (#WeekDay|tomorrow|yesterday)");An(n,"from 9-5 tues"),n=e.match("#Cardinal to #Cardinal (#WeekDay|tomorrow|yesterday)"),An(n,"9-5 tues"),n=t.match("(from|between) [#NumericValue] (to|and) #Time",0).tag("Time","4-to-5pm"),An(n,"from 9-5pm"),n=t.match("(#WeekDay|tomorrow|yesterday) (from|between)? (#Cardinal|#Time) (and|to) (#Cardinal|#Time)"),An(n,"tues 3-5"),n=t.match("#Month #Value+ (from|between) [<time>(#Cardinal|#Time) (and|to) (#Cardinal|#Time)]").group("time"),An(n,"sep 4 from 9-5"),n=t.match("#Time to #Cardinal on? #Date"),An(n,"3pm-4 wed"),n=t.match("#Cardinal to #Time on? #Date"),An(n,"3-4pm wed"),n=t.match("#Cardinal to #Cardinal on? (#WeekDay|#Month #Value)"),An(n,"3-4 wed")}return e},S6=["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),{}),T6=function(e){let t=e.match("#Time [#Acronym]",0);if(t.found){let r=t.text("reduced");S6[r]===!0&&t.tag("Timezone","tz-abbr")}},M6="fix-tagger",F6=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",M6),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},Pf="(in|by|before|during|on|until|after|of|within|all)",Yg="(last|next|this|previous|current|upcoming|coming)",kf="(start|end|middle|starting|ending|midpoint|beginning|mid)",Of="(spring|summer|winter|fall|autumn)",Zg="(yesterday|today|tomorrow)";let P6=[{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:`${Pf}? #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:`${Pf}? ${Yg} ${Of}`,tag:"Date",reason:"thisNext-season"},{match:`the? ${kf} of ${Of}`,tag:"Date",reason:"section-season"},{match:`${Of} ${Pf}? #Cardinal`,tag:"Date",reason:"season-year"},{match:"#Date the? #Ordinal",tag:"Date",reason:"correction"},{match:`${Yg} #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? ${kf} 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:`[${kf}] #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:`${Zg} [#Value]$`,unTag:"Date",group:0,reason:"yesterday-7"},{match:`^[#Value] ${Zg}$`,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"}],$f=null;const Qg=function(e){let{world:t}=e;$f=$f||t.methods.one.buildNet(P6,t),e.sweep($f)},k6=function(e){return e.cache(),Qg(e),Qg(e),C6(e),E6(e),T6(e),F6(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},O6={dates:k6},$6={FinancialQuarter:{is:"Date",not:["Fraction"]},Season:{is:"Date"},Year:{is:"Date",not:["RomanNumeral"]},Holiday:{is:"Date",also:"Noun"},DateShift:{is:"Date",not:["Timezone","Holiday"]}},$e="America/",gt="Asia/",Zt="Europe/",Cn="Africa/",br="Australia/",ua="Pacific/",B6={"british summer time":Zt+"London",bst:Zt+"London","british time":Zt+"London","britain time":Zt+"London","irish summer time":Zt+"Dublin","irish time":Zt+"Dublin","central european time":Zt+"Berlin",cet:Zt+"Berlin","central european summer time":Zt+"Berlin",cest:Zt+"Berlin","central europe":Zt+"Berlin","eastern european time":Zt+"Riga",eet:Zt+"Riga","eastern european summer time":Zt+"Riga",eest:Zt+"Riga","eastern europe time":Zt+"Riga","western european time":Zt+"Lisbon","western european summer time":Zt+"Lisbon","turkey standard time":Zt+"Istanbul","turkish time":Zt+"Istanbul",utc:Cn+"Freetown","greenwich standard time":Cn+"Freetown",gmt:Cn+"Freetown","east africa time":Cn+"Nairobi","east african time":Cn+"Nairobi","eastern africa time":Cn+"Nairobi","central africa time":Cn+"Khartoum","central african time":Cn+"Khartoum","south africa standard time":Cn+"Johannesburg","west africa standard time":Cn+"Lagos","western africa time":Cn+"Lagos","west african time":Cn+"Lagos","australian central standard time":br+"Adelaide",acst:br+"Adelaide","australian central daylight time":br+"Adelaide",acdt:br+"Adelaide","australian eastern standard time":br+"Brisbane",aest:br+"Brisbane","australian eastern daylight time":br+"Brisbane",aedt:br+"Brisbane","australian western standard time":br+"Perth",awst:br+"Perth","australian western daylight time":br+"Perth",awdt:br+"Perth","australian central western standard time":br+"Eucla",acwst:br+"Eucla","lord howe standard time":br+"Lord_Howe",lhst:br+"Lord_Howe","lord howe daylight time":br+"Lord_Howe",lhdt:br+"Lord_Howe","russian standard time":Zt+"Moscow",msk:Zt+"Moscow","central standard time":$e+"Chicago","central time":$e+"Chicago",cst:$e+"Havana","central daylight time":$e+"Chicago",cdt:$e+"Havana","mountain standard time":$e+"Denver","mountain time":$e+"Denver",mst:$e+"Denver","mountain daylight time":$e+"Denver",mdt:$e+"Denver","atlantic standard time":$e+"Halifax","atlantic time":$e+"Halifax",ast:gt+"Baghdad","atlantic daylight time":$e+"Halifax",adt:$e+"Halifax","eastern standard time":$e+"New_York","eastern time":$e+"New_York",est:$e+"New_York","eastern daylight time":$e+"New_York",edt:$e+"New_York","pacific time":$e+"Los_Angeles","pacific standard time":$e+"Los_Angeles",pst:$e+"Los_Angeles","pacific daylight time":$e+"Los_Angeles",pdt:$e+"Los_Angeles","alaskan standard time":$e+"Anchorage","alaskan time":$e+"Anchorage",ahst:$e+"Anchorage","alaskan daylight time":$e+"Anchorage",ahdt:$e+"Anchorage","hawaiian standard time":ua+"Honolulu","hawaiian time":ua+"Honolulu",hst:ua+"Honolulu","aleutian time":ua+"Honolulu","hawaii time":ua+"Honolulu","newfoundland standard time":$e+"St_Johns","newfoundland time":$e+"St_Johns","newfoundland daylight time":$e+"St_Johns","brazil time":$e+"Sao_Paulo","brazilian time":$e+"Sao_Paulo","argentina time":$e+"Buenos_Aires","argentinian time":$e+"Buenos_Aires","amazon time":$e+"Manaus","amazonian time":$e+"Manaus","easter island standard time":"Chile/Easterisland","easter island summer time":"Chile/Easterisland",easst:"Chile/Easterisland","venezuelan standard time":$e+"Caracas","venezuelan time":$e+"Caracas","venezuela time":$e+"Caracas","paraguay time":$e+"Asuncion","paraguay summer time":$e+"Asuncion","cuba standard time":$e+"Havana","cuba time":$e+"Havana","cuba daylight time":$e+"Havana","cuban time":$e+"Havana","bolivia time":$e+"La_Paz","bolivian time":$e+"La_Paz","colombia time":$e+"Bogota","colombian time":$e+"Bogota","acre time":$e+"Eirunepe","peru time":$e+"Lima","chile standard time":$e+"Punta_Arenas","chile time":$e+"Punta_Arenas",clst:$e+"Punta_Arenas","chile summer time":$e+"Punta_Arenas",cldt:$e+"Punta_Arenas","uruguay time":$e+"Montevideo",uyt:$e+"Montevideo","arabic standard time":gt+"Baghdad","iran standard time":gt+"Tehran","iran time":gt+"Tehran","iran daylight time":gt+"Tehran","pakistan standard time":gt+"Karachi","pakistan time":gt+"Karachi","india standard time":gt+"Kolkata","indian time":gt+"Kolkata","indochina time":gt+"Bangkok","china standard time":gt+"Shanghai","alma-ata time":gt+"Almaty","oral time":gt+"Oral","orat time":gt+"Oral","yakutsk time":gt+"Yakutsk",yakt:gt+"Yakutsk","gulf standard time":gt+"Dubai","gulf time":gt+"Dubai","hong kong time":gt+"Hong_Kong","western indonesian time":gt+"Jakarta","indonesia time":gt+"Jakarta","central indonesian time":gt+"Makassar","israel daylight time":gt+"Jerusalem","israel standard time":gt+"Jerusalem","israel time":gt+"Jerusalem","krasnoyarsk time":gt+"Krasnoyarsk","malaysia time":gt+"Kuala_Lumpur","singapore time":gt+"Singapore","korea standard time":gt+"Seoul","korea time":gt+"Seoul",kst:gt+"Seoul","korean time":gt+"Seoul","uzbekistan time":gt+"Samarkand","vladivostok time":gt+"Vladivostok","maldives time":"Indian/Maldives","mauritius time":"Indian/Mauritius","marshall islands time":ua+"Kwajalein","samoa standard time":ua+"Midway","somoan time":ua+"Midway","chamorro standard time":ua+"Guam","papua new guinea time":ua+"Bougainville"};let _6=vt().timezones,I6=Object.keys(_6).reduce((e,t)=>(e[t]=t,e),{});const z6=Object.assign({},B6,I6),j6=["weekday","summer","winter","autumn","all day","eod","eom","eoy","standard time","daylight time","tommorrow"],q6=["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"],R6=["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"],L6=["noon","midnight","morning","tonight","evening","afternoon","breakfast time","lunchtime","dinnertime","midday","eod","oclock","oclock","at night"];let ax={"a couple":"Value",thur:"WeekDay",thurs:"WeekDay"};const au=function(e,t){e.forEach(r=>{ax[r]=t})};au(Object.keys(z6),"Timezone");au(j6,"Date");au(q6,"Duration");au(R6,"Holiday");au(L6,"Time");const H6=[[/^[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"]],G6="3.7.1",Xg=e=>e?vt(e).format("{nice-day} {year}"):"-",Cs="\x1B[0m",Bf={magenta:e=>"\x1B[35m"+e+Cs,cyan:e=>"\x1B[36m"+e+Cs,yellow:e=>"\x1B[33m"+e+Cs,dim:e=>"\x1B[2m"+e+Cs,i:e=>"\x1B[3m"+e+Cs},V6=function(e){e.dates().forEach(t=>{let r=t.dates().get()[0];console.log(`
25
- ────────`),t.debug("highlight");let n="";r&&r.start&&(n=" "+Bf.magenta(Xg(r.start))),r&&r.end&&(n+=Bf.dim(" → ")+Bf.cyan(Xg(r.end))),console.log(n+`
26
- `)})},U6={tags:$6,words:ax,compute:O6,api:A6,mutate:e=>{e.model.two.regexText=e.model.two.regexText||[],e.model.two.regexText=e.model.two.regexText.concat(H6),e.methods.one.debug=e.methods.one.debug||{},e.methods.one.debug.dates=V6},hooks:["dates"],version:G6};function rr(){return rr=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},rr.apply(null,arguments)}var ix={relTol:1e-12,absTol:1e-15,matrix:"Matrix",number:"number",numberFallback:"number",precision:64,predictable:!1,randomSeed:null,legacySubset:!1};function Jr(e,t){if(Ul(e,t))return e[t];throw typeof e[t]=="function"&&Cd(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function Wo(e,t,r){if(Ul(e,t))return e[t]=r,r;throw new Error('No access to property "'+t+'"')}function Ul(e,t){return!J6(e)&&!Array.isArray(e)?!1:Me(K6,t)?!0:!(t in Object.prototype||t in Function.prototype)}function W6(e,t){if(!Cd(e,t))throw new Error('No access to method "'+t+'"');return e[t]}function Cd(e,t){return e==null||typeof e[t]!="function"||Me(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:Me(Y6,t)?!0:!(t in Object.prototype||t in Function.prototype)}function J6(e){return typeof e=="object"&&e&&e.constructor===Object}var K6={length:!0,name:!0},Y6={toString:!0,valueOf:!0,toLocaleString:!0};class Nc{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 Jr(this.wrappedObject,t)}set(t,r){return Wo(this.wrappedObject,t,r),this}has(t){return Ul(this.wrappedObject,t)&&t in this.wrappedObject}entries(){return sx(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){Ul(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 ox{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 sx(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 sx(e,t){return{next:()=>{var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}}function Us(){return new Map}function Lo(e){if(!e)return Us();if(cx(e))return e;if(Cc(e))return new Nc(e);throw new Error("createMap can create maps from objects or Maps")}function Z6(e){if(e instanceof Nc)return e.wrappedObject;var t={};for(var r of e.keys()){var n=e.get(r);Wo(t,r,n)}return t}function qe(e){return typeof e=="number"}function Qe(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 _s(e){return typeof e=="bigint"}function Ia(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function iu(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function pn(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Qt(e){return typeof e=="string"}var Ft=Array.isArray;function Le(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function yn(e){return Array.isArray(e)||Le(e)}function Wl(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Wi(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Ed(e){return e&&e.constructor.prototype.isRange===!0||!1}function Ac(e){return e&&e.constructor.prototype.isIndex===!0||!1}function Q6(e){return typeof e=="boolean"}function X6(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function ux(e){return e&&e.constructor.prototype.isHelp===!0||!1}function lx(e){return typeof e=="function"}function e8(e){return e instanceof Date}function t8(e){return e instanceof RegExp}function Cc(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Ia(e)&&!iu(e))}function cx(e){return e?e instanceof Map||e instanceof Nc||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}function r8(e){return e===null}function n8(e){return e===void 0}function La(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Pn(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function a8(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function i8(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function o8(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function mt(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function zm(e){return mt(e)||tr(e)&&e.args.length===1&&mt(e.args[0])&&"-+~".includes(e.op)}function ou(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function hi(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function ns(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function St(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ec(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function tr(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ha(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function s8(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function u8(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Nr(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function fx(e){return e&&e.constructor.prototype.isChain===!0||!1}function kt(e){var t=typeof e;return t==="object"?e===null?"null":Qe(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function We(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 We(r)});if(e instanceof Date)return new Date(e.valueOf());if(Qe(e))return e;if(Cc(e))return l8(e,We);if(t==="function")return e;throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function l8(e,t){var r={};for(var n in e)Me(e,n)&&(r[n]=t(e[n]));return r}function mx(e,t){for(var r in t)Me(t,r)&&(e[r]=t[r]);return e}function Ga(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(!Ga(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)||!Ga(e[r],t[r]))return!1;for(r in t)if(!(r in e))return!1;return!0}else return e===t}}function c8(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 Me(e,t){return e&&Object.hasOwnProperty.call(e,t)}function f8(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 m8=["Matrix","Array"],d8=["number","BigNumber","bigint","Fraction"],fe=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(ix)};rr(fe,ix,{MATRIX_OPTIONS:m8,NUMBER_OPTIONS:d8});function e0(){return!0}function En(){return!1}function Eo(){}const t0="Argument is not a typed-function.";function dx(){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:e0,isAny:!0};let n,a,i=0,o={createCount:0};function s(O){const q=n.get(O);if(q)return q;let K='Unknown type "'+O+'"';const te=O.toLowerCase();let ie;for(ie of a)if(ie.toLowerCase()===te){K+='. Did you mean "'+ie+'" ?';break}throw new TypeError(K)}function u(O){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any";const K=q?s(q).index:a.length,te=[];for(let re=0;re<O.length;++re){if(!O[re]||typeof O[re].name!="string"||typeof O[re].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");const pe=O[re].name;if(n.has(pe))throw new TypeError('Duplicate type name "'+pe+'"');te.push(pe),n.set(pe,{name:pe,test:O[re].test,isAny:O[re].isAny,index:K+re,conversionsTo:[]})}const ie=a.slice(K);a=a.slice(0,K).concat(te).concat(ie);for(let re=K+te.length;re<a.length;++re)n.get(a[re]).index=re}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(K=>{const te=n.get(K);return!te.isAny&&te.test(O)});return q.length?q:["any"]}function m(O){return O&&typeof O=="function"&&"_typedFunctionData"in O}function d(O,q,K){if(!m(O))throw new TypeError(t0);const te=K&&K.exact,ie=Array.isArray(q)?q.join(","):q,re=x(ie),pe=y(re);if(!te||pe in O.signatures){const Ie=O._typedFunctionData.signatureMap.get(pe);if(Ie)return Ie}const me=re.length;let Ne;if(te){Ne=[];let Ie;for(Ie in O.signatures)Ne.push(O._typedFunctionData.signatureMap.get(Ie))}else Ne=O._typedFunctionData.signatures;for(let Ie=0;Ie<me;++Ie){const ct=re[Ie],wt=[];let nt;for(nt of Ne){const Ht=N(nt.params,Ie);if(!(!Ht||ct.restParam&&!Ht.restParam)){if(!Ht.hasAny){const M=v(Ht);if(ct.types.some(Y=>!M.has(Y.name)))continue}wt.push(nt)}}if(Ne=wt,Ne.length===0)break}let de;for(de of Ne)if(de.params.length<=me)return de;throw new TypeError("Signature not found (signature: "+(O.name||"unnamed")+"("+y(re,", ")+"))")}function h(O,q,K){return d(O,q,K).implementation}function p(O,q){const K=s(q);if(K.test(O))return O;const te=K.conversionsTo;if(te.length===0)throw new Error("There are no conversions to "+q+" defined.");for(let ie=0;ie<te.length;ie++)if(s(te[ie].from).test(O))return te[ie].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(K=>K.name).join(q)}function w(O){const q=O.indexOf("...")===0,te=(q?O.length>3?O.slice(3):"any":O).split("|").map(me=>s(me.trim()));let ie=!1,re=q?"...":"";return{types:te.map(function(me){return ie=me.isAny||ie,re+=me.name+"|",{name:me.name,typeIndex:me.index,test:me.test,isAny:me.isAny,conversion:null,conversionIndex:-1}}),name:re.slice(0,-1),hasAny:ie,hasConversion:!1,restParam:q}}function D(O){const q=O.types.map(pe=>pe.name),K=B(q);let te=O.hasAny,ie=O.name;const re=K.map(function(pe){const me=s(pe.from);return te=me.isAny||te,ie+="|"+pe.from,{name:pe.from,typeIndex:me.index,test:me.test,isAny:me.isAny,conversion:pe,conversionIndex:pe.index}});return{types:O.types.concat(re),name:ie,hasAny:te,hasConversion:re.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 K=O.trim();if(K==="")return q;const te=K.split(",");for(let ie=0;ie<te.length;++ie){const re=w(te[ie].trim());if(re.restParam&&ie!==te.length-1)throw new SyntaxError('Unexpected rest parameter "'+te[ie]+'": only allowed for the last parameter');if(re.types.length===0)return null;q.push(re)}return q}function g(O){const q=_(O);return q?q.restParam:!1}function b(O){if(!O||O.types.length===0)return e0;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,K=s(O.types[1].name).test;return function(ie){return q(ie)||K(ie)}}else{const q=O.types.map(function(K){return s(K.name).test});return function(te){for(let ie=0;ie<q.length;ie++)if(q[ie](te))return!0;return!1}}}function C(O){let q,K,te;if(g(O)){q=U(O).map(b);const ie=q.length,re=b(_(O)),pe=function(me){for(let Ne=ie;Ne<me.length;Ne++)if(!re(me[Ne]))return!1;return!0};return function(Ne){for(let de=0;de<q.length;de++)if(!q[de](Ne[de]))return!1;return pe(Ne)&&Ne.length>=ie+1}}else return O.length===0?function(re){return re.length===0}:O.length===1?(K=b(O[0]),function(re){return K(re[0])&&re.length===1}):O.length===2?(K=b(O[0]),te=b(O[1]),function(re){return K(re[0])&&te(re[1])&&re.length===2}):(q=O.map(b),function(re){for(let pe=0;pe<q.length;pe++)if(!q[pe](re[pe]))return!1;return re.length===q.length})}function N(O,q){return q<O.length?O[q]:g(O)?_(O):null}function A(O,q){const K=N(O,q);return K?v(K):new Set}function E(O){return O.conversion===null||O.conversion===void 0}function S(O,q){const K=new Set;return O.forEach(te=>{const ie=A(te.params,q);let re;for(re of ie)K.add(re)}),K.has("any")?["any"]:Array.from(K)}function F(O,q,K){let te,ie;const re=O||"unnamed";let pe=K,me;for(me=0;me<q.length;me++){const ct=[];if(pe.forEach(wt=>{const nt=N(wt.params,me),Ht=b(nt);(me<wt.params.length||g(wt.params))&&Ht(q[me])&&ct.push(wt)}),ct.length===0){if(ie=S(pe,me),ie.length>0){const wt=f(q[me]);return te=new TypeError("Unexpected type of argument in function "+re+" (expected: "+ie.join(" or ")+", actual: "+wt.join(" | ")+", index: "+me+")"),te.data={category:"wrongType",fn:re,index:me,actual:wt,expected:ie},te}}else pe=ct}const Ne=pe.map(function(ct){return g(ct.params)?1/0:ct.params.length});if(q.length<Math.min.apply(null,Ne))return ie=S(pe,me),te=new TypeError("Too few arguments in function "+re+" (expected: "+ie.join(" or ")+", index: "+q.length+")"),te.data={category:"tooFewArgs",fn:re,index:q.length,expected:ie},te;const de=Math.max.apply(null,Ne);if(q.length>de)return te=new TypeError("Too many arguments in function "+re+" (expected: "+de+", actual: "+q.length+")"),te.data={category:"tooManyArgs",fn:re,index:q.length,expectedLength:de},te;const Ie=[];for(let ct=0;ct<q.length;++ct)Ie.push(f(q[ct]).join("|"));return te=new TypeError('Arguments of type "'+Ie.join(", ")+'" do not match any of the defined signatures of function '+re+"."),te.data={category:"mismatch",actual:Ie},te}function k(O){let q=a.length+1;for(let K=0;K<O.types.length;K++)q=Math.min(q,O.types[K].typeIndex);return q}function $(O){let q=i+1;for(let K=0;K<O.types.length;K++)E(O.types[K])||(q=Math.min(q,O.types[K].conversionIndex));return q}function R(O,q){if(O.hasAny){if(!q.hasAny)return .1}else if(q.hasAny)return-.1;if(O.restParam){if(!q.restParam)return .01}else if(q.restParam)return-.01;const K=k(O)-k(q);if(K<0)return-.001;if(K>0)return .001;const te=$(O),ie=$(q);if(O.hasConversion){if(!q.hasConversion)return(1+te)*1e-6}else if(q.hasConversion)return-(1+ie)*1e-6;const re=te-ie;return re<0?-1e-7:re>0?1e-7:0}function T(O,q){const K=O.params,te=q.params,ie=_(K),re=_(te),pe=g(K),me=g(te);if(pe&&ie.hasAny){if(!me||!re.hasAny)return 1e7}else if(me&&re.hasAny)return-1e7;let Ne=0,de=0,Ie;for(Ie of K)Ie.hasAny&&++Ne,Ie.hasConversion&&++de;let ct=0,wt=0;for(Ie of te)Ie.hasAny&&++ct,Ie.hasConversion&&++wt;if(Ne!==ct)return(Ne-ct)*1e6;if(pe&&ie.hasConversion){if(!me||!re.hasConversion)return 1e5}else if(me&&re.hasConversion)return-1e5;if(de!==wt)return(de-wt)*1e4;if(pe){if(!me)return 1e3}else if(me)return-1e3;const nt=(K.length-te.length)*(pe?-100:100);if(nt!==0)return nt;const Ht=[];let M=0;for(let Oe=0;Oe<K.length;++Oe){const Ue=R(K[Oe],te[Oe]);Ht.push(Ue),M+=Ue}if(M!==0)return(M<0?-10:10)+M;let Y,le=9;const ve=le/(Ht.length+1);for(Y of Ht){if(Y!==0)return(Y<0?-le:le)+Y;le-=ve}return 0}function B(O){if(O.length===0)return[];const q=O.map(s);if(O.length===1)return q[0].conversionsTo;const K=new Set(O),te=new Set;for(let re=0;re<q.length;++re)for(const pe of q[re].conversionsTo)K.has(pe.from)||te.add(pe.from);const ie=[];for(const re of te){let pe=i+1,me=null;for(let Ne=0;Ne<q.length;++Ne)for(const de of q[Ne].conversionsTo)de.from===re&&de.index<pe&&(pe=de.index,me=de);ie.push(me)}return ie}function L(O,q){let K=q,te="";if(O.some(re=>re.hasConversion)){const re=g(O),pe=O.map(j);te=pe.map(me=>me.name).join(";"),K=function(){const Ne=[],de=re?arguments.length-1:arguments.length;for(let Ie=0;Ie<de;Ie++)Ne[Ie]=pe[Ie](arguments[Ie]);return re&&(Ne[de]=arguments[de].map(pe[de])),q.apply(this,Ne)}}let ie=K;if(g(O)){const re=O.length-1;ie=function(){return K.apply(this,J(arguments,0,re).concat([J(arguments,re)]))}}return te&&Object.defineProperty(ie,"name",{value:te}),ie}function j(O){let q,K,te,ie;const re=[],pe=[];let me="";O.types.forEach(function(de){de.conversion&&(me+=de.conversion.from+"~>"+de.conversion.to+",",re.push(s(de.conversion.from).test),pe.push(de.conversion.convert))}),me?me=me.slice(0,-1):me="pass";let Ne=de=>de;switch(pe.length){case 0:break;case 1:q=re[0],te=pe[0],Ne=function(Ie){return q(Ie)?te(Ie):Ie};break;case 2:q=re[0],K=re[1],te=pe[0],ie=pe[1],Ne=function(Ie){return q(Ie)?te(Ie):K(Ie)?ie(Ie):Ie};break;default:Ne=function(Ie){for(let ct=0;ct<pe.length;ct++)if(re[ct](Ie))return pe[ct](Ie);return Ie}}return Object.defineProperty(Ne,"name",{value:me}),Ne}function Z(O){function q(K,te,ie){if(te<K.length){const re=K[te];let pe=[];if(re.restParam){const me=re.types.filter(E);me.length<re.types.length&&pe.push({types:me,name:"..."+me.map(Ne=>Ne.name).join("|"),hasAny:me.some(Ne=>Ne.isAny),hasConversion:!1,restParam:!0}),pe.push(re)}else pe=re.types.map(function(me){return{types:[me],name:me.name,hasAny:me.isAny,hasConversion:me.conversion,restParam:!1}});return ee(pe,function(me){return q(K,te+1,ie.concat([me]))})}else return[ie]}return q(O,0,[])}function G(O,q){const K=Math.max(O.length,q.length);for(let me=0;me<K;me++){const Ne=A(O,me),de=A(q,me);let Ie=!1,ct;for(ct of de)if(Ne.has(ct)){Ie=!0;break}if(!Ie)return!1}const te=O.length,ie=q.length,re=g(O),pe=g(q);return re?pe?te===ie:ie>=te:pe?te>=ie:te===ie}function V(O){return O.map(q=>Fe(q)?ye(q.referToSelf.callback):Se(q)?se(q.referTo.references,q.referTo.callback):q)}function P(O,q,K){const te=[];let ie;for(ie of O){let re=K[ie];if(typeof re!="number")throw new TypeError('No definition for referenced signature "'+ie+'"');if(re=q[re],typeof re!="function")return!1;te.push(re)}return te}function Q(O,q,K){const te=V(O),ie=new Array(te.length).fill(!1);let re=!0;for(;re;){re=!1;let pe=!0;for(let me=0;me<te.length;++me){if(ie[me])continue;const Ne=te[me];if(Fe(Ne))te[me]=Ne.referToSelf.callback(K),te[me].referToSelf=Ne.referToSelf,ie[me]=!0,pe=!1;else if(Se(Ne)){const de=P(Ne.referTo.references,te,q);de?(te[me]=Ne.referTo.callback.apply(this,de),te[me].referTo=Ne.referTo,ie[me]=!0,pe=!1):re=!0}}if(pe&&re)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return te}function z(O){const q=/\bthis(\(|\.signatures\b)/;Object.keys(O).forEach(K=>{const te=O[K];if(q.test(te.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 oe(O,q){if(o.createCount++,Object.keys(q).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&z(q);const K=[],te=[],ie={},re=[];let pe;for(pe in q){if(!Object.prototype.hasOwnProperty.call(q,pe))continue;const Tt=x(pe);if(!Tt)continue;K.forEach(function(gs){if(G(gs,Tt))throw new TypeError('Conflicting signatures "'+y(gs)+'" and "'+y(Tt)+'".')}),K.push(Tt);const rn=te.length;te.push(q[pe]);const qN=Tt.map(D);let bu;for(bu of Z(qN)){const gs=y(bu);re.push({params:bu,name:gs,fn:rn}),bu.every(RN=>!RN.hasConversion)&&(ie[gs]=rn)}}re.sort(T);const me=Q(te,ie,ps);let Ne;for(Ne in ie)Object.prototype.hasOwnProperty.call(ie,Ne)&&(ie[Ne]=me[ie[Ne]]);const de=[],Ie=new Map;for(Ne of re)Ie.has(Ne.name)||(Ne.fn=me[Ne.fn],de.push(Ne),Ie.set(Ne.name,Ne));const ct=de[0]&&de[0].params.length<=2&&!g(de[0].params),wt=de[1]&&de[1].params.length<=2&&!g(de[1].params),nt=de[2]&&de[2].params.length<=2&&!g(de[2].params),Ht=de[3]&&de[3].params.length<=2&&!g(de[3].params),M=de[4]&&de[4].params.length<=2&&!g(de[4].params),Y=de[5]&&de[5].params.length<=2&&!g(de[5].params),le=ct&&wt&&nt&&Ht&&M&&Y;for(let Tt=0;Tt<de.length;++Tt)de[Tt].test=C(de[Tt].params);const ve=ct?b(de[0].params[0]):En,Oe=wt?b(de[1].params[0]):En,Ue=nt?b(de[2].params[0]):En,Hr=Ht?b(de[3].params[0]):En,po=M?b(de[4].params[0]):En,Uc=Y?b(de[5].params[0]):En,vN=ct?b(de[0].params[1]):En,yN=wt?b(de[1].params[1]):En,bN=nt?b(de[2].params[1]):En,wN=Ht?b(de[3].params[1]):En,xN=M?b(de[4].params[1]):En,DN=Y?b(de[5].params[1]):En;for(let Tt=0;Tt<de.length;++Tt)de[Tt].implementation=L(de[Tt].params,de[Tt].fn);const NN=ct?de[0].implementation:Eo,AN=wt?de[1].implementation:Eo,CN=nt?de[2].implementation:Eo,EN=Ht?de[3].implementation:Eo,SN=M?de[4].implementation:Eo,TN=Y?de[5].implementation:Eo,MN=ct?de[0].params.length:-1,FN=wt?de[1].params.length:-1,PN=nt?de[2].params.length:-1,kN=Ht?de[3].params.length:-1,ON=M?de[4].params.length:-1,$N=Y?de[5].params.length:-1,BN=le?6:0,_N=de.length,IN=de.map(Tt=>Tt.test),zN=de.map(Tt=>Tt.implementation),jN=function(){for(let rn=BN;rn<_N;rn++)if(IN[rn](arguments))return zN[rn].apply(this,arguments);return o.onMismatch(O,arguments,de)};function ps(Tt,rn){return arguments.length===MN&&ve(Tt)&&vN(rn)?NN.apply(this,arguments):arguments.length===FN&&Oe(Tt)&&yN(rn)?AN.apply(this,arguments):arguments.length===PN&&Ue(Tt)&&bN(rn)?CN.apply(this,arguments):arguments.length===kN&&Hr(Tt)&&wN(rn)?EN.apply(this,arguments):arguments.length===ON&&po(Tt)&&xN(rn)?SN.apply(this,arguments):arguments.length===$N&&Uc(Tt)&&DN(rn)?TN.apply(this,arguments):jN.apply(this,arguments)}try{Object.defineProperty(ps,"name",{value:O})}catch{}return ps.signatures=ie,ps._typedFunctionData={signatures:de,signatureMap:Ie},ps}function ne(O,q,K){throw F(O,q,K)}function U(O){return J(O,0,O.length-1)}function _(O){return O[O.length-1]}function J(O,q,K){return Array.prototype.slice.call(O,q,K)}function ae(O,q){for(let K=0;K<O.length;K++)if(q(O[K]))return O[K]}function ee(O,q){return Array.prototype.concat.apply([],O.map(q))}function ue(){const O=U(arguments).map(K=>y(x(K))),q=_(arguments);if(typeof q!="function")throw new TypeError("Callback function expected as last argument");return se(O,q)}function se(O,q){return{referTo:{references:O,callback:q}}}function ye(O){if(typeof O!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:O}}}function Se(O){return O&&typeof O.referTo=="object"&&Array.isArray(O.referTo.references)&&typeof O.referTo.callback=="function"}function Fe(O){return O&&typeof O.referToSelf=="object"&&typeof O.referToSelf.callback=="function"}function Ce(O,q){if(!O)return q;if(q&&q!==O){const K=new Error("Function names do not match (expected: "+O+", actual: "+q+")");throw K.data={actual:q,expected:O},K}return O}function ke(O){let q;for(const K in O)Object.prototype.hasOwnProperty.call(O,K)&&(m(O[K])||typeof O[K].signature=="string")&&(q=Ce(q,O[K].name));return q}function je(O,q){let K;for(K in q)if(Object.prototype.hasOwnProperty.call(q,K)){if(K in O&&q[K]!==O[K]){const te=new Error('Signature "'+K+'" is defined twice');throw te.data={signature:K,sourceFunction:q[K],destFunction:O[K]},te}O[K]=q[K]}}const H=o;o=function(O){const q=typeof O=="string",K=q?1:0;let te=q?O:"";const ie={};for(let re=K;re<arguments.length;++re){const pe=arguments[re];let me={},Ne;if(typeof pe=="function"?(Ne=pe.name,typeof pe.signature=="string"?me[pe.signature]=pe:m(pe)&&(me=pe.signatures)):e(pe)&&(me=pe,q||(Ne=ke(pe))),Object.keys(me).length===0){const de=new TypeError("Argument to 'typed' at index "+re+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw de.data={index:re,argument:pe},de}q||(te=Ce(te,Ne)),je(ie,me)}return oe(te||"",ie)},o.create=dx,o.createCount=H.createCount,o.onMismatch=ne,o.throwMismatchError=ne,o.createError=F,o.clear=l,o.clearConversions=c,o.addTypes=u,o._findType=s,o.referTo=ue,o.referToSelf=ye,o.convert=p,o.findSignature=d,o.find=h,o.isTypedFunction=m,o.warnAgainstDeprecatedThis=!0,o.addType=function(O,q){let K="any";q!==!1&&n.has("Object")&&(K="Object"),o.addTypes([O],K)};function X(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};X(O);const K=s(O.to),te=K.conversionsTo.find(ie=>ie.from===O.from);if(te)if(q&&q.override)o.removeConversion({from:te.from,to:O.to,convert:te.convert});else throw new Error('There is already a conversion from "'+O.from+'" to "'+K.name+'"');K.conversionsTo.push({from:O.from,to:K.name,convert:O.convert,index:i++})},o.addConversions=function(O,q){O.forEach(K=>o.addConversion(K,q))},o.removeConversion=function(O){X(O);const q=s(O.to),K=ae(q.conversionsTo,ie=>ie.from===O.from);if(!K)throw new Error("Attempt to remove nonexistent conversion from "+O.from+" to "+O.to);if(K.convert!==O.convert)throw new Error("Conversion to remove does not match existing conversion");const te=q.conversionsTo.indexOf(K);q.conversionsTo.splice(te,1)},o.resolve=function(O,q){if(!m(O))throw new TypeError(t0);const K=O._typedFunctionData.signatures;for(let te=0;te<K.length;++te)if(K[te].test(q))return K[te];return null},o}const Jl=dx();function I(e,t,r,n){function a(i){var o=f8(i,t.map(g8));return h8(e,t,i),r(o)}return a.isFactory=!0,a.fn=e,a.dependencies=t.slice().sort(),n&&(a.meta=n),a}function h8(e,t,r){var n=t.filter(i=>!p8(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 p8(e){return e&&e[0]==="?"}function g8(e){return e&&e[0]==="?"?e.slice(1):e}function Pe(e){return typeof e=="boolean"?!0:Number.isFinite(e)?e===Math.round(e):!1}function bi(e,t){if(t.number==="bigint")try{BigInt(e)}catch{return t.numberFallback}return t.number}var oi=Math.sign||function(e){return e>0?1:e<0?-1:0},v8=Math.log2||function(t){return Math.log(t)/Math.LN2},y8=Math.log10||function(t){return Math.log(t)/Math.LN10},b8=Math.log1p||function(e){return Math.log(e+1)},w8=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},x8=Math.expm1||function(t){return t>=2e-4||t<=-2e-4?Math.exp(t)-1:t+t*t/2+t*t*t/6};function _f(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(!Pe(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(!Pe(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 Yi(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}=hx(t);switch(r){case"fixed":return px(e,n);case"exponential":return gx(e,n);case"engineering":return D8(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":return N8(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 hx(e){var t="auto",r,n;if(e!==void 0)if(qe(e))r=e;else if(Qe(e))r=e.toNumber();else if(Cc(e))e.precision!==void 0&&(r=r0(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=r0(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 su(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 D8(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var r=su(e),n=Sc(r,t),a=n.exponent,i=n.coefficients,o=a%3===0?a:a<0?a-3-a%3:a-a%3;if(qe(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=qe(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 px(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var r=su(e),n=typeof t=="number"?Sc(r,r.exponent+1+t):r,a=n.coefficients,i=n.exponent+1,o=i+(t||0);return a.length<o&&(a=a.concat(Ho(o-a.length))),i<0&&(a=Ho(-i+1).concat(a),i=1),i<a.length&&a.splice(i,0,i===0?"0.":"."),n.sign+a.join("")}function gx(e,t){if(isNaN(e)||!Number.isFinite(Number(e)))return String(e);var r=su(e),n=t?Sc(r,t):r,a=n.coefficients,i=n.exponent;a.length<t&&(a=a.concat(Ho(t-a.length)));var o=a.shift();return n.sign+o+(a.length>0?"."+a.join(""):"")+"e"+(i>=0?"+":"")+i}function N8(e,t,r){if(isNaN(e)||!Number.isFinite(e))return String(e);var n=n0(r?.lowerExp,-3),a=n0(r?.upperExp,5),i=su(e),o=t?Sc(i,t):i;if(o.exponent<n||o.exponent>=a)return gx(e,t);var s=o.coefficients,u=o.exponent;s.length<t&&(s=s.concat(Ho(t-s.length))),s=s.concat(Ho(u-s.length+1+(s.length<t?t-s.length:0))),s=Ho(-u).concat(s);var l=u>0?u:0;return l<s.length-1&&s.splice(l+1,0,"."),o.sign+s.join("")}function Sc(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 Ho(e){for(var t=[],r=0;r<e;r++)t.push(0);return t}function A8(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}function Er(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 C8=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},E8=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},S8=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},T8=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},M8=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},F8=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function P8(e,t){var r=!0,n=t>0?!0:t<0?!1:1/t===1/0;return r^n?-e:e}function r0(e,t){if(qe(e))return e;if(Qe(e))return e.toNumber();t()}function n0(e,t){return qe(e)?e:Qe(e)?e.toNumber():t}var vx=function(){return vx=Jl.create,Jl},k8=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],O8=I("typed",k8,function(t){var{BigNumber:r,Complex:n,DenseMatrix:a,Fraction:i}=t,o=vx();return o.clear(),o.addTypes([{name:"number",test:qe},{name:"Complex",test:Ia},{name:"BigNumber",test:Qe},{name:"bigint",test:_s},{name:"Fraction",test:iu},{name:"Unit",test:pn},{name:"identifier",test:s=>Qt&&/^(?:[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:Qt},{name:"Chain",test:fx},{name:"Array",test:Ft},{name:"Matrix",test:Le},{name:"DenseMatrix",test:Wl},{name:"SparseMatrix",test:Wi},{name:"Range",test:Ed},{name:"Index",test:Ac},{name:"boolean",test:Q6},{name:"ResultSet",test:X6},{name:"Help",test:ux},{name:"function",test:lx},{name:"Date",test:e8},{name:"RegExp",test:t8},{name:"null",test:r8},{name:"undefined",test:n8},{name:"AccessorNode",test:La},{name:"ArrayNode",test:Pn},{name:"AssignmentNode",test:a8},{name:"BlockNode",test:i8},{name:"ConditionalNode",test:o8},{name:"ConstantNode",test:mt},{name:"FunctionNode",test:hi},{name:"FunctionAssignmentNode",test:ou},{name:"IndexNode",test:ns},{name:"Node",test:St},{name:"ObjectNode",test:Ec},{name:"OperatorNode",test:tr},{name:"ParenthesisNode",test:Ha},{name:"RangeNode",test:s8},{name:"RelationalNode",test:u8},{name:"SymbolNode",test:Nr},{name:"Map",test:cx},{name:"Object",test:Cc}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(u){if(r||nl(u),A8(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||al(u),new n(u,0)}},{from:"BigNumber",to:"Complex",convert:function(u){return n||al(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||nl(u),new r(u.toString())}},{from:"bigint",to:"Fraction",convert:function(u){return i||il(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||al(u),new n(u.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(u){i||il(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||nl(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||il(u);try{return new i(u)}catch{throw new Error('Cannot convert "'+u+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(u){n||al(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||nl(u),new r(+u)}},{from:"boolean",to:"bigint",convert:function(u){return BigInt(+u)}},{from:"boolean",to:"Fraction",convert:function(u){return i||il(u),new i(+u)}},{from:"boolean",to:"string",convert:function(u){return String(u)}},{from:"Array",to:"Matrix",convert:function(u){return a||$8(),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&&yn(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&&yn(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 nl(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function al(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function $8(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function il(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var B8="ResultSet",_8=[],I8=I(B8,_8,()=>{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 zo=9e15,wi=1e9,jm="0123456789abcdef",Kl="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Yl="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",qm={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-zo,maxE:zo,crypto:!1},yx,Ba,Ze=!0,Tc="[DecimalError] ",pi=Tc+"Invalid argument: ",bx=Tc+"Precision limit exceeded",wx=Tc+"crypto unavailable",xx="[object Decimal]",jr=Math.floor,cr=Math.pow,z8=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,j8=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,q8=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Dx=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Zn=1e7,Ge=7,R8=9007199254740991,L8=Kl.length-1,Rm=Yl.length-1,ge={toStringTag:xx};ge.absoluteValue=ge.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),Re(e)};ge.ceil=function(){return Re(new this.constructor(this),this.e+1,2)};ge.clampedTo=ge.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(pi+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new a(n)};ge.comparedTo=ge.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};ge.cosine=ge.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())+Ge,n.rounding=1,r=H8(n,Sx(n,r)),n.precision=e,n.rounding=t,Re(Ba==2||Ba==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};ge.cubeRoot=ge.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(Ze=!1,i=c.s*cr(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=Mr(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=cr(r,1/3),e=jr((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=zt(l.plus(c).times(s),l.plus(u),o+2,1),Mr(s.d).slice(0,o)===(r=Mr(n.d)).slice(0,o))if(r=r.slice(o-3,o+1),r=="9999"||!a&&r=="4999"){if(!a&&(Re(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")&&(Re(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return Ze=!0,Re(n,e,f.rounding,t)};ge.decimalPlaces=ge.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-jr(this.e/Ge))*Ge,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};ge.dividedBy=ge.div=function(e){return zt(this,new this.constructor(e))};ge.dividedToIntegerBy=ge.divToInt=function(e){var t=this,r=t.constructor;return Re(zt(t,new r(e),0,1,1),r.precision,r.rounding)};ge.equals=ge.eq=function(e){return this.cmp(e)===0};ge.floor=function(){return Re(new this.constructor(this),this.e+1,3)};ge.greaterThan=ge.gt=function(e){return this.cmp(e)>0};ge.greaterThanOrEqualTo=ge.gte=function(e){var t=this.cmp(e);return t==1||t===0};ge.hyperbolicCosine=ge.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/Fc(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Jo(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 Re(i,o.precision=r,o.rounding=n,!0)};ge.hyperbolicSine=ge.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=Jo(i,2,a,a,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,a=a.times(1/Fc(5,e)),a=Jo(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,Re(a,t,r,!0)};ge.hyperbolicTangent=ge.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,zt(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};ge.inverseCosine=ge.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()?ca(t,n,a):new t(0):new t(NaN):e.isZero()?ca(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))};ge.inverseHyperbolicCosine=ge.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,Ze=!1,r=r.times(r).minus(1).sqrt().plus(r),Ze=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};ge.inverseHyperbolicSine=ge.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,Ze=!1,r=r.times(r).plus(1).sqrt().plus(r),Ze=!0,n.precision=e,n.rounding=t,r.ln())};ge.inverseHyperbolicTangent=ge.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?Re(new i(a),e,t,!0):(i.precision=r=n-a.e,a=zt(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)};ge.inverseSine=ge.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=ca(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)))};ge.inverseTangent=ge.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<=Rm)return o=ca(c,f+4,m).times(.25),o.s=l.s,o}else{if(!l.s)return new c(NaN);if(f+4<=Rm)return o=ca(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/Ge+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(Ze=!1,t=Math.ceil(s/Ge),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)),Ze=!0,Re(o,c.precision=f,c.rounding=m,!0)};ge.isFinite=function(){return!!this.d};ge.isInteger=ge.isInt=function(){return!!this.d&&jr(this.e/Ge)>this.d.length-2};ge.isNaN=function(){return!this.s};ge.isNegative=ge.isNeg=function(){return this.s<0};ge.isPositive=ge.isPos=function(){return this.s>0};ge.isZero=function(){return!!this.d&&this.d[0]===0};ge.lessThan=ge.lt=function(e){return this.cmp(e)<0};ge.lessThanOrEqualTo=ge.lte=function(e){return this.cmp(e)<1};ge.logarithm=ge.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(Ze=!1,s=f+d,o=si(l,s),n=t?Zl(c,s+10):si(e,s),u=zt(o,n,s,1),Ws(u.d,a=f,m))do if(s+=10,o=si(l,s),n=t?Zl(c,s+10):si(e,s),u=zt(o,n,s,1),!i){+Mr(u.d).slice(a+1,a+15)+1==1e14&&(u=Re(u,f+1,0));break}while(Ws(u.d,a+=10,m));return Ze=!0,Re(u,f,m)};ge.minus=ge.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 Ze?Re(e,s,u):e}if(r=jr(e.e/Ge),c=jr(d.e/Ge),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/Ge),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]=Zn-1;--l[a],l[n]+=Zn}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=Mc(l,r),Ze?Re(e,s,u):e):new h(u===3?-0:0)};ge.modulo=ge.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]?Re(new n(r),n.precision,n.rounding):(Ze=!1,n.modulo==9?(t=zt(r,e.abs(),0,3,1),t.s*=e.s):t=zt(r,e,0,n.modulo,1),t=t.times(e),Ze=!0,r.minus(t))};ge.naturalExponential=ge.exp=function(){return Lm(this)};ge.naturalLogarithm=ge.ln=function(){return si(this)};ge.negated=ge.neg=function(){var e=new this.constructor(this);return e.s=-e.s,Re(e)};ge.plus=ge.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)),Ze?Re(e,s,u):e;if(i=jr(f.e/Ge),n=jr(e.e/Ge),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/Ge),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)/Zn|0,l[a]%=Zn;for(t&&(l.unshift(t),++n),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=Mc(l,n),Ze?Re(e,s,u):e};ge.precision=ge.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(pi+e);return r.d?(t=Nx(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};ge.round=function(){var e=this,t=e.constructor;return Re(new t(e),e.e+1,t.rounding)};ge.sine=ge.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())+Ge,n.rounding=1,r=V8(n,Sx(n,r)),n.precision=e,n.rounding=t,Re(Ba>2?r.neg():r,e,t,!0)):new n(NaN)};ge.squareRoot=ge.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(Ze=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=Mr(s),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=jr((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(zt(o,i,r+2,1)).times(.5),Mr(i.d).slice(0,r)===(t=Mr(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!a&&t=="4999"){if(!a&&(Re(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")&&(Re(n,u+1,1),e=!n.times(n).eq(o));break}return Ze=!0,Re(n,u,c.rounding,e)};ge.tangent=ge.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=zt(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,Re(Ba==2||Ba==4?r.neg():r,e,t,!0)):new n(NaN)};ge.times=ge.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=jr(c.e/Ge)+jr(e.e/Ge),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%Zn|0,t=s/Zn|0;i[a]=(i[a]+t)%Zn|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=Mc(i,r),Ze?Re(e,f.precision,f.rounding):e};ge.toBinary=function(e,t){return Sd(this,2,e,t)};ge.toDecimalPlaces=ge.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ln(e,0,wi),t===void 0?t=n.rounding:ln(t,0,8),Re(r,e+r.e+1,t))};ge.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=da(n,!0):(ln(e,0,wi),t===void 0?t=a.rounding:ln(t,0,8),n=Re(new a(n),e+1,t),r=da(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};ge.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?r=da(a):(ln(e,0,wi),t===void 0?t=i.rounding:ln(t,0,8),n=Re(new i(a),e+a.e+1,t),r=da(n,!1,e+n.e+1)),a.isNeg()&&!a.isZero()?"-"+r:r};ge.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=Nx(h)-d.e-1,o=i%Ge,t.d[0]=cr(10,o<0?Ge+o:o),e==null)e=i>0?t:l;else{if(s=new p(e),!s.isInt()||s.lt(l))throw Error(pi+s);e=s.gt(t)?i>0?t:l:s}for(Ze=!1,s=new p(Mr(h)),c=p.precision,p.precision=i=h.length*Ge*2;f=zt(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=zt(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=zt(l,n,i,1).minus(d).abs().cmp(zt(u,r,i,1).minus(d).abs())<1?[l,n]:[u,r],p.precision=c,Ze=!0,m};ge.toHexadecimal=ge.toHex=function(e,t){return Sd(this,16,e,t)};ge.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:ln(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]?(Ze=!1,r=zt(r,e,0,t,1).times(e),Ze=!0,Re(r)):(e.s=r.s,r=e),r};ge.toNumber=function(){return+this};ge.toOctal=function(e,t){return Sd(this,8,e,t)};ge.toPower=ge.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(cr(+s,l));if(s=new u(s),s.eq(1))return s;if(n=u.precision,i=u.rounding,e.eq(1))return Re(s,n,i);if(t=jr(e.e/Ge),t>=e.d.length-1&&(r=l<0?-l:l)<=R8)return a=Ax(u,s,r,n),e.s<0?new u(1).div(a):Re(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=cr(+s,l),t=r==0||!isFinite(r)?jr(l*(Math.log("0."+Mr(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):(Ze=!1,u.rounding=s.s=1,r=Math.min(12,(t+"").length),a=Lm(e.times(si(s,n+r)),n),a.d&&(a=Re(a,n+5,1),Ws(a.d,n,i)&&(t=n+10,a=Re(Lm(e.times(si(s,t+r)),t),t+5,1),+Mr(a.d).slice(n+1,n+15)+1==1e14&&(a=Re(a,n+1,0)))),a.s=o,Ze=!0,u.rounding=i,Re(a,n,i))};ge.toPrecision=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=da(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(ln(e,1,wi),t===void 0?t=a.rounding:ln(t,0,8),n=Re(new a(n),e,t),r=da(n,e<=n.e||n.e<=a.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};ge.toSignificantDigits=ge.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ln(e,1,wi),t===void 0?t=n.rounding:ln(t,0,8)),Re(new n(r),e,t)};ge.toString=function(){var e=this,t=e.constructor,r=da(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};ge.truncated=ge.trunc=function(){return Re(new this.constructor(this),this.e+1,1)};ge.valueOf=ge.toJSON=function(){var e=this,t=e.constructor,r=da(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Mr(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=Ge-n.length,r&&(i+=ei(r)),i+=n;o=e[t],n=o+"",r=Ge-n.length,r&&(i+=ei(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function ln(e,t,r){if(e!==~~e||e<t||e>r)throw Error(pi+e)}function Ws(e,t,r,n){var a,i,o,s;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=Ge,a=0):(a=Math.ceil((t+1)/Ge),t%=Ge),i=cr(10,Ge-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)==cr(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)==cr(10,t-3)-1,o}function Ml(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]+=jm.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 H8(e,t){var r,n,a;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),a=(1/Fc(4,r)).toString()):(r=16,a="2.3283064365386962890625e-10"),e.precision+=r,t=Jo(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 zt=(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,$=n.s==a.s?1:-1,R=n.d,T=a.d;if(!R||!R[0]||!T||!T[0])return new k(!n.s||!a.s||(R?T&&R[0]==T[0]:!T)?NaN:R&&R[0]==0||!T?$*0:$/0);for(u?(d=1,c=n.e-a.e):(u=Zn,d=Ge,c=jr(n.e/d)-jr(a.e/d)),S=T.length,A=R.length,w=new k($),D=w.d=[],f=0;T[f]==(R[f]||0);f++);if(T[f]>(R[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,T=T[0],b++;(f<A||m)&&b--;f++)C=m*u+(R[f]||0),D[f]=C/T|0,m=C%T|0;h=m||f<A}else{for(m=u/(T[0]+1)|0,m>1&&(T=e(T,m,u),R=e(R,m,u),S=T.length,A=R.length),N=S,v=R.slice(0,S),x=v.length;x<S;)v[x++]=0;F=T.slice(),F.unshift(0),E=T[0],T[1]>=u/2&&++E;do m=0,l=t(T,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(T,m,u),y=p.length,x=v.length,l=t(p,v,y,x),l==1&&(m--,r(p,S<y?F:T,y,u))):(m==0&&(l=m=1),p=T.slice()),y=p.length,y<x&&p.unshift(0),r(v,p,x,u),l==-1&&(x=v.length,l=t(T,v,S,x),l<1&&(m++,r(v,S<x?F:T,x,u))),x=v.length):l===0&&(m++,v=[0]),D[f++]=m,l&&v[0]?v[x++]=R[N]||0:(v=[R[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,yx=h;else{for(f=1,m=D[0];m>=10;m/=10)f++;w.e=f+c*d-1,Re(w,s?i+w.e+1:i,o,h)}return w}})();function Re(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+=Ge,o=t,c=f[m=0],u=c/cr(10,a-o-1)%10|0;else if(m=Math.ceil((i+1)/Ge),s=f.length,m>=s)if(n){for(;s++<=m;)f.push(0);c=u=0,a=1,i%=Ge,o=i-Ge+1}else break e;else{for(c=s=f[m],a=1;s>=10;s/=10)a++;i%=Ge,o=i-Ge+a,u=o<0?0:c/cr(10,a-o-1)%10|0}if(n=n||t<0||f[m+1]!==void 0||(o<0?c:c%cr(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/cr(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]=cr(10,(Ge-t%Ge)%Ge),e.e=-t||0):f[0]=e.e=0,e;if(i==0?(f.length=m,s=1,m--):(f.length=m+1,s=cr(10,Ge-i),f[m]=o>0?(c/cr(10,a-o)%cr(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]==Zn&&(f[0]=1));break}else{if(f[m]+=s,f[m]!=Zn)break;f[m--]=0,s=1}for(i=f.length;f[--i]===0;)f.pop()}return Ze&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function da(e,t,r){if(!e.isFinite())return Ex(e);var n,a=e.e,i=Mr(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+ei(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):a<0?(i="0."+ei(-a-1)+i,r&&(n=r-o)>0&&(i+=ei(n))):a>=o?(i+=ei(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+ei(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=ei(n))),i}function Mc(e,t){var r=e[0];for(t*=Ge;r>=10;r/=10)t++;return t}function Zl(e,t,r){if(t>L8)throw Ze=!0,r&&(e.precision=r),Error(bx);return Re(new e(Kl),t,1,!0)}function ca(e,t,r){if(t>Rm)throw Error(bx);return Re(new e(Yl),t,r,!0)}function Nx(e){var t=e.length-1,r=t*Ge+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 ei(e){for(var t="";e--;)t+="0";return t}function Ax(e,t,r,n){var a,i=new e(1),o=Math.ceil(n/Ge+4);for(Ze=!1;;){if(r%2&&(i=i.times(t),i0(i.d,o)&&(a=!0)),r=jr(r/2),r===0){r=i.d.length-1,a&&i.d[r]===0&&++i.d[r];break}t=t.times(t),i0(t.d,o)}return Ze=!0,i}function a0(e){return e.d[e.d.length-1]&1}function Cx(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 Lm(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?(Ze=!1,u=h):u=t,s=new m(.03125);e.e>-2;)e=e.times(s),f+=5;for(n=Math.log(cr(2,f))/Math.LN10*2+5|0,u+=n,r=i=o=new m(1),m.precision=u;;){if(i=Re(i.times(e),u,1),r=r.times(++c),s=o.plus(zt(i,r,u,1)),Mr(s.d).slice(0,u)===Mr(o.d).slice(0,u)){for(a=f;a--;)o=Re(o.times(o),u,1);if(t==null)if(l<3&&Ws(o.d,u-n,d,l))m.precision=u+=10,r=i=s=new m(1),c=0,l++;else return Re(o,m.precision=h,d,Ze=!0);else return m.precision=h,o}o=s}}function si(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?(Ze=!1,c=v):c=t,w.precision=c+=h,r=Mr(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=Mr(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=Zl(w,c+2,v).times(i+""),p=si(new w(n+"."+r.slice(1)),c-h).plus(l),w.precision=v,t==null?Re(p,v,D,Ze=!0):p;for(f=p,u=o=p=zt(p.minus(1),p.plus(1),c,1),m=Re(p.times(p),c,1),a=3;;){if(o=Re(o.times(m),c,1),l=u.plus(zt(o,new w(a),c,1)),Mr(l.d).slice(0,c)===Mr(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(Zl(w,c+2,v).times(i+""))),u=zt(u,new w(d),c,1),t==null)if(Ws(u.d,c-h,D,s))w.precision=c+=h,l=o=p=zt(f.minus(1),f.plus(1),c,1),m=Re(p.times(p),c,1),a=s=1;else return Re(u,w.precision=v,D,Ze=!0);else return w.precision=v,u;u=l,a+=2}}function Ex(e){return String(e.s*e.s/0)}function Fl(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)%Ge,r<0&&(n+=Ge),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Ge;n<a;)e.d.push(+t.slice(n,n+=Ge));t=t.slice(n),n=Ge-t.length}else n-=a;for(;n--;)t+="0";e.d.push(+t),Ze&&(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 G8(e,t){var r,n,a,i,o,s,u,l,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Dx.test(t))return Fl(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(j8.test(t))r=16,t=t.toLowerCase();else if(z8.test(t))r=2;else if(q8.test(t))r=8;else throw Error(pi+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=Ax(n,new n(r),i,i*2)),l=Ml(t,r,Zn),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=Mc(l,c),e.d=l,Ze=!1,o&&(e=zt(e,a,s*4)),u&&(e=e.times(Math.abs(u)<54?cr(2,u):gi.pow(2,u))),Ze=!0,e)}function V8(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Jo(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Fc(5,r)),t=Jo(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 Jo(e,t,r,n,a){var i,o,s,u,l=e.precision,c=Math.ceil(l/Ge);for(Ze=!1,u=r.times(r),s=new e(n);;){if(o=zt(s.times(u),new e(t++*t++),l,1),s=a?n.plus(o):n.minus(o),n=zt(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 Ze=!0,o.d.length=c+1,o}function Fc(e,t){for(var r=e;--t;)r*=e;return r}function Sx(e,t){var r,n=t.s<0,a=ca(e,e.precision,1),i=a.times(.5);if(t=t.abs(),t.lte(i))return Ba=n?4:1,t;if(r=t.divToInt(a),r.isZero())Ba=n?3:2;else{if(t=t.minus(r.times(a)),t.lte(i))return Ba=a0(r)?n?2:3:n?4:1,t;Ba=a0(r)?n?1:4:n?3:2}return t.minus(a).abs()}function Sd(e,t,r,n){var a,i,o,s,u,l,c,f,m,d=e.constructor,h=r!==void 0;if(h?(ln(r,1,wi),n===void 0?n=d.rounding:ln(n,0,8)):(r=d.precision,n=d.rounding),!e.isFinite())c=Ex(e);else{for(c=da(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=Ml(da(m),10,a),m.e=m.d.length),f=Ml(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=zt(e,m,r,n,0,a),f=e.d,i=e.e,l=yx),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+=jm.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=Ml(c,a,t),u=f.length;!f[u-1];--u);for(o=1,c="1.";o<u;o++)c+=jm.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 i0(e,t){if(e.length>t)return e.length=t,!0}function U8(e){return new this(e).abs()}function W8(e){return new this(e).acos()}function J8(e){return new this(e).acosh()}function K8(e,t){return new this(e).plus(t)}function Y8(e){return new this(e).asin()}function Z8(e){return new this(e).asinh()}function Q8(e){return new this(e).atan()}function X8(e){return new this(e).atanh()}function e9(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=ca(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ca(this,n,a):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ca(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(zt(e,t,i,1)),t=ca(this,i,1),this.precision=n,this.rounding=a,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(zt(e,t,i,1)),r}function t9(e){return new this(e).cbrt()}function r9(e){return Re(e=new this(e),e.e+1,2)}function n9(e,t,r){return new this(e).clamp(t,r)}function a9(e){if(!e||typeof e!="object")throw Error(Tc+"Object expected");var t,r,n,a=e.defaults===!0,i=["precision",1,wi,"rounding",0,8,"toExpNeg",-zo,0,"toExpPos",0,zo,"maxE",0,zo,"minE",-zo,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(r=i[t],a&&(this[r]=qm[r]),(n=e[r])!==void 0)if(jr(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(pi+r+": "+n);if(r="crypto",a&&(this[r]=qm[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(wx);else this[r]=!1;else throw Error(pi+r+": "+n);return this}function i9(e){return new this(e).cos()}function o9(e){return new this(e).cosh()}function Tx(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,o0(i)){l.s=i.s,Ze?!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++;Ze?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 Fl(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),Dx.test(i)?Fl(l,i):G8(l,i);if(u==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,Fl(l,i.toString());throw Error(pi+i)}if(a.prototype=ge,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=a9,a.clone=Tx,a.isDecimal=o0,a.abs=U8,a.acos=W8,a.acosh=J8,a.add=K8,a.asin=Y8,a.asinh=Z8,a.atan=Q8,a.atanh=X8,a.atan2=e9,a.cbrt=t9,a.ceil=r9,a.clamp=n9,a.cos=i9,a.cosh=o9,a.div=s9,a.exp=u9,a.floor=l9,a.hypot=c9,a.ln=f9,a.log=m9,a.log10=h9,a.log2=d9,a.max=p9,a.min=g9,a.mod=v9,a.mul=y9,a.pow=b9,a.random=w9,a.round=x9,a.sign=D9,a.sin=N9,a.sinh=A9,a.sqrt=C9,a.sub=E9,a.sum=S9,a.tan=T9,a.tanh=M9,a.trunc=F9,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 s9(e,t){return new this(e).div(t)}function u9(e){return new this(e).exp()}function l9(e){return Re(e=new this(e),e.e+1,3)}function c9(){var e,t,r=new this(0);for(Ze=!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 Ze=!0,new this(1/0);r=t}return Ze=!0,r.sqrt()}function o0(e){return e instanceof gi||e&&e.toStringTag===xx||!1}function f9(e){return new this(e).ln()}function m9(e,t){return new this(e).log(t)}function d9(e){return new this(e).log(2)}function h9(e){return new this(e).log(10)}function p9(){return Cx(this,arguments,-1)}function g9(){return Cx(this,arguments,1)}function v9(e,t){return new this(e).mod(t)}function y9(e,t){return new this(e).mul(t)}function b9(e,t){return new this(e).pow(t)}function w9(e){var t,r,n,a,i=0,o=new this(1),s=[];if(e===void 0?e=this.precision:ln(e,1,wi),n=Math.ceil(e/Ge),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(wx);else for(;i<n;)s[i++]=Math.random()*1e7|0;for(n=s[--i],e%=Ge,n&&e&&(a=cr(10,Ge-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-=Ge)s.shift();for(n=1,a=s[0];a>=10;a/=10)n++;n<Ge&&(r-=Ge-n)}return o.e=r,o.d=s,o}function x9(e){return Re(e=new this(e),e.e+1,this.rounding)}function D9(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function N9(e){return new this(e).sin()}function A9(e){return new this(e).sinh()}function C9(e){return new this(e).sqrt()}function E9(e,t){return new this(e).sub(t)}function S9(){var e=0,t=arguments,r=new this(t[e]);for(Ze=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return Ze=!0,Re(r,this.precision,this.rounding)}function T9(e){return new this(e).tan()}function M9(e){return new this(e).tanh()}function F9(e){return Re(e=new this(e),e.e+1,1)}ge[Symbol.for("nodejs.util.inspect.custom")]=ge.toString;ge[Symbol.toStringTag]="Decimal";var gi=ge.constructor=Tx(qm);Kl=new gi(Kl);Yl=new gi(Yl);var P9="BigNumber",k9=["?on","config"],O9=I(P9,k9,e=>{var{on:t,config:r}=e,n=gi.clone({precision:r.precision,modulo:gi.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 _r=Math.cosh||function(e){return Math.abs(e)<1e-9?1-e:(Math.exp(e)+Math.exp(-e))*.5},Sn=Math.sinh||function(e){return Math.abs(e)<1e-9?e:(Math.exp(e)-Math.exp(-e))*.5},$9=e=>{const t=Math.sin(.5*e);return-2*t*t},If=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))},So=function(){throw SyntaxError("Invalid Param")};function zf(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 B9={re:0,im:0},ji=function(e,t){const r=B9;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 ce.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 ce.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]):So();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&&So();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&&So(),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))&&So(),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&&So();break;case"number":r.im=0,r.re=e;break;default:So()}return isNaN(r.re)||isNaN(r.im),r};function ce(e,t){if(!(this instanceof ce))return new ce(e,t);const r=ji(e,t);this.re=r.re,this.im=r.im}ce.prototype={re:0,im:0,sign:function(){const e=If(this.re,this.im);return new ce(this.re/e,this.im/e)},add:function(e,t){const r=ji(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im));return n||a?n&&a?ce.NAN:ce.INFINITY:new ce(this.re+r.re,this.im+r.im)},sub:function(e,t){const r=ji(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im));return n||a?n&&a?ce.NAN:ce.INFINITY:new ce(this.re-r.re,this.im-r.im)},mul:function(e,t){const r=ji(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?ce.NAN:n||a?ce.INFINITY:r.im===0&&this.im===0?new ce(this.re*r.re,0):new ce(this.re*r.re-this.im*r.im,this.re*r.im+this.im*r.re)},div:function(e,t){const r=ji(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 ce.NAN;if(o||n)return ce.INFINITY;if(i||a)return ce.ZERO;if(r.im===0)return new ce(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 ce((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 ce((this.re+this.im*s)/u,(this.im-this.re*s)/u)}},pow:function(e,t){const r=ji(e,t),n=this.re===0&&this.im===0;if(r.re===0&&r.im===0)return ce.ONE;if(r.im===0){if(this.im===0&&this.re>0)return new ce(Math.pow(this.re,r.re),0);if(this.re===0)switch((r.re%4+4)%4){case 0:return new ce(Math.pow(this.im,r.re),0);case 1:return new ce(0,Math.pow(this.im,r.re));case 2:return new ce(-Math.pow(this.im,r.re),0);case 3:return new ce(0,-Math.pow(this.im,r.re))}}if(n&&r.re>0)return ce.ZERO;const i=Math.atan2(this.im,this.re),o=zf(this.re,this.im);let s=Math.exp(r.re*o-r.im*i),u=r.im*o+r.re*i;return new ce(s*Math.cos(u),s*Math.sin(u))},sqrt:function(){const e=this.re,t=this.im;if(t===0)return e>=0?new ce(Math.sqrt(e),0):new ce(0,Math.sqrt(-e));const r=If(e,t);let n=Math.sqrt(.5*(r+Math.abs(e))),a=Math.abs(t)/(2*n);return e>=0?new ce(n,t<0?-a:a):new ce(a,t<0?-n:n)},exp:function(){const e=Math.exp(this.re);return this.im===0?new ce(e,0):new ce(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){const e=this.re,t=this.im;return new ce(Math.expm1(e)*Math.cos(t)+$9(t),Math.exp(e)*Math.sin(t))},log:function(){const e=this.re,t=this.im;return t===0&&e>0?new ce(Math.log(e),0):new ce(zf(e,t),Math.atan2(t,e))},abs:function(){return If(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){const e=this.re,t=this.im;return new ce(Math.sin(e)*_r(t),Math.cos(e)*Sn(t))},cos:function(){const e=this.re,t=this.im;return new ce(Math.cos(e)*_r(t),-Math.sin(e)*Sn(t))},tan:function(){const e=2*this.re,t=2*this.im,r=Math.cos(e)+_r(t);return new ce(Math.sin(e)/r,Sn(t)/r)},cot:function(){const e=2*this.re,t=2*this.im,r=Math.cos(e)-_r(t);return new ce(-Math.sin(e)/r,Sn(t)/r)},sec:function(){const e=this.re,t=this.im,r=.5*_r(2*t)+.5*Math.cos(2*e);return new ce(Math.cos(e)*_r(t)/r,Math.sin(e)*Sn(t)/r)},csc:function(){const e=this.re,t=this.im,r=.5*_r(2*t)-.5*Math.cos(2*e);return new ce(Math.sin(e)*_r(t)/r,-Math.cos(e)*Sn(t)/r)},asin:function(){const e=this.re,t=this.im,r=new ce(t*t-e*e+1,-2*e*t).sqrt(),n=new ce(r.re-t,r.im+e).log();return new ce(n.im,-n.re)},acos:function(){const e=this.re,t=this.im,r=new ce(t*t-e*e+1,-2*e*t).sqrt(),n=new ce(r.re-t,r.im+e).log();return new ce(Math.PI/2-n.im,n.re)},atan:function(){const e=this.re,t=this.im;if(e===0){if(t===1)return new ce(0,1/0);if(t===-1)return new ce(0,-1/0)}const r=e*e+(1-t)*(1-t),n=new ce((1-t*t-e*e)/r,-2*e/r).log();return new ce(-.5*n.im,.5*n.re)},acot:function(){const e=this.re,t=this.im;if(t===0)return new ce(Math.atan2(1,e),0);const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).atan():new ce(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 ce(0,1/0);const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).acos():new ce(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 ce(Math.PI/2,1/0);const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).asin():new ce(e!==0?e/0:0,t!==0?-t/0:0).asin()},sinh:function(){const e=this.re,t=this.im;return new ce(Sn(e)*Math.cos(t),_r(e)*Math.sin(t))},cosh:function(){const e=this.re,t=this.im;return new ce(_r(e)*Math.cos(t),Sn(e)*Math.sin(t))},tanh:function(){const e=2*this.re,t=2*this.im,r=_r(e)+Math.cos(t);return new ce(Sn(e)/r,Math.sin(t)/r)},coth:function(){const e=2*this.re,t=2*this.im,r=_r(e)-Math.cos(t);return new ce(Sn(e)/r,-Math.sin(t)/r)},csch:function(){const e=this.re,t=this.im,r=Math.cos(2*t)-_r(2*e);return new ce(-2*Sn(e)*Math.cos(t)/r,2*_r(e)*Math.sin(t)/r)},sech:function(){const e=this.re,t=this.im,r=Math.cos(2*t)+_r(2*e);return new ce(2*_r(e)*Math.cos(t)/r,-2*Sn(e)*Math.sin(t)/r)},asinh:function(){const e=this.re,t=this.im;if(t===0){if(e===0)return new ce(0,0);const i=Math.abs(e),o=Math.log(i+Math.sqrt(i*i+1));return new ce(e<0?-o:o,0)}const r=e*e-t*t+1,n=2*e*t,a=new ce(r,n).sqrt();return new ce(e+a.re,t+a.im).log()},acosh:function(){const e=this.re,t=this.im;if(t===0){if(e>1)return new ce(Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1)),0);if(e<-1){const a=Math.sqrt(e*e-1);return new ce(Math.log(-e+a),Math.PI)}return new ce(0,Math.acos(e))}const r=new ce(e-1,t).sqrt(),n=new ce(e+1,t).sqrt();return new ce(e+r.re*n.re-r.im*n.im,t+r.re*n.im+r.im*n.re).log()},atanh:function(){const e=this.re,t=this.im;if(t===0){if(e===0)return new ce(0,0);if(e===1)return new ce(1/0,0);if(e===-1)return new ce(-1/0,0);if(-1<e&&e<1)return new ce(.5*Math.log((1+e)/(1-e)),0);if(e>1){const u=(e+1)/(e-1);return new ce(.5*Math.log(u),-Math.PI/2)}const s=(1+e)/(1-e);return new ce(.5*Math.log(-s),Math.PI/2)}const r=1-e,n=1+e,a=r*r+t*t;if(a===0)return new ce(e!==-1?e/0:0,t!==0?t/0:0);const i=(n*r-t*t)/a,o=(t*r+n*t)/a;return new ce(zf(i,o)/2,Math.atan2(o,i)/2)},acoth:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new ce(0,Math.PI/2);const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).atanh():new ce(e!==0?e/0:0,t!==0?-t/0:0).atanh()},acsch:function(){const e=this.re,t=this.im;if(t===0){if(e===0)return new ce(1/0,0);const n=1/e;return new ce(Math.log(n+Math.sqrt(n*n+1)),0)}const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).asinh():new ce(e!==0?e/0:0,t!==0?-t/0:0).asinh()},asech:function(){const e=this.re,t=this.im;if(this.isZero())return ce.INFINITY;const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).acosh():new ce(e!==0?e/0:0,t!==0?-t/0:0).acosh()},inverse:function(){if(this.isZero())return ce.INFINITY;if(this.isInfinite())return ce.ZERO;const e=this.re,t=this.im,r=e*e+t*t;return new ce(e/r,-t/r)},conjugate:function(){return new ce(this.re,-this.im)},neg:function(){return new ce(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new ce(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new ce(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new ce(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){const r=ji(e,t);return Math.abs(r.re-this.re)<=ce.EPSILON&&Math.abs(r.im-this.im)<=ce.EPSILON},clone:function(){return new ce(this.re,this.im)},toString:function(){let e=this.re,t=this.im,r="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<ce.EPSILON&&(e=0),Math.abs(t)<ce.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()}};ce.ZERO=new ce(0,0);ce.ONE=new ce(1,0);ce.I=new ce(0,1);ce.PI=new ce(Math.PI,0);ce.E=new ce(Math.E,0);ce.INFINITY=new ce(1/0,1/0);ce.NAN=new ce(NaN,NaN);ce.EPSILON=1e-15;var _9="Complex",I9=[],z9=I(_9,I9,()=>(Object.defineProperty(ce,"name",{value:"Complex"}),ce.prototype.constructor=ce,ce.prototype.type="Complex",ce.prototype.isComplex=!0,ce.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},ce.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},ce.prototype.format=function(e){var t="",r=this.im,n=this.re,a=Yi(this.re,e),i=Yi(this.im,e),o=qe(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},ce.fromPolar=function(e){switch(arguments.length){case 1:{var t=arguments[0];if(typeof t=="object")return ce(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(qe(r)){if(pn(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),qe(n))return new ce({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")}},ce.prototype.valueOf=ce.prototype.toString,ce.fromJSON=function(e){return new ce(e)},ce.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},ce),{isClass:!0});typeof BigInt>"u"&&(BigInt=function(e){if(isNaN(e))throw new Error("");return e});const _e=BigInt(0),lt=BigInt(1),Dr=BigInt(2),Is=BigInt(3),jo=BigInt(5),on=BigInt(10);BigInt(Number.MAX_SAFE_INTEGER);const j9=2e3,Ee={s:lt,n:_e,d:lt};function Ca(e,t){try{e=BigInt(e)}catch{throw Xa()}return e*t}function Vn(e){return typeof e=="bigint"?e:Math.floor(e)}function Ut(e,t){if(t===_e)throw Td();const r=Object.create(Fn.prototype);r.s=e<_e?-lt:lt,e=e<_e?-e:e;const n=Ri(e,t);return r.n=e/n,r.d=t/n,r}const q9=[Dr*Dr,Dr,Dr*Dr,Dr,Dr*Dr,Dr*Is,Dr,Dr*Is];function To(e){const t=Object.create(null);if(e<=lt)return t[e]=lt,t;const r=n=>{t[n]=(t[n]||_e)+lt};for(;e%Dr===_e;)r(Dr),e/=Dr;for(;e%Is===_e;)r(Is),e/=Is;for(;e%jo===_e;)r(jo),e/=jo;for(let n=0,a=Dr+jo;a*a<=e;){for(;e%a===_e;)r(a),e/=a;a+=q9[n],n=n+1&7}return e>lt&&r(e),t}const xr=function(e,t){let r=_e,n=lt,a=lt;if(e!=null)if(t!==void 0){if(typeof e=="bigint")r=e;else{if(isNaN(e))throw Xa();if(e%1!==0)throw s0();r=BigInt(e)}if(typeof t=="bigint")n=t;else{if(isNaN(t))throw Xa();if(t%1!==0)throw s0();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 Xa();a=r*n}else if(typeof e=="number"){if(isNaN(e))throw Xa();if(e<0&&(a=-lt,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=lt,c=lt,f=e.replace(/_/g,"").match(/\d+|./g);if(f===null)throw Xa();if(f[i]==="-"?(a=-lt,i++):f[i]==="+"&&i++,f.length===i+1?s=Ca(f[i++],a):f[i+1]==="."||f[i]==="."?(f[i]!=="."&&(o=Ca(f[i++],a)),i++,(i+1===f.length||f[i+1]==="("&&f[i+3]===")"||f[i+1]==="'"&&f[i+3]==="'")&&(s=Ca(f[i],a),l=on**BigInt(f[i].length),i++),(f[i]==="("&&f[i+2]===")"||f[i]==="'"&&f[i+2]==="'")&&(u=Ca(f[i+1],a),c=on**BigInt(f[i+1].length)-lt,i+=3)):f[i+1]==="/"||f[i+1]===":"?(s=Ca(f[i],a),l=Ca(f[i+2],lt),i+=3):f[i+3]==="/"&&f[i+1]===" "&&(o=Ca(f[i],a),s=Ca(f[i+2],a),l=Ca(f[i+4],lt),i+=5),f.length<=i)n=l*c,a=r=u+n*o+c*s;else throw Xa()}else if(typeof e=="bigint")r=e,a=e,n=lt;else throw Xa();if(n===_e)throw Td();Ee.s=a<_e?-lt:lt,Ee.n=r<_e?-r:r,Ee.d=n<_e?-n:n};function R9(e,t,r){let n=lt;for(;t>_e;e=e*e%r,t>>=lt)t&lt&&(n=n*e%r);return n}function L9(e,t){for(;t%Dr===_e;t/=Dr);for(;t%jo===_e;t/=jo);if(t===lt)return _e;let r=on%t,n=1;for(;r!==lt;n++)if(r=r*on%t,n>j9)return _e;return BigInt(n)}function H9(e,t,r){let n=lt,a=R9(on,r,t);for(let i=0;i<300;i++){if(n===a)return BigInt(i);n=n*on%t,a=a*on%t}return 0}function Ri(e,t){if(!e)return t;if(!t)return e;for(;;){if(e%=t,!e)return t;if(t%=e,!t)return e}}function Fn(e,t){if(xr(e,t),this instanceof Fn)e=Ri(Ee.d,Ee.n),this.s=Ee.s,this.n=Ee.n/e,this.d=Ee.d/e;else return Ut(Ee.s*Ee.n,Ee.d)}const Td=function(){return new Error("Division by Zero")},Xa=function(){return new Error("Invalid argument")},s0=function(){return new Error("Parameters must be integer")};Fn.prototype={s:lt,n:_e,d:lt,abs:function(){return Ut(this.n,this.d)},neg:function(){return Ut(-this.s*this.n,this.d)},add:function(e,t){return xr(e,t),Ut(this.s*this.n*Ee.d+Ee.s*this.d*Ee.n,this.d*Ee.d)},sub:function(e,t){return xr(e,t),Ut(this.s*this.n*Ee.d-Ee.s*this.d*Ee.n,this.d*Ee.d)},mul:function(e,t){return xr(e,t),Ut(this.s*Ee.s*this.n*Ee.n,this.d*Ee.d)},div:function(e,t){return xr(e,t),Ut(this.s*Ee.s*this.n*Ee.d,this.d*Ee.n)},clone:function(){return Ut(this.s*this.n,this.d)},mod:function(e,t){if(e===void 0)return Ut(this.s*this.n%this.d,lt);if(xr(e,t),_e===Ee.n*this.d)throw Td();return Ut(this.s*(Ee.d*this.n)%(Ee.n*this.d),Ee.d*this.d)},gcd:function(e,t){return xr(e,t),Ut(Ri(Ee.n,this.n)*Ri(Ee.d,this.d),Ee.d*this.d)},lcm:function(e,t){return xr(e,t),Ee.n===_e&&this.n===_e?Ut(_e,lt):Ut(Ee.n*this.n,Ri(Ee.n,this.n)*Ri(Ee.d,this.d))},inverse:function(){return Ut(this.s*this.d,this.n)},pow:function(e,t){if(xr(e,t),Ee.d===lt)return Ee.s<_e?Ut((this.s*this.d)**Ee.n,this.n**Ee.n):Ut((this.s*this.n)**Ee.n,this.d**Ee.n);if(this.s<_e)return null;let r=To(this.n),n=To(this.d),a=lt,i=lt;for(let o in r)if(o!=="1"){if(o==="0"){a=_e;break}if(r[o]*=Ee.n,r[o]%Ee.d===_e)r[o]/=Ee.d;else return null;a*=BigInt(o)**r[o]}for(let o in n)if(o!=="1"){if(n[o]*=Ee.n,n[o]%Ee.d===_e)n[o]/=Ee.d;else return null;i*=BigInt(o)**n[o]}return Ee.s<_e?Ut(i,a):Ut(a,i)},log:function(e,t){if(xr(e,t),this.s<=_e||Ee.s<=_e)return null;const r=Object.create(null),n=To(Ee.n),a=To(Ee.d),i=To(this.n),o=To(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=Ri(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?Ut(s,u):null},equals:function(e,t){return xr(e,t),this.s*this.n*Ee.d===Ee.s*Ee.n*this.d},lt:function(e,t){return xr(e,t),this.s*this.n*Ee.d<Ee.s*Ee.n*this.d},lte:function(e,t){return xr(e,t),this.s*this.n*Ee.d<=Ee.s*Ee.n*this.d},gt:function(e,t){return xr(e,t),this.s*this.n*Ee.d>Ee.s*Ee.n*this.d},gte:function(e,t){return xr(e,t),this.s*this.n*Ee.d>=Ee.s*Ee.n*this.d},compare:function(e,t){xr(e,t);let r=this.s*this.n*Ee.d-Ee.s*Ee.n*this.d;return(_e<r)-(r<_e)},ceil:function(e){return e=on**BigInt(e||0),Ut(Vn(this.s*e*this.n/this.d)+(e*this.n%this.d>_e&&this.s>=_e?lt:_e),e)},floor:function(e){return e=on**BigInt(e||0),Ut(Vn(this.s*e*this.n/this.d)-(e*this.n%this.d>_e&&this.s<_e?lt:_e),e)},round:function(e){return e=on**BigInt(e||0),Ut(Vn(this.s*e*this.n/this.d)+this.s*((this.s>=_e?lt:_e)+Dr*(e*this.n%this.d)>this.d?lt:_e),e)},roundTo:function(e,t){xr(e,t);const r=this.n*Ee.d,n=this.d*Ee.n,a=r%n;let i=Vn(r/n);return a+a>=n&&i++,Ut(this.s*i*Ee.n,Ee.d)},divisible:function(e,t){return xr(e,t),Ee.n===_e?!1:this.n*Ee.d%(Ee.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=L9(t,r),a=H9(t,r,n),i=this.s<_e?"-":"";if(i+=Vn(t/r),t%=r,t*=on,t&&(i+="."),n){for(let o=a;o--;)i+=Vn(t/r),t%=r,t*=on;i+="(";for(let o=n;o--;)i+=Vn(t/r),t%=r,t*=on;i+=")"}else for(let o=e;t&&o--;)i+=Vn(t/r),t%=r,t*=on;return i},toFraction:function(e=!1){let t=this.n,r=this.d,n=this.s<_e?"-":"";if(r===lt)n+=t;else{const a=Vn(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===lt)n+=t;else{const a=Vn(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(Vn(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=Ut(n[a-1],lt);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 G9="Fraction",V9=[],U9=I(G9,V9,()=>(Object.defineProperty(Fn,"name",{value:"Fraction"}),Fn.prototype.constructor=Fn,Fn.prototype.type="Fraction",Fn.prototype.isFraction=!0,Fn.prototype.toJSON=function(){return{mathjs:"Fraction",n:String(this.s*this.n),d:String(this.d)}},Fn.fromJSON=function(e){return new Fn(e)},Fn),{isClass:!0}),W9="Range",J9=[],K9=I(W9,J9,()=>{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(Qe(t))t=t.toNumber();else if(typeof t!="number"&&!_s(t))throw new TypeError("Parameter start must be a number or bigint")}if(i){if(Qe(r))r=r.toNumber();else if(typeof r!="number"&&!_s(r))throw new TypeError("Parameter end must be a number or bigint")}if(o){if(Qe(n))n=n.toNumber();else if(typeof n!="number"&&!_s(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&&Er(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 oi(n)===oi(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=Yi(this.start,t);return this.step!==1&&(r+=":"+Yi(this.step,t)),r+=":"+Yi(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}),Y9="Matrix",Z9=[],Q9=I(Y9,Z9,()=>{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 jf(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(!Pe(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 X9(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}=hx(t);switch(r){case"fixed":return tI(e,n);case"exponential":return u0(e,n);case"engineering":return eI(e,n);case"bin":return jf(e,2,a);case"oct":return jf(e,8,a);case"hex":return jf(e,16,a);case"auto":{var i=l0(t?.lowerExp,-3),o=l0(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=u0(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 eI(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 u0(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function tI(e,t){return e.toFixed(t)}function l0(e,t){return qe(e)?e:Qe(e)?e.toNumber():t}function rI(e,t){var r=e.length-t.length,n=e.length;return e.substring(r,n)===t}function ot(e,t){var r=nI(e,t);return t&&typeof t=="object"&&"truncate"in t&&r.length>t.truncate?r.substring(0,t.truncate-3)+"...":r}function nI(e,t){if(typeof e=="number")return Yi(e,t);if(Qe(e))return X9(e,t);if(aI(e))return!t||t.fraction!=="decimal"?"".concat(e.s*e.n,"/").concat(e.d):e.toString();if(Array.isArray(e))return Mx(e,t);if(Qt(e))return qo(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=>qo(n)+": "+ot(e[n],t));return"{"+r.join(", ")+"}"}return String(e)}function qo(e){for(var t=String(e),r="",n=0;n<t.length;){var a=t.charAt(n);r+=a in c0?c0[a]:a,n++}return'"'+r+'"'}var c0={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"};function $n(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 Mx(e,t){if(Array.isArray(e)){for(var r="[",n=e.length,a=0;a<n;a++)a!==0&&(r+=", "),r+=Mx(e[a],t);return r+="]",r}else return ot(e,t)}function aI(e){return e&&typeof e=="object"&&typeof e.s=="bigint"&&typeof e.n=="bigint"&&typeof e.d=="bigint"||!1}function Hm(e,t){if(!Qt(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+kt(e)+", index: 0)");if(!Qt(t))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+kt(t)+", index: 1)");return e===t?0:e>t?1:-1}function it(e,t,r){if(!(this instanceof it))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}it.prototype=new RangeError;it.prototype.constructor=RangeError;it.prototype.name="DimensionError";it.prototype.isDimensionError=!0;function ea(e,t,r){if(!(this instanceof ea))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}ea.prototype=new RangeError;ea.prototype.constructor=RangeError;ea.prototype.name="IndexError";ea.prototype.isIndexError=!0;function Je(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function Fx(e,t,r){var n,a=e.length;if(a!==t[r])throw new it(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 it(t.length-1,t.length,"<");Fx(e[n],t,i)}}else for(n=0;n<a;n++)if(Array.isArray(e[n]))throw new it(t.length+1,t.length,">")}function f0(e,t){var r=t.length===0;if(r){if(Array.isArray(e))throw new it(e.length,0)}else Fx(e,t,0)}function Ql(e,t){var r=e.isMatrix?e._size:Je(e),n=t._sourceSize;n.forEach((a,i)=>{if(a!==null&&a!==r[i])throw new it(a,r[i])})}function _t(e,t){if(e!==void 0){if(!qe(e)||!Pe(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new ea(e,t)}}function Ko(e){for(var t=0;t<e._dimensions.length;++t){var r=e._dimensions[t];if(r._data&&Ft(r._data)){if(r._size[0]===0)return!0}else if(r.isRange){if(r.start===r.end)return!0}else if(Qt(r)&&r.length===0)return!0}return!1}function Yo(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(!qe(a)||!Pe(a)||a<0)throw new TypeError("Invalid size, must contain positive integers (size: "+ot(t)+")")}),(qe(e)||Qe(e))&&(e=[e]);var n=r!==void 0?r:0;return Gm(e,t,0,n),e}function Gm(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),Gm(i,t,l,n);for(a=u;a<s;a++)i=[],e[a]=i,Gm(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 Md(e,t){var r=ht(e,!0),n=r.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new it(0,n,"!=");t=Fd(t,n);var a=Px(t);if(n!==a)throw new it(a,n,"!=");try{return iI(r,t)}catch(i){throw i instanceof it?new it(a,n,"!="):i}}function Fd(e,t){var r=Px(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 Px(e){return e.reduce((t,r)=>t*r,1)}function iI(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 Xl(e,t){for(var r=Je(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=kx(e,n,0),r.length=n),e}function kx(e,t,r){var n,a;if(r<t){var i=r+1;for(n=0,a=e.length;n<a;n++)e[n]=kx(e[n],t,i)}else for(;Array.isArray(e);)e=e[0];return e}function Ox(e,t,r,n){var a=n||Je(e);if(r)for(var i=0;i<r;i++)e=[e],a.unshift(1);for(e=$x(e,t,0);a.length<t;)a.push(1);return e}function $x(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]=$x(e[n],t,i)}else for(var o=r;o<t;o++)e=[e];return e}function ht(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 ci(e,t){return Array.prototype.map.call(e,t)}function Bx(e,t){Array.prototype.forEach.call(e,t)}function m0(e,t){if(Je(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,t)}function d0(e,t){if(Je(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,r=>t.test(r))}function h0(e,t){return Array.prototype.join.call(e,t)}function Zo(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 ec(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 Pc(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?Pc(i,t):t(i);if(r===void 0)r=s;else if(r!==s)return"mixed"}return r}function _x(e,t,r,n){if(n<r){if(e.length!==t.length)throw new it(e.length,t.length);for(var a=[],i=0;i<e.length;i++)a[i]=_x(e[i],t[i],r,n+1);return a}else return e.concat(t)}function Ix(){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 _x(r,n,t,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function tc(){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++)zx(t[f],i);return i}function zx(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 Ji(e,t){var r=Je(e);if(Ga(r,t))return e;zx(r,t);var n=tc(r,t),a=n.length,i=[...Array(a-r.length).fill(1),...r],o=sI(e);r.length<a&&(o=Md(o,i),r=Je(o));for(var s=0;s<a;s++)r[s]<n[s]&&(o=oI(o,n[s],s),r=Je(o));return o}function oI(e,t,r){return Ix(...Array(t).fill(e),r)}function rc(e,t){if(!Array.isArray(e))throw new Error("Array expected");var r=Je(e);if(t.length!==r.length)throw new it(t.length,r.length);for(var n=0;n<t.length;n++)_t(t[n],r[n]);return t.reduce((a,i)=>a[i],e)}function Vm(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 jx(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 sI(e){return rr([],e)}function to(e,t,r,n){if(Jl.isTypedFunction(e)){var a;if(n)a=1;else{var i=t.isMatrix?t.size():Je(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):rc(t,s);a=cI(e,u,s,t)}var l;if(t.isMatrix&&t.dataType!=="mixed"&&t.dataType!==void 0){var c=uI(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 p0(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 p0(l,d,r,e.name)}}}return n===void 0?{isUnary:lI(e),fn:e}:{isUnary:n,fn:e}}function uI(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 lI(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 cI(e,t,r,n){for(var a=[t,r,n],i=3;i>0;i--){var o=a.slice(0,i);if(Jl.resolve(e,o)!==null)return i}}function p0(e,t,r,n){try{return e(...t)}catch(a){fI(a,t,r,n)}}function fI(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(kt(t[0]))),t.length>=2&&i.push("index: ".concat(kt(t[1]))),t.length>=3&&i.push("array: ".concat(kt(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 mI="DenseMatrix",dI=["Matrix","config"],hI=I(mI,dI,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&&!Qt(m))throw new Error("Invalid datatype: "+m);if(Le(f))f.type==="DenseMatrix"?(this._data=We(f._data),this._size=We(f._size),this._datatype=m||f._datatype):(this._data=f.toArray(),this._size=f.size(),this._datatype=m||f._datatype);else if(f&&Ft(f.data)&&Ft(f.size))this._data=f.data,this._size=f.size,f0(this._data,this._size),this._datatype=m||f.datatype;else if(Ft(f))this._data=c(f),this._size=Je(this._data),f0(this._data,this._size),this._datatype=m;else{if(f)throw new TypeError("Unsupported type of data ("+kt(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 Pc(this._data,kt)},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 rc(this._data,f)},n.prototype.set=function(f,m,d){if(!Ft(f))throw new TypeError("Array expected");if(f.length<this._size.length)throw new it(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],_t(y,D.length),D=D[y];return y=f[f.length-1],_t(y,D.length),D[y]=m,this};function a(f,m){if(!Ac(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 it(h.length,f._size.length);for(var p=m.min(),y=m.max(),w=0,D=f._size.length;w<D;w++)_t(p[w],f._size[w]),_t(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 qe(x)?g(x):x.map(g).valueOf()}return qe(D)?h[w]=null:h[w]=D.size()[0],w<d?v(D,x=>(_t(x,y.length),p(y[x],w+1))):v(D,x=>(_t(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(Le(d)?(w=d.size(),d=d.valueOf()):w=Je(d),y){if(w.length!==0)throw new TypeError("Scalar expected");f.set(m.min(),d,h)}else{if(!Ga(w,p)){if(w.length===0)d=Ji([d],p);else try{d=Ji(d,p)}catch{}w=Je(d)}if(p.length<f._size.length)throw new it(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=Ox(d,p.length,v,w)}if(!Ga(p,w))throw new it(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)=>{_t(b,y.length),p(y[b],w[C[0]],D+1)},g=(b,C)=>{_t(b,y.length),y[b]=w[C[0]]};D<h?qe(v)?x(v,[0]):v.forEach(x):qe(v)?g(v,[0]):v.forEach(g)}}n.prototype.resize=function(f,m,d){if(!yn(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;Ft(h);)h=h[0];return h}return f._size=m.slice(0),f._data=Yo(f._data,f._size,d),f}n.prototype.reshape=function(f,m){var d=m?this.clone():this;d._data=Md(d._data,f);var h=d._size.reduce((p,y)=>p*y);return d._size=Fd(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:We(this._data),size:We(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=to(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=to(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 We(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(f){return ot(this._data,f)},n.prototype.toString=function(){return ot(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(Qe(f)&&(f=f.toNumber()),!qe(f)||!Pe(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(!Ft(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(Qe(N)&&(N=N.toNumber()),!qe(N)||!Pe(N)||N<1)throw new Error("Size values must be positive integers");return N}),d){if(Qe(d)&&(d=d.toNumber()),!qe(d)||!Pe(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(Ft(m)){if(m.length!==v)throw new Error("Invalid value array length");x=function(A){return m[A]}}else if(Le(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=Qe(x(0))?x(0).mul(0):0);var b=[];if(f.length>0){b=Yo(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(!qe(f)||!Pe(f)||!qe(m)||!Pe(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 _t(f,this._size[0]),_t(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 Le(f)?c(f.valueOf()):Ft(f)?f.map(c):f}return n},{isClass:!0}),g0="clone",pI=["typed"],gI=I(g0,pI,e=>{var{typed:t}=e;return t(g0,{any:We})});function qx(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 as(e){for(var t=0;t<e.length;t++)if(yn(e[t]))return!0;return!1}function vi(e,t){Le(e)?e.forEach(r=>t(r),!1,!0):jx(e,t,!0)}function Xe(e,t,r){if(!r)return Le(e)?e.map(a=>t(a),!1,!0):Vm(e,t,!0);var n=a=>a===0?a:t(a);return Le(e)?e.map(a=>n(a),!1,!0):Vm(e,n,!0)}function kc(e,t,r){var n=Array.isArray(e)?Je(e):e.size();if(t<0||t>=n.length)throw new ea(t,n.length);return Le(e)?e.create(nc(e.valueOf(),t,r),e.datatype()):nc(e,t,r)}function nc(e,t,r){var n,a,i,o;if(t<=0)if(Array.isArray(e[0])){for(o=qx(e),a=[],n=0;n<o.length;n++)a[n]=nc(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]=nc(e[n],t-1,r);return a}}function v0(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 y0="isInteger",vI=["typed","equal"],yI=I(y0,vI,e=>{var{typed:t,equal:r}=e;return t(y0,{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=>Xe(a,n))})}),ta="number",is="number, number";function Rx(e){return Math.abs(e)}Rx.signature=ta;function Lx(e,t){return e+t}Lx.signature=is;function Hx(e,t){return e-t}Hx.signature=is;function Gx(e,t){return e*t}Gx.signature=is;function Vx(e){return-e}Vx.signature=ta;function Ux(e){return e}Ux.signature=ta;function Fs(e){return w8(e)}Fs.signature=ta;function Wx(e){return e*e*e}Wx.signature=ta;function Jx(e){return Math.exp(e)}Jx.signature=ta;function Kx(e){return x8(e)}Kx.signature=ta;function Yx(e,t){if(!Pe(e)||!Pe(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)}Yx.signature=is;function b0(e,t){return t?Math.log(e)/Math.log(t):Math.log(e)}function ac(e){return y8(e)}ac.signature=ta;function Um(e){return v8(e)}Um.signature=ta;function w0(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 Wm(e){return oi(e)}Wm.signature=ta;function Zx(e){return e*e}Zx.signature=ta;function Qx(e,t){var r,n,a,i=0,o=1,s=1,u=0;if(!Pe(e)||!Pe(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}Qx.signature=is;function Xx(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}Xx.signature=is;function Es(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!Pe(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(px(e,t))}var bI="number",os="number, number";function e2(e,t){if(!Pe(e)||!Pe(t))throw new Error("Integers expected in function bitAnd");return e&t}e2.signature=os;function t2(e){if(!Pe(e))throw new Error("Integer expected in function bitNot");return~e}t2.signature=bI;function r2(e,t){if(!Pe(e)||!Pe(t))throw new Error("Integers expected in function bitOr");return e|t}r2.signature=os;function n2(e,t){if(!Pe(e)||!Pe(t))throw new Error("Integers expected in function bitXor");return e^t}n2.signature=os;function a2(e,t){if(!Pe(e)||!Pe(t))throw new Error("Integers expected in function leftShift");return e<<t}a2.signature=os;function i2(e,t){if(!Pe(e)||!Pe(t))throw new Error("Integers expected in function rightArithShift");return e>>t}i2.signature=os;function o2(e,t){if(!Pe(e)||!Pe(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}o2.signature=os;function _a(e,t){if(t<e)return 1;if(t===e)return t;var r=t+e>>1;return _a(e,r)*_a(r+1,t)}function s2(e,t){if(!Pe(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!Pe(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/=_a(i,o)),n}s2.signature="number, number";var wI=Math.PI,xI=2*Math.PI,DI=Math.E,NI=1.618033988749895,AI="number",Pd="number, number";function u2(e){return!e}u2.signature=AI;function Jm(e,t){return!!(e||t)}Jm.signature=Pd;function Km(e,t){return!!e!=!!t}Km.signature=Pd;function Ym(e,t){return!!(e&&t)}Ym.signature=Pd;function ic(e){var t;if(Pe(e))return e<=0?Number.isFinite(e)?1/0:NaN:e>171?1/0:_a(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*ic(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=Go[0];for(var o=1;o<Go.length;++o)t+=Go[o]/(e+o);var s=e+l2+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*t}ic.signature="number";var l2=4.7421875,Go=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],c2=.9189385332046728,CI=5,EI=7,x0=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function oc(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))-oc(1-e);e=e-1;for(var t=e+CI+.5,r=x0[0],n=EI-1;n>=1;n--)r+=x0[n]/(e+n);return c2+(e+.5)*Math.log(t)-t+Math.log(r)}oc.signature="number";var qr="number";function f2(e){return C8(e)}f2.signature=qr;function m2(e){return Math.atan(1/e)}m2.signature=qr;function d2(e){return Number.isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}d2.signature=qr;function h2(e){return Math.asin(1/e)}h2.signature=qr;function p2(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}p2.signature=qr;function g2(e){return Math.acos(1/e)}g2.signature=qr;function v2(e){var t=1/e,r=Math.sqrt(t*t-1);return Math.log(r+t)}v2.signature=qr;function y2(e){return E8(e)}y2.signature=qr;function b2(e){return S8(e)}b2.signature=qr;function w2(e){return 1/Math.tan(e)}w2.signature=qr;function x2(e){var t=Math.exp(2*e);return(t+1)/(t-1)}x2.signature=qr;function D2(e){return 1/Math.sin(e)}D2.signature=qr;function N2(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*oi(e)}N2.signature=qr;function A2(e){return 1/Math.cos(e)}A2.signature=qr;function C2(e){return 2/(Math.exp(e)+Math.exp(-e))}C2.signature=qr;function E2(e){return M8(e)}E2.signature=qr;var kd="number";function S2(e){return e<0}S2.signature=kd;function T2(e){return e>0}T2.signature=kd;function M2(e){return Number.isNaN(e)}M2.signature=kd;function _n(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 D0="isNegative",SI=["typed","config"],TI=I(D0,SI,e=>{var{typed:t,config:r}=e;return t(D0,{number:n=>Er(n,0,r.relTol,r.absTol)?!1:S2(n),BigNumber:n=>_n(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=>Xe(a,n))})}),N0="isNumeric",MI=["typed"],FI=I(N0,MI,e=>{var{typed:t}=e;return t(N0,{"number | BigNumber | bigint | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),A0="hasNumericValue",PI=["typed","isNumeric"],kI=I(A0,PI,e=>{var{typed:t,isNumeric:r}=e;return t(A0,{boolean:()=>!0,string:function(a){return a.trim().length>0&&!isNaN(Number(a))},any:function(a){return r(a)}})}),C0="isPositive",OI=["typed","config"],$I=I(C0,OI,e=>{var{typed:t,config:r}=e;return t(C0,{number:n=>Er(n,0,r.relTol,r.absTol)?!1:T2(n),BigNumber:n=>_n(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=>Xe(a,n))})}),E0="isZero",BI=["typed","equalScalar"],_I=I(E0,BI,e=>{var{typed:t,equalScalar:r}=e;return t(E0,{"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=>Xe(a,n))})}),S0="isNaN",II=["typed"],zI=I(S0,II,e=>{var{typed:t}=e;return t(S0,{number:M2,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=>Xe(n,r))})}),T0="isBounded",jI=["typed"],qI=I(T0,jI,e=>{var{typed:t}=e;return t(T0,{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))))})}),M0="isFinite",RI=["typed","isBounded","map"],LI=I(M0,RI,e=>{var{typed:t,isBounded:r,map:n}=e;return t(M0,{"Array | Matrix":a=>n(a,r),any:a=>r(a)})}),F0="typeOf",HI=["typed"],GI=I(F0,HI,e=>{var{typed:t}=e;return t(F0,{any:kt})});function VI(e,t,r,n){return Er(e.re,t.re,r,n)&&Er(e.im,t.im,r,n)}var ss=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)})}}),sc="equalScalar",UI=["typed","config"],WI=I(sc,UI,e=>{var{typed:t,config:r}=e,n=ss({typed:t});return t(sc,{"boolean, boolean":function(i,o){return i===o},"number, number":function(i,o){return Er(i,o,r.relTol,r.absTol)},"BigNumber, BigNumber":function(i,o){return i.eq(o)||_n(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 VI(i,o,r.relTol,r.absTol)}},n)});I(sc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(sc,{"number, number":function(a,i){return Er(a,i,r.relTol,r.absTol)}})});var JI="SparseMatrix",KI=["typed","equalScalar","Matrix"],YI=I(JI,KI,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&&!Qt(y))throw new Error("Invalid datatype: "+y);if(Le(p))i(this,p,y);else if(p&&Ft(p.index)&&Ft(p.ptr)&&Ft(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(Ft(p))o(this,p,y);else{if(p)throw new TypeError("Unsupported type of data ("+kt(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?We(y._values):void 0,p._index=We(y._index),p._ptr=We(y._ptr),p._size=We(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(Qt(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(Ft(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 Pc(this._values,kt)},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(!Ac(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 it(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++)_t(C[v],p._size[v]),_t(N[v],p._size[v]);var A=p._values,E=p._index,S=p._ptr,F=y.dimension(0),k=y.dimension(1),$=[],R=[];function T(G,V){R[G]=V[0],$[G]=!0}Number.isInteger(F)?T(F,[0]):F.forEach(T);var B=A?[]:void 0,L=[],j=[];function Z(G){for(j.push(L.length),g=S[G],b=S[G+1];g<b;g++)v=E[g],$[v]===!0&&(L.push(R[v]),B&&B.push(A[g]))}return Number.isInteger(k)?Z(k):k.forEach(Z),j.push(L.length),new a({values:B,index:L,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(Le(w)?(g=w.size(),w=w.toArray()):g=Je(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 it(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=Ox(w,v.length,C,g)}if(!Ga(v,g))throw new it(v,g,">");if(v.length===1){var N=y.dimension(0);S(N,(F,k)=>{_t(F),p.set([F,0],w[k[0]],D)})}else{var A=y.dimension(0),E=y.dimension(1);S(A,(F,k)=>{_t(F),S(E,($,R)=>{_t($),p.set([F,$],w[k[0]][R[0]],D)})})}}return p;function S(F,k){qe(F)?k(F,[0]):F.forEach(k)}}a.prototype.get=function(p){if(!Ft(p))throw new TypeError("Array expected");if(p.length!==this._size.length)throw new it(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];_t(y,this._size[0]),_t(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(!Ft(p))throw new TypeError("Array expected");if(p.length!==this._size.length)throw new it(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;Qt(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]),_t(D,x),_t(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(!yn(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(!qe(x)||!Pe(x)||x<0)throw new TypeError("Invalid size, must contain positive integers (size: "+ot(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;Qt(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 $=0;for(E=0;E<N;E++){p._ptr[E]=p._ptr[E]-$;var R=p._ptr[E],T=p._ptr[E+1]-$;for(S=R;S<T;S++)A=p._index[S],A>y-1&&(p._values.splice(S,1),p._index.splice(S,1),$++)}p._ptr[E]=p._values.length}return p._size[0]=y,p._size[1]=w,p}a.prototype.reshape=function(p,y){if(!Ft(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(!qe(j)||!Pe(j)||j<=-2||j===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+ot(p)+")")});var w=this._size[0]*this._size[1];p=Fd(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 $=0;$<C.length;$++){var R=N[$],T=x[$],B=C[$],L=l(R,v._ptr[T],v._ptr[T+1],v._index);f(L,R,T,B,v._values,v._index,v._ptr)}return v},a.prototype.clone=function(){var p=new a({values:this._values?We(this._values):void 0,index:We(this._index),ptr:We(this._ptr),size:We(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=to(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;Qt(p._datatype)&&(A=t.find(r,[p._datatype,p._datatype])||r,E=t.convert(0,p._datatype));for(var S=function(P,Q,z){var oe=x(P,Q,z);A(oe,E)||(b.push(oe),C.push(Q))},F=D;F<=v;F++){N.push(b.length);var k=p._ptr[F],$=p._ptr[F+1];if(g)for(var R=k;R<$;R++){var T=p._index[R];T>=y&&T<=w&&S(p._values[R],T-y,F-D)}else{for(var B={},L=k;L<$;L++){var j=p._index[L];B[j]=p._values[L]}for(var Z=y;Z<=w;Z++){var G=Z in B?B[Z]:0;S(G,Z-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=to(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 $=k in E?E[k]:0;x.fn($,[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?We(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 ["+ot(y,p)+" x "+ot(w,p)+"] density: "+ot(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
- (`+ot(N,p)+", "+ot(x,p)+") ==> "+(this._values?ot(this._values[C],p):"X")}return v},a.prototype.toString=function(){return ot(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(Qe(p)&&(p=p.toNumber()),!qe(p)||!Pe(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(!Ft(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(Qe(j)&&(j=j.toNumber()),!qe(j)||!Pe(j)||j<1)throw new Error("Size values must be positive integers");return j}),w){if(Qe(w)&&(w=w.toNumber()),!qe(w)||!Pe(w))throw new TypeError("The parameter k must be an integer number")}else w=0;var x=r,g=0;Qt(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(Ft(y)){if(y.length!==E)throw new Error("Invalid value array length");S=function(Z){return y[Z]}}else if(Le(y)){var F=y.size();if(F.length!==1||F[0]!==E)throw new Error("Invalid matrix length");S=function(Z){return y.get([Z])}}else S=function(){return y};for(var k=[],$=[],R=[],T=0;T<A;T++){R.push(k.length);var B=T-b;if(B>=0&&B<E){var L=S(B);x(L,g)||($.push(B+C),k.push(L))}}return R.push(k.length),new a({values:k,index:$,ptr:R,size:[N,A]})},a.prototype.swapRows=function(p,y){if(!qe(p)||!Pe(p)||!qe(y)||!Pe(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 _t(p,this._size[0]),_t(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}),ZI="number",QI=["typed"];function XI(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 e7(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 t7=I(ZI,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=XI(a);if(i)return e7(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=>Xe(a,n))});return r.fromJSON=function(n){return parseFloat(n.value)},r}),r7="bigint",n7=["typed"],a7=I(r7,n7,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=>Xe(a,n))});return r.fromJSON=function(n){return BigInt(n.value)},r}),P0="string",i7=["typed"],o7=I(P0,i7,e=>{var{typed:t}=e;return t(P0,{"":function(){return""},number:Yi,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r)),any:function(n){return String(n)}})}),k0="boolean",s7=["typed"],u7=I(k0,s7,e=>{var{typed:t}=e;return t(k0,{"":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=>Xe(n,r))})}),l7="bignumber",c7=["typed","BigNumber"],f7=I(l7,c7,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=>Xe(a,n))})}),m7="complex",d7=["typed","Complex"],h7=I(m7,d7,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=>Xe(a,n))})}),p7="fraction",g7=["typed","Fraction"],v7=I(p7,g7,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=>Xe(a,n))})}),O0="matrix",y7=["typed","Matrix","DenseMatrix","SparseMatrix"],b7=I(O0,y7,e=>{var{typed:t,Matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(O0,{"":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)+".")}}),$0="matrixFromFunction",w7=["typed","matrix","isZero"],x7=I($0,w7,e=>{var{typed:t,matrix:r,isZero:n}=e;return t($0,{"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}}),B0="matrixFromRows",D7=["typed","matrix","flatten","size"],N7=I(B0,D7,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(B0,{"...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.")}}),_0="matrixFromColumns",A7=["typed","matrix","flatten","size"],C7=I(_0,A7,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(_0,{"...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.")}}),I0="splitUnit",E7=["typed"],S7=I(I0,E7,e=>{var{typed:t}=e;return t(I0,{"Unit, Array":function(n,a){return n.splitUnit(a)}})}),z0="unaryMinus",T7=["typed"],M7=I(z0,T7,e=>{var{typed:t}=e;return t(z0,{number:Vx,"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=>Xe(n,r,!0))})}),j0="unaryPlus",F7=["typed","config","numeric"],P7=I(j0,F7,e=>{var{typed:t,config:r,numeric:n}=e;return t(j0,{number:Ux,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=>Xe(i,a,!0)),boolean:function(i){return n(i?1:0,r.number)},string:function(i){return n(i,bi(i,r))}})}),q0="abs",k7=["typed"],O7=I(q0,k7,e=>{var{typed:t}=e;return t(q0,{number:Rx,"Complex | BigNumber | Fraction | Unit":r=>r.abs(),bigint:r=>r<0n?-r:r,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r,!0))})}),R0="mapSlices",$7=["typed","isInteger"],Zm=I(R0,$7,e=>{var{typed:t,isInteger:r}=e;return t(R0,{"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)?Je(a):a.size();if(i<0||i>=s.length)throw new ea(i,s.length);return Le(a)?a.create(uc(a.valueOf(),i,o),a.datatype()):uc(a,i,o)}})},{formerly:"apply"});function uc(e,t,r){var n,a,i;if(t<=0)if(Array.isArray(e[0])){for(i=B7(e),a=[],n=0;n<i.length;n++)a[n]=uc(i[n],t-1,r);return a}else return r(e);else{for(a=[],n=0;n<e.length;n++)a[n]=uc(e[n],t-1,r);return a}}function B7(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 L0="addScalar",_7=["typed"],I7=I(L0,_7,e=>{var{typed:t}=e;return t(L0,{"number, number":Lx,"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})})}),H0="subtractScalar",z7=["typed"],j7=I(H0,z7,e=>{var{typed:t}=e;return t(H0,{"number, number":Hx,"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})})}),G0="cbrt",q7=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],R7=I(G0,q7,e=>{var{config:t,typed:r,isNegative:n,unaryMinus:a,matrix:i,Complex:o,BigNumber:s,Fraction:u}=e;return r(G0,{number:Fs,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(Fs(h),0).mul(new o(0,d).exp());if(m){var y=[p,new o(Fs(h),0).mul(new o(0,d+Math.PI*2/3).exp()),new o(Fs(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&&Ia(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;Qe(f.value)?h=new s(1).div(3):iu(f.value)?h=new u(1,3):h=1/3;var p=f.pow(h);return d&&(p.value=a(p.value)),p}}}),L7="matAlgo11xS0s",H7=["typed","equalScalar"],kr=I(L7,H7,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})}}),G7="matAlgo12xSfs",V7=["typed","DenseMatrix"],mr=I(G7,V7,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})}}),U7="matAlgo14xDs",W7=["typed"],In=I(U7,W7,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:We(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}}),Qm="ceil",J7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],K7=new gi(10),Y7=I(Qm,["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:Er(i,s,r.relTol,r.absTol)&&!Er(i,o,r.relTol,r.absTol)?s:o}return t(Qm,{number:a,"number, number":function(o,s){if(!Pe(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}})}),Z7=I(Qm,J7,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=kr({typed:t,equalScalar:i}),l=mr({typed:t,DenseMatrix:s}),c=In({typed:t}),f=Y7({typed:t,config:r,round:n});function m(d){var h=(w,D)=>_n(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=K7.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)=>Xe(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=>Xe(h,d,!0)),"Array, number | BigNumber":t.referToSelf(d=>(h,p)=>Xe(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))})}),V0="cube",Q7=["typed"],X7=I(V0,Q7,e=>{var{typed:t}=e;return t(V0,{number:Wx,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)}})}),U0="exp",ez=["typed"],tz=I(U0,ez,e=>{var{typed:t}=e;return t(U0,{number:Jx,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})}),W0="expm1",rz=["typed","Complex"],nz=I(W0,rz,e=>{var{typed:t,Complex:r}=e;return t(W0,{number:Kx,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)}})}),Xm="fix",az=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],iz=I(Xm,["typed","ceil","floor"],e=>{var{typed:t,ceil:r,floor:n}=e;return t(Xm,{number:function(i){return i>0?n(i):r(i)},"number, number":function(i,o){return i>0?n(i,o):r(i,o)}})}),oz=I(Xm,az,e=>{var{typed:t,Complex:r,matrix:n,ceil:a,floor:i,equalScalar:o,zeros:s,DenseMatrix:u}=e,l=mr({typed:t,DenseMatrix:u}),c=In({typed:t}),f=iz({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)=>Xe(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=>Xe(d,m,!0)),"Array | Matrix, number | BigNumber":t.referToSelf(m=>(d,h)=>Xe(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))})}),ed="floor",sz=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],uz=new gi(10),lz=I(ed,["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:Er(i,s,r.relTol,r.absTol)&&!Er(i,o,r.relTol,r.absTol)?s:o}return t(ed,{number:a,"number, number":function(o,s){if(!Pe(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}})}),F2=I(ed,sz,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=kr({typed:t,equalScalar:i}),l=mr({typed:t,DenseMatrix:s}),c=In({typed:t}),f=lz({typed:t,config:r,round:n});function m(d){var h=(w,D)=>_n(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=uz.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)=>Xe(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=>Xe(h,d,!0)),"Array, number | BigNumber":t.referToSelf(d=>(h,p)=>Xe(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))})}),cz="matAlgo02xDS0",fz=["typed","equalScalar"],ra=I(cz,fz,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 it(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],$=s?g(f[F],u[k][A]):g(u[k][A],f[F]);v($,x)||(C.push(k),b.push($))}}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})}}),mz="matAlgo03xDSf",dz=["typed"],Rr=I(mz,dz,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 it(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 $=0;$<p;$++)C[$]===A?x[$][N]=b[$]:x[$][N]=o?v(D,s[$][N]):v(s[$][N],D)}return n.createDenseMatrix({data:x,size:[p,y],datatype:l===n._datatype&&h===a._datatype?w:void 0})}}),hz="matAlgo05xSfSf",pz=["typed","equalScalar"],Oc=I(hz,pz,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 it(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=[],$,R,T,B;for(R=0;R<D;R++){A[R]=N.length;var L=R+1;for(T=l[R],B=l[R+1];T<B;T++)$=u[T],N.push($),F[$]=L,E&&(E[$]=s[T]);for(T=h[R],B=h[R+1];T<B;T++)$=d[T],F[$]!==L&&N.push($),k[$]=L,S&&(S[$]=m[T]);if(C)for(T=A[R];T<N.length;){$=N[T];var j=F[$],Z=k[$];if(j===L||Z===L){var G=j===L?E[$]:g,V=Z===L?S[$]:g,P=b(G,V);x(P,g)?N.splice(T,1):(C.push(P),T++)}}}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})}}),gz="matAlgo13xDD",vz=["typed"],P2=I(gz,vz,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 it(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 wr(e,t){if(Ga(e.size(),t.size()))return[e,t];var r=tc(e.size(),t.size());return[e,t].map(n=>yz(n,r))}function yz(e,t){return Ga(e.size(),t)?e:e.create(Ji(e.valueOf(),t),e.datatype())}var bz="matrixAlgorithmSuite",wz=["typed","matrix"],It=I(bz,wz,e=>{var{typed:t,matrix:r}=e,n=P2({typed:t}),a=In({typed:t});return function(o){var s=o.elop,u=o.SD||o.DS,l;s?(l={"DenseMatrix, DenseMatrix":(d,h)=>n(...wr(d,h),s),"Array, Array":(d,h)=>n(...wr(r(d),r(h)),s).valueOf(),"Array, DenseMatrix":(d,h)=>n(...wr(r(d),h),s),"DenseMatrix, Array":(d,h)=>n(...wr(d,r(h)),s)},o.SS&&(l["SparseMatrix, SparseMatrix"]=(d,h)=>o.SS(...wr(d,h),s,!1)),o.DS&&(l["DenseMatrix, SparseMatrix"]=(d,h)=>o.DS(...wr(d,h),s,!1),l["Array, SparseMatrix"]=(d,h)=>o.DS(...wr(r(d),h),s,!1)),u&&(l["SparseMatrix, DenseMatrix"]=(d,h)=>u(...wr(h,d),s,!0),l["SparseMatrix, Array"]=(d,h)=>u(...wr(r(h),d),s,!0))):(l={"DenseMatrix, DenseMatrix":t.referToSelf(d=>(h,p)=>n(...wr(h,p),d)),"Array, Array":t.referToSelf(d=>(h,p)=>n(...wr(r(h),r(p)),d).valueOf()),"Array, DenseMatrix":t.referToSelf(d=>(h,p)=>n(...wr(r(h),p),d)),"DenseMatrix, Array":t.referToSelf(d=>(h,p)=>n(...wr(h,r(p)),d))},o.SS&&(l["SparseMatrix, SparseMatrix"]=t.referToSelf(d=>(h,p)=>o.SS(...wr(h,p),d,!1))),o.DS&&(l["DenseMatrix, SparseMatrix"]=t.referToSelf(d=>(h,p)=>o.DS(...wr(h,p),d,!1)),l["Array, SparseMatrix"]=t.referToSelf(d=>(h,p)=>o.DS(...wr(r(h),p),d,!1))),u&&(l["SparseMatrix, DenseMatrix"]=t.referToSelf(d=>(h,p)=>u(...wr(p,h),d,!0)),l["SparseMatrix, Array"]=t.referToSelf(d=>(h,p)=>u(...wr(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&&mx(l,s.signatures),l}}),J0="mod",xz=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],k2=I(J0,xz,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s,concat:u}=e,l=F2({typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}),c=ra({typed:t,equalScalar:i}),f=Rr({typed:t}),m=Oc({typed:t,equalScalar:i}),d=kr({typed:t,equalScalar:i}),h=mr({typed:t,DenseMatrix:s}),p=It({typed:t,matrix:a,concat:u});return t(J0,{"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)}}),Dz="matAlgo01xDSid",Nz=["typed"],xi=I(Dz,Nz,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 it(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})}}),Az="matAlgo04xSidSid",Cz=["typed","equalScalar"],Od=I(Az,Cz,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 it(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=[],$,R,T,B,L;for(R=0;R<D;R++){A[R]=N.length;var j=R+1;for(B=l[R],L=l[R+1],T=B;T<L;T++)$=u[T],N.push($),F[$]=j,E&&(E[$]=s[T]);for(B=h[R],L=h[R+1],T=B;T<L;T++)if($=d[T],F[$]===j){if(E){var Z=b(E[$],m[T]);x(Z,g)?F[$]=null:E[$]=Z}}else N.push($),k[$]=j,S&&(S[$]=m[T]);if(E&&S)for(T=A[R];T<N.length;)$=N[T],F[$]===j?(C[T]=E[$],T++):k[$]===j?(C[T]=S[$],T++):N.splice(T,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})}}),Ez="matAlgo10xSids",Sz=["typed","DenseMatrix"],io=I(Ez,Sz,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 oo(e,t,r,n){if(!(this instanceof oo))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}oo.prototype=new Error;oo.prototype.constructor=Error;oo.prototype.name="ArgumentsError";oo.prototype.isArgumentsError=!0;var K0="gcd",Tz=["typed","config","round","matrix","equalScalar","zeros","BigNumber","DenseMatrix","concat"],qf="number | BigNumber | Fraction | Matrix | Array",Mz="".concat(qf,", ").concat(qf,", ...").concat(qf);function Y0(e){return!e.some(t=>Array.isArray(t))}var Fz=I(K0,Tz,e=>{var{typed:t,matrix:r,config:n,round:a,equalScalar:i,zeros:o,BigNumber:s,DenseMatrix:u,concat:l}=e,c=k2({typed:t,config:n,round:a,matrix:r,equalScalar:i,zeros:o,DenseMatrix:u,concat:l}),f=xi({typed:t}),m=Od({typed:t,equalScalar:i}),d=io({typed:t,DenseMatrix:u}),h=It({typed:t,matrix:r,concat:l});return t(K0,{"number, number":p,"BigNumber, BigNumber":y,"Fraction, Fraction":(w,D)=>w.gcd(D)},h({SS:m,DS:f,Ss:d}),{[Mz]: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])&&Y0(D[0]))return w(...D[0]);if(Y0(D))return w(...D);throw new oo("gcd() supports only 1d matrices!")}),Matrix:t.referToSelf(w=>D=>w(D.toArray()))});function p(w,D){if(!Pe(w)||!Pe(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}}),Pz="matAlgo06xS0S0",kz=["typed","equalScalar"],$c=I(Pz,kz,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 it(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(v0(a,A,C,b,N,E,x,D),v0(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 $=g[A];$<x.length;){var R=x[$];N[R]!==E?x.splice($,1):$++}}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})}}),Z0="lcm",Oz=["typed","matrix","equalScalar","concat"],$z=I(Z0,Oz,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=ra({typed:t,equalScalar:n}),o=$c({typed:t,equalScalar:n}),s=kr({typed:t,equalScalar:n}),u=It({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(Z0,{"number, number":Yx,"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 $d(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 Q0="log10",Bz=["typed","config","Complex"],_z=ac(16),Iz=I(Q0,Bz,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(Q0,{number:function(s){return s>=0||r.predictable?ac(s):i(s)},bigint:$d(_z,ac,r,i),Complex:a,BigNumber:function(s){return!s.isNegative()||r.predictable?s.log():i(s.toNumber())},"Array | Matrix":t.referToSelf(o=>s=>Xe(s,o))})}),X0="log2",zz=["typed","config","Complex"],jz=I(X0,zz,e=>{var{typed:t,config:r,Complex:n}=e;function a(o){return i(new n(o,0))}return t(X0,{number:function(s){return s>=0||r.predictable?Um(s):a(s)},bigint:$d(4,Um,r,a),Complex:i,BigNumber:function(s){return!s.isNegative()||r.predictable?s.log(2):a(s.toNumber())},"Array | Matrix":t.referToSelf(o=>s=>Xe(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)}}),qz="multiplyScalar",Rz=["typed"],Lz=I(qz,Rz,e=>{var{typed:t}=e;return t("multiplyScalar",{"number, number":Gx,"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)})}),ev="multiply",Hz=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Gz=I(ev,Hz,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,equalScalar:i,dot:o}=e,s=kr({typed:t,equalScalar:i}),u=In({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],$=S[1],R,T=n,B=a;A&&F&&A===F&&typeof A=="string"&&A!=="mixed"&&(R=A,T=t.find(n,[R,R]),B=t.find(a,[R,R]));for(var L=[],j=0;j<$;j++){for(var Z=B(C[0],E[0][j]),G=1;G<k;G++)Z=T(Z,B(C[G],E[G][j]));L[j]=Z}return g.createDenseMatrix({data:L,size:[$],datatype:A===g._datatype&&F===b._datatype?R: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],$,R=n,T=a;A&&S&&A===S&&typeof A=="string"&&A!=="mixed"&&($=A,R=t.find(n,[$,$]),T=t.find(a,[$,$]));for(var B=[],L=0;L<F;L++){for(var j=C[L],Z=T(j[0],E[0]),G=1;G<k;G++)Z=R(Z,T(j[G],E[G]));B[L]=Z}return g.createDenseMatrix({data:B,size:[F],datatype:A===g._datatype&&S===b._datatype?$: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],$=N[1],R=S[1],T,B=n,L=a;A&&F&&A===F&&typeof A=="string"&&A!=="mixed"&&A!=="mixed"&&(T=A,B=t.find(n,[T,T]),L=t.find(a,[T,T]));for(var j=[],Z=0;Z<k;Z++){var G=C[Z];j[Z]=[];for(var V=0;V<R;V++){for(var P=L(G[0],E[0][V]),Q=1;Q<$;Q++)P=B(P,L(G[Q],E[Q][V]));j[Z][V]=P}}return g.createDenseMatrix({data:j,size:[k,R],datatype:A===g._datatype&&F===b._datatype?T: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._datatype||b._data===void 0?b._datatype:b.getDataType();if(!E)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var R=N[0],T=k[1],B,L=n,j=a,Z=i,G=0;A&&$&&A===$&&typeof A=="string"&&A!=="mixed"&&(B=A,L=t.find(n,[B,B]),j=t.find(a,[B,B]),Z=t.find(i,[B,B]),G=t.convert(0,B));for(var V=[],P=[],Q=[],z=b.createSparseMatrix({values:V,index:P,ptr:Q,size:[R,T],datatype:A===g._datatype&&$===b._datatype?B:void 0}),oe=0;oe<T;oe++){Q[oe]=P.length;var ne=F[oe],U=F[oe+1];if(U>ne)for(var _=0,J=0;J<R;J++){for(var ae=J+1,ee=void 0,ue=ne;ue<U;ue++){var se=S[ue];_!==ae?(ee=j(C[J][se],E[ue]),_=ae):ee=L(ee,j(C[J][se],E[ue]))}_===ae&&!Z(ee,G)&&(P.push(J),V.push(ee))}}return Q[T]=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._size[0],R=[],T=[],B=[],L,j=n,Z=a,G=i,V=0;E&&F&&E===F&&typeof E=="string"&&E!=="mixed"&&(L=E,j=t.find(n,[L,L]),Z=t.find(a,[L,L]),G=t.find(i,[L,L]),V=t.convert(0,L));var P=[],Q=[];B[0]=0;for(var z=0;z<$;z++){var oe=S[z];if(!G(oe,V))for(var ne=A[z],U=A[z+1],_=ne;_<U;_++){var J=N[_];Q[J]?P[J]=j(P[J],Z(oe,C[_])):(Q[J]=!0,T.push(J),P[J]=Z(oe,C[_]))}}for(var ae=T.length,ee=0;ee<ae;ee++){var ue=T[ee];R[ee]=P[ue]}return B[1]=T.length,g.createSparseMatrix({values:R,index:T,ptr:B,size:[k,1],datatype:E===g._datatype&&F===b._datatype?L: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._size[0],R=b._size[1],T,B=n,L=a,j=i,Z=0;E&&F&&E===F&&typeof E=="string"&&E!=="mixed"&&(T=E,B=t.find(n,[T,T]),L=t.find(a,[T,T]),j=t.find(i,[T,T]),Z=t.convert(0,T));for(var G=[],V=[],P=[],Q=g.createSparseMatrix({values:G,index:V,ptr:P,size:[k,R],datatype:E===g._datatype&&F===b._datatype?T:void 0}),z=[],oe=[],ne=0;ne<R;ne++){P[ne]=V.length;for(var U=ne+1,_=0;_<$;_++){var J=S[_][ne];if(!j(J,Z))for(var ae=A[_],ee=A[_+1],ue=ae;ue<ee;ue++){var se=N[ue];oe[se]!==U?(oe[se]=U,V.push(se),z[se]=L(J,C[ue])):z[se]=B(z[se],L(J,C[ue]))}}for(var ye=P[ne],Se=V.length,Fe=ye;Fe<Se;Fe++){var Ce=V[Fe];G[Fe]=z[Ce]}}return P[R]=V.length,Q}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._datatype||b._data===void 0?b._datatype:b.getDataType(),R=g._size[0],T=b._size[1],B=C&&S,L,j=n,Z=a;E&&$&&E===$&&typeof E=="string"&&E!=="mixed"&&(L=E,j=t.find(n,[L,L]),Z=t.find(a,[L,L]));for(var G=B?[]:void 0,V=[],P=[],Q=g.createSparseMatrix({values:G,index:V,ptr:P,size:[R,T],datatype:E===g._datatype&&$===b._datatype?L:void 0}),z=B?[]:void 0,oe=[],ne,U,_,J,ae,ee,ue,se,ye=0;ye<T;ye++){P[ye]=V.length;var Se=ye+1;for(ae=k[ye],ee=k[ye+1],J=ae;J<ee;J++)if(se=F[J],B)for(U=A[se],_=A[se+1],ne=U;ne<_;ne++)ue=N[ne],oe[ue]!==Se?(oe[ue]=Se,V.push(ue),z[ue]=Z(S[J],C[ne])):z[ue]=j(z[ue],Z(S[J],C[ne]));else for(U=A[se],_=A[se+1],ne=U;ne<_;ne++)ue=N[ne],oe[ue]!==Se&&(oe[ue]=Se,V.push(ue));if(B)for(var Fe=P[ye],Ce=V.length,ke=Fe;ke<Ce;ke++){var je=V[ke];G[ke]=z[je]}}return P[T]=V.length,Q}return t(ev,a,{"Array, Array":t.referTo("Matrix, Matrix",g=>(b,C)=>{l(Je(b),Je(C));var N=g(r(b),r(C));return Le(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})})}),tv="nthRoot",Vz=["typed","matrix","equalScalar","BigNumber","concat"],Uz=I(tv,Vz,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,concat:i}=e,o=xi({typed:t}),s=ra({typed:t,equalScalar:n}),u=$c({typed:t,equalScalar:n}),l=kr({typed:t,equalScalar:n}),c=It({typed:t,matrix:r,concat:i});function f(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return t(tv,{number:w0,"number, number":w0,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))}}),rv="sign",Wz=["typed","BigNumber","Fraction","complex"],Jz=I(rv,Wz,e=>{var{typed:t,BigNumber:r,complex:n,Fraction:a}=e;return t(rv,{number:Wm,Complex:function(o){return o.im===0?n(Wm(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=>Xe(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)})})}),Kz="sqrt",Yz=["config","typed","Complex"],Zz=I(Kz,Yz,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()}}),nv="square",Qz=["typed"],Xz=I(nv,Qz,e=>{var{typed:t}=e;return t(nv,{number:Zx,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)}})}),av="subtract",ej=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],tj=I(av,ej,e=>{var{typed:t,matrix:r,equalScalar:n,subtractScalar:a,unaryMinus:i,DenseMatrix:o,concat:s}=e,u=xi({typed:t}),l=Rr({typed:t}),c=Oc({typed:t,equalScalar:n}),f=io({typed:t,DenseMatrix:o}),m=mr({typed:t,DenseMatrix:o}),d=It({typed:t,matrix:r,concat:s});return t(av,{"any, any":a},d({elop:a,SS:c,DS:u,SD:l,Ss:m,sS:f}))}),iv="xgcd",rj=["typed","config","matrix","BigNumber"],nj=I(iv,rj,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(iv,{"number, number":function(s,u){var l=Qx(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)}}),ov="invmod",aj=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],ij=I(ov,aj,e=>{var{typed:t,config:r,BigNumber:n,xgcd:a,equal:i,smaller:o,mod:s,add:u,isInteger:l}=e;return t(ov,{"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}}),oj="matAlgo09xS0Sf",sj=["typed","equalScalar"],O2=I(oj,sj,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 it(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,$,R,T;for(k=0;k<D;k++){A[k]=N.length;var B=k+1;if(E)for(R=h[k],T=h[k+1],$=R;$<T;$++)F=d[$],S[F]=B,E[F]=m[$];for(R=l[k],T=l[k+1],$=R;$<T;$++)if(F=u[$],E){var L=S[F]===B?E[F]:g,j=b(s[$],L);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})}}),sv="dotMultiply",uj=["typed","matrix","equalScalar","multiplyScalar","concat"],lj=I(sv,uj,e=>{var{typed:t,matrix:r,equalScalar:n,multiplyScalar:a,concat:i}=e,o=ra({typed:t,equalScalar:n}),s=O2({typed:t,equalScalar:n}),u=kr({typed:t,equalScalar:n}),l=It({typed:t,matrix:r,concat:i});return t(sv,l({elop:a,SS:s,DS:o,Ss:u}))});function cj(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 Bd(e,t,function(n,a){return n&a})}function Js(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 fj(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:Bd(e,t,function(a,i){return a|i})}function Bd(e,t,r){var n=e.constructor,a,i,o=+(e.s<0),s=+(t.s<0);if(o){a=ol(Js(e));for(var u=0;u<a.length;++u)a[u]^=1}else a=ol(e);if(s){i=ol(Js(t));for(var l=0;l<i.length;++l)i[l]^=1}else i=ol(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 ol(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 mj(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)?Js(t):t.eq(n)?Js(e):!e.isFinite()||!t.isFinite()?!e.isFinite()&&!t.isFinite()?n:new r(e.isNegative()===t.isNegative()?1/0:-1/0):Bd(e,t,function(a,i){return a^i})}function dj(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 hj(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 uv="bitAnd",pj=["typed","matrix","equalScalar","concat"],$2=I(uv,pj,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=ra({typed:t,equalScalar:n}),o=$c({typed:t,equalScalar:n}),s=kr({typed:t,equalScalar:n}),u=It({typed:t,matrix:r,concat:a});return t(uv,{"number, number":e2,"BigNumber, BigNumber":cj,"bigint, bigint":(l,c)=>l&c},u({SS:o,DS:i,Ss:s}))}),lv="bitNot",gj=["typed"],vj=I(lv,gj,e=>{var{typed:t}=e;return t(lv,{number:t2,BigNumber:Js,bigint:r=>~r,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),cv="bitOr",yj=["typed","matrix","equalScalar","DenseMatrix","concat"],B2=I(cv,yj,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=xi({typed:t}),s=Od({typed:t,equalScalar:n}),u=io({typed:t,DenseMatrix:a}),l=It({typed:t,matrix:r,concat:i});return t(cv,{"number, number":r2,"BigNumber, BigNumber":fj,"bigint, bigint":(c,f)=>c|f},l({SS:s,DS:o,Ss:u}))}),bj="matAlgo07xSSf",wj=["typed","SparseMatrix"],ha=I(bj,wj,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 it(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,$=y(F,k);$!==0&&$!==!1&&(D.push(S),w.push($),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]}}}),fv="bitXor",xj=["typed","matrix","DenseMatrix","concat","SparseMatrix"],Dj=I(fv,xj,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a,SparseMatrix:i}=e,o=Rr({typed:t}),s=ha({typed:t,SparseMatrix:i}),u=mr({typed:t,DenseMatrix:n}),l=It({typed:t,matrix:r,concat:a});return t(fv,{"number, number":n2,"BigNumber, BigNumber":mj,"bigint, bigint":(c,f)=>c^f},l({SS:s,DS:o,Ss:u}))}),mv="arg",Nj=["typed"],Aj=I(mv,Nj,e=>{var{typed:t}=e;return t(mv,{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=>Xe(n,r))})}),dv="conj",Cj=["typed"],Ej=I(dv,Cj,e=>{var{typed:t}=e;return t(dv,{"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=>Xe(n,r))})}),hv="im",Sj=["typed"],Tj=I(hv,Sj,e=>{var{typed:t}=e;return t(hv,{number:()=>0,"BigNumber | Fraction":r=>r.mul(0),Complex:r=>r.im,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),pv="re",Mj=["typed"],Fj=I(pv,Mj,e=>{var{typed:t}=e;return t(pv,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.re,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),gv="not",Pj=["typed"],kj=I(gv,Pj,e=>{var{typed:t}=e;return t(gv,{"null | undefined":()=>!0,number:u2,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=>Xe(n,r))})}),vv="nullish",Oj=["typed","matrix","size","flatten","deepEqual"],_2=I(vv,Oj,e=>{var{typed:t,matrix:r,size:n,flatten:a,deepEqual:i}=e,o=Rr({typed:t}),s=In({typed:t}),u=P2({typed:t});return t(vv,{"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 it(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())})}),yv="or",$j=["typed","matrix","equalScalar","DenseMatrix","concat"],I2=I(yv,$j,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=Rr({typed:t}),s=Oc({typed:t,equalScalar:n}),u=mr({typed:t,DenseMatrix:a}),l=It({typed:t,matrix:r,concat:i});return t(yv,{"number, number":Jm,"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":Jm,"Unit, Unit":t.referToSelf(c=>(f,m)=>c(f.value||0,m.value||0))},l({SS:s,DS:o,Ss:u}))}),bv="xor",Bj=["typed","matrix","DenseMatrix","concat","SparseMatrix"],_j=I(bv,Bj,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a,SparseMatrix:i}=e,o=Rr({typed:t}),s=ha({typed:t,SparseMatrix:i}),u=mr({typed:t,DenseMatrix:n}),l=It({typed:t,matrix:r,concat:a});return t(bv,{"number, number":Km,"Complex, Complex":function(f,m){return(f.re!==0||f.im!==0)!=(m.re!==0||m.im!==0)},"bigint, bigint":Km,"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}))}),wv="concat",Ij=["typed","matrix","isInteger"],z2=I(wv,Ij,e=>{var{typed:t,matrix:r,isInteger:n}=e;return t(wv,{"...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(Le(m)&&(c=!0),qe(m)||Qe(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 ea(u,l+1)}else{var d=We(m).valueOf(),h=Je(d);if(f[o]=d,l=u,u=h.length-1,o>0&&u!==l)throw new it(l+1,u+1)}}if(f.length===0)throw new SyntaxError("At least one matrix expected");for(var p=f.shift();f.length;)p=Ix(p,f.shift(),u);return c?r(p):p},"...string":function(i){return i.join("")}})}),xv="column",zj=["typed","Index","matrix","range"],j2=I(xv,zj,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(xv,{"Matrix, number":i,"Array, number":function(s,u){return i(n(We(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");_t(s,o.size()[1]);var u=a(0,o.size()[0]),l=new r(u,[s]),c=o.subset(l);return Le(c)?c:n([[c]])}}),Dv="count",jj=["typed","size","prod"],qj=I(Dv,jj,e=>{var{typed:t,size:r,prod:n}=e;return t(Dv,{string:function(i){return i.length},"Matrix | Array":function(i){return n(r(i))}})}),Nv="cross",Rj=["typed","matrix","subtract","multiply"],Lj=I(Nv,Rj,e=>{var{typed:t,matrix:r,subtract:n,multiply:a}=e;return t(Nv,{"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(Je(o).length,Je(s).length);o=Xl(o),s=Xl(s);var l=Je(o),c=Je(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}}),Av="diag",Hj=["typed","matrix","DenseMatrix","SparseMatrix"],Gj=I(Av,Hj,e=>{var{typed:t,matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(Av,{Array:function(l){return i(l,0,Je(l),null)},"Array, number":function(l,c){return i(l,c,Je(l),null)},"Array, BigNumber":function(l,c){return i(l,c.toNumber(),Je(l),null)},"Array, string":function(l,c){return i(l,0,Je(l),c)},"Array, number, string":function(l,c,f){return i(l,c,Je(l),f)},"Array, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),Je(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(!Pe(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(Le(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}}),Vj="filter",Uj=["typed"],q2=I(Vj,Uj,e=>{var{typed:t}=e;return t("filter",{"Array, function":Cv,"Matrix, function":function(n,a){return n.create(Cv(n.valueOf(),a),n.datatype())},"Array, RegExp":d0,"Matrix, RegExp":function(n,a){return n.create(d0(n.valueOf(),a),n.datatype())}})});function Cv(e,t){var r=to(t,e,"filter");return r.isUnary?m0(e,r.fn):m0(e,function(n,a,i){return r.fn(n,[a],i)})}var Ev="flatten",Wj=["typed"],Jj=I(Ev,Wj,e=>{var{typed:t}=e;return t(Ev,{Array:function(n){return ht(n)},DenseMatrix:function(n){return n.create(ht(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())")}})}),td="forEach",Kj=["typed"],R2=I(td,Kj,e=>{var{typed:t}=e;return t(td,{"Array, function":Yj,"Matrix, function":function(n,a){n.forEach(a)}})});function Yj(e,t){var r=to(t,e,td);jx(e,r.fn,r.isUnary)}var Sv="getMatrixDataType",Zj=["typed"],Qj=I(Sv,Zj,e=>{var{typed:t}=e;return t(Sv,{Array:function(n){return Pc(n,kt)},Matrix:function(n){return n.getDataType()}})}),Tv="identity",Xj=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],eq=I(Tv,Xj,e=>{var{typed:t,config:r,matrix:n,BigNumber:a,DenseMatrix:i,SparseMatrix:o}=e;return t(Tv,{"":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=Qe(l)||Qe(c)?a:null;if(Qe(l)&&(l=l.toNumber()),Qe(c)&&(c=c.toNumber()),!Pe(l)||l<1)throw new Error("Parameters in function identity must be positive integers");if(!Pe(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=Yo([],p,h),w=l<c?l:c,D=0;D<w;D++)y[D][D]=d;return y}}),Mv="kron",tq=["typed","matrix","multiplyScalar"],rq=I(Mv,tq,e=>{var{typed:t,matrix:r,multiplyScalar:n}=e;return t(Mv,{"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=Je(o).length,c=Je(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)))}}),Rf="map",nq=["typed"],L2=I(Rf,nq,e=>{var{typed:t}=e;return t(Rf,{"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():Je(g)),m=tc(...f),d=u.length,h=c?(g,b)=>g.get(b):rc,p=u.map((g,b)=>{var C=f[b].map(()=>0);return g.isMatrix?g.get(C):rc(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(Ji(g.toArray(),m),g.datatype()):u[0].create(Ji(g.valueOf(),m))):u.map(g=>g.isMatrix?Ji(g.toArray(),m):Ji(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():Je(g)),d=tc(...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($){w&&(w[b]=$),N[$]=x(g.map((R,T)=>h[T]>b?R:R.length===1?R[0]:R[$]),b+1)},E=0;E<C;E++)A(E);else for(var S=function($){w&&(w[b]=$),N[$]=l(g.map(R=>R.length===1?R[0]:R[$]),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=to(l,u,Rf);return Vm(u,c.fn,c.isUnary)}}),Fv="diff",aq=["typed","matrix","subtract","number"],H2=I(Fv,aq,e=>{var{typed:t,matrix:r,subtract:n,number:a}=e;return t(Fv,{"Array | Matrix":function(c){return Le(c)?r(o(c.toArray())):o(c)},"Array | Matrix, number":function(c,f){if(!Pe(f))throw new RangeError("Dimension must be a whole number");return Le(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(Le(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){Le(l)&&(l=l.toArray()),Le(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}}),iq="ones",oq=["typed","config","matrix","BigNumber"],sq=I(iq,oq,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?Yo(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,m){Qe(c)&&(l=!0,m[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!Pe(l)||l<0)throw new Error("Parameters in function ones must be positive integers")})}});function _d(){throw new Error('No "bignumber" implementation available')}function G2(){throw new Error('No "fraction" implementation available')}function uq(){throw new Error('No "matrix" implementation available')}var Pv="range",lq=["typed","config","?matrix","?bignumber","equal","smaller","smallerEq","larger","largerEq","add","isZero","isPositive"],V2=I(Pv,lq,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(Pv,{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):uq():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&&_d(),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}}}),kv="reshape",cq=["typed","isInteger","matrix"],fq=I(kv,cq,e=>{var{typed:t,isInteger:r}=e;return t(kv,{"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)}),Md(a,i)}})}),mq="resize",dq=["config","matrix"],hq=I(mq,dq,e=>{var{config:t,matrix:r}=e;return function(i,o,s){if(arguments.length!==2&&arguments.length!==3)throw new oo("resize",arguments.length,2,3);if(Le(o)&&(o=o.valueOf()),Qe(o[0])&&(o=o.map(function(c){return Qe(c)?c.toNumber():c})),Le(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 We(i)}else{Array.isArray(i)||(i=[i]),i=We(i);var l=Yo(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 it(i.length,1);var s=i[0];if(typeof s!="number"||!Pe(s))throw new TypeError("Invalid size, must contain positive integers (size: "+ot(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}}),Ov="rotate",pq=["typed","multiply","rotationMatrix"],gq=I(Ov,pq,e=>{var{typed:t,multiply:r,rotationMatrix:n}=e;return t(Ov,{"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)?Je(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))}}),$v="rotationMatrix",vq=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],yq=I($v,vq,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($v,{"":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=Qe(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=Qe(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)),$=m(D),R=a(F,p([A,A,k])),T=a(p([A,E,k]),p([N,S,$])),B=a(p([A,S,k]),p([E,$])),L=a(p([A,E,k]),p([S,$])),j=a(F,p([E,E,k])),Z=a(p([E,S,k]),p([N,A,$])),G=a(p([A,S,k]),p([N,E,$])),V=a(p([E,S,k]),p([A,$])),P=a(F,p([S,S,k])),Q=[[R,T,B],[L,j,Z],[G,V,P]];return y(Q,x)}}),Bv="row",bq=["typed","Index","matrix","range"],U2=I(Bv,bq,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(Bv,{"Matrix, number":i,"Array, number":function(s,u){return i(n(We(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");_t(s,o.size()[0]);var u=a(0,o.size()[1]),l=new r([s],u),c=o.subset(l);return Le(c)?c:n([[c]])}}),_v="size",wq=["typed"],xq=I(_v,wq,e=>{var{typed:t}=e;return t(_v,{Matrix:r=>r.size(),Array:Je,string:r=>[r.length],"number | Complex | BigNumber | Unit | boolean | null":r=>[]})}),Iv="squeeze",Dq=["typed"],Nq=I(Iv,Dq,e=>{var{typed:t}=e;return t(Iv,{Array:function(n){return Xl(We(n))},Matrix:function(n){var a=Xl(n.toArray());return Array.isArray(a)?n.create(a,n.datatype()):a},any:function(n){return We(n)}})}),zv="subset",Aq=["typed","matrix","zeros","add"],W2=I(zv,Aq,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e;return t(zv,{"Matrix, Index":function(s,u){return Ko(u)?r():(Ql(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":Eq,"string, Index":Cq,"Matrix, Index, any, any":function(s,u,l,c){return Ko(u)?s:(Ql(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":jv,"string, Index, string, string":jv,"Object, Index, any":Sq});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 Cq(e,t){if(!Ac(t))throw new TypeError("Index expected");if(Ko(t))return"";if(Ql(Array.from(e),t),t.size().length!==1)throw new it(t.size().length,1);var r=e.length;_t(t.min()[0],r),_t(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 jv(e,t,r,n){if(!t||t.isIndex!==!0)throw new TypeError("Index expected");if(Ko(t))return e;if(Ql(Array.from(e),t),t.size().length!==1)throw new it(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 it(a.size()[0],r.length);var o=e.length;_t(t.min()[0]),_t(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 Eq(e,t){if(!Ko(t)){if(t.size().length!==1)throw new it(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 Jr(e,r)}}function Sq(e,t,r){if(Ko(t))return e;if(t.size().length!==1)throw new it(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=We(e);return Wo(a,n,r),a}var qv="transpose",Tq=["typed","matrix"],Mq=I(qv,Tq,e=>{var{typed:t,matrix:r}=e;return t(qv,{Array:o=>n(r(o)).valueOf(),Matrix:n,any:We});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: "+ot(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: "+ot(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]=We(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]=We(l[N]))}return o.createSparseMatrix({values:m,index:d,ptr:h,size:[u,s],datatype:o._datatype})}}),Rv="ctranspose",Fq=["typed","transpose","conj"],Pq=I(Rv,Fq,e=>{var{typed:t,transpose:r,conj:n}=e;return t(Rv,{any:function(i){return n(r(i))}})}),Lv="zeros",kq=["typed","config","matrix","BigNumber"],Oq=I(Lv,kq,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(Lv,{"":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?Yo(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,m){Qe(c)&&(l=!0,m[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!Pe(l)||l<0)throw new Error("Parameters in function zeros must be positive integers")})}}),Hv="fft",$q=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],Bq=I(Hv,$q,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(Hv,{Array:h,Matrix:function(v){return v.create(h(v.valueOf()),v.datatype())}});function h(D){var v=Je(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=Je(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=Je(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((T,B)=>a(D[B],g[v-1+B])),...new Array(C-v).fill(0)],A=[...new Array(v+v-1).fill(0).map((T,B)=>i(1,g[B])),...new Array(C-(v+v-1)).fill(0)],E=w(N),S=w(A),F=new Array(C).fill(0).map((T,B)=>a(E[B],S[B])),k=l(c(h(c(F))),C),$=[],R=v-1;R<v+v-1;R++)$.push(a(k[R],g[R]));return $}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)}}),Gv="ifft",_q=["typed","fft","dotDivide","conj"],Iq=I(Gv,_q,e=>{var{typed:t,fft:r,dotDivide:n,conj:a}=e;return t(Gv,{"Array | Matrix":function(o){var s=Le(o)?o.size():Je(o);return n(a(r(a(o))),s.reduce((u,l)=>u*l,1))}})});function Ks(e){"@babel/helpers - typeof";return Ks=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},Ks(e)}function zq(e,t){if(Ks(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ks(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jq(e){var t=zq(e,"string");return Ks(t)=="symbol"?t:t+""}function lr(e,t,r){return(t=jq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vv(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 qq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vv(Object(r),!0).forEach(function(n){lr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Rq="solveODE",Lq=["typed","add","subtract","multiply","divide","max","map","abs","isPositive","isNegative","larger","smaller","matrix","bignumber","unaryMinus"],Hq=I(Rq,Lq,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(pn)));if(k)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var $=E[0],R=E[1],T=f(R,$),B=F.firstStep;if(B!==void 0&&!l(B))throw new Error('"firstStep" must be positive');var L=F.maxStep;if(L!==void 0&&!l(L))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 Z=[$,R,B,j,L].filter(O=>O!==void 0);if(!(Z.every(b)||Z.every(pn)))throw new Error('Inconsistent type of "t" dependant variables');for(var G=1,V=F.tol?F.tol:1e-4,P=F.minDelta?F.minDelta:.2,Q=F.maxDelta?F.maxDelta:5,z=F.maxIter?F.maxIter:1e4,oe=[$,R,...S,L,j].some(Qe),[ne,U,_,J]=oe?[h(N.a),h(N.c),h(N.b),h(N.bp)]:[N.a,N.c,N.b,N.bp],ae=B?T?B:p(B):i(n(R,$),G),ee=[$],ue=[S],se=n(_,J),ye=0,Se=0,Fe=x(T),Ce=g(T);Fe(ee[ye],R);){var ke=[];ae=Ce(ee[ye],R,ae),ke.push(A(ee[ye],ue[ye]));for(var je=1;je<U.length;++je)ke.push(A(r(ee[ye],a(U[je],ae)),r(ue[ye],a(ae,ne[je],ke))));var H=o(u(s(a(se,ke),O=>pn(O)?O.value:O)));H<V&&V/H>1/4&&(ee.push(r(ee[ye],ae)),ue.push(r(ue[ye],a(ae,_,ke))),ye++);var X=.84*(V/H)**(1/5);if(m(X,P)?X=P:f(X,Q)&&(X=Q),X=oe?h(X):X,ae=a(ae,X),L&&f(u(ae),L)?ae=T?L:p(L):j&&m(u(ae),j)&&(ae=T?j:p(j)),Se++,Se>z)throw new Error("Maximum number of iterations reached, try changing options")}return{t:ee,y:ue}}}function w(N,A,E,S){var F=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],k=[null,1/2,3/4,1],$=[2/9,1/3,4/9,0],R=[7/24,1/4,1/3,1/8],T={a:F,c:k,b:$,bp:R};return y(T)(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],$=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],R=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],T={a:F,c:k,b:$,bp:R};return y(T)(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 $=qq({},S);return delete $.method,k[F.toUpperCase()](N,A,E,$)}else{var R=Object.keys(k).map(B=>'"'.concat(B,'"')),T="".concat(R.slice(0,-1).join(", ")," and ").concat(R.slice(-1));throw new Error('Unavailable method "'.concat(F,'". Available methods are ').concat(T))}}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 Qe(N)||qe(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]))}}})}),Gq="erf",Vq=["typed"],Uq=I(Gq,Vq,e=>{var{typed:t}=e;return t("name",{number:function(o){var s=Math.abs(o);return s>=Kq?oi(o):s<=Wq?oi(o)*r(s):s<=4?oi(o)*(1-n(s)):oi(o)*(1-a(s))},"Array | Matrix":t.referToSelf(i=>o=>Xe(o,i))});function r(i){var o=i*i,s=Ea[0][4]*o,u=o,l;for(l=0;l<3;l+=1)s=(s+Ea[0][l])*o,u=(u+Mo[0][l])*o;return i*(s+Ea[0][3])/(u+Mo[0][3])}function n(i){var o=Ea[1][8]*i,s=i,u;for(u=0;u<7;u+=1)o=(o+Ea[1][u])*i,s=(s+Mo[1][u])*i;var l=(o+Ea[1][7])/(s+Mo[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=Ea[2][5]*o,u=o,l;for(l=0;l<4;l+=1)s=(s+Ea[2][l])*o,u=(u+Mo[2][l])*o;var c=o*(s+Ea[2][4])/(u+Mo[2][4]);c=(Jq-c)/i,o=parseInt(i*16)/16;var f=(i-o)*(i+o);return Math.exp(-o*o)*Math.exp(-f)*c}}),Wq=.46875,Jq=.5641895835477563,Ea=[[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]],Mo=[[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]],Kq=Math.pow(2,53),Uv="zeta",Yq=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isBounded","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],Zq=I(Uv,Yq,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(Uv,{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)}}),Wv="mode",Qq=["typed","isNaN","isNumeric"],Xq=I(Wv,Qq,e=>{var{typed:t,isNaN:r,isNumeric:n}=e;return t(Wv,{"Array | Matrix":a,"...":function(o){return a(o)}});function a(i){i=ht(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 Qr(e,t,r){var n;return String(e).includes("Unexpected type")?(n=arguments.length>2?" (type: "+kt(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: "+kt(r)+", value: "+JSON.stringify(r)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+n)):e}var Jv="prod",eR=["typed","config","multiplyScalar","numeric"],tR=I(Jv,eR,e=>{var{typed:t,config:r,multiplyScalar:n,numeric:a}=e;return t(Jv,{"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(vi(o,function(u){try{s=s===void 0?u:n(s,u)}catch(l){throw Qr(l,"prod",u)}}),typeof s=="string"&&(s=a(s,bi(s,r))),s===void 0)throw new Error("Cannot calculate prod of an empty array");return s}}),Kv="format",rR=["typed"],nR=I(Kv,rR,e=>{var{typed:t}=e;return t(Kv,{any:ot,"any, Object | function | number | BigNumber":ot})}),Yv="bin",aR=["typed","format"],iR=I(Yv,aR,e=>{var{typed:t,format:r}=e;return t(Yv,{"number | BigNumber":function(a){return r(a,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"bin",wordSize:i})}})}),Zv="oct",oR=["typed","format"],sR=I(Zv,oR,e=>{var{typed:t,format:r}=e;return t(Zv,{"number | BigNumber":function(a){return r(a,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"oct",wordSize:i})}})}),Qv="hex",uR=["typed","format"],lR=I(Qv,uR,e=>{var{typed:t,format:r}=e;return t(Qv,{"number | BigNumber":function(a){return r(a,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"hex",wordSize:i})}})}),J2=/\$([\w.]+)/g,Xv="print",cR=["typed"],K2=I(Xv,cR,e=>{var{typed:t}=e;return t(Xv,{"string, Object | Array":e1,"string, Object | Array, number | Object":e1})});function e1(e,t,r){return e.replace(J2,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?Qt(o)?o:ot(o,r):n})}var t1="to",fR=["typed","matrix","concat"],mR=I(t1,fR,e=>{var{typed:t,matrix:r,concat:n}=e,a=It({typed:t,matrix:r,concat:n});return t(t1,{"Unit, Unit | string":(i,o)=>i.to(o)},a({Ds:!0}))}),r1="toBest",dR=["typed"],hR=I(r1,dR,e=>{var{typed:t}=e;return t(r1,{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)})}),n1="isPrime",pR=["typed"],gR=I(n1,pR,e=>{var{typed:t}=e;return t(n1,{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=>Xe(n,r))})}),vR="numeric",yR=["number","?bignumber","?fraction"],bR=I(vR,yR,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):_d,bigint:o=>BigInt(o),Fraction:n?o=>n(o):G2};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=kt(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)}}),a1="divideScalar",wR=["typed","numeric"],xR=I(a1,wR,e=>{var{typed:t,numeric:r}=e;return t(a1,{"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)})}),i1="pow",DR=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],NR=I(i1,DR,e=>{var{typed:t,config:r,identity:n,multiply:a,matrix:i,inv:o,number:s,fraction:u,Complex:l}=e;return t(i1,{"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&&!Pe(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:Pe(h)||d>=0||r.predictable?Xx(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(!Pe(h))throw new TypeError("For A^b, b must be an integer (value is "+h+")");var p=Je(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))}}),Fo="Number of decimals in function round must be an integer",o1="round",AR=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],CR=I(o1,AR,e=>{var{typed:t,config:r,matrix:n,equalScalar:a,zeros:i,BigNumber:o,DenseMatrix:s}=e,u=kr({typed:t,equalScalar:a}),l=mr({typed:t,DenseMatrix:s}),c=In({typed:t});function f(m){return Math.abs(su(m).exponent)}return t(o1,{number:function(d){var h=Es(d,f(r.relTol)),p=Er(d,h,r.relTol,r.absTol)?h:d;return Es(p)},"number, number":function(d,h){var p=f(r.relTol);if(h>=p)return Es(d,h);var y=Es(d,p),w=Er(d,y,r.relTol,r.absTol)?y:d;return Es(w,h)},"number, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(Fo);return new o(d).toDecimalPlaces(h.toNumber())},Complex:function(d){return d.round()},"Complex, number":function(d,h){if(h%1)throw new TypeError(Fo);return d.round(h)},"Complex, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(Fo);var p=h.toNumber();return d.round(p)},BigNumber:function(d){var h=new o(d).toDecimalPlaces(f(r.relTol)),p=_n(d,h,r.relTol,r.absTol)?h:d;return p.toDecimalPlaces(0)},"BigNumber, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(Fo);var p=f(r.relTol);if(h>=p)return d.toDecimalPlaces(h.toNumber());var y=d.toDecimalPlaces(p),w=_n(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(Fo);return d.round(h)},"Fraction, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(Fo);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)=>Xe(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=>Xe(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())})}),s1="log",ER=["config","typed","typeOf","divideScalar","Complex"],SR=Math.log(16),TR=I(s1,ER,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(s1,{number:function(l){return l>=0||n.predictable?b0(l):s(l)},bigint:$d(SR,b0,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))})})}),u1="log1p",MR=["typed","config","divideScalar","log","Complex"],FR=I(u1,MR,e=>{var{typed:t,config:r,divideScalar:n,log:a,Complex:i}=e;return t(u1,{number:function(u){return u>=-1||r.predictable?b8(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=>Xe(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))}}),l1="nthRoots",PR=["config","typed","divideScalar","Complex"],kR=I(l1,PR,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(l1,{Complex:function(u){return o(u,2)},"Complex, number":o})}),c1="dotPow",OR=["typed","equalScalar","matrix","pow","DenseMatrix","concat","SparseMatrix"],$R=I(c1,OR,e=>{var{typed:t,equalScalar:r,matrix:n,pow:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=Rr({typed:t}),l=ha({typed:t,SparseMatrix:s}),c=kr({typed:t,equalScalar:r}),f=mr({typed:t,DenseMatrix:i}),m=It({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(c1,m({elop:p,SS:l,DS:u,Ss:c,sS:f}))}),f1="dotDivide",BR=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat","SparseMatrix"],_R=I(f1,BR,e=>{var{typed:t,matrix:r,equalScalar:n,divideScalar:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=ra({typed:t,equalScalar:n}),l=Rr({typed:t}),c=ha({typed:t,SparseMatrix:s}),f=kr({typed:t,equalScalar:n}),m=mr({typed:t,DenseMatrix:i}),d=It({typed:t,matrix:r,concat:o});return t(f1,d({elop:a,SS:c,DS:l,SD:u,Ss:f,sS:m}))});function uu(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: "+ot(o)+")");var s=o[0],u=o[1];if(s!==u)throw new RangeError("Matrix must be square (size: "+ot(o)+")");var l=[];if(Le(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(Wl(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(Wi(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(Ft(a)){var g=Je(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 m1="lsolve",IR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],zR=I(m1,IR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=uu({DenseMatrix:s});return t(m1,{"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),$=0,R=N.length;$<R;$++){var T=N[$];d[T]=[i(d[T][0]||0,a(k,C[$]))]}v[x]=[k]}}return new s({data:v,size:[h,1]})}}),d1="usolve",jR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],qR=I(d1,jR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=uu({DenseMatrix:s});return t(d1,{"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),$=0,R=N.length;$<R;$++){var T=N[$];d[T]=[i(d[T][0],a(k,C[$]))]}v[x]=[k]}}return new s({data:v,size:[h,1]})}}),h1="lsolveAll",RR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],LR=I(h1,RR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=uu({DenseMatrix:s});return t(h1,{"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(G=>G[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=[...b];B[v]=1;for(var L=0,j=N.length;L<j;L++){var Z=N[L];B[Z]=i(B[Z],C[L])}d.push(B)}}else{if(g===0)return[];d.splice(g,1),g-=1,x-=1}else{b[v]=n(b[v],S);for(var $=0,R=N.length;$<R;$++){var T=N[$];b[T]=i(b[T],a(b[v],C[$]))}}}return d.map(G=>new s({data:G.map(V=>[V]),size:[h,1]}))}}),p1="usolveAll",HR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],GR=I(p1,HR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=uu({DenseMatrix:s});return t(p1,{"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(G=>G[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=[...b];B[v]=1;for(var L=0,j=N.length;L<j;L++){var Z=N[L];B[Z]=i(B[Z],C[L])}d.push(B)}}else{if(g===0)return[];d.splice(g,1),g-=1,x-=1}else{b[v]=n(b[v],S);for(var $=0,R=N.length;$<R;$++){var T=N[$];b[T]=i(b[T],a(b[v],C[$]))}}}return d.map(G=>new s({data:G.map(V=>[V]),size:[h,1]}))}}),VR="matAlgo08xS0Sid",UR=["typed","equalScalar"],Id=I(VR,UR,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 it(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,$,R,T=0;T<D;T++){A[T]=N.length;var B=T+1;for(k=l[T],$=l[T+1],F=k;F<$;F++)R=u[F],S[R]=B,E[R]=s[F],N.push(R);for(k=h[T],$=h[T+1],F=k;F<$;F++)R=d[F],S[R]===B&&(E[R]=b(E[R],m[F]));for(F=A[T];F<N.length;){R=N[F];var L=E[R];x(L,g)?N.splice(F,1):(C.push(L),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})}}),zd=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())}}),g1="leftShift",WR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],JR=I(g1,WR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=xi({typed:t}),u=ra({typed:t,equalScalar:n}),l=Id({typed:t,equalScalar:n}),c=io({typed:t,DenseMatrix:i}),f=kr({typed:t,equalScalar:n}),m=In({typed:t}),d=It({typed:t,matrix:r,concat:o}),h=zd({typed:t,matrix:r});return t(g1,{"number, number":a2,"BigNumber, BigNumber":dj,"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}))}),v1="rightArithShift",KR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],YR=I(v1,KR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=xi({typed:t}),u=ra({typed:t,equalScalar:n}),l=Id({typed:t,equalScalar:n}),c=io({typed:t,DenseMatrix:i}),f=kr({typed:t,equalScalar:n}),m=In({typed:t}),d=It({typed:t,matrix:r,concat:o}),h=zd({typed:t,matrix:r});return t(v1,{"number, number":i2,"BigNumber, BigNumber":hj,"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}))}),y1="rightLogShift",ZR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],QR=I(y1,ZR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=xi({typed:t}),u=ra({typed:t,equalScalar:n}),l=Id({typed:t,equalScalar:n}),c=io({typed:t,DenseMatrix:i}),f=kr({typed:t,equalScalar:n}),m=In({typed:t}),d=It({typed:t,matrix:r,concat:o}),h=zd({typed:t,matrix:r});return t(y1,{"number, number":o2,"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}))}),b1="and",XR=["typed","matrix","equalScalar","zeros","not","concat"],Y2=I(b1,XR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=ra({typed:t,equalScalar:n}),u=$c({typed:t,equalScalar:n}),l=kr({typed:t,equalScalar:n}),c=In({typed:t}),f=It({typed:t,matrix:r,concat:o});return t(b1,{"number, number":Ym,"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":Ym,"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}))}),lc="compare",eL=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],tL=I(lc,eL,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,BigNumber:i,Fraction:o,DenseMatrix:s,concat:u}=e,l=Rr({typed:t}),c=Oc({typed:t,equalScalar:n}),f=mr({typed:t,DenseMatrix:s}),m=It({typed:t,matrix:a,concat:u}),d=ss({typed:t});return t(lc,rL({typed:t,config:r}),{"boolean, boolean":function(p,y){return p===y?0:p>y?1:-1},"BigNumber, BigNumber":function(p,y){return _n(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}))}),rL=I(lc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(lc,{"number, number":function(a,i){return Er(a,i,r.relTol,r.absTol)?0:a>i?1:-1}})}),Lf,w1;function nL(){return w1||(w1=1,Lf=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}),Lf}var aL=nL();const Po=Zs.getDefaultExportFromCjs(aL);var x1="compareNatural",iL=["typed","compare"],oL=I(x1,iL,e=>{var{typed:t,compare:r}=e,n=r.signatures["boolean,boolean"];return t(x1,{"any, any":a});function a(u,l){var c=kt(u),f=kt(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:Po(c,f);var d=["Array","DenseMatrix","SparseMatrix"];if(d.includes(c)||d.includes(f))return m=i(a,u,l),m!==0?m:Po(c,f);if(c!==f)return Po(c,f);if(c==="Complex")return sL(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 Po(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 Wi(l)&&Wi(c)?o(u,l.toJSON().values,c.toJSON().values):Wi(l)?i(u,l.toArray(),c):Wi(c)?i(u,l,c.toArray()):Wl(l)?i(u,l.toJSON().data,c):Wl(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(Po),m.sort(Po);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 sL(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 D1="compareText",uL=["typed","matrix","concat"];Hm.signature="any, any";var lL=I(D1,uL,e=>{var{typed:t,matrix:r,concat:n}=e,a=It({typed:t,matrix:r,concat:n});return t(D1,Hm,a({elop:Hm,Ds:!0}))}),cc="equal",cL=["typed","matrix","equalScalar","DenseMatrix","SparseMatrix"],fL=I(cc,cL,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=Rr({typed:t}),u=ha({typed:t,SparseMatrix:o}),l=mr({typed:t,DenseMatrix:a}),c=It({typed:t,matrix:r});return t(cc,mL({typed:t,equalScalar:n}),c({elop:n,SS:u,DS:s,Ss:l}))}),mL=I(cc,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(cc,{"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)}})}),N1="equalText",dL=["typed","compareText","isZero"],hL=I(N1,dL,e=>{var{typed:t,compareText:r,isZero:n}=e;return t(N1,{"any, any":function(i,o){return n(r(i,o))}})}),fc="smaller",pL=["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],gL=I(fc,pL,e=>{var{typed:t,config:r,bignumber:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=Rr({typed:t}),l=ha({typed:t,SparseMatrix:s}),c=mr({typed:t,DenseMatrix:i}),f=It({typed:t,matrix:a,concat:o}),m=ss({typed:t});function d(h,p){return h.lt(p)&&!_n(h,p,r.relTol,r.absTol)}return t(fc,vL({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}))}),vL=I(fc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(fc,{"number, number":function(a,i){return a<i&&!Er(a,i,r.relTol,r.absTol)}})}),mc="smallerEq",yL=["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],bL=I(mc,yL,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=Rr({typed:t}),u=ha({typed:t,SparseMatrix:o}),l=mr({typed:t,DenseMatrix:a}),c=It({typed:t,matrix:n,concat:i}),f=ss({typed:t});return t(mc,wL({typed:t,config:r}),{"boolean, boolean":(m,d)=>m<=d,"BigNumber, BigNumber":function(d,h){return d.lte(h)||_n(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}))}),wL=I(mc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(mc,{"number, number":function(a,i){return a<=i||Er(a,i,r.relTol,r.absTol)}})}),dc="larger",xL=["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],DL=I(dc,xL,e=>{var{typed:t,config:r,bignumber:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=Rr({typed:t}),l=ha({typed:t,SparseMatrix:s}),c=mr({typed:t,DenseMatrix:i}),f=It({typed:t,matrix:a,concat:o}),m=ss({typed:t});function d(h,p){return h.gt(p)&&!_n(h,p,r.relTol,r.absTol)}return t(dc,NL({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}))}),NL=I(dc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(dc,{"number, number":function(a,i){return a>i&&!Er(a,i,r.relTol,r.absTol)}})}),hc="largerEq",AL=["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],CL=I(hc,AL,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=Rr({typed:t}),u=ha({typed:t,SparseMatrix:o}),l=mr({typed:t,DenseMatrix:a}),c=It({typed:t,matrix:n,concat:i}),f=ss({typed:t});return t(hc,EL({typed:t,config:r}),{"boolean, boolean":(m,d)=>m>=d,"BigNumber, BigNumber":function(d,h){return d.gte(h)||_n(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}))}),EL=I(hc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(hc,{"number, number":function(a,i){return a>=i||Er(a,i,r.relTol,r.absTol)}})}),A1="deepEqual",SL=["typed","equal"],TL=I(A1,SL,e=>{var{typed:t,equal:r}=e;return t(A1,{"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)}}),pc="unequal",ML=["typed","config","equalScalar","matrix","DenseMatrix","concat","SparseMatrix"],FL=I(pc,ML,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=Rr({typed:t}),l=ha({typed:t,SparseMatrix:s}),c=mr({typed:t,DenseMatrix:i}),f=It({typed:t,matrix:a,concat:o});return t(pc,PL({typed:t,equalScalar:n}),f({elop:m,SS:l,DS:u,Ss:c}));function m(d,h){return!n(d,h)}}),PL=I(pc,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(pc,{"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)}})}),C1="partitionSelect",kL=["typed","isNumeric","isNaN","compare"],OL=I(C1,kL,e=>{var{typed:t,isNumeric:r,isNaN:n,compare:a}=e,i=a,o=(l,c)=>-a(l,c);return t(C1,{"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(!Pe(c)||c<0)throw new Error("k must be a non-negative integer");if(Le(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]}}),E1="sort",$L=["typed","matrix","compare","compareNatural"],BL=I(E1,$L,e=>{var{typed:t,matrix:r,compare:n,compareNatural:a}=e,i=n,o=(c,f)=>-n(c,f);return t(E1,{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(Je(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")}}),S1="max",_L=["typed","config","numeric","larger","isNaN"],Z2=I(S1,_L,e=>{var{typed:t,config:r,numeric:n,larger:a,isNaN:i}=e;return t(S1,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(l,c){return kc(l,c.valueOf(),o)},"...":function(l){if(as(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 Qr(c,"max",l)}}function s(u){var l;if(vi(u,function(c){try{(i(c)||l===void 0||a(c,l))&&(l=c)}catch(f){throw Qr(f,"max",c)}}),l===void 0)throw new Error("Cannot calculate max of an empty array");return typeof l=="string"&&(l=n(l,bi(l,r))),l}}),T1="min",IL=["typed","config","numeric","smaller","isNaN"],Q2=I(T1,IL,e=>{var{typed:t,config:r,numeric:n,smaller:a,isNaN:i}=e;return t(T1,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(l,c){return kc(l,c.valueOf(),o)},"...":function(l){if(as(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 Qr(c,"min",l)}}function s(u){var l;if(vi(u,function(c){try{(i(c)||l===void 0||a(c,l))&&(l=c)}catch(f){throw Qr(f,"min",c)}}),l===void 0)throw new Error("Cannot calculate min of an empty array");return typeof l=="string"&&(l=n(l,bi(l,r))),l}}),zL="ImmutableDenseMatrix",jL=["smaller","DenseMatrix"],qL=I(zL,jL,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&&!Qt(i))throw new Error("Invalid datatype: "+i);if(Le(a)||Ft(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&&Ft(a.data)&&Ft(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 ("+kt(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 Le(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:We(this._data),size:We(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}),RL="Index",LL=["ImmutableDenseMatrix","getMatrixDataType"],HL=I(RL,LL,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=Ft(s),l=Le(s),c=typeof s,f=null;if(Ed(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(M1(s).valueOf())),l&&(m=a(M1(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(!qe(i[o])||!Pe(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=We(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]=Qt(u)||qe(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]=Qt(u)||qe(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]=Qt(u)||qe(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 qe(i)&&(o=this._dimensions[i])!==null&&o!==void 0?o:null},n.prototype.isObjectProperty=function(){return this._dimensions.length===1&&Qt(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(Qt(u)||qe(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];Qt(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 M1(e){var t=[];return e.forEach((r,n)=>{r&&t.push(n)}),t}var GL="FibonacciHeap",VL=["smaller","larger"],UL=I(GL,VL,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}),WL="Spa",JL=["addScalar","equalScalar","FibonacciHeap"],KL=I(WL,JL,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 YL(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 lu(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:YL(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 ZL=lu(function(e){return new e(1).exp()},{hasher:Bc}),QL=lu(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},{hasher:Bc}),jd=lu(function(e){return e.acos(-1)},{hasher:Bc}),XL=lu(function(e){return jd(e).times(2)},{hasher:Bc});function Bc(e){return e[0].precision}function F1(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 Hf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F1(Object(r),!0).forEach(function(n){lr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var eH="Unit",tH=["?on","config","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],rH=I(eH,tH,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(H,X){if(!(this instanceof g))throw new Error("Constructor must be called with the new operator");if(!(H==null||m(H)||Ia(H)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=v,this.skipAutomaticSimplification=x,X===void 0)this.units=[],this.dimensions=Q.map(q=>0);else if(typeof X=="string"){var O=g.parse(X);this.units=O.units,this.dimensions=O.dimensions}else if(pn(X)&&X.value===null)this.fixPrefix=X.fixPrefix,this.skipAutomaticSimplification=X.skipAutomaticSimplification,this.dimensions=X.dimensions.slice(0),this.units=X.units.map(q=>rr({},q));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(H)}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(H){return H>="0"&&H<="9"||H==="."}function S(H){return H>="0"&&H<="9"}function F(){C++,N=b.charAt(C)}function k(H){C=H,N=b.charAt(C)}function $(){var H="",X=C;if(N==="+"?F():N==="-"&&(H+=N,F()),!E(N))return k(X),null;if(N==="."){if(H+=N,F(),!S(N))return k(X),null}else{for(;S(N);)H+=N,F();N==="."&&(H+=N,F())}for(;S(N);)H+=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),H;for(H=H+O;S(N);)H+=N,F()}return H}function R(){for(var H="";S(N)||g.isValidAlpha(N);)H+=N,F();var X=H.charAt(0);return g.isValidAlpha(X)?H:null}function T(H){return N===H?(F(),H):null}g.parse=function(H,X){if(X=X||{},b=H,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,K=!1;F(),A();var te=$(),ie=null;if(te){if(r.number==="BigNumber")ie=new y(te);else if(r.number==="Fraction")try{ie=new w(te)}catch{ie=parseFloat(te)}else ie=parseFloat(te);A(),T("*")?(q=1,K=!0):T("/")&&(q=-1,K=!0)}for(var re=[],pe=1;;){for(A();N==="(";)re.push(q),pe*=q,q=1,F(),A();var me=void 0;if(N){var Ne=N;if(me=R(),me===null)throw new SyntaxError('Unexpected "'+Ne+'" in "'+b+'" at index '+C.toString())}else break;var de=B(me);if(de===null)throw new SyntaxError('Unit "'+me+'" not found.');var Ie=q*pe;if(A(),T("^")){A();var ct=$();if(ct===null)throw new SyntaxError('In "'+H+'", "^" must be followed by a floating-point number');Ie*=ct}O.units.push({unit:de.unit,prefix:de.prefix,power:Ie});for(var wt=0;wt<Q.length;wt++)O.dimensions[wt]+=(de.unit.dimensions[wt]||0)*Ie;for(A();N===")";){if(re.length===0)throw new SyntaxError('Unmatched ")" in "'+b+'" at index '+C.toString());pe/=re.pop(),F(),A()}if(K=!1,T("*")?(q=1,K=!0):T("/")?(q=-1,K=!0):q=1,de.unit.base){var nt=de.unit.base.key;ee.auto[nt]={unit:de.unit,prefix:de.prefix}}}if(A(),N)throw new SyntaxError('Could not parse: "'+H+'"');if(K)throw new SyntaxError('Trailing characters: "'+H+'"');if(re.length!==0)throw new SyntaxError('Unmatched "(" in "'+b+'"');if(O.units.length===0&&!X.allowNoUnits)throw new SyntaxError('"'+H+'" contains no units');return O.value=ie!==void 0?O._normalize(ie):null,O},g.prototype.clone=function(){var H=new g;H.fixPrefix=this.fixPrefix,H.skipAutomaticSimplification=this.skipAutomaticSimplification,H.value=We(this.value),H.dimensions=this.dimensions.slice(0),H.units=[];for(var X=0;X<this.units.length;X++){H.units[X]={};for(var O in this.units[X])Me(this.units[X],O)&&(H.units[X][O]=this.units[X][O])}return H},g.prototype.valueType=function(){return kt(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(H){if(H==null||this.units.length===0)return H;for(var X=H,O=g._getNumberConverter(kt(H)),q=0;q<this.units.length;q++){var K=O(this.units[q].unit.value),te=O(this.units[q].prefix.value),ie=O(this.units[q].power);X=i(X,s(i(K,te),ie))}return X},g.prototype._denormalize=function(H,X){if(H==null||this.units.length===0)return H;for(var O=H,q=g._getNumberConverter(kt(H)),K=0;K<this.units.length;K++){var te=q(this.units[K].unit.value),ie=q(this.units[K].prefix.value),re=q(this.units[K].power);O=o(O,s(i(te,ie),re))}return O};var B=lu(H=>{if(Me(_,H)){var X=_[H],O=X.prefixes[""];return{unit:X,prefix:O}}for(var q in _)if(Me(_,q)&&rI(H,q)){var K=_[q],te=H.length-q.length,ie=H.substring(0,te),re=Me(K.prefixes,ie)?K.prefixes[ie]:void 0;if(re!==void 0)return{unit:K,prefix:re}}return null},{hasher:H=>H[0],limit:100});g.isValuelessUnit=function(H){return B(H)!==null},g.prototype.hasBase=function(H){if(typeof H=="string"&&(H=z[H]),!H)return!1;for(var X=0;X<Q.length;X++)if(Math.abs((this.dimensions[X]||0)-(H.dimensions[X]||0))>1e-12)return!1;return!0},g.prototype.equalBase=function(H){for(var X=0;X<Q.length;X++)if(Math.abs((this.dimensions[X]||0)-(H.dimensions[X]||0))>1e-12)return!1;return!0},g.prototype.equals=function(H){return this.equalBase(H)&&f(this.value,H.value)},g.prototype.multiply=function(H){for(var X=this.clone(),O=pn(H)?H:new g(H),q=0;q<Q.length;q++)X.dimensions[q]=(this.dimensions[q]||0)+(O.dimensions[q]||0);for(var K=0;K<O.units.length;K++){var te=Hf({},O.units[K]);X.units.push(te)}if(this.value!==null||O.value!==null){var ie=this.value===null?this._normalize(j(O.value)):this.value,re=O.value===null?O._normalize(j(this.value)):O.value;X.value=i(ie,re)}else X.value=null;return pn(H)&&(X.skipAutomaticSimplification=!1),L(X)},g.prototype.divideInto=function(H){return new g(H).divide(this)},g.prototype.divide=function(H){for(var X=this.clone(),O=pn(H)?H:new g(H),q=0;q<Q.length;q++)X.dimensions[q]=(this.dimensions[q]||0)-(O.dimensions[q]||0);for(var K=0;K<O.units.length;K++){var te=Hf(Hf({},O.units[K]),{},{power:-O.units[K].power});X.units.push(te)}if(this.value!==null||O.value!==null){var ie=this.value===null?this._normalize(j(O.value)):this.value,re=O.value===null?O._normalize(j(this.value)):O.value;X.value=o(ie,re)}else X.value=null;return pn(H)&&(X.skipAutomaticSimplification=!1),L(X)},g.prototype.pow=function(H){for(var X=this.clone(),O=0;O<Q.length;O++)X.dimensions[O]=(this.dimensions[O]||0)*H;for(var q=0;q<X.units.length;q++)X.units[q].power*=H;return X.value!==null?X.value=s(X.value,H):X.value=null,X.skipAutomaticSimplification=!1,L(X)};function L(H){return H.equalBase(z.NONE)&&H.value!==null&&!r.predictable?H.value:H}function j(H){var X=g._getNumberConverter(kt(H));return X(1)}g.prototype.abs=function(){var H=this.clone();if(H.value!==null)if(H._isDerived()||H.units.length===0||H.units[0].unit.offset===0)H.value=u(H.value);else{var X=H._numberConverter(),O=X(H.units[0].unit.value),q=X(H.units[0].unit.offset),K=i(O,q);H.value=a(u(n(H.value,K)),K)}for(var te in H.units)(H.units[te].unit.name==="VA"||H.units[te].unit.name==="VAR")&&(H.units[te].unit=_.W);return H},g.prototype.to=function(H){var X=this.value===null?this._normalize(1):this.value,O;if(typeof H=="string")O=g.parse(H);else if(pn(H))O=H.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=We(X);else{var q=g._getNumberConverter(kt(X)),K=this.units[0].unit.value,te=this.units[0].unit.offset,ie=i(K,te),re=O.units[0].unit.value,pe=O.units[0].unit.offset,me=i(re,pe);O.value=n(X,q(a(ie,me)))}return O.fixPrefix=!0,O.skipAutomaticSimplification=!0,O},g.prototype.toNumber=function(H){return D(this.toNumeric(H))},g.prototype.toNumeric=function(H){var X;return H?X=this.to(H):X=this.clone(),X._isDerived()||X.units.length===0?X._denormalize(X.value):X._denormalize(X.value,X.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(H){var X,O,q,K=new g(H.value,(X=H.unit)!==null&&X!==void 0?X:void 0);return K.fixPrefix=(O=H.fixPrefix)!==null&&O!==void 0?O:v,K.skipAutomaticSimplification=(q=H.skipSimp)!==null&&q!==void 0?q:x,K},g.prototype.valueOf=g.prototype.toString,g.prototype.simplify=function(){var H=this.clone(),X=[],O;for(var q in ue)if(Me(ue,q)&&H.hasBase(z[q])){O=q;break}if(O==="NONE")H.units=[];else{var K;if(O&&Me(ue,O)&&(K=ue[O]),K)H.units=[{unit:K.unit,prefix:K.prefix,power:1}];else{for(var te=!1,ie=0;ie<Q.length;ie++){var re=Q[ie];Math.abs(H.dimensions[ie]||0)>1e-12&&(Me(ue,re)?X.push({unit:ue[re].unit,prefix:ue[re].prefix,power:H.dimensions[ie]||0}):te=!0)}X.length<H.units.length&&!te&&(H.units=X)}}return H},g.prototype.toSI=function(){for(var H=this.clone(),X=[],O=0;O<Q.length;O++){var q=Q[O];if(Math.abs(H.dimensions[O]||0)>1e-12)if(Me(ee.si,q))X.push({unit:ee.si[q].unit,prefix:ee.si[q].prefix,power:H.dimensions[O]||0});else throw new Error("Cannot express custom unit "+q+" in SI units")}return H.units=X,H.fixPrefix=!0,H.skipAutomaticSimplification=!0,this.value!==null?(H.value=null,this.to(H)):H},g.prototype.formatUnits=function(){for(var H="",X="",O=0,q=0,K=0;K<this.units.length;K++)this.units[K].power>0?(O++,H+=" "+this.units[K].prefix.name+this.units[K].unit.name,Math.abs(this.units[K].power-1)>1e-15&&(H+="^"+this.units[K].power)):this.units[K].power<0&&q++;if(q>0)for(var te=0;te<this.units.length;te++)this.units[te].power<0&&(O>0?(X+=" "+this.units[te].prefix.name+this.units[te].unit.name,Math.abs(this.units[te].power+1)>1e-15&&(X+="^"+-this.units[te].power)):(X+=" "+this.units[te].prefix.name+this.units[te].unit.name,X+="^"+this.units[te].power));H=H.substr(1),X=X.substr(1),O>1&&q>0&&(H="("+H+")"),q>1&&O>0&&(X="("+X+")");var ie=H;return O>0&&q>0&&(ie+=" / "),ie+=X,ie},g.prototype.toBest=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(H&&!Array.isArray(H))throw new Error("Invalid unit type. Expected string or Unit.");var O=this.units[0].unit.prefixes;if(H&&H.length>0){var q=H.map(ie=>{var re=null;if(typeof ie=="string"){if(re=g.parse(ie),!re)throw new Error("Invalid unit type. Expected compatible string or Unit.")}else if(!pn(ie))throw new Error("Invalid unit type. Expected compatible string or Unit.");re===null&&(re=ie.clone());try{return this.to(re.formatUnits()),re}catch{throw new Error("Invalid unit type. Expected compatible string or Unit.")}}),K=q.map(ie=>ie.units[0].prefix);this.units[0].unit.prefixes=K.reduce((ie,re)=>(ie[re.name]=re,ie),{}),this.units[0].prefix=K[0]}var te=Z(this,X).simp;return this.units[0].unit.prefixes=O,te.fixPrefix=!0,te},g.prototype.format=function(H){var{simp:X,valueStr:O,unitStr:q}=Z(this,H),K=O;return X.value&&Ia(X.value)&&(K="("+K+")"),q.length>0&&K.length>0&&(K+=" "),K+=q,K};function Z(H){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=H.skipAutomaticSimplification||H.value===null?H.clone():H.simplify();G(O),V(O,X.offset);var q=O._denormalize(O.value),K=O.value!==null?d(q,X||{}):"",te=O.formatUnits();return{simp:O,valueStr:K,unitStr:te}}function G(H){var X=!1;typeof H.value<"u"&&H.value!==null&&Ia(H.value)&&(X=Math.abs(H.value.re)<1e-14);for(var O in H.units)Me(H.units,O)&&H.units[O].unit&&(H.units[O].unit.name==="VA"&&X?H.units[O].unit=_.VAR:H.units[O].unit.name==="VAR"&&!X&&(H.units[O].unit=_.VA))}function V(H,X){H.units.length===1&&!H.fixPrefix&&Math.abs(H.units[0].power-Math.round(H.units[0].power))<1e-14&&(H.units[0].prefix=H._bestPrefix(X))}g.prototype._bestPrefix=function(){var H=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 X=this.value!==null?u(this.value):0,O=u(this.units[0].unit.value),q=this.units[0].prefix;if(X===0)return q;var K=this.units[0].power,te=Math.log(X/Math.pow(q.value*O,K))/Math.LN10-H;if(te>-2.200001&&te<1.800001)return q;te=Math.abs(te);var ie=this.units[0].unit.prefixes;for(var re in ie)if(Me(ie,re)){var pe=ie[re];if(pe.scientific){var me=Math.abs(Math.log(X/Math.pow(pe.value*O,K))/Math.LN10-H);(me<te||me===te&&pe.name.length<q.name.length)&&(q=pe,te=me)}}return q},g.prototype.splitUnit=function(H){for(var X=this.clone(),O=[],q=0;q<H.length&&(X=X.to(H[q]),q!==H.length-1);q++){var K=X.toNumeric(),te=c(K),ie=void 0,re=f(te,K);re?ie=te:ie=l(X.toNumeric());var pe=new g(ie,H[q].toString());O.push(pe),X=a(X,pe)}for(var me=0,Ne=0;Ne<O.length;Ne++)me=n(me,O[Ne].value);return f(me,this.value)&&(X.value=0),O.push(X),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=rr({},P.SHORT,P.LONG),P.BINARY_SHORT=rr({},P.BINARY_SHORT_SI,P.BINARY_SHORT_IEC),P.BINARY_LONG=rr({},P.BINARY_LONG_SI,P.BINARY_LONG_IEC);var Q=["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 oe in z)Me(z,oe)&&(z[oe].key=oe);var ne={},U={name:"",base:ne,value:1,offset:0,dimensions:Q.map(H=>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}},J={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 ae(H){if(H.number==="BigNumber"){var X=jd(y);_.rad.value=new y(1),_.deg.value=X.div(180),_.grad.value=X.div(200),_.cycle.value=X.times(2),_.arcsec.value=X.div(648e3),_.arcmin.value=X.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}ae(r),t&&t("config",function(H,X){H.number!==X.number&&ae(H)});var ee={si:{NONE:{unit:U,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[""]}}};ee.cgs=JSON.parse(JSON.stringify(ee.si)),ee.cgs.LENGTH={unit:_.m,prefix:P.SHORT.c},ee.cgs.MASS={unit:_.g,prefix:P.SHORT[""]},ee.cgs.FORCE={unit:_.dyn,prefix:P.SHORT[""]},ee.cgs.ENERGY={unit:_.erg,prefix:P.NONE[""]},ee.us=JSON.parse(JSON.stringify(ee.si)),ee.us.LENGTH={unit:_.ft,prefix:P.NONE[""]},ee.us.MASS={unit:_.lbm,prefix:P.NONE[""]},ee.us.TEMPERATURE={unit:_.degF,prefix:P.NONE[""]},ee.us.FORCE={unit:_.lbf,prefix:P.NONE[""]},ee.us.ENERGY={unit:_.BTU,prefix:P.BTU[""]},ee.us.POWER={unit:_.hp,prefix:P.NONE[""]},ee.us.PRESSURE={unit:_.psi,prefix:P.NONE[""]},ee.auto=JSON.parse(JSON.stringify(ee.si));var ue=ee.auto;g.setUnitSystem=function(H){if(Me(ee,H))ue=ee[H];else throw new Error("Unit system "+H+" does not exist. Choices are: "+Object.keys(ee).join(", "))},g.getUnitSystem=function(){for(var H in ee)if(Me(ee,H)&&ee[H]===ue)return H},g.typeConverters={BigNumber:function(X){return X!=null&&X.isFraction?new y(String(X.n)).div(String(X.d)).times(String(X.s)):new y(X+"")},Fraction:function(X){return new w(X)},Complex:function(X){return X},number:function(X){return X!=null&&X.isFraction?h(X):X}},g.prototype._numberConverter=function(){var H=g.typeConverters[this.valueType()];if(H)return H;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},g._getNumberConverter=function(H){if(!g.typeConverters[H])throw new TypeError('Unsupported type "'+H+'"');return g.typeConverters[H]};for(var se in _)if(Me(_,se)){var ye=_[se];ye.dimensions=ye.base.dimensions}for(var Se in J)if(Me(J,Se)){var Fe=_[J[Se]],Ce={};for(var ke in Fe)Me(Fe,ke)&&(Ce[ke]=Fe[ke]);Ce.name=Se,_[Se]=Ce}g.isValidAlpha=function(X){return/^[a-zA-Z]$/.test(X)};function je(H){for(var X=0;X<H.length;X++){if(N=H.charAt(X),X===0&&!g.isValidAlpha(N))throw new Error('Invalid unit name (must begin with alpha character): "'+H+'"');if(X>0&&!(g.isValidAlpha(N)||S(N)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+H+'"')}}return g.createUnit=function(H,X){if(typeof H!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(X&&X.override){for(var O in H)if(Me(H,O)&&g.deleteUnit(O),H[O].aliases)for(var q=0;q<H[O].aliases.length;q++)g.deleteUnit(H[O].aliases[q])}var K;for(var te in H)Me(H,te)&&(K=g.createUnitSingle(te,H[te]));return K},g.createUnitSingle=function(H,X){if((typeof X>"u"||X===null)&&(X={}),typeof H!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Me(_,H))throw new Error('Cannot create unit "'+H+'": a unit with that name already exists');je(H);var O=null,q=[],K=0,te,ie,re;if(X&&X.type==="Unit")O=X.clone();else if(typeof X=="string")X!==""&&(te=X);else if(typeof X=="object")te=X.definition,ie=X.prefixes,K=X.offset,re=X.baseName,X.aliases&&(q=X.aliases.valueOf());else throw new TypeError('Cannot create unit "'+H+'" from "'+X.toString()+'": expecting "string" or "Unit" or "Object"');if(q){for(var pe=0;pe<q.length;pe++)if(Me(_,q[pe]))throw new Error('Cannot create alias "'+q[pe]+'": a unit with that name already exists')}if(te&&typeof te=="string"&&!O)try{O=g.parse(te,{allowNoUnits:!0})}catch(Ue){throw Ue.message='Could not create unit "'+H+'" from "'+te+'": '+Ue.message,Ue}else te&&te.type==="Unit"&&(O=te.clone());q=q||[],K=K||0,ie&&ie.toUpperCase?ie=P[ie.toUpperCase()]||P.NONE:ie=P.NONE;var me={};if(O){me={name:H,value:O.value,dimensions:O.dimensions.slice(0),prefixes:ie,offset:K};var ct=!1;for(var wt in z)if(Me(z,wt)){for(var nt=!0,Ht=0;Ht<Q.length;Ht++)if(Math.abs((me.dimensions[Ht]||0)-(z[wt].dimensions[Ht]||0))>1e-12){nt=!1;break}if(nt){ct=!0,me.base=z[wt];break}}if(!ct){re=re||H+"_STUFF";var M={dimensions:O.dimensions.slice(0)};M.key=re,z[re]=M,ue[re]={unit:me,prefix:P.NONE[""]},me.base=z[re]}}else{if(re=re||H+"_STUFF",Q.indexOf(re)>=0)throw new Error('Cannot create new base unit "'+H+'": a base unit with that name already exists (and cannot be overridden)');Q.push(re);for(var Ne in z)Me(z,Ne)&&(z[Ne].dimensions[Q.length-1]=0);for(var de={dimensions:[]},Ie=0;Ie<Q.length;Ie++)de.dimensions[Ie]=0;de.dimensions[Q.length-1]=1,de.key=re,z[re]=de,me={name:H,value:1,dimensions:z[re].dimensions.slice(0),prefixes:ie,offset:K,base:z[re]},ue[re]={unit:me,prefix:P.NONE[""]}}g.UNITS[H]=me;for(var Y=0;Y<q.length;Y++){var le=q[Y],ve={};for(var Oe in me)Me(me,Oe)&&(ve[Oe]=me[Oe]);ve.name=le,g.UNITS[le]=ve}return delete B.cache,new g(null,H)},g.deleteUnit=function(H){delete g.UNITS[H],delete B.cache},g.PREFIXES=P,g.BASE_DIMENSIONS=Q,g.BASE_UNITS=z,g.UNIT_SYSTEMS=ee,g.UNITS=_,g},{isClass:!0}),P1="unit",nH=["typed","Unit"],aH=I(P1,nH,e=>{var{typed:t,Unit:r}=e;return t(P1,{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=>Xe(a,n))})}),k1="sparse",iH=["typed","SparseMatrix"],oH=I(k1,iH,e=>{var{typed:t,SparseMatrix:r}=e;return t(k1,{"":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)}})}),O1="createUnit",sH=["typed","Unit"],uH=I(O1,sH,e=>{var{typed:t,Unit:r}=e;return t(O1,{"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,{})}})}),$1="acos",lH=["typed","config","Complex"],cH=I($1,lH,e=>{var{typed:t,config:r,Complex:n}=e;return t($1,{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()}})}),B1="acosh",fH=["typed","config","Complex"],mH=I(B1,fH,e=>{var{typed:t,config:r,Complex:n}=e;return t(B1,{number:function(i){return i>=1||r.predictable?f2(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()}})}),_1="acot",dH=["typed","BigNumber"],hH=I(_1,dH,e=>{var{typed:t,BigNumber:r}=e;return t(_1,{number:m2,Complex:function(a){return a.acot()},BigNumber:function(a){return new r(1).div(a).atan()}})}),I1="acoth",pH=["typed","config","Complex","BigNumber"],gH=I(I1,pH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(I1,{number:function(o){return o>=1||o<=-1||r.predictable?d2(o):new n(o,0).acoth()},Complex:function(o){return o.acoth()},BigNumber:function(o){return new a(1).div(o).atanh()}})}),z1="acsc",vH=["typed","config","Complex","BigNumber"],yH=I(z1,vH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(z1,{number:function(o){return o<=-1||o>=1||r.predictable?h2(o):new n(o,0).acsc()},Complex:function(o){return o.acsc()},BigNumber:function(o){return new a(1).div(o).asin()}})}),j1="acsch",bH=["typed","BigNumber"],wH=I(j1,bH,e=>{var{typed:t,BigNumber:r}=e;return t(j1,{number:p2,Complex:function(a){return a.acsch()},BigNumber:function(a){return new r(1).div(a).asinh()}})}),q1="asec",xH=["typed","config","Complex","BigNumber"],DH=I(q1,xH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(q1,{number:function(o){return o<=-1||o>=1||r.predictable?g2(o):new n(o,0).asec()},Complex:function(o){return o.asec()},BigNumber:function(o){return new a(1).div(o).acos()}})}),R1="asech",NH=["typed","config","Complex","BigNumber"],AH=I(R1,NH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(R1,{number:function(o){if(o<=1&&o>=-1||r.predictable){var s=1/o;if(s>0||r.predictable)return v2(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()}})}),L1="asin",CH=["typed","config","Complex"],EH=I(L1,CH,e=>{var{typed:t,config:r,Complex:n}=e;return t(L1,{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()}})}),SH="asinh",TH=["typed"],MH=I(SH,TH,e=>{var{typed:t}=e;return t("asinh",{number:y2,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})}),FH="atan",PH=["typed"],kH=I(FH,PH,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()}})}),H1="atan2",OH=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],$H=I(H1,OH,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,DenseMatrix:i,concat:o}=e,s=ra({typed:t,equalScalar:n}),u=Rr({typed:t}),l=O2({typed:t,equalScalar:n}),c=kr({typed:t,equalScalar:n}),f=mr({typed:t,DenseMatrix:i}),m=It({typed:t,matrix:r,concat:o});return t(H1,{"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}))}),G1="atanh",BH=["typed","config","Complex"],_H=I(G1,BH,e=>{var{typed:t,config:r,Complex:n}=e;return t(G1,{number:function(i){return i<=1&&i>=-1||r.predictable?b2(i):new n(i,0).atanh()},Complex:function(i){return i.atanh()},BigNumber:function(i){return i.atanh()}})}),us=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)})}}),V1="cos",IH=["typed"],zH=I(V1,IH,e=>{var{typed:t}=e,r=us({typed:t});return t(V1,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},r)}),U1="cosh",jH=["typed"],qH=I(U1,jH,e=>{var{typed:t}=e;return t(U1,{number:T8,"Complex | BigNumber":r=>r.cosh()})}),W1="cot",RH=["typed","BigNumber"],LH=I(W1,RH,e=>{var{typed:t,BigNumber:r}=e,n=us({typed:t});return t(W1,{number:w2,Complex:a=>a.cot(),BigNumber:a=>new r(1).div(a.tan())},n)}),J1="coth",HH=["typed","BigNumber"],GH=I(J1,HH,e=>{var{typed:t,BigNumber:r}=e;return t(J1,{number:x2,Complex:n=>n.coth(),BigNumber:n=>new r(1).div(n.tanh())})}),K1="csc",VH=["typed","BigNumber"],UH=I(K1,VH,e=>{var{typed:t,BigNumber:r}=e,n=us({typed:t});return t(K1,{number:D2,Complex:a=>a.csc(),BigNumber:a=>new r(1).div(a.sin())},n)}),Y1="csch",WH=["typed","BigNumber"],JH=I(Y1,WH,e=>{var{typed:t,BigNumber:r}=e;return t(Y1,{number:N2,Complex:n=>n.csch(),BigNumber:n=>new r(1).div(n.sinh())})}),Z1="sec",KH=["typed","BigNumber"],YH=I(Z1,KH,e=>{var{typed:t,BigNumber:r}=e,n=us({typed:t});return t(Z1,{number:A2,Complex:a=>a.sec(),BigNumber:a=>new r(1).div(a.cos())},n)}),Q1="sech",ZH=["typed","BigNumber"],QH=I(Q1,ZH,e=>{var{typed:t,BigNumber:r}=e;return t(Q1,{number:C2,Complex:n=>n.sech(),BigNumber:n=>new r(1).div(n.cosh())})}),X1="sin",XH=["typed"],eG=I(X1,XH,e=>{var{typed:t}=e,r=us({typed:t});return t(X1,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},r)}),ey="sinh",tG=["typed"],rG=I(ey,tG,e=>{var{typed:t}=e;return t(ey,{number:E2,"Complex | BigNumber":r=>r.sinh()})}),ty="tan",nG=["typed"],aG=I(ty,nG,e=>{var{typed:t}=e,r=us({typed:t});return t(ty,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},r)}),iG="tanh",oG=["typed"],sG=I(iG,oG,e=>{var{typed:t}=e;return t("tanh",{number:F8,"Complex | BigNumber":r=>r.tanh()})}),ry="setCartesian",uG=["typed","size","subset","compareNatural","Index","DenseMatrix"],lG=I(ry,uG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ry,{"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=ht(Array.isArray(u)?u:u.toArray()).sort(a),m=ht(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)}})}),ny="setDifference",cG=["typed","size","subset","compareNatural","Index","DenseMatrix"],fG=I(ny,cG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ny,{"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 ht(u.toArray());var f=Zo(ht(Array.isArray(u)?u:u.toArray()).sort(a)),m=Zo(ht(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)?ec(c):new o(ec(c))}})}),ay="setDistinct",mG=["typed","size","subset","compareNatural","Index","DenseMatrix"],dG=I(ay,mG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ay,{"Array | Matrix":function(u){var l;if(n(r(u),new i(0))===0)l=[];else{var c=ht(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)}})}),iy="setIntersect",hG=["typed","size","subset","compareNatural","Index","DenseMatrix"],pG=I(iy,hG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(iy,{"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=Zo(ht(Array.isArray(u)?u:u.toArray()).sort(a)),m=Zo(ht(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)?ec(c):new o(ec(c))}})}),oy="setIsSubset",gG=["typed","size","subset","compareNatural","Index"],vG=I(oy,gG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(oy,{"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=Zo(ht(Array.isArray(s)?s:s.toArray()).sort(a)),c=Zo(ht(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}})}),sy="setMultiplicity",yG=["typed","size","subset","compareNatural","Index"],bG=I(sy,yG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(sy,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(s,u){if(n(r(u),new i(0))===0)return 0;for(var l=ht(Array.isArray(u)?u:u.toArray()),c=0,f=0;f<l.length;f++)a(l[f],s)===0&&c++;return c}})}),uy="setPowerset",wG=["typed","size","subset","compareNatural","Index"],xG=I(uy,wG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(uy,{"Array | Matrix":function(l){if(n(r(l),new i(0))===0)return[];for(var c=ht(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}}),ly="setSize",DG=["typed","compareNatural"],NG=I(ly,DG,e=>{var{typed:t,compareNatural:r}=e;return t(ly,{"Array | Matrix":function(a){return Array.isArray(a)?ht(a).length:ht(a.toArray()).length},"Array | Matrix, boolean":function(a,i){if(i===!1||a.length===0)return Array.isArray(a)?ht(a).length:ht(a.toArray()).length;for(var o=ht(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}})}),cy="setSymDifference",AG=["typed","size","concat","subset","setDifference","Index"],CG=I(cy,AG,e=>{var{typed:t,size:r,concat:n,subset:a,setDifference:i,Index:o}=e;return t(cy,{"Array | Matrix, Array | Matrix":function(u,l){if(a(r(u),new o(0))===0)return ht(l);if(a(r(l),new o(0))===0)return ht(u);var c=ht(u),f=ht(l);return n(i(c,f),i(f,c))}})}),fy="setUnion",EG=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],SG=I(fy,EG,e=>{var{typed:t,size:r,concat:n,subset:a,setIntersect:i,setSymDifference:o,Index:s}=e;return t(fy,{"Array | Matrix, Array | Matrix":function(l,c){if(a(r(l),new s(0))===0)return ht(c);if(a(r(c),new s(0))===0)return ht(l);var f=ht(l),m=ht(c);return n(o(f,m),i(f,m))}})}),my="add",TG=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],MG=I(my,TG,e=>{var{typed:t,matrix:r,addScalar:n,equalScalar:a,DenseMatrix:i,SparseMatrix:o,concat:s}=e,u=xi({typed:t}),l=Od({typed:t,equalScalar:a}),c=io({typed:t,DenseMatrix:i}),f=It({typed:t,matrix:r,concat:s});return t(my,{"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}))}),dy="hypot",FG=["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],PG=I(dy,FG,e=>{var{typed:t,abs:r,addScalar:n,divideScalar:a,multiplyScalar:i,sqrt:o,smaller:s,isPositive:u}=e;return t(dy,{"... number | BigNumber":l,Array:l,Matrix:c=>l(ht(c.toArray(),!0))});function l(c){for(var f=0,m=0,d=0;d<c.length;d++){if(Ia(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))}}),hy="norm",kG=["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix","ctranspose","eigs"],OG=I(hy,kG,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(hy,{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")}}}),py="dot",$G=["typed","addScalar","multiplyScalar","conj","size"],BG=I(py,$G,e=>{var{typed:t,addScalar:r,multiplyScalar:n,conj:a,size:i}=e;return t(py,{"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=Le(l)?l._data:l,d=Le(l)?l._datatype||l.getDataType():void 0,h=Le(c)?c._data:c,p=Le(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}}),_G="trace",IG=["typed","matrix","add"],zG=I(_G,IG,e=>{var{typed:t,matrix:r,add:n}=e;return t("trace",{Array:function(s){return a(r(s))},SparseMatrix:i,DenseMatrix:a,any:We});function a(o){var s=o._size,u=o._data;switch(s.length){case 1:if(s[0]===1)return We(u[0]);throw new RangeError("Matrix must be square (size: "+ot(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: "+ot(s)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+ot(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: "+ot(c)+")")}}),gy="index",jG=["typed","Index"],qG=I(gy,jG,e=>{var{typed:t,Index:r}=e;return t(gy,{"...number | string | BigNumber | Range | Array | Matrix":function(a){var i=a.map(function(s){return Qe(s)?s.toNumber():Ft(s)||Le(s)?s.map(function(u){return Qe(u)?u.toNumber():u}):s}),o=new r;return r.apply(o,i),o}})}),X2=new Set(["end"]),RG="Node",LG=["mathWithTransform"],HG=I(RG,LG,e=>{var{mathWithTransform:t}=e;function r(a){for(var i of[...X2])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=Lo(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(!St(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&&Ga(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 Xr(e){return e&&e.isIndexError?new ea(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function eD(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 Jr(n,a.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw Xr(i)}}}var sl="AccessorNode",GG=["subset","Node"],VG=I(sl,GG,e=>{var{subset:t,Node:r}=e,n=eD({subset:t});function a(o){return!(La(o)||Pn(o)||mt(o)||hi(o)||Ec(o)||Ha(o)||Nr(o))}class i extends r{constructor(s,u){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(super(),!St(s))throw new TypeError('Node expected for parameter "object"');if(!ns(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 sl}get isAccessorNode(){return!0}_compile(s,u){var l=this.object._compile(s,u),c=this.index._compile(s,u),f=this.optionalChaining,m=La(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 Jr(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:sl,object:this.object,index:this.index,optionalChaining:this.optionalChaining}}static fromJSON(s){return new i(s.object,s.index,s.optionalChaining)}}return lr(i,"name",sl),i},{isClass:!0,isNode:!0}),ul="ArrayNode",UG=["Node"],WG=I(ul,UG,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.items=a||[],!Array.isArray(this.items)||!this.items.every(St))throw new TypeError("Array containing Nodes expected")}get type(){return ul}get isArrayNode(){return!0}_compile(a,i){var o=ci(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(ci(o,function(d){return d(c,f,m)}))}}else return function(c,f,m){return ci(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:ul,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(Pn)&&!o.every(Pn),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 lr(r,"name",ul),r},{isClass:!0,isNode:!0});function JG(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 Wo(a,i.getObjectProperty(),o),a}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(u){throw Xr(u)}}}var Kn=[{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 ll(e,t){if(!t||t!=="auto")return e;for(var r=e;Ha(r);)r=r.content;return r}function Pt(e,t,r,n){var a=e;t!=="keep"&&(a=e.getContent());for(var i=a.getIdentifier(),o=null,s=0;s<Kn.length;s++)if(i in Kn[s]){o=s;break}if(i==="OperatorNode:multiply"&&a.implicit&&r!=="show"){var u=ll(a.args[0],t);!(mt(u)&&n&&n.getIdentifier()==="OperatorNode:divide"&&zm(ll(n.args[0],t)))&&!(u.getIdentifier()==="OperatorNode:divide"&&zm(ll(u.args[0],t))&&mt(ll(u.args[1])))&&(o+=1)}return o}function Ss(e,t){var r=e;t!=="keep"&&(r=e.getContent());var n=r.getIdentifier(),a=Pt(r,t);if(a===null)return null;var i=Kn[a][n];if(Me(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 Gf(e,t,r){var n=r!=="keep"?e.getContent():e,a=r!=="keep"?e.getContent():t,i=n.getIdentifier(),o=a.getIdentifier(),s=Pt(n,r);if(s===null)return null;var u=Kn[s][i];if(Me(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 KG(e){var t="OperatorNode:"+e;for(var r of Kn)if(t in r)return r[t].op;return null}var cl="AssignmentNode",YG=["subset","?matrix","Node"],ZG=I(cl,YG,e=>{var{subset:t,matrix:r,Node:n}=e,a=eD({subset:t}),i=JG({subset:t,matrix:r});function o(u,l,c){l||(l="keep");var f=Pt(u,l,c),m=Pt(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,!Nr(l)&&!La(l))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(Nr(l)&&l.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!ns(this.index))throw new TypeError('IndexNode expected as "index"');if(!St(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 cl}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 Wo(C,p,N),N}}else{if(Nr(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=Jr(C,w),A=m(x,g,N),E=d(x,g,b);return Wo(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(!Nr(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:cl,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 lr(s,"name",cl),s},{isClass:!0,isNode:!0}),fl="BlockNode",QG=["ResultSet","Node"],XG=I(fl,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(!St(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 fl}get isBlockNode(){return!0}_compile(i,o){var s=ci(this.blocks,function(u){return{evaluate:u.node._compile(i,o),visible:u.visible}});return function(l,c,f){var m=[];return Bx(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:fl,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 lr(n,"name",fl),n},{isClass:!0,isNode:!0}),ml="ConditionalNode",eV=["Node"],tV=I(ml,eV,e=>{var{Node:t}=e;function r(a){if(typeof a=="number"||typeof a=="boolean"||typeof a=="string")return!!a;if(a){if(Qe(a))return!a.isZero();if(Ia(a))return!!(a.re||a.im);if(pn(a))return!!a.value}if(a==null)return!1;throw new TypeError('Unsupported type of condition "'+kt(a)+'"')}class n extends t{constructor(i,o,s){if(super(),!St(i))throw new TypeError("Parameter condition must be a Node");if(!St(o))throw new TypeError("Parameter trueExpr must be a Node");if(!St(s))throw new TypeError("Parameter falseExpr must be a Node");this.condition=i,this.trueExpr=o,this.falseExpr=s}get type(){return ml}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=Pt(this,o,i&&i.implicit),u=this.condition.toString(i),l=Pt(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=Pt(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=Pt(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:ml,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=Pt(this,o,i&&i.implicit),u=this.condition.toHTML(i),l=Pt(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=Pt(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=Pt(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 lr(n,"name",ml),n},{isClass:!0,isNode:!0}),Vf,vy;function rV(){if(vy)return Vf;vy=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 Vf=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},Vf}var nV=rV();const aV=Zs.getDefaultExportFromCjs(nV);var rd={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{?}"},dt={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"},yy={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(dt.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(dt.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(dt.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(dt.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(dt.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(dt.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(dt.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(dt.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(dt.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(dt.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(dt.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(dt.bitAnd,"${args[1]}\\right)")},bitNot:{1:dt.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(dt.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(dt.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(dt.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(dt.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(dt.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(dt.and,"${args[1]}\\right)")},not:{1:dt.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(dt.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(dt.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(dt.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(dt.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(dt.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(dt.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(dt.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(dt.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(dt.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(dt.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(dt.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(dt.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(dt.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(rd.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)"}},iV="\\mathrm{${name}}\\left(${args}\\right)",by={deg:"^\\circ"};function nd(e){return aV(e,{preserveFormatting:!0})}function tD(e,t){return t=typeof t>"u"?!1:t,t?Me(by,e)?by[e]:"\\mathrm{"+nd(e)+"}":Me(rd,e)?rd[e]:nd(e)}var dl="ConstantNode",oV=["Node","isBounded"],sV=I(dl,oV,e=>{var{Node:t,isBounded:r}=e;class n extends t{constructor(i){super(),this.value=i}get type(){return dl}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 ot(this.value,i)}_toHTML(i){var o=this._toString(i);switch(kt(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:dl,value:this.value}}static fromJSON(i){return new n(i.value)}_toTex(i){var o=this._toString(i),s=kt(this.value);switch(s){case"string":return"\\mathtt{"+nd(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 lr(n,"name",dl),n},{isClass:!0,isNode:!0}),hl="FunctionAssignmentNode",uV=["typed","Node"],lV=I(hl,uV,e=>{var{typed:t,Node:r}=e;function n(i,o,s){var u=Pt(i,o,s),l=Pt(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(!St(u))throw new TypeError('Node expected for parameter "expr"');if(X2.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 hl}get isFunctionAssignmentNode(){return!0}_compile(o,s){var u=Object.create(s);Bx(this.params,function(p){u[p]=!0});var l=this.expr,c=l._compile(o,u),f=this.name,m=this.params,d=h0(this.types,","),h=f+"("+h0(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:hl,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">'+$n(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">'+$n(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(tD).join(",")+"\\right)="+u}}return lr(a,"name",hl),a},{isClass:!0,isNode:!0}),pl="IndexNode",cV=["Node","size"],fV=I(pl,cV,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(St))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 pl}get isIndexNode(){return!0}_compile(i,o){var s=ci(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(!Le(w)&&!Ft(w)&&!Qt(w))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+kt(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=Jr(i,"index");return function(c,f,m){var d=ci(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&&mt(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:pl,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">'+$n(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 lr(n,"name",pl),n},{isClass:!0,isNode:!0}),gl="ObjectNode",mV=["Node"],dV=I(gl,mV,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 St(a[i])})))throw new TypeError("Object containing Nodes expected")}get type(){return gl}get isObjectNode(){return!0}_compile(a,i){var o={};for(var s in this.properties)if(Me(this.properties,s)){var u=qo(s),l=JSON.parse(u),c=Jr(this.properties,s);o[l]=c._compile(a,i)}return function(m,d,h){var p={};for(var y in o)Me(o,y)&&(p[y]=o[y](m,d,h));return p}}forEach(a){for(var i in this.properties)Me(this.properties,i)&&a(this.properties[i],"properties["+qo(i)+"]",this)}map(a){var i={};for(var o in this.properties)Me(this.properties,o)&&(i[o]=this._ifNode(a(this.properties[o],"properties["+qo(o)+"]",this)));return new r(i)}clone(){var a={};for(var i in this.properties)Me(this.properties,i)&&(a[i]=this.properties[i]);return new r(a)}_toString(a){var i=[];for(var o in this.properties)Me(this.properties,o)&&i.push(qo(o)+": "+this.properties[o].toString(a));return"{"+i.join(", ")+"}"}toJSON(){return{mathjs:gl,properties:this.properties}}static fromJSON(a){return new r(a.properties)}_toHTML(a){var i=[];for(var o in this.properties)Me(this.properties,o)&&i.push('<span class="math-symbol math-property">'+$n(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)Me(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 lr(r,"name",gl),r},{isClass:!0,isNode:!0});function Ps(e,t){return new ox(e,new Nc(t),new Set(Object.keys(t)))}var vl="OperatorNode",hV=["Node"],pV=I(vl,hV,e=>{var{Node:t}=e;function r(i,o){var s=i;if(o==="auto")for(;Ha(s);)s=s.content;return mt(s)?!0:tr(s)?r(s.args[0],o):!1}function n(i,o,s,u,l){var c=Pt(i,o,s),f=Ss(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=Pt(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()),Kn[c][p].latexLeftParens===!1){m=[!1];break}if(Kn[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=Pt(u[0],o,s,i),D=Gf(i,u[0],o);w===null?y=!1:w===c&&f==="right"&&!D||w<c?y=!0:y=!1;var v,x=Pt(u[1],o,s,i),g=Gf(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&&(Kn[c][b].latexLeftParens===!1&&(y=!1),Kn[w][C].latexParens===!1&&(y=!1)),x!==null&&(Kn[c][b].latexRightParens===!1&&(v=!1),Kn[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=Pt(E,o,s,i),F=Gf(i,E,o),k=Ss(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"||!Ha(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(St))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 vl}get isOperatorNode(){return!0}_compile(o,s){if(typeof this.fn!="string"||!Cd(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=Jr(o,this.fn),l=ci(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,Ps(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,ci(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=Ss(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:vl,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=Ss(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">'+$n(this.op)+"</span>"+m:m+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+$n(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">'+$n(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">'+$n(this.op)+"</span>"):'<span class="math-function">'+$n(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=dt[this.fn];if(f=typeof f>"u"?this.op:f,l.length===1){var m=Ss(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 lr(a,"name",vl),a},{isClass:!0,isNode:!0}),yl="ParenthesisNode",gV=["Node"],vV=I(yl,gV,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),!St(a))throw new TypeError('Node expected for parameter "content"');this.content=a}get type(){return yl}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:yl,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 lr(r,"name",yl),r},{isClass:!0,isNode:!0}),bl="RangeNode",yV=["Node"],bV=I(bl,yV,e=>{var{Node:t}=e;function r(a,i,o){var s=Pt(a,i,o),u={},l=Pt(a.start,i,o);if(u.start=l!==null&&l<=s||i==="all",a.step){var c=Pt(a.step,i,o);u.step=c!==null&&c<=s||i==="all"}var f=Pt(a.end,i,o);return u.end=f!==null&&f<=s||i==="all",u}class n extends t{constructor(i,o,s){if(super(),!St(i))throw new TypeError("Node expected");if(!St(o))throw new TypeError("Node expected");if(s&&!St(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 bl}get isRangeNode(){return!0}needsEnd(){var i=this.filter(function(o){return Nr(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:bl,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 lr(n,"name",bl),n},{isClass:!0,isNode:!0}),wl="RelationalNode",wV=["Node"],xV=I(wl,wV,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 wl}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=Jr(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=Pt(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=Pt(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:wl,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=Pt(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=Pt(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">'+$n(r[this.conditionals[c]])+"</span>"+u[c+1];return l}_toTex(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Pt(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=Pt(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+=dt[this.conditionals[c]]+u[c+1];return l}}return lr(n,"name",wl),n},{isClass:!0,isNode:!0}),DV="SymbolNode",NV=["math","?Unit","Node"],AV=I(DV,NV,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 Jr(m,l)};if(l in s)return function(f,m,d){return f.has(l)?f.get(l):Jr(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=$n(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=tD(this.name,u);return l[0]==="\\"?l:" "+l}}return i},{isClass:!0,isNode:!0}),xl="FunctionNode",CV=["math","Node","SymbolNode"],EV=I(xl,CV,e=>{var t,{math:r,Node:n,SymbolNode:a}=e,i=u=>ot(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(St(p))f+=p.toTex(c);else if(Array.isArray(p))f+=p.map(function(y,w){if(St(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(St(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)),!St(l))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(c)||!c.every(St))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 xl}get isFunctionNode(){return!0}_compile(l,c){var f=this.args.map(A=>A._compile(l,c)),m=this.optional||La(this.fn)&&this.fn.optionalChaining;if(Nr(this.fn)){var d=this.fn.name;if(c[d]){var D=this.args;return function(E,S,F){var k=Jr(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,Ps(E,S));var $=f.map(R=>R(E,S,F));return k.apply(k,$)}}}else{var h=d in l?Jr(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=Jr(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,Ps(E,S));var $=f.map(R=>R(E,S,F));return k(...$)}}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 $=f[0];return k($(E,S,F))}};case 2:return function(E,S,F){var k=y(E);if(!(m&&k===void 0)){var $=f[0],R=f[1];return k($(E,S,F),R(E,S,F))}};default:return function(E,S,F){var k=y(E);if(!(m&&k===void 0)){var $=f.map(R=>R(E,S,F));return k(...$)}}}}}else if(La(this.fn)&&ns(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 $=W6(k,x);if($!=null&&$.rawArgs)return $(g,l,Ps(E,S));var R=f.map(T=>T(E,S,F));return $.apply(k,R)}}}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,Ps(E,S));var $=f.map(R=>R(E,S,F));return k.apply(k,$)}}}}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"&&Me(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=ou(this.fn)?"("+this.fn.toString(l)+")":this.fn.toString(l);return f+"("+c.join(", ")+")"}toJSON(){return{mathjs:xl,fn:this.fn,args:this.args}}_toHTML(l){var c=this.args.map(function(f){return f.toHTML(l)});return'<span class="math-function">'+$n(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"&&Me(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;yy[this.name]&&(f=yy[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(iV,this,l)}getIdentifier(){return this.type+":"+this.name}}return t=s,lr(s,"name",xl),lr(s,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),lr(s,"fromJSON",function(u){return new t(u.fn,u.args)}),s},{isClass:!0,isNode:!0}),wy="parse",SV=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],TV=I(wy,SV,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(wy,{string:function(Y){return G(Y,{})},"Array | Matrix":function(Y){return x(Y,{})},"string, Object":function(Y,le){var ve=le.nodes!==void 0?le.nodes:{};return G(Y,ve)},"Array | Matrix, Object":x});function x(M){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=Y.nodes!==void 0?Y.nodes:{};return Xe(M,function(ve){if(typeof ve!="string")throw new TypeError("String expected");return G(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(M,Y){return M.expression.substr(M.index,Y)}function k(M){return F(M,1)}function $(M){M.index++}function R(M){return M.expression.charAt(M.index-1)}function T(M){return M.expression.charAt(M.index+1)}function B(M){for(M.tokenType=g.NULL,M.token="",M.comment="";;){if(k(M)==="#")for(;k(M)!==`
43
- `&&k(M)!=="";)M.comment+=k(M),$(M);if(v.isWhitespace(k(M),M.nestingLevel))$(M);else break}if(k(M)===""){M.tokenType=g.DELIMITER;return}if(k(M)===`
44
- `&&!M.nestingLevel){M.tokenType=g.DELIMITER,M.token=k(M),$(M);return}var Y=k(M),le=F(M,2),ve=F(M,3);if(ve.length===3&&b[ve]){M.tokenType=g.DELIMITER,M.token=ve,$(M),$(M),$(M);return}if(le.length===2&&b[le]&&(le!=="?."||!v.isDigit(M.expression.charAt(M.index+2)))){M.tokenType=g.DELIMITER,M.token=le,$(M),$(M);return}if(b[Y]){M.tokenType=g.DELIMITER,M.token=Y,$(M);return}if(v.isDigitDot(Y)){M.tokenType=g.NUMBER;var Oe=F(M,2);if(Oe==="0b"||Oe==="0o"||Oe==="0x"){for(M.token+=k(M),$(M),M.token+=k(M),$(M);v.isAlpha(k(M),R(M),T(M))||v.isDigit(k(M));)M.token+=k(M),$(M);if(k(M)===".")for(M.token+=".",$(M);v.isAlpha(k(M),R(M),T(M))||v.isDigit(k(M));)M.token+=k(M),$(M);else if(k(M)==="i")for(M.token+="i",$(M);v.isDigit(k(M));)M.token+=k(M),$(M);return}if(k(M)==="."){if(M.token+=k(M),$(M),!v.isDigit(k(M))){M.tokenType=g.DELIMITER;return}}else{for(;v.isDigit(k(M));)M.token+=k(M),$(M);v.isDecimalMark(k(M),T(M))&&(M.token+=k(M),$(M))}for(;v.isDigit(k(M));)M.token+=k(M),$(M);if(k(M)==="E"||k(M)==="e"){if(v.isDigit(T(M))||T(M)==="-"||T(M)==="+"){if(M.token+=k(M),$(M),(k(M)==="+"||k(M)==="-")&&(M.token+=k(M),$(M)),!v.isDigit(k(M)))throw nt(M,'Digit expected, got "'+k(M)+'"');for(;v.isDigit(k(M));)M.token+=k(M),$(M);if(v.isDecimalMark(k(M),T(M)))throw nt(M,'Digit expected, got "'+k(M)+'"')}else if(v.isDecimalMark(T(M),M.expression.charAt(M.index+2)))throw $(M),nt(M,'Digit expected, got "'+k(M)+'"')}return}if(v.isAlpha(k(M),R(M),T(M))){for(;v.isAlpha(k(M),R(M),T(M))||v.isDigit(k(M));)M.token+=k(M),$(M);Me(C,M.token)?M.tokenType=g.DELIMITER:M.tokenType=g.SYMBOL;return}for(M.tokenType=g.UNKNOWN;k(M)!=="";)M.token+=k(M),$(M);throw nt(M,'Syntax error in part "'+M.token+'"')}function L(M){do B(M);while(M.token===`
45
- `)}function j(M){M.nestingLevel++}function Z(M){M.nestingLevel--}v.isAlpha=function(Y,le,ve){return v.isValidLatinOrGreek(Y)||v.isValidMathSymbol(Y,ve)||v.isValidMathSymbol(le,Y)},v.isValidLatinOrGreek=function(Y){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(Y)},v.isValidMathSymbol=function(Y,le){return/^[\uD835]$/.test(Y)&&/^[\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(Y,le){return Y===" "||Y===" "||Y===" "||Y===`
46
- `&&le>0},v.isDecimalMark=function(Y,le){return Y==="."&&le!=="/"&&le!=="*"&&le!=="^"},v.isDigitDot=function(Y){return Y>="0"&&Y<="9"||Y==="."},v.isDigit=function(Y){return Y>="0"&&Y<="9"};function G(M,Y){var le=S();rr(le,{expression:M,extraNodes:Y}),B(le);var ve=V(le);if(le.token!=="")throw le.tokenType===g.DELIMITER?Ht(le,"Unexpected operator "+le.token):nt(le,'Unexpected part "'+le.token+'"');return ve}function V(M){var Y,le=[],ve;for(M.token!==""&&M.token!==`
47
- `&&M.token!==";"&&(Y=P(M),M.comment&&(Y.comment=M.comment));M.token===`
48
- `||M.token===";";)le.length===0&&Y&&(ve=M.token!==";",le.push({node:Y,visible:ve})),B(M),M.token!==`
49
- `&&M.token!==";"&&M.token!==""&&(Y=P(M),M.comment&&(Y.comment=M.comment),ve=M.token!==";",le.push({node:Y,visible:ve}));return le.length>0?new s(le):(Y||(Y=new l(void 0),M.comment&&(Y.comment=M.comment)),Y)}function P(M){var Y,le,ve,Oe,Ue=Q(M);if(M.token==="="){if(Nr(Ue))return Y=Ue.name,L(M),ve=P(M),new o(new D(Y),ve);if(La(Ue)){if(Ue.optionalChaining)throw nt(M,"Cannot assign to optional chain");return L(M),ve=P(M),new o(Ue.object,Ue.index,ve)}else if(hi(Ue)&&Nr(Ue.fn)&&(Oe=!0,le=[],Y=Ue.name,Ue.args.forEach(function(Hr,po){Nr(Hr)?le[po]=Hr.name:Oe=!1}),Oe))return L(M),ve=P(M),new c(Y,le,ve);throw nt(M,"Invalid left hand side of assignment operator =")}return Ue}function Q(M){for(var Y=z(M);M.token==="?";){var le=M.conditionalLevel;M.conditionalLevel=M.nestingLevel,L(M);var ve=Y,Oe=P(M);if(M.token!==":")throw nt(M,"False part of conditional expression expected");M.conditionalLevel=null,L(M);var Ue=P(M);Y=new u(ve,Oe,Ue),M.conditionalLevel=le}return Y}function z(M){for(var Y=oe(M);M.token==="or";)L(M),Y=new h("or","or",[Y,oe(M)]);return Y}function oe(M){for(var Y=ne(M);M.token==="xor";)L(M),Y=new h("xor","xor",[Y,ne(M)]);return Y}function ne(M){for(var Y=U(M);M.token==="and";)L(M),Y=new h("and","and",[Y,U(M)]);return Y}function U(M){for(var Y=_(M);M.token==="|";)L(M),Y=new h("|","bitOr",[Y,_(M)]);return Y}function _(M){for(var Y=J(M);M.token==="^|";)L(M),Y=new h("^|","bitXor",[Y,J(M)]);return Y}function J(M){for(var Y=ae(M);M.token==="&";)L(M),Y=new h("&","bitAnd",[Y,ae(M)]);return Y}function ae(M){for(var Y=[ee(M)],le=[],ve={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Me(ve,M.token);){var Oe={name:M.token,fn:ve[M.token]};le.push(Oe),L(M),Y.push(ee(M))}return Y.length===1?Y[0]:Y.length===2?new h(le[0].name,le[0].fn,Y):new w(le.map(Ue=>Ue.fn),Y)}function ee(M){var Y,le,ve,Oe;Y=ue(M);for(var Ue={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Me(Ue,M.token);)le=M.token,ve=Ue[le],L(M),Oe=[Y,ue(M)],Y=new h(le,ve,Oe);return Y}function ue(M){var Y,le,ve,Oe;Y=se(M);for(var Ue={to:"to",in:"to"};Me(Ue,M.token);)le=M.token,ve=Ue[le],L(M),le==="in"&&"])},;".includes(M.token)?Y=new h("*","multiply",[Y,new D("in")],!0):(Oe=[Y,se(M)],Y=new h(le,ve,Oe));return Y}function se(M){var Y,le=[];if(M.token===":"?Y=new l(1):Y=ye(M),M.token===":"&&M.conditionalLevel!==M.nestingLevel){for(le.push(Y);M.token===":"&&le.length<3;)L(M),M.token===")"||M.token==="]"||M.token===","||M.token===""?le.push(new D("end")):le.push(ye(M));le.length===3?Y=new y(le[0],le[2],le[1]):Y=new y(le[0],le[1])}return Y}function ye(M){var Y,le,ve,Oe;Y=Se(M);for(var Ue={"+":"add","-":"subtract"};Me(Ue,M.token);){le=M.token,ve=Ue[le],L(M);var Hr=Se(M);Hr.isPercentage?Oe=[Y,new h("*","multiply",[Y,Hr])]:Oe=[Y,Hr],Y=new h(le,ve,Oe)}return Y}function Se(M){var Y,le,ve,Oe;Y=Fe(M),le=Y;for(var Ue={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};Me(Ue,M.token);)ve=M.token,Oe=Ue[ve],L(M),le=Fe(M),Y=new h(ve,Oe,[Y,le]);return Y}function Fe(M){var Y,le;for(Y=Ce(M),le=Y;M.tokenType===g.SYMBOL||M.token==="in"&&mt(Y)||M.token==="in"&&tr(Y)&&Y.fn==="unaryMinus"&&mt(Y.args[0])||M.tokenType===g.NUMBER&&!mt(le)&&(!tr(le)||le.op==="!")||M.token==="(";)le=Ce(M),Y=new h("*","multiply",[Y,le],!0);return Y}function Ce(M){for(var Y=ke(M),le=Y,ve=[];M.token==="/"&&zm(le);)if(ve.push(rr({},M)),L(M),M.tokenType===g.NUMBER)if(ve.push(rr({},M)),L(M),M.tokenType===g.SYMBOL||M.token==="("||M.token==="in")rr(M,ve.pop()),ve.pop(),le=ke(M),Y=new h("/","divide",[Y,le]);else{ve.pop(),rr(M,ve.pop());break}else{rr(M,ve.pop());break}return Y}function ke(M){var Y=je(M);if(M.token==="%"){var le=rr({},M);L(M);try{je(M),rr(M,le)}catch{Y=new h("/","divide",[Y,new l(100)],!1,!0)}}return Y}function je(M){var Y,le,ve,Oe={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Me(Oe,M.token)?(ve=Oe[M.token],Y=M.token,L(M),le=[je(M)],new h(Y,ve,le)):H(M)}function H(M){var Y,le,ve,Oe;return Y=X(M),(M.token==="^"||M.token===".^")&&(le=M.token,ve=le==="^"?"pow":"dotPow",L(M),Oe=[Y,je(M)],Y=new h(le,ve,Oe)),Y}function X(M){for(var Y=O(M);M.token==="??";)L(M),Y=new h("??","nullish",[Y,O(M)]);return Y}function O(M){var Y,le,ve,Oe;Y=q(M);for(var Ue={"!":"factorial","'":"ctranspose"};Me(Ue,M.token);)le=M.token,ve=Ue[le],B(M),Oe=[Y],Y=new h(le,ve,Oe),Y=te(M,Y);return Y}function q(M){var Y=[];if(M.tokenType===g.SYMBOL&&Me(M.extraNodes,M.token)){var le=M.extraNodes[M.token];if(B(M),M.token==="("){if(Y=[],j(M),B(M),M.token!==")")for(Y.push(P(M));M.token===",";)B(M),Y.push(P(M));if(M.token!==")")throw nt(M,"Parenthesis ) expected");Z(M),B(M)}return new le(Y)}return K(M)}function K(M){var Y,le;return M.tokenType===g.SYMBOL||M.tokenType===g.DELIMITER&&M.token in C?(le=M.token,B(M),Me(N,le)?Y=new l(N[le]):A.includes(le)?Y=new l(r(le,"number")):Y=new D(le),Y=te(M,Y),Y):ie(M)}function te(M,Y,le){for(var ve;;){var Oe=!1;M.token==="?."&&(Oe=!0,B(M));var Ue=(M.token==="("||M.token==="["||M.token===".")&&!0;if(!(Oe||Ue))break;if(ve=[],M.token==="(")if(Oe||Nr(Y)||La(Y)){if(j(M),B(M),M.token!==")")for(ve.push(P(M));M.token===",";)B(M),ve.push(P(M));if(M.token!==")")throw nt(M,"Parenthesis ) expected");Z(M),B(M),Y=new f(Y,ve,Oe)}else return Y;else if(M.token==="["){if(j(M),B(M),M.token!=="]")for(ve.push(P(M));M.token===",";)B(M),ve.push(P(M));if(M.token!=="]")throw nt(M,"Parenthesis ] expected");Z(M),B(M),Y=new a(Y,new m(ve),Oe)}else{Oe||B(M);var Hr=M.tokenType===g.SYMBOL||M.tokenType===g.DELIMITER&&M.token in C;if(!Hr){var po="Property name expected after ";throw po+=Oe?"optional chain":"dot",nt(M,po)}ve.push(new l(M.token)),B(M);var Uc=!0;Y=new a(Y,new m(ve,Uc),Oe)}}return Y}function ie(M){var Y,le;return M.token==='"'||M.token==="'"?(le=re(M,M.token),Y=new l(le),Y=te(M,Y),Y):pe(M)}function re(M,Y){for(var le="";k(M)!==""&&k(M)!==Y;)if(k(M)==="\\"){$(M);var ve=k(M),Oe=E[ve];if(Oe!==void 0)le+=Oe,M.index+=1;else if(ve==="u"){var Ue=M.expression.slice(M.index+1,M.index+5);if(/^[0-9A-Fa-f]{4}$/.test(Ue))le+=String.fromCharCode(parseInt(Ue,16)),M.index+=5;else throw nt(M,"Invalid unicode character \\u".concat(Ue))}else throw nt(M,"Bad escape character \\".concat(ve))}else le+=k(M),$(M);if(B(M),M.token!==Y)throw nt(M,"End of string ".concat(Y," expected"));return B(M),le}function pe(M){var Y,le,ve,Oe;if(M.token==="["){if(j(M),B(M),M.token!=="]"){var Ue=me(M);if(M.token===";"){for(ve=1,le=[Ue];M.token===";";)B(M),M.token!=="]"&&(le[ve]=me(M),ve++);if(M.token!=="]")throw nt(M,"End of matrix ] expected");Z(M),B(M),Oe=le[0].items.length;for(var Hr=1;Hr<ve;Hr++)if(le[Hr].items.length!==Oe)throw Ht(M,"Column dimensions mismatch ("+le[Hr].items.length+" !== "+Oe+")");Y=new i(le)}else{if(M.token!=="]")throw nt(M,"End of matrix ] expected");Z(M),B(M),Y=Ue}}else Z(M),B(M),Y=new i([]);return te(M,Y)}return Ne(M)}function me(M){for(var Y=[P(M)],le=1;M.token===",";)B(M),M.token!=="]"&&M.token!==";"&&(Y[le]=P(M),le++);return new i(Y)}function Ne(M){if(M.token==="{"){j(M);var Y,le={};do if(B(M),M.token!=="}"){if(M.token==='"'||M.token==="'")Y=re(M,M.token);else if(M.tokenType===g.SYMBOL||M.tokenType===g.DELIMITER&&M.token in C)Y=M.token,B(M);else throw nt(M,"Symbol or string expected as object key");if(M.token!==":")throw nt(M,"Colon : expected after object key");B(M),le[Y]=P(M)}while(M.token===",");if(M.token!=="}")throw nt(M,"Comma , or bracket } expected after object value");Z(M),B(M);var ve=new d(le);return ve=te(M,ve),ve}return de(M)}function de(M){var Y;if(M.tokenType===g.NUMBER){Y=M.token,B(M);var le=bi(Y,n),ve=r(Y,le);return new l(ve)}return Ie(M)}function Ie(M){var Y;if(M.token==="("){if(j(M),B(M),Y=P(M),M.token!==")")throw nt(M,"Parenthesis ) expected");return Z(M),B(M),Y=new p(Y),Y=te(M,Y),Y}return ct(M)}function ct(M){throw M.token===""?nt(M,"Unexpected end of expression"):nt(M,"Value expected")}function wt(M){return M.index-M.token.length+1}function nt(M,Y){var le=wt(M),ve=new SyntaxError(Y+" (char "+le+")");return ve.char=le,ve}function Ht(M,Y){var le=wt(M),ve=new SyntaxError(Y+" (char "+le+")");return ve.char=le,ve}return t.addConversion({from:"string",to:"Node",convert:v}),v}),xy="compile",MV=["typed","parse"],FV=I(xy,MV,e=>{var{typed:t,parse:r}=e;return t(xy,{string:function(a){return r(a).compile()},"Array | Matrix":function(a){return Xe(a,function(i){return r(i).compile()})}})}),Dy="evaluate",PV=["typed","parse"],kV=I(Dy,PV,e=>{var{typed:t,parse:r}=e;return t(Dy,{string:function(a){var i=Us();return r(a).compile().evaluate(i)},"string, Map | Object":function(a,i){return r(a).compile().evaluate(i)},"Array | Matrix":function(a){var i=Us();return Xe(a,function(o){return r(o).compile().evaluate(i)})},"Array | Matrix, Map | Object":function(a,i){return Xe(a,function(o){return r(o).compile().evaluate(i)})}})}),OV="Parser",$V=["evaluate","parse"],BV=I(OV,$V,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:Us(),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 Z6(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(lx(s)){if(!_V(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 _V(e){return typeof e=="function"&&typeof e.syntax=="string"&&typeof e.expr=="string"}var Ny="parser",IV=["typed","Parser"],zV=I(Ny,IV,e=>{var{typed:t,Parser:r}=e;return t(Ny,{"":function(){return new r}})}),Ay="lup",jV=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],qV=I(Ay,jV,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(Ay,{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=We(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),$=0;for(S=0;S<k;S++)$=a($,o(x[A][S],x[S][E]));x[A][E]=s(x[A][E],$)}var R=E,T=0,B=0;for(A=E;A<w;A++){var L=x[A][E],j=n(L);u(j,T)&&(R=A,T=j,B=L)}if(E!==R&&(F[E]=[F[R],F[R]=F[E]][0],f._swapRows(E,R,x)),E<w)for(A=E+1;A<w;A++){var Z=x[A][E];l(Z,0)||(x[A][E]=i(x[A][E],B))}}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 G=new f({data:g,size:b}),V=new f({data:C,size:N}),P=[];for(A=0,v=F.length;A<v;A++)P[F[A]]=A;return{L:G,U:V,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=[],$=[v,D],R,T,B,L=[],j=[];for(R=0;R<w;R++)L[R]=R,j[R]=R;var Z=function(P,Q){var z=j[P],oe=j[Q];L[z]=Q,L[oe]=P,j[P]=oe,j[Q]=z},G=function(){var P=new d;T<w&&(A.push(C.length),C.push(1),N.push(T)),k.push(S.length);var Q=b[T],z=b[T+1];for(B=Q;B<z;B++)R=g[B],P.set(L[R],x[B]);T>0&&P.forEach(0,T-1,function(_,J){m._forEachRow(_,C,N,A,function(ae,ee){ae>_&&P.accumulate(ae,c(o(ee,J)))})});var oe=T,ne=P.get(T),U=n(ne);P.forEach(T+1,w-1,function(_,J){var ae=n(J);u(ae,U)&&(oe=_,U=ae,ne=J)}),T!==oe&&(m._swapRows(T,oe,E[1],C,N,A),m._swapRows(T,oe,$[1],S,F,k),P.swap(T,oe),Z(T,oe)),P.forEach(0,w-1,function(_,J){_<=T?(S.push(J),F.push(_)):(J=i(J,ne),l(J,0)||(C.push(J),N.push(_)))})};for(T=0;T<D;T++)G();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:$}),p:L,toString:function(){return"L: "+this.L.toString()+`
52
- U: `+this.U.toString()+`
53
- P: `+this.p}}}}),Cy="qr",RV=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],LV=I(Cy,RV,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 rr(t(Cy,{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 $=A[F][F],R=c(o($,0)?1:s($)),T=l(R),B=0;for(E=F;E<x;E++)B=f(B,d(A[E][F],l(A[E][F])));var L=d(R,u(B));if(!i(L)){var j=h($,L);for(k[F]=1,E=F+1;E<x;E++)k[E]=m(A[E][F],j);var Z=c(l(m(j,L))),G=void 0;for(S=F;S<g;S++){for(G=0,E=F;E<x;E++)G=f(G,d(l(k[E]),A[E][S]));for(G=d(G,Z),E=F;E<x;E++)A[E][S]=d(h(A[E][S],d(k[E],G)),T)}for(E=0;E<x;E++){for(G=0,S=F;S<x;S++)G=f(G,d(C[E][S],k[S]));for(G=d(G,Z),S=F;S<x;++S)C[E][S]=m(h(C[E][S],d(G,l(k[S]))),T)}}}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 HV(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 rD(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 GV(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=rD(n,r,i,o,s,a,u));return a}function VV(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 UV(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 ti(e){return-e-2}var WV="csAmd",JV=["add","multiply","transpose"],KV=I(WV,JV,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);UV(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),$=7*(h+1),R=g,T=i(h,v,b,C,E,R,A,$,N,k,S,F),B=o(h,v,b,F,S,k,y,N,E,R,A),L=0,j,Z,G,V,P,Q,z,oe,ne,U,_,J,ae,ee,ue,se;B<h;){for(G=-1;L<h&&(G=b[E+L])===-1;L++);b[A+G]!==-1&&(R[b[A+G]]=-1),b[E+L]=b[A+G];var ye=b[S+G],Se=b[N+G];B+=Se;var Fe=0;b[N+G]=-Se;var Ce=v[G],ke=ye===0?Ce:x,je=ke;for(V=1;V<=ye+1;V++){for(V>ye?(Q=G,z=Ce,oe=b[C+G]-ye):(Q=D[Ce++],z=v[Q],oe=b[C+Q]),P=1;P<=oe;P++)j=D[z++],!((ne=b[N+j])<=0)&&(Fe+=ne,b[N+j]=-ne,D[je++]=j,b[A+j]!==-1&&(R[b[A+j]]=R[j]),R[j]!==-1?b[A+R[j]]=b[A+j]:b[E+b[F+j]]=b[A+j]);Q!==G&&(v[Q]=ti(G),b[k+Q]=0)}for(ye!==0&&(x=je),b[F+G]=Fe,v[G]=ke,b[C+G]=je-ke,b[S+G]=-2,T=s(T,p,b,k,h),U=ke;U<je;U++)if(j=D[U],!((_=b[S+j])<=0)){ne=-b[N+j];var H=T-ne;for(Ce=v[j],J=v[j]+_-1;Ce<=J;Ce++)Q=D[Ce],b[k+Q]>=T?b[k+Q]-=ne:b[k+Q]!==0&&(b[k+Q]=b[F+Q]+H)}for(U=ke;U<je;U++){for(j=D[U],J=v[j],ae=J+b[S+j]-1,ee=J,ue=0,se=0,Ce=J;Ce<=ae;Ce++)if(Q=D[Ce],b[k+Q]!==0){var X=b[k+Q]-T;X>0?(se+=X,D[ee++]=Q,ue+=Q):(v[Q]=ti(G),b[k+Q]=0)}b[S+j]=ee-J+1;var O=ee,q=J+b[C+j];for(Ce=ae+1;Ce<q;Ce++){Z=D[Ce];var K=b[N+Z];K<=0||(se+=K,D[ee++]=Z,ue+=Z)}se===0?(v[j]=ti(G),ne=-b[N+j],Fe-=ne,Se+=ne,B+=ne,b[N+j]=0,b[S+j]=-1):(b[F+j]=Math.min(b[F+j],se),D[ee]=D[O],D[O]=D[J],D[J]=G,b[C+j]=ee-J+1,ue=(ue<0?-ue:ue)%h,b[A+j]=b[$+ue],b[$+ue]=j,R[j]=ue)}for(b[F+G]=Fe,p=Math.max(p,Fe),T=s(T+p,p,b,k,h),U=ke;U<je;U++)if(j=D[U],!(b[N+j]>=0))for(ue=R[j],j=b[$+ue],b[$+ue]=-1;j!==-1&&b[A+j]!==-1;j=b[A+j],T++){for(oe=b[C+j],_=b[S+j],Ce=v[j]+1;Ce<=v[j]+oe-1;Ce++)b[k+D[Ce]]=T;var te=j;for(Z=b[A+j];Z!==-1;){var ie=b[C+Z]===oe&&b[S+Z]===_;for(Ce=v[Z]+1;ie&&Ce<=v[Z]+oe-1;Ce++)b[k+D[Ce]]!==T&&(ie=0);ie?(v[Z]=ti(j),b[N+j]+=b[N+Z],b[N+Z]=0,b[S+Z]=-1,Z=b[A+Z],b[A+te]=Z):(te=Z,Z=b[A+Z])}}for(Ce=ke,U=ke;U<je;U++)j=D[U],!((ne=-b[N+j])<=0)&&(b[N+j]=ne,se=b[F+j]+Fe-ne,se=Math.min(se,h-B-ne),b[E+se]!==-1&&(R[b[E+se]]=j),b[A+j]=b[E+se],R[j]=-1,b[E+se]=j,L=Math.min(L,se),b[F+j]=se,D[Ce++]=j);b[N+G]=Se,(b[C+G]=Ce-ke)===0&&(v[G]=-1,b[k+G]=0),ye!==0&&(x=Ce)}for(j=0;j<h;j++)v[j]=ti(v[j]);for(Z=0;Z<=h;Z++)b[E+Z]=-1;for(Z=h;Z>=0;Z--)b[N+Z]>0||(b[A+Z]=b[E+v[Z]],b[E+v[Z]]=Z);for(Q=h;Q>=0;Q--)b[N+Q]<=0||v[Q]!==-1&&(b[A+Q]=b[E+v[Q]],b[E+v[Q]]=Q);for(G=0,j=0;j<=h;j++)v[j]===-1&&(G=rD(j,G,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]=ti(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 YV(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 ZV="csCounts",QV=["transpose"],XV=I(ZV,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=YV(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}}),eU="csSqr",tU=["add","multiply","transpose"],rU=I(eU,tU,e=>{var{add:t,multiply:r,transpose:n}=e,a=KV({add:t,multiply:r,transpose:n}),i=XV({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?HV(l,null,p.q):l;p.parent=VV(y);var w=GV(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 ad(e,t){return e[t]<0}function nD(e,t){e[t]=ti(e[t])}function Ey(e){return e<0?ti(e):e}function nU(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;ad(o,e)||(nD(o,e),n[u+m]=d<0?0:Ey(o[d]));var h=1;for(c=n[u+m],f=d<0?0:Ey(o[d+1]);c<f;c++)if(l=i[c],!ad(o,l)){n[u+m]=c,n[++m]=l,h=0;break}h&&(m--,n[--r]=e)}return r}function aU(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];ad(i,h)||(d=nU(h,e,d,n,a))}for(c=d;c<l;c++)nD(i,n[c]);return d}var iU="csSpsolve",oU=["divideScalar","multiply","subtract"],sU=I(iU,oU,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=aU(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}}),uU="csLu",lU=["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],cU=I(uU,lU,e=>{var{abs:t,divideScalar:r,multiply:n,subtract:a,larger:i,largerEq:o,SparseMatrix:s}=e,u=sU({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=[],$=[];for(S=0;S<h;S++)k[S]=0,E[S]=-1,x[S+1]=0;y=0,w=0;for(var R=0;R<h;R++){x[R]=y,N[R]=w;var T=p?p[R]:R,B=u(g,c,T,$,k,E,1),L=-1,j=-1;for(F=B;F<h;F++)if(S=$[F],E[S]<0){var Z=t(k[S]);i(Z,j)&&(j=Z,L=S)}else C[w]=E[S],b[w++]=k[S];if(L===-1||j<=0)return null;E[T]<0&&o(t(k[T]),n(j,m))&&(L=T);var G=k[L];for(C[w]=R,b[w++]=G,E[L]=R,v[y]=L,D[y++]=1,F=B;F<h;F++)S=$[F],E[S]<0&&(v[y]=S,D[y++]=r(k[S],G)),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}}}),Sy="slu",fU=["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],mU=I(Sy,fU,e=>{var{typed:t,abs:r,add:n,multiply:a,transpose:i,divideScalar:o,subtract:s,larger:u,largerEq:l,SparseMatrix:c}=e,f=rU({add:n,multiply:a,transpose:i}),m=cU({abs:r,divideScalar:o,multiply:a,subtract:s,larger:u,largerEq:l,SparseMatrix:c});return t(Sy,{"SparseMatrix, number, number":function(h,p,y){if(!Pe(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 Ty(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 My="lusolve",dU=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],hU=I(My,dU,e=>{var{typed:t,matrix:r,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:s}=e,u=uu({DenseMatrix:s});return t(My,{"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(Le(f))return f;if(Ft(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=Ty(d,p._data));var y=o(f,p),w=i(m,y);return h&&(w._data=Ty(h,w._data)),w}}),Fy="polynomialRoot",pU=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],gU=I(Fy,pU,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(Fy,{"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),$=o(3,S,A),R=a(o(2,E,E,E),o(27,S,S,N)),T=o(9,S,E,A);if(n(k,$)&&n(R,T))return[s(E,F)];var B=i(k,$),L=i(R,T),j=a(o(18,S,E,A,N),o(E,E,A,A)),Z=a(o(4,E,E,E,N),o(4,S,A,A,A),o(27,S,S,N,N));if(n(j,Z))return[s(i(o(4,S,E,A),a(o(9,S,S,N),o(E,E,E))),o(S,B)),s(i(o(9,S,N),o(E,A)),o(2,B))];var G;n(k,$)?G=L:G=s(a(L,u(i(o(L,L),o(4,B,B,B)))),2);var V=!0,P=c(G,V).toArray().map(Q=>s(a(E,Q,s(B,Q)),F));return P.map(Q=>f(Q)==="Complex"&&n(d(Q),d(Q)+m(Q))?d(Q):Q)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})}),vU="Help",yU=["evaluate"],bU=I(vU,yU,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&&!ux(c)&&(a+=" "+ot(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=We(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}),wU="Chain",xU=["?on","math","typed"],DU=I(wU,xU,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");fx(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 ot(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){c8(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){Me(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}),Py={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"]},NU={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},AU={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:[]},CU={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:[]},EU={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},SU={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},TU={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:[]},MU={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:[]},FU={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},PU={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},kU={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:[]},ky={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"]},OU={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:[]},$U={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},BU={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"]},_U={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},IU={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},zU={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"]},jU={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"]},qU={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"]},RU={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"]},LU={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"]},HU={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"]},GU={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"]},VU={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"]},UU={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"]},WU={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"]},JU={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"]},KU={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"]},YU={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"]},ZU={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:[]},XU={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:[]},eW={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"]},tW={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"]},rW={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"]},nW={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"]},aW={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"]},iW={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"]},oW={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"]},sW={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"]},uW={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"]},lW={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"]},cW={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"]},fW={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"]},mW={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"]},dW={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"]},hW={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"]},pW={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"]},gW={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"]},vW={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},yW={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"]},bW={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"]},wW={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"]},xW={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"]},DW={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"]},NW={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"]},AW={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"]},CW={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"]},EW={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"]},SW={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"]},TW={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"]},MW={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"]},FW={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"]},PW={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"]},kW={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"]},OW={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"]},$W={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"]},BW={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"]},_W={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"]},IW={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"]},zW={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"]},jW={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"]},qW={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"]},RW={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")']},LW={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"]},HW={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"]},GW={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"]},VW={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"]},UW={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"]},WW={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"]},JW={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"]},KW={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"]},YW={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"]},ZW={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"]},XW={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"]},eJ={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"]},tJ={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},rJ={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"]},nJ={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"]},aJ={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"]},iJ={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"]},oJ={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"]},sJ={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"]},uJ={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"]},lJ={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"]},cJ={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"]},fJ={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"]},mJ={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"]},dJ={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"]},hJ={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"]},pJ={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"]},gJ={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"]},vJ={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"]},yJ={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"]},bJ={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"]},wJ={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"]},xJ={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"]},DJ={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},NJ={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:[]},AJ={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:[]},CJ={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"]},EJ={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"]},SJ={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"]},TJ={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"]},MJ={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"]},FJ={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"]},PJ={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"]},kJ={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"]},OJ={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"]},$J={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"]},BJ={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"]},_J={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"]},IJ={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"]},zJ={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"]},jJ={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"]},qJ={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"]},RJ={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"]},LJ={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"]},HJ={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"]},GJ={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"]},VJ={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"]},UJ={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"]},WJ={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"]},JJ={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"]},KJ={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"]},YJ={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"]},ZJ={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"]},XJ={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"]},eK={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"]},tK={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"]},rK={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"]},nK={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"]},aK={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"]},iK={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"]},oK={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"]},sK={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"]},uK={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"]},lK={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"]},cK={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"]},fK={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"]},mK={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"]},dK={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"]},hK={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional Fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},pK={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse Fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},gK={name:"bernoulli",category:"Probability",syntax:["bernoulli(n)"],description:"The nth Bernoulli number",examples:["bernoulli(4)","bernoulli(fraction(12))"],seealso:["combinations","gamma","stirlingS2"]},vK={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"]},yK={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"]},bK={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"]},wK={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"]},xK={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"]},DK={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:[]},NK={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"]},AK={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"]},CK={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"]},EK={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"]},SK={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"]},TK={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"]},MK={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"]},FK={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"]},PK={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"]},kK={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"]},OK={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"]},$K={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"]},BK={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"]},_K={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"]},IK={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"]},zK={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"]},jK={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"]},qK={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"]},RK={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"]},LK={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"]},HK={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"]},GK={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"]},VK={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"]},UK={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"]},WK={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"]},JK={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"]},KK={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:[]},YK={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:[]},ZK={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:[]},XK={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"]},eY={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"]},tY={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"]},rY={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"]},nY={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"]},aY={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"]},iY={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"]},oY={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"]},sY={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"]},uY={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"]},lY={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"]},cY={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"]},fY={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"]},mY={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"]},dY={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"]},hY={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"]},pY={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"]},gY={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"]},vY={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"]},yY={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"]},bY={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},wY={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"]},xY={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"]},DY={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"]},NY={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"]},AY={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"]},CY={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"]},EY={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},SY={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"]},TY={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"]},MY={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"]},FY={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"]},PY={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"]},kY={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"]},OY={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"]},$Y={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},BY={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"]},_Y={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"]},IY={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:[]},zY={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:[]},jY={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},qY={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:[]},RY={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"]},LY={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"]},HY={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},GY={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"]},VY={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"]},UY={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"]},WY={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"]},JY={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"]},KY={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"]},YY={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"]},ZY={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"]},XY={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"]},eZ={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},tZ={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"]},rZ={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"]},nZ={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"]},aZ={bignumber:zU,bigint:jU,boolean:qU,complex:RU,createUnit:LU,fraction:HU,index:GU,matrix:VU,number:UU,sparse:WU,splitUnit:JU,string:KU,unit:YU,e:Py,E:Py,false:NU,i:AU,Infinity:CU,LN2:SU,LN10:EU,LOG2E:MU,LOG10E:TU,NaN:FU,null:PU,pi:ky,PI:ky,phi:kU,SQRT1_2:OU,SQRT2:$U,tau:BU,true:_U,version:IU,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:eW,lsolve:rW,lsolveAll:nW,lup:aW,lusolve:iW,leafCount:tW,polynomialRoot:oW,resolve:lW,simplify:cW,simplifyConstant:fW,simplifyCore:mW,symbolicEqual:hW,rationalize:uW,slu:dW,usolve:pW,usolveAll:gW,qr:sW,abs:vW,add:yW,cbrt:bW,ceil:wW,cube:xW,divide:DW,dotDivide:NW,dotMultiply:AW,dotPow:CW,exp:EW,expm:SW,expm1:TW,fix:MW,floor:FW,gcd:PW,hypot:kW,lcm:$W,log:BW,log2:zW,log1p:IW,log10:_W,mod:jW,multiply:qW,norm:RW,nthRoot:LW,nthRoots:HW,pow:GW,round:VW,sign:UW,sqrt:WW,sqrtm:JW,square:QW,subtract:XW,unaryMinus:eJ,unaryPlus:tJ,xgcd:rJ,invmod:OW,bitAnd:nJ,bitNot:aJ,bitOr:iJ,bitXor:oJ,leftShift:sJ,rightArithShift:uJ,rightLogShift:lJ,bellNumbers:cJ,catalan:fJ,composition:mJ,stirlingS2:dJ,config:ZU,import:QU,typed:XU,arg:hJ,conj:pJ,re:vJ,im:gJ,evaluate:yJ,help:DJ,parse:wJ,parser:bJ,compile:xJ,distance:NJ,intersect:AJ,and:CJ,not:EJ,nullish:SJ,or:TJ,xor:MJ,mapSlices:FJ,concat:kJ,count:OJ,cross:$J,column:PJ,ctranspose:BJ,det:_J,diag:IJ,diff:zJ,dot:jJ,getMatrixDataType:GJ,identity:VJ,filter:RJ,flatten:LJ,forEach:HJ,inv:UJ,pinv:WJ,eigs:qJ,kron:JJ,matrixFromFunction:ZJ,matrixFromRows:QJ,matrixFromColumns:YJ,map:KJ,ones:XJ,partitionSelect:eK,range:tK,resize:nK,reshape:rK,rotate:aK,rotationMatrix:iK,row:oK,size:sK,sort:uK,squeeze:lK,subset:cK,trace:fK,transpose:mK,zeros:dK,fft:hK,ifft:pK,sylvester:KW,schur:YW,lyap:ZW,solveODE:nZ,bernoulli:gK,combinations:vK,combinationsWithRep:yK,factorial:bK,gamma:wK,kldivergence:DK,lgamma:xK,multinomial:NK,permutations:AK,pickRandom:CK,random:EK,randomInt:SK,compare:TK,compareNatural:MK,compareText:FK,deepEqual:PK,equal:kK,equalText:OK,larger:$K,largerEq:BK,smaller:_K,smallerEq:IK,unequal:zK,setCartesian:jK,setDifference:qK,setDistinct:RK,setIntersect:LK,setIsSubset:HK,setMultiplicity:GK,setPowerset:VK,setSize:UK,setSymDifference:WK,setUnion:JK,zpk2tf:KK,freqz:YK,erf:ZK,zeta:QK,cumsum:uY,mad:XK,max:eY,mean:tY,median:rY,min:nY,mode:aY,prod:iY,quantileSeq:oY,std:sY,sum:lY,variance:cY,corr:fY,acos:mY,acosh:dY,acot:hY,acoth:pY,acsc:gY,acsch:vY,asec:yY,asech:bY,asin:wY,asinh:xY,atan:DY,atanh:AY,atan2:NY,cos:CY,cosh:EY,cot:SY,coth:TY,csc:MY,csch:FY,sec:PY,sech:kY,sin:OY,sinh:$Y,tan:BY,tanh:_Y,to:IY,toBest:zY,clone:qY,format:RY,bin:jY,oct:eZ,hex:HY,isNaN:VY,isBounded:UY,isFinite:WY,isInteger:GY,isNegative:JY,isNumeric:KY,hasNumericValue:LY,isPositive:YY,isPrime:ZY,isZero:QY,print:tZ,typeOf:rZ,numeric:XY},Oy="help",iZ=["typed","mathWithTransform","Help"],oZ=I(Oy,iZ,e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(Oy,{any:function(i){var o,s=i;if(typeof i!="string"){for(o in r)if(Me(r,o)&&i===r[o]){s=o;break}}var u=Jr(aZ,s);if(!u){var l=typeof s=="function"?s.name:s;throw new Error('No documentation found on "'+l+'"')}return new n(u)}})}),$y="chain",sZ=["typed","Chain"],uZ=I($y,sZ,e=>{var{typed:t,Chain:r}=e;return t($y,{"":function(){return new r},any:function(a){return new r(a)}})}),By="det",lZ=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],cZ=I(By,lZ,e=>{var{typed:t,matrix:r,subtractScalar:n,multiply:a,divideScalar:i,isZero:o,unaryMinus:s}=e;return t(By,{any:function(c){return We(c)},"Array | Matrix":function(c){var f;switch(Le(c)?f=c.size():Array.isArray(c)?(c=r(c),f=c.size()):f=[],f.length){case 0:return We(c);case 1:if(f[0]===1)return We(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+ot(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: "+ot(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+ot(f)+")")}}});function u(l,c,f){if(c===1)return We(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}}),_y="inv",fZ=["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],mZ=I(_y,fZ,e=>{var{typed:t,matrix:r,divideScalar:n,addScalar:a,multiply:i,unaryMinus:o,det:s,identity:u,abs:l}=e;return t(_y,{"Array | Matrix":function(m){var d=Le(m)?m.size():Je(m);switch(d.length){case 1:if(d[0]===1)return Le(m)?r([n(1,m.valueOf()[0])]):[n(1,m[0])];throw new RangeError("Matrix must be square (size: "+ot(d)+")");case 2:{var h=d[0],p=d[1];if(h===p)return Le(m)?r(c(m.valueOf(),h,p),m.storage()):c(m,h,p);throw new RangeError("Matrix must be square (size: "+ot(d)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+ot(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}}}),Iy="pinv",dZ=["typed","matrix","inv","deepEqual","equal","dotDivide","dot","ctranspose","divideScalar","multiply","add","Complex"],hZ=I(Iy,dZ,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(Iy,{"Array | Matrix":function(v){var x=Le(v)?v.size():Je(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 Le(v)?r(d(v.valueOf(),g,b),v.storage()):d(v,g,b)}default:throw new RangeError("Matrix must be two dimensional (size: "+ot(x)+")")}},any:function(v){return i(v,0)?We(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=We(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 pZ(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(V,P,Q,z){var oe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,ne=N(V,P,Q,z,oe);A(V,P,Q,z,oe,ne);var{values:U,C:_}=E(V,P,Q,z,oe);if(oe){var J=S(V,P,_,ne,U,Q,z);return{values:U,eigenvectors:J}}return{values:U}}function N(V,P,Q,z,oe){var ne=z==="BigNumber",U=z==="Complex",_=ne?l(0):0,J=ne?l(1):U?D(1):1,ae=ne?l(1):1,ee=ne?l(10):2,ue=i(ee,ee),se;oe&&(se=Array(P).fill(J));for(var ye=!1;!ye;){ye=!0;for(var Se=0;Se<P;Se++){for(var Fe=_,Ce=_,ke=0;ke<P;ke++)Se!==ke&&(Fe=t(Fe,u(V[ke][Se])),Ce=t(Ce,u(V[Se][ke])));if(!w(Fe,0)&&!w(Ce,0)){for(var je=ae,H=Fe,X=o(Ce,ee),O=i(Ce,ee);x(H,X);)H=i(H,ue),je=i(je,ee);for(;v(H,O);)H=o(H,ue),je=o(je,ee);var q=x(o(t(H,Ce),je),i(t(Fe,Ce),.95));if(q){ye=!1;for(var K=o(1,je),te=0;te<P;te++)Se!==te&&(V[Se][te]=i(V[Se][te],K),V[te][Se]=i(V[te][Se],je));oe&&(se[Se]=i(se[Se],K))}}}}return oe?c(se):null}function A(V,P,Q,z,oe,ne){var U=z==="BigNumber",_=z==="Complex",J=U?l(0):_?D(0):0;U&&(Q=l(Q));for(var ae=0;ae<P-2;ae++){for(var ee=0,ue=J,se=ae+1;se<P;se++){var ye=V[se][ae];x(u(ue),u(ye))&&(ue=ye,ee=se)}if(!x(u(ue),Q)){if(ee!==ae+1){var Se=V[ee];V[ee]=V[ae+1],V[ae+1]=Se;for(var Fe=0;Fe<P;Fe++){var Ce=V[Fe][ee];V[Fe][ee]=V[Fe][ae+1],V[Fe][ae+1]=Ce}if(oe){var ke=ne[ee];ne[ee]=ne[ae+1],ne[ae+1]=ke}}for(var je=ae+2;je<P;je++){var H=o(V[je][ae],ue);if(H!==0){for(var X=0;X<P;X++)V[je][X]=r(V[je][X],i(H,V[ae+1][X]));for(var O=0;O<P;O++)V[O][ae+1]=t(V[O][ae+1],i(H,V[O][je]));if(oe)for(var q=0;q<P;q++)ne[je][q]=r(ne[je][q],i(H,ne[ae+1][q]))}}}}return ne}function E(V,P,Q,z,oe){var ne=z==="BigNumber",U=z==="Complex",_=ne?l(1):U?D(1):1;ne&&(Q=l(Q));for(var J=We(V),ae=[],ee=P,ue=[],se=oe?c(Array(P).fill(_)):void 0,ye=oe?c(Array(ee).fill(_)):void 0,Se=0;Se<=100;){Se+=1;for(var Fe=J[ee-1][ee-1],Ce=0;Ce<ee;Ce++)J[Ce][Ce]=r(J[Ce][Ce],Fe);var{Q:ke,R:je}=h(J);J=a(je,ke);for(var H=0;H<ee;H++)J[H][H]=t(J[H][H],Fe);if(oe&&(ye=a(ye,ke)),ee===1||x(u(J[ee-1][ee-2]),Q)){Se=0,ae.push(J[ee-1][ee-1]),oe&&(ue.unshift([[1]]),$(ye,P),se=a(se,ye),ee>1&&(ye=c(Array(ee-1).fill(_)))),ee-=1,J.pop();for(var X=0;X<ee;X++)J[X].pop()}else if(ee===2||x(u(J[ee-2][ee-3]),Q)){Se=0;var O=F(J[ee-2][ee-2],J[ee-2][ee-1],J[ee-1][ee-2],J[ee-1][ee-1]);ae.push(...O),oe&&(ue.unshift(k(J[ee-2][ee-2],J[ee-2][ee-1],J[ee-1][ee-2],J[ee-1][ee-1],O[0],O[1],Q,z)),$(ye,P),se=a(se,ye),ee>2&&(ye=c(Array(ee-2).fill(_)))),ee-=2,J.pop(),J.pop();for(var q=0;q<ee;q++)J[q].pop(),J[q].pop()}if(ee===0)break}if(ae.sort((ie,re)=>+r(u(ie),u(re))),Se>100){var K=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+ae.join(", "));throw K.values=ae,K.vectors=[],K}var te=oe?a(se,R(ue,P)):void 0;return{values:ae,C:te}}function S(V,P,Q,z,oe,ne,U){var _=d(Q),J=a(_,V,Q),ae=U==="BigNumber",ee=U==="Complex",ue=ae?l(0):ee?D(0):0,se=ae?l(1):ee?D(1):1,ye=[],Se=[];for(var Fe of oe){var Ce=T(ye,Fe,w);Ce===-1?(ye.push(Fe),Se.push(1)):Se[Ce]+=1}for(var ke=[],je=ye.length,H=Array(P).fill(ue),X=c(Array(P).fill(se)),O=function(){var te=ye[q],ie=r(J,a(te,X)),re=y(ie,H);for(re.shift();re.length<Se[q];){var pe=B(ie,P,re,ne,U);if(pe===null)break;re.push(pe)}var me=a(d(z),Q);re=re.map(Ne=>a(me,Ne)),ke.push(...re.map(Ne=>({value:te,vector:n(Ne)})))},q=0;q<je;q++)O();return ke}function F(V,P,Q,z){var oe=t(V,z),ne=r(i(V,z),i(P,Q)),U=i(oe,.5),_=i(s(r(i(oe,oe),i(4,ne))),.5);return[t(U,_),r(U,_)]}function k(V,P,Q,z,oe,ne,U,_){var J=_==="BigNumber",ae=_==="Complex",ee=J?l(0):ae?D(0):0,ue=J?l(1):ae?D(1):1;if(x(u(Q),U))return[[ue,ee],[ee,ue]];if(v(u(r(oe,ne)),U))return[[r(oe,z),r(ne,z)],[Q,Q]];var se=r(V,oe),ye=r(z,oe);return x(u(P),U)&&x(u(ye),U)?[[se,ue],[Q,ee]]:[[P,ee],[ye,ue]]}function $(V,P){for(var Q=0;Q<V.length;Q++)V[Q].push(...Array(P-V[Q].length).fill(0));for(var z=V.length;z<P;z++)V.push(Array(P).fill(0)),V[z][z]=1;return V}function R(V,P){for(var Q=[],z=0;z<P;z++)Q[z]=Array(P).fill(0);var oe=0;for(var ne of V){for(var U=ne.length,_=0;_<U;_++)for(var J=0;J<U;J++)Q[oe+_][oe+J]=ne[_][J];oe+=U}return Q}function T(V,P,Q){for(var z=0;z<V.length;z++)if(Q(V[z],P))return z;return-1}function B(V,P,Q,z,oe){for(var ne=oe==="BigNumber"?l(1e3):1e3,U,_=0;_<5;++_){U=L(P,Q,oe);try{U=p(V,U)}catch{continue}if(v(Z(U),ne))break}if(_>=5)return null;for(_=0;;){var J=p(V,U);if(x(Z(j(U,[J])),z))break;if(++_>=10)return null;U=G(J)}return U}function L(V,P,Q){var z=Q==="BigNumber",oe=Q==="Complex",ne=Array(V).fill(0).map(U=>2*Math.random()-1);return z&&(ne=ne.map(U=>l(U))),oe&&(ne=ne.map(U=>D(U))),ne=j(ne,P),G(ne,Q)}function j(V,P){var Q=f(V);for(var z of P)z=m(z,Q),V=r(V,a(o(b(z,V),b(z,z)),z));return V}function Z(V){return u(s(b(V,V)))}function G(V,P){var Q=P==="BigNumber",z=P==="Complex",oe=Q?l(1):z?D(1):1;return a(o(oe,Z(V)),V)}return C}function gZ(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),$,R;if(S){R=new Array(F);for(var T=0;T<F;T++)R[T]=Array(F).fill(0),R[T][T]=1}for(var B=b(A);Math.abs(B[1])>=Math.abs(k);){var L=B[0][0],j=B[0][1];$=y(A[L][L],A[j][j],A[L][j]),A=g(A,$,L,j),S&&(R=D(R,$,L,j)),B=b(A)}for(var Z=Array(F).fill(0),G=0;G<F;G++)Z[G]=A[G][G];return N(We(Z),R,S)}function p(A,E,S){var F=A.length,k=a(E/F),$,R;if(S){R=new Array(F);for(var T=0;T<F;T++)R[T]=Array(F).fill(0),R[T][T]=1}for(var B=C(A);a(B[1])>=a(k);){var L=B[0][0],j=B[0][1];$=w(A[L][L],A[j][j],A[L][j]),A=x(A,$,L,j),S&&(R=v(R,$,L,j)),B=C(A)}for(var Z=Array(F).fill(0),G=0;G<F;G++)Z[G]=A[G][G];return N(We(Z),R,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,$=Math.cos(E),R=Math.sin(E),T=Array(k).fill(0),B=Array(k).fill(0),L=0;L<k;L++)T[L]=$*A[L][S]-R*A[L][F],B[L]=R*A[L][S]+$*A[L][F];for(var j=0;j<k;j++)A[j][S]=T[j],A[j][F]=B[j];return A}function v(A,E,S,F){for(var k=A.length,$=o(E),R=s(E),T=Array(k).fill(c(0)),B=Array(k).fill(c(0)),L=0;L<k;L++)T[L]=n(u($,A[L][S]),u(R,A[L][F])),B[L]=r(u(R,A[L][S]),u($,A[L][F]));for(var j=0;j<k;j++)A[j][S]=T[j],A[j][F]=B[j];return A}function x(A,E,S,F){for(var k=A.length,$=c(o(E)),R=c(s(E)),T=u($,$),B=u(R,R),L=Array(k).fill(c(0)),j=Array(k).fill(c(0)),Z=f(c(2),$,R,A[S][F]),G=r(n(u(T,A[S][S]),Z),u(B,A[F][F])),V=m(u(B,A[S][S]),Z,u(T,A[F][F])),P=0;P<k;P++)L[P]=n(u($,A[S][P]),u(R,A[F][P])),j[P]=r(u(R,A[S][P]),u($,A[F][P]));A[S][S]=G,A[F][F]=V,A[S][F]=c(0),A[F][S]=c(0);for(var Q=0;Q<k;Q++)Q!==S&&Q!==F&&(A[S][Q]=L[Q],A[Q][S]=L[Q],A[F][Q]=j[Q],A[Q][F]=j[Q]);return A}function g(A,E,S,F){for(var k=A.length,$=Math.cos(E),R=Math.sin(E),T=$*$,B=R*R,L=Array(k).fill(0),j=Array(k).fill(0),Z=T*A[S][S]-2*$*R*A[S][F]+B*A[F][F],G=B*A[S][S]+2*$*R*A[S][F]+T*A[F][F],V=0;V<k;V++)L[V]=$*A[S][V]-R*A[F][V],j[V]=R*A[S][V]+$*A[F][V];A[S][S]=Z,A[F][F]=G,A[S][F]=0,A[F][S]=0;for(var P=0;P<k;P++)P!==S&&P!==F&&(A[S][P]=L[P],A[P][S]=L[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 $=k+1;$<E;$++)Math.abs(S)<Math.abs(A[k][$])&&(S=Math.abs(A[k][$]),F=[k,$]);return[F,S]}function C(A){for(var E=A.length,S=0,F=[0,1],k=0;k<E;k++)for(var $=k+1;$<E;$++)a(S)<a(A[k][$])&&(S=a(A[k][$]),F=[k,$]);return[F,S]}function N(A,E,S){var F=A.length,k=Array(F),$;if(S){$=Array(F);for(var R=0;R<F;R++)$[R]=Array(F)}for(var T=0;T<F;T++){for(var B=0,L=A[0],j=0;j<A.length;j++)a(A[j])<a(L)&&(B=j,L=A[B]);if(k[T]=A.splice(B,1)[0],S)for(var Z=0;Z<F;Z++)$[T][Z]=E[Z][B],E[Z].splice(B,1)}if(!S)return{values:k};var G=$.map((V,P)=>({value:k[P],vector:V}));return{values:k,eigenvectors:G}}return d}var vZ="eigs",yZ=["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"],bZ=I(vZ,yZ,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:$,smaller:R,matrixFromColumns:T,dot:B}=e,L=gZ({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=pZ({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:R,matrixFromColumns:T,dot:B});return r("eigs",{Array:function(ne){return Z(n(ne))},"Array, number|BigNumber":function(ne,U){return Z(n(ne),{precision:U})},"Array, Object"(oe,ne){return Z(n(oe),ne)},Matrix:function(ne){return Z(ne,{matricize:!0})},"Matrix, number|BigNumber":function(ne,U){return Z(ne,{precision:U,matricize:!0})},"Matrix, Object":function(ne,U){var _={matricize:!0};return rr(_,U),Z(ne,_)}});function Z(oe){var ne,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_="eigenvectors"in U?U.eigenvectors:!0,J=(ne=U.precision)!==null&&ne!==void 0?ne:t.relTol,ae=G(oe,J,_);return U.matricize&&(ae.values=n(ae.values),_&&(ae.eigenvectors=ae.eigenvectors.map(ee=>{var{value:ue,vector:se}=ee;return{value:ue,vector:n(se)}}))),_&&Object.defineProperty(ae,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),ae}function G(oe,ne,U){var _=oe.toArray(),J=oe.size();if(J.length!==2||J[0]!==J[1])throw new RangeError("Matrix must be square (size: ".concat(ot(J),")"));var ae=J[0];if(P(_,ae,ne)&&(Q(_,ae),V(_,ae,ne))){var ee=z(oe,_,ae);return L(_,ae,ne,ee,U)}var ue=z(oe,_,ae);return j(_,ae,ne,ue,U)}function V(oe,ne,U){for(var _=0;_<ne;_++)for(var J=_;J<ne;J++)if(w(h(s(i(oe[_][J],oe[J][_]))),U))return!1;return!0}function P(oe,ne,U){for(var _=0;_<ne;_++)for(var J=0;J<ne;J++)if(w(h(s(k(oe[_][J]))),U))return!1;return!0}function Q(oe,ne){for(var U=0;U<ne;U++)for(var _=0;_<ne;_++)oe[U][_]=$(oe[U][_])}function z(oe,ne,U){var _=oe.datatype();if(_==="number"||_==="BigNumber"||_==="Complex")return _;for(var J=!1,ae=!1,ee=!1,ue=0;ue<U;ue++)for(var se=0;se<U;se++){var ye=ne[ue][se];if(qe(ye)||iu(ye))J=!0;else if(Qe(ye))ae=!0;else if(Ia(ye))ee=!0;else throw TypeError("Unsupported type in Matrix: "+kt(ye))}if(ae&&ee&&console.warn("Complex BigNumbers not supported, this operation will lose precission."),ee){for(var Se=0;Se<U;Se++)for(var Fe=0;Fe<U;Fe++)ne[Se][Fe]=g(ne[Se][Fe]);return"Complex"}if(ae){for(var Ce=0;Ce<U;Ce++)for(var ke=0;ke<U;ke++)ne[Ce][ke]=h(ne[Ce][ke]);return"BigNumber"}if(J){for(var je=0;je<U;je++)for(var H=0;H<U;H++)ne[je][H]=x(ne[je][H]);return"number"}else throw TypeError("Matrix contains unsupported types only.")}}),zy="expm",wZ=["typed","abs","add","identity","inv","multiply"],xZ=I(zy,wZ,e=>{var{typed:t,abs:r,add:n,identity:a,inv:i,multiply:o}=e;return t(zy,{Matrix:function(f){var m=f.size();if(m.length!==2||m[0]!==m[1])throw new RangeError("Matrix must be square (size: "+ot(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 Wi(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)}}),jy="sqrtm",DZ=["typed","abs","add","multiply","map","sqrt","subtract","inv","size","max","identity"],NZ=I(jy,DZ,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(jy,{"Array | Matrix":function(y){var w=Le(y)?y.size():Je(y);switch(w.length){case 1:if(w[0]===1)return i(y,o);throw new RangeError("Matrix must be square (size: "+ot(w)+")");case 2:{var D=w[0],v=w[1];if(D===v)return h(y);throw new RangeError("Matrix must be square (size: "+ot(w)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+ot(w)+")")}}})}),qy="sylvester",AZ=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],CZ=I(qy,AZ,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(qy,{"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),$=o(0,b),R=[],T=(ue,se)=>s(ue,se,1),B=(ue,se)=>s(ue,se,0),L=0;L<g;L++)if(L<g-1&&p(c(S,l(L+1,L)))>1e-5){for(var j=B(c(k,l($,[L])),c(k,l($,[L+1]))),Z=0;Z<L;Z++)j=f(j,B(i(R[Z],c(S,l(Z,L))),i(R[Z],c(S,l(Z,L+1)))));var G=i(d(b),i(-1,c(S,l(L,L)))),V=i(d(b),i(-1,c(S,l(L+1,L)))),P=i(d(b),i(-1,c(S,l(L,L+1)))),Q=i(d(b),i(-1,c(S,l(L+1,L+1)))),z=B(T(f(N,G),V),T(P,f(N,Q))),oe=h(z,j);R[L]=oe.subset(l(o(0,b),[0])),R[L+1]=oe.subset(l(o(b,2*b),[0])),L++}else{for(var ne=c(k,l($,[L])),U=0;U<L;U++)ne=f(ne,i(R[U],c(S,l(U,L))));var _=c(S,l(L,L)),J=m(N,i(_,d(b)));R[L]=h(J,ne)}var ae=a(n(...R)),ee=i(A,i(ae,u(F)));return ee}}),Ry="schur",EZ=["typed","matrix","identity","multiply","qr","norm","subtract"],SZ=I(Ry,EZ,e=>{var{typed:t,matrix:r,identity:n,multiply:a,qr:i,norm:o,subtract:s}=e;return t(Ry,{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}}}),Ly="lyap",TZ=["typed","matrix","sylvester","multiply","transpose"],MZ=I(Ly,TZ,e=>{var{typed:t,matrix:r,sylvester:n,multiply:a,transpose:i}=e;return t(Ly,{"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()}})}),FZ="divide",PZ=["typed","matrix","multiply","equalScalar","divideScalar","inv"],kZ=I(FZ,PZ,e=>{var{typed:t,matrix:r,multiply:n,equalScalar:a,divideScalar:i,inv:o}=e,s=kr({typed:t,equalScalar:a}),u=In({typed:t});return t("divide",mx({"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))}),Hy="distance",OZ=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],$Z=I(Hy,OZ,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:o,sqrt:s,abs:u}=e;return t(Hy,{"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"||Qe(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 $=s(r(r(a(E,E),a(S,S)),a(F,F)));return i(k,$)}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}}),BZ="intersect",_Z=["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar","flatten","isZero","isNumeric"],IZ=I(BZ,_Z,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 $=y(S.valueOf(),F.valueOf(),k.valueOf());return $===null?null:o($)},"Matrix, Matrix, Matrix, Matrix":function(S,F,k,$){var R=w(S.valueOf(),F.valueOf(),k.valueOf(),$.valueOf());return R===null?null:o(R)}});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 $=E,R=F,T=c($,S),B=c(R,k),L=c(u(T[0],B[1]),u(B[0],T[1]));if(h(L)||f(n(L),r.relTol))return null;var j=u(B[0],$[1]),Z=u(B[1],$[0]),G=u(B[0],R[1]),V=u(B[1],R[0]),P=l(i(c(c(j,Z),G),V),L);return a(s(T,P),$)}function C(E,S,F,k,$,R,T,B,L,j,Z,G){var V=u(c(E,S),c(F,k)),P=u(c($,R),c(T,B)),Q=u(c(L,j),c(Z,G));return i(i(V,P),Q)}function N(E,S,F,k,$,R,T,B,L,j,Z,G){var V=C(E,T,j,T,S,B,Z,B,F,L,G,L),P=C(j,T,k,E,Z,B,$,S,G,L,R,F),Q=C(E,T,k,E,S,B,$,S,F,L,R,F),z=C(j,T,j,T,Z,B,Z,B,G,L,G,L),oe=C(k,E,k,E,$,S,$,S,R,F,R,F),ne=c(u(V,P),u(Q,z)),U=c(u(oe,z),u(P,P));if(h(U))return null;var _=l(ne,U),J=l(i(V,u(_,P)),z),ae=i(E,u(_,c(k,E))),ee=i(S,u(_,c($,S))),ue=i(F,u(_,c(R,F))),se=i(T,u(J,c(j,T))),ye=i(B,u(J,c(Z,B))),Se=i(L,u(J,c(G,L)));return m(ae,se)&&m(ee,ye)&&m(ue,Se)?[ae,ee,ue]:null}function A(E,S,F,k,$,R,T,B,L,j){var Z=u(E,T),G=u(k,T),V=u(S,B),P=u($,B),Q=u(F,L),z=u(R,L),oe=c(c(c(j,Z),V),Q),ne=c(c(c(i(i(G,P),z),Z),V),Q),U=l(oe,ne),_=i(E,u(U,c(k,E))),J=i(S,u(U,c($,S))),ae=i(F,u(U,c(R,F)));return[_,J,ae]}}),Gy="sum",zZ=["typed","config","add","numeric"],aD=I(Gy,zZ,e=>{var{typed:t,config:r,add:n,numeric:a}=e;return t(Gy,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":o,"...":function(u){if(as(u))throw new TypeError("Scalar values expected in function sum");return i(u)}});function i(s){var u;return vi(s,function(l){try{u=u===void 0?l:n(u,l)}catch(c){throw Qr(c,"sum",l)}}),u===void 0&&(u=a(0,r.number)),typeof u=="string"&&(u=a(u,bi(u,r))),u}function o(s,u){try{var l=kc(s,u,n);return l}catch(c){throw Qr(c,"sum")}}}),Dl="cumsum",jZ=["typed","add","unaryPlus"],iD=I(Dl,jZ,e=>{var{typed:t,add:r,unaryPlus:n}=e;return t(Dl,{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(as(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 Qr(l,Dl)}}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=Je(u);if(l<0||l>=c.length)throw new ea(l,c.length);try{return s(u,l)}catch(f){throw Qr(f,Dl)}}function s(u,l){var c,f,m;if(l<=0){var d=u[0][0];if(Array.isArray(d)){for(m=qx(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}}}),Vy="mean",qZ=["typed","add","divide"],oD=I(Vy,qZ,e=>{var{typed:t,add:r,divide:n}=e;return t(Vy,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(s){if(as(s))throw new TypeError("Scalar values expected in function mean");return i(s)}});function a(o,s){try{var u=kc(o,s,r),l=Array.isArray(o)?Je(o):o.size();return n(u,l[s])}catch(c){throw Qr(c,"mean")}}function i(o){var s,u=0;if(vi(o,function(l){try{s=s===void 0?l:r(s,l),u++}catch(c){throw Qr(c,"mean",l)}}),u===0)throw new Error("Cannot calculate the mean of an empty array");return n(s,u)}}),Uy="median",RZ=["typed","add","divide","compare","partitionSelect"],LZ=I(Uy,RZ,e=>{var{typed:t,add:r,divide:n,compare:a,partitionSelect:i}=e;function o(l){try{l=ht(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 Qr(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(Uy,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,f){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(as(c))throw new TypeError("Scalar values expected in function median");return o(c)}})}),Wy="mad",HZ=["typed","abs","map","median","subtract"],GZ=I(Wy,HZ,e=>{var{typed:t,abs:r,map:n,median:a,subtract:i}=e;return t(Wy,{"Array | Matrix":o,"...":function(u){return o(u)}});function o(s){if(s=ht(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")):Qr(l,"mad")}}}),Uf="unbiased",Jy="variance",VZ=["typed","add","subtract","multiply","divide","mapSlices","isNaN"],sD=I(Jy,VZ,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s}=e;return t(Jy,{"Array | Matrix":function(f){return u(f,Uf)},"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":function(f,m){return l(f,m,Uf)},"Array | Matrix, number | BigNumber, string":l,"...":function(f){return u(f,Uf)}});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(vi(c,function(y){try{m=m===void 0?y:r(m,y),d++}catch(w){throw Qr(w,"variance",y)}}),d===0)throw new Error("Cannot calculate variance of an empty array");var h=i(m,d);if(m=void 0,vi(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=Qe(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 Qr(d,"variance")}}}),Ky="quantileSeq",UZ=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],uD=I(Ky,UZ,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(Ky,{"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 qe(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 qe(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=ht(D),b=g.length;if(b===0)throw new Error("Cannot calculate quantile of an empty sequence");var C=qe(v)?v*(b-1):v.times(b-1),N=qe(v)?Math.floor(C):C.floor().toNumber(),A=qe(v)?C%1:C.minus(N);if(l(C))return x?g[C]:s(g,qe(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))}}),Yy="std",WZ=["typed","map","sqrt","variance"],lD=I(Yy,WZ,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e;return t(Yy,{"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 yn(u)?r(u,n):n(u)}catch(l){throw l instanceof TypeError&&l.message.includes(" variance")?new TypeError(l.message.replace(" variance"," std")):l}}}),Zy="corr",JZ=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],KZ=I(Zy,JZ,e=>{var{typed:t,matrix:r,sqrt:n,sum:a,add:i,subtract:o,multiply:s,pow:u,divide:l}=e;return t(Zy,{"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)}}),Qy="bernoulli",YZ=["typed","config","isInteger","number","?BigNumber","?Fraction"],ZZ=I(Qy,YZ,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(Qy,{number:c=>Wf(c,f=>f,o,(f,m)=>f+m,(f,m)=>f*m,(f,m)=>f/m),"bigint | Fraction":c=>Wf(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),Wf(n(c),f=>new a(f),u,(f,m)=>f.add(m),(f,m)=>f.mul(m),(f,m)=>f.div(m)))})});function Wf(e,t,r,n,a,i){if(e<0||!Pe(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 Xy="combinations",QZ=["typed"],XZ=I(Xy,QZ,e=>{var{typed:t}=e;return t(Xy,{"number, number":s2,"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=n.minus(a),l=new i(1);if(!eb(n)||!eb(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 eb(e){return e.isInteger()&&e.gte(0)}var tb="combinationsWithRep",eQ=["typed"],tQ=I(tb,eQ,e=>{var{typed:t}=e;return t(tb,{"number, number":function(n,a){if(!Pe(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Pe(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=_a(n,n+a-1);return i/_a(1,a)}var o=_a(a+1,n+a-1);return o/_a(1,n-1)},"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=new i(1),l=n.minus(u);if(!rb(n)||!rb(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 rb(e){return e.isInteger()&&e.gte(0)}var nb="gamma",rQ=["typed","config","multiplyScalar","pow","BigNumber","Complex"],nQ=I(nb,rQ,e=>{var{typed:t,config:r,multiplyScalar:n,pow:a,BigNumber:i,Complex:o}=e;function s(l){if(l.im===0)return ic(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(Go[0],0),d=1;d<Go.length;++d){var h=new o(Go[d],0);m=m.add(h.div(l.add(d)))}var p=new o(l.re+l2+.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(nb,{number:ic,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))}}),ab="lgamma",aQ=["Complex","typed"],iQ=I(ab,aQ,e=>{var{Complex:t,typed:r}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return r(ab,{number:oc,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(oc(l.re),0);if(l.re>=n||Math.abs(l.im)>=a)return s(l);if(l.re<=m){var d=P8(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(c2),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))}}),ib="factorial",oQ=["typed","gamma"],sQ=I(ib,oQ,e=>{var{typed:t,gamma:r}=e;return t(ib,{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=>Xe(a,n))})}),ob="kldivergence",uQ=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],lQ=I(ob,uQ,e=>{var{typed:t,matrix:r,divide:n,sum:a,multiply:i,map:o,dotDivide:s,log:u,isNumeric:l}=e;return t(ob,{"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}}),sb="multinomial",cQ=["typed","add","divide","multiply","factorial","isInteger","isPositive"],fQ=I(sb,cQ,e=>{var{typed:t,add:r,divide:n,multiply:a,factorial:i,isInteger:o,isPositive:s}=e;return t(sb,{"Array | Matrix":function(l){var c=0,f=1;return vi(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)}})}),ub="permutations",mQ=["typed","factorial"],dQ=I(ub,mQ,e=>{var{typed:t,factorial:r}=e;return t(ub,{"number | BigNumber":r,"number, number":function(a,i){if(!Pe(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!Pe(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 _a(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var o,s;if(!lb(a)||!lb(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 lb(e){return e.isInteger()&&e.gte(0)}var Pl={exports:{}},hQ=Pl.exports,cb;function pQ(){return cb||(cb=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})(hQ,e)})(Pl)),Pl.exports}var kl={exports:{}},gQ=kl.exports,fb;function vQ(){return fb||(fb=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})(gQ,e)})(kl)),kl.exports}var Ol={exports:{}},yQ=Ol.exports,mb;function bQ(){return mb||(mb=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})(yQ,e)})(Ol)),Ol.exports}var $l={exports:{}},wQ=$l.exports,db;function xQ(){return db||(db=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})(wQ,e)})($l)),$l.exports}var Bl={exports:{}},DQ=Bl.exports,hb;function NQ(){return hb||(hb=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})(DQ,e)})(Bl)),Bl.exports}var _l={exports:{}},AQ=_l.exports,pb;function CQ(){return pb||(pb=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})(AQ,e)})(_l)),_l.exports}var Il={exports:{}};const EQ={},SQ=Object.freeze(Object.defineProperty({__proto__:null,default:EQ},Symbol.toStringTag,{value:"Module"})),TQ=Zs.getAugmentedNamespace(SQ);var MQ=Il.exports,gb;function FQ(){return gb||(gb=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,$){return $&&($.S&&p($,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,$=C.i,R=C.j,T=C.S;S--;)F=T[$=f&$+1],k=k*a+T[f&(T[$]=T[R=f&R+F])+(T[R]=F)];return C.i=$,C.j=R,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=TQ}catch{}}else n["seed"+s]=d})(typeof self<"u"?self:MQ,[],Math)})(Il)),Il.exports}var Jf,vb;function PQ(){if(vb)return Jf;vb=1;var e=pQ(),t=vQ(),r=bQ(),n=xQ(),a=NQ(),i=CQ(),o=FQ();return o.alea=e,o.xor128=t,o.xorwow=r,o.xorshift7=n,o.xor4096=a,o.tychei=i,Jf=o,Jf}var kQ=PQ();const cD=Zs.getDefaultExportFromCjs(kQ);var OQ=cD(Date.now());function Qo(e){var t;function r(a){t=a===null?OQ:cD(String(a))}r(e);function n(){return t()}return n}var yb="pickRandom",$Q=["typed","config","?on"],BQ=I(yb,$Q,e=>{var{typed:t,config:r,on:n}=e,a=Qo(r.randomSeed);return n&&n("config",function(o,s){o.randomSeed!==s.randomSeed&&(a=Qo(o.randomSeed))}),t(yb,{"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=Le(o)?o.create:Le(l)?l.create:null;o=o.valueOf(),l&&(l=l.valueOf()),c===!0&&(o=ht(o),l=ht(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(!qe(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 qd(e,t){var r=[];if(e=e.slice(0),e.length>1)for(var n=0,a=e.shift();n<a;n++)r.push(qd(e,t));else for(var i=0,o=e.shift();i<o;i++)r.push(t());return r}var bb="random",_Q=["typed","config","?on"],IQ=I(bb,_Q,e=>{var{typed:t,config:r,on:n}=e,a=Qo(r.randomSeed);return n&&n("config",function(s,u){s.randomSeed!==u.randomSeed&&(a=Qo(s.randomSeed))}),t(bb,{"":()=>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=qd(s.valueOf(),()=>o(u,l));return Le(s)?s.create(c,"number"):c}function o(s,u){return s+a()*(u-s)}}),wb="randomInt",zQ=["typed","config","log2","?on"],jQ=I(wb,zQ,e=>{var{typed:t,config:r,log2:n,on:a}=e,i=Qo(r.randomSeed);return a&&a("config",function(l,c){l.randomSeed!==c.randomSeed&&(i=Qo(l.randomSeed))}),t(wb,{"":()=>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=qd(l.valueOf(),()=>s(c,f));return Le(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}}),xb="stirlingS2",qQ=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],RQ=I(xb,qQ,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(xb,{"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=!(qe(w)&&qe(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]}})}),Db="bellNumbers",LQ=["typed","addScalar","isNegative","isInteger","stirlingS2"],HQ=I(Db,LQ,e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:a,stirlingS2:i}=e;return t(Db,{"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}})}),Nb="catalan",GQ=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],VQ=I(Nb,GQ,e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:o,isInteger:s}=e;return t(Nb,{"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))}})}),Ab="composition",UQ=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],WQ=I(Ab,UQ,e=>{var{typed:t,addScalar:r,combinations:n,isPositive:a,isNegative:i,isInteger:o,larger:s}=e;return t(Ab,{"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))}})}),Cb="leafCount",JQ=["parse","typed"],KQ=I(Cb,JQ,e=>{var{parse:t,typed:r}=e;function n(a){var i=0;return a.forEach(o=>{i+=n(o)}),i||1}return r(Cb,{Node:function(i){return n(i)}})});function Eb(e){return mt(e)||tr(e)&&e.isUnary()&&mt(e.args[0])}function gc(e){return!!(mt(e)||(hi(e)||tr(e))&&e.args.every(gc)||Ha(e)&&gc(e.content))}function Sb(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 Kf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sb(Object(r),!0).forEach(function(n){lr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var YQ="simplifyUtil",ZQ=["FunctionNode","OperatorNode","SymbolNode"],Rd=I(YQ,ZQ,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:tr(v)?b=v.fn.toString():hi(v)?b=v.name:Ha(v)&&(b="paren"),Me(g,b)){var C=g[b];if(Me(C,x))return C[x];if(Me(s,b))return s[b][x]}if(Me(g,o)){var N=g[o];return Me(N,x)?N[x]:s[o][x]}if(Me(s,b)){var A=s[b];if(Me(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=Kf({},v);for(var b in x)Me(v,b)?g[b]=Kf(Kf({},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];tr(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 tr(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",XQ=["typed","parse","equal","resolve","simplifyConstant","simplifyCore","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode","replacer"],eX=I(QQ,XQ,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}=Rd({FunctionNode:c,OperatorNode:d,SymbolNode:p});t.addConversion({from:"Object",to:"Map",convert:Lo});var F=t("simplify",{Node:j,"Node, Map":(U,_)=>j(U,!1,_),"Node, Map, Object":(U,_,J)=>j(U,!1,_,J),"Node, Array":j,"Node, Array, Map":j,"Node, Array, Map, Object":j});t.removeConversion({from:"Object",to:"Map",convert:Lo}),F.defaultContext=A,F.realContext=E,F.positiveContext=S;function k(U){return U.transform(function(_){return Ha(_)?k(_.content):_})}var $={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 R(U,_){var J={};if(U.s){var ae=U.s.split("->");if(ae.length===2)J.l=ae[0],J.r=ae[1];else throw SyntaxError("Could not parse rule: "+U.s)}else J.l=U.l,J.r=U.r;J.l=k(r(J.l)),J.r=k(r(J.r));for(var ee of["imposeContext","repeat","assuming"])ee in U&&(J[ee]=U[ee]);if(U.evaluate&&(J.evaluate=r(U.evaluate)),v(J.l,_)){var ue=!D(J.l,_),se;ue&&(se=L());var ye=N(J.l),Se=L();J.expanded={},J.expanded.l=ye([J.l,Se]),g(J.expanded.l,_),b(J.expanded.l,_),J.expanded.r=ye([J.r,Se]),ue&&(J.expandedNC1={},J.expandedNC1.l=ye([se,J.l]),J.expandedNC1.r=ye([se,J.r]),J.expandedNC2={},J.expandedNC2.l=ye([se,J.expanded.l]),J.expandedNC2.r=ye([se,J.expanded.r]))}return J}function T(U,_){for(var J=[],ae=0;ae<U.length;ae++){var ee=U[ae],ue=void 0,se=typeof ee;switch(se){case"string":ee={s:ee};case"object":ue=R(ee,_);break;case"function":ue=ee;break;default:throw TypeError("Unsupported type of rule: "+se)}J.push(ue)}return J}var B=0;function L(){return new p("_p"+B++)}function j(U,_){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Us(),ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ee=ae.consoleDebug;_=T(_||F.rules,ae.context);var ue=a(U,J);ue=k(ue);for(var se={},ye=ue.toString({parenthesis:"all"});!se[ye];){se[ye]=!0,B=0;var Se=ye;ee&&console.log("Working on: ",ye);for(var Fe=0;Fe<_.length;Fe++){var Ce="";if(typeof _[Fe]=="function"?(ue=_[Fe](ue,ae),ee&&(Ce=_[Fe].name)):(g(ue,ae.context),ue=G(ue,_[Fe],ae.context),ee&&(Ce="".concat(_[Fe].l.toString()," -> ").concat(_[Fe].r.toString()))),ee){var ke=ue.toString({parenthesis:"all"});ke!==Se&&(console.log("Applying",Ce,"produced",ke),Se=ke)}C(ue,ae.context)}ye=ue.toString({parenthesis:"all"})}return ue}function Z(U,_,J){var ae=U;if(U)for(var ee=0;ee<U.length;++ee){var ue=G(U[ee],_,J);ue!==U[ee]&&(ae===U&&(ae=U.slice()),ae[ee]=ue)}return ae}function G(U,_,J){if(_.assuming){for(var ae in _.assuming)for(var ee in _.assuming[ae])if(w(ae,ee,J)!==_.assuming[ae][ee])return U}var ue=x(_.imposeContext,J),se=U;if(se instanceof d||se instanceof c){var ye=Z(se.args,_,J);ye!==se.args&&(se=se.clone(),se.args=ye)}else if(se instanceof h){if(se.content){var Se=G(se.content,_,J);Se!==se.content&&(se=new h(Se))}}else if(se instanceof u){var Fe=Z(se.items,_,J);Fe!==se.items&&(se=new u(Fe))}else if(se instanceof s){var Ce=se.object;se.object&&(Ce=G(se.object,_,J));var ke=se.index;se.index&&(ke=G(se.index,_,J)),(Ce!==se.object||ke!==se.index)&&(se=new s(Ce,ke))}else if(se instanceof f){var je=Z(se.dimensions,_,J);je!==se.dimensions&&(se=new f(je))}else if(se instanceof m){var H=!1,X={};for(var O in se.properties)X[O]=G(se.properties[O],_,J),X[O]!==se.properties[O]&&(H=!0);H&&(se=new m(X))}var q=_.r,K=oe(_.l,se,ue)[0];if(!K&&_.expanded&&(q=_.expanded.r,K=oe(_.expanded.l,se,ue)[0]),!K&&_.expandedNC1&&(q=_.expandedNC1.r,K=oe(_.expandedNC1.l,se,ue)[0],K||(q=_.expandedNC2.r,K=oe(_.expandedNC2.l,se,ue)[0])),K){var te=se.implicit;se=q.clone(),te&&"implicit"in q&&(se.implicit=!0),se=se.transform(function(ie){return ie.isSymbolNode&&Me(K.placeholders,ie.name)?K.placeholders[ie.name].clone():ie})}return _.repeat&&se!==U&&(se=G(se,_,J)),se}function V(U,_){var J=[],ae,ee,ue=N(U);if(D(U,_))for(var se=0;se<U.args.length;se++)ee=U.args.slice(0),ee.splice(se,1),ae=ee.length===1?ee[0]:ue(ee),J.push(ue([U.args[se],ae]));else for(var ye=1;ye<U.args.length;ye++){var Se=U.args[0];ye>1&&(Se=ue(U.args.slice(0,ye))),ee=U.args.slice(ye),ae=ee.length===1?ee[0]:ue(ee),J.push(ue([Se,ae]))}return J}function P(U,_){var J={placeholders:{}};if(!U.placeholders&&!_.placeholders)return J;if(U.placeholders){if(!_.placeholders)return U}else return _;for(var ae in U.placeholders)if(Me(U.placeholders,ae)&&(J.placeholders[ae]=U.placeholders[ae],Me(_.placeholders,ae)&&!ne(U.placeholders[ae],_.placeholders[ae])))return null;for(var ee in _.placeholders)Me(_.placeholders,ee)&&(J.placeholders[ee]=_.placeholders[ee]);return J}function Q(U,_){var J=[];if(U.length===0||_.length===0)return J;for(var ae,ee=0;ee<U.length;ee++)for(var ue=0;ue<_.length;ue++)ae=P(U[ee],_[ue]),ae&&J.push(ae);return J}function z(U){if(U.length===0)return U;for(var _=U.reduce(Q),J=[],ae={},ee=0;ee<_.length;ee++){var ue=JSON.stringify(_[ee],y);ae[ue]||(ae[ue]=!0,J.push(_[ee]))}return J}function oe(U,_,J,ae){var ee=[{placeholders:{}}];if(U instanceof d&&_ instanceof d||U instanceof c&&_ instanceof c){if(U instanceof d){if(U.op!==_.op||U.fn!==_.fn)return[]}else if(U instanceof c&&U.name!==_.name)return[];if(_.args.length===1&&U.args.length===1||!v(_,J)&&_.args.length===U.args.length||ae){for(var ue=[],se=0;se<U.args.length;se++){var ye=oe(U.args[se],_.args[se],J);if(ye.length===0)break;ue.push(ye)}if(ue.length!==U.args.length){if(!D(_,J)||U.args.length===1)return[];if(U.args.length>2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var Se=oe(U.args[0],_.args[1],J);if(Se.length===0)return[];var Fe=oe(U.args[1],_.args[0],J);if(Fe.length===0)return[];ue=[Se,Fe]}ee=z(ue)}else if(_.args.length>=2&&U.args.length===2){for(var Ce=V(_,J),ke=[],je=0;je<Ce.length;je++){var H=oe(U,Ce[je],J,!0);ke=ke.concat(H)}return ke}else{if(U.args.length>2)throw Error("Unexpected non-binary associative function: "+U.toString());return[]}}else if(U instanceof p){if(U.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if($[U.name]){if(U.name!==_.name)return[]}else switch(U.name[1]>="a"&&U.name[1]<="z"?U.name.substring(0,2):U.name[0]){case"n":case"_p":ee[0].placeholders[U.name]=_;break;case"c":case"cl":if(mt(_))ee[0].placeholders[U.name]=_;else return[];break;case"v":if(!mt(_))ee[0].placeholders[U.name]=_;else return[];break;case"vl":if(Nr(_))ee[0].placeholders[U.name]=_;else return[];break;case"cd":if(Eb(_))ee[0].placeholders[U.name]=_;else return[];break;case"vd":if(!Eb(_))ee[0].placeholders[U.name]=_;else return[];break;case"ce":if(gc(_))ee[0].placeholders[U.name]=_;else return[];break;case"ve":if(!gc(_))ee[0].placeholders[U.name]=_;else return[];break;default:throw new Error("Invalid symbol in rule: "+U.name)}}else if(U instanceof l){if(!n(U.value,_.value))return[]}else return[];return ee}function ne(U,_){if(U instanceof l&&_ instanceof l){if(!n(U.value,_.value))return!1}else if(U instanceof p&&_ instanceof p){if(U.name!==_.name)return!1}else if(U instanceof d&&_ instanceof d||U instanceof c&&_ instanceof c){if(U instanceof d){if(U.op!==_.op||U.fn!==_.fn)return!1}else if(U instanceof c&&U.name!==_.name)return!1;if(U.args.length!==_.args.length)return!1;for(var J=0;J<U.args.length;J++)if(!ne(U.args[J],_.args[J]))return!1}else return!1;return!0}return F}),tX="simplifyConstant",rX=["typed","config","mathWithTransform","matrix","isBounded","?fraction","?bignumber","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode"],nX=I(tX,rX,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}=Rd({FunctionNode:f,OperatorNode:h,SymbolNode:p}),x=t("simplifyConstant",{Node:T=>N(R(T,{})),"Node, Object":function(B,L){return N(R(B,L))}});function g(T){return iu(T)?T.valueOf():T instanceof Array?T.map(g):Le(T)?a(g(T.valueOf())):T}function b(T,B,L){try{return n[T].apply(null,B)}catch{return B=B.map(g),E(n[T].apply(null,B),L)}}var C=t({Fraction:F,number:function(B){return B<0?S(new c(-B)):new c(B)},BigNumber:function(B){return B<0?S(new c(-B)):new c(B)},bigint:function(B){return B<0n?S(new c(-B)):new c(B)},Complex:function(B){throw new Error("Cannot convert Complex number to Node")},string:function(B){return new c(B)},Matrix:function(B){return new l(B.valueOf().map(L=>C(L)))}});function N(T){return St(T)?T:C(T)}function A(T,B){var L=B&&B.exactFractions!==!1;if(L&&i(T)&&o){var j=o(T),Z=B&&typeof B.fractionsLimit=="number"?B.fractionsLimit:1/0;if(j.valueOf()===T&&j.n<Z&&j.d<Z)return j}return T}var E=t({"string, Object":function(B,L){var j=bi(B,r);if(j==="BigNumber")return s===void 0&&_d(),s(B);if(j==="bigint")return BigInt(B);if(j==="Fraction")return o===void 0&&G2(),o(B);var Z=parseFloat(B);return A(Z,L)},"Fraction, Object":function(B,L){return B},"BigNumber, Object":function(B,L){return B},"number, Object":function(B,L){return A(B,L)},"bigint, Object":function(B,L){return B},"Complex, Object":function(B,L){return B.im!==0?B:A(B.re,L)},"Matrix, Object":function(B,L){return a(A(B.valueOf()))},"Array, Object":function(B,L){return B.map(A)}});function S(T){return new h("-","unaryMinus",[T])}function F(T){var B=Z=>r.number==="BigNumber"&&s?s(Z):Number(Z),L=T.s*T.n,j=L<0n?new h("-","unaryMinus",[new c(-B(L))]):new c(B(L));return T.d===1n?j:new h("/","divide",[j,new c(B(T.d))])}function k(T,B,L){if(!ns(B))return new u(N(T),N(B));if(Pn(T)||Le(T)){for(var j=Array.from(B.dimensions);j.length>0;)if(mt(j[0])&&typeof j[0].value!="string"){var Z=E(j.shift().value,L);Pn(T)?T=T.items[Z-1]:(T=T.valueOf()[Z-1],T instanceof Array&&(T=a(T)))}else if(j.length>1&&mt(j[1])&&typeof j[1].value!="string"){var G=E(j[1].value,L),V=[],P=Pn(T)?T.items:T.valueOf();for(var Q of P)if(Pn(Q))V.push(Q.items[G-1]);else if(Le(T))V.push(Q[G-1]);else break;if(V.length===P.length)Pn(T)?T=new l(V):T=a(V),j.splice(1,1);else break}else break;return j.length===B.dimensions.length?new u(N(T),B):j.length>0?(B=new m(j),new u(N(T),B)):T}if(Ec(T)&&B.dimensions.length===1&&mt(B.dimensions[0])){var z=B.dimensions[0].value;return z in T.properties?T.properties[z]:new c}return new u(N(T),B)}function $(T,B,L,j){var Z=B.shift(),G=B.reduce((V,P)=>{if(!St(P)){var Q=V.pop();if(St(Q))return[Q,P];try{return V.push(b(T,[Q,P],j)),V}catch{V.push(Q)}}V.push(N(V.pop()));var z=V.length===1?V[0]:L(V);return[L([z,N(P)])]},[Z]);return G.length===1?G[0]:L([G[0],C(G[1])])}function R(T,B){switch(T.type){case"SymbolNode":return T;case"ConstantNode":switch(typeof T.value){case"number":return E(T.value,B);case"bigint":return E(T.value,B);case"string":return T.value;default:if(!isNaN(T.value))return E(T.value,B)}return T;case"FunctionNode":if(n[T.name]&&n[T.name].rawArgs)return T;{var L=["add","multiply"];if(!L.includes(T.name)){var j=T.args.map(ee=>R(ee,B));if(!j.some(St))try{return b(T.name,j,B)}catch{}if(T.name==="size"&&j.length===1&&Pn(j[0])){for(var Z=[],G=j[0];Pn(G);)Z.push(G.items.length),G=G.items[0];return a(Z)}return new f(T.name,j.map(N))}}case"OperatorNode":{var V=T.fn.toString(),P,Q,z=v(T);if(tr(T)&&T.isUnary())P=[R(T.args[0],B)],St(P[0])?Q=z(P):Q=b(V,P,B);else if(w(T,B.context))if(P=D(T,B.context),P=P.map(ee=>R(ee,B)),y(V,B.context)){for(var oe=[],ne=[],U=0;U<P.length;U++)St(P[U])?ne.push(P[U]):oe.push(P[U]);oe.length>1?(Q=$(V,oe,z,B),ne.unshift(Q),Q=$(V,ne,z,B)):Q=$(V,P,z,B)}else Q=$(V,P,z,B);else P=T.args.map(ee=>R(ee,B)),Q=$(V,P,z,B);return Q}case"ParenthesisNode":return R(T.content,B);case"AccessorNode":return k(R(T.object,B),R(T.index,B),B);case"ArrayNode":{var _=T.items.map(ee=>R(ee,B));return _.some(St)?new l(_.map(N)):a(_)}case"IndexNode":return new m(T.dimensions.map(ee=>x(ee,B)));case"ObjectNode":{var J={};for(var ae in T.properties)J[ae]=x(T.properties[ae],B);return new d(J)}default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(T.type))}}return x}),Tb="simplifyCore",aX=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],iX=I(Tb,aX,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 tr(S)&&["and","not","or"].includes(S.op)}var{hasProperty:N,isCommutative:A}=Rd({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(hi(S)&&S.args.length===1)return E(S.args[0],F);var $=!1,R=0;if(S.forEach(oe=>{++R,R===1&&($=E(oe,F))}),R===1)return $}var T=S;if(hi(T)){var B=KG(T.name);if(B){if(T.args.length>2&&N(T,"associative",k))for(;T.args.length>2;){var L=T.args.pop(),j=T.args.pop();T.args.push(new y(B,T.name,[L,j]))}T=new y(B,T.name,T.args)}else return new d(E(T.fn),T.args.map(oe=>E(oe,F)))}if(tr(T)&&T.isUnary()){var Z=E(T.args[0],F);if(T.op==="~"&&tr(Z)&&Z.isUnary()&&Z.op==="~"||T.op==="not"&&tr(Z)&&Z.isUnary()&&Z.op==="not"&&C(Z.args[0]))return Z.args[0];var G=!0;if(T.op==="-"&&tr(Z)&&(Z.isBinary()&&Z.fn==="subtract"&&(T=new y("-","subtract",[Z.args[1],Z.args[0]]),G=!1),Z.isUnary()&&Z.op==="-"))return Z.args[0];if(G)return new y(T.op,T.fn,[Z])}if(tr(T)&&T.isBinary()){var V=E(T.args[0],F),P=E(T.args[1],F);if(T.op==="+"){if(mt(V)&&a(V.value))return P;if(mt(P)&&a(P.value))return V;tr(P)&&P.isUnary()&&P.op==="-"&&(P=P.args[0],T=new y("-","subtract",[V,P]))}if(T.op==="-")return tr(P)&&P.isUnary()&&P.op==="-"?E(new y("+","add",[V,P.args[0]]),F):mt(V)&&a(V.value)?E(new y("-","unaryMinus",[P])):mt(P)&&a(P.value)?V:new y(T.op,T.fn,[V,P]);if(T.op==="*"){if(mt(V)){if(a(V.value))return v;if(n(V.value,1))return P}if(mt(P)){if(a(P.value))return v;if(n(P.value,1))return V;if(A(T,k))return new y(T.op,T.fn,[P,V],T.implicit)}return new y(T.op,T.fn,[V,P],T.implicit)}if(T.op==="/")return mt(V)&&a(V.value)?v:mt(P)&&n(P.value,1)?V:new y(T.op,T.fn,[V,P]);if(T.op==="^"&&mt(P)){if(a(P.value))return x;if(n(P.value,1))return V}if(T.op==="and"){if(mt(V))if(V.value){if(C(P))return P;if(mt(P))return P.value?g:b}else return b;if(mt(P))if(P.value){if(C(V))return V}else return b}if(T.op==="or"){if(mt(V)){if(V.value)return g;if(C(P))return P}if(mt(P)){if(P.value)return g;if(C(V))return V}}return new y(T.op,T.fn,[V,P])}if(tr(T))return new y(T.op,T.fn,T.args.map(oe=>E(oe,F)));if(Pn(T))return new f(T.items.map(oe=>E(oe,F)));if(La(T))return new c(E(T.object,F),E(T.index,F));if(ns(T))return new h(T.dimensions.map(oe=>E(oe,F)));if(Ec(T)){var Q={};for(var z in T.properties)Q[z]=E(T.properties[z],F);return new p(Q)}return T}return t(Tb,{Node:E,"Node,Object":E})}),oX="resolve",sX=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],uX=I(oX,sX,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(Nr(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(St(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(tr(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(Ha(u))return new o(s(u.content,l,c));if(hi(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,Lo(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,Lo(c))),"Matrix, Object":t.referTo("Matrix,Map",u=>(l,c)=>u(l,Lo(c))),"Array | Matrix, Map":t.referToSelf(u=>(l,c)=>l.map(f=>u(f,c)))})}),Mb="symbolicEqual",lX=["parse","simplify","typed","OperatorNode"],cX=I(Mb,lX,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 mt(c)&&!c.value}return n(Mb,{"Node, Node":i,"Node, Node, Object":i})}),Fb="derivative",fX=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],mX=I(Fb,fX,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(Fb,{"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 mt(g)&&kt(g.value)==="string"?y(n(g.value).toString(),b.toString(),1):y(g.toTex(),b.toString(),1)},"Node, ConstantNode":function(g,b){if(kt(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;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 $=D(C,b);return E&&($=new c("-","unaryMinus",[$])),new c(F,k,[$,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(T){return D(T,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(T){return b(T)});if(C.length>0){var N=g.args.filter(function(T){return!b(T)}),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(T){return new c("*","multiply",g.args.map(function(B){return B===T?D(B,b):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],$=g.args[1];if(b(k))return mt(k)&&(o(k.value)||i(k.value,1))?v(0):new c("*","multiply",[g,new c("*","multiply",[new l("log",[k.clone()]),D($.clone(),b)])]);if(b($)){if(mt($)){if(o($.value))return v(0);if(i($.value,1))return D(k,b)}var R=new c("^","pow",[k.clone(),new c("-","subtract",[$,v(1)])]);return new c("*","multiply",[$.clone(),new c("*","multiply",[D(k,b),R])])}return new c("*","multiply",[new c("^","pow",[k.clone(),$.clone()]),new c("+","add",[new c("*","multiply",[D(k,b),new c("/","divide",[$.clone(),k.clone()])]),new c("*","multiply",[D($,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,bi(String(x),r)))}return p}),Pb="rationalize",dX=["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"],hX=I(Pb,dX,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(T){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,j=k(),Z=F(T,B,!0,j.firstRules),G=Z.variables.length,V={exactFractions:!1},P={exactFractions:!0};if(T=Z.expression,G>=1){T=$(T);var Q,z,oe=!0,ne=!1;T=d(T,j.firstRules,{},V);for(var U;z=oe?j.distrDivRules:j.sucDivRules,T=d(T,z,{},P),oe=!oe,U=T.toString(),U!==Q;)ne=!0,Q=U;ne&&(T=d(T,j.firstRulesAgain,{},V)),T=d(T,j.finalRules,{},V)}var _=[],J={};return T.type==="OperatorNode"&&T.isBinary()&&T.op==="/"?(G===1&&(T.args[0]=R(T.args[0],_),T.args[1]=R(T.args[1])),L&&(J.numerator=T.args[0],J.denominator=T.args[1])):(G===1&&(T=R(T,_)),L&&(J.numerator=T,J.denominator=null)),L?(J.coefficients=_,J.variables=Z.variables,J.expression=T,J):T}return r(Pb,{Node:S,"Node, boolean":(T,B)=>S(T,{},B),"Node, Object":S,"Node, Object, boolean":S});function F(T,B,L,j){var Z=[],G=d(T,j,B,{exactFractions:!1});L=!!L;var V="+-*"+(L?"/":"");Q(G);var P={};return P.expression=G,P.variables=Z,P;function Q(z){var oe=z.type;if(oe==="FunctionNode")throw new Error("There is an unsolved function call");if(oe==="OperatorNode")if(z.op==="^"){if(z.args[1].type!=="ConstantNode"||!Pe(parseFloat(z.args[1].value)))throw new Error("There is a non-integer exponent");Q(z.args[0])}else{if(!V.includes(z.op))throw new Error("Operator "+z.op+" invalid in polynomial expression");for(var ne=0;ne<z.args.length;ne++)Q(z.args[ne])}else if(oe==="SymbolNode"){var U=z.name,_=Z.indexOf(U);_===-1&&Z.push(U)}else if(oe==="ParenthesisNode")Q(z.content);else if(oe!=="ConstantNode")throw new Error("type "+oe+" is not allowed in polynomial expression")}}function k(){var T=[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"}],B=[{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)"}],L=[{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))"}],Z={};return Z.firstRules=T.concat(B,j),Z.distrDivRules=L,Z.sucDivRules=j,Z.firstRulesAgain=T.concat(B),Z.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))"}],Z}function $(T,B,L){var j=T.type,Z=arguments.length>1;if(j==="OperatorNode"&&T.isBinary()){var G=!1,V;if(T.op==="^"&&(T.args[0].type==="ParenthesisNode"||T.args[0].type==="OperatorNode")&&T.args[1].type==="ConstantNode"&&(V=parseFloat(T.args[1].value),G=V>=2&&Pe(V)),G){if(V>2){var P=T.args[0],Q=new N("^","pow",[T.args[0].cloneDeep(),new x(V-1)]);T=new N("*","multiply",[P,Q])}else T=new N("*","multiply",[T.args[0],T.args[0].cloneDeep()]);Z&&(L==="content"?B.content=T:B.args[L]=T)}}if(j==="ParenthesisNode")$(T.content,T,"content");else if(j!=="ConstantNode"&&j!=="SymbolNode")for(var z=0;z<T.args.length;z++)$(T.args[z],T,z);if(!Z)return T}function R(T,B){B===void 0&&(B=[]),B[0]=0;var L={};L.cte=1,L.oper="+",L.fire="";var j=0,Z="";U(T,null,L),j=B.length-1;for(var G=!0,V,P=j;P>=0;P--)if(B[P]!==0){var Q=new x(G?B[P]:Math.abs(B[P])),z=B[P]<0?"-":"+";if(P>0){var oe=new A(Z);if(P>1){var ne=new x(P);oe=new N("^","pow",[oe,ne])}B[P]===-1&&G?Q=new N("-","unaryMinus",[oe]):Math.abs(B[P])===1?Q=oe:Q=new N("*","multiply",[Q,oe])}G?V=Q:z==="+"?V=new N("+","add",[V,Q]):V=new N("-","subtract",[V,Q]),G=!1}if(G)return new x(0);return V;function U(_,J,ae){var ee=_.type;if(ee==="FunctionNode")throw new Error("There is an unsolved function call");if(ee==="OperatorNode"){if(!"+-*^".includes(_.op))throw new Error("Operator "+_.op+" invalid");if(J!==null){if((_.fn==="unaryMinus"||_.fn==="pow")&&J.fn!=="add"&&J.fn!=="subtract"&&J.fn!=="multiply")throw new Error("Invalid "+_.op+" placing");if((_.fn==="subtract"||_.fn==="add"||_.fn==="multiply")&&J.fn!=="add"&&J.fn!=="subtract")throw new Error("Invalid "+_.op+" placing");if((_.fn==="subtract"||_.fn==="add"||_.fn==="unaryMinus")&&ae.noFil!==0)throw new Error("Invalid "+_.op+" placing")}(_.op==="^"||_.op==="*")&&(ae.fire=_.op);for(var ue=0;ue<_.args.length;ue++)_.fn==="unaryMinus"&&(ae.oper="-"),(_.op==="+"||_.fn==="subtract")&&(ae.fire="",ae.cte=1,ae.oper=ue===0?"+":_.op),ae.noFil=ue,U(_.args[ue],_,ae)}else if(ee==="SymbolNode"){if(_.name!==Z&&Z!=="")throw new Error("There is more than one variable");if(Z=_.name,J===null){B[1]=1;return}if(J.op==="^"&&ae.noFil!==0)throw new Error("In power the variable should be the first parameter");if(J.op==="*"&&ae.noFil!==1)throw new Error("In multiply the variable should be the second parameter");(ae.fire===""||ae.fire==="*")&&(j<1&&(B[1]=0),B[1]+=ae.cte*(ae.oper==="+"?1:-1),j=Math.max(1,j))}else if(ee==="ConstantNode"){var se=parseFloat(_.value);if(J===null){B[0]=se;return}if(J.op==="^"){if(ae.noFil!==1)throw new Error("Constant cannot be powered");if(!Pe(se)||se<=0)throw new Error("Non-integer exponent is not allowed");for(var ye=j+1;ye<se;ye++)B[ye]=0;se>j&&(B[se]=0),B[se]+=ae.cte*(ae.oper==="+"?1:-1),j=Math.max(se,j);return}ae.cte=se,ae.fire===""&&(B[0]+=ae.cte*(ae.oper==="+"?1:-1))}else throw new Error("Type "+ee+" is not allowed")}}}),kb="zpk2tf",pX=["typed","add","multiply","Complex","number"],gX=I(kb,pX,e=>{var{typed:t,add:r,multiply:n,Complex:a,number:i}=e;return t(kb,{"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}}),Ob="freqz",vX=["typed","add","multiply","Complex","divide","matrix"],yX=I(Ob,vX,e=>{var{typed:t,add:r,multiply:n,Complex:a,divide:i,matrix:o}=e;return t(Ob,{"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}}),bX="reviver",wX=["classes"],xX=I(bX,wX,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}}),DX="replacer",NX=[],AX=I(DX,NX,()=>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}),CX="15.1.0",EX=I("true",[],()=>!0),SX=I("false",[],()=>!1),TX=I("null",[],()=>null),MX=wn("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1/0):1/0}),FX=wn("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(NaN):NaN}),PX=wn("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?jd(r):wI}),kX=wn("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?XL(r):xI}),OX=wn("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?ZL(r):DI}),$X=wn("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?QL(r):NI}),BX=wn("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).ln():Math.LN2}),_X=wn("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(10).ln():Math.LN10}),IX=wn("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(2).ln()):Math.LOG2E}),zX=wn("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(10).ln()):Math.LOG10E}),jX=wn("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r("0.5").sqrt():Math.SQRT1_2}),qX=wn("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).sqrt():Math.SQRT2}),RX=wn("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),LX=I("version",[],()=>CX);function wn(e,t,r){return I(e,t,r,{recreateOnConfigChange:!0})}var HX=Ke("speedOfLight","299792458","m s^-1"),GX=Ke("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),VX=Ke("planckConstant","6.62607015e-34","J s"),UX=Ke("reducedPlanckConstant","1.0545718176461565e-34","J s"),WX=Ke("magneticConstant","1.25663706212e-6","N A^-2"),JX=Ke("electricConstant","8.8541878128e-12","F m^-1"),KX=Ke("vacuumImpedance","376.730313667","ohm"),YX=Ke("coulomb","8.987551792261171e9","N m^2 C^-2"),ZX=Ke("coulombConstant","8.987551792261171e9","N m^2 C^-2"),QX=Ke("elementaryCharge","1.602176634e-19","C"),XX=Ke("bohrMagneton","9.2740100783e-24","J T^-1"),eee=Ke("conductanceQuantum","7.748091729863649e-5","S"),tee=Ke("inverseConductanceQuantum","12906.403729652257","ohm"),ree=Ke("magneticFluxQuantum","2.0678338484619295e-15","Wb"),nee=Ke("nuclearMagneton","5.0507837461e-27","J T^-1"),aee=Ke("klitzing","25812.807459304513","ohm"),iee=Ke("bohrRadius","5.29177210903e-11","m"),oee=Ke("classicalElectronRadius","2.8179403262e-15","m"),see=Ke("electronMass","9.1093837015e-31","kg"),uee=Ke("fermiCoupling","1.1663787e-5","GeV^-2"),lee=_c("fineStructure",.0072973525693),cee=Ke("hartreeEnergy","4.3597447222071e-18","J"),fee=Ke("protonMass","1.67262192369e-27","kg"),mee=Ke("deuteronMass","3.3435830926e-27","kg"),dee=Ke("neutronMass","1.6749271613e-27","kg"),hee=Ke("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),pee=Ke("rydberg","10973731.568160","m^-1"),gee=Ke("thomsonCrossSection","6.6524587321e-29","m^2"),vee=_c("weakMixingAngle",.2229),yee=_c("efimovFactor",22.7),bee=Ke("atomicMass","1.66053906660e-27","kg"),wee=Ke("avogadro","6.02214076e23","mol^-1"),xee=Ke("boltzmann","1.380649e-23","J K^-1"),Dee=Ke("faraday","96485.33212331001","C mol^-1"),Nee=Ke("firstRadiation","3.7417718521927573e-16","W m^2"),Aee=Ke("loschmidt","2.686780111798444e25","m^-3"),Cee=Ke("gasConstant","8.31446261815324","J K^-1 mol^-1"),Eee=Ke("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),See=Ke("molarVolume","0.022413969545014137","m^3 mol^-1"),Tee=_c("sackurTetrode",-1.16487052358),Mee=Ke("secondRadiation","0.014387768775039337","m K"),Fee=Ke("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),Pee=Ke("wienDisplacement","2.897771955e-3","m K"),kee=Ke("molarMass","0.99999999965e-3","kg mol^-1"),Oee=Ke("molarMassC12","11.9999999958e-3","kg mol^-1"),$ee=Ke("gravity","9.80665","m s^-2"),Bee=Ke("planckLength","1.616255e-35","m"),_ee=Ke("planckMass","2.176435e-8","kg"),Iee=Ke("planckTime","5.391245e-44","s"),zee=Ke("planckCharge","1.87554603778e-18","C"),jee=Ke("planckTemperature","1.416785e+32","K");function Ke(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 _c(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 $b(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 qee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(r),!0).forEach(function(n){lr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ree="mapSlices",Lee=["typed","isInteger"],Hee=I(Ree,Lee,e=>{var{typed:t,isInteger:r}=e,n=Zm({typed:t,isInteger:r});return t("mapSlices",{"...any":function(i){var o=i[1];qe(o)?i[1]=o-1:Qe(o)&&(i[1]=o.minus(1));try{return n.apply(null,i)}catch(s){throw Xr(s)}}})},qee({isTransformFunction:!0},Zm.meta)),Gee="column",Vee=["typed","Index","matrix","range"],Uee=I(Gee,Vee,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=j2({typed:t,Index:r,matrix:n,range:a});return t("column",{"...any":function(s){var u=s.length-1,l=s[u];qe(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw Xr(c)}}})},{isTransformFunction:!0});function Ld(e,t,r){var n=e.filter(function(u){return Nr(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 ox(r,i,new Set([a])),s=e.compile();return function(l){return i.set(a,l),s.evaluate(o)}}var Wee="transformCallback",Jee=["typed"],Hd=I(Wee,Jee,e=>{var{typed:t}=e;return function(n,a){return t.isTypedFunction(n)?r(n,a):Bb(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,Bb(u,l,a)]}));return typeof n.name=="string"?t(n.name,i):t(i)}});function Bb(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=_b(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=_b(a[r]),u=a.slice(r+1);return e(...o,s,...u)}:e}function _b(e){return e.map(t=>t+1)}var Kee="filter",Yee=["typed"],Zee=I(Kee,Yee,e=>{var{typed:t}=e;function r(a,i,o){var s=q2({typed:t}),u=Hd({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&&(Nr(f)||ou(f)?f=n(f,o):f=Ld(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",Xee=["typed"],ete=I(Qee,Xee,e=>{var{typed:t}=e,r=R2({typed:t}),n=Hd({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&&(Nr(f)||ou(f)?f=i(f,u):f=Ld(f,s,u)),r(l,n(f,c))}a.rawArgs=!0;function i(o,s){return o.compile().evaluate(s)}return a},{isTransformFunction:!0}),tte="index",rte=["Index","getMatrixDataType"],nte=I(tte,rte,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(Ed(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(Ft(s)||Le(s))r(s)!=="boolean"&&(s=s.map(function(l){return l-1}));else if(qe(s)||_s(s))s--;else if(Qe(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}),ate="map",ite=["typed"],ote=I(ate,ite,e=>{var{typed:t}=e,r=L2({typed:t}),n=Hd({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&&(Nr(c)||ou(c)?c=f(c,s):c=Ld(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 ste(e){return qe(e)?e-1:Qe(e)?e.minus(1):e}function ute(e){return qe(e)||Qe(e)}function Di(e){if(e.length===2&&yn(e[0])){e=e.slice();var t=e[1];ute(t)&&(e[1]=ste(t))}return e}var lte="max",cte=["typed","config","numeric","larger","isNaN"],fte=I(lte,cte,e=>{var{typed:t,config:r,numeric:n,larger:a,isNaN:i}=e,o=Z2({typed:t,config:r,numeric:n,larger:a,isNaN:i});return t("max",{"...any":function(u){u=Di(u);try{return o.apply(null,u)}catch(l){throw Xr(l)}}})},{isTransformFunction:!0}),mte="mean",dte=["typed","add","divide"],hte=I(mte,dte,e=>{var{typed:t,add:r,divide:n}=e,a=oD({typed:t,add:r,divide:n});return t("mean",{"...any":function(o){o=Di(o);try{return a.apply(null,o)}catch(s){throw Xr(s)}}})},{isTransformFunction:!0}),pte="min",gte=["typed","config","numeric","smaller","isNaN"],vte=I(pte,gte,e=>{var{typed:t,config:r,numeric:n,smaller:a,isNaN:i}=e,o=Q2({typed:t,config:r,numeric:n,smaller:a,isNaN:i});return t("min",{"...any":function(u){u=Di(u);try{return o.apply(null,u)}catch(l){throw Xr(l)}}})},{isTransformFunction:!0}),yte="range",bte=["typed","config","?matrix","?bignumber","equal","smaller","smallerEq","larger","largerEq","add","isZero","isPositive"],wte=I(yte,bte,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=V2({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}),xte="row",Dte=["typed","Index","matrix","range"],Nte=I(xte,Dte,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=U2({typed:t,Index:r,matrix:n,range:a});return t("row",{"...any":function(s){var u=s.length-1,l=s[u];qe(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw Xr(c)}}})},{isTransformFunction:!0}),Ate="subset",Cte=["typed","matrix","zeros","add"],Ete=I(Ate,Cte,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=W2({typed:t,matrix:r,zeros:n,add:a});return t("subset",{"...any":function(s){try{return i.apply(null,s)}catch(u){throw Xr(u)}}})},{isTransformFunction:!0}),Ste="concat",Tte=["typed","matrix","isInteger"],Mte=I(Ste,Tte,e=>{var{typed:t,matrix:r,isInteger:n}=e,a=z2({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(o){var s=o.length-1,u=o[s];qe(u)?o[s]=u-1:Qe(u)&&(o[s]=u.minus(1));try{return a.apply(null,o)}catch(l){throw Xr(l)}}})},{isTransformFunction:!0}),Ib="diff",Fte=["typed","matrix","subtract","number","bignumber"],Pte=I(Ib,Fte,e=>{var{typed:t,matrix:r,subtract:n,number:a,bignumber:i}=e,o=H2({typed:t,matrix:r,subtract:n,number:a,bignumber:i});return t(Ib,{"...any":function(u){u=Di(u);try{return o.apply(null,u)}catch(l){throw Xr(l)}}})},{isTransformFunction:!0}),kte="std",Ote=["typed","map","sqrt","variance"],$te=I(kte,Ote,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e,i=lD({typed:t,map:r,sqrt:n,variance:a});return t("std",{"...any":function(s){s=Di(s);try{return i.apply(null,s)}catch(u){throw Xr(u)}}})},{isTransformFunction:!0}),zb="sum",Bte=["typed","config","add","numeric"],_te=I(zb,Bte,e=>{var{typed:t,config:r,add:n,numeric:a}=e,i=aD({typed:t,config:r,add:n,numeric:a});return t(zb,{"...any":function(s){s=Di(s);try{return i.apply(null,s)}catch(u){throw Xr(u)}}})},{isTransformFunction:!0}),Ite="quantileSeq",zte=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],jte=I(Ite,zte,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=uD({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 Di([[],y])[1]}},{isTransformFunction:!0}),jb="cumsum",qte=["typed","add","unaryPlus"],Rte=I(jb,qte,e=>{var{typed:t,add:r,unaryPlus:n}=e,a=iD({typed:t,add:r,unaryPlus:n});return t(jb,{"...any":function(o){if(o.length===2&&yn(o[0])){var s=o[1];qe(s)?o[1]=s-1:Qe(s)&&(o[1]=s.minus(1))}try{return a.apply(null,o)}catch(u){throw Xr(u)}}})},{isTransformFunction:!0}),qb="variance",Lte=["typed","add","subtract","multiply","divide","mapSlices","isNaN"],Hte=I(qb,Lte,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s}=e,u=sD({typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s});return t(qb,{"...any":function(c){c=Di(c);try{return u.apply(null,c)}catch(f){throw Xr(f)}}})},{isTransformFunction:!0}),Rb="print",Gte=["typed","matrix","zeros","add"],Vte=I(Rb,Gte,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=K2({typed:t,matrix:r,zeros:n,add:a});return t(Rb,{"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(J2,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}),Ute="and",Wte=["typed","matrix","zeros","add","equalScalar","not","concat"],Jte=I(Ute,Wte,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=Y2({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(!yn(m)&&!s(m,!0))return!1;var d=l[1].compile().evaluate(f);return s(m,d)}return u.rawArgs=!0,u},{isTransformFunction:!0}),Kte="or",Yte=["typed","matrix","equalScalar","DenseMatrix","concat"],Zte=I(Kte,Yte,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=I2({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!yn(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",Xte=["typed","matrix","size","flatten","deepEqual"],ere=I(Qte,Xte,e=>{var{typed:t,matrix:r,size:n,flatten:a,deepEqual:i}=e,o=_2({typed:t,matrix:r,size:n,flatten:a,deepEqual:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!yn(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}),tre="bitAnd",rre=["typed","matrix","zeros","add","equalScalar","not","concat"],nre=I(tre,rre,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=$2({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(!yn(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}),are="bitOr",ire=["typed","matrix","equalScalar","DenseMatrix","concat"],ore=I(are,ire,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=B2({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!yn(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}),we=O9({config:fe}),Ot=z9({}),Lb=OX({BigNumber:we,config:fe}),sre=SX({}),ure=lee({BigNumber:we,config:fe}),Ni=U9({}),fD=RX({Complex:Ot}),lre=MX({BigNumber:we,config:fe}),cre=_X({BigNumber:we,config:fe}),fre=zX({BigNumber:we,config:fe}),Ic=Q9({}),mre=FX({BigNumber:we,config:fe}),dre=TX({}),hre=$X({BigNumber:we,config:fe}),pre=K9({}),mD=I8({}),gre=jX({BigNumber:we,config:fe}),vre=Tee({BigNumber:we,config:fe}),dD=kX({BigNumber:we,config:fe}),yre=EX({}),bre=LX({}),rt=hI({Matrix:Ic,config:fe}),wre=yee({BigNumber:we,config:fe}),xre=BX({BigNumber:we,config:fe}),id=PX({BigNumber:we,config:fe}),hD=AX({}),Dre=qX({BigNumber:we,config:fe}),W=O8({BigNumber:we,Complex:Ot,DenseMatrix:rt,Fraction:Ni}),Nre=vee({BigNumber:we,config:fe}),en=O7({typed:W}),Are=cH({Complex:Ot,config:fe,typed:W}),Cre=hH({BigNumber:we,typed:W}),Ere=yH({BigNumber:we,Complex:Ot,config:fe,typed:W}),dr=I7({typed:W}),Sre=Aj({typed:W}),Tre=AH({BigNumber:we,Complex:Ot,config:fe,typed:W}),Mre=MH({typed:W}),pD=kH({typed:W}),Fre=_H({Complex:Ot,config:fe,typed:W}),Pre=a7({typed:W}),kre=vj({typed:W}),Ore=u7({typed:W}),$re=gI({typed:W}),zc=XZ({typed:W}),jc=h7({Complex:Ot,typed:W}),so=Ej({typed:W}),Gd=zH({typed:W}),Bre=LH({BigNumber:we,typed:W}),_re=UH({BigNumber:we,typed:W}),Ire=X7({typed:W}),st=WI({config:fe,typed:W}),zre=Uq({typed:W}),gD=tz({typed:W}),jre=nz({Complex:Ot,typed:W}),qre=q2({typed:W}),uo=Jj({typed:W}),Rre=R2({typed:W}),cu=nR({typed:W}),Vd=Qj({typed:W}),Lre=lR({format:cu,typed:W}),Ud=Tj({typed:W}),fu=qI({typed:W}),za=zI({typed:W}),lo=FI({typed:W}),Hre=gR({typed:W}),Gre=IX({BigNumber:we,config:fe}),Vre=iQ({Complex:Ot,typed:W}),Ure=Iz({Complex:Ot,config:fe,typed:W}),Wd=jz({Complex:Ot,config:fe,typed:W}),Ai=L2({typed:W}),Wre=Xq({isNaN:za,isNumeric:lo,typed:W}),er=Lz({typed:W}),vc=kj({typed:W}),pa=t7({typed:W}),Jre=sR({format:cu,typed:W}),Kre=BQ({config:fe,typed:W}),Yre=K2({typed:W}),Zre=IQ({config:fe,typed:W}),Jd=Fj({typed:W}),Qre=YH({BigNumber:we,typed:W}),vD=Jz({BigNumber:we,Fraction:Ni,complex:jc,typed:W}),qc=eG({typed:W}),hr=xq({typed:W}),pr=YI({Matrix:Ic,equalScalar:st,typed:W}),Xre=S7({typed:W}),ene=Xz({typed:W}),tne=o7({typed:W}),zn=j7({typed:W}),rne=aG({typed:W}),nne=hR({typed:W}),Kd=GI({typed:W}),ane=mH({Complex:Ot,config:fe,typed:W}),ine=wH({BigNumber:we,typed:W}),one=DH({BigNumber:we,Complex:Ot,config:fe,typed:W}),un=f7({BigNumber:we,typed:W}),sne=tQ({typed:W}),une=qH({typed:W}),lne=JH({BigNumber:we,typed:W}),Rc=BG({addScalar:dr,conj:so,multiplyScalar:er,size:hr,typed:W}),cne=kI({isNumeric:lo,typed:W}),fne=LI({isBounded:fu,map:Ai,typed:W}),Ci=TI({config:fe,typed:W}),jn=_I({equalScalar:st,typed:W}),be=b7({DenseMatrix:rt,Matrix:Ic,SparseMatrix:pr,typed:W}),mne=x7({isZero:jn,matrix:be,typed:W}),Nt=Gz({addScalar:dr,dot:Rc,equalScalar:st,matrix:be,multiplyScalar:er,typed:W}),dne=sq({BigNumber:we,config:fe,matrix:be,typed:W}),hne=jQ({config:fe,log2:Wd,typed:W}),pne=hq({config:fe,matrix:be}),gne=QH({BigNumber:we,typed:W}),vne=rG({typed:W}),yne=oH({SparseMatrix:pr,typed:W}),na=Zz({Complex:Ot,config:fe,typed:W}),bne=Nq({typed:W}),wne=sG({typed:W}),mu=Mq({matrix:be,typed:W}),yD=nj({BigNumber:we,config:fe,matrix:be,typed:W}),Fr=Oq({BigNumber:we,config:fe,matrix:be,typed:W}),xne=gH({BigNumber:we,Complex:Ot,config:fe,typed:W}),Dne=EH({Complex:Ot,config:fe,typed:W}),Nne=iR({format:cu,typed:W}),Ane=GH({BigNumber:we,typed:W}),Yd=Pq({conj:so,transpose:mu,typed:W}),bD=Gj({DenseMatrix:rt,SparseMatrix:pr,matrix:be,typed:W}),tn=fL({DenseMatrix:rt,SparseMatrix:pr,equalScalar:st,matrix:be,typed:W}),du=v7({Fraction:Ni,typed:W}),Ei=eq({BigNumber:we,DenseMatrix:rt,SparseMatrix:pr,config:fe,matrix:be,typed:W}),Kr=yI({equal:tn,typed:W}),Cne=rq({matrix:be,multiplyScalar:er,typed:W}),Ys=Zm({isInteger:Kr,typed:W}),Zd=C7({flatten:uo,matrix:be,size:hr,typed:W}),Bn=bR({bignumber:un,fraction:du,number:pa}),wD=tR({config:fe,multiplyScalar:er,numeric:Bn,typed:W}),xD=fq({isInteger:Kr,matrix:be,typed:W}),ls=CR({BigNumber:we,DenseMatrix:rt,config:fe,equalScalar:st,matrix:be,typed:W,zeros:Fr}),ga=M7({typed:W}),Ene=ZZ({BigNumber:we,Fraction:Ni,config:fe,isInteger:Kr,number:pa,typed:W}),DD=R7({BigNumber:we,Complex:Ot,Fraction:Ni,config:fe,isNegative:Ci,matrix:be,typed:W,unaryMinus:ga}),pt=z2({isInteger:Kr,matrix:be,typed:W}),Sne=qj({prod:wD,size:hr,typed:W}),hu=TL({equal:tn,typed:W}),Jt=xR({numeric:Bn,typed:W}),Tne=lj({concat:pt,equalScalar:st,matrix:be,multiplyScalar:er,typed:W}),ND=F2({DenseMatrix:rt,config:fe,equalScalar:st,matrix:be,round:ls,typed:W,zeros:Fr}),Mne=Fz({BigNumber:we,DenseMatrix:rt,concat:pt,config:fe,equalScalar:st,matrix:be,round:ls,typed:W,zeros:Fr}),co=$I({config:fe,typed:W}),Yr=DL({DenseMatrix:rt,SparseMatrix:pr,bignumber:un,concat:pt,config:fe,matrix:be,typed:W}),Fne=$z({concat:pt,equalScalar:st,matrix:be,typed:W}),Pne=JR({DenseMatrix:rt,concat:pt,equalScalar:st,matrix:be,typed:W,zeros:Fr}),AD=zR({DenseMatrix:rt,divideScalar:Jt,equalScalar:st,matrix:be,multiplyScalar:er,subtractScalar:zn,typed:W}),Qd=Z2({config:fe,isNaN:za,larger:Yr,numeric:Bn,typed:W}),CD=k2({DenseMatrix:rt,concat:pt,config:fe,equalScalar:st,matrix:be,round:ls,typed:W,zeros:Fr}),kne=Uz({BigNumber:we,concat:pt,equalScalar:st,matrix:be,typed:W}),One=_2({deepEqual:hu,flatten:uo,matrix:be,size:hr,typed:W}),$ne=I2({DenseMatrix:rt,concat:pt,equalScalar:st,matrix:be,typed:W}),Xd=LV({addScalar:dr,complex:jc,conj:so,divideScalar:Jt,equal:tn,identity:Ei,isZero:jn,matrix:be,multiplyScalar:er,sign:vD,sqrt:na,subtractScalar:zn,typed:W,unaryMinus:ga,zeros:Fr}),Bne=YR({DenseMatrix:rt,concat:pt,equalScalar:st,matrix:be,typed:W,zeros:Fr}),Zr=gL({DenseMatrix:rt,SparseMatrix:pr,bignumber:un,concat:pt,config:fe,matrix:be,typed:W}),ar=tj({DenseMatrix:rt,concat:pt,equalScalar:st,matrix:be,subtractScalar:zn,typed:W,unaryMinus:ga}),_ne=mR({concat:pt,matrix:be,typed:W}),eh=P7({config:fe,numeric:Bn,typed:W}),th=qR({DenseMatrix:rt,divideScalar:Jt,equalScalar:st,matrix:be,multiplyScalar:er,subtractScalar:zn,typed:W}),Ine=_j({DenseMatrix:rt,SparseMatrix:pr,concat:pt,matrix:be,typed:W}),ft=MG({DenseMatrix:rt,SparseMatrix:pr,addScalar:dr,concat:pt,equalScalar:st,matrix:be,typed:W}),zne=$H({BigNumber:we,DenseMatrix:rt,concat:pt,equalScalar:st,matrix:be,typed:W}),jne=$2({concat:pt,equalScalar:st,matrix:be,typed:W}),qne=B2({DenseMatrix:rt,concat:pt,equalScalar:st,matrix:be,typed:W}),Rne=Dj({DenseMatrix:rt,SparseMatrix:pr,concat:pt,matrix:be,typed:W}),Lne=VQ({addScalar:dr,combinations:zc,divideScalar:Jt,isInteger:Kr,isNegative:Ci,multiplyScalar:er,typed:W}),fo=tL({BigNumber:we,DenseMatrix:rt,Fraction:Ni,concat:pt,config:fe,equalScalar:st,matrix:be,typed:W}),ED=lL({concat:pt,matrix:be,typed:W}),Hne=WQ({addScalar:dr,combinations:zc,isInteger:Kr,isNegative:Ci,isPositive:co,larger:Yr,typed:W}),Gne=Lj({matrix:be,multiply:Nt,subtract:ar,typed:W}),SD=cZ({divideScalar:Jt,isZero:jn,matrix:be,multiply:Nt,subtractScalar:zn,typed:W,unaryMinus:ga}),Vne=H2({matrix:be,number:pa,subtract:ar,typed:W}),Une=$Z({abs:en,addScalar:dr,deepEqual:hu,divideScalar:Jt,multiplyScalar:er,sqrt:na,subtractScalar:zn,typed:W}),pu=_R({DenseMatrix:rt,SparseMatrix:pr,concat:pt,divideScalar:Jt,equalScalar:st,matrix:be,typed:W}),Wne=hL({compareText:ED,isZero:jn,typed:W}),TD=UL({larger:Yr,smaller:Zr}),Jne=PG({abs:en,addScalar:dr,divideScalar:Jt,isPositive:co,multiplyScalar:er,smaller:Zr,sqrt:na,typed:W}),MD=qL({DenseMatrix:rt,smaller:Zr}),zr=HL({ImmutableDenseMatrix:MD,getMatrixDataType:Vd}),Kne=IZ({abs:en,add:ft,addScalar:dr,config:fe,divideScalar:Jt,equalScalar:st,flatten:uo,isNumeric:lo,isZero:jn,matrix:be,multiply:Nt,multiplyScalar:er,smaller:Zr,subtract:ar,typed:W}),Yne=ij({BigNumber:we,add:ft,config:fe,equal:tn,isInteger:Kr,mod:CD,smaller:Zr,typed:W,xgcd:yD}),Lc=CL({DenseMatrix:rt,SparseMatrix:pr,concat:pt,config:fe,matrix:be,typed:W}),rh=TR({Complex:Ot,config:fe,divideScalar:Jt,typeOf:Kd,typed:W}),Zne=LR({DenseMatrix:rt,divideScalar:Jt,equalScalar:st,matrix:be,multiplyScalar:er,subtractScalar:zn,typed:W}),Qne=N7({flatten:uo,matrix:be,size:hr,typed:W}),Xne=Q2({config:fe,isNaN:za,numeric:Bn,smaller:Zr,typed:W}),eae=kR({Complex:Ot,config:fe,divideScalar:Jt,typed:W}),Hc=OL({compare:fo,isNaN:za,isNumeric:lo,typed:W}),tae=QR({DenseMatrix:rt,concat:pt,equalScalar:st,matrix:be,typed:W,zeros:Fr}),FD=mU({SparseMatrix:pr,abs:en,add:ft,divideScalar:Jt,larger:Yr,largerEq:Lc,multiply:Nt,subtract:ar,transpose:mu,typed:W}),PD=KL({FibonacciHeap:TD,addScalar:dr,equalScalar:st}),xn=W2({add:ft,matrix:be,typed:W,zeros:Fr}),nh=aD({add:ft,config:fe,numeric:Bn,typed:W}),rae=zG({add:ft,matrix:be,typed:W}),kD=GR({DenseMatrix:rt,divideScalar:Jt,equalScalar:st,matrix:be,multiplyScalar:er,subtractScalar:zn,typed:W}),nae=gX({Complex:Ot,add:ft,multiply:Nt,number:pa,typed:W}),ah=Z7({DenseMatrix:rt,config:fe,equalScalar:st,matrix:be,round:ls,typed:W,zeros:Fr}),va=oL({compare:fo,typed:W}),aae=iD({add:ft,typed:W,unaryPlus:eh}),OD=oz({Complex:Ot,DenseMatrix:rt,ceil:ah,equalScalar:st,floor:ND,matrix:be,typed:W,zeros:Fr}),$D=qG({Index:zr,typed:W}),mo=mZ({abs:en,addScalar:dr,det:SD,divideScalar:Jt,identity:Ei,matrix:be,multiply:Nt,typed:W,unaryMinus:ga}),iae=FR({Complex:Ot,config:fe,divideScalar:Jt,log:rh,typed:W}),BD=qV({DenseMatrix:rt,Spa:PD,SparseMatrix:pr,abs:en,addScalar:dr,divideScalar:Jt,equalScalar:st,larger:Yr,matrix:be,multiplyScalar:er,subtractScalar:zn,typed:W,unaryMinus:ga}),oae=hZ({Complex:Ot,add:ft,ctranspose:Yd,deepEqual:hu,divideScalar:Jt,dot:Rc,dotDivide:pu,equal:tn,inv:mo,matrix:be,multiply:Nt,typed:W}),aa=NR({Complex:Ot,config:fe,fraction:du,identity:Ei,inv:mo,matrix:be,multiply:Nt,number:pa,typed:W}),sae=lG({DenseMatrix:rt,Index:zr,compareNatural:va,size:hr,subset:xn,typed:W}),uae=dG({DenseMatrix:rt,Index:zr,compareNatural:va,size:hr,subset:xn,typed:W}),lae=vG({Index:zr,compareNatural:va,size:hr,subset:xn,typed:W}),cae=xG({Index:zr,compareNatural:va,size:hr,subset:xn,typed:W}),Xo=bL({DenseMatrix:rt,SparseMatrix:pr,concat:pt,config:fe,matrix:be,typed:W}),fae=BL({compare:fo,compareNatural:va,matrix:be,typed:W}),mae=NZ({abs:en,add:ft,identity:Ei,inv:mo,map:Ai,max:Qd,multiply:Nt,size:hr,sqrt:na,subtract:ar,typed:W}),dae=FL({DenseMatrix:rt,SparseMatrix:pr,concat:pt,config:fe,equalScalar:st,matrix:be,typed:W}),hae=Y2({concat:pt,equalScalar:st,matrix:be,not:vc,typed:W,zeros:Fr}),Pr=kZ({divideScalar:Jt,equalScalar:st,inv:mo,matrix:be,multiply:Nt,typed:W}),pae=xZ({abs:en,add:ft,identity:Ei,inv:mo,multiply:Nt,typed:W}),_D=Bq({addScalar:dr,ceil:ah,conj:so,divideScalar:Jt,dotDivide:pu,exp:gD,i:fD,log2:Wd,matrix:be,multiplyScalar:er,pow:aa,tau:dD,typed:W}),gae=yX({Complex:Ot,add:ft,divide:Pr,matrix:be,multiply:Nt,typed:W}),ih=nQ({BigNumber:we,Complex:Ot,config:fe,multiplyScalar:er,pow:aa,typed:W}),vae=Iq({conj:so,dotDivide:pu,fft:_D,typed:W}),yae=lQ({divide:Pr,dotDivide:pu,isNumeric:lo,log:rh,map:Ai,matrix:be,multiply:Nt,sum:nh,typed:W}),ID=hU({DenseMatrix:rt,lsolve:AD,lup:BD,matrix:be,slu:FD,typed:W,usolve:th}),zD=oD({add:ft,divide:Pr,typed:W}),jD=LZ({add:ft,compare:fo,divide:Pr,partitionSelect:Hc,typed:W}),bae=gU({add:ft,cbrt:DD,divide:Pr,equalScalar:st,im:Ud,isZero:jn,multiply:Nt,re:Jd,sqrt:na,subtract:ar,typeOf:Kd,typed:W,unaryMinus:ga}),wae=uD({bignumber:un,add:ft,compare:fo,divide:Pr,isInteger:Kr,larger:Yr,mapSlices:Ys,multiply:Nt,partitionSelect:Hc,smaller:Zr,smallerEq:Xo,subtract:ar,typed:W}),es=V2({bignumber:un,matrix:be,add:ft,config:fe,equal:tn,isPositive:co,isZero:jn,larger:Yr,largerEq:Lc,smaller:Zr,smallerEq:Xo,typed:W}),xae=U2({Index:zr,matrix:be,range:es,typed:W}),qD=fG({DenseMatrix:rt,Index:zr,compareNatural:va,size:hr,subset:xn,typed:W}),Dae=bG({Index:zr,compareNatural:va,size:hr,subset:xn,typed:W}),RD=CG({Index:zr,concat:pt,setDifference:qD,size:hr,subset:xn,typed:W}),Nae=Hq({abs:en,add:ft,bignumber:un,divide:Pr,isNegative:Ci,isPositive:co,larger:Yr,map:Ai,matrix:be,max:Qd,multiply:Nt,smaller:Zr,subtract:ar,typed:W,unaryMinus:ga}),He=rH({BigNumber:we,Complex:Ot,Fraction:Ni,abs:en,addScalar:dr,config:fe,divideScalar:Jt,equal:tn,fix:OD,format:cu,isNumeric:lo,multiplyScalar:er,number:pa,pow:aa,round:ls,subtractScalar:zn}),Aae=KX({BigNumber:we,Unit:He,config:fe}),Cae=bee({BigNumber:we,Unit:He,config:fe}),Eae=XX({BigNumber:we,Unit:He,config:fe}),Sae=xee({BigNumber:we,Unit:He,config:fe}),LD=j2({Index:zr,matrix:be,range:es,typed:W}),Tae=eee({BigNumber:we,Unit:He,config:fe}),Mae=YX({BigNumber:we,Unit:He,config:fe}),Fae=uH({Unit:He,typed:W}),Pae=mee({BigNumber:we,Unit:He,config:fe}),HD=bZ({abs:en,add:ft,addScalar:dr,atan:pD,bignumber:un,column:LD,complex:jc,config:fe,cos:Gd,diag:bD,divideScalar:Jt,dot:Rc,equal:tn,flatten:uo,im:Ud,inv:mo,larger:Yr,matrix:be,matrixFromColumns:Zd,multiply:Nt,multiplyScalar:er,number:pa,qr:Xd,re:Jd,reshape:xD,sin:qc,size:hr,smaller:Zr,sqrt:na,subtract:ar,typed:W,usolve:th,usolveAll:kD}),kae=see({BigNumber:we,Unit:He,config:fe}),gu=sQ({gamma:ih,typed:W}),Oae=uee({BigNumber:we,Unit:He,config:fe}),$ae=Cee({BigNumber:we,Unit:He,config:fe}),Bae=$ee({BigNumber:we,Unit:He,config:fe}),_ae=aee({BigNumber:we,Unit:He,config:fe}),Iae=Aee({BigNumber:we,Unit:He,config:fe}),zae=GZ({abs:en,map:Ai,median:jD,subtract:ar,typed:W}),jae=ree({BigNumber:we,Unit:He,config:fe}),qae=kee({BigNumber:we,Unit:He,config:fe}),Rae=Eee({BigNumber:we,Unit:He,config:fe}),Lae=fQ({add:ft,divide:Pr,factorial:gu,isInteger:Kr,isPositive:co,multiply:Nt,typed:W}),oh=OG({abs:en,add:ft,conj:so,ctranspose:Yd,eigs:HD,equalScalar:st,larger:Yr,matrix:be,multiply:Nt,pow:aa,smaller:Zr,sqrt:na,typed:W}),Hae=dQ({factorial:gu,typed:W}),Gae=VX({BigNumber:we,Unit:He,config:fe}),Vae=_ee({BigNumber:we,Unit:He,config:fe}),Uae=Iee({BigNumber:we,Unit:He,config:fe}),Wae=UX({BigNumber:we,Unit:He,config:fe}),GD=yq({BigNumber:we,DenseMatrix:rt,SparseMatrix:pr,addScalar:dr,config:fe,cos:Gd,matrix:be,multiplyScalar:er,norm:oh,sin:qc,typed:W,unaryMinus:ga}),Jae=pee({BigNumber:we,Unit:He,config:fe}),Kae=Mee({BigNumber:we,Unit:He,config:fe}),Yae=NG({compareNatural:va,typed:W}),Zae=HX({BigNumber:we,Unit:He,config:fe}),Qae=Fee({BigNumber:we,Unit:He,config:fe}),Xae=gee({BigNumber:we,Unit:He,config:fe}),sh=sD({add:ft,divide:Pr,isNaN:za,mapSlices:Ys,multiply:Nt,subtract:ar,typed:W}),eie=Zq({BigNumber:we,Complex:Ot,add:ft,config:fe,divide:Pr,equal:tn,factorial:gu,gamma:ih,isBounded:fu,isNegative:Ci,multiply:Nt,pi:id,pow:aa,sin:qc,smallerEq:Xo,subtract:ar,typed:W}),tie=wee({BigNumber:we,Unit:He,config:fe}),rie=iee({BigNumber:we,Unit:He,config:fe}),nie=KZ({add:ft,divide:Pr,matrix:be,mean:zD,multiply:Nt,pow:aa,sqrt:na,subtract:ar,sum:nh,typed:W}),aie=$R({DenseMatrix:rt,SparseMatrix:pr,concat:pt,equalScalar:st,matrix:be,pow:aa,typed:W}),iie=QX({BigNumber:we,Unit:He,config:fe}),oie=Dee({BigNumber:we,Unit:He,config:fe}),sie=cee({BigNumber:we,Unit:He,config:fe}),uie=tee({BigNumber:we,Unit:He,config:fe}),lie=WX({BigNumber:we,Unit:He,config:fe}),cie=Oee({BigNumber:we,Unit:He,config:fe}),fie=dee({BigNumber:we,Unit:He,config:fe}),mie=zee({BigNumber:we,Unit:He,config:fe}),die=jee({BigNumber:we,Unit:He,config:fe}),hie=hee({BigNumber:we,Unit:He,config:fe}),VD=pG({DenseMatrix:rt,Index:zr,compareNatural:va,size:hr,subset:xn,typed:W}),pie=lD({map:Ai,sqrt:na,typed:W,variance:sh}),UD=RQ({bignumber:un,addScalar:dr,combinations:zc,divideScalar:Jt,factorial:gu,isInteger:Kr,isNegative:Ci,larger:Yr,multiplyScalar:er,number:pa,pow:aa,subtractScalar:zn,typed:W}),gie=aH({Unit:He,typed:W}),vie=HQ({addScalar:dr,isInteger:Kr,isNegative:Ci,stirlingS2:UD,typed:W}),yie=JX({BigNumber:we,Unit:He,config:fe}),bie=Nee({BigNumber:we,Unit:He,config:fe}),wie=nee({BigNumber:we,Unit:He,config:fe}),xie=Bee({BigNumber:we,Unit:He,config:fe}),Die=gq({multiply:Nt,rotationMatrix:GD,typed:W}),Nie=SG({Index:zr,concat:pt,setIntersect:VD,setSymDifference:RD,size:hr,subset:xn,typed:W}),Aie=Pee({BigNumber:we,Unit:He,config:fe}),Cie=oee({BigNumber:we,Unit:He,config:fe}),Eie=See({BigNumber:we,Unit:He,config:fe}),WD=SZ({identity:Ei,matrix:be,multiply:Nt,norm:oh,qr:Xd,subtract:ar,typed:W}),Sie=ZX({BigNumber:we,Unit:He,config:fe}),Tie=GX({BigNumber:we,Unit:He,config:fe}),Mie=fee({BigNumber:we,Unit:He,config:fe}),JD=CZ({abs:en,add:ft,concat:pt,identity:Ei,index:$D,lusolve:ID,matrix:be,matrixFromColumns:Zd,multiply:Nt,range:es,schur:WD,subset:xn,subtract:ar,transpose:mu,typed:W}),Fie=MZ({matrix:be,multiply:Nt,sylvester:JD,transpose:mu,typed:W}),cs={},vu={},KD={},Lr=HG({mathWithTransform:vu}),fs=dV({Node:Lr}),Wa=pV({Node:Lr}),ho=vV({Node:Lr}),YD=xV({Node:Lr}),ms=WG({Node:Lr}),ZD=XG({Node:Lr,ResultSet:mD}),QD=tV({Node:Lr}),XD=bV({Node:Lr}),Pie=xX({classes:KD}),uh=DU({math:cs,typed:W}),eN=lV({Node:Lr,typed:W}),kie=uZ({Chain:uh,typed:W}),Si=sV({Node:Lr,isBounded:fu}),ds=fV({Node:Lr,size:hr}),hs=VG({Node:Lr,subset:xn}),tN=ZG({matrix:be,Node:Lr,subset:xn}),Ti=AV({Unit:He,Node:Lr,math:cs}),Mi=EV({Node:Lr,SymbolNode:Ti,math:cs}),ia=TV({AccessorNode:hs,ArrayNode:ms,AssignmentNode:tN,BlockNode:ZD,ConditionalNode:QD,ConstantNode:Si,FunctionAssignmentNode:eN,FunctionNode:Mi,IndexNode:ds,ObjectNode:fs,OperatorNode:Wa,ParenthesisNode:ho,RangeNode:XD,RelationalNode:YD,SymbolNode:Ti,config:fe,numeric:Bn,typed:W}),rN=uX({ConstantNode:Si,FunctionNode:Mi,OperatorNode:Wa,ParenthesisNode:ho,parse:ia,typed:W}),lh=nX({bignumber:un,fraction:du,AccessorNode:hs,ArrayNode:ms,ConstantNode:Si,FunctionNode:Mi,IndexNode:ds,ObjectNode:fs,OperatorNode:Wa,SymbolNode:Ti,config:fe,isBounded:fu,mathWithTransform:vu,matrix:be,typed:W}),Oie=FV({parse:ia,typed:W}),$ie=KQ({parse:ia,typed:W}),ch=iX({AccessorNode:hs,ArrayNode:ms,ConstantNode:Si,FunctionNode:Mi,IndexNode:ds,ObjectNode:fs,OperatorNode:Wa,ParenthesisNode:ho,SymbolNode:Ti,add:ft,divide:Pr,equal:tn,isZero:jn,multiply:Nt,parse:ia,pow:aa,subtract:ar,typed:W}),Gc=kV({parse:ia,typed:W}),nN=bU({evaluate:Gc}),aN=BV({evaluate:Gc,parse:ia}),Bie=zV({Parser:aN,typed:W}),Vc=eX({AccessorNode:hs,ArrayNode:ms,ConstantNode:Si,FunctionNode:Mi,IndexNode:ds,ObjectNode:fs,OperatorNode:Wa,ParenthesisNode:ho,SymbolNode:Ti,equal:tn,parse:ia,replacer:hD,resolve:rN,simplifyConstant:lh,simplifyCore:ch,typed:W}),_ie=cX({OperatorNode:Wa,parse:ia,simplify:Vc,typed:W}),Iie=mX({ConstantNode:Si,FunctionNode:Mi,OperatorNode:Wa,ParenthesisNode:ho,SymbolNode:Ti,config:fe,equal:tn,isZero:jn,numeric:Bn,parse:ia,simplify:Vc,typed:W}),zie=oZ({Help:nN,mathWithTransform:vu,typed:W}),jie=hX({bignumber:un,fraction:du,AccessorNode:hs,ArrayNode:ms,ConstantNode:Si,FunctionNode:Mi,IndexNode:ds,ObjectNode:fs,OperatorNode:Wa,ParenthesisNode:ho,SymbolNode:Ti,add:ft,config:fe,divide:Pr,equal:tn,isZero:jn,mathWithTransform:vu,matrix:be,multiply:Nt,parse:ia,pow:aa,simplify:Vc,simplifyConstant:lh,simplifyCore:ch,subtract:ar,typed:W});rr(cs,{e:Lb,false:sre,fineStructure:ure,i:fD,Infinity:lre,LN10:cre,LOG10E:fre,NaN:mre,null:dre,phi:hre,SQRT1_2:gre,sackurTetrode:vre,tau:dD,true:yre,E:Lb,version:bre,efimovFactor:wre,LN2:xre,pi:id,replacer:hD,reviver:Pie,SQRT2:Dre,typed:W,PI:id,weakMixingAngle:Nre,abs:en,acos:Are,acot:Cre,acsc:Ere,addScalar:dr,arg:Sre,asech:Tre,asinh:Mre,atan:pD,atanh:Fre,bigint:Pre,bitNot:kre,boolean:Ore,clone:$re,combinations:zc,complex:jc,conj:so,cos:Gd,cot:Bre,csc:_re,cube:Ire,equalScalar:st,erf:zre,exp:gD,expm1:jre,filter:qre,flatten:uo,forEach:Rre,format:cu,getMatrixDataType:Vd,hex:Lre,im:Ud,isBounded:fu,isNaN:za,isNumeric:lo,isPrime:Hre,LOG2E:Gre,lgamma:Vre,log10:Ure,log2:Wd,map:Ai,mode:Wre,multiplyScalar:er,not:vc,number:pa,oct:Jre,pickRandom:Kre,print:Yre,random:Zre,re:Jd,sec:Qre,sign:vD,sin:qc,size:hr,splitUnit:Xre,square:ene,string:tne,subtractScalar:zn,tan:rne,toBest:nne,typeOf:Kd,acosh:ane,acsch:ine,asec:one,bignumber:un,chain:kie,combinationsWithRep:sne,cosh:une,csch:lne,dot:Rc,hasNumericValue:cne,isFinite:fne,isNegative:Ci,isZero:jn,matrix:be,matrixFromFunction:mne,multiply:Nt,ones:dne,randomInt:hne,resize:pne,sech:gne,sinh:vne,sparse:yne,sqrt:na,squeeze:bne,tanh:wne,transpose:mu,xgcd:yD,zeros:Fr,acoth:xne,asin:Dne,bin:Nne,coth:Ane,ctranspose:Yd,diag:bD,equal:tn,fraction:du,identity:Ei,isInteger:Kr,kron:Cne,mapSlices:Ys,matrixFromColumns:Zd,numeric:Bn,prod:wD,reshape:xD,round:ls,unaryMinus:ga,bernoulli:Ene,cbrt:DD,concat:pt,count:Sne,deepEqual:hu,divideScalar:Jt,dotMultiply:Tne,floor:ND,gcd:Mne,isPositive:co,larger:Yr,lcm:Fne,leftShift:Pne,lsolve:AD,max:Qd,mod:CD,nthRoot:kne,nullish:One,or:$ne,qr:Xd,rightArithShift:Bne,smaller:Zr,subtract:ar,to:_ne,unaryPlus:eh,usolve:th,xor:Ine,add:ft,atan2:zne,bitAnd:jne,bitOr:qne,bitXor:Rne,catalan:Lne,compare:fo,compareText:ED,composition:Hne,cross:Gne,det:SD,diff:Vne,distance:Une,dotDivide:pu,equalText:Wne,hypot:Jne,intersect:Kne,invmod:Yne,largerEq:Lc,log:rh,lsolveAll:Zne,matrixFromRows:Qne,min:Xne,nthRoots:eae,partitionSelect:Hc,rightLogShift:tae,slu:FD,subset:xn,sum:nh,trace:rae,usolveAll:kD,zpk2tf:nae,ceil:ah,compareNatural:va,cumsum:aae,fix:OD,index:$D,inv:mo,log1p:iae,lup:BD,pinv:oae,pow:aa,setCartesian:sae,setDistinct:uae,setIsSubset:lae,setPowerset:cae,smallerEq:Xo,sort:fae,sqrtm:mae,unequal:dae,and:hae,divide:Pr,expm:pae,fft:_D,freqz:gae,gamma:ih,ifft:vae,kldivergence:yae,lusolve:ID,mean:zD,median:jD,polynomialRoot:bae,quantileSeq:wae,range:es,row:xae,setDifference:qD,setMultiplicity:Dae,setSymDifference:RD,solveODE:Nae,vacuumImpedance:Aae,atomicMass:Cae,bohrMagneton:Eae,boltzmann:Sae,column:LD,conductanceQuantum:Tae,coulomb:Mae,createUnit:Fae,deuteronMass:Pae,eigs:HD,electronMass:kae,factorial:gu,fermiCoupling:Oae,gasConstant:$ae,gravity:Bae,klitzing:_ae,loschmidt:Iae,mad:zae,magneticFluxQuantum:jae,molarMass:qae,molarPlanckConstant:Rae,multinomial:Lae,norm:oh,permutations:Hae,planckConstant:Gae,planckMass:Vae,planckTime:Uae,reducedPlanckConstant:Wae,rotationMatrix:GD,rydberg:Jae,secondRadiation:Kae,setSize:Yae,speedOfLight:Zae,stefanBoltzmann:Qae,thomsonCrossSection:Xae,variance:sh,zeta:eie,avogadro:tie,bohrRadius:rie,corr:nie,dotPow:aie,elementaryCharge:iie,faraday:oie,hartreeEnergy:sie,inverseConductanceQuantum:uie,magneticConstant:lie,molarMassC12:cie,neutronMass:fie,parse:ia,planckCharge:mie,planckTemperature:die,quantumOfCirculation:hie,resolve:rN,setIntersect:VD,simplifyConstant:lh,std:pie,stirlingS2:UD,unit:gie,bellNumbers:vie,compile:Oie,electricConstant:yie,firstRadiation:bie,leafCount:$ie,nuclearMagneton:wie,planckLength:xie,rotate:Die,setUnion:Nie,simplifyCore:ch,wienDisplacement:Aie,classicalElectronRadius:Cie,evaluate:Gc,molarVolume:Eie,schur:WD,coulombConstant:Sie,gravitationConstant:Tie,parser:Bie,simplify:Vc,symbolicEqual:_ie,derivative:Iie,protonMass:Mie,sylvester:JD,help:zie,rationalize:jie,lyap:Fie,config:fe});rr(vu,cs,{map:ote({typed:W}),filter:Zee({typed:W}),forEach:ete({typed:W}),mapSlices:Hee({isInteger:Kr,typed:W}),and:Jte({add:ft,concat:pt,equalScalar:st,matrix:be,not:vc,typed:W,zeros:Fr}),cumsum:Rte({add:ft,typed:W,unaryPlus:eh}),nullish:ere({deepEqual:hu,flatten:uo,matrix:be,size:hr,typed:W}),print:Vte({add:ft,matrix:be,typed:W,zeros:Fr}),bitAnd:nre({add:ft,concat:pt,equalScalar:st,matrix:be,not:vc,typed:W,zeros:Fr}),concat:Mte({isInteger:Kr,matrix:be,typed:W}),diff:Pte({bignumber:un,matrix:be,number:pa,subtract:ar,typed:W}),max:fte({config:fe,isNaN:za,larger:Yr,numeric:Bn,typed:W}),min:vte({config:fe,isNaN:za,numeric:Bn,smaller:Zr,typed:W}),or:Zte({DenseMatrix:rt,concat:pt,equalScalar:st,matrix:be,typed:W}),subset:Ete({add:ft,matrix:be,typed:W,zeros:Fr}),bitOr:ore({DenseMatrix:rt,concat:pt,equalScalar:st,matrix:be,typed:W}),sum:_te({add:ft,config:fe,numeric:Bn,typed:W}),variance:Hte({add:ft,divide:Pr,isNaN:za,mapSlices:Ys,multiply:Nt,subtract:ar,typed:W}),index:nte({Index:zr,getMatrixDataType:Vd}),quantileSeq:jte({add:ft,bignumber:un,compare:fo,divide:Pr,isInteger:Kr,larger:Yr,mapSlices:Ys,multiply:Nt,partitionSelect:Hc,smaller:Zr,smallerEq:Xo,subtract:ar,typed:W}),range:wte({bignumber:un,matrix:be,add:ft,config:fe,equal:tn,isPositive:co,isZero:jn,larger:Yr,largerEq:Lc,smaller:Zr,smallerEq:Xo,typed:W}),column:Uee({Index:zr,matrix:be,range:es,typed:W}),row:Nte({Index:zr,matrix:be,range:es,typed:W}),mean:hte({add:ft,divide:Pr,typed:W}),std:$te({map:Ai,sqrt:na,typed:W,variance:sh})});rr(KD,{BigNumber:we,Complex:Ot,Fraction:Ni,Matrix:Ic,Node:Lr,ObjectNode:fs,OperatorNode:Wa,ParenthesisNode:ho,Range:pre,RelationalNode:YD,ResultSet:mD,ArrayNode:ms,BlockNode:ZD,ConditionalNode:QD,DenseMatrix:rt,RangeNode:XD,Chain:uh,FunctionAssignmentNode:eN,SparseMatrix:pr,ConstantNode:Si,IndexNode:ds,FibonacciHeap:TD,ImmutableDenseMatrix:MD,Index:zr,Spa:PD,AccessorNode:hs,AssignmentNode:tN,Unit:He,SymbolNode:Ti,FunctionNode:Mi,Help:nN,Parser:aN});uh.createProxy(cs);const fh=({ref:e,onChange:t,value:r,dragDirection:n,showDragHandle:a=!0,dragScale:i,selectOnFocus:o=!0,bounds:s=Be.bounds.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]=sn.useCombinedStateAndRef(r.toString()),[b,C,N]=sn.useCombinedStateAndRef(!0),A=sn.useSyncedRef(r),E=fr.useCallback(()=>{if(N.current)return;C(!0);let T=null;try{const B=Gc(g.current);B instanceof He?T=B.toNumber():typeof B=="number"&&!isNaN(B)&&(T=B)}catch{T=null}T!=null?t?.(Be.bounds.clamp(s,T)):x(A.current.toString())},[t,x]),S=sn.useSyncedRef(E),F=fr.useCallback(()=>{d?.(),E()},[d,E]);fr.useEffect(()=>()=>S.current?.(),[]);const k=fr.useCallback(T=>{C(!1),x(T)},[x,C]),$=b?r:v,R=fr.useCallback(T=>{C(!0),t?.(Be.bounds.clamp(s,Math.round(T)))},[t,C]);return i==null&&Be.bounds.isFinite(s)&&(i={x:Be.bounds.span(s)*.01,y:Be.bounds.span(s)*.02}),(m||l==="preview")&&(a=!1),De.jsxRuntimeExports.jsxs(qa.Text,{ref:e,type:"text",variant:l,className:c,value:$.toString(),onChange:k,disabled:m,selectOnFocus:o,onKeyDown:T=>{Oa.eventKey(T)==="Enter"&&(E(),d?.())},onBlur:F,size:p,color:y,contrast:w,...D,children:[a&&De.jsxRuntimeExports.jsx(yc,{direction:n,value:r,onChange:R,dragScale:i,resetValue:u,onBlur:F,size:p,color:y,contrast:w}),f]})},qie=({location:e="left",size:t="9rem",className:r,style:n,bordered:a=!1,...i})=>{const o=Be.location.construct(e),s=Be.location.direction(o),u=Be.direction.swap(s);return De.jsxRuntimeExports.jsx(or.Box$1,{className:at.CSS(at.CSS.B("navbar"),a&&at.CSS.bordered(Be.location.swap(o)),at.CSS.dir(u),at.CSS.loc(o),r),direction:u,style:{[Be.direction.dimension(s)]:t,...n},align:"center",empty:!0,...i})},yu=e=>(({bordered:t=!1,className:r,...n})=>De.jsxRuntimeExports.jsx(or.Box$1,{className:at.CSS(at.CSS.BE("navbar","content"),e==="absolute-center"?at.CSS.M(e):at.CSS.align(e),e!==""&&t&&at.CSS.bordered(e),r),align:"center",...n})),iN=yu("start");iN.displayName="NavbarStart";const oN=yu("end");oN.displayName="NavbarEnd";const sN=yu("center");sN.displayName="NavbarCenter";const uN=yu("");uN.displayName="NavbarContent";const lN=yu("absolute-center");lN.displayName="NavbarAbsoluteCenter";const ja=qie;ja.Start=iN;ja.Center=sN;ja.End=oN;ja.AbsoluteCenter=lN;ja.Content=uN;var Yf={exports:{}},Ts={},Hb;function Rie(){if(Hb)return Ts;Hb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,i){var o=null;if(i!==void 0&&(o=""+i),a.key!==void 0&&(o=""+a.key),"key"in a){i={};for(var s in a)s!=="key"&&(i[s]=a[s])}else i=a;return a=i.ref,{$$typeof:e,type:n,key:o,ref:a!==void 0?a:null,props:i}}return Ts.Fragment=t,Ts.jsx=r,Ts.jsxs=r,Ts}var Nl={},Gb;function Lie(){return Gb||(Gb=1,process.env.NODE_ENV!=="production"&&(function(){function e(G){if(G==null)return null;if(typeof G=="function")return G.$$typeof===S?null:G.displayName||G.name||null;if(typeof G=="string")return G;switch(G){case y:return"Fragment";case D:return"Profiler";case w:return"StrictMode";case b:return"Suspense";case C:return"SuspenseList";case E:return"Activity"}if(typeof G=="object")switch(typeof G.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),G.$$typeof){case p:return"Portal";case x:return G.displayName||"Context";case v:return(G._context.displayName||"Context")+".Consumer";case g:var V=G.render;return G=G.displayName,G||(G=V.displayName||V.name||"",G=G!==""?"ForwardRef("+G+")":"ForwardRef"),G;case N:return V=G.displayName||null,V!==null?V:e(G.type)||"Memo";case A:V=G._payload,G=G._init;try{return e(G(V))}catch{}}return null}function t(G){return""+G}function r(G){try{t(G);var V=!1}catch{V=!0}if(V){V=console;var P=V.error,Q=typeof Symbol=="function"&&Symbol.toStringTag&&G[Symbol.toStringTag]||G.constructor.name||"Object";return P.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q),t(G)}}function n(G){if(G===y)return"<>";if(typeof G=="object"&&G!==null&&G.$$typeof===A)return"<...>";try{var V=e(G);return V?"<"+V+">":"<...>"}catch{return"<...>"}}function a(){var G=F.A;return G===null?null:G.getOwner()}function i(){return Error("react-stack-top-frame")}function o(G){if(k.call(G,"key")){var V=Object.getOwnPropertyDescriptor(G,"key").get;if(V&&V.isReactWarning)return!1}return G.key!==void 0}function s(G,V){function P(){T||(T=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",V))}P.isReactWarning=!0,Object.defineProperty(G,"key",{get:P,configurable:!0})}function u(){var G=e(this.type);return B[G]||(B[G]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),G=this.props.ref,G!==void 0?G:null}function l(G,V,P,Q,z,oe){var ne=P.ref;return G={$$typeof:h,type:G,key:V,props:P,_owner:Q},(ne!==void 0?ne:null)!==null?Object.defineProperty(G,"ref",{enumerable:!1,get:u}):Object.defineProperty(G,"ref",{enumerable:!1,value:null}),G._store={},Object.defineProperty(G._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(G,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(G,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.defineProperty(G,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:oe}),Object.freeze&&(Object.freeze(G.props),Object.freeze(G)),G}function c(G,V,P,Q,z,oe){var ne=V.children;if(ne!==void 0)if(Q)if($(ne)){for(Q=0;Q<ne.length;Q++)f(ne[Q]);Object.freeze&&Object.freeze(ne)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(ne);if(k.call(V,"key")){ne=e(G);var U=Object.keys(V).filter(function(J){return J!=="key"});Q=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",Z[ne+Q]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
80
- let props = %s;
81
- <%s {...props} />
82
- React keys must be passed directly to JSX without using spread:
83
- let props = %s;
84
- <%s key={someKey} {...props} />`,Q,ne,U,ne),Z[ne+Q]=!0)}if(ne=null,P!==void 0&&(r(P),ne=""+P),o(V)&&(r(V.key),ne=""+V.key),"key"in V){P={};for(var _ in V)_!=="key"&&(P[_]=V[_])}else P=V;return ne&&s(P,typeof G=="function"?G.displayName||G.name||"Unknown":G),l(G,ne,P,a(),z,oe)}function f(G){m(G)?G._store&&(G._store.validated=1):typeof G=="object"&&G!==null&&G.$$typeof===A&&(G._payload.status==="fulfilled"?m(G._payload.value)&&G._payload.value._store&&(G._payload.value._store.validated=1):G._store&&(G._store.validated=1))}function m(G){return typeof G=="object"&&G!==null&&G.$$typeof===h}var d=fr,h=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),S=Symbol.for("react.client.reference"),F=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=Object.prototype.hasOwnProperty,$=Array.isArray,R=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(G){return G()}};var T,B={},L=d.react_stack_bottom_frame.bind(d,i)(),j=R(n(i)),Z={};Nl.Fragment=y,Nl.jsx=function(G,V,P){var Q=1e4>F.recentlyCreatedOwnerStacks++;return c(G,V,P,!1,Q?Error("react-stack-top-frame"):L,Q?R(n(G)):j)},Nl.jsxs=function(G,V,P){var Q=1e4>F.recentlyCreatedOwnerStacks++;return c(G,V,P,!0,Q?Error("react-stack-top-frame"):L,Q?R(n(G)):j)}})()),Nl}var Vb;function Hie(){return Vb||(Vb=1,process.env.NODE_ENV==="production"?Yf.exports=Rie():Yf.exports=Lie()),Yf.exports}var bt=Hie();function cN(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=cN(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Gie(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=cN(e))&&(n&&(n+=" "),n+=t);return n}const Vie=e=>bt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 189.34",...e,children:[bt.jsxs("defs",{children:[bt.jsxs("linearGradient",{id:"synnax-linear-gradient",x1:"-2.63",y1:"56.85",x2:"167.19",y2:"157.88",gradientUnits:"userSpaceOnUse",children:[bt.jsx("stop",{offset:"0",stopColor:"#10007f"}),bt.jsx("stop",{offset:"1",stopColor:"#0084e9"})]}),bt.jsxs("filter",{id:"fillpartial",primitiveUnits:"objectBoundingBox",x:"0%",y:"0%",width:"100%",height:"100%",children:[bt.jsx("feFlood",{x:"0%",y:"0%",width:"100%",height:"100%"}),bt.jsx("feOffset",{dy:"0.5",children:bt.jsx("animate",{attributeName:"dy",from:"1",to:"0",dur:"1s",repeatCount:"indefinite"})}),bt.jsx("feComposite",{operator:"in",in2:"SourceGraphic"}),bt.jsx("feComposite",{operator:"over",in2:"SourceGraphic"})]})]}),bt.jsx("g",{id:"Layer_2","data-name":"Layer 2",children:bt.jsx("g",{id:"Layer_1-2","data-name":"Layer 1",children:bt.jsx("path",{filter:"url(#fillpartial)",stroke:"black",strokeWidth:"1",className:"cls-1",d:"M52.61,168.82A14.81,14.81,0,0,1,39.78,146.6L94.22,52.33c5.7-9.88,20-9.88,25.9.42l51.77,89.67a6.88,6.88,0,0,0,2.48,2.49l15.42,8.9a6.78,6.78,0,0,0,9.26-9.27L119.87,7.41a14.8,14.8,0,0,0-25.65,0L2,167.12a14.81,14.81,0,0,0,12.83,22.22H170.39a6.79,6.79,0,0,0,3.39-12.66l-12.05-7a6.83,6.83,0,0,0-3.39-.91Z"})})})]}),Uie=e=>bt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 189.34",...e,children:[bt.jsx("defs",{children:bt.jsxs("linearGradient",{id:"synnax-linear-gradient",x1:"-2.63",y1:"56.85",x2:"167.19",y2:"157.88",gradientUnits:"userSpaceOnUse",children:[bt.jsx("stop",{offset:"0",stopColor:"#10007f"}),bt.jsx("stop",{offset:"1",stopColor:"#0084e9"})]})}),bt.jsx("g",{id:"Layer_2","data-name":"Layer 2",children:bt.jsx("g",{id:"Layer_1-2","data-name":"Layer 1",children:bt.jsx("path",{className:"cls-1",vectorEffect:"non-scaling-stroke",d:"M52.61,168.82A14.81,14.81,0,0,1,39.78,146.6L94.22,52.33c5.7-9.88,20-9.88,25.9.42l51.77,89.67a6.88,6.88,0,0,0,2.48,2.49l15.42,8.9a6.78,6.78,0,0,0,9.26-9.27L119.87,7.41a14.8,14.8,0,0,0-25.65,0L2,167.12a14.81,14.81,0,0,0,12.83,22.22H170.39a6.79,6.79,0,0,0,3.39-12.66l-12.05-7a6.83,6.83,0,0,0-3.39-.91Z"})})})]}),Wie=e=>bt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1050 285",...e,children:[bt.jsx("defs",{children:bt.jsxs("linearGradient",{id:"synnax-linear-gradient",x1:"-2.64",y1:"16561.34",x2:"167.18",y2:"16460.3",gradientTransform:"matrix(1, 0, 0, -1, 0, 16643.76)",gradientUnits:"userSpaceOnUse",children:[bt.jsx("stop",{offset:"0",stopColor:"#10007f"}),bt.jsx("stop",{offset:"1",stopColor:"#0084e9"})]})}),bt.jsxs("g",{id:"Layer_2","data-name":"Layer 2",children:[bt.jsx("path",{d:"M52.6,194.4a14.81,14.81,0,0,1-12.83-22.22L94.21,77.91c5.7-9.88,20-9.88,25.9.42L171.88,168a6.78,6.78,0,0,0,2.48,2.48l15.42,8.91a6.78,6.78,0,0,0,9.26-9.27L119.86,33a14.8,14.8,0,0,0-25.65,0L2,192.69a14.81,14.81,0,0,0,12.83,22.22H170.38a6.78,6.78,0,0,0,3.39-12.65l-12.05-6.95a6.73,6.73,0,0,0-3.39-.91Z"}),bt.jsx("text",{transform:"translate(208.99 215.58)",children:"Synnax"})]})]}),Jie={icon:Uie,title:Wie,loader:Vie},fN=({variant:e="icon",color:t="auto",className:r,...n})=>{const a=Jie[e];return bt.jsx(a,{className:Gie("synnax-logo",`synnax-logo--${t}`,`synnax-logo--${e}`,r),...n})},Kie=({children:e,...t})=>bt.jsxs("div",{className:"synnax-logo-watermark__container",children:[bt.jsx(fN,{className:"synnax-logo-watermark",...t}),e]}),mN=fN;mN.Watermark=Kie;const Yie=({value:e,onChange:t,onBlur:r,onlyChangeOnBlur:n,variant:a,...i})=>{const[o,s]=fr.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 Be.TimeStamp(y,"local");(!n||p)&&(t(Number(D.valueOf())),s(null))},l=h=>{u(h.target.value,!0),s(null),r?.(h)},c=new Be.TimeStamp(e,"UTC"),f=c.toString("ISO","local").slice(0,-1),[m,d]=fr.useState(!1);return De.jsxRuntimeExports.jsxs(Ub.Frame,{visible:m,variant:"modal",zIndex:500,onVisibleChange:d,children:[De.jsxRuntimeExports.jsx(qa.Text,{className:at.CSS.BE("input","datetime"),variant:a,type:"datetime-local",onBlur:l,required:!1,value:o??f,onChange:u,step:1e-5,...i,children:De.jsxRuntimeExports.jsx(kn.Button,{onClick:()=>d(!m),variant:a,children:De.jsxRuntimeExports.jsx(Oa.Calendar,{})})}),De.jsxRuntimeExports.jsx(Xie,{value:c,onChange:h=>t(Number(h.valueOf()))})]})},Zie=tt.extend(U6),Qie=["Control","Enter"],Xie=({value:e,onChange:t})=>{const{close:r}=Ub.useContext();return De.jsxRuntimeExports.jsx(HN.Dialog,{children:De.jsxRuntimeExports.jsxs(or.Box$1,{className:at.CSS.B("datetime-modal"),empty:!0,children:[De.jsxRuntimeExports.jsxs(or.Box$1,{className:at.CSS.B("datetime-modal-container"),children:[De.jsxRuntimeExports.jsx(or.Box$1,{x:!0,className:at.CSS.B("header"),children:De.jsxRuntimeExports.jsx(Wb,{level:"h3",format:"preciseDate",children:e})}),De.jsxRuntimeExports.jsx(kn.Button,{variant:"text",className:at.CSS.B("close-btn"),onClick:r,children:De.jsxRuntimeExports.jsx(Oa.Close,{})}),De.jsxRuntimeExports.jsxs(or.Box$1,{x:!0,className:at.CSS.B("content"),children:[De.jsxRuntimeExports.jsx(roe,{value:e,onChange:t,close:r}),De.jsxRuntimeExports.jsx(ioe,{value:e,onChange:t})]})]}),De.jsxRuntimeExports.jsxs(ja,{location:"bottom",size:"7rem",children:[De.jsxRuntimeExports.jsxs(ja.Start,{gap:"small",children:[De.jsxRuntimeExports.jsx(Oa.Text,{level:"small",trigger:Qie}),De.jsxRuntimeExports.jsx(sn.Text,{level:"small",children:"To Finish"})]}),De.jsxRuntimeExports.jsx(ja.End,{children:De.jsxRuntimeExports.jsx(kn.Button,{onClick:r,variant:"outlined",children:"Done"})})]})]})})},eoe=e=>{const t=zl.useItem(e.key);return De.jsxRuntimeExports.jsx(zl.Item,{...e,children:De.jsxRuntimeExports.jsx(sn.Text,{children:t?.name})})},toe=kn.renderProp(eoe),roe=({value:e,onChange:t,close:r})=>{const[n,a]=fr.useState(""),[i,o]=fr.useState([]),{data:s,getItem:u}=GN.useStaticData({data:i}),l=f=>{const m=Zie(f),d=m.dates().get(),h=[];h.push(...d.map(y=>{const w=new Be.TimeStamp(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 Be.TimeSpan(0);y.hour!=null&&(w=w.add(Be.TimeSpan.hours(y.hour))),y.minute!=null&&(w=w.add(Be.TimeSpan.minutes(y.minute))),y.second!=null&&(w=w.add(Be.TimeSpan.seconds(y.second))),y.millisecond!=null&&(w=w.add(Be.TimeSpan.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 De.jsxRuntimeExports.jsxs(or.Box$1,{pack:!0,y:!0,className:at.CSS.B("ai-selector"),background:1,full:"y",children:[De.jsxRuntimeExports.jsx(qa.Text,{value:n,onChange:l,autoFocus:!0,placeholder:"AI Suggestion",full:"x"}),De.jsxRuntimeExports.jsx(qa.Frame,{data:s,allowNone:!0,onChange:c,getItem:u,children:De.jsxRuntimeExports.jsx(zl.Items,{className:at.CSS.B("ai-list"),bordered:!0,borderColor:5,full:"y",emptyContent:De.jsxRuntimeExports.jsx(or.Box$1,{empty:!0,grow:!0,align:"center",justify:"center",children:De.jsxRuntimeExports.jsxs(or.Box$1,{y:!0,gap:"tiny",children:[De.jsxRuntimeExports.jsx(sn.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"April 1 at 2PM"'}),De.jsxRuntimeExports.jsx(sn.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"Add 2 two hours"'}),De.jsxRuntimeExports.jsx(sn.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"Next Friday"'})]})}),children:toe})})]})},noe=["January","February","March","April","May","June","July","August","September","October","November","December"],aoe=(e,t)=>new Date(t,e+1,0).getDate(),ioe=({value:e,onChange:t})=>{const r=e.localMonth,n=e.localYear,a=e.localDay,i=u=>t(e.setLocalMonth(u)),o=u=>t(e.setLocalYear(u)),s=u=>t(e.setLocalDay(u));return De.jsxRuntimeExports.jsxs(or.Box$1,{pack:!0,x:!0,className:at.CSS.B("datetime-picker"),rounded:!0,children:[De.jsxRuntimeExports.jsxs(or.Box$1,{pack:!0,y:!0,align:"stretch",className:at.CSS.B("calendar"),children:[De.jsxRuntimeExports.jsxs(or.Box$1,{pack:!0,x:!0,grow:!0,className:at.CSS.B("calendar-header"),children:[De.jsxRuntimeExports.jsx(kn.Button,{onClick:()=>i(r-1),variant:"outlined",children:De.jsxRuntimeExports.jsx(Oa.Caret.Left,{})}),De.jsxRuntimeExports.jsx(sn.Text,{level:"small",style:{flexGrow:1,paddingLeft:"1rem"},className:at.CSS.BE("calendar-header","month"),children:noe[r]}),De.jsxRuntimeExports.jsx(kn.Button,{onClick:()=>i(r+1),style:{borderTopRightRadius:0},variant:"outlined",children:De.jsxRuntimeExports.jsx(Oa.Caret.Right,{})})]}),De.jsxRuntimeExports.jsxs(or.Box$1,{pack:!0,x:!0,grow:!0,sharp:!0,children:[De.jsxRuntimeExports.jsx(kn.Button,{onClick:()=>o(n-1),variant:"outlined",children:De.jsxRuntimeExports.jsx(Oa.Caret.Left,{})}),De.jsxRuntimeExports.jsx(sn.Text,{level:"small",style:{flexGrow:1,paddingLeft:"1rem"},children:n}),De.jsxRuntimeExports.jsx(kn.Button,{onClick:()=>o(n+1),variant:"outlined",children:De.jsxRuntimeExports.jsx(Oa.Caret.Right,{})})]}),De.jsxRuntimeExports.jsx(or.Box$1,{x:!0,wrap:!0,gap:"tiny",style:{padding:"0.5rem",height:"100%"},children:Array.from({length:aoe(r,n)}).map((u,l)=>De.jsxRuntimeExports.jsx(kn.Button,{variant:l+1===a?"outlined":"text",onClick:()=>s(l+1),square:!0,children:De.jsxRuntimeExports.jsx(sn.Text,{level:"small",children:l+1})},l))})]}),De.jsxRuntimeExports.jsx(moe,{value:e,onChange:t})]})},ooe={padding:"0rem",paddingLeft:"2rem",height:"4rem",minHeight:"4rem",maxHeight:"4rem"},soe=e=>De.jsxRuntimeExports.jsx(qa.ListItem,{...e,style:ooe,children:e.index}),uoe=kn.renderProp(soe),mh=e=>{const t=Array.from({length:e},(n,a)=>a),r=({value:n,onChange:a})=>De.jsxRuntimeExports.jsx(qa.Frame,{data:t,value:n,onChange:a,children:De.jsxRuntimeExports.jsx(zl.Items,{className:at.CSS.B("time-list"),children:uoe})});return r.displayName="TimeList",r},loe=mh(24),coe=mh(60),foe=mh(60),moe=({value:e,onChange:t})=>De.jsxRuntimeExports.jsxs(or.Box$1,{pack:!0,y:!0,className:at.CSS.B("time-selector"),children:[De.jsxRuntimeExports.jsxs(or.Box$1,{pack:!0,x:!0,grow:!0,className:at.CSS.B("time-selector-list"),children:[De.jsxRuntimeExports.jsx(loe,{value:e.localHour,onChange:r=>t(e.setLocalHour(r))}),De.jsxRuntimeExports.jsx(coe,{value:e.localMinute,onChange:r=>t(e.setLocalMinute(r))}),De.jsxRuntimeExports.jsx(foe,{value:e.localSecond,onChange:r=>t(e.setLocalSecond(r))})]}),De.jsxRuntimeExports.jsx(fh,{size:"small",value:e.localMillisecond,onChange:r=>t(e.setLocalMillisecond(r)),endContent:"ms",showDragHandle:!1,borderColor:5})]}),od=({className:e,variant:t,...r})=>De.jsxRuntimeExports.jsx(sn.Text,{className:at.CSS(at.CSS.B("input-help-text"),e),color:8,status:Be.status.removeVariants(t,"success"),level:"small",...r}),dN=({className:e,required:t=!1,children:r,...n})=>De.jsxRuntimeExports.jsxs("label",{className:at.CSS(at.CSS.B("input-label"),e),...n,children:[r," ",t&&De.jsxRuntimeExports.jsx("span",{className:at.CSS.B("required-indicator"),children:"*"})]}),doe=(e,t="y")=>e??(Be.direction.construct(t)==="y"?"stretch":"center"),hN=({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=or.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=De.jsxRuntimeExports.jsxs(or.Box$1,{y:!0,gap:"small",children:[s,d&&(f||r!=null&&r.length>0)&&De.jsxRuntimeExports.jsx(od,{variant:m,children:r})]}):y=De.jsxRuntimeExports.jsxs(or.Box$1,{y:!0,gap:1/3,align:"stretch",children:[s,(f||r!=null&&r.length>0)&&De.jsxRuntimeExports.jsx(od,{variant:m,children:r})]}),De.jsxRuntimeExports.jsxs(or.Box$1,{className:at.CSS(at.CSS.BE("input","item"),o),direction:p,gap:c,align:doe(l,p),...h,children:[D&&De.jsxRuntimeExports.jsx(dN,{required:u,children:e}),y]}))},pN=e=>De.jsxRuntimeExports.jsx(Jb,{...e,inputType:"switch"}),hoe=(e,t)=>new Be.TimeStamp(e).add(t).sub(Be.TimeStamp.utcOffset),poe={x:Number(Be.TimeSpan.SECOND.valueOf())*.5,y:Number(Be.TimeSpan.MINUTE.valueOf())},gN=({value:e,onChange:t,tzInfo:r})=>{const n=new Be.TimeStamp(e,"UTC"),a=n.sub(Be.TimeStamp.utcOffset);if(a.after(Be.TimeStamp.DAY)){const s=a.remainder(Be.TimeStamp.DAY);t(Number(new Be.TimeStamp(s,"local").valueOf()))}const i=fr.useCallback(s=>{let u;if(typeof s=="number")u=new Be.TimeStamp(s,"UTC");else{if(s.length===0)return;u=new Be.TimeStamp(s,"local")}t(Number(u.valueOf()))},[t,r]);return{inputValue:n.toString("time",r),ts:n,handleChange:i}},goe=({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}=gN({value:r,onChange:a,tzInfo:n});return De.jsxRuntimeExports.jsxs(qa.Text,{ref:e,value:c,className:at.CSS(at.CSS.B("input-time"),s),type:"time",step:"1",onChange:m,...l,children:[o&&De.jsxRuntimeExports.jsx(yc,{direction:i,value:Number(f.valueOf()),onChange:m,dragScale:poe}),u]})},voe=Object.freeze(Object.defineProperty({__proto__:null,Checkbox:UN,Date:JN,DateTime:Yie,DragButton:yc,HelpText:od,Item:hN,Label:dN,Numeric:fh,Switch:pN,Text:qa.Text,Time:goe,combineDateAndTimeValue:hoe,useDate:Zb,useTime:gN},Symbol.toStringTag,{value:"Module"}));exports.Bar=ja;exports.Item=hN;exports.Numeric=fh;exports.Switch=pN;exports.TimeStamp=Wb;exports.de=mN;exports.external=voe;