wsemi 1.7.50 → 1.7.51

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 (404) hide show
  1. package/README.md +1 -1
  2. package/dist/wsemi.umd.js +2 -2
  3. package/dist/wsemi.umd.js.map +1 -1
  4. package/docs/-_class.mjs.html +1 -1
  5. package/docs/ab2blob.mjs.html +1 -1
  6. package/docs/ab2u8arr.mjs.html +1 -1
  7. package/docs/addExcelWorksheetFromData.mjs.html +1 -1
  8. package/docs/addMonth.mjs.html +1 -1
  9. package/docs/aes2str.mjs.html +1 -1
  10. package/docs/alive.mjs.html +1 -1
  11. package/docs/arr2dt.mjs.html +1 -1
  12. package/docs/arrAccum.mjs.html +1 -1
  13. package/docs/arrAdd.mjs.html +1 -1
  14. package/docs/arrAt.mjs.html +1 -1
  15. package/docs/arrDiff.mjs.html +1 -1
  16. package/docs/arrFilterByKeywords.mjs.html +1 -1
  17. package/docs/arrFilterByNum.mjs.html +1 -1
  18. package/docs/arrFilterByPnum.mjs.html +1 -1
  19. package/docs/arrFilterByPnumAndToLog.mjs.html +1 -1
  20. package/docs/arrFind.mjs.html +1 -1
  21. package/docs/arrGroupByMaxmin.mjs.html +1 -1
  22. package/docs/arrHas.mjs.html +1 -1
  23. package/docs/arrInsert.mjs.html +1 -1
  24. package/docs/arrLookupByMaxmin.mjs.html +1 -1
  25. package/docs/arrMax.mjs.html +1 -1
  26. package/docs/arrMin.mjs.html +1 -1
  27. package/docs/arrMulti.mjs.html +1 -1
  28. package/docs/arrNorm.mjs.html +1 -1
  29. package/docs/arrProduct.mjs.html +1 -1
  30. package/docs/arrReduce.mjs.html +1 -1
  31. package/docs/arrSep.mjs.html +1 -1
  32. package/docs/arrSort.mjs.html +1 -1
  33. package/docs/asind.mjs.html +1 -1
  34. package/docs/atan2d.mjs.html +1 -1
  35. package/docs/atand.mjs.html +1 -1
  36. package/docs/attstr.mjs.html +1 -1
  37. package/docs/b642obj.mjs.html +1 -1
  38. package/docs/b642str.mjs.html +1 -1
  39. package/docs/b642u16arr.mjs.html +1 -1
  40. package/docs/b642u8arr.mjs.html +1 -1
  41. package/docs/binstr.mjs.html +1 -1
  42. package/docs/blob2ab.mjs.html +1 -1
  43. package/docs/blob2b64.mjs.html +1 -1
  44. package/docs/blob2str.mjs.html +1 -1
  45. package/docs/blob2u8arr.mjs.html +1 -1
  46. package/docs/blobs2b64s.mjs.html +1 -1
  47. package/docs/blobs2u8arrs.mjs.html +1 -1
  48. package/docs/bodyLog.mjs.html +1 -1
  49. package/docs/browserView.mjs.html +1 -1
  50. package/docs/browserViewFromBlob.mjs.html +1 -1
  51. package/docs/browserViewFromText.mjs.html +1 -1
  52. package/docs/browserViewFromU8arr.mjs.html +1 -1
  53. package/docs/bs2u8arr.mjs.html +1 -1
  54. package/docs/bufRead.mjs.html +1 -1
  55. package/docs/bufReadDbl.mjs.html +1 -1
  56. package/docs/bufWrite.mjs.html +1 -1
  57. package/docs/bufWriteDbl.mjs.html +1 -1
  58. package/docs/cache.mjs.html +1 -1
  59. package/docs/cbol.mjs.html +1 -1
  60. package/docs/cdbl.mjs.html +1 -1
  61. package/docs/cfilesize.mjs.html +1 -1
  62. package/docs/cfinancial.mjs.html +1 -1
  63. package/docs/cint.mjs.html +1 -1
  64. package/docs/clearXSS.mjs.html +1 -1
  65. package/docs/color.mjs.html +1 -1
  66. package/docs/composeToTree.mjs.html +1 -1
  67. package/docs/convertToTree.mjs.html +1 -1
  68. package/docs/copyStrToClipboard.mjs.html +1 -1
  69. package/docs/cosd.mjs.html +1 -1
  70. package/docs/cotd.mjs.html +1 -1
  71. package/docs/createExcelWorkbook.mjs.html +1 -1
  72. package/docs/cscd.mjs.html +1 -1
  73. package/docs/cstr.mjs.html +1 -1
  74. package/docs/day2cht.mjs.html +1 -1
  75. package/docs/debounce.mjs.html +1 -1
  76. package/docs/delay.mjs.html +1 -1
  77. package/docs/dig.mjs.html +1 -1
  78. package/docs/digExp.mjs.html +1 -1
  79. package/docs/domAlert.mjs.html +1 -1
  80. package/docs/domAppend.mjs.html +1 -1
  81. package/docs/domCancelEvent.mjs.html +1 -1
  82. package/docs/domCompareText.mjs.html +1 -1
  83. package/docs/domCompareTextDyn.mjs.html +1 -1
  84. package/docs/domConvertToPic.mjs.html +1 -1
  85. package/docs/domConvertToPicDyn.mjs.html +1 -1
  86. package/docs/domDetect.mjs.html +1 -1
  87. package/docs/domDrag.mjs.html +1 -1
  88. package/docs/domDragBarAndScroll.mjs.html +1 -1
  89. package/docs/domDragPreview.mjs.html +1 -1
  90. package/docs/domDropFiles.mjs.html +1 -1
  91. package/docs/domElementsFromPoint.mjs.html +1 -1
  92. package/docs/domFadeIn.mjs.html +1 -1
  93. package/docs/domFadeOut.mjs.html +1 -1
  94. package/docs/domFind.mjs.html +1 -1
  95. package/docs/domFinds.mjs.html +1 -1
  96. package/docs/domGetAttr.mjs.html +1 -1
  97. package/docs/domGetBoudRect.mjs.html +1 -1
  98. package/docs/domGetBoudRectRefSelf.mjs.html +1 -1
  99. package/docs/domGetFileAccept.mjs.html +1 -1
  100. package/docs/domGetFiles.mjs.html +1 -1
  101. package/docs/domGetParents.mjs.html +1 -1
  102. package/docs/domGetPointFromEvent.mjs.html +1 -1
  103. package/docs/domGetScrollableParent.mjs.html +1 -1
  104. package/docs/domGetWindowSize.mjs.html +1 -1
  105. package/docs/domIsClientXYIn.mjs.html +1 -1
  106. package/docs/domIsFocused.mjs.html +1 -1
  107. package/docs/domIsVisible.mjs.html +1 -1
  108. package/docs/domPrepend.mjs.html +1 -1
  109. package/docs/domRemove.mjs.html +1 -1
  110. package/docs/domRenderMarkdownMind.mjs.html +1 -1
  111. package/docs/domRenderMarkdownMindDyn.mjs.html +1 -1
  112. package/docs/domRipple.mjs.html +1 -1
  113. package/docs/domScrollIntoView.mjs.html +1 -1
  114. package/docs/domScrollTo.mjs.html +1 -1
  115. package/docs/domShowImages.mjs.html +1 -1
  116. package/docs/domShowImagesDyn.mjs.html +1 -1
  117. package/docs/domShowInputAndGetFiles.mjs.html +1 -1
  118. package/docs/domShowInputAndGetFilesU8Arrs.mjs.html +1 -1
  119. package/docs/domTooltip.mjs.html +1 -1
  120. package/docs/domTriggerEvent.mjs.html +1 -1
  121. package/docs/domVirtualCreate.mjs.html +1 -1
  122. package/docs/domVirtualCreateQueue.mjs.html +1 -1
  123. package/docs/downloadExcelFileFromData.mjs.html +1 -1
  124. package/docs/downloadExcelFileFromDataDyn.mjs.html +1 -1
  125. package/docs/downloadFileFromB64.mjs.html +1 -1
  126. package/docs/downloadFileFromBlob.mjs.html +1 -1
  127. package/docs/downloadFileFromText.mjs.html +1 -1
  128. package/docs/downloadFileFromU8Arr.mjs.html +1 -1
  129. package/docs/dtmapping.mjs.html +1 -1
  130. package/docs/dtpick.mjs.html +1 -1
  131. package/docs/evem.mjs.html +1 -1
  132. package/docs/examples/ex-blob2b64.html +1 -1
  133. package/docs/examples/ex-clearXSS.html +1 -1
  134. package/docs/examples/ex-colorConverter.html +1 -1
  135. package/docs/examples/ex-domCompareText.html +1 -1
  136. package/docs/examples/ex-domCompareTextDyn.html +1 -1
  137. package/docs/examples/ex-domConvertToPic.html +1 -1
  138. package/docs/examples/ex-domConvertToPicDyn.html +1 -1
  139. package/docs/examples/ex-domDrag.html +1 -1
  140. package/docs/examples/ex-domDropFiles.html +1 -1
  141. package/docs/examples/ex-domIsVisible.html +1 -1
  142. package/docs/examples/ex-domRenderMarkdownMind.html +1 -1
  143. package/docs/examples/ex-domRenderMarkdownMindDyn.html +1 -1
  144. package/docs/examples/ex-domRipple.html +1 -1
  145. package/docs/examples/ex-domScrollIntoView.html +1 -1
  146. package/docs/examples/ex-domScrollTo.html +1 -1
  147. package/docs/examples/ex-domShowImages.html +1 -1
  148. package/docs/examples/ex-domShowImagesDyn.html +1 -1
  149. package/docs/examples/ex-domShowInputAndGetFiles.html +1 -1
  150. package/docs/examples/ex-domTooltip.html +1 -1
  151. package/docs/examples/ex-execPyodide.html +1 -1
  152. package/docs/examples/ex-execPyodideDyn.html +1 -1
  153. package/docs/examples/ex-getUserAgent.html +1 -1
  154. package/docs/examples/ex-getUserAgentDyn.html +1 -1
  155. package/docs/examples/ex-html2pic.html +1 -1
  156. package/docs/examples/ex-html2picDyn.html +1 -1
  157. package/docs/examples/ex-html2str.html +1 -1
  158. package/docs/examples/ex-html2strDyn.html +1 -1
  159. package/docs/examples/ex-obj2u8arr-u8arr2obj.html +1 -1
  160. package/docs/examples/ex-ocr.html +1 -1
  161. package/docs/examples/ex-ocrDyn.html +1 -1
  162. package/docs/examples/ex-openLink.html +1 -1
  163. package/docs/examples/ex-str2aes-aes2str.html +1 -1
  164. package/docs/examples/ex-strFindFuzz.html +1 -1
  165. package/docs/examples/ex-strFindFuzzDyn.html +1 -1
  166. package/docs/examples/ex-timeTZ2expire-timeTZ2past.html +1 -1
  167. package/docs/examples/ex-xlsx.html +1 -1
  168. package/docs/examples/ex-xlsxDyn.html +1 -1
  169. package/docs/execProcess.mjs.html +1 -1
  170. package/docs/execPyodide.mjs.html +1 -1
  171. package/docs/execPyodideDyn.mjs.html +1 -1
  172. package/docs/execScript.mjs.html +1 -1
  173. package/docs/f2c.mjs.html +1 -1
  174. package/docs/filepathToTree.mjs.html +1 -1
  175. package/docs/files2data.mjs.html +1 -1
  176. package/docs/flattenToConn.mjs.html +1 -1
  177. package/docs/flattenTree.mjs.html +1 -1
  178. package/docs/fsCleanFolder.mjs.html +1 -1
  179. package/docs/fsCopyFile.mjs.html +1 -1
  180. package/docs/fsCopyFolder.mjs.html +1 -1
  181. package/docs/fsCreateFile.mjs.html +1 -1
  182. package/docs/fsCreateFolder.mjs.html +1 -1
  183. package/docs/fsDeleteFile.mjs.html +1 -1
  184. package/docs/fsDeleteFolder.mjs.html +1 -1
  185. package/docs/fsEvem.mjs.html +1 -1
  186. package/docs/fsGetFileHash.mjs.html +1 -1
  187. package/docs/fsGetFilesInFolder.mjs.html +1 -1
  188. package/docs/fsGetFoldersInFolder.mjs.html +1 -1
  189. package/docs/fsIsFile.mjs.html +1 -1
  190. package/docs/fsIsFolder.mjs.html +1 -1
  191. package/docs/fsReadText.mjs.html +1 -1
  192. package/docs/fsRenameFile.mjs.html +2 -2
  193. package/docs/fsRenameFolder.mjs.html +2 -2
  194. package/docs/fsTreeFolder.mjs.html +1 -1
  195. package/docs/fsWatchFile.mjs.html +1 -1
  196. package/docs/fsWatchFolder.mjs.html +1 -1
  197. package/docs/fsWriteText.mjs.html +1 -1
  198. package/docs/genGradientColor.mjs.html +1 -1
  199. package/docs/genID.mjs.html +1 -1
  200. package/docs/genPm.mjs.html +1 -1
  201. package/docs/getBufferSize.mjs.html +1 -1
  202. package/docs/getClearPathName.mjs.html +1 -1
  203. package/docs/getCsvStrFromData.mjs.html +1 -1
  204. package/docs/getDataFromExcelFileU8Arr.mjs.html +1 -1
  205. package/docs/getDataFromExcelFileU8ArrDyn.mjs.html +1 -1
  206. package/docs/getEnv.mjs.html +1 -1
  207. package/docs/getExcelU8ArrFromData.mjs.html +1 -1
  208. package/docs/getExcelU8ArrFromWorkbook.mjs.html +1 -1
  209. package/docs/getExcelWorkbookFromData.mjs.html +1 -1
  210. package/docs/getExcelWorkbookFromWorksheet.mjs.html +1 -1
  211. package/docs/getExcelWorksheetFromData.mjs.html +1 -1
  212. package/docs/getFileAccept.mjs.html +1 -1
  213. package/docs/getFileName.mjs.html +1 -1
  214. package/docs/getFileNameExt.mjs.html +1 -1
  215. package/docs/getFileTrueName.mjs.html +1 -1
  216. package/docs/getFileType.mjs.html +1 -1
  217. package/docs/getGlobal.mjs.html +1 -1
  218. package/docs/getObjSize.mjs.html +1 -1
  219. package/docs/getPathParent.mjs.html +1 -1
  220. package/docs/getTimeBetween.mjs.html +1 -1
  221. package/docs/getTimeFromUnit.mjs.html +1 -1
  222. package/docs/getTimeObject.mjs.html +1 -1
  223. package/docs/getTimeRange.mjs.html +1 -1
  224. package/docs/getUserAgent.mjs.html +1 -1
  225. package/docs/getUserAgentDyn.mjs.html +1 -1
  226. package/docs/getltdtkeys.mjs.html +1 -1
  227. package/docs/haskey.mjs.html +1 -1
  228. package/docs/html2pic.mjs.html +1 -1
  229. package/docs/html2picDyn.mjs.html +1 -1
  230. package/docs/html2str.mjs.html +1 -1
  231. package/docs/html2strDyn.mjs.html +1 -1
  232. package/docs/htmlDecode.mjs.html +1 -1
  233. package/docs/htmlEncode.mjs.html +1 -1
  234. package/docs/importResources.mjs.html +1 -1
  235. package/docs/index.html +1 -1
  236. package/docs/interp1.mjs.html +1 -1
  237. package/docs/isDev.mjs.html +1 -1
  238. package/docs/isEle.mjs.html +1 -1
  239. package/docs/isEleExistByID.mjs.html +1 -1
  240. package/docs/isEmail.mjs.html +1 -1
  241. package/docs/isIE.mjs.html +1 -1
  242. package/docs/isNarrow.mjs.html +1 -1
  243. package/docs/isStrHasCapital.mjs.html +1 -1
  244. package/docs/isStrHasLowerCase.mjs.html +1 -1
  245. package/docs/isStrHasNumber.mjs.html +1 -1
  246. package/docs/isUserIdentify.mjs.html +1 -1
  247. package/docs/isUserName.mjs.html +1 -1
  248. package/docs/isUserPW.mjs.html +1 -1
  249. package/docs/isWindow.mjs.html +1 -1
  250. package/docs/isab.mjs.html +1 -1
  251. package/docs/isarr.mjs.html +1 -1
  252. package/docs/isarr0.mjs.html +1 -1
  253. package/docs/isblob.mjs.html +1 -1
  254. package/docs/isbol.mjs.html +1 -1
  255. package/docs/isday.mjs.html +1 -1
  256. package/docs/isearr.mjs.html +1 -1
  257. package/docs/iseobj.mjs.html +1 -1
  258. package/docs/iser.mjs.html +1 -1
  259. package/docs/isernot.mjs.html +1 -1
  260. package/docs/isestr.mjs.html +1 -1
  261. package/docs/isfun.mjs.html +1 -1
  262. package/docs/isint.mjs.html +1 -1
  263. package/docs/ismonth.mjs.html +1 -1
  264. package/docs/isn0int.mjs.html +1 -1
  265. package/docs/isn0num.mjs.html +1 -1
  266. package/docs/isnan.mjs.html +1 -1
  267. package/docs/isnbr.mjs.html +1 -1
  268. package/docs/isnint.mjs.html +1 -1
  269. package/docs/isnnum.mjs.html +1 -1
  270. package/docs/isnull.mjs.html +1 -1
  271. package/docs/isnum.mjs.html +1 -1
  272. package/docs/isobj.mjs.html +1 -1
  273. package/docs/isobj0.mjs.html +1 -1
  274. package/docs/isp0int.mjs.html +1 -1
  275. package/docs/isp0num.mjs.html +1 -1
  276. package/docs/ispint.mjs.html +1 -1
  277. package/docs/ispm.mjs.html +1 -1
  278. package/docs/ispnum.mjs.html +1 -1
  279. package/docs/isstr.mjs.html +1 -1
  280. package/docs/isstr0.mjs.html +1 -1
  281. package/docs/istime.mjs.html +1 -1
  282. package/docs/istimeTZ.mjs.html +1 -1
  283. package/docs/istimems.mjs.html +1 -1
  284. package/docs/istimemsTZ.mjs.html +1 -1
  285. package/docs/isu16arr.mjs.html +1 -1
  286. package/docs/isu8arr.mjs.html +1 -1
  287. package/docs/isundefined.mjs.html +1 -1
  288. package/docs/j2o.mjs.html +1 -1
  289. package/docs/keysmat2ltdt.mjs.html +1 -1
  290. package/docs/log.mjs.html +1 -1
  291. package/docs/ltdt2vrtsable.mjs.html +1 -1
  292. package/docs/ltdtDiff.mjs.html +1 -1
  293. package/docs/ltdtDiffByKey.mjs.html +1 -1
  294. package/docs/ltdtkeys2mat.mjs.html +1 -1
  295. package/docs/ltdtkeysheads2mat.mjs.html +1 -1
  296. package/docs/ltdtmapping.mjs.html +1 -1
  297. package/docs/ltdtmerge.mjs.html +1 -1
  298. package/docs/ltdtpick.mjs.html +1 -1
  299. package/docs/ltdtpull.mjs.html +1 -1
  300. package/docs/mat2ltdt.mjs.html +1 -1
  301. package/docs/matConcat.mjs.html +1 -1
  302. package/docs/matDiff.mjs.html +1 -1
  303. package/docs/matat.mjs.html +1 -1
  304. package/docs/now2str.mjs.html +1 -1
  305. package/docs/now2strp.mjs.html +1 -1
  306. package/docs/nowDay2str.mjs.html +1 -1
  307. package/docs/nowms2str.mjs.html +1 -1
  308. package/docs/nowms2strp.mjs.html +1 -1
  309. package/docs/o2j.mjs.html +1 -1
  310. package/docs/obj2b64.mjs.html +1 -1
  311. package/docs/obj2pb64.mjs.html +1 -1
  312. package/docs/obj2str.mjs.html +1 -1
  313. package/docs/obj2stru8arr.mjs.html +1 -1
  314. package/docs/obj2u8arr.mjs.html +1 -1
  315. package/docs/objSortBy.mjs.html +1 -1
  316. package/docs/objSortByKeys.mjs.html +1 -1
  317. package/docs/ocr.mjs.html +1 -1
  318. package/docs/ocrDyn.mjs.html +1 -1
  319. package/docs/oo.mjs.html +1 -1
  320. package/docs/openLink.mjs.html +1 -1
  321. package/docs/pb642obj.mjs.html +1 -1
  322. package/docs/pmChain.mjs.html +1 -1
  323. package/docs/pmConvertResolve.mjs.html +1 -1
  324. package/docs/pmDebounce.mjs.html +1 -1
  325. package/docs/pmHook.mjs.html +1 -1
  326. package/docs/pmHookReject.mjs.html +1 -1
  327. package/docs/pmIni.mjs.html +1 -1
  328. package/docs/pmInvResolve.mjs.html +1 -1
  329. package/docs/pmMap.mjs.html +1 -1
  330. package/docs/pmQueue.mjs.html +1 -1
  331. package/docs/pmSeries.mjs.html +1 -1
  332. package/docs/pmThrottle.mjs.html +1 -1
  333. package/docs/pseudoRandom.mjs.html +1 -1
  334. package/docs/pseudoRandomIntRange.mjs.html +1 -1
  335. package/docs/pseudoRandomRange.mjs.html +1 -1
  336. package/docs/queue.mjs.html +1 -1
  337. package/docs/rang.mjs.html +1 -1
  338. package/docs/rep.mjs.html +1 -1
  339. package/docs/repObj.mjs.html +1 -1
  340. package/docs/replace.mjs.html +1 -1
  341. package/docs/replaceObj.mjs.html +1 -1
  342. package/docs/replacePlus.mjs.html +1 -1
  343. package/docs/round.mjs.html +1 -1
  344. package/docs/secd.mjs.html +1 -1
  345. package/docs/sep.mjs.html +1 -1
  346. package/docs/sepInt.mjs.html +1 -1
  347. package/docs/sind.mjs.html +1 -1
  348. package/docs/split.mjs.html +1 -1
  349. package/docs/str2aes.mjs.html +1 -1
  350. package/docs/str2b64.mjs.html +1 -1
  351. package/docs/str2hint.mjs.html +1 -1
  352. package/docs/str2md5.mjs.html +1 -1
  353. package/docs/str2obj.mjs.html +1 -1
  354. package/docs/str2sha512.mjs.html +1 -1
  355. package/docs/str2u8arr.mjs.html +1 -1
  356. package/docs/strCompare.mjs.html +1 -1
  357. package/docs/strDiff.mjs.html +1 -1
  358. package/docs/strFindFuzz.mjs.html +1 -1
  359. package/docs/strFindFuzzDyn.mjs.html +1 -1
  360. package/docs/strFindSimilar.mjs.html +1 -1
  361. package/docs/strdelleft.mjs.html +1 -1
  362. package/docs/strdelright.mjs.html +1 -1
  363. package/docs/strleft.mjs.html +1 -1
  364. package/docs/strmid.mjs.html +1 -1
  365. package/docs/strright.mjs.html +1 -1
  366. package/docs/stru8arr2obj.mjs.html +1 -1
  367. package/docs/tand.mjs.html +1 -1
  368. package/docs/time2day.mjs.html +1 -1
  369. package/docs/time2hour.mjs.html +1 -1
  370. package/docs/time2min.mjs.html +1 -1
  371. package/docs/timeTZ2day.mjs.html +1 -1
  372. package/docs/timeTZ2expire.mjs.html +1 -1
  373. package/docs/timeTZ2hour.mjs.html +1 -1
  374. package/docs/timeTZ2min.mjs.html +1 -1
  375. package/docs/timeTZ2past.mjs.html +1 -1
  376. package/docs/timems2day.mjs.html +1 -1
  377. package/docs/timems2hour.mjs.html +1 -1
  378. package/docs/timems2min.mjs.html +1 -1
  379. package/docs/timems2time.mjs.html +1 -1
  380. package/docs/timemsTZ2day.mjs.html +1 -1
  381. package/docs/timemsTZ2expire.mjs.html +1 -1
  382. package/docs/timemsTZ2hour.mjs.html +1 -1
  383. package/docs/timemsTZ2min.mjs.html +1 -1
  384. package/docs/timemsTZ2past.mjs.html +1 -1
  385. package/docs/timemsTZ2time.mjs.html +1 -1
  386. package/docs/treeObj.mjs.html +1 -1
  387. package/docs/treeToFilepath.mjs.html +1 -1
  388. package/docs/trim.mjs.html +1 -1
  389. package/docs/u16arr2b64.mjs.html +1 -1
  390. package/docs/u16arr2u8arr.mjs.html +1 -1
  391. package/docs/u8arr2ab.mjs.html +1 -1
  392. package/docs/u8arr2b64.mjs.html +1 -1
  393. package/docs/u8arr2blob.mjs.html +1 -1
  394. package/docs/u8arr2bs.mjs.html +1 -1
  395. package/docs/u8arr2obj.mjs.html +1 -1
  396. package/docs/u8arr2str.mjs.html +1 -1
  397. package/docs/u8arr2u16arr.mjs.html +1 -1
  398. package/docs/urlParse.mjs.html +1 -1
  399. package/docs/verifyValue.mjs.html +1 -1
  400. package/docs/waitFun.mjs.html +1 -1
  401. package/docs/wsemi.html +2 -2
  402. package/package.json +1 -1
  403. package/src/fsRenameFile.mjs +1 -1
  404. package/src/fsRenameFolder.mjs +1 -1
package/README.md CHANGED
@@ -195,5 +195,5 @@ or
195
195
 
196
196
  [Necessary] Add script for wsemi.
197
197
  ```alias
198
- <script src="https://cdn.jsdelivr.net/npm/wsemi@1.7.50/dist/wsemi.umd.js"></script>
198
+ <script src="https://cdn.jsdelivr.net/npm/wsemi@1.7.51/dist/wsemi.umd.js"></script>
199
199
  ```
package/dist/wsemi.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * wsemi v1.7.50
2
+ * wsemi v1.7.51
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
@@ -11,5 +11,5 @@
11
11
  * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
12
12
  * MIT Licence
13
13
  */
14
- var zg,Rg,Ug=9e15,Wg=1e9,qg="0123456789abcdef",Vg="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Xg="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Zg={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Ug,maxE:Ug,crypto:!1},Gg=!0,Kg="[DecimalError] ",Jg=Kg+"Invalid argument: ",Qg=Kg+"Precision limit exceeded",ev=Kg+"crypto unavailable",tv="[object Decimal]",nv=Math.floor,rv=Math.pow,iv=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ov=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,av=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uv=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,lv=1e7,cv=7,sv=Vg.length-1,fv=Xg.length-1,pv={toStringTag:tv};function dv(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",(n=cv-r.length)&&(o+=Ev(n)),o+=r;a=e[t],(n=cv-(r=a+"").length)&&(o+=Ev(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function hv(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Jg+e)}function mv(e,t,n,r){var i,o,a,u;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=cv,i=0):(i=Math.ceil((t+1)/cv),t%=cv),o=rv(10,cv-t),u=e[i]%o|0,null==r?t<3?(0==t?u=u/100|0:1==t&&(u=u/10|0),a=n<4&&99999==u||n>3&&49999==u||5e4==u||0==u):a=(n<4&&u+1==o||n>3&&u+1==o/2)&&(e[i+1]/o/100|0)==rv(10,t-2)-1||(u==o/2||0==u)&&0==(e[i+1]/o/100|0):t<4?(0==t?u=u/1e3|0:1==t?u=u/100|0:2==t&&(u=u/10|0),a=(r||n<4)&&9999==u||!r&&n>3&&4999==u):a=((r||n<4)&&u+1==o||!r&&n>3&&u+1==o/2)&&(e[i+1]/o/1e3|0)==rv(10,t-3)-1,a}function gv(e,t,n){for(var r,i,o=[0],a=0,u=e.length;a<u;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=qg.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}pv.absoluteValue=pv.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),yv(e)},pv.ceil=function(){return yv(new this.constructor(this),this.e+1,2)},pv.clampedTo=pv.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(Jg+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},pv.comparedTo=pv.cmp=function(e){var t,n,r,i,o=this,a=o.d,u=(e=new o.constructor(e)).d,l=o.s,c=e.s;if(!a||!u)return l&&c?l!==c?l:a===u?0:!a^l<0?1:-1:NaN;if(!a[0]||!u[0])return a[0]?l:u[0]?-c:0;if(l!==c)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(t=0,n=(r=a.length)<(i=u.length)?r:i;t<n;++t)if(a[t]!==u[t])return a[t]>u[t]^l<0?1:-1;return r===i?0:r>i^l<0?1:-1},pv.cosine=pv.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+cv,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?i=(1/Hv(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=Yv(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,$v(r,n)),r.precision=e,r.rounding=t,yv(2==Rg||3==Rg?n.neg():n,e,t,!0)):new r(1):new r(NaN)},pv.cubeRoot=pv.cbrt=function(){var e,t,n,r,i,o,a,u,l,c,s=this,f=s.constructor;if(!s.isFinite()||s.isZero())return new f(s);for(Gg=!1,(o=s.s*rv(s.s*s,1/3))&&Math.abs(o)!=1/0?r=new f(o.toString()):(n=dv(s.d),(o=((e=s.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=rv(n,1/3),e=nv((e+1)/3)-(e%3==(e<0?-1:2)),(r=new f(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=s.s),a=(e=f.precision)+3;;)if(c=(l=(u=r).times(u).times(u)).plus(s),r=vv(c.plus(s).times(u),c.plus(l),a+2,1),dv(u.d).slice(0,a)===(n=dv(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(yv(r,e+1,1),t=!r.times(r).times(r).eq(s));break}if(!i&&(yv(u,e+1,0),u.times(u).times(u).eq(s))){r=u;break}a+=4,i=1}return Gg=!0,yv(r,e,f.rounding,t)},pv.decimalPlaces=pv.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-nv(this.e/cv))*cv,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},pv.dividedBy=pv.div=function(e){return vv(this,new this.constructor(e))},pv.dividedToIntegerBy=pv.divToInt=function(e){var t=this.constructor;return yv(vv(this,new t(e),0,1,1),t.precision,t.rounding)},pv.equals=pv.eq=function(e){return 0===this.cmp(e)},pv.floor=function(){return yv(new this.constructor(this),this.e+1,3)},pv.greaterThan=pv.gt=function(e){return this.cmp(e)>0},pv.greaterThanOrEqualTo=pv.gte=function(e){var t=this.cmp(e);return 1==t||0===t},pv.hyperbolicCosine=pv.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,u=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return u;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/Hv(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=Yv(a,1,o.times(t),new a(1),!0);for(var l,c=e,s=new a(8);c--;)l=o.times(o),o=u.minus(l.times(s.minus(l.times(s))));return yv(o,a.precision=n,a.rounding=r,!0)},pv.hyperbolicSine=pv.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=Yv(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=Yv(o,2,i=i.times(1/Hv(5,e)),i,!0);for(var a,u=new o(5),l=new o(16),c=new o(20);e--;)a=i.times(i),i=i.times(u.plus(a.times(l.times(a).plus(c))))}return o.precision=t,o.rounding=n,yv(i,t,n,!0)},pv.hyperbolicTangent=pv.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,vv(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},pv.inverseCosine=pv.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?jv(n,i,o):new n(0):new n(NaN):t.isZero()?jv(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=jv(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},pv.inverseHyperbolicCosine=pv.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Gg=!1,n=n.times(n).minus(1).sqrt().plus(n),Gg=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},pv.inverseHyperbolicSine=pv.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Gg=!1,n=n.times(n).plus(1).sqrt().plus(n),Gg=!0,r.precision=e,r.rounding=t,n.ln())},pv.inverseHyperbolicTangent=pv.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?yv(new o(i),e,t,!0):(o.precision=n=r-i.e,i=vv(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},pv.inverseSine=pv.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=jv(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},pv.inverseTangent=pv.atan=function(){var e,t,n,r,i,o,a,u,l,c=this,s=c.constructor,f=s.precision,p=s.rounding;if(c.isFinite()){if(c.isZero())return new s(c);if(c.abs().eq(1)&&f+4<=fv)return(a=jv(s,f+4,p).times(.25)).s=c.s,a}else{if(!c.s)return new s(NaN);if(f+4<=fv)return(a=jv(s,f+4,p).times(.5)).s=c.s,a}for(s.precision=u=f+10,s.rounding=1,e=n=Math.min(28,u/cv+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Gg=!1,t=Math.ceil(u/cv),r=1,l=c.times(c),a=new s(c),i=c;-1!==e;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),Gg=!0,yv(a,s.precision=f,s.rounding=p,!0)},pv.isFinite=function(){return!!this.d},pv.isInteger=pv.isInt=function(){return!!this.d&&nv(this.e/cv)>this.d.length-2},pv.isNaN=function(){return!this.s},pv.isNegative=pv.isNeg=function(){return this.s<0},pv.isPositive=pv.isPos=function(){return this.s>0},pv.isZero=function(){return!!this.d&&0===this.d[0]},pv.lessThan=pv.lt=function(e){return this.cmp(e)<0},pv.lessThanOrEqualTo=pv.lte=function(e){return this.cmp(e)<1},pv.logarithm=pv.log=function(e){var t,n,r,i,o,a,u,l,c=this,s=c.constructor,f=s.precision,p=s.rounding;if(null==e)e=new s(10),t=!0;else{if(n=(e=new s(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new s(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new s(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Gg=!1,a=_v(c,u=f+5),r=t?xv(s,u+10):_v(e,u),mv((l=vv(a,r,u,1)).d,i=f,p))do{if(a=_v(c,u+=10),r=t?xv(s,u+10):_v(e,u),l=vv(a,r,u,1),!o){+dv(l.d).slice(i+1,i+15)+1==1e14&&(l=yv(l,f+1,0));break}}while(mv(l.d,i+=10,p));return Gg=!0,yv(l,f,p)},pv.minus=pv.sub=function(e){var t,n,r,i,o,a,u,l,c,s,f,p,d=this,h=d.constructor;if(e=new h(e),!d.d||!e.d)return d.s&&e.s?d.d?e.s=-e.s:e=new h(e.d||d.s!==e.s?d:NaN):e=new h(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(c=d.d,p=e.d,u=h.precision,l=h.rounding,!c[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!c[0])return new h(3===l?-0:0);e=new h(d)}return Gg?yv(e,u,l):e}if(n=nv(e.e/cv),s=nv(d.e/cv),c=c.slice(),o=s-n){for((f=o<0)?(t=c,o=-o,a=p.length):(t=p,n=s,a=c.length),o>(r=Math.max(Math.ceil(u/cv),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((f=(r=c.length)<(a=p.length))&&(a=r),r=0;r<a;r++)if(c[r]!=p[r]){f=c[r]<p[r];break}o=0}for(f&&(t=c,c=p,p=t,e.s=-e.s),a=c.length,r=p.length-a;r>0;--r)c[a++]=0;for(r=p.length;r>o;){if(c[--r]<p[r]){for(i=r;i&&0===c[--i];)c[i]=lv-1;--c[i],c[r]+=lv}c[r]-=p[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(e.d=c,e.e=wv(c,n),Gg?yv(e,u,l):e):new h(3===l?-0:0)},pv.modulo=pv.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?yv(new r(n),r.precision,r.rounding):(Gg=!1,9==r.modulo?(t=vv(n,e.abs(),0,3,1)).s*=e.s:t=vv(n,e,0,r.modulo,1),t=t.times(e),Gg=!0,n.minus(t))},pv.naturalExponential=pv.exp=function(){return Mv(this)},pv.naturalLogarithm=pv.ln=function(){return _v(this)},pv.negated=pv.neg=function(){var e=new this.constructor(this);return e.s=-e.s,yv(e)},pv.plus=pv.add=function(e){var t,n,r,i,o,a,u,l,c,s,f=this,p=f.constructor;if(e=new p(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new p(e.d||f.s===e.s?f:NaN)):e=new p(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(c=f.d,s=e.d,u=p.precision,l=p.rounding,!c[0]||!s[0])return s[0]||(e=new p(f)),Gg?yv(e,u,l):e;if(o=nv(f.e/cv),r=nv(e.e/cv),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,a=s.length):(n=s,r=o,a=c.length),i>(a=(o=Math.ceil(u/cv))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=s.length)<0&&(i=a,n=s,s=c,c=n),t=0;i;)t=(c[--i]=c[i]+s[i]+t)/lv|0,c[i]%=lv;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=wv(c,r),Gg?yv(e,u,l):e},pv.precision=pv.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Jg+e);return n.d?(t=Ov(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},pv.round=function(){var e=this,t=e.constructor;return yv(new t(e),e.e+1,t.rounding)},pv.sine=pv.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+cv,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:Yv(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/Hv(5,n)),t=Yv(e,2,t,t);for(var i,o=new e(5),a=new e(16),u=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(u))));return t}(r,$v(r,n)),r.precision=e,r.rounding=t,yv(Rg>2?n.neg():n,e,t,!0)):new r(NaN)},pv.squareRoot=pv.sqrt=function(){var e,t,n,r,i,o,a=this,u=a.d,l=a.e,c=a.s,s=a.constructor;if(1!==c||!u||!u[0])return new s(!c||c<0&&(!u||u[0])?NaN:u?a:1/0);for(Gg=!1,0==(c=Math.sqrt(+a))||c==1/0?(((t=dv(u)).length+l)%2==0&&(t+="0"),c=Math.sqrt(t),l=nv((l+1)/2)-(l<0||l%2),r=new s(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new s(c.toString()),n=(l=s.precision)+3;;)if(r=(o=r).plus(vv(a,o,n+2,1)).times(.5),dv(o.d).slice(0,n)===(t=dv(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(yv(r,l+1,1),e=!r.times(r).eq(a));break}if(!i&&(yv(o,l+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Gg=!0,yv(r,l,s.rounding,e)},pv.tangent=pv.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=vv(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,yv(2==Rg||4==Rg?n.neg():n,e,t,!0)):new r(NaN)},pv.times=pv.mul=function(e){var t,n,r,i,o,a,u,l,c,s=this,f=s.constructor,p=s.d,d=(e=new f(e)).d;if(e.s*=s.s,!(p&&p[0]&&d&&d[0]))return new f(!e.s||p&&!p[0]&&!d||d&&!d[0]&&!p?NaN:p&&d?0*e.s:e.s/0);for(n=nv(s.e/cv)+nv(e.e/cv),(l=p.length)<(c=d.length)&&(o=p,p=d,d=o,a=l,l=c,c=a),o=[],r=a=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)u=o[i]+d[r]*p[i-r-1]+t,o[i--]=u%lv|0,t=u/lv|0;o[i]=(o[i]+t)%lv|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=wv(o,n),Gg?yv(e,f.precision,f.rounding):e},pv.toBinary=function(e,t){return Iv(this,2,e,t)},pv.toDecimalPlaces=pv.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(hv(e,0,Wg),void 0===t?t=r.rounding:hv(t,0,8),yv(n,e+n.e+1,t))},pv.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=bv(r,!0):(hv(e,0,Wg),void 0===t?t=i.rounding:hv(t,0,8),n=bv(r=yv(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},pv.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=bv(i):(hv(e,0,Wg),void 0===t?t=o.rounding:hv(t,0,8),n=bv(r=yv(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},pv.toFraction=function(e){var t,n,r,i,o,a,u,l,c,s,f,p,d=this,h=d.d,m=d.constructor;if(!h)return new m(d);if(c=n=new m(1),r=l=new m(0),a=(o=(t=new m(r)).e=Ov(h)-d.e-1)%cv,t.d[0]=rv(10,a<0?cv+a:a),null==e)e=o>0?t:c;else{if(!(u=new m(e)).isInt()||u.lt(c))throw Error(Jg+u);e=u.gt(t)?o>0?t:c:u}for(Gg=!1,u=new m(dv(h)),s=m.precision,m.precision=o=h.length*cv*2;f=vv(u,t,0,1,1),1!=(i=n.plus(f.times(r))).cmp(e);)n=r,r=i,i=c,c=l.plus(f.times(i)),l=i,i=t,t=u.minus(f.times(i)),u=i;return i=vv(e.minus(n),r,0,1,1),l=l.plus(i.times(c)),n=n.plus(i.times(r)),l.s=c.s=d.s,p=vv(c,r,o,1).minus(d).abs().cmp(vv(l,n,o,1).minus(d).abs())<1?[c,r]:[l,n],m.precision=s,Gg=!0,p},pv.toHexadecimal=pv.toHex=function(e,t){return Iv(this,16,e,t)},pv.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:hv(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(Gg=!1,n=vv(n,e,0,t,1).times(e),Gg=!0,yv(n)):(e.s=n.s,n=e),n},pv.toNumber=function(){return+this},pv.toOctal=function(e,t){return Iv(this,8,e,t)},pv.toPower=pv.pow=function(e){var t,n,r,i,o,a,u=this,l=u.constructor,c=+(e=new l(e));if(!(u.d&&e.d&&u.d[0]&&e.d[0]))return new l(rv(+u,c));if((u=new l(u)).eq(1))return u;if(r=l.precision,o=l.rounding,e.eq(1))return yv(u,r,o);if((t=nv(e.e/cv))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=Sv(l,u,n,r),e.s<0?new l(1).div(i):yv(i,r,o);if((a=u.s)<0){if(t<e.d.length-1)return new l(NaN);if(0==(1&e.d[t])&&(a=1),0==u.e&&1==u.d[0]&&1==u.d.length)return u.s=a,u}return(t=0!=(n=rv(+u,c))&&isFinite(n)?new l(n+"").e:nv(c*(Math.log("0."+dv(u.d))/Math.LN10+u.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(Gg=!1,l.rounding=u.s=1,n=Math.min(12,(t+"").length),(i=Mv(e.times(_v(u,r+n)),r)).d&&mv((i=yv(i,r+5,1)).d,r,o)&&(t=r+10,+dv((i=yv(Mv(e.times(_v(u,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=yv(i,r+1,0))),i.s=a,Gg=!0,l.rounding=o,yv(i,r,o))},pv.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=bv(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(hv(e,1,Wg),void 0===t?t=i.rounding:hv(t,0,8),n=bv(r=yv(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},pv.toSignificantDigits=pv.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(hv(e,1,Wg),void 0===t?t=n.rounding:hv(t,0,8)),yv(new n(this),e,t)},pv.toString=function(){var e=this,t=e.constructor,n=bv(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},pv.truncated=pv.trunc=function(){return yv(new this.constructor(this),this.e+1,1)},pv.valueOf=pv.toJSON=function(){var e=this,t=e.constructor,n=bv(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var vv=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a,u,l){var c,s,f,p,d,h,m,g,v,y,b,w,x,j,O,E,S,k,D,M,_=r.constructor,A=r.s==i.s?1:-1,P=r.d,T=i.d;if(!(P&&P[0]&&T&&T[0]))return new _(r.s&&i.s&&(P?!T||P[0]!=T[0]:T)?P&&0==P[0]||!T?0*A:A/0:NaN);for(l?(d=1,s=r.e-i.e):(l=lv,d=cv,s=nv(r.e/d)-nv(i.e/d)),D=T.length,S=P.length,y=(v=new _(A)).d=[],f=0;T[f]==(P[f]||0);f++);if(T[f]>(P[f]||0)&&s--,null==o?(j=o=_.precision,a=_.rounding):j=u?o+(r.e-i.e)+1:o,j<0)y.push(1),h=!0;else{if(j=j/d+2|0,f=0,1==D){for(p=0,T=T[0],j++;(f<S||p)&&j--;f++)O=p*l+(P[f]||0),y[f]=O/T|0,p=O%T|0;h=p||f<S}else{for((p=l/(T[0]+1)|0)>1&&(T=e(T,p,l),P=e(P,p,l),D=T.length,S=P.length),E=D,w=(b=P.slice(0,D)).length;w<D;)b[w++]=0;(M=T.slice()).unshift(0),k=T[0],T[1]>=l/2&&++k;do{p=0,(c=t(T,b,D,w))<0?(x=b[0],D!=w&&(x=x*l+(b[1]||0)),(p=x/k|0)>1?(p>=l&&(p=l-1),1==(c=t(m=e(T,p,l),b,g=m.length,w=b.length))&&(p--,n(m,D<g?M:T,g,l))):(0==p&&(c=p=1),m=T.slice()),(g=m.length)<w&&m.unshift(0),n(b,m,w,l),-1==c&&(c=t(T,b,D,w=b.length))<1&&(p++,n(b,D<w?M:T,w,l)),w=b.length):0===c&&(p++,b=[0]),y[f++]=p,c&&b[0]?b[w++]=P[E]||0:(b=[P[E]],w=1)}while((E++<S||void 0!==b[0])&&j--);h=void 0!==b[0]}y[0]||y.shift()}if(1==d)v.e=s,zg=h;else{for(f=1,p=y[0];p>=10;p/=10)f++;v.e=f+s*d-1,yv(v,u?o+v.e+1:o,a,h)}return v}}();function yv(e,t,n,r){var i,o,a,u,l,c,s,f,p,d=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,u=f[0];u>=10;u/=10)i++;if((o=t-i)<0)o+=cv,a=t,l=(s=f[p=0])/rv(10,i-a-1)%10|0;else if((p=Math.ceil((o+1)/cv))>=(u=f.length)){if(!r)break e;for(;u++<=p;)f.push(0);s=l=0,i=1,a=(o%=cv)-cv+1}else{for(s=u=f[p],i=1;u>=10;u/=10)i++;l=(a=(o%=cv)-cv+i)<0?0:s/rv(10,i-a-1)%10|0}if(r=r||t<0||void 0!==f[p+1]||(a<0?s:s%rv(10,i-a-1)),c=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?s/rv(10,i-a):0:f[p-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=rv(10,(cv-t%cv)%cv),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=p,u=1,p--):(f.length=p+1,u=rv(10,cv-o),f[p]=a>0?(s/rv(10,i-a)%rv(10,a)|0)*u:0),c)for(;;){if(0==p){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=u,u=1;a>=10;a/=10)u++;o!=u&&(e.e++,f[0]==lv&&(f[0]=1));break}if(f[p]+=u,f[p]!=lv)break;f[p--]=0,u=1}for(o=f.length;0===f[--o];)f.pop()}return Gg&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function bv(e,t,n){if(!e.isFinite())return Av(e);var r,i=e.e,o=dv(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Ev(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ev(-i-1)+o,n&&(r=n-a)>0&&(o+=Ev(r))):i>=a?(o+=Ev(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Ev(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Ev(r))),o}function wv(e,t){var n=e[0];for(t*=cv;n>=10;n/=10)t++;return t}function xv(e,t,n){if(t>sv)throw Gg=!0,n&&(e.precision=n),Error(Qg);return yv(new e(Vg),t,1,!0)}function jv(e,t,n){if(t>fv)throw Error(Qg);return yv(new e(Xg),t,n,!0)}function Ov(e){var t=e.length-1,n=t*cv+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function Ev(e){for(var t="";e--;)t+="0";return t}function Sv(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/cv+4);for(Gg=!1;;){if(n%2&&Lv((o=o.times(t)).d,a)&&(i=!0),0===(n=nv(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}Lv((t=t.times(t)).d,a)}return Gg=!0,o}function kv(e){return 1&e.d[e.d.length-1]}function Dv(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function Mv(e,t){var n,r,i,o,a,u,l,c=0,s=0,f=0,p=e.constructor,d=p.rounding,h=p.precision;if(!e.d||!e.d[0]||e.e>17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(Gg=!1,l=h):l=t,u=new p(.03125);e.e>-2;)e=e.times(u),f+=5;for(l+=r=Math.log(rv(2,f))/Math.LN10*2+5|0,n=o=a=new p(1),p.precision=l;;){if(o=yv(o.times(e),l,1),n=n.times(++s),dv((u=a.plus(vv(o,n,l,1))).d).slice(0,l)===dv(a.d).slice(0,l)){for(i=f;i--;)a=yv(a.times(a),l,1);if(null!=t)return p.precision=h,a;if(!(c<3&&mv(a.d,l-r,d,c)))return yv(a,p.precision=h,d,Gg=!0);p.precision=l+=10,n=o=u=new p(1),s=0,c++}a=u}}function _v(e,t){var n,r,i,o,a,u,l,c,s,f,p,d=1,h=e,m=h.d,g=h.constructor,v=g.rounding,y=g.precision;if(h.s<0||!m||!m[0]||!h.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=h.s?NaN:m?0:h);if(null==t?(Gg=!1,s=y):s=t,g.precision=s+=10,r=(n=dv(m)).charAt(0),!(Math.abs(o=h.e)<15e14))return c=xv(g,s+2,y).times(o+""),h=_v(new g(r+"."+n.slice(1)),s-10).plus(c),g.precision=y,null==t?yv(h,y,v,Gg=!0):h;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=dv((h=h.times(e)).d)).charAt(0),d++;for(o=h.e,r>1?(h=new g("0."+n),o++):h=new g(r+"."+n.slice(1)),f=h,l=a=h=vv(h.minus(1),h.plus(1),s,1),p=yv(h.times(h),s,1),i=3;;){if(a=yv(a.times(p),s,1),dv((c=l.plus(vv(a,new g(i),s,1))).d).slice(0,s)===dv(l.d).slice(0,s)){if(l=l.times(2),0!==o&&(l=l.plus(xv(g,s+2,y).times(o+""))),l=vv(l,new g(d),s,1),null!=t)return g.precision=y,l;if(!mv(l.d,s-10,v,u))return yv(l,g.precision=y,v,Gg=!0);g.precision=s+=10,c=a=h=vv(f.minus(1),f.plus(1),s,1),p=yv(h.times(h),s,1),i=u=1}l=c,i+=2}}function Av(e){return String(e.s*e.s/0)}function Pv(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%cv,n<0&&(r+=cv),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=cv;r<i;)e.d.push(+t.slice(r,r+=cv));t=t.slice(r),r=cv-t.length}else r-=i;for(;r--;)t+="0";e.d.push(+t),Gg&&(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 Tv(e,t){var n,r,i,o,a,u,l,c,s;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),uv.test(t))return Pv(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(ov.test(t))n=16,t=t.toLowerCase();else if(iv.test(t))n=2;else{if(!av.test(t))throw Error(Jg+t);n=8}for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(u=(t=t.replace(".","")).length)-o,i=Sv(r,new r(n),o,2*o)),o=s=(c=gv(t,n,lv)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=wv(c,s),e.d=c,Gg=!1,a&&(e=vv(e,i,4*u)),l&&(e=e.times(Math.abs(l)<54?rv(2,l):Ey.pow(2,l))),Gg=!0,e)}function Yv(e,t,n,r,i){var o,a,u,l,c=e.precision,s=Math.ceil(c/cv);for(Gg=!1,l=n.times(n),u=new e(r);;){if(a=vv(u.times(l),new e(t++*t++),c,1),u=i?r.plus(a):r.minus(a),r=vv(a.times(l),new e(t++*t++),c,1),void 0!==(a=u.plus(r)).d[s]){for(o=s;a.d[o]===u.d[o]&&o--;);if(-1==o)break}o=u,u=r,r=a,a=o}return Gg=!0,a.d.length=s+1,a}function Hv(e,t){for(var n=e;--t;)n*=e;return n}function $v(e,t){var n,r=t.s<0,i=jv(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return Rg=r?4:1,t;if((n=t.divToInt(i)).isZero())Rg=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return Rg=kv(n)?r?2:3:r?4:1,t;Rg=kv(n)?r?1:4:r?3:2}return t.minus(i).abs()}function Iv(e,t,n,r){var i,o,a,u,l,c,s,f,p,d=e.constructor,h=void 0!==n;if(h?(hv(n,1,Wg),void 0===r?r=d.rounding:hv(r,0,8)):(n=d.precision,r=d.rounding),e.isFinite()){for(h?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(a=(s=bv(e)).indexOf("."))>=0&&(s=s.replace(".",""),(p=new d(1)).e=s.length-a,p.d=gv(bv(p),10,i),p.e=p.d.length),o=l=(f=gv(s,10,i)).length;0==f[--l];)f.pop();if(f[0]){if(a<0?o--:((e=new d(e)).d=f,e.e=o,f=(e=vv(e,p,n,r,0,i)).d,o=e.e,c=zg),a=f[n],u=i/2,c=c||void 0!==f[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(e.s<0?3:2)):a>u||a===u&&(4===r||c||6===r&&1&f[n-1]||r===(e.s<0?8:7)),f.length=n,c)for(;++f[--n]>i-1;)f[n]=0,n||(++o,f.unshift(1));for(l=f.length;!f[l-1];--l);for(a=0,s="";a<l;a++)s+=qg.charAt(f[a]);if(h){if(l>1)if(16==t||8==t){for(a=16==t?4:3,--l;l%a;l++)s+="0";for(l=(f=gv(s,i,t)).length;!f[l-1];--l);for(a=1,s="1.";a<l;a++)s+=qg.charAt(f[a])}else s=s.charAt(0)+"."+s.slice(1);s=s+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)s="0"+s;s="0."+s}else if(++o>l)for(o-=l;o--;)s+="0";else o<l&&(s=s.slice(0,o)+"."+s.slice(o))}else s=h?"0p+0":"0";s=(16==t?"0x":2==t?"0b":8==t?"0o":"")+s}else s=Av(e);return e.s<0?"-"+s:s}function Lv(e,t){if(e.length>t)return e.length=t,!0}function Cv(e){return new this(e).abs()}function Nv(e){return new this(e).acos()}function Bv(e){return new this(e).acosh()}function Fv(e,t){return new this(e).plus(t)}function zv(e){return new this(e).asin()}function Rv(e){return new this(e).asinh()}function Uv(e){return new this(e).atan()}function Wv(e){return new this(e).atanh()}function qv(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?jv(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=jv(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(vv(e,t,o,1)),t=jv(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(vv(e,t,o,1)):(n=jv(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function Vv(e){return new this(e).cbrt()}function Xv(e){return yv(e=new this(e),e.e+1,2)}function Zv(e,t,n){return new this(e).clamp(t,n)}function Gv(e){if(!e||"object"!=typeof e)throw Error(Kg+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,Wg,"rounding",0,8,"toExpNeg",-Ug,0,"toExpPos",0,Ug,"maxE",0,Ug,"minE",-Ug,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=Zg[n]),void 0!==(r=e[n])){if(!(nv(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(Jg+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=Zg[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Jg+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(ev);this[n]=!0}else this[n]=!1}return this}function Kv(e){return new this(e).cos()}function Jv(e){return new this(e).cosh()}function Qv(e,t){return new this(e).div(t)}function ey(e){return new this(e).exp()}function ty(e){return yv(e=new this(e),e.e+1,3)}function ny(){var e,t,n=new this(0);for(Gg=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return Gg=!0,new this(1/0);n=t}return Gg=!0,n.sqrt()}function ry(e){return e instanceof Ey||e&&e.toStringTag===tv||!1}function iy(e){return new this(e).ln()}function oy(e,t){return new this(e).log(t)}function ay(e){return new this(e).log(2)}function uy(e){return new this(e).log(10)}function ly(){return Dv(this,arguments,"lt")}function cy(){return Dv(this,arguments,"gt")}function sy(e,t){return new this(e).mod(t)}function fy(e,t){return new this(e).mul(t)}function py(e,t){return new this(e).pow(t)}function dy(e){var t,n,r,i,o=0,a=new this(1),u=[];if(void 0===e?e=this.precision:hv(e,1,Wg),r=Math.ceil(e/cv),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:u[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(ev);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(u.push(i%1e7),o+=4);o=r/4}else for(;o<r;)u[o++]=1e7*Math.random()|0;for(r=u[--o],e%=cv,r&&e&&(i=rv(10,cv-e),u[o]=(r/i|0)*i);0===u[o];o--)u.pop();if(o<0)n=0,u=[0];else{for(n=-1;0===u[0];n-=cv)u.shift();for(r=1,i=u[0];i>=10;i/=10)r++;r<cv&&(n-=cv-r)}return a.e=n,a.d=u,a}function hy(e){return yv(e=new this(e),e.e+1,this.rounding)}function my(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function gy(e){return new this(e).sin()}function vy(e){return new this(e).sinh()}function yy(e){return new this(e).sqrt()}function by(e,t){return new this(e).sub(t)}function wy(){var e=0,t=arguments,n=new this(t[e]);for(Gg=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return Gg=!0,yv(n,this.precision,this.rounding)}function xy(e){return new this(e).tan()}function jy(e){return new this(e).tanh()}function Oy(e){return yv(e=new this(e),e.e+1,1)}pv[Symbol.for("nodejs.util.inspect.custom")]=pv.toString,pv[Symbol.toStringTag]="Decimal";var Ey=pv.constructor=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,ry(e))return i.s=e.s,void(Gg?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(Gg?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):Pv(i,e.toString())}if("string"!==r)throw Error(Jg+e);return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),uv.test(e)?Pv(i,e):Tv(i,e)}if(o.prototype=pv,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=Gv,o.clone=e,o.isDecimal=ry,o.abs=Cv,o.acos=Nv,o.acosh=Bv,o.add=Fv,o.asin=zv,o.asinh=Rv,o.atan=Uv,o.atanh=Wv,o.atan2=qv,o.cbrt=Vv,o.ceil=Xv,o.clamp=Zv,o.cos=Kv,o.cosh=Jv,o.div=Qv,o.exp=ey,o.floor=ty,o.hypot=ny,o.ln=iy,o.log=oy,o.log10=uy,o.log2=ay,o.max=ly,o.min=cy,o.mod=sy,o.mul=fy,o.pow=py,o.random=dy,o.round=hy,o.sign=my,o.sin=gy,o.sinh=vy,o.sqrt=yy,o.sub=by,o.sum=wy,o.tan=xy,o.tanh=jy,o.trunc=Oy,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(Zg);Vg=new Ey(Vg),Xg=new Ey(Xg);var Sy=la("floor");var ky=ji(Ti());var Dy,My={exports:{}},_y={exports:{}};!function(e,t){var n;e.exports=(n=ki(),Dy||(Dy=1,function(e,t){var n,r,i,o,a,u,l;e.exports=(i=(r=l=ki()).lib,o=i.Base,a=i.WordArray,(u=r.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),u.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=n?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return a.create(n,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),l)}(_y)),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,a=e.algo;function u(){return i.create.apply(i,arguments)}var l=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=u()}();var s=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],u=n[4],s=n[5],f=n[6],p=n[7],d=r.high,h=r.low,m=i.high,g=i.low,v=o.high,y=o.low,b=a.high,w=a.low,x=u.high,j=u.low,O=s.high,E=s.low,S=f.high,k=f.low,D=p.high,M=p.low,_=d,A=h,P=m,T=g,Y=v,H=y,$=b,I=w,L=x,C=j,N=O,B=E,F=S,z=k,R=D,U=M,W=0;W<80;W++){var q,V,X=c[W];if(W<16)V=X.high=0|e[t+2*W],q=X.low=0|e[t+2*W+1];else{var Z=c[W-15],G=Z.high,K=Z.low,J=(G>>>1|K<<31)^(G>>>8|K<<24)^G>>>7,Q=(K>>>1|G<<31)^(K>>>8|G<<24)^(K>>>7|G<<25),ee=c[W-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[W-7],ae=oe.high,ue=oe.low,le=c[W-16],ce=le.high,se=le.low;V=(V=(V=J+ae+((q=Q+ue)>>>0<Q>>>0?1:0))+re+((q+=ie)>>>0<ie>>>0?1:0))+ce+((q+=se)>>>0<se>>>0?1:0),X.high=V,X.low=q}var fe,pe=L&N^~L&F,de=C&B^~C&z,he=_&P^_&Y^P&Y,me=A&T^A&H^T&H,ge=(_>>>28|A<<4)^(_<<30|A>>>2)^(_<<25|A>>>7),ve=(A>>>28|_<<4)^(A<<30|_>>>2)^(A<<25|_>>>7),ye=(L>>>14|C<<18)^(L>>>18|C<<14)^(L<<23|C>>>9),be=(C>>>14|L<<18)^(C>>>18|L<<14)^(C<<23|L>>>9),we=l[W],xe=we.high,je=we.low,Oe=R+ye+((fe=U+be)>>>0<U>>>0?1:0),Ee=ve+me;R=F,U=z,F=N,z=B,N=L,B=C,L=$+(Oe=(Oe=(Oe=Oe+pe+((fe+=de)>>>0<de>>>0?1:0))+xe+((fe+=je)>>>0<je>>>0?1:0))+V+((fe+=q)>>>0<q>>>0?1:0))+((C=I+fe|0)>>>0<I>>>0?1:0)|0,$=Y,I=H,Y=P,H=T,P=_,T=A,_=Oe+(ge+he+(Ee>>>0<ve>>>0?1:0))+((A=fe+Ee|0)>>>0<fe>>>0?1:0)|0}h=r.low=h+A,r.high=d+_+(h>>>0<A>>>0?1:0),g=i.low=g+T,i.high=m+P+(g>>>0<T>>>0?1:0),y=o.low=y+H,o.high=v+Y+(y>>>0<H>>>0?1:0),w=a.low=w+I,a.high=b+$+(w>>>0<I>>>0?1:0),j=u.low=j+C,u.high=x+L+(j>>>0<C>>>0?1:0),E=s.low=E+B,s.high=O+N+(E>>>0<B>>>0?1:0),k=f.low=k+z,f.high=S+F+(k>>>0<z>>>0?1:0),M=p.low=M+U,p.high=D+R+(M>>>0<U>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(s),e.HmacSHA512=t._createHmacHelper(s)}(),n.SHA512)}(My);var Ay=ji(My.exports);function Py(e,t){return $e(e)&&$e(t)?function(e,t){if(e=e.replace(/\s+/g,""),t=t.replace(/\s+/g,""),!e.length&&!t.length)return 1;if(!e.length||!t.length)return 0;if(e===t)return 1;if(1===e.length&&1===t.length)return 0;if(e.length<2||t.length<2)return 0;let n=new Map;for(let t=0;t<e.length-1;t++){const r=e.substring(t,t+2),i=n.has(r)?n.get(r)+1:1;n.set(r,i)}let r=0;for(let e=0;e<t.length-1;e++){const i=t.substring(e,e+2),o=n.has(i)?n.get(i):0;o>0&&(n.set(i,o-1),r++)}return 2*r/(e.length+t.length-2)}(e,t):0}var Ty=NaN;function Yy(e){return function(e,t){var n=null==e?0:e.length;return n?qu(e,t)/n:Ty}(e,Bn)}function Hy(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="";if($e(e)||Ce(e))r=Ju(e);else{if(!vr(e))return!!n&&0;r=Ca(e,"")}if(""===t)return!n||100;if(gr(t))return!!n&&0;if(hl(r,t))return!n||100;let i=Au(t," "),o=function(){let e=ni();return d||e.Fuse}(),a=or(i,(function(e){return((e,t)=>{let n=new o([e],{includeScore:!0}).search(t);n=Ae(n,0);let r=Ae(n,"score",1);return r=1-r,r*=100,r})(r,e)}));if(n)return Yy(a);{let e=80;return Wn(a,(function(t){return t>=e}))}}function $y(e){if(!Te(e))return{};let{results:t,binarys:n}=e;if(!$e(t))return{};if(!Ye(n))return{};let r={};try{r=JSON.parse(t,(function(e,t){if($e(t)){if(t.indexOf("[Uint8Array]::")>=0){let e=sa(t.replace("[Uint8Array]::",""));return n[e]}if(t.indexOf("[Uint16Array]::")>=0){let e=sa(t.replace("[Uint16Array]::",""));return n[e]}if(t.indexOf("[ArrayBuffer]::")>=0){let e=sa(t.replace("[ArrayBuffer]::",""));return n[e]}}return t}))}catch(e){}return r}function Iy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!zu(n))throw new Error("invalid dayjs");if(!lg(e))return{today:null,msg:"",err:"時間格式錯誤"};let r=n();lg(t)&&(r=n(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=n(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r>i)return{today:null,msg:"",err:"時間已過"};let o,a=r.format("YYYY-MM-DD"),u=i.format("YYYY-MM-DD"),l=n(a,"YYYY-MM-DD"),c=n(u,"YYYY-MM-DD"),s=i.diff(r,"seconds"),f=i.diff(r,"minutes"),p=i.diff(r,"hours"),d=c.diff(l,"days"),h=c.diff(l,"weeks"),m=c.diff(l,"months"),g=c.diff(l,"years"),v="即將到來";if(s>=0&&(o=!0,v=s+"秒後"),f>0&&(o=!0,v=f+"分鐘後"),p>0){let e=i.format("HH:mm");a===u?(o=!0,v=p+"小時後,今天"+e):(o=!1,v=p+"小時後,明天"+e)}return d>1&&(o=!1,v=2===d?"後天":d+"天後"),h>0&&(o=!1,v=h+"周後"),m>0&&(o=!1,v=m+"個月後"),g>0&&(o=!1,v=g+"年後"),{today:o,msg:v,err:""}}function Ly(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!zu(n))throw new Error("invalid dayjs");if(!lg(e))return{today:null,msg:"",err:"時間格式錯誤"};let r=n();lg(t)&&(r=n(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=n(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r<i)return{today:null,msg:"",err:"時間未到"};let o=r.format("YYYY-MM-DD"),a=i.format("YYYY-MM-DD"),u=n(o,"YYYY-MM-DD"),l=n(a,"YYYY-MM-DD"),c=r.diff(i,"seconds"),s=r.diff(i,"minutes"),f=r.diff(i,"hours"),p=u.diff(l,"days"),d=u.diff(l,"weeks"),h=u.diff(l,"months"),m=u.diff(l,"years"),g=!1,v="剛剛";if(c>=0&&(g=!0,v=c+"秒前"),s>0&&(g=!0,v=s+"分鐘前"),f>0){let e=i.format("HH:mm");o===a?(g=!0,v=f+"小時前"):(g=!1,v="昨天"+e)}return p>1&&(g=!1,v=p+"天前"),d>0&&(g=!1,v=d+"周前"),h>0&&(g=!1,v=h+"個月前"),m>0&&(g=!1,v=m+"年前"),{today:g,msg:v,err:""}}function Cy(e){let t=ug.sepTZ(e);return e=`${t.t}.000${t.tz}`}function Ny(e){let t=ug.sepTZ(e);return e=`${t.t}.000${t.tz}`}function By(e){if(!fl(e))return"";let t;try{t=ll(Og(e))}catch(e){return""}return t}e.ab2blob=function(e){let t=v(e);return new Blob([t])},e.ab2u8arr=v,e.addExcelWorksheetFromData=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"data";if(!Te(e))return{error:"wb is not an effective object"};if(!Ye(Ae(e,"SheetNames")))return{error:"wb.SheetNames is not an array"};if(!Pe(Ae(e,"Sheets")))return{error:"wb.Sheets is not an object"};let r=ii(t);return Ne(r,"error")?r:(e.SheetNames.push(n),e.Sheets[n]=r,e)},e.addMonth=function(e,t){return oi(e)&&wi(t)?n(e,"YYYY-MM").add(t,"months").format("YYYY-MM"):""},e.aes2str=Xi,e.alive=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=oa(),n={},r=null,i=Ae(e,"timeAlive");fa(i)||(i=1e4),i=sa(i);let o=Ae(e,"timeDetect");return fa(o)||(o=50),o=sa(o),t.trigger=function(e,a){$e(e)?(Ne(n,e)||setTimeout((()=>{t.emit("message",{eventName:"enter",key:e,data:a,now:Xr(n)})}),1),n[e]={data:a,time:Date.now()},null===r&&(r=setInterval((()=>{rr(n,((e,r)=>{if(Date.now()-e.time>i){let e=na(n[r]);delete n[r],t.emit("message",{eventName:"leave",key:r,data:e.data,now:Xr(n)})}})),Te(n)||(clearInterval(r),r=null)}),o))):console.log("trigger need key")},t.get=function(){let e=[];return rr(n,((t,n)=>{e.push({key:n,data:t.data})})),e=na(e),e},t},e.arr2dt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!vr(e))return{};if(vr(t))return Xr(e)===Xr(t)?pa(e,t):{};let n=[];for(let r=0;r<Xr(e);r++)n.push(na(t));return pa(e,n)},e.arrAccum=function(e){if(!vr(e))return[];let t=[],n=0;return rr(e,(function(e){n+=bi(e),Ce(e)?t.push(n):t.push("")})),t},e.arrAdd=function(){if(Xr(arguments)<2)return[];let e=arguments[0];for(let t=1;t<Xr(arguments);t++){e=da(e,arguments[t])}return e},e.arrAt=Ya,e.arrDiff=Du,e.arrFilterByKeywords=function(e,t){if(!vr(e))return[];if(!$e(t)&&!vr(t))return[];let n=null;n=$e(t)?Au(t," "):t;let r=Xr(n);return or(e,(e=>function(e){let t=!1,i=0;for(let o=0;o<r;o++){let a=n[o],u=a,l="+"===Pu(a,1),c="-"===Pu(a,1);if((l||c)&&(u=Yu(a,1)),""===Mu(u))continue;let s=e.indexOf(u)>=0;if(l){if(s){t=!0,i=1;break}t=!1,i=0;break}if(c){if(s){t=!1,i=0;break}t=!0,i=1;break}if(s){t=!0;let e=1-o/r;e=e**2,i+=e}}return{hasKeyword:t,weight:i}}(e)))},e.arrFilterByNum=function(e){return vr(e)?e=or(e=$u(e=na(e),Ce),bi):[]},e.arrFilterByPnum=Lu,e.arrFilterByPnumAndToLog=function(e){return vr(e)?e=or(e=Lu(e),Math.log):[]},e.arrFind=function(e,t){function n(e){return Ye(e)?e:[e]}return gr(e)||0===(e=n(e)).length||gr(t)?[]:or(t=n(t),(function(t){let n=-1;for(let r=0;r<e.length;r++)if(Cu(e[r],t)){n=r;break}return n}))},e.arrGroupByMaxmin=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"keyMax");$e(r)||(r="max");let i=Ae(n,"keyMin");$e(i)||(i="min");let o=Ae(n,"keyValue");$e(o)||(o="value");let a=Ae(n,"keyItems");if($e(a)||(a="items"),!vr(e))return[];if(!vr(t))return[];let u=na(t);return rr(e,((e,n)=>{let l=Ae(e,o);Ce(l)?l=bi(l):Ce(e)&&(l=bi(e)),Bu(l)&&rr(t,((t,n)=>{let o=Ae(t,r,null),c=Ae(t,i,null);if(null!==o&&null!==c&&Ce(o)&&Ce(c)){let r=Ae(t,"maxType");"<="!==r&&"<"!==r&&(r="<=");let i,s,f=Ae(t,"minType");">="!==f&&">"!==f&&(f=">="),o=bi(o),c=bi(c),i=">="===f?l>=c:l>c,s="<="===r?l<=o:l<o,i&&s&&(Ne(u[n],a)||(u[n][a]=[]),u[n][a].push(e))}}))})),u},e.arrHas=Fu,e.arrInsert=function(e,t,n){if(!Ye(e))return[];if(Ye(n)||(n=[n]),!Ta(t))return e;if((t=sa(t))>Xr(e))return e;let r=e;try{r=[...e.slice(0,t),...n,...e.slice(t)]}catch(e){}return r},e.arrLookupByMaxmin=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"keyMax");$e(r)||(r="max");let i=Ae(n,"keyMin");$e(i)||(i="min");let o=Ae(n,"keyValue");$e(o)||(o="value");let a=Ae(n,"keyItems");$e(a)||(a="items");let u=Ae(n,"beforeAddResult",null);if(!vr(e))return[];if(!vr(t))return[];if(!Te(Ae(e,0)))return[];let l=na(e);return rr(l,((e,n)=>{let c=Ae(e,o);Ce(c)&&(c=bi(c)),Bu(c)&&rr(t,((e,t)=>{let o=Ae(e,r,null),s=Ae(e,i,null);if(null!==o&&null!==s&&Ce(o)&&Ce(s)){let t=Ae(e,"maxType");"<="!==t&&"<"!==t&&(t="<=");let r,i,f=Ae(e,"minType");">="!==f&&">"!==f&&(f=">="),o=bi(o),s=bi(s),r=">="===f?c>=s:c>s,i="<="===t?c<=o:c<o,r&&i&&(zu(u)&&(e=u(e,l[n],n)),Ne(l[n],a)||(l[n][a]=[]),l[n][a].push(e))}}))})),l},e.arrMax=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return null;let n=Ae(t,"returnIndex");Kr(n)||(n=!1);let r=Ae(t,"compareKey",null),i=e;$e(r)&&(i=or(e,((e,t)=>Ae(e,r,""))));let o=null,a=Ru(i,((e,t)=>Ce(t)?(t=bi(t),null===e?(o=t,t):(e=Math.max(e,t),o=e,e)):e),{returnIndex:!0});if(n)return a;let u=null;return a>=0&&(u=$e(r)?e[a]:o),u},e.arrMin=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return null;let n=Ae(t,"returnIndex");Kr(n)||(n=!1);let r=Ae(t,"compareKey",null),i=e;$e(r)&&(i=or(e,((e,t)=>Ae(e,r,""))));let o=null,a=Ru(i,((e,t)=>Ce(t)?(t=bi(t),null===e?(o=t,t):(e=Math.min(e,t),o=e,e)):e),{returnIndex:!0});if(n)return a;let u=null;return a>=0&&(u=$e(r)?e[a]:o),u},e.arrMulti=Wu,e.arrNorm=function(e){if(!vr(e))return null;let t=Vu(e,e);return Ce(t)?t<=0?null:Math.sqrt(t):null},e.arrProduct=Vu,e.arrReduce=Ru,e.arrSep=function(e,t){if(!vr(e))return[];if(!fa(t)&&!Te(t))return[];let n="",r=null;if(fa(t))r=t,n="numCount";else if(Te(t))if(fa(Ae(t,"numCount")))r=t.numCount,n="numCount";else{if(!fa(Ae(t,"numGroup")))throw new Error("invalid opt.numCount or opt.numGroup");r=t.numGroup,n="numGroup"}let i=Xr(e),o=[];if("numCount"===n)for(let t=0;t<i;t+=r){let n=[];for(let o=0;o<r;o++){let r=t+o;r<i&&n.push(e[r])}o.push(n)}else if("numGroup"===n){for(let e=0;e<r;e++)o[e]=[];let t=-1;for(let n=0;n<i;n++)t++,t>r-1&&(t=0),o[t].push(e[n])}return o},e.arrSort=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return[];if(1===Xr(e))return e;let n=Ae(t,"localeCompare");Kr(n)||(n=!1);let r=Ae(t,"returnIndex");Kr(r)||(r=!1);let i=Ae(t,"compareKey",null),o=null;o=n?ul:al;let a,u=il(e);if(""===u)return[];if("obj"===u){if(!$e(i))return[];let t=or(e,((e,t)=>Ae(e,i,""))),u=il(t);if("num"!==u&&"str"!==u)return[];{n&&(u="files");let i=o(ol(t,u),!0);a=r?i:or(i,(t=>e[t]))}}else if("num"===u||"str"===u){n&&(u="files"),a=o(ol(e,u),r)}return a},e.asind=function(e){return Ce(e)?(e=bi(e),180*Math.asin(e)/Math.PI):null},e.atan2d=function(e,t){return Ce(e)?(e=bi(e),Ce(t)?(t=bi(t),180*Math.atan2(t,e)/Math.PI):null):null},e.atand=function(e){return Ce(e)?(e=bi(e),180*Math.atan(e)/Math.PI):null},e.attstr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=";",n="@",r="table",i="id",o=Ae(e,"uniqItems");Kr(o)||(o=!1);let a=Ae(e,"dlmItem","");$e(a)&&(t=a);let u=Ae(e,"dlmSep","");$e(u)&&(n=u);let l=Ae(e,"keyTable","");$e(l)&&(r=l);let c=Ae(e,"keyId","");function s(e){if(!$e(e))return[];let n=ru(e,t);return o&&(n=Dr(n)),n}function f(e){if(!vr(e))return"";return o&&(e=Dr(e)),Ca(e,t)}function p(e){return e=$u(e,$e),o&&(e=Dr(e)),f(e)}function d(e){let t=[];return rr(e,(e=>{let o=Ae(e,r,""),a=Ae(e,i,"");if($e(o),He(a)||(Ye(a)?Xr(a):a=""),He(a))t.push(`${o}${n}${a}`);else if(Ye(a)){let e=Ca(a,n);t.push(`${o}${n}${e}`)}})),e=f(t)}function h(e){if(!$e(e))return[];return $u(s(e),$e)}function m(e){if(!$e(e))return[];let t=s(e),o=[];return rr(t,(e=>{let t=ru(e,n),a=Ae(t,0,""),u=Ae(t,1,"");Xr(t)>=3&&(t=Qu(t),u=t),o.push({item:e,[r]:a,[i]:u})})),o}function g(e,t){let n=[...h(e),...h(t)];return 0===Xr(n)?"":p(n)}function v(e,t){let n=[...m(e),...m(t)];return 0===Xr(n)?"":d(n)}function y(e,t){let n=h(e),r=h(t),i=[];return rr(n,(e=>{Fu(e,r)||i.push(e)})),0===Xr(i)?"":p(i)}function b(e,t){let n=m(e),r=m(t),i=[];return rr(n,(e=>{Fu(e,r)||i.push(e)})),0===Xr(i)?"":d(i)}$e(c)&&(i=c);let w={parse:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!$e(e))return[];let r=Ae(t,"mode");return"1p"!==r&&"2p"!==r&&(r="auto"),"1p"===r?h(e):"2p"===r||e.indexOf(n)>=0?m(e):h(e)},join:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return"";let n=Ae(t,"mode");if("1p"!==n&&"2p"!==n&&(n="auto"),"1p"===n)return p(e);if("2p"===n)return d(e);let o=Ae(e,0);return Ne(o,r)&&Ne(o,i)?d(e):p(e)},remove:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!$e(e))return"";if(!$e(t))return e;let i=Ae(r,"mode");return"1p"!==i&&"2p"!==i&&(i="auto"),"1p"===i?y(e,t):"2p"===i||t.indexOf(n)>=0?b(e,t):y(e,t)},add:function(e,t){let r=Ae(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},"mode");if("1p"!==r&&"2p"!==r&&(r="auto"),"1p"===r)return g(e,t);if("2p"===r)return v(e,t);let i=e.indexOf(n)>=0,o=t.indexOf(n)>=0;return i||o?v(e,t):g(e,t)}};return w},e.b642obj=function(e){if(!He(e))return{};let t={};try{t=cl(ll(e))}catch(e){t={}}return t},e.b642str=ll,e.b642u16arr=dl,e.b642u8arr=sl,e.binstr=hl,e.blob2ab=gl,e.blob2b64=vl,e.blob2str=function(e){let t=ml(),n=new FileReader;return n.onload=function(){t.resolve(n.result)},n.onerror=function(e){t.reject(e)},n.readAsText(e),t},e.blob2u8arr=yl,e.blobs2b64s=bl,e.blobs2u8arrs=wl,e.bodyLog=function(){let e=`\n <div style="padding:5px; font-size:10pt; font-family:Microsoft JhengHei, Helvetica;">\n <span style="color:#f26;">log: </span>\n <code>${xl(or(arguments,(function(e){return Jr(e)})).join(", "))}</code>\n </div>\n `;document.querySelector("body").insertAdjacentHTML("beforeend",e)},e.browserView=jl,e.browserViewFromBlob=function(e,t){Ol(e)&&jl(e,t)},e.browserViewFromText=function(e){He(e)&&jl(e,"text/plain")},e.browserViewFromU8arr=function(e,t){fl(e)&&jl(e,t)},e.bs2u8arr=El,e.bufRead=Sl,e.bufReadDbl=kl,e.bufWrite=Dl,e.bufWriteDbl=Ml,e.cache=function(){let e=oa(),t={};function n(t,n){setTimeout((()=>{e.emit(t,n)}),1)}function r(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ne(t,e))return;let i=Ae(r,"fun");zu(i)||(i=async()=>{});let o=Ae(r,"inputs");Ye(o)||(o=[]);let a=Ae(r,"timeExpired");fa(a)||(a=5e3),a=sa(a),t[e]={needExec:!0,fun:i,running:!1,inputs:o,value:null,time:null,timeExpired:a},n("message",{fun:"set",key:e,timeExpired:a})}async function i(e){if(Ne(t,e)){let r;n("message",{fun:"get",key:e,msg:"waiting"}),await Al((()=>!t[e].running),{timeInterval:1e3});let i=Date.now();r=t[e].needExec;let o=i-t[e].time;return r?n("message",{fun:"get",key:e,msg:"execute first"}):t[e].timeExpired>0&&o>t[e].timeExpired&&(n("message",{fun:"get",key:e,msg:"execute by timeExpired",timeDiff:o}),r=!0),r?(n("message",{fun:"get",key:e,msg:"fun start"}),t[e].running=!0,t[e].value=await t[e].fun(...t[e].inputs).catch((t=>{n("error",{fun:"get",key:e,msg:t})})),t[e].needExec=!1,t[e].time=i,t[e].running=!1,n("message",{fun:"get",key:e,msg:"fun end"})):n("message",{fun:"get",key:e,msg:"use cache"}),na(t[e].value)}return n("error",{fun:"get",key:e,msg:"invalid key"}),null}return e.set=r,e.getProxy=async function(e){return r(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),i(e)},e.get=i,e.update=function(e,r){Ne(t,e)&&(n("message",{fun:"updateValue",key:e}),t[e].value=r,t[e].time=Date.now())},e.clear=function(e){Ne(t,e)&&(n("message",{fun:"clear",key:e}),t[e].needExec=!0)},e.remove=function(e){Ne(t,e)&&(n("message",{fun:"remove",key:e}),delete t[e])},e},e.cbol=function(e){if(Kr(e))return e;if(0===e)return!1;if(1===e)return!0;let t=!1;return $e(e)&&"true"===(e=Pl(Mu(e)))&&(t=!0),t},e.cdbl=bi,e.cfilesize=function(e){return Ce(e)?(e=bi(e))<1024?Tl(e,1)+" b":e<1048576?Tl(e/1024,1)+" kb":e<1073741824?Tl(e/1024/1024,1)+" mb":e<1099511627776?Tl(e/1024/1024/1024,1)+" gb":"":""},e.cfinancial=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Ce(e))return"";if(!Ta(t))return"";let n=(e=Tl(e,t)).split("."),r=n[0],i=n.length>1?"."+n[1]:"",o=/(\d+)(\d{3})/;for(;o.test(r);)r=r.replace(o,"$1,$2");return r+i},e.cint=sa,e.clearXSS=function(e){return function e(t){return Ye(t)||Pe(t)?(rr(t,(function(n,r){t[r]=e(n)})),t):He(t)?r(t,{onIgnoreTagAttr:function(e,t,n,i){if("style"===t)return t+'="'+r.escapeAttrValue(n)+'"'}}):t}(na(e))},e.color=Cc,e.composeToTree=Vc,e.convertToTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Te(e)&&!vr(e))return[];let n=Ae(t,"bindKey",null);$e(n)||(n="id");let r=Ae(t,"bindParent",null);$e(r)||(r="parentId");let i=Ae(t,"bindText",null);$e(i)||(i="text");let o=Ae(t,"bindChildren",null);$e(o)||(o="children");let a=Ae(t,"bindType",null);$e(a)||(a="type");let u=Ae(t,"bindNumOfChilren",null);$e(u)||(u="numOfChilren");let l=Ae(t,"bindRoot",null);$e(l)||(l="root");let c=Ae(t,"saveExtProps",null);return Kr(c)||(c=!1),$e(l)&&(e={[l]:e}),Vc(Zc(e,{bindKey:n,bindParent:r,bindText:i,bindType:a,bindNumOfChilren:u}),{bindKey:n,bindParent:r,bindChildren:o,saveExtProps:c})},e.copyStrToClipboard=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!He(e))return"invalid input";let n=Ae(t,"eleParent");er(n)||(n=document.body);let r=document.createElement("textarea");if(r.style.position="fixed",r.style.left=0,r.style.top=0,r.style.zIndex=-1,r.style.background="transparent",r.style.color="transparent",r.value=e,n.appendChild(r),r.select(),!Gc(r))return"ele can not be focusd";try{document.execCommand("copy")}catch(e){return"can not copy str to clipboard"}return n.removeChild(r),""},e.cosd=Kc,e.cotd=function(e){return Ce(e)?1/Jc(e=bi(e)):null},e.createExcelWorkbook=Qc,e.cscd=function(e){return Ce(e)?1/es(e=bi(e)):null},e.cstr=Ju,e.day2cht=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!ts(e))return"";let r=n(e,"YYYY-MM-DD"),i="";return i=t?r.month()+1+"月"+r.date()+"日":"民國 "+(r.year()-1911)+" 年 "+(r.month()+1)+" 月 "+r.date()+" 日",i},e.debounce=function(){return new function(e){let t=[],n=null,r=null;return fa(e)||(e=300),e=sa(e),function(i){if(zu(i)){r=Date.now();for(var o=arguments.length,a=new Array(o>1?o-1:0),u=1;u<o;u++)a[u-1]=arguments[u];t.push({func:i,input:a}),null===n&&(n=setInterval((()=>{if(Date.now()-r>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(n),n=null)}),10))}else console.log("func is not a function")}}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:300)},e.delay=ns,e.dig=Tl,e.digExp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Ce(e))return"";if(!Ta(t))return"";let n="";return n=0===(e=bi(e))?"0":Math.abs(e)<=1e-6?e.toExponential(t):Tl(e,t),n},e.domAlert=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!$e(e))return;let n=Ae(t,"type","success");Ne(cs,n)||(n="success");let r=Ae(t,"icon",null);$e(r)||(r=cs[n]);let i="top-right";"top-left"!==t.position&&"bottom-right"!==t.position&&"bottom-left"!==t.position||(i=t.position);let o=Ae(t,"time");Bu(o)||(o=4e3),o<0&&(o=4e3);let a=Ae(t,"paddingStyle",null);null===a&&(a={top:14,right:26,bottom:14,left:14});let u="";{let e=Ae(a,"top",0),t=Ae(a,"bottom",0),n=Ae(a,"left",0);u=`padding:${e}px ${Ae(a,"right",0)}px ${t}px ${n}px;`}let l=Ae(t,"textColor","#000");l=Hl(l,";","");let c=Ae(t,"backgroundColor","#fff");c=Hl(c,";","");let s=Ae(t,"borderWidth",1),f=Ae(t,"borderColor","#ebeef5");f=Hl(f,";","");let p=Ae(t,"borderRadius",8),d=Ae(t,"shadowStyle","0 2px 12px 0 rgba(0,0,0,.1)");d=Hl(d,";","");let h=Ae(t,"closeIconShift",null);null===h&&(h={top:10,right:10});let m="";{let e=Ae(h,"top",""),t=Ae(h,"bottom",""),n=Ae(h,"left",""),r=Ae(h,"right","");Bu(e)&&(e=`top:${e}px;`),Bu(t)&&(t=`bottom:${t}px;`),Bu(n)&&(n=`left:${n}px;`),Bu(r)&&(r=`right:${r}px;`),m=`position:absolute; ${e} ${r} ${t} ${n}`}let g=`alt-${os()}`,v=`alt-${os()}`,y=`\n <div \n style="display:inline-block; color:${l}; background:${c}; border:${s}px solid ${f}; border-radius:${p}px; box-shadow:${d};"\n onmouseenter="ttWAlertFadeIn('${v}')"\n onmouseleave="ttWAlertFadeOut('${v}')"\n >\n <div style="position:relative; ${u}">\n\n <div style="display:flex; align-items:center;">\n <div style="margin-right:10px;">\n <div style="display:flex;">${r}</div>\n </div>\n <div>${e}</div>\n </div>\n\n <div style="${m}">\n <div \n id="${v}" \n style="display:flex; cursor:pointer; opacity:0;" \n onclick="ttWAlertCancel('${g}')"\n >\n ${ls}\n </div>\n </div>\n\n </div>\n </div>\n `,b=document.createElement("div");b.id=g,b.style.position="fixed",b.style.transition="transform 0.3s, top 0.5s, bottom 0.5s",b.style.zIndex=-1,b.style.opacity=.001,i.indexOf("-left")>=0?b.style.transform="translateX(-100%)":b.style.transform="translateX(100%)",b.innerHTML=y,document.querySelector("body").appendChild(b);let w=ml();return function(e){let{id:t,position:n,time:r,pm:i}=e;ss[t]={id:t,position:n,ele:null,loc:{height:null,top:null,bottom:null,left:null,right:null},timeShow:r,timeStart:Date.now(),pm:i},ds(),null===fs&&(fs=setInterval((()=>{rr(ss,(e=>{Date.now()-e.timeStart>e.timeShow&&(e.pm.resolve(),hs(e.id))})),Te(ss)||(clearInterval(fs),fs=null)}),50))}({id:g,position:i,time:o,pm:w}),w},e.domAppend=ms,e.domCancelEvent=vs,e.domCompareText=bs,e.domCompareTextDyn=async function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5?arguments[5]:void 0;return vr(o)||(o=["https://cdn.jsdelivr.net/npm/diff2html@3.4.34/bundles/css/diff2html.min.css","https://cdn.jsdelivr.net/npm/diff2html@3.4.34/bundles/js/diff2html.min.js"]),await Es(o),bs(e,t,n,r,i)},e.domConvertToPic=Ms,e.domConvertToPicDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return vr(n)||(n=["https://cdn.jsdelivr.net/npm/html-to-image@1.11.11/dist/html-to-image.js"]),await Es(n),Ms(e,t)},e.domDetect=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ae(t,"timeInterval",null);fa(n)||(n=20);let r=Ae(t,"tolerancePixel",null);fa(r)||(r=1);let i,o=oa(),a={offsetWidth:0,offsetHeight:0,clientWidth:0,clientHeight:0,windowWidth:0,windowHeight:0},u=na(a),l={width:"",height:""};if(!zu(e))return console.log("invalid f",e),null;i=setInterval((()=>{let t=e();if(t){let e={offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight,clientWidth:t.clientWidth,clientHeight:t.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight},n=u.offsetWidth-e.offsetWidth,i=u.offsetHeight-e.offsetHeight,c=Math.abs(n)>r,s=Math.abs(i)>r,f="";n>0?f="smaller":n<0&&(f="larger");let p="";if(i>0?p="smaller":i<0&&(p="larger"),l={width:f,height:p},c||s){let n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_s(Object(n),!0).forEach((function(t){Ia(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u);setTimeout((()=>{e.offsetWidth>0&&e.offsetHeight>0&&(o.emit("resize",{sold:n,snew:e,smode:l,ele:t}),o.emit("resizeWithWindow",{sold:n,snew:e,smode:l,ele:t,from:"dom"}))}),1)}a=u,u=e}}),n);let c=e=>{o.emit("resizeWithWindow",{sold:a,snew:u,smode:l,from:"window"})};return window.addEventListener("resize",c),o.clear=()=>{clearInterval(i),window.removeEventListener("resize",c)},o},e.domDrag=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!er(e))return void console.log("ele is not a HTMLElement",e);let n=Ae(t,"attIdentify",null);$e(n)||(n="dragid");let r=Ae(t,"attIndex",null);$e(r)||(r="dragindex");let i=Ae(t,"attGroup",null);$e(i)||(i="draggroup");let o=Ae(t,"group",null);$e(o)||(o="group");let a=Ae(t,"previewOpacity",null);Bu(a)||(a=.4);let u=Ae(t,"previewDisabledOpacity",null);Bu(u)||(u=.2);let l=Ae(t,"previewBackground",null);$e(l)||(l="white");let c=Ae(t,"previewBorderWidth",null);Bu(c)||(c=1);let s=Ae(t,"previewBorderColor",null);$e(s)||(s="#f26");let f=Ae(t,"timeDragStartDelay",null);Bu(f)||(f=120);let p=`c${os(8)}`,d=o;e.setAttribute(i,d),e.setAttribute(n,p);let h=Us(d,p,{attIdentify:n,previewOpacity:a,previewBackground:l,previewBorderWidth:c,previewBorderColor:s}),m=function(e,t,n,r){let i=[];return{bind:function(){let n;n="mousedown";let r=function(n){t.dragStart({e:n,ele:e,name:"mousedown"})};e.addEventListener(n,r,!1),i.push({ele:e,name:n,f:r}),n="touchstart";let o=function(n){t.dragStart({e:n,ele:e,name:"touchstart"})};e.addEventListener(n,o,!1),i.push({ele:e,name:n,f:o}),n="touchmove";let a=function(e){t.dragMove({e:e,name:"touchmove"}),e.cancelable&&e.preventDefault()};e.addEventListener(n,a,!1),i.push({ele:e,name:n,f:a})},unbind:function(){rr(i,(e=>{let{ele:t,name:n,f:r}=e;t.removeEventListener(n,r)}))}}}(e,{dragStart:e=>{h.emit(d+"-dragStart",e)},dragMove:e=>{h.emit(d+"-dragMove",e)}});m.bind(),qs({gid:d,attGroup:i,attIndex:r,attIdentify:n,timeDragStartDelay:f,previewOpacity:a,previewDisabledOpacity:u});let g=oa();return h.on(o+"-change",(e=>{e.tarEid===p&&g.emit("change",e)})),h.on(o+"-start",(e=>{e.tarEid===p&&g.emit("start",e)})),h.on(o+"-move",(e=>{e.tarEid===p&&g.emit("move",e)})),h.on(o+"-enter",(e=>{e.tarEid===p&&g.emit("enter",e)})),h.on(o+"-leave",(e=>{e.tarEid===p&&g.emit("leave",e)})),h.on(o+"-drop",(e=>{e.tarEid===p&&g.emit("drop",e)})),g.setIsActive=function(e){Rs[d].isActive=e},g.unbind=function(){m.unbind(),function(e,t){let n=Rs[e],r=na(n.eleIds);Ys(r,t),n.eleIds=r,0===r.length&&(n.oevg.unbind(),n.pv.clear(),delete Rs[e])}(d,p)},g},e.domDragBarAndScroll=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=null,o=null,a=null,u=null,l=null,c=null,s=null,f=null,p=null,d=null,h=null,m=null,g=null,v=null,y=!1,b=Ae(n,"getHeighRatio",null);R(b)||(b=()=>1);let w=Ae(n,"getWidthRatio",null);R(w)||(w=()=>1);let x=Ae(n,"stopScrollPropagationForPanel",null);Gr(x)||(x=!1);let j=Ae(n,"stopTouchDragPropagationForPanel",null);Gr(j)||(j=!1);let O=Ae(n,"useTouchDragForPanel",null);Gr(O)||(O=!0);let E=e,S=t,k=oa();return r=e=>{let t=e.deltaY/Math.abs(e.deltaY),n=e.deltaX/Math.abs(e.deltaX);k.emit("scrollPanel",{ratioY:t,ratioX:n}),x&&vs(e)},E.addEventListener("wheel",r),i=e=>{if(O){let t=Ae(e,"touches.0.clientY",0),n=Ae(e,"touches.0.clientX",0),r=-t*b(),i=-n*w();y=!0,k.emit("pressBar",{clientY:r,clientX:i}),j&&vs(e)}},E.addEventListener("touchstart",i),o=e=>{if(O&&y){let t=Ae(e,"touches.0.clientY",0),n=Ae(e,"touches.0.clientX",0),r=-t*b(),i=-n*w();k.emit("dragBar",{clientY:r,clientX:i}),j&&vs(e)}},E.addEventListener("touchmove",o,{passive:!1}),a=e=>{O&&y&&(y=!1,k.emit("freeBar"),j&&vs(e))},E.addEventListener("touchend",a),u=e=>{y=!0,k.emit("pressBar",{clientY:e.clientY,clientX:e.clientX})},S.addEventListener("mousedown",u),l=e=>{y&&(y=!1,k.emit("freeBar"))},S.addEventListener("mouseup",l),c=e=>{y=!0,k.emit("pressBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX})},S.addEventListener("touchstart",c),s=e=>{y&&(k.emit("dragBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX}),vs(e))},S.addEventListener("touchmove",s,{passive:!1}),f=e=>{y&&(y=!1,k.emit("freeBar"))},S.addEventListener("touchend",f),p=e=>{y&&k.emit("dragBar",{clientY:e.clientY,clientX:e.clientX})},window.addEventListener("mousemove",p),d=e=>{y&&(y=!1,k.emit("freeBar"),x&&vs(e))},window.addEventListener("mouseup",d),h=e=>{},window.addEventListener("scroll",h,{passive:!1}),m=e=>{},window.addEventListener("wheel",m,{passive:!1}),g=e=>{},document.addEventListener("scroll",g,{passive:!1}),v=e=>{},document.addEventListener("wheel",v,{passive:!1}),k.clear=function(){E.removeEventListener("wheel",r),E.removeEventListener("touchstart",i),E.removeEventListener("touchmove",o),E.removeEventListener("touchend",a),S.removeEventListener("mousedown",u),S.removeEventListener("mouseup",l),S.removeEventListener("touchstart",c),S.removeEventListener("touchmove",s),S.removeEventListener("touchend",f),window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",d),window.removeEventListener("scroll",h),window.removeEventListener("wheel",m),document.removeEventListener("scroll",g),document.removeEventListener("wheel",v)},k},e.domDragPreview=Bs,e.domDropFiles=function(e){let t=!1,n=!1,r=oa();function i(e){vs(e),n=!0,!1===t&&(t=!0,r.emit("dropIn",{ev:e}))}function o(e){vs(e),n=!1,setTimeout((function(){n||(t=!1,r.emit("dropOut",{ev:e}))}),100)}function a(e){i(e)}function u(e){o(e)}function l(e){function t(){o(e)}i(e),Zs(e.dataTransfer).then((n=>{let i=$u(n.entries,{type:"file"});r.emit("getFiles",{ev:e,files:n.files,filesTree:i,entries:n.entries,cb:t})})).catch((e=>{r.emit("error",e)}))}return e.addEventListener("dragenter",a,!1),e.addEventListener("dragover",a,!1),e.addEventListener("dragleave",u,!1),e.addEventListener("drop",l,!1),r.off=function(){e.removeEventListener("dragenter",a,!1),e.removeEventListener("dragover",a,!1),e.removeEventListener("dragleave",u,!1),e.removeEventListener("drop",l,!1)},r},e.domElementsFromPoint=Is,e.domFadeIn=as,e.domFadeOut=us,e.domFind=Gs,e.domFinds=Ss,e.domGetAttr=Ls,e.domGetBoudRect=Cs,e.domGetBoudRectRefSelf=Ns,e.domGetFileAccept=of,e.domGetFiles=af,e.domGetParents=Hs,e.domGetPointFromEvent=$s,e.domGetScrollableParent=function(e){let t=/(auto|scroll)/,n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},r=function(e){return t.test(function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")}(e))};if(!(e instanceof HTMLElement||e instanceof SVGElement))return;let i=Hs(e);for(let e=0;e<i.length;e+=1)if(r(i[e]))return i[e];return document.scrollingElement||document.documentElement},e.domGetWindowSize=function(){let e=ni();return{width:(()=>{let t=[Ae(e,"innerWidth"),Ae(e,"document.documentElement.clientWidth"),Ae(e,"document.body.clientWidth")];return t=$u(t,Bu),cf(t)})(),height:(()=>{let t=[Ae(e,"innerHeight"),Ae(e,"document.documentElement.clientHeight"),Ae(e,"document.body.clientHeight")];return t=$u(t,Bu),cf(t)})()}},e.domIsClientXYIn=function(e,t,n){if(!Bu(e))return void console.log("clientX is not a number",e);if(!Bu(t))return void console.log("clientY is not a number",t);if(!er(n))return void console.log("ele is not a HTMLElement",n);let r;try{r=n.getBoundingClientRect()}catch(e){return void console.log("invalid ele for getBoundingClientRect",e)}let i=!1;try{i=e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}catch(e){console.log("catch when calculating page information of element",e)}return i},e.domIsFocused=Gc,e.domIsVisible=function(e){if(!er(e))return Promise.reject("invalid element");if(sf())return Promise.reject("invalid IntersectionObserver");let t=ml();try{let n=new IntersectionObserver((e=>{t.resolve(e[0].isIntersecting),n.disconnect()}));n.observe(e)}catch(e){t.reject(e)}return t},e.domPrepend=Ds,e.domRemove=ks,e.domRenderMarkdownMind=ff,e.domRenderMarkdownMindDyn=async function(e,t){let n=arguments.length>3?arguments[3]:void 0;return vr(n)||(n=["https://cdn.jsdelivr.net/npm/d3@7.8.3/dist/d3.min.js","https://cdn.jsdelivr.net/npm/markmap-view@0.14.4/dist/index.min.js","https://cdn.jsdelivr.net/npm/markmap-lib@0.14.4/dist/browser/index.min.js"]),await Es(n),ff(e,t)},e.domRipple=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"timeDuration",null);fa(r)||(r=1e3);let i=Ae(n,"color",null);if($e(i)||(i="rgba(255, 255, 255, 0.5)"),!er(e))return;e.style.position="relative",e.style.overflow="hidden";let o=e.getBoundingClientRect(),a=t.clientX-o.left,u=t.clientY-o.top,l=2*Math.max(e.clientWidth,e.clientHeight),c=document.createElement("div");c.style.width=`${l}px`,c.style.height=`${l}px`,c.style.transition=`all ${r/1e3}s linear`,c.style.position="absolute",c.style.zIndex=1,c.style.left=`${a}px`,c.style.top=`${u}px`,c.style.borderRadius="50%",c.style.transformOrigin="center",c.style.transform="translate(-50%,-50%) scale(0)",c.style.background=i,c.style.userSelect="none",c.style.pointerEvents="none",e.appendChild(c),setTimeout((()=>{c.style.transform="translate(-50%,-50%) scale(2)",c.style.opacity=0}),1),setTimeout((()=>{ks(c)}),r)},e.domScrollIntoView=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!er(e))return;Pe(t)||(t={});let n={behavior:"smooth"};n=np(np({},n),t),gs()&&ep(),e.scrollIntoView(n)},e.domScrollTo=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!er(e))return;Pe(t)||(t={});let n={behavior:"smooth"};n=ip(ip({},n),t),gs()&&ep(),e.scrollTo(n)},e.domShowImages=pp,e.domShowImagesDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;return vr(r)||(r=["https://cdn.jsdelivr.net/npm/viewerjs@1.11.5/dist/viewer.min.css","https://cdn.jsdelivr.net/npm/viewerjs@1.11.5/dist/viewer.min.js"]),await Es(r),pp(e,t,n)},e.domShowInputAndGetFiles=hp,e.domShowInputAndGetFilesU8Arrs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ae(t,"multiple");Kr(n)||(n=!1);let r=Ae(t,"entireHierarchy");Kr(r)||(r=!1);let i=Ae(t,"sizelimit");Ce(i)||(i=1e3),i=bi(i);let o=ml(),a=[];return hp(e,{multiple:n,entireHierarchy:r,sizelimit:i}).then((function(e){let t=ml(),n=Ae(e,"errs",{}),r=Ae(e,"files",[]);return Te(n)?t.reject(n):t.resolve(r),t})).then((function(e){return rr(e,(function(e){a.push({name:e.name,size:e.size,type:e.type})})),wl(e)})).then((function(e){rr(e,(function(e,t){a[t].u8a=e})),o.resolve(a)})).catch((function(e){o.reject(e)})),o},e.domTooltip=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=null;function o(){null!==r&&r.destroy(!0),e.setAttribute("tippystate",""),clearInterval(i)}let a={arrow:!0,theme:"dark",placement:"bottom",delay:150};n=Te(n)?fp(a,n):a;let u=t;t||(u=e.innerHTML);let l=Ce(e.getAttribute("tippystate"));if(e.setAttribute("tippystate","5"),l)return;u=`<div style="text-align:left;">${u}</div>`;let c=Th;Th.default&&(c=Th.default),r=c(e,$h($h({},n),{},{content:u,allowHTML:!0,onHidden(){o()},onDestroy(){r=null,o()}})),r.show(),i=setInterval((()=>{let t=e.getAttribute("tippystate");Ce(t)?(t=sa(t),t-=1,e.setAttribute("tippystate",t),t<=0&&o()):o()}),1e3)},e.domTriggerEvent=dp,e.domVirtualCreate=Ih,e.domVirtualCreateQueue=function(){return new function(){let e=Fh(1);return async function(t){return e(Ih,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}},e.downloadExcelFileFromData=Wh,e.downloadExcelFileFromDataDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;vr(r)||(r=["https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]),await Es(r);let i=Wh(e,t,n);return""!==Ae(i,"error","")?Promise.reject(i.error):i},e.downloadFileFromB64=function(e,t){if(!ti())return void console.log("no window");if(!$e(e))return void console.log("no filename");let n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e.downloadFileFromBlob=zh,e.downloadFileFromText=function(e,t){let n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ti()?$e(e)?He(t)?Kr(r)?(n=r?new Blob(["\ufeff",t]):new Blob([t]),zh(e,n)):console.log("withBOM is not a boolean"):console.log("invalid content"):console.log("invalid filename"):console.log("no window")},e.downloadFileFromU8Arr=function(e,t){if(!ti())return void console.log("no window");if(!$e(e))return void console.log("no filename");if(!fl(t))return void console.log("no data");zh(e,qh(t))},e.dtmapping=Vh,e.dtpick=Xh,e.evem=oa,e.execProcess=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"cbStdout"),i=Ae(n,"cbStderr");function a(e){try{return e.toString("utf8")}catch(e){}return""}return new Promise((function(n,u){let l="",c=o.exec(`${e} ${t}`,((e,t,n)=>{if(e)return u(e);$e(t=a(t))&&(l+=t),$e(n=a(n))&&(l+=n)}));c.on("close",(e=>{n(l)})),zu(r)&&c.stdout.on("data",(function(e){r(e)})),zu(i)&&c.stderr.on("data",(function(e){i(e)}))}))},e.execPyodide=im,e.execPyodideDyn=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return vr(t)||(t=["https://cdn.jsdelivr.net/pyodide/v0.23.4/full/pyodide.js"]),await Es(t),await im(e)},e.execScript=function(e,t){return new Promise((function(n,r){Ye(t)||(t=[t]);let i=o.spawnSync(e,t),a=$u(i.output,(e=>null!==e));a=or(a,(e=>function(e){try{return e.toString("utf8")}catch(e){}return""}(e)));let u=Ca(a,""),l=Ae(i,"error.message");l?r(l):n(u)}))},e.f2c=function(e){if(!zu(e))return"";let t=String(e),n=t.substring(t.indexOf("/*")+3,t.lastIndexOf("*/"));return n=rl(n),n},e.filepathToTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return{};let n=Ae(t,"delimiter");$e(n)||(n="❯");let r=Ae(t,"bindRoot");$e(r)||(r="root");let i=Ae(t,"soryItems"),o=or(e,((e,t)=>{"folder"!==e.type&&"file"!==e.type&&(e.type="file");let r=(e=>{let t=Au(e=(e=e.replace(/\\\\/g,"\\")).replace(/\\/g,"/"),"/");return{ss:t,cfp:Ca(t,n)}})(e.path);return{ind:t,type:e.type,ss:r.ss,data:na(e)}})),a=e=>{let t=Xr(e),r=[];for(let i=0;i<t;i++){let t=[];for(let n=0;n<=i;n++)t.push(e[n]);let o=Ca(t,n);r.push({id:o,name:e[i]})}return r},u=-1,l=[],c={};rr(o,(e=>{let t=[r],i=r,o=Xr(e.ss)-1;rr(e.ss,((r,s)=>{let f=s<o||"folder"===e.type;t.push(r);let p=null,d=null;s===o&&(p=e.ind,d=e.data);let h=Ca(t,n),m=a(t);if(Ne(c,h)){let t=c[h],n="folder"===Ae(t,"_type","");if(!n&&f)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${h}] is unrecognized from a file to folder`);if(!n&&!f)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${h}] get repeat data from two files`);if(n&&!f)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${h}] is unrecognized from a folder to file`);if(Te(c[h].data)&&Te(d))throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${h}] get repeat data from two folders`);if(null===c[h].data&&Te(d)){c[h]._indOri=p,c[h].data=d;let e=c[h]._indNormalize,t=l[e];l[e]=gm(gm({},d),{},{type:t.type,path:t.path})}}else{u++;let e=u,n=null;n=f?{_indOri:p,_indNormalize:e,ns:Xr(t),ts:na(t),pathInfors:m,_type:"folder",type:"array",numOfChilren:-1,id:h,parentId:i,text:r,children:[],data:d}:{_indOri:p,_indNormalize:e,ns:Xr(t),ts:na(t),pathInfors:m,_type:"file",type:"node",numOfChilren:-1,id:h,parentId:i,text:r,data:d},c[h]=n,l.push(gm(gm({},Ae(c[h],"data",{})),{},{type:c[h]._type,path:"/"+Ca(t,"/")}))}i=h}))}));let s=um(c);if(s=Ku(s,"id"),s=Ku(s,"ns"),zu(i)){let e=[];rr(hm(s,"ns"),((t,n)=>{rr(hm(t,"parentId"),((t,r)=>{let o=i(t,r,n);e=[...e,...o]}))})),s=e}let f=[],p=[];rr(s,(e=>{"folder"===e._type?f.push(e):p.push(e)}));let d=hm(f,"ns"),h=hm(p,"ns"),m=am(or(f,"ns")),g=am(or(p,"ns")),v=null;{let e=[r];v=[{_indOri:null,_indNormalize:null,ns:Xr(e),ts:na(e),pathInfors:a(e),_type:"folder",type:"array",numOfChilren:-1,id:r,parentId:"",text:r,children:[],data:null}]}let y={};y[r]="0.children";let b={};b[r]="0";for(let e=2;e<=m;e++){rr(d[e],(e=>{let t=Ae(y,e.parentId,"");if(!$e(t))throw console.log("kpPathFd",y),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in folder`);let n=Ae(v,t);if(Ye(n)||Nc(v,t,[]),n=Ae(v,t),!Te(ef(n,{id:e.id}))){n.push(gm(gm({},e),{},{children:[]}));let r=`${t}.${Xr(n)-1}`;y[e.id]=`${r}.children`,b[e.id]=r}}))}let w=na(v),x={};for(let e=2;e<=g;e++){rr(h[e],(e=>{let t=Ae(y,e.parentId,"");if(!$e(t))throw console.log("kpPathFd",y),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in file`);let n=Ae(v,t);if(!Ye(n))throw console.log("treeItems",v),console.log("k",t),console.log("v",e),new Error("無預先建置資料夾");if(!Te(ef(n,{id:e.id}))){n.push(e);let r=`${t}.${Xr(n)-1}`;x[e.id]=r,b[e.id]=r}}))}return{treeItems:v,treeItemsFolder:w,kpPath:b,fpsNormalize:l}},e.files2data=function(e){let t=ml(),n=or(e,(function(e){return{name:e.name,size:e.size,type:e.type}}));return bl(e).then((function(e){let r=or(e,(function(e){return{b64:e}})),i=vm(n,r);t.resolve(i)})),t},e.flattenToConn=Zc,e.flattenTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ye(e)){if(0===e.length)return[]}else{if(!Pe(e))return[];if(dr(e))return[]}let n=Ae(t,"bindKey",null);$e(n)||(n="id");let r=Ae(t,"bindChildren",null);$e(r)||(r="children");let i=!1;Pe(e)&&(i=!0,e=[e]);let o=[];return Xc(e,((e,t,i)=>{let a=Ae(e,n,null),u=Ae(e,r,null);if(a){let n=function(e){let t=[e[0]];for(let n=1;n<e.length;n++){let i=e[n];t.push(r),t.push(i)}return t}([...i,t]);if(o.push(bm(bm({},e),{},{level:(Xr(n)-1)/2,nk:n})),u)return u}})),i&&(o=o[0]),o},e.fsCleanFolder=function(e){if(!a.existsSync(e)){let t=jm(e);return t.error?t.error:{success:"done: "+e}}if(!wm(e))return{error:"input path is not a folder"};try{a.readdirSync(e).forEach((function(t){let n=e+"/"+t;if(a.lstatSync(n).isDirectory())xm(n);else try{a.unlinkSync(n)}catch(e){}}))}catch(e){return{error:e}}return{success:"done: "+e}},e.fsCopyFile=function(e,t){try{a.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsCopyFolder=function e(t,n){try{a.readdirSync(t).forEach((function(r){let i=t+"/"+r,o=n+"/"+r,l=a.lstatSync(i);if(l.isDirectory())jm(u.dirname(o)),e(i,o);else if(l.isSymbolicLink()){let e=a.readlinkSync(i);a.symlinkSync(e,o)}else jm(u.dirname(o)),a.copyFileSync(i,o)}))}catch(e){return{error:e}}return{success:"done: "+n}},e.fsCreateFile=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(a.existsSync(e))return{error:"input path already exists: "+e};if(Om(e))return{error:"input file is already exists: "+e};try{a.writeFileSync(e,t,n)}catch(e){return{error:e}}return{success:"done: "+e}},e.fsCreateFolder=jm,e.fsDeleteFile=function(e){if(!a.existsSync(e))return{success:"file does not exist: "+e};if(!Om(e))return{error:"input path is not a file: "+e};try{a.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}},e.fsDeleteFolder=xm,e.fsEvem=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"./_evps",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=oa(),i=Ae(t,"timeDetect");fa(i)||(i=50),i=sa(i);let o=Ae(t,"timeRewatch");return fa(o)||(o=1e3),o=sa(o),wm(e)||jm(e),r.on=function(t,r){let l=u.resolve(e,t),c=Sm({timeDetect:i,timeRewatch:o});c.on(l,(e=>{let t=a.readFileSync(l,"utf8"),n=cl(t);Te(n)&&(t=n),r(t,e)})),n.push({fp:l,evf:c})},r.off=function(t){let r=u.resolve(e,t);rr(n,(e=>{e.fp===r&&e.evf.clear()}))},r.emit=function(t,n){let r=u.resolve(e,t);$e(n)||(n=JSON.stringify(n)),a.writeFileSync(r,n,"utf8")},r.clear=function(){rr(n,(e=>{e.evf.clear()})),xm(e)},r},e.fsGetFileHash=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sha512",n=ml();Om(e)||n.reject(`路徑[${e}]非檔案`);try{let r=c.createHash(t),i=a.createReadStream(e);i.on("readable",(()=>{let e=i.read();e?r.update(e):n.resolve(r.digest("hex"))})),i.on("error",(e=>{n.reject(e.toString())}))}catch(e){n.reject(e.toString())}return n},e.fsGetFilesInFolder=function(e){let t=km(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return t=$u(t,(e=>Om(e.path))),t=or(t,"path"),t},e.fsGetFoldersInFolder=function(e){let t=km(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return t=$u(t,(e=>!Om(e.path))),t=or(t,"path"),t},e.fsIsFile=Om,e.fsIsFolder=wm,e.fsReadText=function(e){return a.readFileSync(e,"utf8")},e.fsRenameFile=function(e,t){if(!Om(e))return{error:`pahOld[${e}] is not a file`};if(!a.existsSync(t))return{error:`pahNew[${t}] does exist`};try{a.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsRenameFolder=function(e,t){if(!wm(e))return{error:`pahOld[${e}] is not a folder`};if(!a.existsSync(t))return{error:`pahNew[${t}] does exist`};try{a.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsTreeFolder=km,e.fsWatchFile=Sm,e.fsWatchFolder=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=oa(),r=Ae(e,"polling");Kr(r)||(r=!1);let i=Ae(e,"timeInterval");fa(i)||(i=100),i=sa(i);let o=Ae(e,"timeBinaryInterval");function a(e,n){e.watcher.close().catch((t=>{console.log(t),console.log("watcher.close error",e.fp)})).finally((()=>{delete t[n]}))}return fa(o)||(o=300),o=sa(o),n.on=function(e,n){let a=null,c=()=>{null!==a&&a.unwatch(e),a=l.watch(e,{usePolling:r,interval:i,binaryInterval:o,awaitWriteFinish:!0})};c();let s=os();t[s]={id:s,fp:e,watcher:a,isFile:!1},a.on("all",((r,i,o)=>{let a="";{let e=i;e=e.replace(/\\/g,"/"),e=`./${e}`,a=e}let l=u.resolve(e),f=u.resolve(a);Om(e)?t[s].isFile=!0:t[s].isFile&&"unlink"===r&&l===f?t[s].isFile=!1:(zu(n)&&n({fp:a,type:r,time:Em(),stats:o}),"unlinkDir"===r&&l===f&&setTimeout((()=>{c()}),1))}))},n.off=function(e){rr(t,((t,n)=>{t.fp===e&&a(t,n)}))},n.clear=function(){rr(t,((e,t)=>{a(e,t)}))},n},e.fsWriteText=function(e,t){a.writeFileSync(e,t,"utf8")},e.genGradientColor=function(e){if(gr(e))return{};let t;try{t=Cc.toRgba(e)}catch(e){return{}}function n(e,t){return e.a=t,Cc.toRgbaString(e)}return{linearGradient:{x1:0,x2:0,y1:0,y2:1},stops:[[0,n(t,.4)],[1,n(t,.9)]]}},e.genID=os,e.genPm=ml,e.getBufferSize=Mm,e.getClearPathName=_m,e.getCsvStrFromData=Am,e.getDataFromExcelFileU8Arr=Ym,e.getDataFromExcelFileU8ArrDyn=async function(e,t,n){vr(n)||(n=["https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]),await Es(n);let r=Ym(e,t);return""!==Ae(r,"error","")?Promise.reject(r.error):r},e.getEnv=function(){let e=ti(),t="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;return e=e||t,{isBrowser:e,isWebWorker:t,isNode:"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}},e.getExcelU8ArrFromData=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data";if(!vr(e)){return{error:"no data"}}$e(t)||(t="data");let n=null,r=Uh(e,t);return Ne(r,"error")?r:(n=Hm(r),Ne(n,"error"),n)},e.getExcelU8ArrFromWorkbook=Hm,e.getExcelWorkbookFromData=Uh,e.getExcelWorkbookFromWorksheet=Rh,e.getExcelWorksheetFromData=ii,e.getFileAccept=rf,e.getFileName=$m,e.getFileNameExt=function(e){if(!$e(e))return"";let t=ru($m(e),".");if(Xr(t)<=1)return"";let n="";try{n=Bc(t)}catch(e){}return n},e.getFileTrueName=function(e){if(!$e(e))return"";let t=$m(e),n=ru(t,".");if(Xr(n)<=1)return t;let r="";try{n=iu(n),r=Ca(n,".")}catch(e){}return r},e.getFileType=nf,e.getGlobal=ni,e.getObjSize=function(e){let t=0,n=function e(n){if(null!=n)switch(typeof n){case"number":t+=8;break;case"string":t+=2*n.length;break;case"boolean":t+=4;break;case"object":let r=Object.prototype.toString.call(n).slice(8,-1);if("Object"===r||"Array"===r)for(let t in n)n.hasOwnProperty(t)&&e(n[t]);else t+=2*n.toString().length}return t}(e),r=function(e){return e<1024?e+" bytes":e<1048576?(e/1024).toFixed(3)+" KiB":e<1073741824?(e/1048576).toFixed(3)+" MiB":(e/1073741824).toFixed(3)+" GiB"}(n);return{int:n,str:r}},e.getPathParent=function(e){if(!$e(e))return"";let t=_m(e);if(t.isRoot)return t.path;let n=$m(e=t.path);if(!$e(n))return e;let r=_m(e=nl(e,Xr(n)));return r.isRoot,r.path},e.getTimeBetween=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"days",r=Bm(n);if(""===r)return[];let i=Fm(e,n),o=Fm(t,n);return null===i||null===o||e>=t?[]:or(Nm(o.diff(i,n)+1),(function(e){return i.clone().add(e,n).format(r)}))},e.getTimeFromUnit=Bm,e.getTimeObject=Fm,e.getTimeRange=function(e,t){if(!zm(e))return"無起始時間";if(void 0===t&&(t=e),!zm(t))return"結束時間格式錯誤";let r=n(e,"YYYY-MM-DDTHH:mm:ss"),i=n(t,"YYYY-MM-DDTHH:mm:ss"),o=r.format("YYYY-MM-DD"),a=i.format("YYYY-MM-DD");if(o===a){let n=i.format("HH:mm");if(e===t)return Rm(e)+" 至 無";if(e<t)return Rm(e)+" 至 "+n;if(e>t)return Rm(e)+" 至 "+n+" (起始時間大於結束時間)"}else{if(o<a)return Rm(e)+" 至 "+Rm(t);if(o>a)return Rm(e)+" 至 "+Rm(t)+" (起始時間大於結束時間)"}return""},e.getUserAgent=Um,e.getUserAgentDyn=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return vr(t)||(t=["https://cdn.jsdelivr.net/npm/ua-parser-js@1.0.34/dist/ua-parser.min.js"]),await Es(t),Um(e)},e.getltdtkeys=Mr,e.haskey=Ne,e.html2pic=qm,e.html2picDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return vr(n)||(n=["https://cdn.jsdelivr.net/npm/canvg@4.0.0/lib/umd.js","https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"]),await Es(n),qm(e,t)},e.html2str=Vm,e.html2strDyn=async function(e,t){return vr(t)||(t=["https://cdn.jsdelivr.net/npm/htmlparser@1.7.7/lib/htmlparser.min.js"]),await Es(t),await Vm(e)},e.htmlDecode=function(e){let t=document.createElement("span");return t.appendChild(document.createTextNode(e)),t.innerHTML},e.htmlEncode=xl,e.importResources=Es,e.interp1=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Ye(e))return{err:"ps is not an array"};{let e=!Ce(t),n=!Ye(t);if(e&&n)return{err:"px is not a number or an array"}}let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Xr(e)<=0)return[];let n=Ae(t,"keyX");$e(n)||(n="x");let r=Ae(t,"keyY");$e(r)||(r="y");let i=[];return rr(e,(e=>{let t=null,o=null;Ye(e)&&Xr(e)>=2?(t=Ae(e,0),o=Ae(e,1)):(t=Ae(e,n,null),o=Ae(e,r,null)),Ce(t)&&Ce(o)&&(t=hi(t),o=hi(o),i.push({x:t,y:o}))})),i}(e,n);if(Ae(r,"err"))return Ae(r,"err");if(0===Xr(r))return{err:"ps(length=0) is not an effective array",ps:e,psEff:r};if(1===Xr(r))return{err:"ps(length=1) is one point only",ps:e,psEff:r};let i=function(e){let t=!0,n=!0;for(let r=1;r<Xr(e);r++){let i=e[r-1],o=e[r];if(t&&i.x>o.x&&(t=!1),n&&i.x<o.x&&(n=!1),i.x===o.x)return{err:`x can not be equal: i=${r}, x=${i.x}`}}return t?Gm:n?Km:"no"}(r);if("no"===i)return{err:"psEff is not increasing or decreasing"};i===Km&&(i=Gm,r=tl(r));let o=!Ye(t);o&&(t=[t]);let a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Xr(e)<=0)return[];let n=Ae(t,"keyX");$e(n)||(n="x");let r=[];return rr(e,(e=>{let t=null;t=Ce(e)?hi(e):Ye(e)&&Xr(e)>=1?Ae(e,0):Ae(e,n,null),Ce(t)&&(t=hi(t),r.push({x:t}))})),r}(t,n),u=Ae(n,"mode");"linear"!==u&&"stairs"!==u&&"blocks"!==u&&(u="linear");let l,c=or(a,((e,t)=>{let i=Ae(e,"x"),o=null;try{"linear"===u?o=function(e,t){let n=Jm(e,t);if(n!==Xm)return n;let r=null;for(let n=1;n<Xr(e);n++){let i=e[n-1],o=e[n];if(i.x<=t&&t<=o.x){r=((t-i.x)*o.y+(o.x-t)*i.y)/(o.x-i.x);break}}return null===r?{err:Zm}:r}(r,i):"blocks"===u?o=function(e,t){let n=Jm(e,t);if(n!==Xm)return n;let r=null;for(let n=1;n<Xr(e);n++){let i=e[n-1],o=e[n],a=i.x,u=o.x;if(a<=t&&t<=u){r=o.y;break}}return null===r?{err:Zm}:r}(r,i):"stairs"===u&&(o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"xMin");if(Bu(r)){if(r>e[0].x)return{err:`xMin=${r} > ps[0].x=${e[0].x}`};r===e[0].x||(e=[{x:r,y:e[0].y},...e])}let i=Ae(n,"xMax");if(Bu(i)){if(i<e[Xr(e)-1].x)return{err:`xMax=${i} < ps[size(ps)-1].x=${e[Xr(e)-1].x}`};if(i===e[Xr(e)-1].x);else{let t={x:i,y:e[Xr(e)-1].y};e=[...e,t]}}let o=Jm(e,t);if(o!==Xm)return o;let a=null;for(let n=0;n<Xr(e);n++){let r=Ae(e,n-1,null),i=Ae(e,n,null),o=Ae(e,n+1,null),u=i.x;r&&(u=(r.x+i.x)/2);let l=i.x;if(o&&(l=(o.x+i.x)/2),u<=t&&t<=l){a=i.y;break}}return null===a?{err:Zm}:a}(r,i,n))}catch(e){o={err:e.toString()}}return o}));return l=o?c[0]:c,l},e.isDev=function(){return!!location&&hl(location.href,"localhost")},e.isEle=er,e.isEleExistByID=function(e){return!!$e(e)&&!(null===document.getElementById(e))},e.isEmail=function(e){return!!$e(e)&&/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)},e.isIE=gs,e.isNarrow=function(e){if(!ti())return!1;let t=window.innerWidth>0&&window.innerWidth<=1024,n=!1;if(e){let t=Ae(e,"clientWidth",0);n=t>0&&t<=700}return t||n},e.isStrHasCapital=ng,e.isStrHasLowerCase=rg,e.isStrHasNumber=ig,e.isUserIdentify=function(e){let t=ml();if(!$e(e))return t.reject("身份證字號非有效字串"),t;if(10!==e.length)return t.reject("身份證字號長度非10位"),t;if(isNaN(e.substr(1,9))||!/^[A-Z]$/.test(e.substr(0,1)))return t.reject("身份證格式錯誤,字首需大寫英文"),t;e="ABCDEFGHJKLMNPQRSTUVXYWZIO".indexOf(e.substring(0,1))+10+""+e.substr(1,9);let n=parseInt(e.substr(0,1))+9*parseInt(e.substr(1,1))+8*parseInt(e.substr(2,1))+7*parseInt(e.substr(3,1))+6*parseInt(e.substr(4,1))+5*parseInt(e.substr(5,1))+4*parseInt(e.substr(6,1))+3*parseInt(e.substr(7,1))+2*parseInt(e.substr(8,1))+parseInt(e.substr(9,1)),r=parseInt(e.substr(10,1));return n%10!=0&&10-n%10!==r?(t.reject("非有效身份證"),t):(t.resolve(),t)},e.isUserName=function(e){let t=ml();return $e(e)?(t.resolve(),t):(t.reject("請填入姓名"),t)},e.isUserPW=function(e){let t=ml();if(!He(e))return t.reject("密碼非字串"),t;let n=[];return e.length<8&&n.push("長度須大於8個字元"),e.length>30&&n.push("長度須小於30個字元"),ng(e)&&rg(e)&&ig(e)||n.push("須包含大寫、小寫英文與數字各1個字元"),hl(e,["<",">"])&&n.push("不能使用特殊符號(<,>)"),hl(e,["select","insert","update","delete"])&&n.push("不能使用指令(select,insert,update,delete)"),n.length>0?t.reject(Ca(n,",")):t.resolve(),t},e.isWindow=ti,e.isab=g,e.isarr=Ye,e.isarr0=mr,e.isblob=Ol,e.isbol=Kr,e.isday=ts,e.isearr=vr,e.iseobj=Te,e.iser=gr,e.isernot=Ks,e.isestr=$e,e.isfun=zu,e.isint=wi,e.ismonth=oi,e.isn0int=Qm,e.isn0num=eg,e.isnan=Le,e.isnbr=Ie,e.isnint=Nh,e.isnnum=function(e){return!!Ce(e)&&bi(e)<0},e.isnull=pr,e.isnum=Ce,e.isobj=Pe,e.isobj0=dr,e.isp0int=Ta,e.isp0num=tg,e.ispint=fa,e.ispm=_l,e.ispnum=Iu,e.isstr=He,e.isstr0=hr,e.istime=zm,e.istimeTZ=cg,e.istimems=og,e.istimemsTZ=lg,e.isu16arr=Dm,e.isu8arr=fl,e.isundefined=fr,e.j2o=cl,e.keysmat2ltdt=sg,e.log=function(){let e=null;return{init:function(t){if(!zu(t))throw new Error("loggerFun is not a function");e=t},log:function(t,n,r){if(null===e)throw new Error("no logger: need to construct by init");let i=fg(),o={id:os(),from:t,level:n,msg:Jr(r),time:i};return e(o)}}},e.ltdt2vrtsable=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!vr(e))return[];if(!Ye(t))return[];let n=!1;if(rr(e,(function(e){Te(e)||(n=!0)})),n)return[];let r=Mr(e),i=[];rr(e,(function(e){let t={};rr(r,(function(n){t[n]={value:e[n].value,style:e[n].style,rowspan:1}})),i.push(t)}));let o=tl(i),a=Xr(o);return rr(r,(function(e){if(Fu(e,t)){let t=va(0,a,0),n=va(0,a,0),r=va(1,a+1,0);rr(o,(function(i,a){if(a>0){Cu(o[a-1][e].value,o[a][e].value)&&(t[a-1]=1,t[a]=1,r[a]=r[a-1]+1),1===t[a-1]&&1===t[a]&&(n[a-1]=0,n[a]=1)}})),rr(o,(function(i,a){1===t[a]&&(1===n[a]?o[a][e].rowspan=r[a]:o[a][e].rowspan=null)}))}})),tl(o)},e.ltdtDiff=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Ye(e))return{};if(!Ye(t))return{};if(0===Xr(e)&&0===Xr(t))return{};let r=Ae(n,"empty");$e(r)||(r="∗empty∗");let i=Mr(e),o=Mr(t),a=pg(i,o),u={};rr(a,((e,t)=>{u[t]=e}));let l=Du(Qr(e,a,{empty:r}),Qr(t,a,{empty:r}),hg(hg({},n),{},{mode:"matrix"}));return l.dfs=or(l.dfs,(e=>{let t={};rr(e,(e=>{e.k=u[e.k],t[e.k]=e}));let n={};return rr(a,(e=>{n[e]=t[e]})),n})),l},e.ltdtDiffByKey=function(e,t,n){let r={infor:{},del:[],same:[],diff:[],add:[]};if(!$e(n))return console.log("invalid key"),r;Ye(e)||(e=[e]),Ye(t)||(t=[t]);let i={},o=[],a=[],u=[];rr(e,(function(e){if(Ne(e,n)){let r={[n]:e[n]},l=ef(t,r);gr(l)?(o.push(e),i[e[n]]="del"):Cu(e,l)?(u.push(l),i[l[n]]="same"):(a.push(l),i[l[n]]="diff")}}));let l=[];return rr(t,(function(t){if(Ne(t,n)){let r={[n]:t[n]};gr(ef(e,r))&&(l.push(t),i[t[n]]="add")}})),{infor:i,del:o,same:u,diff:a,add:l}},e.ltdtkeys2mat=Qr,e.ltdtkeysheads2mat=ei,e.ltdtmapping=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return vr(e)&&vr(t)?or(e,(e=>Vh(e,t,n))):[]},e.ltdtmerge=vm,e.ltdtpick=function(e,t){return vr(e)&&vr(t)?or(e,(e=>Xh(e,t))):[]},e.ltdtpull=function(e,t,n){return Ye(e)&&Ye(t)&&$e(n)&&Wn(e,(e=>Pe(e)))?0===t.length?e:Wn(t,(e=>Pe(e)))?gg(e,t,n):[]:[]},e.mat2ltdt=function(e){if(!vr(e))return[];if(e.length<=1)return[];let t=!1;return rr(e,(function(e){vr(e)||(t=!0)})),t?[]:sg(xu(e)[0],(r=null==(n=e)?0:n.length)?Na(n,1,r):[]);var n,r},e.matConcat=function(e,t){if(!Ye(e))return[];if(!Ye(t))return[];if(0===Xr(e)&&0===Xr(t))return[];let n=Xr(e),r=Xr(Ae(e,0,[])),i=Xr(t),o=Xr(Ae(t,0,[])),a=[],u=Math.max(n,i);for(let n=0;n<u;n++){let i=[],u=-1;for(let t=0;t<r;t++){u++;let r=Ae(e,`${n}.${t}`,null);i[u]=r}for(let e=0;e<o;e++){u++;let r=Ae(t,`${n}.${e}`,null);i[u]=r}a[n]=i}return a},e.matDiff=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Ye(e)&&Ye(t)?0===Xr(e)&&0===Xr(t)?{}:Du(e,t,yg(yg({},n),{},{mode:"matrix"})):{}},e.matat=function(e,t,n){return vr(e)?or(e,(function(e){return Ya(e,t,n)})):[]},e.now2str=Em,e.now2strp=function(){if(!zu(n))throw new Error("invalid dayjs");return n().format("YYYYMMDDHHmmss")},e.nowDay2str=function(){if(!zu(n))throw new Error("invalid dayjs");return n().format("YYYY-MM-DD")},e.nowms2str=fg,e.nowms2strp=function(){if(!zu(n))throw new Error("invalid dayjs");return n().format("YYYYMMDDHHmmssSSS")},e.o2j=Jr,e.obj2b64=function(e){let t="";try{t=bg(Jr(e))}catch(e){t=""}return t},e.obj2pb64=function(e,t){return void 0===e?"":$e(t)?wg(Jr({data:e}),t,!0):""},e.obj2str=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Uint8Array";if(fr(e))return"";if(He(t))t=[t];else if(!Ye(t))return"";let n="";try{n=JSON.stringify(e,(function(e,n){return t.indexOf("Uint8Array")>=0&&(n=Mg.u8arr2b64(n)),t.indexOf("Uint16Array")>=0&&(n=Mg.u16arr2b64(n)),n}))}catch(e){n=""}return n},e.obj2stru8arr=Pg,e.obj2u8arr=function(e){let t=[],n=[];if(!vr(e)&&!Te(e))return null;let r=[],i=[];function o(e){r.push(Mm(e)),i.push(e)}try{let a=Pg(e);o(Tg(a.results)),rr(a.binarys,(e=>{o(e)}));let u=r,l=Tg(JSON.stringify(u)),c=new Uint8Array(8);Ml(Mm(l),c),t.push(c),t.push(l),rr(i,(e=>{t.push(e)})),rr(t,(e=>{n=function(e,t){let n=Mm(e),r=Mm(t),i=new Uint8Array(n+r);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),n),i}(n,e)}))}catch(e){return null}return n},e.objSortBy=Yg,e.objSortByKeys=function(e,t){if(!Te(e))return{};if(!vr(t))return{};let n={};return rr(t,((e,t)=>{n[e]=t})),Yg(e,((e,t)=>Ae(n,t,0)))},e.ocr=Hg,e.ocrDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return vr(n)||(n=["https://cdn.jsdelivr.net/npm/tesseract.js@4.1.2/dist/tesseract.min.js"]),await Es(n),await Hg(e,t)},e.oo=function(e){if(void 0!==e)return cl(Jr(e))},e.openLink=function(e){if(!$e(e))return;let t=document.createElement("a");t.href=e,t.target="_blank",document.body.appendChild(t),t.click(),document.body.removeChild(t)},e.pb642obj=function(e,t){return $e(e)&&$e(t)?cl(Xi(e,t,!0)).data:""},e.pm2resolve=Ch,e.pmChain=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Ye(e)){let e=ml();return e.reject("pms is not an array"),e}return e.reduce(((e,t)=>e.then(t)),Promise.resolve(t))},e.pmConvertResolve=Lh,e.pmDebounce=function(){return new function(e){let t=[],n=null,r=null,i="wait";return fa(e)||(e=300),e=sa(e),function(o){if(zu(o)){(null===r||"wait"===i)&&(r=Date.now());for(var a=arguments.length,u=new Array(a>1?a-1:0),l=1;l<a;l++)u[l-1]=arguments[l];t.push({func:o,input:u,output:null}),null===n&&"wait"===i&&(n=setInterval((()=>{if("wait"!==i)return;if("wait"===i&&0===t.length)return clearInterval(n),void(n=null);let o=!1;if(o=null===r||Date.now()-r>e,o){i="doing",r=Date.now();let e=t.pop();t=[];let n=e.func(...e.input);_l(n)?n.then((t=>{e.output=t})).catch((t=>{e.output={err:t}})).finally((()=>{i="wait"})):(e.output=n,i="wait")}"wait"===i&&0===t.length&&(clearInterval(n),n=null)}),10))}else console.log("func is not a function")}}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:300)},e.pmHook=$g,e.pmHookReject=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return zu(e)?(zu(t)||(t=()=>{}),$g(e,(e=>{if("afterCatch"===e.mode)return t(e.data)}))):null},e.pmIni=function(){return Promise.resolve()},e.pmInvResolve=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!_l(e))throw new Error("pm is not a promise");let n=Ae(t,"thenExtractData");Kr(n)||(n=!1);let r=ml();return e.then((e=>{n&&(e=Ae(e,"data"));let t=Ae(e,"state",""),i=Ae(e,"msg",{});"success"===t?r.resolve(i):"cancelled"===t?r.reject({reason:"cancelled"}):r.reject(i)})).catch((e=>{r.reject(e)})),r},e.pmMap=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r={},i=!1,o=ml();if(!Ye(e)&&!Pe(e))return o.reject("rs is not an array or object"),o;let a=!1;if(Pe(e)){a=!0;let t=[];rr(e,((e,n)=>{t.push({k:n,v:e})})),e=t}let u=Bh(n);return u.on("message",(function(n){if(i)return;let l,c=u.get();if(zu(t)){let e=c.key,n=c.value;a&&(e=c.value.k,n=c.value.v),l=t(n,e)}else l=c.value;l.then((e=>{r[c.key]=e})).catch((e=>{i=!0,u.clear(),o.reject(e)})).finally((()=>{u.cb(),Xr(r)===e.length&&o.resolve(um(r))}))})),rr(e,((e,t)=>{u.push({key:t,value:e})})),o},e.pmQueue=Fh,e.pmSeries=ws,e.pmThrottle=function(){let e=oa(),t=[],n=null,r=!1;return function(i){let o=ml();if(!zu(i))return void console.log("func is not a function");let a=os();for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c<u;c++)l[c-1]=arguments[c];return t.push({id:a,func:i,input:l}),null===n&&(n=setInterval((async()=>{if(r)return;r=!0;let i=t.pop();for(let n=0;n<t.length;n++){let r=t[n].id,i={state:"cancelled"};e.emit(r,i)}if(t=[],i){let t,n=i.id;t=zu(i.func)?await Ch(i.func)(...i.input):{state:"error",msg:"fun is not a function"},e.emit(n,t)}r=!1,r||0!==t.length||(clearInterval(n),n=null)}),10)),e.once(a,(e=>{"success"===e.state?o.resolve(e.msg):"cancelled"===e.state?o.reject({reason:"cancelled"}):o.reject(e.msg)})),o}},e.pseudoRandom=Cg,e.pseudoRandomIntRange=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"start1";if(wi(e)||(e=0),e=sa(e),wi(t)||(t=100),t=sa(t),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=Cg(n)*(t-e+1)+e;return r=Math.ceil(r),r},e.pseudoRandomRange=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"start1";if(Ce(e)||(e=0),e=bi(e),Ce(t)||(t=1),t=bi(t),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);return Cg(n)*(t-e)+e},e.queue=Bh,e.rang=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!Ce(e))return[];if(e=bi(e),!Ce(t))return[];t=bi(t),fa(n)||(n=2),n=sa(n);let r=(t-e)/n,i=e,o=[];for(let e=0;e<=n;e++)o.push(i),i+=r;return o},e.rep=function(e,t){return $e(e)&&Ta(t)?Fg(e,t):""},e.repObj=function(e,t){return gr(e)?[]:fa(t)?Nm(t,xa(e)):[]},e.replace=Hl,e.replaceObj=function(e,t){if(!$e(e))return"";if(!Te(t))return"";let n=!1;return rr(t,(function(e,t){He(e)||(n=!0)})),n?"":(rr(t,(function(t,n){e=Hl(e,n,t)})),e)},e.replacePlus=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4?arguments[4]:void 0;if(!$e(e)||!$e(t)||!$e(n))return"";if(!He(i))return"";let o="[\\s\\S]*";$e(r)&&(o="[^"+r+"]*");let a=new RegExp(t+o+n,"g");return e.replace(a,i)},e.round=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ta(t)||(t=0),t=sa(t);let r=Ae(n,"rounding","");if("ROUND_HALF_UP"!==r&&"ROUND_HALF_EVEN"!==r&&(r="ROUND_HALF_UP"),!Ce(e))return"";e=bi(e);let i=Ey.clone();return i.set({rounding:Ey[r]}),new i(e).toDecimalPlaces(t).toNumber()},e.secd=function(e){return Ce(e)?1/Kc(e=bi(e)):null},e.sep=Au,e.sepInt=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!wi(e))return[];if(!Ta(t))return[];if(!Kr(n))return[];let r=Sy(e/t),i=e-r*t,o=[];for(let e=1;e<=t;e++){let t=r;e<=i&&(t=r+1),o.push(t)}return n&&(o=tl(o)),o},e.sind=es,e.split=_u,e.str2aes=wg,e.str2b64=bg,e.str2hint=Ig,e.str2md5=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!$e(e))return"";if(!Kr(t))return"";let n=ky(e),r="";return r=t?n.toString(Ai):n.toString(Vi),r},e.str2obj=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Uint8Array";if(He(t))t=[t];else if(!Ye(t))return{};let n={};try{n=JSON.parse(e,(function(e,n){return t.indexOf("Uint8Array")>=0&&(n=Mg.b642u8arr(n)),t.indexOf("Uint16Array")>=0&&(n=Mg.b642u16arr(n)),n}))}catch(e){n={}}return n},e.str2sha512=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!$e(e))return"";if(!Kr(t))return"";let n=Ay(e),r="";return r=t?n.toString(Ai):n.toString(Vi),r},e.str2u8arr=Tg,e.strCompare=Py,e.strDiff=ju,e.strFindFuzz=Hy,e.strFindFuzzDyn=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return vr(r)||(r=["https://cdn.jsdelivr.net/npm/fuse.js@6.6.2/dist/fuse.min.js"]),await Es(r),Hy(e,t,n)},e.strFindSimilar=function(e,t){let n="";if($e(e)||Ce(e))n=Ju(e);else{if(!vr(e))return{};n=Ca(e,"")}return Ce(t)&&(t=Ju(t)),$e(t)&&(t=[t]),vr(t)?function(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let o=t[i],a=Py(e,o);n.push({target:o,rating:a}),a>n[r].rating&&(r=i)}return{ratings:n,bestMatch:n[r],bestMatchIndex:r}}(n,t=or(t,(function(e){return Ju(e)}))):{}},e.strdelleft=Yu,e.strdelright=nl,e.strleft=Pu,e.strmid=$l,e.strright=Tu,e.stru8arr2obj=$y,e.tand=Jc,e.time2day=function(e){return zm(e)?n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD"):""},e.time2hour=function(e){return zm(e)?n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH"):""},e.time2min=Rm,e.timeTZ2day=function(e){return cg(e)?(e=ug.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD")):""},e.timeTZ2expire=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return cg(e)?(e=Cy(e),t=Cy(t),Iy(e,t)):{today:null,msg:"",err:"時間格式錯誤"}},e.timeTZ2hour=function(e){return cg(e)?(e=ug.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH")):""},e.timeTZ2min=function(e){return cg(e)?(e=ug.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH:mm")):""},e.timeTZ2past=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return cg(e)?(e=Ny(e),t=Ny(t),Ly(e,t)):{today:null,msg:"",err:"時間格式錯誤"}},e.timems2day=function(e){return og(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DD"):""},e.timems2hour=function(e){return og(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH"):""},e.timems2min=function(e){return og(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm"):""},e.timems2time=function(e){return og(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm:ss"):""},e.timemsTZ2day=function(e){return lg(e)?(e=ug.delTZ(e),n(e).format("YYYY-MM-DD")):""},e.timemsTZ2expire=Iy,e.timemsTZ2hour=function(e){return lg(e)?(e=ug.delTZ(e),n(e).format("YYYY-MM-DDTHH")):""},e.timemsTZ2min=function(e){return lg(e)?(e=ug.delTZ(e),n(e).format("YYYY-MM-DDTHH:mm")):""},e.timemsTZ2past=Ly,e.timemsTZ2time=function(e){return lg(e)?(e=ug.delTZ(e),n(e).format("YYYY-MM-DDTHH:mm:ss")):""},e.treeObj=Xc,e.treeToFilepath=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return[];let n=Ae(t,"delimiter");$e(n)||(n="/");let r=Ae(t,"bindRoot");$e(r)||(r="root");let i=[];return Xc(e,((e,t,o)=>{let a=Ae(e,"_type","");if("folder"!==a&&"file"!==a)return e;let u=or(Ae(e,"pathInfors",[]),"name"),l=Ae(u,0,"")===r;if(1===Xr(u)&&l)return e;l&&(u=Qu(u));let c={type:a,path:n+Ca(u,n)};return i.push(c),e}),{force:!0}),i},e.trim=rl,e.u16arr2b64=Sg,e.u16arr2u8arr=Eg,e.u8arr2ab=function(e){return fl(e)?e.buffer:new ArrayBuffer},e.u8arr2b64=Og,e.u8arr2blob=qh,e.u8arr2bs=function(e){if(!fl(e))return"";let t=e.length,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n},e.u8arr2obj=function(e){let t=null;if(!fl(e))return null;try{let n=8,r=e.slice(0,n),i=e.slice(n,Mm(e)),o=kl(r),a=i.slice(0,o),u=i.slice(o,Mm(i)),l=By(a),c=function(e,t){let n=0,r=0,i=[];return rr(t,(t=>{r=n+t;let o=e.slice(n,r);n=r,i.push(o)})),i}(u,JSON.parse(l));t=$y({results:By(c.shift()),binarys:c})}catch(e){}return t},e.u8arr2str=By,e.u8arr2u16arr=pl,e.urlParse=function(e){if(!$e(e))return{};if(!$e(e=Ae(e=ru(e,"?"),"[1]")))return{};let t=ru(e,"&");return t=or(t,(function(e){return ru(e,"=")})),t=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}(t),t},e.verifyValue=function(e,t){let n=!1,r="";if("isstr"===t)He(e)||(n=!0,r="需要為字串",e="");else if("isnum"===t)Ce(e)||(n=!0,r="需要為數字",e=0);else if("isp0num"===t)tg(e)||(n=!0,r="需要為含0的正浮點數",e=0);else if("isn0num"===t)eg(e)||(n=!0,r="需要為含0的負浮點數",e=0);else if("isint"===t)wi(e)||(n=!0,r="需要為整數",e=0);else if("ispint"===t)fa(e)||(n=!0,r="需要為不含0正整數",e=0);else if("isp0int"===t)Ta(e)||(n=!0,r="需要為含0正整數",e=0);else if("isnint"===t)Nh(e)||(n=!0,r="需要為不含0負整數",e=0);else if("isn0int"===t)Qm(e)||(n=!0,r="需要為含0負整數",e=0);else if(zu(t)){e=t(e)}else"any"===t?Ce(e)||He(e)||(n=!0,r="需要為字串或數字",e=""):(n=!0,r="需要指定驗證類型",e=null);return{value:e,err:n,errmsg:r}},e.waitFun=Al}));
14
+ var zg,Rg,Ug=9e15,Wg=1e9,qg="0123456789abcdef",Vg="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Xg="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Zg={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Ug,maxE:Ug,crypto:!1},Gg=!0,Kg="[DecimalError] ",Jg=Kg+"Invalid argument: ",Qg=Kg+"Precision limit exceeded",ev=Kg+"crypto unavailable",tv="[object Decimal]",nv=Math.floor,rv=Math.pow,iv=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ov=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,av=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uv=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,lv=1e7,cv=7,sv=Vg.length-1,fv=Xg.length-1,pv={toStringTag:tv};function dv(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",(n=cv-r.length)&&(o+=Ev(n)),o+=r;a=e[t],(n=cv-(r=a+"").length)&&(o+=Ev(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function hv(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Jg+e)}function mv(e,t,n,r){var i,o,a,u;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=cv,i=0):(i=Math.ceil((t+1)/cv),t%=cv),o=rv(10,cv-t),u=e[i]%o|0,null==r?t<3?(0==t?u=u/100|0:1==t&&(u=u/10|0),a=n<4&&99999==u||n>3&&49999==u||5e4==u||0==u):a=(n<4&&u+1==o||n>3&&u+1==o/2)&&(e[i+1]/o/100|0)==rv(10,t-2)-1||(u==o/2||0==u)&&0==(e[i+1]/o/100|0):t<4?(0==t?u=u/1e3|0:1==t?u=u/100|0:2==t&&(u=u/10|0),a=(r||n<4)&&9999==u||!r&&n>3&&4999==u):a=((r||n<4)&&u+1==o||!r&&n>3&&u+1==o/2)&&(e[i+1]/o/1e3|0)==rv(10,t-3)-1,a}function gv(e,t,n){for(var r,i,o=[0],a=0,u=e.length;a<u;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=qg.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}pv.absoluteValue=pv.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),yv(e)},pv.ceil=function(){return yv(new this.constructor(this),this.e+1,2)},pv.clampedTo=pv.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(Jg+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},pv.comparedTo=pv.cmp=function(e){var t,n,r,i,o=this,a=o.d,u=(e=new o.constructor(e)).d,l=o.s,c=e.s;if(!a||!u)return l&&c?l!==c?l:a===u?0:!a^l<0?1:-1:NaN;if(!a[0]||!u[0])return a[0]?l:u[0]?-c:0;if(l!==c)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(t=0,n=(r=a.length)<(i=u.length)?r:i;t<n;++t)if(a[t]!==u[t])return a[t]>u[t]^l<0?1:-1;return r===i?0:r>i^l<0?1:-1},pv.cosine=pv.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+cv,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?i=(1/Hv(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=Yv(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,$v(r,n)),r.precision=e,r.rounding=t,yv(2==Rg||3==Rg?n.neg():n,e,t,!0)):new r(1):new r(NaN)},pv.cubeRoot=pv.cbrt=function(){var e,t,n,r,i,o,a,u,l,c,s=this,f=s.constructor;if(!s.isFinite()||s.isZero())return new f(s);for(Gg=!1,(o=s.s*rv(s.s*s,1/3))&&Math.abs(o)!=1/0?r=new f(o.toString()):(n=dv(s.d),(o=((e=s.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=rv(n,1/3),e=nv((e+1)/3)-(e%3==(e<0?-1:2)),(r=new f(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=s.s),a=(e=f.precision)+3;;)if(c=(l=(u=r).times(u).times(u)).plus(s),r=vv(c.plus(s).times(u),c.plus(l),a+2,1),dv(u.d).slice(0,a)===(n=dv(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(yv(r,e+1,1),t=!r.times(r).times(r).eq(s));break}if(!i&&(yv(u,e+1,0),u.times(u).times(u).eq(s))){r=u;break}a+=4,i=1}return Gg=!0,yv(r,e,f.rounding,t)},pv.decimalPlaces=pv.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-nv(this.e/cv))*cv,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},pv.dividedBy=pv.div=function(e){return vv(this,new this.constructor(e))},pv.dividedToIntegerBy=pv.divToInt=function(e){var t=this.constructor;return yv(vv(this,new t(e),0,1,1),t.precision,t.rounding)},pv.equals=pv.eq=function(e){return 0===this.cmp(e)},pv.floor=function(){return yv(new this.constructor(this),this.e+1,3)},pv.greaterThan=pv.gt=function(e){return this.cmp(e)>0},pv.greaterThanOrEqualTo=pv.gte=function(e){var t=this.cmp(e);return 1==t||0===t},pv.hyperbolicCosine=pv.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,u=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return u;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/Hv(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=Yv(a,1,o.times(t),new a(1),!0);for(var l,c=e,s=new a(8);c--;)l=o.times(o),o=u.minus(l.times(s.minus(l.times(s))));return yv(o,a.precision=n,a.rounding=r,!0)},pv.hyperbolicSine=pv.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=Yv(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=Yv(o,2,i=i.times(1/Hv(5,e)),i,!0);for(var a,u=new o(5),l=new o(16),c=new o(20);e--;)a=i.times(i),i=i.times(u.plus(a.times(l.times(a).plus(c))))}return o.precision=t,o.rounding=n,yv(i,t,n,!0)},pv.hyperbolicTangent=pv.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,vv(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},pv.inverseCosine=pv.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?jv(n,i,o):new n(0):new n(NaN):t.isZero()?jv(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=jv(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},pv.inverseHyperbolicCosine=pv.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Gg=!1,n=n.times(n).minus(1).sqrt().plus(n),Gg=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},pv.inverseHyperbolicSine=pv.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Gg=!1,n=n.times(n).plus(1).sqrt().plus(n),Gg=!0,r.precision=e,r.rounding=t,n.ln())},pv.inverseHyperbolicTangent=pv.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?yv(new o(i),e,t,!0):(o.precision=n=r-i.e,i=vv(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},pv.inverseSine=pv.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=jv(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},pv.inverseTangent=pv.atan=function(){var e,t,n,r,i,o,a,u,l,c=this,s=c.constructor,f=s.precision,p=s.rounding;if(c.isFinite()){if(c.isZero())return new s(c);if(c.abs().eq(1)&&f+4<=fv)return(a=jv(s,f+4,p).times(.25)).s=c.s,a}else{if(!c.s)return new s(NaN);if(f+4<=fv)return(a=jv(s,f+4,p).times(.5)).s=c.s,a}for(s.precision=u=f+10,s.rounding=1,e=n=Math.min(28,u/cv+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Gg=!1,t=Math.ceil(u/cv),r=1,l=c.times(c),a=new s(c),i=c;-1!==e;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),Gg=!0,yv(a,s.precision=f,s.rounding=p,!0)},pv.isFinite=function(){return!!this.d},pv.isInteger=pv.isInt=function(){return!!this.d&&nv(this.e/cv)>this.d.length-2},pv.isNaN=function(){return!this.s},pv.isNegative=pv.isNeg=function(){return this.s<0},pv.isPositive=pv.isPos=function(){return this.s>0},pv.isZero=function(){return!!this.d&&0===this.d[0]},pv.lessThan=pv.lt=function(e){return this.cmp(e)<0},pv.lessThanOrEqualTo=pv.lte=function(e){return this.cmp(e)<1},pv.logarithm=pv.log=function(e){var t,n,r,i,o,a,u,l,c=this,s=c.constructor,f=s.precision,p=s.rounding;if(null==e)e=new s(10),t=!0;else{if(n=(e=new s(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new s(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new s(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Gg=!1,a=_v(c,u=f+5),r=t?xv(s,u+10):_v(e,u),mv((l=vv(a,r,u,1)).d,i=f,p))do{if(a=_v(c,u+=10),r=t?xv(s,u+10):_v(e,u),l=vv(a,r,u,1),!o){+dv(l.d).slice(i+1,i+15)+1==1e14&&(l=yv(l,f+1,0));break}}while(mv(l.d,i+=10,p));return Gg=!0,yv(l,f,p)},pv.minus=pv.sub=function(e){var t,n,r,i,o,a,u,l,c,s,f,p,d=this,h=d.constructor;if(e=new h(e),!d.d||!e.d)return d.s&&e.s?d.d?e.s=-e.s:e=new h(e.d||d.s!==e.s?d:NaN):e=new h(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(c=d.d,p=e.d,u=h.precision,l=h.rounding,!c[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!c[0])return new h(3===l?-0:0);e=new h(d)}return Gg?yv(e,u,l):e}if(n=nv(e.e/cv),s=nv(d.e/cv),c=c.slice(),o=s-n){for((f=o<0)?(t=c,o=-o,a=p.length):(t=p,n=s,a=c.length),o>(r=Math.max(Math.ceil(u/cv),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((f=(r=c.length)<(a=p.length))&&(a=r),r=0;r<a;r++)if(c[r]!=p[r]){f=c[r]<p[r];break}o=0}for(f&&(t=c,c=p,p=t,e.s=-e.s),a=c.length,r=p.length-a;r>0;--r)c[a++]=0;for(r=p.length;r>o;){if(c[--r]<p[r]){for(i=r;i&&0===c[--i];)c[i]=lv-1;--c[i],c[r]+=lv}c[r]-=p[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(e.d=c,e.e=wv(c,n),Gg?yv(e,u,l):e):new h(3===l?-0:0)},pv.modulo=pv.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?yv(new r(n),r.precision,r.rounding):(Gg=!1,9==r.modulo?(t=vv(n,e.abs(),0,3,1)).s*=e.s:t=vv(n,e,0,r.modulo,1),t=t.times(e),Gg=!0,n.minus(t))},pv.naturalExponential=pv.exp=function(){return Mv(this)},pv.naturalLogarithm=pv.ln=function(){return _v(this)},pv.negated=pv.neg=function(){var e=new this.constructor(this);return e.s=-e.s,yv(e)},pv.plus=pv.add=function(e){var t,n,r,i,o,a,u,l,c,s,f=this,p=f.constructor;if(e=new p(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new p(e.d||f.s===e.s?f:NaN)):e=new p(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(c=f.d,s=e.d,u=p.precision,l=p.rounding,!c[0]||!s[0])return s[0]||(e=new p(f)),Gg?yv(e,u,l):e;if(o=nv(f.e/cv),r=nv(e.e/cv),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,a=s.length):(n=s,r=o,a=c.length),i>(a=(o=Math.ceil(u/cv))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=s.length)<0&&(i=a,n=s,s=c,c=n),t=0;i;)t=(c[--i]=c[i]+s[i]+t)/lv|0,c[i]%=lv;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=wv(c,r),Gg?yv(e,u,l):e},pv.precision=pv.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Jg+e);return n.d?(t=Ov(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},pv.round=function(){var e=this,t=e.constructor;return yv(new t(e),e.e+1,t.rounding)},pv.sine=pv.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+cv,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:Yv(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/Hv(5,n)),t=Yv(e,2,t,t);for(var i,o=new e(5),a=new e(16),u=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(u))));return t}(r,$v(r,n)),r.precision=e,r.rounding=t,yv(Rg>2?n.neg():n,e,t,!0)):new r(NaN)},pv.squareRoot=pv.sqrt=function(){var e,t,n,r,i,o,a=this,u=a.d,l=a.e,c=a.s,s=a.constructor;if(1!==c||!u||!u[0])return new s(!c||c<0&&(!u||u[0])?NaN:u?a:1/0);for(Gg=!1,0==(c=Math.sqrt(+a))||c==1/0?(((t=dv(u)).length+l)%2==0&&(t+="0"),c=Math.sqrt(t),l=nv((l+1)/2)-(l<0||l%2),r=new s(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new s(c.toString()),n=(l=s.precision)+3;;)if(r=(o=r).plus(vv(a,o,n+2,1)).times(.5),dv(o.d).slice(0,n)===(t=dv(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(yv(r,l+1,1),e=!r.times(r).eq(a));break}if(!i&&(yv(o,l+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Gg=!0,yv(r,l,s.rounding,e)},pv.tangent=pv.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=vv(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,yv(2==Rg||4==Rg?n.neg():n,e,t,!0)):new r(NaN)},pv.times=pv.mul=function(e){var t,n,r,i,o,a,u,l,c,s=this,f=s.constructor,p=s.d,d=(e=new f(e)).d;if(e.s*=s.s,!(p&&p[0]&&d&&d[0]))return new f(!e.s||p&&!p[0]&&!d||d&&!d[0]&&!p?NaN:p&&d?0*e.s:e.s/0);for(n=nv(s.e/cv)+nv(e.e/cv),(l=p.length)<(c=d.length)&&(o=p,p=d,d=o,a=l,l=c,c=a),o=[],r=a=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)u=o[i]+d[r]*p[i-r-1]+t,o[i--]=u%lv|0,t=u/lv|0;o[i]=(o[i]+t)%lv|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=wv(o,n),Gg?yv(e,f.precision,f.rounding):e},pv.toBinary=function(e,t){return Iv(this,2,e,t)},pv.toDecimalPlaces=pv.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(hv(e,0,Wg),void 0===t?t=r.rounding:hv(t,0,8),yv(n,e+n.e+1,t))},pv.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=bv(r,!0):(hv(e,0,Wg),void 0===t?t=i.rounding:hv(t,0,8),n=bv(r=yv(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},pv.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=bv(i):(hv(e,0,Wg),void 0===t?t=o.rounding:hv(t,0,8),n=bv(r=yv(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},pv.toFraction=function(e){var t,n,r,i,o,a,u,l,c,s,f,p,d=this,h=d.d,m=d.constructor;if(!h)return new m(d);if(c=n=new m(1),r=l=new m(0),a=(o=(t=new m(r)).e=Ov(h)-d.e-1)%cv,t.d[0]=rv(10,a<0?cv+a:a),null==e)e=o>0?t:c;else{if(!(u=new m(e)).isInt()||u.lt(c))throw Error(Jg+u);e=u.gt(t)?o>0?t:c:u}for(Gg=!1,u=new m(dv(h)),s=m.precision,m.precision=o=h.length*cv*2;f=vv(u,t,0,1,1),1!=(i=n.plus(f.times(r))).cmp(e);)n=r,r=i,i=c,c=l.plus(f.times(i)),l=i,i=t,t=u.minus(f.times(i)),u=i;return i=vv(e.minus(n),r,0,1,1),l=l.plus(i.times(c)),n=n.plus(i.times(r)),l.s=c.s=d.s,p=vv(c,r,o,1).minus(d).abs().cmp(vv(l,n,o,1).minus(d).abs())<1?[c,r]:[l,n],m.precision=s,Gg=!0,p},pv.toHexadecimal=pv.toHex=function(e,t){return Iv(this,16,e,t)},pv.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:hv(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(Gg=!1,n=vv(n,e,0,t,1).times(e),Gg=!0,yv(n)):(e.s=n.s,n=e),n},pv.toNumber=function(){return+this},pv.toOctal=function(e,t){return Iv(this,8,e,t)},pv.toPower=pv.pow=function(e){var t,n,r,i,o,a,u=this,l=u.constructor,c=+(e=new l(e));if(!(u.d&&e.d&&u.d[0]&&e.d[0]))return new l(rv(+u,c));if((u=new l(u)).eq(1))return u;if(r=l.precision,o=l.rounding,e.eq(1))return yv(u,r,o);if((t=nv(e.e/cv))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=Sv(l,u,n,r),e.s<0?new l(1).div(i):yv(i,r,o);if((a=u.s)<0){if(t<e.d.length-1)return new l(NaN);if(0==(1&e.d[t])&&(a=1),0==u.e&&1==u.d[0]&&1==u.d.length)return u.s=a,u}return(t=0!=(n=rv(+u,c))&&isFinite(n)?new l(n+"").e:nv(c*(Math.log("0."+dv(u.d))/Math.LN10+u.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(Gg=!1,l.rounding=u.s=1,n=Math.min(12,(t+"").length),(i=Mv(e.times(_v(u,r+n)),r)).d&&mv((i=yv(i,r+5,1)).d,r,o)&&(t=r+10,+dv((i=yv(Mv(e.times(_v(u,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=yv(i,r+1,0))),i.s=a,Gg=!0,l.rounding=o,yv(i,r,o))},pv.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=bv(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(hv(e,1,Wg),void 0===t?t=i.rounding:hv(t,0,8),n=bv(r=yv(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},pv.toSignificantDigits=pv.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(hv(e,1,Wg),void 0===t?t=n.rounding:hv(t,0,8)),yv(new n(this),e,t)},pv.toString=function(){var e=this,t=e.constructor,n=bv(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},pv.truncated=pv.trunc=function(){return yv(new this.constructor(this),this.e+1,1)},pv.valueOf=pv.toJSON=function(){var e=this,t=e.constructor,n=bv(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var vv=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a,u,l){var c,s,f,p,d,h,m,g,v,y,b,w,x,j,O,E,S,k,D,M,_=r.constructor,A=r.s==i.s?1:-1,P=r.d,T=i.d;if(!(P&&P[0]&&T&&T[0]))return new _(r.s&&i.s&&(P?!T||P[0]!=T[0]:T)?P&&0==P[0]||!T?0*A:A/0:NaN);for(l?(d=1,s=r.e-i.e):(l=lv,d=cv,s=nv(r.e/d)-nv(i.e/d)),D=T.length,S=P.length,y=(v=new _(A)).d=[],f=0;T[f]==(P[f]||0);f++);if(T[f]>(P[f]||0)&&s--,null==o?(j=o=_.precision,a=_.rounding):j=u?o+(r.e-i.e)+1:o,j<0)y.push(1),h=!0;else{if(j=j/d+2|0,f=0,1==D){for(p=0,T=T[0],j++;(f<S||p)&&j--;f++)O=p*l+(P[f]||0),y[f]=O/T|0,p=O%T|0;h=p||f<S}else{for((p=l/(T[0]+1)|0)>1&&(T=e(T,p,l),P=e(P,p,l),D=T.length,S=P.length),E=D,w=(b=P.slice(0,D)).length;w<D;)b[w++]=0;(M=T.slice()).unshift(0),k=T[0],T[1]>=l/2&&++k;do{p=0,(c=t(T,b,D,w))<0?(x=b[0],D!=w&&(x=x*l+(b[1]||0)),(p=x/k|0)>1?(p>=l&&(p=l-1),1==(c=t(m=e(T,p,l),b,g=m.length,w=b.length))&&(p--,n(m,D<g?M:T,g,l))):(0==p&&(c=p=1),m=T.slice()),(g=m.length)<w&&m.unshift(0),n(b,m,w,l),-1==c&&(c=t(T,b,D,w=b.length))<1&&(p++,n(b,D<w?M:T,w,l)),w=b.length):0===c&&(p++,b=[0]),y[f++]=p,c&&b[0]?b[w++]=P[E]||0:(b=[P[E]],w=1)}while((E++<S||void 0!==b[0])&&j--);h=void 0!==b[0]}y[0]||y.shift()}if(1==d)v.e=s,zg=h;else{for(f=1,p=y[0];p>=10;p/=10)f++;v.e=f+s*d-1,yv(v,u?o+v.e+1:o,a,h)}return v}}();function yv(e,t,n,r){var i,o,a,u,l,c,s,f,p,d=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,u=f[0];u>=10;u/=10)i++;if((o=t-i)<0)o+=cv,a=t,l=(s=f[p=0])/rv(10,i-a-1)%10|0;else if((p=Math.ceil((o+1)/cv))>=(u=f.length)){if(!r)break e;for(;u++<=p;)f.push(0);s=l=0,i=1,a=(o%=cv)-cv+1}else{for(s=u=f[p],i=1;u>=10;u/=10)i++;l=(a=(o%=cv)-cv+i)<0?0:s/rv(10,i-a-1)%10|0}if(r=r||t<0||void 0!==f[p+1]||(a<0?s:s%rv(10,i-a-1)),c=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?s/rv(10,i-a):0:f[p-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=rv(10,(cv-t%cv)%cv),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=p,u=1,p--):(f.length=p+1,u=rv(10,cv-o),f[p]=a>0?(s/rv(10,i-a)%rv(10,a)|0)*u:0),c)for(;;){if(0==p){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=u,u=1;a>=10;a/=10)u++;o!=u&&(e.e++,f[0]==lv&&(f[0]=1));break}if(f[p]+=u,f[p]!=lv)break;f[p--]=0,u=1}for(o=f.length;0===f[--o];)f.pop()}return Gg&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function bv(e,t,n){if(!e.isFinite())return Av(e);var r,i=e.e,o=dv(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Ev(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ev(-i-1)+o,n&&(r=n-a)>0&&(o+=Ev(r))):i>=a?(o+=Ev(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Ev(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Ev(r))),o}function wv(e,t){var n=e[0];for(t*=cv;n>=10;n/=10)t++;return t}function xv(e,t,n){if(t>sv)throw Gg=!0,n&&(e.precision=n),Error(Qg);return yv(new e(Vg),t,1,!0)}function jv(e,t,n){if(t>fv)throw Error(Qg);return yv(new e(Xg),t,n,!0)}function Ov(e){var t=e.length-1,n=t*cv+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function Ev(e){for(var t="";e--;)t+="0";return t}function Sv(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/cv+4);for(Gg=!1;;){if(n%2&&Lv((o=o.times(t)).d,a)&&(i=!0),0===(n=nv(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}Lv((t=t.times(t)).d,a)}return Gg=!0,o}function kv(e){return 1&e.d[e.d.length-1]}function Dv(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function Mv(e,t){var n,r,i,o,a,u,l,c=0,s=0,f=0,p=e.constructor,d=p.rounding,h=p.precision;if(!e.d||!e.d[0]||e.e>17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(Gg=!1,l=h):l=t,u=new p(.03125);e.e>-2;)e=e.times(u),f+=5;for(l+=r=Math.log(rv(2,f))/Math.LN10*2+5|0,n=o=a=new p(1),p.precision=l;;){if(o=yv(o.times(e),l,1),n=n.times(++s),dv((u=a.plus(vv(o,n,l,1))).d).slice(0,l)===dv(a.d).slice(0,l)){for(i=f;i--;)a=yv(a.times(a),l,1);if(null!=t)return p.precision=h,a;if(!(c<3&&mv(a.d,l-r,d,c)))return yv(a,p.precision=h,d,Gg=!0);p.precision=l+=10,n=o=u=new p(1),s=0,c++}a=u}}function _v(e,t){var n,r,i,o,a,u,l,c,s,f,p,d=1,h=e,m=h.d,g=h.constructor,v=g.rounding,y=g.precision;if(h.s<0||!m||!m[0]||!h.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=h.s?NaN:m?0:h);if(null==t?(Gg=!1,s=y):s=t,g.precision=s+=10,r=(n=dv(m)).charAt(0),!(Math.abs(o=h.e)<15e14))return c=xv(g,s+2,y).times(o+""),h=_v(new g(r+"."+n.slice(1)),s-10).plus(c),g.precision=y,null==t?yv(h,y,v,Gg=!0):h;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=dv((h=h.times(e)).d)).charAt(0),d++;for(o=h.e,r>1?(h=new g("0."+n),o++):h=new g(r+"."+n.slice(1)),f=h,l=a=h=vv(h.minus(1),h.plus(1),s,1),p=yv(h.times(h),s,1),i=3;;){if(a=yv(a.times(p),s,1),dv((c=l.plus(vv(a,new g(i),s,1))).d).slice(0,s)===dv(l.d).slice(0,s)){if(l=l.times(2),0!==o&&(l=l.plus(xv(g,s+2,y).times(o+""))),l=vv(l,new g(d),s,1),null!=t)return g.precision=y,l;if(!mv(l.d,s-10,v,u))return yv(l,g.precision=y,v,Gg=!0);g.precision=s+=10,c=a=h=vv(f.minus(1),f.plus(1),s,1),p=yv(h.times(h),s,1),i=u=1}l=c,i+=2}}function Av(e){return String(e.s*e.s/0)}function Pv(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%cv,n<0&&(r+=cv),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=cv;r<i;)e.d.push(+t.slice(r,r+=cv));t=t.slice(r),r=cv-t.length}else r-=i;for(;r--;)t+="0";e.d.push(+t),Gg&&(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 Tv(e,t){var n,r,i,o,a,u,l,c,s;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),uv.test(t))return Pv(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(ov.test(t))n=16,t=t.toLowerCase();else if(iv.test(t))n=2;else{if(!av.test(t))throw Error(Jg+t);n=8}for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(u=(t=t.replace(".","")).length)-o,i=Sv(r,new r(n),o,2*o)),o=s=(c=gv(t,n,lv)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=wv(c,s),e.d=c,Gg=!1,a&&(e=vv(e,i,4*u)),l&&(e=e.times(Math.abs(l)<54?rv(2,l):Ey.pow(2,l))),Gg=!0,e)}function Yv(e,t,n,r,i){var o,a,u,l,c=e.precision,s=Math.ceil(c/cv);for(Gg=!1,l=n.times(n),u=new e(r);;){if(a=vv(u.times(l),new e(t++*t++),c,1),u=i?r.plus(a):r.minus(a),r=vv(a.times(l),new e(t++*t++),c,1),void 0!==(a=u.plus(r)).d[s]){for(o=s;a.d[o]===u.d[o]&&o--;);if(-1==o)break}o=u,u=r,r=a,a=o}return Gg=!0,a.d.length=s+1,a}function Hv(e,t){for(var n=e;--t;)n*=e;return n}function $v(e,t){var n,r=t.s<0,i=jv(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return Rg=r?4:1,t;if((n=t.divToInt(i)).isZero())Rg=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return Rg=kv(n)?r?2:3:r?4:1,t;Rg=kv(n)?r?1:4:r?3:2}return t.minus(i).abs()}function Iv(e,t,n,r){var i,o,a,u,l,c,s,f,p,d=e.constructor,h=void 0!==n;if(h?(hv(n,1,Wg),void 0===r?r=d.rounding:hv(r,0,8)):(n=d.precision,r=d.rounding),e.isFinite()){for(h?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(a=(s=bv(e)).indexOf("."))>=0&&(s=s.replace(".",""),(p=new d(1)).e=s.length-a,p.d=gv(bv(p),10,i),p.e=p.d.length),o=l=(f=gv(s,10,i)).length;0==f[--l];)f.pop();if(f[0]){if(a<0?o--:((e=new d(e)).d=f,e.e=o,f=(e=vv(e,p,n,r,0,i)).d,o=e.e,c=zg),a=f[n],u=i/2,c=c||void 0!==f[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(e.s<0?3:2)):a>u||a===u&&(4===r||c||6===r&&1&f[n-1]||r===(e.s<0?8:7)),f.length=n,c)for(;++f[--n]>i-1;)f[n]=0,n||(++o,f.unshift(1));for(l=f.length;!f[l-1];--l);for(a=0,s="";a<l;a++)s+=qg.charAt(f[a]);if(h){if(l>1)if(16==t||8==t){for(a=16==t?4:3,--l;l%a;l++)s+="0";for(l=(f=gv(s,i,t)).length;!f[l-1];--l);for(a=1,s="1.";a<l;a++)s+=qg.charAt(f[a])}else s=s.charAt(0)+"."+s.slice(1);s=s+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)s="0"+s;s="0."+s}else if(++o>l)for(o-=l;o--;)s+="0";else o<l&&(s=s.slice(0,o)+"."+s.slice(o))}else s=h?"0p+0":"0";s=(16==t?"0x":2==t?"0b":8==t?"0o":"")+s}else s=Av(e);return e.s<0?"-"+s:s}function Lv(e,t){if(e.length>t)return e.length=t,!0}function Cv(e){return new this(e).abs()}function Nv(e){return new this(e).acos()}function Bv(e){return new this(e).acosh()}function Fv(e,t){return new this(e).plus(t)}function zv(e){return new this(e).asin()}function Rv(e){return new this(e).asinh()}function Uv(e){return new this(e).atan()}function Wv(e){return new this(e).atanh()}function qv(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?jv(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=jv(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(vv(e,t,o,1)),t=jv(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(vv(e,t,o,1)):(n=jv(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function Vv(e){return new this(e).cbrt()}function Xv(e){return yv(e=new this(e),e.e+1,2)}function Zv(e,t,n){return new this(e).clamp(t,n)}function Gv(e){if(!e||"object"!=typeof e)throw Error(Kg+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,Wg,"rounding",0,8,"toExpNeg",-Ug,0,"toExpPos",0,Ug,"maxE",0,Ug,"minE",-Ug,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=Zg[n]),void 0!==(r=e[n])){if(!(nv(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(Jg+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=Zg[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Jg+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(ev);this[n]=!0}else this[n]=!1}return this}function Kv(e){return new this(e).cos()}function Jv(e){return new this(e).cosh()}function Qv(e,t){return new this(e).div(t)}function ey(e){return new this(e).exp()}function ty(e){return yv(e=new this(e),e.e+1,3)}function ny(){var e,t,n=new this(0);for(Gg=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return Gg=!0,new this(1/0);n=t}return Gg=!0,n.sqrt()}function ry(e){return e instanceof Ey||e&&e.toStringTag===tv||!1}function iy(e){return new this(e).ln()}function oy(e,t){return new this(e).log(t)}function ay(e){return new this(e).log(2)}function uy(e){return new this(e).log(10)}function ly(){return Dv(this,arguments,"lt")}function cy(){return Dv(this,arguments,"gt")}function sy(e,t){return new this(e).mod(t)}function fy(e,t){return new this(e).mul(t)}function py(e,t){return new this(e).pow(t)}function dy(e){var t,n,r,i,o=0,a=new this(1),u=[];if(void 0===e?e=this.precision:hv(e,1,Wg),r=Math.ceil(e/cv),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:u[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(ev);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(u.push(i%1e7),o+=4);o=r/4}else for(;o<r;)u[o++]=1e7*Math.random()|0;for(r=u[--o],e%=cv,r&&e&&(i=rv(10,cv-e),u[o]=(r/i|0)*i);0===u[o];o--)u.pop();if(o<0)n=0,u=[0];else{for(n=-1;0===u[0];n-=cv)u.shift();for(r=1,i=u[0];i>=10;i/=10)r++;r<cv&&(n-=cv-r)}return a.e=n,a.d=u,a}function hy(e){return yv(e=new this(e),e.e+1,this.rounding)}function my(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function gy(e){return new this(e).sin()}function vy(e){return new this(e).sinh()}function yy(e){return new this(e).sqrt()}function by(e,t){return new this(e).sub(t)}function wy(){var e=0,t=arguments,n=new this(t[e]);for(Gg=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return Gg=!0,yv(n,this.precision,this.rounding)}function xy(e){return new this(e).tan()}function jy(e){return new this(e).tanh()}function Oy(e){return yv(e=new this(e),e.e+1,1)}pv[Symbol.for("nodejs.util.inspect.custom")]=pv.toString,pv[Symbol.toStringTag]="Decimal";var Ey=pv.constructor=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,ry(e))return i.s=e.s,void(Gg?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(Gg?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):Pv(i,e.toString())}if("string"!==r)throw Error(Jg+e);return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),uv.test(e)?Pv(i,e):Tv(i,e)}if(o.prototype=pv,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=Gv,o.clone=e,o.isDecimal=ry,o.abs=Cv,o.acos=Nv,o.acosh=Bv,o.add=Fv,o.asin=zv,o.asinh=Rv,o.atan=Uv,o.atanh=Wv,o.atan2=qv,o.cbrt=Vv,o.ceil=Xv,o.clamp=Zv,o.cos=Kv,o.cosh=Jv,o.div=Qv,o.exp=ey,o.floor=ty,o.hypot=ny,o.ln=iy,o.log=oy,o.log10=uy,o.log2=ay,o.max=ly,o.min=cy,o.mod=sy,o.mul=fy,o.pow=py,o.random=dy,o.round=hy,o.sign=my,o.sin=gy,o.sinh=vy,o.sqrt=yy,o.sub=by,o.sum=wy,o.tan=xy,o.tanh=jy,o.trunc=Oy,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(Zg);Vg=new Ey(Vg),Xg=new Ey(Xg);var Sy=la("floor");var ky=ji(Ti());var Dy,My={exports:{}},_y={exports:{}};!function(e,t){var n;e.exports=(n=ki(),Dy||(Dy=1,function(e,t){var n,r,i,o,a,u,l;e.exports=(i=(r=l=ki()).lib,o=i.Base,a=i.WordArray,(u=r.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),u.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=n?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return a.create(n,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),l)}(_y)),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,a=e.algo;function u(){return i.create.apply(i,arguments)}var l=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=u()}();var s=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],u=n[4],s=n[5],f=n[6],p=n[7],d=r.high,h=r.low,m=i.high,g=i.low,v=o.high,y=o.low,b=a.high,w=a.low,x=u.high,j=u.low,O=s.high,E=s.low,S=f.high,k=f.low,D=p.high,M=p.low,_=d,A=h,P=m,T=g,Y=v,H=y,$=b,I=w,L=x,C=j,N=O,B=E,F=S,z=k,R=D,U=M,W=0;W<80;W++){var q,V,X=c[W];if(W<16)V=X.high=0|e[t+2*W],q=X.low=0|e[t+2*W+1];else{var Z=c[W-15],G=Z.high,K=Z.low,J=(G>>>1|K<<31)^(G>>>8|K<<24)^G>>>7,Q=(K>>>1|G<<31)^(K>>>8|G<<24)^(K>>>7|G<<25),ee=c[W-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[W-7],ae=oe.high,ue=oe.low,le=c[W-16],ce=le.high,se=le.low;V=(V=(V=J+ae+((q=Q+ue)>>>0<Q>>>0?1:0))+re+((q+=ie)>>>0<ie>>>0?1:0))+ce+((q+=se)>>>0<se>>>0?1:0),X.high=V,X.low=q}var fe,pe=L&N^~L&F,de=C&B^~C&z,he=_&P^_&Y^P&Y,me=A&T^A&H^T&H,ge=(_>>>28|A<<4)^(_<<30|A>>>2)^(_<<25|A>>>7),ve=(A>>>28|_<<4)^(A<<30|_>>>2)^(A<<25|_>>>7),ye=(L>>>14|C<<18)^(L>>>18|C<<14)^(L<<23|C>>>9),be=(C>>>14|L<<18)^(C>>>18|L<<14)^(C<<23|L>>>9),we=l[W],xe=we.high,je=we.low,Oe=R+ye+((fe=U+be)>>>0<U>>>0?1:0),Ee=ve+me;R=F,U=z,F=N,z=B,N=L,B=C,L=$+(Oe=(Oe=(Oe=Oe+pe+((fe+=de)>>>0<de>>>0?1:0))+xe+((fe+=je)>>>0<je>>>0?1:0))+V+((fe+=q)>>>0<q>>>0?1:0))+((C=I+fe|0)>>>0<I>>>0?1:0)|0,$=Y,I=H,Y=P,H=T,P=_,T=A,_=Oe+(ge+he+(Ee>>>0<ve>>>0?1:0))+((A=fe+Ee|0)>>>0<fe>>>0?1:0)|0}h=r.low=h+A,r.high=d+_+(h>>>0<A>>>0?1:0),g=i.low=g+T,i.high=m+P+(g>>>0<T>>>0?1:0),y=o.low=y+H,o.high=v+Y+(y>>>0<H>>>0?1:0),w=a.low=w+I,a.high=b+$+(w>>>0<I>>>0?1:0),j=u.low=j+C,u.high=x+L+(j>>>0<C>>>0?1:0),E=s.low=E+B,s.high=O+N+(E>>>0<B>>>0?1:0),k=f.low=k+z,f.high=S+F+(k>>>0<z>>>0?1:0),M=p.low=M+U,p.high=D+R+(M>>>0<U>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(s),e.HmacSHA512=t._createHmacHelper(s)}(),n.SHA512)}(My);var Ay=ji(My.exports);function Py(e,t){return $e(e)&&$e(t)?function(e,t){if(e=e.replace(/\s+/g,""),t=t.replace(/\s+/g,""),!e.length&&!t.length)return 1;if(!e.length||!t.length)return 0;if(e===t)return 1;if(1===e.length&&1===t.length)return 0;if(e.length<2||t.length<2)return 0;let n=new Map;for(let t=0;t<e.length-1;t++){const r=e.substring(t,t+2),i=n.has(r)?n.get(r)+1:1;n.set(r,i)}let r=0;for(let e=0;e<t.length-1;e++){const i=t.substring(e,e+2),o=n.has(i)?n.get(i):0;o>0&&(n.set(i,o-1),r++)}return 2*r/(e.length+t.length-2)}(e,t):0}var Ty=NaN;function Yy(e){return function(e,t){var n=null==e?0:e.length;return n?qu(e,t)/n:Ty}(e,Bn)}function Hy(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="";if($e(e)||Ce(e))r=Ju(e);else{if(!vr(e))return!!n&&0;r=Ca(e,"")}if(""===t)return!n||100;if(gr(t))return!!n&&0;if(hl(r,t))return!n||100;let i=Au(t," "),o=function(){let e=ni();return d||e.Fuse}(),a=or(i,(function(e){return((e,t)=>{let n=new o([e],{includeScore:!0}).search(t);n=Ae(n,0);let r=Ae(n,"score",1);return r=1-r,r*=100,r})(r,e)}));if(n)return Yy(a);{let e=80;return Wn(a,(function(t){return t>=e}))}}function $y(e){if(!Te(e))return{};let{results:t,binarys:n}=e;if(!$e(t))return{};if(!Ye(n))return{};let r={};try{r=JSON.parse(t,(function(e,t){if($e(t)){if(t.indexOf("[Uint8Array]::")>=0){let e=sa(t.replace("[Uint8Array]::",""));return n[e]}if(t.indexOf("[Uint16Array]::")>=0){let e=sa(t.replace("[Uint16Array]::",""));return n[e]}if(t.indexOf("[ArrayBuffer]::")>=0){let e=sa(t.replace("[ArrayBuffer]::",""));return n[e]}}return t}))}catch(e){}return r}function Iy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!zu(n))throw new Error("invalid dayjs");if(!lg(e))return{today:null,msg:"",err:"時間格式錯誤"};let r=n();lg(t)&&(r=n(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=n(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r>i)return{today:null,msg:"",err:"時間已過"};let o,a=r.format("YYYY-MM-DD"),u=i.format("YYYY-MM-DD"),l=n(a,"YYYY-MM-DD"),c=n(u,"YYYY-MM-DD"),s=i.diff(r,"seconds"),f=i.diff(r,"minutes"),p=i.diff(r,"hours"),d=c.diff(l,"days"),h=c.diff(l,"weeks"),m=c.diff(l,"months"),g=c.diff(l,"years"),v="即將到來";if(s>=0&&(o=!0,v=s+"秒後"),f>0&&(o=!0,v=f+"分鐘後"),p>0){let e=i.format("HH:mm");a===u?(o=!0,v=p+"小時後,今天"+e):(o=!1,v=p+"小時後,明天"+e)}return d>1&&(o=!1,v=2===d?"後天":d+"天後"),h>0&&(o=!1,v=h+"周後"),m>0&&(o=!1,v=m+"個月後"),g>0&&(o=!1,v=g+"年後"),{today:o,msg:v,err:""}}function Ly(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!zu(n))throw new Error("invalid dayjs");if(!lg(e))return{today:null,msg:"",err:"時間格式錯誤"};let r=n();lg(t)&&(r=n(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=n(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r<i)return{today:null,msg:"",err:"時間未到"};let o=r.format("YYYY-MM-DD"),a=i.format("YYYY-MM-DD"),u=n(o,"YYYY-MM-DD"),l=n(a,"YYYY-MM-DD"),c=r.diff(i,"seconds"),s=r.diff(i,"minutes"),f=r.diff(i,"hours"),p=u.diff(l,"days"),d=u.diff(l,"weeks"),h=u.diff(l,"months"),m=u.diff(l,"years"),g=!1,v="剛剛";if(c>=0&&(g=!0,v=c+"秒前"),s>0&&(g=!0,v=s+"分鐘前"),f>0){let e=i.format("HH:mm");o===a?(g=!0,v=f+"小時前"):(g=!1,v="昨天"+e)}return p>1&&(g=!1,v=p+"天前"),d>0&&(g=!1,v=d+"周前"),h>0&&(g=!1,v=h+"個月前"),m>0&&(g=!1,v=m+"年前"),{today:g,msg:v,err:""}}function Cy(e){let t=ug.sepTZ(e);return e=`${t.t}.000${t.tz}`}function Ny(e){let t=ug.sepTZ(e);return e=`${t.t}.000${t.tz}`}function By(e){if(!fl(e))return"";let t;try{t=ll(Og(e))}catch(e){return""}return t}e.ab2blob=function(e){let t=v(e);return new Blob([t])},e.ab2u8arr=v,e.addExcelWorksheetFromData=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"data";if(!Te(e))return{error:"wb is not an effective object"};if(!Ye(Ae(e,"SheetNames")))return{error:"wb.SheetNames is not an array"};if(!Pe(Ae(e,"Sheets")))return{error:"wb.Sheets is not an object"};let r=ii(t);return Ne(r,"error")?r:(e.SheetNames.push(n),e.Sheets[n]=r,e)},e.addMonth=function(e,t){return oi(e)&&wi(t)?n(e,"YYYY-MM").add(t,"months").format("YYYY-MM"):""},e.aes2str=Xi,e.alive=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=oa(),n={},r=null,i=Ae(e,"timeAlive");fa(i)||(i=1e4),i=sa(i);let o=Ae(e,"timeDetect");return fa(o)||(o=50),o=sa(o),t.trigger=function(e,a){$e(e)?(Ne(n,e)||setTimeout((()=>{t.emit("message",{eventName:"enter",key:e,data:a,now:Xr(n)})}),1),n[e]={data:a,time:Date.now()},null===r&&(r=setInterval((()=>{rr(n,((e,r)=>{if(Date.now()-e.time>i){let e=na(n[r]);delete n[r],t.emit("message",{eventName:"leave",key:r,data:e.data,now:Xr(n)})}})),Te(n)||(clearInterval(r),r=null)}),o))):console.log("trigger need key")},t.get=function(){let e=[];return rr(n,((t,n)=>{e.push({key:n,data:t.data})})),e=na(e),e},t},e.arr2dt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!vr(e))return{};if(vr(t))return Xr(e)===Xr(t)?pa(e,t):{};let n=[];for(let r=0;r<Xr(e);r++)n.push(na(t));return pa(e,n)},e.arrAccum=function(e){if(!vr(e))return[];let t=[],n=0;return rr(e,(function(e){n+=bi(e),Ce(e)?t.push(n):t.push("")})),t},e.arrAdd=function(){if(Xr(arguments)<2)return[];let e=arguments[0];for(let t=1;t<Xr(arguments);t++){e=da(e,arguments[t])}return e},e.arrAt=Ya,e.arrDiff=Du,e.arrFilterByKeywords=function(e,t){if(!vr(e))return[];if(!$e(t)&&!vr(t))return[];let n=null;n=$e(t)?Au(t," "):t;let r=Xr(n);return or(e,(e=>function(e){let t=!1,i=0;for(let o=0;o<r;o++){let a=n[o],u=a,l="+"===Pu(a,1),c="-"===Pu(a,1);if((l||c)&&(u=Yu(a,1)),""===Mu(u))continue;let s=e.indexOf(u)>=0;if(l){if(s){t=!0,i=1;break}t=!1,i=0;break}if(c){if(s){t=!1,i=0;break}t=!0,i=1;break}if(s){t=!0;let e=1-o/r;e=e**2,i+=e}}return{hasKeyword:t,weight:i}}(e)))},e.arrFilterByNum=function(e){return vr(e)?e=or(e=$u(e=na(e),Ce),bi):[]},e.arrFilterByPnum=Lu,e.arrFilterByPnumAndToLog=function(e){return vr(e)?e=or(e=Lu(e),Math.log):[]},e.arrFind=function(e,t){function n(e){return Ye(e)?e:[e]}return gr(e)||0===(e=n(e)).length||gr(t)?[]:or(t=n(t),(function(t){let n=-1;for(let r=0;r<e.length;r++)if(Cu(e[r],t)){n=r;break}return n}))},e.arrGroupByMaxmin=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"keyMax");$e(r)||(r="max");let i=Ae(n,"keyMin");$e(i)||(i="min");let o=Ae(n,"keyValue");$e(o)||(o="value");let a=Ae(n,"keyItems");if($e(a)||(a="items"),!vr(e))return[];if(!vr(t))return[];let u=na(t);return rr(e,((e,n)=>{let l=Ae(e,o);Ce(l)?l=bi(l):Ce(e)&&(l=bi(e)),Bu(l)&&rr(t,((t,n)=>{let o=Ae(t,r,null),c=Ae(t,i,null);if(null!==o&&null!==c&&Ce(o)&&Ce(c)){let r=Ae(t,"maxType");"<="!==r&&"<"!==r&&(r="<=");let i,s,f=Ae(t,"minType");">="!==f&&">"!==f&&(f=">="),o=bi(o),c=bi(c),i=">="===f?l>=c:l>c,s="<="===r?l<=o:l<o,i&&s&&(Ne(u[n],a)||(u[n][a]=[]),u[n][a].push(e))}}))})),u},e.arrHas=Fu,e.arrInsert=function(e,t,n){if(!Ye(e))return[];if(Ye(n)||(n=[n]),!Ta(t))return e;if((t=sa(t))>Xr(e))return e;let r=e;try{r=[...e.slice(0,t),...n,...e.slice(t)]}catch(e){}return r},e.arrLookupByMaxmin=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"keyMax");$e(r)||(r="max");let i=Ae(n,"keyMin");$e(i)||(i="min");let o=Ae(n,"keyValue");$e(o)||(o="value");let a=Ae(n,"keyItems");$e(a)||(a="items");let u=Ae(n,"beforeAddResult",null);if(!vr(e))return[];if(!vr(t))return[];if(!Te(Ae(e,0)))return[];let l=na(e);return rr(l,((e,n)=>{let c=Ae(e,o);Ce(c)&&(c=bi(c)),Bu(c)&&rr(t,((e,t)=>{let o=Ae(e,r,null),s=Ae(e,i,null);if(null!==o&&null!==s&&Ce(o)&&Ce(s)){let t=Ae(e,"maxType");"<="!==t&&"<"!==t&&(t="<=");let r,i,f=Ae(e,"minType");">="!==f&&">"!==f&&(f=">="),o=bi(o),s=bi(s),r=">="===f?c>=s:c>s,i="<="===t?c<=o:c<o,r&&i&&(zu(u)&&(e=u(e,l[n],n)),Ne(l[n],a)||(l[n][a]=[]),l[n][a].push(e))}}))})),l},e.arrMax=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return null;let n=Ae(t,"returnIndex");Kr(n)||(n=!1);let r=Ae(t,"compareKey",null),i=e;$e(r)&&(i=or(e,((e,t)=>Ae(e,r,""))));let o=null,a=Ru(i,((e,t)=>Ce(t)?(t=bi(t),null===e?(o=t,t):(e=Math.max(e,t),o=e,e)):e),{returnIndex:!0});if(n)return a;let u=null;return a>=0&&(u=$e(r)?e[a]:o),u},e.arrMin=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return null;let n=Ae(t,"returnIndex");Kr(n)||(n=!1);let r=Ae(t,"compareKey",null),i=e;$e(r)&&(i=or(e,((e,t)=>Ae(e,r,""))));let o=null,a=Ru(i,((e,t)=>Ce(t)?(t=bi(t),null===e?(o=t,t):(e=Math.min(e,t),o=e,e)):e),{returnIndex:!0});if(n)return a;let u=null;return a>=0&&(u=$e(r)?e[a]:o),u},e.arrMulti=Wu,e.arrNorm=function(e){if(!vr(e))return null;let t=Vu(e,e);return Ce(t)?t<=0?null:Math.sqrt(t):null},e.arrProduct=Vu,e.arrReduce=Ru,e.arrSep=function(e,t){if(!vr(e))return[];if(!fa(t)&&!Te(t))return[];let n="",r=null;if(fa(t))r=t,n="numCount";else if(Te(t))if(fa(Ae(t,"numCount")))r=t.numCount,n="numCount";else{if(!fa(Ae(t,"numGroup")))throw new Error("invalid opt.numCount or opt.numGroup");r=t.numGroup,n="numGroup"}let i=Xr(e),o=[];if("numCount"===n)for(let t=0;t<i;t+=r){let n=[];for(let o=0;o<r;o++){let r=t+o;r<i&&n.push(e[r])}o.push(n)}else if("numGroup"===n){for(let e=0;e<r;e++)o[e]=[];let t=-1;for(let n=0;n<i;n++)t++,t>r-1&&(t=0),o[t].push(e[n])}return o},e.arrSort=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return[];if(1===Xr(e))return e;let n=Ae(t,"localeCompare");Kr(n)||(n=!1);let r=Ae(t,"returnIndex");Kr(r)||(r=!1);let i=Ae(t,"compareKey",null),o=null;o=n?ul:al;let a,u=il(e);if(""===u)return[];if("obj"===u){if(!$e(i))return[];let t=or(e,((e,t)=>Ae(e,i,""))),u=il(t);if("num"!==u&&"str"!==u)return[];{n&&(u="files");let i=o(ol(t,u),!0);a=r?i:or(i,(t=>e[t]))}}else if("num"===u||"str"===u){n&&(u="files"),a=o(ol(e,u),r)}return a},e.asind=function(e){return Ce(e)?(e=bi(e),180*Math.asin(e)/Math.PI):null},e.atan2d=function(e,t){return Ce(e)?(e=bi(e),Ce(t)?(t=bi(t),180*Math.atan2(t,e)/Math.PI):null):null},e.atand=function(e){return Ce(e)?(e=bi(e),180*Math.atan(e)/Math.PI):null},e.attstr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=";",n="@",r="table",i="id",o=Ae(e,"uniqItems");Kr(o)||(o=!1);let a=Ae(e,"dlmItem","");$e(a)&&(t=a);let u=Ae(e,"dlmSep","");$e(u)&&(n=u);let l=Ae(e,"keyTable","");$e(l)&&(r=l);let c=Ae(e,"keyId","");function s(e){if(!$e(e))return[];let n=ru(e,t);return o&&(n=Dr(n)),n}function f(e){if(!vr(e))return"";return o&&(e=Dr(e)),Ca(e,t)}function p(e){return e=$u(e,$e),o&&(e=Dr(e)),f(e)}function d(e){let t=[];return rr(e,(e=>{let o=Ae(e,r,""),a=Ae(e,i,"");if($e(o),He(a)||(Ye(a)?Xr(a):a=""),He(a))t.push(`${o}${n}${a}`);else if(Ye(a)){let e=Ca(a,n);t.push(`${o}${n}${e}`)}})),e=f(t)}function h(e){if(!$e(e))return[];return $u(s(e),$e)}function m(e){if(!$e(e))return[];let t=s(e),o=[];return rr(t,(e=>{let t=ru(e,n),a=Ae(t,0,""),u=Ae(t,1,"");Xr(t)>=3&&(t=Qu(t),u=t),o.push({item:e,[r]:a,[i]:u})})),o}function g(e,t){let n=[...h(e),...h(t)];return 0===Xr(n)?"":p(n)}function v(e,t){let n=[...m(e),...m(t)];return 0===Xr(n)?"":d(n)}function y(e,t){let n=h(e),r=h(t),i=[];return rr(n,(e=>{Fu(e,r)||i.push(e)})),0===Xr(i)?"":p(i)}function b(e,t){let n=m(e),r=m(t),i=[];return rr(n,(e=>{Fu(e,r)||i.push(e)})),0===Xr(i)?"":d(i)}$e(c)&&(i=c);let w={parse:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!$e(e))return[];let r=Ae(t,"mode");return"1p"!==r&&"2p"!==r&&(r="auto"),"1p"===r?h(e):"2p"===r||e.indexOf(n)>=0?m(e):h(e)},join:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return"";let n=Ae(t,"mode");if("1p"!==n&&"2p"!==n&&(n="auto"),"1p"===n)return p(e);if("2p"===n)return d(e);let o=Ae(e,0);return Ne(o,r)&&Ne(o,i)?d(e):p(e)},remove:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!$e(e))return"";if(!$e(t))return e;let i=Ae(r,"mode");return"1p"!==i&&"2p"!==i&&(i="auto"),"1p"===i?y(e,t):"2p"===i||t.indexOf(n)>=0?b(e,t):y(e,t)},add:function(e,t){let r=Ae(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},"mode");if("1p"!==r&&"2p"!==r&&(r="auto"),"1p"===r)return g(e,t);if("2p"===r)return v(e,t);let i=e.indexOf(n)>=0,o=t.indexOf(n)>=0;return i||o?v(e,t):g(e,t)}};return w},e.b642obj=function(e){if(!He(e))return{};let t={};try{t=cl(ll(e))}catch(e){t={}}return t},e.b642str=ll,e.b642u16arr=dl,e.b642u8arr=sl,e.binstr=hl,e.blob2ab=gl,e.blob2b64=vl,e.blob2str=function(e){let t=ml(),n=new FileReader;return n.onload=function(){t.resolve(n.result)},n.onerror=function(e){t.reject(e)},n.readAsText(e),t},e.blob2u8arr=yl,e.blobs2b64s=bl,e.blobs2u8arrs=wl,e.bodyLog=function(){let e=`\n <div style="padding:5px; font-size:10pt; font-family:Microsoft JhengHei, Helvetica;">\n <span style="color:#f26;">log: </span>\n <code>${xl(or(arguments,(function(e){return Jr(e)})).join(", "))}</code>\n </div>\n `;document.querySelector("body").insertAdjacentHTML("beforeend",e)},e.browserView=jl,e.browserViewFromBlob=function(e,t){Ol(e)&&jl(e,t)},e.browserViewFromText=function(e){He(e)&&jl(e,"text/plain")},e.browserViewFromU8arr=function(e,t){fl(e)&&jl(e,t)},e.bs2u8arr=El,e.bufRead=Sl,e.bufReadDbl=kl,e.bufWrite=Dl,e.bufWriteDbl=Ml,e.cache=function(){let e=oa(),t={};function n(t,n){setTimeout((()=>{e.emit(t,n)}),1)}function r(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ne(t,e))return;let i=Ae(r,"fun");zu(i)||(i=async()=>{});let o=Ae(r,"inputs");Ye(o)||(o=[]);let a=Ae(r,"timeExpired");fa(a)||(a=5e3),a=sa(a),t[e]={needExec:!0,fun:i,running:!1,inputs:o,value:null,time:null,timeExpired:a},n("message",{fun:"set",key:e,timeExpired:a})}async function i(e){if(Ne(t,e)){let r;n("message",{fun:"get",key:e,msg:"waiting"}),await Al((()=>!t[e].running),{timeInterval:1e3});let i=Date.now();r=t[e].needExec;let o=i-t[e].time;return r?n("message",{fun:"get",key:e,msg:"execute first"}):t[e].timeExpired>0&&o>t[e].timeExpired&&(n("message",{fun:"get",key:e,msg:"execute by timeExpired",timeDiff:o}),r=!0),r?(n("message",{fun:"get",key:e,msg:"fun start"}),t[e].running=!0,t[e].value=await t[e].fun(...t[e].inputs).catch((t=>{n("error",{fun:"get",key:e,msg:t})})),t[e].needExec=!1,t[e].time=i,t[e].running=!1,n("message",{fun:"get",key:e,msg:"fun end"})):n("message",{fun:"get",key:e,msg:"use cache"}),na(t[e].value)}return n("error",{fun:"get",key:e,msg:"invalid key"}),null}return e.set=r,e.getProxy=async function(e){return r(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),i(e)},e.get=i,e.update=function(e,r){Ne(t,e)&&(n("message",{fun:"updateValue",key:e}),t[e].value=r,t[e].time=Date.now())},e.clear=function(e){Ne(t,e)&&(n("message",{fun:"clear",key:e}),t[e].needExec=!0)},e.remove=function(e){Ne(t,e)&&(n("message",{fun:"remove",key:e}),delete t[e])},e},e.cbol=function(e){if(Kr(e))return e;if(0===e)return!1;if(1===e)return!0;let t=!1;return $e(e)&&"true"===(e=Pl(Mu(e)))&&(t=!0),t},e.cdbl=bi,e.cfilesize=function(e){return Ce(e)?(e=bi(e))<1024?Tl(e,1)+" b":e<1048576?Tl(e/1024,1)+" kb":e<1073741824?Tl(e/1024/1024,1)+" mb":e<1099511627776?Tl(e/1024/1024/1024,1)+" gb":"":""},e.cfinancial=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Ce(e))return"";if(!Ta(t))return"";let n=(e=Tl(e,t)).split("."),r=n[0],i=n.length>1?"."+n[1]:"",o=/(\d+)(\d{3})/;for(;o.test(r);)r=r.replace(o,"$1,$2");return r+i},e.cint=sa,e.clearXSS=function(e){return function e(t){return Ye(t)||Pe(t)?(rr(t,(function(n,r){t[r]=e(n)})),t):He(t)?r(t,{onIgnoreTagAttr:function(e,t,n,i){if("style"===t)return t+'="'+r.escapeAttrValue(n)+'"'}}):t}(na(e))},e.color=Cc,e.composeToTree=Vc,e.convertToTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Te(e)&&!vr(e))return[];let n=Ae(t,"bindKey",null);$e(n)||(n="id");let r=Ae(t,"bindParent",null);$e(r)||(r="parentId");let i=Ae(t,"bindText",null);$e(i)||(i="text");let o=Ae(t,"bindChildren",null);$e(o)||(o="children");let a=Ae(t,"bindType",null);$e(a)||(a="type");let u=Ae(t,"bindNumOfChilren",null);$e(u)||(u="numOfChilren");let l=Ae(t,"bindRoot",null);$e(l)||(l="root");let c=Ae(t,"saveExtProps",null);return Kr(c)||(c=!1),$e(l)&&(e={[l]:e}),Vc(Zc(e,{bindKey:n,bindParent:r,bindText:i,bindType:a,bindNumOfChilren:u}),{bindKey:n,bindParent:r,bindChildren:o,saveExtProps:c})},e.copyStrToClipboard=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!He(e))return"invalid input";let n=Ae(t,"eleParent");er(n)||(n=document.body);let r=document.createElement("textarea");if(r.style.position="fixed",r.style.left=0,r.style.top=0,r.style.zIndex=-1,r.style.background="transparent",r.style.color="transparent",r.value=e,n.appendChild(r),r.select(),!Gc(r))return"ele can not be focusd";try{document.execCommand("copy")}catch(e){return"can not copy str to clipboard"}return n.removeChild(r),""},e.cosd=Kc,e.cotd=function(e){return Ce(e)?1/Jc(e=bi(e)):null},e.createExcelWorkbook=Qc,e.cscd=function(e){return Ce(e)?1/es(e=bi(e)):null},e.cstr=Ju,e.day2cht=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!ts(e))return"";let r=n(e,"YYYY-MM-DD"),i="";return i=t?r.month()+1+"月"+r.date()+"日":"民國 "+(r.year()-1911)+" 年 "+(r.month()+1)+" 月 "+r.date()+" 日",i},e.debounce=function(){return new function(e){let t=[],n=null,r=null;return fa(e)||(e=300),e=sa(e),function(i){if(zu(i)){r=Date.now();for(var o=arguments.length,a=new Array(o>1?o-1:0),u=1;u<o;u++)a[u-1]=arguments[u];t.push({func:i,input:a}),null===n&&(n=setInterval((()=>{if(Date.now()-r>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(n),n=null)}),10))}else console.log("func is not a function")}}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:300)},e.delay=ns,e.dig=Tl,e.digExp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Ce(e))return"";if(!Ta(t))return"";let n="";return n=0===(e=bi(e))?"0":Math.abs(e)<=1e-6?e.toExponential(t):Tl(e,t),n},e.domAlert=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!$e(e))return;let n=Ae(t,"type","success");Ne(cs,n)||(n="success");let r=Ae(t,"icon",null);$e(r)||(r=cs[n]);let i="top-right";"top-left"!==t.position&&"bottom-right"!==t.position&&"bottom-left"!==t.position||(i=t.position);let o=Ae(t,"time");Bu(o)||(o=4e3),o<0&&(o=4e3);let a=Ae(t,"paddingStyle",null);null===a&&(a={top:14,right:26,bottom:14,left:14});let u="";{let e=Ae(a,"top",0),t=Ae(a,"bottom",0),n=Ae(a,"left",0);u=`padding:${e}px ${Ae(a,"right",0)}px ${t}px ${n}px;`}let l=Ae(t,"textColor","#000");l=Hl(l,";","");let c=Ae(t,"backgroundColor","#fff");c=Hl(c,";","");let s=Ae(t,"borderWidth",1),f=Ae(t,"borderColor","#ebeef5");f=Hl(f,";","");let p=Ae(t,"borderRadius",8),d=Ae(t,"shadowStyle","0 2px 12px 0 rgba(0,0,0,.1)");d=Hl(d,";","");let h=Ae(t,"closeIconShift",null);null===h&&(h={top:10,right:10});let m="";{let e=Ae(h,"top",""),t=Ae(h,"bottom",""),n=Ae(h,"left",""),r=Ae(h,"right","");Bu(e)&&(e=`top:${e}px;`),Bu(t)&&(t=`bottom:${t}px;`),Bu(n)&&(n=`left:${n}px;`),Bu(r)&&(r=`right:${r}px;`),m=`position:absolute; ${e} ${r} ${t} ${n}`}let g=`alt-${os()}`,v=`alt-${os()}`,y=`\n <div \n style="display:inline-block; color:${l}; background:${c}; border:${s}px solid ${f}; border-radius:${p}px; box-shadow:${d};"\n onmouseenter="ttWAlertFadeIn('${v}')"\n onmouseleave="ttWAlertFadeOut('${v}')"\n >\n <div style="position:relative; ${u}">\n\n <div style="display:flex; align-items:center;">\n <div style="margin-right:10px;">\n <div style="display:flex;">${r}</div>\n </div>\n <div>${e}</div>\n </div>\n\n <div style="${m}">\n <div \n id="${v}" \n style="display:flex; cursor:pointer; opacity:0;" \n onclick="ttWAlertCancel('${g}')"\n >\n ${ls}\n </div>\n </div>\n\n </div>\n </div>\n `,b=document.createElement("div");b.id=g,b.style.position="fixed",b.style.transition="transform 0.3s, top 0.5s, bottom 0.5s",b.style.zIndex=-1,b.style.opacity=.001,i.indexOf("-left")>=0?b.style.transform="translateX(-100%)":b.style.transform="translateX(100%)",b.innerHTML=y,document.querySelector("body").appendChild(b);let w=ml();return function(e){let{id:t,position:n,time:r,pm:i}=e;ss[t]={id:t,position:n,ele:null,loc:{height:null,top:null,bottom:null,left:null,right:null},timeShow:r,timeStart:Date.now(),pm:i},ds(),null===fs&&(fs=setInterval((()=>{rr(ss,(e=>{Date.now()-e.timeStart>e.timeShow&&(e.pm.resolve(),hs(e.id))})),Te(ss)||(clearInterval(fs),fs=null)}),50))}({id:g,position:i,time:o,pm:w}),w},e.domAppend=ms,e.domCancelEvent=vs,e.domCompareText=bs,e.domCompareTextDyn=async function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5?arguments[5]:void 0;return vr(o)||(o=["https://cdn.jsdelivr.net/npm/diff2html@3.4.34/bundles/css/diff2html.min.css","https://cdn.jsdelivr.net/npm/diff2html@3.4.34/bundles/js/diff2html.min.js"]),await Es(o),bs(e,t,n,r,i)},e.domConvertToPic=Ms,e.domConvertToPicDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return vr(n)||(n=["https://cdn.jsdelivr.net/npm/html-to-image@1.11.11/dist/html-to-image.js"]),await Es(n),Ms(e,t)},e.domDetect=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ae(t,"timeInterval",null);fa(n)||(n=20);let r=Ae(t,"tolerancePixel",null);fa(r)||(r=1);let i,o=oa(),a={offsetWidth:0,offsetHeight:0,clientWidth:0,clientHeight:0,windowWidth:0,windowHeight:0},u=na(a),l={width:"",height:""};if(!zu(e))return console.log("invalid f",e),null;i=setInterval((()=>{let t=e();if(t){let e={offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight,clientWidth:t.clientWidth,clientHeight:t.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight},n=u.offsetWidth-e.offsetWidth,i=u.offsetHeight-e.offsetHeight,c=Math.abs(n)>r,s=Math.abs(i)>r,f="";n>0?f="smaller":n<0&&(f="larger");let p="";if(i>0?p="smaller":i<0&&(p="larger"),l={width:f,height:p},c||s){let n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_s(Object(n),!0).forEach((function(t){Ia(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u);setTimeout((()=>{e.offsetWidth>0&&e.offsetHeight>0&&(o.emit("resize",{sold:n,snew:e,smode:l,ele:t}),o.emit("resizeWithWindow",{sold:n,snew:e,smode:l,ele:t,from:"dom"}))}),1)}a=u,u=e}}),n);let c=e=>{o.emit("resizeWithWindow",{sold:a,snew:u,smode:l,from:"window"})};return window.addEventListener("resize",c),o.clear=()=>{clearInterval(i),window.removeEventListener("resize",c)},o},e.domDrag=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!er(e))return void console.log("ele is not a HTMLElement",e);let n=Ae(t,"attIdentify",null);$e(n)||(n="dragid");let r=Ae(t,"attIndex",null);$e(r)||(r="dragindex");let i=Ae(t,"attGroup",null);$e(i)||(i="draggroup");let o=Ae(t,"group",null);$e(o)||(o="group");let a=Ae(t,"previewOpacity",null);Bu(a)||(a=.4);let u=Ae(t,"previewDisabledOpacity",null);Bu(u)||(u=.2);let l=Ae(t,"previewBackground",null);$e(l)||(l="white");let c=Ae(t,"previewBorderWidth",null);Bu(c)||(c=1);let s=Ae(t,"previewBorderColor",null);$e(s)||(s="#f26");let f=Ae(t,"timeDragStartDelay",null);Bu(f)||(f=120);let p=`c${os(8)}`,d=o;e.setAttribute(i,d),e.setAttribute(n,p);let h=Us(d,p,{attIdentify:n,previewOpacity:a,previewBackground:l,previewBorderWidth:c,previewBorderColor:s}),m=function(e,t,n,r){let i=[];return{bind:function(){let n;n="mousedown";let r=function(n){t.dragStart({e:n,ele:e,name:"mousedown"})};e.addEventListener(n,r,!1),i.push({ele:e,name:n,f:r}),n="touchstart";let o=function(n){t.dragStart({e:n,ele:e,name:"touchstart"})};e.addEventListener(n,o,!1),i.push({ele:e,name:n,f:o}),n="touchmove";let a=function(e){t.dragMove({e:e,name:"touchmove"}),e.cancelable&&e.preventDefault()};e.addEventListener(n,a,!1),i.push({ele:e,name:n,f:a})},unbind:function(){rr(i,(e=>{let{ele:t,name:n,f:r}=e;t.removeEventListener(n,r)}))}}}(e,{dragStart:e=>{h.emit(d+"-dragStart",e)},dragMove:e=>{h.emit(d+"-dragMove",e)}});m.bind(),qs({gid:d,attGroup:i,attIndex:r,attIdentify:n,timeDragStartDelay:f,previewOpacity:a,previewDisabledOpacity:u});let g=oa();return h.on(o+"-change",(e=>{e.tarEid===p&&g.emit("change",e)})),h.on(o+"-start",(e=>{e.tarEid===p&&g.emit("start",e)})),h.on(o+"-move",(e=>{e.tarEid===p&&g.emit("move",e)})),h.on(o+"-enter",(e=>{e.tarEid===p&&g.emit("enter",e)})),h.on(o+"-leave",(e=>{e.tarEid===p&&g.emit("leave",e)})),h.on(o+"-drop",(e=>{e.tarEid===p&&g.emit("drop",e)})),g.setIsActive=function(e){Rs[d].isActive=e},g.unbind=function(){m.unbind(),function(e,t){let n=Rs[e],r=na(n.eleIds);Ys(r,t),n.eleIds=r,0===r.length&&(n.oevg.unbind(),n.pv.clear(),delete Rs[e])}(d,p)},g},e.domDragBarAndScroll=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=null,o=null,a=null,u=null,l=null,c=null,s=null,f=null,p=null,d=null,h=null,m=null,g=null,v=null,y=!1,b=Ae(n,"getHeighRatio",null);R(b)||(b=()=>1);let w=Ae(n,"getWidthRatio",null);R(w)||(w=()=>1);let x=Ae(n,"stopScrollPropagationForPanel",null);Gr(x)||(x=!1);let j=Ae(n,"stopTouchDragPropagationForPanel",null);Gr(j)||(j=!1);let O=Ae(n,"useTouchDragForPanel",null);Gr(O)||(O=!0);let E=e,S=t,k=oa();return r=e=>{let t=e.deltaY/Math.abs(e.deltaY),n=e.deltaX/Math.abs(e.deltaX);k.emit("scrollPanel",{ratioY:t,ratioX:n}),x&&vs(e)},E.addEventListener("wheel",r),i=e=>{if(O){let t=Ae(e,"touches.0.clientY",0),n=Ae(e,"touches.0.clientX",0),r=-t*b(),i=-n*w();y=!0,k.emit("pressBar",{clientY:r,clientX:i}),j&&vs(e)}},E.addEventListener("touchstart",i),o=e=>{if(O&&y){let t=Ae(e,"touches.0.clientY",0),n=Ae(e,"touches.0.clientX",0),r=-t*b(),i=-n*w();k.emit("dragBar",{clientY:r,clientX:i}),j&&vs(e)}},E.addEventListener("touchmove",o,{passive:!1}),a=e=>{O&&y&&(y=!1,k.emit("freeBar"),j&&vs(e))},E.addEventListener("touchend",a),u=e=>{y=!0,k.emit("pressBar",{clientY:e.clientY,clientX:e.clientX})},S.addEventListener("mousedown",u),l=e=>{y&&(y=!1,k.emit("freeBar"))},S.addEventListener("mouseup",l),c=e=>{y=!0,k.emit("pressBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX})},S.addEventListener("touchstart",c),s=e=>{y&&(k.emit("dragBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX}),vs(e))},S.addEventListener("touchmove",s,{passive:!1}),f=e=>{y&&(y=!1,k.emit("freeBar"))},S.addEventListener("touchend",f),p=e=>{y&&k.emit("dragBar",{clientY:e.clientY,clientX:e.clientX})},window.addEventListener("mousemove",p),d=e=>{y&&(y=!1,k.emit("freeBar"),x&&vs(e))},window.addEventListener("mouseup",d),h=e=>{},window.addEventListener("scroll",h,{passive:!1}),m=e=>{},window.addEventListener("wheel",m,{passive:!1}),g=e=>{},document.addEventListener("scroll",g,{passive:!1}),v=e=>{},document.addEventListener("wheel",v,{passive:!1}),k.clear=function(){E.removeEventListener("wheel",r),E.removeEventListener("touchstart",i),E.removeEventListener("touchmove",o),E.removeEventListener("touchend",a),S.removeEventListener("mousedown",u),S.removeEventListener("mouseup",l),S.removeEventListener("touchstart",c),S.removeEventListener("touchmove",s),S.removeEventListener("touchend",f),window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",d),window.removeEventListener("scroll",h),window.removeEventListener("wheel",m),document.removeEventListener("scroll",g),document.removeEventListener("wheel",v)},k},e.domDragPreview=Bs,e.domDropFiles=function(e){let t=!1,n=!1,r=oa();function i(e){vs(e),n=!0,!1===t&&(t=!0,r.emit("dropIn",{ev:e}))}function o(e){vs(e),n=!1,setTimeout((function(){n||(t=!1,r.emit("dropOut",{ev:e}))}),100)}function a(e){i(e)}function u(e){o(e)}function l(e){function t(){o(e)}i(e),Zs(e.dataTransfer).then((n=>{let i=$u(n.entries,{type:"file"});r.emit("getFiles",{ev:e,files:n.files,filesTree:i,entries:n.entries,cb:t})})).catch((e=>{r.emit("error",e)}))}return e.addEventListener("dragenter",a,!1),e.addEventListener("dragover",a,!1),e.addEventListener("dragleave",u,!1),e.addEventListener("drop",l,!1),r.off=function(){e.removeEventListener("dragenter",a,!1),e.removeEventListener("dragover",a,!1),e.removeEventListener("dragleave",u,!1),e.removeEventListener("drop",l,!1)},r},e.domElementsFromPoint=Is,e.domFadeIn=as,e.domFadeOut=us,e.domFind=Gs,e.domFinds=Ss,e.domGetAttr=Ls,e.domGetBoudRect=Cs,e.domGetBoudRectRefSelf=Ns,e.domGetFileAccept=of,e.domGetFiles=af,e.domGetParents=Hs,e.domGetPointFromEvent=$s,e.domGetScrollableParent=function(e){let t=/(auto|scroll)/,n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},r=function(e){return t.test(function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")}(e))};if(!(e instanceof HTMLElement||e instanceof SVGElement))return;let i=Hs(e);for(let e=0;e<i.length;e+=1)if(r(i[e]))return i[e];return document.scrollingElement||document.documentElement},e.domGetWindowSize=function(){let e=ni();return{width:(()=>{let t=[Ae(e,"innerWidth"),Ae(e,"document.documentElement.clientWidth"),Ae(e,"document.body.clientWidth")];return t=$u(t,Bu),cf(t)})(),height:(()=>{let t=[Ae(e,"innerHeight"),Ae(e,"document.documentElement.clientHeight"),Ae(e,"document.body.clientHeight")];return t=$u(t,Bu),cf(t)})()}},e.domIsClientXYIn=function(e,t,n){if(!Bu(e))return void console.log("clientX is not a number",e);if(!Bu(t))return void console.log("clientY is not a number",t);if(!er(n))return void console.log("ele is not a HTMLElement",n);let r;try{r=n.getBoundingClientRect()}catch(e){return void console.log("invalid ele for getBoundingClientRect",e)}let i=!1;try{i=e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}catch(e){console.log("catch when calculating page information of element",e)}return i},e.domIsFocused=Gc,e.domIsVisible=function(e){if(!er(e))return Promise.reject("invalid element");if(sf())return Promise.reject("invalid IntersectionObserver");let t=ml();try{let n=new IntersectionObserver((e=>{t.resolve(e[0].isIntersecting),n.disconnect()}));n.observe(e)}catch(e){t.reject(e)}return t},e.domPrepend=Ds,e.domRemove=ks,e.domRenderMarkdownMind=ff,e.domRenderMarkdownMindDyn=async function(e,t){let n=arguments.length>3?arguments[3]:void 0;return vr(n)||(n=["https://cdn.jsdelivr.net/npm/d3@7.8.3/dist/d3.min.js","https://cdn.jsdelivr.net/npm/markmap-view@0.14.4/dist/index.min.js","https://cdn.jsdelivr.net/npm/markmap-lib@0.14.4/dist/browser/index.min.js"]),await Es(n),ff(e,t)},e.domRipple=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"timeDuration",null);fa(r)||(r=1e3);let i=Ae(n,"color",null);if($e(i)||(i="rgba(255, 255, 255, 0.5)"),!er(e))return;e.style.position="relative",e.style.overflow="hidden";let o=e.getBoundingClientRect(),a=t.clientX-o.left,u=t.clientY-o.top,l=2*Math.max(e.clientWidth,e.clientHeight),c=document.createElement("div");c.style.width=`${l}px`,c.style.height=`${l}px`,c.style.transition=`all ${r/1e3}s linear`,c.style.position="absolute",c.style.zIndex=1,c.style.left=`${a}px`,c.style.top=`${u}px`,c.style.borderRadius="50%",c.style.transformOrigin="center",c.style.transform="translate(-50%,-50%) scale(0)",c.style.background=i,c.style.userSelect="none",c.style.pointerEvents="none",e.appendChild(c),setTimeout((()=>{c.style.transform="translate(-50%,-50%) scale(2)",c.style.opacity=0}),1),setTimeout((()=>{ks(c)}),r)},e.domScrollIntoView=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!er(e))return;Pe(t)||(t={});let n={behavior:"smooth"};n=np(np({},n),t),gs()&&ep(),e.scrollIntoView(n)},e.domScrollTo=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!er(e))return;Pe(t)||(t={});let n={behavior:"smooth"};n=ip(ip({},n),t),gs()&&ep(),e.scrollTo(n)},e.domShowImages=pp,e.domShowImagesDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;return vr(r)||(r=["https://cdn.jsdelivr.net/npm/viewerjs@1.11.5/dist/viewer.min.css","https://cdn.jsdelivr.net/npm/viewerjs@1.11.5/dist/viewer.min.js"]),await Es(r),pp(e,t,n)},e.domShowInputAndGetFiles=hp,e.domShowInputAndGetFilesU8Arrs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ae(t,"multiple");Kr(n)||(n=!1);let r=Ae(t,"entireHierarchy");Kr(r)||(r=!1);let i=Ae(t,"sizelimit");Ce(i)||(i=1e3),i=bi(i);let o=ml(),a=[];return hp(e,{multiple:n,entireHierarchy:r,sizelimit:i}).then((function(e){let t=ml(),n=Ae(e,"errs",{}),r=Ae(e,"files",[]);return Te(n)?t.reject(n):t.resolve(r),t})).then((function(e){return rr(e,(function(e){a.push({name:e.name,size:e.size,type:e.type})})),wl(e)})).then((function(e){rr(e,(function(e,t){a[t].u8a=e})),o.resolve(a)})).catch((function(e){o.reject(e)})),o},e.domTooltip=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=null;function o(){null!==r&&r.destroy(!0),e.setAttribute("tippystate",""),clearInterval(i)}let a={arrow:!0,theme:"dark",placement:"bottom",delay:150};n=Te(n)?fp(a,n):a;let u=t;t||(u=e.innerHTML);let l=Ce(e.getAttribute("tippystate"));if(e.setAttribute("tippystate","5"),l)return;u=`<div style="text-align:left;">${u}</div>`;let c=Th;Th.default&&(c=Th.default),r=c(e,$h($h({},n),{},{content:u,allowHTML:!0,onHidden(){o()},onDestroy(){r=null,o()}})),r.show(),i=setInterval((()=>{let t=e.getAttribute("tippystate");Ce(t)?(t=sa(t),t-=1,e.setAttribute("tippystate",t),t<=0&&o()):o()}),1e3)},e.domTriggerEvent=dp,e.domVirtualCreate=Ih,e.domVirtualCreateQueue=function(){return new function(){let e=Fh(1);return async function(t){return e(Ih,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}},e.downloadExcelFileFromData=Wh,e.downloadExcelFileFromDataDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;vr(r)||(r=["https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]),await Es(r);let i=Wh(e,t,n);return""!==Ae(i,"error","")?Promise.reject(i.error):i},e.downloadFileFromB64=function(e,t){if(!ti())return void console.log("no window");if(!$e(e))return void console.log("no filename");let n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e.downloadFileFromBlob=zh,e.downloadFileFromText=function(e,t){let n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ti()?$e(e)?He(t)?Kr(r)?(n=r?new Blob(["\ufeff",t]):new Blob([t]),zh(e,n)):console.log("withBOM is not a boolean"):console.log("invalid content"):console.log("invalid filename"):console.log("no window")},e.downloadFileFromU8Arr=function(e,t){if(!ti())return void console.log("no window");if(!$e(e))return void console.log("no filename");if(!fl(t))return void console.log("no data");zh(e,qh(t))},e.dtmapping=Vh,e.dtpick=Xh,e.evem=oa,e.execProcess=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"cbStdout"),i=Ae(n,"cbStderr");function a(e){try{return e.toString("utf8")}catch(e){}return""}return new Promise((function(n,u){let l="",c=o.exec(`${e} ${t}`,((e,t,n)=>{if(e)return u(e);$e(t=a(t))&&(l+=t),$e(n=a(n))&&(l+=n)}));c.on("close",(e=>{n(l)})),zu(r)&&c.stdout.on("data",(function(e){r(e)})),zu(i)&&c.stderr.on("data",(function(e){i(e)}))}))},e.execPyodide=im,e.execPyodideDyn=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return vr(t)||(t=["https://cdn.jsdelivr.net/pyodide/v0.23.4/full/pyodide.js"]),await Es(t),await im(e)},e.execScript=function(e,t){return new Promise((function(n,r){Ye(t)||(t=[t]);let i=o.spawnSync(e,t),a=$u(i.output,(e=>null!==e));a=or(a,(e=>function(e){try{return e.toString("utf8")}catch(e){}return""}(e)));let u=Ca(a,""),l=Ae(i,"error.message");l?r(l):n(u)}))},e.f2c=function(e){if(!zu(e))return"";let t=String(e),n=t.substring(t.indexOf("/*")+3,t.lastIndexOf("*/"));return n=rl(n),n},e.filepathToTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return{};let n=Ae(t,"delimiter");$e(n)||(n="❯");let r=Ae(t,"bindRoot");$e(r)||(r="root");let i=Ae(t,"soryItems"),o=or(e,((e,t)=>{"folder"!==e.type&&"file"!==e.type&&(e.type="file");let r=(e=>{let t=Au(e=(e=e.replace(/\\\\/g,"\\")).replace(/\\/g,"/"),"/");return{ss:t,cfp:Ca(t,n)}})(e.path);return{ind:t,type:e.type,ss:r.ss,data:na(e)}})),a=e=>{let t=Xr(e),r=[];for(let i=0;i<t;i++){let t=[];for(let n=0;n<=i;n++)t.push(e[n]);let o=Ca(t,n);r.push({id:o,name:e[i]})}return r},u=-1,l=[],c={};rr(o,(e=>{let t=[r],i=r,o=Xr(e.ss)-1;rr(e.ss,((r,s)=>{let f=s<o||"folder"===e.type;t.push(r);let p=null,d=null;s===o&&(p=e.ind,d=e.data);let h=Ca(t,n),m=a(t);if(Ne(c,h)){let t=c[h],n="folder"===Ae(t,"_type","");if(!n&&f)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${h}] is unrecognized from a file to folder`);if(!n&&!f)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${h}] get repeat data from two files`);if(n&&!f)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${h}] is unrecognized from a folder to file`);if(Te(c[h].data)&&Te(d))throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${h}] get repeat data from two folders`);if(null===c[h].data&&Te(d)){c[h]._indOri=p,c[h].data=d;let e=c[h]._indNormalize,t=l[e];l[e]=gm(gm({},d),{},{type:t.type,path:t.path})}}else{u++;let e=u,n=null;n=f?{_indOri:p,_indNormalize:e,ns:Xr(t),ts:na(t),pathInfors:m,_type:"folder",type:"array",numOfChilren:-1,id:h,parentId:i,text:r,children:[],data:d}:{_indOri:p,_indNormalize:e,ns:Xr(t),ts:na(t),pathInfors:m,_type:"file",type:"node",numOfChilren:-1,id:h,parentId:i,text:r,data:d},c[h]=n,l.push(gm(gm({},Ae(c[h],"data",{})),{},{type:c[h]._type,path:"/"+Ca(t,"/")}))}i=h}))}));let s=um(c);if(s=Ku(s,"id"),s=Ku(s,"ns"),zu(i)){let e=[];rr(hm(s,"ns"),((t,n)=>{rr(hm(t,"parentId"),((t,r)=>{let o=i(t,r,n);e=[...e,...o]}))})),s=e}let f=[],p=[];rr(s,(e=>{"folder"===e._type?f.push(e):p.push(e)}));let d=hm(f,"ns"),h=hm(p,"ns"),m=am(or(f,"ns")),g=am(or(p,"ns")),v=null;{let e=[r];v=[{_indOri:null,_indNormalize:null,ns:Xr(e),ts:na(e),pathInfors:a(e),_type:"folder",type:"array",numOfChilren:-1,id:r,parentId:"",text:r,children:[],data:null}]}let y={};y[r]="0.children";let b={};b[r]="0";for(let e=2;e<=m;e++){rr(d[e],(e=>{let t=Ae(y,e.parentId,"");if(!$e(t))throw console.log("kpPathFd",y),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in folder`);let n=Ae(v,t);if(Ye(n)||Nc(v,t,[]),n=Ae(v,t),!Te(ef(n,{id:e.id}))){n.push(gm(gm({},e),{},{children:[]}));let r=`${t}.${Xr(n)-1}`;y[e.id]=`${r}.children`,b[e.id]=r}}))}let w=na(v),x={};for(let e=2;e<=g;e++){rr(h[e],(e=>{let t=Ae(y,e.parentId,"");if(!$e(t))throw console.log("kpPathFd",y),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in file`);let n=Ae(v,t);if(!Ye(n))throw console.log("treeItems",v),console.log("k",t),console.log("v",e),new Error("無預先建置資料夾");if(!Te(ef(n,{id:e.id}))){n.push(e);let r=`${t}.${Xr(n)-1}`;x[e.id]=r,b[e.id]=r}}))}return{treeItems:v,treeItemsFolder:w,kpPath:b,fpsNormalize:l}},e.files2data=function(e){let t=ml(),n=or(e,(function(e){return{name:e.name,size:e.size,type:e.type}}));return bl(e).then((function(e){let r=or(e,(function(e){return{b64:e}})),i=vm(n,r);t.resolve(i)})),t},e.flattenToConn=Zc,e.flattenTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ye(e)){if(0===e.length)return[]}else{if(!Pe(e))return[];if(dr(e))return[]}let n=Ae(t,"bindKey",null);$e(n)||(n="id");let r=Ae(t,"bindChildren",null);$e(r)||(r="children");let i=!1;Pe(e)&&(i=!0,e=[e]);let o=[];return Xc(e,((e,t,i)=>{let a=Ae(e,n,null),u=Ae(e,r,null);if(a){let n=function(e){let t=[e[0]];for(let n=1;n<e.length;n++){let i=e[n];t.push(r),t.push(i)}return t}([...i,t]);if(o.push(bm(bm({},e),{},{level:(Xr(n)-1)/2,nk:n})),u)return u}})),i&&(o=o[0]),o},e.fsCleanFolder=function(e){if(!a.existsSync(e)){let t=jm(e);return t.error?t.error:{success:"done: "+e}}if(!wm(e))return{error:"input path is not a folder"};try{a.readdirSync(e).forEach((function(t){let n=e+"/"+t;if(a.lstatSync(n).isDirectory())xm(n);else try{a.unlinkSync(n)}catch(e){}}))}catch(e){return{error:e}}return{success:"done: "+e}},e.fsCopyFile=function(e,t){try{a.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsCopyFolder=function e(t,n){try{a.readdirSync(t).forEach((function(r){let i=t+"/"+r,o=n+"/"+r,l=a.lstatSync(i);if(l.isDirectory())jm(u.dirname(o)),e(i,o);else if(l.isSymbolicLink()){let e=a.readlinkSync(i);a.symlinkSync(e,o)}else jm(u.dirname(o)),a.copyFileSync(i,o)}))}catch(e){return{error:e}}return{success:"done: "+n}},e.fsCreateFile=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(a.existsSync(e))return{error:"input path already exists: "+e};if(Om(e))return{error:"input file is already exists: "+e};try{a.writeFileSync(e,t,n)}catch(e){return{error:e}}return{success:"done: "+e}},e.fsCreateFolder=jm,e.fsDeleteFile=function(e){if(!a.existsSync(e))return{success:"file does not exist: "+e};if(!Om(e))return{error:"input path is not a file: "+e};try{a.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}},e.fsDeleteFolder=xm,e.fsEvem=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"./_evps",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=oa(),i=Ae(t,"timeDetect");fa(i)||(i=50),i=sa(i);let o=Ae(t,"timeRewatch");return fa(o)||(o=1e3),o=sa(o),wm(e)||jm(e),r.on=function(t,r){let l=u.resolve(e,t),c=Sm({timeDetect:i,timeRewatch:o});c.on(l,(e=>{let t=a.readFileSync(l,"utf8"),n=cl(t);Te(n)&&(t=n),r(t,e)})),n.push({fp:l,evf:c})},r.off=function(t){let r=u.resolve(e,t);rr(n,(e=>{e.fp===r&&e.evf.clear()}))},r.emit=function(t,n){let r=u.resolve(e,t);$e(n)||(n=JSON.stringify(n)),a.writeFileSync(r,n,"utf8")},r.clear=function(){rr(n,(e=>{e.evf.clear()})),xm(e)},r},e.fsGetFileHash=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sha512",n=ml();Om(e)||n.reject(`路徑[${e}]非檔案`);try{let r=c.createHash(t),i=a.createReadStream(e);i.on("readable",(()=>{let e=i.read();e?r.update(e):n.resolve(r.digest("hex"))})),i.on("error",(e=>{n.reject(e.toString())}))}catch(e){n.reject(e.toString())}return n},e.fsGetFilesInFolder=function(e){let t=km(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return t=$u(t,(e=>Om(e.path))),t=or(t,"path"),t},e.fsGetFoldersInFolder=function(e){let t=km(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return t=$u(t,(e=>!Om(e.path))),t=or(t,"path"),t},e.fsIsFile=Om,e.fsIsFolder=wm,e.fsReadText=function(e){return a.readFileSync(e,"utf8")},e.fsRenameFile=function(e,t){if(!Om(e))return{error:`pahOld[${e}] is not a file`};if(a.existsSync(t))return{error:`pahNew[${t}] does exist`};try{a.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsRenameFolder=function(e,t){if(!wm(e))return{error:`pahOld[${e}] is not a folder`};if(a.existsSync(t))return{error:`pahNew[${t}] does exist`};try{a.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsTreeFolder=km,e.fsWatchFile=Sm,e.fsWatchFolder=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=oa(),r=Ae(e,"polling");Kr(r)||(r=!1);let i=Ae(e,"timeInterval");fa(i)||(i=100),i=sa(i);let o=Ae(e,"timeBinaryInterval");function a(e,n){e.watcher.close().catch((t=>{console.log(t),console.log("watcher.close error",e.fp)})).finally((()=>{delete t[n]}))}return fa(o)||(o=300),o=sa(o),n.on=function(e,n){let a=null,c=()=>{null!==a&&a.unwatch(e),a=l.watch(e,{usePolling:r,interval:i,binaryInterval:o,awaitWriteFinish:!0})};c();let s=os();t[s]={id:s,fp:e,watcher:a,isFile:!1},a.on("all",((r,i,o)=>{let a="";{let e=i;e=e.replace(/\\/g,"/"),e=`./${e}`,a=e}let l=u.resolve(e),f=u.resolve(a);Om(e)?t[s].isFile=!0:t[s].isFile&&"unlink"===r&&l===f?t[s].isFile=!1:(zu(n)&&n({fp:a,type:r,time:Em(),stats:o}),"unlinkDir"===r&&l===f&&setTimeout((()=>{c()}),1))}))},n.off=function(e){rr(t,((t,n)=>{t.fp===e&&a(t,n)}))},n.clear=function(){rr(t,((e,t)=>{a(e,t)}))},n},e.fsWriteText=function(e,t){a.writeFileSync(e,t,"utf8")},e.genGradientColor=function(e){if(gr(e))return{};let t;try{t=Cc.toRgba(e)}catch(e){return{}}function n(e,t){return e.a=t,Cc.toRgbaString(e)}return{linearGradient:{x1:0,x2:0,y1:0,y2:1},stops:[[0,n(t,.4)],[1,n(t,.9)]]}},e.genID=os,e.genPm=ml,e.getBufferSize=Mm,e.getClearPathName=_m,e.getCsvStrFromData=Am,e.getDataFromExcelFileU8Arr=Ym,e.getDataFromExcelFileU8ArrDyn=async function(e,t,n){vr(n)||(n=["https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]),await Es(n);let r=Ym(e,t);return""!==Ae(r,"error","")?Promise.reject(r.error):r},e.getEnv=function(){let e=ti(),t="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;return e=e||t,{isBrowser:e,isWebWorker:t,isNode:"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}},e.getExcelU8ArrFromData=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data";if(!vr(e)){return{error:"no data"}}$e(t)||(t="data");let n=null,r=Uh(e,t);return Ne(r,"error")?r:(n=Hm(r),Ne(n,"error"),n)},e.getExcelU8ArrFromWorkbook=Hm,e.getExcelWorkbookFromData=Uh,e.getExcelWorkbookFromWorksheet=Rh,e.getExcelWorksheetFromData=ii,e.getFileAccept=rf,e.getFileName=$m,e.getFileNameExt=function(e){if(!$e(e))return"";let t=ru($m(e),".");if(Xr(t)<=1)return"";let n="";try{n=Bc(t)}catch(e){}return n},e.getFileTrueName=function(e){if(!$e(e))return"";let t=$m(e),n=ru(t,".");if(Xr(n)<=1)return t;let r="";try{n=iu(n),r=Ca(n,".")}catch(e){}return r},e.getFileType=nf,e.getGlobal=ni,e.getObjSize=function(e){let t=0,n=function e(n){if(null!=n)switch(typeof n){case"number":t+=8;break;case"string":t+=2*n.length;break;case"boolean":t+=4;break;case"object":let r=Object.prototype.toString.call(n).slice(8,-1);if("Object"===r||"Array"===r)for(let t in n)n.hasOwnProperty(t)&&e(n[t]);else t+=2*n.toString().length}return t}(e),r=function(e){return e<1024?e+" bytes":e<1048576?(e/1024).toFixed(3)+" KiB":e<1073741824?(e/1048576).toFixed(3)+" MiB":(e/1073741824).toFixed(3)+" GiB"}(n);return{int:n,str:r}},e.getPathParent=function(e){if(!$e(e))return"";let t=_m(e);if(t.isRoot)return t.path;let n=$m(e=t.path);if(!$e(n))return e;let r=_m(e=nl(e,Xr(n)));return r.isRoot,r.path},e.getTimeBetween=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"days",r=Bm(n);if(""===r)return[];let i=Fm(e,n),o=Fm(t,n);return null===i||null===o||e>=t?[]:or(Nm(o.diff(i,n)+1),(function(e){return i.clone().add(e,n).format(r)}))},e.getTimeFromUnit=Bm,e.getTimeObject=Fm,e.getTimeRange=function(e,t){if(!zm(e))return"無起始時間";if(void 0===t&&(t=e),!zm(t))return"結束時間格式錯誤";let r=n(e,"YYYY-MM-DDTHH:mm:ss"),i=n(t,"YYYY-MM-DDTHH:mm:ss"),o=r.format("YYYY-MM-DD"),a=i.format("YYYY-MM-DD");if(o===a){let n=i.format("HH:mm");if(e===t)return Rm(e)+" 至 無";if(e<t)return Rm(e)+" 至 "+n;if(e>t)return Rm(e)+" 至 "+n+" (起始時間大於結束時間)"}else{if(o<a)return Rm(e)+" 至 "+Rm(t);if(o>a)return Rm(e)+" 至 "+Rm(t)+" (起始時間大於結束時間)"}return""},e.getUserAgent=Um,e.getUserAgentDyn=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return vr(t)||(t=["https://cdn.jsdelivr.net/npm/ua-parser-js@1.0.34/dist/ua-parser.min.js"]),await Es(t),Um(e)},e.getltdtkeys=Mr,e.haskey=Ne,e.html2pic=qm,e.html2picDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return vr(n)||(n=["https://cdn.jsdelivr.net/npm/canvg@4.0.0/lib/umd.js","https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"]),await Es(n),qm(e,t)},e.html2str=Vm,e.html2strDyn=async function(e,t){return vr(t)||(t=["https://cdn.jsdelivr.net/npm/htmlparser@1.7.7/lib/htmlparser.min.js"]),await Es(t),await Vm(e)},e.htmlDecode=function(e){let t=document.createElement("span");return t.appendChild(document.createTextNode(e)),t.innerHTML},e.htmlEncode=xl,e.importResources=Es,e.interp1=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Ye(e))return{err:"ps is not an array"};{let e=!Ce(t),n=!Ye(t);if(e&&n)return{err:"px is not a number or an array"}}let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Xr(e)<=0)return[];let n=Ae(t,"keyX");$e(n)||(n="x");let r=Ae(t,"keyY");$e(r)||(r="y");let i=[];return rr(e,(e=>{let t=null,o=null;Ye(e)&&Xr(e)>=2?(t=Ae(e,0),o=Ae(e,1)):(t=Ae(e,n,null),o=Ae(e,r,null)),Ce(t)&&Ce(o)&&(t=hi(t),o=hi(o),i.push({x:t,y:o}))})),i}(e,n);if(Ae(r,"err"))return Ae(r,"err");if(0===Xr(r))return{err:"ps(length=0) is not an effective array",ps:e,psEff:r};if(1===Xr(r))return{err:"ps(length=1) is one point only",ps:e,psEff:r};let i=function(e){let t=!0,n=!0;for(let r=1;r<Xr(e);r++){let i=e[r-1],o=e[r];if(t&&i.x>o.x&&(t=!1),n&&i.x<o.x&&(n=!1),i.x===o.x)return{err:`x can not be equal: i=${r}, x=${i.x}`}}return t?Gm:n?Km:"no"}(r);if("no"===i)return{err:"psEff is not increasing or decreasing"};i===Km&&(i=Gm,r=tl(r));let o=!Ye(t);o&&(t=[t]);let a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Xr(e)<=0)return[];let n=Ae(t,"keyX");$e(n)||(n="x");let r=[];return rr(e,(e=>{let t=null;t=Ce(e)?hi(e):Ye(e)&&Xr(e)>=1?Ae(e,0):Ae(e,n,null),Ce(t)&&(t=hi(t),r.push({x:t}))})),r}(t,n),u=Ae(n,"mode");"linear"!==u&&"stairs"!==u&&"blocks"!==u&&(u="linear");let l,c=or(a,((e,t)=>{let i=Ae(e,"x"),o=null;try{"linear"===u?o=function(e,t){let n=Jm(e,t);if(n!==Xm)return n;let r=null;for(let n=1;n<Xr(e);n++){let i=e[n-1],o=e[n];if(i.x<=t&&t<=o.x){r=((t-i.x)*o.y+(o.x-t)*i.y)/(o.x-i.x);break}}return null===r?{err:Zm}:r}(r,i):"blocks"===u?o=function(e,t){let n=Jm(e,t);if(n!==Xm)return n;let r=null;for(let n=1;n<Xr(e);n++){let i=e[n-1],o=e[n],a=i.x,u=o.x;if(a<=t&&t<=u){r=o.y;break}}return null===r?{err:Zm}:r}(r,i):"stairs"===u&&(o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ae(n,"xMin");if(Bu(r)){if(r>e[0].x)return{err:`xMin=${r} > ps[0].x=${e[0].x}`};r===e[0].x||(e=[{x:r,y:e[0].y},...e])}let i=Ae(n,"xMax");if(Bu(i)){if(i<e[Xr(e)-1].x)return{err:`xMax=${i} < ps[size(ps)-1].x=${e[Xr(e)-1].x}`};if(i===e[Xr(e)-1].x);else{let t={x:i,y:e[Xr(e)-1].y};e=[...e,t]}}let o=Jm(e,t);if(o!==Xm)return o;let a=null;for(let n=0;n<Xr(e);n++){let r=Ae(e,n-1,null),i=Ae(e,n,null),o=Ae(e,n+1,null),u=i.x;r&&(u=(r.x+i.x)/2);let l=i.x;if(o&&(l=(o.x+i.x)/2),u<=t&&t<=l){a=i.y;break}}return null===a?{err:Zm}:a}(r,i,n))}catch(e){o={err:e.toString()}}return o}));return l=o?c[0]:c,l},e.isDev=function(){return!!location&&hl(location.href,"localhost")},e.isEle=er,e.isEleExistByID=function(e){return!!$e(e)&&!(null===document.getElementById(e))},e.isEmail=function(e){return!!$e(e)&&/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)},e.isIE=gs,e.isNarrow=function(e){if(!ti())return!1;let t=window.innerWidth>0&&window.innerWidth<=1024,n=!1;if(e){let t=Ae(e,"clientWidth",0);n=t>0&&t<=700}return t||n},e.isStrHasCapital=ng,e.isStrHasLowerCase=rg,e.isStrHasNumber=ig,e.isUserIdentify=function(e){let t=ml();if(!$e(e))return t.reject("身份證字號非有效字串"),t;if(10!==e.length)return t.reject("身份證字號長度非10位"),t;if(isNaN(e.substr(1,9))||!/^[A-Z]$/.test(e.substr(0,1)))return t.reject("身份證格式錯誤,字首需大寫英文"),t;e="ABCDEFGHJKLMNPQRSTUVXYWZIO".indexOf(e.substring(0,1))+10+""+e.substr(1,9);let n=parseInt(e.substr(0,1))+9*parseInt(e.substr(1,1))+8*parseInt(e.substr(2,1))+7*parseInt(e.substr(3,1))+6*parseInt(e.substr(4,1))+5*parseInt(e.substr(5,1))+4*parseInt(e.substr(6,1))+3*parseInt(e.substr(7,1))+2*parseInt(e.substr(8,1))+parseInt(e.substr(9,1)),r=parseInt(e.substr(10,1));return n%10!=0&&10-n%10!==r?(t.reject("非有效身份證"),t):(t.resolve(),t)},e.isUserName=function(e){let t=ml();return $e(e)?(t.resolve(),t):(t.reject("請填入姓名"),t)},e.isUserPW=function(e){let t=ml();if(!He(e))return t.reject("密碼非字串"),t;let n=[];return e.length<8&&n.push("長度須大於8個字元"),e.length>30&&n.push("長度須小於30個字元"),ng(e)&&rg(e)&&ig(e)||n.push("須包含大寫、小寫英文與數字各1個字元"),hl(e,["<",">"])&&n.push("不能使用特殊符號(<,>)"),hl(e,["select","insert","update","delete"])&&n.push("不能使用指令(select,insert,update,delete)"),n.length>0?t.reject(Ca(n,",")):t.resolve(),t},e.isWindow=ti,e.isab=g,e.isarr=Ye,e.isarr0=mr,e.isblob=Ol,e.isbol=Kr,e.isday=ts,e.isearr=vr,e.iseobj=Te,e.iser=gr,e.isernot=Ks,e.isestr=$e,e.isfun=zu,e.isint=wi,e.ismonth=oi,e.isn0int=Qm,e.isn0num=eg,e.isnan=Le,e.isnbr=Ie,e.isnint=Nh,e.isnnum=function(e){return!!Ce(e)&&bi(e)<0},e.isnull=pr,e.isnum=Ce,e.isobj=Pe,e.isobj0=dr,e.isp0int=Ta,e.isp0num=tg,e.ispint=fa,e.ispm=_l,e.ispnum=Iu,e.isstr=He,e.isstr0=hr,e.istime=zm,e.istimeTZ=cg,e.istimems=og,e.istimemsTZ=lg,e.isu16arr=Dm,e.isu8arr=fl,e.isundefined=fr,e.j2o=cl,e.keysmat2ltdt=sg,e.log=function(){let e=null;return{init:function(t){if(!zu(t))throw new Error("loggerFun is not a function");e=t},log:function(t,n,r){if(null===e)throw new Error("no logger: need to construct by init");let i=fg(),o={id:os(),from:t,level:n,msg:Jr(r),time:i};return e(o)}}},e.ltdt2vrtsable=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!vr(e))return[];if(!Ye(t))return[];let n=!1;if(rr(e,(function(e){Te(e)||(n=!0)})),n)return[];let r=Mr(e),i=[];rr(e,(function(e){let t={};rr(r,(function(n){t[n]={value:e[n].value,style:e[n].style,rowspan:1}})),i.push(t)}));let o=tl(i),a=Xr(o);return rr(r,(function(e){if(Fu(e,t)){let t=va(0,a,0),n=va(0,a,0),r=va(1,a+1,0);rr(o,(function(i,a){if(a>0){Cu(o[a-1][e].value,o[a][e].value)&&(t[a-1]=1,t[a]=1,r[a]=r[a-1]+1),1===t[a-1]&&1===t[a]&&(n[a-1]=0,n[a]=1)}})),rr(o,(function(i,a){1===t[a]&&(1===n[a]?o[a][e].rowspan=r[a]:o[a][e].rowspan=null)}))}})),tl(o)},e.ltdtDiff=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Ye(e))return{};if(!Ye(t))return{};if(0===Xr(e)&&0===Xr(t))return{};let r=Ae(n,"empty");$e(r)||(r="∗empty∗");let i=Mr(e),o=Mr(t),a=pg(i,o),u={};rr(a,((e,t)=>{u[t]=e}));let l=Du(Qr(e,a,{empty:r}),Qr(t,a,{empty:r}),hg(hg({},n),{},{mode:"matrix"}));return l.dfs=or(l.dfs,(e=>{let t={};rr(e,(e=>{e.k=u[e.k],t[e.k]=e}));let n={};return rr(a,(e=>{n[e]=t[e]})),n})),l},e.ltdtDiffByKey=function(e,t,n){let r={infor:{},del:[],same:[],diff:[],add:[]};if(!$e(n))return console.log("invalid key"),r;Ye(e)||(e=[e]),Ye(t)||(t=[t]);let i={},o=[],a=[],u=[];rr(e,(function(e){if(Ne(e,n)){let r={[n]:e[n]},l=ef(t,r);gr(l)?(o.push(e),i[e[n]]="del"):Cu(e,l)?(u.push(l),i[l[n]]="same"):(a.push(l),i[l[n]]="diff")}}));let l=[];return rr(t,(function(t){if(Ne(t,n)){let r={[n]:t[n]};gr(ef(e,r))&&(l.push(t),i[t[n]]="add")}})),{infor:i,del:o,same:u,diff:a,add:l}},e.ltdtkeys2mat=Qr,e.ltdtkeysheads2mat=ei,e.ltdtmapping=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return vr(e)&&vr(t)?or(e,(e=>Vh(e,t,n))):[]},e.ltdtmerge=vm,e.ltdtpick=function(e,t){return vr(e)&&vr(t)?or(e,(e=>Xh(e,t))):[]},e.ltdtpull=function(e,t,n){return Ye(e)&&Ye(t)&&$e(n)&&Wn(e,(e=>Pe(e)))?0===t.length?e:Wn(t,(e=>Pe(e)))?gg(e,t,n):[]:[]},e.mat2ltdt=function(e){if(!vr(e))return[];if(e.length<=1)return[];let t=!1;return rr(e,(function(e){vr(e)||(t=!0)})),t?[]:sg(xu(e)[0],(r=null==(n=e)?0:n.length)?Na(n,1,r):[]);var n,r},e.matConcat=function(e,t){if(!Ye(e))return[];if(!Ye(t))return[];if(0===Xr(e)&&0===Xr(t))return[];let n=Xr(e),r=Xr(Ae(e,0,[])),i=Xr(t),o=Xr(Ae(t,0,[])),a=[],u=Math.max(n,i);for(let n=0;n<u;n++){let i=[],u=-1;for(let t=0;t<r;t++){u++;let r=Ae(e,`${n}.${t}`,null);i[u]=r}for(let e=0;e<o;e++){u++;let r=Ae(t,`${n}.${e}`,null);i[u]=r}a[n]=i}return a},e.matDiff=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Ye(e)&&Ye(t)?0===Xr(e)&&0===Xr(t)?{}:Du(e,t,yg(yg({},n),{},{mode:"matrix"})):{}},e.matat=function(e,t,n){return vr(e)?or(e,(function(e){return Ya(e,t,n)})):[]},e.now2str=Em,e.now2strp=function(){if(!zu(n))throw new Error("invalid dayjs");return n().format("YYYYMMDDHHmmss")},e.nowDay2str=function(){if(!zu(n))throw new Error("invalid dayjs");return n().format("YYYY-MM-DD")},e.nowms2str=fg,e.nowms2strp=function(){if(!zu(n))throw new Error("invalid dayjs");return n().format("YYYYMMDDHHmmssSSS")},e.o2j=Jr,e.obj2b64=function(e){let t="";try{t=bg(Jr(e))}catch(e){t=""}return t},e.obj2pb64=function(e,t){return void 0===e?"":$e(t)?wg(Jr({data:e}),t,!0):""},e.obj2str=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Uint8Array";if(fr(e))return"";if(He(t))t=[t];else if(!Ye(t))return"";let n="";try{n=JSON.stringify(e,(function(e,n){return t.indexOf("Uint8Array")>=0&&(n=Mg.u8arr2b64(n)),t.indexOf("Uint16Array")>=0&&(n=Mg.u16arr2b64(n)),n}))}catch(e){n=""}return n},e.obj2stru8arr=Pg,e.obj2u8arr=function(e){let t=[],n=[];if(!vr(e)&&!Te(e))return null;let r=[],i=[];function o(e){r.push(Mm(e)),i.push(e)}try{let a=Pg(e);o(Tg(a.results)),rr(a.binarys,(e=>{o(e)}));let u=r,l=Tg(JSON.stringify(u)),c=new Uint8Array(8);Ml(Mm(l),c),t.push(c),t.push(l),rr(i,(e=>{t.push(e)})),rr(t,(e=>{n=function(e,t){let n=Mm(e),r=Mm(t),i=new Uint8Array(n+r);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),n),i}(n,e)}))}catch(e){return null}return n},e.objSortBy=Yg,e.objSortByKeys=function(e,t){if(!Te(e))return{};if(!vr(t))return{};let n={};return rr(t,((e,t)=>{n[e]=t})),Yg(e,((e,t)=>Ae(n,t,0)))},e.ocr=Hg,e.ocrDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return vr(n)||(n=["https://cdn.jsdelivr.net/npm/tesseract.js@4.1.2/dist/tesseract.min.js"]),await Es(n),await Hg(e,t)},e.oo=function(e){if(void 0!==e)return cl(Jr(e))},e.openLink=function(e){if(!$e(e))return;let t=document.createElement("a");t.href=e,t.target="_blank",document.body.appendChild(t),t.click(),document.body.removeChild(t)},e.pb642obj=function(e,t){return $e(e)&&$e(t)?cl(Xi(e,t,!0)).data:""},e.pm2resolve=Ch,e.pmChain=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Ye(e)){let e=ml();return e.reject("pms is not an array"),e}return e.reduce(((e,t)=>e.then(t)),Promise.resolve(t))},e.pmConvertResolve=Lh,e.pmDebounce=function(){return new function(e){let t=[],n=null,r=null,i="wait";return fa(e)||(e=300),e=sa(e),function(o){if(zu(o)){(null===r||"wait"===i)&&(r=Date.now());for(var a=arguments.length,u=new Array(a>1?a-1:0),l=1;l<a;l++)u[l-1]=arguments[l];t.push({func:o,input:u,output:null}),null===n&&"wait"===i&&(n=setInterval((()=>{if("wait"!==i)return;if("wait"===i&&0===t.length)return clearInterval(n),void(n=null);let o=!1;if(o=null===r||Date.now()-r>e,o){i="doing",r=Date.now();let e=t.pop();t=[];let n=e.func(...e.input);_l(n)?n.then((t=>{e.output=t})).catch((t=>{e.output={err:t}})).finally((()=>{i="wait"})):(e.output=n,i="wait")}"wait"===i&&0===t.length&&(clearInterval(n),n=null)}),10))}else console.log("func is not a function")}}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:300)},e.pmHook=$g,e.pmHookReject=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return zu(e)?(zu(t)||(t=()=>{}),$g(e,(e=>{if("afterCatch"===e.mode)return t(e.data)}))):null},e.pmIni=function(){return Promise.resolve()},e.pmInvResolve=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!_l(e))throw new Error("pm is not a promise");let n=Ae(t,"thenExtractData");Kr(n)||(n=!1);let r=ml();return e.then((e=>{n&&(e=Ae(e,"data"));let t=Ae(e,"state",""),i=Ae(e,"msg",{});"success"===t?r.resolve(i):"cancelled"===t?r.reject({reason:"cancelled"}):r.reject(i)})).catch((e=>{r.reject(e)})),r},e.pmMap=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r={},i=!1,o=ml();if(!Ye(e)&&!Pe(e))return o.reject("rs is not an array or object"),o;let a=!1;if(Pe(e)){a=!0;let t=[];rr(e,((e,n)=>{t.push({k:n,v:e})})),e=t}let u=Bh(n);return u.on("message",(function(n){if(i)return;let l,c=u.get();if(zu(t)){let e=c.key,n=c.value;a&&(e=c.value.k,n=c.value.v),l=t(n,e)}else l=c.value;l.then((e=>{r[c.key]=e})).catch((e=>{i=!0,u.clear(),o.reject(e)})).finally((()=>{u.cb(),Xr(r)===e.length&&o.resolve(um(r))}))})),rr(e,((e,t)=>{u.push({key:t,value:e})})),o},e.pmQueue=Fh,e.pmSeries=ws,e.pmThrottle=function(){let e=oa(),t=[],n=null,r=!1;return function(i){let o=ml();if(!zu(i))return void console.log("func is not a function");let a=os();for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c<u;c++)l[c-1]=arguments[c];return t.push({id:a,func:i,input:l}),null===n&&(n=setInterval((async()=>{if(r)return;r=!0;let i=t.pop();for(let n=0;n<t.length;n++){let r=t[n].id,i={state:"cancelled"};e.emit(r,i)}if(t=[],i){let t,n=i.id;t=zu(i.func)?await Ch(i.func)(...i.input):{state:"error",msg:"fun is not a function"},e.emit(n,t)}r=!1,r||0!==t.length||(clearInterval(n),n=null)}),10)),e.once(a,(e=>{"success"===e.state?o.resolve(e.msg):"cancelled"===e.state?o.reject({reason:"cancelled"}):o.reject(e.msg)})),o}},e.pseudoRandom=Cg,e.pseudoRandomIntRange=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"start1";if(wi(e)||(e=0),e=sa(e),wi(t)||(t=100),t=sa(t),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=Cg(n)*(t-e+1)+e;return r=Math.ceil(r),r},e.pseudoRandomRange=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"start1";if(Ce(e)||(e=0),e=bi(e),Ce(t)||(t=1),t=bi(t),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);return Cg(n)*(t-e)+e},e.queue=Bh,e.rang=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!Ce(e))return[];if(e=bi(e),!Ce(t))return[];t=bi(t),fa(n)||(n=2),n=sa(n);let r=(t-e)/n,i=e,o=[];for(let e=0;e<=n;e++)o.push(i),i+=r;return o},e.rep=function(e,t){return $e(e)&&Ta(t)?Fg(e,t):""},e.repObj=function(e,t){return gr(e)?[]:fa(t)?Nm(t,xa(e)):[]},e.replace=Hl,e.replaceObj=function(e,t){if(!$e(e))return"";if(!Te(t))return"";let n=!1;return rr(t,(function(e,t){He(e)||(n=!0)})),n?"":(rr(t,(function(t,n){e=Hl(e,n,t)})),e)},e.replacePlus=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4?arguments[4]:void 0;if(!$e(e)||!$e(t)||!$e(n))return"";if(!He(i))return"";let o="[\\s\\S]*";$e(r)&&(o="[^"+r+"]*");let a=new RegExp(t+o+n,"g");return e.replace(a,i)},e.round=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ta(t)||(t=0),t=sa(t);let r=Ae(n,"rounding","");if("ROUND_HALF_UP"!==r&&"ROUND_HALF_EVEN"!==r&&(r="ROUND_HALF_UP"),!Ce(e))return"";e=bi(e);let i=Ey.clone();return i.set({rounding:Ey[r]}),new i(e).toDecimalPlaces(t).toNumber()},e.secd=function(e){return Ce(e)?1/Kc(e=bi(e)):null},e.sep=Au,e.sepInt=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!wi(e))return[];if(!Ta(t))return[];if(!Kr(n))return[];let r=Sy(e/t),i=e-r*t,o=[];for(let e=1;e<=t;e++){let t=r;e<=i&&(t=r+1),o.push(t)}return n&&(o=tl(o)),o},e.sind=es,e.split=_u,e.str2aes=wg,e.str2b64=bg,e.str2hint=Ig,e.str2md5=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!$e(e))return"";if(!Kr(t))return"";let n=ky(e),r="";return r=t?n.toString(Ai):n.toString(Vi),r},e.str2obj=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Uint8Array";if(He(t))t=[t];else if(!Ye(t))return{};let n={};try{n=JSON.parse(e,(function(e,n){return t.indexOf("Uint8Array")>=0&&(n=Mg.b642u8arr(n)),t.indexOf("Uint16Array")>=0&&(n=Mg.b642u16arr(n)),n}))}catch(e){n={}}return n},e.str2sha512=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!$e(e))return"";if(!Kr(t))return"";let n=Ay(e),r="";return r=t?n.toString(Ai):n.toString(Vi),r},e.str2u8arr=Tg,e.strCompare=Py,e.strDiff=ju,e.strFindFuzz=Hy,e.strFindFuzzDyn=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return vr(r)||(r=["https://cdn.jsdelivr.net/npm/fuse.js@6.6.2/dist/fuse.min.js"]),await Es(r),Hy(e,t,n)},e.strFindSimilar=function(e,t){let n="";if($e(e)||Ce(e))n=Ju(e);else{if(!vr(e))return{};n=Ca(e,"")}return Ce(t)&&(t=Ju(t)),$e(t)&&(t=[t]),vr(t)?function(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let o=t[i],a=Py(e,o);n.push({target:o,rating:a}),a>n[r].rating&&(r=i)}return{ratings:n,bestMatch:n[r],bestMatchIndex:r}}(n,t=or(t,(function(e){return Ju(e)}))):{}},e.strdelleft=Yu,e.strdelright=nl,e.strleft=Pu,e.strmid=$l,e.strright=Tu,e.stru8arr2obj=$y,e.tand=Jc,e.time2day=function(e){return zm(e)?n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD"):""},e.time2hour=function(e){return zm(e)?n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH"):""},e.time2min=Rm,e.timeTZ2day=function(e){return cg(e)?(e=ug.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD")):""},e.timeTZ2expire=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return cg(e)?(e=Cy(e),t=Cy(t),Iy(e,t)):{today:null,msg:"",err:"時間格式錯誤"}},e.timeTZ2hour=function(e){return cg(e)?(e=ug.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH")):""},e.timeTZ2min=function(e){return cg(e)?(e=ug.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH:mm")):""},e.timeTZ2past=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return cg(e)?(e=Ny(e),t=Ny(t),Ly(e,t)):{today:null,msg:"",err:"時間格式錯誤"}},e.timems2day=function(e){return og(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DD"):""},e.timems2hour=function(e){return og(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH"):""},e.timems2min=function(e){return og(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm"):""},e.timems2time=function(e){return og(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm:ss"):""},e.timemsTZ2day=function(e){return lg(e)?(e=ug.delTZ(e),n(e).format("YYYY-MM-DD")):""},e.timemsTZ2expire=Iy,e.timemsTZ2hour=function(e){return lg(e)?(e=ug.delTZ(e),n(e).format("YYYY-MM-DDTHH")):""},e.timemsTZ2min=function(e){return lg(e)?(e=ug.delTZ(e),n(e).format("YYYY-MM-DDTHH:mm")):""},e.timemsTZ2past=Ly,e.timemsTZ2time=function(e){return lg(e)?(e=ug.delTZ(e),n(e).format("YYYY-MM-DDTHH:mm:ss")):""},e.treeObj=Xc,e.treeToFilepath=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return[];let n=Ae(t,"delimiter");$e(n)||(n="/");let r=Ae(t,"bindRoot");$e(r)||(r="root");let i=[];return Xc(e,((e,t,o)=>{let a=Ae(e,"_type","");if("folder"!==a&&"file"!==a)return e;let u=or(Ae(e,"pathInfors",[]),"name"),l=Ae(u,0,"")===r;if(1===Xr(u)&&l)return e;l&&(u=Qu(u));let c={type:a,path:n+Ca(u,n)};return i.push(c),e}),{force:!0}),i},e.trim=rl,e.u16arr2b64=Sg,e.u16arr2u8arr=Eg,e.u8arr2ab=function(e){return fl(e)?e.buffer:new ArrayBuffer},e.u8arr2b64=Og,e.u8arr2blob=qh,e.u8arr2bs=function(e){if(!fl(e))return"";let t=e.length,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n},e.u8arr2obj=function(e){let t=null;if(!fl(e))return null;try{let n=8,r=e.slice(0,n),i=e.slice(n,Mm(e)),o=kl(r),a=i.slice(0,o),u=i.slice(o,Mm(i)),l=By(a),c=function(e,t){let n=0,r=0,i=[];return rr(t,(t=>{r=n+t;let o=e.slice(n,r);n=r,i.push(o)})),i}(u,JSON.parse(l));t=$y({results:By(c.shift()),binarys:c})}catch(e){}return t},e.u8arr2str=By,e.u8arr2u16arr=pl,e.urlParse=function(e){if(!$e(e))return{};if(!$e(e=Ae(e=ru(e,"?"),"[1]")))return{};let t=ru(e,"&");return t=or(t,(function(e){return ru(e,"=")})),t=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}(t),t},e.verifyValue=function(e,t){let n=!1,r="";if("isstr"===t)He(e)||(n=!0,r="需要為字串",e="");else if("isnum"===t)Ce(e)||(n=!0,r="需要為數字",e=0);else if("isp0num"===t)tg(e)||(n=!0,r="需要為含0的正浮點數",e=0);else if("isn0num"===t)eg(e)||(n=!0,r="需要為含0的負浮點數",e=0);else if("isint"===t)wi(e)||(n=!0,r="需要為整數",e=0);else if("ispint"===t)fa(e)||(n=!0,r="需要為不含0正整數",e=0);else if("isp0int"===t)Ta(e)||(n=!0,r="需要為含0正整數",e=0);else if("isnint"===t)Nh(e)||(n=!0,r="需要為不含0負整數",e=0);else if("isn0int"===t)Qm(e)||(n=!0,r="需要為含0負整數",e=0);else if(zu(t)){e=t(e)}else"any"===t?Ce(e)||He(e)||(n=!0,r="需要為字串或數字",e=""):(n=!0,r="需要指定驗證類型",e=null);return{value:e,err:n,errmsg:r}},e.waitFun=Al}));
15
15
  //# sourceMappingURL=wsemi.umd.js.map