wsemi 1.8.62 → 1.8.64

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 (478) 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/arrPull.mjs.html +1 -1
  31. package/docs/arrPullAt.mjs.html +1 -1
  32. package/docs/arrReduce.mjs.html +1 -1
  33. package/docs/arrReverse.mjs.html +1 -1
  34. package/docs/arrSep.mjs.html +1 -1
  35. package/docs/arrSort.mjs.html +1 -1
  36. package/docs/asind.mjs.html +1 -1
  37. package/docs/atan2d.mjs.html +1 -1
  38. package/docs/atand.mjs.html +1 -1
  39. package/docs/attstr.mjs.html +1 -1
  40. package/docs/b642obj.mjs.html +1 -1
  41. package/docs/b642str.mjs.html +1 -1
  42. package/docs/b642u16arr.mjs.html +1 -1
  43. package/docs/b642u8arr.mjs.html +1 -1
  44. package/docs/binstr.mjs.html +1 -1
  45. package/docs/blob2ab.mjs.html +1 -1
  46. package/docs/blob2b64.mjs.html +1 -1
  47. package/docs/blob2str.mjs.html +1 -1
  48. package/docs/blob2u8arr.mjs.html +1 -1
  49. package/docs/blobs2b64s.mjs.html +1 -1
  50. package/docs/blobs2u8arrs.mjs.html +1 -1
  51. package/docs/bodyLog.mjs.html +1 -1
  52. package/docs/browserView.mjs.html +1 -1
  53. package/docs/browserViewFromBlob.mjs.html +1 -1
  54. package/docs/browserViewFromText.mjs.html +1 -1
  55. package/docs/browserViewFromU8arr.mjs.html +1 -1
  56. package/docs/bs2u8arr.mjs.html +1 -1
  57. package/docs/bufRead.mjs.html +1 -1
  58. package/docs/bufReadDbl.mjs.html +1 -1
  59. package/docs/bufWrite.mjs.html +1 -1
  60. package/docs/bufWriteDbl.mjs.html +1 -1
  61. package/docs/cache.mjs.html +1 -1
  62. package/docs/cacheBd.mjs.html +1 -1
  63. package/docs/cacheSt.mjs.html +1 -1
  64. package/docs/cbol.mjs.html +1 -1
  65. package/docs/cdbl.mjs.html +1 -1
  66. package/docs/ceil.mjs.html +1 -1
  67. package/docs/cfilesize.mjs.html +1 -1
  68. package/docs/cfinancial.mjs.html +1 -1
  69. package/docs/cint.mjs.html +1 -1
  70. package/docs/clearXSS.mjs.html +1 -1
  71. package/docs/clearXSSDyn.mjs.html +1 -1
  72. package/docs/color.mjs.html +1 -1
  73. package/docs/composeToTree.mjs.html +1 -1
  74. package/docs/convertToTree.mjs.html +1 -1
  75. package/docs/copyStrToClipboard.mjs.html +1 -1
  76. package/docs/cosd.mjs.html +1 -1
  77. package/docs/cotd.mjs.html +1 -1
  78. package/docs/createExcelWorkbook.mjs.html +1 -1
  79. package/docs/cscd.mjs.html +1 -1
  80. package/docs/cstr.mjs.html +1 -1
  81. package/docs/day2cht.mjs.html +1 -1
  82. package/docs/debounce.mjs.html +1 -1
  83. package/docs/delay.mjs.html +1 -1
  84. package/docs/dig.mjs.html +1 -1
  85. package/docs/digExp.mjs.html +1 -1
  86. package/docs/domAlert.mjs.html +1 -1
  87. package/docs/domAppend.mjs.html +1 -1
  88. package/docs/domCancelEvent.mjs.html +1 -1
  89. package/docs/domCompareText.mjs.html +1 -1
  90. package/docs/domConvertToPic.mjs.html +1 -1
  91. package/docs/domConvertToPicDyn.mjs.html +1 -1
  92. package/docs/domDetect.mjs.html +1 -1
  93. package/docs/domDrag.mjs.html +1 -1
  94. package/docs/domDragBarAndScroll.mjs.html +1 -1
  95. package/docs/domDragPreview.mjs.html +1 -1
  96. package/docs/domDropFiles.mjs.html +1 -1
  97. package/docs/domElementsFromPoint.mjs.html +1 -1
  98. package/docs/domFadeIn.mjs.html +1 -1
  99. package/docs/domFadeOut.mjs.html +1 -1
  100. package/docs/domFind.mjs.html +1 -1
  101. package/docs/domFinds.mjs.html +1 -1
  102. package/docs/domGetAttr.mjs.html +1 -1
  103. package/docs/domGetBoudRect.mjs.html +1 -1
  104. package/docs/domGetBoudRectRefSelf.mjs.html +1 -1
  105. package/docs/domGetFileAccept.mjs.html +1 -1
  106. package/docs/domGetFiles.mjs.html +1 -1
  107. package/docs/domGetParents.mjs.html +1 -1
  108. package/docs/domGetPointFromEvent.mjs.html +1 -1
  109. package/docs/domGetScrollableParent.mjs.html +1 -1
  110. package/docs/domGetWindowSize.mjs.html +1 -1
  111. package/docs/domIsClientXYIn.mjs.html +1 -1
  112. package/docs/domIsFocused.mjs.html +1 -1
  113. package/docs/domIsStable.mjs.html +1 -1
  114. package/docs/domIsVisible.mjs.html +1 -1
  115. package/docs/domPrepend.mjs.html +1 -1
  116. package/docs/domRemove.mjs.html +1 -1
  117. package/docs/domRenderMarkdownMind.mjs.html +1 -1
  118. package/docs/domRenderMarkdownMindDyn.mjs.html +1 -1
  119. package/docs/domRipple.mjs.html +1 -1
  120. package/docs/domScrollIntoView.mjs.html +1 -1
  121. package/docs/domScrollTo.mjs.html +1 -1
  122. package/docs/domSetAttr.mjs.html +1 -1
  123. package/docs/domShowImages.mjs.html +1 -1
  124. package/docs/domShowImagesDyn.mjs.html +1 -1
  125. package/docs/domShowInputAndGetFiles.mjs.html +1 -1
  126. package/docs/domShowInputAndGetFilesU8Arrs.mjs.html +1 -1
  127. package/docs/domShowInputDatatime.mjs.html +1 -1
  128. package/docs/domTooltip.mjs.html +1 -1
  129. package/docs/domTriggerEvent.mjs.html +1 -1
  130. package/docs/domVirtualCreate.mjs.html +1 -1
  131. package/docs/domVirtualCreateQueue.mjs.html +1 -1
  132. package/docs/downloadExcelFileFromData.mjs.html +1 -1
  133. package/docs/downloadExcelFileFromDataDyn.mjs.html +1 -1
  134. package/docs/downloadFileFromB64.mjs.html +1 -1
  135. package/docs/downloadFileFromBlob.mjs.html +1 -1
  136. package/docs/downloadFileFromText.mjs.html +1 -1
  137. package/docs/downloadFileFromU8Arr.mjs.html +1 -1
  138. package/docs/dtmapping.mjs.html +1 -1
  139. package/docs/dtpick.mjs.html +1 -1
  140. package/docs/estimateTicks.mjs.html +1 -1
  141. package/docs/evem.mjs.html +1 -1
  142. package/docs/examples/ex-blob2b64.html +1 -1
  143. package/docs/examples/ex-clearXSS.html +1 -1
  144. package/docs/examples/ex-clearXSSDyn.html +1 -1
  145. package/docs/examples/ex-colorConverter.html +1 -1
  146. package/docs/examples/ex-domCompareText.html +1 -1
  147. package/docs/examples/ex-domConvertToPic.html +1 -1
  148. package/docs/examples/ex-domDrag.html +1 -1
  149. package/docs/examples/ex-domDropFiles.html +1 -1
  150. package/docs/examples/ex-domIsVisible.html +1 -1
  151. package/docs/examples/ex-domRenderMarkdownMind.html +1 -1
  152. package/docs/examples/ex-domRenderMarkdownMindDyn.html +1 -1
  153. package/docs/examples/ex-domRipple.html +1 -1
  154. package/docs/examples/ex-domScrollIntoView.html +1 -1
  155. package/docs/examples/ex-domScrollTo.html +1 -1
  156. package/docs/examples/ex-domShowImages.html +1 -1
  157. package/docs/examples/ex-domShowImagesDyn.html +1 -1
  158. package/docs/examples/ex-domShowInputAndGetFiles.html +1 -1
  159. package/docs/examples/ex-domTooltip.html +1 -1
  160. package/docs/examples/ex-getFileHash.html +1 -1
  161. package/docs/examples/ex-getUserAgent.html +1 -1
  162. package/docs/examples/ex-getUserAgentDyn.html +1 -1
  163. package/docs/examples/ex-html2str.html +1 -1
  164. package/docs/examples/ex-obj2u8arr-u8arr2obj.html +1 -1
  165. package/docs/examples/ex-openLink.html +1 -1
  166. package/docs/examples/ex-str2aes-aes2str.html +1 -1
  167. package/docs/examples/ex-str2b64-b642str.html +1 -1
  168. package/docs/examples/ex-strFindFuzz.html +1 -1
  169. package/docs/examples/ex-timeTZ2expire-timeTZ2past.html +1 -1
  170. package/docs/examples/ex-xlsx.html +1 -1
  171. package/docs/examples/ex-xlsxDyn.html +1 -1
  172. package/docs/execJsCode.mjs.html +1 -1
  173. package/docs/execProcess.mjs.html +1 -1
  174. package/docs/execProcessKillPid.mjs.html +1 -1
  175. package/docs/filepathToTree.mjs.html +1 -1
  176. package/docs/files2data.mjs.html +1 -1
  177. package/docs/flattenToConn.mjs.html +1 -1
  178. package/docs/flattenTree.mjs.html +1 -1
  179. package/docs/floor.mjs.html +1 -1
  180. package/docs/fsBuildReadStreamText.mjs.html +1 -1
  181. package/docs/fsBuildWriteStreamText.mjs.html +1 -1
  182. package/docs/fsCleanFolder.mjs.html +1 -1
  183. package/docs/fsCleanFolderCore.mjs.html +1 -1
  184. package/docs/fsCopyFile.mjs.html +1 -1
  185. package/docs/fsCopyFileCore.mjs.html +1 -1
  186. package/docs/fsCopyFolder.mjs.html +1 -1
  187. package/docs/fsCopyFolderCore.mjs.html +1 -1
  188. package/docs/fsCreateFile.mjs.html +1 -1
  189. package/docs/fsCreateFileCore.mjs.html +1 -1
  190. package/docs/fsCreateFolder.mjs.html +1 -1
  191. package/docs/fsCreateFolderCore.mjs.html +1 -1
  192. package/docs/fsDeleteFile.mjs.html +1 -1
  193. package/docs/fsDeleteFileCore.mjs.html +1 -1
  194. package/docs/fsDeleteFileSafe.mjs.html +1 -1
  195. package/docs/fsDeleteFileSafeCore.mjs.html +1 -1
  196. package/docs/fsDeleteFolder.mjs.html +1 -1
  197. package/docs/fsDeleteFolderCore.mjs.html +1 -1
  198. package/docs/fsDeleteFolderSafe.mjs.html +1 -1
  199. package/docs/fsDeleteFolderSafeCore.mjs.html +1 -1
  200. package/docs/fsDownloadFile.mjs.html +1 -1
  201. package/docs/fsDownloadFileCore.mjs.html +1 -1
  202. package/docs/fsEvem.mjs.html +1 -1
  203. package/docs/fsExists.mjs.html +1 -1
  204. package/docs/fsExistsCore.mjs.html +1 -1
  205. package/docs/fsGetFileBasicHash.mjs.html +1 -1
  206. package/docs/fsGetFileBasicHashCore.mjs.html +1 -1
  207. package/docs/fsGetFileHash.mjs.html +1 -1
  208. package/docs/fsGetFileHashCore.mjs.html +1 -1
  209. package/docs/fsGetFileXxHash.mjs.html +1 -1
  210. package/docs/fsGetFileXxHashCore.mjs.html +1 -1
  211. package/docs/fsGetFilesInFolder.mjs.html +1 -1
  212. package/docs/fsGetFilesInFolderCore.mjs.html +1 -1
  213. package/docs/fsGetFilesWithHashInFolder.mjs.html +1 -1
  214. package/docs/fsGetFilesWithHashInFolderCore.mjs.html +1 -1
  215. package/docs/fsGetFolderBasicHash.mjs.html +1 -1
  216. package/docs/fsGetFolderBasicHashCore.mjs.html +1 -1
  217. package/docs/fsGetFoldersInFolder.mjs.html +1 -1
  218. package/docs/fsGetFoldersInFolderCore.mjs.html +1 -1
  219. package/docs/fsIsFile.mjs.html +1 -1
  220. package/docs/fsIsFileCore.mjs.html +1 -1
  221. package/docs/fsIsFolder.mjs.html +1 -1
  222. package/docs/fsIsFolderCore.mjs.html +1 -1
  223. package/docs/fsMergeFiles.mjs.html +1 -1
  224. package/docs/fsMergeFilesCore.mjs.html +1 -1
  225. package/docs/fsReadJson.mjs.html +1 -1
  226. package/docs/fsReadText.mjs.html +1 -1
  227. package/docs/fsReadTextCore.mjs.html +1 -1
  228. package/docs/fsRenameFile.mjs.html +1 -1
  229. package/docs/fsRenameFileCore.mjs.html +1 -1
  230. package/docs/fsRenameFolder.mjs.html +1 -1
  231. package/docs/fsRenameFolderCore.mjs.html +1 -1
  232. package/docs/fsSrlog.mjs.html +1 -1
  233. package/docs/fsSyncFolder.mjs.html +24 -3
  234. package/docs/fsSyncFolderCore.mjs.html +12 -3
  235. package/docs/fsTask.mjs.html +1 -1
  236. package/docs/fsTaskCp.mjs.html +1 -1
  237. package/docs/fsTreeFolder.mjs.html +1 -1
  238. package/docs/fsTreeFolderCore.mjs.html +1 -1
  239. package/docs/fsTreeFolderWithHash.mjs.html +1 -1
  240. package/docs/fsTreeFolderWithHashCore.mjs.html +1 -1
  241. package/docs/fsWatchFile.mjs.html +1 -1
  242. package/docs/fsWatchFolder.mjs.html +1 -1
  243. package/docs/fsWriteJson.mjs.html +1 -1
  244. package/docs/fsWriteText.mjs.html +1 -1
  245. package/docs/fsWriteTextCore.mjs.html +1 -1
  246. package/docs/genGradientColor.mjs.html +1 -1
  247. package/docs/genID.mjs.html +1 -1
  248. package/docs/genIDSeq.mjs.html +1 -1
  249. package/docs/genPm.mjs.html +1 -1
  250. package/docs/getBufferSize.mjs.html +1 -1
  251. package/docs/getClearPathName.mjs.html +1 -1
  252. package/docs/getCsvStrFromData.mjs.html +1 -1
  253. package/docs/getDataFromExcelFileU8Arr.mjs.html +1 -1
  254. package/docs/getDataFromExcelFileU8ArrDyn.mjs.html +1 -1
  255. package/docs/getEnv.mjs.html +1 -1
  256. package/docs/getErrorMessage.mjs.html +1 -1
  257. package/docs/getExcelU8ArrFromData.mjs.html +1 -1
  258. package/docs/getExcelU8ArrFromWorkbook.mjs.html +1 -1
  259. package/docs/getExcelWorkbookFromData.mjs.html +1 -1
  260. package/docs/getExcelWorkbookFromWorksheet.mjs.html +1 -1
  261. package/docs/getExcelWorksheetFromData.mjs.html +1 -1
  262. package/docs/getFileAccept.mjs.html +1 -1
  263. package/docs/getFileBasicHash.mjs.html +1 -1
  264. package/docs/getFileHash.mjs.html +1 -1
  265. package/docs/getFileName.mjs.html +1 -1
  266. package/docs/getFileNameExt.mjs.html +1 -1
  267. package/docs/getFileTrueName.mjs.html +1 -1
  268. package/docs/getFileType.mjs.html +38 -2
  269. package/docs/getFileXxHash.mjs.html +1 -1
  270. package/docs/getGlobal.mjs.html +1 -1
  271. package/docs/getObjSize.mjs.html +1 -1
  272. package/docs/getPathParent.mjs.html +1 -1
  273. package/docs/getTimeBetween.mjs.html +1 -1
  274. package/docs/getTimeFromUnit.mjs.html +1 -1
  275. package/docs/getTimeHp.mjs.html +1 -1
  276. package/docs/getTimeObject.mjs.html +1 -1
  277. package/docs/getTimeRange.mjs.html +1 -1
  278. package/docs/getUserAgent.mjs.html +1 -1
  279. package/docs/getUserAgentDyn.mjs.html +1 -1
  280. package/docs/getltdtkeys.mjs.html +1 -1
  281. package/docs/haskey.mjs.html +1 -1
  282. package/docs/html2str.mjs.html +1 -1
  283. package/docs/htmlDecode.mjs.html +1 -1
  284. package/docs/htmlEncode.mjs.html +1 -1
  285. package/docs/importResources.mjs.html +1 -1
  286. package/docs/index.html +1 -1
  287. package/docs/interp1.mjs.html +1 -1
  288. package/docs/isDate.mjs.html +1 -1
  289. package/docs/isDev.mjs.html +1 -1
  290. package/docs/isEle.mjs.html +1 -1
  291. package/docs/isEleExistByID.mjs.html +1 -1
  292. package/docs/isEmail.mjs.html +1 -1
  293. package/docs/isErr.mjs.html +1 -1
  294. package/docs/isIE.mjs.html +1 -1
  295. package/docs/isNarrow.mjs.html +1 -1
  296. package/docs/isStrHasCapital.mjs.html +1 -1
  297. package/docs/isStrHasLetter.mjs.html +1 -1
  298. package/docs/isStrHasLowerCase.mjs.html +1 -1
  299. package/docs/isStrHasNumber.mjs.html +1 -1
  300. package/docs/isStrHasSpace.mjs.html +1 -1
  301. package/docs/isStrHasSymbol.mjs.html +1 -1
  302. package/docs/isUserIdentify.mjs.html +1 -1
  303. package/docs/isUserName.mjs.html +1 -1
  304. package/docs/isUserPw.mjs.html +1 -1
  305. package/docs/isWindow.mjs.html +1 -1
  306. package/docs/isab.mjs.html +1 -1
  307. package/docs/isarr.mjs.html +1 -1
  308. package/docs/isarr0.mjs.html +1 -1
  309. package/docs/isbigint.mjs.html +1 -1
  310. package/docs/isblob.mjs.html +1 -1
  311. package/docs/isbol.mjs.html +1 -1
  312. package/docs/isday.mjs.html +1 -1
  313. package/docs/isearr.mjs.html +1 -1
  314. package/docs/iseobj.mjs.html +1 -1
  315. package/docs/iser.mjs.html +1 -1
  316. package/docs/isernot.mjs.html +1 -1
  317. package/docs/isestr.mjs.html +1 -1
  318. package/docs/isfile.mjs.html +1 -1
  319. package/docs/isfun.mjs.html +1 -1
  320. package/docs/isint.mjs.html +1 -1
  321. package/docs/ismonth.mjs.html +1 -1
  322. package/docs/isn0int.mjs.html +1 -1
  323. package/docs/isn0num.mjs.html +1 -1
  324. package/docs/isnan.mjs.html +1 -1
  325. package/docs/isnbr.mjs.html +1 -1
  326. package/docs/isnint.mjs.html +1 -1
  327. package/docs/isnnum.mjs.html +1 -1
  328. package/docs/isnull.mjs.html +1 -1
  329. package/docs/isnum.mjs.html +1 -1
  330. package/docs/isobj.mjs.html +1 -1
  331. package/docs/isobj0.mjs.html +1 -1
  332. package/docs/isp0int.mjs.html +1 -1
  333. package/docs/isp0num.mjs.html +1 -1
  334. package/docs/ispint.mjs.html +1 -1
  335. package/docs/ispm.mjs.html +1 -1
  336. package/docs/ispnum.mjs.html +1 -1
  337. package/docs/isstr.mjs.html +1 -1
  338. package/docs/isstr0.mjs.html +1 -1
  339. package/docs/istime.mjs.html +1 -1
  340. package/docs/istimeTZ.mjs.html +1 -1
  341. package/docs/istimems.mjs.html +1 -1
  342. package/docs/istimemsTZ.mjs.html +1 -1
  343. package/docs/isu16arr.mjs.html +1 -1
  344. package/docs/isu8arr.mjs.html +1 -1
  345. package/docs/isundefined.mjs.html +1 -1
  346. package/docs/j2o.mjs.html +1 -1
  347. package/docs/judge.mjs.html +1 -1
  348. package/docs/keysmat2ltdt.mjs.html +1 -1
  349. package/docs/ltdt2vrtsable.mjs.html +1 -1
  350. package/docs/ltdtDiff.mjs.html +1 -1
  351. package/docs/ltdtDiffByKey.mjs.html +1 -1
  352. package/docs/ltdtkeys2mat.mjs.html +1 -1
  353. package/docs/ltdtkeysheads2mat.mjs.html +1 -1
  354. package/docs/ltdtmapping.mjs.html +1 -1
  355. package/docs/ltdtmerge.mjs.html +1 -1
  356. package/docs/ltdtpick.mjs.html +1 -1
  357. package/docs/ltdtpull.mjs.html +1 -1
  358. package/docs/mat2ltdt.mjs.html +1 -1
  359. package/docs/matConcat.mjs.html +1 -1
  360. package/docs/matDiff.mjs.html +1 -1
  361. package/docs/matat.mjs.html +1 -1
  362. package/docs/now2str.mjs.html +1 -1
  363. package/docs/now2strp.mjs.html +1 -1
  364. package/docs/nowDay2str.mjs.html +1 -1
  365. package/docs/nowms2str.mjs.html +1 -1
  366. package/docs/nowms2strp.mjs.html +1 -1
  367. package/docs/o2j.mjs.html +1 -1
  368. package/docs/obj2b64.mjs.html +1 -1
  369. package/docs/obj2pb64.mjs.html +1 -1
  370. package/docs/obj2str.mjs.html +1 -1
  371. package/docs/obj2stru8arr.mjs.html +1 -1
  372. package/docs/obj2u8arr.mjs.html +1 -1
  373. package/docs/objSortBy.mjs.html +1 -1
  374. package/docs/objSortByKeys.mjs.html +1 -1
  375. package/docs/oo.mjs.html +1 -1
  376. package/docs/openLink.mjs.html +1 -1
  377. package/docs/pb642obj.mjs.html +1 -1
  378. package/docs/pmChain.mjs.html +1 -1
  379. package/docs/pmConvertResolve.mjs.html +1 -1
  380. package/docs/pmDebounce.mjs.html +1 -1
  381. package/docs/pmHook.mjs.html +1 -1
  382. package/docs/pmHookReject.mjs.html +1 -1
  383. package/docs/pmIni.mjs.html +1 -1
  384. package/docs/pmInvResolve.mjs.html +1 -1
  385. package/docs/pmKeyMutex.mjs.html +1 -1
  386. package/docs/pmMap.mjs.html +1 -1
  387. package/docs/pmQueue.mjs.html +1 -1
  388. package/docs/pmSeries.mjs.html +1 -1
  389. package/docs/pmThrottle.mjs.html +1 -1
  390. package/docs/preciseNum.mjs.html +1 -1
  391. package/docs/pseudoRandom.mjs.html +1 -1
  392. package/docs/pseudoRandomIntRange.mjs.html +1 -1
  393. package/docs/pseudoRandomIntsNdpRange.mjs.html +1 -1
  394. package/docs/pseudoRandomIntsRange.mjs.html +1 -1
  395. package/docs/pseudoRandomRange.mjs.html +1 -1
  396. package/docs/pseudoRandomsRange.mjs.html +1 -1
  397. package/docs/queue.mjs.html +1 -1
  398. package/docs/random.mjs.html +1 -1
  399. package/docs/randomIntRange.mjs.html +1 -1
  400. package/docs/randomIntsNdpRange.mjs.html +1 -1
  401. package/docs/randomIntsRange.mjs.html +1 -1
  402. package/docs/randomRange.mjs.html +1 -1
  403. package/docs/randomsRange.mjs.html +1 -1
  404. package/docs/rang.mjs.html +1 -1
  405. package/docs/rep.mjs.html +1 -1
  406. package/docs/repObj.mjs.html +1 -1
  407. package/docs/replace.mjs.html +1 -1
  408. package/docs/replaceObj.mjs.html +1 -1
  409. package/docs/replacePlus.mjs.html +1 -1
  410. package/docs/round.mjs.html +1 -1
  411. package/docs/secd.mjs.html +1 -1
  412. package/docs/sep.mjs.html +1 -1
  413. package/docs/sepInt.mjs.html +1 -1
  414. package/docs/setIntervalHp.mjs.html +1 -1
  415. package/docs/setTimeoutHp.mjs.html +1 -1
  416. package/docs/sind.mjs.html +1 -1
  417. package/docs/split.mjs.html +1 -1
  418. package/docs/str2aes.mjs.html +1 -1
  419. package/docs/str2b64.mjs.html +1 -1
  420. package/docs/str2hint.mjs.html +1 -1
  421. package/docs/str2md5.mjs.html +1 -1
  422. package/docs/str2obj.mjs.html +1 -1
  423. package/docs/str2sha512.mjs.html +1 -1
  424. package/docs/str2u8arr.mjs.html +1 -1
  425. package/docs/strCompare.mjs.html +1 -1
  426. package/docs/strDiff.mjs.html +1 -1
  427. package/docs/strDiffToHtml.mjs.html +1 -1
  428. package/docs/strFindFuzz.mjs.html +1 -1
  429. package/docs/strFindSimilar.mjs.html +1 -1
  430. package/docs/strdelleft.mjs.html +1 -1
  431. package/docs/strdelright.mjs.html +1 -1
  432. package/docs/strleft.mjs.html +1 -1
  433. package/docs/strmid.mjs.html +1 -1
  434. package/docs/strright.mjs.html +1 -1
  435. package/docs/stru8arr2obj.mjs.html +1 -1
  436. package/docs/tand.mjs.html +1 -1
  437. package/docs/time2day.mjs.html +1 -1
  438. package/docs/time2hour.mjs.html +1 -1
  439. package/docs/time2min.mjs.html +1 -1
  440. package/docs/timeTZ2day.mjs.html +1 -1
  441. package/docs/timeTZ2expire.mjs.html +1 -1
  442. package/docs/timeTZ2hour.mjs.html +1 -1
  443. package/docs/timeTZ2min.mjs.html +1 -1
  444. package/docs/timeTZ2past.mjs.html +1 -1
  445. package/docs/timems2day.mjs.html +1 -1
  446. package/docs/timems2hour.mjs.html +1 -1
  447. package/docs/timems2min.mjs.html +1 -1
  448. package/docs/timems2time.mjs.html +1 -1
  449. package/docs/timemsTZ2day.mjs.html +1 -1
  450. package/docs/timemsTZ2expire.mjs.html +1 -1
  451. package/docs/timemsTZ2hour.mjs.html +1 -1
  452. package/docs/timemsTZ2min.mjs.html +1 -1
  453. package/docs/timemsTZ2past.mjs.html +1 -1
  454. package/docs/timemsTZ2time.mjs.html +1 -1
  455. package/docs/treeObj.mjs.html +1 -1
  456. package/docs/treeToFilepath.mjs.html +1 -1
  457. package/docs/trim.mjs.html +1 -1
  458. package/docs/u16arr2b64.mjs.html +1 -1
  459. package/docs/u16arr2u8arr.mjs.html +1 -1
  460. package/docs/u8arr2ab.mjs.html +1 -1
  461. package/docs/u8arr2b64.mjs.html +1 -1
  462. package/docs/u8arr2blob.mjs.html +1 -1
  463. package/docs/u8arr2bs.mjs.html +1 -1
  464. package/docs/u8arr2obj.mjs.html +1 -1
  465. package/docs/u8arr2str.mjs.html +1 -1
  466. package/docs/u8arr2u16arr.mjs.html +1 -1
  467. package/docs/urlParse.mjs.html +1 -1
  468. package/docs/verifyValue.mjs.html +1 -1
  469. package/docs/waitFun.mjs.html +1 -1
  470. package/docs/wsemi.html +29 -8
  471. package/package.json +2 -2
  472. package/src/fsSyncFolder.mjs +23 -2
  473. package/src/fsSyncFolderCore.mjs +11 -2
  474. package/src/getFileType.mjs +37 -1
  475. package/test/fsSyncFolder.test.mjs +30 -1
  476. package/toolfp/dist/wsemip.umd.js +1 -1
  477. package/toolparfor/dist/wpf.umd.js +1 -1
  478. package/toolparfor/dist/wpf_pmSeries.umd.js +1 -1
package/dist/wsemi.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * wsemi v1.8.62
2
+ * wsemi v1.8.64
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
@@ -12,7 +12,7 @@
12
12
  * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
13
13
  * MIT Licence
14
14
  */
15
- var Bs,Es,Cs=9e15,xs=1e9,Ds="0123456789abcdef",Fs="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Qs="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ss={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Cs,maxE:Cs,crypto:!1},ks=!0,Ns="[DecimalError] ",qs=Ns+"Invalid argument: ",Ms=Ns+"Precision limit exceeded",Hs=Ns+"crypto unavailable",Ls="[object Decimal]",Us=Math.floor,Rs=Math.pow,Os=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ts=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ys=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,js=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Gs=1e7,Js=Fs.length-1,zs=Qs.length-1,Vs={toStringTag:Ls};function Ps(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(r=7-(n=e[t]+"").length)&&(o+=ic(r)),o+=n;(r=7-(n=(a=e[t])+"").length)&&(o+=ic(r))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function Xs(e,t,r){if(e!==~~e||e<t||e>r)throw Error(qs+e)}function _s(e,t,r,n){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=Rs(10,7-t),s=e[i]%o|0,null==n?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=r<4&&99999==s||r>3&&49999==s||5e4==s||0==s):a=(r<4&&s+1==o||r>3&&s+1==o/2)&&(e[i+1]/o/100|0)==Rs(10,t-2)-1||(s==o/2||0==s)&&!(e[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(n||r<4)&&9999==s||!n&&r>3&&4999==s):a=((n||r<4)&&s+1==o||!n&&r>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==Rs(10,t-3)-1,a}function Ws(e,t,r){for(var n,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=Ds.indexOf(e.charAt(a++)),n=0;n<o.length;n++)o[n]>r-1&&(void 0===o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}Vs.absoluteValue=Vs.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),$s(e)},Vs.ceil=function(){return $s(new this.constructor(this),this.e+1,2)},Vs.clampedTo=Vs.clamp=function(e,t){var r=this,n=r.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(qs+t);return r.cmp(e)<0?e:r.cmp(t)>0?t:new n(r)},Vs.comparedTo=Vs.cmp=function(e){var t,r,n,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,c=o.s,l=e.s;if(!a||!s)return c&&l?c!==l?c:a===s?0:!a^c<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?c:s[0]?-l:0;if(c!==l)return c;if(o.e!==e.e)return o.e>e.e^c<0?1:-1;for(t=0,r=(n=a.length)<(i=s.length)?n:i;t<r;++t)if(a[t]!==s[t])return a[t]>s[t]^c<0?1:-1;return n===i?0:n>i^c<0?1:-1},Vs.cosine=Vs.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?i=(1/pc(4,r=Math.ceil(n/3))).toString():(r=16,i="2.3283064365386962890625e-10");e.precision+=r,t=gc(e,1,t.times(i),new e(1));for(var o=r;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}(n,hc(n,r)),n.precision=e,n.rounding=t,$s(2==Es||3==Es?r.neg():r,e,t,!0)):new n(1):new n(NaN)},Vs.cubeRoot=Vs.cbrt=function(){var e,t,r,n,i,o,a,s,c,l,u=this,f=u.constructor;if(!u.isFinite()||u.isZero())return new f(u);for(ks=!1,(o=u.s*Rs(u.s*u,1/3))&&Math.abs(o)!=1/0?n=new f(o.toString()):(r=Ps(u.d),(o=((e=u.e)-r.length+1)%3)&&(r+=1==o||-2==o?"0":"00"),o=Rs(r,1/3),e=Us((e+1)/3)-(e%3==(e<0?-1:2)),(n=new f(r=o==1/0?"5e"+e:(r=o.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=u.s),a=(e=f.precision)+3;;)if(l=(c=(s=n).times(s).times(s)).plus(u),n=Ks(l.plus(u).times(s),l.plus(c),a+2,1),Ps(s.d).slice(0,a)===(r=Ps(n.d)).slice(0,a)){if("9999"!=(r=r.slice(a-3,a+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||($s(n,e+1,1),t=!n.times(n).times(n).eq(u));break}if(!i&&($s(s,e+1,0),s.times(s).times(s).eq(u))){n=s;break}a+=4,i=1}return ks=!0,$s(n,e,f.rounding,t)},Vs.decimalPlaces=Vs.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=7*((e=t.length-1)-Us(this.e/7)),e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},Vs.dividedBy=Vs.div=function(e){return Ks(this,new this.constructor(e))},Vs.dividedToIntegerBy=Vs.divToInt=function(e){var t=this.constructor;return $s(Ks(this,new t(e),0,1,1),t.precision,t.rounding)},Vs.equals=Vs.eq=function(e){return 0===this.cmp(e)},Vs.floor=function(){return $s(new this.constructor(this),this.e+1,3)},Vs.greaterThan=Vs.gt=function(e){return this.cmp(e)>0},Vs.greaterThanOrEqualTo=Vs.gte=function(e){var t=this.cmp(e);return 1==t||0===t},Vs.hyperbolicCosine=Vs.cosh=function(){var e,t,r,n,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;r=a.precision,n=a.rounding,a.precision=r+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/pc(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=gc(a,1,o.times(t),new a(1),!0);for(var c,l=e,u=new a(8);l--;)c=o.times(o),o=s.minus(c.times(u.minus(c.times(u))));return $s(o,a.precision=r,a.rounding=n,!0)},Vs.hyperbolicSine=Vs.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(n=i.d.length)<3)i=gc(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=gc(o,2,i=i.times(1/pc(5,e)),i,!0);for(var a,s=new o(5),c=new o(16),l=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(c.times(a).plus(l))))}return o.precision=t,o.rounding=r,$s(i,t,r,!0)},Vs.hyperbolicTangent=Vs.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,Ks(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},Vs.inverseCosine=Vs.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return-1!==r?0===r?e.isNeg()?rc(t,n,i):new t(0):new t(NaN):e.isZero()?rc(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))},Vs.inverseHyperbolicCosine=Vs.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,ks=!1,r=r.times(r).minus(1).sqrt().plus(r),ks=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},Vs.inverseHyperbolicSine=Vs.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,ks=!1,r=r.times(r).plus(1).sqrt().plus(r),ks=!0,n.precision=e,n.rounding=t,r.ln())},Vs.inverseHyperbolicTangent=Vs.atanh=function(){var e,t,r,n,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,n=i.sd(),Math.max(n,e)<2*-i.e-1?$s(new o(i),e,t,!0):(o.precision=r=n-i.e,i=Ks(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},Vs.inverseSine=Vs.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,-1!==t?0===t?((e=rc(o,r+4,n).times(.5)).s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))},Vs.inverseTangent=Vs.atan=function(){var e,t,r,n,i,o,a,s,c,l=this,u=l.constructor,f=u.precision,d=u.rounding;if(l.isFinite()){if(l.isZero())return new u(l);if(l.abs().eq(1)&&f+4<=zs)return(a=rc(u,f+4,d).times(.25)).s=l.s,a}else{if(!l.s)return new u(NaN);if(f+4<=zs)return(a=rc(u,f+4,d).times(.5)).s=l.s,a}for(u.precision=s=f+10,u.rounding=1,e=r=Math.min(28,s/7+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(ks=!1,t=Math.ceil(s/7),n=1,c=l.times(l),a=new u(l),i=l;-1!==e;)if(i=i.times(c),o=a.minus(i.div(n+=2)),i=i.times(c),void 0!==(a=o.plus(i.div(n+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return r&&(a=a.times(2<<r-1)),ks=!0,$s(a,u.precision=f,u.rounding=d,!0)},Vs.isFinite=function(){return!!this.d},Vs.isInteger=Vs.isInt=function(){return!!this.d&&Us(this.e/7)>this.d.length-2},Vs.isNaN=function(){return!this.s},Vs.isNegative=Vs.isNeg=function(){return this.s<0},Vs.isPositive=Vs.isPos=function(){return this.s>0},Vs.isZero=function(){return!!this.d&&0===this.d[0]},Vs.lessThan=Vs.lt=function(e){return this.cmp(e)<0},Vs.lessThanOrEqualTo=Vs.lte=function(e){return this.cmp(e)<1},Vs.logarithm=Vs.log=function(e){var t,r,n,i,o,a,s,c,l=this,u=l.constructor,f=u.precision,d=u.rounding;if(null==e)e=new u(10),t=!0;else{if(r=(e=new u(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new u(r&&!r[0]?-1/0:1!=l.s?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10==0;)i/=10;o=1!==i}if(ks=!1,a=lc(l,s=f+5),n=t?tc(u,s+10):lc(e,s),_s((c=Ks(a,n,s,1)).d,i=f,d))do{if(a=lc(l,s+=10),n=t?tc(u,s+10):lc(e,s),c=Ks(a,n,s,1),!o){+Ps(c.d).slice(i+1,i+15)+1==1e14&&(c=$s(c,f+1,0));break}}while(_s(c.d,i+=10,d));return ks=!0,$s(c,f,d)},Vs.minus=Vs.sub=function(e){var t,r,n,i,o,a,s,c,l,u,f,d,g=this,p=g.constructor;if(e=new p(e),!g.d||!e.d)return g.s&&e.s?g.d?e.s=-e.s:e=new p(e.d||g.s!==e.s?g:NaN):e=new p(NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(l=g.d,d=e.d,s=p.precision,c=p.rounding,!l[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!l[0])return new p(3===c?-0:0);e=new p(g)}return ks?$s(e,s,c):e}if(r=Us(e.e/7),u=Us(g.e/7),l=l.slice(),o=u-r){for((f=o<0)?(t=l,o=-o,a=d.length):(t=d,r=u,a=l.length),o>(n=Math.max(Math.ceil(s/7),a)+2)&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for((f=(n=l.length)<(a=d.length))&&(a=n),n=0;n<a;n++)if(l[n]!=d[n]){f=l[n]<d[n];break}o=0}for(f&&(t=l,l=d,d=t,e.s=-e.s),a=l.length,n=d.length-a;n>0;--n)l[a++]=0;for(n=d.length;n>o;){if(l[--n]<d[n]){for(i=n;i&&0===l[--i];)l[i]=Gs-1;--l[i],l[n]+=Gs}l[n]-=d[n]}for(;0===l[--a];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(e.d=l,e.e=ec(l,r),ks?$s(e,s,c):e):new p(3===c?-0:0)},Vs.modulo=Vs.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?$s(new n(r),n.precision,n.rounding):(ks=!1,9==n.modulo?(t=Ks(r,e.abs(),0,3,1)).s*=e.s:t=Ks(r,e,0,n.modulo,1),t=t.times(e),ks=!0,r.minus(t))},Vs.naturalExponential=Vs.exp=function(){return cc(this)},Vs.naturalLogarithm=Vs.ln=function(){return lc(this)},Vs.negated=Vs.neg=function(){var e=new this.constructor(this);return e.s=-e.s,$s(e)},Vs.plus=Vs.add=function(e){var t,r,n,i,o,a,s,c,l,u,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new d(e.d||f.s===e.s?f:NaN)):e=new d(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(l=f.d,u=e.d,s=d.precision,c=d.rounding,!l[0]||!u[0])return u[0]||(e=new d(f)),ks?$s(e,s,c):e;if(o=Us(f.e/7),n=Us(e.e/7),l=l.slice(),i=o-n){for(i<0?(r=l,i=-i,a=u.length):(r=u,n=o,a=l.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((a=l.length)-(i=u.length)<0&&(i=a,r=u,u=l,l=r),t=0;i;)t=(l[--i]=l[i]+u[i]+t)/Gs|0,l[i]%=Gs;for(t&&(l.unshift(t),++n),a=l.length;0==l[--a];)l.pop();return e.d=l,e.e=ec(l,n),ks?$s(e,s,c):e},Vs.precision=Vs.sd=function(e){var t,r=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(qs+e);return r.d?(t=nc(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},Vs.round=function(){var e=this,t=e.constructor;return $s(new t(e),e.e+1,t.rounding)},Vs.sine=Vs.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:gc(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=t.times(1/pc(5,r)),t=gc(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(n,hc(n,r)),n.precision=e,n.rounding=t,$s(Es>2?r.neg():r,e,t,!0)):new n(NaN)},Vs.squareRoot=Vs.sqrt=function(){var e,t,r,n,i,o,a=this,s=a.d,c=a.e,l=a.s,u=a.constructor;if(1!==l||!s||!s[0])return new u(!l||l<0&&(!s||s[0])?NaN:s?a:1/0);for(ks=!1,0==(l=Math.sqrt(+a))||l==1/0?(((t=Ps(s)).length+c)%2==0&&(t+="0"),l=Math.sqrt(t),c=Us((c+1)/2)-(c<0||c%2),n=new u(t=l==1/0?"5e"+c:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new u(l.toString()),r=(c=u.precision)+3;;)if(n=(o=n).plus(Ks(a,o,r+2,1)).times(.5),Ps(o.d).slice(0,r)===(t=Ps(n.d)).slice(0,r)){if("9999"!=(t=t.slice(r-3,r+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||($s(n,c+1,1),e=!n.times(n).eq(a));break}if(!i&&($s(o,c+1,0),o.times(o).eq(a))){n=o;break}r+=4,i=1}return ks=!0,$s(n,c,u.rounding,e)},Vs.tangent=Vs.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=Ks(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,$s(2==Es||4==Es?r.neg():r,e,t,!0)):new n(NaN)},Vs.times=Vs.mul=function(e){var t,r,n,i,o,a,s,c,l,u=this,f=u.constructor,d=u.d,g=(e=new f(e)).d;if(e.s*=u.s,!(d&&d[0]&&g&&g[0]))return new f(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:d&&g?0*e.s:e.s/0);for(r=Us(u.e/7)+Us(e.e/7),(c=d.length)<(l=g.length)&&(o=d,d=g,g=o,a=c,c=l,l=a),o=[],n=a=c+l;n--;)o.push(0);for(n=l;--n>=0;){for(t=0,i=c+n;i>n;)s=o[i]+g[n]*d[i-n-1]+t,o[i--]=s%Gs|0,t=s/Gs|0;o[i]=(o[i]+t)%Gs|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=ec(o,r),ks?$s(e,f.precision,f.rounding):e},Vs.toBinary=function(e,t){return Ac(this,2,e,t)},Vs.toDecimalPlaces=Vs.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(Xs(e,0,xs),void 0===t?t=n.rounding:Xs(t,0,8),$s(r,e+r.e+1,t))},Vs.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=Zs(n,!0):(Xs(e,0,xs),void 0===t?t=i.rounding:Xs(t,0,8),r=Zs(n=$s(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},Vs.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return void 0===e?r=Zs(i):(Xs(e,0,xs),void 0===t?t=o.rounding:Xs(t,0,8),r=Zs(n=$s(new o(i),e+i.e+1,t),!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r},Vs.toFraction=function(e){var t,r,n,i,o,a,s,c,l,u,f,d,g=this,p=g.d,h=g.constructor;if(!p)return new h(g);if(l=r=new h(1),n=c=new h(0),a=(o=(t=new h(n)).e=nc(p)-g.e-1)%7,t.d[0]=Rs(10,a<0?7+a:a),null==e)e=o>0?t:l;else{if(!(s=new h(e)).isInt()||s.lt(l))throw Error(qs+s);e=s.gt(t)?o>0?t:l:s}for(ks=!1,s=new h(Ps(p)),u=h.precision,h.precision=o=7*p.length*2;f=Ks(s,t,0,1,1),1!=(i=r.plus(f.times(n))).cmp(e);)r=n,n=i,i=l,l=c.plus(f.times(i)),c=i,i=t,t=s.minus(f.times(i)),s=i;return i=Ks(e.minus(r),n,0,1,1),c=c.plus(i.times(l)),r=r.plus(i.times(n)),c.s=l.s=g.s,d=Ks(l,n,o,1).minus(g).abs().cmp(Ks(c,r,o,1).minus(g).abs())<1?[l,n]:[c,r],h.precision=u,ks=!0,d},Vs.toHexadecimal=Vs.toHex=function(e,t){return Ac(this,16,e,t)},Vs.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:Xs(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(ks=!1,r=Ks(r,e,0,t,1).times(e),ks=!0,$s(r)):(e.s=r.s,r=e),r},Vs.toNumber=function(){return+this},Vs.toOctal=function(e,t){return Ac(this,8,e,t)},Vs.toPower=Vs.pow=function(e){var t,r,n,i,o,a,s=this,c=s.constructor,l=+(e=new c(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new c(Rs(+s,l));if((s=new c(s)).eq(1))return s;if(n=c.precision,o=c.rounding,e.eq(1))return $s(s,n,o);if((t=Us(e.e/7))>=e.d.length-1&&(r=l<0?-l:l)<=9007199254740991)return i=oc(c,s,r,n),e.s<0?new c(1).div(i):$s(i,n,o);if((a=s.s)<0){if(t<e.d.length-1)return new c(NaN);if(1&e.d[t]||(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(r=Rs(+s,l))&&isFinite(r)?new c(r+"").e:Us(l*(Math.log("0."+Ps(s.d))/Math.LN10+s.e+1)))>c.maxE+1||t<c.minE-1?new c(t>0?a/0:0):(ks=!1,c.rounding=s.s=1,r=Math.min(12,(t+"").length),(i=cc(e.times(lc(s,n+r)),n)).d&&_s((i=$s(i,n+5,1)).d,n,o)&&(t=n+10,+Ps((i=$s(cc(e.times(lc(s,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=$s(i,n+1,0))),i.s=a,ks=!0,c.rounding=o,$s(i,n,o))},Vs.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=Zs(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(Xs(e,1,xs),void 0===t?t=i.rounding:Xs(t,0,8),r=Zs(n=$s(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},Vs.toSignificantDigits=Vs.toSD=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(Xs(e,1,xs),void 0===t?t=r.rounding:Xs(t,0,8)),$s(new r(this),e,t)},Vs.toString=function(){var e=this,t=e.constructor,r=Zs(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},Vs.truncated=Vs.trunc=function(){return $s(new this.constructor(this),this.e+1,1)},Vs.valueOf=Vs.toJSON=function(){var e=this,t=e.constructor,r=Zs(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var Ks=function(){function e(e,t,r){var n,i=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+i,e[o]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,o,a,s,c){var l,u,f,d,g,p,h,A,m,I,y,v,b,w,B,E,C,x,D,F,Q=n.constructor,S=n.s==i.s?1:-1,k=n.d,N=i.d;if(!(k&&k[0]&&N&&N[0]))return new Q(n.s&&i.s&&(k?!N||k[0]!=N[0]:N)?k&&0==k[0]||!N?0*S:S/0:NaN);for(c?(g=1,u=n.e-i.e):(c=Gs,g=7,u=Us(n.e/g)-Us(i.e/g)),D=N.length,C=k.length,I=(m=new Q(S)).d=[],f=0;N[f]==(k[f]||0);f++);if(N[f]>(k[f]||0)&&u--,null==o?(w=o=Q.precision,a=Q.rounding):w=s?o+(n.e-i.e)+1:o,w<0)I.push(1),p=!0;else{if(w=w/g+2|0,f=0,1==D){for(d=0,N=N[0],w++;(f<C||d)&&w--;f++)B=d*c+(k[f]||0),I[f]=B/N|0,d=B%N|0;p=d||f<C}else{for((d=c/(N[0]+1)|0)>1&&(N=e(N,d,c),k=e(k,d,c),D=N.length,C=k.length),E=D,v=(y=k.slice(0,D)).length;v<D;)y[v++]=0;(F=N.slice()).unshift(0),x=N[0],N[1]>=c/2&&++x;do{d=0,(l=t(N,y,D,v))<0?(b=y[0],D!=v&&(b=b*c+(y[1]||0)),(d=b/x|0)>1?(d>=c&&(d=c-1),1==(l=t(h=e(N,d,c),y,A=h.length,v=y.length))&&(d--,r(h,D<A?F:N,A,c))):(0==d&&(l=d=1),h=N.slice()),(A=h.length)<v&&h.unshift(0),r(y,h,v,c),-1==l&&(l=t(N,y,D,v=y.length))<1&&(d++,r(y,D<v?F:N,v,c)),v=y.length):0===l&&(d++,y=[0]),I[f++]=d,l&&y[0]?y[v++]=k[E]||0:(y=[k[E]],v=1)}while((E++<C||void 0!==y[0])&&w--);p=void 0!==y[0]}I[0]||I.shift()}if(1==g)m.e=u,Bs=p;else{for(f=1,d=I[0];d>=10;d/=10)f++;m.e=f+u*g-1,$s(m,s?o+m.e+1:o,a,p)}return m}}();function $s(e,t,r,n){var i,o,a,s,c,l,u,f,d,g=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,s=f[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,c=(u=f[d=0])/Rs(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=f.length)){if(!n)break e;for(;s++<=d;)f.push(0);u=c=0,i=1,a=(o%=7)-7+1}else{for(u=s=f[d],i=1;s>=10;s/=10)i++;c=(a=(o%=7)-7+i)<0?0:u/Rs(10,i-a-1)%10|0}if(n=n||t<0||void 0!==f[d+1]||(a<0?u:u%Rs(10,i-a-1)),l=r<4?(c||n)&&(0==r||r==(e.s<0?3:2)):c>5||5==c&&(4==r||n||6==r&&(o>0?a>0?u/Rs(10,i-a):0:f[d-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,l?(t-=e.e+1,f[0]=Rs(10,(7-t%7)%7),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=d,s=1,d--):(f.length=d+1,s=Rs(10,7-o),f[d]=a>0?(u/Rs(10,i-a)%Rs(10,a)|0)*s:0),l)for(;;){if(0==d){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,f[0]==Gs&&(f[0]=1));break}if(f[d]+=s,f[d]!=Gs)break;f[d--]=0,s=1}for(o=f.length;0===f[--o];)f.pop()}return ks&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e<g.minE&&(e.e=0,e.d=[0])),e}function Zs(e,t,r){if(!e.isFinite())return uc(e);var n,i=e.e,o=Ps(e.d),a=o.length;return t?(r&&(n=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+ic(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ic(-i-1)+o,r&&(n=r-a)>0&&(o+=ic(n))):i>=a?(o+=ic(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+ic(n))):((n=i+1)<a&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(o+="."),o+=ic(n))),o}function ec(e,t){var r=e[0];for(t*=7;r>=10;r/=10)t++;return t}function tc(e,t,r){if(t>Js)throw ks=!0,r&&(e.precision=r),Error(Ms);return $s(new e(Fs),t,1,!0)}function rc(e,t,r){if(t>zs)throw Error(Ms);return $s(new e(Qs),t,r,!0)}function nc(e){var t=e.length-1,r=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ic(e){for(var t="";e--;)t+="0";return t}function oc(e,t,r,n){var i,o=new e(1),a=Math.ceil(n/7+4);for(ks=!1;;){if(r%2&&mc((o=o.times(t)).d,a)&&(i=!0),0===(r=Us(r/2))){r=o.d.length-1,i&&0===o.d[r]&&++o.d[r];break}mc((t=t.times(t)).d,a)}return ks=!0,o}function ac(e){return 1&e.d[e.d.length-1]}function sc(e,t,r){for(var n,i,o=new e(t[0]),a=0;++a<t.length;){if(!(i=new e(t[a])).s){o=i;break}((n=o.cmp(i))===r||0===n&&o.s===r)&&(o=i)}return o}function cc(e,t){var r,n,i,o,a,s,c,l=0,u=0,f=0,d=e.constructor,g=d.rounding,p=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(ks=!1,c=p):c=t,s=new d(.03125);e.e>-2;)e=e.times(s),f+=5;for(c+=n=Math.log(Rs(2,f))/Math.LN10*2+5|0,r=o=a=new d(1),d.precision=c;;){if(o=$s(o.times(e),c,1),r=r.times(++u),Ps((s=a.plus(Ks(o,r,c,1))).d).slice(0,c)===Ps(a.d).slice(0,c)){for(i=f;i--;)a=$s(a.times(a),c,1);if(null!=t)return d.precision=p,a;if(!(l<3&&_s(a.d,c-n,g,l)))return $s(a,d.precision=p,g,ks=!0);d.precision=c+=10,r=o=s=new d(1),u=0,l++}a=s}}function lc(e,t){var r,n,i,o,a,s,c,l,u,f,d,g=1,p=e,h=p.d,A=p.constructor,m=A.rounding,I=A.precision;if(p.s<0||!h||!h[0]||!p.e&&1==h[0]&&1==h.length)return new A(h&&!h[0]?-1/0:1!=p.s?NaN:h?0:p);if(null==t?(ks=!1,u=I):u=t,A.precision=u+=10,n=(r=Ps(h)).charAt(0),!(Math.abs(o=p.e)<15e14))return l=tc(A,u+2,I).times(o+""),p=lc(new A(n+"."+r.slice(1)),u-10).plus(l),A.precision=I,null==t?$s(p,I,m,ks=!0):p;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=Ps((p=p.times(e)).d)).charAt(0),g++;for(o=p.e,n>1?(p=new A("0."+r),o++):p=new A(n+"."+r.slice(1)),f=p,c=a=p=Ks(p.minus(1),p.plus(1),u,1),d=$s(p.times(p),u,1),i=3;;){if(a=$s(a.times(d),u,1),Ps((l=c.plus(Ks(a,new A(i),u,1))).d).slice(0,u)===Ps(c.d).slice(0,u)){if(c=c.times(2),0!==o&&(c=c.plus(tc(A,u+2,I).times(o+""))),c=Ks(c,new A(g),u,1),null!=t)return A.precision=I,c;if(!_s(c.d,u-10,m,s))return $s(c,A.precision=I,m,ks=!0);A.precision=u+=10,l=a=p=Ks(f.minus(1),f.plus(1),u,1),d=$s(p.times(p),u,1),i=s=1}c=l,i+=2}}function uc(e){return String(e.s*e.s/0)}function fc(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%7,r<0&&(n+=7),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),ks&&(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 dc(e,t){var r,n,i,o,a,s,c,l,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),js.test(t))return fc(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ts.test(t))r=16,t=t.toLowerCase();else if(Os.test(t))r=2;else{if(!Ys.test(t))throw Error(qs+t);r=8}for((o=t.search(/p/i))>0?(c=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,n=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=oc(n,new n(r),o,2*o)),o=u=(l=Ws(t,r,Gs)).length-1;0===l[o];--o)l.pop();return o<0?new n(0*e.s):(e.e=ec(l,u),e.d=l,ks=!1,a&&(e=Ks(e,i,4*s)),c&&(e=e.times(Math.abs(c)<54?Rs(2,c):il.pow(2,c))),ks=!0,e)}function gc(e,t,r,n,i){var o,a,s,c,l=e.precision,u=Math.ceil(l/7);for(ks=!1,c=r.times(r),s=new e(n);;){if(a=Ks(s.times(c),new e(t++*t++),l,1),s=i?n.plus(a):n.minus(a),n=Ks(a.times(c),new e(t++*t++),l,1),void 0!==(a=s.plus(n)).d[u]){for(o=u;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=n,n=a,a=o}return ks=!0,a.d.length=u+1,a}function pc(e,t){for(var r=e;--t;)r*=e;return r}function hc(e,t){var r,n=t.s<0,i=rc(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return Es=n?4:1,t;if((r=t.divToInt(i)).isZero())Es=n?3:2;else{if((t=t.minus(r.times(i))).lte(o))return Es=ac(r)?n?2:3:n?4:1,t;Es=ac(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Ac(e,t,r,n){var i,o,a,s,c,l,u,f,d,g=e.constructor,p=void 0!==r;if(p?(Xs(r,1,xs),void 0===n?n=g.rounding:Xs(n,0,8)):(r=g.precision,n=g.rounding),e.isFinite()){for(p?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,(a=(u=Zs(e)).indexOf("."))>=0&&(u=u.replace(".",""),(d=new g(1)).e=u.length-a,d.d=Ws(Zs(d),10,i),d.e=d.d.length),o=c=(f=Ws(u,10,i)).length;0==f[--c];)f.pop();if(f[0]){if(a<0?o--:((e=new g(e)).d=f,e.e=o,f=(e=Ks(e,d,r,n,0,i)).d,o=e.e,l=Bs),a=f[r],s=i/2,l=l||void 0!==f[r+1],l=n<4?(void 0!==a||l)&&(0===n||n===(e.s<0?3:2)):a>s||a===s&&(4===n||l||6===n&&1&f[r-1]||n===(e.s<0?8:7)),f.length=r,l)for(;++f[--r]>i-1;)f[r]=0,r||(++o,f.unshift(1));for(c=f.length;!f[c-1];--c);for(a=0,u="";a<c;a++)u+=Ds.charAt(f[a]);if(p){if(c>1)if(16==t||8==t){for(a=16==t?4:3,--c;c%a;c++)u+="0";for(c=(f=Ws(u,i,t)).length;!f[c-1];--c);for(a=1,u="1.";a<c;a++)u+=Ds.charAt(f[a])}else u=u.charAt(0)+"."+u.slice(1);u=u+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)u="0"+u;u="0."+u}else if(++o>c)for(o-=c;o--;)u+="0";else o<c&&(u=u.slice(0,o)+"."+u.slice(o))}else u=p?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=uc(e);return e.s<0?"-"+u:u}function mc(e,t){if(e.length>t)return e.length=t,!0}function Ic(e){return new this(e).abs()}function yc(e){return new this(e).acos()}function vc(e){return new this(e).acosh()}function bc(e,t){return new this(e).plus(t)}function wc(e){return new this(e).asin()}function Bc(e){return new this(e).asinh()}function Ec(e){return new this(e).atan()}function Cc(e){return new this(e).atanh()}function xc(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?rc(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=rc(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,r=this.atan(Ks(e,t,o,1)),t=rc(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(Ks(e,t,o,1)):(r=rc(this,o,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function Dc(e){return new this(e).cbrt()}function Fc(e){return $s(e=new this(e),e.e+1,2)}function Qc(e,t,r){return new this(e).clamp(t,r)}function Sc(e){if(!e||"object"!=typeof e)throw Error(Ns+"Object expected");var t,r,n,i=!0===e.defaults,o=["precision",1,xs,"rounding",0,8,"toExpNeg",-Cs,0,"toExpPos",0,Cs,"maxE",0,Cs,"minE",-Cs,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],i&&(this[r]=Ss[r]),void 0!==(n=e[r])){if(!(Us(n)===n&&n>=o[t+1]&&n<=o[t+2]))throw Error(qs+r+": "+n);this[r]=n}if(r="crypto",i&&(this[r]=Ss[r]),void 0!==(n=e[r])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(qs+r+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Hs);this[r]=!0}else this[r]=!1}return this}function kc(e){return new this(e).cos()}function Nc(e){return new this(e).cosh()}function qc(e,t){return new this(e).div(t)}function Mc(e){return new this(e).exp()}function Hc(e){return $s(e=new this(e),e.e+1,3)}function Lc(){var e,t,r=new this(0);for(ks=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return ks=!0,new this(1/0);r=t}return ks=!0,r.sqrt()}function Uc(e){return e instanceof il||e&&e.toStringTag===Ls||!1}function Rc(e){return new this(e).ln()}function Oc(e,t){return new this(e).log(t)}function Tc(e){return new this(e).log(2)}function Yc(e){return new this(e).log(10)}function jc(){return sc(this,arguments,-1)}function Gc(){return sc(this,arguments,1)}function Jc(e,t){return new this(e).mod(t)}function zc(e,t){return new this(e).mul(t)}function Vc(e,t){return new this(e).pow(t)}function Pc(e){var t,r,n,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:Xs(e,1,xs),n=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));o<n;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(Hs);for(t=crypto.randomBytes(n*=4);o<n;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=n/4}else for(;o<n;)s[o++]=1e7*Math.random()|0;for(e%=7,(n=s[--o])&&e&&(i=Rs(10,7-e),s[o]=(n/i|0)*i);0===s[o];o--)s.pop();if(o<0)r=0,s=[0];else{for(r=-1;0===s[0];r-=7)s.shift();for(n=1,i=s[0];i>=10;i/=10)n++;n<7&&(r-=7-n)}return a.e=r,a.d=s,a}function Xc(e){return $s(e=new this(e),e.e+1,this.rounding)}function _c(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Wc(e){return new this(e).sin()}function Kc(e){return new this(e).sinh()}function $c(e){return new this(e).sqrt()}function Zc(e,t){return new this(e).sub(t)}function el(){var e=0,t=arguments,r=new this(t[e]);for(ks=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return ks=!0,$s(r,this.precision,this.rounding)}function tl(e){return new this(e).tan()}function rl(e){return new this(e).tanh()}function nl(e){return $s(e=new this(e),e.e+1,1)}Vs[Symbol.for("nodejs.util.inspect.custom")]=Vs.toString,Vs[Symbol.toStringTag]="Decimal";var il=Vs.constructor=function e(t){var r,n,i;function o(e){var t,r,n,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,Uc(e))return i.s=e.s,void(ks?!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"===(n=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,r=e;r>=10;r/=10)t++;return void(ks?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)):fc(i,e.toString())}if("string"===n)return 45===(r=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===r&&(e=e.slice(1)),i.s=1),js.test(e)?fc(i,e):dc(i,e);if("bigint"===n)return e<0?(e=-e,i.s=-1):i.s=1,fc(i,e.toString());throw Error(qs+e)}if(o.prototype=Vs,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=Sc,o.clone=e,o.isDecimal=Uc,o.abs=Ic,o.acos=yc,o.acosh=vc,o.add=bc,o.asin=wc,o.asinh=Bc,o.atan=Ec,o.atanh=Cc,o.atan2=xc,o.cbrt=Dc,o.ceil=Fc,o.clamp=Qc,o.cos=kc,o.cosh=Nc,o.div=qc,o.exp=Mc,o.floor=Hc,o.hypot=Lc,o.ln=Rc,o.log=Oc,o.log10=Yc,o.log2=Tc,o.max=jc,o.min=Gc,o.mod=Jc,o.mul=zc,o.pow=Vc,o.random=Pc,o.round=Xc,o.sign=_c,o.sin=Wc,o.sinh=Kc,o.sqrt=$c,o.sub=Zc,o.sum=el,o.tan=tl,o.tanh=rl,o.trunc=nl,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;r<i.length;)t.hasOwnProperty(n=i[r++])||(t[n]=this[n]);return o.config(t),o}(Ss);function ol(e,t=0){if(Bo(t)||(t=0),t=Zi(t),!Se(e))return"";return new il(e).toDecimalPlaces(t,il.ROUND_CEIL).toNumber()}function al(e,t=0){if(!Se(e))return"";if(!Bo(t))return"";return e=Mn(e),$i(e,t).toFixed(t)}function sl(e){let t=function(){let e=yn();return n||e.xss}();let r=function e(r){return Ce(r)||Be(r)?(Er(r,function(t,n){r[n]=e(t)}),r):De(r)?t(r,{onIgnoreTagAttr:function(e,r,n,i){if("style"===r)return r+'="'+t.escapeAttrValue(n)+'"'}}):r}(zi(e));return r}function cl(e,t){let r=ns();if(!Ce(e)&&!Be(e))return r.reject("rs is not an array or object"),r;let n=!1;if(Be(e)){n=!0;let t=[];Er(e,(e,r)=>{t.push({k:r,v:e})}),e=t}va(t)||(t=function(e){return e});let i=-1,o=[];return e.reduce(function(e,r){return e.then(function(e){o.push(e),i+=1;let a=i,s=r;return n&&(a=r.k,s=r.v),va(t)?t(s,a):s})},Promise.resolve()).then(function(e){o.push(e),o=ja(o),r.resolve(o)}).catch(function(e){r.reject(e)}),r}Fs=new il(Fs),Qs=new il(Qs);let ll={},ul={};function fl({tagName:e,path:t,attributes:r={},func:n}){let i=ns();if("done"===ll[t])return i.resolve("loaded"),i;if("loading"===ll[t])return vs(()=>"done"===ll[t]).then(function(){i.resolve("loaded")}),i;ll[t]="loading";let o=document.createElement(e);return Er(r,(e,t)=>{o.setAttribute(t,e)}),r.rel&&"stylesheet"===r.rel?(o.setAttribute("href",t),setTimeout(()=>{i.resolve(o),ll[t]="done"},1)):(o.src=t,o.addEventListener("load",()=>{let e;va(n)?e=vs(n):(e=ns(),e.resolve()),e.then(()=>bs(500)).then(function(){i.resolve(o),ll[t]="done"})}),o.addEventListener("error",()=>{i.reject(o),ll[t]="done"})),document.getElementsByTagName("head")[0].appendChild(o),i}function dl(e){let t=ns();Ce(e)||(e=[e]),Er(e,(t,r)=>{xe(t)&&(e[r]={path:t})});let r=xo(xr(e,"path"),"|");return"done"===ul[r]?(t.resolve("loaded"),t):"loading"===ul[r]?(vs(()=>"done"===ul[r]).then(function(){t.resolve("loaded")}),t):(ul[r]="loading",Er(e,(e,t)=>{e.type||(".js"===fa(e.path,3)?e.type="js":".css"===fa(e.path,4)?e.type="css":e.type="unknow")}),cl(e,e=>{let t=ns();if("js"===e.type)t=fl({tagName:"script",path:e.path,attributes:{type:"text/javascript"},func:e.func});else if("css"===e.type)t=fl({tagName:"link",path:e.path,attributes:{rel:"stylesheet"}});else{let r="invalid pathItem.type: "+e.type;console.log(r),t.reject(r)}return t}).finally(()=>{ul[r]="done"}))}function gl(e){return Ie(e).toUpperCase()}function pl(e,t,r){if(!De(e))return"";if(!De(t))return"";if(!xe(r))return"";return String(e).replaceAll(t,r)}function hl(e,t,r=1){return De(e)&&Bo(t)?(r=eo(r)?Zi(r):1,e.substring(t,t+r)):""}let Al={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function ml(e){return yl(e,1)}function Il(e){return yl(e,360)}function yl(e,t=1){if(e.indexOf("%")>=0){if(!Se(e=pl(e,"%","")))throw new Error("invalid color: value is not a number");e=Mn(e)/100}else{if(!Se(e))throw new Error("invalid color: value is not a number");e=Mn(e)/t}if(e>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function vl(e){if(!Se(e))throw new Error("invalid color: value is not a number");if((e=Mn(e))>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function bl(e,t="rgba"){if(!Ce(e))throw new Error("invalid colors array");let r=we(e,0,0),n=we(e,1,0),i=we(e,2,0),o=we(e,3,1);if(4!==dn(t=t.split("")))throw new Error("tar.length !== 4");let a=we(t,0),s=we(t,1),c=we(t,2),l=we(t,3);return{[a]:r,[s]:n,[c]:i,[l]:o}}function wl(e){let t=(e=da(e,1)).length;if(2===t)e=`${e}${e}${e}ff`;else if(3===t){let t=hl(e,0,1),r=hl(e,1,1),n=hl(e,2,1);e=`${t}${t}${r}${r}${n}${n}ff`}else if(6===t)e=`${e}ff`;else if(8!==t)throw new Error("invalid hex color");function r(e){if(2!==e.length)throw new Error("hex.length of color is not equal to 2");if(!Se(e=parseInt(e,16)))throw new Error("invalid hex of color");return(e=Mn(e))/255}return{r:r(hl(e,0,2)),g:r(hl(e,2,2)),b:r(hl(e,4,2)),a:r(hl(e,6,2))}}function Bl(e){return e=bl(e=xr(e,(e,t)=>t<=2?yl(e,255):3===t?vl(e):null),"rgba")}function El(e){return e=Nl(e=bl(e=xr(e,(e,t)=>0===t?Il(e):1===t||2===t?ml(e):3===t?vl(e):null),"hsla"))}function Cl(e){return e=ql(e=bl(e=xr(e,(e,t)=>0===t?Il(e):1===t||2===t?ml(e):3===t?vl(e):null),"hsva"))}function xl(e){if("transparent"===e)return{r:0,g:0,b:0,a:0};if(function(e){return ke(Al,e)}(e))return wl(e=function(e){return`#${Al[e]}`}(e));if(function(e){return"#"===ua(e,1)&&(!!/[0-9A-Fa-f]{2}/g.test(e)||(!!/[0-9A-Fa-f]{3}/g.test(e)||(!!/[0-9A-Fa-f]{6}/g.test(e)||!!/[0-9A-Fa-f]{8}/g.test(e))))}(e))return wl(e);if(function(e){return"rgb"===ua(e,3)||"rgba"===ua(e,4)}(e))return function(e){return e=pl(e,"rgba",""),e=pl(e,"rgb",""),Bl(la(e=pl(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsl"===ua(e,3)||"hsla"===ua(e,4)}(e))return function(e){return e=pl(e,"hsla",""),e=pl(e,"hsl",""),El(la(e=pl(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsv"===ua(e,3)||"hsva"===ua(e,4)}(e))return function(e){return e=pl(e,"hsva",""),e=pl(e,"hsv",""),Cl(la(e=pl(e=e.replace(/[()]/g,""),","," ")," "))}(e);throw new Error("format of color string is not hex-color, name-color, rgba, hsla, hsva")}function Dl(e,t){return!!ke(e,t=ws(t))||!!ke(e,t=gl(t))}function Fl(e,t,r){let n;return n=we(e,t,null),null!==n?n:(n=we(e,t=gl(t),null),null!==n?n:r)}function Ql(e){if(function(e){let t=Dl(e,"r"),r=Dl(e,"g"),n=Dl(e,"b");return t&&r&&n}(e))return function(e){let t=[Fl(e,"r",null),Fl(e,"g",null),Fl(e,"b",null),Fl(e,"a",1)];return t=xr(t,Ya),Bl(t)}(e);if(function(e){let t=Dl(e,"h"),r=Dl(e,"s"),n=Dl(e,"l");return t&&r&&n}(e))return function(e){let t=[Fl(e,"h",null),Fl(e,"s",null),Fl(e,"l",null),Fl(e,"a",1)];return t=xr(t,Ya),El(t)}(e);if(function(e){let t=Dl(e,"h"),r=Dl(e,"s"),n=Dl(e,"v");return t&&r&&n}(e))return function(e){let t=[Fl(e,"h",null),Fl(e,"s",null),Fl(e,"v",null),Fl(e,"a",1)];return t=xr(t,Ya),Cl(t)}(e);throw new Error("color object is not one of rgba, hsla, hsva")}function Sl(e){let t,r,n=e.r,i=e.g,o=e.b,a=Math.max(n,i,o),s=Math.min(n,i,o),c=(a+s)/2;if(a===s)t=r=0;else{let e=a-s;switch(r=c>.5?e/(2-a-s):e/(a+s),a){case n:t=(i-o)/e+(i<o?6:0);break;case i:t=(o-n)/e+2;break;case o:t=(n-i)/e+4}t/=6}return{h:t,s:r,l:c,a:e.a}}function kl(e){let t,r,n=e.r,i=e.g,o=e.b,a=Math.max(n,i,o),s=Math.min(n,i,o),c=a,l=a-s;if(r=0===a?0:l/a,a===s)t=0;else{switch(a){case n:t=(i-o)/l+(i<o?6:0);break;case i:t=(o-n)/l+2;break;case o:t=(n-i)/l+4}t/=6}return{h:t,s:r,v:c,a:e.a}}function Nl(e){let t,r,n,i=e.h,o=e.s,a=e.l;function s(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(0===o)t=r=n=a;else{let e=a<.5?a*(1+o):a+o-a*o,c=2*a-e;t=s(c,e,i+1/3),r=s(c,e,i),n=s(c,e,i-1/3)}return{r:t,g:r,b:n,a:e.a}}function ql(e){let t,r,n,i=e.h,o=e.s,a=e.v,s=Math.floor(6*i),c=6*i-s,l=a*(1-o),u=a*(1-c*o),f=a*(1-(1-c)*o);switch(s%6){case 0:t=a,r=f,n=l;break;case 1:t=u,r=a,n=l;break;case 2:t=l,r=a,n=f;break;case 3:t=l,r=u,n=a;break;case 4:t=f,r=l,n=a;break;case 5:t=a,r=l,n=u}return{r:t,g:r,b:n,a:e.a}}function Ml(e){let t=Math.round(255*e).toString(16);if(1===t.length)return`0${t}`;if(2===t.length)return t;throw new Error("invalid value")}function Hl(e,t=!0){let r=e.r,n=e.g,i=e.b,o=e.a,a=`${Ml(r)}${Ml(n)}${Ml(i)}`;return t&&(a=`${a}${Ml(o)}`),a}function Ll(e){return Math.min(1,Math.max(0,e))}function Ul(e,t){if(!De(t))throw new Error("fmtOutput is not a string");if(!mu[t])throw console.log(`fmtOutput must be [${dt(mu)}]`),new Error("invalid fmtOutput");return e=mu[t](e)}function Rl(e,t,r="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let n=Sl(e);return n.h+=t,n.h=n.h%1,Ul(Nl(n),r)}function Ol(e,t,r,n,i="toRgbString"){if(t<0||t>1)throw new Error("w1 < 0 or > 1");if(n<0||n>1)throw new Error("w1 < 0 or > 1");return Ul({r:e.r*t+r.r*n,g:e.g*t+r.g*n,b:e.b*t+r.b*n,a:e.a*t+r.a*n},i)}function Tl(e){return`${$i(100*e,1)}%`}function Yl(e){return $i(e,0)}function jl(e){return $i(e,3)}function Gl(e){return{r:Yl(255*e.r),g:Yl(255*e.g),b:Yl(255*e.b)}}function Jl(e){return`rgb(${Yl(255*e.r)}, ${Yl(255*e.g)}, ${Yl(255*e.b)})`}function zl(e){return{r:Yl(255*e.r),g:Yl(255*e.g),b:Yl(255*e.b),a:jl(e.a)}}function Vl(e){return`rgba(${Yl(255*e.r)}, ${Yl(255*e.g)}, ${Yl(255*e.b)}, ${jl(e.a)})`}function Pl(e){let t=Sl(e);return{h:Yl(360*t.h),s:jl(t.s),l:jl(t.l)}}function Xl(e){let t=Sl(e);return`hsl(${Yl(360*t.h)}, ${jl(t.s)}, ${jl(t.l)})`}function _l(e){let t=Sl(e);return{h:Yl(360*t.h),s:jl(t.s),l:jl(t.l),a:jl(t.a)}}function Wl(e){let t=Sl(e);return`hsla(${Yl(360*t.h)}, ${jl(t.s)}, ${jl(t.l)}, ${jl(t.a)})`}function Kl(e){let t=kl(e);return{h:Yl(360*t.h),s:jl(t.s),v:jl(t.v)}}function $l(e){let t=kl(e);return`hsv(${Yl(360*t.h)}, ${jl(t.s)}, ${jl(t.v)})`}function Zl(e){let t=kl(e);return{h:Yl(360*t.h),s:jl(t.s),v:jl(t.v),a:jl(t.a)}}function eu(e){let t=kl(e);return`hsva(${Yl(360*t.h)}, ${jl(t.s)}, ${jl(t.v)}, ${jl(t.a)})`}function tu(e){return{r:Tl(e.r),g:Tl(e.g),b:Tl(e.b)}}function ru(e){return`rgb(${Tl(e.r)}, ${Tl(e.g)}, ${Tl(e.b)})`}function nu(e){return{r:Tl(e.r),g:Tl(e.g),b:Tl(e.b),a:jl(e.a)}}function iu(e){return`rgba(${Tl(e.r)}, ${Tl(e.g)}, ${Tl(e.b)}, ${jl(e.a)})`}function ou(e){let t=Sl(e);return{h:Yl(360*t.h),s:Tl(t.s),l:Tl(t.l)}}function au(e){let t=Sl(e);return`hsl(${Yl(360*t.h)}, ${Tl(t.s)}, ${Tl(t.l)})`}function su(e){let t=Sl(e);return{h:Yl(360*t.h),s:Tl(t.s),l:Tl(t.l),a:jl(t.a)}}function cu(e){let t=Sl(e);return`hsla(${Yl(360*t.h)}, ${Tl(t.s)}, ${Tl(t.l)}, ${jl(t.a)})`}function lu(e){let t=kl(e);return{h:Yl(360*t.h),s:Tl(t.s),v:Tl(t.v)}}function uu(e){let t=kl(e);return`hsv(${Yl(360*t.h)}, ${Tl(t.s)}, ${Tl(t.v)})`}function fu(e){let t=kl(e);return{h:Yl(360*t.h),s:Tl(t.s),v:Tl(t.v),a:jl(t.a)}}function du(e){let t=kl(e);return`hsva(${Yl(360*t.h)}, ${Tl(t.s)}, ${Tl(t.v)}, ${jl(t.a)})`}function gu(e){let t=function(e){return Hl(e,!1)}(e);return`#${t}`}function pu(e){return`#${Hl(e)}`}function hu(e){let t=null,r=null,n=null;if(De(e))t=ws(sa(e));else{if(!Ee(e))throw console.log("color=",e),new Error("color is not a string or an object");r=e}if(null!==t)try{n=xl(t)}catch(e){throw console.log(e),new Error(`can not parse color: ${t}`)}else if(null!==r)try{n=Ql(r)}catch(e){throw console.log(e),new Error(`can not parse color: ${JSON.stringify(r)}`)}return n}function Au(e){if(!Ee(e))return console.log("gradient is not an effective object"),e=>`rgb(${255*(e=Math.min(Math.max(e,0),1))},${255*e},${255*e})`;let t=[];return Er(e,(e,r)=>{t.push([Mn(r),zl(hu(e)),e])}),t=Oa(t,0),function(e){let r=null;for(let n=1;n<t.length;n++){let i=t[n-1][0],o=t[n-1][1],a=t[n][0],s=t[n][1];if(i<=e&&a>=e){let t=(a-e)/(a-i),n=(e-i)/(a-i);r=Ol(hu(o),t,hu(s),n,"toRgbaString");break}}return r}}let mu={toRgb:Gl,toRgbString:Jl,toRgba:zl,toRgbaString:Vl,toHsl:Pl,toHslString:Xl,toHsla:_l,toHslaString:Wl,toHsv:Kl,toHsvString:$l,toHsva:Zl,toHsvaString:eu,toRgbP:tu,toRgbPString:ru,toRgbaP:nu,toRgbaPString:iu,toHslP:ou,toHslPString:au,toHslaP:su,toHslaPString:cu,toHsvP:lu,toHsvPString:uu,toHsvaP:fu,toHsvaPString:du,toHexString:gu,toHex8String:pu};var Iu={toRgb:e=>Gl(hu(e)),toRgbString:e=>Jl(hu(e)),toRgba:e=>zl(hu(e)),toRgbaString:e=>Vl(hu(e)),toHsl:e=>Pl(hu(e)),toHslString:e=>Xl(hu(e)),toHsla:e=>_l(hu(e)),toHslaString:e=>Wl(hu(e)),toHsv:e=>Kl(hu(e)),toHsvString:e=>$l(hu(e)),toHsva:e=>Zl(hu(e)),toHsvaString:e=>eu(hu(e)),toRgbP:e=>tu(hu(e)),toRgbPString:e=>ru(hu(e)),toRgbaP:e=>nu(hu(e)),toRgbaPString:e=>iu(hu(e)),toHslP:e=>ou(hu(e)),toHslPString:e=>au(hu(e)),toHslaP:e=>su(hu(e)),toHslaPString:e=>cu(hu(e)),toHsvP:e=>lu(hu(e)),toHsvPString:e=>uu(hu(e)),toHsvaP:e=>fu(hu(e)),toHsvaPString:e=>du(hu(e)),toHexString:e=>gu(hu(e)),toHex8String:e=>pu(hu(e)),modSaturate:(e,t,r)=>function(e,t,r="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let n=Sl(e);return n.s+=t,n.s=Ll(n.s),Ul(Nl(n),r)}(hu(e),t,r),modGrey:(e,t)=>function(e,t="toRgbString"){let r=Sl(e);return r.s=0,Ul(Nl(r),t)}(hu(e),t),modLighten:(e,t,r)=>function(e,t,r="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let n=Sl(e);return n.l+=t,n.l=Ll(n.l),Ul(Nl(n),r)}(hu(e),t,r),modBrighten:(e,t,r)=>function(e,t,r="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");return e.r+=t,e.r=Ll(e.r),e.g+=t,e.g=Ll(e.g),e.b+=t,e.b=Ll(e.b),Ul(e,r)}(hu(e),t,r),modHue:(e,t,r)=>Rl(hu(e),t,r),modComplement:(e,t)=>function(e,t="toRgbString"){return Rl(e,.5,t)}(hu(e),t),spreadHue:(e,t,r)=>function(e,t,r="toRgbString"){if(!Hn(t))throw new Error("num is not an integer");if((t=Zi(t))<=1)return[e];let n=Sl(e),i=1/t,o=[];for(let e=0;e<t;e++)o.push(Ul(Nl(n),r)),n.h+=i,n.h=n.h%1;return o}(hu(e),t,r),spreadMonochromatic:(e,t,r)=>function(e,t,r="toRgbString"){if(!Hn(t))throw new Error("num is not an integer");if((t=Zi(t))<=1)return[e];let n=kl(e);n.s=1,n.l=1;let i=1/t,o=[];for(let e=0;e<t;e++)o.push(Ul(ql(n),r)),n.h-=i,n.l-=i;return o}(hu(e),t,r),mix:(e,t,r,n,i)=>Ol(hu(e),t,hu(r),n,i),getBrightness:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");return(299*e.r+587*e.g+114*e.b)/1e3}(hu(e)),getLuminance:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");let t,r,n,i=e.r,o=e.g,a=e.b;return t=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4),r=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),n=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),.2126*t+.7152*r+.0722*n}(hu(e)),interp:Au};function yu(e,t,r){return null==e?e:function(e,t,r,n){if(!U(e))return e;for(var i=-1,o=(t=ye(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var c=ve(t[i]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var u=s[c];void 0===(l=n?n(u,c,s):void 0)&&(l=U(u)?u:Pe(t[i+1])?[]:{})}pi(s,c,l),s=s[c]}return e}(e,t,r)}function vu(e){return vr(e)?void 0:e}var bu=bo(function(e,t){var r={};if(null==e)return r;var n=!1;t=pe(t,function(t){return t=ye(t,e),n||(n=t.length>1),t}),hi(e,Ci(e),r),n&&(r=Ji(r,7,vu));for(var i=t.length;i--;)ka(r,t[i]);return r}),wu=bu;function Bu(e,t={}){let r="$level",n="$parents";if(!Rr(e))return[];let i=we(t,"bindKey",null);De(i)||(i="id");let o=we(t,"bindParent",null);De(o)||(o="parentId");let a=we(t,"bindChildren",null);De(a)||(a="children");let s=we(t,"saveExtProps",null);pn(s)||(s=!1),e=function(e){let t=[];function a(a){let s=[];Er(e,(e,c)=>{let l=we(e,o),u=we(a,i);if(l&&u&&l===u){let o=we(a,n,[]);o=zi(o),o.push(a[i]),t.push({[r]:a[r]+1,[n]:o,...e})}else s.push(e)}),e=s}if(e=zi(e),function(){let i=[];Er(e,(e,a)=>{Ur(e[o])?t.push({[r]:0,[n]:[],...e}):i.push(e)}),e=i}(),0===t.length)return t;let s=-1;for(;s+=1,!(s>t.length-1);){if(a(t[s]),0===e.length)break}return t}(e);let c=function(e){let t=[];function c(e){return s?e:wu(e,[r,n])}let l={};return Er(e,(n,s)=>{if(0===n[r]){let e=c(n);t.push(e),l[n[i]]=[s]}else{let r=function(t){for(let r=0;r<e.length;r++){let n=e[r];if(t[o]===n[i])return n}return null}(n);if(null!==r){let e=l[r[i]];e=[...e,a];let o=we(t,e,[]),s=c(n);o.push(s),l[n[i]]=[...e,o.length-1],yu(t,e,o)}else console.log(`can not find parent for ${we(n,o)}`)}}),t}(e);return c}function Eu(e,t=null,r={}){R(t)||(t=e=>e);let n=we(r,"force",!1);return pn(n)||(n=!1),function(e,t,r=!1){let n=[];if(!Ce(e)&&!Be(e))return t(e,null,[]);function i(e){if(Ce(e))return ao(dn(e));if(Be(e)){let t=Object.getOwnPropertyNames(e),n=null;return r&&(n=Object.getOwnPropertySymbols(e)),Ce(t)||(t=[]),Ce(n)||(n=[]),[...t,...n]}return e}return function e(r,o){if(Ce(r))return i(r).map(i=>{let o=r[i],a=zi(n);return n.push(i),o=t(o,i,a),o=e(o),n.pop(),o});if(Be(r)){let o=i(r),a={};return o.map(i=>{let o=r[i],s=zi(n);n.push(i),o=t(o,i,s),o=e(o),n.pop(),a[i]=o}),a}return r}(e)}(e,t,n)}function Cu(e,t={}){if(!Ee(e)&&!Rr(e))return[];let r=we(t,"bindKey",null);De(r)||(r="id");let n=we(t,"bindParent",null);De(n)||(n="parentId");let i=we(t,"bindBelong",null);De(i)||(i="key");let o=we(t,"bindText",null);De(o)||(o="text");let a=we(t,"bindType",null);De(a)||(a="type");let s=we(t,"bindNumOfChilren",null);function c(e,t){return e=xr(e=zi(e),e=>q(e)?Ya(e):e),q(t)&&(t=Ya(t)),(De(t)||Se(t))&&e.push(t),xo(e,"-")}De(s)||(s="numOfChilren");let l=[];return Eu(e,(e,t,u)=>{let f=c(u,t),d=c(u,null),g="node";Be(e)?g="object":Ce(e)&&(g="array");let p={[r]:f,[n]:d,[a]:g};if((De(t)||Ia(t))&&(p[i]=t),Be(e)||Ce(e)||(p[o]=e),Be(e)||Ce(e)){let t=null;Be(e)?t=dn(dt(e)):Ce(e)&&(t=dn(e)),p[s]=t}return l.push(p),e},{force:!0}),l}function xu(e){if(!br(e))return"invalid element";let t=!1;try{t=document.activeElement===e}catch(e){console.log(e)}return t}function Du(e){return Se(e)?(e=Mn(e),Math.cos(e*Math.PI/180)):null}function Fu(e){return Se(e)?(e=Mn(e),Math.tan(e*Math.PI/180)):null}function Qu(){let e=new function e(){if(!(this instanceof e))return new e;this.SheetNames=[],this.Sheets={}};return e}function Su(e){return Se(e)?(e=Mn(e),Math.sin(e*Math.PI/180)):null}function ku(e){if(!De(e))return!1;let t="YYYY-MM-DD";return e===r(e,t).format(t)}function Nu(e=300){return new function(e){let t=[],r=null,n=Date.now();return eo(e)||(e=300),e=Zi(e),function(i,...o){va(i)?(n=Date.now(),t.push({func:i,input:o}),null===r&&(r=setInterval(()=>{if(0===dn(t))return clearInterval(r),void(r=null);if(Date.now()-n>e){let e=t.pop();t=[];try{e.func(...e.input)}catch(e){console.log("m.func catch",e)}}},10))):console.log("func is not a function")}}(e)}let qu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Mu=qu.length;function Hu(e=32){let t=[];e=eo(e)?Zi(e):32;for(let r=0;r<e;r++)t[r]=qu[0|Math.random()*Mu];return t.join("")}function Lu(e,t={}){if(!br(e))return;let r=we(t,"duration",500);r=Mn(r),r<0&&(r=1e3);let n=we(t,"delay",0);n=Mn(n),n<0&&(n=0);let i=we(t,"opacityIni",0);i=Mn(i),i=Math.min(Math.max(i,0),1),Se(e.style.opacity)&&(i=Mn(e.style.opacity));let o=10/r,a=`tag-${Hu()}`;e.setAttribute("dom-fade-tag",a),setTimeout(()=>{let t=setInterval(()=>{try{e.getAttribute("dom-fade-tag")!==a&&clearInterval(t),e.style.opacity=i,i>=1&&(clearInterval(t),e.removeAttribute("dom-fade-tag")),i+=o,i>1&&(i=1)}catch(e){console.log(e),clearInterval(t)}},10)},n)}function Uu(e,t={}){if(!br(e))return;let r=we(t,"duration",500);r=Mn(r),r<0&&(r=1e3);let n=we(t,"delay",0);n=Mn(n),n<0&&(n=0);let i=we(t,"opacityIni",1);i=Mn(i),i=Math.min(Math.max(i,0),1),Se(e.style.opacity)&&(i=Mn(e.style.opacity));let o=10/r,a=`tag-${Hu()}`;e.setAttribute("dom-fade-tag",a),setTimeout(()=>{let t=setInterval(()=>{try{e.getAttribute("dom-fade-tag")!==a&&clearInterval(t),e.style.opacity=i,i<=0&&(clearInterval(t),e.removeAttribute("dom-fade-tag")),i-=o,i<0&&(i=0)}catch(e){console.log(e),clearInterval(t)}},10)},n)}let Ru='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 512.001 512.001" style="width:12px; height:12px; enable-background:new 0 0 512.001 512.001;" xml:space="preserve"><g><g><path d="M284.286,256.002L506.143,34.144c7.811-7.811,7.811-20.475,0-28.285c-7.811-7.81-20.475-7.811-28.285,0L256,227.717L34.143,5.859c-7.811-7.811-20.475-7.811-28.285,0c-7.81,7.811-7.811,20.475,0,28.285l221.857,221.857L5.858,477.859c-7.811,7.811-7.811,20.475,0,28.285c3.905,3.905,9.024,5.857,14.143,5.857c5.119,0,10.237-1.952,14.143-5.857L256,284.287l221.857,221.857c3.905,3.905,9.024,5.857,14.143,5.857s10.237-1.952,14.143-5.857c7.811-7.811,7.811-20.475,0-28.285L284.286,256.002z"/></g></g></svg>',Ou={success:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 426.667 426.667" style="width:24px; height:24px; enable-background:new 0 0 426.667 426.667" xml:space="preserve"><path style="fill:#6ac259" d="M213.333,0C95.518,0,0,95.514,0,213.333s95.518,213.333,213.333,213.333 c117.828,0,213.333-95.514,213.333-213.333S331.157,0,213.333,0z M174.199,322.918l-93.935-93.931l31.309-31.309l62.626,62.622 l140.894-140.898l31.309,31.309L174.199,322.918z"/></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 496.158 496.158" style="width:24px; height:24px; enable-background:new 0 0 496.158 496.158" xml:space="preserve"><path style="fill:#e04f5f" d="M496.158,248.085c0-137.021-111.07-248.082-248.076-248.082C111.07,0.003,0,111.063,0,248.085 c0,137.002,111.07,248.07,248.082,248.07C385.088,496.155,496.158,385.087,496.158,248.085z"/><path style="fill:#fff" d="M277.042,248.082l72.528-84.196c7.91-9.182,6.876-23.041-2.31-30.951 c-9.172-7.904-23.032-6.876-30.947,2.306l-68.236,79.212l-68.229-79.212c-7.91-9.188-21.771-10.216-30.954-2.306 c-9.186,7.91-10.214,21.77-2.304,30.951l72.522,84.196l-72.522,84.192c-7.91,9.182-6.882,23.041,2.304,30.951 c4.143,3.569,9.241,5.318,14.316,5.318c6.161,0,12.294-2.586,16.638-7.624l68.229-79.212l68.236,79.212 c4.338,5.041,10.47,7.624,16.637,7.624c5.069,0,10.168-1.749,14.311-5.318c9.186-7.91,10.22-21.77,2.31-30.951L277.042,248.082z"/></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 497.472 497.472" style="width:24px; height:24px; enable-background:new 0 0 497.472 497.472" xml:space="preserve"><g transform="matrix(1.25 0 0 -1.25 0 45)"><path style="fill:#ffcc4d" d="M24.374-357.857c-20.958,0-30.197,15.223-20.548,33.826L181.421,17.928 c9.648,18.603,25.463,18.603,35.123,0L394.14-324.031c9.671-18.603,0.421-33.826-20.548-33.826H24.374z"/><path style="fill:#231f20" d="M173.605-80.922c0,14.814,10.934,23.984,25.395,23.984c14.12,0,25.407-9.512,25.407-23.984 V-216.75c0-14.461-11.287-23.984-25.407-23.984c-14.461,0-25.395,9.182-25.395,23.984V-80.922z M171.489-289.056 c0,15.167,12.345,27.511,27.511,27.511c15.167,0,27.523-12.345,27.523-27.511c0-15.178-12.356-27.523-27.523-27.523 C183.834-316.579,171.489-304.234,171.489-289.056"/></g></svg>',infor:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 496.16 496.16" style="width:24px; height:24px; enable-background:new 0 0 496.158 496.158;" xml:space="preserve"><path d="m496.16 248.08c0-137.02-111.07-248.08-248.08-248.08-137.01 0-248.08 111.06-248.08 248.08 0 137 111.07 248.07 248.08 248.07 137.01 0 248.08-111.07 248.08-248.07z" fill="#25B7D3"/><g fill="#fff"><path d="m315.25 359.56c-1.387-2.032-4.048-2.755-6.27-1.702-24.582 11.637-52.482 23.94-57.958 25.015-0.138-0.123-0.357-0.348-0.644-0.737-0.742-1.005-1.103-2.318-1.103-4.015 0-13.905 10.495-56.205 31.192-125.72 17.451-58.406 19.469-70.499 19.469-74.514 0-6.198-2.373-11.435-6.865-15.146-4.267-3.519-10.229-5.302-17.719-5.302-12.459 0-26.899 4.73-44.146 14.461-16.713 9.433-35.352 25.41-55.396 47.487-1.569 1.729-1.733 4.314-0.395 6.228 1.34 1.915 3.825 2.644 5.986 1.764 7.037-2.872 42.402-17.359 47.557-20.597 4.221-2.646 7.875-3.989 10.861-3.989 0.107 0 0.199 4e-3 0.276 0.01 0.036 0.198 0.07 0.5 0.07 0.933 0 3.047-0.627 6.654-1.856 10.703-30.136 97.641-44.785 157.5-44.785 182.99 0 8.998 2.501 16.242 7.432 21.528 5.025 5.393 11.803 8.127 20.146 8.127 8.891 0 19.712-3.714 33.08-11.354 12.936-7.392 32.68-23.653 60.363-49.717 1.793-1.687 2.092-4.426 0.705-6.458z"/><path d="m314.28 76.672c-4.925-5.041-11.227-7.597-18.729-7.597-9.34 0-17.475 3.691-24.176 10.971-6.594 7.16-9.938 15.946-9.938 26.113 0 8.033 2.463 14.69 7.32 19.785 4.922 5.172 11.139 7.794 18.476 7.794 8.958 0 17.049-3.898 24.047-11.586 6.876-7.553 10.363-16.433 10.363-26.393 1e-3 -7.654-2.476-14.075-7.363-19.087z"/></g></svg>',cancel:Ru},Tu={},Yu=null,ju=yn();function Gu(){Er(["top-right","top-left","bottom-right","bottom-left"],e=>{!function(e){let t=pa(Tu,{position:e});t=Oa(t,"timeStart");let r=16;Er(t,e=>{Tu[e.id].ele||(Tu[e.id].ele=document.querySelector(`#${e.id}`)),Tu[e.id].loc.top=r,Tu[e.id].loc.height=Tu[e.id].ele.offsetHeight,r+=Tu[e.id].loc.height+16}),Er(t,t=>{e.indexOf("bottom-")>=0?(Tu[t.id].ele.style.bottom=`${Tu[t.id].loc.top}px`,Tu[t.id].loc.bottom=Tu[t.id].loc.top):Tu[t.id].ele.style.top=`${Tu[t.id].loc.top}px`,e.indexOf("-left")>=0?(Tu[t.id].ele.style.left="16px",Tu[t.id].loc.left=16):(Tu[t.id].ele.style.right="16px",Tu[t.id].loc.right=16),Tu[t.id].ele.style.zIndex=2e5,Tu[t.id].ele.style.opacity=1,Tu[t.id].ele.style.transform="",Tu[t.id].ele.style.transform=null})}(e)})}function Ju(e){Tu[e].ele&&Tu[e].ele.parentNode.removeChild(Tu[e].ele),Tu[e]&&delete Tu[e],Gu()}function zu(e,t){if(!br(e))return"invalid eleParent";if(xe(t))e.insertAdjacentHTML("beforeend",t);else{if(!br(t))return"invalid itemChild";e.appendChild(t)}}function Vu(){return null!==navigator.userAgent.toLowerCase().match(/rv:([\d.]+)\) like gecko/)}function Pu(e){if(!e)return"invalid event";if(!e.cancelable)return"event is not cancelable";try{Vu()?e.cancelBubble=!0:e.stopPropagation(),e.preventDefault()}catch(e){}}var Xu;ju.ttWAlertCancel=function(e){Ju(e)},ju.ttWAlertFadeIn=function(e){Lu(document.querySelector(`#${e}`))},ju.ttWAlertFadeOut=function(e){Uu(document.querySelector(`#${e}`))},function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"}(Xu||(Xu={}));var _u;!function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"}(_u||(_u={}));const Wu=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");function Ku(e){return e?e.replace(/\\/g,"/"):e}function $u(e){const t=e.length;let r=-1/0;for(let n=0;n<t;n++)r=Math.max(r,e[n]);return r}function Zu(e,t){const r=e.split(".");return r.length>1?r[r.length-1]:t}function ef(e,t){return t.reduce((t,r)=>t||e.startsWith(r),!1)}const tf=["a/","b/","i/","w/","c/","o/"];function rf(e,t,r){const n=void 0!==r?[...tf,r]:tf,i=t?new RegExp(`^${o=t,o.replace(Wu,"\\$&")} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$');var o;const[,a=""]=i.exec(e)||[],s=n.find(e=>0===a.indexOf(e));return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function nf(e,t={}){const r=[];let n=null,i=null,o=null,a=null,s=null,c=null,l=null;const u="--- ",f="+++ ",d="@@",g=/^old mode (\d{6})/,p=/^new mode (\d{6})/,h=/^deleted file mode (\d{6})/,A=/^new file mode (\d{6})/,m=/^copy from "?(.+)"?/,I=/^copy to "?(.+)"?/,y=/^rename from "?(.+)"?/,v=/^rename to "?(.+)"?/,b=/^similarity index (\d+)%/,w=/^dissimilarity index (\d+)%/,B=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,E=/^Binary files (.*) and (.*) differ/,C=/^GIT binary patch/,x=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,D=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,F=/^new file mode (\d{6})/,Q=/^deleted file mode (\d{6}),(\d{6})/,S=e.replace(/\/g,"").replace(/\r\n?/g,"\n").split("\n");function k(){null!==i&&null!==n&&(n.blocks.push(i),i=null)}function N(){null!==n&&(n.oldName||null===c||(n.oldName=c),n.newName||null===l||(n.newName=l),n.newName&&(r.push(n),n=null)),c=null,l=null}function q(){k(),N(),n={blocks:[],deletedLines:0,addedLines:0}}function M(e){let t;k(),null!==n&&((t=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))?(n.isCombined=!1,o=parseInt(t[1],10),s=parseInt(t[2],10)):(t=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))?(n.isCombined=!0,o=parseInt(t[1],10),a=parseInt(t[2],10),s=parseInt(t[3],10)):(e.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),o=0,s=0,n.isCombined=!1)),i={lines:[],oldStartLine:o,oldStartLine2:a,newStartLine:s,header:e}}return S.forEach((e,a)=>{if(!e||e.startsWith("*"))return;let k;const N=S[a-1],H=S[a+1],L=S[a+2];if(e.startsWith("diff --git")||e.startsWith("diff --combined")){q();if((k=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(e))&&(c=rf(k[1],void 0,t.dstPrefix),l=rf(k[2],void 0,t.srcPrefix)),null===n)throw new Error("Where is my file !!!");return void(n.isGitDiff=!0)}if(e.startsWith("Binary files")&&!(null==n?void 0:n.isGitDiff)){q();if((k=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(e))&&(c=rf(k[1],void 0,t.dstPrefix),l=rf(k[2],void 0,t.srcPrefix)),null===n)throw new Error("Where is my file !!!");return void(n.isBinary=!0)}if((!n||!n.isGitDiff&&n&&e.startsWith(u)&&H.startsWith(f)&&L.startsWith(d))&&q(),null==n?void 0:n.isTooBig)return;if(n&&("number"==typeof t.diffMaxChanges&&n.addedLines+n.deletedLines>t.diffMaxChanges||"number"==typeof t.diffMaxLineLength&&e.length>t.diffMaxLineLength)){n.isTooBig=!0,n.addedLines=0,n.deletedLines=0,n.blocks=[],i=null;return void M("function"==typeof t.diffTooBigMessage?t.diffTooBigMessage(r.length):"Diff too big to be displayed")}if(e.startsWith(u)&&H.startsWith(f)||e.startsWith(f)&&N.startsWith(u)){if(n&&!n.oldName&&e.startsWith("--- ")&&(k=function(e,t){return rf(e,"---",t)}(e,t.srcPrefix)))return n.oldName=k,void(n.language=Zu(n.oldName,n.language));if(n&&!n.newName&&e.startsWith("+++ ")&&(k=function(e,t){return rf(e,"+++",t)}(e,t.dstPrefix)))return n.newName=k,void(n.language=Zu(n.newName,n.language))}if(n&&(e.startsWith(d)||n.isGitDiff&&n.oldName&&n.newName&&!i))return void M(e);if(i&&(e.startsWith("+")||e.startsWith("-")||e.startsWith(" ")))return void function(e){if(null===n||null===i||null===o||null===s)return;const t={content:e},r=n.isCombined?["+ "," +","++"]:["+"],a=n.isCombined?["- "," -","--"]:["-"];ef(e,r)?(n.addedLines++,t.type=Xu.INSERT,t.oldNumber=void 0,t.newNumber=s++):ef(e,a)?(n.deletedLines++,t.type=Xu.DELETE,t.oldNumber=o++,t.newNumber=void 0):(t.type=Xu.CONTEXT,t.oldNumber=o++,t.newNumber=s++),i.lines.push(t)}(e);const U=!function(e,t){let r=t;for(;r<S.length-3;){if(e.startsWith("diff"))return!1;if(S[r].startsWith(u)&&S[r+1].startsWith(f)&&S[r+2].startsWith(d))return!0;r++}return!1}(e,a);if(null===n)throw new Error("Where is my file !!!");(k=g.exec(e))?n.oldMode=k[1]:(k=p.exec(e))?n.newMode=k[1]:(k=h.exec(e))?(n.deletedFileMode=k[1],n.isDeleted=!0):(k=A.exec(e))?(n.newFileMode=k[1],n.isNew=!0):(k=m.exec(e))?(U&&(n.oldName=k[1]),n.isCopy=!0):(k=I.exec(e))?(U&&(n.newName=k[1]),n.isCopy=!0):(k=y.exec(e))?(U&&(n.oldName=k[1]),n.isRename=!0):(k=v.exec(e))?(U&&(n.newName=k[1]),n.isRename=!0):(k=E.exec(e))?(n.isBinary=!0,n.oldName=rf(k[1],void 0,t.srcPrefix),n.newName=rf(k[2],void 0,t.dstPrefix),M("Binary file")):C.test(e)?(n.isBinary=!0,M(e)):(k=b.exec(e))?n.unchangedPercentage=parseInt(k[1],10):(k=w.exec(e))?n.changedPercentage=parseInt(k[1],10):(k=B.exec(e))?(n.checksumBefore=k[1],n.checksumAfter=k[2],k[3]&&(n.mode=k[3])):(k=x.exec(e))?(n.checksumBefore=[k[2],k[3]],n.checksumAfter=k[1]):(k=D.exec(e))?(n.oldMode=[k[2],k[3]],n.newMode=k[1]):(k=F.exec(e))?(n.newFileMode=k[1],n.isNew=!0):(k=Q.exec(e))&&(n.deletedFileMode=k[1],n.isDeleted=!0)}),k(),N(),r}class of{diff(e,t,r={}){let n;"function"==typeof r?(n=r,r={}):"callback"in r&&(n=r.callback);const i=this.castInput(e,r),o=this.castInput(t,r),a=this.removeEmpty(this.tokenize(i,r)),s=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(a,s,r,n)}diffWithOptionsObj(e,t,r,n){var i;const o=e=>(e=this.postProcess(e,r),n?void setTimeout(function(){n(e)},0):e),a=t.length,s=e.length;let c=1,l=a+s;null!=r.maxEditLength&&(l=Math.min(l,r.maxEditLength));const u=null!==(i=r.timeout)&&void 0!==i?i:1/0,f=Date.now()+u,d=[{oldPos:-1,lastComponent:void 0}];let g=this.extractCommon(d[0],t,e,0,r);if(d[0].oldPos+1>=s&&g+1>=a)return o(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,h=1/0;const A=()=>{for(let n=Math.max(p,-c);n<=Math.min(h,c);n+=2){let i;const c=d[n-1],l=d[n+1];c&&(d[n-1]=void 0);let u=!1;if(l){const e=l.oldPos-n;u=l&&0<=e&&e<a}const f=c&&c.oldPos+1<s;if(u||f){if(i=!f||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,r):this.addToPath(c,!1,!0,1,r),g=this.extractCommon(i,t,e,n,r),i.oldPos+1>=s&&g+1>=a)return o(this.buildValues(i.lastComponent,t,e))||!0;d[n]=i,i.oldPos+1>=s&&(h=Math.min(h,n-1)),g+1>=a&&(p=Math.max(p,n+1))}else d[n]=void 0}c++};if(n)!function e(){setTimeout(function(){if(c>l||Date.now()>f)return n(void 0);A()||e()},0)}();else for(;c<=l&&Date.now()<=f;){const e=A();if(e)return e}}addToPath(e,t,r,n,i){const o=e.lastComponent;return o&&!i.oneChangePerToken&&o.added===t&&o.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:o.count+1,added:t,removed:r,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:t,removed:r,previousComponent:o}}}extractCommon(e,t,r,n,i){const o=t.length,a=r.length;let s=e.oldPos,c=s-n,l=0;for(;c+1<o&&s+1<a&&this.equals(r[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,r){return r.comparator?r.comparator(e,t):e===t||!!r.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,r){const n=[];let i;for(;e;)n.push(e),i=e.previousComponent,delete e.previousComponent,e=i;n.reverse();const o=n.length;let a=0,s=0,c=0;for(;a<o;a++){const e=n[a];if(e.removed)e.value=this.join(r.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let n=t.slice(s,s+e.count);n=n.map(function(e,t){const n=r[c+t];return n.length>e.length?n:e}),e.value=this.join(n)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return n}}const af=new class extends of{};const sf="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";const cf=new class extends of{tokenize(e){const t=new RegExp(`(\\r?\\n)|[${sf}]+|[^\\S\\n\\r]+|[^${sf}]`,"ug");return e.match(t)||[]}};function lf(e){return(t,r)=>{const n=e(t).trim(),i=e(r).trim();return function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const r=[];let n,i;for(n=0;n<=t.length;n++)r[n]=[n];for(i=0;i<=e.length;i++)r[0][i]=i;for(n=1;n<=t.length;n++)for(i=1;i<=e.length;i++)t.charAt(n-1)===e.charAt(i-1)?r[n][i]=r[n-1][i-1]:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[t.length][e.length]}(n,i)/(n.length+i.length)}}function uf(e){return function t(r,n,i=0,o=new Map){const a=function(t,r,n=new Map){let i,o=1/0;for(let a=0;a<t.length;++a)for(let s=0;s<r.length;++s){const c=JSON.stringify([t[a],r[s]]);let l;n.has(c)&&(l=n.get(c))||(l=e(t[a],r[s]),n.set(c,l)),l<o&&(o=l,i={indexA:a,indexB:s,score:o})}return i}(r,n,o);if(!a||r.length+n.length<3)return[[r,n]];const s=r.slice(0,a.indexA),c=n.slice(0,a.indexB),l=[r[a.indexA]],u=[n[a.indexB]],f=a.indexA+1,d=a.indexB+1,g=r.slice(f),p=n.slice(d),h=t(s,c,i+1,o),A=t(l,u,i+1,o),m=t(g,p,i+1,o);let I=A;return(a.indexA>0||a.indexB>0)&&(I=h.concat(I)),(r.length>f||n.length>d)&&(I=I.concat(m)),I}}const ff={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},df={matching:"none",matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:"word",colorScheme:_u.LIGHT},gf="/",pf=lf(e=>e.value),hf=uf(pf);function Af(e){return-1!==e.indexOf("dev/null")}function mf(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function If(e){switch(e){case Xu.CONTEXT:return ff.CONTEXT;case Xu.INSERT:return ff.INSERTS;case Xu.DELETE:return ff.DELETES}}function yf(e){switch(e){case _u.DARK:return"d2h-dark-color-scheme";case _u.AUTO:return"d2h-auto-color-scheme";case _u.LIGHT:default:return"d2h-light-color-scheme"}}function vf(e){return e.slice(0).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")}function bf(e,t,r=!0){const n=function(e){return e?2:1}(t);return{prefix:e.substring(0,n),content:r?vf(e.substring(n)):e.substring(n)}}function wf(e){const t=Ku(e.oldName),r=Ku(e.newName);if(t===r||Af(t)||Af(r))return Af(r)?t:r;{const e=[],n=[],i=t.split(gf),o=r.split(gf);let a=0,s=i.length-1,c=o.length-1;for(;a<s&&a<c&&i[a]===o[a];)e.push(o[a]),a+=1;for(;s>a&&c>a&&i[s]===o[c];)n.unshift(o[c]),s-=1,c-=1;const l=e.join(gf),u=n.join(gf),f=i.slice(a,s+1).join(gf),d=o.slice(a,c+1).join(gf);return l.length&&u.length?l+gf+"{"+f+" → "+d+"}"+gf+u:l.length?l+gf+"{"+f+" → "+d+"}":u.length?"{"+f+" → "+d+"}"+gf+u:t+" → "+r}}function Bf(e){return`d2h-${function(e){let t,r,n,i=0;for(t=0,n=e.length;t<n;t++)r=e.charCodeAt(t),i=(i<<5)-i+r,i|=0;return i}(wf(e)).toString().slice(-6)}`}function Ef(e){let t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t}function Cf(e,t,r,n={}){const{matching:i,maxLineLengthHighlight:o,matchWordsThreshold:a,diffStyle:s}=Object.assign(Object.assign({},df),n),c=bf(e,r,!1),l=bf(t,r,!1);if(c.content.length>o||l.content.length>o)return{oldLine:{prefix:c.prefix,content:vf(c.content)},newLine:{prefix:l.prefix,content:vf(l.content)}};const u="char"===s?(f=c.content,d=l.content,af.diff(f,d,g)):function(e,t,r){return cf.diff(e,t,r)}(c.content,l.content);var f,d,g;const p=[];if("word"===s&&"words"===i){const e=u.filter(e=>e.removed),t=u.filter(e=>e.added);hf(t,e).forEach(e=>{if(1===e[0].length&&1===e[1].length){pf(e[0][0],e[1][0])<a&&(p.push(e[0][0]),p.push(e[1][0]))}})}const h=u.reduce((e,t)=>{const r=t.added?"ins":t.removed?"del":null,n=p.indexOf(t)>-1?' class="d2h-change"':"",i=vf(t.value);return null!==r?`${e}<${r}${n}>${i}</${r}>`:`${e}${i}`},"");return{oldLine:{prefix:c.prefix,content:(A=h,A.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,""))},newLine:{prefix:l.prefix,content:mf(h)}};var A}const xf="file-summary",Df={colorScheme:df.colorScheme};class Ff{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Df),t)}render(e){const t=e.map(e=>this.hoganUtils.render(xf,"line",{fileHtmlId:Bf(e),oldName:e.oldName,newName:e.newName,fileName:wf(e),deletedLines:"-"+e.deletedLines,addedLines:"+"+e.addedLines},{fileIcon:this.hoganUtils.template("icon",Ef(e))})).join("\n");return this.hoganUtils.render(xf,"wrapper",{colorScheme:yf(this.config.colorScheme),filesNumber:e.length,files:t})}}const Qf=Object.assign(Object.assign({},df),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Sf="generic",kf="line-by-line";class Nf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Qf),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(Sf,"wrapper",{colorScheme:yf(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const r=this.hoganUtils.template(kf,"file-diff"),n=this.hoganUtils.template(Sf,"file-path"),i=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",Ef(e));return r.render({file:e,fileHtmlId:Bf(e),diffs:t,filePath:n.render({fileDiffName:wf(e)},{fileIcon:i,fileTag:o})})}generateEmptyDiff(){return this.hoganUtils.render(Sf,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:ff})}generateFileHtml(e){const t=uf(lf(t=>bf(t.content,e.isCombined).content));return e.blocks.map(r=>{let n=this.hoganUtils.render(Sf,"block-header",{CSSLineClass:ff,blockHeader:e.isTooBig?r.header:vf(r.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(r).forEach(([r,i,o])=>{if(i.length&&o.length&&!r.length)this.applyRematchMatching(i,o,t).map(([t,r])=>{const{left:i,right:o}=this.processChangedLines(e,e.isCombined,t,r);n+=i,n+=o});else if(r.length)r.forEach(t=>{const{prefix:r,content:i}=bf(t.content,e.isCombined);n+=this.generateSingleLineHtml(e,{type:ff.CONTEXT,prefix:r,content:i,oldNumber:t.oldNumber,newNumber:t.newNumber})});else if(i.length||o.length){const{left:t,right:r}=this.processChangedLines(e,e.isCombined,i,o);n+=t,n+=r}else console.error("Unknown state reached while processing groups of lines",r,i,o)}),n}).join("\n")}applyLineGroupping(e){const t=[];let r=[],n=[];for(let i=0;i<e.lines.length;i++){const o=e.lines[i];(o.type!==Xu.INSERT&&n.length||o.type===Xu.CONTEXT&&r.length>0)&&(t.push([[],r,n]),r=[],n=[]),o.type===Xu.CONTEXT?t.push([[o],[],[]]):o.type===Xu.INSERT&&0===r.length?t.push([[],[],[o]]):o.type===Xu.INSERT&&r.length>0?n.push(o):o.type===Xu.DELETE&&r.push(o)}return(r.length||n.length)&&(t.push([[],r,n]),r=[],n=[]),t}applyRematchMatching(e,t,r){const n=e.length*t.length,i=$u(e.concat(t).map(e=>e.content.length));return n<this.config.matchingMaxComparisons&&i<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?r(e,t):[[e,t]]}processChangedLines(e,t,r,n){const i={right:"",left:""},o=Math.max(r.length,n.length);for(let a=0;a<o;a++){const o=r[a],s=n[a],c=void 0!==o&&void 0!==s?Cf(o.content,s.content,t,this.config):void 0,l=void 0!==o&&void 0!==o.oldNumber?Object.assign(Object.assign({},void 0!==c?{prefix:c.oldLine.prefix,content:c.oldLine.content,type:ff.DELETE_CHANGES}:Object.assign(Object.assign({},bf(o.content,t)),{type:If(o.type)})),{oldNumber:o.oldNumber,newNumber:o.newNumber}):void 0,u=void 0!==s&&void 0!==s.newNumber?Object.assign(Object.assign({},void 0!==c?{prefix:c.newLine.prefix,content:c.newLine.content,type:ff.INSERT_CHANGES}:Object.assign(Object.assign({},bf(s.content,t)),{type:If(s.type)})),{oldNumber:s.oldNumber,newNumber:s.newNumber}):void 0,{left:f,right:d}=this.generateLineHtml(e,l,u);i.left+=f,i.right+=d}return i}generateLineHtml(e,t,r){return{left:this.generateSingleLineHtml(e,t),right:this.generateSingleLineHtml(e,r)}}generateSingleLineHtml(e,t){if(void 0===t)return"";const r=this.hoganUtils.render(kf,"numbers",{oldNumber:t.oldNumber||"",newNumber:t.newNumber||""});return this.hoganUtils.render(Sf,"line",{type:t.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:" "===t.prefix?"&nbsp;":t.prefix,content:t.content,lineNumber:r,line:t,file:e})}}const qf=Object.assign(Object.assign({},df),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Mf="generic";class Hf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},qf),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(Mf,"wrapper",{colorScheme:yf(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const r=this.hoganUtils.template("side-by-side","file-diff"),n=this.hoganUtils.template(Mf,"file-path"),i=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",Ef(e));return r.render({file:e,fileHtmlId:Bf(e),diffs:t,filePath:n.render({fileDiffName:wf(e)},{fileIcon:i,fileTag:o})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(Mf,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:ff})}}generateFileHtml(e){const t=uf(lf(t=>bf(t.content,e.isCombined).content));return e.blocks.map(r=>{const n={left:this.makeHeaderHtml(r.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(r).forEach(([r,i,o])=>{if(i.length&&o.length&&!r.length)this.applyRematchMatching(i,o,t).map(([t,r])=>{const{left:i,right:o}=this.processChangedLines(e.isCombined,t,r);n.left+=i,n.right+=o});else if(r.length)r.forEach(t=>{const{prefix:r,content:i}=bf(t.content,e.isCombined),{left:o,right:a}=this.generateLineHtml({type:ff.CONTEXT,prefix:r,content:i,number:t.oldNumber},{type:ff.CONTEXT,prefix:r,content:i,number:t.newNumber});n.left+=o,n.right+=a});else if(i.length||o.length){const{left:t,right:r}=this.processChangedLines(e.isCombined,i,o);n.left+=t,n.right+=r}else console.error("Unknown state reached while processing groups of lines",r,i,o)}),n}).reduce((e,t)=>({left:e.left+t.left,right:e.right+t.right}),{left:"",right:""})}applyLineGroupping(e){const t=[];let r=[],n=[];for(let i=0;i<e.lines.length;i++){const o=e.lines[i];(o.type!==Xu.INSERT&&n.length||o.type===Xu.CONTEXT&&r.length>0)&&(t.push([[],r,n]),r=[],n=[]),o.type===Xu.CONTEXT?t.push([[o],[],[]]):o.type===Xu.INSERT&&0===r.length?t.push([[],[],[o]]):o.type===Xu.INSERT&&r.length>0?n.push(o):o.type===Xu.DELETE&&r.push(o)}return(r.length||n.length)&&(t.push([[],r,n]),r=[],n=[]),t}applyRematchMatching(e,t,r){const n=e.length*t.length,i=$u(e.concat(t).map(e=>e.content.length));return n<this.config.matchingMaxComparisons&&i<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?r(e,t):[[e,t]]}makeHeaderHtml(e,t){return this.hoganUtils.render(Mf,"block-header",{CSSLineClass:ff,blockHeader:(null==t?void 0:t.isTooBig)?e:vf(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(e,t,r){const n={right:"",left:""},i=Math.max(t.length,r.length);for(let o=0;o<i;o++){const i=t[o],a=r[o],s=void 0!==i&&void 0!==a?Cf(i.content,a.content,e,this.config):void 0,c=void 0!==i&&void 0!==i.oldNumber?Object.assign(Object.assign({},void 0!==s?{prefix:s.oldLine.prefix,content:s.oldLine.content,type:ff.DELETE_CHANGES}:Object.assign(Object.assign({},bf(i.content,e)),{type:If(i.type)})),{number:i.oldNumber}):void 0,l=void 0!==a&&void 0!==a.newNumber?Object.assign(Object.assign({},void 0!==s?{prefix:s.newLine.prefix,content:s.newLine.content,type:ff.INSERT_CHANGES}:Object.assign(Object.assign({},bf(a.content,e)),{type:If(a.type)})),{number:a.newNumber}):void 0,{left:u,right:f}=this.generateLineHtml(c,l);n.left+=u,n.right+=f}return n}generateLineHtml(e,t){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(t)}}generateSingleHtml(e){const t="d2h-code-side-linenumber",r="d2h-code-side-line";return this.hoganUtils.render(Mf,"line",{type:(null==e?void 0:e.type)||`${ff.CONTEXT} d2h-emptyplaceholder`,lineClass:void 0!==e?t:`${t} d2h-code-side-emptyplaceholder`,contentClass:void 0!==e?r:`${r} d2h-code-side-emptyplaceholder`,prefix:" "===(null==e?void 0:e.prefix)?"&nbsp;":null==e?void 0:e.prefix,content:null==e?void 0:e.content,lineNumber:null==e?void 0:e.number})}}var Lf={};!function(e){!function(e){var t=/\S/,r=/\"/g,n=/\n/g,i=/\r/g,o=/\\/g,a=/\u2028/,s=/\u2029/;function c(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function l(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function u(e,t,r){if(t.charAt(r)!=e.charAt(0))return!1;for(var n=1,i=e.length;n<i;n++)if(t.charAt(r+n)!=e.charAt(n))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(r,n){var i=r.length,o=0,a=null,s=null,f="",d=[],g=!1,p=0,h=0,A="{{",m="}}";function I(){f.length>0&&(d.push({tag:"_t",text:new String(f)}),f="")}function y(r,n){if(I(),r&&function(){for(var r=!0,n=h;n<d.length;n++)if(!(r=e.tags[d[n].tag]<e.tags._v||"_t"==d[n].tag&&null===d[n].text.match(t)))return!1;return r}())for(var i,o=h;o<d.length;o++)d[o].text&&((i=d[o+1])&&">"==i.tag&&(i.indent=d[o].text.toString()),d.splice(o,1));else n||d.push({tag:"\n"});g=!1,h=d.length}function v(e,t){var r="="+m,n=e.indexOf(r,t),i=l(e.substring(e.indexOf("=",t)+1,n)).split(" ");return A=i[0],m=i[i.length-1],n+r.length-1}for(n&&(n=n.split(" "),A=n[0],m=n[1]),p=0;p<i;p++)0==o?u(A,r,p)?(--p,I(),o=1):"\n"==r.charAt(p)?y(g):f+=r.charAt(p):1==o?(p+=A.length-1,"="==(a=(s=e.tags[r.charAt(p+1)])?r.charAt(p+1):"_v")?(p=v(r,p),o=0):(s&&p++,o=2),g=p):u(m,r,p)?(d.push({tag:a,n:l(f),otag:A,ctag:m,i:"/"==a?g-A.length:p+m.length}),f="",p+=m.length-1,o=0,"{"==a&&("}}"==m?p++:c(d[d.length-1]))):f+=r.charAt(p);return y(g,!0),d};var f={_t:!0,"\n":!0,$:!0,"/":!0};function d(t,r,n,i){var o,a=[],s=null,c=null;for(o=n[n.length-1];t.length>0;){if(c=t.shift(),o&&"<"==o.tag&&!(c.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[c.tag]<=e.tags.$||g(c,i))n.push(c),c.nodes=d(t,c.tag,n,i);else{if("/"==c.tag){if(0===n.length)throw new Error("Closing tag without opener: /"+c.n);if(s=n.pop(),c.n!=s.n&&!p(c.n,s.n,i))throw new Error("Nesting error: "+s.n+" vs. "+c.n);return s.end=c.i,a}"\n"==c.tag&&(c.last=0==t.length||"\n"==t[0].tag)}a.push(c)}if(n.length>0)throw new Error("missing closing tag: "+n.pop().n);return a}function g(e,t){for(var r=0,n=t.length;r<n;r++)if(t[r].o==e.n)return e.tag="#",!0}function p(e,t,r){for(var n=0,i=r.length;n<i;n++)if(r[n].c==e&&r[n].o==t)return!0}function h(e){var t=[];for(var r in e.partials)t.push('"'+m(r)+'":{name:"'+m(e.partials[r].name)+'", '+h(e.partials[r])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var r in e)t.push('"'+m(r)+'": function(c,p,t,i) {'+e[r]+"}");return"{ "+t.join(",")+" }"}(e.subs)}e.stringify=function(t,r,n){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+h(t)+"}"};var A=0;function m(e){return e.replace(o,"\\\\").replace(r,'\\"').replace(n,"\\n").replace(i,"\\r").replace(a,"\\u2028").replace(s,"\\u2029")}function I(e){return~e.indexOf(".")?"d":"f"}function y(e,t){var r="<"+(t.prefix||"")+e.n+A++;return t.partials[r]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+m(r)+'",c,p,"'+(e.indent||"")+'"));',r}function v(e,t){t.code+="t.b(t.t(t."+I(e.n)+'("'+m(e.n)+'",c,p,0)));'}function b(e){return"t.b("+e+");"}e.generate=function(t,r,n){A=0;var i={code:"",subs:{},partials:{}};return e.walk(t,i),n.asString?this.stringify(i,r,n):this.makeTemplate(i,r,n)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,r){var n=this.makePartials(e);return n.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(n,t,this,r)},e.makePartials=function(e){var t,r={subs:{},partials:e.partials,name:e.name};for(t in r.partials)r.partials[t]=this.makePartials(r.partials[t]);for(t in e.subs)r.subs[t]=new Function("c","p","t","i",e.subs[t]);return r},e.codegen={"#":function(t,r){r.code+="if(t.s(t."+I(t.n)+'("'+m(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,r),r.code+="});c.pop();}"},"^":function(t,r){r.code+="if(!t.s(t."+I(t.n)+'("'+m(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,r),r.code+="};"},">":y,"<":function(t,r){var n={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,n);var i=r.partials[y(t,r)];i.subs=n.subs,i.partials=n.partials},$:function(t,r){var n={subs:{},code:"",partials:r.partials,prefix:t.n};e.walk(t.nodes,n),r.subs[t.n]=n.code,r.inPartial||(r.code+='t.sub("'+m(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=b('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+I(e.n)+'("'+m(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=b('"'+m(e.text)+'"')},"{":v,"&":v},e.walk=function(t,r){for(var n,i=0,o=t.length;i<o;i++)(n=e.codegen[t[i].tag])&&n(t[i],r);return r},e.parse=function(e,t,r){return d(e,0,[],(r=r||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,r){r=r||{};var n=e.cacheKey(t,r),i=this.cache[n];if(i){var o=i.partials;for(var a in o)delete o[a].instance;return i}return i=this.generate(this.parse(this.scan(t,r.delimiters),t,r),t,r),this.cache[n]=i}}(e)}(Lf);var Uf={};!function(e){!function(e){function t(e,t,r){var n;return t&&"object"==typeof t&&(void 0!==t[e]?n=t[e]:r&&t.get&&"function"==typeof t.get&&(n=t.get(e))),n}e.Template=function(e,t,r,n){e=e||{},this.r=e.code||this.r,this.c=r,this.options=n||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,r){return""},v:function(e){return e=c(e),s.test(e)?e.replace(r,"&amp;").replace(n,"&lt;").replace(i,"&gt;").replace(o,"&#39;").replace(a,"&quot;"):e},t:c,render:function(e,t,r){return this.ri([e],t||{},r)},ri:function(e,t,r){return this.r(e,t,r)},ep:function(e,t){var r=this.partials[e],n=t[r.name];if(r.instance&&r.base==n)return r.instance;if("string"==typeof n){if(!this.c)throw new Error("No compiler available.");n=this.c.compile(n,this.options)}if(!n)return null;if(this.partials[e].base=n,r.subs){for(key in t.stackText||(t.stackText={}),r.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);n=function(e,t,r,n,i,o){function a(){}function s(){}var c;a.prototype=e,s.prototype=e.subs;var l=new a;for(c in l.subs=new s,l.subsText={},l.buf="",n=n||{},l.stackSubs=n,l.subsText=o,t)n[c]||(n[c]=t[c]);for(c in n)l.subs[c]=n[c];for(c in i=i||{},l.stackPartials=i,r)i[c]||(i[c]=r[c]);for(c in i)l.partials[c]=i[c];return l}(n,r.subs,r.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=n,n},rp:function(e,t,r,n){var i=this.ep(e,r);return i?i.ri(t,r,n):""},rs:function(e,t,r){var n=e[e.length-1];if(l(n))for(var i=0;i<n.length;i++)e.push(n[i]),r(e,t,this),e.pop();else r(e,t,this)},s:function(e,t,r,n,i,o,a){var s;return(!l(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,r,n,i,o,a)),s=!!e,!n&&s&&t&&t.push("object"==typeof e?e:t[t.length-1]),s)},d:function(e,r,n,i){var o,a=e.split("."),s=this.f(a[0],r,n,i),c=this.options.modelGet,u=null;if("."===e&&l(r[r.length-2]))s=r[r.length-1];else for(var f=1;f<a.length;f++)void 0!==(o=t(a[f],s,c))?(u=s,s=o):s="";return!(i&&!s)&&(i||"function"!=typeof s||(r.push(u),s=this.mv(s,r,n),r.pop()),s)},f:function(e,r,n,i){for(var o=!1,a=!1,s=this.options.modelGet,c=r.length-1;c>=0;c--)if(void 0!==(o=t(e,r[c],s))){a=!0;break}return a?(i||"function"!=typeof o||(o=this.mv(o,r,n)),o):!i&&""},ls:function(e,t,r,n,i,o){var a=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(c(e.call(t,i,r)),t,n)),this.options.delimiters=a,!1},ct:function(e,t,r){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,r)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,r,n,i,o,a){var s,c=t[t.length-1],l=e.call(c);return"function"==typeof l?!!n||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(l,c,t,r,s.substring(i,o),a)):l},mv:function(e,t,r){var n=t[t.length-1],i=e.call(n);return"function"==typeof i?this.ct(c(i.call(n)),n,r):i},sub:function(e,t,r,n){var i=this.subs[e];i&&(this.activeSub=e,i(t,r,this,n),this.activeSub=!1)}};var r=/&/g,n=/</g,i=/>/g,o=/\'/g,a=/\"/g,s=/[&<>\"\']/;function c(e){return String(null==e?"":e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(e)}(Uf);var Rf=Lf;Rf.Template=Uf.Template,Rf.template=Rf.Template;var Of=Rf;const Tf={};Tf["file-summary-line"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<li class="d2h-file-list-line">'),n.b("\n"+r),n.b(' <span class="d2h-file-name-wrapper">'),n.b("\n"+r),n.b(n.rp("<fileIcon0",e,t," ")),n.b(' <a href="#'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-name">'),n.b(n.v(n.f("fileName",e,t,0))),n.b("</a>"),n.b("\n"+r),n.b(' <span class="d2h-file-stats">'),n.b("\n"+r),n.b(' <span class="d2h-lines-added">'),n.b(n.v(n.f("addedLines",e,t,0))),n.b("</span>"),n.b("\n"+r),n.b(' <span class="d2h-lines-deleted">'),n.b(n.v(n.f("deletedLines",e,t,0))),n.b("</span>"),n.b("\n"+r),n.b(" </span>"),n.b("\n"+r),n.b(" </span>"),n.b("\n"+r),n.b("</li>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}}),Tf["file-summary-wrapper"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-file-list-wrapper '),n.b(n.v(n.f("colorScheme",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="d2h-file-list-header">'),n.b("\n"+r),n.b(' <span class="d2h-file-list-title">Files changed ('),n.b(n.v(n.f("filesNumber",e,t,0))),n.b(")</span>"),n.b("\n"+r),n.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),n.b("\n"+r),n.b(' <a class="d2h-file-switch d2h-show">show</a>'),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(' <ol class="d2h-file-list">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("files",e,t,0))),n.b("\n"+r),n.b(" </ol>"),n.b("\n"+r),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["generic-block-header"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",e,t,0))),n.b(" "),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('"></td>'),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.s(n.f("blockHeader",e,t,1),e,t,0,156,173,"{{ }}")&&(n.rs(e,t,function(e,t,r){r.b(r.t(r.f("blockHeader",e,t,0)))}),e.pop()),n.s(n.f("blockHeader",e,t,1),e,t,1,0,0,"")||n.b("&nbsp;"),n.b("</div>"),n.b("\n"+r),n.b(" </td>"),n.b("\n"+r),n.b("</tr>"),n.fl()},partials:{},subs:{}}),Tf["generic-empty-diff"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.b("\n"+r),n.b(" File without changes"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </td>"),n.b("\n"+r),n.b("</tr>"),n.fl()},partials:{},subs:{}}),Tf["generic-file-path"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-file-name-wrapper">'),n.b("\n"+r),n.b(n.rp("<fileIcon0",e,t," ")),n.b(' <span class="d2h-file-name">'),n.b(n.v(n.f("fileDiffName",e,t,0))),n.b("</span>"),n.b("\n"+r),n.b(n.rp("<fileTag1",e,t," ")),n.b("</span>"),n.b("\n"+r),n.b('<label class="d2h-file-collapse">'),n.b("\n"+r),n.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),n.b("\n"+r),n.b(" Viewed"),n.b("\n"+r),n.b("</label>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}}),Tf["generic-line"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",e,t,0))),n.b(" "),n.b(n.v(n.f("type",e,t,0))),n.b('">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("lineNumber",e,t,0))),n.b("\n"+r),n.b(" </td>"),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.f("type",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.b("\n"+r),n.s(n.f("prefix",e,t,1),e,t,0,162,238,"{{ }}")&&(n.rs(e,t,function(e,t,n){n.b(' <span class="d2h-code-line-prefix">'),n.b(n.t(n.f("prefix",e,t,0))),n.b("</span>"),n.b("\n"+r)}),e.pop()),n.s(n.f("prefix",e,t,1),e,t,1,0,0,"")||(n.b(' <span class="d2h-code-line-prefix">&nbsp;</span>'),n.b("\n"+r)),n.s(n.f("content",e,t,1),e,t,0,371,445,"{{ }}")&&(n.rs(e,t,function(e,t,n){n.b(' <span class="d2h-code-line-ctn">'),n.b(n.t(n.f("content",e,t,0))),n.b("</span>"),n.b("\n"+r)}),e.pop()),n.s(n.f("content",e,t,1),e,t,1,0,0,"")||(n.b(' <span class="d2h-code-line-ctn"><br></span>'),n.b("\n"+r)),n.b(" </div>"),n.b("\n"+r),n.b(" </td>"),n.b("\n"+r),n.b("</tr>"),n.fl()},partials:{},subs:{}}),Tf["generic-wrapper"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-wrapper '),n.b(n.v(n.f("colorScheme",e,t,0))),n.b('">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("content",e,t,0))),n.b("\n"+r),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["icon-file-added"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),n.b("\n"+r),n.b(' width="14">'),n.b("\n"+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["icon-file-changed"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),n.b("\n"+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b("\n"+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["icon-file-deleted"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),n.b("\n"+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b("\n"+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["icon-file-renamed"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),n.b("\n"+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b("\n"+r),n.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["icon-file"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),n.b("\n"+r),n.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["line-by-line-file-diff"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="d2h-file-header">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(' <div class="d2h-file-diff">'),n.b("\n"+r),n.b(' <div class="d2h-code-wrapper">'),n.b("\n"+r),n.b(' <table class="d2h-diff-table">'),n.b("\n"+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("diffs",e,t,0))),n.b("\n"+r),n.b(" </tbody>"),n.b("\n"+r),n.b(" </table>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["line-by-line-numbers"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="line-num1">'),n.b(n.v(n.f("oldNumber",e,t,0))),n.b("</div>"),n.b("\n"+r),n.b('<div class="line-num2">'),n.b(n.v(n.f("newNumber",e,t,0))),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["side-by-side-file-diff"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="d2h-file-header">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(' <div class="d2h-files-diff">'),n.b("\n"+r),n.b(' <div class="d2h-file-side-diff">'),n.b("\n"+r),n.b(' <div class="d2h-code-wrapper">'),n.b("\n"+r),n.b(' <table class="d2h-diff-table">'),n.b("\n"+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.d("diffs.left",e,t,0))),n.b("\n"+r),n.b(" </tbody>"),n.b("\n"+r),n.b(" </table>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(' <div class="d2h-file-side-diff">'),n.b("\n"+r),n.b(' <div class="d2h-code-wrapper">'),n.b("\n"+r),n.b(' <table class="d2h-diff-table">'),n.b("\n"+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.d("diffs.right",e,t,0))),n.b("\n"+r),n.b(" </tbody>"),n.b("\n"+r),n.b(" </table>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["tag-file-added"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),n.fl()},partials:{},subs:{}}),Tf["tag-file-changed"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),n.fl()},partials:{},subs:{}}),Tf["tag-file-deleted"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),n.fl()},partials:{},subs:{}}),Tf["tag-file-renamed"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),n.fl()},partials:{},subs:{}});class Yf{constructor({compiledTemplates:e={},rawTemplates:t={}}){const r=Object.entries(t).reduce((e,[t,r])=>{const n=Of.compile(r,{asString:!1});return Object.assign(Object.assign({},e),{[t]:n})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},Tf),e),r)}static compile(e){return Of.compile(e,{asString:!1})}render(e,t,r,n,i){const o=this.templateKey(e,t);try{return this.preCompiledTemplates[o].render(r,n,i)}catch(e){throw new Error(`Could not find template to render '${o}'`)}}template(e,t){return this.preCompiledTemplates[this.templateKey(e,t)]}templateKey(e,t){return`${e}-${t}`}}const jf=Object.assign(Object.assign(Object.assign({},Qf),qf),{outputFormat:"line-by-line",drawFileList:!0});var Gf=Object.freeze({__proto__:null,defaultDiff2HtmlConfig:jf,html:function(e,t={}){const r=Object.assign(Object.assign({},jf),t),n="string"==typeof e?nf(e,r):e,i=new Yf(r),{colorScheme:o}=r,a={colorScheme:o};return(r.drawFileList?new Ff(i,a).render(n):"")+("side-by-side"===r.outputFormat?new Hf(i,r).render(n):new Nf(i,r).render(n))},parse:function(e,t={}){return nf(e,Object.assign(Object.assign({},jf),t))}});function Jf(){if("[object Module]"===Object.prototype.toString.call(Gf))return Gf;let e=yn(),t=we(e,"Diff2Html.default",null),r=we(e,"Diff2Html",null),n="html";if(Ee(t)&&va(t[n]))return t;if(Ee(r)&&va(r[n]))return r;throw console.log("Diff2Html",Gf,"g.Diff2Html",e.Diff2Html),new Error("invalid Diff2Html, g.Diff2Html, g.Diff2Html.default, use script for import")}function zf(e){return document.querySelectorAll(e)}function Vf(e){function t(e){e.parentNode.removeChild(e)}if(br(e)){return void t(e)}if(!De(e))return;Er(zf(e),function(e){t(e)})}function Pf(e,t){if(!br(e))return"invalid eleParent";if(xe(t))e.insertAdjacentHTML("afterbegin",t);else{if(!br(t))return"invalid itemChild";e.insertBefore(t,e.firstChild)}}async function Xf(e,t={}){if(!br(e))return Promise.reject("invalid ele");let r=we(t,"scale",null);if(Se(r)||(r=1),r=Mn(r),r<1)return Promise.reject("opt.scale can not less then 1");let n=we(t,"picType",null);"image/jpg"!==n&&"image/jpeg"!==n&&"image/png"!==n&&"svg"!==n&&(n="image/png");let i=we(t,"toBase64",null);pn(i)||(i=!0);let o=e.cloneNode(!0),a=document.createElement("div");a.style.position="absolute",a.style.top=0,a.style.left=0,a.style.zIndex=-1,a.appendChild(o);let s=document.createElement("div");s.style.opacity=0,s.style.position="relative",s.appendChild(a),Pf(document.querySelector("body"),s);let c,l=yn().snapdom,u={scale:r,quality:1,cache:"disabled"};return"image/jpg"===n||"image/jpeg"===n?c=await l.toJpg(a,u):"image/png"===n?c=await l.toPng(a,u):"svg"===n&&(c=await l.toSvg(a,u)),i&&(c=we(c,"src","")),Vf(s),c}var _f=Ra(Fa);function Wf(e){let t=function(e,r){return null===e.parentNode?r:t(e.parentNode,r.concat([e]))};return e instanceof HTMLElement||e instanceof SVGElement?t(e.parentNode,[]):[]}function Kf(e){let t=we(e,"clientX",null),r=we(e,"clientY",null),n=we(e,"pageX",null),i=we(e,"pageY",null);if(null!==t&&null!==r&&null!==n&&null!==i)return{clientX:t,clientY:r,pageX:n,pageY:i};let o=we(e,"changedTouches",[]);if(1!==dn(o))return null;let a=o[0];return{clientX:we(a,"clientX",null),clientY:we(a,"clientY",null),pageX:we(a,"pageX",null),pageY:we(a,"pageY",null)}}function $f(e,t){let r=[];try{r=document.elementsFromPoint(e,t)}catch(e){console.log(e)}return r}function Zf(e,t){if(!br(e))return null;if(!De(t))return null;try{return e.getAttribute(t)}catch(e){}return null}function ed(e){if(!br(e))return null;try{return e.getBoundingClientRect()}catch(e){}return null}function td(e,t){if(!Ee(e))return null;if(!Ia(e.clientX)||!Ia(e.clientY))return null;if(!br(t))return null;let r=ed(t);return r?{x:e.clientX-r.left,y:e.clientY-r.top,w:t.offsetWidth,h:t.offsetHeight}:null}function rd(e={}){let t="dragpreviewid",r=null,n=null,i=null,o=null,a=null,s=!1,c=we(e,"attIdentify",null);De(c)||(c="dragprevid");let l=we(e,"containerOpacity",null);Ia(l)||(l=.4);let u=we(e,"containerBackground",null);De(u)||(u="white");let f=we(e,"containerBorderWidth",null);Ia(f)||(f=1);let d=we(e,"containerBorderColor",null);De(d)||(d="#f26");let g=`c${Hu(8)}`;function p(e,t,r){n&&i&&o&&a&&!s&&(a.style.top=t-n.tShiftY+"px",a.style.left=e-n.tShiftX+"px")}function h(){Vf(`[${t}='${g}']`),n=null,i=null,o=null,a=null}let A=function(e){p(e.clientX,e.clientY)};window.addEventListener("mousemove",A);let m=function(e){let t=Kf(e);t&&p(t.clientX,t.clientY)};return window.addEventListener("touchmove",m),{createPreview:function(e,s,A){try{!function(){let h=function(e,t,n){let i=ed(e);if(!i)return null;r=e;let o=e.cloneNode(!0);return o.tShiftX=t-i.left,o.tShiftY=n-i.top,o.tWidth=e.offsetWidth,o.tHeight=e.offsetHeight,o.tParent=e.parentNode,o.setAttribute(c,""),o}(e,s,A);if(null===h)return;let m=document.createElement("div");m.style.position="absolute",m.style.zIndex=1,m.style.top=0,m.style.left=0,m.style.width="100%",m.style.height="100%",m.appendChild(h);let I=document.createElement("div");I.style.position="relative",I.appendChild(m);let y=document.createElement("div");y.setAttribute(t,g),y.style.position="fixed",y.style.zIndex=1e5,y.style.width=`${h.tWidth+2*f}px`,y.style.height=`${h.tHeight+2*f}px`,y.style.opacity=l,y.style.background=u,y.style.border=`${f}px solid ${d}`,y.style.pointerEvents="none",y.appendChild(I),document.querySelector("body").appendChild(y),n=h,i=m,o=I,a=y,p(s,A)}()}catch(e){}let m=setInterval(()=>{let e=Zf(r,c);document.querySelector(`[${c}='${e}']`)||(clearInterval(m),h())},500)},updateDragPreview:p,pauseDragPreview:function(e){s=e},removeDragPreview:h,setNodeStyle:function(e){try{Er(e,(e,t)=>{n.style[t]=e})}catch(e){}},setCoverStyle:function(e){try{Er(e,(e,t)=>{i.style[t]=e})}catch(e){}},setSellStyle:function(e){try{Er(e,(e,t)=>{o.style[t]=e})}catch(e){}},setContainerStyle:function(e){try{Er(e,(e,t)=>{a.style[t]=e})}catch(e){}},clear:function(){window.removeEventListener("mousemove",A),window.removeEventListener("touchmove",m)}}}let nd={};function id(e,t,{attIdentify:r,previewOpacity:n,previewBackground:i,previewBorderWidth:o,previewBorderColor:a}){if(!ke(nd,e)){let t=Xi(),s=function(e){let t=[];function r(){let r;r="mousemove";let n=function(t){e.dragMove({e:t,name:"mousemove"})};window.addEventListener(r,n),t.push({ele:window,name:r,f:n}),r="mouseup";let i=function(t){e.dragDrop({e:t,name:"mouseup"})};window.addEventListener(r,i),t.push({ele:window,name:r,f:i}),r="touchmove";let o=function(t){e.dragMove({e:t,name:"touchmove"})};window.addEventListener(r,o),t.push({ele:window,name:r,f:o}),r="touchend";let a=function(t){e.dragDrop({e:t,name:"touchend"})};window.addEventListener(r,a),t.push({ele:window,name:r,f:a})}function n(){Er(t,({ele:e,name:t,f:r})=>{e.removeEventListener(t,r)})}return{bind:r,unbind:n}}({dragMove:r=>{t.emit(e+"-dragMove",r)},dragDrop:r=>{t.emit(e+"-dragDrop",r)}});s.bind();let c=rd({attIdentify:r,containerOpacity:n,containerBackground:i,containerBorderWidth:o,containerBorderColor:a});nd[e]={eleIds:[],evg:t,oevg:s,pv:c,isInit:!1,isActive:!0}}return nd[e].eleIds.push(t),nd[e].evg}function od(e,t){let r=Zf(e,t);return r=Zi(r),r}function ad({gid:e,attGroup:t,attIndex:r,attIdentify:n,timeDragStartDelay:i,previewOpacity:o,previewDisabledOpacity:a}){let s=null,c=null,l=null,u=null;if(nd[e].isInit)return nd[e].evg;nd[e].isInit=!0;let f=nd[e].evg;f.on(e+"-dragStart",function({e:t,ele:o,from:l}){if(!nd[e].isActive)return;let u=od(o,r);if(null===u)return;s=u,c=o;let g={event:t,startInd:s,startEle:c,tarInd:s,tarEid:Zf(c,n)};f.emit(e+"-change",{mode:"start",...g}),f.emit(e+"-start",g);let p=Kf(t);if(!p)return;setTimeout(()=>{null!==s&&(d.createPreview(c,p.clientX,p.clientY),d.setContainerStyle({opacity:a}))},i)}),f.on(e+"-dragMove",function({e:i,name:g,from:p}){if(!nd[e].isActive)return;let h=function(e,t,r){let n=null;return Er(Wf(e.target),e=>{if(Zf(e,t)===r)return n=e,!1}),n}(i,t,e);if(null===s)return;let A=Kf(i);if(!A)return;function m(){let t={event:i,startInd:s,startEle:c,endInd:l,endEle:u,tarInd:l,tarEid:Zf(u,n)};f.emit(e+"-change",{mode:"leave",...t}),f.emit(e+"-leave",t),l=null,u=null,d.setContainerStyle({opacity:a})}if(!h)return void(null!==l&&m());let I=od(h,r);if(null===I)return;if(I===s)return void(null!==l&&m());if(I!==l)null!==l&&m(),function(t,r){l=t,u=r;let a={event:i,startInd:s,startEle:c,endInd:l,endEle:u,tarInd:l,tarEid:Zf(u,n)};f.emit(e+"-change",{mode:"enter",...a}),f.emit(e+"-enter",a),d.setContainerStyle({opacity:o})}(I,h);else{let t=td(A,h),r=0;t.w>0&&(r=t.x/t.w);let a=0;t.h>0&&(a=t.y/t.h),r>=0&&r<=1&&a>=0&&a<=1&&function(t,r,a){let g={event:i,startInd:s,startEle:c,endInd:l,endEle:u,tarInd:l,tarEid:Zf(u,n),...t,rx:r,ry:a};f.emit(e+"-change",{mode:"move",...g}),f.emit(e+"-move",g),d.setContainerStyle({opacity:o})}(t,r,a)}}),f.on(e+"-dragDrop",function({e:i,name:o,from:a}){if(d.removeDragPreview(),!nd[e].isActive)return;if(null===s)return;let g=function(e,t,r){let n=null,i=Kf(e);return i?(Er($f(i.clientX,i.clientY),e=>{if(Zf(e,t)===r)return n=e,!1}),n):n}(i,t,e);if(!g)return s=null,c=null,l=null,void(u=null);let p=od(g,r);if(null===p)return;(function(t,r){l=t,u=r;let o={event:i,startInd:s,startEle:c,endInd:l,endEle:u,tarInd:l,tarEid:Zf(u,n)};f.emit(e+"-change",{mode:"drop",...o}),f.emit(e+"-drop",o)})(p,g),s=null,c=null,l=null,u=null});let d=nd[e].pv}async function sd(e){let t=[],r=ns();return await async function e(r){let n=null;if(r.isFile&&(n=await function(e){let t=ns();try{e.file(t.resolve,t.reject)}catch(e){t.reject(e)}return t}(r)),t.push({type:r.isDirectory?"folder":r.isFile?"file":"unknow",path:r.fullPath,name:r.name,entry:r,file:n}),r.isDirectory){let t=r.createReader(),n=await function(e){let t=ns();try{e.readEntries(t.resolve,t.reject)}catch(e){t.reject(e)}return t}(t);await cl(n,async t=>{await e(t)})}}(e),r.resolve(t),r}async function cd(e){let t=[];Er(e,e=>{let r=e.webkitGetAsEntry();r&&t.push(r)});let r=await async function(e){let t=[];return await cl(e,async e=>{Er(await sd(e),e=>{t.push(e)})}),t}(t);return r}async function ld(e){let t=[],r=[];try{t=await async function(e){let t=[];return Er(e,e=>{e.type&&t.push({type:"file",name:e.name,file:e})}),t}(we(e,"files",[])),Vu()||(r=await cd(we(e,"items",[])).catch(e=>{console.log(e)}))}catch(e){return Promise.reject(e)}return{files:t,entries:r}}function ud(e){return document.querySelector(e)}function fd(e){return!Ur(e)}var dd=Math.max;var gd,pd=(gd=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:qn(r);return i<0&&(i=dd(n+i,0)),Or(e,fr(t),i)},function(e,t,r){var n=Object(e);if(!ft(e)){var i=fr(t);e=dt(e),t=function(e){return i(n[e],e,n)}}var o=gd(e,t,r);return o>-1?n[i?e[o]:o]:void 0});let hd=[{name:"pic",group:"image",acp:"image/*",exec:"imageviwer"},{name:"xml",group:"data",acp:"text/xml",exec:"textviwer"},{name:"htm",group:"docums",acp:"text/html",exec:"browser"},{name:"html",group:"docums",acp:"text/html",exec:"browser"},{name:"json",group:"data",acp:"application/json",exec:"textviwer"},{name:"geojson",group:"data",acp:"application/geo+json",exec:"textviwer"},{name:"txt",group:"data",acp:"text/plain",exec:"textviwer"},{name:"csv",group:"data",acp:"text/csv",exec:"excel"},{name:"dat",group:"data",acp:"application/octet-stream",exec:"binaryviwer"},{name:"7z",group:"compress",acp:"application/x-7z-compressed",exec:"compressor"},{name:"bzip",group:"compress",acp:"application/x-bzip",exec:"7z"},{name:"bzip2",group:"compress",acp:"application/x-bzip2",exec:"compressor"},{name:"bz2",group:"compress",acp:"application/x-bzip2",exec:"compressor"},{name:"ace",group:"compress",acp:"application/x-ace-compressed",exec:"compressor"},{name:"Z",group:"compress",acp:"application/x-compress",exec:"compressor"},{name:"lzh",group:"compress",acp:"application/x-lzh-compressed",exec:"compressor"},{name:"lz",group:"compress",acp:"application/x-lzip",exec:"compressor"},{name:"rar",group:"compress",acp:"application/x-rar-compressed",exec:"compressor"},{name:"tar",group:"compress",acp:"application/x-tar",exec:"compressor"},{name:"ar",group:"compress",acp:"application/x-unix-archive",exec:"compressor"},{name:"zip",group:"compress",acp:"application/zip",exec:"compressor"},{name:"gz",group:"compress",acp:"application/gzip",exec:"compressor"},{name:"avro",group:"",acp:"application/avro",exec:""},{name:"dcm",group:"",acp:"application/dicom",exec:""},{name:"eps",group:"",acp:"application/eps",exec:""},{name:"epub",group:"",acp:"application/epub+zip",exec:""},{name:"class",group:"",acp:"application/java-vm",exec:""},{name:"mxf",group:"",acp:"application/mxf",exec:""},{name:"ogx",group:"",acp:"application/ogg",exec:""},{name:"pdf",group:"docums",acp:"application/pdf",exec:"acrobat"},{name:"pgp",group:"",acp:"application/pgp-encrypted",exec:""},{name:"ps",group:"",acp:"application/postscript",exec:""},{name:"ai",group:"",acp:"application/postscript",exec:""},{name:"rtf",group:"docums",acp:"application/rtf",exec:"word"},{name:"icc",group:"",acp:"application/vnd.iccprofile",exec:""},{name:"asf",group:"",acp:"application/vnd.ms-asf",exec:"",msg:"asf的acp可能為application/vnd.ms-asf或audio/x-ms-asf或video/x-ms-asf"},{name:"cab",group:"",acp:"application/vnd.ms-cab-compressed",exec:""},{name:"eot",group:"",acp:"application/vnd.ms-fontobject",exec:""},{name:"chm",group:"",acp:"application/vnd.ms-htmlhelp",exec:""},{name:"pst",group:"",acp:"application/vnd.ms-outlook",exec:""},{name:"odp",group:"docums",acp:"application/vnd.oasis.opendocument.presentation",exec:"powerpoint"},{name:"ods",group:"docums",acp:"application/vnd.oasis.opendocument.spreadsheet",exec:"excel"},{name:"odt",group:"docums",acp:"application/vnd.oasis.opendocument.text",exec:"word"},{name:"ppt",group:"docums",acp:"application/vnd.ms-powerpoint",exec:"powerpoint"},{name:"pptx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.presentationml.presentation",exec:"powerpoint"},{name:"xls",group:"docums",acp:"application/vnd.ms-excel",exec:"excel"},{name:"xlsx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",exec:"excel"},{name:"doc",group:"docums",acp:"application/msword",exec:"word"},{name:"docx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",exec:"word"},{name:"skp",group:"",acp:"application/vnd.sketchup.skp",exec:""},{name:"pcap",group:"",acp:"application/vnd.tcpdump.pcap",exec:""},{name:"wasm",group:"",acp:"application/wasm",exec:""},{name:"arrow",group:"",acp:"application/x-apache-arrow",exec:""},{name:"dmg",group:"",acp:"application/x-apple-diskimage",exec:""},{name:"arj",group:"",acp:"application/x-arj",exec:""},{name:"asar",group:"",acp:"application/x-asar",exec:""},{name:"blend",group:"",acp:"application/x-blender",exec:"blender"},{name:"cfb",group:"",acp:"application/x-cfb",exec:""},{name:"cpio",group:"",acp:"application/x-cpio",exec:""},{name:"deb",group:"",acp:"application/x-deb",exec:""},{name:"elf",group:"",acp:"application/x-elf",exec:""},{name:"shp",group:"",acp:"application/x-esri-shape",exec:""},{name:"crx",group:"",acp:"application/x-google-chrome-extension",exec:""},{name:"indd",group:"",acp:"application/x-indesign",exec:""},{name:"macho",group:"",acp:"application/x-mach-binary",exec:""},{name:"mie",group:"",acp:"application/x-mie",exec:""},{name:"mobi",group:"",acp:"application/x-mobipocket-ebook",exec:""},{name:"exe",group:"",acp:"application/x-msdownload",exec:""},{name:"nes",group:"",acp:"application/x-nintendo-nes-rom",exec:""},{name:"parquet",group:"",acp:"application/x-parquet",exec:""},{name:"rpm",group:"",acp:"application/x-rpm",exec:""},{name:"swf",group:"",acp:"application/x-shockwave-flash",exec:""},{name:"sqlite",group:"",acp:"application/x-sqlite3",exec:""},{name:"xpi",group:"",acp:"application/x-xpinstall",exec:""},{name:"xz",group:"",acp:"application/x-xz",exec:""},{name:"alias",group:"",acp:"application/x.apple.alias",exec:""},{name:"fbx",group:"",acp:"application/x.autodesk.fbx",exec:""},{name:"lnk",group:"",acp:"application/x.ms.shortcut",exec:""},{name:"zst",group:"",acp:"application/zstd",exec:""},{name:"aac",group:"audio",acp:"audio/aac",exec:"audioplayer"},{name:"aif",group:"audio",acp:"audio/aiff",exec:"audioplayer"},{name:"amr",group:"audio",acp:"audio/amr",exec:"audioplayer"},{name:"ape",group:"audio",acp:"audio/ape",exec:"audioplayer"},{name:"mid",group:"audio",acp:"audio/midi",exec:"audioplayer"},{name:"m4b",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"f4a",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"f4b",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"mp3",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"mp2",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"mp1",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"oga",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"spx",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"ogg",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"opus",group:"audio",acp:"audio/opus",exec:"audioplayer"},{name:"qcp",group:"audio",acp:"audio/qcelp",exec:"audioplayer"},{name:"ac3",group:"audio",acp:"audio/vnd.dolby.dd-raw",exec:"audioplayer"},{name:"wav",group:"audio",acp:"audio/wav",exec:"audioplayer"},{name:"wv",group:"audio",acp:"audio/wavpack",exec:"audioplayer"},{name:"dsf",group:"audio",acp:"audio/x-dsf",exec:"audioplayer"},{name:"flac",group:"audio",acp:"audio/x-flac",exec:"audioplayer"},{name:"it",group:"audio",acp:"audio/x-it",exec:"audioplayer"},{name:"m4a",group:"audio",acp:"audio/x-m4a",exec:"audioplayer"},{name:"mpc",group:"audio",acp:"audio/x-musepack",exec:"audioplayer"},{name:"s3m",group:"audio",acp:"audio/x-s3m",exec:"audioplayer"},{name:"voc",group:"audio",acp:"audio/x-voc",exec:"audioplayer"},{name:"xm",group:"audio",acp:"audio/x-xm",exec:"audioplayer"},{name:"otf",group:"",acp:"font/otf",exec:""},{name:"ttf",group:"",acp:"font/ttf",exec:""},{name:"woff",group:"",acp:"font/woff",exec:""},{name:"woff2",group:"",acp:"font/woff2",exec:""},{name:"apng",group:"image",acp:"image/apng",exec:"imageviwer"},{name:"avif",group:"image",acp:"image/avif",exec:"imageviwer"},{name:"bmp",group:"image",acp:"image/bmp",exec:"imageviwer"},{name:"bpg",group:"image",acp:"image/bpg",exec:"imageviwer"},{name:"flif",group:"image",acp:"image/flif",exec:"imageviwer"},{name:"gif",group:"image",acp:"image/gif",exec:"imageviwer"},{name:"heic",group:"image",acp:"image/heif",exec:"imageviwer"},{name:"icns",group:"image",acp:"image/icns",exec:"imageviwer"},{name:"j2c",group:"image",acp:"image/j2c",exec:"imageviwer"},{name:"jls",group:"image",acp:"image/jls",exec:"imageviwer"},{name:"jp2",group:"image",acp:"image/jp2",exec:"imageviwer"},{name:"jpg",group:"image",acp:"image/jpeg",exec:"imageviwer"},{name:"jpm",group:"image",acp:"image/jpm",exec:"imageviwer"},{name:"jpx",group:"image",acp:"image/jpx",exec:"imageviwer"},{name:"jxl",group:"image",acp:"image/jxl",exec:"imageviwer"},{name:"ktx",group:"image",acp:"image/ktx",exec:"imageviwer"},{name:"mj2",group:"image",acp:"image/mj2",exec:"imageviwer"},{name:"png",group:"image",acp:"image/png",exec:"imageviwer"},{name:"tif",group:"image",acp:"image/tiff",exec:"imageviwer"},{name:"psd",group:"image",acp:"image/vnd.adobe.photoshop",exec:"imageviwer"},{name:"dwg",group:"image",acp:"image/vnd.dwg",exec:"imageviwer"},{name:"jxr",group:"image",acp:"image/vnd.ms-photo",exec:"imageviwer"},{name:"webp",group:"image",acp:"image/webp",exec:"imageviwer"},{name:"dng",group:"image",acp:"image/x-adobe-dng",exec:"imageviwer"},{name:"cr2",group:"image",acp:"image/x-canon-cr2",exec:"imageviwer"},{name:"cr3",group:"image",acp:"image/x-canon-cr3",exec:"imageviwer"},{name:"raf",group:"image",acp:"image/x-fujifilm-raf",exec:"imageviwer"},{name:"ico",group:"image",acp:"image/x-icon",exec:"imageviwer"},{name:"cur",group:"image",acp:"image/x-icon",exec:"imageviwer"},{name:"nef",group:"image",acp:"image/x-nikon-nef",exec:"imageviwer"},{name:"orf",group:"image",acp:"image/x-olympus-orf",exec:"imageviwer"},{name:"rw2",group:"image",acp:"image/x-panasonic-rw2",exec:"imageviwer"},{name:"arw",group:"image",acp:"image/x-sony-arw",exec:"imageviwer"},{name:"xcf",group:"image",acp:"image/x-xcf",exec:"imageviwer"},{name:"3mf",group:"",acp:"model/3mf",exec:""},{name:"glb",group:"",acp:"model/gltf-binary",exec:""},{name:"stl",group:"",acp:"model/stl",exec:""},{name:"ics",group:"",acp:"text/calendar",exec:""},{name:"vcf",group:"",acp:"text/vcard",exec:""},{name:"3gp",group:"video",acp:"video/3gpp",exec:"videoplayer"},{name:"3g2",group:"video",acp:"video/3gpp2",exec:"videoplayer"},{name:"m2p",group:"video",acp:"video/MP2P",exec:"videoplayer"},{name:"vob",group:"video",acp:"video/MP2P",exec:"videoplayer"},{name:"sub",group:"video",acp:"video/MP2P",exec:"videoplayer",msg:"與字幕檔衝突"},{name:"mts",group:"video",acp:"video/mp2t",exec:"videoplayer"},{name:"m4p",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"f4v",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"f4p",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"mp4",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"mpg",group:"video",acp:"video/mpeg",exec:"videoplayer",msg:"mpg可能為mpeg或video/MP1S或video/MP2S"},{name:"ogv",group:"video",acp:"video/ogg",exec:"videoplayer"},{name:"ogm",group:"video",acp:"video/ogg",exec:"videoplayer"},{name:"mov",group:"video",acp:"video/quicktime",exec:"videoplayer"},{name:"avi",group:"video",acp:"video/vnd.avi",exec:"videoplayer"},{name:"webm",group:"video",acp:"video/webm",exec:"videoplayer"},{name:"flv",group:"video",acp:"video/x-flv",exec:"videoplayer"},{name:"m4v",group:"video",acp:"video/x-m4v",exec:"videoplayer"},{name:"mkv",group:"video",acp:"video/x-matroska",exec:"videoplayer"}];function Ad(e=""){let t=null;return De(e)?(t=pd(hd,{name:e}),Ee(t)||(t=null)):t=hd,t}function md(e=""){if(""!==e&&"name"!==e&&"group"!==e&&"acp"!==e&&"exec"!==e)return[];let t=Ad();if(""===e)return t;let r={};return Er(t,function(t){let n=t[e];ke(r,n)||(r[n]=[]),r[n].push(t)}),r}function Id(e="*"){if("*"===e)return e;if(!xe(e)&&!Rr(e))return"*";"common"===e&&(e=["docums","compress","image","data"]);let t=md();function r(e){return Pr(xr(e,"acp"))}xe(e)&&(e=[e]);let n="";if(Rr(e)){let i=xr(e,function(e){return function(e){return r(pa(t,{group:e}))}(e)}),o=kr(i,xr(e,function(e){return r(pa(t,{name:e}))}));o=pa(o,fd),n=xo(o,",")}return n}function yd(e,t=1e3){(t=Mn(t))<=0&&(t=1e3);let r={},n=[];return Er(we(e,"files",[]),function(e,i){let o=e.size/1024/1024;o>t&&(r[i]=`file size[${o}]mb > ${t}mb`),n.push(e)}),{files:n,errs:r}}function vd(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],a=t(o);if(null!=a&&(void 0===s?a==a&&!q(a):r(a,s)))var s=a,c=o}return c}function bd(e,t){return e<t}function wd(e){return e&&e.length?vd(e,cr,bd):void 0}function Bd(){return!function(){try{return"IntersectionObserver"in window}catch(e){return!1}}()||!function(){try{return"IntersectionObserverEntry"in window}catch(e){return!1}}()||!(function(){try{return"intersectionRatio"in window.IntersectionObserverEntry.prototype}catch(e){return!1}}()||va(window.IntersectionObserverEntry))}function Ed(e,t,r={}){if(!br(e))return Promise.reject("invalid ele");let n=yn().markmap,{Transformer:i,Markmap:o,loadCSS:a,loadJS:s}=n,c=e=>{let t=new i,{root:r,features:n}=t.transform(e),{styles:o,scripts:a}=t.getUsedAssets(n);return{root:r,features:n,styles:o,scripts:a}},{root:l,styles:u,scripts:f}=c(t);u&&a(u),f&&s(f,{getMarkmap:()=>n}),e.innerHTML="";let d=o.create(e,null,l);return d.transMarkdown=c,d}const Cd=e=>void 0===e||"auto"===e||"instant"===e||"smooth"===e;function xd(e,t){this.scrollLeft=e,this.scrollTop=t}const Dd=(e,t,r="cannot convert to dictionary.")=>`Failed to execute '${e}' on '${t}': ${r}`,Fd=(e,t,r)=>Dd(e,t,`The provided value '${r}' is not a valid enum value of type ScrollBehavior.`),Qd=(e,t,r)=>{var n;const i=`__SEAMLESS.BACKUP$${t}`;return e[i]||!e[t]||(null===(n=e[t])||void 0===n?void 0:n.__isPolyfill)||(e[i]=e[t]),e[i]||r},Sd=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},kd=e=>"scrollBehavior"in window.document.documentElement.style&&!0!==(null==e?void 0:e.forcePolyfill),Nd=e=>{Object.defineProperty(e,"__isPolyfill",{value:!0})},qd=(e,t)=>{Nd(t),[HTMLElement.prototype,SVGElement.prototype,Element.prototype].forEach(r=>{Qd(r,e),r[e]=t})},Md=e=>e.ownerDocument.scrollingElement||e.ownerDocument.documentElement;const Hd=e=>.5*(1-Math.cos(Math.PI*e));function Ld(){var e;let t;return t=(null===(e=window.performance)||void 0===e?void 0:e.now)?()=>window.performance.now():()=>window.Date.now(),Ld=t,t()}const Ud=e=>{const t=(Ld()-e.timeStamp)/(e.duration||500);if(t>1)return e.method(e.targetX,e.targetY),void e.callback();const r=(e.timingFunc||Hd)(t),n=e.startX+(e.targetX-e.startX)*r,i=e.startY+(e.targetY-e.startY)*r;e.method(n,i),e.rafId=window.requestAnimationFrame(()=>{Ud(e)})},Rd=e=>isFinite(e)?Number(e):0,Od=(e,t,r)=>{var n,i;if(!(e=>{var t;return null!==(t=e.isConnected)&&void 0!==t?t:!(e.ownerDocument&&1&e.ownerDocument.compareDocumentPosition(e))})(e))return;const o=e.scrollLeft,a=e.scrollTop,s=Rd(null!==(n=t.left)&&void 0!==n?n:o),c=Rd(null!==(i=t.top)&&void 0!==i?i:a);if(s===o&&c===a)return;const l=Qd(HTMLElement.prototype,"scroll",xd),u=Qd(Object.getPrototypeOf(e),"scroll",l).bind(e);if("smooth"!==t.behavior)return void u(s,c);const f=()=>{window.removeEventListener("wheel",g),window.removeEventListener("touchmove",g)},d=Object.assign(Object.assign({},r),{timeStamp:Ld(),startX:o,startY:a,targetX:s,targetY:c,rafId:0,method:u,callback:()=>{f();const t=9===e.nodeType;e.dispatchEvent(function(e){if("function"==typeof Event)return new Event("scrollend",{bubbles:e,cancelable:!1});const t=document.createEvent("Event");return t.initEvent("scrollend",e,!1),t}(t))}}),g=()=>{window.cancelAnimationFrame(d.rafId),f()};window.addEventListener("wheel",g,{passive:!0,once:!0}),window.addEventListener("touchmove",g,{passive:!0,once:!0}),Ud(d)},Td=e=>(t,r,n)=>{const[i,o]=(a=t).window===a?[Md(t.document.documentElement),"Window"]:[t,"Element"];var a;const s=null!=r?r:{};if(!Sd(s))throw new TypeError(Dd(e,o));if(!Cd(s.behavior))throw new TypeError(Fd(e,o,s.behavior));"scrollBy"===e&&(s.left=Rd(s.left)+i.scrollLeft,s.top=Rd(s.top)+i.scrollTop),Od(i,s,n)},Yd=Td("scroll"),jd=Td("scrollTo"),Gd=Td("scrollBy"),Jd=Yd,zd=e=>{switch(e){case"horizontal-tb":case"lr":case"lr-tb":case"rl":case"rl-tb":return 0;case"vertical-rl":case"tb":case"tb-rl":return 1;case"vertical-lr":case"tb-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4}return 0},Vd=(e,t,r,n)=>{let i=0;switch(t||(i^=2),e){case 0:i=i>>1|(1&i)<<1,[r,n]=[n,r];break;case 1:case 3:i^=1;break;case 4:i^=2}return[i,r,n]},Pd=e=>!(1&~Vd(zd(e.writingMode),"rtl"!==e.direction,void 0,void 0)[0]),Xd=(e,t,r,n,i,o,a)=>0!==e?e:i<t&&o>r||i>t&&o<r?null:i<=t&&a<=n||o>=r&&a>=n?2:o>r&&a<n||i<t&&a>n?3:null,_d=e=>"visible"!==e&&"clip"!==e,Wd=(e,t)=>(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth)&&(_d(t.overflowY)||_d(t.overflowX)||e===Md(e)),Kd=e=>{const t=e.parentNode,r=e.parentElement;if(null===r&&null!==t){if(11===t.nodeType)return t.host;if(9===t.nodeType)return(e=>{var t;try{return(null===(t=e.ownerDocument.defaultView)||void 0===t?void 0:t.frameElement)||null}catch(e){return null}})(e)}return r},$d=(e,t,r)=>e<t?t:e>r?r:e,Zd=(e,t,r)=>{switch(e){case 1:return(t+r)/2;case 3:return r;case 2:case 0:return t}},eg=(e,t)=>{var r,n,i;const o=null===(r=e.ownerDocument.defaultView)||void 0===r?void 0:r.visualViewport,[a,s,c,l]=e===Md(e)?[0,0,null!==(n=null==o?void 0:o.width)&&void 0!==n?n:e.clientWidth,null!==(i=null==o?void 0:o.height)&&void 0!==i?i:e.clientHeight]:[t.left,t.top,e.clientWidth,e.clientHeight],u=a+e.clientLeft,f=s+e.clientTop;return[f,u+c,f+l,u]},tg=(e,t)=>{const r=[];let n=e.ownerDocument,i=n.defaultView;if(!i)return r;const o=window.getComputedStyle(e),a="rtl"!==o.direction,s=zd(o.writingMode||o.getPropertyValue("-webkit-writing-mode")||o.getPropertyValue("-ms-writing-mode")),[c,l]=((e,t,r)=>{const[n,i,o]=Vd(t,r,e.block||"start",e.inline||"nearest");return[i,o].map((e,t)=>{switch(e){case"center":return 1;case"nearest":return 0;default:return"start"===e==!(n>>t&1)?2:3}})})(t,s,a);let[u,f,d,g]=((e,t,r)=>{const{top:n,right:i,bottom:o,left:a}=t,s=(c=e.ownerDocument,["scroll-margin","scroll-snap-margin"].filter(e=>e in c.documentElement.style)[0]);var c;if(!s)return[n,i,o,a];const l=e=>{const t=r.getPropertyValue(`${s}-${e}`);return parseInt(t,10)||0};return[n-l("top"),i+l("right"),o+l("bottom"),a-l("left")]})(e,e.getBoundingClientRect(),o);for(let o=Kd(e);null!==o;o=Kd(o)){if(n!==o.ownerDocument){if(n=o.ownerDocument,i=n.defaultView,!i)break;const{left:e,top:t}=o.getBoundingClientRect();u+=t,f+=e,d+=t,g+=e}const e=i.getComputedStyle(o);if("fixed"===e.position)break;if(!Wd(o,e))continue;const a=o.getBoundingClientRect(),[s,p,h,A]=eg(o,a),m=Xd(c,A,p,o.clientWidth,g,f,f-g),I=Xd(l,s,h,o.clientHeight,u,d,d-u),y=null===m?0:Zd(m,g,f)-Zd(m,A,p),v=null===I?0:Zd(I,u,d)-Zd(I,s,h),b=Pd(e)?$d(y,-o.scrollWidth+o.clientWidth-o.scrollLeft,-o.scrollLeft):$d(y,-o.scrollLeft,o.scrollWidth-o.clientWidth-o.scrollLeft),w=$d(v,-o.scrollTop,o.scrollHeight-o.clientHeight-o.scrollTop);r.push([o,{left:o.scrollLeft+b,top:o.scrollTop+w,behavior:t.behavior}]),u=Math.max(u-w,s),f=Math.min(f-b,p),d=Math.min(d-w,h),g=Math.max(g-b,A)}return r},rg=(e,t,r)=>{const n=t||{};if(!Cd(n.behavior))throw new TypeError(Fd("scrollIntoView","Element",n.behavior));tg(e,n).forEach(([e,t])=>{Jd(e,t,r)})},ng=(e,t)=>r=>{if(kd(r))return;const n={scroll:Yd,scrollTo:jd,scrollBy:Gd}[e];t(e,function(){const e=arguments;if(1===arguments.length)return void n(this,e[0],r);n(this,{left:e[0],top:e[1]})})},ig=ng("scroll",qd),og=ng("scrollTo",qd),ag=ng("scrollBy",qd),sg=(e,t)=>{Nd(t),Qd(window,e),window[e]=t},cg=ng("scroll",sg),lg=ng("scrollTo",sg),ug=ng("scrollBy",sg);function fg(e){rg(this,{block:null==e||e?"start":"end",inline:"nearest"})}const dg=e=>{if(kd(e))return;const t=Qd(window.HTMLElement.prototype,"scrollIntoView",fg);qd("scrollIntoView",function(){const r=arguments,n=r[0];1===r.length&&Sd(n)?rg(this,n,e):t.apply(this,r)})},gg=e=>{kd(e)||(ig(e),og(e),ag(e),dg(e),cg(e),lg(e),ug(e))};function pg(e,t,r){(void 0!==r&&!re(e[t],r)||void 0===r&&!(t in e))&&di(e,t,r)}function hg(e){return N(e)&&ft(e)}function Ag(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function mg(e,t,r,n,i,o,a){var s=Ag(e,r),c=Ag(t,r),l=a.get(c);if(l)pg(e,r,l);else{var u,f=o?o(s,c,r+"",e,t,a):void 0,d=void 0===f;if(d){var g=v(c),p=!g&&ze(c),h=!g&&!p&&rt(c);f=c,g||p||h?v(s)?f=s:hg(s)?f=Sr(s):p?(d=!1,f=Bi(c,!0)):h?(d=!1,f=ki(c,!0)):f=[]:vr(c)||Ye(c)?(f=s,Ye(s)?f=hi(u=s,Ii(u)):U(s)&&!R(s)||(f=Hi(c))):d=!1}d&&(a.set(c,f),i(f,c,n,o,a),a.delete(c)),pg(e,r,f)}}function Ig(e,t,r,n,i){e!==t&&Me(t,function(o,a){if(i||(i=new At),U(o))mg(e,t,a,r,Ig,n,i);else{var s=n?n(Ag(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),pg(e,a,s)}},Ii)}var yg,vg=(yg=function(e,t,r){Ig(e,t,r)},Ra(function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=yg.length>3&&"function"==typeof i?(n--,i):void 0,o&&dr(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var a=t[r];a&&yg(e,a,r,i)}return e}));async function bg(e,t=null,r={}){let n=!0,i=null,o=ns();Ee(r)||(r={});let a=we(r,"disTouchMoveToHide",null);if(Bo(a)||(a=4),a=Zi(a),!br(e))return o.reject("eleImg is not a HTMLElement"),o;if(i=e,null!==t){if(!br(t))return o.reject("eleGroup is not a HTMLElement"),o;n=!1,i=t}if(!n){let e=dn(t.querySelectorAll("img"));if(0===e)return o.reject("eleGroup does not contain any img"),o;1===e&&(n=!0)}let s={button:!1,navbar:!1,title:!1,toolbar:{zoomIn:4,zoomOut:4,oneToOne:4,reset:4,prev:0,play:0,next:0,rotateLeft:4,rotateRight:4,flipHorizontal:4,flipVertical:4},tooltip:!1,movable:!0,zoomable:!0,rotatable:!0,scalable:!0,transition:!0,fullscreen:!1,keyboard:!0};n||(s=function(){let e={button:!1,navbar:!1,title:!1,toolbar:{zoomIn:4,zoomOut:4,oneToOne:4,reset:4,prev:0,play:0,next:0,rotateLeft:4,rotateRight:4,flipHorizontal:4,flipVertical:4},tooltip:!1,movable:!0,zoomable:!0,rotatable:!0,scalable:!0,transition:!0,fullscreen:!1,keyboard:!0};return e.navbar=!0,e.toolbar.prev=4,e.toolbar.next=4,e}()),s=vg(s,zi(r)),s.shown=function(){(async()=>{let e=null;await vs(()=>(e=l.viewer,br(e)));let t=!1,r=0,n=0,i=0;e.addEventListener("touchstart",e=>{let i=e.touches[0];r=i.clientX,n=i.clientY,((e,t)=>{let r=document.elementsFromPoint(e,t).find(e=>"IMG"===e.tagName);if(!br(r))return!0;let n=r?.classList?.contains("viewer-move");return!n})(r,n)&&(t=!0)},{passive:!1}),e.addEventListener("touchmove",e=>{if(!t)return;let o=e.touches[0],a=o.clientX,s=o.clientY,c=a-r,l=s-n,u=Math.sqrt(c*c+l*l);i+=u,r=o.clientX,n=o.clientY},{passive:!1}),e.addEventListener("touchend",e=>{t&&(i<a&&(e.preventDefault(),e.stopPropagation(),l.hide(!0)),t=!1,i=0)},{passive:!1}),e.addEventListener("touchcancel",e=>{t=!1,i=0})})().catch(e=>{console.log(e)})};let c=!1;s.hide=function(){c||(c=!0,l.hide(!0))},s.hidden=function(){l.destroy(),o.resolve("close")};let l=new(0,yn().Viewer)(i,s);return l.show(),o}function wg(e,t){let r=new MouseEvent(t,{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(r)}function Bg(e={}){let t=we(e,"kind","*"),r=we(e,"multiple");pn(r)||(r=!1);let n=we(e,"entireHierarchy");pn(n)||(n=!1),n&&!r&&(r=!0);let i=we(e,"sizeMbLimit");Se(i)||(i=1e3),i=Mn(i);let o=ns(),a="drf"+Hu(),s="GrpDomReadFile";Vf(`[name=${s}]`);let c=Id(t),l=`<div name="${s}" style="position:relative; width:0px; height:0px; overflow:hidden;"><input id="${a}" type="file" accept="${c}" ${r?"multiple":""} ${n?"webkitdirectory":""} style="opacity:0; position:absolute; top:-10000px; left:-10000px;"></div>`;zu(document.querySelector("body"),l);let u=ud("#"+a),f=!1;function d(e){f=!0;let t=yd(this,i);o.resolve(t),u.removeEventListener("change",d,!0),n||window.removeEventListener("focus",g),Vf(`[name=${s}]`)}function g(e){setTimeout(()=>{f||d()},300)}return u.addEventListener("change",d,!0),n||window.addEventListener("focus",g),wg(u,"click"),o}function Eg(e){if(!De(e))return!1;let t="YYYY-MM-DDTHH:mm:ss";return e===r(e,t).format(t)}In()&&function(){try{return new MouseEvent("MouseEventPolyfillTest"),!1}catch(e){}let e=function(e,t){t=t||{bubbles:!1,cancelable:!1};let r=document.createEvent("MouseEvent");return r.initMouseEvent(e,t.bubbles,t.cancelable,window,0,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null),r};e.prototype=Event.prototype,window.MouseEvent=e}();var Cg="top",xg="bottom",Dg="right",Fg="left",Qg="auto",Sg=[Cg,xg,Dg,Fg],kg="start",Ng="end",qg="viewport",Mg="popper",Hg=Sg.reduce(function(e,t){return e.concat([t+"-"+kg,t+"-"+Ng])},[]),Lg=[].concat(Sg,[Qg]).reduce(function(e,t){return e.concat([t,t+"-"+kg,t+"-"+Ng])},[]),Ug=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Rg(e){return e?(e.nodeName||"").toLowerCase():null}function Og(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Tg(e){return e instanceof Og(e).Element||e instanceof Element}function Yg(e){return e instanceof Og(e).HTMLElement||e instanceof HTMLElement}function jg(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Og(e).ShadowRoot||e instanceof ShadowRoot)}var Gg={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},i=t.elements[e];Yg(i)&&Rg(i)&&(Object.assign(i.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});Yg(n)&&Rg(n)&&(Object.assign(n.style,o),Object.keys(i).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};function Jg(e){return e.split("-")[0]}var zg=Math.max,Vg=Math.min,Pg=Math.round;function Xg(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function _g(){return!/^((?!chrome|android).)*safari/i.test(Xg())}function Wg(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Yg(e)&&(i=e.offsetWidth>0&&Pg(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Pg(n.height)/e.offsetHeight||1);var a=(Tg(e)?Og(e):window).visualViewport,s=!_g()&&r,c=(n.left+(s&&a?a.offsetLeft:0))/i,l=(n.top+(s&&a?a.offsetTop:0))/o,u=n.width/i,f=n.height/o;return{width:u,height:f,top:l,right:c+u,bottom:l+f,left:c,x:c,y:l}}function Kg(e){var t=Wg(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function $g(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&jg(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Zg(e){return Og(e).getComputedStyle(e)}function ep(e){return["table","td","th"].indexOf(Rg(e))>=0}function tp(e){return((Tg(e)?e.ownerDocument:e.document)||window.document).documentElement}function rp(e){return"html"===Rg(e)?e:e.assignedSlot||e.parentNode||(jg(e)?e.host:null)||tp(e)}function np(e){return Yg(e)&&"fixed"!==Zg(e).position?e.offsetParent:null}function ip(e){for(var t=Og(e),r=np(e);r&&ep(r)&&"static"===Zg(r).position;)r=np(r);return r&&("html"===Rg(r)||"body"===Rg(r)&&"static"===Zg(r).position)?t:r||function(e){var t=/firefox/i.test(Xg());if(/Trident/i.test(Xg())&&Yg(e)&&"fixed"===Zg(e).position)return null;var r=rp(e);for(jg(r)&&(r=r.host);Yg(r)&&["html","body"].indexOf(Rg(r))<0;){var n=Zg(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}function op(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ap(e,t,r){return zg(e,Vg(t,r))}function sp(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function cp(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}var lp={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=Jg(r.placement),c=op(s),l=[Fg,Dg].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(e,t){return sp("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:cp(e,Sg))}(i.padding,r),f=Kg(o),d="y"===c?Cg:Fg,g="y"===c?xg:Dg,p=r.rects.reference[l]+r.rects.reference[c]-a[c]-r.rects.popper[l],h=a[c]-r.rects.reference[c],A=ip(o),m=A?"y"===c?A.clientHeight||0:A.clientWidth||0:0,I=p/2-h/2,y=u[d],v=m-f[l]-u[g],b=m/2-f[l]/2+I,w=ap(y,b,v),B=c;r.modifiersData[n]=((t={})[B]=w,t.centerOffset=w-b,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&$g(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function up(e){return e.split("-")[1]}var fp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function dp(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=a.x,g=void 0===d?0:d,p=a.y,h=void 0===p?0:p,A="function"==typeof u?u({x:g,y:h}):{x:g,y:h};g=A.x,h=A.y;var m=a.hasOwnProperty("x"),I=a.hasOwnProperty("y"),y=Fg,v=Cg,b=window;if(l){var w=ip(r),B="clientHeight",E="clientWidth";if(w===Og(r)&&"static"!==Zg(w=tp(r)).position&&"absolute"===s&&(B="scrollHeight",E="scrollWidth"),i===Cg||(i===Fg||i===Dg)&&o===Ng)v=xg,h-=(f&&w===b&&b.visualViewport?b.visualViewport.height:w[B])-n.height,h*=c?1:-1;if(i===Fg||(i===Cg||i===xg)&&o===Ng)y=Dg,g-=(f&&w===b&&b.visualViewport?b.visualViewport.width:w[E])-n.width,g*=c?1:-1}var C,x=Object.assign({position:s},l&&fp),D=!0===u?function(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:Pg(r*i)/i||0,y:Pg(n*i)/i||0}}({x:g,y:h},Og(r)):{x:g,y:h};return g=D.x,h=D.y,c?Object.assign({},x,((C={})[v]=I?"0":"",C[y]=m?"0":"",C.transform=(b.devicePixelRatio||1)<=1?"translate("+g+"px, "+h+"px)":"translate3d("+g+"px, "+h+"px, 0)",C)):Object.assign({},x,((t={})[v]=I?h+"px":"",t[y]=m?g+"px":"",t.transform="",t))}var gp={passive:!0};var pp={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=void 0===i||i,a=n.resize,s=void 0===a||a,c=Og(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach(function(e){e.addEventListener("scroll",r.update,gp)}),s&&c.addEventListener("resize",r.update,gp),function(){o&&l.forEach(function(e){e.removeEventListener("scroll",r.update,gp)}),s&&c.removeEventListener("resize",r.update,gp)}},data:{}},hp={left:"right",right:"left",bottom:"top",top:"bottom"};function Ap(e){return e.replace(/left|right|bottom|top/g,function(e){return hp[e]})}var mp={start:"end",end:"start"};function Ip(e){return e.replace(/start|end/g,function(e){return mp[e]})}function yp(e){var t=Og(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vp(e){return Wg(tp(e)).left+yp(e).scrollLeft}function bp(e){var t=Zg(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function wp(e){return["html","body","#document"].indexOf(Rg(e))>=0?e.ownerDocument.body:Yg(e)&&bp(e)?e:wp(rp(e))}function Bp(e,t){var r;void 0===t&&(t=[]);var n=wp(e),i=n===(null==(r=e.ownerDocument)?void 0:r.body),o=Og(n),a=i?[o].concat(o.visualViewport||[],bp(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(Bp(rp(a)))}function Ep(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Cp(e,t,r){return t===qg?Ep(function(e,t){var r=Og(e),n=tp(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var l=_g();(l||!l&&"fixed"===t)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+vp(e),y:c}}(e,r)):Tg(t)?function(e,t){var r=Wg(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):Ep(function(e){var t,r=tp(e),n=yp(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=zg(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=zg(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+vp(e),c=-n.scrollTop;return"rtl"===Zg(i||r).direction&&(s+=zg(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}(tp(e)))}function xp(e,t,r,n){var i="clippingParents"===t?function(e){var t=Bp(rp(e)),r=["absolute","fixed"].indexOf(Zg(e).position)>=0&&Yg(e)?ip(e):e;return Tg(r)?t.filter(function(e){return Tg(e)&&$g(e,r)&&"body"!==Rg(e)}):[]}(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(t,r){var i=Cp(e,r,n);return t.top=zg(i.top,t.top),t.right=Vg(i.right,t.right),t.bottom=Vg(i.bottom,t.bottom),t.left=zg(i.left,t.left),t},Cp(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Dp(e){var t,r=e.reference,n=e.element,i=e.placement,o=i?Jg(i):null,a=i?up(i):null,s=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2;switch(o){case Cg:t={x:s,y:r.y-n.height};break;case xg:t={x:s,y:r.y+r.height};break;case Dg:t={x:r.x+r.width,y:c};break;case Fg:t={x:r.x-n.width,y:c};break;default:t={x:r.x,y:r.y}}var l=o?op(o):null;if(null!=l){var u="y"===l?"height":"width";switch(a){case kg:t[l]=t[l]-(r[u]/2-n[u]/2);break;case Ng:t[l]=t[l]+(r[u]/2-n[u]/2)}}return t}function Fp(e,t){void 0===t&&(t={});var r=t,n=r.placement,i=void 0===n?e.placement:n,o=r.strategy,a=void 0===o?e.strategy:o,s=r.boundary,c=void 0===s?"clippingParents":s,l=r.rootBoundary,u=void 0===l?qg:l,f=r.elementContext,d=void 0===f?Mg:f,g=r.altBoundary,p=void 0!==g&&g,h=r.padding,A=void 0===h?0:h,m=sp("number"!=typeof A?A:cp(A,Sg)),I=d===Mg?"reference":Mg,y=e.rects.popper,v=e.elements[p?I:d],b=xp(Tg(v)?v:v.contextElement||tp(e.elements.popper),c,u,a),w=Wg(e.elements.reference),B=Dp({reference:w,element:y,strategy:"absolute",placement:i}),E=Ep(Object.assign({},y,B)),C=d===Mg?E:w,x={top:b.top-C.top+m.top,bottom:C.bottom-b.bottom+m.bottom,left:b.left-C.left+m.left,right:C.right-b.right+m.right},D=e.modifiersData.offset;if(d===Mg&&D){var F=D[i];Object.keys(x).forEach(function(e){var t=[Dg,xg].indexOf(e)>=0?1:-1,r=[Cg,xg].indexOf(e)>=0?"y":"x";x[e]+=F[r]*t})}return x}function Qp(e,t){void 0===t&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,l=void 0===c?Lg:c,u=up(n),f=u?s?Hg:Hg.filter(function(e){return up(e)===u}):Sg,d=f.filter(function(e){return l.indexOf(e)>=0});0===d.length&&(d=f);var g=d.reduce(function(t,r){return t[r]=Fp(e,{placement:r,boundary:i,rootBoundary:o,padding:a})[Jg(r)],t},{});return Object.keys(g).sort(function(e,t){return g[e]-g[t]})}var Sp={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=void 0===i||i,a=r.altAxis,s=void 0===a||a,c=r.fallbackPlacements,l=r.padding,u=r.boundary,f=r.rootBoundary,d=r.altBoundary,g=r.flipVariations,p=void 0===g||g,h=r.allowedAutoPlacements,A=t.options.placement,m=Jg(A),I=c||(m===A||!p?[Ap(A)]:function(e){if(Jg(e)===Qg)return[];var t=Ap(e);return[Ip(e),t,Ip(t)]}(A)),y=[A].concat(I).reduce(function(e,r){return e.concat(Jg(r)===Qg?Qp(t,{placement:r,boundary:u,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:h}):r)},[]),v=t.rects.reference,b=t.rects.popper,w=new Map,B=!0,E=y[0],C=0;C<y.length;C++){var x=y[C],D=Jg(x),F=up(x)===kg,Q=[Cg,xg].indexOf(D)>=0,S=Q?"width":"height",k=Fp(t,{placement:x,boundary:u,rootBoundary:f,altBoundary:d,padding:l}),N=Q?F?Dg:Fg:F?xg:Cg;v[S]>b[S]&&(N=Ap(N));var q=Ap(N),M=[];if(o&&M.push(k[D]<=0),s&&M.push(k[N]<=0,k[q]<=0),M.every(function(e){return e})){E=x,B=!1;break}w.set(x,M)}if(B)for(var H=function(e){var t=y.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},L=p?3:1;L>0;L--){if("break"===H(L))break}t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function kp(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Np(e){return[Cg,Dg,xg,Fg].some(function(t){return e[t]>=0})}var qp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=void 0===i?[0,0]:i,a=Lg.reduce(function(e,r){return e[r]=function(e,t,r){var n=Jg(e),i=[Fg,Cg].indexOf(n)>=0?-1:1,o="function"==typeof r?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Fg,Dg].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,t.rects,o),e},{}),s=a[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[n]=a}};var Mp={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=void 0===i||i,a=r.altAxis,s=void 0!==a&&a,c=r.boundary,l=r.rootBoundary,u=r.altBoundary,f=r.padding,d=r.tether,g=void 0===d||d,p=r.tetherOffset,h=void 0===p?0:p,A=Fp(t,{boundary:c,rootBoundary:l,padding:f,altBoundary:u}),m=Jg(t.placement),I=up(t.placement),y=!I,v=op(m),b="x"===v?"y":"x",w=t.modifiersData.popperOffsets,B=t.rects.reference,E=t.rects.popper,C="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,x="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(w){if(o){var Q,S="y"===v?Cg:Fg,k="y"===v?xg:Dg,N="y"===v?"height":"width",q=w[v],M=q+A[S],H=q-A[k],L=g?-E[N]/2:0,U=I===kg?B[N]:E[N],R=I===kg?-E[N]:-B[N],O=t.elements.arrow,T=g&&O?Kg(O):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=Y[S],G=Y[k],J=ap(0,B[N],T[N]),z=y?B[N]/2-L-J-j-x.mainAxis:U-J-j-x.mainAxis,V=y?-B[N]/2+L+J+G+x.mainAxis:R+J+G+x.mainAxis,P=t.elements.arrow&&ip(t.elements.arrow),X=P?"y"===v?P.clientTop||0:P.clientLeft||0:0,_=null!=(Q=null==D?void 0:D[v])?Q:0,W=q+V-_,K=ap(g?Vg(M,q+z-_-X):M,q,g?zg(H,W):H);w[v]=K,F[v]=K-q}if(s){var $,Z="x"===v?Cg:Fg,ee="x"===v?xg:Dg,te=w[b],re="y"===b?"height":"width",ne=te+A[Z],ie=te-A[ee],oe=-1!==[Cg,Fg].indexOf(m),ae=null!=($=null==D?void 0:D[b])?$:0,se=oe?ne:te-B[re]-E[re]-ae+x.altAxis,ce=oe?te+B[re]+E[re]-ae-x.altAxis:ie,le=g&&oe?function(e,t,r){var n=ap(e,t,r);return n>r?r:n}(se,te,ce):ap(g?se:ne,te,g?ce:ie);w[b]=le,F[b]=le-te}t.modifiersData[n]=F}},requiresIfExists:["offset"]};function Hp(e,t,r){void 0===r&&(r=!1);var n,i,o=Yg(t),a=Yg(t)&&function(e){var t=e.getBoundingClientRect(),r=Pg(t.width)/e.offsetWidth||1,n=Pg(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),s=tp(t),c=Wg(e,a,r),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!r)&&(("body"!==Rg(t)||bp(s))&&(l=(n=t)!==Og(n)&&Yg(n)?{scrollLeft:(i=n).scrollLeft,scrollTop:i.scrollTop}:yp(n)),Yg(t)?((u=Wg(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=vp(s))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function Lp(e){var t=new Map,r=new Set,n=[];function i(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!r.has(e)){var n=t.get(e);n&&i(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||i(e)}),n}var Up={placement:"bottom",modifiers:[],strategy:"absolute"};function Rp(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Op(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,i=t.defaultOptions,o=void 0===i?Up:i;return function(e,t,r){void 0===r&&(r=o);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Up,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:s,setOptions:function(r){var i="function"==typeof r?r(s.options):r;f(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:Tg(e)?Bp(e):e.contextElement?Bp(e.contextElement):[],popper:Bp(t)};var a,l,d=function(e){var t=Lp(e);return Ug.reduce(function(e,r){return e.concat(t.filter(function(e){return e.phase===r}))},[])}((a=[].concat(n,s.options.modifiers),l=a.reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{}),Object.keys(l).map(function(e){return l[e]})));return s.orderedModifiers=d.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,i=e.effect;if("function"==typeof i){var o=i({state:s,name:t,instance:u,options:n}),a=function(){};c.push(o||a)}}),u.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,r=e.popper;if(Rp(t,r)){s.rects={reference:Hp(t,ip(r),"fixed"===s.options.strategy),popper:Kg(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var i=s.orderedModifiers[n],o=i.fn,a=i.options,c=void 0===a?{}:a,f=i.name;"function"==typeof o&&(s=o({state:s,options:c,name:f,instance:u})||s)}else s.reset=!1,n=-1}}},update:(i=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(i())})})),a}),destroy:function(){f(),l=!0}};if(!Rp(e,t))return u;function f(){c.forEach(function(e){return e()}),c=[]}return u.setOptions(r).then(function(e){!l&&r.onFirstUpdate&&r.onFirstUpdate(e)}),u}}var Tp=Op({defaultModifiers:[pp,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Dp({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=void 0===n||n,o=r.adaptive,a=void 0===o||o,s=r.roundOffsets,c=void 0===s||s,l={placement:Jg(t.placement),variation:up(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,dp(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,dp(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Gg,qp,Sp,Mp,lp,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Fp(t,{elementContext:"reference"}),s=Fp(t,{altBoundary:!0}),c=kp(a,n),l=kp(s,i,o),u=Np(c),f=Np(l);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}}]}),Yp="tippy-content",jp="tippy-arrow",Gp="tippy-svg-arrow",Jp={passive:!0,capture:!0},zp=function(){return document.body};function Vp(e,t,r){if(Array.isArray(e)){var n=e[t];return null==n?Array.isArray(r)?r[t]:r:n}return e}function Pp(e,t){var r={}.toString.call(e);return 0===r.indexOf("[object")&&r.indexOf(t+"]")>-1}function Xp(e,t){return"function"==typeof e?e.apply(void 0,t):e}function _p(e,t){return 0===t?e:function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)};var r}function Wp(e){return[].concat(e)}function Kp(e,t){-1===e.indexOf(t)&&e.push(t)}function $p(e){return[].slice.call(e)}function Zp(e){return Object.keys(e).reduce(function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t},{})}function eh(){return document.createElement("div")}function th(e){return["Element","Fragment"].some(function(t){return Pp(e,t)})}function rh(e){return th(e)?[e]:function(e){return Pp(e,"NodeList")}(e)?$p(e):Array.isArray(e)?e:$p(document.querySelectorAll(e))}function nh(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function ih(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function oh(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,r)})}function ah(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=null==r.getRootNode||null==(n=r.getRootNode())?void 0:n.host}return!1}var sh={isTouch:!1},ch=0;function lh(){sh.isTouch||(sh.isTouch=!0,window.performance&&document.addEventListener("mousemove",uh))}function uh(){var e=performance.now();e-ch<20&&(sh.isTouch=!1,document.removeEventListener("mousemove",uh)),ch=e}function fh(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var r=t._tippy;t.blur&&!r.state.isVisible&&t.blur()}}var dh,gh=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function ph(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function hh(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function Ah(e){return hh("\n %ctippy.js\n\n %c"+hh(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function mh(e){return[Ah(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function Ih(e,t){var r;e&&!dh.has(t)&&(dh.add(t),(r=console).warn.apply(r,mh(t)))}function yh(e,t){var r;e&&!dh.has(t)&&(dh.add(t),(r=console).error.apply(r,mh(t)))}dh=new Set;var vh={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},bh=Object.assign({appendTo:zp,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},vh,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),wh=Object.keys(bh);function Bh(e){var t=(e.plugins||[]).reduce(function(t,r){var n,i=r.name,o=r.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(n=bh[i])?n:o);return t},{});return Object.assign({},e,t)}function Eh(e,t){var r=Object.assign({},t,{content:Xp(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Bh(Object.assign({},bh,{plugins:t}))):wh).reduce(function(t,r){var n=(e.getAttribute("data-tippy-"+r)||"").trim();if(!n)return t;if("content"===r)t[r]=n;else try{t[r]=JSON.parse(n)}catch(e){t[r]=n}return t},{})}(e,t.plugins));return r.aria=Object.assign({},bh.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?t.interactive:r.aria.expanded,content:"auto"===r.aria.content?t.interactive?null:"describedby":r.aria.content},r}function Ch(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach(function(e){var r=function(e,t){var r=Object.assign({},e);return t.forEach(function(e){delete r[e]}),r}(bh,Object.keys(vh)),n=!function(e,t){return{}.hasOwnProperty.call(e,t)}(r,e);n&&(n=0===t.filter(function(t){return t.name===e}).length),Ih(n,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}function xh(e,t){e.innerHTML=t}function Dh(e){var t=eh();return!0===e?t.className=jp:(t.className=Gp,th(e)?t.appendChild(e):xh(t,e)),t}function Fh(e,t){th(t.content)?(xh(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?xh(e,t.content):e.textContent=t.content)}function Qh(e){var t=e.firstElementChild,r=$p(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(Yp)}),arrow:r.find(function(e){return e.classList.contains(jp)||e.classList.contains(Gp)}),backdrop:r.find(function(e){return e.classList.contains("tippy-backdrop")})}}function Sh(e){var t=eh(),r=eh();r.className="tippy-box",r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=eh();function i(r,n){var i=Qh(t),o=i.box,a=i.content,s=i.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),r.content===n.content&&r.allowHTML===n.allowHTML||Fh(a,e.props),n.arrow?s?r.arrow!==n.arrow&&(o.removeChild(s),o.appendChild(Dh(n.arrow))):o.appendChild(Dh(n.arrow)):s&&o.removeChild(s)}return n.className=Yp,n.setAttribute("data-state","hidden"),Fh(n,e.props),t.appendChild(r),r.appendChild(n),i(e.props,e.props),{popper:t,onUpdate:i}}Sh.$$tippy=!0;var kh=1,Nh=[],qh=[];function Mh(e,t){var r,n,i,o,a,s,c,l,u=Eh(e,Object.assign({},bh,Bh(Zp(t)))),f=!1,d=!1,g=!1,p=!1,h=[],A=_p(P,u.interactiveDebounce),m=kh++,I=(l=u.plugins).filter(function(e,t){return l.indexOf(e)===t}),y={id:m,reference:e,popper:eh(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:I,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(n),cancelAnimationFrame(i)},setProps:function(t){if(Ih(y.state.isDestroyed,ph("setProps")),y.state.isDestroyed)return;q("onBeforeUpdate",[y,t]),z();var r=y.props,n=Eh(e,Object.assign({},r,Zp(t),{ignoreAttributes:!0}));y.props=n,J(),r.interactiveDebounce!==n.interactiveDebounce&&(L(),A=_p(P,n.interactiveDebounce));r.triggerTarget&&!n.triggerTarget?Wp(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded");H(),N(),w&&w(r,n);y.popperInstance&&(K(),Z().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));q("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){Ih(y.state.isDestroyed,ph("show"));var e=y.state.isVisible,t=y.state.isDestroyed,r=!y.state.isEnabled,n=sh.isTouch&&!y.props.touch,i=Vp(y.props.duration,0,bh.duration);if(e||t||r||n)return;if(F().hasAttribute("disabled"))return;if(q("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,D()&&(b.style.visibility="visible");N(),T(),y.state.isMounted||(b.style.transition="none");if(D()){var o=S();nh([o.box,o.content],0)}s=function(){var e;if(y.state.isVisible&&!p){if(p=!0,b.offsetHeight,b.style.transition=y.props.moveTransition,D()&&y.props.animation){var t=S(),r=t.box,n=t.content;nh([r,n],i),ih([r,n],"visible")}M(),H(),Kp(qh,y),null==(e=y.popperInstance)||e.forceUpdate(),q("onMount",[y]),y.props.animation&&D()&&function(e,t){j(e,t)}(i,function(){y.state.isShown=!0,q("onShown",[y])})}},function(){var e,t=y.props.appendTo,r=F();e=y.props.interactive&&t===zp||"parent"===t?r.parentNode:Xp(t,[r]);e.contains(b)||e.appendChild(b);y.state.isMounted=!0,K(),Ih(y.props.interactive&&t===bh.appendTo&&r.nextElementSibling!==b,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){Ih(y.state.isDestroyed,ph("hide"));var e=!y.state.isVisible,t=y.state.isDestroyed,r=!y.state.isEnabled,n=Vp(y.props.duration,1,bh.duration);if(e||t||r)return;if(q("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,p=!1,f=!1,D()&&(b.style.visibility="hidden");if(L(),Y(),N(!0),D()){var i=S(),o=i.box,a=i.content;y.props.animation&&(nh([o,a],n),ih([o,a],"hidden"))}M(),H(),y.props.animation?D()&&function(e,t){j(e,function(){!y.state.isVisible&&b.parentNode&&b.parentNode.contains(b)&&t()})}(n,y.unmount):y.unmount()},hideWithInteractivity:function(e){Ih(y.state.isDestroyed,ph("hideWithInteractivity")),Q().addEventListener("mousemove",A),Kp(Nh,A),A(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){Ih(y.state.isDestroyed,ph("unmount")),y.state.isVisible&&y.hide();if(!y.state.isMounted)return;$(),Z().forEach(function(e){e._tippy.unmount()}),b.parentNode&&b.parentNode.removeChild(b);qh=qh.filter(function(e){return e!==y}),y.state.isMounted=!1,q("onHidden",[y])},destroy:function(){if(Ih(y.state.isDestroyed,ph("destroy")),y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),z(),delete e._tippy,y.state.isDestroyed=!0,q("onDestroy",[y])}};if(!u.render)return yh(!0,"render() function has not been supplied."),y;var v=u.render(y),b=v.popper,w=v.onUpdate;b.setAttribute("data-tippy-root",""),b.id="tippy-"+y.id,y.popper=b,e._tippy=y,b._tippy=y;var B=I.map(function(e){return e.fn(y)}),E=e.hasAttribute("aria-expanded");return J(),H(),N(),q("onCreate",[y]),u.showOnCreate&&ee(),b.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),b.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&Q().addEventListener("mousemove",A)}),y;function C(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function x(){return"hold"===C()[0]}function D(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function F(){return c||e}function Q(){var e,t,r=F().parentNode;return r?null!=(t=Wp(r)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function S(){return Qh(b)}function k(e){return y.state.isMounted&&!y.state.isVisible||sh.isTouch||o&&"focus"===o.type?0:Vp(y.props.delay,e?0:1,bh.delay)}function N(e){void 0===e&&(e=!1),b.style.pointerEvents=y.props.interactive&&!e?"":"none",b.style.zIndex=""+y.props.zIndex}function q(e,t,r){var n;(void 0===r&&(r=!0),B.forEach(function(r){r[e]&&r[e].apply(r,t)}),r)&&(n=y.props)[e].apply(n,t)}function M(){var t=y.props.aria;if(t.content){var r="aria-"+t.content,n=b.id;Wp(y.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(r);if(y.state.isVisible)e.setAttribute(r,t?t+" "+n:n);else{var i=t&&t.replace(n,"").trim();i?e.setAttribute(r,i):e.removeAttribute(r)}})}}function H(){!E&&y.props.aria.expanded&&Wp(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===F()?"true":"false"):e.removeAttribute("aria-expanded")})}function L(){Q().removeEventListener("mousemove",A),Nh=Nh.filter(function(e){return e!==A})}function U(t){if(!sh.isTouch||!g&&"mousedown"!==t.type){var r=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!ah(b,r)){if(Wp(y.props.triggerTarget||e).some(function(e){return ah(e,r)})){if(sh.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else q("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),d=!0,setTimeout(function(){d=!1}),y.state.isMounted||Y())}}}function R(){g=!0}function O(){g=!1}function T(){var e=Q();e.addEventListener("mousedown",U,!0),e.addEventListener("touchend",U,Jp),e.addEventListener("touchstart",O,Jp),e.addEventListener("touchmove",R,Jp)}function Y(){var e=Q();e.removeEventListener("mousedown",U,!0),e.removeEventListener("touchend",U,Jp),e.removeEventListener("touchstart",O,Jp),e.removeEventListener("touchmove",R,Jp)}function j(e,t){var r=S().box;function n(e){e.target===r&&(oh(r,"remove",n),t())}if(0===e)return t();oh(r,"remove",a),oh(r,"add",n),a=n}function G(t,r,n){void 0===n&&(n=!1),Wp(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,r,n),h.push({node:e,eventType:t,handler:r,options:n})})}function J(){var e;x()&&(G("touchstart",V,{passive:!0}),G("touchend",X,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(G(e,V),e){case"mouseenter":G("mouseleave",X);break;case"focus":G(gh?"focusout":"blur",_);break;case"focusin":G("focusout",_)}})}function z(){h.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,i=e.options;t.removeEventListener(r,n,i)}),h=[]}function V(e){var t,r=!1;if(y.state.isEnabled&&!W(e)&&!d){var n="focus"===(null==(t=o)?void 0:t.type);o=e,c=e.currentTarget,H(),!y.state.isVisible&&Pp(e,"MouseEvent")&&Nh.forEach(function(t){return t(e)}),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||f)&&!1!==y.props.hideOnClick&&y.state.isVisible?r=!0:ee(e),"click"===e.type&&(f=!r),r&&!n&&te(e)}}function P(e){var t=e.target,r=F().contains(t)||b.contains(t);if("mousemove"!==e.type||!r){var n=Z().concat(b).map(function(e){var t,r=null==(t=e._tippy.popperInstance)?void 0:t.state;return r?{popperRect:e.getBoundingClientRect(),popperState:r,props:u}:null}).filter(Boolean);(function(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=i.placement.split("-")[0],s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=t.top-n+c>o,g=n-t.bottom-l>o,p=t.left-r+u>o,h=r-t.right-f>o;return d||g||p||h})})(n,e)&&(L(),te(e))}}function X(e){W(e)||y.props.trigger.indexOf("click")>=0&&f||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function _(e){y.props.trigger.indexOf("focusin")<0&&e.target!==F()||y.props.interactive&&e.relatedTarget&&b.contains(e.relatedTarget)||te(e)}function W(e){return!!sh.isTouch&&x()!==e.type.indexOf("touch")>=0}function K(){$();var t=y.props,r=t.popperOptions,n=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,c=D()?Qh(b).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||F()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(D()){var r=S().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?r.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?r.setAttribute("data-"+e,""):r.removeAttribute("data-"+e)}),t.attributes.popper={}}}},f=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];D()&&c&&f.push({name:"arrow",options:{element:c,padding:3}}),f.push.apply(f,(null==r?void 0:r.modifiers)||[]),y.popperInstance=Tp(l,b,Object.assign({},r,{placement:n,onFirstUpdate:s,modifiers:f}))}function $(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Z(){return $p(b.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&q("onTrigger",[y,e]),T();var t=k(!0),n=C(),i=n[0],o=n[1];sh.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout(function(){y.show()},t):y.show()}function te(e){if(y.clearDelayTimeouts(),q("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=k(!1);t?n=setTimeout(function(){y.state.isVisible&&y.hide()},t):i=requestAnimationFrame(function(){y.hide()})}}else Y()}}function Hh(e,t){void 0===t&&(t={});var r=bh.plugins.concat(t.plugins||[]);!function(e){var t=!e,r="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;yh(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),yh(r,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),Ch(t,r),document.addEventListener("touchstart",lh,Jp),window.addEventListener("blur",fh);var n=Object.assign({},t,{plugins:r}),i=rh(e),o=th(n.content),a=i.length>1;Ih(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "));var s=i.reduce(function(e,t){var r=t&&Mh(t,n);return r&&e.push(r),e},[]);return th(e)?s[0]:s}function Lh(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}Hh.defaultProps=bh,Hh.setDefaultProps=function(e){Ch(e,[]),Object.keys(e).forEach(function(t){bh[t]=e[t]})},Hh.currentInput=sh,Object.assign({},Gg,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}}),Hh.setDefaultProps({render:Sh});Lh('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}');async function Uh(e,t={}){if(!va(e))throw new Error("invalid fun");let r=we(t,"width");r=De(r)?sa(r):Se(r)?Mn(r):null;let n=we(t,"height");n=De(n)?sa(n):Se(n)?Mn(n):null;let i=document.createElement("div");Se(r)&&(i.style.width=`${r}px`),Se(n)&&(i.style.height=`${n}px`);let o=document.createElement("div");o.style.position="absolute",o.style.top=0,o.style.left=0,o.style.zIndex=-1,o.appendChild(i);let a=document.createElement("div");a.style.position="relative",a.appendChild(o);let s,c=document.createElement("div");c.style.position="fixed",c.style.zIndex=-1,c.appendChild(a),Pf(document.querySelector("body"),c);let l=e(i);return s=ys(l)?await l:l,Vf(c),s}function Rh(e){if(!va(e))throw new Error("fn is not a function");return function(){let t=ns(),r=null,n=null;try{r=e.apply(this,arguments)}catch(e){n=e}return null!==n?t.resolve({state:"error",msg:n}):ys(r)?r.then(e=>{t.resolve({state:"success",msg:e})}).catch(e=>{"cancelled"===we(e,"reason")?t.resolve({state:"cancelled",msg:""}):t.resolve({state:"error",msg:e})}):t.resolve({state:"success",msg:r}),t}}Lh(".tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px rgba(154,161,177,.15),0 4px 80px -8px rgba(36,40,47,.25),0 4px 4px -2px rgba(91,94,105,.15);background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}");let Oh=Rh;function Th(e){if(!Hn(e))return!1;return Zi(e)<0}function Yh(e=0){let t=0,r=[];Th(e)&&(e=0),e=Zi(e);let n=Xi();return n.get=function(){if(r.length>0){return t+=1,r.splice(0,1)[0]}return null},n.cb=function(){t-=1,t<0&&(t=0),r.length>0&&n.emit("message",r)},n.push=function(i){r.push(i),(e<=0||t<e)&&n.emit("message",r)},n.clear=function(){t=0,r=[]},n}function jh(e=0,t=!1){return new function(e,t){let r=null;Bo(e)||(e=0),e=Zi(e),gn(t)||(t=!1);let n=Yh(e);return n.on("message",async function(e){let t=n.get();if(!t)return;await bs(1);let r,i=we(t,"id"),o=we(t,"fun"),a=we(t,"input");r=va(o)?await Oh(o)(...a):{state:"error",msg:"fun is not a function"},n.emit(i,r),n.cb()}),function(e,...i){let o=ns(),a=Hu();r=a;let s={id:a,fun:e,input:i};return n.push(s),n.once(a,e=>{t?a===r?"success"===e.state?o.resolve(e.msg):o.reject(e.msg):o.reject({reason:"cancelled"}):"success"===e.state?o.resolve(e.msg):o.reject(e.msg)}),o}}(e,t)}function Gh(e,t){In()?De(e)?Vu()?function(e,t){window.navigator.msSaveOrOpenBlob(t,e)}(e,t):function(e,t){let r=window.URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(r)}(e,t):console.log("no filename"):console.log("no window")}function Jh(e,t="data"){if(!Be(e))return{error:"sheet is not an object"};De(t)||(t="data");let r=Qu();return r.SheetNames.push(t),r.Sheets[t]=e,r}function zh(e,t="data"){if(!Ce(e)&&!br(e))return{error:"data is not an array or element"};De(t)||(t="data");let r=null,n=bn(e);return ke(n,"error")?n:(r=Jh(n,t),ke(r,"error"),r)}function Vh(e,t="data",r){if(!De(e)){let t="no filename";return console.log(t,e),{error:t}}if(De(t)||(t="data"),!Ce(r)&&!br(r)){let e="data is not an array or element";return console.log(e,r),{error:e}}Ce(r)&&Ee(we(r,0,null))&&(r=mn(r));let n=zh(r,t);if(we(n,"error"))return console.log(n.error),n.error;let i=vn();if(In()){let t=i.write(n,{bookType:"xlsx",bookSST:!1,type:"array"});Gh(e,new Blob([t]))}else try{i.writeFile(n,e)}catch(e){let t=`xl.writeFile failed: ${we(e,"message",e)}. 提示: 若於Node ESM環境單獨深度import此檔, xlsx ESM build的_fs未注入會擲此錯; 請改用 import { downloadExcelFileFromData } from 'wsemi' (走package main的UMD bundle, xlsx CJS自動載fs), 或於app entry手動呼叫 XLSX.set_fs(fs) 注入fs`;return console.log(t),t}return"ok"}function Ph(e){if(!Za(e))return new Blob;return new Blob([e])}function Xh(e,t,r=""){if(!Rr(t))return{};let n={};return Er(t,function(t){n[t]=we(e,t,r)}),n}function _h(e,t){if(!Be(e))return{};if(!Rr(t))return{};let r={};return Er(t,function(t){ke(e,t)&&(r[t]=we(e,t))}),r}function Wh(e,t=0,r={}){Bo(t)||(t=0),t=Zi(t);let n=we(r,"rounding","");return"ROUND_HALF_UP"!==n&&"ROUND_HALF_EVEN"!==n&&(n="ROUND_HALF_UP"),Se(e)?new il(e).toDecimalPlaces(t,il[n]).toNumber():""}function Kh(e,t={}){if(!Se(e))throw new Error("v is not a number");let r=we(t,"returnDigit");if(pn(r)||(r=!1),Hn(e))return r?0:Ya(e);let n=null,i=null;for(let t=1;t<=16;t++){let r=e*Math.pow(10,t);if(Math.abs(r-Math.round(r))<1e-9){n=t,i=al(e,t);break}}return null===i&&(n=16,i=Ya(e)),r?n:i}let $h=e=>{let t=1;e<0&&(t=-1);let r=null;if((e=Math.abs(e))<.1)for(let n=1;n<16;n++){let i=Math.pow(10,n);if((e*=i)<1){r={r:1/i,v:t*e};break}}else{if(e<1)return{r:1,v:t*e};if(e>=1)for(let n=1;n<16;n++){let i=Math.pow(10,n);if((e/=i)<1){r={r:i,v:t*e};break}}}if(null===r)throw new Error(`can not normalize v[${e}]`);return r};var Zh=a,eA=Zh.spawn,tA=Zh.exec;function rA(e,t,r){var n={};try{Object.keys(e).forEach(function(r){e[r].forEach(function(e){n[e]||(nA(e,t),n[e]=1)}),n[r]||(nA(r,t),n[r]=1)})}catch(e){if(r)return r(e);throw e}if(r)return r()}function nA(e,t){try{process.kill(parseInt(e,10),t)}catch(e){if("ESRCH"!==e.code)throw e}}function iA(e,t,r,n,i){var o=n(e),a="";o.stdout.on("data",function(e){e=e.toString("ascii");a+=e});o.on("close",function(o){delete r[e],0==o?a.match(/\d+/g).forEach(function(o){o=parseInt(o,10),t[e].push(o),t[o]=[],r[o]=1,iA(o,t,r,n,i)}):0==Object.keys(r).length&&i()})}var oA=Un(function(e,t,r){if("function"==typeof t&&void 0===r&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},i={};switch(n[e]=[],i[e]=1,process.platform){case"win32":tA("taskkill /pid "+e+" /T /F",r);break;case"darwin":iA(e,n,i,function(e){return eA("pgrep",["-P",e])},function(){rA(n,t,r)});break;default:iA(e,n,i,function(e){return eA("ps",["-o","pid","--no-headers","--ppid",e])},function(){rA(n,t,r)})}});function aA(e){let t=ns();return oA(Number(e),"SIGKILL",r=>{r?t.reject(r):t.resolve(`pid[${e}] killed`)}),t}function sA(e,t){return e>t}function cA(e){return e&&e.length?vd(e,cr,sA):void 0}function lA(e){return null==e?[]:function(e,t){return pe(t,function(t){return e[t]})}(e,dt(e))}function uA(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function fA(e,t,r,n){return pt(e,function(e,i,o){t(n,e,r(e),o)}),n}var dA,gA,pA=Object.prototype.hasOwnProperty,hA=(dA=function(e,t,r){pA.call(e,r)?e[r].push(t):di(e,r,[t])},function(e,t){var r=v(e)?uA:fA,n=gA?gA():{};return r(e,dA,fr(t),n)}),AA=hA;function mA(e,t){if(!Ce(e)||!Ce(t))return[];if(e.length!==t.length)return[];return xr(e,function(r,n){return vg(e[n],t[n])})}function IA(e,t={}){let r=we(t,"fs"),n=!1;try{r.statSync(e),n=!0}catch{n=!1}return n}function yA(e,t={}){let r=we(t,"fs");return!!IA(e,{fs:r})&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function vA(e){return yA(e,{fs:s})}function bA(e,t={}){let r=we(t,"fs");if(!IA(e,{fs:r}))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function wA(e,t={}){let r=we(t,"fs");if(bA(e,{fs:r}))return{success:"input folder is already exists: "+e};if(IA(e,{fs:r}))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function BA(e,t={}){let r=we(t,"path"),n=we(t,"fs");if(!IA(e,{fs:n})){let t=wA(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!bA(e,{fs:n}))return{error:"input path is not a folder"};try{let t=n.readdirSync(e);for(let i of t){let t=r.join(e,i);n.statSync(t).isDirectory()?n.rmSync(t,{recursive:!0,force:!0}):n.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}function EA(e,t,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"useSync","");pn(o)||(o=!0);let a="";return a=o?function(e,t,r={}){let n=we(r,"path"),i=we(r,"fs");if(!yA(e,{fs:i}))return{error:`fpSrc[${e}] is not a file`};try{wA(n.dirname(t),{fs:i}),i.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:n,fs:i}):async function(e,t,r={}){let n=we(r,"path"),i=we(r,"fs");if(!yA(e,{fs:i}))return{error:`fpSrc[${e}] is not a file`};let o=null;return await(async(e,t)=>{wA(n.dirname(t),{fs:i}),await new Promise((r,n)=>{let o=i.createReadStream(e),a=i.createWriteStream(t);o.on("error",n),a.on("error",n),a.on("finish",r),o.pipe(a)})})(e,t).then(()=>{o={success:"done: "+t}}).catch(e=>{o={error:e}}),o}(e,t,{path:n,fs:i}),a}function CA(e,t,r={}){let n=we(r,"path"),i=we(r,"fs");if(!bA(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};try{i.readdirSync(e).forEach(function(r){let o=n.resolve(e,r),a=n.resolve(t,r),s=i.lstatSync(o);if(s.isDirectory())wA(a,{fs:i}),CA(o,a,{path:n,fs:i});else if(s.isSymbolicLink()){let e=i.readlinkSync(o);i.symlinkSync(e,a)}else wA(n.dirname(a),{fs:i}),i.copyFileSync(o,a)})}catch(e){return{error:e}}return{success:"done: "+t}}function xA(e,t,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"useSync","");pn(o)||(o=!0);let a="";return a=o?CA(e,t,{path:n,fs:i}):async function(e,t,r={}){let n=we(r,"path"),i=we(r,"fs");if(!bA(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};let o=async(e,t)=>{let r=i.readdirSync(e);for(let a of r){let r=n.join(e,a),s=n.join(t,a),c=i.lstatSync(r);if(c.isDirectory())wA(s,{fs:i}),await o(r,s);else if(c.isSymbolicLink()){let e=i.readlinkSync(r);i.symlinkSync(e,s)}else wA(n.dirname(s),{fs:i}),await new Promise((e,t)=>{let n=i.createReadStream(r),o=i.createWriteStream(s);n.on("error",t),o.on("error",t),o.on("finish",e),n.pipe(o)})}},a=null;return await o(e,t).then(()=>{a={success:"done: "+t}}).catch(e=>{a={error:e}}),a}(e,t,{path:n,fs:i}),a}function DA(e){if(!De(e))return{path:"",isRoot:!1};for(;e.indexOf("\\\\")>=0;)e=e.replace("\\\\","\\");for(;e.indexOf("//")>=0;)e=e.replace("//","/");if(":"===fa(e,1))return{path:`${e}\\`,isRoot:!0};if("\\"===fa(e,1)){let t=Ga(e,1);return":"===fa(t,1)?{path:e,isRoot:!0}:{path:t,isRoot:!1}}if("/"===fa(e,1)){let t=Ga(e,1);return 0===t.length?{path:e,isRoot:!0}:{path:t,isRoot:!1}}return{path:e,isRoot:!1}}function FA(e){if(!De(e))return"";let t=DA(e);if(t.isRoot)return t.path;let r=t.path;try{r=r.split("\\").pop().split("/").pop()}catch(e){}return r}function QA(e){if(!De(e))return"";let t=DA(e);if(t.isRoot)return t.path;let r=FA(e=t.path);if(!De(r))return e;let n=DA(e=Ga(e,r.length));return n.isRoot,n.path}function SA(e,t="",r={}){let n=we(r,"fs"),i=we(r,"encoding","");if(De(i)||(i="utf8"),IA(e,{fs:n}))return{error:"input path already exists: "+e};if(yA(e,{fs:n}))return{error:"input file is already exists: "+e};let o=QA(e);bA(o,{fs:n})||wA(o,{fs:n});try{n.writeFileSync(e,t,{encoding:i})}catch(e){return{error:e}}return{success:"done: "+e}}function kA(e){return wA(e,{fs:s})}function NA(e,t={}){let r=we(t,"fs");if(!IA(e,{fs:r}))return{success:"file does not exist: "+e};if(!yA(e,{fs:r}))return{error:"input path is not a file: "+e};try{r.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}async function qA(e,t={}){let r=we(t,"numRetry");eo(r)||(r=5),r=Zi(r);let n=we(t,"fs",null);if(!IA(e,{fs:n}))return"file does not exist: "+e;if(!yA(e,{fs:n}))return Promise.reject("input path is not a file: "+e);for(let t=0;t<r;t++)try{n.unlinkSync(e);break}catch(e){if("EBUSY"!==e.code)return Promise.reject(e);await bs(300)}return"done: "+e}function MA(e,t={}){let r=we(t,"fs");if(!IA(e,{fs:r}))return{success:"folder does not exist: "+e};if(!bA(e,{fs:r}))return{error:"input path is not a folder: "+e};try{r.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function HA(e){return MA(e,{fs:s})}async function LA(e,t={}){let r=we(t,"numRetry");eo(r)||(r=5),r=Zi(r);let n=we(t,"fs",null);if(!IA(e,{fs:n}))return"folder does not exist: "+e;if(!bA(e,{fs:n}))return Promise.reject("input path is not a folder: "+e);for(let t=0;t<r;t++)try{n.rmSync(e,{recursive:!0,force:!0});break}catch(e){if("EBUSY"!==e.code)return Promise.reject(e);await bs(300)}return"done: "+e}async function UA(e,t,r={}){let n="",i=we(r,"fs"),o=we(r,"Readable");if(!De(e))throw new Error("urlIn in not an effective string");let a=QA(t),s=we(r,"fnOut","");De(s)||(s=FA(t)),bA(a,{fs:i})||wA(a,{fs:i});let c=ns();try{let r=await fetch(e);if(!r.ok)return c.reject(r.statusText),c;let a=i.createWriteStream(t);o.fromWeb(r.body).pipe(a),a.on("finish",()=>{c.resolve(t)}),a.on("error",e=>{n=e.message,c.reject(n)})}catch(e){n=e.message,c.reject(n)}return c}function RA(){if(!va(r))throw new Error("invalid dayjs");return r().format("YYYY-MM-DDTHH:mm:ssZ")}function OA(e){if(!De(e))return"";let t=FA(e),r=Jo(t,".");if(dn(r)<=1)return t;let n="";try{r=zo(r),n=xo(r,".")}catch(e){}return n}function TA(e){return bA(e,{fs:s})}function YA(e,t={}){let r=we(t,"polling");pn(r)||(r=!1);let n=we(t,"timeInterval");eo(n)||(n=100),n=Zi(n);let o=we(t,"timeBinaryInterval");eo(o)||(o=300),o=Zi(o);let a=new u.EventEmitter,c=e,l=null,d=setInterval(()=>{if(null===l)TA(c)&&(l=f.watch(c,{usePolling:r,interval:n,binaryInterval:o,awaitWriteFinish:!0}),l.on("all",(e,t,r)=>{t=i.resolve(t),a.emit("change",{type:e,fp:t,stats:r}),"unlinkDir"===e&&i.resolve(c)===t&&setTimeout(()=>{g()},1)}));else if(!TA(c)){let e=s.fstatSync;a.emit("change",{type:"unlinkDir",fp:i.resolve(c),stats:e}),setTimeout(()=>{g()},1)}},n),g=()=>{if(null!==l){try{l.unwatch(c)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}};return a.clear=()=>{g(),clearInterval(d)},a}function jA(e,t={}){let r=we(t,"fs"),n=we(t,"crypto"),i=we(t,"type","");De(i)||(i="sha512");let o=ns();if(!yA(e,{fs:r}))return o.reject(`fp[${e}] is not a file`),o;try{let t=n.createHash(i),a=r.createReadStream(e);a.on("readable",()=>{let e=a.read();e?t.update(e):o.resolve(t.digest("hex"))}),a.on("error",e=>{o.reject(e.toString())})}catch(e){o.reject(e.toString())}return o}const GA=new Uint8Array([0,97,115,109,1,0,0,0,1,48,8,96,3,127,127,127,1,127,96,3,127,127,127,0,96,2,127,127,0,96,1,127,1,127,96,3,127,127,126,1,126,96,3,126,127,127,1,126,96,2,127,126,0,96,1,127,1,126,3,11,10,0,0,2,1,3,4,5,6,1,7,5,3,1,0,1,7,85,9,3,109,101,109,2,0,5,120,120,104,51,50,0,0,6,105,110,105,116,51,50,0,2,8,117,112,100,97,116,101,51,50,0,3,8,100,105,103,101,115,116,51,50,0,4,5,120,120,104,54,52,0,5,6,105,110,105,116,54,52,0,7,8,117,112,100,97,116,101,54,52,0,8,8,100,105,103,101,115,116,54,52,0,9,10,251,22,10,242,1,1,4,127,32,0,32,1,106,33,3,32,1,65,16,79,4,127,32,3,65,16,107,33,6,32,2,65,168,136,141,161,2,106,33,3,32,2,65,137,235,208,208,7,107,33,4,32,2,65,207,140,162,142,6,106,33,5,3,64,32,3,32,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,4,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,2,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,5,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,6,32,0,65,4,106,34,0,79,13,0,11,32,2,65,12,119,32,5,65,18,119,106,32,4,65,7,119,106,32,3,65,1,119,106,5,32,2,65,177,207,217,178,1,106,11,32,1,106,32,0,32,1,65,15,113,16,1,11,146,1,0,32,1,32,2,106,33,2,3,64,32,1,65,4,106,32,2,75,69,4,64,32,0,32,1,40,2,0,65,189,220,202,149,124,108,106,65,17,119,65,175,214,211,190,2,108,33,0,32,1,65,4,106,33,1,12,1,11,11,3,64,32,1,32,2,79,69,4,64,32,0,32,1,45,0,0,65,177,207,217,178,1,108,106,65,11,119,65,177,243,221,241,121,108,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,65,15,118,115,65,247,148,175,175,120,108,34,0,65,13,118,32,0,115,65,189,220,202,149,124,108,34,0,65,16,118,32,0,115,11,63,0,32,0,65,8,106,32,1,65,168,136,141,161,2,106,54,2,0,32,0,65,12,106,32,1,65,137,235,208,208,7,107,54,2,0,32,0,65,16,106,32,1,54,2,0,32,0,65,20,106,32,1,65,207,140,162,142,6,106,54,2,0,11,195,4,1,6,127,32,1,32,2,106,33,6,32,0,65,24,106,33,4,32,0,65,40,106,40,2,0,33,3,32,0,32,0,40,2,0,32,2,106,54,2,0,32,0,65,4,106,34,5,32,5,40,2,0,32,2,65,16,79,32,0,40,2,0,65,16,79,114,114,54,2,0,32,2,32,3,106,65,16,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,40,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,16,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,40,2,0,32,4,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,12,106,34,3,32,3,40,2,0,32,4,65,4,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,16,106,34,3,32,3,40,2,0,32,4,65,8,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,20,106,34,3,32,3,40,2,0,32,4,65,12,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,40,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,32,6,65,16,107,77,4,64,32,6,65,16,107,33,8,32,0,65,8,106,40,2,0,33,2,32,0,65,12,106,40,2,0,33,3,32,0,65,16,106,40,2,0,33,5,32,0,65,20,106,40,2,0,33,7,3,64,32,2,32,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,3,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,5,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,7,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,7,32,8,32,1,65,4,106,34,1,79,13,0,11,32,0,65,8,106,32,2,54,2,0,32,0,65,12,106,32,3,54,2,0,32,0,65,16,106,32,5,54,2,0,32,0,65,20,106,32,7,54,2,0,11,32,1,32,6,73,4,64,32,4,32,1,32,6,32,1,107,34,1,252,10,0,0,32,0,65,40,106,32,1,54,2,0,11,11,97,1,1,127,32,0,65,16,106,40,2,0,33,1,32,0,65,4,106,40,2,0,4,127,32,1,65,12,119,32,0,65,20,106,40,2,0,65,18,119,106,32,0,65,12,106,40,2,0,65,7,119,106,32,0,65,8,106,40,2,0,65,1,119,106,5,32,1,65,177,207,217,178,1,106,11,32,0,40,2,0,106,32,0,65,24,106,32,0,65,40,106,40,2,0,16,1,11,255,3,2,3,126,1,127,32,0,32,1,106,33,6,32,1,65,32,79,4,126,32,6,65,32,107,33,6,32,2,66,214,235,130,238,234,253,137,245,224,0,124,33,3,32,2,66,177,169,172,193,173,184,212,166,61,125,33,4,32,2,66,249,234,208,208,231,201,161,228,225,0,124,33,5,3,64,32,3,32,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,3,32,4,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,4,32,2,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,5,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,5,32,6,32,0,65,8,106,34,0,79,13,0,11,32,2,66,12,137,32,5,66,18,137,124,32,4,66,7,137,124,32,3,66,1,137,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,2,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,2,66,197,207,217,178,241,229,186,234,39,124,11,32,1,173,124,32,0,32,1,65,31,113,16,6,11,134,2,0,32,1,32,2,106,33,2,3,64,32,2,32,1,65,8,106,79,4,64,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,32,0,133,66,27,137,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,33,0,32,1,65,8,106,33,1,12,1,11,11,32,1,65,4,106,32,2,77,4,64,32,0,32,1,53,2,0,66,135,149,175,175,152,182,222,155,158,127,126,133,66,23,137,66,207,214,211,190,210,199,171,217,66,126,66,249,243,221,241,153,246,153,171,22,124,33,0,32,1,65,4,106,33,1,11,3,64,32,1,32,2,73,4,64,32,0,32,1,49,0,0,66,197,207,217,178,241,229,186,234,39,126,133,66,11,137,66,135,149,175,175,152,182,222,155,158,127,126,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,66,33,136,133,66,207,214,211,190,210,199,171,217,66,126,34,0,32,0,66,29,136,133,66,249,243,221,241,153,246,153,171,22,126,34,0,32,0,66,32,136,133,11,77,0,32,0,65,8,106,32,1,66,214,235,130,238,234,253,137,245,224,0,124,55,3,0,32,0,65,16,106,32,1,66,177,169,172,193,173,184,212,166,61,125,55,3,0,32,0,65,24,106,32,1,55,3,0,32,0,65,32,106,32,1,66,249,234,208,208,231,201,161,228,225,0,124,55,3,0,11,244,4,2,3,127,4,126,32,1,32,2,106,33,5,32,0,65,40,106,33,4,32,0,65,200,0,106,40,2,0,33,3,32,0,32,0,41,3,0,32,2,173,124,55,3,0,32,2,32,3,106,65,32,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,200,0,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,32,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,41,3,0,32,4,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,16,106,34,3,32,3,41,3,0,32,4,65,8,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,24,106,34,3,32,3,41,3,0,32,4,65,16,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,32,106,34,3,32,3,41,3,0,32,4,65,24,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,200,0,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,65,32,106,32,5,77,4,64,32,5,65,32,107,33,2,32,0,65,8,106,41,3,0,33,6,32,0,65,16,106,41,3,0,33,7,32,0,65,24,106,41,3,0,33,8,32,0,65,32,106,41,3,0,33,9,3,64,32,6,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,7,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,7,32,8,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,8,32,9,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,9,32,2,32,1,65,8,106,34,1,79,13,0,11,32,0,65,8,106,32,6,55,3,0,32,0,65,16,106,32,7,55,3,0,32,0,65,24,106,32,8,55,3,0,32,0,65,32,106,32,9,55,3,0,11,32,1,32,5,73,4,64,32,4,32,1,32,5,32,1,107,34,1,252,10,0,0,32,0,65,200,0,106,32,1,54,2,0,11,11,188,2,1,5,126,32,0,65,24,106,41,3,0,33,1,32,0,41,3,0,34,2,66,32,90,4,126,32,0,65,8,106,41,3,0,34,3,66,1,137,32,0,65,16,106,41,3,0,34,4,66,7,137,124,32,1,66,12,137,32,0,65,32,106,41,3,0,34,5,66,18,137,124,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,1,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,1,66,197,207,217,178,241,229,186,234,39,124,11,32,2,124,32,0,65,40,106,32,2,66,31,131,167,16,6,11]);async function JA(){return function(e){const{exports:{mem:t,xxh32:r,xxh64:n,init32:i,update32:o,digest32:a,init64:s,update64:c,digest64:l}}=e;let u=new Uint8Array(t.buffer);function f(e,r){if(t.buffer.byteLength<e+r){const n=Math.ceil((e+r-t.buffer.byteLength)/65536);t.grow(n),u=new Uint8Array(t.buffer)}}function d(e,t,r,n,i,o){f(e);const a=new Uint8Array(e);return u.set(a),r(0,t),a.set(u.subarray(0,e)),{update(t){let r;return u.set(a),"string"==typeof t?(f(3*t.length,e),r=A.encodeInto(t,u.subarray(e)).written):(f(t.byteLength,e),u.set(t,e),r=t.byteLength),n(0,e,r),a.set(u.subarray(0,e)),this},digest:()=>(u.set(a),o(i(0)))}}function g(e){return e>>>0}const p=2n**64n-1n;function h(e){return e&p}const A=new TextEncoder;function m(e,t=0){return f(3*e.length,0),g(r(0,A.encodeInto(e,u).written,t))}function I(e,t=0n){return f(3*e.length,0),h(n(0,A.encodeInto(e,u).written,t))}return{h32:m,h32ToString:(e,t=0)=>m(e,t).toString(16).padStart(8,"0"),h32Raw:(e,t=0)=>(f(e.byteLength,0),u.set(e),g(r(0,e.byteLength,t))),create32:(e=0)=>d(48,e,i,o,a,g),h64:I,h64ToString:(e,t=0n)=>I(e,t).toString(16).padStart(16,"0"),h64Raw:(e,t=0n)=>(f(e.byteLength,0),u.set(e),h(n(0,e.byteLength,t))),create64:(e=0n)=>d(88,e,s,c,l,h)}}((await WebAssembly.instantiate(GA)).instance)}async function zA(e,t={}){let r=we(t,"fs"),n=we(t,"chunkSize");if(Se(n)||(n=67108864),n=Mn(n),!yA(e,{fs:r}))return Promise.reject("fp is not a file");let i=ns();try{let{create64:t}=await JA(),o=t(),a=r.createReadStream(e,{highWaterMark:n});a.on("data",e=>{o.update(e)}),a.on("end",()=>{let e=o.digest().toString(16).padStart(16,"0");i.resolve(e)}),a.on("error",i.reject)}catch(e){i.reject(e.toString())}return i}function VA(e,t={}){let r=we(t,"fs"),n=we(t,"crypto"),i=we(t,"type","");De(i)||(i="sha512");let o=we(t,"chunkSize");Se(o)||(o=67108864),o=Mn(o);let a=ns();return yA(e,{fs:r})?"xxhash64"===i?zA(e,{fs:r,chunkSize:o}):jA(e,{fs:r,crypto:n,type:i}):(a.reject(`fp[${e}] is not a file`),a)}function PA(e,t=1,r={}){let n=1,i=we(r,"path"),o=we(r,"fs");if(!bA(e,{fs:o}))throw new Error(`fd[${e}] is not a folder`);return null!==t&&eo(t)&&(t=Zi(t))<1&&(t=1),function e(r){let a=[];return bA(r,{fs:o})?(Er(o.readdirSync(r),function(s){let c=i.resolve(r,s),l=null;try{l=o.statSync(c)}catch(e){}l&&l.isDirectory()?(a.push({isFolder:!0,level:n,path:c,name:i.basename(c)}),n+=1,(n<=t||null===t)&&(a=a.concat(e(c))),n-=1):a.push({isFolder:!1,level:n,path:c,name:i.basename(c)})}),a):a}(e)}function XA(e,t=1,r={}){let n=we(r,"path"),i=we(r,"fs");if(!bA(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let o=[];return o=PA(e,t,{path:n,fs:i}),o=pa(o,{isFolder:!1}),o=xr(o,e=>(delete e.isFolder,e)),o}async function _A(e,t=1,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"crypto"),a=we(r,"type","");if(De(a)||(a="md5"),!bA(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let s=XA(e,t,{path:n,fs:i});return s=await cl(s,async e=>{let t=we(e,"path","");return e.hashType=a,e.hash="",De(t)&&(e.hash=await VA(t,{fs:i,crypto:o,type:a,useSync:!1})),e}),s}async function WA(e,t=1,r={}){return _A(e,t,{path:i,fs:s,crypto:d,...r})}async function KA(e,t={}){let r=we(t,"path"),n=we(t,"fs"),i=we(t,"crypto"),o=we(t,"type","");De(o)||(o="md5");let a=[],s=PA(e,null,{path:r,fs:n});return await cl(s,async e=>{if(e.isFolder)return;let t=await jA(e.path,{fs:n,crypto:i,type:o});a.push(t)}),xo(a,"|")}function $A(e,t=1,r={}){let n=we(r,"path"),i=we(r,"fs");if(!bA(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let o=[];return o=PA(e,t,{path:n,fs:i}),o=pa(o,{isFolder:!0}),o=xr(o,e=>(delete e.isFolder,e)),o}async function ZA(e,t,r={}){let n="",i=we(r,"fs");if(!Rr(e))throw new Error("fpsIn in not an effective array");let o=QA(t),a=we(r,"fnOut","");De(a)||(a=FA(t)),bA(o,{fs:i})||wA(o,{fs:i});let s=ns();try{let r=i.createWriteStream(t);for(let t=0;t<e.length;t++){let o=e[t];if(!yA(o,{fs:i}))throw new Error(`fpIn[${o}] is not a file`);let a=()=>{let e=ns(),t=i.createReadStream(o);return t.on("error",t=>{n=t.message,e.reject(t)}),t.on("end",()=>{NA(o,{fs:i}),e.resolve()}),t.pipe(r,{end:!1}),e};await a()}r.end(),r.on("error",e=>{n=e.message,s.reject(n)}),r.on("finish",()=>{let e={filename:a,path:t};s.resolve(e)})}catch(e){n=e.message,s.reject(n)}return s}function em(e,t={}){let r=null,n=we(t,"fs"),i="";try{i=n.readFileSync(e,"utf8")}catch(e){r=e}return null!==r?{error:r}:{success:i}}function tm(e,t,r={}){let n=we(r,"fs");if(!yA(e,{fs:n}))return{error:`pahOld[${e}] is not a file`};if(IA(t,{fs:n}))return{error:`pahNew[${t}] already exists`};let i=QA(t);bA(i,{fs:n})||wA(i,{fs:n});try{n.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}function rm(e,t,r={}){let n=we(r,"fs");if(!bA(e,{fs:n}))return{error:`pahOld[${e}] is not a folder`};if(IA(t,{fs:n}))return{error:`pahNew[${t}] already exists`};let i=QA(t);bA(i,{fs:n})||wA(i,{fs:n});try{n.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}function nm(e,t,r,n={}){let i=we(n,"withInfor");pn(i)||(i=!0);let o={del:[],add:[],same:[],diff:[]};if(!De(r))return console.log("invalid key"),i&&(o.infor={}),o;Ce(e)||(e=[e]),Ce(t)||(t=[t]),e=pa(e,e=>ke(e,r)),t=pa(t,e=>ke(e,r));let a=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=a.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?o.same.push(e):o.diff.push(e),a.delete(t[r])}else o.del.push(t)}if(o.add=Array.from(a.values()),i){let e={};for(let t of o.del)e[t[r]]="del";for(let t of o.add)e[t[r]]="add";for(let t of o.diff)e[t[r]]="diff";for(let t of o.same)e[t[r]]="same";o.infor=e}return o}async function im(e,t=1,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"crypto"),a=we(r,"type","");De(a)||(a="md5");let s=we(r,"forFile",null);pn(s)||(s=!0);let c=we(r,"forFolder",null);if(pn(c)||(c=!1),!bA(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let l=PA(e,t,{path:n,fs:i});return l=await cl(l,async e=>{let t="";return s&&!e.isFolder&&(t=await jA(e.path,{fs:i,crypto:o,type:a})),c&&e.isFolder&&(t=await KA(e.path,{path:n,fs:i,crypto:o,type:a})),e.hash=t,e}),l}async function om(e,t,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"crypto"),a=we(r,"type","");if(De(a)||(a="md5"),!bA(e,{fs:i}))throw new Error(`fdSrc[${e}] is not a folder`);if(!bA(t,{fs:i}))return void await xA(e,t,{path:n,fs:i,useSync:!1});let s=n.sep,c=n.sep.length,l=(e,t)=>(e=xr(e,e=>((e,t)=>{let r=e.isFolder?"folder":"file",n=e.path.replace(t,"");return ua(n,c)===s&&(n=da(n,c)),n=n.replaceAll("\\","/"),{id:`${r}|${n}`,isFolder:e.isFolder,name:e.name,rpath:n,hash:e.hash}})(e,t)),e),u=await im(e,null,{path:n,fs:i,crypto:o,type:a,forFile:!0,forFolder:!1});u=l(u,n.resolve(e));let f=await im(t,null,{path:n,fs:i,crypto:o,type:a,forFile:!0,forFolder:!1});f=l(f,n.resolve(t));let d=nm(f,u,"id",{withInfor:!1});await cl(d.del,async e=>{if(e.isFolder){MA(n.resolve(t,e.rpath),{fs:i})}}),await cl(d.del,async e=>{if(!e.isFolder){NA(n.resolve(t,e.rpath),{fs:i})}}),await cl([...d.add,...d.diff],async r=>{if(!r.isFolder){let o=n.resolve(e,r.rpath),a=n.resolve(t,r.rpath);await EA(o,a,{path:n,fs:i,useSync:!1})}})}function am(e,t={}){let r=we(t,"polling");pn(r)||(r=!1);let n=we(t,"timeInterval");eo(n)||(n=100),n=Zi(n);let o=we(t,"timeBinaryInterval");eo(o)||(o=300),o=Zi(o);let a=new u.EventEmitter,s=e,c=null,l=setInterval(()=>{null===c&&vA(s)&&(c=f.watch(s,{usePolling:r,interval:n,binaryInterval:o,awaitWriteFinish:!0}),c.on("all",(e,t,r)=>{t=i.resolve(t),a.emit("change",{type:e,fp:t,stats:r})}))},n);return a.clear=()=>{(()=>{if(null!==c){try{c.unwatch(s)}catch(e){console.log(e)}c.close().catch(e=>{console.log(e)}).finally(()=>{c=null})}})(),clearInterval(l)},a}function sm(e,t,r={}){let n=null,i=we(r,"fs"),o=QA(e);bA(o,{fs:i})||wA(o,{fs:i});try{i.writeFileSync(e,t,"utf8")}catch(e){n=e}return null!==n?{error:n}:{success:e}}const cm=[];for(let e=0;e<256;++e)cm.push((e+256).toString(16).slice(1));const lm=new Uint8Array(16);function um(){return crypto.getRandomValues(lm)}const fm={};function dm(e,t,r){let n;if(e)n=gm(e.random??e.rng?.()??um(),e.msecs,e.seq,t,r);else{const e=Date.now(),i=um();!function(e,t,r){e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++)}(fm,e,i),n=gm(i,fm.msecs,fm.seq,t,r)}return t??function(e,t=0){return(cm[e[t+0]]+cm[e[t+1]]+cm[e[t+2]]+cm[e[t+3]]+"-"+cm[e[t+4]]+cm[e[t+5]]+"-"+cm[e[t+6]]+cm[e[t+7]]+"-"+cm[e[t+8]]+cm[e[t+9]]+"-"+cm[e[t+10]]+cm[e[t+11]]+cm[e[t+12]]+cm[e[t+13]]+cm[e[t+14]]+cm[e[t+15]]).toLowerCase()}(n)}function gm(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(n){if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else n=new Uint8Array(16),i=0;return t??=Date.now(),r??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=255&t,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|3&e[10],n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}function pm(e){return"[object Uint16Array]"===Object.prototype.toString.call(e)}function hm(e){if(!(I(e)||gs(e)||Za(e)||pm(e)))return null;try{if(e.byteLength)return e.byteLength}catch(e){}try{if(e.length)return e.length}catch(e){}try{if(e.size)return e.size}catch(e){}return null}function Am(e,t=!0){if(!Rr(e)){return{error:"no data"}}let r=null;try{r=function(e,t=!0){let r=t?"\ufeff":"";return Er(e,e=>{let t=[];Er(e,e=>{xe(e)?(e=pl(e,"\r\n",""),e=pl(e,"\r",""),e=`"${e=pl(e,"\n","")}"`):e=pn(e)?e?"true":"false":Ya(e),t.push(e)}),r+=xo(t,",")+"\r\n"}),r}(e,t)}catch(e){return{error:e}}return r}function mm(e){return pn(e)?e?"true":"false":Ya(e)}function Im(e,t){let r=[];return e.SheetNames.forEach(function(n){let i=vn().utils.sheet_to_json(e.Sheets[n],{header:"A",defval:"",blankrows:!0});i=xr(i,e=>lA(e)),t&&(i=xr(i,e=>xr(e,e=>mm(e)))),r.push({sheetname:n,data:i})}),r}function ym(e,t){let r=we(t,"fmt","ltdt");if(!ya(["ltdt","csv","array"],r))return{error:"opt.fmt is not one of 'ltdt', 'csv', 'array'"};let n,i=we(t,"valueToString",!0);if(!pn(i))return{error:"opt.valueToString is not a boolean"};try{n=vn().read(e,{type:"buffer"})}catch(e){return console.log("error: ",e),{error:"can not read data from u8a"}}let o=null;try{"ltdt"===r?o=function(e,t){let r=[];return e.SheetNames.forEach(function(n){let i=vn().utils.sheet_to_json(e.Sheets[n]);t&&(i=xr(i,e=>(Er(e,(t,r)=>{e[r]=mm(t)}),e))),r.push({sheetname:n,data:i})}),r}(n,i):"array"===r?o=Im(n,i):"csv"===r&&(o=function(e,t){let r=Im(e,t);return Er(r,(e,t)=>{r[t].data=Am(e.data,!1)}),r}(n,i))}catch(e){return console.log("error: ",e),{error:"can not convert data"}}return o}var vm;function bm(e){if(!N(e))return!1;var t=k(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!vr(e)}function wm(e){return bm(e)}function Bm(e){if(!Ee(e))return{error:"wb is not an effective object"};if(!Ce(we(e,"SheetNames")))return{error:"wb.SheetNames is not an array"};if(!Be(we(e,"Sheets")))return{error:"wb.Sheets is not an object"};let t=null;try{t=ps(vn().write(e,{bookType:"xlsx",type:"binary"}))}catch(e){return{error:e}}return t}
15
+ var Bs,Es,Cs=9e15,xs=1e9,Ds="0123456789abcdef",Fs="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Qs="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ss={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Cs,maxE:Cs,crypto:!1},ks=!0,Ns="[DecimalError] ",qs=Ns+"Invalid argument: ",Ms=Ns+"Precision limit exceeded",Hs=Ns+"crypto unavailable",Ls="[object Decimal]",Us=Math.floor,Rs=Math.pow,Os=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ts=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ys=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,js=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Gs=1e7,Js=Fs.length-1,zs=Qs.length-1,Vs={toStringTag:Ls};function Ps(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(r=7-(n=e[t]+"").length)&&(o+=ic(r)),o+=n;(r=7-(n=(a=e[t])+"").length)&&(o+=ic(r))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function Xs(e,t,r){if(e!==~~e||e<t||e>r)throw Error(qs+e)}function _s(e,t,r,n){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=Rs(10,7-t),s=e[i]%o|0,null==n?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=r<4&&99999==s||r>3&&49999==s||5e4==s||0==s):a=(r<4&&s+1==o||r>3&&s+1==o/2)&&(e[i+1]/o/100|0)==Rs(10,t-2)-1||(s==o/2||0==s)&&!(e[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(n||r<4)&&9999==s||!n&&r>3&&4999==s):a=((n||r<4)&&s+1==o||!n&&r>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==Rs(10,t-3)-1,a}function Ws(e,t,r){for(var n,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=Ds.indexOf(e.charAt(a++)),n=0;n<o.length;n++)o[n]>r-1&&(void 0===o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}Vs.absoluteValue=Vs.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),$s(e)},Vs.ceil=function(){return $s(new this.constructor(this),this.e+1,2)},Vs.clampedTo=Vs.clamp=function(e,t){var r=this,n=r.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(qs+t);return r.cmp(e)<0?e:r.cmp(t)>0?t:new n(r)},Vs.comparedTo=Vs.cmp=function(e){var t,r,n,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,c=o.s,l=e.s;if(!a||!s)return c&&l?c!==l?c:a===s?0:!a^c<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?c:s[0]?-l:0;if(c!==l)return c;if(o.e!==e.e)return o.e>e.e^c<0?1:-1;for(t=0,r=(n=a.length)<(i=s.length)?n:i;t<r;++t)if(a[t]!==s[t])return a[t]>s[t]^c<0?1:-1;return n===i?0:n>i^c<0?1:-1},Vs.cosine=Vs.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?i=(1/pc(4,r=Math.ceil(n/3))).toString():(r=16,i="2.3283064365386962890625e-10");e.precision+=r,t=gc(e,1,t.times(i),new e(1));for(var o=r;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}(n,hc(n,r)),n.precision=e,n.rounding=t,$s(2==Es||3==Es?r.neg():r,e,t,!0)):new n(1):new n(NaN)},Vs.cubeRoot=Vs.cbrt=function(){var e,t,r,n,i,o,a,s,c,l,u=this,f=u.constructor;if(!u.isFinite()||u.isZero())return new f(u);for(ks=!1,(o=u.s*Rs(u.s*u,1/3))&&Math.abs(o)!=1/0?n=new f(o.toString()):(r=Ps(u.d),(o=((e=u.e)-r.length+1)%3)&&(r+=1==o||-2==o?"0":"00"),o=Rs(r,1/3),e=Us((e+1)/3)-(e%3==(e<0?-1:2)),(n=new f(r=o==1/0?"5e"+e:(r=o.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=u.s),a=(e=f.precision)+3;;)if(l=(c=(s=n).times(s).times(s)).plus(u),n=Ks(l.plus(u).times(s),l.plus(c),a+2,1),Ps(s.d).slice(0,a)===(r=Ps(n.d)).slice(0,a)){if("9999"!=(r=r.slice(a-3,a+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||($s(n,e+1,1),t=!n.times(n).times(n).eq(u));break}if(!i&&($s(s,e+1,0),s.times(s).times(s).eq(u))){n=s;break}a+=4,i=1}return ks=!0,$s(n,e,f.rounding,t)},Vs.decimalPlaces=Vs.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=7*((e=t.length-1)-Us(this.e/7)),e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},Vs.dividedBy=Vs.div=function(e){return Ks(this,new this.constructor(e))},Vs.dividedToIntegerBy=Vs.divToInt=function(e){var t=this.constructor;return $s(Ks(this,new t(e),0,1,1),t.precision,t.rounding)},Vs.equals=Vs.eq=function(e){return 0===this.cmp(e)},Vs.floor=function(){return $s(new this.constructor(this),this.e+1,3)},Vs.greaterThan=Vs.gt=function(e){return this.cmp(e)>0},Vs.greaterThanOrEqualTo=Vs.gte=function(e){var t=this.cmp(e);return 1==t||0===t},Vs.hyperbolicCosine=Vs.cosh=function(){var e,t,r,n,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;r=a.precision,n=a.rounding,a.precision=r+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/pc(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=gc(a,1,o.times(t),new a(1),!0);for(var c,l=e,u=new a(8);l--;)c=o.times(o),o=s.minus(c.times(u.minus(c.times(u))));return $s(o,a.precision=r,a.rounding=n,!0)},Vs.hyperbolicSine=Vs.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(n=i.d.length)<3)i=gc(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=gc(o,2,i=i.times(1/pc(5,e)),i,!0);for(var a,s=new o(5),c=new o(16),l=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(c.times(a).plus(l))))}return o.precision=t,o.rounding=r,$s(i,t,r,!0)},Vs.hyperbolicTangent=Vs.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,Ks(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},Vs.inverseCosine=Vs.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return-1!==r?0===r?e.isNeg()?rc(t,n,i):new t(0):new t(NaN):e.isZero()?rc(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))},Vs.inverseHyperbolicCosine=Vs.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,ks=!1,r=r.times(r).minus(1).sqrt().plus(r),ks=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},Vs.inverseHyperbolicSine=Vs.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,ks=!1,r=r.times(r).plus(1).sqrt().plus(r),ks=!0,n.precision=e,n.rounding=t,r.ln())},Vs.inverseHyperbolicTangent=Vs.atanh=function(){var e,t,r,n,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,n=i.sd(),Math.max(n,e)<2*-i.e-1?$s(new o(i),e,t,!0):(o.precision=r=n-i.e,i=Ks(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},Vs.inverseSine=Vs.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,-1!==t?0===t?((e=rc(o,r+4,n).times(.5)).s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))},Vs.inverseTangent=Vs.atan=function(){var e,t,r,n,i,o,a,s,c,l=this,u=l.constructor,f=u.precision,d=u.rounding;if(l.isFinite()){if(l.isZero())return new u(l);if(l.abs().eq(1)&&f+4<=zs)return(a=rc(u,f+4,d).times(.25)).s=l.s,a}else{if(!l.s)return new u(NaN);if(f+4<=zs)return(a=rc(u,f+4,d).times(.5)).s=l.s,a}for(u.precision=s=f+10,u.rounding=1,e=r=Math.min(28,s/7+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(ks=!1,t=Math.ceil(s/7),n=1,c=l.times(l),a=new u(l),i=l;-1!==e;)if(i=i.times(c),o=a.minus(i.div(n+=2)),i=i.times(c),void 0!==(a=o.plus(i.div(n+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return r&&(a=a.times(2<<r-1)),ks=!0,$s(a,u.precision=f,u.rounding=d,!0)},Vs.isFinite=function(){return!!this.d},Vs.isInteger=Vs.isInt=function(){return!!this.d&&Us(this.e/7)>this.d.length-2},Vs.isNaN=function(){return!this.s},Vs.isNegative=Vs.isNeg=function(){return this.s<0},Vs.isPositive=Vs.isPos=function(){return this.s>0},Vs.isZero=function(){return!!this.d&&0===this.d[0]},Vs.lessThan=Vs.lt=function(e){return this.cmp(e)<0},Vs.lessThanOrEqualTo=Vs.lte=function(e){return this.cmp(e)<1},Vs.logarithm=Vs.log=function(e){var t,r,n,i,o,a,s,c,l=this,u=l.constructor,f=u.precision,d=u.rounding;if(null==e)e=new u(10),t=!0;else{if(r=(e=new u(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new u(r&&!r[0]?-1/0:1!=l.s?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10==0;)i/=10;o=1!==i}if(ks=!1,a=lc(l,s=f+5),n=t?tc(u,s+10):lc(e,s),_s((c=Ks(a,n,s,1)).d,i=f,d))do{if(a=lc(l,s+=10),n=t?tc(u,s+10):lc(e,s),c=Ks(a,n,s,1),!o){+Ps(c.d).slice(i+1,i+15)+1==1e14&&(c=$s(c,f+1,0));break}}while(_s(c.d,i+=10,d));return ks=!0,$s(c,f,d)},Vs.minus=Vs.sub=function(e){var t,r,n,i,o,a,s,c,l,u,f,d,g=this,p=g.constructor;if(e=new p(e),!g.d||!e.d)return g.s&&e.s?g.d?e.s=-e.s:e=new p(e.d||g.s!==e.s?g:NaN):e=new p(NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(l=g.d,d=e.d,s=p.precision,c=p.rounding,!l[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!l[0])return new p(3===c?-0:0);e=new p(g)}return ks?$s(e,s,c):e}if(r=Us(e.e/7),u=Us(g.e/7),l=l.slice(),o=u-r){for((f=o<0)?(t=l,o=-o,a=d.length):(t=d,r=u,a=l.length),o>(n=Math.max(Math.ceil(s/7),a)+2)&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for((f=(n=l.length)<(a=d.length))&&(a=n),n=0;n<a;n++)if(l[n]!=d[n]){f=l[n]<d[n];break}o=0}for(f&&(t=l,l=d,d=t,e.s=-e.s),a=l.length,n=d.length-a;n>0;--n)l[a++]=0;for(n=d.length;n>o;){if(l[--n]<d[n]){for(i=n;i&&0===l[--i];)l[i]=Gs-1;--l[i],l[n]+=Gs}l[n]-=d[n]}for(;0===l[--a];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(e.d=l,e.e=ec(l,r),ks?$s(e,s,c):e):new p(3===c?-0:0)},Vs.modulo=Vs.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?$s(new n(r),n.precision,n.rounding):(ks=!1,9==n.modulo?(t=Ks(r,e.abs(),0,3,1)).s*=e.s:t=Ks(r,e,0,n.modulo,1),t=t.times(e),ks=!0,r.minus(t))},Vs.naturalExponential=Vs.exp=function(){return cc(this)},Vs.naturalLogarithm=Vs.ln=function(){return lc(this)},Vs.negated=Vs.neg=function(){var e=new this.constructor(this);return e.s=-e.s,$s(e)},Vs.plus=Vs.add=function(e){var t,r,n,i,o,a,s,c,l,u,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new d(e.d||f.s===e.s?f:NaN)):e=new d(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(l=f.d,u=e.d,s=d.precision,c=d.rounding,!l[0]||!u[0])return u[0]||(e=new d(f)),ks?$s(e,s,c):e;if(o=Us(f.e/7),n=Us(e.e/7),l=l.slice(),i=o-n){for(i<0?(r=l,i=-i,a=u.length):(r=u,n=o,a=l.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((a=l.length)-(i=u.length)<0&&(i=a,r=u,u=l,l=r),t=0;i;)t=(l[--i]=l[i]+u[i]+t)/Gs|0,l[i]%=Gs;for(t&&(l.unshift(t),++n),a=l.length;0==l[--a];)l.pop();return e.d=l,e.e=ec(l,n),ks?$s(e,s,c):e},Vs.precision=Vs.sd=function(e){var t,r=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(qs+e);return r.d?(t=nc(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},Vs.round=function(){var e=this,t=e.constructor;return $s(new t(e),e.e+1,t.rounding)},Vs.sine=Vs.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:gc(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=t.times(1/pc(5,r)),t=gc(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(n,hc(n,r)),n.precision=e,n.rounding=t,$s(Es>2?r.neg():r,e,t,!0)):new n(NaN)},Vs.squareRoot=Vs.sqrt=function(){var e,t,r,n,i,o,a=this,s=a.d,c=a.e,l=a.s,u=a.constructor;if(1!==l||!s||!s[0])return new u(!l||l<0&&(!s||s[0])?NaN:s?a:1/0);for(ks=!1,0==(l=Math.sqrt(+a))||l==1/0?(((t=Ps(s)).length+c)%2==0&&(t+="0"),l=Math.sqrt(t),c=Us((c+1)/2)-(c<0||c%2),n=new u(t=l==1/0?"5e"+c:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new u(l.toString()),r=(c=u.precision)+3;;)if(n=(o=n).plus(Ks(a,o,r+2,1)).times(.5),Ps(o.d).slice(0,r)===(t=Ps(n.d)).slice(0,r)){if("9999"!=(t=t.slice(r-3,r+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||($s(n,c+1,1),e=!n.times(n).eq(a));break}if(!i&&($s(o,c+1,0),o.times(o).eq(a))){n=o;break}r+=4,i=1}return ks=!0,$s(n,c,u.rounding,e)},Vs.tangent=Vs.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=Ks(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,$s(2==Es||4==Es?r.neg():r,e,t,!0)):new n(NaN)},Vs.times=Vs.mul=function(e){var t,r,n,i,o,a,s,c,l,u=this,f=u.constructor,d=u.d,g=(e=new f(e)).d;if(e.s*=u.s,!(d&&d[0]&&g&&g[0]))return new f(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:d&&g?0*e.s:e.s/0);for(r=Us(u.e/7)+Us(e.e/7),(c=d.length)<(l=g.length)&&(o=d,d=g,g=o,a=c,c=l,l=a),o=[],n=a=c+l;n--;)o.push(0);for(n=l;--n>=0;){for(t=0,i=c+n;i>n;)s=o[i]+g[n]*d[i-n-1]+t,o[i--]=s%Gs|0,t=s/Gs|0;o[i]=(o[i]+t)%Gs|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=ec(o,r),ks?$s(e,f.precision,f.rounding):e},Vs.toBinary=function(e,t){return Ac(this,2,e,t)},Vs.toDecimalPlaces=Vs.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(Xs(e,0,xs),void 0===t?t=n.rounding:Xs(t,0,8),$s(r,e+r.e+1,t))},Vs.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=Zs(n,!0):(Xs(e,0,xs),void 0===t?t=i.rounding:Xs(t,0,8),r=Zs(n=$s(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},Vs.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return void 0===e?r=Zs(i):(Xs(e,0,xs),void 0===t?t=o.rounding:Xs(t,0,8),r=Zs(n=$s(new o(i),e+i.e+1,t),!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r},Vs.toFraction=function(e){var t,r,n,i,o,a,s,c,l,u,f,d,g=this,p=g.d,h=g.constructor;if(!p)return new h(g);if(l=r=new h(1),n=c=new h(0),a=(o=(t=new h(n)).e=nc(p)-g.e-1)%7,t.d[0]=Rs(10,a<0?7+a:a),null==e)e=o>0?t:l;else{if(!(s=new h(e)).isInt()||s.lt(l))throw Error(qs+s);e=s.gt(t)?o>0?t:l:s}for(ks=!1,s=new h(Ps(p)),u=h.precision,h.precision=o=7*p.length*2;f=Ks(s,t,0,1,1),1!=(i=r.plus(f.times(n))).cmp(e);)r=n,n=i,i=l,l=c.plus(f.times(i)),c=i,i=t,t=s.minus(f.times(i)),s=i;return i=Ks(e.minus(r),n,0,1,1),c=c.plus(i.times(l)),r=r.plus(i.times(n)),c.s=l.s=g.s,d=Ks(l,n,o,1).minus(g).abs().cmp(Ks(c,r,o,1).minus(g).abs())<1?[l,n]:[c,r],h.precision=u,ks=!0,d},Vs.toHexadecimal=Vs.toHex=function(e,t){return Ac(this,16,e,t)},Vs.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:Xs(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(ks=!1,r=Ks(r,e,0,t,1).times(e),ks=!0,$s(r)):(e.s=r.s,r=e),r},Vs.toNumber=function(){return+this},Vs.toOctal=function(e,t){return Ac(this,8,e,t)},Vs.toPower=Vs.pow=function(e){var t,r,n,i,o,a,s=this,c=s.constructor,l=+(e=new c(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new c(Rs(+s,l));if((s=new c(s)).eq(1))return s;if(n=c.precision,o=c.rounding,e.eq(1))return $s(s,n,o);if((t=Us(e.e/7))>=e.d.length-1&&(r=l<0?-l:l)<=9007199254740991)return i=oc(c,s,r,n),e.s<0?new c(1).div(i):$s(i,n,o);if((a=s.s)<0){if(t<e.d.length-1)return new c(NaN);if(1&e.d[t]||(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(r=Rs(+s,l))&&isFinite(r)?new c(r+"").e:Us(l*(Math.log("0."+Ps(s.d))/Math.LN10+s.e+1)))>c.maxE+1||t<c.minE-1?new c(t>0?a/0:0):(ks=!1,c.rounding=s.s=1,r=Math.min(12,(t+"").length),(i=cc(e.times(lc(s,n+r)),n)).d&&_s((i=$s(i,n+5,1)).d,n,o)&&(t=n+10,+Ps((i=$s(cc(e.times(lc(s,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=$s(i,n+1,0))),i.s=a,ks=!0,c.rounding=o,$s(i,n,o))},Vs.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=Zs(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(Xs(e,1,xs),void 0===t?t=i.rounding:Xs(t,0,8),r=Zs(n=$s(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},Vs.toSignificantDigits=Vs.toSD=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(Xs(e,1,xs),void 0===t?t=r.rounding:Xs(t,0,8)),$s(new r(this),e,t)},Vs.toString=function(){var e=this,t=e.constructor,r=Zs(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},Vs.truncated=Vs.trunc=function(){return $s(new this.constructor(this),this.e+1,1)},Vs.valueOf=Vs.toJSON=function(){var e=this,t=e.constructor,r=Zs(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var Ks=function(){function e(e,t,r){var n,i=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+i,e[o]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,o,a,s,c){var l,u,f,d,g,p,h,A,m,I,y,v,b,w,B,E,C,x,D,F,Q=n.constructor,S=n.s==i.s?1:-1,k=n.d,N=i.d;if(!(k&&k[0]&&N&&N[0]))return new Q(n.s&&i.s&&(k?!N||k[0]!=N[0]:N)?k&&0==k[0]||!N?0*S:S/0:NaN);for(c?(g=1,u=n.e-i.e):(c=Gs,g=7,u=Us(n.e/g)-Us(i.e/g)),D=N.length,C=k.length,I=(m=new Q(S)).d=[],f=0;N[f]==(k[f]||0);f++);if(N[f]>(k[f]||0)&&u--,null==o?(w=o=Q.precision,a=Q.rounding):w=s?o+(n.e-i.e)+1:o,w<0)I.push(1),p=!0;else{if(w=w/g+2|0,f=0,1==D){for(d=0,N=N[0],w++;(f<C||d)&&w--;f++)B=d*c+(k[f]||0),I[f]=B/N|0,d=B%N|0;p=d||f<C}else{for((d=c/(N[0]+1)|0)>1&&(N=e(N,d,c),k=e(k,d,c),D=N.length,C=k.length),E=D,v=(y=k.slice(0,D)).length;v<D;)y[v++]=0;(F=N.slice()).unshift(0),x=N[0],N[1]>=c/2&&++x;do{d=0,(l=t(N,y,D,v))<0?(b=y[0],D!=v&&(b=b*c+(y[1]||0)),(d=b/x|0)>1?(d>=c&&(d=c-1),1==(l=t(h=e(N,d,c),y,A=h.length,v=y.length))&&(d--,r(h,D<A?F:N,A,c))):(0==d&&(l=d=1),h=N.slice()),(A=h.length)<v&&h.unshift(0),r(y,h,v,c),-1==l&&(l=t(N,y,D,v=y.length))<1&&(d++,r(y,D<v?F:N,v,c)),v=y.length):0===l&&(d++,y=[0]),I[f++]=d,l&&y[0]?y[v++]=k[E]||0:(y=[k[E]],v=1)}while((E++<C||void 0!==y[0])&&w--);p=void 0!==y[0]}I[0]||I.shift()}if(1==g)m.e=u,Bs=p;else{for(f=1,d=I[0];d>=10;d/=10)f++;m.e=f+u*g-1,$s(m,s?o+m.e+1:o,a,p)}return m}}();function $s(e,t,r,n){var i,o,a,s,c,l,u,f,d,g=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,s=f[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,c=(u=f[d=0])/Rs(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=f.length)){if(!n)break e;for(;s++<=d;)f.push(0);u=c=0,i=1,a=(o%=7)-7+1}else{for(u=s=f[d],i=1;s>=10;s/=10)i++;c=(a=(o%=7)-7+i)<0?0:u/Rs(10,i-a-1)%10|0}if(n=n||t<0||void 0!==f[d+1]||(a<0?u:u%Rs(10,i-a-1)),l=r<4?(c||n)&&(0==r||r==(e.s<0?3:2)):c>5||5==c&&(4==r||n||6==r&&(o>0?a>0?u/Rs(10,i-a):0:f[d-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,l?(t-=e.e+1,f[0]=Rs(10,(7-t%7)%7),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=d,s=1,d--):(f.length=d+1,s=Rs(10,7-o),f[d]=a>0?(u/Rs(10,i-a)%Rs(10,a)|0)*s:0),l)for(;;){if(0==d){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,f[0]==Gs&&(f[0]=1));break}if(f[d]+=s,f[d]!=Gs)break;f[d--]=0,s=1}for(o=f.length;0===f[--o];)f.pop()}return ks&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e<g.minE&&(e.e=0,e.d=[0])),e}function Zs(e,t,r){if(!e.isFinite())return uc(e);var n,i=e.e,o=Ps(e.d),a=o.length;return t?(r&&(n=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+ic(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ic(-i-1)+o,r&&(n=r-a)>0&&(o+=ic(n))):i>=a?(o+=ic(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+ic(n))):((n=i+1)<a&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(o+="."),o+=ic(n))),o}function ec(e,t){var r=e[0];for(t*=7;r>=10;r/=10)t++;return t}function tc(e,t,r){if(t>Js)throw ks=!0,r&&(e.precision=r),Error(Ms);return $s(new e(Fs),t,1,!0)}function rc(e,t,r){if(t>zs)throw Error(Ms);return $s(new e(Qs),t,r,!0)}function nc(e){var t=e.length-1,r=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ic(e){for(var t="";e--;)t+="0";return t}function oc(e,t,r,n){var i,o=new e(1),a=Math.ceil(n/7+4);for(ks=!1;;){if(r%2&&mc((o=o.times(t)).d,a)&&(i=!0),0===(r=Us(r/2))){r=o.d.length-1,i&&0===o.d[r]&&++o.d[r];break}mc((t=t.times(t)).d,a)}return ks=!0,o}function ac(e){return 1&e.d[e.d.length-1]}function sc(e,t,r){for(var n,i,o=new e(t[0]),a=0;++a<t.length;){if(!(i=new e(t[a])).s){o=i;break}((n=o.cmp(i))===r||0===n&&o.s===r)&&(o=i)}return o}function cc(e,t){var r,n,i,o,a,s,c,l=0,u=0,f=0,d=e.constructor,g=d.rounding,p=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(ks=!1,c=p):c=t,s=new d(.03125);e.e>-2;)e=e.times(s),f+=5;for(c+=n=Math.log(Rs(2,f))/Math.LN10*2+5|0,r=o=a=new d(1),d.precision=c;;){if(o=$s(o.times(e),c,1),r=r.times(++u),Ps((s=a.plus(Ks(o,r,c,1))).d).slice(0,c)===Ps(a.d).slice(0,c)){for(i=f;i--;)a=$s(a.times(a),c,1);if(null!=t)return d.precision=p,a;if(!(l<3&&_s(a.d,c-n,g,l)))return $s(a,d.precision=p,g,ks=!0);d.precision=c+=10,r=o=s=new d(1),u=0,l++}a=s}}function lc(e,t){var r,n,i,o,a,s,c,l,u,f,d,g=1,p=e,h=p.d,A=p.constructor,m=A.rounding,I=A.precision;if(p.s<0||!h||!h[0]||!p.e&&1==h[0]&&1==h.length)return new A(h&&!h[0]?-1/0:1!=p.s?NaN:h?0:p);if(null==t?(ks=!1,u=I):u=t,A.precision=u+=10,n=(r=Ps(h)).charAt(0),!(Math.abs(o=p.e)<15e14))return l=tc(A,u+2,I).times(o+""),p=lc(new A(n+"."+r.slice(1)),u-10).plus(l),A.precision=I,null==t?$s(p,I,m,ks=!0):p;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=Ps((p=p.times(e)).d)).charAt(0),g++;for(o=p.e,n>1?(p=new A("0."+r),o++):p=new A(n+"."+r.slice(1)),f=p,c=a=p=Ks(p.minus(1),p.plus(1),u,1),d=$s(p.times(p),u,1),i=3;;){if(a=$s(a.times(d),u,1),Ps((l=c.plus(Ks(a,new A(i),u,1))).d).slice(0,u)===Ps(c.d).slice(0,u)){if(c=c.times(2),0!==o&&(c=c.plus(tc(A,u+2,I).times(o+""))),c=Ks(c,new A(g),u,1),null!=t)return A.precision=I,c;if(!_s(c.d,u-10,m,s))return $s(c,A.precision=I,m,ks=!0);A.precision=u+=10,l=a=p=Ks(f.minus(1),f.plus(1),u,1),d=$s(p.times(p),u,1),i=s=1}c=l,i+=2}}function uc(e){return String(e.s*e.s/0)}function fc(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%7,r<0&&(n+=7),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),ks&&(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 dc(e,t){var r,n,i,o,a,s,c,l,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),js.test(t))return fc(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ts.test(t))r=16,t=t.toLowerCase();else if(Os.test(t))r=2;else{if(!Ys.test(t))throw Error(qs+t);r=8}for((o=t.search(/p/i))>0?(c=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,n=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=oc(n,new n(r),o,2*o)),o=u=(l=Ws(t,r,Gs)).length-1;0===l[o];--o)l.pop();return o<0?new n(0*e.s):(e.e=ec(l,u),e.d=l,ks=!1,a&&(e=Ks(e,i,4*s)),c&&(e=e.times(Math.abs(c)<54?Rs(2,c):il.pow(2,c))),ks=!0,e)}function gc(e,t,r,n,i){var o,a,s,c,l=e.precision,u=Math.ceil(l/7);for(ks=!1,c=r.times(r),s=new e(n);;){if(a=Ks(s.times(c),new e(t++*t++),l,1),s=i?n.plus(a):n.minus(a),n=Ks(a.times(c),new e(t++*t++),l,1),void 0!==(a=s.plus(n)).d[u]){for(o=u;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=n,n=a,a=o}return ks=!0,a.d.length=u+1,a}function pc(e,t){for(var r=e;--t;)r*=e;return r}function hc(e,t){var r,n=t.s<0,i=rc(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return Es=n?4:1,t;if((r=t.divToInt(i)).isZero())Es=n?3:2;else{if((t=t.minus(r.times(i))).lte(o))return Es=ac(r)?n?2:3:n?4:1,t;Es=ac(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Ac(e,t,r,n){var i,o,a,s,c,l,u,f,d,g=e.constructor,p=void 0!==r;if(p?(Xs(r,1,xs),void 0===n?n=g.rounding:Xs(n,0,8)):(r=g.precision,n=g.rounding),e.isFinite()){for(p?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,(a=(u=Zs(e)).indexOf("."))>=0&&(u=u.replace(".",""),(d=new g(1)).e=u.length-a,d.d=Ws(Zs(d),10,i),d.e=d.d.length),o=c=(f=Ws(u,10,i)).length;0==f[--c];)f.pop();if(f[0]){if(a<0?o--:((e=new g(e)).d=f,e.e=o,f=(e=Ks(e,d,r,n,0,i)).d,o=e.e,l=Bs),a=f[r],s=i/2,l=l||void 0!==f[r+1],l=n<4?(void 0!==a||l)&&(0===n||n===(e.s<0?3:2)):a>s||a===s&&(4===n||l||6===n&&1&f[r-1]||n===(e.s<0?8:7)),f.length=r,l)for(;++f[--r]>i-1;)f[r]=0,r||(++o,f.unshift(1));for(c=f.length;!f[c-1];--c);for(a=0,u="";a<c;a++)u+=Ds.charAt(f[a]);if(p){if(c>1)if(16==t||8==t){for(a=16==t?4:3,--c;c%a;c++)u+="0";for(c=(f=Ws(u,i,t)).length;!f[c-1];--c);for(a=1,u="1.";a<c;a++)u+=Ds.charAt(f[a])}else u=u.charAt(0)+"."+u.slice(1);u=u+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)u="0"+u;u="0."+u}else if(++o>c)for(o-=c;o--;)u+="0";else o<c&&(u=u.slice(0,o)+"."+u.slice(o))}else u=p?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=uc(e);return e.s<0?"-"+u:u}function mc(e,t){if(e.length>t)return e.length=t,!0}function Ic(e){return new this(e).abs()}function yc(e){return new this(e).acos()}function vc(e){return new this(e).acosh()}function bc(e,t){return new this(e).plus(t)}function wc(e){return new this(e).asin()}function Bc(e){return new this(e).asinh()}function Ec(e){return new this(e).atan()}function Cc(e){return new this(e).atanh()}function xc(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?rc(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=rc(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,r=this.atan(Ks(e,t,o,1)),t=rc(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(Ks(e,t,o,1)):(r=rc(this,o,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function Dc(e){return new this(e).cbrt()}function Fc(e){return $s(e=new this(e),e.e+1,2)}function Qc(e,t,r){return new this(e).clamp(t,r)}function Sc(e){if(!e||"object"!=typeof e)throw Error(Ns+"Object expected");var t,r,n,i=!0===e.defaults,o=["precision",1,xs,"rounding",0,8,"toExpNeg",-Cs,0,"toExpPos",0,Cs,"maxE",0,Cs,"minE",-Cs,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],i&&(this[r]=Ss[r]),void 0!==(n=e[r])){if(!(Us(n)===n&&n>=o[t+1]&&n<=o[t+2]))throw Error(qs+r+": "+n);this[r]=n}if(r="crypto",i&&(this[r]=Ss[r]),void 0!==(n=e[r])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(qs+r+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Hs);this[r]=!0}else this[r]=!1}return this}function kc(e){return new this(e).cos()}function Nc(e){return new this(e).cosh()}function qc(e,t){return new this(e).div(t)}function Mc(e){return new this(e).exp()}function Hc(e){return $s(e=new this(e),e.e+1,3)}function Lc(){var e,t,r=new this(0);for(ks=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return ks=!0,new this(1/0);r=t}return ks=!0,r.sqrt()}function Uc(e){return e instanceof il||e&&e.toStringTag===Ls||!1}function Rc(e){return new this(e).ln()}function Oc(e,t){return new this(e).log(t)}function Tc(e){return new this(e).log(2)}function Yc(e){return new this(e).log(10)}function jc(){return sc(this,arguments,-1)}function Gc(){return sc(this,arguments,1)}function Jc(e,t){return new this(e).mod(t)}function zc(e,t){return new this(e).mul(t)}function Vc(e,t){return new this(e).pow(t)}function Pc(e){var t,r,n,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:Xs(e,1,xs),n=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));o<n;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(Hs);for(t=crypto.randomBytes(n*=4);o<n;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=n/4}else for(;o<n;)s[o++]=1e7*Math.random()|0;for(e%=7,(n=s[--o])&&e&&(i=Rs(10,7-e),s[o]=(n/i|0)*i);0===s[o];o--)s.pop();if(o<0)r=0,s=[0];else{for(r=-1;0===s[0];r-=7)s.shift();for(n=1,i=s[0];i>=10;i/=10)n++;n<7&&(r-=7-n)}return a.e=r,a.d=s,a}function Xc(e){return $s(e=new this(e),e.e+1,this.rounding)}function _c(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Wc(e){return new this(e).sin()}function Kc(e){return new this(e).sinh()}function $c(e){return new this(e).sqrt()}function Zc(e,t){return new this(e).sub(t)}function el(){var e=0,t=arguments,r=new this(t[e]);for(ks=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return ks=!0,$s(r,this.precision,this.rounding)}function tl(e){return new this(e).tan()}function rl(e){return new this(e).tanh()}function nl(e){return $s(e=new this(e),e.e+1,1)}Vs[Symbol.for("nodejs.util.inspect.custom")]=Vs.toString,Vs[Symbol.toStringTag]="Decimal";var il=Vs.constructor=function e(t){var r,n,i;function o(e){var t,r,n,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,Uc(e))return i.s=e.s,void(ks?!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"===(n=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,r=e;r>=10;r/=10)t++;return void(ks?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)):fc(i,e.toString())}if("string"===n)return 45===(r=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===r&&(e=e.slice(1)),i.s=1),js.test(e)?fc(i,e):dc(i,e);if("bigint"===n)return e<0?(e=-e,i.s=-1):i.s=1,fc(i,e.toString());throw Error(qs+e)}if(o.prototype=Vs,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=Sc,o.clone=e,o.isDecimal=Uc,o.abs=Ic,o.acos=yc,o.acosh=vc,o.add=bc,o.asin=wc,o.asinh=Bc,o.atan=Ec,o.atanh=Cc,o.atan2=xc,o.cbrt=Dc,o.ceil=Fc,o.clamp=Qc,o.cos=kc,o.cosh=Nc,o.div=qc,o.exp=Mc,o.floor=Hc,o.hypot=Lc,o.ln=Rc,o.log=Oc,o.log10=Yc,o.log2=Tc,o.max=jc,o.min=Gc,o.mod=Jc,o.mul=zc,o.pow=Vc,o.random=Pc,o.round=Xc,o.sign=_c,o.sin=Wc,o.sinh=Kc,o.sqrt=$c,o.sub=Zc,o.sum=el,o.tan=tl,o.tanh=rl,o.trunc=nl,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;r<i.length;)t.hasOwnProperty(n=i[r++])||(t[n]=this[n]);return o.config(t),o}(Ss);function ol(e,t=0){if(Bo(t)||(t=0),t=Zi(t),!Se(e))return"";return new il(e).toDecimalPlaces(t,il.ROUND_CEIL).toNumber()}function al(e,t=0){if(!Se(e))return"";if(!Bo(t))return"";return e=Mn(e),$i(e,t).toFixed(t)}function sl(e){let t=function(){let e=yn();return n||e.xss}();let r=function e(r){return Ce(r)||Be(r)?(Er(r,function(t,n){r[n]=e(t)}),r):De(r)?t(r,{onIgnoreTagAttr:function(e,r,n,i){if("style"===r)return r+'="'+t.escapeAttrValue(n)+'"'}}):r}(zi(e));return r}function cl(e,t){let r=ns();if(!Ce(e)&&!Be(e))return r.reject("rs is not an array or object"),r;let n=!1;if(Be(e)){n=!0;let t=[];Er(e,(e,r)=>{t.push({k:r,v:e})}),e=t}va(t)||(t=function(e){return e});let i=-1,o=[];return e.reduce(function(e,r){return e.then(function(e){o.push(e),i+=1;let a=i,s=r;return n&&(a=r.k,s=r.v),va(t)?t(s,a):s})},Promise.resolve()).then(function(e){o.push(e),o=ja(o),r.resolve(o)}).catch(function(e){r.reject(e)}),r}Fs=new il(Fs),Qs=new il(Qs);let ll={},ul={};function fl({tagName:e,path:t,attributes:r={},func:n}){let i=ns();if("done"===ll[t])return i.resolve("loaded"),i;if("loading"===ll[t])return vs(()=>"done"===ll[t]).then(function(){i.resolve("loaded")}),i;ll[t]="loading";let o=document.createElement(e);return Er(r,(e,t)=>{o.setAttribute(t,e)}),r.rel&&"stylesheet"===r.rel?(o.setAttribute("href",t),setTimeout(()=>{i.resolve(o),ll[t]="done"},1)):(o.src=t,o.addEventListener("load",()=>{let e;va(n)?e=vs(n):(e=ns(),e.resolve()),e.then(()=>bs(500)).then(function(){i.resolve(o),ll[t]="done"})}),o.addEventListener("error",()=>{i.reject(o),ll[t]="done"})),document.getElementsByTagName("head")[0].appendChild(o),i}function dl(e){let t=ns();Ce(e)||(e=[e]),Er(e,(t,r)=>{xe(t)&&(e[r]={path:t})});let r=xo(xr(e,"path"),"|");return"done"===ul[r]?(t.resolve("loaded"),t):"loading"===ul[r]?(vs(()=>"done"===ul[r]).then(function(){t.resolve("loaded")}),t):(ul[r]="loading",Er(e,(e,t)=>{e.type||(".js"===fa(e.path,3)?e.type="js":".css"===fa(e.path,4)?e.type="css":e.type="unknow")}),cl(e,e=>{let t=ns();if("js"===e.type)t=fl({tagName:"script",path:e.path,attributes:{type:"text/javascript"},func:e.func});else if("css"===e.type)t=fl({tagName:"link",path:e.path,attributes:{rel:"stylesheet"}});else{let r="invalid pathItem.type: "+e.type;console.log(r),t.reject(r)}return t}).finally(()=>{ul[r]="done"}))}function gl(e){return Ie(e).toUpperCase()}function pl(e,t,r){if(!De(e))return"";if(!De(t))return"";if(!xe(r))return"";return String(e).replaceAll(t,r)}function hl(e,t,r=1){return De(e)&&Bo(t)?(r=eo(r)?Zi(r):1,e.substring(t,t+r)):""}let Al={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function ml(e){return yl(e,1)}function Il(e){return yl(e,360)}function yl(e,t=1){if(e.indexOf("%")>=0){if(!Se(e=pl(e,"%","")))throw new Error("invalid color: value is not a number");e=Mn(e)/100}else{if(!Se(e))throw new Error("invalid color: value is not a number");e=Mn(e)/t}if(e>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function vl(e){if(!Se(e))throw new Error("invalid color: value is not a number");if((e=Mn(e))>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function bl(e,t="rgba"){if(!Ce(e))throw new Error("invalid colors array");let r=we(e,0,0),n=we(e,1,0),i=we(e,2,0),o=we(e,3,1);if(4!==dn(t=t.split("")))throw new Error("tar.length !== 4");let a=we(t,0),s=we(t,1),c=we(t,2),l=we(t,3);return{[a]:r,[s]:n,[c]:i,[l]:o}}function wl(e){let t=(e=da(e,1)).length;if(2===t)e=`${e}${e}${e}ff`;else if(3===t){let t=hl(e,0,1),r=hl(e,1,1),n=hl(e,2,1);e=`${t}${t}${r}${r}${n}${n}ff`}else if(6===t)e=`${e}ff`;else if(8!==t)throw new Error("invalid hex color");function r(e){if(2!==e.length)throw new Error("hex.length of color is not equal to 2");if(!Se(e=parseInt(e,16)))throw new Error("invalid hex of color");return(e=Mn(e))/255}return{r:r(hl(e,0,2)),g:r(hl(e,2,2)),b:r(hl(e,4,2)),a:r(hl(e,6,2))}}function Bl(e){return e=bl(e=xr(e,(e,t)=>t<=2?yl(e,255):3===t?vl(e):null),"rgba")}function El(e){return e=Nl(e=bl(e=xr(e,(e,t)=>0===t?Il(e):1===t||2===t?ml(e):3===t?vl(e):null),"hsla"))}function Cl(e){return e=ql(e=bl(e=xr(e,(e,t)=>0===t?Il(e):1===t||2===t?ml(e):3===t?vl(e):null),"hsva"))}function xl(e){if("transparent"===e)return{r:0,g:0,b:0,a:0};if(function(e){return ke(Al,e)}(e))return wl(e=function(e){return`#${Al[e]}`}(e));if(function(e){return"#"===ua(e,1)&&(!!/[0-9A-Fa-f]{2}/g.test(e)||(!!/[0-9A-Fa-f]{3}/g.test(e)||(!!/[0-9A-Fa-f]{6}/g.test(e)||!!/[0-9A-Fa-f]{8}/g.test(e))))}(e))return wl(e);if(function(e){return"rgb"===ua(e,3)||"rgba"===ua(e,4)}(e))return function(e){return e=pl(e,"rgba",""),e=pl(e,"rgb",""),Bl(la(e=pl(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsl"===ua(e,3)||"hsla"===ua(e,4)}(e))return function(e){return e=pl(e,"hsla",""),e=pl(e,"hsl",""),El(la(e=pl(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsv"===ua(e,3)||"hsva"===ua(e,4)}(e))return function(e){return e=pl(e,"hsva",""),e=pl(e,"hsv",""),Cl(la(e=pl(e=e.replace(/[()]/g,""),","," ")," "))}(e);throw new Error("format of color string is not hex-color, name-color, rgba, hsla, hsva")}function Dl(e,t){return!!ke(e,t=ws(t))||!!ke(e,t=gl(t))}function Fl(e,t,r){let n;return n=we(e,t,null),null!==n?n:(n=we(e,t=gl(t),null),null!==n?n:r)}function Ql(e){if(function(e){let t=Dl(e,"r"),r=Dl(e,"g"),n=Dl(e,"b");return t&&r&&n}(e))return function(e){let t=[Fl(e,"r",null),Fl(e,"g",null),Fl(e,"b",null),Fl(e,"a",1)];return t=xr(t,Ya),Bl(t)}(e);if(function(e){let t=Dl(e,"h"),r=Dl(e,"s"),n=Dl(e,"l");return t&&r&&n}(e))return function(e){let t=[Fl(e,"h",null),Fl(e,"s",null),Fl(e,"l",null),Fl(e,"a",1)];return t=xr(t,Ya),El(t)}(e);if(function(e){let t=Dl(e,"h"),r=Dl(e,"s"),n=Dl(e,"v");return t&&r&&n}(e))return function(e){let t=[Fl(e,"h",null),Fl(e,"s",null),Fl(e,"v",null),Fl(e,"a",1)];return t=xr(t,Ya),Cl(t)}(e);throw new Error("color object is not one of rgba, hsla, hsva")}function Sl(e){let t,r,n=e.r,i=e.g,o=e.b,a=Math.max(n,i,o),s=Math.min(n,i,o),c=(a+s)/2;if(a===s)t=r=0;else{let e=a-s;switch(r=c>.5?e/(2-a-s):e/(a+s),a){case n:t=(i-o)/e+(i<o?6:0);break;case i:t=(o-n)/e+2;break;case o:t=(n-i)/e+4}t/=6}return{h:t,s:r,l:c,a:e.a}}function kl(e){let t,r,n=e.r,i=e.g,o=e.b,a=Math.max(n,i,o),s=Math.min(n,i,o),c=a,l=a-s;if(r=0===a?0:l/a,a===s)t=0;else{switch(a){case n:t=(i-o)/l+(i<o?6:0);break;case i:t=(o-n)/l+2;break;case o:t=(n-i)/l+4}t/=6}return{h:t,s:r,v:c,a:e.a}}function Nl(e){let t,r,n,i=e.h,o=e.s,a=e.l;function s(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(0===o)t=r=n=a;else{let e=a<.5?a*(1+o):a+o-a*o,c=2*a-e;t=s(c,e,i+1/3),r=s(c,e,i),n=s(c,e,i-1/3)}return{r:t,g:r,b:n,a:e.a}}function ql(e){let t,r,n,i=e.h,o=e.s,a=e.v,s=Math.floor(6*i),c=6*i-s,l=a*(1-o),u=a*(1-c*o),f=a*(1-(1-c)*o);switch(s%6){case 0:t=a,r=f,n=l;break;case 1:t=u,r=a,n=l;break;case 2:t=l,r=a,n=f;break;case 3:t=l,r=u,n=a;break;case 4:t=f,r=l,n=a;break;case 5:t=a,r=l,n=u}return{r:t,g:r,b:n,a:e.a}}function Ml(e){let t=Math.round(255*e).toString(16);if(1===t.length)return`0${t}`;if(2===t.length)return t;throw new Error("invalid value")}function Hl(e,t=!0){let r=e.r,n=e.g,i=e.b,o=e.a,a=`${Ml(r)}${Ml(n)}${Ml(i)}`;return t&&(a=`${a}${Ml(o)}`),a}function Ll(e){return Math.min(1,Math.max(0,e))}function Ul(e,t){if(!De(t))throw new Error("fmtOutput is not a string");if(!mu[t])throw console.log(`fmtOutput must be [${dt(mu)}]`),new Error("invalid fmtOutput");return e=mu[t](e)}function Rl(e,t,r="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let n=Sl(e);return n.h+=t,n.h=n.h%1,Ul(Nl(n),r)}function Ol(e,t,r,n,i="toRgbString"){if(t<0||t>1)throw new Error("w1 < 0 or > 1");if(n<0||n>1)throw new Error("w1 < 0 or > 1");return Ul({r:e.r*t+r.r*n,g:e.g*t+r.g*n,b:e.b*t+r.b*n,a:e.a*t+r.a*n},i)}function Tl(e){return`${$i(100*e,1)}%`}function Yl(e){return $i(e,0)}function jl(e){return $i(e,3)}function Gl(e){return{r:Yl(255*e.r),g:Yl(255*e.g),b:Yl(255*e.b)}}function Jl(e){return`rgb(${Yl(255*e.r)}, ${Yl(255*e.g)}, ${Yl(255*e.b)})`}function zl(e){return{r:Yl(255*e.r),g:Yl(255*e.g),b:Yl(255*e.b),a:jl(e.a)}}function Vl(e){return`rgba(${Yl(255*e.r)}, ${Yl(255*e.g)}, ${Yl(255*e.b)}, ${jl(e.a)})`}function Pl(e){let t=Sl(e);return{h:Yl(360*t.h),s:jl(t.s),l:jl(t.l)}}function Xl(e){let t=Sl(e);return`hsl(${Yl(360*t.h)}, ${jl(t.s)}, ${jl(t.l)})`}function _l(e){let t=Sl(e);return{h:Yl(360*t.h),s:jl(t.s),l:jl(t.l),a:jl(t.a)}}function Wl(e){let t=Sl(e);return`hsla(${Yl(360*t.h)}, ${jl(t.s)}, ${jl(t.l)}, ${jl(t.a)})`}function Kl(e){let t=kl(e);return{h:Yl(360*t.h),s:jl(t.s),v:jl(t.v)}}function $l(e){let t=kl(e);return`hsv(${Yl(360*t.h)}, ${jl(t.s)}, ${jl(t.v)})`}function Zl(e){let t=kl(e);return{h:Yl(360*t.h),s:jl(t.s),v:jl(t.v),a:jl(t.a)}}function eu(e){let t=kl(e);return`hsva(${Yl(360*t.h)}, ${jl(t.s)}, ${jl(t.v)}, ${jl(t.a)})`}function tu(e){return{r:Tl(e.r),g:Tl(e.g),b:Tl(e.b)}}function ru(e){return`rgb(${Tl(e.r)}, ${Tl(e.g)}, ${Tl(e.b)})`}function nu(e){return{r:Tl(e.r),g:Tl(e.g),b:Tl(e.b),a:jl(e.a)}}function iu(e){return`rgba(${Tl(e.r)}, ${Tl(e.g)}, ${Tl(e.b)}, ${jl(e.a)})`}function ou(e){let t=Sl(e);return{h:Yl(360*t.h),s:Tl(t.s),l:Tl(t.l)}}function au(e){let t=Sl(e);return`hsl(${Yl(360*t.h)}, ${Tl(t.s)}, ${Tl(t.l)})`}function su(e){let t=Sl(e);return{h:Yl(360*t.h),s:Tl(t.s),l:Tl(t.l),a:jl(t.a)}}function cu(e){let t=Sl(e);return`hsla(${Yl(360*t.h)}, ${Tl(t.s)}, ${Tl(t.l)}, ${jl(t.a)})`}function lu(e){let t=kl(e);return{h:Yl(360*t.h),s:Tl(t.s),v:Tl(t.v)}}function uu(e){let t=kl(e);return`hsv(${Yl(360*t.h)}, ${Tl(t.s)}, ${Tl(t.v)})`}function fu(e){let t=kl(e);return{h:Yl(360*t.h),s:Tl(t.s),v:Tl(t.v),a:jl(t.a)}}function du(e){let t=kl(e);return`hsva(${Yl(360*t.h)}, ${Tl(t.s)}, ${Tl(t.v)}, ${jl(t.a)})`}function gu(e){let t=function(e){return Hl(e,!1)}(e);return`#${t}`}function pu(e){return`#${Hl(e)}`}function hu(e){let t=null,r=null,n=null;if(De(e))t=ws(sa(e));else{if(!Ee(e))throw console.log("color=",e),new Error("color is not a string or an object");r=e}if(null!==t)try{n=xl(t)}catch(e){throw console.log(e),new Error(`can not parse color: ${t}`)}else if(null!==r)try{n=Ql(r)}catch(e){throw console.log(e),new Error(`can not parse color: ${JSON.stringify(r)}`)}return n}function Au(e){if(!Ee(e))return console.log("gradient is not an effective object"),e=>`rgb(${255*(e=Math.min(Math.max(e,0),1))},${255*e},${255*e})`;let t=[];return Er(e,(e,r)=>{t.push([Mn(r),zl(hu(e)),e])}),t=Oa(t,0),function(e){let r=null;for(let n=1;n<t.length;n++){let i=t[n-1][0],o=t[n-1][1],a=t[n][0],s=t[n][1];if(i<=e&&a>=e){let t=(a-e)/(a-i),n=(e-i)/(a-i);r=Ol(hu(o),t,hu(s),n,"toRgbaString");break}}return r}}let mu={toRgb:Gl,toRgbString:Jl,toRgba:zl,toRgbaString:Vl,toHsl:Pl,toHslString:Xl,toHsla:_l,toHslaString:Wl,toHsv:Kl,toHsvString:$l,toHsva:Zl,toHsvaString:eu,toRgbP:tu,toRgbPString:ru,toRgbaP:nu,toRgbaPString:iu,toHslP:ou,toHslPString:au,toHslaP:su,toHslaPString:cu,toHsvP:lu,toHsvPString:uu,toHsvaP:fu,toHsvaPString:du,toHexString:gu,toHex8String:pu};var Iu={toRgb:e=>Gl(hu(e)),toRgbString:e=>Jl(hu(e)),toRgba:e=>zl(hu(e)),toRgbaString:e=>Vl(hu(e)),toHsl:e=>Pl(hu(e)),toHslString:e=>Xl(hu(e)),toHsla:e=>_l(hu(e)),toHslaString:e=>Wl(hu(e)),toHsv:e=>Kl(hu(e)),toHsvString:e=>$l(hu(e)),toHsva:e=>Zl(hu(e)),toHsvaString:e=>eu(hu(e)),toRgbP:e=>tu(hu(e)),toRgbPString:e=>ru(hu(e)),toRgbaP:e=>nu(hu(e)),toRgbaPString:e=>iu(hu(e)),toHslP:e=>ou(hu(e)),toHslPString:e=>au(hu(e)),toHslaP:e=>su(hu(e)),toHslaPString:e=>cu(hu(e)),toHsvP:e=>lu(hu(e)),toHsvPString:e=>uu(hu(e)),toHsvaP:e=>fu(hu(e)),toHsvaPString:e=>du(hu(e)),toHexString:e=>gu(hu(e)),toHex8String:e=>pu(hu(e)),modSaturate:(e,t,r)=>function(e,t,r="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let n=Sl(e);return n.s+=t,n.s=Ll(n.s),Ul(Nl(n),r)}(hu(e),t,r),modGrey:(e,t)=>function(e,t="toRgbString"){let r=Sl(e);return r.s=0,Ul(Nl(r),t)}(hu(e),t),modLighten:(e,t,r)=>function(e,t,r="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let n=Sl(e);return n.l+=t,n.l=Ll(n.l),Ul(Nl(n),r)}(hu(e),t,r),modBrighten:(e,t,r)=>function(e,t,r="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");return e.r+=t,e.r=Ll(e.r),e.g+=t,e.g=Ll(e.g),e.b+=t,e.b=Ll(e.b),Ul(e,r)}(hu(e),t,r),modHue:(e,t,r)=>Rl(hu(e),t,r),modComplement:(e,t)=>function(e,t="toRgbString"){return Rl(e,.5,t)}(hu(e),t),spreadHue:(e,t,r)=>function(e,t,r="toRgbString"){if(!Hn(t))throw new Error("num is not an integer");if((t=Zi(t))<=1)return[e];let n=Sl(e),i=1/t,o=[];for(let e=0;e<t;e++)o.push(Ul(Nl(n),r)),n.h+=i,n.h=n.h%1;return o}(hu(e),t,r),spreadMonochromatic:(e,t,r)=>function(e,t,r="toRgbString"){if(!Hn(t))throw new Error("num is not an integer");if((t=Zi(t))<=1)return[e];let n=kl(e);n.s=1,n.l=1;let i=1/t,o=[];for(let e=0;e<t;e++)o.push(Ul(ql(n),r)),n.h-=i,n.l-=i;return o}(hu(e),t,r),mix:(e,t,r,n,i)=>Ol(hu(e),t,hu(r),n,i),getBrightness:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");return(299*e.r+587*e.g+114*e.b)/1e3}(hu(e)),getLuminance:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");let t,r,n,i=e.r,o=e.g,a=e.b;return t=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4),r=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),n=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),.2126*t+.7152*r+.0722*n}(hu(e)),interp:Au};function yu(e,t,r){return null==e?e:function(e,t,r,n){if(!U(e))return e;for(var i=-1,o=(t=ye(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var c=ve(t[i]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var u=s[c];void 0===(l=n?n(u,c,s):void 0)&&(l=U(u)?u:Pe(t[i+1])?[]:{})}pi(s,c,l),s=s[c]}return e}(e,t,r)}function vu(e){return vr(e)?void 0:e}var bu=bo(function(e,t){var r={};if(null==e)return r;var n=!1;t=pe(t,function(t){return t=ye(t,e),n||(n=t.length>1),t}),hi(e,Ci(e),r),n&&(r=Ji(r,7,vu));for(var i=t.length;i--;)ka(r,t[i]);return r}),wu=bu;function Bu(e,t={}){let r="$level",n="$parents";if(!Rr(e))return[];let i=we(t,"bindKey",null);De(i)||(i="id");let o=we(t,"bindParent",null);De(o)||(o="parentId");let a=we(t,"bindChildren",null);De(a)||(a="children");let s=we(t,"saveExtProps",null);pn(s)||(s=!1),e=function(e){let t=[];function a(a){let s=[];Er(e,(e,c)=>{let l=we(e,o),u=we(a,i);if(l&&u&&l===u){let o=we(a,n,[]);o=zi(o),o.push(a[i]),t.push({[r]:a[r]+1,[n]:o,...e})}else s.push(e)}),e=s}if(e=zi(e),function(){let i=[];Er(e,(e,a)=>{Ur(e[o])?t.push({[r]:0,[n]:[],...e}):i.push(e)}),e=i}(),0===t.length)return t;let s=-1;for(;s+=1,!(s>t.length-1);){if(a(t[s]),0===e.length)break}return t}(e);let c=function(e){let t=[];function c(e){return s?e:wu(e,[r,n])}let l={};return Er(e,(n,s)=>{if(0===n[r]){let e=c(n);t.push(e),l[n[i]]=[s]}else{let r=function(t){for(let r=0;r<e.length;r++){let n=e[r];if(t[o]===n[i])return n}return null}(n);if(null!==r){let e=l[r[i]];e=[...e,a];let o=we(t,e,[]),s=c(n);o.push(s),l[n[i]]=[...e,o.length-1],yu(t,e,o)}else console.log(`can not find parent for ${we(n,o)}`)}}),t}(e);return c}function Eu(e,t=null,r={}){R(t)||(t=e=>e);let n=we(r,"force",!1);return pn(n)||(n=!1),function(e,t,r=!1){let n=[];if(!Ce(e)&&!Be(e))return t(e,null,[]);function i(e){if(Ce(e))return ao(dn(e));if(Be(e)){let t=Object.getOwnPropertyNames(e),n=null;return r&&(n=Object.getOwnPropertySymbols(e)),Ce(t)||(t=[]),Ce(n)||(n=[]),[...t,...n]}return e}return function e(r,o){if(Ce(r))return i(r).map(i=>{let o=r[i],a=zi(n);return n.push(i),o=t(o,i,a),o=e(o),n.pop(),o});if(Be(r)){let o=i(r),a={};return o.map(i=>{let o=r[i],s=zi(n);n.push(i),o=t(o,i,s),o=e(o),n.pop(),a[i]=o}),a}return r}(e)}(e,t,n)}function Cu(e,t={}){if(!Ee(e)&&!Rr(e))return[];let r=we(t,"bindKey",null);De(r)||(r="id");let n=we(t,"bindParent",null);De(n)||(n="parentId");let i=we(t,"bindBelong",null);De(i)||(i="key");let o=we(t,"bindText",null);De(o)||(o="text");let a=we(t,"bindType",null);De(a)||(a="type");let s=we(t,"bindNumOfChilren",null);function c(e,t){return e=xr(e=zi(e),e=>q(e)?Ya(e):e),q(t)&&(t=Ya(t)),(De(t)||Se(t))&&e.push(t),xo(e,"-")}De(s)||(s="numOfChilren");let l=[];return Eu(e,(e,t,u)=>{let f=c(u,t),d=c(u,null),g="node";Be(e)?g="object":Ce(e)&&(g="array");let p={[r]:f,[n]:d,[a]:g};if((De(t)||Ia(t))&&(p[i]=t),Be(e)||Ce(e)||(p[o]=e),Be(e)||Ce(e)){let t=null;Be(e)?t=dn(dt(e)):Ce(e)&&(t=dn(e)),p[s]=t}return l.push(p),e},{force:!0}),l}function xu(e){if(!br(e))return"invalid element";let t=!1;try{t=document.activeElement===e}catch(e){console.log(e)}return t}function Du(e){return Se(e)?(e=Mn(e),Math.cos(e*Math.PI/180)):null}function Fu(e){return Se(e)?(e=Mn(e),Math.tan(e*Math.PI/180)):null}function Qu(){let e=new function e(){if(!(this instanceof e))return new e;this.SheetNames=[],this.Sheets={}};return e}function Su(e){return Se(e)?(e=Mn(e),Math.sin(e*Math.PI/180)):null}function ku(e){if(!De(e))return!1;let t="YYYY-MM-DD";return e===r(e,t).format(t)}function Nu(e=300){return new function(e){let t=[],r=null,n=Date.now();return eo(e)||(e=300),e=Zi(e),function(i,...o){va(i)?(n=Date.now(),t.push({func:i,input:o}),null===r&&(r=setInterval(()=>{if(0===dn(t))return clearInterval(r),void(r=null);if(Date.now()-n>e){let e=t.pop();t=[];try{e.func(...e.input)}catch(e){console.log("m.func catch",e)}}},10))):console.log("func is not a function")}}(e)}let qu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Mu=qu.length;function Hu(e=32){let t=[];e=eo(e)?Zi(e):32;for(let r=0;r<e;r++)t[r]=qu[0|Math.random()*Mu];return t.join("")}function Lu(e,t={}){if(!br(e))return;let r=we(t,"duration",500);r=Mn(r),r<0&&(r=1e3);let n=we(t,"delay",0);n=Mn(n),n<0&&(n=0);let i=we(t,"opacityIni",0);i=Mn(i),i=Math.min(Math.max(i,0),1),Se(e.style.opacity)&&(i=Mn(e.style.opacity));let o=10/r,a=`tag-${Hu()}`;e.setAttribute("dom-fade-tag",a),setTimeout(()=>{let t=setInterval(()=>{try{e.getAttribute("dom-fade-tag")!==a&&clearInterval(t),e.style.opacity=i,i>=1&&(clearInterval(t),e.removeAttribute("dom-fade-tag")),i+=o,i>1&&(i=1)}catch(e){console.log(e),clearInterval(t)}},10)},n)}function Uu(e,t={}){if(!br(e))return;let r=we(t,"duration",500);r=Mn(r),r<0&&(r=1e3);let n=we(t,"delay",0);n=Mn(n),n<0&&(n=0);let i=we(t,"opacityIni",1);i=Mn(i),i=Math.min(Math.max(i,0),1),Se(e.style.opacity)&&(i=Mn(e.style.opacity));let o=10/r,a=`tag-${Hu()}`;e.setAttribute("dom-fade-tag",a),setTimeout(()=>{let t=setInterval(()=>{try{e.getAttribute("dom-fade-tag")!==a&&clearInterval(t),e.style.opacity=i,i<=0&&(clearInterval(t),e.removeAttribute("dom-fade-tag")),i-=o,i<0&&(i=0)}catch(e){console.log(e),clearInterval(t)}},10)},n)}let Ru='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 512.001 512.001" style="width:12px; height:12px; enable-background:new 0 0 512.001 512.001;" xml:space="preserve"><g><g><path d="M284.286,256.002L506.143,34.144c7.811-7.811,7.811-20.475,0-28.285c-7.811-7.81-20.475-7.811-28.285,0L256,227.717L34.143,5.859c-7.811-7.811-20.475-7.811-28.285,0c-7.81,7.811-7.811,20.475,0,28.285l221.857,221.857L5.858,477.859c-7.811,7.811-7.811,20.475,0,28.285c3.905,3.905,9.024,5.857,14.143,5.857c5.119,0,10.237-1.952,14.143-5.857L256,284.287l221.857,221.857c3.905,3.905,9.024,5.857,14.143,5.857s10.237-1.952,14.143-5.857c7.811-7.811,7.811-20.475,0-28.285L284.286,256.002z"/></g></g></svg>',Ou={success:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 426.667 426.667" style="width:24px; height:24px; enable-background:new 0 0 426.667 426.667" xml:space="preserve"><path style="fill:#6ac259" d="M213.333,0C95.518,0,0,95.514,0,213.333s95.518,213.333,213.333,213.333 c117.828,0,213.333-95.514,213.333-213.333S331.157,0,213.333,0z M174.199,322.918l-93.935-93.931l31.309-31.309l62.626,62.622 l140.894-140.898l31.309,31.309L174.199,322.918z"/></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 496.158 496.158" style="width:24px; height:24px; enable-background:new 0 0 496.158 496.158" xml:space="preserve"><path style="fill:#e04f5f" d="M496.158,248.085c0-137.021-111.07-248.082-248.076-248.082C111.07,0.003,0,111.063,0,248.085 c0,137.002,111.07,248.07,248.082,248.07C385.088,496.155,496.158,385.087,496.158,248.085z"/><path style="fill:#fff" d="M277.042,248.082l72.528-84.196c7.91-9.182,6.876-23.041-2.31-30.951 c-9.172-7.904-23.032-6.876-30.947,2.306l-68.236,79.212l-68.229-79.212c-7.91-9.188-21.771-10.216-30.954-2.306 c-9.186,7.91-10.214,21.77-2.304,30.951l72.522,84.196l-72.522,84.192c-7.91,9.182-6.882,23.041,2.304,30.951 c4.143,3.569,9.241,5.318,14.316,5.318c6.161,0,12.294-2.586,16.638-7.624l68.229-79.212l68.236,79.212 c4.338,5.041,10.47,7.624,16.637,7.624c5.069,0,10.168-1.749,14.311-5.318c9.186-7.91,10.22-21.77,2.31-30.951L277.042,248.082z"/></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 497.472 497.472" style="width:24px; height:24px; enable-background:new 0 0 497.472 497.472" xml:space="preserve"><g transform="matrix(1.25 0 0 -1.25 0 45)"><path style="fill:#ffcc4d" d="M24.374-357.857c-20.958,0-30.197,15.223-20.548,33.826L181.421,17.928 c9.648,18.603,25.463,18.603,35.123,0L394.14-324.031c9.671-18.603,0.421-33.826-20.548-33.826H24.374z"/><path style="fill:#231f20" d="M173.605-80.922c0,14.814,10.934,23.984,25.395,23.984c14.12,0,25.407-9.512,25.407-23.984 V-216.75c0-14.461-11.287-23.984-25.407-23.984c-14.461,0-25.395,9.182-25.395,23.984V-80.922z M171.489-289.056 c0,15.167,12.345,27.511,27.511,27.511c15.167,0,27.523-12.345,27.523-27.511c0-15.178-12.356-27.523-27.523-27.523 C183.834-316.579,171.489-304.234,171.489-289.056"/></g></svg>',infor:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 496.16 496.16" style="width:24px; height:24px; enable-background:new 0 0 496.158 496.158;" xml:space="preserve"><path d="m496.16 248.08c0-137.02-111.07-248.08-248.08-248.08-137.01 0-248.08 111.06-248.08 248.08 0 137 111.07 248.07 248.08 248.07 137.01 0 248.08-111.07 248.08-248.07z" fill="#25B7D3"/><g fill="#fff"><path d="m315.25 359.56c-1.387-2.032-4.048-2.755-6.27-1.702-24.582 11.637-52.482 23.94-57.958 25.015-0.138-0.123-0.357-0.348-0.644-0.737-0.742-1.005-1.103-2.318-1.103-4.015 0-13.905 10.495-56.205 31.192-125.72 17.451-58.406 19.469-70.499 19.469-74.514 0-6.198-2.373-11.435-6.865-15.146-4.267-3.519-10.229-5.302-17.719-5.302-12.459 0-26.899 4.73-44.146 14.461-16.713 9.433-35.352 25.41-55.396 47.487-1.569 1.729-1.733 4.314-0.395 6.228 1.34 1.915 3.825 2.644 5.986 1.764 7.037-2.872 42.402-17.359 47.557-20.597 4.221-2.646 7.875-3.989 10.861-3.989 0.107 0 0.199 4e-3 0.276 0.01 0.036 0.198 0.07 0.5 0.07 0.933 0 3.047-0.627 6.654-1.856 10.703-30.136 97.641-44.785 157.5-44.785 182.99 0 8.998 2.501 16.242 7.432 21.528 5.025 5.393 11.803 8.127 20.146 8.127 8.891 0 19.712-3.714 33.08-11.354 12.936-7.392 32.68-23.653 60.363-49.717 1.793-1.687 2.092-4.426 0.705-6.458z"/><path d="m314.28 76.672c-4.925-5.041-11.227-7.597-18.729-7.597-9.34 0-17.475 3.691-24.176 10.971-6.594 7.16-9.938 15.946-9.938 26.113 0 8.033 2.463 14.69 7.32 19.785 4.922 5.172 11.139 7.794 18.476 7.794 8.958 0 17.049-3.898 24.047-11.586 6.876-7.553 10.363-16.433 10.363-26.393 1e-3 -7.654-2.476-14.075-7.363-19.087z"/></g></svg>',cancel:Ru},Tu={},Yu=null,ju=yn();function Gu(){Er(["top-right","top-left","bottom-right","bottom-left"],e=>{!function(e){let t=pa(Tu,{position:e});t=Oa(t,"timeStart");let r=16;Er(t,e=>{Tu[e.id].ele||(Tu[e.id].ele=document.querySelector(`#${e.id}`)),Tu[e.id].loc.top=r,Tu[e.id].loc.height=Tu[e.id].ele.offsetHeight,r+=Tu[e.id].loc.height+16}),Er(t,t=>{e.indexOf("bottom-")>=0?(Tu[t.id].ele.style.bottom=`${Tu[t.id].loc.top}px`,Tu[t.id].loc.bottom=Tu[t.id].loc.top):Tu[t.id].ele.style.top=`${Tu[t.id].loc.top}px`,e.indexOf("-left")>=0?(Tu[t.id].ele.style.left="16px",Tu[t.id].loc.left=16):(Tu[t.id].ele.style.right="16px",Tu[t.id].loc.right=16),Tu[t.id].ele.style.zIndex=2e5,Tu[t.id].ele.style.opacity=1,Tu[t.id].ele.style.transform="",Tu[t.id].ele.style.transform=null})}(e)})}function Ju(e){Tu[e].ele&&Tu[e].ele.parentNode.removeChild(Tu[e].ele),Tu[e]&&delete Tu[e],Gu()}function zu(e,t){if(!br(e))return"invalid eleParent";if(xe(t))e.insertAdjacentHTML("beforeend",t);else{if(!br(t))return"invalid itemChild";e.appendChild(t)}}function Vu(){return null!==navigator.userAgent.toLowerCase().match(/rv:([\d.]+)\) like gecko/)}function Pu(e){if(!e)return"invalid event";if(!e.cancelable)return"event is not cancelable";try{Vu()?e.cancelBubble=!0:e.stopPropagation(),e.preventDefault()}catch(e){}}var Xu;ju.ttWAlertCancel=function(e){Ju(e)},ju.ttWAlertFadeIn=function(e){Lu(document.querySelector(`#${e}`))},ju.ttWAlertFadeOut=function(e){Uu(document.querySelector(`#${e}`))},function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"}(Xu||(Xu={}));var _u;!function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"}(_u||(_u={}));const Wu=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");function Ku(e){return e?e.replace(/\\/g,"/"):e}function $u(e){const t=e.length;let r=-1/0;for(let n=0;n<t;n++)r=Math.max(r,e[n]);return r}function Zu(e,t){const r=e.split(".");return r.length>1?r[r.length-1]:t}function ef(e,t){return t.reduce((t,r)=>t||e.startsWith(r),!1)}const tf=["a/","b/","i/","w/","c/","o/"];function rf(e,t,r){const n=void 0!==r?[...tf,r]:tf,i=t?new RegExp(`^${o=t,o.replace(Wu,"\\$&")} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$');var o;const[,a=""]=i.exec(e)||[],s=n.find(e=>0===a.indexOf(e));return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function nf(e,t={}){const r=[];let n=null,i=null,o=null,a=null,s=null,c=null,l=null;const u="--- ",f="+++ ",d="@@",g=/^old mode (\d{6})/,p=/^new mode (\d{6})/,h=/^deleted file mode (\d{6})/,A=/^new file mode (\d{6})/,m=/^copy from "?(.+)"?/,I=/^copy to "?(.+)"?/,y=/^rename from "?(.+)"?/,v=/^rename to "?(.+)"?/,b=/^similarity index (\d+)%/,w=/^dissimilarity index (\d+)%/,B=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,E=/^Binary files (.*) and (.*) differ/,C=/^GIT binary patch/,x=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,D=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,F=/^new file mode (\d{6})/,Q=/^deleted file mode (\d{6}),(\d{6})/,S=e.replace(/\/g,"").replace(/\r\n?/g,"\n").split("\n");function k(){null!==i&&null!==n&&(n.blocks.push(i),i=null)}function N(){null!==n&&(n.oldName||null===c||(n.oldName=c),n.newName||null===l||(n.newName=l),n.newName&&(r.push(n),n=null)),c=null,l=null}function q(){k(),N(),n={blocks:[],deletedLines:0,addedLines:0}}function M(e){let t;k(),null!==n&&((t=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))?(n.isCombined=!1,o=parseInt(t[1],10),s=parseInt(t[2],10)):(t=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))?(n.isCombined=!0,o=parseInt(t[1],10),a=parseInt(t[2],10),s=parseInt(t[3],10)):(e.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),o=0,s=0,n.isCombined=!1)),i={lines:[],oldStartLine:o,oldStartLine2:a,newStartLine:s,header:e}}return S.forEach((e,a)=>{if(!e||e.startsWith("*"))return;let k;const N=S[a-1],H=S[a+1],L=S[a+2];if(e.startsWith("diff --git")||e.startsWith("diff --combined")){q();if((k=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(e))&&(c=rf(k[1],void 0,t.dstPrefix),l=rf(k[2],void 0,t.srcPrefix)),null===n)throw new Error("Where is my file !!!");return void(n.isGitDiff=!0)}if(e.startsWith("Binary files")&&!(null==n?void 0:n.isGitDiff)){q();if((k=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(e))&&(c=rf(k[1],void 0,t.dstPrefix),l=rf(k[2],void 0,t.srcPrefix)),null===n)throw new Error("Where is my file !!!");return void(n.isBinary=!0)}if((!n||!n.isGitDiff&&n&&e.startsWith(u)&&H.startsWith(f)&&L.startsWith(d))&&q(),null==n?void 0:n.isTooBig)return;if(n&&("number"==typeof t.diffMaxChanges&&n.addedLines+n.deletedLines>t.diffMaxChanges||"number"==typeof t.diffMaxLineLength&&e.length>t.diffMaxLineLength)){n.isTooBig=!0,n.addedLines=0,n.deletedLines=0,n.blocks=[],i=null;return void M("function"==typeof t.diffTooBigMessage?t.diffTooBigMessage(r.length):"Diff too big to be displayed")}if(e.startsWith(u)&&H.startsWith(f)||e.startsWith(f)&&N.startsWith(u)){if(n&&!n.oldName&&e.startsWith("--- ")&&(k=function(e,t){return rf(e,"---",t)}(e,t.srcPrefix)))return n.oldName=k,void(n.language=Zu(n.oldName,n.language));if(n&&!n.newName&&e.startsWith("+++ ")&&(k=function(e,t){return rf(e,"+++",t)}(e,t.dstPrefix)))return n.newName=k,void(n.language=Zu(n.newName,n.language))}if(n&&(e.startsWith(d)||n.isGitDiff&&n.oldName&&n.newName&&!i))return void M(e);if(i&&(e.startsWith("+")||e.startsWith("-")||e.startsWith(" ")))return void function(e){if(null===n||null===i||null===o||null===s)return;const t={content:e},r=n.isCombined?["+ "," +","++"]:["+"],a=n.isCombined?["- "," -","--"]:["-"];ef(e,r)?(n.addedLines++,t.type=Xu.INSERT,t.oldNumber=void 0,t.newNumber=s++):ef(e,a)?(n.deletedLines++,t.type=Xu.DELETE,t.oldNumber=o++,t.newNumber=void 0):(t.type=Xu.CONTEXT,t.oldNumber=o++,t.newNumber=s++),i.lines.push(t)}(e);const U=!function(e,t){let r=t;for(;r<S.length-3;){if(e.startsWith("diff"))return!1;if(S[r].startsWith(u)&&S[r+1].startsWith(f)&&S[r+2].startsWith(d))return!0;r++}return!1}(e,a);if(null===n)throw new Error("Where is my file !!!");(k=g.exec(e))?n.oldMode=k[1]:(k=p.exec(e))?n.newMode=k[1]:(k=h.exec(e))?(n.deletedFileMode=k[1],n.isDeleted=!0):(k=A.exec(e))?(n.newFileMode=k[1],n.isNew=!0):(k=m.exec(e))?(U&&(n.oldName=k[1]),n.isCopy=!0):(k=I.exec(e))?(U&&(n.newName=k[1]),n.isCopy=!0):(k=y.exec(e))?(U&&(n.oldName=k[1]),n.isRename=!0):(k=v.exec(e))?(U&&(n.newName=k[1]),n.isRename=!0):(k=E.exec(e))?(n.isBinary=!0,n.oldName=rf(k[1],void 0,t.srcPrefix),n.newName=rf(k[2],void 0,t.dstPrefix),M("Binary file")):C.test(e)?(n.isBinary=!0,M(e)):(k=b.exec(e))?n.unchangedPercentage=parseInt(k[1],10):(k=w.exec(e))?n.changedPercentage=parseInt(k[1],10):(k=B.exec(e))?(n.checksumBefore=k[1],n.checksumAfter=k[2],k[3]&&(n.mode=k[3])):(k=x.exec(e))?(n.checksumBefore=[k[2],k[3]],n.checksumAfter=k[1]):(k=D.exec(e))?(n.oldMode=[k[2],k[3]],n.newMode=k[1]):(k=F.exec(e))?(n.newFileMode=k[1],n.isNew=!0):(k=Q.exec(e))&&(n.deletedFileMode=k[1],n.isDeleted=!0)}),k(),N(),r}class of{diff(e,t,r={}){let n;"function"==typeof r?(n=r,r={}):"callback"in r&&(n=r.callback);const i=this.castInput(e,r),o=this.castInput(t,r),a=this.removeEmpty(this.tokenize(i,r)),s=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(a,s,r,n)}diffWithOptionsObj(e,t,r,n){var i;const o=e=>(e=this.postProcess(e,r),n?void setTimeout(function(){n(e)},0):e),a=t.length,s=e.length;let c=1,l=a+s;null!=r.maxEditLength&&(l=Math.min(l,r.maxEditLength));const u=null!==(i=r.timeout)&&void 0!==i?i:1/0,f=Date.now()+u,d=[{oldPos:-1,lastComponent:void 0}];let g=this.extractCommon(d[0],t,e,0,r);if(d[0].oldPos+1>=s&&g+1>=a)return o(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,h=1/0;const A=()=>{for(let n=Math.max(p,-c);n<=Math.min(h,c);n+=2){let i;const c=d[n-1],l=d[n+1];c&&(d[n-1]=void 0);let u=!1;if(l){const e=l.oldPos-n;u=l&&0<=e&&e<a}const f=c&&c.oldPos+1<s;if(u||f){if(i=!f||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,r):this.addToPath(c,!1,!0,1,r),g=this.extractCommon(i,t,e,n,r),i.oldPos+1>=s&&g+1>=a)return o(this.buildValues(i.lastComponent,t,e))||!0;d[n]=i,i.oldPos+1>=s&&(h=Math.min(h,n-1)),g+1>=a&&(p=Math.max(p,n+1))}else d[n]=void 0}c++};if(n)!function e(){setTimeout(function(){if(c>l||Date.now()>f)return n(void 0);A()||e()},0)}();else for(;c<=l&&Date.now()<=f;){const e=A();if(e)return e}}addToPath(e,t,r,n,i){const o=e.lastComponent;return o&&!i.oneChangePerToken&&o.added===t&&o.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:o.count+1,added:t,removed:r,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:t,removed:r,previousComponent:o}}}extractCommon(e,t,r,n,i){const o=t.length,a=r.length;let s=e.oldPos,c=s-n,l=0;for(;c+1<o&&s+1<a&&this.equals(r[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,r){return r.comparator?r.comparator(e,t):e===t||!!r.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,r){const n=[];let i;for(;e;)n.push(e),i=e.previousComponent,delete e.previousComponent,e=i;n.reverse();const o=n.length;let a=0,s=0,c=0;for(;a<o;a++){const e=n[a];if(e.removed)e.value=this.join(r.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let n=t.slice(s,s+e.count);n=n.map(function(e,t){const n=r[c+t];return n.length>e.length?n:e}),e.value=this.join(n)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return n}}const af=new class extends of{};const sf="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";const cf=new class extends of{tokenize(e){const t=new RegExp(`(\\r?\\n)|[${sf}]+|[^\\S\\n\\r]+|[^${sf}]`,"ug");return e.match(t)||[]}};function lf(e){return(t,r)=>{const n=e(t).trim(),i=e(r).trim();return function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const r=[];let n,i;for(n=0;n<=t.length;n++)r[n]=[n];for(i=0;i<=e.length;i++)r[0][i]=i;for(n=1;n<=t.length;n++)for(i=1;i<=e.length;i++)t.charAt(n-1)===e.charAt(i-1)?r[n][i]=r[n-1][i-1]:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[t.length][e.length]}(n,i)/(n.length+i.length)}}function uf(e){return function t(r,n,i=0,o=new Map){const a=function(t,r,n=new Map){let i,o=1/0;for(let a=0;a<t.length;++a)for(let s=0;s<r.length;++s){const c=JSON.stringify([t[a],r[s]]);let l;n.has(c)&&(l=n.get(c))||(l=e(t[a],r[s]),n.set(c,l)),l<o&&(o=l,i={indexA:a,indexB:s,score:o})}return i}(r,n,o);if(!a||r.length+n.length<3)return[[r,n]];const s=r.slice(0,a.indexA),c=n.slice(0,a.indexB),l=[r[a.indexA]],u=[n[a.indexB]],f=a.indexA+1,d=a.indexB+1,g=r.slice(f),p=n.slice(d),h=t(s,c,i+1,o),A=t(l,u,i+1,o),m=t(g,p,i+1,o);let I=A;return(a.indexA>0||a.indexB>0)&&(I=h.concat(I)),(r.length>f||n.length>d)&&(I=I.concat(m)),I}}const ff={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},df={matching:"none",matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:"word",colorScheme:_u.LIGHT},gf="/",pf=lf(e=>e.value),hf=uf(pf);function Af(e){return-1!==e.indexOf("dev/null")}function mf(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function If(e){switch(e){case Xu.CONTEXT:return ff.CONTEXT;case Xu.INSERT:return ff.INSERTS;case Xu.DELETE:return ff.DELETES}}function yf(e){switch(e){case _u.DARK:return"d2h-dark-color-scheme";case _u.AUTO:return"d2h-auto-color-scheme";case _u.LIGHT:default:return"d2h-light-color-scheme"}}function vf(e){return e.slice(0).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")}function bf(e,t,r=!0){const n=function(e){return e?2:1}(t);return{prefix:e.substring(0,n),content:r?vf(e.substring(n)):e.substring(n)}}function wf(e){const t=Ku(e.oldName),r=Ku(e.newName);if(t===r||Af(t)||Af(r))return Af(r)?t:r;{const e=[],n=[],i=t.split(gf),o=r.split(gf);let a=0,s=i.length-1,c=o.length-1;for(;a<s&&a<c&&i[a]===o[a];)e.push(o[a]),a+=1;for(;s>a&&c>a&&i[s]===o[c];)n.unshift(o[c]),s-=1,c-=1;const l=e.join(gf),u=n.join(gf),f=i.slice(a,s+1).join(gf),d=o.slice(a,c+1).join(gf);return l.length&&u.length?l+gf+"{"+f+" → "+d+"}"+gf+u:l.length?l+gf+"{"+f+" → "+d+"}":u.length?"{"+f+" → "+d+"}"+gf+u:t+" → "+r}}function Bf(e){return`d2h-${function(e){let t,r,n,i=0;for(t=0,n=e.length;t<n;t++)r=e.charCodeAt(t),i=(i<<5)-i+r,i|=0;return i}(wf(e)).toString().slice(-6)}`}function Ef(e){let t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t}function Cf(e,t,r,n={}){const{matching:i,maxLineLengthHighlight:o,matchWordsThreshold:a,diffStyle:s}=Object.assign(Object.assign({},df),n),c=bf(e,r,!1),l=bf(t,r,!1);if(c.content.length>o||l.content.length>o)return{oldLine:{prefix:c.prefix,content:vf(c.content)},newLine:{prefix:l.prefix,content:vf(l.content)}};const u="char"===s?(f=c.content,d=l.content,af.diff(f,d,g)):function(e,t,r){return cf.diff(e,t,r)}(c.content,l.content);var f,d,g;const p=[];if("word"===s&&"words"===i){const e=u.filter(e=>e.removed),t=u.filter(e=>e.added);hf(t,e).forEach(e=>{if(1===e[0].length&&1===e[1].length){pf(e[0][0],e[1][0])<a&&(p.push(e[0][0]),p.push(e[1][0]))}})}const h=u.reduce((e,t)=>{const r=t.added?"ins":t.removed?"del":null,n=p.indexOf(t)>-1?' class="d2h-change"':"",i=vf(t.value);return null!==r?`${e}<${r}${n}>${i}</${r}>`:`${e}${i}`},"");return{oldLine:{prefix:c.prefix,content:(A=h,A.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,""))},newLine:{prefix:l.prefix,content:mf(h)}};var A}const xf="file-summary",Df={colorScheme:df.colorScheme};class Ff{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Df),t)}render(e){const t=e.map(e=>this.hoganUtils.render(xf,"line",{fileHtmlId:Bf(e),oldName:e.oldName,newName:e.newName,fileName:wf(e),deletedLines:"-"+e.deletedLines,addedLines:"+"+e.addedLines},{fileIcon:this.hoganUtils.template("icon",Ef(e))})).join("\n");return this.hoganUtils.render(xf,"wrapper",{colorScheme:yf(this.config.colorScheme),filesNumber:e.length,files:t})}}const Qf=Object.assign(Object.assign({},df),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Sf="generic",kf="line-by-line";class Nf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Qf),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(Sf,"wrapper",{colorScheme:yf(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const r=this.hoganUtils.template(kf,"file-diff"),n=this.hoganUtils.template(Sf,"file-path"),i=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",Ef(e));return r.render({file:e,fileHtmlId:Bf(e),diffs:t,filePath:n.render({fileDiffName:wf(e)},{fileIcon:i,fileTag:o})})}generateEmptyDiff(){return this.hoganUtils.render(Sf,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:ff})}generateFileHtml(e){const t=uf(lf(t=>bf(t.content,e.isCombined).content));return e.blocks.map(r=>{let n=this.hoganUtils.render(Sf,"block-header",{CSSLineClass:ff,blockHeader:e.isTooBig?r.header:vf(r.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(r).forEach(([r,i,o])=>{if(i.length&&o.length&&!r.length)this.applyRematchMatching(i,o,t).map(([t,r])=>{const{left:i,right:o}=this.processChangedLines(e,e.isCombined,t,r);n+=i,n+=o});else if(r.length)r.forEach(t=>{const{prefix:r,content:i}=bf(t.content,e.isCombined);n+=this.generateSingleLineHtml(e,{type:ff.CONTEXT,prefix:r,content:i,oldNumber:t.oldNumber,newNumber:t.newNumber})});else if(i.length||o.length){const{left:t,right:r}=this.processChangedLines(e,e.isCombined,i,o);n+=t,n+=r}else console.error("Unknown state reached while processing groups of lines",r,i,o)}),n}).join("\n")}applyLineGroupping(e){const t=[];let r=[],n=[];for(let i=0;i<e.lines.length;i++){const o=e.lines[i];(o.type!==Xu.INSERT&&n.length||o.type===Xu.CONTEXT&&r.length>0)&&(t.push([[],r,n]),r=[],n=[]),o.type===Xu.CONTEXT?t.push([[o],[],[]]):o.type===Xu.INSERT&&0===r.length?t.push([[],[],[o]]):o.type===Xu.INSERT&&r.length>0?n.push(o):o.type===Xu.DELETE&&r.push(o)}return(r.length||n.length)&&(t.push([[],r,n]),r=[],n=[]),t}applyRematchMatching(e,t,r){const n=e.length*t.length,i=$u(e.concat(t).map(e=>e.content.length));return n<this.config.matchingMaxComparisons&&i<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?r(e,t):[[e,t]]}processChangedLines(e,t,r,n){const i={right:"",left:""},o=Math.max(r.length,n.length);for(let a=0;a<o;a++){const o=r[a],s=n[a],c=void 0!==o&&void 0!==s?Cf(o.content,s.content,t,this.config):void 0,l=void 0!==o&&void 0!==o.oldNumber?Object.assign(Object.assign({},void 0!==c?{prefix:c.oldLine.prefix,content:c.oldLine.content,type:ff.DELETE_CHANGES}:Object.assign(Object.assign({},bf(o.content,t)),{type:If(o.type)})),{oldNumber:o.oldNumber,newNumber:o.newNumber}):void 0,u=void 0!==s&&void 0!==s.newNumber?Object.assign(Object.assign({},void 0!==c?{prefix:c.newLine.prefix,content:c.newLine.content,type:ff.INSERT_CHANGES}:Object.assign(Object.assign({},bf(s.content,t)),{type:If(s.type)})),{oldNumber:s.oldNumber,newNumber:s.newNumber}):void 0,{left:f,right:d}=this.generateLineHtml(e,l,u);i.left+=f,i.right+=d}return i}generateLineHtml(e,t,r){return{left:this.generateSingleLineHtml(e,t),right:this.generateSingleLineHtml(e,r)}}generateSingleLineHtml(e,t){if(void 0===t)return"";const r=this.hoganUtils.render(kf,"numbers",{oldNumber:t.oldNumber||"",newNumber:t.newNumber||""});return this.hoganUtils.render(Sf,"line",{type:t.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:" "===t.prefix?"&nbsp;":t.prefix,content:t.content,lineNumber:r,line:t,file:e})}}const qf=Object.assign(Object.assign({},df),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Mf="generic";class Hf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},qf),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(Mf,"wrapper",{colorScheme:yf(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const r=this.hoganUtils.template("side-by-side","file-diff"),n=this.hoganUtils.template(Mf,"file-path"),i=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",Ef(e));return r.render({file:e,fileHtmlId:Bf(e),diffs:t,filePath:n.render({fileDiffName:wf(e)},{fileIcon:i,fileTag:o})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(Mf,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:ff})}}generateFileHtml(e){const t=uf(lf(t=>bf(t.content,e.isCombined).content));return e.blocks.map(r=>{const n={left:this.makeHeaderHtml(r.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(r).forEach(([r,i,o])=>{if(i.length&&o.length&&!r.length)this.applyRematchMatching(i,o,t).map(([t,r])=>{const{left:i,right:o}=this.processChangedLines(e.isCombined,t,r);n.left+=i,n.right+=o});else if(r.length)r.forEach(t=>{const{prefix:r,content:i}=bf(t.content,e.isCombined),{left:o,right:a}=this.generateLineHtml({type:ff.CONTEXT,prefix:r,content:i,number:t.oldNumber},{type:ff.CONTEXT,prefix:r,content:i,number:t.newNumber});n.left+=o,n.right+=a});else if(i.length||o.length){const{left:t,right:r}=this.processChangedLines(e.isCombined,i,o);n.left+=t,n.right+=r}else console.error("Unknown state reached while processing groups of lines",r,i,o)}),n}).reduce((e,t)=>({left:e.left+t.left,right:e.right+t.right}),{left:"",right:""})}applyLineGroupping(e){const t=[];let r=[],n=[];for(let i=0;i<e.lines.length;i++){const o=e.lines[i];(o.type!==Xu.INSERT&&n.length||o.type===Xu.CONTEXT&&r.length>0)&&(t.push([[],r,n]),r=[],n=[]),o.type===Xu.CONTEXT?t.push([[o],[],[]]):o.type===Xu.INSERT&&0===r.length?t.push([[],[],[o]]):o.type===Xu.INSERT&&r.length>0?n.push(o):o.type===Xu.DELETE&&r.push(o)}return(r.length||n.length)&&(t.push([[],r,n]),r=[],n=[]),t}applyRematchMatching(e,t,r){const n=e.length*t.length,i=$u(e.concat(t).map(e=>e.content.length));return n<this.config.matchingMaxComparisons&&i<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?r(e,t):[[e,t]]}makeHeaderHtml(e,t){return this.hoganUtils.render(Mf,"block-header",{CSSLineClass:ff,blockHeader:(null==t?void 0:t.isTooBig)?e:vf(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(e,t,r){const n={right:"",left:""},i=Math.max(t.length,r.length);for(let o=0;o<i;o++){const i=t[o],a=r[o],s=void 0!==i&&void 0!==a?Cf(i.content,a.content,e,this.config):void 0,c=void 0!==i&&void 0!==i.oldNumber?Object.assign(Object.assign({},void 0!==s?{prefix:s.oldLine.prefix,content:s.oldLine.content,type:ff.DELETE_CHANGES}:Object.assign(Object.assign({},bf(i.content,e)),{type:If(i.type)})),{number:i.oldNumber}):void 0,l=void 0!==a&&void 0!==a.newNumber?Object.assign(Object.assign({},void 0!==s?{prefix:s.newLine.prefix,content:s.newLine.content,type:ff.INSERT_CHANGES}:Object.assign(Object.assign({},bf(a.content,e)),{type:If(a.type)})),{number:a.newNumber}):void 0,{left:u,right:f}=this.generateLineHtml(c,l);n.left+=u,n.right+=f}return n}generateLineHtml(e,t){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(t)}}generateSingleHtml(e){const t="d2h-code-side-linenumber",r="d2h-code-side-line";return this.hoganUtils.render(Mf,"line",{type:(null==e?void 0:e.type)||`${ff.CONTEXT} d2h-emptyplaceholder`,lineClass:void 0!==e?t:`${t} d2h-code-side-emptyplaceholder`,contentClass:void 0!==e?r:`${r} d2h-code-side-emptyplaceholder`,prefix:" "===(null==e?void 0:e.prefix)?"&nbsp;":null==e?void 0:e.prefix,content:null==e?void 0:e.content,lineNumber:null==e?void 0:e.number})}}var Lf={};!function(e){!function(e){var t=/\S/,r=/\"/g,n=/\n/g,i=/\r/g,o=/\\/g,a=/\u2028/,s=/\u2029/;function c(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function l(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function u(e,t,r){if(t.charAt(r)!=e.charAt(0))return!1;for(var n=1,i=e.length;n<i;n++)if(t.charAt(r+n)!=e.charAt(n))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(r,n){var i=r.length,o=0,a=null,s=null,f="",d=[],g=!1,p=0,h=0,A="{{",m="}}";function I(){f.length>0&&(d.push({tag:"_t",text:new String(f)}),f="")}function y(r,n){if(I(),r&&function(){for(var r=!0,n=h;n<d.length;n++)if(!(r=e.tags[d[n].tag]<e.tags._v||"_t"==d[n].tag&&null===d[n].text.match(t)))return!1;return r}())for(var i,o=h;o<d.length;o++)d[o].text&&((i=d[o+1])&&">"==i.tag&&(i.indent=d[o].text.toString()),d.splice(o,1));else n||d.push({tag:"\n"});g=!1,h=d.length}function v(e,t){var r="="+m,n=e.indexOf(r,t),i=l(e.substring(e.indexOf("=",t)+1,n)).split(" ");return A=i[0],m=i[i.length-1],n+r.length-1}for(n&&(n=n.split(" "),A=n[0],m=n[1]),p=0;p<i;p++)0==o?u(A,r,p)?(--p,I(),o=1):"\n"==r.charAt(p)?y(g):f+=r.charAt(p):1==o?(p+=A.length-1,"="==(a=(s=e.tags[r.charAt(p+1)])?r.charAt(p+1):"_v")?(p=v(r,p),o=0):(s&&p++,o=2),g=p):u(m,r,p)?(d.push({tag:a,n:l(f),otag:A,ctag:m,i:"/"==a?g-A.length:p+m.length}),f="",p+=m.length-1,o=0,"{"==a&&("}}"==m?p++:c(d[d.length-1]))):f+=r.charAt(p);return y(g,!0),d};var f={_t:!0,"\n":!0,$:!0,"/":!0};function d(t,r,n,i){var o,a=[],s=null,c=null;for(o=n[n.length-1];t.length>0;){if(c=t.shift(),o&&"<"==o.tag&&!(c.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[c.tag]<=e.tags.$||g(c,i))n.push(c),c.nodes=d(t,c.tag,n,i);else{if("/"==c.tag){if(0===n.length)throw new Error("Closing tag without opener: /"+c.n);if(s=n.pop(),c.n!=s.n&&!p(c.n,s.n,i))throw new Error("Nesting error: "+s.n+" vs. "+c.n);return s.end=c.i,a}"\n"==c.tag&&(c.last=0==t.length||"\n"==t[0].tag)}a.push(c)}if(n.length>0)throw new Error("missing closing tag: "+n.pop().n);return a}function g(e,t){for(var r=0,n=t.length;r<n;r++)if(t[r].o==e.n)return e.tag="#",!0}function p(e,t,r){for(var n=0,i=r.length;n<i;n++)if(r[n].c==e&&r[n].o==t)return!0}function h(e){var t=[];for(var r in e.partials)t.push('"'+m(r)+'":{name:"'+m(e.partials[r].name)+'", '+h(e.partials[r])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var r in e)t.push('"'+m(r)+'": function(c,p,t,i) {'+e[r]+"}");return"{ "+t.join(",")+" }"}(e.subs)}e.stringify=function(t,r,n){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+h(t)+"}"};var A=0;function m(e){return e.replace(o,"\\\\").replace(r,'\\"').replace(n,"\\n").replace(i,"\\r").replace(a,"\\u2028").replace(s,"\\u2029")}function I(e){return~e.indexOf(".")?"d":"f"}function y(e,t){var r="<"+(t.prefix||"")+e.n+A++;return t.partials[r]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+m(r)+'",c,p,"'+(e.indent||"")+'"));',r}function v(e,t){t.code+="t.b(t.t(t."+I(e.n)+'("'+m(e.n)+'",c,p,0)));'}function b(e){return"t.b("+e+");"}e.generate=function(t,r,n){A=0;var i={code:"",subs:{},partials:{}};return e.walk(t,i),n.asString?this.stringify(i,r,n):this.makeTemplate(i,r,n)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,r){var n=this.makePartials(e);return n.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(n,t,this,r)},e.makePartials=function(e){var t,r={subs:{},partials:e.partials,name:e.name};for(t in r.partials)r.partials[t]=this.makePartials(r.partials[t]);for(t in e.subs)r.subs[t]=new Function("c","p","t","i",e.subs[t]);return r},e.codegen={"#":function(t,r){r.code+="if(t.s(t."+I(t.n)+'("'+m(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,r),r.code+="});c.pop();}"},"^":function(t,r){r.code+="if(!t.s(t."+I(t.n)+'("'+m(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,r),r.code+="};"},">":y,"<":function(t,r){var n={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,n);var i=r.partials[y(t,r)];i.subs=n.subs,i.partials=n.partials},$:function(t,r){var n={subs:{},code:"",partials:r.partials,prefix:t.n};e.walk(t.nodes,n),r.subs[t.n]=n.code,r.inPartial||(r.code+='t.sub("'+m(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=b('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+I(e.n)+'("'+m(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=b('"'+m(e.text)+'"')},"{":v,"&":v},e.walk=function(t,r){for(var n,i=0,o=t.length;i<o;i++)(n=e.codegen[t[i].tag])&&n(t[i],r);return r},e.parse=function(e,t,r){return d(e,0,[],(r=r||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,r){r=r||{};var n=e.cacheKey(t,r),i=this.cache[n];if(i){var o=i.partials;for(var a in o)delete o[a].instance;return i}return i=this.generate(this.parse(this.scan(t,r.delimiters),t,r),t,r),this.cache[n]=i}}(e)}(Lf);var Uf={};!function(e){!function(e){function t(e,t,r){var n;return t&&"object"==typeof t&&(void 0!==t[e]?n=t[e]:r&&t.get&&"function"==typeof t.get&&(n=t.get(e))),n}e.Template=function(e,t,r,n){e=e||{},this.r=e.code||this.r,this.c=r,this.options=n||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,r){return""},v:function(e){return e=c(e),s.test(e)?e.replace(r,"&amp;").replace(n,"&lt;").replace(i,"&gt;").replace(o,"&#39;").replace(a,"&quot;"):e},t:c,render:function(e,t,r){return this.ri([e],t||{},r)},ri:function(e,t,r){return this.r(e,t,r)},ep:function(e,t){var r=this.partials[e],n=t[r.name];if(r.instance&&r.base==n)return r.instance;if("string"==typeof n){if(!this.c)throw new Error("No compiler available.");n=this.c.compile(n,this.options)}if(!n)return null;if(this.partials[e].base=n,r.subs){for(key in t.stackText||(t.stackText={}),r.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);n=function(e,t,r,n,i,o){function a(){}function s(){}var c;a.prototype=e,s.prototype=e.subs;var l=new a;for(c in l.subs=new s,l.subsText={},l.buf="",n=n||{},l.stackSubs=n,l.subsText=o,t)n[c]||(n[c]=t[c]);for(c in n)l.subs[c]=n[c];for(c in i=i||{},l.stackPartials=i,r)i[c]||(i[c]=r[c]);for(c in i)l.partials[c]=i[c];return l}(n,r.subs,r.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=n,n},rp:function(e,t,r,n){var i=this.ep(e,r);return i?i.ri(t,r,n):""},rs:function(e,t,r){var n=e[e.length-1];if(l(n))for(var i=0;i<n.length;i++)e.push(n[i]),r(e,t,this),e.pop();else r(e,t,this)},s:function(e,t,r,n,i,o,a){var s;return(!l(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,r,n,i,o,a)),s=!!e,!n&&s&&t&&t.push("object"==typeof e?e:t[t.length-1]),s)},d:function(e,r,n,i){var o,a=e.split("."),s=this.f(a[0],r,n,i),c=this.options.modelGet,u=null;if("."===e&&l(r[r.length-2]))s=r[r.length-1];else for(var f=1;f<a.length;f++)void 0!==(o=t(a[f],s,c))?(u=s,s=o):s="";return!(i&&!s)&&(i||"function"!=typeof s||(r.push(u),s=this.mv(s,r,n),r.pop()),s)},f:function(e,r,n,i){for(var o=!1,a=!1,s=this.options.modelGet,c=r.length-1;c>=0;c--)if(void 0!==(o=t(e,r[c],s))){a=!0;break}return a?(i||"function"!=typeof o||(o=this.mv(o,r,n)),o):!i&&""},ls:function(e,t,r,n,i,o){var a=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(c(e.call(t,i,r)),t,n)),this.options.delimiters=a,!1},ct:function(e,t,r){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,r)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,r,n,i,o,a){var s,c=t[t.length-1],l=e.call(c);return"function"==typeof l?!!n||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(l,c,t,r,s.substring(i,o),a)):l},mv:function(e,t,r){var n=t[t.length-1],i=e.call(n);return"function"==typeof i?this.ct(c(i.call(n)),n,r):i},sub:function(e,t,r,n){var i=this.subs[e];i&&(this.activeSub=e,i(t,r,this,n),this.activeSub=!1)}};var r=/&/g,n=/</g,i=/>/g,o=/\'/g,a=/\"/g,s=/[&<>\"\']/;function c(e){return String(null==e?"":e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(e)}(Uf);var Rf=Lf;Rf.Template=Uf.Template,Rf.template=Rf.Template;var Of=Rf;const Tf={};Tf["file-summary-line"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<li class="d2h-file-list-line">'),n.b("\n"+r),n.b(' <span class="d2h-file-name-wrapper">'),n.b("\n"+r),n.b(n.rp("<fileIcon0",e,t," ")),n.b(' <a href="#'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-name">'),n.b(n.v(n.f("fileName",e,t,0))),n.b("</a>"),n.b("\n"+r),n.b(' <span class="d2h-file-stats">'),n.b("\n"+r),n.b(' <span class="d2h-lines-added">'),n.b(n.v(n.f("addedLines",e,t,0))),n.b("</span>"),n.b("\n"+r),n.b(' <span class="d2h-lines-deleted">'),n.b(n.v(n.f("deletedLines",e,t,0))),n.b("</span>"),n.b("\n"+r),n.b(" </span>"),n.b("\n"+r),n.b(" </span>"),n.b("\n"+r),n.b("</li>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}}),Tf["file-summary-wrapper"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-file-list-wrapper '),n.b(n.v(n.f("colorScheme",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="d2h-file-list-header">'),n.b("\n"+r),n.b(' <span class="d2h-file-list-title">Files changed ('),n.b(n.v(n.f("filesNumber",e,t,0))),n.b(")</span>"),n.b("\n"+r),n.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),n.b("\n"+r),n.b(' <a class="d2h-file-switch d2h-show">show</a>'),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(' <ol class="d2h-file-list">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("files",e,t,0))),n.b("\n"+r),n.b(" </ol>"),n.b("\n"+r),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["generic-block-header"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",e,t,0))),n.b(" "),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('"></td>'),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.s(n.f("blockHeader",e,t,1),e,t,0,156,173,"{{ }}")&&(n.rs(e,t,function(e,t,r){r.b(r.t(r.f("blockHeader",e,t,0)))}),e.pop()),n.s(n.f("blockHeader",e,t,1),e,t,1,0,0,"")||n.b("&nbsp;"),n.b("</div>"),n.b("\n"+r),n.b(" </td>"),n.b("\n"+r),n.b("</tr>"),n.fl()},partials:{},subs:{}}),Tf["generic-empty-diff"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.b("\n"+r),n.b(" File without changes"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </td>"),n.b("\n"+r),n.b("</tr>"),n.fl()},partials:{},subs:{}}),Tf["generic-file-path"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-file-name-wrapper">'),n.b("\n"+r),n.b(n.rp("<fileIcon0",e,t," ")),n.b(' <span class="d2h-file-name">'),n.b(n.v(n.f("fileDiffName",e,t,0))),n.b("</span>"),n.b("\n"+r),n.b(n.rp("<fileTag1",e,t," ")),n.b("</span>"),n.b("\n"+r),n.b('<label class="d2h-file-collapse">'),n.b("\n"+r),n.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),n.b("\n"+r),n.b(" Viewed"),n.b("\n"+r),n.b("</label>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}}),Tf["generic-line"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",e,t,0))),n.b(" "),n.b(n.v(n.f("type",e,t,0))),n.b('">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("lineNumber",e,t,0))),n.b("\n"+r),n.b(" </td>"),n.b("\n"+r),n.b(' <td class="'),n.b(n.v(n.f("type",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.b("\n"+r),n.s(n.f("prefix",e,t,1),e,t,0,162,238,"{{ }}")&&(n.rs(e,t,function(e,t,n){n.b(' <span class="d2h-code-line-prefix">'),n.b(n.t(n.f("prefix",e,t,0))),n.b("</span>"),n.b("\n"+r)}),e.pop()),n.s(n.f("prefix",e,t,1),e,t,1,0,0,"")||(n.b(' <span class="d2h-code-line-prefix">&nbsp;</span>'),n.b("\n"+r)),n.s(n.f("content",e,t,1),e,t,0,371,445,"{{ }}")&&(n.rs(e,t,function(e,t,n){n.b(' <span class="d2h-code-line-ctn">'),n.b(n.t(n.f("content",e,t,0))),n.b("</span>"),n.b("\n"+r)}),e.pop()),n.s(n.f("content",e,t,1),e,t,1,0,0,"")||(n.b(' <span class="d2h-code-line-ctn"><br></span>'),n.b("\n"+r)),n.b(" </div>"),n.b("\n"+r),n.b(" </td>"),n.b("\n"+r),n.b("</tr>"),n.fl()},partials:{},subs:{}}),Tf["generic-wrapper"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-wrapper '),n.b(n.v(n.f("colorScheme",e,t,0))),n.b('">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("content",e,t,0))),n.b("\n"+r),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["icon-file-added"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),n.b("\n"+r),n.b(' width="14">'),n.b("\n"+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["icon-file-changed"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),n.b("\n"+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b("\n"+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["icon-file-deleted"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),n.b("\n"+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b("\n"+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["icon-file-renamed"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),n.b("\n"+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b("\n"+r),n.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["icon-file"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),n.b("\n"+r),n.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),n.b("\n"+r),n.b("</svg>"),n.fl()},partials:{},subs:{}}),Tf["line-by-line-file-diff"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="d2h-file-header">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(' <div class="d2h-file-diff">'),n.b("\n"+r),n.b(' <div class="d2h-code-wrapper">'),n.b("\n"+r),n.b(' <table class="d2h-diff-table">'),n.b("\n"+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("diffs",e,t,0))),n.b("\n"+r),n.b(" </tbody>"),n.b("\n"+r),n.b(" </table>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["line-by-line-numbers"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="line-num1">'),n.b(n.v(n.f("oldNumber",e,t,0))),n.b("</div>"),n.b("\n"+r),n.b('<div class="line-num2">'),n.b(n.v(n.f("newNumber",e,t,0))),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["side-by-side-file-diff"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",e,t,0))),n.b('">'),n.b("\n"+r),n.b(' <div class="d2h-file-header">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(' <div class="d2h-files-diff">'),n.b("\n"+r),n.b(' <div class="d2h-file-side-diff">'),n.b("\n"+r),n.b(' <div class="d2h-code-wrapper">'),n.b("\n"+r),n.b(' <table class="d2h-diff-table">'),n.b("\n"+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.d("diffs.left",e,t,0))),n.b("\n"+r),n.b(" </tbody>"),n.b("\n"+r),n.b(" </table>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(' <div class="d2h-file-side-diff">'),n.b("\n"+r),n.b(' <div class="d2h-code-wrapper">'),n.b("\n"+r),n.b(' <table class="d2h-diff-table">'),n.b("\n"+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b("\n"+r),n.b(" "),n.b(n.t(n.d("diffs.right",e,t,0))),n.b("\n"+r),n.b(" </tbody>"),n.b("\n"+r),n.b(" </table>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b(" </div>"),n.b("\n"+r),n.b("</div>"),n.fl()},partials:{},subs:{}}),Tf["tag-file-added"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),n.fl()},partials:{},subs:{}}),Tf["tag-file-changed"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),n.fl()},partials:{},subs:{}}),Tf["tag-file-deleted"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),n.fl()},partials:{},subs:{}}),Tf["tag-file-renamed"]=new Of.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),n.fl()},partials:{},subs:{}});class Yf{constructor({compiledTemplates:e={},rawTemplates:t={}}){const r=Object.entries(t).reduce((e,[t,r])=>{const n=Of.compile(r,{asString:!1});return Object.assign(Object.assign({},e),{[t]:n})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},Tf),e),r)}static compile(e){return Of.compile(e,{asString:!1})}render(e,t,r,n,i){const o=this.templateKey(e,t);try{return this.preCompiledTemplates[o].render(r,n,i)}catch(e){throw new Error(`Could not find template to render '${o}'`)}}template(e,t){return this.preCompiledTemplates[this.templateKey(e,t)]}templateKey(e,t){return`${e}-${t}`}}const jf=Object.assign(Object.assign(Object.assign({},Qf),qf),{outputFormat:"line-by-line",drawFileList:!0});var Gf=Object.freeze({__proto__:null,defaultDiff2HtmlConfig:jf,html:function(e,t={}){const r=Object.assign(Object.assign({},jf),t),n="string"==typeof e?nf(e,r):e,i=new Yf(r),{colorScheme:o}=r,a={colorScheme:o};return(r.drawFileList?new Ff(i,a).render(n):"")+("side-by-side"===r.outputFormat?new Hf(i,r).render(n):new Nf(i,r).render(n))},parse:function(e,t={}){return nf(e,Object.assign(Object.assign({},jf),t))}});function Jf(){if("[object Module]"===Object.prototype.toString.call(Gf))return Gf;let e=yn(),t=we(e,"Diff2Html.default",null),r=we(e,"Diff2Html",null),n="html";if(Ee(t)&&va(t[n]))return t;if(Ee(r)&&va(r[n]))return r;throw console.log("Diff2Html",Gf,"g.Diff2Html",e.Diff2Html),new Error("invalid Diff2Html, g.Diff2Html, g.Diff2Html.default, use script for import")}function zf(e){return document.querySelectorAll(e)}function Vf(e){function t(e){e.parentNode.removeChild(e)}if(br(e)){return void t(e)}if(!De(e))return;Er(zf(e),function(e){t(e)})}function Pf(e,t){if(!br(e))return"invalid eleParent";if(xe(t))e.insertAdjacentHTML("afterbegin",t);else{if(!br(t))return"invalid itemChild";e.insertBefore(t,e.firstChild)}}async function Xf(e,t={}){if(!br(e))return Promise.reject("invalid ele");let r=we(t,"scale",null);if(Se(r)||(r=1),r=Mn(r),r<1)return Promise.reject("opt.scale can not less then 1");let n=we(t,"picType",null);"image/jpg"!==n&&"image/jpeg"!==n&&"image/png"!==n&&"svg"!==n&&(n="image/png");let i=we(t,"toBase64",null);pn(i)||(i=!0);let o=e.cloneNode(!0),a=document.createElement("div");a.style.position="absolute",a.style.top=0,a.style.left=0,a.style.zIndex=-1,a.appendChild(o);let s=document.createElement("div");s.style.opacity=0,s.style.position="relative",s.appendChild(a),Pf(document.querySelector("body"),s);let c,l=yn().snapdom,u={scale:r,quality:1,cache:"disabled"};return"image/jpg"===n||"image/jpeg"===n?c=await l.toJpg(a,u):"image/png"===n?c=await l.toPng(a,u):"svg"===n&&(c=await l.toSvg(a,u)),i&&(c=we(c,"src","")),Vf(s),c}var _f=Ra(Fa);function Wf(e){let t=function(e,r){return null===e.parentNode?r:t(e.parentNode,r.concat([e]))};return e instanceof HTMLElement||e instanceof SVGElement?t(e.parentNode,[]):[]}function Kf(e){let t=we(e,"clientX",null),r=we(e,"clientY",null),n=we(e,"pageX",null),i=we(e,"pageY",null);if(null!==t&&null!==r&&null!==n&&null!==i)return{clientX:t,clientY:r,pageX:n,pageY:i};let o=we(e,"changedTouches",[]);if(1!==dn(o))return null;let a=o[0];return{clientX:we(a,"clientX",null),clientY:we(a,"clientY",null),pageX:we(a,"pageX",null),pageY:we(a,"pageY",null)}}function $f(e,t){let r=[];try{r=document.elementsFromPoint(e,t)}catch(e){console.log(e)}return r}function Zf(e,t){if(!br(e))return null;if(!De(t))return null;try{return e.getAttribute(t)}catch(e){}return null}function ed(e){if(!br(e))return null;try{return e.getBoundingClientRect()}catch(e){}return null}function td(e,t){if(!Ee(e))return null;if(!Ia(e.clientX)||!Ia(e.clientY))return null;if(!br(t))return null;let r=ed(t);return r?{x:e.clientX-r.left,y:e.clientY-r.top,w:t.offsetWidth,h:t.offsetHeight}:null}function rd(e={}){let t="dragpreviewid",r=null,n=null,i=null,o=null,a=null,s=!1,c=we(e,"attIdentify",null);De(c)||(c="dragprevid");let l=we(e,"containerOpacity",null);Ia(l)||(l=.4);let u=we(e,"containerBackground",null);De(u)||(u="white");let f=we(e,"containerBorderWidth",null);Ia(f)||(f=1);let d=we(e,"containerBorderColor",null);De(d)||(d="#f26");let g=`c${Hu(8)}`;function p(e,t,r){n&&i&&o&&a&&!s&&(a.style.top=t-n.tShiftY+"px",a.style.left=e-n.tShiftX+"px")}function h(){Vf(`[${t}='${g}']`),n=null,i=null,o=null,a=null}let A=function(e){p(e.clientX,e.clientY)};window.addEventListener("mousemove",A);let m=function(e){let t=Kf(e);t&&p(t.clientX,t.clientY)};return window.addEventListener("touchmove",m),{createPreview:function(e,s,A){try{!function(){let h=function(e,t,n){let i=ed(e);if(!i)return null;r=e;let o=e.cloneNode(!0);return o.tShiftX=t-i.left,o.tShiftY=n-i.top,o.tWidth=e.offsetWidth,o.tHeight=e.offsetHeight,o.tParent=e.parentNode,o.setAttribute(c,""),o}(e,s,A);if(null===h)return;let m=document.createElement("div");m.style.position="absolute",m.style.zIndex=1,m.style.top=0,m.style.left=0,m.style.width="100%",m.style.height="100%",m.appendChild(h);let I=document.createElement("div");I.style.position="relative",I.appendChild(m);let y=document.createElement("div");y.setAttribute(t,g),y.style.position="fixed",y.style.zIndex=1e5,y.style.width=`${h.tWidth+2*f}px`,y.style.height=`${h.tHeight+2*f}px`,y.style.opacity=l,y.style.background=u,y.style.border=`${f}px solid ${d}`,y.style.pointerEvents="none",y.appendChild(I),document.querySelector("body").appendChild(y),n=h,i=m,o=I,a=y,p(s,A)}()}catch(e){}let m=setInterval(()=>{let e=Zf(r,c);document.querySelector(`[${c}='${e}']`)||(clearInterval(m),h())},500)},updateDragPreview:p,pauseDragPreview:function(e){s=e},removeDragPreview:h,setNodeStyle:function(e){try{Er(e,(e,t)=>{n.style[t]=e})}catch(e){}},setCoverStyle:function(e){try{Er(e,(e,t)=>{i.style[t]=e})}catch(e){}},setSellStyle:function(e){try{Er(e,(e,t)=>{o.style[t]=e})}catch(e){}},setContainerStyle:function(e){try{Er(e,(e,t)=>{a.style[t]=e})}catch(e){}},clear:function(){window.removeEventListener("mousemove",A),window.removeEventListener("touchmove",m)}}}let nd={};function id(e,t,{attIdentify:r,previewOpacity:n,previewBackground:i,previewBorderWidth:o,previewBorderColor:a}){if(!ke(nd,e)){let t=Xi(),s=function(e){let t=[];function r(){let r;r="mousemove";let n=function(t){e.dragMove({e:t,name:"mousemove"})};window.addEventListener(r,n),t.push({ele:window,name:r,f:n}),r="mouseup";let i=function(t){e.dragDrop({e:t,name:"mouseup"})};window.addEventListener(r,i),t.push({ele:window,name:r,f:i}),r="touchmove";let o=function(t){e.dragMove({e:t,name:"touchmove"})};window.addEventListener(r,o),t.push({ele:window,name:r,f:o}),r="touchend";let a=function(t){e.dragDrop({e:t,name:"touchend"})};window.addEventListener(r,a),t.push({ele:window,name:r,f:a})}function n(){Er(t,({ele:e,name:t,f:r})=>{e.removeEventListener(t,r)})}return{bind:r,unbind:n}}({dragMove:r=>{t.emit(e+"-dragMove",r)},dragDrop:r=>{t.emit(e+"-dragDrop",r)}});s.bind();let c=rd({attIdentify:r,containerOpacity:n,containerBackground:i,containerBorderWidth:o,containerBorderColor:a});nd[e]={eleIds:[],evg:t,oevg:s,pv:c,isInit:!1,isActive:!0}}return nd[e].eleIds.push(t),nd[e].evg}function od(e,t){let r=Zf(e,t);return r=Zi(r),r}function ad({gid:e,attGroup:t,attIndex:r,attIdentify:n,timeDragStartDelay:i,previewOpacity:o,previewDisabledOpacity:a}){let s=null,c=null,l=null,u=null;if(nd[e].isInit)return nd[e].evg;nd[e].isInit=!0;let f=nd[e].evg;f.on(e+"-dragStart",function({e:t,ele:o,from:l}){if(!nd[e].isActive)return;let u=od(o,r);if(null===u)return;s=u,c=o;let g={event:t,startInd:s,startEle:c,tarInd:s,tarEid:Zf(c,n)};f.emit(e+"-change",{mode:"start",...g}),f.emit(e+"-start",g);let p=Kf(t);if(!p)return;setTimeout(()=>{null!==s&&(d.createPreview(c,p.clientX,p.clientY),d.setContainerStyle({opacity:a}))},i)}),f.on(e+"-dragMove",function({e:i,name:g,from:p}){if(!nd[e].isActive)return;let h=function(e,t,r){let n=null;return Er(Wf(e.target),e=>{if(Zf(e,t)===r)return n=e,!1}),n}(i,t,e);if(null===s)return;let A=Kf(i);if(!A)return;function m(){let t={event:i,startInd:s,startEle:c,endInd:l,endEle:u,tarInd:l,tarEid:Zf(u,n)};f.emit(e+"-change",{mode:"leave",...t}),f.emit(e+"-leave",t),l=null,u=null,d.setContainerStyle({opacity:a})}if(!h)return void(null!==l&&m());let I=od(h,r);if(null===I)return;if(I===s)return void(null!==l&&m());if(I!==l)null!==l&&m(),function(t,r){l=t,u=r;let a={event:i,startInd:s,startEle:c,endInd:l,endEle:u,tarInd:l,tarEid:Zf(u,n)};f.emit(e+"-change",{mode:"enter",...a}),f.emit(e+"-enter",a),d.setContainerStyle({opacity:o})}(I,h);else{let t=td(A,h),r=0;t.w>0&&(r=t.x/t.w);let a=0;t.h>0&&(a=t.y/t.h),r>=0&&r<=1&&a>=0&&a<=1&&function(t,r,a){let g={event:i,startInd:s,startEle:c,endInd:l,endEle:u,tarInd:l,tarEid:Zf(u,n),...t,rx:r,ry:a};f.emit(e+"-change",{mode:"move",...g}),f.emit(e+"-move",g),d.setContainerStyle({opacity:o})}(t,r,a)}}),f.on(e+"-dragDrop",function({e:i,name:o,from:a}){if(d.removeDragPreview(),!nd[e].isActive)return;if(null===s)return;let g=function(e,t,r){let n=null,i=Kf(e);return i?(Er($f(i.clientX,i.clientY),e=>{if(Zf(e,t)===r)return n=e,!1}),n):n}(i,t,e);if(!g)return s=null,c=null,l=null,void(u=null);let p=od(g,r);if(null===p)return;(function(t,r){l=t,u=r;let o={event:i,startInd:s,startEle:c,endInd:l,endEle:u,tarInd:l,tarEid:Zf(u,n)};f.emit(e+"-change",{mode:"drop",...o}),f.emit(e+"-drop",o)})(p,g),s=null,c=null,l=null,u=null});let d=nd[e].pv}async function sd(e){let t=[],r=ns();return await async function e(r){let n=null;if(r.isFile&&(n=await function(e){let t=ns();try{e.file(t.resolve,t.reject)}catch(e){t.reject(e)}return t}(r)),t.push({type:r.isDirectory?"folder":r.isFile?"file":"unknow",path:r.fullPath,name:r.name,entry:r,file:n}),r.isDirectory){let t=r.createReader(),n=await function(e){let t=ns();try{e.readEntries(t.resolve,t.reject)}catch(e){t.reject(e)}return t}(t);await cl(n,async t=>{await e(t)})}}(e),r.resolve(t),r}async function cd(e){let t=[];Er(e,e=>{let r=e.webkitGetAsEntry();r&&t.push(r)});let r=await async function(e){let t=[];return await cl(e,async e=>{Er(await sd(e),e=>{t.push(e)})}),t}(t);return r}async function ld(e){let t=[],r=[];try{t=await async function(e){let t=[];return Er(e,e=>{e.type&&t.push({type:"file",name:e.name,file:e})}),t}(we(e,"files",[])),Vu()||(r=await cd(we(e,"items",[])).catch(e=>{console.log(e)}))}catch(e){return Promise.reject(e)}return{files:t,entries:r}}function ud(e){return document.querySelector(e)}function fd(e){return!Ur(e)}var dd=Math.max;var gd,pd=(gd=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:qn(r);return i<0&&(i=dd(n+i,0)),Or(e,fr(t),i)},function(e,t,r){var n=Object(e);if(!ft(e)){var i=fr(t);e=dt(e),t=function(e){return i(n[e],e,n)}}var o=gd(e,t,r);return o>-1?n[i?e[o]:o]:void 0});let hd=[{name:"pic",group:"image",acp:"image/*",exec:"imageviwer"},{name:"xml",group:"data",acp:"text/xml",exec:"textviwer"},{name:"htm",group:"docums",acp:"text/html",exec:"browser"},{name:"html",group:"docums",acp:"text/html",exec:"browser"},{name:"json",group:"data",acp:"application/json",exec:"textviwer"},{name:"geojson",group:"data",acp:"application/geo+json",exec:"textviwer"},{name:"txt",group:"data",acp:"text/plain",exec:"textviwer"},{name:"csv",group:"data",acp:"text/csv",exec:"excel"},{name:"dat",group:"data",acp:"application/octet-stream",exec:"binaryviwer"},{name:"7z",group:"compress",acp:"application/x-7z-compressed",exec:"compressor"},{name:"bzip",group:"compress",acp:"application/x-bzip",exec:"7z"},{name:"bzip2",group:"compress",acp:"application/x-bzip2",exec:"compressor"},{name:"bz2",group:"compress",acp:"application/x-bzip2",exec:"compressor"},{name:"ace",group:"compress",acp:"application/x-ace-compressed",exec:"compressor"},{name:"Z",group:"compress",acp:"application/x-compress",exec:"compressor"},{name:"lzh",group:"compress",acp:"application/x-lzh-compressed",exec:"compressor"},{name:"lz",group:"compress",acp:"application/x-lzip",exec:"compressor"},{name:"rar",group:"compress",acp:"application/x-rar-compressed",exec:"compressor"},{name:"tar",group:"compress",acp:"application/x-tar",exec:"compressor"},{name:"ar",group:"compress",acp:"application/x-unix-archive",exec:"compressor"},{name:"zip",group:"compress",acp:"application/zip",exec:"compressor"},{name:"gz",group:"compress",acp:"application/gzip",exec:"compressor"},{name:"avro",group:"",acp:"application/avro",exec:""},{name:"dcm",group:"",acp:"application/dicom",exec:""},{name:"eps",group:"",acp:"application/eps",exec:""},{name:"epub",group:"",acp:"application/epub+zip",exec:""},{name:"class",group:"",acp:"application/java-vm",exec:""},{name:"mxf",group:"",acp:"application/mxf",exec:""},{name:"ogx",group:"",acp:"application/ogg",exec:""},{name:"pdf",group:"docums",acp:"application/pdf",exec:"acrobat"},{name:"pgp",group:"",acp:"application/pgp-encrypted",exec:""},{name:"ps",group:"",acp:"application/postscript",exec:""},{name:"ai",group:"",acp:"application/postscript",exec:""},{name:"rtf",group:"docums",acp:"application/rtf",exec:"word"},{name:"icc",group:"",acp:"application/vnd.iccprofile",exec:""},{name:"asf",group:"",acp:"application/vnd.ms-asf",exec:"",msg:"asf的acp可能為application/vnd.ms-asf或audio/x-ms-asf或video/x-ms-asf"},{name:"cab",group:"",acp:"application/vnd.ms-cab-compressed",exec:""},{name:"eot",group:"",acp:"application/vnd.ms-fontobject",exec:""},{name:"chm",group:"",acp:"application/vnd.ms-htmlhelp",exec:""},{name:"pst",group:"",acp:"application/vnd.ms-outlook",exec:""},{name:"odp",group:"docums",acp:"application/vnd.oasis.opendocument.presentation",exec:"powerpoint"},{name:"ods",group:"docums",acp:"application/vnd.oasis.opendocument.spreadsheet",exec:"excel"},{name:"odt",group:"docums",acp:"application/vnd.oasis.opendocument.text",exec:"word"},{name:"ppt",group:"docums",acp:"application/vnd.ms-powerpoint",exec:"powerpoint"},{name:"pptx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.presentationml.presentation",exec:"powerpoint"},{name:"xls",group:"docums",acp:"application/vnd.ms-excel",exec:"excel"},{name:"xlsx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",exec:"excel"},{name:"doc",group:"docums",acp:"application/msword",exec:"word"},{name:"docx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",exec:"word"},{name:"skp",group:"",acp:"application/vnd.sketchup.skp",exec:""},{name:"pcap",group:"",acp:"application/vnd.tcpdump.pcap",exec:""},{name:"wasm",group:"",acp:"application/wasm",exec:""},{name:"arrow",group:"",acp:"application/x-apache-arrow",exec:""},{name:"dmg",group:"",acp:"application/x-apple-diskimage",exec:""},{name:"arj",group:"",acp:"application/x-arj",exec:""},{name:"asar",group:"",acp:"application/x-asar",exec:""},{name:"blend",group:"",acp:"application/x-blender",exec:"blender"},{name:"cfb",group:"",acp:"application/x-cfb",exec:""},{name:"cpio",group:"",acp:"application/x-cpio",exec:""},{name:"deb",group:"",acp:"application/x-deb",exec:""},{name:"elf",group:"",acp:"application/x-elf",exec:""},{name:"shp",group:"",acp:"application/x-esri-shape",exec:""},{name:"crx",group:"",acp:"application/x-google-chrome-extension",exec:""},{name:"indd",group:"",acp:"application/x-indesign",exec:""},{name:"macho",group:"",acp:"application/x-mach-binary",exec:""},{name:"mie",group:"",acp:"application/x-mie",exec:""},{name:"mobi",group:"",acp:"application/x-mobipocket-ebook",exec:""},{name:"exe",group:"",acp:"application/x-msdownload",exec:""},{name:"nes",group:"",acp:"application/x-nintendo-nes-rom",exec:""},{name:"parquet",group:"",acp:"application/x-parquet",exec:""},{name:"rpm",group:"",acp:"application/x-rpm",exec:""},{name:"swf",group:"",acp:"application/x-shockwave-flash",exec:""},{name:"sqlite",group:"",acp:"application/x-sqlite3",exec:""},{name:"xpi",group:"",acp:"application/x-xpinstall",exec:""},{name:"xz",group:"",acp:"application/x-xz",exec:""},{name:"alias",group:"",acp:"application/x.apple.alias",exec:""},{name:"fbx",group:"",acp:"application/x.autodesk.fbx",exec:""},{name:"lnk",group:"",acp:"application/x.ms.shortcut",exec:""},{name:"zst",group:"",acp:"application/zstd",exec:""},{name:"aac",group:"audio",acp:"audio/aac",exec:"audioplayer"},{name:"aif",group:"audio",acp:"audio/aiff",exec:"audioplayer"},{name:"amr",group:"audio",acp:"audio/amr",exec:"audioplayer"},{name:"ape",group:"audio",acp:"audio/ape",exec:"audioplayer"},{name:"mid",group:"audio",acp:"audio/midi",exec:"audioplayer"},{name:"m4b",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"f4a",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"f4b",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"mp3",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"mp2",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"mp1",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"oga",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"spx",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"ogg",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"opus",group:"audio",acp:"audio/opus",exec:"audioplayer"},{name:"qcp",group:"audio",acp:"audio/qcelp",exec:"audioplayer"},{name:"ac3",group:"audio",acp:"audio/vnd.dolby.dd-raw",exec:"audioplayer"},{name:"wav",group:"audio",acp:"audio/wav",exec:"audioplayer"},{name:"wv",group:"audio",acp:"audio/wavpack",exec:"audioplayer"},{name:"dsf",group:"audio",acp:"audio/x-dsf",exec:"audioplayer"},{name:"flac",group:"audio",acp:"audio/x-flac",exec:"audioplayer"},{name:"it",group:"audio",acp:"audio/x-it",exec:"audioplayer"},{name:"m4a",group:"audio",acp:"audio/x-m4a",exec:"audioplayer"},{name:"mpc",group:"audio",acp:"audio/x-musepack",exec:"audioplayer"},{name:"s3m",group:"audio",acp:"audio/x-s3m",exec:"audioplayer"},{name:"voc",group:"audio",acp:"audio/x-voc",exec:"audioplayer"},{name:"xm",group:"audio",acp:"audio/x-xm",exec:"audioplayer"},{name:"otf",group:"",acp:"font/otf",exec:""},{name:"ttf",group:"",acp:"font/ttf",exec:""},{name:"woff",group:"",acp:"font/woff",exec:""},{name:"woff2",group:"",acp:"font/woff2",exec:""},{name:"apng",group:"image",acp:"image/apng",exec:"imageviwer"},{name:"avif",group:"image",acp:"image/avif",exec:"imageviwer"},{name:"bmp",group:"image",acp:"image/bmp",exec:"imageviwer"},{name:"bpg",group:"image",acp:"image/bpg",exec:"imageviwer"},{name:"flif",group:"image",acp:"image/flif",exec:"imageviwer"},{name:"gif",group:"image",acp:"image/gif",exec:"imageviwer"},{name:"heic",group:"image",acp:"image/heif",exec:"imageviwer"},{name:"icns",group:"image",acp:"image/icns",exec:"imageviwer"},{name:"j2c",group:"image",acp:"image/j2c",exec:"imageviwer"},{name:"jls",group:"image",acp:"image/jls",exec:"imageviwer"},{name:"jp2",group:"image",acp:"image/jp2",exec:"imageviwer"},{name:"jpg",group:"image",acp:"image/jpeg",exec:"imageviwer"},{name:"jpm",group:"image",acp:"image/jpm",exec:"imageviwer"},{name:"jpx",group:"image",acp:"image/jpx",exec:"imageviwer"},{name:"jxl",group:"image",acp:"image/jxl",exec:"imageviwer"},{name:"ktx",group:"image",acp:"image/ktx",exec:"imageviwer"},{name:"mj2",group:"image",acp:"image/mj2",exec:"imageviwer"},{name:"png",group:"image",acp:"image/png",exec:"imageviwer"},{name:"tif",group:"image",acp:"image/tiff",exec:"imageviwer"},{name:"psd",group:"image",acp:"image/vnd.adobe.photoshop",exec:"imageviwer"},{name:"dwg",group:"image",acp:"image/vnd.dwg",exec:"imageviwer"},{name:"jxr",group:"image",acp:"image/vnd.ms-photo",exec:"imageviwer"},{name:"webp",group:"image",acp:"image/webp",exec:"imageviwer"},{name:"dng",group:"image",acp:"image/x-adobe-dng",exec:"imageviwer"},{name:"cr2",group:"image",acp:"image/x-canon-cr2",exec:"imageviwer"},{name:"cr3",group:"image",acp:"image/x-canon-cr3",exec:"imageviwer"},{name:"raf",group:"image",acp:"image/x-fujifilm-raf",exec:"imageviwer"},{name:"ico",group:"image",acp:"image/x-icon",exec:"imageviwer"},{name:"cur",group:"image",acp:"image/x-icon",exec:"imageviwer"},{name:"nef",group:"image",acp:"image/x-nikon-nef",exec:"imageviwer"},{name:"orf",group:"image",acp:"image/x-olympus-orf",exec:"imageviwer"},{name:"rw2",group:"image",acp:"image/x-panasonic-rw2",exec:"imageviwer"},{name:"arw",group:"image",acp:"image/x-sony-arw",exec:"imageviwer"},{name:"xcf",group:"image",acp:"image/x-xcf",exec:"imageviwer"},{name:"3mf",group:"",acp:"model/3mf",exec:""},{name:"glb",group:"",acp:"model/gltf-binary",exec:""},{name:"stl",group:"",acp:"model/stl",exec:""},{name:"vtp",group:"",acp:"model/vtp",exec:""},{name:"vtk",group:"",acp:"model/vtk",exec:""},{name:"vtu",group:"",acp:"model/vtu",exec:""},{name:"vti",group:"",acp:"model/vti",exec:""},{name:"vts",group:"",acp:"model/vts",exec:""},{name:"vtr",group:"",acp:"model/vtr",exec:""},{name:"ics",group:"",acp:"text/calendar",exec:""},{name:"vcf",group:"",acp:"text/vcard",exec:""},{name:"3gp",group:"video",acp:"video/3gpp",exec:"videoplayer"},{name:"3g2",group:"video",acp:"video/3gpp2",exec:"videoplayer"},{name:"m2p",group:"video",acp:"video/MP2P",exec:"videoplayer"},{name:"vob",group:"video",acp:"video/MP2P",exec:"videoplayer"},{name:"sub",group:"video",acp:"video/MP2P",exec:"videoplayer",msg:"與字幕檔衝突"},{name:"mts",group:"video",acp:"video/mp2t",exec:"videoplayer"},{name:"m4p",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"f4v",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"f4p",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"mp4",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"mpg",group:"video",acp:"video/mpeg",exec:"videoplayer",msg:"mpg可能為mpeg或video/MP1S或video/MP2S"},{name:"ogv",group:"video",acp:"video/ogg",exec:"videoplayer"},{name:"ogm",group:"video",acp:"video/ogg",exec:"videoplayer"},{name:"mov",group:"video",acp:"video/quicktime",exec:"videoplayer"},{name:"avi",group:"video",acp:"video/vnd.avi",exec:"videoplayer"},{name:"webm",group:"video",acp:"video/webm",exec:"videoplayer"},{name:"flv",group:"video",acp:"video/x-flv",exec:"videoplayer"},{name:"m4v",group:"video",acp:"video/x-m4v",exec:"videoplayer"},{name:"mkv",group:"video",acp:"video/x-matroska",exec:"videoplayer"}];function Ad(e=""){let t=null;return De(e)?(t=pd(hd,{name:e}),Ee(t)||(t=null)):t=hd,t}function md(e=""){if(""!==e&&"name"!==e&&"group"!==e&&"acp"!==e&&"exec"!==e)return[];let t=Ad();if(""===e)return t;let r={};return Er(t,function(t){let n=t[e];ke(r,n)||(r[n]=[]),r[n].push(t)}),r}function Id(e="*"){if("*"===e)return e;if(!xe(e)&&!Rr(e))return"*";"common"===e&&(e=["docums","compress","image","data"]);let t=md();function r(e){return Pr(xr(e,"acp"))}xe(e)&&(e=[e]);let n="";if(Rr(e)){let i=xr(e,function(e){return function(e){return r(pa(t,{group:e}))}(e)}),o=kr(i,xr(e,function(e){return r(pa(t,{name:e}))}));o=pa(o,fd),n=xo(o,",")}return n}function yd(e,t=1e3){(t=Mn(t))<=0&&(t=1e3);let r={},n=[];return Er(we(e,"files",[]),function(e,i){let o=e.size/1024/1024;o>t&&(r[i]=`file size[${o}]mb > ${t}mb`),n.push(e)}),{files:n,errs:r}}function vd(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],a=t(o);if(null!=a&&(void 0===s?a==a&&!q(a):r(a,s)))var s=a,c=o}return c}function bd(e,t){return e<t}function wd(e){return e&&e.length?vd(e,cr,bd):void 0}function Bd(){return!function(){try{return"IntersectionObserver"in window}catch(e){return!1}}()||!function(){try{return"IntersectionObserverEntry"in window}catch(e){return!1}}()||!(function(){try{return"intersectionRatio"in window.IntersectionObserverEntry.prototype}catch(e){return!1}}()||va(window.IntersectionObserverEntry))}function Ed(e,t,r={}){if(!br(e))return Promise.reject("invalid ele");let n=yn().markmap,{Transformer:i,Markmap:o,loadCSS:a,loadJS:s}=n,c=e=>{let t=new i,{root:r,features:n}=t.transform(e),{styles:o,scripts:a}=t.getUsedAssets(n);return{root:r,features:n,styles:o,scripts:a}},{root:l,styles:u,scripts:f}=c(t);u&&a(u),f&&s(f,{getMarkmap:()=>n}),e.innerHTML="";let d=o.create(e,null,l);return d.transMarkdown=c,d}const Cd=e=>void 0===e||"auto"===e||"instant"===e||"smooth"===e;function xd(e,t){this.scrollLeft=e,this.scrollTop=t}const Dd=(e,t,r="cannot convert to dictionary.")=>`Failed to execute '${e}' on '${t}': ${r}`,Fd=(e,t,r)=>Dd(e,t,`The provided value '${r}' is not a valid enum value of type ScrollBehavior.`),Qd=(e,t,r)=>{var n;const i=`__SEAMLESS.BACKUP$${t}`;return e[i]||!e[t]||(null===(n=e[t])||void 0===n?void 0:n.__isPolyfill)||(e[i]=e[t]),e[i]||r},Sd=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},kd=e=>"scrollBehavior"in window.document.documentElement.style&&!0!==(null==e?void 0:e.forcePolyfill),Nd=e=>{Object.defineProperty(e,"__isPolyfill",{value:!0})},qd=(e,t)=>{Nd(t),[HTMLElement.prototype,SVGElement.prototype,Element.prototype].forEach(r=>{Qd(r,e),r[e]=t})},Md=e=>e.ownerDocument.scrollingElement||e.ownerDocument.documentElement;const Hd=e=>.5*(1-Math.cos(Math.PI*e));function Ld(){var e;let t;return t=(null===(e=window.performance)||void 0===e?void 0:e.now)?()=>window.performance.now():()=>window.Date.now(),Ld=t,t()}const Ud=e=>{const t=(Ld()-e.timeStamp)/(e.duration||500);if(t>1)return e.method(e.targetX,e.targetY),void e.callback();const r=(e.timingFunc||Hd)(t),n=e.startX+(e.targetX-e.startX)*r,i=e.startY+(e.targetY-e.startY)*r;e.method(n,i),e.rafId=window.requestAnimationFrame(()=>{Ud(e)})},Rd=e=>isFinite(e)?Number(e):0,Od=(e,t,r)=>{var n,i;if(!(e=>{var t;return null!==(t=e.isConnected)&&void 0!==t?t:!(e.ownerDocument&&1&e.ownerDocument.compareDocumentPosition(e))})(e))return;const o=e.scrollLeft,a=e.scrollTop,s=Rd(null!==(n=t.left)&&void 0!==n?n:o),c=Rd(null!==(i=t.top)&&void 0!==i?i:a);if(s===o&&c===a)return;const l=Qd(HTMLElement.prototype,"scroll",xd),u=Qd(Object.getPrototypeOf(e),"scroll",l).bind(e);if("smooth"!==t.behavior)return void u(s,c);const f=()=>{window.removeEventListener("wheel",g),window.removeEventListener("touchmove",g)},d=Object.assign(Object.assign({},r),{timeStamp:Ld(),startX:o,startY:a,targetX:s,targetY:c,rafId:0,method:u,callback:()=>{f();const t=9===e.nodeType;e.dispatchEvent(function(e){if("function"==typeof Event)return new Event("scrollend",{bubbles:e,cancelable:!1});const t=document.createEvent("Event");return t.initEvent("scrollend",e,!1),t}(t))}}),g=()=>{window.cancelAnimationFrame(d.rafId),f()};window.addEventListener("wheel",g,{passive:!0,once:!0}),window.addEventListener("touchmove",g,{passive:!0,once:!0}),Ud(d)},Td=e=>(t,r,n)=>{const[i,o]=(a=t).window===a?[Md(t.document.documentElement),"Window"]:[t,"Element"];var a;const s=null!=r?r:{};if(!Sd(s))throw new TypeError(Dd(e,o));if(!Cd(s.behavior))throw new TypeError(Fd(e,o,s.behavior));"scrollBy"===e&&(s.left=Rd(s.left)+i.scrollLeft,s.top=Rd(s.top)+i.scrollTop),Od(i,s,n)},Yd=Td("scroll"),jd=Td("scrollTo"),Gd=Td("scrollBy"),Jd=Yd,zd=e=>{switch(e){case"horizontal-tb":case"lr":case"lr-tb":case"rl":case"rl-tb":return 0;case"vertical-rl":case"tb":case"tb-rl":return 1;case"vertical-lr":case"tb-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4}return 0},Vd=(e,t,r,n)=>{let i=0;switch(t||(i^=2),e){case 0:i=i>>1|(1&i)<<1,[r,n]=[n,r];break;case 1:case 3:i^=1;break;case 4:i^=2}return[i,r,n]},Pd=e=>!(1&~Vd(zd(e.writingMode),"rtl"!==e.direction,void 0,void 0)[0]),Xd=(e,t,r,n,i,o,a)=>0!==e?e:i<t&&o>r||i>t&&o<r?null:i<=t&&a<=n||o>=r&&a>=n?2:o>r&&a<n||i<t&&a>n?3:null,_d=e=>"visible"!==e&&"clip"!==e,Wd=(e,t)=>(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth)&&(_d(t.overflowY)||_d(t.overflowX)||e===Md(e)),Kd=e=>{const t=e.parentNode,r=e.parentElement;if(null===r&&null!==t){if(11===t.nodeType)return t.host;if(9===t.nodeType)return(e=>{var t;try{return(null===(t=e.ownerDocument.defaultView)||void 0===t?void 0:t.frameElement)||null}catch(e){return null}})(e)}return r},$d=(e,t,r)=>e<t?t:e>r?r:e,Zd=(e,t,r)=>{switch(e){case 1:return(t+r)/2;case 3:return r;case 2:case 0:return t}},eg=(e,t)=>{var r,n,i;const o=null===(r=e.ownerDocument.defaultView)||void 0===r?void 0:r.visualViewport,[a,s,c,l]=e===Md(e)?[0,0,null!==(n=null==o?void 0:o.width)&&void 0!==n?n:e.clientWidth,null!==(i=null==o?void 0:o.height)&&void 0!==i?i:e.clientHeight]:[t.left,t.top,e.clientWidth,e.clientHeight],u=a+e.clientLeft,f=s+e.clientTop;return[f,u+c,f+l,u]},tg=(e,t)=>{const r=[];let n=e.ownerDocument,i=n.defaultView;if(!i)return r;const o=window.getComputedStyle(e),a="rtl"!==o.direction,s=zd(o.writingMode||o.getPropertyValue("-webkit-writing-mode")||o.getPropertyValue("-ms-writing-mode")),[c,l]=((e,t,r)=>{const[n,i,o]=Vd(t,r,e.block||"start",e.inline||"nearest");return[i,o].map((e,t)=>{switch(e){case"center":return 1;case"nearest":return 0;default:return"start"===e==!(n>>t&1)?2:3}})})(t,s,a);let[u,f,d,g]=((e,t,r)=>{const{top:n,right:i,bottom:o,left:a}=t,s=(c=e.ownerDocument,["scroll-margin","scroll-snap-margin"].filter(e=>e in c.documentElement.style)[0]);var c;if(!s)return[n,i,o,a];const l=e=>{const t=r.getPropertyValue(`${s}-${e}`);return parseInt(t,10)||0};return[n-l("top"),i+l("right"),o+l("bottom"),a-l("left")]})(e,e.getBoundingClientRect(),o);for(let o=Kd(e);null!==o;o=Kd(o)){if(n!==o.ownerDocument){if(n=o.ownerDocument,i=n.defaultView,!i)break;const{left:e,top:t}=o.getBoundingClientRect();u+=t,f+=e,d+=t,g+=e}const e=i.getComputedStyle(o);if("fixed"===e.position)break;if(!Wd(o,e))continue;const a=o.getBoundingClientRect(),[s,p,h,A]=eg(o,a),m=Xd(c,A,p,o.clientWidth,g,f,f-g),I=Xd(l,s,h,o.clientHeight,u,d,d-u),y=null===m?0:Zd(m,g,f)-Zd(m,A,p),v=null===I?0:Zd(I,u,d)-Zd(I,s,h),b=Pd(e)?$d(y,-o.scrollWidth+o.clientWidth-o.scrollLeft,-o.scrollLeft):$d(y,-o.scrollLeft,o.scrollWidth-o.clientWidth-o.scrollLeft),w=$d(v,-o.scrollTop,o.scrollHeight-o.clientHeight-o.scrollTop);r.push([o,{left:o.scrollLeft+b,top:o.scrollTop+w,behavior:t.behavior}]),u=Math.max(u-w,s),f=Math.min(f-b,p),d=Math.min(d-w,h),g=Math.max(g-b,A)}return r},rg=(e,t,r)=>{const n=t||{};if(!Cd(n.behavior))throw new TypeError(Fd("scrollIntoView","Element",n.behavior));tg(e,n).forEach(([e,t])=>{Jd(e,t,r)})},ng=(e,t)=>r=>{if(kd(r))return;const n={scroll:Yd,scrollTo:jd,scrollBy:Gd}[e];t(e,function(){const e=arguments;if(1===arguments.length)return void n(this,e[0],r);n(this,{left:e[0],top:e[1]})})},ig=ng("scroll",qd),og=ng("scrollTo",qd),ag=ng("scrollBy",qd),sg=(e,t)=>{Nd(t),Qd(window,e),window[e]=t},cg=ng("scroll",sg),lg=ng("scrollTo",sg),ug=ng("scrollBy",sg);function fg(e){rg(this,{block:null==e||e?"start":"end",inline:"nearest"})}const dg=e=>{if(kd(e))return;const t=Qd(window.HTMLElement.prototype,"scrollIntoView",fg);qd("scrollIntoView",function(){const r=arguments,n=r[0];1===r.length&&Sd(n)?rg(this,n,e):t.apply(this,r)})},gg=e=>{kd(e)||(ig(e),og(e),ag(e),dg(e),cg(e),lg(e),ug(e))};function pg(e,t,r){(void 0!==r&&!re(e[t],r)||void 0===r&&!(t in e))&&di(e,t,r)}function hg(e){return N(e)&&ft(e)}function Ag(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function mg(e,t,r,n,i,o,a){var s=Ag(e,r),c=Ag(t,r),l=a.get(c);if(l)pg(e,r,l);else{var u,f=o?o(s,c,r+"",e,t,a):void 0,d=void 0===f;if(d){var g=v(c),p=!g&&ze(c),h=!g&&!p&&rt(c);f=c,g||p||h?v(s)?f=s:hg(s)?f=Sr(s):p?(d=!1,f=Bi(c,!0)):h?(d=!1,f=ki(c,!0)):f=[]:vr(c)||Ye(c)?(f=s,Ye(s)?f=hi(u=s,Ii(u)):U(s)&&!R(s)||(f=Hi(c))):d=!1}d&&(a.set(c,f),i(f,c,n,o,a),a.delete(c)),pg(e,r,f)}}function Ig(e,t,r,n,i){e!==t&&Me(t,function(o,a){if(i||(i=new At),U(o))mg(e,t,a,r,Ig,n,i);else{var s=n?n(Ag(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),pg(e,a,s)}},Ii)}var yg,vg=(yg=function(e,t,r){Ig(e,t,r)},Ra(function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=yg.length>3&&"function"==typeof i?(n--,i):void 0,o&&dr(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var a=t[r];a&&yg(e,a,r,i)}return e}));async function bg(e,t=null,r={}){let n=!0,i=null,o=ns();Ee(r)||(r={});let a=we(r,"disTouchMoveToHide",null);if(Bo(a)||(a=4),a=Zi(a),!br(e))return o.reject("eleImg is not a HTMLElement"),o;if(i=e,null!==t){if(!br(t))return o.reject("eleGroup is not a HTMLElement"),o;n=!1,i=t}if(!n){let e=dn(t.querySelectorAll("img"));if(0===e)return o.reject("eleGroup does not contain any img"),o;1===e&&(n=!0)}let s={button:!1,navbar:!1,title:!1,toolbar:{zoomIn:4,zoomOut:4,oneToOne:4,reset:4,prev:0,play:0,next:0,rotateLeft:4,rotateRight:4,flipHorizontal:4,flipVertical:4},tooltip:!1,movable:!0,zoomable:!0,rotatable:!0,scalable:!0,transition:!0,fullscreen:!1,keyboard:!0};n||(s=function(){let e={button:!1,navbar:!1,title:!1,toolbar:{zoomIn:4,zoomOut:4,oneToOne:4,reset:4,prev:0,play:0,next:0,rotateLeft:4,rotateRight:4,flipHorizontal:4,flipVertical:4},tooltip:!1,movable:!0,zoomable:!0,rotatable:!0,scalable:!0,transition:!0,fullscreen:!1,keyboard:!0};return e.navbar=!0,e.toolbar.prev=4,e.toolbar.next=4,e}()),s=vg(s,zi(r)),s.shown=function(){(async()=>{let e=null;await vs(()=>(e=l.viewer,br(e)));let t=!1,r=0,n=0,i=0;e.addEventListener("touchstart",e=>{let i=e.touches[0];r=i.clientX,n=i.clientY,((e,t)=>{let r=document.elementsFromPoint(e,t).find(e=>"IMG"===e.tagName);if(!br(r))return!0;let n=r?.classList?.contains("viewer-move");return!n})(r,n)&&(t=!0)},{passive:!1}),e.addEventListener("touchmove",e=>{if(!t)return;let o=e.touches[0],a=o.clientX,s=o.clientY,c=a-r,l=s-n,u=Math.sqrt(c*c+l*l);i+=u,r=o.clientX,n=o.clientY},{passive:!1}),e.addEventListener("touchend",e=>{t&&(i<a&&(e.preventDefault(),e.stopPropagation(),l.hide(!0)),t=!1,i=0)},{passive:!1}),e.addEventListener("touchcancel",e=>{t=!1,i=0})})().catch(e=>{console.log(e)})};let c=!1;s.hide=function(){c||(c=!0,l.hide(!0))},s.hidden=function(){l.destroy(),o.resolve("close")};let l=new(0,yn().Viewer)(i,s);return l.show(),o}function wg(e,t){let r=new MouseEvent(t,{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(r)}function Bg(e={}){let t=we(e,"kind","*"),r=we(e,"multiple");pn(r)||(r=!1);let n=we(e,"entireHierarchy");pn(n)||(n=!1),n&&!r&&(r=!0);let i=we(e,"sizeMbLimit");Se(i)||(i=1e3),i=Mn(i);let o=ns(),a="drf"+Hu(),s="GrpDomReadFile";Vf(`[name=${s}]`);let c=Id(t),l=`<div name="${s}" style="position:relative; width:0px; height:0px; overflow:hidden;"><input id="${a}" type="file" accept="${c}" ${r?"multiple":""} ${n?"webkitdirectory":""} style="opacity:0; position:absolute; top:-10000px; left:-10000px;"></div>`;zu(document.querySelector("body"),l);let u=ud("#"+a),f=!1;function d(e){f=!0;let t=yd(this,i);o.resolve(t),u.removeEventListener("change",d,!0),n||window.removeEventListener("focus",g),Vf(`[name=${s}]`)}function g(e){setTimeout(()=>{f||d()},300)}return u.addEventListener("change",d,!0),n||window.addEventListener("focus",g),wg(u,"click"),o}function Eg(e){if(!De(e))return!1;let t="YYYY-MM-DDTHH:mm:ss";return e===r(e,t).format(t)}In()&&function(){try{return new MouseEvent("MouseEventPolyfillTest"),!1}catch(e){}let e=function(e,t){t=t||{bubbles:!1,cancelable:!1};let r=document.createEvent("MouseEvent");return r.initMouseEvent(e,t.bubbles,t.cancelable,window,0,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null),r};e.prototype=Event.prototype,window.MouseEvent=e}();var Cg="top",xg="bottom",Dg="right",Fg="left",Qg="auto",Sg=[Cg,xg,Dg,Fg],kg="start",Ng="end",qg="viewport",Mg="popper",Hg=Sg.reduce(function(e,t){return e.concat([t+"-"+kg,t+"-"+Ng])},[]),Lg=[].concat(Sg,[Qg]).reduce(function(e,t){return e.concat([t,t+"-"+kg,t+"-"+Ng])},[]),Ug=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Rg(e){return e?(e.nodeName||"").toLowerCase():null}function Og(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Tg(e){return e instanceof Og(e).Element||e instanceof Element}function Yg(e){return e instanceof Og(e).HTMLElement||e instanceof HTMLElement}function jg(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Og(e).ShadowRoot||e instanceof ShadowRoot)}var Gg={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},i=t.elements[e];Yg(i)&&Rg(i)&&(Object.assign(i.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});Yg(n)&&Rg(n)&&(Object.assign(n.style,o),Object.keys(i).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};function Jg(e){return e.split("-")[0]}var zg=Math.max,Vg=Math.min,Pg=Math.round;function Xg(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function _g(){return!/^((?!chrome|android).)*safari/i.test(Xg())}function Wg(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Yg(e)&&(i=e.offsetWidth>0&&Pg(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Pg(n.height)/e.offsetHeight||1);var a=(Tg(e)?Og(e):window).visualViewport,s=!_g()&&r,c=(n.left+(s&&a?a.offsetLeft:0))/i,l=(n.top+(s&&a?a.offsetTop:0))/o,u=n.width/i,f=n.height/o;return{width:u,height:f,top:l,right:c+u,bottom:l+f,left:c,x:c,y:l}}function Kg(e){var t=Wg(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function $g(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&jg(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Zg(e){return Og(e).getComputedStyle(e)}function ep(e){return["table","td","th"].indexOf(Rg(e))>=0}function tp(e){return((Tg(e)?e.ownerDocument:e.document)||window.document).documentElement}function rp(e){return"html"===Rg(e)?e:e.assignedSlot||e.parentNode||(jg(e)?e.host:null)||tp(e)}function np(e){return Yg(e)&&"fixed"!==Zg(e).position?e.offsetParent:null}function ip(e){for(var t=Og(e),r=np(e);r&&ep(r)&&"static"===Zg(r).position;)r=np(r);return r&&("html"===Rg(r)||"body"===Rg(r)&&"static"===Zg(r).position)?t:r||function(e){var t=/firefox/i.test(Xg());if(/Trident/i.test(Xg())&&Yg(e)&&"fixed"===Zg(e).position)return null;var r=rp(e);for(jg(r)&&(r=r.host);Yg(r)&&["html","body"].indexOf(Rg(r))<0;){var n=Zg(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}function op(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ap(e,t,r){return zg(e,Vg(t,r))}function sp(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function cp(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}var lp={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=Jg(r.placement),c=op(s),l=[Fg,Dg].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(e,t){return sp("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:cp(e,Sg))}(i.padding,r),f=Kg(o),d="y"===c?Cg:Fg,g="y"===c?xg:Dg,p=r.rects.reference[l]+r.rects.reference[c]-a[c]-r.rects.popper[l],h=a[c]-r.rects.reference[c],A=ip(o),m=A?"y"===c?A.clientHeight||0:A.clientWidth||0:0,I=p/2-h/2,y=u[d],v=m-f[l]-u[g],b=m/2-f[l]/2+I,w=ap(y,b,v),B=c;r.modifiersData[n]=((t={})[B]=w,t.centerOffset=w-b,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&$g(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function up(e){return e.split("-")[1]}var fp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function dp(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=a.x,g=void 0===d?0:d,p=a.y,h=void 0===p?0:p,A="function"==typeof u?u({x:g,y:h}):{x:g,y:h};g=A.x,h=A.y;var m=a.hasOwnProperty("x"),I=a.hasOwnProperty("y"),y=Fg,v=Cg,b=window;if(l){var w=ip(r),B="clientHeight",E="clientWidth";if(w===Og(r)&&"static"!==Zg(w=tp(r)).position&&"absolute"===s&&(B="scrollHeight",E="scrollWidth"),i===Cg||(i===Fg||i===Dg)&&o===Ng)v=xg,h-=(f&&w===b&&b.visualViewport?b.visualViewport.height:w[B])-n.height,h*=c?1:-1;if(i===Fg||(i===Cg||i===xg)&&o===Ng)y=Dg,g-=(f&&w===b&&b.visualViewport?b.visualViewport.width:w[E])-n.width,g*=c?1:-1}var C,x=Object.assign({position:s},l&&fp),D=!0===u?function(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:Pg(r*i)/i||0,y:Pg(n*i)/i||0}}({x:g,y:h},Og(r)):{x:g,y:h};return g=D.x,h=D.y,c?Object.assign({},x,((C={})[v]=I?"0":"",C[y]=m?"0":"",C.transform=(b.devicePixelRatio||1)<=1?"translate("+g+"px, "+h+"px)":"translate3d("+g+"px, "+h+"px, 0)",C)):Object.assign({},x,((t={})[v]=I?h+"px":"",t[y]=m?g+"px":"",t.transform="",t))}var gp={passive:!0};var pp={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=void 0===i||i,a=n.resize,s=void 0===a||a,c=Og(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach(function(e){e.addEventListener("scroll",r.update,gp)}),s&&c.addEventListener("resize",r.update,gp),function(){o&&l.forEach(function(e){e.removeEventListener("scroll",r.update,gp)}),s&&c.removeEventListener("resize",r.update,gp)}},data:{}},hp={left:"right",right:"left",bottom:"top",top:"bottom"};function Ap(e){return e.replace(/left|right|bottom|top/g,function(e){return hp[e]})}var mp={start:"end",end:"start"};function Ip(e){return e.replace(/start|end/g,function(e){return mp[e]})}function yp(e){var t=Og(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vp(e){return Wg(tp(e)).left+yp(e).scrollLeft}function bp(e){var t=Zg(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function wp(e){return["html","body","#document"].indexOf(Rg(e))>=0?e.ownerDocument.body:Yg(e)&&bp(e)?e:wp(rp(e))}function Bp(e,t){var r;void 0===t&&(t=[]);var n=wp(e),i=n===(null==(r=e.ownerDocument)?void 0:r.body),o=Og(n),a=i?[o].concat(o.visualViewport||[],bp(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(Bp(rp(a)))}function Ep(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Cp(e,t,r){return t===qg?Ep(function(e,t){var r=Og(e),n=tp(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var l=_g();(l||!l&&"fixed"===t)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+vp(e),y:c}}(e,r)):Tg(t)?function(e,t){var r=Wg(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):Ep(function(e){var t,r=tp(e),n=yp(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=zg(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=zg(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+vp(e),c=-n.scrollTop;return"rtl"===Zg(i||r).direction&&(s+=zg(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}(tp(e)))}function xp(e,t,r,n){var i="clippingParents"===t?function(e){var t=Bp(rp(e)),r=["absolute","fixed"].indexOf(Zg(e).position)>=0&&Yg(e)?ip(e):e;return Tg(r)?t.filter(function(e){return Tg(e)&&$g(e,r)&&"body"!==Rg(e)}):[]}(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(t,r){var i=Cp(e,r,n);return t.top=zg(i.top,t.top),t.right=Vg(i.right,t.right),t.bottom=Vg(i.bottom,t.bottom),t.left=zg(i.left,t.left),t},Cp(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Dp(e){var t,r=e.reference,n=e.element,i=e.placement,o=i?Jg(i):null,a=i?up(i):null,s=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2;switch(o){case Cg:t={x:s,y:r.y-n.height};break;case xg:t={x:s,y:r.y+r.height};break;case Dg:t={x:r.x+r.width,y:c};break;case Fg:t={x:r.x-n.width,y:c};break;default:t={x:r.x,y:r.y}}var l=o?op(o):null;if(null!=l){var u="y"===l?"height":"width";switch(a){case kg:t[l]=t[l]-(r[u]/2-n[u]/2);break;case Ng:t[l]=t[l]+(r[u]/2-n[u]/2)}}return t}function Fp(e,t){void 0===t&&(t={});var r=t,n=r.placement,i=void 0===n?e.placement:n,o=r.strategy,a=void 0===o?e.strategy:o,s=r.boundary,c=void 0===s?"clippingParents":s,l=r.rootBoundary,u=void 0===l?qg:l,f=r.elementContext,d=void 0===f?Mg:f,g=r.altBoundary,p=void 0!==g&&g,h=r.padding,A=void 0===h?0:h,m=sp("number"!=typeof A?A:cp(A,Sg)),I=d===Mg?"reference":Mg,y=e.rects.popper,v=e.elements[p?I:d],b=xp(Tg(v)?v:v.contextElement||tp(e.elements.popper),c,u,a),w=Wg(e.elements.reference),B=Dp({reference:w,element:y,strategy:"absolute",placement:i}),E=Ep(Object.assign({},y,B)),C=d===Mg?E:w,x={top:b.top-C.top+m.top,bottom:C.bottom-b.bottom+m.bottom,left:b.left-C.left+m.left,right:C.right-b.right+m.right},D=e.modifiersData.offset;if(d===Mg&&D){var F=D[i];Object.keys(x).forEach(function(e){var t=[Dg,xg].indexOf(e)>=0?1:-1,r=[Cg,xg].indexOf(e)>=0?"y":"x";x[e]+=F[r]*t})}return x}function Qp(e,t){void 0===t&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,l=void 0===c?Lg:c,u=up(n),f=u?s?Hg:Hg.filter(function(e){return up(e)===u}):Sg,d=f.filter(function(e){return l.indexOf(e)>=0});0===d.length&&(d=f);var g=d.reduce(function(t,r){return t[r]=Fp(e,{placement:r,boundary:i,rootBoundary:o,padding:a})[Jg(r)],t},{});return Object.keys(g).sort(function(e,t){return g[e]-g[t]})}var Sp={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=void 0===i||i,a=r.altAxis,s=void 0===a||a,c=r.fallbackPlacements,l=r.padding,u=r.boundary,f=r.rootBoundary,d=r.altBoundary,g=r.flipVariations,p=void 0===g||g,h=r.allowedAutoPlacements,A=t.options.placement,m=Jg(A),I=c||(m===A||!p?[Ap(A)]:function(e){if(Jg(e)===Qg)return[];var t=Ap(e);return[Ip(e),t,Ip(t)]}(A)),y=[A].concat(I).reduce(function(e,r){return e.concat(Jg(r)===Qg?Qp(t,{placement:r,boundary:u,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:h}):r)},[]),v=t.rects.reference,b=t.rects.popper,w=new Map,B=!0,E=y[0],C=0;C<y.length;C++){var x=y[C],D=Jg(x),F=up(x)===kg,Q=[Cg,xg].indexOf(D)>=0,S=Q?"width":"height",k=Fp(t,{placement:x,boundary:u,rootBoundary:f,altBoundary:d,padding:l}),N=Q?F?Dg:Fg:F?xg:Cg;v[S]>b[S]&&(N=Ap(N));var q=Ap(N),M=[];if(o&&M.push(k[D]<=0),s&&M.push(k[N]<=0,k[q]<=0),M.every(function(e){return e})){E=x,B=!1;break}w.set(x,M)}if(B)for(var H=function(e){var t=y.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},L=p?3:1;L>0;L--){if("break"===H(L))break}t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function kp(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Np(e){return[Cg,Dg,xg,Fg].some(function(t){return e[t]>=0})}var qp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=void 0===i?[0,0]:i,a=Lg.reduce(function(e,r){return e[r]=function(e,t,r){var n=Jg(e),i=[Fg,Cg].indexOf(n)>=0?-1:1,o="function"==typeof r?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Fg,Dg].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,t.rects,o),e},{}),s=a[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[n]=a}};var Mp={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=void 0===i||i,a=r.altAxis,s=void 0!==a&&a,c=r.boundary,l=r.rootBoundary,u=r.altBoundary,f=r.padding,d=r.tether,g=void 0===d||d,p=r.tetherOffset,h=void 0===p?0:p,A=Fp(t,{boundary:c,rootBoundary:l,padding:f,altBoundary:u}),m=Jg(t.placement),I=up(t.placement),y=!I,v=op(m),b="x"===v?"y":"x",w=t.modifiersData.popperOffsets,B=t.rects.reference,E=t.rects.popper,C="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,x="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(w){if(o){var Q,S="y"===v?Cg:Fg,k="y"===v?xg:Dg,N="y"===v?"height":"width",q=w[v],M=q+A[S],H=q-A[k],L=g?-E[N]/2:0,U=I===kg?B[N]:E[N],R=I===kg?-E[N]:-B[N],O=t.elements.arrow,T=g&&O?Kg(O):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=Y[S],G=Y[k],J=ap(0,B[N],T[N]),z=y?B[N]/2-L-J-j-x.mainAxis:U-J-j-x.mainAxis,V=y?-B[N]/2+L+J+G+x.mainAxis:R+J+G+x.mainAxis,P=t.elements.arrow&&ip(t.elements.arrow),X=P?"y"===v?P.clientTop||0:P.clientLeft||0:0,_=null!=(Q=null==D?void 0:D[v])?Q:0,W=q+V-_,K=ap(g?Vg(M,q+z-_-X):M,q,g?zg(H,W):H);w[v]=K,F[v]=K-q}if(s){var $,Z="x"===v?Cg:Fg,ee="x"===v?xg:Dg,te=w[b],re="y"===b?"height":"width",ne=te+A[Z],ie=te-A[ee],oe=-1!==[Cg,Fg].indexOf(m),ae=null!=($=null==D?void 0:D[b])?$:0,se=oe?ne:te-B[re]-E[re]-ae+x.altAxis,ce=oe?te+B[re]+E[re]-ae-x.altAxis:ie,le=g&&oe?function(e,t,r){var n=ap(e,t,r);return n>r?r:n}(se,te,ce):ap(g?se:ne,te,g?ce:ie);w[b]=le,F[b]=le-te}t.modifiersData[n]=F}},requiresIfExists:["offset"]};function Hp(e,t,r){void 0===r&&(r=!1);var n,i,o=Yg(t),a=Yg(t)&&function(e){var t=e.getBoundingClientRect(),r=Pg(t.width)/e.offsetWidth||1,n=Pg(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),s=tp(t),c=Wg(e,a,r),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!r)&&(("body"!==Rg(t)||bp(s))&&(l=(n=t)!==Og(n)&&Yg(n)?{scrollLeft:(i=n).scrollLeft,scrollTop:i.scrollTop}:yp(n)),Yg(t)?((u=Wg(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=vp(s))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function Lp(e){var t=new Map,r=new Set,n=[];function i(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!r.has(e)){var n=t.get(e);n&&i(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||i(e)}),n}var Up={placement:"bottom",modifiers:[],strategy:"absolute"};function Rp(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Op(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,i=t.defaultOptions,o=void 0===i?Up:i;return function(e,t,r){void 0===r&&(r=o);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Up,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:s,setOptions:function(r){var i="function"==typeof r?r(s.options):r;f(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:Tg(e)?Bp(e):e.contextElement?Bp(e.contextElement):[],popper:Bp(t)};var a,l,d=function(e){var t=Lp(e);return Ug.reduce(function(e,r){return e.concat(t.filter(function(e){return e.phase===r}))},[])}((a=[].concat(n,s.options.modifiers),l=a.reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{}),Object.keys(l).map(function(e){return l[e]})));return s.orderedModifiers=d.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,i=e.effect;if("function"==typeof i){var o=i({state:s,name:t,instance:u,options:n}),a=function(){};c.push(o||a)}}),u.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,r=e.popper;if(Rp(t,r)){s.rects={reference:Hp(t,ip(r),"fixed"===s.options.strategy),popper:Kg(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var i=s.orderedModifiers[n],o=i.fn,a=i.options,c=void 0===a?{}:a,f=i.name;"function"==typeof o&&(s=o({state:s,options:c,name:f,instance:u})||s)}else s.reset=!1,n=-1}}},update:(i=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(i())})})),a}),destroy:function(){f(),l=!0}};if(!Rp(e,t))return u;function f(){c.forEach(function(e){return e()}),c=[]}return u.setOptions(r).then(function(e){!l&&r.onFirstUpdate&&r.onFirstUpdate(e)}),u}}var Tp=Op({defaultModifiers:[pp,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Dp({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=void 0===n||n,o=r.adaptive,a=void 0===o||o,s=r.roundOffsets,c=void 0===s||s,l={placement:Jg(t.placement),variation:up(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,dp(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,dp(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Gg,qp,Sp,Mp,lp,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Fp(t,{elementContext:"reference"}),s=Fp(t,{altBoundary:!0}),c=kp(a,n),l=kp(s,i,o),u=Np(c),f=Np(l);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}}]}),Yp="tippy-content",jp="tippy-arrow",Gp="tippy-svg-arrow",Jp={passive:!0,capture:!0},zp=function(){return document.body};function Vp(e,t,r){if(Array.isArray(e)){var n=e[t];return null==n?Array.isArray(r)?r[t]:r:n}return e}function Pp(e,t){var r={}.toString.call(e);return 0===r.indexOf("[object")&&r.indexOf(t+"]")>-1}function Xp(e,t){return"function"==typeof e?e.apply(void 0,t):e}function _p(e,t){return 0===t?e:function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)};var r}function Wp(e){return[].concat(e)}function Kp(e,t){-1===e.indexOf(t)&&e.push(t)}function $p(e){return[].slice.call(e)}function Zp(e){return Object.keys(e).reduce(function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t},{})}function eh(){return document.createElement("div")}function th(e){return["Element","Fragment"].some(function(t){return Pp(e,t)})}function rh(e){return th(e)?[e]:function(e){return Pp(e,"NodeList")}(e)?$p(e):Array.isArray(e)?e:$p(document.querySelectorAll(e))}function nh(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function ih(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function oh(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,r)})}function ah(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=null==r.getRootNode||null==(n=r.getRootNode())?void 0:n.host}return!1}var sh={isTouch:!1},ch=0;function lh(){sh.isTouch||(sh.isTouch=!0,window.performance&&document.addEventListener("mousemove",uh))}function uh(){var e=performance.now();e-ch<20&&(sh.isTouch=!1,document.removeEventListener("mousemove",uh)),ch=e}function fh(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var r=t._tippy;t.blur&&!r.state.isVisible&&t.blur()}}var dh,gh=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function ph(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function hh(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function Ah(e){return hh("\n %ctippy.js\n\n %c"+hh(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function mh(e){return[Ah(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function Ih(e,t){var r;e&&!dh.has(t)&&(dh.add(t),(r=console).warn.apply(r,mh(t)))}function yh(e,t){var r;e&&!dh.has(t)&&(dh.add(t),(r=console).error.apply(r,mh(t)))}dh=new Set;var vh={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},bh=Object.assign({appendTo:zp,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},vh,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),wh=Object.keys(bh);function Bh(e){var t=(e.plugins||[]).reduce(function(t,r){var n,i=r.name,o=r.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(n=bh[i])?n:o);return t},{});return Object.assign({},e,t)}function Eh(e,t){var r=Object.assign({},t,{content:Xp(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Bh(Object.assign({},bh,{plugins:t}))):wh).reduce(function(t,r){var n=(e.getAttribute("data-tippy-"+r)||"").trim();if(!n)return t;if("content"===r)t[r]=n;else try{t[r]=JSON.parse(n)}catch(e){t[r]=n}return t},{})}(e,t.plugins));return r.aria=Object.assign({},bh.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?t.interactive:r.aria.expanded,content:"auto"===r.aria.content?t.interactive?null:"describedby":r.aria.content},r}function Ch(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach(function(e){var r=function(e,t){var r=Object.assign({},e);return t.forEach(function(e){delete r[e]}),r}(bh,Object.keys(vh)),n=!function(e,t){return{}.hasOwnProperty.call(e,t)}(r,e);n&&(n=0===t.filter(function(t){return t.name===e}).length),Ih(n,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}function xh(e,t){e.innerHTML=t}function Dh(e){var t=eh();return!0===e?t.className=jp:(t.className=Gp,th(e)?t.appendChild(e):xh(t,e)),t}function Fh(e,t){th(t.content)?(xh(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?xh(e,t.content):e.textContent=t.content)}function Qh(e){var t=e.firstElementChild,r=$p(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(Yp)}),arrow:r.find(function(e){return e.classList.contains(jp)||e.classList.contains(Gp)}),backdrop:r.find(function(e){return e.classList.contains("tippy-backdrop")})}}function Sh(e){var t=eh(),r=eh();r.className="tippy-box",r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=eh();function i(r,n){var i=Qh(t),o=i.box,a=i.content,s=i.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),r.content===n.content&&r.allowHTML===n.allowHTML||Fh(a,e.props),n.arrow?s?r.arrow!==n.arrow&&(o.removeChild(s),o.appendChild(Dh(n.arrow))):o.appendChild(Dh(n.arrow)):s&&o.removeChild(s)}return n.className=Yp,n.setAttribute("data-state","hidden"),Fh(n,e.props),t.appendChild(r),r.appendChild(n),i(e.props,e.props),{popper:t,onUpdate:i}}Sh.$$tippy=!0;var kh=1,Nh=[],qh=[];function Mh(e,t){var r,n,i,o,a,s,c,l,u=Eh(e,Object.assign({},bh,Bh(Zp(t)))),f=!1,d=!1,g=!1,p=!1,h=[],A=_p(P,u.interactiveDebounce),m=kh++,I=(l=u.plugins).filter(function(e,t){return l.indexOf(e)===t}),y={id:m,reference:e,popper:eh(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:I,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(n),cancelAnimationFrame(i)},setProps:function(t){if(Ih(y.state.isDestroyed,ph("setProps")),y.state.isDestroyed)return;q("onBeforeUpdate",[y,t]),z();var r=y.props,n=Eh(e,Object.assign({},r,Zp(t),{ignoreAttributes:!0}));y.props=n,J(),r.interactiveDebounce!==n.interactiveDebounce&&(L(),A=_p(P,n.interactiveDebounce));r.triggerTarget&&!n.triggerTarget?Wp(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded");H(),N(),w&&w(r,n);y.popperInstance&&(K(),Z().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));q("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){Ih(y.state.isDestroyed,ph("show"));var e=y.state.isVisible,t=y.state.isDestroyed,r=!y.state.isEnabled,n=sh.isTouch&&!y.props.touch,i=Vp(y.props.duration,0,bh.duration);if(e||t||r||n)return;if(F().hasAttribute("disabled"))return;if(q("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,D()&&(b.style.visibility="visible");N(),T(),y.state.isMounted||(b.style.transition="none");if(D()){var o=S();nh([o.box,o.content],0)}s=function(){var e;if(y.state.isVisible&&!p){if(p=!0,b.offsetHeight,b.style.transition=y.props.moveTransition,D()&&y.props.animation){var t=S(),r=t.box,n=t.content;nh([r,n],i),ih([r,n],"visible")}M(),H(),Kp(qh,y),null==(e=y.popperInstance)||e.forceUpdate(),q("onMount",[y]),y.props.animation&&D()&&function(e,t){j(e,t)}(i,function(){y.state.isShown=!0,q("onShown",[y])})}},function(){var e,t=y.props.appendTo,r=F();e=y.props.interactive&&t===zp||"parent"===t?r.parentNode:Xp(t,[r]);e.contains(b)||e.appendChild(b);y.state.isMounted=!0,K(),Ih(y.props.interactive&&t===bh.appendTo&&r.nextElementSibling!==b,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){Ih(y.state.isDestroyed,ph("hide"));var e=!y.state.isVisible,t=y.state.isDestroyed,r=!y.state.isEnabled,n=Vp(y.props.duration,1,bh.duration);if(e||t||r)return;if(q("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,p=!1,f=!1,D()&&(b.style.visibility="hidden");if(L(),Y(),N(!0),D()){var i=S(),o=i.box,a=i.content;y.props.animation&&(nh([o,a],n),ih([o,a],"hidden"))}M(),H(),y.props.animation?D()&&function(e,t){j(e,function(){!y.state.isVisible&&b.parentNode&&b.parentNode.contains(b)&&t()})}(n,y.unmount):y.unmount()},hideWithInteractivity:function(e){Ih(y.state.isDestroyed,ph("hideWithInteractivity")),Q().addEventListener("mousemove",A),Kp(Nh,A),A(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){Ih(y.state.isDestroyed,ph("unmount")),y.state.isVisible&&y.hide();if(!y.state.isMounted)return;$(),Z().forEach(function(e){e._tippy.unmount()}),b.parentNode&&b.parentNode.removeChild(b);qh=qh.filter(function(e){return e!==y}),y.state.isMounted=!1,q("onHidden",[y])},destroy:function(){if(Ih(y.state.isDestroyed,ph("destroy")),y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),z(),delete e._tippy,y.state.isDestroyed=!0,q("onDestroy",[y])}};if(!u.render)return yh(!0,"render() function has not been supplied."),y;var v=u.render(y),b=v.popper,w=v.onUpdate;b.setAttribute("data-tippy-root",""),b.id="tippy-"+y.id,y.popper=b,e._tippy=y,b._tippy=y;var B=I.map(function(e){return e.fn(y)}),E=e.hasAttribute("aria-expanded");return J(),H(),N(),q("onCreate",[y]),u.showOnCreate&&ee(),b.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),b.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&Q().addEventListener("mousemove",A)}),y;function C(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function x(){return"hold"===C()[0]}function D(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function F(){return c||e}function Q(){var e,t,r=F().parentNode;return r?null!=(t=Wp(r)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function S(){return Qh(b)}function k(e){return y.state.isMounted&&!y.state.isVisible||sh.isTouch||o&&"focus"===o.type?0:Vp(y.props.delay,e?0:1,bh.delay)}function N(e){void 0===e&&(e=!1),b.style.pointerEvents=y.props.interactive&&!e?"":"none",b.style.zIndex=""+y.props.zIndex}function q(e,t,r){var n;(void 0===r&&(r=!0),B.forEach(function(r){r[e]&&r[e].apply(r,t)}),r)&&(n=y.props)[e].apply(n,t)}function M(){var t=y.props.aria;if(t.content){var r="aria-"+t.content,n=b.id;Wp(y.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(r);if(y.state.isVisible)e.setAttribute(r,t?t+" "+n:n);else{var i=t&&t.replace(n,"").trim();i?e.setAttribute(r,i):e.removeAttribute(r)}})}}function H(){!E&&y.props.aria.expanded&&Wp(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===F()?"true":"false"):e.removeAttribute("aria-expanded")})}function L(){Q().removeEventListener("mousemove",A),Nh=Nh.filter(function(e){return e!==A})}function U(t){if(!sh.isTouch||!g&&"mousedown"!==t.type){var r=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!ah(b,r)){if(Wp(y.props.triggerTarget||e).some(function(e){return ah(e,r)})){if(sh.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else q("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),d=!0,setTimeout(function(){d=!1}),y.state.isMounted||Y())}}}function R(){g=!0}function O(){g=!1}function T(){var e=Q();e.addEventListener("mousedown",U,!0),e.addEventListener("touchend",U,Jp),e.addEventListener("touchstart",O,Jp),e.addEventListener("touchmove",R,Jp)}function Y(){var e=Q();e.removeEventListener("mousedown",U,!0),e.removeEventListener("touchend",U,Jp),e.removeEventListener("touchstart",O,Jp),e.removeEventListener("touchmove",R,Jp)}function j(e,t){var r=S().box;function n(e){e.target===r&&(oh(r,"remove",n),t())}if(0===e)return t();oh(r,"remove",a),oh(r,"add",n),a=n}function G(t,r,n){void 0===n&&(n=!1),Wp(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,r,n),h.push({node:e,eventType:t,handler:r,options:n})})}function J(){var e;x()&&(G("touchstart",V,{passive:!0}),G("touchend",X,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(G(e,V),e){case"mouseenter":G("mouseleave",X);break;case"focus":G(gh?"focusout":"blur",_);break;case"focusin":G("focusout",_)}})}function z(){h.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,i=e.options;t.removeEventListener(r,n,i)}),h=[]}function V(e){var t,r=!1;if(y.state.isEnabled&&!W(e)&&!d){var n="focus"===(null==(t=o)?void 0:t.type);o=e,c=e.currentTarget,H(),!y.state.isVisible&&Pp(e,"MouseEvent")&&Nh.forEach(function(t){return t(e)}),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||f)&&!1!==y.props.hideOnClick&&y.state.isVisible?r=!0:ee(e),"click"===e.type&&(f=!r),r&&!n&&te(e)}}function P(e){var t=e.target,r=F().contains(t)||b.contains(t);if("mousemove"!==e.type||!r){var n=Z().concat(b).map(function(e){var t,r=null==(t=e._tippy.popperInstance)?void 0:t.state;return r?{popperRect:e.getBoundingClientRect(),popperState:r,props:u}:null}).filter(Boolean);(function(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=i.placement.split("-")[0],s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=t.top-n+c>o,g=n-t.bottom-l>o,p=t.left-r+u>o,h=r-t.right-f>o;return d||g||p||h})})(n,e)&&(L(),te(e))}}function X(e){W(e)||y.props.trigger.indexOf("click")>=0&&f||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function _(e){y.props.trigger.indexOf("focusin")<0&&e.target!==F()||y.props.interactive&&e.relatedTarget&&b.contains(e.relatedTarget)||te(e)}function W(e){return!!sh.isTouch&&x()!==e.type.indexOf("touch")>=0}function K(){$();var t=y.props,r=t.popperOptions,n=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,c=D()?Qh(b).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||F()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(D()){var r=S().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?r.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?r.setAttribute("data-"+e,""):r.removeAttribute("data-"+e)}),t.attributes.popper={}}}},f=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];D()&&c&&f.push({name:"arrow",options:{element:c,padding:3}}),f.push.apply(f,(null==r?void 0:r.modifiers)||[]),y.popperInstance=Tp(l,b,Object.assign({},r,{placement:n,onFirstUpdate:s,modifiers:f}))}function $(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Z(){return $p(b.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&q("onTrigger",[y,e]),T();var t=k(!0),n=C(),i=n[0],o=n[1];sh.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout(function(){y.show()},t):y.show()}function te(e){if(y.clearDelayTimeouts(),q("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=k(!1);t?n=setTimeout(function(){y.state.isVisible&&y.hide()},t):i=requestAnimationFrame(function(){y.hide()})}}else Y()}}function Hh(e,t){void 0===t&&(t={});var r=bh.plugins.concat(t.plugins||[]);!function(e){var t=!e,r="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;yh(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),yh(r,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),Ch(t,r),document.addEventListener("touchstart",lh,Jp),window.addEventListener("blur",fh);var n=Object.assign({},t,{plugins:r}),i=rh(e),o=th(n.content),a=i.length>1;Ih(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "));var s=i.reduce(function(e,t){var r=t&&Mh(t,n);return r&&e.push(r),e},[]);return th(e)?s[0]:s}function Lh(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}Hh.defaultProps=bh,Hh.setDefaultProps=function(e){Ch(e,[]),Object.keys(e).forEach(function(t){bh[t]=e[t]})},Hh.currentInput=sh,Object.assign({},Gg,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}}),Hh.setDefaultProps({render:Sh});Lh('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}');async function Uh(e,t={}){if(!va(e))throw new Error("invalid fun");let r=we(t,"width");r=De(r)?sa(r):Se(r)?Mn(r):null;let n=we(t,"height");n=De(n)?sa(n):Se(n)?Mn(n):null;let i=document.createElement("div");Se(r)&&(i.style.width=`${r}px`),Se(n)&&(i.style.height=`${n}px`);let o=document.createElement("div");o.style.position="absolute",o.style.top=0,o.style.left=0,o.style.zIndex=-1,o.appendChild(i);let a=document.createElement("div");a.style.position="relative",a.appendChild(o);let s,c=document.createElement("div");c.style.position="fixed",c.style.zIndex=-1,c.appendChild(a),Pf(document.querySelector("body"),c);let l=e(i);return s=ys(l)?await l:l,Vf(c),s}function Rh(e){if(!va(e))throw new Error("fn is not a function");return function(){let t=ns(),r=null,n=null;try{r=e.apply(this,arguments)}catch(e){n=e}return null!==n?t.resolve({state:"error",msg:n}):ys(r)?r.then(e=>{t.resolve({state:"success",msg:e})}).catch(e=>{"cancelled"===we(e,"reason")?t.resolve({state:"cancelled",msg:""}):t.resolve({state:"error",msg:e})}):t.resolve({state:"success",msg:r}),t}}Lh(".tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px rgba(154,161,177,.15),0 4px 80px -8px rgba(36,40,47,.25),0 4px 4px -2px rgba(91,94,105,.15);background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}");let Oh=Rh;function Th(e){if(!Hn(e))return!1;return Zi(e)<0}function Yh(e=0){let t=0,r=[];Th(e)&&(e=0),e=Zi(e);let n=Xi();return n.get=function(){if(r.length>0){return t+=1,r.splice(0,1)[0]}return null},n.cb=function(){t-=1,t<0&&(t=0),r.length>0&&n.emit("message",r)},n.push=function(i){r.push(i),(e<=0||t<e)&&n.emit("message",r)},n.clear=function(){t=0,r=[]},n}function jh(e=0,t=!1){return new function(e,t){let r=null;Bo(e)||(e=0),e=Zi(e),gn(t)||(t=!1);let n=Yh(e);return n.on("message",async function(e){let t=n.get();if(!t)return;await bs(1);let r,i=we(t,"id"),o=we(t,"fun"),a=we(t,"input");r=va(o)?await Oh(o)(...a):{state:"error",msg:"fun is not a function"},n.emit(i,r),n.cb()}),function(e,...i){let o=ns(),a=Hu();r=a;let s={id:a,fun:e,input:i};return n.push(s),n.once(a,e=>{t?a===r?"success"===e.state?o.resolve(e.msg):o.reject(e.msg):o.reject({reason:"cancelled"}):"success"===e.state?o.resolve(e.msg):o.reject(e.msg)}),o}}(e,t)}function Gh(e,t){In()?De(e)?Vu()?function(e,t){window.navigator.msSaveOrOpenBlob(t,e)}(e,t):function(e,t){let r=window.URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(r)}(e,t):console.log("no filename"):console.log("no window")}function Jh(e,t="data"){if(!Be(e))return{error:"sheet is not an object"};De(t)||(t="data");let r=Qu();return r.SheetNames.push(t),r.Sheets[t]=e,r}function zh(e,t="data"){if(!Ce(e)&&!br(e))return{error:"data is not an array or element"};De(t)||(t="data");let r=null,n=bn(e);return ke(n,"error")?n:(r=Jh(n,t),ke(r,"error"),r)}function Vh(e,t="data",r){if(!De(e)){let t="no filename";return console.log(t,e),{error:t}}if(De(t)||(t="data"),!Ce(r)&&!br(r)){let e="data is not an array or element";return console.log(e,r),{error:e}}Ce(r)&&Ee(we(r,0,null))&&(r=mn(r));let n=zh(r,t);if(we(n,"error"))return console.log(n.error),n.error;let i=vn();if(In()){let t=i.write(n,{bookType:"xlsx",bookSST:!1,type:"array"});Gh(e,new Blob([t]))}else try{i.writeFile(n,e)}catch(e){let t=`xl.writeFile failed: ${we(e,"message",e)}. 提示: 若於Node ESM環境單獨深度import此檔, xlsx ESM build的_fs未注入會擲此錯; 請改用 import { downloadExcelFileFromData } from 'wsemi' (走package main的UMD bundle, xlsx CJS自動載fs), 或於app entry手動呼叫 XLSX.set_fs(fs) 注入fs`;return console.log(t),t}return"ok"}function Ph(e){if(!Za(e))return new Blob;return new Blob([e])}function Xh(e,t,r=""){if(!Rr(t))return{};let n={};return Er(t,function(t){n[t]=we(e,t,r)}),n}function _h(e,t){if(!Be(e))return{};if(!Rr(t))return{};let r={};return Er(t,function(t){ke(e,t)&&(r[t]=we(e,t))}),r}function Wh(e,t=0,r={}){Bo(t)||(t=0),t=Zi(t);let n=we(r,"rounding","");return"ROUND_HALF_UP"!==n&&"ROUND_HALF_EVEN"!==n&&(n="ROUND_HALF_UP"),Se(e)?new il(e).toDecimalPlaces(t,il[n]).toNumber():""}function Kh(e,t={}){if(!Se(e))throw new Error("v is not a number");let r=we(t,"returnDigit");if(pn(r)||(r=!1),Hn(e))return r?0:Ya(e);let n=null,i=null;for(let t=1;t<=16;t++){let r=e*Math.pow(10,t);if(Math.abs(r-Math.round(r))<1e-9){n=t,i=al(e,t);break}}return null===i&&(n=16,i=Ya(e)),r?n:i}let $h=e=>{let t=1;e<0&&(t=-1);let r=null;if((e=Math.abs(e))<.1)for(let n=1;n<16;n++){let i=Math.pow(10,n);if((e*=i)<1){r={r:1/i,v:t*e};break}}else{if(e<1)return{r:1,v:t*e};if(e>=1)for(let n=1;n<16;n++){let i=Math.pow(10,n);if((e/=i)<1){r={r:i,v:t*e};break}}}if(null===r)throw new Error(`can not normalize v[${e}]`);return r};var Zh=a,eA=Zh.spawn,tA=Zh.exec;function rA(e,t,r){var n={};try{Object.keys(e).forEach(function(r){e[r].forEach(function(e){n[e]||(nA(e,t),n[e]=1)}),n[r]||(nA(r,t),n[r]=1)})}catch(e){if(r)return r(e);throw e}if(r)return r()}function nA(e,t){try{process.kill(parseInt(e,10),t)}catch(e){if("ESRCH"!==e.code)throw e}}function iA(e,t,r,n,i){var o=n(e),a="";o.stdout.on("data",function(e){e=e.toString("ascii");a+=e});o.on("close",function(o){delete r[e],0==o?a.match(/\d+/g).forEach(function(o){o=parseInt(o,10),t[e].push(o),t[o]=[],r[o]=1,iA(o,t,r,n,i)}):0==Object.keys(r).length&&i()})}var oA=Un(function(e,t,r){if("function"==typeof t&&void 0===r&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},i={};switch(n[e]=[],i[e]=1,process.platform){case"win32":tA("taskkill /pid "+e+" /T /F",r);break;case"darwin":iA(e,n,i,function(e){return eA("pgrep",["-P",e])},function(){rA(n,t,r)});break;default:iA(e,n,i,function(e){return eA("ps",["-o","pid","--no-headers","--ppid",e])},function(){rA(n,t,r)})}});function aA(e){let t=ns();return oA(Number(e),"SIGKILL",r=>{r?t.reject(r):t.resolve(`pid[${e}] killed`)}),t}function sA(e,t){return e>t}function cA(e){return e&&e.length?vd(e,cr,sA):void 0}function lA(e){return null==e?[]:function(e,t){return pe(t,function(t){return e[t]})}(e,dt(e))}function uA(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function fA(e,t,r,n){return pt(e,function(e,i,o){t(n,e,r(e),o)}),n}var dA,gA,pA=Object.prototype.hasOwnProperty,hA=(dA=function(e,t,r){pA.call(e,r)?e[r].push(t):di(e,r,[t])},function(e,t){var r=v(e)?uA:fA,n=gA?gA():{};return r(e,dA,fr(t),n)}),AA=hA;function mA(e,t){if(!Ce(e)||!Ce(t))return[];if(e.length!==t.length)return[];return xr(e,function(r,n){return vg(e[n],t[n])})}function IA(e,t={}){let r=we(t,"fs"),n=!1;try{r.statSync(e),n=!0}catch{n=!1}return n}function yA(e,t={}){let r=we(t,"fs");return!!IA(e,{fs:r})&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function vA(e){return yA(e,{fs:s})}function bA(e,t={}){let r=we(t,"fs");if(!IA(e,{fs:r}))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function wA(e,t={}){let r=we(t,"fs");if(bA(e,{fs:r}))return{success:"input folder is already exists: "+e};if(IA(e,{fs:r}))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function BA(e,t={}){let r=we(t,"path"),n=we(t,"fs");if(!IA(e,{fs:n})){let t=wA(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!bA(e,{fs:n}))return{error:"input path is not a folder"};try{let t=n.readdirSync(e);for(let i of t){let t=r.join(e,i);n.statSync(t).isDirectory()?n.rmSync(t,{recursive:!0,force:!0}):n.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}function EA(e,t,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"useSync","");pn(o)||(o=!0);let a="";return a=o?function(e,t,r={}){let n=we(r,"path"),i=we(r,"fs");if(!yA(e,{fs:i}))return{error:`fpSrc[${e}] is not a file`};try{wA(n.dirname(t),{fs:i}),i.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:n,fs:i}):async function(e,t,r={}){let n=we(r,"path"),i=we(r,"fs");if(!yA(e,{fs:i}))return{error:`fpSrc[${e}] is not a file`};let o=null;return await(async(e,t)=>{wA(n.dirname(t),{fs:i}),await new Promise((r,n)=>{let o=i.createReadStream(e),a=i.createWriteStream(t);o.on("error",n),a.on("error",n),a.on("finish",r),o.pipe(a)})})(e,t).then(()=>{o={success:"done: "+t}}).catch(e=>{o={error:e}}),o}(e,t,{path:n,fs:i}),a}function CA(e,t,r={}){let n=we(r,"path"),i=we(r,"fs");if(!bA(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};try{i.readdirSync(e).forEach(function(r){let o=n.resolve(e,r),a=n.resolve(t,r),s=i.lstatSync(o);if(s.isDirectory())wA(a,{fs:i}),CA(o,a,{path:n,fs:i});else if(s.isSymbolicLink()){let e=i.readlinkSync(o);i.symlinkSync(e,a)}else wA(n.dirname(a),{fs:i}),i.copyFileSync(o,a)})}catch(e){return{error:e}}return{success:"done: "+t}}function xA(e,t,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"useSync","");pn(o)||(o=!0);let a="";return a=o?CA(e,t,{path:n,fs:i}):async function(e,t,r={}){let n=we(r,"path"),i=we(r,"fs");if(!bA(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};let o=async(e,t)=>{let r=i.readdirSync(e);for(let a of r){let r=n.join(e,a),s=n.join(t,a),c=i.lstatSync(r);if(c.isDirectory())wA(s,{fs:i}),await o(r,s);else if(c.isSymbolicLink()){let e=i.readlinkSync(r);i.symlinkSync(e,s)}else wA(n.dirname(s),{fs:i}),await new Promise((e,t)=>{let n=i.createReadStream(r),o=i.createWriteStream(s);n.on("error",t),o.on("error",t),o.on("finish",e),n.pipe(o)})}},a=null;return await o(e,t).then(()=>{a={success:"done: "+t}}).catch(e=>{a={error:e}}),a}(e,t,{path:n,fs:i}),a}function DA(e){if(!De(e))return{path:"",isRoot:!1};for(;e.indexOf("\\\\")>=0;)e=e.replace("\\\\","\\");for(;e.indexOf("//")>=0;)e=e.replace("//","/");if(":"===fa(e,1))return{path:`${e}\\`,isRoot:!0};if("\\"===fa(e,1)){let t=Ga(e,1);return":"===fa(t,1)?{path:e,isRoot:!0}:{path:t,isRoot:!1}}if("/"===fa(e,1)){let t=Ga(e,1);return 0===t.length?{path:e,isRoot:!0}:{path:t,isRoot:!1}}return{path:e,isRoot:!1}}function FA(e){if(!De(e))return"";let t=DA(e);if(t.isRoot)return t.path;let r=t.path;try{r=r.split("\\").pop().split("/").pop()}catch(e){}return r}function QA(e){if(!De(e))return"";let t=DA(e);if(t.isRoot)return t.path;let r=FA(e=t.path);if(!De(r))return e;let n=DA(e=Ga(e,r.length));return n.isRoot,n.path}function SA(e,t="",r={}){let n=we(r,"fs"),i=we(r,"encoding","");if(De(i)||(i="utf8"),IA(e,{fs:n}))return{error:"input path already exists: "+e};if(yA(e,{fs:n}))return{error:"input file is already exists: "+e};let o=QA(e);bA(o,{fs:n})||wA(o,{fs:n});try{n.writeFileSync(e,t,{encoding:i})}catch(e){return{error:e}}return{success:"done: "+e}}function kA(e){return wA(e,{fs:s})}function NA(e,t={}){let r=we(t,"fs");if(!IA(e,{fs:r}))return{success:"file does not exist: "+e};if(!yA(e,{fs:r}))return{error:"input path is not a file: "+e};try{r.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}async function qA(e,t={}){let r=we(t,"numRetry");eo(r)||(r=5),r=Zi(r);let n=we(t,"fs",null);if(!IA(e,{fs:n}))return"file does not exist: "+e;if(!yA(e,{fs:n}))return Promise.reject("input path is not a file: "+e);for(let t=0;t<r;t++)try{n.unlinkSync(e);break}catch(e){if("EBUSY"!==e.code)return Promise.reject(e);await bs(300)}return"done: "+e}function MA(e,t={}){let r=we(t,"fs");if(!IA(e,{fs:r}))return{success:"folder does not exist: "+e};if(!bA(e,{fs:r}))return{error:"input path is not a folder: "+e};try{r.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function HA(e){return MA(e,{fs:s})}async function LA(e,t={}){let r=we(t,"numRetry");eo(r)||(r=5),r=Zi(r);let n=we(t,"fs",null);if(!IA(e,{fs:n}))return"folder does not exist: "+e;if(!bA(e,{fs:n}))return Promise.reject("input path is not a folder: "+e);for(let t=0;t<r;t++)try{n.rmSync(e,{recursive:!0,force:!0});break}catch(e){if("EBUSY"!==e.code)return Promise.reject(e);await bs(300)}return"done: "+e}async function UA(e,t,r={}){let n="",i=we(r,"fs"),o=we(r,"Readable");if(!De(e))throw new Error("urlIn in not an effective string");let a=QA(t),s=we(r,"fnOut","");De(s)||(s=FA(t)),bA(a,{fs:i})||wA(a,{fs:i});let c=ns();try{let r=await fetch(e);if(!r.ok)return c.reject(r.statusText),c;let a=i.createWriteStream(t);o.fromWeb(r.body).pipe(a),a.on("finish",()=>{c.resolve(t)}),a.on("error",e=>{n=e.message,c.reject(n)})}catch(e){n=e.message,c.reject(n)}return c}function RA(){if(!va(r))throw new Error("invalid dayjs");return r().format("YYYY-MM-DDTHH:mm:ssZ")}function OA(e){if(!De(e))return"";let t=FA(e),r=Jo(t,".");if(dn(r)<=1)return t;let n="";try{r=zo(r),n=xo(r,".")}catch(e){}return n}function TA(e){return bA(e,{fs:s})}function YA(e,t={}){let r=we(t,"polling");pn(r)||(r=!1);let n=we(t,"timeInterval");eo(n)||(n=100),n=Zi(n);let o=we(t,"timeBinaryInterval");eo(o)||(o=300),o=Zi(o);let a=new u.EventEmitter,c=e,l=null,d=setInterval(()=>{if(null===l)TA(c)&&(l=f.watch(c,{usePolling:r,interval:n,binaryInterval:o,awaitWriteFinish:!0}),l.on("all",(e,t,r)=>{t=i.resolve(t),a.emit("change",{type:e,fp:t,stats:r}),"unlinkDir"===e&&i.resolve(c)===t&&setTimeout(()=>{g()},1)}));else if(!TA(c)){let e=s.fstatSync;a.emit("change",{type:"unlinkDir",fp:i.resolve(c),stats:e}),setTimeout(()=>{g()},1)}},n),g=()=>{if(null!==l){try{l.unwatch(c)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}};return a.clear=()=>{g(),clearInterval(d)},a}function jA(e,t={}){let r=we(t,"fs"),n=we(t,"crypto"),i=we(t,"type","");De(i)||(i="sha512");let o=ns();if(!yA(e,{fs:r}))return o.reject(`fp[${e}] is not a file`),o;try{let t=n.createHash(i),a=r.createReadStream(e);a.on("readable",()=>{let e=a.read();e?t.update(e):o.resolve(t.digest("hex"))}),a.on("error",e=>{o.reject(e.toString())})}catch(e){o.reject(e.toString())}return o}const GA=new Uint8Array([0,97,115,109,1,0,0,0,1,48,8,96,3,127,127,127,1,127,96,3,127,127,127,0,96,2,127,127,0,96,1,127,1,127,96,3,127,127,126,1,126,96,3,126,127,127,1,126,96,2,127,126,0,96,1,127,1,126,3,11,10,0,0,2,1,3,4,5,6,1,7,5,3,1,0,1,7,85,9,3,109,101,109,2,0,5,120,120,104,51,50,0,0,6,105,110,105,116,51,50,0,2,8,117,112,100,97,116,101,51,50,0,3,8,100,105,103,101,115,116,51,50,0,4,5,120,120,104,54,52,0,5,6,105,110,105,116,54,52,0,7,8,117,112,100,97,116,101,54,52,0,8,8,100,105,103,101,115,116,54,52,0,9,10,251,22,10,242,1,1,4,127,32,0,32,1,106,33,3,32,1,65,16,79,4,127,32,3,65,16,107,33,6,32,2,65,168,136,141,161,2,106,33,3,32,2,65,137,235,208,208,7,107,33,4,32,2,65,207,140,162,142,6,106,33,5,3,64,32,3,32,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,4,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,2,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,5,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,6,32,0,65,4,106,34,0,79,13,0,11,32,2,65,12,119,32,5,65,18,119,106,32,4,65,7,119,106,32,3,65,1,119,106,5,32,2,65,177,207,217,178,1,106,11,32,1,106,32,0,32,1,65,15,113,16,1,11,146,1,0,32,1,32,2,106,33,2,3,64,32,1,65,4,106,32,2,75,69,4,64,32,0,32,1,40,2,0,65,189,220,202,149,124,108,106,65,17,119,65,175,214,211,190,2,108,33,0,32,1,65,4,106,33,1,12,1,11,11,3,64,32,1,32,2,79,69,4,64,32,0,32,1,45,0,0,65,177,207,217,178,1,108,106,65,11,119,65,177,243,221,241,121,108,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,65,15,118,115,65,247,148,175,175,120,108,34,0,65,13,118,32,0,115,65,189,220,202,149,124,108,34,0,65,16,118,32,0,115,11,63,0,32,0,65,8,106,32,1,65,168,136,141,161,2,106,54,2,0,32,0,65,12,106,32,1,65,137,235,208,208,7,107,54,2,0,32,0,65,16,106,32,1,54,2,0,32,0,65,20,106,32,1,65,207,140,162,142,6,106,54,2,0,11,195,4,1,6,127,32,1,32,2,106,33,6,32,0,65,24,106,33,4,32,0,65,40,106,40,2,0,33,3,32,0,32,0,40,2,0,32,2,106,54,2,0,32,0,65,4,106,34,5,32,5,40,2,0,32,2,65,16,79,32,0,40,2,0,65,16,79,114,114,54,2,0,32,2,32,3,106,65,16,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,40,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,16,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,40,2,0,32,4,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,12,106,34,3,32,3,40,2,0,32,4,65,4,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,16,106,34,3,32,3,40,2,0,32,4,65,8,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,20,106,34,3,32,3,40,2,0,32,4,65,12,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,40,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,32,6,65,16,107,77,4,64,32,6,65,16,107,33,8,32,0,65,8,106,40,2,0,33,2,32,0,65,12,106,40,2,0,33,3,32,0,65,16,106,40,2,0,33,5,32,0,65,20,106,40,2,0,33,7,3,64,32,2,32,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,3,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,5,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,7,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,7,32,8,32,1,65,4,106,34,1,79,13,0,11,32,0,65,8,106,32,2,54,2,0,32,0,65,12,106,32,3,54,2,0,32,0,65,16,106,32,5,54,2,0,32,0,65,20,106,32,7,54,2,0,11,32,1,32,6,73,4,64,32,4,32,1,32,6,32,1,107,34,1,252,10,0,0,32,0,65,40,106,32,1,54,2,0,11,11,97,1,1,127,32,0,65,16,106,40,2,0,33,1,32,0,65,4,106,40,2,0,4,127,32,1,65,12,119,32,0,65,20,106,40,2,0,65,18,119,106,32,0,65,12,106,40,2,0,65,7,119,106,32,0,65,8,106,40,2,0,65,1,119,106,5,32,1,65,177,207,217,178,1,106,11,32,0,40,2,0,106,32,0,65,24,106,32,0,65,40,106,40,2,0,16,1,11,255,3,2,3,126,1,127,32,0,32,1,106,33,6,32,1,65,32,79,4,126,32,6,65,32,107,33,6,32,2,66,214,235,130,238,234,253,137,245,224,0,124,33,3,32,2,66,177,169,172,193,173,184,212,166,61,125,33,4,32,2,66,249,234,208,208,231,201,161,228,225,0,124,33,5,3,64,32,3,32,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,3,32,4,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,4,32,2,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,5,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,5,32,6,32,0,65,8,106,34,0,79,13,0,11,32,2,66,12,137,32,5,66,18,137,124,32,4,66,7,137,124,32,3,66,1,137,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,2,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,2,66,197,207,217,178,241,229,186,234,39,124,11,32,1,173,124,32,0,32,1,65,31,113,16,6,11,134,2,0,32,1,32,2,106,33,2,3,64,32,2,32,1,65,8,106,79,4,64,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,32,0,133,66,27,137,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,33,0,32,1,65,8,106,33,1,12,1,11,11,32,1,65,4,106,32,2,77,4,64,32,0,32,1,53,2,0,66,135,149,175,175,152,182,222,155,158,127,126,133,66,23,137,66,207,214,211,190,210,199,171,217,66,126,66,249,243,221,241,153,246,153,171,22,124,33,0,32,1,65,4,106,33,1,11,3,64,32,1,32,2,73,4,64,32,0,32,1,49,0,0,66,197,207,217,178,241,229,186,234,39,126,133,66,11,137,66,135,149,175,175,152,182,222,155,158,127,126,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,66,33,136,133,66,207,214,211,190,210,199,171,217,66,126,34,0,32,0,66,29,136,133,66,249,243,221,241,153,246,153,171,22,126,34,0,32,0,66,32,136,133,11,77,0,32,0,65,8,106,32,1,66,214,235,130,238,234,253,137,245,224,0,124,55,3,0,32,0,65,16,106,32,1,66,177,169,172,193,173,184,212,166,61,125,55,3,0,32,0,65,24,106,32,1,55,3,0,32,0,65,32,106,32,1,66,249,234,208,208,231,201,161,228,225,0,124,55,3,0,11,244,4,2,3,127,4,126,32,1,32,2,106,33,5,32,0,65,40,106,33,4,32,0,65,200,0,106,40,2,0,33,3,32,0,32,0,41,3,0,32,2,173,124,55,3,0,32,2,32,3,106,65,32,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,200,0,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,32,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,41,3,0,32,4,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,16,106,34,3,32,3,41,3,0,32,4,65,8,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,24,106,34,3,32,3,41,3,0,32,4,65,16,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,32,106,34,3,32,3,41,3,0,32,4,65,24,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,200,0,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,65,32,106,32,5,77,4,64,32,5,65,32,107,33,2,32,0,65,8,106,41,3,0,33,6,32,0,65,16,106,41,3,0,33,7,32,0,65,24,106,41,3,0,33,8,32,0,65,32,106,41,3,0,33,9,3,64,32,6,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,7,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,7,32,8,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,8,32,9,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,9,32,2,32,1,65,8,106,34,1,79,13,0,11,32,0,65,8,106,32,6,55,3,0,32,0,65,16,106,32,7,55,3,0,32,0,65,24,106,32,8,55,3,0,32,0,65,32,106,32,9,55,3,0,11,32,1,32,5,73,4,64,32,4,32,1,32,5,32,1,107,34,1,252,10,0,0,32,0,65,200,0,106,32,1,54,2,0,11,11,188,2,1,5,126,32,0,65,24,106,41,3,0,33,1,32,0,41,3,0,34,2,66,32,90,4,126,32,0,65,8,106,41,3,0,34,3,66,1,137,32,0,65,16,106,41,3,0,34,4,66,7,137,124,32,1,66,12,137,32,0,65,32,106,41,3,0,34,5,66,18,137,124,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,1,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,1,66,197,207,217,178,241,229,186,234,39,124,11,32,2,124,32,0,65,40,106,32,2,66,31,131,167,16,6,11]);async function JA(){return function(e){const{exports:{mem:t,xxh32:r,xxh64:n,init32:i,update32:o,digest32:a,init64:s,update64:c,digest64:l}}=e;let u=new Uint8Array(t.buffer);function f(e,r){if(t.buffer.byteLength<e+r){const n=Math.ceil((e+r-t.buffer.byteLength)/65536);t.grow(n),u=new Uint8Array(t.buffer)}}function d(e,t,r,n,i,o){f(e);const a=new Uint8Array(e);return u.set(a),r(0,t),a.set(u.subarray(0,e)),{update(t){let r;return u.set(a),"string"==typeof t?(f(3*t.length,e),r=A.encodeInto(t,u.subarray(e)).written):(f(t.byteLength,e),u.set(t,e),r=t.byteLength),n(0,e,r),a.set(u.subarray(0,e)),this},digest:()=>(u.set(a),o(i(0)))}}function g(e){return e>>>0}const p=2n**64n-1n;function h(e){return e&p}const A=new TextEncoder;function m(e,t=0){return f(3*e.length,0),g(r(0,A.encodeInto(e,u).written,t))}function I(e,t=0n){return f(3*e.length,0),h(n(0,A.encodeInto(e,u).written,t))}return{h32:m,h32ToString:(e,t=0)=>m(e,t).toString(16).padStart(8,"0"),h32Raw:(e,t=0)=>(f(e.byteLength,0),u.set(e),g(r(0,e.byteLength,t))),create32:(e=0)=>d(48,e,i,o,a,g),h64:I,h64ToString:(e,t=0n)=>I(e,t).toString(16).padStart(16,"0"),h64Raw:(e,t=0n)=>(f(e.byteLength,0),u.set(e),h(n(0,e.byteLength,t))),create64:(e=0n)=>d(88,e,s,c,l,h)}}((await WebAssembly.instantiate(GA)).instance)}async function zA(e,t={}){let r=we(t,"fs"),n=we(t,"chunkSize");if(Se(n)||(n=67108864),n=Mn(n),!yA(e,{fs:r}))return Promise.reject("fp is not a file");let i=ns();try{let{create64:t}=await JA(),o=t(),a=r.createReadStream(e,{highWaterMark:n});a.on("data",e=>{o.update(e)}),a.on("end",()=>{let e=o.digest().toString(16).padStart(16,"0");i.resolve(e)}),a.on("error",i.reject)}catch(e){i.reject(e.toString())}return i}function VA(e,t={}){let r=we(t,"fs"),n=we(t,"crypto"),i=we(t,"type","");De(i)||(i="sha512");let o=we(t,"chunkSize");Se(o)||(o=67108864),o=Mn(o);let a=ns();return yA(e,{fs:r})?"xxhash64"===i?zA(e,{fs:r,chunkSize:o}):jA(e,{fs:r,crypto:n,type:i}):(a.reject(`fp[${e}] is not a file`),a)}function PA(e,t=1,r={}){let n=1,i=we(r,"path"),o=we(r,"fs");if(!bA(e,{fs:o}))throw new Error(`fd[${e}] is not a folder`);return null!==t&&eo(t)&&(t=Zi(t))<1&&(t=1),function e(r){let a=[];return bA(r,{fs:o})?(Er(o.readdirSync(r),function(s){let c=i.resolve(r,s),l=null;try{l=o.statSync(c)}catch(e){}l&&l.isDirectory()?(a.push({isFolder:!0,level:n,path:c,name:i.basename(c)}),n+=1,(n<=t||null===t)&&(a=a.concat(e(c))),n-=1):a.push({isFolder:!1,level:n,path:c,name:i.basename(c)})}),a):a}(e)}function XA(e,t=1,r={}){let n=we(r,"path"),i=we(r,"fs");if(!bA(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let o=[];return o=PA(e,t,{path:n,fs:i}),o=pa(o,{isFolder:!1}),o=xr(o,e=>(delete e.isFolder,e)),o}async function _A(e,t=1,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"crypto"),a=we(r,"type","");if(De(a)||(a="md5"),!bA(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let s=XA(e,t,{path:n,fs:i});return s=await cl(s,async e=>{let t=we(e,"path","");return e.hashType=a,e.hash="",De(t)&&(e.hash=await VA(t,{fs:i,crypto:o,type:a,useSync:!1})),e}),s}async function WA(e,t=1,r={}){return _A(e,t,{path:i,fs:s,crypto:d,...r})}async function KA(e,t={}){let r=we(t,"path"),n=we(t,"fs"),i=we(t,"crypto"),o=we(t,"type","");De(o)||(o="md5");let a=[],s=PA(e,null,{path:r,fs:n});return await cl(s,async e=>{if(e.isFolder)return;let t=await jA(e.path,{fs:n,crypto:i,type:o});a.push(t)}),xo(a,"|")}function $A(e,t=1,r={}){let n=we(r,"path"),i=we(r,"fs");if(!bA(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let o=[];return o=PA(e,t,{path:n,fs:i}),o=pa(o,{isFolder:!0}),o=xr(o,e=>(delete e.isFolder,e)),o}async function ZA(e,t,r={}){let n="",i=we(r,"fs");if(!Rr(e))throw new Error("fpsIn in not an effective array");let o=QA(t),a=we(r,"fnOut","");De(a)||(a=FA(t)),bA(o,{fs:i})||wA(o,{fs:i});let s=ns();try{let r=i.createWriteStream(t);for(let t=0;t<e.length;t++){let o=e[t];if(!yA(o,{fs:i}))throw new Error(`fpIn[${o}] is not a file`);let a=()=>{let e=ns(),t=i.createReadStream(o);return t.on("error",t=>{n=t.message,e.reject(t)}),t.on("end",()=>{NA(o,{fs:i}),e.resolve()}),t.pipe(r,{end:!1}),e};await a()}r.end(),r.on("error",e=>{n=e.message,s.reject(n)}),r.on("finish",()=>{let e={filename:a,path:t};s.resolve(e)})}catch(e){n=e.message,s.reject(n)}return s}function em(e,t={}){let r=null,n=we(t,"fs"),i="";try{i=n.readFileSync(e,"utf8")}catch(e){r=e}return null!==r?{error:r}:{success:i}}function tm(e,t,r={}){let n=we(r,"fs");if(!yA(e,{fs:n}))return{error:`pahOld[${e}] is not a file`};if(IA(t,{fs:n}))return{error:`pahNew[${t}] already exists`};let i=QA(t);bA(i,{fs:n})||wA(i,{fs:n});try{n.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}function rm(e,t,r={}){let n=we(r,"fs");if(!bA(e,{fs:n}))return{error:`pahOld[${e}] is not a folder`};if(IA(t,{fs:n}))return{error:`pahNew[${t}] already exists`};let i=QA(t);bA(i,{fs:n})||wA(i,{fs:n});try{n.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}function nm(e,t,r,n={}){let i=we(n,"withInfor");pn(i)||(i=!0);let o={del:[],add:[],same:[],diff:[]};if(!De(r))return console.log("invalid key"),i&&(o.infor={}),o;Ce(e)||(e=[e]),Ce(t)||(t=[t]),e=pa(e,e=>ke(e,r)),t=pa(t,e=>ke(e,r));let a=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=a.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?o.same.push(e):o.diff.push(e),a.delete(t[r])}else o.del.push(t)}if(o.add=Array.from(a.values()),i){let e={};for(let t of o.del)e[t[r]]="del";for(let t of o.add)e[t[r]]="add";for(let t of o.diff)e[t[r]]="diff";for(let t of o.same)e[t[r]]="same";o.infor=e}return o}async function im(e,t=1,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"crypto"),a=we(r,"type","");De(a)||(a="md5");let s=we(r,"forFile",null);pn(s)||(s=!0);let c=we(r,"forFolder",null);if(pn(c)||(c=!1),!bA(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let l=PA(e,t,{path:n,fs:i});return l=await cl(l,async e=>{let t="";return s&&!e.isFolder&&(t=await jA(e.path,{fs:i,crypto:o,type:a})),c&&e.isFolder&&(t=await KA(e.path,{path:n,fs:i,crypto:o,type:a})),e.hash=t,e}),l}async function om(e,t,r={}){let n=we(r,"path"),i=we(r,"fs"),o=we(r,"crypto"),a=we(r,"type","");if(De(a)||(a="md5"),!bA(e,{fs:i}))throw new Error(`fdSrc[${e}] is not a folder`);let s=!1;if(!bA(t,{fs:i}))return await xA(e,t,{path:n,fs:i,useSync:!1}),s=!0,s;let c=n.sep,l=n.sep.length,u=(e,t)=>(e=xr(e,e=>((e,t)=>{let r=e.isFolder?"folder":"file",n=e.path.replace(t,"");return ua(n,l)===c&&(n=da(n,l)),n=n.replaceAll("\\","/"),{id:`${r}|${n}`,isFolder:e.isFolder,name:e.name,rpath:n,hash:e.hash}})(e,t)),e),f=await im(e,null,{path:n,fs:i,crypto:o,type:a,forFile:!0,forFolder:!1});f=u(f,n.resolve(e));let d=await im(t,null,{path:n,fs:i,crypto:o,type:a,forFile:!0,forFolder:!1});d=u(d,n.resolve(t));let g=nm(d,f,"id",{withInfor:!1});return s=dn(g.del)>0||dn(g.add)>0||dn(g.diff)>0,await cl(g.del,async e=>{if(e.isFolder){MA(n.resolve(t,e.rpath),{fs:i})}}),await cl(g.del,async e=>{if(!e.isFolder){NA(n.resolve(t,e.rpath),{fs:i})}}),await cl([...g.add,...g.diff],async r=>{if(!r.isFolder){let o=n.resolve(e,r.rpath),a=n.resolve(t,r.rpath);await EA(o,a,{path:n,fs:i,useSync:!1})}}),s}function am(e,t={}){let r=we(t,"polling");pn(r)||(r=!1);let n=we(t,"timeInterval");eo(n)||(n=100),n=Zi(n);let o=we(t,"timeBinaryInterval");eo(o)||(o=300),o=Zi(o);let a=new u.EventEmitter,s=e,c=null,l=setInterval(()=>{null===c&&vA(s)&&(c=f.watch(s,{usePolling:r,interval:n,binaryInterval:o,awaitWriteFinish:!0}),c.on("all",(e,t,r)=>{t=i.resolve(t),a.emit("change",{type:e,fp:t,stats:r})}))},n);return a.clear=()=>{(()=>{if(null!==c){try{c.unwatch(s)}catch(e){console.log(e)}c.close().catch(e=>{console.log(e)}).finally(()=>{c=null})}})(),clearInterval(l)},a}function sm(e,t,r={}){let n=null,i=we(r,"fs"),o=QA(e);bA(o,{fs:i})||wA(o,{fs:i});try{i.writeFileSync(e,t,"utf8")}catch(e){n=e}return null!==n?{error:n}:{success:e}}const cm=[];for(let e=0;e<256;++e)cm.push((e+256).toString(16).slice(1));const lm=new Uint8Array(16);function um(){return crypto.getRandomValues(lm)}const fm={};function dm(e,t,r){let n;if(e)n=gm(e.random??e.rng?.()??um(),e.msecs,e.seq,t,r);else{const e=Date.now(),i=um();!function(e,t,r){e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++)}(fm,e,i),n=gm(i,fm.msecs,fm.seq,t,r)}return t??function(e,t=0){return(cm[e[t+0]]+cm[e[t+1]]+cm[e[t+2]]+cm[e[t+3]]+"-"+cm[e[t+4]]+cm[e[t+5]]+"-"+cm[e[t+6]]+cm[e[t+7]]+"-"+cm[e[t+8]]+cm[e[t+9]]+"-"+cm[e[t+10]]+cm[e[t+11]]+cm[e[t+12]]+cm[e[t+13]]+cm[e[t+14]]+cm[e[t+15]]).toLowerCase()}(n)}function gm(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(n){if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else n=new Uint8Array(16),i=0;return t??=Date.now(),r??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=255&t,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|3&e[10],n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}function pm(e){return"[object Uint16Array]"===Object.prototype.toString.call(e)}function hm(e){if(!(I(e)||gs(e)||Za(e)||pm(e)))return null;try{if(e.byteLength)return e.byteLength}catch(e){}try{if(e.length)return e.length}catch(e){}try{if(e.size)return e.size}catch(e){}return null}function Am(e,t=!0){if(!Rr(e)){return{error:"no data"}}let r=null;try{r=function(e,t=!0){let r=t?"\ufeff":"";return Er(e,e=>{let t=[];Er(e,e=>{xe(e)?(e=pl(e,"\r\n",""),e=pl(e,"\r",""),e=`"${e=pl(e,"\n","")}"`):e=pn(e)?e?"true":"false":Ya(e),t.push(e)}),r+=xo(t,",")+"\r\n"}),r}(e,t)}catch(e){return{error:e}}return r}function mm(e){return pn(e)?e?"true":"false":Ya(e)}function Im(e,t){let r=[];return e.SheetNames.forEach(function(n){let i=vn().utils.sheet_to_json(e.Sheets[n],{header:"A",defval:"",blankrows:!0});i=xr(i,e=>lA(e)),t&&(i=xr(i,e=>xr(e,e=>mm(e)))),r.push({sheetname:n,data:i})}),r}function ym(e,t){let r=we(t,"fmt","ltdt");if(!ya(["ltdt","csv","array"],r))return{error:"opt.fmt is not one of 'ltdt', 'csv', 'array'"};let n,i=we(t,"valueToString",!0);if(!pn(i))return{error:"opt.valueToString is not a boolean"};try{n=vn().read(e,{type:"buffer"})}catch(e){return console.log("error: ",e),{error:"can not read data from u8a"}}let o=null;try{"ltdt"===r?o=function(e,t){let r=[];return e.SheetNames.forEach(function(n){let i=vn().utils.sheet_to_json(e.Sheets[n]);t&&(i=xr(i,e=>(Er(e,(t,r)=>{e[r]=mm(t)}),e))),r.push({sheetname:n,data:i})}),r}(n,i):"array"===r?o=Im(n,i):"csv"===r&&(o=function(e,t){let r=Im(e,t);return Er(r,(e,t)=>{r[t].data=Am(e.data,!1)}),r}(n,i))}catch(e){return console.log("error: ",e),{error:"can not convert data"}}return o}var vm;function bm(e){if(!N(e))return!1;var t=k(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!vr(e)}function wm(e){return bm(e)}function Bm(e){if(!Ee(e))return{error:"wb is not an effective object"};if(!Ce(we(e,"SheetNames")))return{error:"wb.SheetNames is not an array"};if(!Be(we(e,"Sheets")))return{error:"wb.Sheets is not an object"};let t=null;try{t=ps(vn().write(e,{bookType:"xlsx",type:"binary"}))}catch(e){return{error:e}}return t}
16
16
  /*!
17
17
  * hash-wasm (https://www.npmjs.com/package/hash-wasm)
18
18
  * (c) Dani Biro