wsemi 1.8.89 → 1.8.90

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 (485) hide show
  1. package/README.md +1 -1
  2. package/dist/wsemi.umd.js +4 -4
  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/execCli.mjs.html +1 -1
  172. package/docs/execCliCore.mjs.html +1 -1
  173. package/docs/execCliJsonRpc.mjs.html +1 -1
  174. package/docs/execCliSession.mjs.html +1 -1
  175. package/docs/execJsCode.mjs.html +1 -1
  176. package/docs/execProcess.mjs.html +1 -1
  177. package/docs/execProcessKillPid.mjs.html +1 -1
  178. package/docs/filepathToTree.mjs.html +1 -1
  179. package/docs/files2data.mjs.html +1 -1
  180. package/docs/flattenToConn.mjs.html +1 -1
  181. package/docs/flattenTree.mjs.html +1 -1
  182. package/docs/floor.mjs.html +1 -1
  183. package/docs/fsBuildReadStreamText.mjs.html +1 -1
  184. package/docs/fsBuildWriteStreamText.mjs.html +1 -1
  185. package/docs/fsCleanFolder.mjs.html +1 -1
  186. package/docs/fsCleanFolderCore.mjs.html +1 -1
  187. package/docs/fsCopyFile.mjs.html +1 -1
  188. package/docs/fsCopyFileCore.mjs.html +1 -1
  189. package/docs/fsCopyFolder.mjs.html +1 -1
  190. package/docs/fsCopyFolderCore.mjs.html +1 -1
  191. package/docs/fsCreateFile.mjs.html +1 -1
  192. package/docs/fsCreateFileCore.mjs.html +1 -1
  193. package/docs/fsCreateFolder.mjs.html +1 -1
  194. package/docs/fsCreateFolderCore.mjs.html +1 -1
  195. package/docs/fsDeleteFile.mjs.html +1 -1
  196. package/docs/fsDeleteFileCore.mjs.html +1 -1
  197. package/docs/fsDeleteFileSafe.mjs.html +1 -1
  198. package/docs/fsDeleteFileSafeCore.mjs.html +1 -1
  199. package/docs/fsDeleteFolder.mjs.html +1 -1
  200. package/docs/fsDeleteFolderCore.mjs.html +1 -1
  201. package/docs/fsDeleteFolderSafe.mjs.html +1 -1
  202. package/docs/fsDeleteFolderSafeCore.mjs.html +1 -1
  203. package/docs/fsDownloadFile.mjs.html +1 -1
  204. package/docs/fsDownloadFileCore.mjs.html +1 -1
  205. package/docs/fsEvem.mjs.html +1 -1
  206. package/docs/fsExists.mjs.html +1 -1
  207. package/docs/fsExistsCore.mjs.html +1 -1
  208. package/docs/fsGetFileBasicHash.mjs.html +1 -1
  209. package/docs/fsGetFileBasicHashCore.mjs.html +1 -1
  210. package/docs/fsGetFileHash.mjs.html +1 -1
  211. package/docs/fsGetFileHashCore.mjs.html +1 -1
  212. package/docs/fsGetFileXxHash.mjs.html +1 -1
  213. package/docs/fsGetFileXxHashCore.mjs.html +1 -1
  214. package/docs/fsGetFilesInFolder.mjs.html +1 -1
  215. package/docs/fsGetFilesInFolderCore.mjs.html +1 -1
  216. package/docs/fsGetFilesWithHashInFolder.mjs.html +1 -1
  217. package/docs/fsGetFilesWithHashInFolderCore.mjs.html +1 -1
  218. package/docs/fsGetFolderBasicHash.mjs.html +1 -1
  219. package/docs/fsGetFolderBasicHashCore.mjs.html +1 -1
  220. package/docs/fsGetFoldersInFolder.mjs.html +1 -1
  221. package/docs/fsGetFoldersInFolderCore.mjs.html +1 -1
  222. package/docs/fsIsFile.mjs.html +1 -1
  223. package/docs/fsIsFileCore.mjs.html +1 -1
  224. package/docs/fsIsFolder.mjs.html +1 -1
  225. package/docs/fsIsFolderCore.mjs.html +1 -1
  226. package/docs/fsMergeFiles.mjs.html +1 -1
  227. package/docs/fsMergeFilesCore.mjs.html +1 -1
  228. package/docs/fsReadJson.mjs.html +1 -1
  229. package/docs/fsReadText.mjs.html +1 -1
  230. package/docs/fsReadTextCore.mjs.html +1 -1
  231. package/docs/fsRenameFile.mjs.html +1 -1
  232. package/docs/fsRenameFileCore.mjs.html +1 -1
  233. package/docs/fsRenameFolder.mjs.html +1 -1
  234. package/docs/fsRenameFolderCore.mjs.html +1 -1
  235. package/docs/fsSrlog.mjs.html +1 -1
  236. package/docs/fsSyncFolder.mjs.html +1 -1
  237. package/docs/fsSyncFolderCore.mjs.html +1 -1
  238. package/docs/fsTask.mjs.html +1 -1
  239. package/docs/fsTaskCp.mjs.html +1 -1
  240. package/docs/fsTreeFolder.mjs.html +1 -1
  241. package/docs/fsTreeFolderCore.mjs.html +1 -1
  242. package/docs/fsTreeFolderWithHash.mjs.html +1 -1
  243. package/docs/fsTreeFolderWithHashCore.mjs.html +1 -1
  244. package/docs/fsWatchFile.mjs.html +1 -1
  245. package/docs/fsWatchFolder.mjs.html +1 -1
  246. package/docs/fsWriteJson.mjs.html +1 -1
  247. package/docs/fsWriteText.mjs.html +1 -1
  248. package/docs/fsWriteTextCore.mjs.html +1 -1
  249. package/docs/genGradientColor.mjs.html +1 -1
  250. package/docs/genID.mjs.html +1 -1
  251. package/docs/genIDSeq.mjs.html +1 -1
  252. package/docs/genPm.mjs.html +1 -1
  253. package/docs/getBufferSize.mjs.html +1 -1
  254. package/docs/getClearPathName.mjs.html +1 -1
  255. package/docs/getCsvStrFromData.mjs.html +1 -1
  256. package/docs/getDataFromExcelFileU8Arr.mjs.html +1 -1
  257. package/docs/getDataFromExcelFileU8ArrDyn.mjs.html +1 -1
  258. package/docs/getEnv.mjs.html +1 -1
  259. package/docs/getErrorMessage.mjs.html +563 -185
  260. package/docs/getExcelU8ArrFromData.mjs.html +1 -1
  261. package/docs/getExcelU8ArrFromWorkbook.mjs.html +1 -1
  262. package/docs/getExcelWorkbookFromData.mjs.html +1 -1
  263. package/docs/getExcelWorkbookFromWorksheet.mjs.html +1 -1
  264. package/docs/getExcelWorksheetFromData.mjs.html +1 -1
  265. package/docs/getFileAccept.mjs.html +1 -1
  266. package/docs/getFileBasicHash.mjs.html +1 -1
  267. package/docs/getFileHash.mjs.html +1 -1
  268. package/docs/getFileName.mjs.html +1 -1
  269. package/docs/getFileNameExt.mjs.html +1 -1
  270. package/docs/getFileTrueName.mjs.html +1 -1
  271. package/docs/getFileType.mjs.html +1 -1
  272. package/docs/getFileXxHash.mjs.html +1 -1
  273. package/docs/getGlobal.mjs.html +1 -1
  274. package/docs/getObjSize.mjs.html +1 -1
  275. package/docs/getPathParent.mjs.html +1 -1
  276. package/docs/getTimeBetween.mjs.html +1 -1
  277. package/docs/getTimeFromUnit.mjs.html +1 -1
  278. package/docs/getTimeHp.mjs.html +1 -1
  279. package/docs/getTimeObject.mjs.html +1 -1
  280. package/docs/getTimeRange.mjs.html +1 -1
  281. package/docs/getUserAgent.mjs.html +1 -1
  282. package/docs/getUserAgentDyn.mjs.html +1 -1
  283. package/docs/getltdtkeys.mjs.html +1 -1
  284. package/docs/global.html +1 -1
  285. package/docs/haskey.mjs.html +1 -1
  286. package/docs/html2str.mjs.html +1 -1
  287. package/docs/htmlDecode.mjs.html +1 -1
  288. package/docs/htmlEncode.mjs.html +1 -1
  289. package/docs/importResources.mjs.html +1 -1
  290. package/docs/index.html +1 -1
  291. package/docs/interp1.mjs.html +1 -1
  292. package/docs/isDate.mjs.html +1 -1
  293. package/docs/isDev.mjs.html +1 -1
  294. package/docs/isEle.mjs.html +1 -1
  295. package/docs/isEleExistByID.mjs.html +1 -1
  296. package/docs/isEmail.mjs.html +1 -1
  297. package/docs/isErr.mjs.html +1 -1
  298. package/docs/isIE.mjs.html +1 -1
  299. package/docs/isNarrow.mjs.html +1 -1
  300. package/docs/isStrHasCapital.mjs.html +1 -1
  301. package/docs/isStrHasLetter.mjs.html +1 -1
  302. package/docs/isStrHasLowerCase.mjs.html +1 -1
  303. package/docs/isStrHasNumber.mjs.html +1 -1
  304. package/docs/isStrHasSpace.mjs.html +1 -1
  305. package/docs/isStrHasSymbol.mjs.html +1 -1
  306. package/docs/isUserIdentify.mjs.html +1 -1
  307. package/docs/isUserName.mjs.html +1 -1
  308. package/docs/isUserPw.mjs.html +1 -1
  309. package/docs/isWindow.mjs.html +1 -1
  310. package/docs/isab.mjs.html +1 -1
  311. package/docs/isarr.mjs.html +1 -1
  312. package/docs/isarr0.mjs.html +1 -1
  313. package/docs/isarr1.mjs.html +1 -1
  314. package/docs/isbigint.mjs.html +1 -1
  315. package/docs/isblob.mjs.html +1 -1
  316. package/docs/isbol.mjs.html +1 -1
  317. package/docs/isday.mjs.html +1 -1
  318. package/docs/isearr.mjs.html +1 -1
  319. package/docs/iseobj.mjs.html +1 -1
  320. package/docs/iser.mjs.html +1 -1
  321. package/docs/isernot.mjs.html +1 -1
  322. package/docs/isestr.mjs.html +1 -1
  323. package/docs/isfile.mjs.html +1 -1
  324. package/docs/isfun.mjs.html +1 -1
  325. package/docs/isint.mjs.html +1 -1
  326. package/docs/ismonth.mjs.html +1 -1
  327. package/docs/isn0int.mjs.html +1 -1
  328. package/docs/isn0num.mjs.html +1 -1
  329. package/docs/isnan.mjs.html +1 -1
  330. package/docs/isnbr.mjs.html +1 -1
  331. package/docs/isnint.mjs.html +1 -1
  332. package/docs/isnnum.mjs.html +1 -1
  333. package/docs/isnull.mjs.html +1 -1
  334. package/docs/isnum.mjs.html +1 -1
  335. package/docs/isobj.mjs.html +1 -1
  336. package/docs/isobj0.mjs.html +1 -1
  337. package/docs/isp0int.mjs.html +1 -1
  338. package/docs/isp0num.mjs.html +1 -1
  339. package/docs/ispint.mjs.html +1 -1
  340. package/docs/ispm.mjs.html +1 -1
  341. package/docs/ispnum.mjs.html +1 -1
  342. package/docs/isstr.mjs.html +1 -1
  343. package/docs/isstr0.mjs.html +1 -1
  344. package/docs/istime.mjs.html +1 -1
  345. package/docs/istimeTZ.mjs.html +1 -1
  346. package/docs/istimems.mjs.html +1 -1
  347. package/docs/istimemsTZ.mjs.html +1 -1
  348. package/docs/isu16arr.mjs.html +1 -1
  349. package/docs/isu8arr.mjs.html +1 -1
  350. package/docs/isundefined.mjs.html +1 -1
  351. package/docs/j2o.mjs.html +1 -1
  352. package/docs/judge.mjs.html +1 -1
  353. package/docs/keysmat2ltdt.mjs.html +1 -1
  354. package/docs/ltdt2vrtsable.mjs.html +1 -1
  355. package/docs/ltdtDiff.mjs.html +1 -1
  356. package/docs/ltdtDiffByKey.mjs.html +1 -1
  357. package/docs/ltdtkeys2mat.mjs.html +1 -1
  358. package/docs/ltdtkeysheads2mat.mjs.html +1 -1
  359. package/docs/ltdtmapping.mjs.html +1 -1
  360. package/docs/ltdtmerge.mjs.html +1 -1
  361. package/docs/ltdtpick.mjs.html +1 -1
  362. package/docs/ltdtpull.mjs.html +1 -1
  363. package/docs/mat2ltdt.mjs.html +1 -1
  364. package/docs/matConcat.mjs.html +1 -1
  365. package/docs/matDiff.mjs.html +1 -1
  366. package/docs/matat.mjs.html +1 -1
  367. package/docs/now2str.mjs.html +1 -1
  368. package/docs/now2strp.mjs.html +1 -1
  369. package/docs/nowDay2str.mjs.html +1 -1
  370. package/docs/nowms2str.mjs.html +1 -1
  371. package/docs/nowms2strp.mjs.html +1 -1
  372. package/docs/o2j.mjs.html +1 -1
  373. package/docs/obj2b64.mjs.html +1 -1
  374. package/docs/obj2pb64.mjs.html +1 -1
  375. package/docs/obj2str.mjs.html +1 -1
  376. package/docs/obj2stru8arr.mjs.html +1 -1
  377. package/docs/obj2u8arr.mjs.html +1 -1
  378. package/docs/objSortBy.mjs.html +1 -1
  379. package/docs/objSortByKeys.mjs.html +1 -1
  380. package/docs/oo.mjs.html +1 -1
  381. package/docs/openLink.mjs.html +1 -1
  382. package/docs/pb642obj.mjs.html +1 -1
  383. package/docs/pmChain.mjs.html +1 -1
  384. package/docs/pmConvertResolve.mjs.html +1 -1
  385. package/docs/pmDebounce.mjs.html +1 -1
  386. package/docs/pmHook.mjs.html +1 -1
  387. package/docs/pmHookReject.mjs.html +1 -1
  388. package/docs/pmIni.mjs.html +1 -1
  389. package/docs/pmInvResolve.mjs.html +1 -1
  390. package/docs/pmKeyMutex.mjs.html +1 -1
  391. package/docs/pmMap.mjs.html +1 -1
  392. package/docs/pmQueue.mjs.html +1 -1
  393. package/docs/pmSeries.mjs.html +1 -1
  394. package/docs/pmThrottle.mjs.html +1 -1
  395. package/docs/pmTimeout.mjs.html +1 -1
  396. package/docs/preciseNum.mjs.html +1 -1
  397. package/docs/pseudoRandom.mjs.html +1 -1
  398. package/docs/pseudoRandomIntRange.mjs.html +1 -1
  399. package/docs/pseudoRandomIntsNdpRange.mjs.html +1 -1
  400. package/docs/pseudoRandomIntsRange.mjs.html +1 -1
  401. package/docs/pseudoRandomRange.mjs.html +1 -1
  402. package/docs/pseudoRandomsRange.mjs.html +1 -1
  403. package/docs/queue.mjs.html +1 -1
  404. package/docs/random.mjs.html +1 -1
  405. package/docs/randomIntRange.mjs.html +1 -1
  406. package/docs/randomIntsNdpRange.mjs.html +1 -1
  407. package/docs/randomIntsRange.mjs.html +1 -1
  408. package/docs/randomRange.mjs.html +1 -1
  409. package/docs/randomsRange.mjs.html +1 -1
  410. package/docs/rang.mjs.html +1 -1
  411. package/docs/rep.mjs.html +1 -1
  412. package/docs/repObj.mjs.html +1 -1
  413. package/docs/replace.mjs.html +1 -1
  414. package/docs/replaceObj.mjs.html +1 -1
  415. package/docs/replacePlus.mjs.html +1 -1
  416. package/docs/round.mjs.html +1 -1
  417. package/docs/secd.mjs.html +1 -1
  418. package/docs/sep.mjs.html +1 -1
  419. package/docs/sepInt.mjs.html +1 -1
  420. package/docs/setIntervalHp.mjs.html +1 -1
  421. package/docs/setTimeoutHp.mjs.html +1 -1
  422. package/docs/sind.mjs.html +1 -1
  423. package/docs/split.mjs.html +1 -1
  424. package/docs/str2aes.mjs.html +1 -1
  425. package/docs/str2b64.mjs.html +1 -1
  426. package/docs/str2hint.mjs.html +1 -1
  427. package/docs/str2md5.mjs.html +1 -1
  428. package/docs/str2obj.mjs.html +1 -1
  429. package/docs/str2sha.mjs.html +1 -1
  430. package/docs/str2sha512.mjs.html +1 -1
  431. package/docs/str2u8arr.mjs.html +1 -1
  432. package/docs/strCompare.mjs.html +1 -1
  433. package/docs/strCompareForVersion.mjs.html +1 -1
  434. package/docs/strDiff.mjs.html +1 -1
  435. package/docs/strDiffToHtml.mjs.html +1 -1
  436. package/docs/strFindFuzz.mjs.html +1 -1
  437. package/docs/strFindSimilar.mjs.html +1 -1
  438. package/docs/strTruncate.mjs.html +1 -1
  439. package/docs/strdelleft.mjs.html +1 -1
  440. package/docs/strdelright.mjs.html +1 -1
  441. package/docs/strleft.mjs.html +1 -1
  442. package/docs/strmid.mjs.html +1 -1
  443. package/docs/strright.mjs.html +1 -1
  444. package/docs/stru8arr2obj.mjs.html +1 -1
  445. package/docs/tand.mjs.html +1 -1
  446. package/docs/time2day.mjs.html +1 -1
  447. package/docs/time2hour.mjs.html +1 -1
  448. package/docs/time2min.mjs.html +1 -1
  449. package/docs/timeTZ2day.mjs.html +1 -1
  450. package/docs/timeTZ2expire.mjs.html +1 -1
  451. package/docs/timeTZ2hour.mjs.html +1 -1
  452. package/docs/timeTZ2min.mjs.html +1 -1
  453. package/docs/timeTZ2past.mjs.html +1 -1
  454. package/docs/timems2day.mjs.html +1 -1
  455. package/docs/timems2hour.mjs.html +1 -1
  456. package/docs/timems2min.mjs.html +1 -1
  457. package/docs/timems2time.mjs.html +1 -1
  458. package/docs/timemsTZ2day.mjs.html +1 -1
  459. package/docs/timemsTZ2expire.mjs.html +1 -1
  460. package/docs/timemsTZ2hour.mjs.html +1 -1
  461. package/docs/timemsTZ2min.mjs.html +1 -1
  462. package/docs/timemsTZ2past.mjs.html +1 -1
  463. package/docs/timemsTZ2time.mjs.html +1 -1
  464. package/docs/treeObj.mjs.html +1 -1
  465. package/docs/treeToFilepath.mjs.html +1 -1
  466. package/docs/trim.mjs.html +1 -1
  467. package/docs/u16arr2b64.mjs.html +1 -1
  468. package/docs/u16arr2u8arr.mjs.html +1 -1
  469. package/docs/u8arr2ab.mjs.html +1 -1
  470. package/docs/u8arr2b64.mjs.html +1 -1
  471. package/docs/u8arr2blob.mjs.html +1 -1
  472. package/docs/u8arr2bs.mjs.html +1 -1
  473. package/docs/u8arr2obj.mjs.html +1 -1
  474. package/docs/u8arr2str.mjs.html +1 -1
  475. package/docs/u8arr2u16arr.mjs.html +1 -1
  476. package/docs/urlParse.mjs.html +1 -1
  477. package/docs/verifyValue.mjs.html +1 -1
  478. package/docs/waitFun.mjs.html +1 -1
  479. package/docs/wsemi.html +464 -8
  480. package/package.json +1 -1
  481. package/src/getErrorMessage.mjs +562 -184
  482. package/test/getErrorMessage.test.mjs +673 -0
  483. package/toolfp/dist/wsemip.umd.js +1 -1
  484. package/toolparfor/dist/wpf.umd.js +1 -1
  485. 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.89
2
+ * wsemi v1.8.90
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
@@ -21,13 +21,13 @@ var ps,gs,ms=9e15,ys=1e9,vs="0123456789abcdef",As="2.302585092994045684017991454
21
21
  * Released under the MIT license
22
22
  *
23
23
  * Date: 2026-08-22T13:00:39.652Z
24
- */!function(e){e.exports=function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function s(e){var t=a(e,"string");return"symbol"==typeof t?t:t+""}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}var c={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},u='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>',f="undefined"!=typeof window&&void 0!==window.document,d=f?window:{},h=!(!f||!d.document.documentElement)&&"ontouchstart"in d.document.documentElement,p=!!f&&"PointerEvent"in d,g="viewer",m="move",y="switch",v="zoom",A="".concat(g,"-active"),b="".concat(g,"-close"),w="".concat(g,"-fade"),I="".concat(g,"-fixed"),x="".concat(g,"-fullscreen"),C="".concat(g,"-fullscreen-exit"),E="".concat(g,"-hide"),B="".concat(g,"-hide-md-down"),S="".concat(g,"-hide-sm-down"),k="".concat(g,"-hide-xs-down"),F="".concat(g,"-in"),D="".concat(g,"-invisible"),N="".concat(g,"-loading"),M="".concat(g,"-move"),Q="".concat(g,"-open"),T="".concat(g,"-show"),L="".concat(g,"-transition"),R="click",U="dblclick",H="dragstart",q="focusin",O="keydown",P="load",$="error",z=h?"touchend touchcancel":"mouseup",j=h?"touchmove":"mousemove",V=h?"touchstart":"mousedown",Y=p?"pointerdown":V,W=p?"pointermove":j,G=p?"pointerup pointercancel":z,J="resize",_="transitionend",X="wheel",K="ready",Z="show",ee="shown",te="hide",ne="hidden",re="view",ie="viewed",oe="move",ae="moved",se="rotate",le="rotated",ce="scale",ue="scaled",fe="zoom",de="zoomed",he="play",pe="stop",ge="".concat(g,"Action"),me=/\s+/,ye=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function ve(e){return"string"==typeof e}var Ae=Number.isNaN||d.isNaN;function be(e){return"number"==typeof e&&!Ae(e)}function we(e){return void 0===e}function Ie(e){return"object"===l(e)&&null!==e}var xe=Object.prototype.hasOwnProperty;function Ce(e){if(!Ie(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&xe.call(n,"isPrototypeOf")}catch(e){return!1}}function Ee(e){return"function"==typeof e}function Be(e,t){if(e&&Ee(t))if(Array.isArray(e)||be(e.length)){var n,r=e.length;for(n=0;n<r&&!1!==t.call(e,e[n],n,e);n+=1);}else Ie(e)&&Object.keys(e).forEach(function(n){t.call(e,e[n],n,e)});return e}var Se=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Ie(e)&&n.length>0&&n.forEach(function(t){Ie(t)&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e},ke=/^(?:width|height|left|top|marginLeft|marginTop)$/;function Fe(e,t){var n=e.style;Be(t,function(e,t){ke.test(t)&&be(e)&&(e+="px"),n[t]=e})}function De(e){return ve(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):e}function Ne(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.split(me).indexOf(t)>-1)}function Me(e,t){if(e&&t)if(be(e.length))Be(e,function(e){Me(e,t)});else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function Qe(e,t){if(e&&t)if(be(e.length))Be(e,function(e){Qe(e,t)});else if(e.classList)e.classList.remove(t);else{var n=e.className;n&&n.indexOf(t)>=0&&(e.className=n.split(me).filter(function(e){return e&&e!==t}).join(" "))}}function Te(e,t,n){t&&(be(e.length)?Be(e,function(e){Te(e,t,n)}):n?Me(e,t):Qe(e,t))}var Le=/([a-z\d])([A-Z])/g;function Re(e){return e.replace(Le,"$1-$2").toLowerCase()}function Ue(e,t){return Ie(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Re(t)))}function He(e,t,n){Ie(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(Re(t)),n)}var qe=function(){var e=!1;if(f){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});d.addEventListener("test",n,r),d.removeEventListener("test",n,r)}return e}();function Oe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(me).forEach(function(t){if(!qe){var o=e.listeners;o&&o[t]&&o[t][n]&&(i=o[t][n],delete o[t][n],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,i,r)})}function Pe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(me).forEach(function(t){if(r.once&&!qe){var o=e.listeners,a=void 0===o?{}:o;i=function(){delete a[t][n],e.removeEventListener(t,i,r);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(e,s)},a[t]||(a[t]={}),a[t][n]&&e.removeEventListener(t,a[t][n],r),a[t][n]=i,e.listeners=a}e.addEventListener(t,i,r)})}function $e(e,t,n,r){var i;return Ee(Event)&&Ee(CustomEvent)?i=new CustomEvent(t,o({bubbles:!0,cancelable:!0,detail:n},r)):(i=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(i)}function ze(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}function je(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,o=e.translateY,a=[];be(i)&&0!==i&&a.push("translateX(".concat(i,"px)")),be(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),be(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),be(n)&&1!==n&&a.push("scaleX(".concat(n,")")),be(r)&&1!==r&&a.push("scaleY(".concat(r,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function Ve(e){return ve(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}var Ye=d.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(d.navigator.userAgent);function We(e,t,n){var r=document.createElement("img");if(e.naturalWidth&&!Ye)return n(e.naturalWidth,e.naturalHeight),r;var i=document.body||document.documentElement;return r.onload=function(){n(r.width,r.height),Ye||i.removeChild(r)},Be(t.inheritedAttributes,function(t){var n=e.getAttribute(t);null!==n&&r.setAttribute(t,n)}),r.src=e.src,Ye||(r.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",i.appendChild(r)),r}function Ge(e){switch(e){case 2:return k;case 3:return S;case 4:return B;default:return""}}function Je(e){var t=o({},e),n=[];return Be(e,function(e,r){delete t[r],Be(t,function(t){var r=Math.abs(e.startX-t.startX),i=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(r*r+i*i),l=(Math.sqrt(o*o+a*a)-s)/s;n.push(l)})}),n.sort(function(e,t){return Math.abs(e)<Math.abs(t)}),n[0]}function _e(e,t){var n=e.pageX,r=e.pageY,i={endX:n,endY:r};return t?i:o({timeStamp:Date.now(),startX:n,startY:r},i)}function Xe(e){var t=0,n=0,r=0;return Be(e,function(e){var i=e.startX,o=e.startY;t+=i,n+=o,r+=1}),{pageX:t/=r,pageY:n/=r}}var Ke,Ze={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var e=this.element.ownerDocument,t=e.body||e.documentElement;this.body=t,this.scrollbarWidth=window.innerWidth-e.documentElement.clientWidth,this.initialBodyPaddingRight=t.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(t).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var e,t=this.options,n=this.parent;t.inline&&(e={width:Math.max(n.offsetWidth,t.minWidth),height:Math.max(n.offsetHeight,t.minHeight)},this.parentData=e),!this.fulled&&e||(e=this.containerData),this.viewerData=Se({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&Fe(this.viewer,this.viewerData)},initList:function(){var e=this,t=this.element,n=this.options,r=this.list,i=[];r.innerHTML="",Be(this.images,function(t,o){var a=t.src,s=t.alt||Ve(a),l=e.getImageURL(t);if(a||l){var c=document.createElement("li"),u=document.createElement("img");Be(n.inheritedAttributes,function(e){var n=t.getAttribute(e);null!==n&&u.setAttribute(e,n)}),n.navbar&&(u.src=a||l),u.alt=s,u.setAttribute("data-original-url",l||a),c.setAttribute("data-index",o),c.setAttribute("data-viewer-action","view"),c.setAttribute("role","button"),n.keyboard&&c.setAttribute("tabindex",0),c.appendChild(u),r.appendChild(c),i.push(c)}}),this.items=i,Be(i,function(t){var r,i,o=t.firstElementChild;He(o,"filled",!0),n.loading&&Me(t,N),Pe(o,P,r=function(r){Oe(o,$,i),n.loading&&Qe(t,N),e.loadImage(r)},{once:!0}),Pe(o,$,i=function(){Oe(o,P,r),n.loading&&Qe(t,N)},{once:!0})}),n.transition&&Pe(t,ie,function(){Me(r,L)},{once:!0})},renderList:function(){var e=this.index,t=this.items[e];if(t){var n=t.nextElementSibling,r=parseInt(window.getComputedStyle(n||t).marginLeft,10),i=t.offsetWidth,o=i+r;Fe(this.list,Se({width:o*this.length-r},je({translateX:(this.viewerData.width-i)/2-o*e})))}},resetList:function(){var e=this.list;e.innerHTML="",Qe(e,L),Fe(e,Se({width:0},je({translateX:0})))},initImage:function(e){var t,n=this,r=this.options,i=this.image,o=this.viewerData,a=this.footer.offsetHeight,s=o.width,l=Math.max(o.height-a,a),c=this.imageData||{};this.imageInitializing={abort:function(){t.onload=null}},t=We(i,r,function(t,i){var o=t/i,a=Math.max(0,Math.min(1,r.initialCoverage)),u=s,f=l;n.imageInitializing=!1,l*o>s?f=s/o:u=l*o,a=be(a)?a:.9,u=Math.min(u*a,t),f=Math.min(f*a,i);var d=(s-u)/2,h=(l-f)/2,p={left:d,top:h,x:d,y:h,width:u,height:f,oldRatio:1,ratio:u/t,aspectRatio:o,naturalWidth:t,naturalHeight:i},g=Se({},p);r.rotatable&&(p.rotate=c.rotate||0,g.rotate=0),r.scalable&&(p.scaleX=c.scaleX||1,p.scaleY=c.scaleY||1,g.scaleX=1,g.scaleY=1),n.imageData=p,n.initialImageData=g,e&&e()})},renderImage:function(e){var t=this,n=this.image,r=this.imageData;if(Fe(n,Se({width:r.width,height:r.height,marginLeft:r.x,marginTop:r.y},je(r))),e)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&Ne(n,L)){var i=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){Oe(n,_,i)}},Pe(n,_,i,{once:!0})}else e()},resetImage:function(){var e=this.image;e&&(this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null,this.title.innerHTML="")}},et={bind:function(){var e=this.options,t=this.viewer,n=this.canvas,r=this.element.ownerDocument;Pe(t,R,this.onClick=this.click.bind(this)),Pe(t,H,this.onDragStart=this.dragstart.bind(this)),Pe(n,Y,this.onPointerDown=this.pointerdown.bind(this)),Pe(r,W,this.onPointerMove=this.pointermove.bind(this)),Pe(r,G,this.onPointerUp=this.pointerup.bind(this)),Pe(r,O,this.onKeyDown=this.keydown.bind(this)),Pe(window,J,this.onResize=this.resize.bind(this)),e.zoomable&&e.zoomOnWheel&&Pe(t,X,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleOnDblclick&&Pe(n,U,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,n=this.canvas,r=this.element.ownerDocument;Oe(t,R,this.onClick),Oe(t,H,this.onDragStart),Oe(n,Y,this.onPointerDown),Oe(r,W,this.onPointerMove),Oe(r,G,this.onPointerUp),Oe(r,O,this.onKeyDown),Oe(window,J,this.onResize),e.zoomable&&e.zoomOnWheel&&Oe(t,X,this.onWheel,{passive:!1,capture:!0}),e.toggleOnDblclick&&Oe(n,U,this.onDblclick)}},tt={click:function(e){var t=this.options,n=this.imageData,r=e.target,i=Ue(r,ge);switch(i||"img"!==r.localName||"li"!==r.parentElement.localName||(i=Ue(r=r.parentElement,ge)),h&&e.isTrusted&&r===this.canvas&&clearTimeout(this.clickCanvasTimeout),i){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(Ue(r,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-n.scaleX||-1);break;case"flip-vertical":this.scaleY(-n.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(h&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(e.isTrusted?e:e.detail&&e.detail.originalEvent))},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,n=this.options,r=this.image,i=this.index,o=this.viewerData;Qe(r,D),n.loading&&Qe(this.canvas,N),r.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){Te(r,M,n.movable),Te(r,L,n.transition),e.renderImage(function(){e.viewed=!0,e.viewing=!1,Ee(n.viewed)&&Pe(t,ie,n.viewed,{once:!0}),$e(t,ie,{originalImage:e.images[i],index:i,image:r},{cancelable:!1})})})},loadImage:function(e){var t=e.target,n=t.parentNode,r=n.offsetWidth||30,i=n.offsetHeight||50,o=!!Ue(t,"filled");We(t,this.options,function(e,n){var a=e/n,s=r,l=i;i*a>r?o?s=i*a:l=r/a:o?l=r/a:s=i*a,Fe(t,Se({width:s,height:l},je({translateX:(r-s)/2,translateY:(i-l)/2})))})},keydown:function(e){var t=this.options;if(t.keyboard){var n=e.keyCode||e.which||e.charCode;if(13===n&&this.viewer.contains(e.target)&&this.click(e),this.fulled)switch(n){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},pointerdown:function(e){var t=this.options,n=this.pointers,r=e.buttons,i=e.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(be(r)&&1!==r||be(i)&&0!==i||e.ctrlKey))){e.preventDefault(),e.changedTouches?Be(e.changedTouches,function(e){n[e.identifier]=_e(e)}):n[e.pointerId||0]=_e(e);var o=!!t.movable&&m;t.zoomOnTouch&&t.zoomable&&Object.keys(n).length>1?o=v:t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(o=y),!t.transition||o!==m&&o!==v||Qe(this.image,L),this.action=o}},pointermove:function(e){var t=this.pointers,n=this.action;this.viewed&&n&&(e.preventDefault(),e.changedTouches?Be(e.changedTouches,function(e){Se(t[e.identifier]||{},_e(e,!0))}):Se(t[e.pointerId||0]||{},_e(e,!0)),this.change(e))},pointerup:function(e){var t,n=this,r=this.options,i=this.action,o=this.pointers;e.changedTouches?Be(e.changedTouches,function(e){t=o[e.identifier],delete o[e.identifier]}):(t=o[e.pointerId||0],delete o[e.pointerId||0]),i&&(e.preventDefault(),!r.transition||i!==m&&i!==v||Me(this.image,L),this.action=!1,h&&i!==v&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),r.toggleOnDblclick&&this.viewed&&e.target===this.image?this.pointerMoved?this.imageClicked=!1:this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){$e(n.image,U,{originalEvent:e})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){n.imageClicked=!1},500)):(this.imageClicked=!1,r.backdrop&&"static"!==r.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){$e(n.canvas,R,{originalEvent:e})},50)))))},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();Be(this.player.getElementsByTagName("img"),function(t){Pe(t,P,e.loadImage.bind(e),{once:!0}),$e(t,P)})}},wheel:function(e){var t=this;if(this.viewed&&(e.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50);var n=Number(this.options.zoomRatio)||.1,r=1;e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),this.zoom(-r*n,!0,null,e)}}},nt={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,n=this.options;if(n.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;if(Ee(n.show)&&Pe(t,Z,n.show,{once:!0}),!1===$e(t,Z)||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var r=this.viewer;if(Qe(r,E),r.setAttribute("role","dialog"),r.setAttribute("aria-labelledby",this.title.id),r.setAttribute("aria-modal",!0),r.removeAttribute("aria-hidden"),n.transition&&!e){var i=this.shown.bind(this);this.transitioning={abort:function(){Oe(r,_,i),Qe(r,F)}},Me(r,L),r.initialOffsetWidth=r.offsetWidth,Pe(r,_,i,{once:!0}),Me(r,F)}else Me(r,F),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.element,r=this.options;if(r.inline||this.hiding||!this.isShown&&!this.showing)return this;if(Ee(r.hide)&&Pe(n,te,r.hide,{once:!0}),!1===$e(n,te))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var i=this.viewer,o=this.image,a=function(){Qe(i,F),e.hidden()};if(r.transition&&!t){var s=function(t){t&&t.target===i&&(Oe(i,_,s),e.hidden())},l=function(){Ne(i,L)?(Pe(i,_,s),Qe(i,F)):a()};this.transitioning={abort:function(){e.viewed&&Ne(o,L)?Oe(o,_,l):Ne(i,L)&&Oe(i,_,s)}},this.viewed&&Ne(o,L)?(Pe(o,_,l,{once:!0}),this.zoomTo(0,!1,null,null,!0)):l()}else a();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var n=this.element,r=this.options,i=this.title,o=this.canvas,a=this.items[t],s=a.querySelector("img"),l=Ue(s,"originalUrl"),c=s.getAttribute("alt"),u=document.createElement("img");if(Be(r.inheritedAttributes,function(e){var t=s.getAttribute(e);null!==t&&u.setAttribute(e,t)}),u.src=l,u.alt=c,Ee(r.view)&&Pe(n,re,r.view,{once:!0}),!1===$e(n,re,{originalImage:this.images[t],index:t,image:u})||!this.isShown||this.hiding||this.played)return this;var f=this.items[this.index];f&&(Qe(f,A),f.removeAttribute("aria-selected")),Me(a,A),a.setAttribute("aria-selected",!0),r.focus&&a.focus(),this.image=u,this.viewed=!1,this.index=t,this.imageData={},Me(u,D),r.loading&&Me(o,N),o.innerHTML="",o.appendChild(u),this.renderList(),i.innerHTML="";var d,h,p=function(){var t=e.imageData,n=Array.isArray(r.title)?r.title[1]:r.title;i.innerHTML=De(Ee(n)?n.call(e,u,t):"".concat(c," (").concat(t.naturalWidth," × ").concat(t.naturalHeight,")"))};return Pe(n,ie,p,{once:!0}),this.viewing={abort:function(){Oe(n,ie,p),u.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(u.src="",Oe(u,P,d),e.timeout&&clearTimeout(e.timeout))}},u.complete?this.load():(Pe(u,P,d=function(){Oe(u,$,h),e.load()},{once:!0}),Pe(u,$,h=function(){Oe(u,P,d),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1),Qe(u,D),r.loading&&Qe(e.canvas,N)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){Qe(u,D),e.timeout=!1},1e3)),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,n=this.index+1;return n>t&&(n=e?0:t),this.view(n),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData;return this.moveTo(we(e)?e:n.x+Number(e),we(t)?t:n.y+Number(t)),this},moveTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.element,o=this.options,a=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&o.movable){var s=a.x,l=a.y,c=!1;if(be(e)?c=!0:e=s,be(n)?c=!0:n=l,c){if(Ee(o.move)&&Pe(i,oe,o.move,{once:!0}),!1===$e(i,oe,{x:e,y:n,oldX:s,oldY:l,originalEvent:r}))return this;a.x=e,a.y=n,a.left=e,a.top=n,this.moving=!0,this.renderImage(function(){t.moving=!1,Ee(o.moved)&&Pe(i,ae,o.moved,{once:!0}),$e(i,ae,{x:e,y:n,oldX:s,oldY:l,originalEvent:r},{cancelable:!1})})}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,n=this.element,r=this.options,i=this.imageData;if(be(e=Number(e))&&this.viewed&&!this.played&&r.rotatable){var o=i.rotate;if(Ee(r.rotate)&&Pe(n,se,r.rotate,{once:!0}),!1===$e(n,se,{degree:e,oldDegree:o}))return this;i.rotate=e,this.rotating=!0,this.renderImage(function(){t.rotating=!1,Ee(r.rotated)&&Pe(n,le,r.rotated,{once:!0}),$e(n,le,{degree:e,oldDegree:o},{cancelable:!1})})}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=this.element,i=this.options,o=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&i.scalable){var a=o.scaleX,s=o.scaleY,l=!1;if(be(e)?l=!0:e=a,be(n)?l=!0:n=s,l){if(Ee(i.scale)&&Pe(r,ce,i.scale,{once:!0}),!1===$e(r,ce,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s}))return this;o.scaleX=e,o.scaleY=n,this.scaling=!0,this.renderImage(function(){t.scaling=!1,Ee(i.scaled)&&Pe(r,ue,i.scaled,{once:!0}),$e(r,ue,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s},{cancelable:!1})})}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(i.width*e/i.naturalWidth,t,n,r),this},zoomTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=this.element,s=this.options,l=this.pointers,c=this.imageData,u=c.x,f=c.y,d=c.width,h=c.height,p=c.naturalWidth,g=c.naturalHeight;if(be(e=Math.max(0,e))&&this.viewed&&!this.played&&(o||s.zoomable)){if(!o){var m=Math.max(.01,s.minZoomRatio),y=Math.min(100,s.maxZoomRatio);e=Math.min(Math.max(e,m),y)}if(i)switch(i.type){case"wheel":s.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);break;case"pointermove":case"touchmove":case"mousemove":e>.99&&e<1.01&&(e=1)}var v=p*e,A=g*e,b=v-d,w=A-h,I=c.ratio;if(Ee(s.zoom)&&Pe(a,fe,s.zoom,{once:!0}),!1===$e(a,fe,{ratio:e,oldRatio:I,originalEvent:i}))return this;if(this.zooming=!0,i){var x=ze(this.viewer),C=l&&Object.keys(l).length>0?Xe(l):{pageX:i.pageX,pageY:i.pageY};c.x-=b*((C.pageX-x.left-u)/d),c.y-=w*((C.pageY-x.top-f)/h)}else Ce(r)&&be(r.x)&&be(r.y)?(c.x-=b*((r.x-u)/d),c.y-=w*((r.y-f)/h)):(c.x-=b/2,c.y-=w/2);c.left=c.x,c.top=c.y,c.width=v,c.height=A,c.oldRatio=I,c.ratio=e,this.renderImage(function(){t.zooming=!1,Ee(s.zoomed)&&Pe(a,de,s.zoomed,{once:!0}),$e(a,de,{ratio:e,oldRatio:I,originalEvent:i},{cancelable:!1})}),n&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var n=this.element,r=this.options;if(Ee(r.play)&&Pe(n,he,r.play,{once:!0}),!1===$e(n,he))return this;var i=this.player,o=this.loadImage.bind(this),a=[],s=0,l=0;if(this.played=!0,this.onLoadWhenPlay=o,t&&this.requestFullscreen(t),Me(i,T),Be(this.items,function(e,t){var n=e.querySelector("img"),c=document.createElement("img");c.src=Ue(n,"originalUrl"),c.alt=n.getAttribute("alt"),c.referrerPolicy=n.referrerPolicy,s+=1,Me(c,w),Te(c,L,r.transition),Ne(e,A)&&(Me(c,F),l=t),a.push(c),Pe(c,P,o,{once:!0}),i.appendChild(c)}),be(r.interval)&&r.interval>0){var c=function(){clearTimeout(e.playing.timeout),Qe(a[l],F),Me(a[l=(l-=1)>=0?l:s-1],F),e.playing.timeout=setTimeout(c,r.interval)},u=function(){clearTimeout(e.playing.timeout),Qe(a[l],F),Me(a[l=(l+=1)<s?l:0],F),e.playing.timeout=setTimeout(u,r.interval)};s>1&&(this.playing={prev:c,next:u,timeout:setTimeout(u,r.interval)})}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,n=this.options;if(Ee(n.stop)&&Pe(t,pe,n.stop,{once:!0}),!1===$e(t,pe))return this;var r=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,Be(r.getElementsByTagName("img"),function(t){Oe(t,P,e.onLoadWhenPlay)}),Qe(r,T),r.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,n=this.viewer,r=this.image,i=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),Me(this.button,C),t.transition&&(Qe(i,L),this.viewed&&Qe(r,L)),Me(n,I),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("style"),Fe(n,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=Se({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){Me(r,L),Me(i,L)},0)})})),this},exit:function(){var e=this,t=this.options,n=this.viewer,r=this.image,i=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),Qe(this.button,C),t.transition&&(Qe(i,L),this.viewed&&Qe(r,L)),t.focus&&this.clearEnforceFocus(),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),Qe(n,I),Fe(n,{zIndex:t.zIndexInline}),this.viewerData=Se({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){Me(r,L),Me(i,L)},0)})}),this):this},tooltip:function(){var e=this,t=this.options,n=this.tooltipBox,r=this.imageData;return this.viewed&&!this.played&&t.tooltip?(n.textContent="".concat(Math.round(100*r.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&$e(n,_),Me(n,T),Me(n,w),Me(n,L),n.removeAttribute("aria-hidden"),n.initialOffsetWidth=n.offsetWidth,Me(n,F)):(Me(n,T),n.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){t.transition?(Pe(n,_,function(){Qe(n,T),Qe(n,w),Qe(n,L),n.setAttribute("aria-hidden",!0),e.fading=!1},{once:!0}),Qe(n,F),e.fading=!0):(Qe(n,T),n.setAttribute("aria-hidden",!0)),e.tooltipping=!1},1e3),this):this},toggle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0,null,e):this.zoomTo(1,!0,null,e),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=Se({},this.initialImageData),this.renderImage()),this},update:function(){var e=this,t=this.element,n=this.options,r=this.isImg;if(r&&!t.parentNode)return this.destroy();var i=[];if(Be(r?[t]:t.querySelectorAll("img"),function(t){Ee(n.filter)?n.filter.call(e,t)&&i.push(t):e.getImageURL(t)&&i.push(t)}),!i.length)return this;if(this.images=i,this.length=i.length,this.ready){var o=[];if(Be(this.items,function(e,t){var n=e.querySelector("img"),r=i[t];r&&n&&r.src===n.src&&r.alt===n.alt||o.push(t)}),Fe(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var a=o.indexOf(this.index);if(a>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-a,this.length-1),0));else{var s=this.items[this.index];Me(s,A),s.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e[g]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||(Oe(e,R,this.onElementClick),Oe(e,O,this.onElementKeyDown)),e[g]=void 0,this):this}},rt={getImageURL:function(e){var t=this.options.url;return t=ve(t)?e.getAttribute(t):Ee(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),Pe(document,q,this.onFocusin=function(t){var n=e.viewer,r=t.target;if(r!==document&&r!==n&&!n.contains(r)){for(;r;){if(null!==r.getAttribute("tabindex")||"true"===r.getAttribute("aria-modal"))return;r=r.parentElement}n.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(Oe(document,q,this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;Me(e,Q),this.scrollbarWidth>0&&(e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var e=this.body;Qe(e,Q),this.scrollbarWidth>0&&(e.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var e=this.element,t=this.options,n=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(n.focus(),this.enforceFocus()),Ee(t.shown)&&Pe(e,ee,t.shown,{once:!0}),!1!==$e(e,ee)&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var e=this.element,t=this.options,n=this.viewer,r=n.ownerDocument.activeElement;r&&n.contains(r)&&Ee(r.blur)&&r.blur(),t.focus&&this.clearEnforceFocus(),this.close(),this.unbind(),Me(n,E),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),n.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(Ee(t.hidden)&&Pe(e,ne,t.hidden,{once:!0}),$e(e,ne,null,{cancelable:!1}))},requestFullscreen:function(e){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var n=t.documentElement;n.requestFullscreen?Ce(e)?n.requestFullscreen(e):n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen()}},exitFullscreen:function(){var e=this.element.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,n=this.pointers,r=n[Object.keys(n)[0]];if(r){var i=r.endX-r.startX,o=r.endY-r.startY;switch(this.action){case m:0===i&&0===o||(this.pointerMoved=!0,this.move(i,o,e));break;case v:this.zoom(Je(n),!1,null,e);break;case y:this.action="switched";var a=Math.abs(i);a>1&&a>Math.abs(o)&&(this.pointers={},i>1?this.prev(t.loop):i<-1&&this.next(t.loop))}Be(n,function(e){e.startX=e.endX,e.startY=e.endY})}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},it=d.Viewer,ot=(Ke=-1,function(){return Ke+=1}),at=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!n||1!==n.nodeType)throw new Error("The first argument is required and must be an element.");this.element=n,this.options=Se({},c,Ce(r)&&r),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=ot(),this.init()}return n(t,[{key:"init",value:function(){var e=this,t=this.element,n=this.options;if(!t[g]){t[g]=this,n.focus&&!n.keyboard&&(n.focus=!1);var r="img"===t.localName,i=[];if(Be(r?[t]:t.querySelectorAll("img"),function(t){Ee(n.filter)?n.filter.call(e,t)&&i.push(t):e.getImageURL(t)&&i.push(t)}),this.isImg=r,this.length=i.length,this.images=i,this.initBody(),we(document.createElement(g).style.transition)&&(n.transition=!1),n.inline){var o=0,a=function(){var t;(o+=1)===e.length&&(e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout(function(){e.delaying=!1,e.build()},0))};this.initializing={abort:function(){Be(i,function(e){e.complete||(Oe(e,P,a),Oe(e,$,a))})}},Be(i,function(e){var t,n;e.complete?a():(Pe(e,P,t=function(){Oe(e,$,n),a()},{once:!0}),Pe(e,$,n=function(){Oe(e,P,t),a()},{once:!0}))})}else Pe(t,R,this.onElementClick=function(t){var r=t.target;"img"!==r.localName||Ee(n.filter)&&!n.filter.call(e,r)||e.view(e.images.indexOf(r))}),Pe(t,O,this.onElementKeyDown=function(t){var r=t.target,i=t.key;"img"!==r.localName||"Enter"!==i&&" "!==i||(t.preventDefault(),Ee(n.filter)&&!n.filter.call(e,r)||e.view(e.images.indexOf(r)))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,n=e.parentNode,r=document.createElement("div");r.innerHTML=u;var i=r.querySelector(".".concat(g,"-container")),o=i.querySelector(".".concat(g,"-title")),a=i.querySelector(".".concat(g,"-toolbar")),s=i.querySelector(".".concat(g,"-navbar")),l=i.querySelector(".".concat(g,"-button")),c=i.querySelector(".".concat(g,"-canvas"));if(this.parent=n,this.viewer=i,this.title=o,this.toolbar=a,this.navbar=s,this.button=l,this.canvas=c,this.footer=i.querySelector(".".concat(g,"-footer")),this.tooltipBox=i.querySelector(".".concat(g,"-tooltip")),this.player=i.querySelector(".".concat(g,"-player")),this.list=i.querySelector(".".concat(g,"-list")),i.id="".concat(g).concat(this.id),o.id="".concat(g,"Title").concat(this.id),Me(o,t.title?Ge(Array.isArray(t.title)?t.title[0]:t.title):E),Me(s,t.navbar?Ge(t.navbar):E),Te(l,E,!t.button),t.keyboard&&l.setAttribute("tabindex",0),t.backdrop&&(Me(i,"".concat(g,"-backdrop")),t.inline||"static"===t.backdrop||He(c,ge,"hide")),ve(t.className)&&t.className&&t.className.split(me).forEach(function(e){Me(i,e)}),t.toolbar){var f=document.createElement("ul"),d=Ce(t.toolbar),h=ye.slice(0,3),p=ye.slice(7,9),m=ye.slice(9);d||Me(a,Ge(t.toolbar)),Be(d?t.toolbar:ye,function(e,n){var r=d&&Ce(e),i=d?Re(n):e,o=r&&!we(e.show)?e.show:e;if(o&&(t.zoomable||-1===h.indexOf(i))&&(t.rotatable||-1===p.indexOf(i))&&(t.scalable||-1===m.indexOf(i))){var a=r&&!we(e.size)?e.size:e,s=r&&!we(e.click)?e.click:e,l=document.createElement("li");t.keyboard&&l.setAttribute("tabindex",0),l.setAttribute("role","button"),Me(l,"".concat(g,"-").concat(i)),Ee(s)||He(l,ge,i),be(o)&&Me(l,Ge(o)),-1!==["small","large"].indexOf(a)?Me(l,"".concat(g,"-").concat(a)):"play"===i&&Me(l,"".concat(g,"-large")),Ee(s)&&Pe(l,R,s),f.appendChild(l)}}),a.appendChild(f)}else Me(a,E);if(!t.rotatable){var y=a.querySelectorAll('li[class*="rotate"]');Me(y,D),Be(y,function(e){a.appendChild(e)})}if(t.inline)Me(l,x),Fe(i,{zIndex:t.zIndexInline}),"static"===window.getComputedStyle(n).position&&Fe(n,{position:"relative"}),n.insertBefore(i,e.nextSibling);else{Me(l,b),Me(i,I),Me(i,w),Me(i,E),Fe(i,{zIndex:t.zIndex});var v=t.container;ve(v)&&(v=e.ownerDocument.querySelector(v)),v||(v=this.body),v.appendChild(i)}t.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,Ee(t.ready)&&Pe(e,K,t.ready,{once:!0}),!1!==$e(e,K)?this.ready&&t.inline&&this.view(this.index):this.ready=!1}}}],[{key:"noConflict",value:function(){return window.Viewer=it,t}},{key:"setDefaults",value:function(e){Se(c,Ce(e)&&e)}}])}();return Se(at.prototype,Ze,et,tt,nt,rt),at}()}(Ty);var Ly=Er(Ty.exports);function Ry(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}function Uy(e,t,n){(void 0!==n&&!Z(e[t],n)||void 0===n&&!(t in e))&&ei(e,t,n)}function Hy(e){return F(e)&&dt(e)}function qy(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Oy(e,t,n,r,i,o,a){var s=qy(e,n),l=qy(t,n),c=a.get(l);if(c)Uy(e,n,c);else{var u,f=o?o(s,l,n+"",e,t,a):void 0,d=void 0===f;if(d){var h=y(l),p=!h&&Ye(l),g=!h&&!p&&rt(l);f=l,h||p||g?y(s)?f=s:Hy(s)?f=Cn(s):p?(d=!1,f=fi(l,!0)):g?(d=!1,f=bi(l,!0)):f=[]:yu(l)||$e(l)?(f=s,$e(s)?f=ri(u=s,ai(u)):T(s)&&!L(s)||(f=Ci(l))):d=!1}d&&(a.set(l,f),i(f,l,r,o,a),a.delete(l)),Uy(e,n,f)}}function Py(e,t,n,r,i){e!==t&&Le(t,function(o,a){if(i||(i=new yt),T(o))Oy(e,t,a,n,Py,r,i);else{var s=r?r(qy(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Uy(e,a,s)}},ai)}Ry("/*!\n * Viewer.js v1.12.0\n * https://fengyuanchen.github.io/viewerjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2026-08-22T13:00:37.884Z\n */\n\n.viewer-zoom-in::before, .viewer-zoom-out::before, .viewer-one-to-one::before, .viewer-reset::before, .viewer-prev::before, .viewer-play::before, .viewer-next::before, .viewer-rotate-left::before, .viewer-rotate-right::before, .viewer-flip-horizontal::before, .viewer-flip-vertical::before, .viewer-fullscreen::before, .viewer-fullscreen-exit::before, .viewer-close::before {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 560 40%22%3E%3Cpath fill%3D%22%23fff%22 d%3D%22M49.6 17.9h20.2v3.9H49.6zm123.1 2 10.9-11 2.7 2.8-8.2 8.2 8.2 8.2-2.7 2.7-10.9-10.9zm94 0-10.8-11-2.7 2.8 8.1 8.2-8.1 8.2 2.7 2.7 10.8-10.9zM212 9.3l20.1 10.6L212 30.5V9.3zm161.5 4.6-7.2 6 7.2 5.9v-4h12.4v4l7.3-5.9-7.3-6v4h-12.4v-4zm40.2 12.3 5.9 7.2 5.9-7.2h-4V13.6h4l-5.9-7.3-5.9 7.3h4v12.6h-4zm35.9-16.5h6.3v2h-4.3V16h-2V9.7Zm14 0h6.2V16h-2v-4.3h-4.2v-2Zm6.2 14V30h-6.2v-2h4.2v-4.3h2Zm-14 6.3h-6.2v-6.3h2v4.4h4.3v2Zm-438 .1v-8.3H9.6v-3.9h8.2V9.7h3.9v8.2h8.1v3.9h-8.1v8.3h-3.9zM93.6 9.7h-5.8v3.9h2V30h3.8V9.7zm16.1 0h-5.8v3.9h1.9V30h3.9V9.7zm-11.9 4.1h3.9v3.9h-3.9zm0 8.2h3.9v3.9h-3.9zm244.6-11.7 7.2 5.9-7.2 6v-3.6c-5.4-.4-7.8.8-8.7 2.8-.8 1.7-1.8 4.9 2.8 8.2-6.3-2-7.5-6.9-6-11.3 1.6-4.4 8-5 11.9-4.9v-3.1Zm147.2 13.4h6.3V30h-2v-4.3h-4.3v-2zm14 6.3v-6.3h6.2v2h-4.3V30h-1.9zm6.2-14h-6.2V9.7h1.9V14h4.3v2zm-13.9 0h-6.3v-2h4.3V9.7h2V16zm33.3 12.5 8.6-8.6-8.6-8.7 1.9-1.9 8.6 8.7 8.6-8.7 1.9 1.9-8.6 8.7 8.6 8.6-1.9 2-8.6-8.7-8.6 8.7-1.9-2zM297 10.3l-7.1 5.9 7.2 6v-3.6c5.3-.4 7.7.8 8.7 2.8.8 1.7 1.7 4.9-2.9 8.2 6.3-2 7.5-6.9 6-11.3-1.6-4.4-7.9-5-11.8-4.9v-3.1Zm-157.3-.6c2.3 0 4.4.7 6 2l2.5-3 1.9 9.2h-9.3l2.6-3.1a6.2 6.2 0 0 0-9.9 5.1c0 3.4 2.8 6.3 6.2 6.3 2.8 0 5.1-1.9 6-4.4h4c-1 4.7-5 8.3-10 8.3a10 10 0 0 1-10-10.2 10 10 0 0 1 10-10.2Z%22%2F%3E%3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-size: 280px;\n color: transparent;\n display: block;\n font-size: 0;\n height: 20px;\n line-height: 0;\n width: 20px;\n }\n\n.viewer-zoom-in::before {\n background-position: 0 0;\n content: 'Zoom In';\n}\n\n.viewer-zoom-out::before {\n background-position: -20px 0;\n content: 'Zoom Out';\n}\n\n.viewer-one-to-one::before {\n background-position: -40px 0;\n content: 'One to One';\n}\n\n.viewer-reset::before {\n background-position: -60px 0;\n content: 'Reset';\n}\n\n.viewer-prev::before {\n background-position: -80px 0;\n content: 'Previous';\n}\n\n.viewer-play::before {\n background-position: -100px 0;\n content: 'Play';\n}\n\n.viewer-next::before {\n background-position: -120px 0;\n content: 'Next';\n}\n\n.viewer-rotate-left::before {\n background-position: -140px 0;\n content: 'Rotate Left';\n}\n\n.viewer-rotate-right::before {\n background-position: -160px 0;\n content: 'Rotate Right';\n}\n\n.viewer-flip-horizontal::before {\n background-position: -180px 0;\n content: 'Flip Horizontal';\n}\n\n.viewer-flip-vertical::before {\n background-position: -200px 0;\n content: 'Flip Vertical';\n}\n\n.viewer-fullscreen::before {\n background-position: -220px 0;\n content: 'Enter Full Screen';\n}\n\n.viewer-fullscreen-exit::before {\n background-position: -240px 0;\n content: 'Exit Full Screen';\n}\n\n.viewer-close::before {\n background-position: -260px 0;\n content: 'Close';\n}\n\n.viewer-container {\n bottom: 0;\n direction: ltr;\n font-size: 0;\n left: 0;\n line-height: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n -webkit-tap-highlight-color: transparent;\n top: 0;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.viewer-container::-moz-selection, .viewer-container *::-moz-selection {\n background-color: transparent;\n }\n\n.viewer-container::selection,\n .viewer-container *::selection {\n background-color: transparent;\n }\n\n.viewer-container:focus {\n outline: 0;\n }\n\n.viewer-container img {\n display: block;\n height: auto;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n }\n\n.viewer-canvas {\n bottom: 0;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.viewer-canvas > img {\n height: auto;\n margin: 15px auto;\n max-width: 90% !important;\n width: auto;\n }\n\n.viewer-footer {\n bottom: 0;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n text-align: center;\n}\n\n.viewer-navbar {\n background-color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.viewer-list {\n box-sizing: content-box;\n height: 50px;\n margin: 0;\n overflow: hidden;\n padding: 1px 0;\n}\n\n.viewer-list > li {\n color: transparent;\n cursor: pointer;\n float: left;\n font-size: 0;\n height: 50px;\n line-height: 0;\n opacity: 0.5;\n overflow: hidden;\n transition: opacity 0.15s;\n width: 30px;\n }\n\n.viewer-list > li:focus,\n .viewer-list > li:hover {\n opacity: 0.75;\n }\n\n.viewer-list > li:focus {\n outline: 0;\n }\n\n.viewer-list > li + li {\n margin-left: 1px;\n }\n\n.viewer-list > .viewer-loading {\n position: relative;\n }\n\n.viewer-list > .viewer-loading::after {\n border-width: 2px;\n height: 20px;\n margin-left: -10px;\n margin-top: -10px;\n width: 20px;\n }\n\n.viewer-list > .viewer-active,\n .viewer-list > .viewer-active:focus,\n .viewer-list > .viewer-active:hover {\n opacity: 1;\n }\n\n.viewer-player {\n background-color: #000;\n bottom: 0;\n cursor: none;\n display: none;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 1;\n}\n\n.viewer-player > img {\n left: 0;\n position: absolute;\n top: 0;\n }\n\n.viewer-toolbar > ul {\n display: inline-block;\n margin: 0 auto 5px;\n overflow: hidden;\n padding: 6px 3px;\n }\n\n.viewer-toolbar > ul > li {\n background-color: rgba(0, 0, 0, 0.5);\n border-radius: 50%;\n cursor: pointer;\n float: left;\n height: 24px;\n overflow: hidden;\n transition: background-color 0.15s;\n width: 24px;\n }\n\n.viewer-toolbar > ul > li:focus,\n .viewer-toolbar > ul > li:hover {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n.viewer-toolbar > ul > li:focus {\n box-shadow: 0 0 3px #fff;\n outline: 0;\n position: relative;\n z-index: 1;\n }\n\n.viewer-toolbar > ul > li::before {\n margin: 2px;\n }\n\n.viewer-toolbar > ul > li + li {\n margin-left: 1px;\n }\n\n.viewer-toolbar > ul > .viewer-small {\n height: 18px;\n margin-bottom: 3px;\n margin-top: 3px;\n width: 18px;\n }\n\n.viewer-toolbar > ul > .viewer-small::before {\n margin: -1px;\n }\n\n.viewer-toolbar > ul > .viewer-large {\n height: 30px;\n margin-bottom: -3px;\n margin-top: -3px;\n width: 30px;\n }\n\n.viewer-toolbar > ul > .viewer-large::before {\n margin: 5px;\n }\n\n.viewer-tooltip {\n background-color: rgba(0, 0, 0, 0.8);\n border-radius: 10px;\n color: #fff;\n display: none;\n font-size: 12px;\n height: 20px;\n left: 50%;\n line-height: 20px;\n margin-left: -25px;\n margin-top: -10px;\n position: absolute;\n text-align: center;\n top: 50%;\n width: 50px;\n}\n\n.viewer-title {\n color: #ccc;\n display: inline-block;\n font-size: 12px;\n line-height: 1.2;\n margin: 5px 5%;\n max-width: 90%;\n min-height: 14px;\n opacity: 0.8;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: opacity 0.15s;\n white-space: nowrap;\n}\n\n.viewer-title:hover {\n opacity: 1;\n }\n\n.viewer-button {\n -webkit-app-region: no-drag;\n background-color: rgba(0, 0, 0, 0.5);\n border-radius: 50%;\n cursor: pointer;\n height: 80px;\n overflow: hidden;\n position: absolute;\n right: -40px;\n top: -40px;\n transition: background-color 0.15s;\n width: 80px;\n}\n\n.viewer-button:focus,\n .viewer-button:hover {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n.viewer-button:focus {\n box-shadow: 0 0 3px #fff;\n outline: 0;\n }\n\n.viewer-button::before {\n bottom: 15px;\n left: 15px;\n position: absolute;\n }\n\n.viewer-fixed {\n position: fixed;\n}\n\n.viewer-open {\n overflow: hidden;\n}\n\n.viewer-show {\n display: block;\n}\n\n.viewer-hide {\n display: none;\n}\n\n.viewer-backdrop {\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.viewer-invisible {\n visibility: hidden;\n}\n\n.viewer-move {\n cursor: move;\n cursor: grab;\n}\n\n.viewer-fade {\n opacity: 0;\n}\n\n.viewer-in {\n opacity: 1;\n}\n\n.viewer-transition {\n transition: all 0.3s;\n}\n\n@keyframes viewer-spinner {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.viewer-loading::after {\n animation: viewer-spinner 1s linear infinite;\n border: 4px solid rgba(255, 255, 255, 0.1);\n border-left-color: rgba(255, 255, 255, 0.5);\n border-radius: 50%;\n content: '';\n display: inline-block;\n height: 40px;\n left: 50%;\n margin-left: -20px;\n margin-top: -20px;\n position: absolute;\n top: 50%;\n width: 40px;\n z-index: 1;\n }\n\n@media (max-width: 767px) {\n .viewer-hide-xs-down {\n display: none;\n }\n}\n\n@media (max-width: 991px) {\n .viewer-hide-sm-down {\n display: none;\n }\n}\n\n@media (max-width: 1199px) {\n .viewer-hide-md-down {\n display: none;\n }\n}\n");var $y,zy=($y=function(e,t,n){Py(e,t,n)},ka(function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=$y.length>3&&"function"==typeof i?(r--,i):void 0,o&&pn(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var a=t[n];a&&$y(e,a,n,i)}return e}));async function jy(e,t=null,n={}){let r=!0,i=null,o=Ga();Be(n)||(n={});let a=Ae(n,"disTouchMoveToHide",null);if(po(a)||(a=4),a=ji(a),!Cu(e))return o.reject("eleImg is not a HTMLElement"),o;if(i=e,null!==t){if(!Cu(t))return o.reject("eleGroup is not a HTMLElement"),o;r=!1,i=t}if(!r){let e=or(t.querySelectorAll("img"));if(0===e)return o.reject("eleGroup does not contain any img"),o;1===e&&(r=!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};r||(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=zy(s,Ti(n)),s.shown=function(){(async()=>{let e=null;await ds(()=>(e=c.viewer,Cu(e)));let t=!1,n=0,r=0,i=0;e.addEventListener("touchstart",e=>{let i=e.touches[0];n=i.clientX,r=i.clientY,((e,t)=>{let n=document.elementsFromPoint(e,t).find(e=>"IMG"===e.tagName);if(!Cu(n))return!0;let r=n?.classList?.contains("viewer-move");return!r})(n,r)&&(t=!0)},{passive:!1}),e.addEventListener("touchmove",e=>{if(!t)return;let o=e.touches[0],a=o.clientX,s=o.clientY,l=a-n,c=s-r,u=Math.sqrt(l*l+c*c);i+=u,n=o.clientX,r=o.clientY},{passive:!1}),e.addEventListener("touchend",e=>{t&&(i<a&&(e.preventDefault(),e.stopPropagation(),c.hide(!0)),t=!1,i=0)},{passive:!1}),e.addEventListener("touchcancel",e=>{t=!1,i=0})})().catch(e=>{console.log(e)})};let l=!1;s.hide=function(){l||(l=!0,c.hide(!0))},s.hidden=function(){c.destroy(),o.resolve("close")};let c=new Ly(i,s);return c.show(),o}function Vy(e,t){let n=new MouseEvent(t,{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(n)}function Yy(e={}){let t=Ae(e,"kind","*"),n=Ae(e,"multiple");we(n)||(n=!1);let r=Ae(e,"entireHierarchy");we(r)||(r=!1),r&&!n&&(n=!0);let i=Ae(e,"sizeMbLimit");Ne(i)||(i=1e3),i=Ir(i);let o=Ga(),a="drf"+Tu(),s="GrpDomReadFile";dm(`[name=${s}]`);let l=Hm(t),c=`<div name="${s}" style="position:relative; width:0px; height:0px; overflow:hidden;"><input id="${a}" type="file" accept="${l}" ${n?"multiple":""} ${r?"webkitdirectory":""} style="opacity:0; position:absolute; top:-10000px; left:-10000px;"></div>`;ju(document.querySelector("body"),c);let u=Dm("#"+a),f=!1;function d(e){f=!0;let t=qm(this,i);o.resolve(t),u.removeEventListener("change",d,!0),u.removeEventListener("cancel",h,!0),r||window.removeEventListener("focus",p),dm(`[name=${s}]`)}function h(e){f||d.call(u,e)}function p(e){setTimeout(()=>{f||d.call(u,e)},1500)}return u.addEventListener("change",d,!0),u.addEventListener("cancel",h,!0),r||window.addEventListener("focus",p),Vy(u,"click"),o}function Wy(e){if(!ke(e))return!1;let n="YYYY-MM-DDTHH:mm:ss";return e===t(e,n).format(n)}_a()&&function(){try{return new MouseEvent("MouseEventPolyfillTest"),!1}catch(e){}let e=function(e,t){t=t||{bubbles:!1,cancelable:!1};let n=document.createEvent("MouseEvent");return n.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),n};e.prototype=Event.prototype,window.MouseEvent=e}();var Gy="top",Jy="bottom",_y="right",Xy="left",Ky="auto",Zy=[Gy,Jy,_y,Xy],ev="start",tv="end",nv="viewport",rv="popper",iv=Zy.reduce(function(e,t){return e.concat([t+"-"+ev,t+"-"+tv])},[]),ov=[].concat(Zy,[Ky]).reduce(function(e,t){return e.concat([t,t+"-"+ev,t+"-"+tv])},[]),av=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function sv(e){return e?(e.nodeName||"").toLowerCase():null}function lv(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function cv(e){return e instanceof lv(e).Element||e instanceof Element}function uv(e){return e instanceof lv(e).HTMLElement||e instanceof HTMLElement}function fv(e){return"undefined"!=typeof ShadowRoot&&(e instanceof lv(e).ShadowRoot||e instanceof ShadowRoot)}var dv={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];uv(i)&&sv(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});uv(r)&&sv(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function hv(e){return e.split("-")[0]}var pv=Math.max,gv=Math.min,mv=Math.round;function yv(){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 vv(){return!/^((?!chrome|android).)*safari/i.test(yv())}function Av(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&uv(e)&&(i=e.offsetWidth>0&&mv(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&mv(r.height)/e.offsetHeight||1);var a=(cv(e)?lv(e):window).visualViewport,s=!vv()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/i,c=(r.top+(s&&a?a.offsetTop:0))/o,u=r.width/i,f=r.height/o;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l,x:l,y:c}}function bv(e){var t=Av(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function wv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&fv(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Iv(e){return lv(e).getComputedStyle(e)}function xv(e){return["table","td","th"].indexOf(sv(e))>=0}function Cv(e){return((cv(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ev(e){return"html"===sv(e)?e:e.assignedSlot||e.parentNode||(fv(e)?e.host:null)||Cv(e)}function Bv(e){return uv(e)&&"fixed"!==Iv(e).position?e.offsetParent:null}function Sv(e){for(var t=lv(e),n=Bv(e);n&&xv(n)&&"static"===Iv(n).position;)n=Bv(n);return n&&("html"===sv(n)||"body"===sv(n)&&"static"===Iv(n).position)?t:n||function(e){var t=/firefox/i.test(yv());if(/Trident/i.test(yv())&&uv(e)&&"fixed"===Iv(e).position)return null;var n=Ev(e);for(fv(n)&&(n=n.host);uv(n)&&["html","body"].indexOf(sv(n))<0;){var r=Iv(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function kv(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Fv(e,t,n){return pv(e,gv(t,n))}function Dv(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Nv(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Mv={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=hv(n.placement),l=kv(s),c=[Xy,_y].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(e,t){return Dv("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Nv(e,Zy))}(i.padding,n),f=bv(o),d="y"===l?Gy:Xy,h="y"===l?Jy:_y,p=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],g=a[l]-n.rects.reference[l],m=Sv(o),y=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,v=p/2-g/2,A=u[d],b=y-f[c]-u[h],w=y/2-f[c]/2+v,I=Fv(A,w,b),x=l;n.modifiersData[r]=((t={})[x]=I,t.centerOffset=I-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&wv(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qv(e){return e.split("-")[1]}var Tv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Lv(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=a.x,h=void 0===d?0:d,p=a.y,g=void 0===p?0:p,m="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=m.x,g=m.y;var y=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),A=Xy,b=Gy,w=window;if(c){var I=Sv(n),x="clientHeight",C="clientWidth";if(I===lv(n)&&"static"!==Iv(I=Cv(n)).position&&"absolute"===s&&(x="scrollHeight",C="scrollWidth"),i===Gy||(i===Xy||i===_y)&&o===tv)b=Jy,g-=(f&&I===w&&w.visualViewport?w.visualViewport.height:I[x])-r.height,g*=l?1:-1;if(i===Xy||(i===Gy||i===Jy)&&o===tv)A=_y,h-=(f&&I===w&&w.visualViewport?w.visualViewport.width:I[C])-r.width,h*=l?1:-1}var E,B=Object.assign({position:s},c&&Tv),S=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:mv(n*i)/i||0,y:mv(r*i)/i||0}}({x:h,y:g},lv(n)):{x:h,y:g};return h=S.x,g=S.y,l?Object.assign({},B,((E={})[b]=v?"0":"",E[A]=y?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",E)):Object.assign({},B,((t={})[b]=v?g+"px":"",t[A]=y?h+"px":"",t.transform="",t))}var Rv={passive:!0};var Uv={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,l=lv(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,Rv)}),s&&l.addEventListener("resize",n.update,Rv),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,Rv)}),s&&l.removeEventListener("resize",n.update,Rv)}},data:{}},Hv={left:"right",right:"left",bottom:"top",top:"bottom"};function qv(e){return e.replace(/left|right|bottom|top/g,function(e){return Hv[e]})}var Ov={start:"end",end:"start"};function Pv(e){return e.replace(/start|end/g,function(e){return Ov[e]})}function $v(e){var t=lv(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function zv(e){return Av(Cv(e)).left+$v(e).scrollLeft}function jv(e){var t=Iv(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Vv(e){return["html","body","#document"].indexOf(sv(e))>=0?e.ownerDocument.body:uv(e)&&jv(e)?e:Vv(Ev(e))}function Yv(e,t){var n;void 0===t&&(t=[]);var r=Vv(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=lv(r),a=i?[o].concat(o.visualViewport||[],jv(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Yv(Ev(a)))}function Wv(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Gv(e,t,n){return t===nv?Wv(function(e,t){var n=lv(e),r=Cv(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=vv();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+zv(e),y:l}}(e,n)):cv(t)?function(e,t){var n=Av(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Wv(function(e){var t,n=Cv(e),r=$v(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=pv(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=pv(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+zv(e),l=-r.scrollTop;return"rtl"===Iv(i||n).direction&&(s+=pv(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(Cv(e)))}function Jv(e,t,n,r){var i="clippingParents"===t?function(e){var t=Yv(Ev(e)),n=["absolute","fixed"].indexOf(Iv(e).position)>=0&&uv(e)?Sv(e):e;return cv(n)?t.filter(function(e){return cv(e)&&wv(e,n)&&"body"!==sv(e)}):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(t,n){var i=Gv(e,n,r);return t.top=pv(i.top,t.top),t.right=gv(i.right,t.right),t.bottom=gv(i.bottom,t.bottom),t.left=pv(i.left,t.left),t},Gv(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function _v(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?hv(i):null,a=i?Qv(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Gy:t={x:s,y:n.y-r.height};break;case Jy:t={x:s,y:n.y+n.height};break;case _y:t={x:n.x+n.width,y:l};break;case Xy:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?kv(o):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case ev:t[c]=t[c]-(n[u]/2-r[u]/2);break;case tv:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function Xv(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?nv:c,f=n.elementContext,d=void 0===f?rv:f,h=n.altBoundary,p=void 0!==h&&h,g=n.padding,m=void 0===g?0:g,y=Dv("number"!=typeof m?m:Nv(m,Zy)),v=d===rv?"reference":rv,A=e.rects.popper,b=e.elements[p?v:d],w=Jv(cv(b)?b:b.contextElement||Cv(e.elements.popper),l,u,a),I=Av(e.elements.reference),x=_v({reference:I,element:A,strategy:"absolute",placement:i}),C=Wv(Object.assign({},A,x)),E=d===rv?C:I,B={top:w.top-E.top+y.top,bottom:E.bottom-w.bottom+y.bottom,left:w.left-E.left+y.left,right:E.right-w.right+y.right},S=e.modifiersData.offset;if(d===rv&&S){var k=S[i];Object.keys(B).forEach(function(e){var t=[_y,Jy].indexOf(e)>=0?1:-1,n=[Gy,Jy].indexOf(e)>=0?"y":"x";B[e]+=k[n]*t})}return B}function Kv(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?ov:l,u=Qv(r),f=u?s?iv:iv.filter(function(e){return Qv(e)===u}):Zy,d=f.filter(function(e){return c.indexOf(e)>=0});0===d.length&&(d=f);var h=d.reduce(function(t,n){return t[n]=Xv(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[hv(n)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}var Zv={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,m=t.options.placement,y=hv(m),v=l||(y===m||!p?[qv(m)]:function(e){if(hv(e)===Ky)return[];var t=qv(e);return[Pv(e),t,Pv(t)]}(m)),A=[m].concat(v).reduce(function(e,n){return e.concat(hv(n)===Ky?Kv(t,{placement:n,boundary:u,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)},[]),b=t.rects.reference,w=t.rects.popper,I=new Map,x=!0,C=A[0],E=0;E<A.length;E++){var B=A[E],S=hv(B),k=Qv(B)===ev,F=[Gy,Jy].indexOf(S)>=0,D=F?"width":"height",N=Xv(t,{placement:B,boundary:u,rootBoundary:f,altBoundary:d,padding:c}),M=F?k?_y:Xy:k?Jy:Gy;b[D]>w[D]&&(M=qv(M));var Q=qv(M),T=[];if(o&&T.push(N[S]<=0),s&&T.push(N[M]<=0,N[Q]<=0),T.every(function(e){return e})){C=B,x=!1;break}I.set(B,T)}if(x)for(var L=function(e){var t=A.find(function(t){var n=I.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return C=t,"break"},R=p?3:1;R>0;R--){if("break"===L(R))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function eA(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function tA(e){return[Gy,_y,Jy,Xy].some(function(t){return e[t]>=0})}var nA={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=ov.reduce(function(e,n){return e[n]=function(e,t,n){var r=hv(e),i=[Xy,Gy].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Xy,_y].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var rA={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,d=n.tether,h=void 0===d||d,p=n.tetherOffset,g=void 0===p?0:p,m=Xv(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),y=hv(t.placement),v=Qv(t.placement),A=!v,b=kv(y),w="x"===b?"y":"x",I=t.modifiersData.popperOffsets,x=t.rects.reference,C=t.rects.popper,E="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,B="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(I){if(o){var F,D="y"===b?Gy:Xy,N="y"===b?Jy:_y,M="y"===b?"height":"width",Q=I[b],T=Q+m[D],L=Q-m[N],R=h?-C[M]/2:0,U=v===ev?x[M]:C[M],H=v===ev?-C[M]:-x[M],q=t.elements.arrow,O=h&&q?bv(q):{width:0,height:0},P=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},$=P[D],z=P[N],j=Fv(0,x[M],O[M]),V=A?x[M]/2-R-j-$-B.mainAxis:U-j-$-B.mainAxis,Y=A?-x[M]/2+R+j+z+B.mainAxis:H+j+z+B.mainAxis,W=t.elements.arrow&&Sv(t.elements.arrow),G=W?"y"===b?W.clientTop||0:W.clientLeft||0:0,J=null!=(F=null==S?void 0:S[b])?F:0,_=Q+Y-J,X=Fv(h?gv(T,Q+V-J-G):T,Q,h?pv(L,_):L);I[b]=X,k[b]=X-Q}if(s){var K,Z="x"===b?Gy:Xy,ee="x"===b?Jy:_y,te=I[w],ne="y"===w?"height":"width",re=te+m[Z],ie=te-m[ee],oe=-1!==[Gy,Xy].indexOf(y),ae=null!=(K=null==S?void 0:S[w])?K:0,se=oe?re:te-x[ne]-C[ne]-ae+B.altAxis,le=oe?te+x[ne]+C[ne]-ae-B.altAxis:ie,ce=h&&oe?function(e,t,n){var r=Fv(e,t,n);return r>n?n:r}(se,te,le):Fv(h?se:re,te,h?le:ie);I[w]=ce,k[w]=ce-te}t.modifiersData[r]=k}},requiresIfExists:["offset"]};function iA(e,t,n){void 0===n&&(n=!1);var r,i,o=uv(t),a=uv(t)&&function(e){var t=e.getBoundingClientRect(),n=mv(t.width)/e.offsetWidth||1,r=mv(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=Cv(t),l=Av(e,a,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==sv(t)||jv(s))&&(c=(r=t)!==lv(r)&&uv(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:$v(r)),uv(t)?((u=Av(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=zv(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function oA(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),r}function aA(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var sA={placement:"bottom",modifiers:[],strategy:"absolute"};function lA(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function cA(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?sA:i;return function(e,t,n){void 0===n&&(n=o);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},sA,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:i,setOptions:function(n){var s="function"==typeof n?n(i.options):n;c(),i.options=Object.assign({},o,i.options,s),i.scrollParents={reference:cv(e)?Yv(e):e.contextElement?Yv(e.contextElement):[],popper:Yv(t)};var u,f,d=function(e){var t=oA(e);return av.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((u=[].concat(r,i.options.modifiers),f=u.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(f).map(function(e){return f[e]})));return i.orderedModifiers=d.filter(function(e){return e.enabled}),i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var s=o({state:i,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}}),l.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(lA(t,n)){i.rects={reference:iA(t,Sv(n),"fixed"===i.options.strategy),popper:bv(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var o=i.orderedModifiers[r],a=o.fn,c=o.options,u=void 0===c?{}:c,f=o.name;"function"==typeof a&&(i=a({state:i,options:u,name:f,instance:l})||i)}else i.reset=!1,r=-1}}},update:aA(function(){return new Promise(function(e){l.forceUpdate(),e(i)})}),destroy:function(){c(),s=!0}};if(!lA(e,t))return l;function c(){a.forEach(function(e){return e()}),a=[]}return l.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}}var uA=cA({defaultModifiers:[Uv,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=_v({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,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,c={placement:hv(t.placement),variation:Qv(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,Lv(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Lv(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},dv,nA,Zv,rA,Mv,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Xv(t,{elementContext:"reference"}),s=Xv(t,{altBoundary:!0}),l=eA(a,r),c=eA(s,i,o),u=tA(l),f=tA(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}}]}),fA="tippy-content",dA="tippy-arrow",hA="tippy-svg-arrow",pA={passive:!0,capture:!0},gA=function(){return document.body};function mA(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function yA(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function vA(e,t){return"function"==typeof e?e.apply(void 0,t):e}function AA(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)};var n}function bA(e){return[].concat(e)}function wA(e,t){-1===e.indexOf(t)&&e.push(t)}function IA(e){return[].slice.call(e)}function xA(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function CA(){return document.createElement("div")}function EA(e){return["Element","Fragment"].some(function(t){return yA(e,t)})}function BA(e){return EA(e)?[e]:function(e){return yA(e,"NodeList")}(e)?IA(e):Array.isArray(e)?e:IA(document.querySelectorAll(e))}function SA(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function kA(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function FA(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[r](t,n)})}function DA(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var NA={isTouch:!1},MA=0;function QA(){NA.isTouch||(NA.isTouch=!0,window.performance&&document.addEventListener("mousemove",TA))}function TA(){var e=performance.now();e-MA<20&&(NA.isTouch=!1,document.removeEventListener("mousemove",TA)),MA=e}function LA(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var RA,UA=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function HA(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 qA(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function OA(e){return qA("\n %ctippy.js\n\n %c"+qA(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function PA(e){return[OA(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function $A(e,t){var n;e&&!RA.has(t)&&(RA.add(t),(n=console).warn.apply(n,PA(t)))}function zA(e,t){var n;e&&!RA.has(t)&&(RA.add(t),(n=console).error.apply(n,PA(t)))}RA=new Set;var jA={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},VA=Object.assign({appendTo:gA,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},jA,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),YA=Object.keys(VA);function WA(e){var t=(e.plugins||[]).reduce(function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=VA[i])?r:o);return t},{});return Object.assign({},e,t)}function GA(e,t){var n=Object.assign({},t,{content:vA(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(WA(Object.assign({},VA,{plugins:t}))):YA).reduce(function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t},{})}(e,t.plugins));return n.aria=Object.assign({},VA.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function JA(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach(function(e){var n=function(e,t){var n=Object.assign({},e);return t.forEach(function(e){delete n[e]}),n}(VA,Object.keys(jA)),r=!function(e,t){return{}.hasOwnProperty.call(e,t)}(n,e);r&&(r=0===t.filter(function(t){return t.name===e}).length),$A(r,["`"+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 _A(e,t){e.innerHTML=t}function XA(e){var t=CA();return!0===e?t.className=dA:(t.className=hA,EA(e)?t.appendChild(e):_A(t,e)),t}function KA(e,t){EA(t.content)?(_A(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?_A(e,t.content):e.textContent=t.content)}function ZA(e){var t=e.firstElementChild,n=IA(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(fA)}),arrow:n.find(function(e){return e.classList.contains(dA)||e.classList.contains(hA)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function eb(e){var t=CA(),n=CA();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=CA();function i(n,r){var i=ZA(t),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||KA(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(XA(r.arrow))):o.appendChild(XA(r.arrow)):s&&o.removeChild(s)}return r.className=fA,r.setAttribute("data-state","hidden"),KA(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}eb.$$tippy=!0;var tb=1,nb=[],rb=[];function ib(e,t){var n,r,i,o,a,s,l,c,u=GA(e,Object.assign({},VA,WA(xA(t)))),f=!1,d=!1,h=!1,p=!1,g=[],m=AA(W,u.interactiveDebounce),y=tb++,v=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),A={id:y,reference:e,popper:CA(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){if($A(A.state.isDestroyed,HA("setProps")),A.state.isDestroyed)return;Q("onBeforeUpdate",[A,t]),V();var n=A.props,r=GA(e,Object.assign({},n,xA(t),{ignoreAttributes:!0}));A.props=r,j(),n.interactiveDebounce!==r.interactiveDebounce&&(R(),m=AA(W,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?bA(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):r.triggerTarget&&e.removeAttribute("aria-expanded");L(),M(),I&&I(n,r);A.popperInstance&&(X(),Z().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));Q("onAfterUpdate",[A,t])},setContent:function(e){A.setProps({content:e})},show:function(){$A(A.state.isDestroyed,HA("show"));var e=A.state.isVisible,t=A.state.isDestroyed,n=!A.state.isEnabled,r=NA.isTouch&&!A.props.touch,i=mA(A.props.duration,0,VA.duration);if(e||t||n||r)return;if(k().hasAttribute("disabled"))return;if(Q("onShow",[A],!1),!1===A.props.onShow(A))return;A.state.isVisible=!0,S()&&(w.style.visibility="visible");M(),O(),A.state.isMounted||(w.style.transition="none");if(S()){var o=D();SA([o.box,o.content],0)}s=function(){var e;if(A.state.isVisible&&!p){if(p=!0,w.offsetHeight,w.style.transition=A.props.moveTransition,S()&&A.props.animation){var t=D(),n=t.box,r=t.content;SA([n,r],i),kA([n,r],"visible")}T(),L(),wA(rb,A),null==(e=A.popperInstance)||e.forceUpdate(),Q("onMount",[A]),A.props.animation&&S()&&function(e,t){$(e,t)}(i,function(){A.state.isShown=!0,Q("onShown",[A])})}},function(){var e,t=A.props.appendTo,n=k();e=A.props.interactive&&t===gA||"parent"===t?n.parentNode:vA(t,[n]);e.contains(w)||e.appendChild(w);A.state.isMounted=!0,X(),$A(A.props.interactive&&t===VA.appendTo&&n.nextElementSibling!==w,["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(){$A(A.state.isDestroyed,HA("hide"));var e=!A.state.isVisible,t=A.state.isDestroyed,n=!A.state.isEnabled,r=mA(A.props.duration,1,VA.duration);if(e||t||n)return;if(Q("onHide",[A],!1),!1===A.props.onHide(A))return;A.state.isVisible=!1,A.state.isShown=!1,p=!1,f=!1,S()&&(w.style.visibility="hidden");if(R(),P(),M(!0),S()){var i=D(),o=i.box,a=i.content;A.props.animation&&(SA([o,a],r),kA([o,a],"hidden"))}T(),L(),A.props.animation?S()&&function(e,t){$(e,function(){!A.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()})}(r,A.unmount):A.unmount()},hideWithInteractivity:function(e){$A(A.state.isDestroyed,HA("hideWithInteractivity")),F().addEventListener("mousemove",m),wA(nb,m),m(e)},enable:function(){A.state.isEnabled=!0},disable:function(){A.hide(),A.state.isEnabled=!1},unmount:function(){$A(A.state.isDestroyed,HA("unmount")),A.state.isVisible&&A.hide();if(!A.state.isMounted)return;K(),Z().forEach(function(e){e._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w);rb=rb.filter(function(e){return e!==A}),A.state.isMounted=!1,Q("onHidden",[A])},destroy:function(){if($A(A.state.isDestroyed,HA("destroy")),A.state.isDestroyed)return;A.clearDelayTimeouts(),A.unmount(),V(),delete e._tippy,A.state.isDestroyed=!0,Q("onDestroy",[A])}};if(!u.render)return zA(!0,"render() function has not been supplied."),A;var b=u.render(A),w=b.popper,I=b.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+A.id,A.popper=w,e._tippy=A,w._tippy=A;var x=v.map(function(e){return e.fn(A)}),C=e.hasAttribute("aria-expanded");return j(),L(),M(),Q("onCreate",[A]),u.showOnCreate&&ee(),w.addEventListener("mouseenter",function(){A.props.interactive&&A.state.isVisible&&A.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){A.props.interactive&&A.props.trigger.indexOf("mouseenter")>=0&&F().addEventListener("mousemove",m)}),A;function E(){var e=A.props.touch;return Array.isArray(e)?e:[e,0]}function B(){return"hold"===E()[0]}function S(){var e;return!(null==(e=A.props.render)||!e.$$tippy)}function k(){return l||e}function F(){var e,t,n=k().parentNode;return n?null!=(t=bA(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function D(){return ZA(w)}function N(e){return A.state.isMounted&&!A.state.isVisible||NA.isTouch||o&&"focus"===o.type?0:mA(A.props.delay,e?0:1,VA.delay)}function M(e){void 0===e&&(e=!1),w.style.pointerEvents=A.props.interactive&&!e?"":"none",w.style.zIndex=""+A.props.zIndex}function Q(e,t,n){var r;(void 0===n&&(n=!0),x.forEach(function(n){n[e]&&n[e].apply(n,t)}),n)&&(r=A.props)[e].apply(r,t)}function T(){var t=A.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;bA(A.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(A.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}})}}function L(){!C&&A.props.aria.expanded&&bA(A.props.triggerTarget||e).forEach(function(e){A.props.interactive?e.setAttribute("aria-expanded",A.state.isVisible&&e===k()?"true":"false"):e.removeAttribute("aria-expanded")})}function R(){F().removeEventListener("mousemove",m),nb=nb.filter(function(e){return e!==m})}function U(t){if(!NA.isTouch||!h&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!A.props.interactive||!DA(w,n)){if(bA(A.props.triggerTarget||e).some(function(e){return DA(e,n)})){if(NA.isTouch)return;if(A.state.isVisible&&A.props.trigger.indexOf("click")>=0)return}else Q("onClickOutside",[A,t]);!0===A.props.hideOnClick&&(A.clearDelayTimeouts(),A.hide(),d=!0,setTimeout(function(){d=!1}),A.state.isMounted||P())}}}function H(){h=!0}function q(){h=!1}function O(){var e=F();e.addEventListener("mousedown",U,!0),e.addEventListener("touchend",U,pA),e.addEventListener("touchstart",q,pA),e.addEventListener("touchmove",H,pA)}function P(){var e=F();e.removeEventListener("mousedown",U,!0),e.removeEventListener("touchend",U,pA),e.removeEventListener("touchstart",q,pA),e.removeEventListener("touchmove",H,pA)}function $(e,t){var n=D().box;function r(e){e.target===n&&(FA(n,"remove",r),t())}if(0===e)return t();FA(n,"remove",a),FA(n,"add",r),a=r}function z(t,n,r){void 0===r&&(r=!1),bA(A.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,r),g.push({node:e,eventType:t,handler:n,options:r})})}function j(){var e;B()&&(z("touchstart",Y,{passive:!0}),z("touchend",G,{passive:!0})),(e=A.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(z(e,Y),e){case"mouseenter":z("mouseleave",G);break;case"focus":z(UA?"focusout":"blur",J);break;case"focusin":z("focusout",J)}})}function V(){g.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),g=[]}function Y(e){var t,n=!1;if(A.state.isEnabled&&!_(e)&&!d){var r="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,L(),!A.state.isVisible&&yA(e,"MouseEvent")&&nb.forEach(function(t){return t(e)}),"click"===e.type&&(A.props.trigger.indexOf("mouseenter")<0||f)&&!1!==A.props.hideOnClick&&A.state.isVisible?n=!0:ee(e),"click"===e.type&&(f=!n),n&&!r&&te(e)}}function W(e){var t=e.target,n=k().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Z().concat(w).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null}).filter(Boolean);(function(e,t){var n=t.clientX,r=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 l="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=t.top-r+l>o,h=r-t.bottom-c>o,p=t.left-n+u>o,g=n-t.right-f>o;return d||h||p||g})})(r,e)&&(R(),te(e))}}function G(e){_(e)||A.props.trigger.indexOf("click")>=0&&f||(A.props.interactive?A.hideWithInteractivity(e):te(e))}function J(e){A.props.trigger.indexOf("focusin")<0&&e.target!==k()||A.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function _(e){return!!NA.isTouch&&B()!==e.type.indexOf("touch")>=0}function X(){K();var t=A.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,l=S()?ZA(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||k()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var n=D().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.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];S()&&l&&f.push({name:"arrow",options:{element:l,padding:3}}),f.push.apply(f,(null==n?void 0:n.modifiers)||[]),A.popperInstance=uA(c,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:f}))}function K(){A.popperInstance&&(A.popperInstance.destroy(),A.popperInstance=null)}function Z(){return IA(w.querySelectorAll("[data-tippy-root]"))}function ee(e){A.clearDelayTimeouts(),e&&Q("onTrigger",[A,e]),O();var t=N(!0),r=E(),i=r[0],o=r[1];NA.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout(function(){A.show()},t):A.show()}function te(e){if(A.clearDelayTimeouts(),Q("onUntrigger",[A,e]),A.state.isVisible){if(!(A.props.trigger.indexOf("mouseenter")>=0&&A.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=N(!1);t?r=setTimeout(function(){A.state.isVisible&&A.hide()},t):i=requestAnimationFrame(function(){A.hide()})}}else P()}}function ob(e,t){void 0===t&&(t={});var n=VA.plugins.concat(t.plugins||[]);!function(e){var t=!e,n="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;zA(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),zA(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),JA(t,n),document.addEventListener("touchstart",QA,pA),window.addEventListener("blur",LA);var r=Object.assign({},t,{plugins:n}),i=BA(e),o=EA(r.content),a=i.length>1;$A(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 n=t&&ib(t,r);return n&&e.push(n),e},[]);return EA(e)?s[0]:s}ob.defaultProps=VA,ob.setDefaultProps=function(e){JA(e,[]),Object.keys(e).forEach(function(t){VA[t]=e[t]})},ob.currentInput=NA,Object.assign({},dv,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),ob.setDefaultProps({render:eb});Ry('.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 ab(e,t={}){if(!Ui(e))throw new Error("invalid fun");let n=Ae(t,"width");n=ke(n)?Ko(n):Ne(n)?Ir(n):null;let r=Ae(t,"height");r=ke(r)?Ko(r):Ne(r)?Ir(r):null;let i=document.createElement("div");Ne(n)&&(i.style.width=`${n}px`),Ne(r)&&(i.style.height=`${r}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,l=document.createElement("div");l.style.position="fixed",l.style.zIndex=-1,l.appendChild(a),hm(document.querySelector("body"),l);let c=e(i);return s=Hi(c)?await c:c,dm(l),s}function sb(e){if(!Ui(e))throw new Error("fn is not a function");return function(){let t=Ga(),n=null,r=null;try{n=e.apply(this,arguments)}catch(e){r=e}return null!==r?t.resolve({state:"error",msg:r}):Hi(n)?n.then(e=>{t.resolve({state:"success",msg:e})}).catch(e=>{"cancelled"===Ae(e,"reason")?t.resolve({state:"cancelled",msg:""}):t.resolve({state:"error",msg:e})}):t.resolve({state:"success",msg:n}),t}}Ry(".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 lb=sb;function cb(e){if(!xr(e))return!1;return ji(e)<0}function ub(e=0){let t=0,n=[];cb(e)&&(e=0),e=ji(e);let r=qi({type:"safe"});return r.get=function(){if(n.length>0){return t+=1,n.splice(0,1)[0]}return null},r.cb=function(){t-=1,t<0&&(t=0),n.length>0&&r.emit("message",n)},r.push=function(i){n.push(i),(e<=0||t<e)&&r.emit("message",n)},r.clear=function(){t=0,n=[]},r}function fb(e=0,t=!1){return new function(e,t){let n=null;po(e)||(e=0),e=ji(e),be(t)||(t=!1);let r=ub(e);return r.on("message",async function(e){let t=r.get();if(!t)return;await fs(1);let n,i=Ae(t,"id"),o=Ae(t,"fun"),a=Ae(t,"input");n=Ui(o)?await lb(o)(...a):{state:"error",msg:"fun is not a function"},r.emit(i,n),r.cb()}),function(e,...i){let o=Ga(),a=Tu();n=a;let s={id:a,fun:e,input:i};return r.push(s),r.once(a,e=>{t?a===n?"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 db(e,t){_a()?ke(e)?Vu()?function(e,t){window.navigator.msSaveOrOpenBlob(t,e)}(e,t):function(e,t){let n=window.URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)}(e,t):console.log("no filename"):console.log("no window")}function hb(e,t="data"){if(!Ee(e))return{error:"sheet is not an object"};if(!Ce(Ae(e,"rows")))return{error:"sheet.rows is not an array"};ke(t)||(t="data");let n={sheets:[]};return n.sheets.push({...e,name:t}),n}function pb(e,t="data"){if(!Ce(e))return{error:"data is not an array"};ke(t)||(t="data");let n=null,r=cr(e);return Me(r,"error")?r:(n=hb(r,t),Me(n,"error"),n)}class gb extends Error{name="HucreError";constructor(e,t){super(e,t)}}class mb extends gb{details;name="ParseError";constructor(e,t,n){super(e,n),this.details=t}}class yb extends gb{name="ZipError"}class vb extends gb{name="XmlError"}class Ab extends gb{name="InvalidArgumentError"}class bb extends gb{name="EncryptedFileError";format;constructor(e,t){super(t??(e?`File is password-protected (${e.toUpperCase()} encrypted with the OLE2/CFB container). Provide a password in options to decrypt it.`:"File is password-protected. Provide a password in options.")),this.format=e}}class wb extends gb{name="DecryptionError";constructor(e="Failed to decrypt: incorrect password or corrupt encryption data.",t){super(e,t)}}const Ib=536870888;class xb extends mb{}function Cb(e,t){try{return new TextDecoder("utf-8").decode(e)}catch(n){if(n instanceof RangeError||"ERR_STRING_TOO_LONG"===n?.code||e.length>Ib)throw function(e,t){return new xb(`Part "${e}" is ${t.toLocaleString("en-US")} bytes, over the ${Ib.toLocaleString("en-US")}-character maximum string length this runtime supports, so it cannot be read into memory whole.\n - streamXlsxRows(input) reads a worksheet of any size, a row at a time.\n - The workbook is not damaged; this is a limit of the buffered reader.`)}(t,e.length);throw n}}const Eb={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};function Bb(e){return-1===e.indexOf("\r")?e:e.replace(/\r\n?/g,"\n")}function Sb(e){return-1===e.indexOf("&")?e:e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-zA-Z]+);/g,(e,t)=>{if(35===t.charCodeAt(0)){const n=120===t.charCodeAt(1)||88===t.charCodeAt(1)?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Number.isNaN(n)||(n<0||n>1114111)?e:String.fromCodePoint(n)}return Eb[t]??e})}function kb(e){return-1===e.indexOf("_x")?e:e.replace(/_x([0-9A-Fa-f]{4})_/g,(e,t)=>String.fromCharCode(parseInt(t,16)))}function Fb(e){const t={};let n=0;const r=e.length;for(;n<r;){for(;n<r&&Db(e.charCodeAt(n));)n++;if(n>=r)break;const i=n;for(;n<r&&61!==e.charCodeAt(n)&&!Db(e.charCodeAt(n));)n++;const o=e.slice(i,n);if(!o)break;for(;n<r&&Db(e.charCodeAt(n));)n++;if(n>=r||61!==e.charCodeAt(n)){t[o]="";continue}for(n++;n<r&&Db(e.charCodeAt(n));)n++;if(n>=r)break;const a=e.charCodeAt(n);if(34===a||39===a){n++;const i=n;for(;n<r&&e.charCodeAt(n)!==a;)n++;t[o]=Sb(Bb(e.slice(i,n))),n++}else{const i=n;for(;n<r&&!Db(e.charCodeAt(n));)n++;t[o]=Sb(Bb(e.slice(i,n)))}}return t}function Db(e){return 32===e||9===e||10===e||13===e}function Nb(e,t){const n=65279===e.charCodeAt(0)?e.slice(1):e,r=n.length;let i=0;function o(e){let t=1,o=1;for(let e=0;e<i&&e<r;e++)10===n.charCodeAt(e)?(t++,o=1):o++;throw new vb(`${e} at line ${t}, column ${o}`)}for(;i<r;){if(60===n.charCodeAt(i)){const e=i+1<r?n.charCodeAt(i+1):0;if(33===e){if("\x3c!--"===n.slice(i,i+4)){const e=n.indexOf("--\x3e",i+4);-1===e&&o("Unterminated comment"),i=e+3;continue}if("<![CDATA["===n.slice(i,i+9)){const e=n.indexOf("]]>",i+9);-1===e&&o("Unterminated CDATA section");const r=n.slice(i+9,e);t.onCData?.(r),t.onText?.(r),i=e+3;continue}const e=n.indexOf(">",i+2);-1===e&&o("Unterminated declaration"),i=e+1;continue}if(63===e){const e=n.indexOf("?>",i+2);-1===e&&o("Unterminated processing instruction"),i=e+2;continue}if(47===e){const e=n.indexOf(">",i+2);-1===e&&o("Unterminated closing tag");const r=n.slice(i+2,e).trim();t.onCloseTag?.(r),i=e+1;continue}let a=i+1,s=0;for(;a<r;){const e=n.charCodeAt(a);if(s)e===s&&(s=0);else if(34===e||39===e)s=e;else if(62===e)break;a++}a>=r&&o("Unterminated opening tag");const l=47===n.charCodeAt(a-1),c=n.slice(i+1,l?a-1:a);let u=0;const f=c.length;for(;u<f&&!Db(c.charCodeAt(u));)u++;const d=c.slice(0,u),h=u<f?c.slice(u+1):"",p=h?Fb(h):{};t.onOpenTag?.(d,p),l&&t.onCloseTag?.(d),i=a+1;continue}const e=i;for(;i<r&&60!==n.charCodeAt(i);)i++;const a=n.slice(e,i);if(a){const e=Sb(Bb(a));t.onText?.(e)}}}const Mb=262144,Qb=64;function Tb(e,t,n){let r=n;const i=e.lastIndexOf("&",r-1);i>=t&&n-i<=Qb&&-1===e.indexOf(";",i)&&(r=i);const o=r>t?e.charCodeAt(r-1):0;return(o>=55296&&o<=56319||13===o)&&r--,r>t?r:t}function Lb(e,t,n,r){if(e)throw new vb(r);return t.slice(n)}function Rb(e,t,n,r){let i=0;const o=e.length;for(;i<o;){if(60===e.charCodeAt(i)){const a=i+1<o?e.charCodeAt(i+1):-1;if(-1===a&&!n)return e.slice(i);if(33===a){if("\x3c!--"===e.slice(i,i+4)){const t=e.indexOf("--\x3e",i+4);if(-1===t)return Lb(n&&r,e,i,"Unterminated comment");i=t+3;continue}if("<![CDATA["===e.slice(i,i+9)){const o=e.indexOf("]]>",i+9);if(-1===o)return Lb(n&&r,e,i,"Unterminated CDATA section");const a=e.slice(i+9,o);t.onCData?.(a),t.onText?.(a),i=o+3;continue}if(!n&&o-i<9)return e.slice(i);const a=e.indexOf(">",i+2);if(-1===a)return Lb(n&&r,e,i,"Unterminated declaration");i=a+1;continue}if(63===a){const t=e.indexOf("?>",i+2);if(-1===t)return Lb(n&&r,e,i,"Unterminated processing instruction");i=t+2;continue}if(47===a){const o=e.indexOf(">",i+2);if(-1===o)return Lb(n&&r,e,i,"Unterminated closing tag");const a=e.slice(i+2,o).trim();t.onCloseTag?.(a),i=o+1;continue}let s=i+1,l=0;for(;s<o;){const t=e.charCodeAt(s);if(l)t===l&&(l=0);else if(34===t||39===t)l=t;else if(62===t)break;s++}if(s>=o)return Lb(n&&r,e,i,"Unterminated opening tag");const c=47===e.charCodeAt(s-1),u=e.slice(i+1,c?s-1:s);let f=0;const d=u.length;for(;f<d&&!Db(u.charCodeAt(f));)f++;const h=u.slice(0,f),p=f<d?u.slice(f+1):"",g=p?Fb(p):{};t.onOpenTag?.(h,g),c&&t.onCloseTag?.(h),i=s+1;continue}const a=i;for(;i<o&&60!==e.charCodeAt(i);)i++;if(i>=o&&!n){if(o-a>Mb){const n=Tb(e,a,o);if(n>a)return t.onText?.(Sb(Bb(e.slice(a,n)))),e.slice(n)}return e.slice(a)}const s=e.slice(a,i);if(s){const e=Sb(Bb(s));t.onText?.(e)}}return""}function Ub(e){const t={tag:"",local:"",prefix:"",attrs:{},children:[]},n=[t];if(Nb(e,{onOpenTag(e,t){const{local:r,prefix:i}=function(e){const t=e.indexOf(":");return-1===t?{local:e,prefix:""}:{prefix:e.slice(0,t),local:e.slice(t+1)}}(e),o={tag:e,local:r,prefix:i,attrs:t,children:[]};n[n.length-1].children.push(o),n.push(o)},onCloseTag(e){if(n.length<=1)throw new vb("Unexpected closing tag: no matching open tag");const t=n[n.length-1];if(t.tag!==e)throw new vb(`Mismatched closing tag: expected </${t.tag}> but found </${e}>`);if(n.pop(),t.children.length>0){const e=[];for(const n of t.children)"string"==typeof n&&e.push(n);e.length>0&&(t.text=e.join(""))}},onText(e){n[n.length-1].children.push(e)}}),n.length>1){const e=n[n.length-1].tag;throw new vb(`Unexpected end of document: unclosed element <${e}>`)}if(0===t.children.length)throw new vb("Empty document: no root element found");for(const e of t.children)if("string"!=typeof e)return e;throw new vb("No root element found in document")}function Hb(e,t){for(const n of e.children)if("string"!=typeof n&&n.local===t)return n}function qb(e){const t=[];for(const n of e.children)"string"!=typeof n&&t.push(n);return t}function Ob(e,t){if(e.local===t)return e;for(const n of e.children){if("string"==typeof n)continue;const e=Ob(n,t);if(e)return e}}function Pb(e,t){const n=Hb(e,t);if(!n)return"";let r="";for(const e of n.children)"string"==typeof e&&(r+=e);return r}function $b(e,t){if(void 0===e)return t;const n=parseInt(e,10);return Number.isNaN(n)?t:n}function zb(e){const t=Ub(e),n=[];for(const e of qb(t)){if("threadedComment"!==e.local)continue;const t=e.attrs.id,r=e.attrs.personId;if(!t||!r)continue;const i={id:t,personId:r,text:Pb(e,"text")};e.attrs.ref&&(i.ref=e.attrs.ref),e.attrs.parentId&&(i.parentId=e.attrs.parentId),e.attrs.dT&&(i.date=e.attrs.dT),"1"!==e.attrs.done&&"true"!==e.attrs.done||(i.done=!0);const o=Hb(e,"mentions");if(o){const e=[];for(const t of qb(o)){if("mention"!==t.local)continue;const n=t.attrs.mentionpersonId,r=t.attrs.mentionId;n&&r&&e.push({mentionPersonId:n,mentionId:r,startIndex:$b(t.attrs.startIndex,0),length:$b(t.attrs.length,0)})}e.length>0&&(i.mentions=e)}n.push(i)}return n}function jb(e){const t=Ub(e),n=[];for(const e of t.children){if("string"==typeof e)continue;if("Relationship"===(e.local||e.tag)){const t=e.attrs.Id??"",r=e.attrs.Type??"",i=e.attrs.Target??"",o=e.attrs.TargetMode;if(t&&r&&i){const e={id:t,type:r,target:i};o&&(e.targetMode=o),n.push(e)}}}return n}function Vb(e,t){if(t.startsWith("/"))return t.slice(1);const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(const e of r)".."===e?n.pop():"."!==e&&n.push(e);return n.join("/")}function Yb(e){const t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}function Wb(e){for(const t of Object.keys(e))if(t.endsWith(":id")&&e[t].startsWith("rId"))return e[t]}const Gb=new Set(["n","s","b","e","str"]);function Jb(e,t){const n=Hb(Ub(e),"externalBook");let r,i="";if(n&&t){const e=jb(t),o=n.attrs["r:id"]??n.attrs.id,a=o?e.find(e=>e.id===o):void 0;a&&(i=a.target,"External"!==a.targetMode&&"Internal"!==a.targetMode||(r=a.targetMode))}const o=function(e){const t=e?Hb(e,"sheetNames"):void 0;if(!t)return[];const n=[];for(const e of qb(t))"sheetName"===e.local&&n.push(e.attrs.val??"");return n}(n),a=function(e){const t=e?Hb(e,"sheetDataSet"):void 0;if(!t)return[];const n=[];for(const e of qb(t)){if("sheetData"!==e.local)continue;const t=$b(e.attrs.sheetId,0),r=[];for(const t of qb(e))if("row"===t.local)for(const e of qb(t)){if("cell"!==e.local)continue;const t=e.attrs.r??"";if(!t)continue;const n=e.attrs.t??"n",i=Gb.has(n)?n:"n",o=Pb(e,"v");r.push({ref:t,type:i,value:_b(i,o)})}n.push({sheetId:t,cells:r})}return n}(n),s=function(e){const t=e?Hb(e,"definedNames"):void 0;if(!t)return[];const n=[];for(const e of qb(t)){if("definedName"!==e.local)continue;const t={name:e.attrs.name??""};if(e.attrs.refersTo&&(t.refersTo=e.attrs.refersTo),void 0!==e.attrs.sheetId){const n=$b(e.attrs.sheetId,NaN);Number.isNaN(n)||(t.sheetId=n)}t.name&&n.push(t)}return n}(n),l={target:i,sheetNames:o,sheetData:a};return r&&(l.targetMode=r),s&&s.length>0&&(l.definedNames=s),l}function _b(e,t){switch(e){case"n":case"s":{const e=Number(t);return Number.isFinite(e)?e:0}case"b":return"1"===t||"true"===t;case"e":case"str":return t}}function Xb(e){const t=Hb(e,"pic");if(!t)return;const n=Hb(t,"nvPicPr"),r=n?Hb(n,"cNvPr"):void 0,i=r?.attrs.name;if(!i)return;const o=Hb(t,"blipFill"),a=o?Hb(o,"blip"):void 0,s=a?.attrs["r:embed"]??a?.attrs.embed;if(!s)return;const l={id:i,embedRId:s},c=r?.attrs.descr;return c&&(l.description=c),l}function Kb(e){const t=Ub(e),n="pivotCacheDefinition"===t.local?t:Hb(t,"pivotCacheDefinition");if(!n)return;const r={cacheId:0,fieldNames:[]},i=Hb(n,"cacheSource");if(i){const e=i.attrs.type;"worksheet"!==e&&"external"!==e&&"consolidation"!==e&&"scenario"!==e||(r.sourceType=e);const t=Hb(i,"worksheetSource");t&&(t.attrs.ref?r.sourceRef=t.attrs.ref:t.attrs.name&&(r.sourceRef=t.attrs.name),t.attrs.sheet&&(r.sourceSheet=t.attrs.sheet))}const o=Hb(n,"cacheFields");if(o)for(const e of qb(o)){if("cacheField"!==e.local)continue;const t=e.attrs.name??"";r.fieldNames.push(t)}return r}function Zb(e){const t=Ub(e),n="pivotTableDefinition"===t.local?t:Hb(t,"pivotTableDefinition");if(!n)return;const r=n.attrs.name;if(!r)return;const i=$b(n.attrs.cacheId,NaN),o={name:r,cacheId:Number.isNaN(i)?0:i,location:"",fields:[]},a=Hb(n,"location");if(a){a.attrs.ref&&(o.location=a.attrs.ref);const e=$b(a.attrs.firstHeaderRow,NaN);Number.isNaN(e)||(o.firstHeaderRow=e);const t=$b(a.attrs.firstDataRow,NaN);Number.isNaN(t)||(o.firstDataRow=t);const n=$b(a.attrs.firstDataCol,NaN);Number.isNaN(n)||(o.firstDataCol=n);const r=$b(a.attrs.rowPageCount,NaN);Number.isNaN(r)||(o.rowPageCount=r);const i=$b(a.attrs.colPageCount,NaN);Number.isNaN(i)||(o.colPageCount=i)}const s=Hb(n,"pivotFields"),l=[];if(s)for(const e of qb(s)){if("pivotField"!==e.local)continue;const t=e.attrs.axis,n="1"===e.attrs.dataField||"true"===e.attrs.dataField;let r="hidden";"axisRow"===t?r="row":"axisCol"===t?r="col":"axisPage"===t?r="page":("axisValues"===t||n)&&(r="data"),l.push({axis:r,raw:e})}const c=Hb(n,"dataFields"),u=new Map;if(c)for(const e of qb(c)){if("dataField"!==e.local)continue;const t=$b(e.attrs.fld,NaN);if(Number.isNaN(t))continue;const n={};e.attrs.name&&(n.name=e.attrs.name);const r=tw(e.attrs.subtotal);r&&(n.subtotal=r),u.set(t,n)}for(let e=0;e<l.length;e++){const{axis:t}=l[e],n={name:`field${e+1}`,axis:t};if("data"===t){const t=u.get(e);n.function=t?.subtotal?t.subtotal:"sum",t?.name&&(n.displayName=t.name)}o.fields.push(n)}const f=Hb(n,"pivotTableStyleInfo");return f?.attrs.name&&(o.styleName=f.attrs.name),n.attrs.dataCaption&&(o.dataCaption=n.attrs.dataCaption),o}function ew(e,t){for(let n=0;n<e.fields.length;n++){const r=t.fieldNames[n];r&&(e.fields[n].name=r)}}function tw(e){if(e)switch(e){case"sum":case"count":case"average":case"max":case"min":case"product":case"countNums":case"stdDev":case"stdDevp":case"var":case"varp":return e;case"countA":return"count";default:return}}function nw(e){const t=Ub(e),n=[];for(const e of qb(t)){if("slicer"!==e.local)continue;const t=e.attrs.name,r=e.attrs.cache;if(!t||!r)continue;const i={name:t,cache:r};if(e.attrs.caption&&(i.caption=e.attrs.caption),void 0!==e.attrs.columnCount){const t=$b(e.attrs.columnCount,NaN);Number.isNaN(t)||(i.columnCount=t)}if(e.attrs.style&&(i.style=e.attrs.style),e.attrs.sortOrder&&(i.sortOrder=e.attrs.sortOrder),void 0!==e.attrs.rowHeight){const t=$b(e.attrs.rowHeight,NaN);Number.isNaN(t)||(i.rowHeight=t)}n.push(i)}return n}function rw(e){const t=Ub(e),n="slicerCacheDefinition"===t.local?t:Hb(t,"slicerCacheDefinition");if(!n)return;const r=n.attrs.name;if(!r)return;const i={name:r};n.attrs.sourceName&&(i.sourceName=n.attrs.sourceName);const o=aw(n);o.length>0&&(i.pivotTables=o);const a=function(e){const t=Hb(e,"extLst");if(!t)return;for(const e of qb(t)){if("ext"!==e.local)continue;const t=Hb(e,"tableSlicerCache");if(!t)continue;const n=t.attrs.name??t.attrs.tableId;if(!n)continue;const r={name:n};return t.attrs.column&&(r.column=t.attrs.column),r}return}(n);return a&&(i.tableSource=a),i}function iw(e){const t=Ub(e),n=[];for(const e of qb(t)){if("timeline"!==e.local)continue;const t=e.attrs.name,r=e.attrs.cache;if(!t||!r)continue;const i={name:t,cache:r};e.attrs.caption&&(i.caption=e.attrs.caption),e.attrs.style&&(i.style=e.attrs.style),e.attrs.level&&(i.level=e.attrs.level),void 0!==e.attrs.showHeader&&(i.showHeader=sw(e.attrs.showHeader)),void 0!==e.attrs.showSelectionLabel&&(i.showSelectionLabel=sw(e.attrs.showSelectionLabel)),void 0!==e.attrs.showTimeLevel&&(i.showTimeLevel=sw(e.attrs.showTimeLevel)),void 0!==e.attrs.showHorizontalScrollbar&&(i.showHorizontalScrollbar=sw(e.attrs.showHorizontalScrollbar)),n.push(i)}return n}function ow(e){const t=Ub(e),n="timelineCacheDefinition"===t.local?t:Hb(t,"timelineCacheDefinition");if(!n)return;const r=n.attrs.name;if(!r)return;const i={name:r};n.attrs.sourceName&&(i.sourceName=n.attrs.sourceName);const o=aw(n);return o.length>0&&(i.pivotTables=o),i}function aw(e){const t=Hb(e,"pivotTables");if(!t)return[];const n=[];for(const e of qb(t)){if("pivotTable"!==e.local)continue;const t=e.attrs.name;if(!t)continue;const r=$b(e.attrs.tabId,NaN);Number.isNaN(r)||n.push({tabId:r,name:t})}return n}function sw(e){return"1"===e||"true"===e}function lw(e){return`_x${e.toString(16).toUpperCase().padStart(4,"0")}_`}function cw(e){return e>=0&&e<=8||11===e||12===e||e>=14&&e<=31}function uw(e,t="ooxml"){let n="",r=0;for(let i=0;i<e.length;i++){const o=e.charCodeAt(i);let a;switch(o){case 38:a="&amp;";break;case 60:a="&lt;";break;case 62:a="&gt;";break;case 13:a="charRef"===t?"&#13;":lw(13);break;default:cw(o)&&(a=lw(o))}a&&(n+=e.slice(r,i)+a,r=i+1)}return 0===r?e:n+e.slice(r)}function fw(e){let t="",n=0;for(let r=0;r<e.length;r++){let i;switch(e.charCodeAt(r)){case 38:i="&amp;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;case 34:i="&quot;";break;case 39:i="&apos;";break;case 9:i="&#9;";break;case 10:i="&#10;";break;case 13:i="&#13;";break;default:cw(e.charCodeAt(r))&&(i=lw(e.charCodeAt(r)))}i&&(t+=e.slice(n,r)+i,n=r+1)}return 0===n?e:t+e.slice(n)}function dw(e){if(!e)return"";let t="";const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r],o=e[i];null!=o&&(t+="boolean"==typeof o?` ${i}="${o?"true":"false"}"`:` ${i}="${fw(String(o))}"`)}return t}function hw(e,t){return`<${e}${dw(t)}/>`}function pw(e){const t=uw(e);return e.length>0&&(" "===e[0]||" "===e[e.length-1]||e.includes("\n")||e.includes("\t"))?`<t xml:space="preserve">${t}</t>`:gw("t",void 0,t)}function gw(e,t,n){const r=dw(t);if(null==n)return`<${e}${r}/>`;const i=Array.isArray(n)?n.join(""):n;return i?`<${e}${r}>${i}</${e}>`:`<${e}${r}/>`}function mw(e,t,n,r){const i=[];return!1!==r?.declaration&&i.push(function(e){return`<?xml version="1.0" encoding="UTF-8" standalone="${e?.standalone??"yes"}"?>`}(r)),null==n?i.push(hw(e,t)):i.push(gw(e,t,n)),i.join("")}function yw(e,t){for(const n of e.children)"string"!=typeof n&&("t"===n.local?t.push(vw(n)):yw(n,t))}function vw(e){let t="";for(const n of e.children)t+="string"==typeof n?n:vw(n);return t}function Aw(e){if("string"!=typeof e)return;const t=e.trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}function bw(e){const t=e.attrs.val;if("string"==typeof t)return"1"===t||"true"===t.toLowerCase()}function ww(e){if(void 0!==e)return"1"===e||"true"===e||"0"!==e&&"false"!==e&&void 0}function Iw(e){if(!e)return;const t=Hb(e,"numRef")??Hb(e,"strRef");if(t){const e=Hb(t,"f");if(e){const t=vw(e).trim();if(t.length>0)return t}}const n=Hb(e,"f");if(n){const e=vw(n).trim();if(e.length>0)return e}}function xw(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;const i=r.trim();if(0===i.length)return;const o=Number(i);return Number.isFinite(o)?o:void 0}const Cw=.25,Ew=13.5,Bw=12700,Sw=new Set(["solid","dot","dash","lgDash","dashDot","lgDashDot","lgDashDotDot","sysDash","sysDot","sysDashDot","sysDashDotDot"]),kw=new Set(["solid","dash","dashDot","dot","lgDash","lgDashDot","lgDashDotDot","sysDash","sysDashDot","sysDashDotDot","sysDot"]),Fw=new Set(["rnd","sq","flat"]),Dw=new Set(["sng","dbl","thickThin","thinThick","tri"]);function Nw(e){if("string"==typeof e&&Fw.has(e)&&"flat"!==e)return e}function Mw(e){if("string"==typeof e&&Dw.has(e)&&"sng"!==e)return e}function Qw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=n.attrs.cap;if("string"!=typeof r)return;const i=r.trim();return Fw.has(i)&&"flat"!==i?i:void 0}function Tw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=n.attrs.cmpd;if("string"!=typeof r)return;const i=r.trim();return Dw.has(i)&&"sng"!==i?i:void 0}const Lw=new Set(["bg1","tx1","bg2","tx2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink","phClr","dk1","lt1","dk2","lt2"]),Rw=1e5,Uw=-1e5,Hw=1e5;function qw(e,t,n,r){const i=Hb(e,t);if(!i)return;const o=i.attrs.val;if("string"!=typeof o)return;const a=Number.parseInt(o.trim(),10);return Number.isFinite(a)&&!(a<n||a>r)?a:void 0}function Ow(e){const t=e.attrs.val;if("string"!=typeof t)return;const n=t.trim();if(!Lw.has(n))return;const r={theme:n},i=qw(e,"lumMod",0,Rw);void 0!==i&&(r.lumMod=i);const o=qw(e,"lumOff",0,Rw);void 0!==o&&(r.lumOff=o);const a=qw(e,"tint",Uw,Hw);void 0!==a&&(r.tint=a);const s=qw(e,"shade",Uw,Hw);void 0!==s&&(r.shade=s);const l=qw(e,"alpha",0,Rw);return void 0!==l&&(r.alpha=l),r}function Pw(e){if(null==e)return;if("string"==typeof e){return zw(e)}if("object"!=typeof e)return;const t=e.theme;if("string"!=typeof t||!Lw.has(t))return;const n={theme:t},r=(e,t,n)=>{if("number"!=typeof e||!Number.isFinite(e))return;const r=Math.round(e);return r<t||r>n?void 0:r},i=r(e.lumMod,0,Rw);void 0!==i&&(n.lumMod=i);const o=r(e.lumOff,0,Rw);void 0!==o&&(n.lumOff=o);const a=r(e.tint,Uw,Hw);void 0!==a&&(n.tint=a);const s=r(e.shade,Uw,Hw);void 0!==s&&(n.shade=s);const l=r(e.alpha,0,Rw);return void 0!==l&&(n.alpha=l),n}function $w(e){if("string"==typeof e)return hw("a:srgbClr",{val:e});const t=[];return void 0!==e.tint&&t.push(hw("a:tint",{val:e.tint})),void 0!==e.shade&&t.push(hw("a:shade",{val:e.shade})),void 0!==e.alpha&&t.push(hw("a:alpha",{val:e.alpha})),void 0!==e.lumMod&&t.push(hw("a:lumMod",{val:e.lumMod})),void 0!==e.lumOff&&t.push(hw("a:lumOff",{val:e.lumOff})),0===t.length?hw("a:schemeClr",{val:e.theme}):gw("a:schemeClr",{val:e.theme},t)}function zw(e){if("string"!=typeof e)return;const t=e.trim();if(0===t.length)return;const n=t.startsWith("#")?t.slice(1):t;return 6===n.length&&/^[0-9a-fA-F]{6}$/.test(n)?n.toUpperCase():void 0}function jw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}function Vw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=Hb(n,"solidFill");if(!r)return;const i=Hb(r,"srgbClr");if(i)return zw(i.attrs.val);const o=Hb(r,"schemeClr");return o?Ow(o):void 0}function Yw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=n.attrs.w;if("string"!=typeof r)return;const i=Number.parseFloat(r);if(!Number.isFinite(i)||i<=0)return;const o=Math.round(i/Bw*4)/4;return o<Cw?Cw:o>Ew?Ew:o}function Ww(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=Hb(n,"prstDash");if(!r)return;const i=r.attrs.val;if("string"!=typeof i)return;const o=i.trim();return kw.has(o)&&"solid"!==o?o:void 0}function Gw(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(4*e)/4;return t<Cw?Cw:t>Ew?Ew:t}function Jw(e){if("string"==typeof e&&kw.has(e)&&"solid"!==e)return e}function _w(e){const t=Hb(e,"view3D");if(!t)return;const n={},r=Xw(t,"rotX",-90,90);void 0!==r&&(n.rotX=r);const i=Xw(t,"hPercent",5,500);void 0!==i&&(n.hPercent=i);const o=Xw(t,"rotY",0,360);void 0!==o&&(n.rotY=o);const a=Xw(t,"depthPercent",20,2e3);void 0!==a&&(n.depthPercent=a);const s=function(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;switch(r){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}(t,"rAngAx");void 0!==s&&(n.rAngAx=s);const l=Xw(t,"perspective",0,240);return void 0!==l&&(n.perspective=l),n}function Xw(e,t,n,r){const i=Hb(e,t);if(!i)return;const o=i.attrs.val;if("string"!=typeof o)return;if(!/^-?\d+$/.test(o))return;const a=Number(o);return Number.isInteger(a)&&!(a<n||a>r)?a:void 0}function Kw(e,t,n){if("number"==typeof e&&Number.isFinite(e)&&Number.isInteger(e)&&!(e<t||e>n))return e}function Zw(e){if(!e)return;const t=e.attrs.val;if("string"!=typeof t)return;const n=t.trim();if(0===n.length)return;const r=Number(n);return Number.isFinite(r)&&!(r<0||r>1)?r:void 0}function eI(e){const t=Hb(e,"layout");if(!t)return;const n=Hb(t,"manualLayout");if(!n)return;const r=Zw(Hb(n,"x")),i=Zw(Hb(n,"y")),o=Zw(Hb(n,"w")),a=Zw(Hb(n,"h"));if(void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const s={};return void 0!==r&&(s.x=r),void 0!==i&&(s.y=i),void 0!==o&&(s.w=o),void 0!==a&&(s.h=a),s}function tI(e){if(!e||"object"!=typeof e)return;const t={},n=nI(e.x);void 0!==n&&(t.x=n);const r=nI(e.y);void 0!==r&&(t.y=r);const i=nI(e.w);void 0!==i&&(t.w=i);const o=nI(e.h);return void 0!==o&&(t.h=o),void 0!==t.x||void 0!==t.y||void 0!==t.w||void 0!==t.h?t:void 0}function nI(e){if("number"==typeof e&&Number.isFinite(e)&&!(e<0||e>1))return e}function rI(e){if(!e)return;const t=[];return void 0!==e.x&&t.push(hw("c:xMode",{val:"edge"})),void 0!==e.y&&t.push(hw("c:yMode",{val:"edge"})),void 0!==e.w&&t.push(hw("c:wMode",{val:"edge"})),void 0!==e.h&&t.push(hw("c:hMode",{val:"edge"})),void 0!==e.x&&t.push(hw("c:x",{val:e.x})),void 0!==e.y&&t.push(hw("c:y",{val:e.y})),void 0!==e.w&&t.push(hw("c:w",{val:e.w})),void 0!==e.h&&t.push(hw("c:h",{val:e.h})),0!==t.length?gw("c:layout",void 0,[gw("c:manualLayout",void 0,t)]):void 0}function iI(e){const t=Hb(e,"txPr");if(t)return aI(t)}function oI(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");return r?aI(r):void 0}function aI(e){const t=Hb(e,"p");if(!t)return;const n=Hb(t,"pPr");return n?Hb(n,"defRPr"):void 0}const sI=6e4,lI=100,cI=400,uI=sI,fI=-90;function dI(e,t,n,r,i,o){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o)return;const a=[];if(void 0!==e&&a.push(gw("a:solidFill",void 0,[$w(e)])),void 0!==t||void 0!==n||void 0!==r||void 0!==i||void 0!==o){const e={};void 0!==n&&(e.w=Math.round(n*Bw)),void 0!==i&&(e.cap=i),void 0!==o&&(e.cmpd=o);const s=[];void 0!==t&&s.push(gw("a:solidFill",void 0,[$w(t)])),void 0!==r&&s.push(hw("a:prstDash",{val:r})),a.push(0===s.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,s))}return gw("c:spPr",void 0,a)}function hI(e){if(void 0===e||"number"!=typeof e||!Number.isFinite(e))return;let t=Math.round(e);return t<fI?t=fI:t>90&&(t=90),0!==t?t:void 0}function pI(e){if(void 0===e||"number"!=typeof e||!Number.isFinite(e))return;const t=Math.round(2*e)/2;return t<1||t>400?void 0:t}function gI(e){return!0===e||!1!==e&&void 0}function mI(e){return!0===e||!1!==e&&void 0}function yI(e){return"string"==typeof e?zw(e):Pw(e)}function vI(e){return!0===e||!1!==e&&void 0}function AI(e){return!0===e||!1!==e&&void 0}const bI=lI,wI=cI;function II(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g,m){const y=[hw("c:legendPos",{val:e})];for(const e of n){const t=[hw("c:idx",{val:e.idx}),hw("c:delete",{val:e.delete?1:0})],n=xI(e.fontSize,e.bold,e.italic,e.underline,e.strikethrough,e.color,e.fontFamily);void 0!==n&&t.push(n),y.push(gw("c:legendEntry",void 0,t))}const v=rI(u);void 0!==v&&y.push(v),y.push(hw("c:overlay",{val:t?1:0}));const A=function(e,t,n,r,i,o){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o)return;const a=[];void 0!==e&&a.push(gw("a:solidFill",void 0,[$w(e)]));if(void 0!==t||void 0!==n||void 0!==r||void 0!==i||void 0!==o){const e={};void 0!==n&&(e.w=Math.round(n*Bw)),void 0!==i&&(e.cap=i),void 0!==o&&(e.cmpd=o);const s=[];void 0!==t&&s.push(gw("a:solidFill",void 0,[$w(t)])),void 0!==r&&s.push(hw("a:prstDash",{val:r})),a.push(0===s.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,s))}return gw("c:spPr",void 0,a)}(f,d,h,p,g,m);void 0!==A&&y.push(A);const b=xI(r,i,o,a,s,l,c);return void 0!==b&&y.push(b),gw("c:legend",void 0,y)}function xI(e,t,n,r,i,o,a){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const s={};void 0!==e&&(s.sz=e*bI),void 0!==t&&(s.b=t?1:0),void 0!==n&&(s.i=n?1:0),void 0!==r&&(s.u=r?"sng":"none"),!0===i&&(s.strike="sngStrike");const l=void 0!==o?gw("a:solidFill",void 0,[$w(o)]):void 0,c=a?hw("a:latin",{typeface:a}):void 0,u=[];l&&u.push(l),c&&u.push(c);const f=u.length>0?gw("a:defRPr",s,u):hw("a:defRPr",s);return gw("c:txPr",void 0,[hw("a:bodyPr"),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[f]),hw("a:endParaRPr",{lang:"en-US"})])])}const CI=lI;function EI(e){const t=Hb(e,"dTable");if(!t)return;const n={},r=BI(t,"showHorzBorder");void 0!==r&&(n.showHorzBorder=r);const i=BI(t,"showVertBorder");void 0!==i&&(n.showVertBorder=i);const o=BI(t,"showOutline");void 0!==o&&(n.showOutline=o);const a=BI(t,"showKeys");void 0!==a&&(n.showKeys=a);const s=function(e){const t=iI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/CI*2)/2;return o<1||o>400?void 0:o}(t);void 0!==s&&(n.fontSize=s);const l=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(t);void 0!==l&&(n.fontColor=l);const c=function(e){const t=iI(e);if(!t)return;const n=t.attrs.b;if("string"!=typeof n)return;switch(n){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}(t);void 0!==c&&(n.bold=c);const u=function(e){const t=iI(e);if(!t)return;const n=t.attrs.i;if("string"!=typeof n)return;switch(n){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}(t);void 0!==u&&(n.italic=u);const f=function(e){const t=iI(e);if(!t)return;const n=t.attrs.u;return"sng"===n||"none"!==n&&void 0}(t);void 0!==f&&(n.underline=f);const d=function(e){const t=iI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(t);void 0!==d&&(n.strikethrough=d);const h=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0===i.length?void 0:i}(t);void 0!==h&&(n.fontFamily=h);const p=jw(t);void 0!==p&&(n.fillColor=p);const g=function(e){return Vw(e)}(t);void 0!==g&&(n.borderColor=g);const m=Yw(t);void 0!==m&&(n.borderWidth=m);const y=Ww(t);void 0!==y&&(n.borderDash=y);const v=Qw(t);void 0!==v&&(n.borderCap=v);const A=Tw(t);return void 0!==A&&(n.borderCompound=A),n}function BI(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"==typeof r)switch(r){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}function SI(e){return yI(e)}function kI(e){return!0===e||!1!==e&&void 0}function FI(e){return!0===e||!1!==e&&void 0}function DI(e){return!0===e||!1!==e&&void 0}function NI(e){if(!0===e)return!0}function MI(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}function QI(e){return yI(e)}function TI(e){return yI(e)}function LI(e){const t=[hw("c:showHorzBorder",{val:e.showHorzBorder?1:0}),hw("c:showVertBorder",{val:e.showVertBorder?1:0}),hw("c:showOutline",{val:e.showOutline?1:0}),hw("c:showKeys",{val:e.showKeys?1:0})],n=function(e,t,n,r,i,o){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o)return;const a=[];void 0!==e&&a.push(gw("a:solidFill",void 0,[$w(e)]));if(void 0!==t||void 0!==n||void 0!==r||void 0!==i||void 0!==o){const e={};void 0!==n&&(e.w=Math.round(n*Bw)),void 0!==i&&(e.cap=i),void 0!==o&&(e.cmpd=o);const s=[];void 0!==t&&s.push(gw("a:solidFill",void 0,[$w(t)])),void 0!==r&&s.push(hw("a:prstDash",{val:r})),a.push(0===s.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,s))}return gw("c:spPr",void 0,a)}(e.fillColor,e.borderColor,e.borderWidth,e.borderDash,e.borderCap,e.borderCompound);void 0!==n&&t.push(n);const r=function(e,t,n,r,i,o,a){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const s={};void 0!==e&&(s.sz=e*CI);void 0!==n&&(s.b=n?1:0);void 0!==r&&(s.i=r?1:0);void 0!==i&&(s.u=i?"sng":"none");!0===o&&(s.strike="sngStrike");const l=void 0!==t?gw("a:solidFill",void 0,[$w(t)]):void 0,c=a?hw("a:latin",{typeface:a}):void 0,u=[];l&&u.push(l);c&&u.push(c);const f=u.length>0?gw("a:defRPr",s,u):hw("a:defRPr",s);return gw("c:txPr",void 0,[hw("a:bodyPr"),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[f]),hw("a:endParaRPr",{lang:"en-US"})])])}(e.fontSize,e.fontColor,e.bold,e.italic,e.underline,e.strikethrough,e.fontFamily);return void 0!==r&&t.push(r),gw("c:dTable",void 0,t)}const RI=lI,UI=new Set(["t","b","l","r","ctr","inEnd","inBase","outEnd","bestFit"]);function HI(e){const t=Hb(e,"delete");if(t&&!0===bw(t))return;const n={},r=Hb(e,"dLblPos");if(r){const e=r.attrs.val;"string"==typeof e&&UI.has(e)&&(n.position=e)}const i=Hb(e,"showLegendKey");i&&!0===bw(i)&&(n.showLegendKey=!0);const o=Hb(e,"showVal");o&&!0===bw(o)&&(n.showValue=!0);const a=Hb(e,"showCatName");a&&!0===bw(a)&&(n.showCategoryName=!0);const s=Hb(e,"showSerName");s&&!0===bw(s)&&(n.showSeriesName=!0);const l=Hb(e,"showPercent");l&&!0===bw(l)&&(n.showPercent=!0);const c=Hb(e,"separator");if(c){const e=vw(c);e.length>0&&(n.separator=e)}const u=function(e){const t=Hb(e,"numFmt");if(!t)return;const n=t.attrs.formatCode;if("string"!=typeof n||0===n.length)return;const r={formatCode:n},i=t.attrs.sourceLinked;"string"==typeof i&&("1"!==i&&"true"!==i.toLowerCase()||(r.sourceLinked=!0));return r}(e);u&&(n.numberFormat=u);const f=Hb(e,"showLeaderLines");if(f){const e=f.attrs.val;"string"!=typeof e||"0"!==e&&"false"!==e.toLowerCase()||(n.showLeaderLines=!1)}const d=function(e){const t=iI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/RI*2)/2;return o<1||o>400?void 0:o}(e);void 0!==d&&(n.fontSize=d);const h=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(e);void 0!==h&&(n.fontColor=h);const p=function(e){const t=iI(e);if(!t)return;const n=t.attrs.b;return"1"===n||"true"===n||void 0}(e);void 0!==p&&(n.bold=p);const g=function(e){const t=iI(e);if(!t)return;const n=t.attrs.i;return"1"===n||"true"===n||void 0}(e);void 0!==g&&(n.italic=g);const m=function(e){const t=iI(e);if(!t)return;return"sng"===t.attrs.u||void 0}(e);void 0!==m&&(n.underline=m);const y=function(e){const t=iI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(e);void 0!==y&&(n.strikethrough=y);const v=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0===i.length?void 0:i}(e);void 0!==v&&(n.fontFamily=v);const A=jw(e);void 0!==A&&(n.fillColor=A);const b=function(e){return Vw(e)}(e);void 0!==b&&(n.borderColor=b);const w=Yw(e);void 0!==w&&(n.borderWidth=w);const I=Ww(e);void 0!==I&&(n.borderDash=I);const x=Qw(e);void 0!==x&&(n.borderCap=x);const C=Tw(e);return void 0!==C&&(n.borderCompound=C),void 0!==n.position||n.showValue||n.showCategoryName||n.showSeriesName||n.showPercent||n.showLegendKey||void 0!==n.separator||void 0!==n.numberFormat||void 0!==n.showLeaderLines||void 0!==n.fontSize||void 0!==n.fontColor||void 0!==n.bold||void 0!==n.italic||void 0!==n.underline||void 0!==n.strikethrough||void 0!==n.fontFamily||void 0!==n.fillColor||void 0!==n.borderColor||void 0!==n.borderWidth||void 0!==n.borderDash||void 0!==n.borderCap||void 0!==n.borderCompound?n:void 0}function qI(e){if(e.dataLabels)return OI(e.dataLabels,e.type)}function OI(e,t){const n=[],r=function(e){if(!e)return;const t=e.formatCode;if("string"!=typeof t||0===t.length)return;const n={formatCode:t};!0===e.sourceLinked&&(n.sourceLinked=!0);return n}(e.numberFormat);r&&n.push(hw("c:numFmt",{formatCode:r.formatCode,sourceLinked:!0===r.sourceLinked?1:0}));const i=function(e,t,n,r,i,o){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o)return;const a=[];void 0!==e&&a.push(gw("a:solidFill",void 0,[$w(e)]));if(void 0!==t||void 0!==n||void 0!==r||void 0!==i||void 0!==o){const e={};void 0!==n&&(e.w=Math.round(n*Bw)),void 0!==i&&(e.cap=i),void 0!==o&&(e.cmpd=o);const s=[];void 0!==t&&s.push(gw("a:solidFill",void 0,[$w(t)])),void 0!==r&&s.push(hw("a:prstDash",{val:r})),a.push(0===s.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,s))}return gw("c:spPr",void 0,a)}(yI(e.fillColor),function(e){return yI(e)}(e.borderColor),Gw(e.borderWidth),Jw(e.borderDash),Nw(e.borderCap),Mw(e.borderCompound));void 0!==i&&n.push(i);const o=function(e,t,n,r,i,o,a){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const s={};void 0!==e&&(s.sz=e*RI);void 0!==n&&(s.b=n?1:0);void 0!==r&&(s.i=r?1:0);void 0!==i&&(s.u=i?"sng":"none");!0===o&&(s.strike="sngStrike");const l=void 0!==t?gw("a:solidFill",void 0,[$w(t)]):void 0,c=a?hw("a:latin",{typeface:a}):void 0,u=[];l&&u.push(l);c&&u.push(c);const f=u.length>0?gw("a:defRPr",s,u):hw("a:defRPr",s);return gw("c:txPr",void 0,[hw("a:bodyPr"),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[f]),hw("a:endParaRPr",{lang:"en-US"})])])}(function(e){return pI(e)}(e.fontSize),function(e){return yI(e)}(e.fontColor),function(e){return!0===e||!1!==e&&void 0}(e.bold),function(e){return!0===e||!1!==e&&void 0}(e.italic),function(e){return!0===e||!1!==e&&void 0}(e.underline),function(e){return!0===e||void 0}(e.strikethrough),function(e){if("string"!=typeof e)return;const t=e.trim();return 0===t.length?void 0:t}(e.fontFamily));return void 0!==o&&n.push(o),e.position&&n.push(hw("c:dLblPos",{val:e.position})),n.push(hw("c:showLegendKey",{val:!0===e.showLegendKey?1:0})),n.push(hw("c:showVal",{val:e.showValue?1:0})),n.push(hw("c:showCatName",{val:e.showCategoryName?1:0})),n.push(hw("c:showSerName",{val:e.showSeriesName?1:0})),n.push(hw("c:showPercent",{val:e.showPercent?1:0})),n.push(hw("c:showBubbleSize",{val:0})),void 0!==e.separator&&n.push(gw("c:separator",void 0,uw(e.separator))),"pie"!==t&&"doughnut"!==t||!1!==e.showLeaderLines||n.push(hw("c:showLeaderLines",{val:0})),gw("c:dLbls",void 0,n)}const PI=new Set(["cone","coneToMax","box","cylinder","pyramid","pyramidToMax"]),$I=new Set(["linear","log","exp","power","poly","movingAvg"]),zI=new Set(["x","y"]),jI=new Set(["both","minus","plus"]),VI=new Set(["cust","fixedVal","percentage","stdDev","stdErr"]);function YI(e){const t=function(e){if("string"==typeof e)return PI.has(e)?e:void 0}(e);if(void 0!==t)return hw("c:shape",{val:t})}function WI(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");return r?zw(r.attrs.val):void 0}function GI(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=Hb(n,"solidFill");if(!r)return;const i=Hb(r,"srgbClr");return i?zw(i.attrs.val):void 0}function JI(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=n.attrs.w;if("string"!=typeof r)return;const i=Number.parseFloat(r);if(!Number.isFinite(i)||i<=0)return;const o=Math.round(i/Bw*4)/4;return o<Cw?Cw:o>Ew?Ew:o}function _I(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=Hb(n,"prstDash");if(!r)return;const i=r.attrs.val;if("string"!=typeof i)return;const o=i.trim();return kw.has(o)&&"solid"!==o?o:void 0}function XI(e){const t="string"==typeof e.type&&$I.has(e.type)?e.type:void 0;if(void 0===t)return;const n=[];"string"==typeof e.name&&e.name.trim().length>0&&n.push(gw("c:name",void 0,e.name.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")));const r=function(e){const t=zw(e.lineColor),n=Gw(e.lineWidth),r=Jw(e.lineDash);if(!t&&void 0===n&&void 0===r)return;const i={};void 0!==n&&(i.w=Math.round(n*Bw));const o=[];t&&o.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:t})]));void 0!==r&&o.push(hw("a:prstDash",{val:r}));const a=0===o.length?hw("a:ln",i):gw("a:ln",Object.keys(i).length>0?i:void 0,o);return gw("c:spPr",void 0,[a])}(e);if(r&&n.push(r),n.push(hw("c:trendlineType",{val:t})),"poly"===t&&"number"==typeof e.order&&Number.isFinite(e.order)){const t=Math.max(2,Math.min(6,Math.round(e.order)));n.push(hw("c:order",{val:t}))}if("movingAvg"===t&&"number"==typeof e.period&&Number.isFinite(e.period)){const t=Math.max(2,Math.min(100,Math.round(e.period)));n.push(hw("c:period",{val:t}))}return"number"==typeof e.forward&&Number.isFinite(e.forward)&&n.push(hw("c:forward",{val:e.forward})),"number"==typeof e.backward&&Number.isFinite(e.backward)&&n.push(hw("c:backward",{val:e.backward})),"number"==typeof e.intercept&&Number.isFinite(e.intercept)&&n.push(hw("c:intercept",{val:e.intercept})),!0===e.dispRSquared&&n.push(hw("c:dispRSqr",{val:1})),!0===e.dispEquation&&n.push(hw("c:dispEq",{val:1})),gw("c:trendline",void 0,n)}function KI(e){if(!zI.has(e.direction))return;if(!jI.has(e.type))return;if(!VI.has(e.valType))return;const t=[hw("c:errDir",{val:e.direction}),hw("c:errBarType",{val:e.type}),hw("c:errValType",{val:e.valType})];!0===e.noEndCap&&t.push(hw("c:noEndCap",{val:1})),"stdErr"!==e.valType&&"cust"!==e.valType&&"number"==typeof e.value&&Number.isFinite(e.value)&&t.push(hw("c:val",{val:e.value}));const n=zw(e.lineColor),r=Gw(e.lineWidth),i=Jw(e.lineDash);if(n||void 0!==r||void 0!==i){const e={};void 0!==r&&(e.w=Math.round(r*Bw));const o=[];n&&o.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:n})])),void 0!==i&&o.push(hw("a:prstDash",{val:i}));const a=0===o.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,o);t.push(gw("c:spPr",void 0,[a]))}return gw("c:errBars",void 0,t)}const ZI=new Set(["none","auto","circle","square","diamond","triangle","x","star","dot","dash","plus"]),ex=2,tx=72;function nx(e,t){return e.includes("!")?e:`${n=t,/^[A-Za-z_][A-Za-z0-9_]*$/.test(n)?n:`'${n.replace(/'/g,"''")}'`}!${e}`;var n}function rx(e,t,n){const r={kind:t,index:n},i=function(e){const t=Hb(e,"tx");if(!t)return;const n=Hb(t,"v");if(n){const e=vw(n).trim();if(e.length>0)return e}const r=Hb(t,"strRef");if(r){const e=Hb(r,"strCache");if(e)for(const t of qb(e)){if("pt"!==t.local)continue;const e=Hb(t,"v");if(e){const t=vw(e).trim();if(t.length>0)return t}}const t=Iw(r);if(t)return t}return}(e);void 0!==i&&(r.name=i);const o=Iw(Hb(e,"val"))??Iw(Hb(e,"yVal"));void 0!==o&&(r.valuesRef=o);const a=Iw(Hb(e,"cat"))??Iw(Hb(e,"xVal"));void 0!==a&&(r.categoriesRef=a);const s=function(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r){const e=r.attrs.val;if("string"!=typeof e)return;const t=e.replace(/^#/,"").toUpperCase();return/^[0-9A-F]{6}$/.test(t)?t:void 0}const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(e);void 0!==s&&(r.color=s);const l=Hb(e,"dLbls");if(l){const e=HI(l);e&&(r.dataLabels=e)}if("line"===t||"line3D"===t||"scatter"===t){const t=function(e){const t=Hb(e,"smooth");if(!t)return;return!0===bw(t)||void 0}(e);void 0!==t&&(r.smooth=t);const n=function(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r={},i=n.attrs.w;if("string"==typeof i){const e=Number.parseFloat(i);if(Number.isFinite(e)&&e>0){const t=Math.round(e/Bw*4)/4;r.width=t<Cw?Cw:t>Ew?Ew:t}}const o=Hb(n,"prstDash");if(o){const e=o.attrs.val;"string"==typeof e&&Sw.has(e)&&(r.dash=e)}const a=n.attrs.cap;if("string"==typeof a){const e=a.trim();Fw.has(e)&&"flat"!==e&&(r.cap=e)}const s=n.attrs.cmpd;if("string"==typeof s){const e=s.trim();Dw.has(e)&&"sng"!==e&&(r.compound=e)}return void 0===r.dash&&void 0===r.width&&void 0===r.cap&&void 0===r.compound?void 0:r}(e);void 0!==n&&(r.stroke=n);const i=ix(e);void 0!==i&&(r.marker=i)}if("bar"===t||"bar3D"===t){const t=function(e){const t=Hb(e,"invertIfNegative");if(!t)return;return!0===bw(t)||void 0}(e);void 0!==t&&(r.invertIfNegative=t)}if("pie"===t||"pie3D"===t||"doughnut"===t||"ofPie"===t){const t=function(e){const t=Hb(e,"explosion");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseFloat(n);if(!Number.isFinite(r)||r<0)return;const i=Math.round(r);return 0===i?void 0:i}(e);void 0!==t&&(r.explosion=t)}const c=function(e){const t=[];for(const n of qb(e)){if("dPt"!==n.local)continue;const e=Hb(n,"idx");if(!e)continue;const r=e.attrs.val;if("string"!=typeof r)continue;const i=Number.parseInt(r,10);if(!Number.isFinite(i)||i<0)continue;const o={idx:i},a=Hb(n,"explosion");if(a){const e=a.attrs.val;if("string"==typeof e){const t=Number.parseFloat(e);if(Number.isFinite(t)&&t>0){const e=Math.round(t);e>0&&(o.explosion=e)}}}const s=Hb(n,"bubble3D");s&&!0===bw(s)&&(o.bubble3D=!0);const l=WI(n);void 0!==l&&(o.fillColor=l);const c=GI(n);void 0!==c&&(o.borderColor=c);const u=JI(n);void 0!==u&&(o.borderWidth=u);const f=_I(n);void 0!==f&&(o.borderDash=f);const d=ix(n);void 0!==d&&(o.marker=d),t.push(o)}return t.length>0?t:void 0}(e);if(void 0!==c&&(r.dataPoints=c),"bar"===t||"bar3D"===t||"line"===t||"line3D"===t||"area"===t||"area3D"===t||"scatter"===t||"bubble"===t){const t=function(e){const t=[];for(const n of qb(e)){if("trendline"!==n.local)continue;const e=Hb(n,"trendlineType");if(!e)continue;const r=e.attrs.val;if("string"!=typeof r)continue;const i=r.trim();if(!$I.has(i))continue;const o={type:i},a=Hb(n,"name");if(a){let e="";for(const t of a.children)"string"==typeof t&&(e+=t);const t=e.trim();t.length>0&&(o.name=t)}const s=Hb(n,"order");if(s){const e=parseFloat(String(s.attrs.val??""));if(Number.isFinite(e)){const t=Math.round(e);t>=2&&t<=6&&(o.order=t)}}const l=Hb(n,"period");if(l){const e=parseFloat(String(l.attrs.val??""));if(Number.isFinite(e)){const t=Math.round(e);t>=2&&t<=100&&(o.period=t)}}const c=Hb(n,"forward");if(c){const e=parseFloat(String(c.attrs.val??""));Number.isFinite(e)&&(o.forward=e)}const u=Hb(n,"backward");if(u){const e=parseFloat(String(u.attrs.val??""));Number.isFinite(e)&&(o.backward=e)}const f=Hb(n,"intercept");if(f){const e=parseFloat(String(f.attrs.val??""));Number.isFinite(e)&&(o.intercept=e)}const d=Hb(n,"dispEq");d&&!0===bw(d)&&(o.dispEquation=!0);const h=Hb(n,"dispRSqr");h&&!0===bw(h)&&(o.dispRSquared=!0);const p=Hb(n,"spPr");if(p){const e=Hb(p,"ln");if(e){const t=Hb(e,"solidFill");if(t){const e=Hb(t,"srgbClr");if(e){const t=zw(e.attrs.val);t&&(o.lineColor=t)}}const n=e.attrs.w;if("string"==typeof n){const e=Number.parseFloat(n);if(Number.isFinite(e)&&e>0){const t=Math.round(e/Bw*4)/4;o.lineWidth=t>=Cw&&t<=Ew?t:t<Cw?Cw:Ew}}const r=Hb(e,"prstDash");if(r){const e=r.attrs.val;if("string"==typeof e){const t=e.trim();kw.has(t)&&"solid"!==t&&(o.lineDash=t)}}}}t.push(o)}return t.length>0?t:void 0}(e);void 0!==t&&(r.trendlines=t);const n=function(e){const t=[];for(const n of qb(e)){if("errBars"!==n.local)continue;const e=Hb(n,"errDir");if(!e)continue;const r=e.attrs.val;if("string"!=typeof r)continue;const i=r.trim();if(!zI.has(i))continue;const o=Hb(n,"errBarType");if(!o)continue;const a=o.attrs.val;if("string"!=typeof a)continue;const s=a.trim();if(!jI.has(s))continue;const l=Hb(n,"errValType");if(!l)continue;const c=l.attrs.val;if("string"!=typeof c)continue;const u=c.trim();if(!VI.has(u))continue;const f={direction:i,type:s,valType:u},d=Hb(n,"val");if(d){const e=parseFloat(String(d.attrs.val??""));Number.isFinite(e)&&(f.value=e)}const h=Hb(n,"noEndCap");h&&!0===bw(h)&&(f.noEndCap=!0);const p=Hb(n,"spPr");if(p){const e=Hb(p,"ln");if(e){const t=Hb(e,"solidFill");if(t){const e=Hb(t,"srgbClr");if(e){const t=zw(e.attrs.val);t&&(f.lineColor=t)}}const n=e.attrs.w;if("string"==typeof n){const e=Number.parseFloat(n);if(Number.isFinite(e)&&e>0){const t=Math.round(e/Bw*4)/4;f.lineWidth=t<Cw?Cw:t>Ew?Ew:t}}const r=Hb(e,"prstDash");if(r){const e=r.attrs.val;if("string"==typeof e){const t=e.trim();kw.has(t)&&"solid"!==t&&(f.lineDash=t)}}}}t.push(f)}return t.length>0?t:void 0}(e);void 0!==n&&(r.errorBars=n)}if("bubble"===t){const t=function(e){return Iw(Hb(e,"bubbleSize"))}(e);void 0!==t&&(r.bubbleSizeRef=t)}if("bar3D"===t){const t=function(e){const t=Hb(e,"shape");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();return PI.has(r)?r:void 0}(e);void 0!==t&&(r.shape3D=t)}return r}function ix(e){const t=Hb(e,"marker");if(!t)return;const n={},r=Hb(t,"symbol");if(r){const e=r.attrs.val;"string"==typeof e&&ZI.has(e)&&(n.symbol=e)}const i=Hb(t,"size");if(i){const e=i.attrs.val;if("string"==typeof e){const t=Number.parseInt(e,10);Number.isFinite(t)&&(n.size=t<2?2:t>72?72:t)}}const o=Hb(t,"spPr");if(o){const e=Hb(o,"solidFill");if(e){const t=Hb(e,"srgbClr"),r=t?.attrs.val;if("string"==typeof r){const e=r.replace(/^#/,"").toUpperCase();/^[0-9A-F]{6}$/.test(e)&&(n.fill=e)}}const t=Hb(o,"ln");if(t){const e=Hb(t,"solidFill");if(e){const t=Hb(e,"srgbClr"),r=t?.attrs.val;if("string"==typeof r){const e=r.replace(/^#/,"").toUpperCase();/^[0-9A-F]{6}$/.test(e)&&(n.line=e)}}}}return void 0!==n.symbol||void 0!==n.size||void 0!==n.fill||void 0!==n.line?n:void 0}function ox(e,t,n,r,i){const o=[hw("c:idx",{val:t}),hw("c:order",{val:t})];e.name&&o.push(gw("c:tx",void 0,[gw("c:v",void 0,uw(e.name))]));const a=function(e,t){let n;if("string"==typeof e){const t=e.replace(/^#/,"").toUpperCase();n=/^[0-9A-F]{6}$/.test(t)?t:void 0}else void 0!==e&&(n=Pw(e));const r=(c=t?.dash,void 0===c?void 0:Sw.has(c)?c:void 0),i=Gw(t?.width),o=Nw(t?.cap),a="flat"===o?void 0:o,s=Mw(t?.compound),l="sng"===s?void 0:s;var c;if(!n&&void 0===r&&void 0===i&&void 0===a&&void 0===l)return;const u=[];void 0!==n&&u.push(gw("a:solidFill",void 0,[$w(n)]));if(void 0!==n||void 0!==r||void 0!==i||void 0!==a||void 0!==l){const e={};void 0!==i&&(e.w=Math.round(i*Bw)),void 0!==a&&(e.cap=a),void 0!==l&&(e.cmpd=l);const t=[];void 0!==n&&t.push(gw("a:solidFill",void 0,[$w(n)])),void 0!==r&&t.push(hw("a:prstDash",{val:r})),u.push(0===t.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,t))}return gw("c:spPr",void 0,u)}(e.color,i?.stroke);a&&o.push(a);const s=ax(i?.marker);s&&o.push(s),!0===i?.invertIfNegative&&o.push(hw("c:invertIfNegative",{val:1}));const l=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<=0?void 0:t>400?400:t}(i?.explosion);void 0!==l&&o.push(hw("c:explosion",{val:l}));const c=function(e,t){if(!e||0===e.length)return[];const n="pie"===t||"doughnut"===t||"pie3D"===t,r=[];for(const t of e){if(!Number.isFinite(t.idx)||t.idx<0)continue;const e=Math.floor(t.idx),i=[];i.push(hw("c:idx",{val:e}));const o=ax(t.marker);if(o&&i.push(o),i.push(hw("c:bubble3D",{val:!0===t.bubble3D?1:0})),n&&void 0!==t.explosion&&Number.isFinite(t.explosion)){const e=Math.max(0,Math.min(400,Math.round(t.explosion)));e>0&&i.push(hw("c:explosion",{val:e}))}const a=zw(t.fillColor),s=zw(t.borderColor),l=Gw(t.borderWidth),c=Jw(t.borderDash);if(a||s||void 0!==l||void 0!==c){const e=[];if(a&&e.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:a})])),s||void 0!==l||void 0!==c){const t={};void 0!==l&&(t.w=Math.round(l*Bw));const n=[];s&&n.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:s})])),void 0!==c&&n.push(hw("a:prstDash",{val:c})),e.push(0===n.length?hw("a:ln",t):gw("a:ln",Object.keys(t).length>0?t:void 0,n))}i.push(gw("c:spPr",void 0,e))}r.push(gw("c:dPt",void 0,i))}return r}(i.dataPoints,i.chartType);for(const e of c)o.push(e);const u=(f=e.dataLabels,i.dataLabels,d=i.chartType,!1===f?gw("c:dLbls",void 0,[gw("c:dLbl",void 0,[hw("c:idx",{val:0}),hw("c:delete",{val:1})]),hw("c:delete",{val:1})]):f?OI(f,d):void 0);var f,d;if(u&&o.push(u),i.trendlines&&i.trendlines.length>0){if(!("pie"===i.chartType||"doughnut"===i.chartType)){const e=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const e=XI(n);e&&t.push(e)}return t}(i.trendlines);for(const t of e)o.push(t)}}if(i.errorBars&&i.errorBars.length>0){if(!("pie"===i.chartType||"doughnut"===i.chartType)){const e=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const e=KI(n);e&&t.push(e)}return t}(i.errorBars);for(const t of e)o.push(t)}}if(e.categories){const t=nx(e.categories,n);r?o.push(gw("c:xVal",void 0,[gw("c:numRef",void 0,[gw("c:f",void 0,uw(t))])])):o.push(gw("c:cat",void 0,[gw("c:strRef",void 0,[gw("c:f",void 0,uw(t))])]))}const h=nx(e.values,n);if(r?o.push(gw("c:yVal",void 0,[gw("c:numRef",void 0,[gw("c:f",void 0,uw(h))])])):o.push(gw("c:val",void 0,[gw("c:numRef",void 0,[gw("c:f",void 0,uw(h))])])),void 0!==i?.smooth&&o.push(hw("c:smooth",{val:i.smooth?1:0})),void 0!==i.shape3D){const e=YI(i.shape3D);e&&o.push(e)}if("string"==typeof i.bubbleSize&&i.bubbleSize.length>0){const e=nx(i.bubbleSize,n);o.push(gw("c:bubbleSize",void 0,[gw("c:numRef",void 0,[gw("c:f",void 0,uw(e))])]))}return gw("c:ser",void 0,o)}function ax(e){if(!e)return;const t=function(e){if(void 0!==e)return ZI.has(e)?e:void 0}(e.symbol),n=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<ex?ex:t>tx?tx:t}(e.size),r=zw(e.fill),i=zw(e.line);if(void 0===t&&void 0===n&&!r&&!i)return;const o=[];if(void 0!==t&&o.push(hw("c:symbol",{val:t})),void 0!==n&&o.push(hw("c:size",{val:n})),r||i){const e=[];r&&e.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:r})])),i&&e.push(gw("a:ln",void 0,[gw("a:solidFill",void 0,[hw("a:srgbClr",{val:i})])])),o.push(gw("c:spPr",void 0,e))}return gw("c:marker",void 0,o)}const sx=lI,lx=cI,cx=new Set(["none","in","out","cross"]),ux=new Set(["nextTo","low","high","none"]),fx=new Set(["ctr","l","r"]),dx=-90,hx=90,px=new Set(["autoZero","min","max"]),gx=new Set(["hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions"]),mx=new Set(["between","midCat"]);function yx(e,t){const n=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");if(r){const e=[];yw(r,e);const t=e.join("").trim();return t.length>0?t:void 0}const i=Hb(n,"strRef");if(i){const e=Hb(i,"strCache");if(e)for(const t of qb(e)){if("pt"!==t.local)continue;const e=Hb(t,"v");if(e){const t=vw(e).trim();if(t.length>0)return t}}}return}(e),r=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");if(!r)return;const i=Hb(r,"bodyPr");if(!i)return;const o=i.attrs.rot;if("string"!=typeof o)return;const a=o.trim();if(0===a.length)return;const s=Number.parseInt(a,10);if(!Number.isFinite(s))return;const l=Math.round(s/sI);return 0===l?void 0:l<dx?dx:l>hx?hx:l}(e),i=function(e){const t=oI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/sx*2)/2;return o<1||o>lx?void 0:o}(e),o=function(e){const t=oI(e);if(!t)return;return!0===Aw(t.attrs.b)||void 0}(e),a=function(e){const t=oI(e);if(!t)return;return!0===Aw(t.attrs.i)||void 0}(e),s=function(e){const t=oI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(e),l=function(e){const t=oI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(e),c=function(e){const t=oI(e);if(!t)return;return"sng"===t.attrs.u||void 0}(e),u=function(e){const t=oI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0===i.length?void 0:i}(e),f=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"overlay");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;switch(r){case"1":case"true":return!0;default:return}}(e),d=function(e){const t=Hb(e,"title");return t?eI(t):void 0}(e),h=function(e){const t=Hb(e,"title");return t?jw(t):void 0}(e),p=function(e){const t=Hb(e,"title");return t?Vw(t):void 0}(e),g=function(e){const t=Hb(e,"title");return t?Yw(t):void 0}(e),m=function(e){const t=Hb(e,"title");return t?Ww(t):void 0}(e),y=function(e){const t=Hb(e,"title");return t?Qw(t):void 0}(e),v=function(e){const t=Hb(e,"title");return t?Tw(t):void 0}(e),A=function(e){const t=void 0!==Hb(e,"majorGridlines"),n=void 0!==Hb(e,"minorGridlines");if(!t&&!n)return;const r={};t&&(r.major=!0);n&&(r.minor=!0);return r}(e),b=function(e){const t={},n=Hb(e,"scaling");if(n){const e=xw(n,"min");void 0!==e&&(t.min=e);const r=xw(n,"max");void 0!==r&&(t.max=r);const i=xw(n,"logBase");void 0!==i&&(t.logBase=i)}const r=xw(e,"majorUnit");void 0!==r&&r>0&&(t.majorUnit=r);const i=xw(e,"minorUnit");void 0!==i&&i>0&&(t.minorUnit=i);return Object.keys(t).length>0?t:void 0}(e),w=function(e){const t=Hb(e,"numFmt");if(!t)return;const n=t.attrs.formatCode;if("string"!=typeof n||0===n.length)return;const r={formatCode:n},i=t.attrs.sourceLinked;void 0!==i&&!0===Aw(i)&&(r.sourceLinked=!0);return r}(e),I=vx(e,"majorTickMark","out"),x=vx(e,"minorTickMark","none"),C=function(e){const t=Hb(e,"tickLblPos");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();return ux.has(r)?"nextTo"===r?void 0:r:void 0}(e),E=function(e){const t=Hb(e,"txPr");if(!t)return;const n=Hb(t,"bodyPr");if(!n)return;const r=n.attrs.rot;if("string"!=typeof r)return;const i=r.trim();if(0===i.length)return;const o=Number.parseInt(i,10);if(!Number.isFinite(o))return;const a=Math.round(o/sI);return 0===a?void 0:a<dx?dx:a>hx?hx:a}(e),B=function(e){const t=iI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/sx*2)/2;return o<1||o>lx?void 0:o}(e),S=function(e){const t=iI(e);if(!t)return;return!0===Aw(t.attrs.b)||void 0}(e),k=function(e){const t=iI(e);if(!t)return;return!0===Aw(t.attrs.i)||void 0}(e),F=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(e),D=function(e){const t=iI(e);if(!t)return;return"sng"===t.attrs.u||void 0}(e),N=function(e){const t=iI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(e),M=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0===i.length?void 0:i}(e),Q=function(e){const t=Hb(e,"scaling");if(!t)return;const n=Hb(t,"orientation");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;return"maxMin"===r.trim()||void 0}(e),T="catAx"===e.local||"dateAx"===e.local,L=T?Ax(e,"tickLblSkip"):void 0,R=T?Ax(e,"tickMarkSkip"):void 0,U=T?function(e){const t=Hb(e,"lblOffset");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);return Number.isFinite(i)?i<0||i>1e3||100===i?void 0:i:void 0}(e):void 0,H=T?function(e){const t=Hb(e,"lblAlgn");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();return fx.has(r)?"ctr"===r?void 0:r:void 0}(e):void 0,q="catAx"===e.local?function(e){const t=Hb(e,"noMultiLvlLbl");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n.trim()){case"1":case"true":return!0;default:return}}(e):void 0,O="catAx"===e.local?function(e){const t=Hb(e,"auto");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n.trim()){case"0":case"false":return!1;default:return}}(e):void 0,P=function(e){const t=Hb(e,"delete");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n.trim()){case"1":case"true":return!0;default:return}}(e),$=function(e){const t=Hb(e,"crossesAt");if(t){const e=t.attrs.val;if("string"==typeof e){const t=e.trim();if(t.length>0){const e=Number.parseFloat(t);if(Number.isFinite(e))return{crossesAt:e}}}}const n=Hb(e,"crosses");if(!n)return{};const r=n.attrs.val;if("string"!=typeof r)return{};const i=r.trim();return px.has(i)?"autoZero"===i?{}:{crosses:i}:{}}(e),z=$.crosses,j=$.crossesAt,V="valAx"===e.local?function(e){const t=Hb(e,"dispUnits");if(!t)return;const n={},r=Hb(t,"custUnit");if(r){const e=r.attrs.val;if("string"==typeof e){const t=Number.parseFloat(e.trim());Number.isFinite(t)&&t>0&&(n.custUnit=t)}}if(void 0===n.custUnit){const e=Hb(t,"builtInUnit");if(e){const t=e.attrs.val;if("string"==typeof t){const e=t.trim();gx.has(e)&&(n.unit=e)}}}if(void 0===n.unit&&void 0===n.custUnit)return;const i=Hb(t,"dispUnitsLbl");if(i){n.showLabel=!0;const e=Hb(i,"tx");if(e){const t=Hb(e,"rich");if(t){const e=[];for(const n of t.children){if("string"==typeof n)continue;if("p"!==n.local)continue;const t=[];for(const e of n.children)if("string"!=typeof e&&"r"===e.local)for(const n of e.children){if("string"==typeof n)continue;if("t"!==n.local)continue;let e="";for(const t of n.children)"string"==typeof t&&(e+=t);t.push(e)}t.length>0&&e.push(t.join(""))}const r=e.join("\n").trim();r.length>0&&(n.customLabel=r)}}}return n}(e):void 0,Y="valAx"===e.local?function(e){const t=Hb(e,"crossBetween");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();return mx.has(r)?r:void 0}(e):void 0,W=Y===t?void 0:Y;if(void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a&&void 0===s&&void 0===l&&void 0===c&&void 0===u&&void 0===f&&void 0===d&&void 0===h&&void 0===p&&void 0===g&&void 0===m&&void 0===y&&void 0===v&&void 0===A&&void 0===b&&void 0===w&&void 0===I&&void 0===x&&void 0===C&&void 0===E&&void 0===B&&void 0===S&&void 0===k&&void 0===F&&void 0===M&&void 0===D&&void 0===N&&void 0===Q&&void 0===L&&void 0===R&&void 0===U&&void 0===H&&void 0===q&&void 0===O&&void 0===P&&void 0===z&&void 0===j&&void 0===V&&void 0===W)return;const G={};return void 0!==n&&(G.title=n),void 0!==r&&(G.axisTitleRotation=r),void 0!==i&&(G.axisTitleFontSize=i),void 0!==o&&(G.axisTitleBold=o),void 0!==a&&(G.axisTitleItalic=a),void 0!==s&&(G.axisTitleColor=s),void 0!==l&&(G.axisTitleStrike=l),void 0!==c&&(G.axisTitleUnderline=c),void 0!==u&&(G.axisTitleFontFamily=u),void 0!==f&&(G.axisTitleOverlay=f),void 0!==d&&(G.axisTitleLayout=d),void 0!==h&&(G.axisTitleFillColor=h),void 0!==p&&(G.axisTitleBorderColor=p),void 0!==g&&(G.axisTitleBorderWidth=g),void 0!==m&&(G.axisTitleBorderDash=m),void 0!==y&&(G.axisTitleBorderCap=y),void 0!==v&&(G.axisTitleBorderCompound=v),void 0!==A&&(G.gridlines=A),void 0!==b&&(G.scale=b),void 0!==w&&(G.numberFormat=w),void 0!==I&&(G.majorTickMark=I),void 0!==x&&(G.minorTickMark=x),void 0!==C&&(G.tickLblPos=C),void 0!==E&&(G.labelRotation=E),void 0!==B&&(G.labelFontSize=B),void 0!==S&&(G.labelBold=S),void 0!==k&&(G.labelItalic=k),void 0!==F&&(G.labelColor=F),void 0!==M&&(G.labelFontFamily=M),void 0!==D&&(G.labelUnderline=D),void 0!==N&&(G.labelStrike=N),void 0!==Q&&(G.reverse=Q),void 0!==L&&(G.tickLblSkip=L),void 0!==R&&(G.tickMarkSkip=R),void 0!==U&&(G.lblOffset=U),void 0!==H&&(G.lblAlgn=H),void 0!==q&&(G.noMultiLvlLbl=q),void 0!==O&&(G.auto=O),void 0!==P&&(G.hidden=P),void 0!==z&&(G.crosses=z),void 0!==j&&(G.crossesAt=j),void 0!==V&&(G.dispUnits=V),void 0!==W&&(G.crossBetween=W),G}function vx(e,t,n){const r=Hb(e,t);if(!r)return;const i=r.attrs.val;if("string"!=typeof i)return;const o=i.trim();return cx.has(o)?o===n?void 0:o:void 0}function Ax(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;const i=r.trim();if(0===i.length)return;const o=Number.parseInt(i,10);return Number.isFinite(o)&&!(o<1||o>32767)&&1!==o?o:void 0}const bx=new Set(["autoZero","min","max"]),wx=111111111,Ix=222222222,xx=333333333,Cx=444444444,Ex=new Set(["none","in","out","cross"]),Bx=new Set(["nextTo","low","high","none"]);function Sx(e){if(!0===e.autoTitleDeleted)return!0;if(!1===e.autoTitleDeleted)return!1;return!((e.showTitle??Boolean(e.title))&&e.title)}function kx(e){if("string"!=typeof e)return;const t=e.trim();return t.length>0?t:void 0}function Fx(e){if(!e)return;const t=!0===e.major,n=!0===e.minor;return t||n?{major:t,minor:n}:void 0}function Dx(e){if(!e)return[];const t=[];return e.major&&t.push(gw("c:majorGridlines",void 0,[])),e.minor&&t.push(gw("c:minorGridlines",void 0,[])),t}function Nx(e){if(!e)return;const t={};return"number"==typeof e.min&&Number.isFinite(e.min)&&(t.min=e.min),"number"==typeof e.max&&Number.isFinite(e.max)&&(t.max=e.max),void 0!==t.min&&void 0!==t.max&&t.min>=t.max&&delete t.max,"number"==typeof e.majorUnit&&Number.isFinite(e.majorUnit)&&e.majorUnit>0&&(t.majorUnit=e.majorUnit),"number"==typeof e.minorUnit&&Number.isFinite(e.minorUnit)&&e.minorUnit>0&&(t.minorUnit=e.minorUnit),"number"==typeof e.logBase&&Number.isFinite(e.logBase)&&e.logBase>=2&&e.logBase<=1e3&&(t.logBase=e.logBase),Object.keys(t).length>0?t:void 0}function Mx(e){if(!e)return;const t="string"==typeof e.formatCode?e.formatCode:"";if(0===t.length)return;const n={formatCode:t};return!0===e.sourceLinked&&(n.sourceLinked=!0),n}function Qx(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<1||t>32767||1===t?void 0:t}function Tx(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<0||t>1e3||100===t?void 0:t}function Lx(e){if(void 0!==e&&("ctr"===e||"l"===e||"r"===e)&&"ctr"!==e)return e}function Rx(e){return!0===e}function Ux(e){if(void 0===e||"number"!=typeof e||!Number.isFinite(e))return;let t=Math.round(e);return t<dx?t=dx:t>hx&&(t=hx),0!==t?t:void 0}function Hx(e){if(void 0===e||"number"!=typeof e||!Number.isFinite(e))return;const t=Math.round(2*e)/2;return t<1||t>lx?void 0:t}function qx(e){return gI(e)}function Ox(e){return mI(e)}function Px(e){return yI(e)}function $x(e){return AI(e)}function zx(e){return vI(e)}function jx(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}function Vx(e,t,n,r,i,o,a,s){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a&&void 0===s)return;const l=void 0===e?void 0:e*sI,c=void 0===t?void 0:t*sx,u=void 0===n?void 0:n?1:0,f=void 0===r?void 0:r?1:0,d=!0===o?"sng":void 0,h=!0===a?"sngStrike":void 0,p=void 0!==i?gw("a:solidFill",void 0,[$w(i)]):void 0,g=s?hw("a:latin",{typeface:s}):void 0,m=[];p&&m.push(p),g&&m.push(g);const y=m.length>0?gw("a:defRPr",{sz:c,b:u,i:f,u:d,strike:h},m):hw("a:defRPr",{sz:c,b:u,i:f,u:d,strike:h});return gw("c:txPr",void 0,[hw("a:bodyPr",{rot:l}),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[y]),hw("a:endParaRPr",{lang:"en-US"})])])}function Yx(e,t){return"number"==typeof t&&Number.isFinite(t)?{kind:"numeric",value:t}:void 0!==e&&bx.has(e)&&"autoZero"!==e?{kind:"semantic",value:e}:{kind:"default"}}function Wx(e){switch(e.kind){case"numeric":return hw("c:crossesAt",{val:e.value});case"semantic":return hw("c:crosses",{val:e.value});case"default":return hw("c:crosses",{val:"autoZero"})}}function Gx(e,t=!1){const{before:n,after:r}=function(e){if(!e)return{before:[],after:[]};const t=[],n=[];return void 0!==e.logBase&&t.push(hw("c:logBase",{val:e.logBase})),void 0!==e.max&&n.push(hw("c:max",{val:e.max})),void 0!==e.min&&n.push(hw("c:min",{val:e.min})),{before:t,after:n}}(e);return gw("c:scaling",void 0,[...n,hw("c:orientation",{val:t?"maxMin":"minMax"}),...r])}function Jx(e){if(!e)return[];const t=[];return void 0!==e.majorUnit&&t.push(hw("c:majorUnit",{val:e.majorUnit})),void 0!==e.minorUnit&&t.push(hw("c:minorUnit",{val:e.minorUnit})),t}function _x(e){if(void 0===e)return;if("string"==typeof e)return gx.has(e)?{unit:e}:void 0;if("object"!=typeof e||null===e)return;const t={},n=e.unit;"string"==typeof n&&gx.has(n)&&(t.unit=n);const r=e.custUnit;if("number"==typeof r&&Number.isFinite(r)&&r>0&&(t.custUnit=r),void 0!==t.unit||void 0!==t.custUnit){if(!0===e.showLabel&&(t.showLabel=!0),"string"==typeof e.customLabel){const n=e.customLabel.trim();n.length>0&&(t.customLabel=n)}return t}}function Xx(e){if(!e)return[];const t=[];if(void 0!==e.custUnit)t.push(hw("c:custUnit",{val:e.custUnit}));else{if(void 0===e.unit)return[];t.push(hw("c:builtInUnit",{val:e.unit}))}if(!0===e.showLabel||"string"==typeof e.customLabel&&e.customLabel.trim().length>0){const n="string"==typeof e.customLabel?e.customLabel.trim():"";if(n.length>0){const e=n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=gw("c:rich",void 0,[hw("a:bodyPr"),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:r",void 0,[gw("a:t",void 0,e)])])]),i=gw("c:tx",void 0,[r]);t.push(gw("c:dispUnitsLbl",void 0,[i]))}else t.push(hw("c:dispUnitsLbl"))}return[gw("c:dispUnits",void 0,t)]}function Kx(e){if("string"==typeof e)return mx.has(e)?e:void 0}function Zx(e){if(!e)return[];const t=!0===e.sourceLinked?1:0;return[hw("c:numFmt",{formatCode:e.formatCode,sourceLinked:t})]}function eC(e){if(void 0!==e)return Ex.has(e)?e:void 0}function tC(e){if(void 0!==e)return Bx.has(e)?e:void 0}function nC(e,t,n){const r=[];return void 0!==e&&r.push(hw("c:majorTickMark",{val:e})),void 0!==t&&r.push(hw("c:minorTickMark",{val:t})),void 0!==n&&r.push(hw("c:tickLblPos",{val:n})),r}function rC(e,t){const n="column"===e?"b":"l",r="column"===e?"l":"b",i=[hw("c:axId",{val:wx}),Gx(t.xScale,t.xReverse),hw("c:delete",{val:t.xHidden?1:0}),hw("c:axPos",{val:n}),...Dx(t.xGridlines)];t.xAxisTitle&&i.push(iC(t.xAxisTitle,t.xAxisTitleRotation,t.xAxisTitleFontSize,t.xAxisTitleBold,t.xAxisTitleItalic,t.xAxisTitleColor,t.xAxisTitleStrike,t.xAxisTitleUnderline,t.xAxisTitleFontFamily,t.xAxisTitleOverlay,t.xAxisTitleLayout,t.xAxisTitleFillColor,t.xAxisTitleBorderColor,t.xAxisTitleBorderWidth,t.xAxisTitleBorderDash,t.xAxisTitleBorderCap,t.xAxisTitleBorderCompound)),i.push(...Zx(t.xNumFmt),...nC(t.xMajorTickMark,t.xMinorTickMark,t.xTickLblPos));const o=Vx(t.xLabelRotation,t.xLabelFontSize,t.xLabelBold,t.xLabelItalic,t.xLabelColor,t.xLabelUnderline,t.xLabelStrike,t.xLabelFontFamily);o&&i.push(o),i.push(hw("c:crossAx",{val:Ix}),Wx(t.xCrosses),hw("c:auto",{val:t.xAuto?1:0}),hw("c:lblAlgn",{val:t.xLblAlgn??"ctr"}),hw("c:lblOffset",{val:t.xLblOffset??100}),...function(e,t){const n=[];return void 0!==e&&n.push(hw("c:tickLblSkip",{val:e})),void 0!==t&&n.push(hw("c:tickMarkSkip",{val:t})),n}(t.xTickLblSkip,t.xTickMarkSkip),hw("c:noMultiLvlLbl",{val:t.xNoMultiLvlLbl?1:0}));const a=[hw("c:axId",{val:Ix}),Gx(t.yScale,t.yReverse),hw("c:delete",{val:t.yHidden?1:0}),hw("c:axPos",{val:r}),...Dx(t.yGridlines)];t.yAxisTitle&&a.push(iC(t.yAxisTitle,t.yAxisTitleRotation,t.yAxisTitleFontSize,t.yAxisTitleBold,t.yAxisTitleItalic,t.yAxisTitleColor,t.yAxisTitleStrike,t.yAxisTitleUnderline,t.yAxisTitleFontFamily,t.yAxisTitleOverlay,t.yAxisTitleLayout,t.yAxisTitleFillColor,t.yAxisTitleBorderColor,t.yAxisTitleBorderWidth,t.yAxisTitleBorderDash,t.yAxisTitleBorderCap,t.yAxisTitleBorderCompound)),a.push(...Zx(t.yNumFmt),...nC(t.yMajorTickMark,t.yMinorTickMark,t.yTickLblPos));const s=Vx(t.yLabelRotation,t.yLabelFontSize,t.yLabelBold,t.yLabelItalic,t.yLabelColor,t.yLabelUnderline,t.yLabelStrike,t.yLabelFontFamily);return s&&a.push(s),a.push(hw("c:crossAx",{val:wx}),Wx(t.yCrosses),hw("c:crossBetween",{val:t.yCrossBetween??"between"}),...Jx(t.yScale),...Xx(t.yDispUnits)),[gw("c:catAx",void 0,i),gw("c:valAx",void 0,a)]}function iC(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g,m){const y=void 0===t?0:6e4*t,v=void 0===n?1e3:n*sx,A=r?1:0,b=!0===i?1:void 0,w=!0===a?"sngStrike":void 0,I=!0===s?"sng":void 0,x=void 0!==o?gw("a:solidFill",void 0,[$w(o)]):void 0,C=l?hw("a:latin",{typeface:l}):void 0,E=[];x&&E.push(x),C&&E.push(C);const B=E.length>0?gw("a:defRPr",{sz:v,b:A,i:b,u:I,strike:w},E):hw("a:defRPr",{sz:v,b:A,i:b,u:I,strike:w}),S=E.length>0?gw("a:rPr",{lang:"en-US",sz:v,b:A,i:b,u:I,strike:w},E):hw("a:rPr",{lang:"en-US",sz:v,b:A,i:b,u:I,strike:w}),k=rI(u),F=[gw("c:tx",void 0,[gw("c:rich",void 0,[gw("a:bodyPr",{rot:y,spcFirstLastPara:1,vertOverflow:"ellipsis",wrap:"square",anchor:"ctr",anchorCtr:1},[]),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[B]),gw("a:r",void 0,[S,gw("a:t",void 0,uw(e))])])])])];k&&F.push(k),F.push(hw("c:overlay",{val:c?1:0}));const D=dI(f,d,h,p,g,m);return void 0!==D&&F.push(D),gw("c:title",void 0,F)}function oC(e){return hI(e)}function aC(e){return pI(e)}function sC(e){return gI(e)}function lC(e){return mI(e)}function cC(e){return yI(e)}function uC(e){return vI(e)}function fC(e){return AI(e)}function dC(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}const hC=new Set(["pie","pie3D","doughnut","ofPie"]),pC=new Set(["none","line","lineMarker","marker","smooth","smoothMarker"]),gC=new Set(["pie","doughnut"]),mC=new Set(["none","line","lineMarker","marker","smooth","smoothMarker"]);function yC(e,t){const n=Hb(e,"varyColors");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;const i=hC.has(t);let o;switch(r){case"1":case"true":o=!0;break;case"0":case"false":o=!1;break;default:return}return o!==i?o:void 0}function vC(e){const t=Hb(e,"scatterStyle");if(!t)return;const n=t.attrs.val;return"string"==typeof n&&pC.has(n)?n:void 0}function AC(e){return!!Hb(e,"dropLines")||void 0}function bC(e){return!!Hb(e,"hiLowLines")||void 0}function wC(e){return!!Hb(e,"serLines")||void 0}function IC(e){const t=Hb(e,"marker");if(!t)return;const n=t.attrs.val;if("string"==typeof n)switch(n){case"0":case"false":return!1;default:return}}function xC(e){const t=Hb(e,"grouping");if(!t)return;const n=t.attrs.val;if("string"==typeof n)switch(n){case"stacked":return"stacked";case"percentStacked":return"percentStacked";case"clustered":return"clustered";default:return}}function CC(e){const t=Hb(e,"holeSize");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<1||r>99)?r:void 0}function EC(e){const t=Hb(e,"gapWidth");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<0||r>500)&&150!==r?r:void 0}function BC(e){const t=Hb(e,"gapWidth");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<0||r>500)&&150!==r?r:void 0}function SC(e){const t=Hb(e,"overlap");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<-100||r>100)&&0!==r?r:void 0}function kC(e){const t=Hb(e,"firstSliceAng");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<0||r>360)&&0!==r&&360!==r?r:void 0}function FC(e){const t=Hb(e,"grouping");if(!t)return;const n=t.attrs.val;if("string"==typeof n)switch(n){case"stacked":return"stacked";case"percentStacked":return"percentStacked";default:return}}function DC(e,t){const n=rI(function(e){return tI(e.plotAreaLayout)}(e)),r=[n??hw("c:layout")],i={xAxisTitle:kx(e.axes?.x?.title),yAxisTitle:kx(e.axes?.y?.title),xAxisTitleRotation:oC(e.axes?.x?.axisTitleRotation),yAxisTitleRotation:oC(e.axes?.y?.axisTitleRotation),xAxisTitleFontSize:aC(e.axes?.x?.axisTitleFontSize),yAxisTitleFontSize:aC(e.axes?.y?.axisTitleFontSize),xAxisTitleBold:sC(e.axes?.x?.axisTitleBold),yAxisTitleBold:sC(e.axes?.y?.axisTitleBold),xAxisTitleItalic:lC(e.axes?.x?.axisTitleItalic),yAxisTitleItalic:lC(e.axes?.y?.axisTitleItalic),xAxisTitleColor:cC(e.axes?.x?.axisTitleColor),yAxisTitleColor:cC(e.axes?.y?.axisTitleColor),xAxisTitleStrike:uC(e.axes?.x?.axisTitleStrike),yAxisTitleStrike:uC(e.axes?.y?.axisTitleStrike),xAxisTitleUnderline:fC(e.axes?.x?.axisTitleUnderline),yAxisTitleUnderline:fC(e.axes?.y?.axisTitleUnderline),xAxisTitleFontFamily:dC(e.axes?.x?.axisTitleFontFamily),yAxisTitleFontFamily:dC(e.axes?.y?.axisTitleFontFamily),xAxisTitleOverlay:!0===e.axes?.x?.axisTitleOverlay,yAxisTitleOverlay:!0===e.axes?.y?.axisTitleOverlay,xAxisTitleLayout:tI(e.axes?.x?.axisTitleLayout),yAxisTitleLayout:tI(e.axes?.y?.axisTitleLayout),xAxisTitleFillColor:yI(e.axes?.x?.axisTitleFillColor),yAxisTitleFillColor:yI(e.axes?.y?.axisTitleFillColor),xAxisTitleBorderColor:yI(e.axes?.x?.axisTitleBorderColor),yAxisTitleBorderColor:yI(e.axes?.y?.axisTitleBorderColor),xAxisTitleBorderWidth:Gw(e.axes?.x?.axisTitleBorderWidth),yAxisTitleBorderWidth:Gw(e.axes?.y?.axisTitleBorderWidth),xAxisTitleBorderDash:Jw(e.axes?.x?.axisTitleBorderDash),yAxisTitleBorderDash:Jw(e.axes?.y?.axisTitleBorderDash),xAxisTitleBorderCap:Nw(e.axes?.x?.axisTitleBorderCap),yAxisTitleBorderCap:Nw(e.axes?.y?.axisTitleBorderCap),xAxisTitleBorderCompound:Mw(e.axes?.x?.axisTitleBorderCompound),yAxisTitleBorderCompound:Mw(e.axes?.y?.axisTitleBorderCompound),xGridlines:Fx(e.axes?.x?.gridlines),yGridlines:Fx(e.axes?.y?.gridlines),xScale:Nx(e.axes?.x?.scale),yScale:Nx(e.axes?.y?.scale),xNumFmt:Mx(e.axes?.x?.numberFormat),yNumFmt:Mx(e.axes?.y?.numberFormat),xMajorTickMark:eC(e.axes?.x?.majorTickMark),yMajorTickMark:eC(e.axes?.y?.majorTickMark),xMinorTickMark:eC(e.axes?.x?.minorTickMark),yMinorTickMark:eC(e.axes?.y?.minorTickMark),xTickLblPos:tC(e.axes?.x?.tickLblPos),yTickLblPos:tC(e.axes?.y?.tickLblPos),xLabelRotation:Ux(e.axes?.x?.labelRotation),yLabelRotation:Ux(e.axes?.y?.labelRotation),xLabelFontSize:Hx(e.axes?.x?.labelFontSize),yLabelFontSize:Hx(e.axes?.y?.labelFontSize),xLabelBold:qx(e.axes?.x?.labelBold),yLabelBold:qx(e.axes?.y?.labelBold),xLabelItalic:Ox(e.axes?.x?.labelItalic),yLabelItalic:Ox(e.axes?.y?.labelItalic),xLabelColor:Px(e.axes?.x?.labelColor),yLabelColor:Px(e.axes?.y?.labelColor),xLabelUnderline:$x(e.axes?.x?.labelUnderline),yLabelUnderline:$x(e.axes?.y?.labelUnderline),xLabelStrike:zx(e.axes?.x?.labelStrike),yLabelStrike:zx(e.axes?.y?.labelStrike),xLabelFontFamily:jx(e.axes?.x?.labelFontFamily),yLabelFontFamily:jx(e.axes?.y?.labelFontFamily),xReverse:!0===e.axes?.x?.reverse,yReverse:!0===e.axes?.y?.reverse,xTickLblSkip:Qx(e.axes?.x?.tickLblSkip),xTickMarkSkip:Qx(e.axes?.x?.tickMarkSkip),xLblOffset:Tx(e.axes?.x?.lblOffset),xLblAlgn:Lx(e.axes?.x?.lblAlgn),xNoMultiLvlLbl:!0===e.axes?.x?.noMultiLvlLbl,xAuto:!1!==e.axes?.x?.auto,xHidden:Rx(e.axes?.x?.hidden),yHidden:Rx(e.axes?.y?.hidden),xCrosses:Yx(e.axes?.x?.crosses,e.axes?.x?.crossesAt),yCrosses:Yx(e.axes?.y?.crosses,e.axes?.y?.crossesAt),xDispUnits:_x(e.axes?.x?.dispUnits),yDispUnits:_x(e.axes?.y?.dispUnits),xCrossBetween:Kx(e.axes?.x?.crossBetween),yCrossBetween:Kx(e.axes?.y?.crossBetween)};switch(e.type){case"bar":case"column":r.push(function(e,t){const n=e.barGrouping??"clustered",r="bar"===e.type?"bar":"col",i="percentStacked"===n||"stacked"===n,o=[hw("c:barDir",{val:r}),hw("c:grouping",{val:n}),hw("c:varyColors",{val:QC(e)?1:0})];for(let n=0;n<e.series.length;n++)o.push(ox(e.series[n],n,t,!1,{chartType:e.type,dataLabels:e.dataLabels,invertIfNegative:!0===e.series[n].invertIfNegative,dataPoints:e.series[n].dataPoints,trendlines:e.series[n].trendlines,errorBars:e.series[n].errorBars}));const a=qI(e);a&&o.push(a);const s=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<0?0:t>500?500:t}(e.gapWidth),l=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<-100?-100:t>100?100:t}(e.overlap),c=s??(i?void 0:150);void 0!==c&&o.push(hw("c:gapWidth",{val:c}));const u=l??(i?100:void 0);void 0!==u&&o.push(hw("c:overlap",{val:u}));!0===e.serLines&&o.push(gw("c:serLines",void 0,[]));return o.push(hw("c:axId",{val:wx})),o.push(hw("c:axId",{val:Ix})),gw("c:barChart",void 0,o)}(e,t)),r.push(...rC(e.type,i));break;case"line":r.push(function(e,t){const n=e.lineGrouping??"standard",r=[hw("c:grouping",{val:n}),hw("c:varyColors",{val:QC(e)?1:0})];for(let n=0;n<e.series.length;n++){const i=ox(e.series[n],n,t,!1,{chartType:e.type,smooth:!0===e.series[n].smooth,dataLabels:e.dataLabels,stroke:e.series[n].stroke,marker:e.series[n].marker,dataPoints:e.series[n].dataPoints,trendlines:e.series[n].trendlines,errorBars:e.series[n].errorBars});r.push(i)}const i=qI(e);i&&r.push(i);!0===e.dropLines&&r.push(gw("c:dropLines",void 0,[]));!0===e.hiLowLines&&r.push(gw("c:hiLowLines",void 0,[]));!0===e.upDownBars&&r.push(function(e){const t=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<0||t>500?void 0:t}(e)??150;return gw("c:upDownBars",void 0,[hw("c:gapWidth",{val:t})])}(e.upDownBarsGapWidth));return r.push(hw("c:marker",{val:!1===e.showLineMarkers?0:1})),r.push(hw("c:axId",{val:wx})),r.push(hw("c:axId",{val:Ix})),gw("c:lineChart",void 0,r)}(e,t)),r.push(...rC("column",i));break;case"area":r.push(function(e,t){const n=e.areaGrouping??"standard",r=[hw("c:grouping",{val:n}),hw("c:varyColors",{val:QC(e)?1:0})];for(let n=0;n<e.series.length;n++)r.push(ox(e.series[n],n,t,!1,{chartType:e.type,dataLabels:e.dataLabels,dataPoints:e.series[n].dataPoints,trendlines:e.series[n].trendlines,errorBars:e.series[n].errorBars}));const i=qI(e);i&&r.push(i);!0===e.dropLines&&r.push(gw("c:dropLines",void 0,[]));return r.push(hw("c:axId",{val:wx})),r.push(hw("c:axId",{val:Ix})),gw("c:areaChart",void 0,r)}(e,t)),r.push(...rC("column",i));break;case"pie":r.push(function(e,t){const n=[hw("c:varyColors",{val:QC(e)?1:0})];e.series.length>0&&n.push(ox(e.series[0],0,t,!1,{chartType:e.type,dataLabels:e.dataLabels,explosion:e.series[0].explosion,dataPoints:e.series[0].dataPoints}));const r=qI(e);r&&n.push(r);const i=NC(e.firstSliceAng);void 0!==i&&n.push(hw("c:firstSliceAng",{val:i}));return gw("c:pieChart",void 0,n)}(e,t));break;case"doughnut":r.push(function(e,t){const n=[hw("c:varyColors",{val:QC(e)?1:0})];for(let r=0;r<e.series.length;r++)n.push(ox(e.series[r],r,t,!1,{chartType:e.type,dataLabels:e.dataLabels,explosion:e.series[r].explosion,dataPoints:e.series[r].dataPoints}));const r=qI(e);r&&n.push(r);return n.push(hw("c:firstSliceAng",{val:NC(e.firstSliceAng)??0})),n.push(hw("c:holeSize",{val:MC(e.holeSize)})),gw("c:doughnutChart",void 0,n)}(e,t));break;case"scatter":r.push(function(e,t){const n=[hw("c:scatterStyle",{val:TC(e)}),hw("c:varyColors",{val:QC(e)?1:0})];for(let r=0;r<e.series.length;r++)n.push(ox(e.series[r],r,t,!0,{chartType:e.type,smooth:!0===e.series[r].smooth||void 0,dataLabels:e.dataLabels,stroke:e.series[r].stroke,marker:e.series[r].marker,dataPoints:e.series[r].dataPoints,trendlines:e.series[r].trendlines,errorBars:e.series[r].errorBars}));const r=qI(e);r&&n.push(r);return n.push(hw("c:axId",{val:xx})),n.push(hw("c:axId",{val:Cx})),gw("c:scatterChart",void 0,n)}(e,t)),r.push(...function(e){const t=[hw("c:axId",{val:xx}),Gx(e.xScale,e.xReverse),hw("c:delete",{val:e.xHidden?1:0}),hw("c:axPos",{val:"b"}),...Dx(e.xGridlines)];e.xAxisTitle&&t.push(iC(e.xAxisTitle,e.xAxisTitleRotation,e.xAxisTitleFontSize,e.xAxisTitleBold,e.xAxisTitleItalic,e.xAxisTitleColor,e.xAxisTitleStrike,e.xAxisTitleUnderline,e.xAxisTitleFontFamily,e.xAxisTitleOverlay,e.xAxisTitleLayout,e.xAxisTitleFillColor,e.xAxisTitleBorderColor,e.xAxisTitleBorderWidth,e.xAxisTitleBorderDash,e.xAxisTitleBorderCap,e.xAxisTitleBorderCompound)),t.push(...Zx(e.xNumFmt),...nC(e.xMajorTickMark,e.xMinorTickMark,e.xTickLblPos));const n=Vx(e.xLabelRotation,e.xLabelFontSize,e.xLabelBold,e.xLabelItalic,e.xLabelColor,e.xLabelUnderline,e.xLabelStrike,e.xLabelFontFamily);n&&t.push(n),t.push(hw("c:crossAx",{val:Cx}),Wx(e.xCrosses),hw("c:crossBetween",{val:e.xCrossBetween??"midCat"}),...Jx(e.xScale),...Xx(e.xDispUnits));const r=[hw("c:axId",{val:Cx}),Gx(e.yScale,e.yReverse),hw("c:delete",{val:e.yHidden?1:0}),hw("c:axPos",{val:"l"}),...Dx(e.yGridlines)];e.yAxisTitle&&r.push(iC(e.yAxisTitle,e.yAxisTitleRotation,e.yAxisTitleFontSize,e.yAxisTitleBold,e.yAxisTitleItalic,e.yAxisTitleColor,e.yAxisTitleStrike,e.yAxisTitleUnderline,e.yAxisTitleFontFamily,e.yAxisTitleOverlay,e.yAxisTitleLayout,e.yAxisTitleFillColor,e.yAxisTitleBorderColor,e.yAxisTitleBorderWidth,e.yAxisTitleBorderDash,e.yAxisTitleBorderCap,e.yAxisTitleBorderCompound)),r.push(...Zx(e.yNumFmt),...nC(e.yMajorTickMark,e.yMinorTickMark,e.yTickLblPos));const i=Vx(e.yLabelRotation,e.yLabelFontSize,e.yLabelBold,e.yLabelItalic,e.yLabelColor,e.yLabelUnderline,e.yLabelStrike,e.yLabelFontFamily);return i&&r.push(i),r.push(hw("c:crossAx",{val:xx}),Wx(e.yCrosses),hw("c:crossBetween",{val:e.yCrossBetween??"midCat"}),...Jx(e.yScale),...Xx(e.yDispUnits)),[gw("c:valAx",void 0,t),gw("c:valAx",void 0,r)]}(i));break;default:{const t=e.type;throw new Error(`Unsupported chart type: ${String(t)}`)}}const o=function(e){if("pie"===e.type||"doughnut"===e.type)return;const t=e.dataTable;var n;return void 0!==t&&!1!==t?!0===t?{showHorzBorder:!0,showVertBorder:!0,showOutline:!0,showKeys:!0,fontSize:void 0,fontColor:void 0,bold:void 0,italic:void 0,underline:void 0,strikethrough:void 0,fontFamily:void 0,fillColor:void 0,borderColor:void 0,borderWidth:void 0,borderDash:void 0,borderCap:void 0,borderCompound:void 0}:{showHorzBorder:!1!==t.showHorzBorder,showVertBorder:!1!==t.showVertBorder,showOutline:!1!==t.showOutline,showKeys:!1!==t.showKeys,fontSize:(n=t.fontSize,pI(n)),fontColor:SI(t.fontColor),bold:kI(t.bold),italic:FI(t.italic),underline:DI(t.underline),strikethrough:NI(t.strikethrough),fontFamily:MI(t.fontFamily),fillColor:QI(t.fillColor),borderColor:TI(t.borderColor),borderWidth:Gw(t.borderWidth),borderDash:Jw(t.borderDash),borderCap:Nw(t.borderCap),borderCompound:Mw(t.borderCompound)}:void 0}(e);void 0!==o&&r.push(LI(o));const a=function(e){const t=(s=e.plotAreaFillColor,yI(s)),n=function(e){return yI(e)}(e.plotAreaBorderColor),r=Gw(e.plotAreaBorderWidth),i=Jw(e.plotAreaBorderDash),o=Nw(e.plotAreaBorderCap),a=Mw(e.plotAreaBorderCompound);var s;if(void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const l=[];void 0!==t&&l.push(gw("a:solidFill",void 0,[$w(t)]));if(void 0!==n||void 0!==r||void 0!==i||void 0!==o||void 0!==a){const e={};void 0!==r&&(e.w=Math.round(r*Bw)),void 0!==o&&(e.cap=o),void 0!==a&&(e.cmpd=a);const t=[];void 0!==n&&t.push(gw("a:solidFill",void 0,[$w(n)])),void 0!==i&&t.push(hw("a:prstDash",{val:i})),l.push(0===t.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,t))}return gw("c:spPr",void 0,l)}(e);return void 0!==a&&r.push(a),gw("c:plotArea",void 0,r)}function NC(e){if(void 0===e||!Number.isFinite(e))return;let t=Math.round(e)%360;return t<0&&(t+=360),0!==t?t:void 0}function MC(e){if(void 0===e||!Number.isFinite(e))return 50;const t=Math.round(e);return t<10?10:t>90?90:t}function QC(e){return"boolean"==typeof e.varyColors?e.varyColors:gC.has(e.type)}function TC(e){const t=e.scatterStyle;return t&&mC.has(t)?t:"lineMarker"}const LC=new Map([["barChart","bar"],["bar3DChart","bar3D"],["lineChart","line"],["line3DChart","line3D"],["pieChart","pie"],["pie3DChart","pie3D"],["doughnutChart","doughnut"],["areaChart","area"],["area3DChart","area3D"],["scatterChart","scatter"],["bubbleChart","bubble"],["radarChart","radar"],["surfaceChart","surface"],["surface3DChart","surface3D"],["stockChart","stock"],["ofPieChart","ofPie"]]);function RC(e){const t=Ub(e),n="chartSpace"===t.local?t:Ob(t,"chartSpace");if(!n)return;const r=Hb(n,"chart");if(!r)return{kinds:[],seriesCount:0};const i={kinds:[],seriesCount:0},o=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");if(r){const e=[];yw(r,e);const t=e.join("").trim();return t.length>0?t:void 0}const i=Hb(n,"strRef");if(i){const e=Hb(i,"strCache");if(e)for(const t of qb(e)){if("pt"!==t.local)continue;const e=Hb(t,"v");if(e){const t=vw(e).trim();if(t.length>0)return t}}}}(r);void 0!==o&&(i.title=o);const a=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"overlay");if(!n)return;const r=n.attrs.val;if("string"==typeof r)switch(r){case"1":case"true":return!0;default:return}}(r);void 0!==a&&(i.titleOverlay=a);const s=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");if(!r)return;const i=Hb(r,"bodyPr");if(!i)return;const o=i.attrs.rot;if("string"!=typeof o)return;const a=o.trim();if(0===a.length)return;const s=Number.parseInt(a,10);if(!Number.isFinite(s))return;const l=Math.round(s/uI);return 0!==l?l<fI?fI:l>90?90:l:void 0}(r);void 0!==s&&(i.titleRotation=s);const l=function(e){const t=oI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/100*2)/2;return o<1||o>400?void 0:o}(r);void 0!==l&&(i.titleFontSize=l);const c=function(e){const t=oI(e);if(!t)return;return!0===Aw(t.attrs.b)||void 0}(r);void 0!==c&&(i.titleBold=c);const u=function(e){const t=oI(e);if(!t)return;return!0===Aw(t.attrs.i)||void 0}(r);void 0!==u&&(i.titleItalic=u);const f=function(e){const t=oI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(r);void 0!==f&&(i.titleColor=f);const d=function(e){const t=oI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(r);void 0!==d&&(i.titleStrike=d);const h=function(e){const t=oI(e);if(!t)return;return"sng"===t.attrs.u||void 0}(r);void 0!==h&&(i.titleUnderline=h);const p=function(e){const t=oI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0!==i.length?i:void 0}(r);void 0!==p&&(i.titleFontFamily=p);const g=function(e){const t=Hb(e,"title");if(t)return eI(t)}(r);void 0!==g&&(i.titleLayout=g);const m=function(e){const t=Hb(e,"title");if(t)return jw(t)}(r);void 0!==m&&(i.titleFillColor=m);const y=function(e){const t=Hb(e,"title");if(t)return Vw(t)}(r);void 0!==y&&(i.titleBorderColor=y);const v=function(e){const t=Hb(e,"title");if(t)return Yw(t)}(r);void 0!==v&&(i.titleBorderWidth=v);const A=function(e){const t=Hb(e,"title");if(t)return Ww(t)}(r);void 0!==A&&(i.titleBorderDash=A);const b=function(e){const t=Hb(e,"title");if(t)return Qw(t)}(r);void 0!==b&&(i.titleBorderCap=b);const w=function(e){const t=Hb(e,"title");if(t)return Tw(t)}(r);void 0!==w&&(i.titleBorderCompound=w);const I=function(e){const t=Hb(e,"autoTitleDeleted");if(!t)return;const n=t.attrs.val;if("string"==typeof n)switch(n){case"1":case"true":return!0;default:return}}(r);void 0!==I&&(i.autoTitleDeleted=I);const x=Hb(r,"plotArea");if(x){let e=0;const t=[];let n,r,o,a,s,l,c,u,f,d,h,p,g,m,y,v;for(const A of qb(x)){const b=LC.get(A.local);if(!b)continue;if(i.kinds.includes(b)||i.kinds.push(b),void 0===f&&(f=yC(A,b)),void 0!==n||"bar"!==b&&"bar3D"!==b||(n=xC(A)),void 0!==l||"bar"!==b&&"bar3D"!==b||(l=EC(A)),void 0!==c||"bar"!==b&&"bar3D"!==b||(c=SC(A)),void 0!==r||"line"!==b&&"line3D"!==b||(r=FC(A)),void 0!==o||"area"!==b&&"area3D"!==b||(o=FC(A)),void 0===s&&"doughnut"===b&&(s=CC(A)),void 0!==u||"pie"!==b&&"pie3D"!==b&&"doughnut"!==b&&"ofPie"!==b||(u=kC(A)),void 0===d&&"scatter"===b&&(d=vC(A)),void 0!==h||"line"!==b&&"line3D"!==b&&"area"!==b&&"area3D"!==b||(h=AC(A)),void 0!==p||"line"!==b&&"line3D"!==b&&"stock"!==b||(p=bC(A)),void 0!==g||"bar"!==b&&"ofPie"!==b||(g=wC(A)),void 0===m&&("line"===b||"line3D"===b||"stock"===b)){const e=Hb(A,"upDownBars");void 0!==e&&(m=!0,y=BC(e))}void 0===v&&"line"===b&&(v=IC(A));let w=0;for(const n of qb(A))"ser"===n.local&&(e++,t.push(rx(n,b,w)),w++);if(void 0===a){const e=Hb(A,"dLbls");if(e){const t=HI(e);t&&(a=t)}}}i.seriesCount=e,t.length>0&&(i.series=t),void 0!==n&&(i.barGrouping=n),void 0!==r&&(i.lineGrouping=r),void 0!==o&&(i.areaGrouping=o),a&&(i.dataLabels=a),void 0!==s&&(i.holeSize=s),void 0!==l&&(i.gapWidth=l),void 0!==c&&(i.overlap=c),void 0!==u&&(i.firstSliceAng=u),void 0!==f&&(i.varyColors=f),void 0!==d&&(i.scatterStyle=d),void 0!==h&&(i.dropLines=h),void 0!==p&&(i.hiLowLines=p),void 0!==g&&(i.serLines=g),void 0!==m&&(i.upDownBars=m),void 0!==y&&(i.upDownBarsGapWidth=y),void 0!==v&&(i.showLineMarkers=v);const A=function(e){let t;const n=[];for(const r of qb(e))"catAx"===r.local?t??=r:"valAx"===r.local&&n.push(r);let r,i;t?(r=t,i=n[0]):(r=n[0],i=n[1]);const o=t?"between":"midCat",a=r?yx(r,o):void 0,s=i?yx(i,o):void 0;if(!a&&!s)return;const l={};return a&&(l.x=a),s&&(l.y=s),l}(x);void 0!==A&&(i.axes=A);const b=EI(x);void 0!==b&&(i.dataTable=b);const w=function(e){return eI(e)}(x);void 0!==w&&(i.plotAreaLayout=w);const I=function(e){return jw(e)}(x);void 0!==I&&(i.plotAreaFillColor=I);const C=function(e){return Vw(e)}(x);void 0!==C&&(i.plotAreaBorderColor=C);const E=function(e){return Yw(e)}(x);void 0!==E&&(i.plotAreaBorderWidth=E);const B=Ww(x);void 0!==B&&(i.plotAreaBorderDash=B);const S=Qw(x);void 0!==S&&(i.plotAreaBorderCap=S);const k=Tw(x);void 0!==k&&(i.plotAreaBorderCompound=k)}const C=function(e){const t=Hb(e,"legend");if(!t)return;const n=Hb(t,"delete");if(n&&!0===ww(n.attrs.val))return!1;const r=Hb(t,"legendPos");if(!r)return"right";const i=r.attrs.val;if("string"!=typeof i)return"right";switch(i){case"t":return"top";case"b":return"bottom";case"l":return"left";case"r":return"right";case"tr":return"topRight";default:return}}(r);if(void 0!==C&&(i.legend=C),void 0!==C&&!1!==C){const e=function(e){const t=Hb(e,"legend");if(!t)return;const n=Hb(t,"overlay");if(!n)return;const r=n.attrs.val;if("string"==typeof r)switch(r){case"1":case"true":return!0;default:return}}(r);void 0!==e&&(i.legendOverlay=e);const t=function(e){const t=Hb(e,"legend");if(!t)return;const n=new Set,r=[];for(const e of qb(t)){if("legendEntry"!==e.local)continue;const t=Hb(e,"idx");if(!t)continue;const i=t.attrs.val;if("string"!=typeof i)continue;const o=Number.parseInt(i,10);if(!Number.isFinite(o)||o<0)continue;if(n.has(o))continue;n.add(o);const a=Hb(e,"delete"),s={idx:o,delete:void 0!==a&&!0===ww(a.attrs.val)},l=iI(e);if(l){const e=l.attrs.sz;if("string"==typeof e){const t=e.trim();if(t.length>0){const e=Number.parseInt(t,10);if(Number.isFinite(e)){const t=Math.round(e/bI*2)/2;t>=1&&t<=wI&&(s.fontSize=t)}}}const t=l.attrs.b;"string"==typeof t&&!0===ww(t)&&(s.bold=!0);const n=l.attrs.i;"string"==typeof n&&!0===ww(n)&&(s.italic=!0);const r=l.attrs.u;"string"==typeof r&&"sng"===r&&(s.underline=!0);const i=l.attrs.strike;"string"==typeof i&&"sngStrike"===i&&(s.strikethrough=!0);const o=Hb(l,"solidFill");if(o){const e=Hb(o,"srgbClr");if(e){const t=e.attrs.val;if("string"==typeof t){const e=t.replace(/^#/,"").toUpperCase();/^[0-9A-F]{6}$/.test(e)&&(s.color=e)}}}const a=Hb(l,"latin");if(a){const e=a.attrs.typeface;if("string"==typeof e){const t=e.trim();t.length>0&&(s.fontFamily=t)}}}r.push(s)}return r.length>0?r:void 0}(r);void 0!==t&&(i.legendEntries=t);const n=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=n.attrs.sz;if("string"!=typeof r)return;const i=r.trim();if(0===i.length)return;const o=Number.parseInt(i,10);if(!Number.isFinite(o))return;const a=Math.round(o/bI*2)/2;return a<1||a>wI?void 0:a}(r);void 0!==n&&(i.legendFontSize=n);const o=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=n.attrs.b;return"1"===r||"true"===r||void 0}(r);void 0!==o&&(i.legendBold=o);const a=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=n.attrs.i;return"1"===r||"true"===r||void 0}(r);void 0!==a&&(i.legendItalic=a);const s=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;return"sng"===n.attrs.u||void 0}(r);void 0!==s&&(i.legendUnderline=s);const l=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;return"sngStrike"===n.attrs.strike||void 0}(r);void 0!==l&&(i.legendStrikethrough=l);const c=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=Hb(n,"solidFill");if(!r)return;const i=Hb(r,"srgbClr");if(i)return zw(i.attrs.val);const o=Hb(r,"schemeClr");return o?Ow(o):void 0}(r);void 0!==c&&(i.legendFontColor=c);const u=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=Hb(n,"latin");if(!r)return;const i=r.attrs.typeface;if("string"!=typeof i)return;const o=i.trim();return 0!==o.length?o:void 0}(r);void 0!==u&&(i.legendFontFamily=u);const f=function(e){const t=Hb(e,"legend");if(t)return eI(t)}(r);void 0!==f&&(i.legendLayout=f);const d=function(e){const t=Hb(e,"legend");if(t)return jw(t)}(r);void 0!==d&&(i.legendFillColor=d);const h=function(e){const t=Hb(e,"legend");if(t)return Vw(t)}(r);void 0!==h&&(i.legendBorderColor=h);const p=function(e){const t=Hb(e,"legend");if(t)return Yw(t)}(r);void 0!==p&&(i.legendBorderWidth=p);const g=function(e){const t=Hb(e,"legend");if(t)return Ww(t)}(r);void 0!==g&&(i.legendBorderDash=g);const m=function(e){const t=Hb(e,"legend");if(t)return Qw(t)}(r);void 0!==m&&(i.legendBorderCap=m);const y=function(e){const t=Hb(e,"legend");if(t)return Tw(t)}(r);void 0!==y&&(i.legendBorderCompound=y)}const E=function(e){const t=Hb(e,"dispBlanksAs");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"zero":return"zero";case"span":return"span";default:return}}(r);void 0!==E&&(i.dispBlanksAs=E);const B=function(e){const t=Hb(e,"plotVisOnly");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"0":case"false":return!1;default:return}}(r);void 0!==B&&(i.plotVisOnly=B);const S=function(e){const t=Hb(e,"showDLblsOverMax");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"0":case"false":return!1;default:return}}(r);void 0!==S&&(i.showDLblsOverMax=S);const k=function(e){const t=Hb(e,"roundedCorners");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"1":case"true":return!0;default:return}}(n);void 0!==k&&(i.roundedCorners=k);const F=function(e){const t=Hb(e,"style");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;if(!/^\d+$/.test(n))return;const r=Number(n);return Number.isInteger(r)?r<1||r>48?void 0:r:void 0}(n);void 0!==F&&(i.style=F);const D=function(e){const t=Hb(e,"lang");if(!t)return;const n=t.attrs.val;return"string"!=typeof n?void 0:/^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(n)?n:void 0}(n);void 0!==D&&(i.lang=D);const N=function(e){const t=Hb(e,"date1904");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"1":case"true":return!0;default:return}}(n);void 0!==N&&(i.date1904=N);const M=function(e){const t=Hb(e,"protection");if(!t)return;const n={},r=UC(t,"chartObject");void 0!==r&&(n.chartObject=r);const i=UC(t,"data");void 0!==i&&(n.data=i);const o=UC(t,"formatting");void 0!==o&&(n.formatting=o);const a=UC(t,"selection");void 0!==a&&(n.selection=a);const s=UC(t,"userInterface");void 0!==s&&(n.userInterface=s);return n}(n);void 0!==M&&(i.protection=M);const Q=_w(r);void 0!==Q&&(i.view3D=Q);const T=function(e){const t=Hb(e,"floor");if(!t)return;const n=Hb(t,"thickness");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;if(!/^\d+$/.test(r))return;const i=Number(r);return!Number.isInteger(i)||0===i||i>100?void 0:i}(r);void 0!==T&&(i.floorThickness=T);const L=function(e){const t=Hb(e,"sideWall");if(!t)return;const n=Hb(t,"thickness");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;if(!/^\d+$/.test(r))return;const i=Number(r);return!Number.isInteger(i)||0===i||i>100?void 0:i}(r);void 0!==L&&(i.sideWallThickness=L);const R=function(e){const t=Hb(e,"backWall");if(!t)return;const n=Hb(t,"thickness");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;if(!/^\d+$/.test(r))return;const i=Number(r);return!Number.isInteger(i)||0===i||i>100?void 0:i}(r);void 0!==R&&(i.backWallThickness=R);const U=function(e){return jw(e)}(n);void 0!==U&&(i.chartSpaceFillColor=U);const H=function(e){return Vw(e)}(n);void 0!==H&&(i.chartSpaceBorderColor=H);const q=Yw(n);void 0!==q&&(i.chartSpaceBorderWidth=q);const O=Ww(n);void 0!==O&&(i.chartSpaceBorderDash=O);const P=Qw(n);void 0!==P&&(i.chartSpaceBorderCap=P);const $=Tw(n);return void 0!==$&&(i.chartSpaceBorderCompound=$),i}function UC(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"==typeof r)switch(r){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}const HC=1073741824,qC=1048575,OC=16383,PC=16777216,$C=Object.freeze([208,207,17,224,161,177,26,225]);async function zC(e,t){if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if("object"==typeof(n=e)&&null!==n&&"function"==typeof n.getReader)return async function(e,t=1073741824){const n=Number.isFinite(t)&&t>0?t:HC,r=e.getReader(),i=[];let o=0;try{for(;;){const{done:e,value:t}=await r.read();if(e)break;if(t){if(o+=t.length,o>n)throw new mb(`Input stream exceeds the maximum of ${n} bytes. Raise \`maxInputBytes\` if the file really is this large.`);i.push(t)}}if(0===i.length)return new Uint8Array(0);if(1===i.length)return i[0];const e=new Uint8Array(o);let t=0;for(const n of i)e.set(n,t),t+=n.length;return e}finally{try{await r.cancel()}catch{}try{r.releaseLock()}catch{}}}(e,t);var n;throw new mb("Unsupported input type. Expected Uint8Array, ArrayBuffer, or ReadableStream<Uint8Array>.")}const jC=[208,207,17,224,161,177,26,225],VC=4294967294,YC=4294967295,WC=4096,GC=64;function JC(e){if(e.length<512)throw new mb("CFB: file too small");for(let t=0;t<jC.length;t++)if(e[t]!==jC[t])throw new mb("CFB: bad signature");const t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1<<t.getUint16(30,!0),r=1<<t.getUint16(32,!0),i=t.getUint32(44,!0),o=t.getUint32(48,!0),a=t.getUint32(56,!0),s=t.getUint32(60,!0),l=t.getUint32(64,!0),c=t.getUint32(68,!0),u=t.getUint32(72,!0),f=t=>{const r=(e=>(e+1)*n)(t);if(r+n>e.length)throw new mb("CFB: sector out of range");return e.subarray(r,r+n)},d=[];for(let e=0;e<109&&d.length<i;e++){const n=t.getUint32(76+4*e,!0);if(n===YC||n===VC)break;d.push(n)}const h=Math.floor(e.length/n)+1,p=Math.min(u,h);let g=c,m=0;for(;g!==VC&&g!==YC&&p>0&&m++<p+1;){const e=f(g),t=new DataView(e.buffer,e.byteOffset,e.byteLength),r=n/4-1;for(let e=0;e<r&&d.length<i;e++){const n=t.getUint32(4*e,!0);n!==YC&&n!==VC&&d.push(n)}g=t.getUint32(n-4,!0)}const y=[];for(const e of d){const t=f(e),r=new DataView(t.buffer,t.byteOffset,t.byteLength);for(let e=0;e<n/4;e++)y.push(r.getUint32(4*e,!0))}const v=(e,t)=>{const r=(e=>{const t=[];let n=e,r=0;for(;n!==VC&&n!==YC&&r++<y.length+1;)t.push(n),n=y[n]??VC;return t})(e),i=new Uint8Array(r.length*n);let o=0;for(const e of r)i.set(f(e),o),o+=n;return t>=0?i.subarray(0,t):i},A=v(o,-1),b=new DataView(A.buffer,A.byteOffset,A.byteLength),w=[];for(let e=0;e+128<=A.length;e+=128){const t=A[e+66];if(0===t)continue;const n=b.getUint16(e+64,!0);let r="";for(let t=0;t+1<n;t+=2){const n=b.getUint16(e+t,!0);if(0===n)break;r+=String.fromCharCode(n)}const i=b.getUint32(e+116,!0),o=b.getUint32(e+120,!0);w.push({name:r,type:t,startSector:i,size:o})}const I=w.find(e=>5===e.type);if(!I)throw new mb("CFB: missing root entry");const x=v(I.startSector,I.size),C=[];if(l>0&&s!==VC){const e=v(s,l*n),t=new DataView(e.buffer,e.byteOffset,e.byteLength);for(let n=0;n<e.length/4;n++)C.push(t.getUint32(4*n,!0))}const E=(e,t)=>{if(t<0||t>x.length)throw new mb("CFB: mini stream size out of range");const n=new Uint8Array(t);let i=e,o=0,a=0;for(;i!==VC&&i!==YC&&o<t&&a++<C.length+1;){const e=i*r,a=Math.min(r,t-o);n.set(x.subarray(e,e+a),o),o+=a,i=C[i]??VC}return n},B=new Map;for(const e of w){if(2!==e.type)continue;const t=a||WC;B.set(e.name,e.size<t?E(e.startSector,e.size):v(e.startSector,e.size))}return B}function _C(e){const t=512,n=[],r=[],i=[],o=new Map;let a=0;for(const t of e)if(t.data.length<WC){o.set(t.name,{mini:!0}),r.push(a);const e=XC(t.data,GC);n.push(e),a+=e.length/GC}else o.set(t.name,{mini:!1}),i.push({name:t.name,data:t.data});const s=function(e){let t=0;for(const n of e)t+=n.length;const n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(n);let l=0;const c=e=>{const n=Math.max(1,Math.ceil(e/t)),r=l;return l+=n,{startSector:r,sectorCount:n}},u=i.map(e=>({name:e.name,data:e.data,region:c(e.data.length)})),f=s.length>0?c(s.length):null,d=new Uint8Array(Math.ceil(Math.max(a,0)/128)*t);{const t=new DataView(d.buffer);for(let e=0;e<d.length/4;e++)t.setUint32(4*e,YC,!0);let n=0;for(const i of e){if(i.data.length>=WC)continue;const e=XC(i.data,GC).length/GC;for(let i=0;i<e;i++){const o=r[n]+i;t.setUint32(4*o,i===e-1?VC:o+1,!0)}n++}}const h=a>0?c(d.length):null,p=1+e.length,g=Math.ceil(p/4)*t,m=c(g),y=l;let v=1;for(;;){const e=y+v,t=Math.ceil(e/128);if(t<=v)break;v=t}const A={startSector:l,sectorCount:v};l+=v;const b=l,w=new Uint32Array(128*v);w.fill(YC);const I=e=>{for(let t=0;t<e.sectorCount;t++)w[e.startSector+t]=t===e.sectorCount-1?VC:e.startSector+t+1};for(const e of u)I(e.region);f&&I(f),h&&I(h),I(m);for(let e=0;e<v;e++)w[A.startSector+e]=4294967293;const x=new Uint8Array(g),C=new DataView(x.buffer),E=(e,t,n,r,i,o,a,s,l)=>{const c=128*e;for(let e=0;e<t.length;e++)C.setUint16(c+2*e,t.charCodeAt(e),!0);C.setUint16(c+64,2*(t.length+1),!0),x[c+66]=n,x[c+67]=r,C.setUint32(c+68,i,!0),C.setUint32(c+72,o,!0),C.setUint32(c+76,a,!0),C.setUint32(c+116,s,!0),C.setUint32(c+120,l,!0)};for(let e=0;e<g/128;e++)C.setUint32(128*e+68,YC,!0),C.setUint32(128*e+72,YC,!0),C.setUint32(128*e+76,YC,!0);E(0,"Root Entry",5,1,YC,YC,e.length>0?1:YC,f?f.startSector:VC,s.length);for(let t=0;t<e.length;t++){const n=e[t],r=o.get(n.name),i=t+1,a=t+1<e.length?i+1:YC;let s;if(r.mini){let n=0;for(let r=0;r<t;r++){const t=e[r];t.data.length<WC&&(n+=XC(t.data,GC).length/GC)}s=n}else{s=u.find(e=>e.name===n.name).region.startSector}E(i,n.name,2,1,YC,a,YC,s,n.data.length)}const B=new Uint8Array((b+1)*t),S=new DataView(B.buffer);for(let e=0;e<jC.length;e++)B[e]=jC[e];S.setUint16(24,62,!0),S.setUint16(26,3,!0),S.setUint16(28,65534,!0),S.setUint16(30,9,!0),S.setUint16(32,6,!0),S.setUint32(44,v,!0),S.setUint32(48,m.startSector,!0),S.setUint32(56,WC,!0),S.setUint32(60,h?h.startSector:VC,!0),S.setUint32(64,h?h.sectorCount:0,!0),S.setUint32(68,VC,!0),S.setUint32(72,0,!0);for(let e=0;e<109;e++)S.setUint32(76+4*e,e<v?A.startSector+e:YC,!0);const k=e=>(e+1)*t,F=(e,t)=>{B.set(t,k(e.startSector))};for(const e of u)F(e.region,e.data);f&&F(f,s),h&&F(h,d),F(m,x);{const e=k(A.startSector),n=new DataView(B.buffer,e,v*t);for(let e=0;e<w.length;e++)n.setUint32(4*e,w[e],!0)}return B}function XC(e,t){if(e.length%t===0)return e;const n=new Uint8Array(Math.ceil(e.length/t)*t);return n.set(e,0),n}const KC=new Uint8Array([254,167,210,118,59,75,158,121]),ZC=new Uint8Array([215,170,15,109,48,97,52,78]),eE=new Uint8Array([20,110,11,231,171,172,208,214]),tE=new Uint8Array([95,178,173,1,12,185,225,246]),nE=new Uint8Array([160,103,127,2,178,44,132,51]),rE=4096,iE=new Uint8Array(16);async function oE(e,t,n=1e7){let r;try{r=JC(e)}catch(e){throw new wb("Not a valid encrypted workbook container.",{cause:e})}const i=r.get("EncryptionInfo"),o=r.get("EncryptedPackage");if(!i||!o)throw new wb("Encrypted workbook missing EncryptionInfo/EncryptedPackage.");const a=i[0]|i[1]<<8,s=i[2]|i[3]<<8;if(4!==a||4!==s)throw new wb(`Unsupported encryption (version ${a}.${s}); only ECMA-376 Agile is supported.`);const l=new TextDecoder("utf-8").decode(i.subarray(8)),c=function(e,t){const n=AE(e,"encryptedKey");if(!n)throw new wb("EncryptionInfo missing encryptedKey.");const r=parseInt(bE(n,"spinCount"),10);if(!Number.isFinite(r)||r<0)throw new wb("EncryptionInfo has an invalid spinCount.");if(r>t)throw new wb(`EncryptionInfo spinCount ${r} exceeds the maximum of ${t}. Raise \`maxSpinCount\` to agree to spend that time.`);return{saltValue:kE(bE(n,"saltValue")),hashAlgorithm:IE(bE(n,"hashAlgorithm")),keyBytes:parseInt(bE(n,"keyBits"),10)/8,blockSize:parseInt(bE(n,"blockSize"),10),spinCount:r,encryptedVerifierHashInput:kE(bE(n,"encryptedVerifierHashInput")),encryptedVerifierHashValue:kE(bE(n,"encryptedVerifierHashValue")),encryptedKeyValue:kE(bE(n,"encryptedKeyValue"))}}(l,n),u=function(e){const t=AE(e,"keyData");if(!t)throw new wb("EncryptionInfo missing keyData.");return{saltValue:kE(bE(t,"saltValue")),hashAlgorithm:IE(bE(t,"hashAlgorithm")),keyBytes:parseInt(bE(t,"keyBits"),10)/8,blockSize:parseInt(bE(t,"blockSize"),10)}}(l),f=await async function(e,t){const n=await lE(e,t.saltValue,t.spinCount,t.hashAlgorithm),r=await cE(n,KC,t.keyBytes,t.hashAlgorithm),i=await cE(n,ZC,t.keyBytes,t.hashAlgorithm),o=await cE(n,eE,t.keyBytes,t.hashAlgorithm),a=await mE(r,t.saltValue,t.encryptedVerifierHashInput),s=await mE(i,t.saltValue,t.encryptedVerifierHashValue),l=await hE(t.hashAlgorithm,a),c=Math.min(l.length,s.length);if(!function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n}(l.subarray(0,c),s.subarray(0,c)))return null;const u=await mE(o,t.saltValue,t.encryptedKeyValue);return u.subarray(0,t.keyBytes)}(t,c);if(!f)throw new wb("Incorrect password.");return await async function(e,t,n,r){const i=AE(e,"dataIntegrity");if(!i)return;if("SHA-512"!==r.hashAlgorithm)return;const o=kE(bE(i,"encryptedHmacKey")),a=kE(bE(i,"encryptedHmacValue"));if(0===o.length||0===a.length)return;const s=await uE(r.saltValue,tE,r.hashAlgorithm,r.blockSize),l=await uE(r.saltValue,nE,r.hashAlgorithm,r.blockSize),c=await mE(n,s,o),u=await mE(n,l,a),f=await vE(c,t),d=Math.min(f.length,u.length);let h=0===f.length?1:0;for(let e=0;e<d;e++)h|=f[e]^u[e];if(0!==h)throw new wb("Encrypted package failed integrity check (HMAC mismatch).")}(l,o,f,u),async function(e,t,n){const r=Number(new DataView(e.buffer,e.byteOffset,8).getBigUint64(0,!0)),i=e.subarray(8),o=new Uint8Array(Math.ceil(i.length/rE)*rE),a=new Uint8Array(4),s=new DataView(a.buffer);let l=0,c=0;for(;l<i.length;){const e=i.subarray(l,Math.min(l+rE,i.length));s.setUint32(0,c,!0);const r=fE(await hE(n.hashAlgorithm,EE([n.saltValue,a])),n.blockSize),u=await mE(t,r,e);o.set(u,l),l+=rE,c++}return o.subarray(0,r)}(o,f,u)}async function aE(e,t,n){const r=n?.spinCount??1e5,i="SHA-512",o=32,a=16,s=xE(16),l=xE(16),c=xE(o),u=await lE(t,l,r,i),f=xE(a),d=await hE(i,f),h=await cE(u,KC,o,i),p=await cE(u,ZC,o,i),g=await cE(u,eE,o,i),m=await yE(h,l,f),y=await yE(p,l,CE(d,a)),v=await yE(g,l,c),A=await async function(e,t,n){const r=new Uint8Array(8);new DataView(r.buffer).setBigUint64(0,BigInt(e.length),!0);const i=CE(e,rE),o=new Uint8Array(i.length),a=new Uint8Array(4),s=new DataView(a.buffer);let l=0,c=0;for(;l<i.length;){const e=i.subarray(l,l+rE);s.setUint32(0,c,!0);const r=fE(await hE(n.hashAlgorithm,EE([n.saltValue,a])),n.blockSize),u=await yE(t,r,e);o.set(u,l),l+=rE,c++}return EE([r,o])}(e,c,{saltValue:s,hashAlgorithm:i,keyBytes:o,blockSize:a}),b=xE(64),w=await uE(s,tE,i,a),I=await yE(c,w,CE(b,a)),x=await vE(b,A),C=await uE(s,nE,i,a),E=function(e){const t=SE;return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><encryption xmlns="http://schemas.microsoft.com/office/2006/encryption" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password"><keyData saltSize="${e.keyDataSalt.length}" blockSize="${e.blockSize}" keyBits="${e.keyBits}" hashSize="${e.hashSize}" cipherAlgorithm="AES" cipherChaining="ChainingModeCBC" hashAlgorithm="SHA512" saltValue="${t(e.keyDataSalt)}"/><dataIntegrity encryptedHmacKey="${t(e.encryptedHmacKey)}" encryptedHmacValue="${t(e.encryptedHmacValue)}"/><keyEncryptors><keyEncryptor uri="http://schemas.microsoft.com/office/2006/keyEncryptor/password"><p:encryptedKey spinCount="${e.spinCount}" saltSize="${e.pwSalt.length}" blockSize="${e.blockSize}" keyBits="${e.keyBits}" hashSize="${e.hashSize}" cipherAlgorithm="AES" cipherChaining="ChainingModeCBC" hashAlgorithm="SHA512" saltValue="${t(e.pwSalt)}" encryptedVerifierHashInput="${t(e.encryptedVerifierHashInput)}" encryptedVerifierHashValue="${t(e.encryptedVerifierHashValue)}" encryptedKeyValue="${t(e.encryptedKeyValue)}"/></keyEncryptor></keyEncryptors></encryption>`}({keyDataSalt:s,pwSalt:l,spinCount:r,keyBits:256,hashSize:64,blockSize:a,encryptedVerifierHashInput:m,encryptedVerifierHashValue:y,encryptedKeyValue:v,encryptedHmacKey:I,encryptedHmacValue:await yE(c,C,CE(x,a))}),B=new Uint8Array(8),S=new DataView(B.buffer);S.setUint16(0,4,!0),S.setUint16(2,4,!0),S.setUint32(4,64,!0);return _C([{name:"EncryptionInfo",data:EE([B,(new TextEncoder).encode(E)])},{name:"EncryptedPackage",data:A}])}function sE(e){const t=new Uint8Array(2*e.length),n=new DataView(t.buffer);for(let t=0;t<e.length;t++)n.setUint16(2*t,e.charCodeAt(t),!0);return t}async function lE(e,t,n,r){let i=await hE(r,EE([t,sE(e)]));const o=new Uint8Array(4),a=new DataView(o.buffer);for(let e=0;e<n;e++)a.setUint32(0,e,!0),i=await hE(r,EE([o,i]));return i}async function cE(e,t,n,r){return function(e,t){if(e.length>=t)return e.subarray(0,t);const n=new Uint8Array(t).fill(54);return n.set(e,0),n}(await hE(r,EE([e,t])),n)}async function uE(e,t,n,r){return fE(await hE(n,EE([e,t])),r)}function fE(e,t){if(e.length>=t)return e.subarray(0,t);const n=new Uint8Array(t).fill(54);return n.set(e,0),n}const dE=e=>e;async function hE(e,t){return new Uint8Array(await crypto.subtle.digest(e,dE(t)))}async function pE(e){return crypto.subtle.importKey("raw",dE(e),{name:"AES-CBC"},!1,["encrypt","decrypt"])}async function gE(e,t,n){if(0===n.length)return new Uint8Array(0);const r=n.subarray(n.length-16),i=new Uint8Array(16);for(let e=0;e<16;e++)i[e]=16^r[e];const o=await async function(e,t){return new Uint8Array(await crypto.subtle.encrypt({name:"AES-CBC",iv:dE(iE)},e,dE(t))).subarray(0,16)}(e,i),a=EE([n,o]);return new Uint8Array(await crypto.subtle.decrypt({name:"AES-CBC",iv:dE(t)},e,dE(a))).subarray(0,n.length)}async function mE(e,t,n){return gE(await pE(e),t,n)}async function yE(e,t,n){return async function(e,t,n){return 0===n.length?new Uint8Array(0):new Uint8Array(await crypto.subtle.encrypt({name:"AES-CBC",iv:dE(t)},e,dE(n))).subarray(0,n.length)}(await pE(e),t,n)}async function vE(e,t){const n=await crypto.subtle.importKey("raw",dE(e),{name:"HMAC",hash:"SHA-512"},!1,["sign"]);return new Uint8Array(await crypto.subtle.sign("HMAC",n,dE(t)))}function AE(e,t){const n=new RegExp(`<(?:\\w+:)?${t}\\b[^>]*?/?>`).exec(e);return n?n[0]:null}function bE(e,t){const n=new RegExp(`\\b${t}="([^"]*)"`).exec(e);return n?n[1]:""}const wE={SHA512:"SHA-512",SHA384:"SHA-384",SHA256:"SHA-256",SHA1:"SHA-1"};function IE(e){return wE[e]??"SHA-512"}function xE(e){const t=new Uint8Array(e);return crypto.getRandomValues(t),t}function CE(e,t){if(e.length%t===0)return e;const n=new Uint8Array(Math.ceil(e.length/t)*t);return n.set(e,0),n}function EE(e){let t=0;for(const n of e)t+=n.length;const n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}const BE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function SE(e){let t="",n=0;for(;n+2<e.length;n+=3){const r=e[n]<<16|e[n+1]<<8|e[n+2];t+=BE[r>>18&63]+BE[r>>12&63]+BE[r>>6&63]+BE[63&r]}if(n<e.length){if(1===e.length-n){const r=e[n]<<16;t+=BE[r>>18&63]+BE[r>>12&63]+"=="}else{const r=e[n]<<16|e[n+1]<<8;t+=BE[r>>18&63]+BE[r>>12&63]+BE[r>>6&63]+"="}}return t}function kE(e){const t=e.replace(/[^A-Za-z0-9+/]/g,""),n=Math.floor(3*t.length/4),r=new Uint8Array(n);let i=0,o=0,a=0;for(let e=0;e<t.length;e++)o=o<<6|BE.indexOf(t[e]),i+=6,i>=8&&(i-=8,r[a++]=o>>i&255);return r.subarray(0,a)}function FE(e){let t=0;return new ReadableStream({pull(n){if(t>=e.length)return void n.close();const r=Math.min(t+1048576,e.length);n.enqueue(e.subarray(t,r)),t=r}})}const DE=(()=>{const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e})();function NE(e){return t=function(e,t){let n=e;for(let e=0;e<t.length;e++)n=DE[255&(n^t[e])]^n>>>8;return n>>>0}(4294967295,e),(4294967295^t)>>>0;var t}class ME{data;pos=0;bitBuf=0;bitCount=0;constructor(e){this.data=e}readBits(e){for(;this.bitCount<e;){if(this.pos>=this.data.length)throw new yb("Unexpected end of DEFLATE data");this.bitBuf|=this.data[this.pos++]<<this.bitCount,this.bitCount+=8}const t=this.bitBuf&(1<<e)-1;return this.bitBuf>>>=e,this.bitCount-=e,t}alignToByte(){this.bitBuf=0,this.bitCount=0}readByte(){if(this.pos>=this.data.length)throw new yb("Unexpected end of DEFLATE data");return this.data[this.pos++]}readUint16LE(){return this.readByte()|this.readByte()<<8}get offset(){return this.pos}get available(){return this.pos<this.data.length||this.bitCount>0}}function QE(e,t){const n=new Uint16Array(16);for(let r=0;r<t;r++)e[r]&&n[e[r]]++;const r=new Uint16Array(16);for(let e=1;e<15;e++)r[e+1]=r[e]+n[e];const i=r[15]+n[15],o=new Uint16Array(i);for(let n=0;n<t;n++)e[n]&&(o[r[e[n]]++]=n);return{counts:n,symbols:o}}function TE(e,t){let n=0,r=0,i=0;for(let o=1;o<=15;o++){n|=e.readBits(1);const a=t.counts[o];if(n<r+a)return t.symbols[i+(n-r)];i+=a,r=r+a<<1,n<<=1}throw new yb("Invalid Huffman code")}const LE=(()=>{const e=new Uint8Array(288);for(let t=0;t<=143;t++)e[t]=8;for(let t=144;t<=255;t++)e[t]=9;for(let t=256;t<=279;t++)e[t]=7;for(let t=280;t<=287;t++)e[t]=8;return QE(e,288)})(),RE=(()=>{const e=new Uint8Array(32);for(let t=0;t<32;t++)e[t]=5;return QE(e,32)})(),UE=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],HE=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],qE=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],OE=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],PE=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function $E(e,t=2147483648){const n=new ME(e);let r=new Uint8Array(3*e.length||1024),i=0;function o(e){if(i+e>t)throw new yb(`Decompressed size exceeds limit of ${t} bytes (possible zip bomb)`);if(i+e>r.length){let n=2*r.length;for(;i+e>n;)n*=2;n>t&&(n=t);const o=new Uint8Array(n);o.set(r),r=o}}function a(e){o(1),r[i++]=e}function s(e,t){o(t);let n=i-e;for(let e=0;e<t;e++)r[i++]=r[n++]}function l(e,t){for(;;){const r=TE(n,e);if(r<256)a(r);else{if(256===r)return;{const e=r-257,i=UE[e]+n.readBits(HE[e]),o=TE(n,t);s(qE[o]+n.readBits(OE[o]),i)}}}}let c=0;do{c=n.readBits(1);const e=n.readBits(2);if(0===e){n.alignToByte();const e=n.readUint16LE();n.readUint16LE(),o(e);for(let t=0;t<e;t++)r[i++]=n.readByte()}else if(1===e)l(LE,RE);else{if(2!==e)throw new yb(`Invalid DEFLATE block type: ${e}`);{const e=n.readBits(5)+257,t=n.readBits(5)+1,r=n.readBits(4)+4,i=new Uint8Array(19);for(let e=0;e<r;e++)i[PE[e]]=n.readBits(3);const o=QE(i,19),a=e+t,s=new Uint8Array(a);let c=0;for(;c<a;){const e=TE(n,o);if(e<16)s[c++]=e;else if(16===e){const e=n.readBits(2)+3,t=c>0?s[c-1]:0;for(let n=0;n<e;n++)s[c++]=t}else if(17===e){const e=n.readBits(3)+3;for(let t=0;t<e;t++)s[c++]=0}else if(18===e){const e=n.readBits(7)+11;for(let t=0;t<e;t++)s[c++]=0}}const u=s.subarray(0,e),f=s.subarray(e,e+t);l(QE(u,e),QE(f,t))}}}while(0===c);return r.subarray(0,i)}function zE(e){return 0===e.length?new Uint8Array([3,0]):e.length<=64?function(e){const t=[];let n=0;for(;n<e.length;){const r=e.length-n,i=Math.min(r,65535),o=n+i>=e.length,a=new Uint8Array(5+i);a[0]=o?1:0,a[1]=255&i,a[2]=i>>8&255,a[3]=255&~i,a[4]=~i>>8&255,a.set(e.subarray(n,n+i),5),t.push(a),n+=i}const r=t.reduce((e,t)=>e+t.length,0),i=new Uint8Array(r);let o=0;for(const e of t)i.set(e,o),o+=e.length;return i}(e):function(e){let t=new Uint8Array(e.length+512),n=0,r=0,i=0;function o(e){if(n+e>t.length){let r=2*t.length;for(;n+e>r;)r*=2;const i=new Uint8Array(r);i.set(t),t=i}}function a(e,a){for(r|=e<<i,i+=a;i>=8;)o(1),t[n++]=255&r,r>>>=8,i-=8}function s(){i>0&&(o(1),t[n++]=255&r,r=0,i=0)}function l(e){e<=143?a(jE(48+e,8),8):e<=255?a(jE(e-144+400,9),9):e<=279?a(jE(e-256,7),7):a(jE(e-280+192,8),8)}function c(e){a(jE(e,5),5)}a(1,1),a(1,2);const u=32768,f=258,d=3,h=32768,p=h-1,g=new Int32Array(h).fill(-1),m=new Int32Array(u);function y(t){return t+2>=e.length?0:(e[t]<<10^e[t+1]<<5^e[t+2])&p}let v=0;for(;v<e.length;){if(v+d>e.length){l(e[v]),v++;continue}const t=y(v);let n=d-1,r=0,i=g[t],o=0;const s=128,h=Math.max(0,v-u);for(;i>=h&&o<s;){const t=v-i;if(t>0&&t<=u){let o=0;const a=Math.min(f,e.length-v);for(;o<a&&e[i+o]===e[v+o];)o++;if(o>n&&(n=o,r=t,o===f))break}i=m[i&u-1],o++}if(m[v&u-1]=g[t],g[t]=v,n>=d){const t=VE(n);l(t+257),a(n-UE[t],HE[t]);const i=YE(r);c(i),a(r-qE[i],OE[i]);for(let t=1;t<n;t++){const n=v+t;if(n+d<=e.length){const e=y(n);m[n&u-1]=g[e],g[e]=n}}v+=n}else l(e[v]),v++}return l(256),s(),t.subarray(0,n)}(e)}function jE(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}function VE(e){for(let t=UE.length-1;t>=0;t--)if(e>=UE[t])return t;return 0}function YE(e){for(let t=qE.length-1;t>=0;t--)if(e>=qE[t])return t;return 0}let WE,GE;function JE(){if(void 0===GE)try{new DecompressionStream("deflate-raw"),GE="undefined"!=typeof ReadableStream}catch{GE=!1}return GE}const _E=67324752,XE=4294967295;class KE{data;view;centralDir=[];entryMap=new Map;maxDecompressedBytes;constructor(e,t=2147483648){if(this.data=e,this.maxDecompressedBytes=t,e.length<22)throw new yb("Data too small to be a valid ZIP archive");this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.readEndOfCentralDir()}entries(){return this.centralDir.map(e=>e.fileName)}has(e){return this.entryMap.has(e)}declaredSize(e){const t=this.entryMap.get(e);if(!t?.uncompressedSize)return;const n=0===t.compressionMethod?t.compressedSize:1032*t.compressedSize;return t.compressedSize>0&&t.uncompressedSize>n?void 0:t.uncompressedSize}async extract(e){const t=this.entryMap.get(e);if(!t)throw new yb(`Entry not found: ${e}`);return this.extractEntry(t)}extractStream(e){const t=this.entryMap.get(e);if(!t)throw new yb(`Entry not found: ${e}`);return this.extractEntryStream(t)}async extractAll(){const e=new Map;for(const t of this.centralDir){if(t.fileName.endsWith("/"))continue;const n=await this.extractEntry(t);e.set(t.fileName,n)}return e}readEndOfCentralDir(){const e=Math.max(0,this.data.length-65557);let t=-1;for(let n=this.data.length-22;n>=e;n--)if(101010256===this.view.getUint32(n,!0)){t=n;break}if(-1===t)throw new yb("End of Central Directory not found — not a valid ZIP file");let n=this.view.getUint32(t+12,!0),r=this.view.getUint32(t+16,!0),i=this.view.getUint16(t+10,!0);if(65535===i||n===XE||r===XE){const e=this.readZip64EndOfCentralDir(t);i=e.entryCount,n=e.centralDirSize,r=e.centralDirOffset}this.readCentralDirectory(r,n,i)}readZip64EndOfCentralDir(e){const t=e-20;if(t<0||117853008!==this.view.getUint32(t,!0))throw new yb("ZIP64 End of Central Directory locator not found");const n=this.readUint64(t+8,"ZIP64 EOCD offset");if(n+56>this.data.length)throw new yb("ZIP64 End of Central Directory record extends beyond file");if(101075792!==this.view.getUint32(n,!0))throw new yb("Invalid ZIP64 End of Central Directory signature");return{entryCount:this.readUint64(n+32,"ZIP64 entry count"),centralDirSize:this.readUint64(n+40,"ZIP64 central directory size"),centralDirOffset:this.readUint64(n+48,"ZIP64 central directory offset")}}readUint64(e,t){if(e+8>this.data.length)throw new yb(`${t} extends beyond file`);const n=this.view.getBigUint64(e,!0);if(n>BigInt(Number.MAX_SAFE_INTEGER))throw new yb(`${t} (${n}) exceeds the addressable range`);return Number(n)}readCentralDirectory(e,t,n){let r=e;for(let e=0;e<n;e++){if(r+46>this.data.length)throw new yb("Central Directory entry extends beyond file");const e=this.view.getUint32(r,!0);if(33639248!==e)throw new yb(`Invalid Central Directory signature at offset ${r}: 0x${e.toString(16)}`);const t=this.view.getUint16(r+8,!0),n=this.view.getUint16(r+10,!0),i=this.view.getUint32(r+16,!0);let o=this.view.getUint32(r+20,!0),a=this.view.getUint32(r+24,!0);const s=this.view.getUint16(r+28,!0),l=this.view.getUint16(r+30,!0),c=this.view.getUint16(r+32,!0);let u=this.view.getUint32(r+42,!0);const f=this.data.subarray(r+46,r+46+s),d=(new TextDecoder).decode(f);if(o===XE||a===XE||u===XE){const e=this.readZip64Extra(r+46+s,l,a===XE,o===XE,u===XE,d);void 0!==e.uncompressedSize&&(a=e.uncompressedSize),void 0!==e.compressedSize&&(o=e.compressedSize),void 0!==e.localHeaderOffset&&(u=e.localHeaderOffset)}const h={fileName:d,compressionMethod:n,compressedSize:o,uncompressedSize:a,crc32:i,localHeaderOffset:u,hasDataDescriptor:!!(8&t)};this.centralDir.push(h),this.entryMap.set(d,h),r+=46+s+l+c}}readZip64Extra(e,t,n,r,i,o){const a=Math.min(e+t,this.data.length);let s=e;for(;s+4<=a;){const e=this.view.getUint16(s,!0),t=this.view.getUint16(s+2,!0),a=s+4;if(1!==e){s=a+t;continue}const l=a+t;let c=a;const u={},f=e=>{if(c+8>l)throw new yb(`Truncated ZIP64 extra field for entry: ${o}`);const t=this.readUint64(c,e);return c+=8,t};return n&&(u.uncompressedSize=f("ZIP64 uncompressed size")),r&&(u.compressedSize=f("ZIP64 compressed size")),i&&(u.localHeaderOffset=f("ZIP64 local header offset")),u}throw new yb(`Missing ZIP64 extra field for entry: ${o}`)}async extractEntry(e){const t=e.localHeaderOffset;if(t+30>this.data.length)throw new yb("Local file header extends beyond file");if(this.view.getUint32(t,!0)!==_E)throw new yb(`Invalid local file header signature at offset ${t}`);const n=t+30+this.view.getUint16(t+26,!0)+this.view.getUint16(t+28,!0);let{compressedSize:r,uncompressedSize:i,crc32:o}=e;if(e.hasDataDescriptor&&0===r){const e=this.view.getUint32(t+18,!0);e>0&&e!==XE&&(r=e);const a=this.view.getUint32(t+22,!0);if(a>0&&a!==XE&&(i=a),0===r){const e=this.findDataDescriptor(n);e&&(o=e.crc,r=e.compressedSize,i=e.uncompressedSize)}}if(n+r>this.data.length)throw new yb(`Compressed data extends beyond file for entry: ${e.fileName}`);const a=this.data.subarray(n,n+r);let s;if(0===e.compressionMethod)s=a;else{if(8!==e.compressionMethod)throw new yb(`Unsupported compression method ${e.compressionMethod} for entry: ${e.fileName}`);if(0===r&&0===i)s=new Uint8Array(0);else{const e=i>0?Math.min(i,this.maxDecompressedBytes):this.maxDecompressedBytes;s=await async function(e,t=2147483648){if(JE())try{const n=new DecompressionStream("deflate-raw"),r=n.writable.getWriter(),i=n.readable.getReader();r.write(e).catch(()=>{}),r.close().catch(()=>{});const o=[];let a=0;for(;;){const{done:e,value:n}=await i.read();if(e)break;if(a+=n.length,a>t){try{await i.cancel()}catch{}throw new yb(`Decompressed size exceeds limit of ${t} bytes (possible zip bomb)`)}o.push(n)}const s=new Uint8Array(a);let l=0;for(const e of o)s.set(e,l),l+=e.length;return s}catch(e){if(e instanceof yb)throw e}return $E(e,t)}(a,e)}}if(0!==o&&s.length>0){const t=NE(s);if(t!==o)throw new yb(`CRC-32 mismatch for ${e.fileName}: expected 0x${o.toString(16)}, got 0x${t.toString(16)}`)}return s}extractEntryStream(e){const t=e.localHeaderOffset;if(t+30>this.data.length)throw new yb("Local file header extends beyond file");if(this.view.getUint32(t,!0)!==_E)throw new yb(`Invalid local file header signature at offset ${t}`);const n=t+30+this.view.getUint16(t+26,!0)+this.view.getUint16(t+28,!0);let{compressedSize:r}=e;if(e.hasDataDescriptor&&0===r){const e=this.view.getUint32(t+18,!0);if(e>0&&e!==XE&&(r=e),0===r){const e=this.findDataDescriptor(n);e&&(r=e.compressedSize)}}if(n+r>this.data.length)throw new yb(`Compressed data extends beyond file for entry: ${e.fileName}`);const i=this.data.subarray(n,n+r);if(0===e.compressionMethod)return FE(i);if(8===e.compressionMethod){if(0===r&&0===e.uncompressedSize)return new ReadableStream({start(e){e.close()}});const t=e.uncompressedSize>0?Math.min(e.uncompressedSize,this.maxDecompressedBytes):this.maxDecompressedBytes;if(JE()){return new ReadableStream({start(e){e.enqueue(i),e.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).pipeThrough(function(e){let t=0;return new TransformStream({transform(n,r){if(t+=n.length,t>e)throw new yb(`Decompressed size exceeds limit of ${e} bytes (possible zip bomb)`);r.enqueue(n)}})}(t))}return FE($E(i,t))}throw new yb(`Unsupported compression method ${e.compressionMethod} for entry: ${e.fileName}`)}findDataDescriptor(e){for(let t=e;t<this.data.length-16;t++)if(134695760===this.view.getUint32(t,!0))return{crc:this.view.getUint32(t+4,!0),compressedSize:this.view.getUint32(t+8,!0),uncompressedSize:this.view.getUint32(t+12,!0)};return null}}function ZE(e){const t=[];let n=null;for(const r of e.children){if("string"==typeof r)continue;const e=r.local||r.tag;"t"===e?n=eB(r):"r"===e&&t.push(r)}if(0===t.length)return{text:kb(n??"")};const r=[],i=[];for(const e of t){let t,n="";for(const r of e.children){if("string"==typeof r)continue;const e=r.local||r.tag;"t"===e?n=eB(r):"rPr"===e&&(t=tB(r))}const o=kb(n);i.push(o),r.push(t?{text:o,font:t}:{text:o})}return{text:i.join(""),richText:r}}function eB(e){return e.text??""}function tB(e){const t={};for(const n of e.children){if("string"==typeof n)continue;switch(n.local||n.tag){case"b":t.bold="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"i":t.italic="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"u":{const e=n.attrs.val;t.underline="double"===e?"double":"singleAccounting"===e?"singleAccounting":"doubleAccounting"!==e||"doubleAccounting";break}case"strike":t.strikethrough="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"sz":n.attrs.val&&(t.size=Number(n.attrs.val));break;case"rFont":n.attrs.val&&(t.name=n.attrs.val);break;case"color":if(t.color={},n.attrs.rgb){const e=n.attrs.rgb;t.color.rgb=8===e.length?e.slice(2):e}n.attrs.theme&&(t.color.theme=Number(n.attrs.theme)),n.attrs.tint&&(t.color.tint=Number(n.attrs.tint)),n.attrs.indexed&&(t.color.indexed=Number(n.attrs.indexed));break;case"vertAlign":"superscript"!==n.attrs.val&&"subscript"!==n.attrs.val||(t.vertAlign=n.attrs.val);break;case"family":n.attrs.val&&(t.family=Number(n.attrs.val));break;case"charset":n.attrs.val&&(t.charset=Number(n.attrs.val));break;case"scheme":"major"!==n.attrs.val&&"minor"!==n.attrs.val&&"none"!==n.attrs.val||(t.scheme=n.attrs.val)}}return t}const nB=Date.UTC(1899,11,31),rB=Date.UTC(1904,0,1),iB=864e5;function oB(e,t){const n=e.getTime();if(t)return(n-rB)/iB;let r=(n-nB)/iB;return r>=60&&(r+=1),Math.round(1e10*r)/1e10}const aB=new Set([14,15,16,17,18,19,20,21,22,27,28,29,30,31,32,33,34,35,36,45,46,47,50,51,52,53,54,55,56,57,58]);function sB(e){if(!e)return!1;const t=Number(e);if(!Number.isNaN(t)&&Number.isInteger(t)&&aB.has(t))return!0;let n=e.replace(/\[[$\-\w]*\]/g,"");if(n=n.replace(/\\./g,""),n=n.replace(/"[^"]*"/g,""),n=n.replace(/[*_]./g,""),/^(General|@)$/i.test(n.trim()))return!1;const r=n.toLowerCase();if(/[hs]/.test(r)){if(/\bh{1,2}\b|(?:^|[^a-z])h{1,2}(?:[^a-z]|$)/i.test(r))return!0;if(/\bs{1,2}\b|(?:^|[^a-z])s{1,2}(?:[^a-z]|$)/i.test(r))return!0}return!!/am\/pm|a\/p/i.test(r)||(!!/\[h+\]|\[m+\]|\[s+\]/i.test(e)||(!!/y{1,4}/.test(r)||(!!/d{1,4}/.test(r)||!!/m{3,}/.test(r))))}const lB=["January","February","March","April","May","June","July","August","September","October","November","December"],cB=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],uB=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],fB=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];const dB=["000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","800000","008000","000080","808000","800080","008080","C0C0C0","808080","9999FF","993366","FFFFCC","CCFFFF","660066","FF8080","0066CC","CCCCFF","000080","FF00FF","FFFF00","00FFFF","800080","800000","008080","0000FF","00CCFF","CCFFFF","CCFFCC","FFFF99","99CCFF","FF99CC","CC99FF","FFCC99","3366FF","33CCCC","99CC00","FFCC00","FF9900","FF6600","666699","969696","003366","339966","003300","333300","993300","993366","333399","333333"],hB="http://schemas.microsoft.com/office/spreadsheetml/2022/featurepropertybag",pB="{C7286773-470A-42A8-94C5-96B5CB345126}",gB="xl/featurePropertyBag/featurePropertyBag.xml";const mB={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",5:"$#,##0_);\\($#,##0\\)",6:"$#,##0_);[Red]\\($#,##0\\)",7:"$#,##0.00_);\\($#,##0.00\\)",8:"$#,##0.00_);[Red]\\($#,##0.00\\)",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yyyy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yyyy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"};function yB(e){const t=Ub(e),n=new Map,r=[],i=[],o=[],a=[],s=[];for(const e of t.children){if("string"==typeof e)continue;switch(e.local||e.tag){case"numFmts":AB(e,n);break;case"fonts":bB(e,r);break;case"fills":xB(e,i);break;case"borders":SB(e,o);break;case"cellXfs":DB(e,a);break;case"dxfs":MB(e,s)}}const l=function(e){for(const t of e.children)if("string"!=typeof t&&"colors"===(t.local||t.tag))for(const e of t.children){if("string"==typeof e)continue;if("indexedColors"!==(e.local||e.tag))continue;const t=[];for(const n of e.children){if("string"==typeof n)continue;if("rgbColor"!==(n.local||n.tag))continue;const e=n.attrs.rgb;e&&t.push(8===e.length?e.slice(2):e)}if(t.length>0)return t}return dB}(t);for(const e of[r,i,o,s])vB(e,l);return{numFmts:n,fonts:r,fills:i,borders:o,cellXfs:a,dxfs:s}}function vB(e,t){if(null===e||"object"!=typeof e)return;if(Array.isArray(e)){for(const n of e)vB(n,t);return}const n=e;if("number"==typeof n.indexed&&"string"!=typeof n.rgb){const e=t[n.indexed];e&&(n.rgb=e)}for(const e of Object.values(n))vB(e,t)}function AB(e,t){for(const n of e.children){if("string"==typeof n)continue;if("numFmt"===(n.local||n.tag)){const e=Number(n.attrs.numFmtId),r=n.attrs.formatCode??"";Number.isNaN(e)||t.set(e,r)}}}function bB(e,t){for(const n of e.children){if("string"==typeof n)continue;"font"===(n.local||n.tag)&&t.push(wB(n))}}function wB(e){const t={};for(const n of e.children){if("string"==typeof n)continue;switch(n.local||n.tag){case"b":t.bold="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"i":t.italic="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"u":{const e=n.attrs.val;t.underline="double"===e?"double":"singleAccounting"===e?"singleAccounting":"doubleAccounting"!==e||"doubleAccounting";break}case"strike":t.strikethrough="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"sz":n.attrs.val&&(t.size=Number(n.attrs.val));break;case"name":n.attrs.val&&(t.name=n.attrs.val);break;case"color":t.color=IB(n);break;case"vertAlign":"superscript"!==n.attrs.val&&"subscript"!==n.attrs.val||(t.vertAlign=n.attrs.val);break;case"family":n.attrs.val&&(t.family=Number(n.attrs.val));break;case"charset":n.attrs.val&&(t.charset=Number(n.attrs.val));break;case"scheme":"major"!==n.attrs.val&&"minor"!==n.attrs.val&&"none"!==n.attrs.val||(t.scheme=n.attrs.val)}}return t}function IB(e){const t={};if(e.attrs.rgb){const n=e.attrs.rgb;t.rgb=8===n.length?n.slice(2):n}return e.attrs.theme&&(t.theme=Number(e.attrs.theme)),e.attrs.tint&&(t.tint=Number(e.attrs.tint)),e.attrs.indexed&&(t.indexed=Number(e.attrs.indexed)),t}function xB(e,t){for(const n of e.children){if("string"==typeof n)continue;"fill"===(n.local||n.tag)&&t.push(CB(n))}}function CB(e){for(const t of e.children){if("string"==typeof t)continue;const e=t.local||t.tag;if("patternFill"===e)return EB(t);if("gradientFill"===e)return BB(t)}return{type:"pattern",pattern:"none"}}function EB(e){const t={type:"pattern",pattern:e.attrs.patternType??"none"};for(const n of e.children){if("string"==typeof n)continue;const e=n.local||n.tag;"fgColor"===e?t.fgColor=IB(n):"bgColor"===e&&(t.bgColor=IB(n))}return t}function BB(e){const t=e.attrs.degree?Number(e.attrs.degree):void 0,n=[];for(const t of e.children){if("string"==typeof t)continue;if("stop"===(t.local||t.tag)){const e=Number(t.attrs.position??"0");for(const r of t.children){if("string"==typeof r)continue;"color"===(r.local||r.tag)&&n.push({position:e,color:IB(r)})}}}return{type:"gradient",degree:t,stops:n}}function SB(e,t){for(const n of e.children){if("string"==typeof n)continue;"border"===(n.local||n.tag)&&t.push(kB(n))}}function kB(e){const t={},n=e.attrs.diagonalUp,r=e.attrs.diagonalDown;"1"!==n&&"true"!==n||(t.diagonalUp=!0),"1"!==r&&"true"!==r||(t.diagonalDown=!0);for(const n of e.children){if("string"==typeof n)continue;const e=n.local||n.tag,r=FB(n);if(r)switch(e){case"left":t.left=r;break;case"right":t.right=r;break;case"top":t.top=r;break;case"bottom":t.bottom=r;break;case"diagonal":t.diagonal=r}}return t}function FB(e){const t=e.attrs.style;if(!t)return;const n={style:t};for(const t of e.children){if("string"==typeof t)continue;"color"===(t.local||t.tag)&&(n.color=IB(t))}return n}function DB(e,t){for(const n of e.children){if("string"==typeof n)continue;"xf"===(n.local||n.tag)&&t.push(NB(n))}}function NB(e){const t={numFmtId:Number(e.attrs.numFmtId??"0"),fontId:Number(e.attrs.fontId??"0"),fillId:Number(e.attrs.fillId??"0"),borderId:Number(e.attrs.borderId??"0")};"1"!==e.attrs.applyNumberFormat&&"true"!==e.attrs.applyNumberFormat||(t.applyNumberFormat=!0),"1"!==e.attrs.applyFont&&"true"!==e.attrs.applyFont||(t.applyFont=!0),"1"!==e.attrs.applyFill&&"true"!==e.attrs.applyFill||(t.applyFill=!0),"1"!==e.attrs.applyBorder&&"true"!==e.attrs.applyBorder||(t.applyBorder=!0),"1"!==e.attrs.applyAlignment&&"true"!==e.attrs.applyAlignment||(t.applyAlignment=!0),"1"!==e.attrs.applyProtection&&"true"!==e.attrs.applyProtection||(t.applyProtection=!0);for(const n of e.children){if("string"==typeof n)continue;const e=n.local||n.tag;"alignment"===e?t.alignment=RB(n):"protection"===e?t.protection=LB(n):"extLst"===e&&TB(n)&&(t.hasCheckboxFeature=!0)}return t}function MB(e,t){for(const n of e.children){if("string"==typeof n)continue;"dxf"===(n.local||n.tag)&&t.push(QB(n))}}function QB(e){const t={};for(const n of e.children){if("string"==typeof n)continue;switch(n.local||n.tag){case"font":t.font=wB(n);break;case"numFmt":{const e=n.attrs.formatCode;if(e)t.numFmt=e;else{const e=Number(n.attrs.numFmtId),r=Number.isNaN(e)?void 0:mB[e];r&&(t.numFmt=r)}break}case"fill":t.fill=CB(n);break;case"border":t.border=kB(n);break;case"alignment":t.alignment=RB(n)}}return t}function TB(e){for(const t of e.children){if("string"==typeof t)continue;if("ext"===(t.local||t.tag)&&t.attrs.uri===pB)return!0}return!1}function LB(e){const t={},n=e.attrs.locked;void 0!==n&&(t.locked="1"===n||"true"===n);const r=e.attrs.hidden;return void 0!==r&&(t.hidden="1"===r||"true"===r),t}function RB(e){const t={};if(e.attrs.horizontal&&(t.horizontal=e.attrs.horizontal),e.attrs.vertical&&(t.vertical=e.attrs.vertical),"1"!==e.attrs.wrapText&&"true"!==e.attrs.wrapText||(t.wrapText=!0),"1"!==e.attrs.shrinkToFit&&"true"!==e.attrs.shrinkToFit||(t.shrinkToFit=!0),e.attrs.textRotation&&(t.textRotation=Number(e.attrs.textRotation)),e.attrs.indent&&(t.indent=Number(e.attrs.indent)),e.attrs.readingOrder){const n=Number(e.attrs.readingOrder);t.readingOrder=1===n?"ltr":2===n?"rtl":"context"}return t}function UB(e,t){const n=e.cellXfs[t];if(!n)return{};const r={};if(0!==n.numFmtId){const t=e.numFmts.get(n.numFmtId)??mB[n.numFmtId];t&&(r.numFmt=t)}return n.fontId<e.fonts.length&&0!==n.fontId&&(r.font=e.fonts[n.fontId]),n.fillId<e.fills.length&&n.fillId>1&&(r.fill=e.fills[n.fillId]),n.borderId<e.borders.length&&0!==n.borderId&&(r.border=e.borders[n.borderId]),n.alignment&&(r.alignment=n.alignment),n.protection&&(r.protection=n.protection),r}function HB(e,t){const n=e.cellXfs[t];if(!n)return!1;const r=n.numFmtId,i=e.numFmts.get(r);if(i)return sB(i);if(o=r,aB.has(o))return!0;var o;const a=mB[r];return!!a&&sB(a)}function qB(e){return void 0===e?void 0:{...e}}function OB(e){const t={...e};return e.color&&(t.color=qB(e.color)),t}function PB(e){if("gradient"===e.type)return{...e,stops:e.stops.map(e=>({...e,color:{...e.color}}))};const t={...e};return e.fgColor&&(t.fgColor=qB(e.fgColor)),e.bgColor&&(t.bgColor=qB(e.bgColor)),t}function $B(e){if(void 0===e)return;const t={...e};return e.color&&(t.color=qB(e.color)),t}function zB(e){const t={...e};for(const n of["top","right","bottom","left","diagonal"])e[n]&&(t[n]=$B(e[n]));return t}function jB(e){const t={...e};return e.font&&(t.font=OB(e.font)),e.fill&&(t.fill=PB(e.fill)),e.border&&(t.border=zB(e.border)),e.alignment&&(t.alignment={...e.alignment}),e.protection&&(t.protection={...e.protection}),t}function VB(e){return"string"==typeof e?function(e){const t=e.split(":"),n=HS(t[0]),r=t.length>1?HS(t[1]):n;return{startRow:n.row,startCol:n.col,endRow:r.row,endCol:r.col}}(e):e}function YB(e){return"object"==typeof e&&null!==e&&"string"==typeof e.hyperlink&&"string"==typeof e.text}function WB(e){return YB(e)?e.text:e}function GB(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=63744&&e<=64255||e>=44032&&e<=55215||e>=12448&&e<=12543||e>=12352&&e<=12447||e>=12288&&e<=12351||e>=65280&&e<=65376||e>=65504&&e<=65510}function JB(e){const t=e.indexOf(".");if(-1===t)return 0;let n=0;for(let r=t+1;r<e.length&&("0"===e[r]||"#"===e[r]);r++)n++;return n}function _B(e,t){if(!t.includes(","))return e;const n=e.split(".");let r=n[0];const i=r.startsWith("-");i&&(r=r.slice(1));let o="";for(let e=0;e<r.length;e++)e>0&&(r.length-e)%3==0&&(o+=","),o+=r[e];return i&&(o="-"+o),void 0!==n[1]&&(o+="."+n[1]),o}function XB(e){let t=0;for(const n of e){const e=n.codePointAt(0);void 0!==e&&GB(e)?t+=2:t+=1}return t}function KB(e,t){if(null==e)return 0;if("boolean"==typeof e)return e?5:6;if("string"==typeof e){if(0===e.length)return 0;if(e.includes("\n")){const t=e.split("\n");let n=0;for(const e of t){const t=XB(e);t>n&&(n=t)}return n}return XB(e)}if("number"==typeof e){if(t){const n=function(e,t){const n=t.trim().split(";");let r;if(e>0?r=n[0]:e<0&&n.length>1?(r=n[1],e=Math.abs(e)):r=0===e&&n.length>2?n[2]:n[0],r=r.replace(/\[[^\]]*\]/g,""),r=r.replace(/\\./g,e=>e[1]),r=r.replace(/"([^"]*)"/g,"$1"),r.includes("%")){const t=JB(r.replace(/%/g,""));return _B((100*e).toFixed(t),r)+"%"}const i=JB(r);return _B(e.toFixed(i),r)}(e,t),r=function(e){let t=0;const n=e.split(";")[0].replace(/\[[^\]]*\]/g,"");for(let e=0;e<n.length;e++){const r=n[e];if('"'===r)for(e++;e<n.length&&'"'!==n[e];)t++,e++;else"\\"===r?(t++,e++):"$"!==r&&"€"!==r&&"£"!==r&&"¥"!==r||t++}return t}(t);return XB(n)+r}return XB(String(e))}if(e instanceof Date){if(t){const n=function(e,t,n){const r=e.getUTCFullYear(),i=e.getUTCMonth(),o=e.getUTCDate(),a=e.getUTCDay();let s=e.getUTCHours();const l=e.getUTCMinutes(),c=e.getUTCSeconds(),u=e.getUTCMilliseconds();let f="",d=s;/am\/pm|a\/p/i.test(t)&&(f=s>=12?"PM":"AM",d=s%12,0===d&&(d=12));const h=function(e){const t=[];let n=0;for(;n<e.length;){if("["===e[n]&&"$"===e[n+1]){const t=e.indexOf("]",n);if(-1!==t){n=t+1;continue}}if("["===e[n]){const r=e.indexOf("]",n);if(-1!==r){const i=e.slice(n+1,r);if(/^h+$/i.test(i)||/^m+$/i.test(i)||/^s+$/i.test(i)){t.push(e.slice(n,r+1)),n=r+1;continue}n=r+1;continue}}if('"'===e[n]){let r="";for(n++;n<e.length&&'"'!==e[n];)r+=e[n],n++;n++,t.push(r);continue}if("\\"===e[n]){n++,n<e.length&&(t.push(e[n]),n++);continue}if(/^am\/pm/i.test(e.slice(n))){t.push(e.slice(n,n+5)),n+=5;continue}if(/^a\/p/i.test(e.slice(n))){t.push(e.slice(n,n+3)),n+=3;continue}if("."===e[n]&&n+1<e.length&&"0"===e[n+1]){let r=".",i=n+1;for(;i<e.length&&"0"===e[i];)r+="0",i++;t.push(r),n=i;continue}const r=e[n].toLowerCase();if("ymdhsn".includes(r)){let i="";const o=r;for(;n<e.length&&e[n].toLowerCase()===o;)i+=e[n],n++;t.push(i);continue}t.push(e[n]),n++}return t}(t),p=void 0!==n&&n>0?n:0,g=Math.floor(24*p),m=Math.floor(24*p*60),y=Math.floor(24*p*60*60),v=Array.from({length:h.length},()=>!1);for(let e=0;e<h.length;e++){const t=h[e].toLowerCase();if("m"!==t&&"mm"!==t)continue;let n=!1;for(let t=e-1;t>=0;t--){const e=h[t].toLowerCase();if("h"===e||"hh"===e||/^\[h+\]$/.test(e)){n=!0;break}if(/^[ymdhs]+$/.test(e)||/^\[[ms]+\]$/.test(e)||"am/pm"===e||"a/p"===e)break}let r=!1;for(let t=e+1;t<h.length;t++){const e=h[t].toLowerCase();if("s"===e||"ss"===e){r=!0;break}if(/^[ymdh]+$/.test(e)||"am/pm"===e||"a/p"===e)break}v[e]=n||r}let A="";for(let e=0;e<h.length;e++){const t=h[e],n=t.toLowerCase();if(t.startsWith("[")&&t.endsWith("]")){const e=n.slice(1,-1);/^h+$/.test(e)?A+=String(g).padStart(e.length,"0"):/^m+$/.test(e)?A+=String(m).padStart(e.length,"0"):/^s+$/.test(e)&&(A+=String(y).padStart(e.length,"0"));continue}switch(n){case"yyyy":A+=String(r);break;case"yy":A+=String(r%100).padStart(2,"0");break;case"mmmm":A+=lB[i];break;case"mmm":A+=cB[i];break;case"mm":v[e]?A+=String(l).padStart(2,"0"):A+=String(i+1).padStart(2,"0");break;case"m":v[e]?A+=String(l):A+=String(i+1);break;case"dddd":A+=uB[a];break;case"ddd":A+=fB[a];break;case"dd":A+=String(o).padStart(2,"0");break;case"d":A+=String(o);break;case"hh":A+=String(d).padStart(2,"0");break;case"h":A+=String(d);break;case"ss":A+=String(c).padStart(2,"0");break;case"s":A+=String(c);break;case".0":case".00":case".000":{const e=n.length-1;A+="."+String(u).padStart(3,"0").slice(0,e)}break;case"am/pm":A+=f;break;case"a/p":A+=f.charAt(0);break;default:A+=t}}return A}(e,t);return XB(n)}return XB(`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`)}return 0}function ZB(e,t){const n=t?.minWidth??8,r=t?.maxWidth??255,i=t?.padding??2,o=!0===t?.font?.bold;let a=0;for(const n of e){const e=KB(n,t?.numFmt);e>a&&(a=e)}let s=1.1*a;return o&&(s*=1.05),s+=i,s=Math.ceil(2*s)/2,s<n&&(s=n),s>r&&(s=r),s}const eS="XLDAPR",tS="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}",nS="xl/metadata.xml";function rS(e){for(const t of qb(e))if("extLst"===t.local)for(const e of qb(t))if("ext"===e.local&&(e.attrs.uri??"").toLowerCase()===tS)for(const t of qb(e)){if("dynamicArrayProperties"!==t.local)continue;const e=t.attrs.fDynamic;return"0"!==e&&"false"!==e}return!0}function iS(e){let t=0;for(let n=e.length-1;n>=0;n--){t=t>>14&1|t<<1&32767,t^=e.charCodeAt(n)}return t=t>>14&1|t<<1&32767,t^=e.length,t^=52811,t.toString(16).toUpperCase().padStart(4,"0")}const oS=/[[\]:*?/\\]/;function aS(e,t){const n=`sheet ${t+1}`;if("string"!=typeof e||0===e.length)throw new Ab(`Sheet name is empty (${n}); Excel requires a name`);if(e.length>31)throw new Ab(`Sheet name "${e}" is ${e.length} characters (${n}); Excel allows at most 31`);const r=e.match(oS);if(r)throw new Ab(`Sheet name "${e}" contains ${JSON.stringify(r[0])} (${n}); Excel forbids [ ] : * ? / \\ in sheet names`);if(e.startsWith("'")||e.endsWith("'"))throw new Ab(`Sheet name "${e}" starts or ends with an apostrophe (${n}); Excel forbids it because it breaks quoted range references`);if("history"===e.toLowerCase())throw new Ab(`Sheet name "${e}" is reserved by Excel for change tracking (${n})`)}function sS(e){return!("object"!=typeof e||null===e||e instanceof Date||Array.isArray(e)||YB(e))}function lS(e){return sS(e)?e.value??null:e}function cS(e){let t=!1;const n=e.map(e=>{const n=function(e){const t=e.rows;if(!t)return e;let n=!1;for(const e of t){for(const t of e)if(sS(t)){n=!0;break}if(n)break}if(!n)return e;const r=[],i=new Map;for(let e=0;e<t.length;e++){const n=t[e],o=[];for(let t=0;t<n.length;t++){const r=n[t];sS(r)?(i.set(`${e},${t}`,r),o.push(r.value??null)):o.push(r)}r[e]=o}if(e.cells)for(const[t,n]of e.cells)i.set(t,n);return{...e,rows:r,cells:i}}(e);return n!==e&&(t=!0),n});return t?n:e}const uS="http://schemas.openxmlformats.org/spreadsheetml/2006/main";function fS(e){!function(e){if(!Number.isInteger(e)||e<0||e>OC)throw new Ab(`Column index ${e} is not a valid 0-based column (Excel allows 0..16383)`)}(e);let t="",n=e;do{t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26)-1}while(n>=0);return t}function dS(e,t){const n={r:e+1};return void 0!==t?.height&&(n.ht=t.height,n.customHeight=1),t?.hidden&&(n.hidden=1),t?.outlineLevel&&(n.outlineLevel=t.outlineLevel),t?.collapsed&&(n.collapsed=1),n}function hS(e,t){return fS(t)+(e+1)}function pS(e,t,n,r){return`${hS(e,t)}:${hS(n,r)}`}function gS(e){const t=e.hyperlink.startsWith("#")?{target:"",location:e.hyperlink.slice(1),display:e.text}:{target:e.hyperlink,display:e.text};return void 0!==e.tooltip&&(t.tooltip=e.tooltip),t}const mS="yyyy-mm-dd",yS=Object.freeze({numFmt:mS}),vS=new WeakMap,AS=new Set(["#VALUE!","#REF!","#N/A","#NAME?","#NULL!","#DIV/0!","#NUM!","#GETTING_DATA","#SPILL!","#CALC!"]);function bS(e,t,n,r,i,o,a){const s="1904"===r,l=IS(e),c=l.length;let u=0;for(const e of l)e.length>u&&(u=e.length);e.columns&&e.columns.length>u&&(u=e.columns.length);const f=[];{const t=[];if(e.view?.tabColor&&t.push(hw("tabColor",kS(e.view.tabColor))),e.outlineProperties){const n={};void 0!==e.outlineProperties.summaryBelow&&(n.summaryBelow=e.outlineProperties.summaryBelow?1:0),void 0!==e.outlineProperties.summaryRight&&(n.summaryRight=e.outlineProperties.summaryRight?1:0),t.push(hw("outlinePr",n))}e.pageSetup?.fitToPage&&t.push(hw("pageSetUpPr",{fitToPage:1})),t.length>0&&f.push(gw("sheetPr",void 0,t))}if(c>0||u>0){const e=c>0?c-1:0,t=u>0?u-1:0;f.push(hw("dimension",{ref:pS(0,0,e,t)}))}const d=[];if(e.freezePane){const t=e.freezePane,n=hS(t.rows??0,t.columns??0),r={};t.columns&&t.columns>0&&(r.xSplit=t.columns),t.rows&&t.rows>0&&(r.ySplit=t.rows),r.topLeftCell=n,r.state="frozen";const i=t.columns&&t.columns>0,o=t.rows&&t.rows>0;r.activePane=i&&o?"bottomRight":i?"topRight":"bottomLeft",d.push(hw("pane",r))}else if(e.splitPane){const t=e.splitPane,n={},r=void 0!==t.xSplit&&t.xSplit>0,i=void 0!==t.ySplit&&t.ySplit>0;r&&(n.xSplit=t.xSplit),i&&(n.ySplit=t.ySplit),n.topLeftCell="A1",n.state="split",n.activePane=r&&i?"bottomRight":r?"topRight":"bottomLeft",d.push(hw("pane",n))}const h={workbookViewId:0};e.view&&(!1===e.view.showGridLines&&(h.showGridLines=0),!1===e.view.showRowColHeaders&&(h.showRowColHeaders=0),void 0!==e.view.zoomScale&&(h.zoomScale=e.view.zoomScale),e.view.rightToLeft&&(h.rightToLeft=1)),f.push(gw("sheetViews",void 0,[d.length>0?gw("sheetView",h,d):hw("sheetView",h)]));const p={defaultRowHeight:e.defaultRowHeight??15};if(void 0!==e.defaultRowHeight&&(p.customHeight=1),void 0!==e.defaultColWidth&&(p.defaultColWidth=e.defaultColWidth),f.push(hw("sheetFormatPr",p)),e.columns&&e.columns.length>0){const n=[];for(let r=0;r<e.columns.length;r++){const i=e.columns[r];let o=i.width;if(i.autoWidth&&void 0===o){const e=[];for(const t of l)t&&r<t.length&&t[r]&&e.push(t[r].value);o=ZB(e,{font:i.style?.font,numFmt:i.numFmt??i.style?.numFmt})}const a=i.numFmt&&!i.style?.numFmt?{...i.style,numFmt:i.numFmt}:i.style??void 0,s=a?t.addStyle(a):0;if(void 0!==o||i.hidden||i.outlineLevel||i.collapsed||0!==s){const e={min:r+1,max:r+1};void 0!==o&&(e.width=o,e.customWidth=!0),0!==s&&(e.style=s),i.hidden&&(e.hidden=!0),i.outlineLevel&&(e.outlineLevel=i.outlineLevel),i.collapsed&&(e.collapsed=!0),n.push(hw("col",e))}}n.length>0&&f.push(gw("cols",void 0,n))}const g=[];let m=!1;for(let r=0;r<c;r++){const i=l[r],a=e.rowDefs?.get(r),c=a&&(void 0!==a.height||a.hidden||a.outlineLevel||a.collapsed);if(!(i&&0!==i.length||c))continue;const u=[];let f=!1;if(i)for(let e=0;e<i.length;e++){const a=i[e];if(!a)continue;a.formulaDynamic&&void 0!==a.formula&&null!==a.formula&&(m=!0);const l=CS(r,e,a,t,n,s,o);l&&(u.push(l),f=!0)}if(f||c){const e=dS(r,a);f?g.push(gw("row",e,u)):g.push(hw("row",e))}}if(f.push(gw("sheetData",void 0,g.length>0?g:"")),e.protection&&f.push(function(e){const t={};e.password&&(t.password=iS(e.password));!1!==e.sheet&&(t.sheet=1);e.objects&&(t.objects=1);e.scenarios&&(t.scenarios=1);const n=[["selectLockedCells","selectLockedCells"],["selectUnlockedCells","selectUnlockedCells"],["formatCells","formatCells"],["formatColumns","formatColumns"],["formatRows","formatRows"],["insertColumns","insertColumns"],["insertRows","insertRows"],["insertHyperlinks","insertHyperlinks"],["deleteColumns","deleteColumns"],["deleteRows","deleteRows"],["sort","sort"],["autoFilter","autoFilter"],["pivotTables","pivotTables"]];for(const[r,i]of n){const n=e[r];void 0!==n&&"boolean"==typeof n&&(t[i]=n?0:1)}return hw("sheetProtection",t)}(e.protection)),e.autoFilter)if(e.autoFilter.columns&&e.autoFilter.columns.length>0){const t=[];for(const n of e.autoFilter.columns)if(n.filters&&n.filters.length>0){const e=n.filters.map(e=>hw("filter",{val:e}));t.push(gw("filterColumn",{colId:n.colIndex},[gw("filters",void 0,e)]))}f.push(gw("autoFilter",{ref:e.autoFilter.range},t))}else f.push(hw("autoFilter",{ref:e.autoFilter.range}));const y=function(e){if(e)return e.some(e=>"string"==typeof e)?e.map(VB):e}(e.merges);if(y&&y.length>0){const e=y.map(e=>hw("mergeCell",{ref:pS(e.startRow,e.startCol,e.endRow,e.endCol)}));f.push(gw("mergeCells",{count:y.length},e))}e.conditionalRules&&e.conditionalRules.length>0&&f.push(...function(e,t){const n=new Map;for(const t of e){const e=n.get(t.range);e?e.push(t):n.set(t.range,[t])}const r=[];for(const[e,i]of n){const n=[];for(const e of i)n.push(DS(e,t));r.push(gw("conditionalFormatting",{sqref:e},n))}return r}(e.conditionalRules,t)),e.dataValidations&&e.dataValidations.length>0&&f.push(function(e){const t=[];for(const n of e){const e={type:n.type,sqref:n.range};n.operator&&(e.operator=n.operator),n.allowBlank&&(e.allowBlank=1),n.showInputMessage&&(e.showInputMessage=1),n.showErrorMessage&&(e.showErrorMessage=1),n.errorStyle&&(e.errorStyle=n.errorStyle),n.inputTitle&&(e.promptTitle=n.inputTitle),n.inputMessage&&(e.prompt=n.inputMessage),n.errorTitle&&(e.errorTitle=n.errorTitle),n.errorMessage&&(e.error=n.errorMessage);const r=[];if("list"===n.type&&n.values&&n.values.length>0){const e=`"${n.values.join(",")}"`;r.push(gw("formula1",void 0,uw(e)))}else void 0!==n.formula1&&r.push(gw("formula1",void 0,uw(n.formula1)));void 0!==n.formula2&&r.push(gw("formula2",void 0,uw(n.formula2))),r.length>0?t.push(gw("dataValidation",e,r)):t.push(hw("dataValidation",e))}return gw("dataValidations",{count:e.length},t)}(e.dataValidations));const{xml:v,relationships:A}=function(e,t){const n=t??IS(e),r=[],i=[];let o=1;for(let e=0;e<n.length;e++){const t=n[e];for(let n=0;n<t.length;n++){const a=t[n]?.hyperlink;if(!a)continue;const s={ref:hS(e,n)};if(a.location)s.location=a.location;else if(a.target){const e="rId"+o++;s["r:id"]=e,i.push({id:e,target:a.target})}a.tooltip&&(s.tooltip=a.tooltip),a.display&&(s.display=a.display),r.push(hw("hyperlink",s))}}if(0===r.length)return{xml:"",relationships:[]};return{xml:gw("hyperlinks",void 0,r),relationships:i}}(e,l);v&&f.push(v);const b=function(e){if(!e)return"";const t={};e.showGridLines&&(t.gridLines=1);e.showRowColHeaders&&(t.headings=1);e.horizontalCentered&&(t.horizontalCentered=1);e.verticalCentered&&(t.verticalCentered=1);return 0===Object.keys(t).length?"":hw("printOptions",t)}(e.pageSetup);if(b&&f.push(b),f.push(function(e){const t=e??{};return hw("pageMargins",{left:t.left??SS.left,right:t.right??SS.right,top:t.top??SS.top,bottom:t.bottom??SS.bottom,header:t.header??SS.header,footer:t.footer??SS.footer})}(e.pageSetup?.margins)),e.pageSetup&&f.push(function(e){const t={};if(void 0!==e.paperSize){const n=function(e){if("number"==typeof e)return Number.isInteger(e)&&e>0?e:void 0;return ES[e]}(e.paperSize);void 0!==n&&(t.paperSize=n)}e.orientation&&(t.orientation=e.orientation);void 0!==e.scale&&(t.scale=e.scale);e.fitToPage&&(void 0!==e.fitToWidth&&(t.fitToWidth=e.fitToWidth),void 0!==e.fitToHeight&&(t.fitToHeight=e.fitToHeight));void 0!==e.paperWidth&&(t.paperWidth=e.paperWidth);void 0!==e.paperHeight&&(t.paperHeight=e.paperHeight);void 0!==e.firstPageNumber&&(t.firstPageNumber=e.firstPageNumber);const n=e.useFirstPageNumber??(void 0!==e.firstPageNumber||void 0);void 0!==n&&(t.useFirstPageNumber=n?1:0);void 0!==e.pageOrder&&"downThenOver"!==e.pageOrder&&(t.pageOrder=e.pageOrder);e.blackAndWhite&&(t.blackAndWhite=1);e.draft&&(t.draft=1);void 0!==e.cellComments&&"none"!==e.cellComments&&(t.cellComments=e.cellComments);void 0!==e.errors&&"displayed"!==e.errors&&(t.errors=e.errors);void 0!==e.copies&&(t.copies=e.copies);void 0!==e.horizontalDpi&&(t.horizontalDpi=e.horizontalDpi);void 0!==e.verticalDpi&&(t.verticalDpi=e.verticalDpi);!1===e.usePrinterDefaults&&(t.usePrinterDefaults=0);if(0===Object.keys(t).length)return"";return hw("pageSetup",t)}(e.pageSetup)),e.headerFooter&&f.push(function(e){const t={};e.differentOddEven&&(t.differentOddEven=1);e.differentFirst&&(t.differentFirst=1);const n=[];e.oddHeader&&n.push(gw("oddHeader",void 0,uw(e.oddHeader)));e.oddFooter&&n.push(gw("oddFooter",void 0,uw(e.oddFooter)));e.evenHeader&&n.push(gw("evenHeader",void 0,uw(e.evenHeader)));e.evenFooter&&n.push(gw("evenFooter",void 0,uw(e.evenFooter)));e.firstHeader&&n.push(gw("firstHeader",void 0,uw(e.firstHeader)));e.firstFooter&&n.push(gw("firstFooter",void 0,uw(e.firstFooter)));if(0===n.length)return"";return gw("headerFooter",Object.keys(t).length>0?t:void 0,n)}(e.headerFooter)),e.rowBreaks&&e.rowBreaks.length>0){const t=[...e.rowBreaks].sort((e,t)=>e-t),n=t.map(e=>hw("brk",{id:e+1,max:16383,man:1}));f.push(gw("rowBreaks",{count:t.length,manualBreakCount:t.length},n))}if(e.colBreaks&&e.colBreaks.length>0){const t=[...e.colBreaks].sort((e,t)=>e-t),n=t.map(e=>hw("brk",{id:e+1,max:1048575,man:1}));f.push(gw("colBreaks",{count:t.length,manualBreakCount:t.length},n))}let w=null,I=A.length+1;const x=e.images&&e.images.length>0,C=e.textBoxes&&e.textBoxes.length>0,E=e.charts&&e.charts.length>0,B=f.length;(x||C||E)&&(w=`rId${I}`,I++,f.push(hw("drawing",{"r:id":w})));let S=null,k=null,F=!1;if(e.cells)for(const[,t]of e.cells)if(t.comment){F=!0;break}F&&(S=`rId${I}`,I++,k=`rId${I}`,I++,f.push(hw("legacyDrawing",{"r:id":S})));let D=null;e.backgroundImage&&(D=`rId${I}`,I++,f.push(hw("picture",{"r:id":D})));const N=[];if(e.tables&&e.tables.length>0&&void 0!==i){const t=[];for(let n=0;n<e.tables.length;n++){const e=`rId${I}`;I++;const r=i+n;N.push({rId:e,globalTableIndex:r}),t.push(hw("tablePart",{"r:id":e}))}f.push(gw("tableParts",{count:e.tables.length},t))}e.sparklines&&e.sparklines.length>0&&f.push(function(e){const t=[];let n=1;for(const r of e){const e={},i=r.type??"line";"line"!==i&&(e.type=i),e.displayEmptyCellsAs="gap";const o=`{00000000-0000-0000-0000-${String(n++).padStart(12,"0")}}`;e["xr2:uid"]=o,r.markers&&(e.markers="1");const a=[],s=r.color??"376092",l=6===s.length?`FF${s}`:s;a.push(hw("x14:colorSeries",{rgb:l}));const c=gw("x14:sparkline",void 0,[gw("xm:f",void 0,r.dataRange),gw("xm:sqref",void 0,r.location)]);a.push(gw("x14:sparklines",void 0,[c])),t.push(gw("x14:sparklineGroup",e,a))}const r=gw("x14:sparklineGroups",{"xmlns:xm":MS},t),i=gw("ext",{uri:TS,"xmlns:x14":NS,"xmlns:xr2":QS},[r]);return gw("extLst",void 0,[i])}(e.sparklines));const M=[];if(e.pivotTables&&e.pivotTables.length>0&&void 0!==a)for(let t=0;t<e.pivotTables.length;t++){const e=`rId${I}`;I++,M.push({rId:e,globalPivotIndex:a+t})}const Q=mw("worksheet",{xmlns:uS,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},f);return{xml:Q,drawingInsertOffset:LS(Q,f,B),hyperlinkRelationships:A,drawingRId:w,legacyDrawingRId:S,commentsRId:k,hasComments:F,tables:N,pictureRId:D,pivotTables:M,hasDynamicArray:m}}function wS(e){if(e)return e.numFmt&&!e.style?.numFmt?{...e.style,numFmt:e.numFmt}:e.style}function IS(e){const t=[];if(e.data&&e.columns){const n=e.columns.map(e=>e.key);if(e.columns.some(e=>e.header)){const n=[];for(let t=0;t<e.columns.length;t++){const r=e.columns[t];n.push({value:r.header??r.key??null,style:r.style})}t.push(n)}for(const r of e.data){const i=[];for(let t=0;t<n.length;t++){const o=n[t],a=void 0!==o?r[o]??null:null,s={value:YB(a)?a.text:a,style:wS(e.columns[t])};YB(a)&&(s.hyperlink=gS(a)),i.push(s)}t.push(i)}}else if(e.rows)for(const n of e.rows){const r=[];for(let t=0;t<n.length;t++){const i=lS(n[t]),o=e.columns?wS(e.columns[t]):void 0;r.push(o?{value:i,style:o}:{value:i})}t.push(r)}if(e.cells)for(const[n,r]of e.cells){const[e,i]=n.split(","),o=parseInt(e,10),a=parseInt(i,10);for(;t.length<=o;)t.push([]);const s=t[o];for(;s.length<=a;)s.push(null);const l=s[a];s[a]={value:r.value??l?.value??null,style:r.style??l?.style,checkbox:r.checkbox??l?.checkbox,formula:r.formula??l?.formula,formulaResult:r.formulaResult??l?.formulaResult,formulaType:r.formulaType??l?.formulaType,formulaSharedIndex:r.formulaSharedIndex??l?.formulaSharedIndex,formulaRef:r.formulaRef??l?.formulaRef,formulaDynamic:r.formulaDynamic??l?.formulaDynamic,richText:r.richText??l?.richText,hyperlink:r.hyperlink??l?.hyperlink}}return t}function xS(e,t,n,r){return 0===t?""===n?`<c r="${e}"><v>${r}</v></c>`:`<c r="${e}" t="${n}"><v>${r}</v></c>`:""===n?`<c r="${e}" s="${t}"><v>${r}</v></c>`:`<c r="${e}" t="${n}" s="${t}"><v>${r}</v></c>`}function CS(e,t,n,r,i,o,a){const{value:s,style:l,formula:c,formulaResult:u,formulaType:f,formulaSharedIndex:d,formulaRef:h,formulaDynamic:p,richText:g}=n;let m=0,y=l;if(s instanceof Date&&(!y||!y.numFmt))if(y){const e=vS.get(y);if(e)y=e;else{const e={...y,numFmt:mS};vS.set(y,e),y=e}}else y=yS;n.checkbox?m=r.addCheckboxStyle(y):y&&(m=r.addStyle(y));const v=hS(e,t);if(g&&g.length>0){const e={r:v,t:"inlineStr"};0!==m&&(e.s=m);const t=function(e){const t=[];for(const n of e){const e=[];if(n.font){const t=FS(n.font);t.length>0&&e.push(gw("rPr",void 0,t))}e.push(pw(n.text)),t.push(gw("r",void 0,e))}return t}(g);return gw("c",e,[gw("is",void 0,t)])}if(null!=c){const e={r:v};let t;if(0!==m&&(e.s=m),p&&(e.cm=1),"shared"===f){const e={t:"shared"};void 0!==d&&(e.si=d),h&&(e.ref=h),t=""===c?hw("f",e):gw("f",e,uw(c))}else if("array"===f){const e={t:"array"};h&&(e.ref=h),t=gw("f",e,uw(c))}else t=gw("f",void 0,uw(c));const n=[t];return null!=u&&("string"==typeof u?(e.t="str",n.push(gw("v",void 0,uw(u)))):"boolean"==typeof u?(e.t="b",n.push(gw("v",void 0,u?"1":"0"))):"number"==typeof u?Number.isFinite(u)&&n.push(gw("v",void 0,String(u))):u instanceof Date&&n.push(gw("v",void 0,String(oB(u,o))))),gw("c",e,n)}if(null==s)return 0!==m?hw("c",{r:v,s:m}):null;if("string"==typeof s&&AS.has(s))return xS(v,m,"e",s);if("string"==typeof s){if(a){const e=`<is>${pw(s)}</is>`;return 0===m?`<c r="${v}" t="inlineStr">${e}</c>`:`<c r="${v}" t="inlineStr" s="${m}">${e}</c>`}return xS(v,m,"s",String(i.add(s)))}return"number"==typeof s?Number.isFinite(s)?xS(v,m,"",String(s)):0!==m?hw("c",{r:v,s:m}):null:"boolean"==typeof s?xS(v,m,"b",s?"1":"0"):s instanceof Date?xS(v,m,"",String(oB(s,o))):null}const ES={letter:1,letterSmall:2,tabloid:3,ledger:4,legal:5,statement:6,executive:7,a3:8,a4:9,a4Small:10,a5:11,b4:12,b5:13,folio:14,quarto:15,note:18,envelope9:19,envelope10:20,envelope11:21,envelope12:22,envelope14:23,cSheet:24,dSheet:25,eSheet:26,envelopeDL:27,envelopeC5:28,envelopeC3:29,envelopeC4:30,envelopeC6:31,envelopeC65:32,envelopeB4:33,envelopeB5:34,envelopeB6:35,envelopeItaly:36,envelopeMonarch:37,envelopePersonal:38,fanfoldUS:39,fanfoldGermanStd:40,fanfoldGermanLegal:41,a6:70,japanesePostcard:43,japaneseDoublePostcard:69},BS={};for(const[e,t]of Object.entries(ES))BS[t]=e;const SS={left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3};function kS(e){const t={};if(void 0!==e.rgb){const n=e.rgb;t.rgb=6===n.length?`FF${n}`:n}return void 0!==e.theme&&(t.theme=e.theme),void 0!==e.tint&&(t.tint=e.tint),void 0!==e.indexed&&(t.indexed=e.indexed),t}function FS(e){const t=[];return e.bold&&t.push(hw("b")),e.italic&&t.push(hw("i")),e.underline&&(!0===e.underline||"single"===e.underline?t.push(hw("u")):t.push(hw("u",{val:e.underline}))),e.strikethrough&&t.push(hw("strike")),e.vertAlign&&t.push(hw("vertAlign",{val:e.vertAlign})),void 0!==e.size&&t.push(hw("sz",{val:e.size})),e.color&&t.push(hw("color",kS(e.color))),e.name&&t.push(hw("rFont",{val:e.name})),void 0!==e.family&&t.push(hw("family",{val:e.family})),void 0!==e.charset&&t.push(hw("charset",{val:e.charset})),e.scheme&&t.push(hw("scheme",{val:e.scheme})),t}function DS(e,t){const n={type:e.type,priority:e.priority};e.style&&(n.dxfId=t.addDxf(e.style)),e.operator&&(n.operator=e.operator),e.stopIfTrue&&(n.stopIfTrue=!0),void 0!==e.text&&(n.text=e.text);const r=[];if(void 0!==e.formula){const t=Array.isArray(e.formula)?e.formula:[e.formula];for(const e of t)r.push(gw("formula",void 0,uw(e)))}if("colorScale"===e.type&&e.colorScale){const t=[];for(const n of e.colorScale.cfvo){const e={type:n.type};void 0!==n.value&&(e.val=n.value),t.push(hw("cfvo",e))}for(const n of e.colorScale.colors)t.push(hw("color",{rgb:n}));r.push(gw("colorScale",void 0,t))}if("dataBar"===e.type&&e.dataBar){const t=[];for(const n of e.dataBar.cfvo){const e={type:n.type};void 0!==n.value&&(e.val=n.value),t.push(hw("cfvo",e))}t.push(hw("color",{rgb:e.dataBar.color})),r.push(gw("dataBar",void 0,t))}if("iconSet"===e.type&&e.iconSet){const t={iconSet:e.iconSet.iconSet};e.iconSet.reverse&&(t.reverse=!0),!1===e.iconSet.showValue&&(t.showValue=!1);const n=[];for(const t of e.iconSet.cfvo){const e={type:t.type};void 0!==t.value&&(e.val=t.value),n.push(hw("cfvo",e))}r.push(gw("iconSet",t,n))}return r.length>0?gw("cfRule",n,r):hw("cfRule",n)}const NS="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main",MS="http://schemas.microsoft.com/office/excel/2006/main",QS="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2",TS="{05C60535-1F16-4fd2-B633-F4F36F0B64E0}";function LS(e,t,n){const r=t.join(""),i=0===r.length?e.lastIndexOf("</worksheet>"):e.indexOf(r);if(i<0)return e.lastIndexOf("</worksheet>");let o=i;for(let e=0;e<n;e++)o+=t[e].length;return o}function RS(e,t,n){if(!(e.size<PC||e.has(t)))throw new mb(`Sheet "${n??"?"}" has more than 16777216 filled cells, which is the most \`Sheet.cells\` can hold — a Map caps at 2^24 entries.\n - streamXlsxRows(input) reads it a row at a time and has no such bound.\nThe file is not damaged; it is larger than this model.`)}function US(e,t){if(void 0===e)return!1;const n=Number(e);return!(!Number.isFinite(n)||n<=0)&&(!t.dynamicArrayCm||t.dynamicArrayCm.has(n))}function HS(e){let t=0,n=0;for(;t<e.length;){const r=e.charCodeAt(t);if(r>=65&&r<=90)n=26*n+(r-64),t++;else{if(!(r>=97&&r<=122))break;n=26*n+(r-96),t++}}n--;return{row:Number(e.slice(t))-1,col:n}}function qS(e,t){const n=Number(e??"");if(Number.isNaN(n))return t;const r=Math.trunc(n);return r<1?t:Math.min(r,16384)}function OS(e){const t=e.split(":"),n=HS(t[0]),r=t.length>1?HS(t[1]):n;return{startRow:n.row,startCol:n.col,endRow:r.row,endCol:r.col}}function PS(e,t){const n=[],r=new Map,i=[];let o,a=-1,s=-1,l=0,c=!1;t.range&&(o=OS(t.range));const u=[],f=[],d=[];let h,p,g,m,y,v,A,b,w,I=!1,x=-1,C=[],E=!1,B=!1;const S=[],k=[];let F=!1,D=!1;const N=[];let M=!1,Q=!1,T=!1,L=!1,R=!1,U="",H="",q=!1,O="",P="",$=!1,z=!1,j=!1,V=!1,Y=!1,W=!1,G=!1,J="";const _=t.maxRows??0;let X=0;const K=new Map,Z=[];let ee,te,ne,re=!1,ie=!1,oe=!1,ae=!1,se=!1,le=!1,ce=!1,ue=!1,fe=!1,de=!1,he=!1,pe=!1,ge=!1,me=!1,ye="",ve="",Ae={},be=!1,we="",Ie=!1,xe={},Ce=!1,Ee="",Be=[],Se=!1,ke=[],Fe=[],De=!1,Ne=[],Me="",Qe=!1,Te={},Le=[],Re=!1,Ue=!1,He=!1,qe="",Oe=0,Pe=0,$e="",ze=-1,je="",Ve="",Ye="",We=-1,Ge="",Je=!1,_e="",Xe=[],Ke="";const Ze={onOpenTag(e,n){const r=e.includes(":")?e.slice(e.indexOf(":")+1):e;switch(r){case"cols":re=!0;break;case"col":if(re){const e=qS(n.min,1),r=qS(n.max,0),i=n.width?Number(n.width):void 0,o="1"===n.hidden||"true"===n.hidden,a=n.outlineLevel?Number(n.outlineLevel):void 0,s="1"===n.collapsed||"true"===n.collapsed,l="1"===n.bestFit||"true"===n.bestFit,c=void 0!==n.style?Number(n.style):void 0,u=t.readStyles&&t.styles&&void 0!==c&&c>=0?UB(t.styles,c):void 0;for(let t=e;t<=r;t++){const e=t-1;for(;Z.length<=e;)Z.push({});const n={};void 0===i||Number.isNaN(i)||(n.width=i),o&&(n.hidden=!0),void 0!==a&&!Number.isNaN(a)&&a>0&&(n.outlineLevel=a),s&&(n.collapsed=!0),l&&(n.autoWidth=!0),u&&Object.keys(u).length>0&&(n.style=jB(u)),Object.keys(n).length>0&&(Z[e]=n)}}break;case"sheetFormatPr":{const e=n.defaultRowHeight,t=n.defaultColWidth;if(void 0!==e){const t=Number(e);Number.isFinite(t)&&t>0&&15!==t&&(ee=t)}if(void 0!==t){const e=Number(t);Number.isFinite(e)&&e>0&&(te=e)}break}case"sheetData":ie=!0;break;case"row":if(ie){if(_>0&&X>=_)break;if(oe=!0,Oe=Number(n.r)||Oe+1,Pe=0,n.ht&&("1"===n.customHeight||"true"===n.customHeight)){const e=Number(n.r)-1,t=Number(n.ht);if(!Number.isNaN(e)&&!Number.isNaN(t)){const n=K.get(e)??{};n.height=t,K.set(e,n)}}if("1"===n.hidden||"true"===n.hidden){const e=Number(n.r)-1;if(!Number.isNaN(e)){const t=K.get(e)??{};t.hidden=!0,K.set(e,t)}}if(n.outlineLevel){const e=Number(n.r)-1,t=Number(n.outlineLevel);if(!Number.isNaN(e)&&!Number.isNaN(t)&&t>0){const n=K.get(e)??{};n.outlineLevel=t,K.set(e,n)}}if("1"===n.collapsed||"true"===n.collapsed){const e=Number(n.r)-1;if(!Number.isNaN(e)){const t=K.get(e)??{};t.collapsed=!0,K.set(e,t)}}}break;case"c":oe&&(ae=!0,qe=n.r??"",$e=n.t??"",ze=n.s?Number(n.s):-1,je="",Ve="",Ye="",We=-1,Ge="",Je=US(n.cm,t),_e="",Xe=[]);break;case"v":ae&&(se=!0);break;case"f":T?(L=!0,O=""):ae&&(le=!0,Ye=n.t??"",void 0!==n.si&&(We=Number(n.si)),n.ref&&(Ge=n.ref),void 0!==n.cm&&US(n.cm,t)&&(Je=!0));break;case"is":ae&&(ce=!0);break;case"t":ce&&!Re?ue=!0:Re&&(He=!0);break;case"r":ce&&(Re=!0,Ke="",ne=void 0);break;case"rPr":Re&&(Ue=!0,ne={});break;case"sheetPr":E=!0;break;case"outlinePr":if(E){const e={};void 0!==n.summaryBelow&&(e.summaryBelow="1"===n.summaryBelow||"true"===n.summaryBelow),void 0!==n.summaryRight&&(e.summaryRight="1"===n.summaryRight||"true"===n.summaryRight),Object.keys(e).length>0&&(m=e)}break;case"pageSetUpPr":E&&(B="1"===n.fitToPage||"true"===n.fitToPage);break;case"tabColor":E&&(g||(g={}),g.tabColor=function(e){const t={};if(e.rgb){const n=e.rgb;t.rgb=8===n.length?n.slice(2):n}e.theme&&(t.theme=Number(e.theme));e.tint&&(t.tint=Number(e.tint));e.indexed&&(t.indexed=Number(e.indexed));return t}(n));break;case"sheetView":if(!ie){if(g||(g={}),"0"!==n.showGridLines&&"false"!==n.showGridLines||(g.showGridLines=!1),"0"!==n.showRowColHeaders&&"false"!==n.showRowColHeaders||(g.showRowColHeaders=!1),n.zoomScale){const e=Number(n.zoomScale);Number.isNaN(e)||(g.zoomScale=e)}"1"!==n.rightToLeft&&"true"!==n.rightToLeft||(g.rightToLeft=!0)}break;case"pane":if(!ie){const e=n.state;if("frozen"===e||"frozenSplit"===e){const e=Number(n.xSplit||"0"),t=Number(n.ySplit||"0");(e>0||t>0)&&(y={},e>0&&(y.columns=e),t>0&&(y.rows=t))}else if("split"===e){const e=Number(n.xSplit||"0"),t=Number(n.ySplit||"0");(e>0||t>0)&&(v={},e>0&&(v.xSplit=e),t>0&&(v.ySplit=t))}}break;case"sheetProtection":p=function(e){const t={};"1"!==e.sheet&&"true"!==e.sheet||(t.sheet=!0);"1"!==e.objects&&"true"!==e.objects||(t.objects=!0);"1"!==e.scenarios&&"true"!==e.scenarios||(t.scenarios=!0);const n=[["selectLockedCells","selectLockedCells"],["selectUnlockedCells","selectUnlockedCells"],["formatCells","formatCells"],["formatColumns","formatColumns"],["formatRows","formatRows"],["insertColumns","insertColumns"],["insertRows","insertRows"],["insertHyperlinks","insertHyperlinks"],["deleteColumns","deleteColumns"],["deleteRows","deleteRows"],["sort","sort"],["autoFilter","autoFilter"],["pivotTables","pivotTables"]];for(const[r,i]of n){const n=e[r];void 0!==n&&(t[i]=!("1"===n||"true"===n))}return t}(n);break;case"autoFilter":n.ref&&(h={range:n.ref},I=!0);break;case"filterColumn":I&&void 0!==n.colId&&(x=Number(n.colId),C=[]);break;case"filter":I&&x>=0&&void 0!==n.val&&C.push(n.val);break;case"mergeCells":fe=!0;break;case"mergeCell":fe&&n.ref&&i.push(OS(n.ref));break;case"hyperlinks":de=!0;break;case"hyperlink":if(de&&n.ref){const e={ref:n.ref},t=n["r:id"]??n["R:id"];t&&(e.rId=t),n.location&&(e.location=n.location),n.tooltip&&(e.tooltip=n.tooltip),n.display&&(e.display=n.display),u.push(e)}break;case"conditionalFormatting":be=!0,we=n.sqref??"";break;case"cfRule":be&&(Ie=!0,xe={...n},Be=[],ke=[],Fe=[],Ne=[],Me="",Le=[],Te={});break;case"colorScale":Ie&&(Se=!0,ke=[],Fe=[]);break;case"cfvo":Se?ke.push({type:n.type??"min",value:n.val}):De?Ne.push({type:n.type??"min",value:n.val}):Qe&&Le.push({type:n.type??"min",value:n.val});break;case"dataBar":Ie&&(De=!0,Ne=[],Me="");break;case"iconSet":Ie&&(Qe=!0,Te={...n},Le=[]);break;case"dataValidations":he=!0;break;case"dataValidation":he&&(pe=!0,Ae={...n},ye="",ve="");break;case"formula1":pe&&(ge=!0);break;case"formula2":pe&&(me=!0);break;case"pageMargins":b=function(e){const t={};e.left&&(t.left=Number(e.left));e.right&&(t.right=Number(e.right));e.top&&(t.top=Number(e.top));e.bottom&&(t.bottom=Number(e.bottom));e.header&&(t.header=Number(e.header));e.footer&&(t.footer=Number(e.footer));return t}(n);break;case"pageSetup":A={...A,...WS(n,t)};break;case"printOptions":A=function(e,t){const n=e??{},r=e=>"1"===e||"true"===e;r(t.gridLines)&&(n.showGridLines=!0);r(t.headings)&&(n.showRowColHeaders=!0);r(t.horizontalCentered)&&(n.horizontalCentered=!0);r(t.verticalCentered)&&(n.verticalCentered=!0);return n}(A,n);break;case"headerFooter":$=!0,w={},"1"!==n.differentOddEven&&"true"!==n.differentOddEven||(w.differentOddEven=!0),"1"!==n.differentFirst&&"true"!==n.differentFirst||(w.differentFirst=!0);break;case"oddHeader":$&&(z=!0,J="");break;case"oddFooter":$&&(j=!0,J="");break;case"evenHeader":$&&(V=!0,J="");break;case"evenFooter":$&&(Y=!0,J="");break;case"firstHeader":$&&(W=!0,J="");break;case"firstFooter":$&&(G=!0,J="");break;case"rowBreaks":F=!0;break;case"colBreaks":D=!0;break;case"brk":if(F||D){const e=n.id;if(e){const t=Number(e)-1;F?S.push(t):k.push(t)}}break;case"color":Se?Fe.push(n.rgb??""):De?Me=n.rgb??"":Ue&&ne&&YS(ne,r,n);break;case"formula":Ie&&!pe&&(Ce=!0,Ee="");break;case"sparklineGroups":M=!0;break;case"sparklineGroup":M&&(Q=!0,U=n.type??"line",H="",q="1"===n.markers||"true"===n.markers);break;case"colorSeries":if(Q){const e=n.rgb??"";H=8===e.length?e.slice(2):e}break;case"sparkline":Q&&(T=!0,O="",P="");break;default:if(T&&"sqref"===r){R=!0,P="";break}Ue&&ne&&YS(ne,r,n)}},onText(e){se?je+=e:le?Ve+=e:Ce?Ee+=e:ue?_e+=e:He?Ke+=e:ge?ye+=e:me?ve+=e:z||j||V||Y||W||G?J+=e:L?O+=e:R&&(P+=e)},onCloseTag(e){const i=e.includes(":")?e.slice(e.indexOf(":")+1):e;switch(i){case"cols":re=!1;break;case"sheetData":ie=!1;break;case"row":oe&&X++,oe=!1;break;case"c":if(ae){const e=qe?HS(qe).row:Oe-1,i=qe?HS(qe).col:Pe;Pe=i+1;let u=!1;o&&(e<o.startRow||e>o.endRow||i<o.startCol||i>o.endCol)&&(u=!0);const f=""!==je||""!==_e||Xe.length>0||""!==Ve||"e"===$e||"inlineStr"===$e||t.readStyles&&ze>=0||!!(t.styles&&ze>=0)&&(t.styles.cellXfs[ze]?.hasCheckboxFeature??!1);!u&&f&&(!function(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g){const m=""!==e?HS(e):void 0!==p&&void 0!==g?{row:p,col:g}:null;if(!m)return;const{row:y,col:v}=m;if(y>qC||v>OC)throw new mb(`Cell reference "${e}" is outside the supported sheet bounds (max row 1048576, max col 16384)`);if(!Number.isInteger(y)||!Number.isInteger(v)||y<0||v<0)return void s.onWarning?.({code:"malformed-cell-ref",message:`Cell reference "${e}" is not a cell reference — a column needs a row number and rows are 1-based. The cell is dropped; the rest of the sheet is read.`,sheet:s.sheetName});if(!s.sparse){for(;l.length<=y;)l.push([]);for(;l[y].length<=v;)l[y].push(null)}let A,b,w,I=null,x="empty";i?A=i:"shared"===u&&void 0!==f&&f>=0&&(A="");switch(t){case"s":{const t=Number(r);if(!Number.isNaN(t)&&t>=0&&t<s.sharedStrings.length){const e=s.sharedStrings[t];I=e.text,e.richText&&e.richText.length>0?(w=e.richText,x="richText"):x="string"}else s.onWarning?.({code:"unresolved-shared-string",message:`Cell ${e||`${y},${v}`} points at shared string ${r}, which the file does not have (${s.sharedStrings.length} present). Read as empty.`,sheet:s.sheetName,row:y,col:v}),I=null,x="empty";break}case"str":I=kb(r),x=A?"formula":"string",A&&(b=I);break;case"inlineStr":a&&a.length>0?(I=a.map(e=>e.text).join(""),w=a,x="richText"):(I=kb(o),x="string");break;case"b":I="1"===r||"true"===r.toLowerCase(),x=A?"formula":"boolean",A&&(b=I);break;case"e":I=r,x=A?"formula":"error",A&&(b=I);break;case"d":{const e=function(e){const t=e.trim();if(!/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})?)?$/.test(t))return;const n=/(?:Z|[+-]\d{2}:?\d{2})$/.test(t),r=/[T ]\d{2}:/.test(t),i=t.replace(" ","T"),o=new Date(r&&!n?`${i}Z`:i);return Number.isNaN(o.getTime())?void 0:o}(r);e?(I=e,x="date"):""!==r?(I=r,x="string"):(I=null,x="empty"),A&&(b=I,x="formula");break}default:{if(""===r&&!A){I=null,x="empty";break}const e=Number(r);Number.isNaN(e)||""===r?""!==r&&(I=r,x="string"):s.styles&&n>=0&&HB(s.styles,n)?(I=function(e,t){if(t){const t=rB+Math.round(e*iB);return new Date(t)}if(60===e)return new Date(Date.UTC(1900,1,28));let n=e;e>60&&(n=e-1);const r=nB+Math.round(n*iB);return new Date(r)}(e,"1904"===s.dateSystem),x="date"):(I=e,x="number"),A&&(b=I,x="formula");break}}s.sparse||(l[y][v]=I);const C=!!(s.styles&&n>=0)&&(s.styles.cellXfs[n]?.hasCheckboxFeature??!1),E=s.sparse||void 0!==A||void 0!==w||s.readStyles&&s.styles&&n>=0||C||"error"===x||"formula"===x||"richText"===x;if(E){const t={value:I,type:x};if(C&&(t.checkbox=!0),void 0!==A&&(t.formula=A,void 0!==b&&(t.formulaResult=b),"shared"===u?(t.formulaType="shared",void 0!==f&&f>=0&&(t.formulaSharedIndex=f),d&&(t.formulaRef=d)):"array"===u&&(t.formulaType="array",d&&(t.formulaRef=d)),h&&(t.formulaDynamic=!0)),w&&(t.richText=w),s.readStyles&&s.styles&&n>=0){const r=UB(s.styles,n);Object.keys(r).length>0?t.style=r:n>=s.styles.cellXfs.length&&s.onWarning?.({code:"unresolved-style",message:`Cell ${e||`${y},${v}`} points at cell format ${n}, which the file does not have (${s.styles.cellXfs.length} present). Read unstyled.`,sheet:s.sheetName,row:y,col:v})}const r=`${y},${v}`;RS(c,r,s.sheetName),c.set(r,t)}}(qe,$e,ze,je,Ve,_e,Xe.length>0?Xe:void 0,t,n,r,Ye,We,Ge,Je,e,i),e>=0&&i>=0&&(i>a&&(a=i),e>s&&(s=e),c=!0,l++)),ae=!1}break;case"v":se=!1;break;case"f":L?L=!1:le=!1;break;case"is":ce=!1;break;case"t":He?He=!1:ue&&(ue=!1);break;case"r":if(Re){const e=kb(Ke);Xe.push(ne?{text:e,font:ne}:{text:e}),Re=!1}break;case"rPr":Ue=!1;break;case"sheetPr":E=!1;break;case"mergeCells":fe=!1;break;case"autoFilter":I=!1;break;case"filterColumn":I&&h&&x>=0&&C.length>0&&(h.columns||(h.columns=[]),h.columns.push({colIndex:x,filters:C})),x=-1,C=[];break;case"hyperlinks":de=!1;break;case"conditionalFormatting":be=!1;break;case"cfRule":if(Ie){const e=function(e,t,n,r,i,o,a,s,l,c,u){const f=e.type;if(!f||!VS.has(f))return null;if(!t)return null;const d={type:f,priority:Number(e.priority??"1"),range:t},h=e.operator;h&&jS.has(h)&&(d.operator=h);const p=Number(e.dxfId);if(c&&!Number.isNaN(p)){const e=c[p];e&&Object.keys(e).length>0?d.style=e:e||u?.onWarning?.({code:"unresolved-dxf",message:`Conditional rule on ${t} asks for differential format ${p}, which the file does not have (${c.length} present). The rule keeps its condition and loses its formatting.`,sheet:u.sheetName})}"1"!==e.stopIfTrue&&"true"!==e.stopIfTrue||(d.stopIfTrue=!0);void 0!==e.text&&(d.text=e.text);1===n.length?d.formula=n[0]:n.length>1&&(d.formula=n);"colorScale"===f&&r.length>0&&(d.colorScale={cfvo:r.map(e=>({type:e.type,value:e.value})),colors:i});"dataBar"===f&&o.length>0&&(d.dataBar={cfvo:o.map(e=>({type:e.type,value:e.value})),color:a});"iconSet"===f&&s.length>0&&(d.iconSet={iconSet:l.iconSet??"3TrafficLights1",cfvo:s.map(e=>({type:e.type,value:e.value}))},"1"!==l.reverse&&"true"!==l.reverse||(d.iconSet.reverse=!0),"0"!==l.showValue&&"false"!==l.showValue||(d.iconSet.showValue=!1));return d}(xe,we,Be,ke,Fe,Ne,Me,Le,Te,t.styles?.dxfs,t);e&&d.push(e),Ie=!1}break;case"colorScale":Se=!1;break;case"dataBar":Ie&&(De=!1);break;case"iconSet":Qe=!1;break;case"formula":Ce&&(Be.push(Ee),Ce=!1);break;case"dataValidations":he=!1;break;case"dataValidation":if(pe){const e=function(e,t,n){const r=e.type;if(!r||!zS.has(r))return null;const i=e.sqref;if(!i)return null;const o={type:r,range:i},a=e.operator;a&&jS.has(a)&&(o.operator=a);"1"!==e.allowBlank&&"true"!==e.allowBlank||(o.allowBlank=!0);"1"!==e.showInputMessage&&"true"!==e.showInputMessage||(o.showInputMessage=!0);"1"!==e.showErrorMessage&&"true"!==e.showErrorMessage||(o.showErrorMessage=!0);const s=e.errorStyle;"stop"!==s&&"warning"!==s&&"information"!==s||(o.errorStyle=s);e.promptTitle&&(o.inputTitle=e.promptTitle);e.prompt&&(o.inputMessage=e.prompt);e.errorTitle&&(o.errorTitle=e.errorTitle);e.error&&(o.errorMessage=e.error);if(t)if("list"===r){const e=t.trim();if(e.startsWith('"')&&e.endsWith('"')){const t=e.slice(1,-1);o.values=t.split(",")}else o.formula1=t}else o.formula1=t;n&&(o.formula2=n);return o}(Ae,ye,ve);e&&f.push(e),pe=!1}break;case"formula1":ge=!1;break;case"formula2":me=!1;break;case"headerFooter":$=!1;break;case"oddHeader":z&&w&&(w.oddHeader=J,z=!1);break;case"oddFooter":j&&w&&(w.oddFooter=J,j=!1);break;case"evenHeader":V&&w&&(w.evenHeader=J,V=!1);break;case"evenFooter":Y&&w&&(w.evenFooter=J,Y=!1);break;case"firstHeader":W&&w&&(w.firstHeader=J,W=!1);break;case"firstFooter":G&&w&&(w.firstFooter=J,G=!1);break;case"rowBreaks":F=!1;break;case"colBreaks":D=!1;break;case"sparklineGroups":M=!1;break;case"sparklineGroup":Q=!1;break;case"sparkline":if(T&&P){const e={location:P,dataRange:O};U&&"line"!==U&&(e.type=U),H&&(e.color=H),q&&(e.markers=!0),N.push(e)}T=!1;break;default:if(T&&"sqref"===i){R=!1;break}}}};return{handlers:Ze,finish:function(){if(c&&!t.sparse){const r=a+1,i=(s+1)*r,o=t.maxTotalCells??2e7;if(i>o)throw new mb(function(e,t,n,r,i,o){const a=i<=PC;return`Sheet "${e}" spans ${t} rows x ${n} columns (${r} cells, ${(r>0?100*i/r:100).toFixed(2)}% of them filled), over the ${o} limit.\n - streamXlsxRows(input) reads it a row at a time, whatever the box.\n`+(a?" - readXlsx(input, { sparse: true }) returns the cells and no grid.\n":` - \`sparse: true\` cannot help here: ${i} filled cells is past the 16777216 a Map can hold.\n`)+" - `range` or `maxRows` bound the area, if you know where the data is.\n - `maxTotalCells` raises the bound, if the sheet really is this large."}(e,s+1,r,i,l,o));for(let e=0;e<=s;e++)if(n[e])for(;n[e].length<r;)n[e].push(null);else n[e]=Array.from({length:r},()=>null)}const o=new Map;if(t.worksheetRels)for(const e of t.worksheetRels)o.set(e.id,e.target);for(const i of u){const a=HS(i.ref),s=`${a.row},${a.col}`;let l=r.get(s);l||(l={value:(n[a.row]&&n[a.row][a.col])??null,type:"string"},RS(r,s,e),r.set(s,l));const c={target:""};if(i.location)c.location=i.location,c.target=i.location;else if(i.rId){const e=o.get(i.rId);e?c.target=e:t.onWarning?.({code:"unresolved-hyperlink",message:`Cell ${i.ref} links through ${i.rId}, which the sheet's relationships do not define. Read with an empty target.`,sheet:t.sheetName,row:a.row,col:a.col})}i.tooltip&&(c.tooltip=i.tooltip),i.display&&(c.display=i.display),l.hyperlink=c}const I={name:e,rows:n};if(r.size>0&&(I.cells=r),void 0!==ee&&(I.defaultRowHeight=ee),void 0!==te&&(I.defaultColWidth=te),Z.some(e=>Object.keys(e).length>0)&&(I.columns=Z),i.length>0&&(I.merges=i),f.length>0&&(I.dataValidations=f),d.length>0&&(I.conditionalRules=d),h&&(I.autoFilter=h),y&&(I.freezePane=y),v&&(I.splitPane=v),p&&(I.protection=p),g&&Object.keys(g).length>0&&(I.view=g),A||b||B){const e=A??{};b&&(e.margins=b),B&&(e.fitToPage=!0),I.pageSetup=e}return w&&Object.keys(w).length>0&&(I.headerFooter=w),S.length>0&&(I.rowBreaks=S.sort((e,t)=>e-t)),k.length>0&&(I.colBreaks=k.sort((e,t)=>e-t)),K.size>0&&(I.rowDefs=K),N.length>0&&(I.sparklines=N),m&&(I.outlineProperties=m),I}}}async function $S(e,t,n){const{handlers:r,finish:i}=PS(t,n);return await async function(e,t,n){const r=n?.strict??!1,i=e.getReader(),o=new TextDecoder("utf-8");let a="",s=!1;try{for(;;){const{done:e,value:n}=await i.read();if(e)break;a+=o.decode(n,{stream:!0}),s||(65279===a.charCodeAt(0)&&(a=a.slice(1)),s=!0),a=Rb(a,t,!1,r)}a+=o.decode(),a.length>0&&Rb(a,t,!0,r)}finally{try{await i.cancel()}catch{}try{i.releaseLock()}catch{}}}(e,r,{strict:!0}),i()}const zS=new Set(["list","whole","decimal","date","time","textLength","custom"]),jS=new Set(["between","notBetween","equal","notEqual","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual"]);const VS=new Set(["cellIs","expression","colorScale","dataBar","iconSet","top10","aboveAverage","duplicateValues","uniqueValues","containsText","notContainsText","beginsWith","endsWith","containsBlanks","notContainsBlanks"]);function YS(e,t,n){switch(t){case"b":e.bold="0"!==n.val&&"false"!==n.val;break;case"i":e.italic="0"!==n.val&&"false"!==n.val;break;case"u":{const t=n.val;e.underline="double"!==t||"double";break}case"strike":e.strikethrough="0"!==n.val&&"false"!==n.val;break;case"sz":n.val&&(e.size=Number(n.val));break;case"rFont":n.val&&(e.name=n.val);break;case"color":if(e.color={},n.rgb){const t=n.rgb;e.color.rgb=8===t.length?t.slice(2):t}n.theme&&(e.color.theme=Number(n.theme)),n.tint&&(e.color.tint=Number(n.tint)),n.indexed&&(e.color.indexed=Number(n.indexed));break;case"vertAlign":"superscript"!==n.val&&"subscript"!==n.val||(e.vertAlign=n.val);break;case"family":n.val&&(e.family=Number(n.val));break;case"charset":n.val&&(e.charset=Number(n.val));break;case"scheme":"major"!==n.val&&"minor"!==n.val&&"none"!==n.val||(e.scheme=n.val)}}function WS(e,t){const n={};if(e.paperSize){const r=Number(e.paperSize);Number.isInteger(r)&&r>0?n.paperSize=BS[r]??r:t?.onWarning?.({code:"unusable-paper-size",message:`Page setup names paper size "${e.paperSize}", which is not a positive integer code. Dropped; the sheet reads with no paper size set.`,sheet:t.sheetName})}"landscape"!==e.orientation&&"portrait"!==e.orientation||(n.orientation=e.orientation),e.scale&&(n.scale=Number(e.scale)),void 0===e.fitToWidth&&void 0===e.fitToHeight||(n.fitToPage=!0,e.fitToWidth&&(n.fitToWidth=Number(e.fitToWidth)),e.fitToHeight&&(n.fitToHeight=Number(e.fitToHeight))),"1"!==e.horizontalCentered&&"true"!==e.horizontalCentered||(n.horizontalCentered=!0),"1"!==e.verticalCentered&&"true"!==e.verticalCentered||(n.verticalCentered=!0),e.paperWidth&&(n.paperWidth=e.paperWidth),e.paperHeight&&(n.paperHeight=e.paperHeight);const r=JS(e.firstPageNumber);void 0!==r&&(n.firstPageNumber=r),void 0!==e.useFirstPageNumber&&(n.useFirstPageNumber=GS(e.useFirstPageNumber)),"overThenDown"!==e.pageOrder&&"downThenOver"!==e.pageOrder||(n.pageOrder=e.pageOrder),GS(e.blackAndWhite)&&(n.blackAndWhite=!0),GS(e.draft)&&(n.draft=!0);const i=e.cellComments;"none"!==i&&"asDisplayed"!==i&&"atEnd"!==i||(n.cellComments=i);const o=e.errors;"displayed"!==o&&"blank"!==o&&"dash"!==o&&"NA"!==o||(n.errors=o);const a=JS(e.copies);void 0!==a&&(n.copies=a);const s=JS(e.horizontalDpi);void 0!==s&&(n.horizontalDpi=s);const l=JS(e.verticalDpi);return void 0!==l&&(n.verticalDpi=l),void 0!==e.usePrinterDefaults&&(n.usePrinterDefaults=GS(e.usePrinterDefaults)),n}function GS(e){return"1"===e||"true"===e}function JS(e){if(void 0===e)return;const t=Number(e);return Number.isInteger(t)&&t>=0?t:void 0}function _S(e){const t=new Map,n=[];let r=!1,i=!1,o=!1,a=!1,s=!1,l=!1,c="",u="",f=-1,d="";return Nb(e,{onOpenTag(e,t){switch(e.includes(":")?e.slice(e.indexOf(":")+1):e){case"authors":r=!0;break;case"author":r&&(i=!0,c="");break;case"commentList":o=!0;break;case"comment":o&&(a=!0,u=t.ref??"",f=t.authorId?Number(t.authorId):-1,d="");break;case"text":a&&(s=!0);break;case"r":break;case"t":s&&(l=!0)}},onText(e){i?c+=e:l&&(d+=e)},onCloseTag(e){switch(e.includes(":")?e.slice(e.indexOf(":")+1):e){case"authors":r=!1;break;case"author":i&&(n.push(c),i=!1);break;case"commentList":o=!1;break;case"comment":if(a&&u){const e={text:d};if(f>=0&&f<n.length){const t=n[f];t&&(e.author=t)}t.set(u,e),a=!1}break;case"text":s=!1;break;case"r":break;case"t":l=!1}}}),t}function XS(e,t){for(const n of e.children){if("string"==typeof n)continue;if((n.local||n.tag)===t){return n.children.filter(e=>"string"==typeof e).join("")||void 0}}}function KS(e){if(e)return function(e){const t=e.trim(),n=t.indexOf("T"),r=n>=0&&/(?:Z|[+-]\d{2}:?\d{2})$/.test(t.slice(n+1)),i=new Date(n>=0&&!r?`${t}Z`:t);return Number.isNaN(i.getTime())?void 0:i}(e)}const ZS=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function ek(e,t){return e===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/${t}`||e===`http://purl.oclc.org/ooxml/officeDocument/relationships/${t}`||e.endsWith("/"+t)}function tk(e,t="(unknown)"){return Cb(e,t)}async function nk(e,t,n,r){const i=e.declaredSize(t);if(void 0===i||i<=Ib)try{return function(e,t,n){const{handlers:r,finish:i}=PS(t,n);return Nb(e,r),i()}(tk(await e.extract(t),t),n,r)}catch(e){if(!function(e){return e instanceof xb}(e))throw e}return $S(e.extractStream(t),n,r)}async function rk(e,t){let n,r=await zC(e,t?.maxInputBytes);if(function(e){if(e.length<$C.length)return!1;for(let t=0;t<$C.length;t++)if(e[t]!==$C[t])return!1;return!0}(r)){if(!t?.password)throw new bb("xlsx");r=await oE(r,t.password,t.maxSpinCount)}try{n=new KE(r,t?.maxDecompressedBytes)}catch(e){if(e instanceof yb)throw e;throw new mb("Failed to open XLSX file: not a valid ZIP archive",void 0,{cause:e})}if(!n.has("[Content_Types].xml"))throw new mb("Invalid XLSX: missing [Content_Types].xml");if(function(e){const t=Ub(e),n=new Map,r=new Map;for(const e of t.children){if("string"==typeof e)continue;const t=e.local||e.tag;if("Default"===t){const t=e.attrs.Extension,r=e.attrs.ContentType;t&&r&&n.set(t,r)}else if("Override"===t){const t=e.attrs.PartName,n=e.attrs.ContentType;t&&n&&r.set(t,n)}}}(tk(await n.extract("[Content_Types].xml"),"[Content_Types].xml")),!n.has("_rels/.rels"))throw new mb("Invalid XLSX: missing _rels/.rels");const i=jb(tk(await n.extract("_rels/.rels"),"_rels/.rels")).find(e=>ek(e.type,"officeDocument"));if(!i)throw new mb("Invalid XLSX: cannot find workbook relationship in _rels/.rels");const o=i.target.startsWith("/")?i.target.slice(1):i.target,a=Yb(o),s=a?`${a}/_rels/${o.slice(a.length+1)}.rels`:`_rels/${o}.rels`;let l=[];if(n.has(s)){l=jb(tk(await n.extract(s),s))}if(!n.has(o))throw new mb(`Invalid XLSX: missing workbook at ${o}`);const c=tk(await n.extract(o),o),{sheets:u,dateSystem:f,namedRanges:d,workbookProtection:h,activeSheet:p,pivotCacheRefs:g}=function(e,t){const n=Ub(e),r=[],i=[],o=[];let a,s,l="1900";"1904"===t?.dateSystem?l="1904":"1900"===t?.dateSystem&&(l="1900");for(const e of n.children){if("string"==typeof e)continue;const n=e.local||e.tag;if("workbookPr"===n&&("1"!==e.attrs.date1904&&"true"!==e.attrs.date1904||t?.dateSystem&&"auto"!==t.dateSystem||(l="1904")),"workbookProtection"===n){const t="1"===e.attrs.lockStructure||"true"===e.attrs.lockStructure,n="1"===e.attrs.lockWindows||"true"===e.attrs.lockWindows;(t||n)&&(a={},t&&(a.lockStructure=!0),n&&(a.lockWindows=!0))}if("bookViews"===n)for(const t of e.children){if("string"==typeof t)continue;if("workbookView"!==(t.local||t.tag))continue;const e=Number(t.attrs.activeTab);Number.isInteger(e)&&e>0&&void 0===s&&(s=e)}if("sheets"===n)for(const t of e.children){if("string"==typeof t)continue;if("sheet"===(t.local||t.tag)){const e=t.attrs.name??"",n=Number(t.attrs.sheetId??"0"),i=t.attrs["r:id"]??t.attrs["R:id"]??Wb(t.attrs)??"",o=t.attrs.state;let a="visible";"hidden"===o?a="hidden":"veryHidden"===o&&(a="veryHidden"),e&&i&&r.push({name:e,sheetId:n,rId:i,state:a})}}if("pivotCaches"===n)for(const t of e.children){if("string"==typeof t)continue;if("pivotCache"===(t.local||t.tag)){const e=t.attrs.cacheId,n=void 0===e?NaN:Number(e),r=t.attrs["r:id"]??t.attrs["R:id"]??Wb(t.attrs)??"";r&&!Number.isNaN(n)&&o.push({cacheId:n,rId:r})}}}for(const e of n.children){if("string"==typeof e)continue;if("definedNames"===(e.local||e.tag))for(const t of e.children){if("string"==typeof t)continue;if("definedName"===(t.local||t.tag)){const e=t.attrs.name??"",n=t.children.filter(e=>"string"==typeof e).join("");if(e&&n){const o={name:e,range:n},a=t.attrs.localSheetId;if(void 0!==a){const e=Number(a);e>=0&&e<r.length&&(o.scope=r[e].name)}t.attrs.comment&&(o.comment=t.attrs.comment),i.push(o)}}}}return{sheets:r,dateSystem:l,namedRanges:i,workbookProtection:a,activeSheet:s,pivotCacheRefs:o}}(c,t);let m=[];const y=l.find(e=>ek(e.type,"sharedStrings"));if(y){const e=Vb(a,y.target);if(n.has(e)){m=function(e){const t=Ub(e),n=[];for(const e of t.children)"string"!=typeof e&&"si"===(e.local||e.tag)&&n.push(ZE(e));return n}(tk(await n.extract(e),e))}}let v=null;const A=l.find(e=>ek(e.type,"styles"));if(A){const e=Vb(a,A.target);if(n.has(e)){v=yB(tk(await n.extract(e),e))}}let b;const w=a?`${a}/theme/theme1.xml`:"theme/theme1.xml";if(n.has(w)){b=function(e){const t=new Map;let n=!1,r="";return Nb(e,{onOpenTag(e,i){if("clrScheme"===e||"a:clrScheme"===e)return void(n=!0);if(!n)return;const o=e.includes(":")?e.split(":").pop():e;ZS.includes(o)?r=o:r&&("srgbClr"===o&&i.val?t.set(r,i.val.toUpperCase()):"sysClr"===o&&i.lastClr&&t.set(r,i.lastClr.toUpperCase()))},onCloseTag(e){const t=e.includes(":")?e.split(":").pop():e;"clrScheme"===t&&(n=!1),r&&ZS.includes(t)&&(r="")}}),ZS.map(e=>t.get(e)??"000000")}(tk(await n.extract(w),w))}let I;const x=l.find(e=>ek(e.type,"person"));if(x){const e=Vb(a,x.target);if(n.has(e)){I=function(e){const t=Ub(e),n=[];for(const e of qb(t)){if("person"!==e.local)continue;const t=e.attrs.id,r=e.attrs.displayName;if(!t||void 0===r)continue;const i={id:t,displayName:r};e.attrs.userId&&(i.userId=e.attrs.userId),e.attrs.providerId&&(i.providerId=e.attrs.providerId),n.push(i)}return n}(tk(await n.extract(e),e))}}const C=l.filter(e=>ek(e.type,"externalLink")).sort((e,t)=>ok(e.id)-ok(t.id)),E=[];for(const e of C){const t=Vb(a,e.target);if(!n.has(t))continue;const r=tk(await n.extract(t),t),i=ak(t),o=n.has(i)?tk(await n.extract(i),i):void 0;E.push(Jb(r,o))}let B;const S=l.find(e=>"http://www.wps.cn/officeDocument/2017/relationships/cellimage"===e.type);if(S){const e=Vb(a,S.target);if(n.has(e)){const t=function(e){const t=Ub(e),n=[];for(const e of qb(t)){if("cellImage"!==e.local)continue;const t=Xb(e);t&&n.push(t)}return n}(tk(await n.extract(e),e)),r=ak(e),i=Yb(e),o=new Map;if(n.has(r)){const e=tk(await n.extract(r),r);for(const t of jb(e)){if(!ek(t.type,"image"))continue;const e=Vb(i,t.target);if(!n.has(e))continue;const r=e.split(".").pop()?.toLowerCase()??"",a=sk[r];a&&o.set(t.id,{data:await n.extract(e),type:a})}}const a=function(e,t){const n=[],r=new Set;for(const i of e){if(r.has(i.id))continue;const e=t.get(i.embedRId);if(!e)continue;const o={id:i.id,data:e.data,type:e.type};i.description&&(o.description=i.description),n.push(o),r.add(i.id)}return n}(t,o);a.length>0&&(B=a)}}const k=new Map,F=new Map;for(const e of g){const t=l.find(t=>t.id===e.rId);if(!t)continue;const r=Vb(a,t.target);if(!n.has(r))continue;const i=Kb(tk(await n.extract(r),r));if(!i)continue;i.cacheId=e.cacheId;const o=ak(r);if(n.has(o)){jb(tk(await n.extract(o),o)).some(e=>ek(e.type,"pivotCacheRecords"))&&(i.hasRecords=!0)}k.set(e.cacheId,i),F.set(e.rId,i)}const D=g.map(e=>k.get(e.cacheId)).filter(e=>void 0!==e),N=l.filter(e=>ek(e.type,"slicerCache")).sort((e,t)=>ik(e.target)-ik(t.target)),M=[];for(const e of N){const t=Vb(a,e.target);if(!n.has(t))continue;const r=rw(tk(await n.extract(t),t));r&&M.push(r)}const Q=l.filter(e=>ek(e.type,"timelineCache")).sort((e,t)=>ik(e.target)-ik(t.target)),T=[];for(const e of Q){const t=Vb(a,e.target);if(!n.has(t))continue;const r=ow(tk(await n.extract(t),t));r&&T.push(r)}let L;const R=l.find(e=>ek(e.type,"sheetMetadata"));if(R){const e=Vb(a,R.target);n.has(e)&&(L=function(e){const t=new Set,n=Ub(e),r="metadata"===n.local?n:Hb(n,"metadata");if(!r)return t;const i=[],o=Hb(r,"metadataTypes");if(o)for(const e of qb(o))"metadataType"===e.local&&i.push(e.attrs.name??"");const a=new Map;for(const e of qb(r)){if("futureMetadata"!==e.local)continue;const t=e.attrs.name??"",n=a.get(t)??[];for(const t of qb(e))"bk"===t.local&&n.push(rS(t));a.set(t,n)}const s=Hb(r,"cellMetadata");if(!s)return t;let l=0;for(const e of qb(s))if("bk"===e.local){l++;for(const n of qb(e)){if("rc"!==n.local)continue;if(i[$b(n.attrs.t,0)-1]!==eS)continue;const e=a.get(eS),r=$b(n.attrs.v,-1);(!e||r<0||r>=e.length||e[r])&&t.add(l)}}return t}(tk(await n.extract(e),e)))}const U=new Map,H=new Map;for(const e of l)ek(e.type,"worksheet")?U.set(e.id,Vb(a,e.target)):ek(e.type,"chartsheet")?H.set(e.id,"chartsheet"):ek(e.type,"dialogsheet")&&H.set(e.id,"dialogsheet");const q=function(e,t){if(void 0===t)return e;if("function"==typeof t){const n=[];for(let r=0;r<e.length;r++){const i=e[r];t({name:i.name,index:r,hidden:"hidden"===i.state,veryHidden:"veryHidden"===i.state},r)&&n.push(i)}return n}if(0===t.length)return e;const n=[];for(const r of t)if("number"==typeof r)r>=0&&r<e.length&&n.push(e[r]);else{const t=e.find(e=>e.name===r);t&&n.push(t)}return n}(u,t?.sheets),O=t?.readStyles??!1,P=[];for(const e of q){const r=H.get(e.rId);if(void 0!==r){const t={name:e.name,rows:[],kind:r};"hidden"===e.state&&(t.hidden=!0),"veryHidden"===e.state&&(t.veryHidden=!0),P.push(t);continue}const i=U.get(e.rId);if(!i||!n.has(i))throw new mb(`Invalid XLSX: missing worksheet file for sheet "${e.name}"`);const o=Yb(i),s=ak(i);let c;if(n.has(s)){c=jb(tk(await n.extract(s),s))}const u={sharedStrings:m,styles:v,readStyles:O,dateSystem:f,worksheetRels:c,maxRows:t?.maxRows,range:t?.range,maxTotalCells:t?.maxTotalCells,sparse:t?.sparse,dynamicArrayCm:L,sheetName:e.name,onWarning:t?.onWarning},d=await nk(n,i,e.name,u);if("hidden"===e.state&&(d.hidden=!0),"veryHidden"===e.state&&(d.veryHidden=!0),c){const e=c.find(e=>ek(e.type,"drawing"));if(e){const t=Vb(o,e.target),r=await lk(n,t);if(r.images.length>0&&(d.images=r.images),r.textBoxes.length>0&&(d.textBoxes=r.textBoxes),r.chartRefs.length>0){const e=[];for(const t of r.chartRefs){if(!n.has(t.path))continue;const r=RC(tk(await n.extract(t.path),t.path));r&&(t.anchor&&(r.anchor=t.anchor),t.altText&&(r.altText=t.altText),t.frameTitle&&(r.frameTitle=t.frameTitle),e.push(r))}e.length>0&&(d.charts=e)}}}if(c){const e=c.find(e=>ek(e.type,"comments"));if(e){const t=Vb(o,e.target);if(n.has(t)){const e=_S(tk(await n.extract(t),t));if(e.size>0){d.cells||(d.cells=new Map);for(const[t,n]of e){const e=HS(t),r=`${e.row},${e.col}`;let i=d.cells.get(r);i||(i={value:(d.rows[e.row]&&d.rows[e.row][e.col])??null,type:"string"},d.cells.set(r,i)),i.comment=n}}}}const t=c.find(e=>ek(e.type,"threadedComment"));if(t){const e=Vb(o,t.target);if(n.has(e)){const t=zb(tk(await n.extract(e),e));t.length>0&&(d.threadedComments=t)}}}if(c){const e=c.filter(e=>ek(e.type,"table"));if(e.length>0){const t=[];for(const r of e){const e=Vb(o,r.target);if(n.has(e)){const r=xk(tk(await n.extract(e),e));r&&t.push(r)}}t.length>0&&(d.tables=t)}}if(c){const e=c.find(e=>ek(e.type,"image"));if(e){const t=Vb(o,e.target);n.has(t)&&(d.backgroundImage=await n.extract(t))}}if(c){const e=c.filter(e=>ek(e.type,"pivotTable"));if(e.length>0){const t=[];for(const r of e){const e=Vb(o,r.target);if(!n.has(e))continue;const i=Zb(tk(await n.extract(e),e));if(!i)continue;const s=ak(e);if(n.has(s)){const t=jb(tk(await n.extract(s),s)).find(e=>ek(e.type,"pivotCacheDefinition"));if(t){const n=Vb(Yb(e),t.target);for(const e of g){const t=l.find(t=>t.id===e.rId);if(!t)continue;if(Vb(a,t.target)===n){i.cacheId=e.cacheId;break}}}}const c=k.get(i.cacheId);c&&ew(i,c),t.push(i)}t.length>0&&(d.pivotTables=t)}const t=c.filter(e=>ek(e.type,"slicer"));if(t.length>0){const e=[];for(const r of t){const t=Vb(o,r.target);if(!n.has(t))continue;const i=tk(await n.extract(t),t);for(const t of nw(i))e.push(t)}e.length>0&&(d.slicers=e)}const r=c.filter(e=>ek(e.type,"timeline"));if(r.length>0){const e=[];for(const t of r){const r=Vb(o,t.target);if(!n.has(r))continue;const i=tk(await n.extract(r),r);for(const t of iw(i))e.push(t)}e.length>0&&(d.timelines=e)}}P.push(d)}let $;if(n.has("docProps/core.xml")){const e=function(e){const t=Ub(e),n={};for(const e of t.children){if("string"==typeof e)continue;const t=e.local||e.tag,r=e.children.filter(e=>"string"==typeof e).join("");switch(t){case"title":r&&(n.title=r);break;case"subject":r&&(n.subject=r);break;case"creator":r&&(n.creator=r);break;case"keywords":r&&(n.keywords=r);break;case"description":r&&(n.description=r);break;case"lastModifiedBy":r&&(n.lastModifiedBy=r);break;case"category":r&&(n.category=r);break;case"created":if(r){const e=KS(r);e&&(n.created=e)}break;case"modified":if(r){const e=KS(r);e&&(n.modified=e)}}}return n}(tk(await n.extract("docProps/core.xml"),"docProps/core.xml"));Object.keys(e).length>0&&($={...e})}if(n.has("docProps/app.xml")){const e=function(e){const t=Ub(e),n={},r=XS(t,"Company");r&&(n.company=r);const i=XS(t,"Manager");return i&&(n.manager=i),n}(tk(await n.extract("docProps/app.xml"),"docProps/app.xml"));Object.keys(e).length>0&&($={...$,...e})}if(n.has("docProps/custom.xml")){const e=function(e){const t=Ub(e),n={};for(const e of t.children){if("string"==typeof e)continue;if("property"!==(e.local||e.tag))continue;const t=e.attrs.name;if(t)for(const r of e.children){if("string"==typeof r)continue;const e=r.local||r.tag,i=r.children.filter(e=>"string"==typeof e).join("");switch(e){case"lpwstr":n[t]=i;break;case"i4":case"i8":case"int":i&&(n[t]=parseInt(i,10));break;case"r8":case"decimal":i&&(n[t]=parseFloat(i));break;case"bool":n[t]="true"===i||"1"===i;break;case"filetime":case"date":if(i){const e=new Date(i);Number.isNaN(e.getTime())||(n[t]=e)}}break}}return n}(tk(await n.extract("docProps/custom.xml"),"docProps/custom.xml"));Object.keys(e).length>0&&($||($={}),$.custom=e)}const z={sheets:P,dateSystem:f},j=function(e,t){if(0===t.length)return t;const n=new Map;for(const t of e)n.set(t.name,t);const r=[];for(const e of t){const t="_xlnm.Print_Area"===e.name,i="_xlnm.Print_Titles"===e.name,o=void 0!==e.scope?n.get(e.scope):void 0;if(!t&&!i||!o){r.push(e);continue}const a=o.pageSetup??(o.pageSetup={});if(t){const t=e.range.split(",").map(Ik).filter(e=>e.length>0).join(",");t&&(a.printArea=t)}else for(const t of e.range.split(",")){const e=Ik(t);e&&(/\d/.test(e)?a.printTitlesRow=e:a.printTitlesColumn=e)}}return r}(P,d);j.length>0&&(z.namedRanges=j),$&&(z.properties=$),b&&(z.themeColors=b),h&&(z.workbookProtection=h),void 0!==p&&(z.activeSheet=p);const V=v?.fonts[0];return V&&Object.keys(V).length>0&&(z.defaultFont=V),I&&I.length>0&&(z.persons=I),E.length>0&&(z.externalLinks=E),B&&B.length>0&&(z.cellImages=B),D.length>0&&(z.pivotCaches=D),M.length>0&&(z.slicerCaches=M),T.length>0&&(z.timelineCaches=T),z}function ik(e){const t=e.match(/(\d+)\.xml$/i);return t?parseInt(t[1],10):Number.POSITIVE_INFINITY}function ok(e){const t=e.match(/(\d+)$/);return t?parseInt(t[1],10):Number.POSITIVE_INFINITY}function ak(e){const t=e.lastIndexOf("/");return-1===t?`_rels/${e}.rels`:`${e.slice(0,t)}/_rels/${e.slice(t+1)}.rels`}const sk={png:"png",jpg:"jpeg",jpeg:"jpeg",gif:"gif",svg:"svg",webp:"webp"};async function lk(e,t){if(!e.has(t))return{images:[],textBoxes:[],chartRefs:[]};const n=tk(await e.extract(t),t),r=Yb(t),i=ak(t),o=new Map,a=new Map;if(e.has(i)){const t=jb(tk(await e.extract(i),i));for(const e of t)ek(e.type,"image")?o.set(e.id,Vb(r,e.target)):ek(e.type,"chart")&&a.set(e.id,Vb(r,e.target))}const s=Ub(n),l=[],c=[],u=[];for(const t of s.children){if("string"==typeof t)continue;const n=t.local||t.tag;if("twoCellAnchor"===n||"oneCellAnchor"===n||"absoluteAnchor"===n){const e=uk(t);if(e){const r=a.get(e);if(r&&!u.some(e=>e.path===r)){const e="absoluteAnchor"===n?void 0:ck(t,n),i={path:r};e&&(i.anchor=e);const o=pk(t,"graphicFrame");if(o){const e=vk(o,"nvGraphicFramePr");e.altText&&(i.altText=e.altText),e.title&&(i.frameTitle=e.title)}u.push(i)}}}if("twoCellAnchor"===n){const n=hk(t);if(n){c.push(n);continue}const r=fk(t,o);if(r){const t=r.mediaPath;if(e.has(t)){const n={data:await e.extract(t),type:r.type,anchor:r.anchor};void 0!==r.width&&(n.width=r.width),void 0!==r.height&&(n.height=r.height),void 0!==r.altText&&(n.altText=r.altText),void 0!==r.title&&(n.title=r.title),l.push(n)}}}else if("oneCellAnchor"===n){const n=yk(t,o);if(n){const t=n.mediaPath;if(e.has(t)){const r={data:await e.extract(t),type:n.type,anchor:n.anchor};void 0!==n.width&&(r.width=n.width),void 0!==n.height&&(r.height=n.height),void 0!==n.altText&&(r.altText=n.altText),void 0!==n.title&&(r.title=n.title),l.push(r)}}}}return{images:l,textBoxes:c,chartRefs:u}}function ck(e,t){let n,r;for(const t of e.children){if("string"==typeof t)continue;const e=t,i=e.local||e.tag;"from"===i?n=Ak(e):"to"===i&&(r=Ak(e))}if(n)return"twoCellAnchor"===t&&r?{from:n,to:r}:{from:n}}function uk(e){for(const t of e.children){if("string"==typeof t)continue;const e=t;if("chart"===(e.local||e.tag)){const t=e.attrs["r:id"]??e.attrs.id;if(t)return t}const n=uk(e);if(n)return n}}function fk(e,t){let n,r,i,o,a=0,s=0,l=0,c=0;for(const t of e.children){if("string"==typeof t)continue;const e=t,u=e.local||e.tag;if("from"===u){const t=Ak(e);a=t.row,s=t.col}else if("to"===u){const t=Ak(e);l=t.row,c=t.col}else if("pic"===u){n=bk(e);const t=vk(e,"nvPicPr");r=t.altText,i=t.title,o=dk(e)}}if(!n)return null;const u=t.get(n);if(!u)return null;const f=u.split(".").pop()?.toLowerCase()??"",d={mediaPath:u,type:sk[f]??"png",anchor:{from:{row:a,col:s},to:{row:l,col:c}}};return o&&(d.width=o.width,d.height=o.height),r&&(d.altText=r),i&&(d.title=i),d}function dk(e){const t=pk(e,"spPr");if(!t)return;const n=pk(t,"xfrm");if(!n)return;const r=pk(n,"ext");if(!r)return;const i=Number(r.attrs.cx),o=Number(r.attrs.cy);return i>0&&o>0?{width:Math.round(i/mk),height:Math.round(o/mk)}:void 0}function hk(e){let t=0,n=0,r=0,i=0,o=null;for(const a of e.children){if("string"==typeof a)continue;const e=a,s=e.local||e.tag;if("from"===s){const r=Ak(e);t=r.row,n=r.col}else if("to"===s){const t=Ak(e);r=t.row,i=t.col}else if("sp"===s){const t=pk(e,"nvSpPr");if(t){const n=pk(t,"cNvSpPr");!n||"1"!==n.attrs.txBox&&"true"!==n.attrs.txBox||(o=e)}}}if(!o)return null;const a=pk(o,"txBody");let s,l,c,u,f,d="";if(a){const e=[];for(const t of a.children){if("string"==typeof t)continue;if("p"===(t.local||t.tag)){const n=gk(t);e.push(n.text),void 0!==n.fontSize&&void 0===s&&(s=n.fontSize),void 0!==n.bold&&void 0===l&&(l=n.bold),void 0!==n.color&&void 0===c&&(c=n.color)}}d=e.join("\n")}if(!d)return null;const h=pk(o,"spPr");if(h){const e=pk(h,"solidFill");if(e){const t=pk(e,"srgbClr");t&&t.attrs.val&&(u=t.attrs.val)}const t=pk(h,"ln");if(t){const e=pk(t,"solidFill");if(e){const t=pk(e,"srgbClr");t&&t.attrs.val&&(f=t.attrs.val)}}}const p={text:d,anchor:{from:{row:t,col:n},to:{row:r,col:i}}},g=dk(o);g&&(p.width=g.width,p.height=g.height);const m=vk(o,"nvSpPr");m.altText&&(p.altText=m.altText),m.title&&(p.title=m.title);const y={};let v=!1;return void 0!==s&&(y.fontSize=s,v=!0),void 0!==l&&(y.bold=l,v=!0),void 0!==c&&(y.color=c,v=!0),void 0!==u&&(y.fillColor=u,v=!0),void 0!==f&&(y.borderColor=f,v=!0),v&&(p.style=y),p}function pk(e,t){for(const n of e.children){if("string"==typeof n)continue;const e=n;if((e.local||e.tag)===t)return e}return null}function gk(e){let t,n,r,i="";for(const o of e.children){if("string"==typeof o)continue;const e=o;if("r"===(e.local||e.tag)){const o=pk(e,"rPr");if(o){o.attrs.sz&&(t=Number(o.attrs.sz)/100),"1"!==o.attrs.b&&"true"!==o.attrs.b||(n=!0);const e=pk(o,"solidFill");if(e){const t=pk(e,"srgbClr");t&&t.attrs.val&&(r=t.attrs.val)}}const a=pk(e,"t");a&&(i+=a.children.filter(e=>"string"==typeof e).join(""))}}return{text:i,fontSize:t,bold:n,color:r}}const mk=9525;function yk(e,t){let n,r,i,o=0,a=0,s=0,l=0;for(const t of e.children){if("string"==typeof t)continue;const e=t,c=e.local||e.tag;if("from"===c){const t=Ak(e);o=t.row,a=t.col}else if("ext"===c)s=Number(e.attrs.cx)||0,l=Number(e.attrs.cy)||0;else if("pic"===c){n=bk(e);const t=vk(e,"nvPicPr");r=t.altText,i=t.title}}if(!n)return null;const c=t.get(n);if(!c)return null;const u=c.split(".").pop()?.toLowerCase()??"",f={mediaPath:c,type:sk[u]??"png",anchor:{from:{row:o,col:a}}};return s>0&&(f.width=Math.round(s/mk)),l>0&&(f.height=Math.round(l/mk)),r&&(f.altText=r),i&&(f.title=i),f}function vk(e,t){const n=pk(e,t);if(!n)return{};const r=pk(n,"cNvPr");if(!r)return{};const i={};return r.attrs.descr&&(i.altText=r.attrs.descr),r.attrs.title&&(i.title=r.attrs.title),i}function Ak(e){let t=0,n=0;for(const r of e.children){if("string"==typeof r)continue;const e=r,i=e.local||e.tag,o=e.children.filter(e=>"string"==typeof e).join("");"row"===i?t=Number(o)||0:"col"===i&&(n=Number(o)||0)}return{row:t,col:n}}function bk(e){for(const t of e.children){if("string"==typeof t)continue;const e=t;if("blipFill"===(e.local||e.tag))for(const t of e.children){if("string"==typeof t)continue;const e=t;if("blip"===(e.local||e.tag))return e.attrs["r:embed"]??e.attrs["R:embed"]??wk(e.attrs)}}}function wk(e){for(const t of Object.keys(e))if(t.endsWith(":embed")&&e[t].startsWith("rId"))return e[t]}function Ik(e){const t=e.trim(),n=t.lastIndexOf("!");return-1===n?t:t.slice(n+1)}function xk(e){const t=Ub(e),n=t.attrs.name??"",r=t.attrs.displayName??n,i=t.attrs.ref??"";if(!n)return null;const o=t.attrs.totalsRowCount,a=void 0!==o&&"0"!==o,s=[];let l,c,u,f=!1;for(const e of t.children){if("string"==typeof e)continue;const t=e.local||e.tag;if("autoFilter"===t)f=!0;else if("tableColumns"===t)for(const t of e.children){if("string"==typeof t)continue;if("tableColumn"===(t.local||t.tag)){const e={name:t.attrs.name??""};t.attrs.totalsRowFunction&&(e.totalFunction=t.attrs.totalsRowFunction),t.attrs.totalsRowLabel&&(e.totalLabel=t.attrs.totalsRowLabel);for(const n of t.children){if("string"==typeof n)continue;if("totalsRowFormula"===(n.local||n.tag)){const t=n.children.filter(e=>"string"==typeof e).join("");t&&(e.totalFormula=t)}}s.push(e)}}else"tableStyleInfo"===t&&(l=e.attrs.name,c="1"===e.attrs.showRowStripes,u="1"===e.attrs.showColumnStripes)}const d={name:n,columns:s};return r&&r!==n&&(d.displayName=r),i&&(d.range=i),l&&(d.style=l),void 0!==c&&(d.showRowStripes=c),void 0!==u&&(d.showColumnStripes=u),d.showAutoFilter=f,a&&(d.showTotalRow=!0),d}async function Ck(e){if(function(){if(void 0===WE)try{new CompressionStream("deflate-raw"),WE="undefined"!=typeof ReadableStream}catch{WE=!1}return WE}())try{const t=new CompressionStream("deflate-raw"),n=t.writable.getWriter(),r=t.readable.getReader();n.write(e),n.close();const i=[];let o=0;for(;;){const{done:e,value:t}=await r.read();if(e)break;i.push(t),o+=t.length}const a=new Uint8Array(o);let s=0;for(const e of i)a.set(e,s),s+=e.length;return a}catch{}return zE(e)}class Ek{entries=[];paths=new Set;add(e,t,n){if(this.paths.has(e))throw new yb(`Duplicate ZIP entry: "${e}"`);this.paths.add(e);const r=n?.compress??!0;this.entries.push({path:e,data:t,compress:r})}async build(){const e=[];for(const t of this.entries){const n=t.data.length>0?NE(t.data):0;let r,i;t.compress&&t.data.length>0?(r=await Ck(t.data),i=8,r.length>=t.data.length&&(r=t.data,i=0)):(r=t.data,i=0),e.push({path:t.path,data:t.data,compressedData:r,method:i,entryCrc32:n})}const t=new TextEncoder,n=e.map(e=>t.encode(e.path));let r=0;for(let t=0;t<e.length;t++)r+=30+n[t].length+e[t].compressedData.length;let i=0;for(let t=0;t<e.length;t++)i+=46+n[t].length;const o=new Uint8Array(r+i+22),a=new DataView(o.buffer);let s=0;const l=[];for(let t=0;t<e.length;t++){const r=e[t],i=n[t];l.push(s),a.setUint32(s,67324752,!0),a.setUint16(s+4,20,!0),a.setUint16(s+6,0,!0),a.setUint16(s+8,r.method,!0),a.setUint16(s+10,0,!0),a.setUint16(s+12,33,!0),a.setUint32(s+14,r.entryCrc32,!0),a.setUint32(s+18,r.compressedData.length,!0),a.setUint32(s+22,r.data.length,!0),a.setUint16(s+26,i.length,!0),a.setUint16(s+28,0,!0),o.set(i,s+30),s+=30+i.length,o.set(r.compressedData,s),s+=r.compressedData.length}const c=s;for(let t=0;t<e.length;t++){const r=e[t],i=n[t];a.setUint32(s,33639248,!0),a.setUint16(s+4,20,!0),a.setUint16(s+6,20,!0),a.setUint16(s+8,0,!0),a.setUint16(s+10,r.method,!0),a.setUint16(s+12,0,!0),a.setUint16(s+14,33,!0),a.setUint32(s+16,r.entryCrc32,!0),a.setUint32(s+20,r.compressedData.length,!0),a.setUint32(s+24,r.data.length,!0),a.setUint16(s+28,i.length,!0),a.setUint16(s+30,0,!0),a.setUint16(s+32,0,!0),a.setUint16(s+34,0,!0),a.setUint16(s+36,0,!0),a.setUint32(s+38,0,!0),a.setUint32(s+42,l[t],!0),o.set(i,s+46),s+=46+i.length}const u=s-c;return a.setUint32(s,101010256,!0),a.setUint16(s+4,0,!0),a.setUint16(s+6,0,!0),a.setUint16(s+8,e.length,!0),a.setUint16(s+10,e.length,!0),a.setUint32(s+12,u,!0),a.setUint32(s+16,c,!0),a.setUint16(s+20,0,!0),o}}const Bk={png:"image/png",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp"};const Sk="http://schemas.openxmlformats.org/package/2006/relationships";function kk(e,t){const n={};return void 0!==t.rgb&&(n.rgb=6===t.rgb.length?`FF${t.rgb}`:t.rgb),void 0!==t.theme&&(n.theme=t.theme),void 0!==t.tint&&(n.tint=t.tint),void 0!==t.indexed&&(n.indexed=t.indexed),hw(e,n)}function Fk(e){const t=[];return e.bold&&t.push(hw("b")),e.italic&&t.push(hw("i")),void 0!==e.underline&&!1!==e.underline&&(!0===e.underline||"single"===e.underline?t.push(hw("u")):t.push(hw("u",{val:e.underline}))),e.strikethrough&&t.push(hw("strike")),void 0!==e.charset&&t.push(hw("charset",{val:e.charset})),void 0!==e.family&&t.push(hw("family",{val:e.family})),e.scheme&&t.push(hw("scheme",{val:e.scheme})),e.color&&t.push(kk("color",e.color)),void 0!==e.size&&t.push(hw("sz",{val:e.size})),e.name&&t.push(hw("name",{val:e.name})),e.vertAlign&&t.push(hw("vertAlign",{val:e.vertAlign})),gw("font",void 0,t)}function Dk(e){if("pattern"===e.type){const t=[];e.fgColor&&t.push(kk("fgColor",e.fgColor)),e.bgColor&&t.push(kk("bgColor",e.bgColor));const n=gw("patternFill",{patternType:e.pattern},t.length>0?t:void 0);return gw("fill",void 0,[n])}const t=[];for(const n of e.stops)t.push(gw("stop",{position:n.position},[kk("color",n.color)]));const n={};void 0!==e.degree&&(n.degree=e.degree);const r=gw("gradientFill",n,t);return gw("fill",void 0,[r])}function Nk(e,t){return t?t.color?gw(""+e,{style:t.style},[kk("color",t.color)]):hw(e,{style:t.style}):hw(e)}function Mk(e){const t={};e.diagonalUp&&(t.diagonalUp=!0),e.diagonalDown&&(t.diagonalDown=!0);const n=[Nk("left",e.left),Nk("right",e.right),Nk("top",e.top),Nk("bottom",e.bottom),Nk("diagonal",e.diagonal)];return gw("border",Object.keys(t).length>0?t:void 0,n)}function Qk(e){if(!e)return"";const t=[];return void 0!==e.rgb&&t.push(`rgb:${e.rgb}`),void 0!==e.theme&&t.push(`th:${e.theme}`),void 0!==e.tint&&t.push(`tint:${e.tint}`),void 0!==e.indexed&&t.push(`idx:${e.indexed}`),t.join("|")}function Tk(e){const t=[];return e.name&&t.push(`n:${e.name}`),void 0!==e.size&&t.push(`s:${e.size}`),e.bold&&t.push("b"),e.italic&&t.push("i"),void 0!==e.underline&&!1!==e.underline&&t.push(`u:${e.underline}`),e.strikethrough&&t.push("st"),e.color&&t.push(`c:${Qk(e.color)}`),e.vertAlign&&t.push(`va:${e.vertAlign}`),void 0!==e.family&&t.push(`fam:${e.family}`),void 0!==e.charset&&t.push(`cs:${e.charset}`),e.scheme&&t.push(`sch:${e.scheme}`),t.join(",")}function Lk(e){return"pattern"===e.type?`p:${e.pattern}|fg:${Qk(e.fgColor)}|bg:${Qk(e.bgColor)}`:`g:${e.degree??""}|${e.stops.map(e=>`${e.position}:${Qk(e.color)}`).join(";")}`}function Rk(e){return e?`${e.style}:${Qk(e.color)}`:""}function Uk(e){return[`l:${Rk(e.left)}`,`r:${Rk(e.right)}`,`t:${Rk(e.top)}`,`b:${Rk(e.bottom)}`,`d:${Rk(e.diagonal)}`,e.diagonalUp?"du":"",e.diagonalDown?"dd":""].join("|")}function Hk(e,t){const n=t?.reuseStyleIdentity??!1,r={name:e?.name??"Calibri",size:e?.size??11,...e},i=[{key:Tk(r),font:r}],o=new Map([[i[0].key,0]]),a=[{key:"p:none|fg:|bg:",fill:{type:"pattern",pattern:"none"}},{key:"p:gray125|fg:|bg:",fill:{type:"pattern",pattern:"gray125"}}],s=new Map([[a[0].key,0],[a[1].key,1]]),l={},c=[{key:Uk(l),border:l}],u=new Map([[c[0].key,0]]),f=[],d=new Map;let h=164;const p="nf:0|f:0|fl:0|b:0|a:|p:",g=[{key:p,numFmtId:0,fontId:0,fillId:0,borderId:0}],m=new Map([[p,0]]);function y(e){const t=d.get(e);if(void 0!==t)return t;const n=h++;return f.push({id:n,formatCode:e}),d.set(e,n),n}function v(e){if(!e)return"";const t=[];return e.horizontal&&t.push(`h:${e.horizontal}`),e.vertical&&t.push(`v:${e.vertical}`),e.wrapText&&t.push("w"),e.shrinkToFit&&t.push("sf"),void 0!==e.textRotation&&t.push(`r:${e.textRotation}`),void 0!==e.indent&&t.push(`i:${e.indent}`),e.readingOrder&&t.push(`ro:${e.readingOrder}`),t.join(",")}function A(e){if(!e)return"";const t=[];return void 0!==e.locked&&t.push(`l:${e.locked}`),void 0!==e.hidden&&t.push(`h:${e.hidden}`),t.join(",")}const b=[],w=new Map;const I=n?new WeakMap:void 0;function x(e,t){if(I&&!t){const t=I.get(e);if(void 0!==t)return t}const n=e.font?function(e){const t=Tk(e),n=o.get(t);if(void 0!==n)return n;const r=i.length;return i.push({key:t,font:OB(e)}),o.set(t,r),r}(e.font):0,r=e.fill?function(e){const t=Lk(e),n=s.get(t);if(void 0!==n)return n;const r=a.length;return a.push({key:t,fill:PB(e)}),s.set(t,r),r}(e.fill):0,l=e.border?function(e){const t=Uk(e),n=u.get(t);if(void 0!==n)return n;const r=c.length;return c.push({key:t,border:zB(e)}),u.set(t,r),r}(e.border):0,f=e.numFmt?y(e.numFmt):0,d=[`nf:${f}`,`f:${n}`,`fl:${r}`,`b:${l}`,`a:${v(e.alignment)}`,`p:${A(e.protection)}`,t?"cb:1":"cb:0"].join("|"),h=m.get(d);if(void 0!==h)return I&&!t&&I.set(e,h),h;const p=g.length;return g.push({key:d,numFmtId:f,fontId:n,fillId:r,borderId:l,alignment:e.alignment?{...e.alignment}:void 0,protection:e.protection?{...e.protection}:void 0,hasCheckboxFeature:t||void 0}),m.set(d,p),I&&!t&&I.set(e,p),p}function C(e){const t={};if(e.horizontal&&(t.horizontal=e.horizontal),e.vertical&&(t.vertical=e.vertical),e.wrapText&&(t.wrapText=!0),e.shrinkToFit&&(t.shrinkToFit=!0),void 0!==e.textRotation&&(t.textRotation=e.textRotation),void 0!==e.indent&&(t.indent=e.indent),e.readingOrder){const n={ltr:1,rtl:2,context:0};t.readingOrder=n[e.readingOrder]}return hw("alignment",t)}return{addStyle:function(e){return x(e,!1)},addCheckboxStyle:function(e){return x(e??{},!0)},addNumFmt:y,addDxf:function(e){const t=function(e){const t=[];return e.font&&t.push(`f:${Tk(e.font)}`),e.fill&&t.push(`fl:${Lk(e.fill)}`),e.border&&t.push(`b:${Uk(e.border)}`),e.numFmt&&t.push(`nf:${e.numFmt}`),e.alignment&&t.push(`a:${v(e.alignment)}`),t.join("|")}(e),n=w.get(t);if(void 0!==n)return n;const r=b.length;return b.push(e),w.set(t,r),r},hasCheckboxFeature:function(){for(const e of g)if(e.hasCheckboxFeature)return!0;return!1},toXml:function(){const e=[];if(f.length>0){const t=f.map(e=>hw("numFmt",{numFmtId:e.id,formatCode:e.formatCode}));e.push(gw("numFmts",{count:f.length},t))}const t=i.map(e=>Fk(e.font));e.push(gw("fonts",{count:i.length},t));const n=a.map(e=>Dk(e.fill));e.push(gw("fills",{count:a.length},n));const r=c.map(e=>Mk(e.border));e.push(gw("borders",{count:c.length},r)),e.push(gw("cellStyleXfs",{count:1},[hw("xf",{numFmtId:0,fontId:0,fillId:0,borderId:0})]));const o=g.map(e=>{const t={numFmtId:e.numFmtId,fontId:e.fontId,fillId:e.fillId,borderId:e.borderId,xfId:0};0!==e.numFmtId&&(t.applyNumberFormat=!0),0!==e.fontId&&(t.applyFont=!0),0!==e.fillId&&(t.applyFill=!0),0!==e.borderId&&(t.applyBorder=!0);const n=void 0!==e.alignment,r=void 0!==e.protection,i=!0===e.hasCheckboxFeature;if(n&&(t.applyAlignment=!0),r&&(t.applyProtection=!0),n||r||i){const o=[];return n&&o.push(C(e.alignment)),r&&o.push(function(e){const t={};return void 0!==e.locked&&(t.locked=e.locked?1:0),void 0!==e.hidden&&(t.hidden=e.hidden?1:0),hw("protection",t)}(e.protection)),i&&o.push(gw("extLst",void 0,gw("ext",{uri:pB,"xmlns:xfpb":hB},hw("xfpb:xfComplement",{i:"0"})))),gw("xf",t,o)}return hw("xf",t)});if(e.push(gw("cellXfs",{count:g.length},o)),e.push(gw("cellStyles",{count:1},[hw("cellStyle",{name:"Normal",xfId:0,builtinId:0})])),b.length>0){const t=b.map(e=>{const t=[];if(e.font&&t.push(Fk(e.font)),e.numFmt){const n=y(e.numFmt);t.push(hw("numFmt",{numFmtId:n,formatCode:e.numFmt}))}return e.fill&&t.push(Dk(e.fill)),e.border&&t.push(Mk(e.border)),e.alignment&&t.push(C(e.alignment)),gw("dxf",void 0,t)});e.push(gw("dxfs",{count:b.length},t))}else e.push(hw("dxfs",{count:0}));return e.push(hw("tableStyles",{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"})),mw("styleSheet",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"},e)}}}function qk(e){const t=e;return t.length>=8&&137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?"png":t.length>=3&&255===t[0]&&216===t[1]&&255===t[2]?"jpeg":t.length>=6&&71===t[0]&&73===t[1]&&70===t[2]?"gif":t.length>=12&&82===t[0]&&73===t[1]&&70===t[2]&&70===t[3]&&87===t[8]&&69===t[9]&&66===t[10]&&80===t[11]?"webp":function(e){const t=e.subarray(0,Ok);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);const r=n.trimStart().replace(/^/,"");return!!r.startsWith("<")&&/<svg[\s>]/i.test(r)}(t)?"svg":"png"}const Ok=1024;const Pk="http://schemas.openxmlformats.org/officeDocument/2006/relationships",$k="http://schemas.openxmlformats.org/drawingml/2006/chart",zk=9525,jk={png:"png",jpeg:"jpeg",gif:"gif",svg:"svg",webp:"webp"},Vk={png:"image/png",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp"};function Yk(e,t,n,r,i=1){const o=[],a=[],s=[];for(let n=0;n<e.length;n++){const r=e[n],i=t+n,l=`rId${n+1}`,c=jk[r.type]??"png",u=Vk[r.type]??"image/png",f=`xl/media/image${i}.${c}`,d=`../media/image${i}.${c}`;o.push({path:f,data:r.data,contentType:u}),a.push(hw("Relationship",{Id:l,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:d}));const h=r.width?r.width*zk:3e6,p=r.height?r.height*zk:2e6,g=r.anchor.from.col,m=r.anchor.from.row,y=r.anchor.to?.col??g+3,v=r.anchor.to?.row??m+5,A=gw("xdr:from",void 0,[gw("xdr:col",void 0,String(g)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(m)),gw("xdr:rowOff",void 0,"0")]),b=gw("xdr:to",void 0,[gw("xdr:col",void 0,String(y)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(v)),gw("xdr:rowOff",void 0,"0")]),w={id:n+2,name:`Picture ${n+1}`};r.title&&(w.title=r.title),r.altText&&(w.descr=r.altText);const I=gw("xdr:nvPicPr",void 0,[hw("xdr:cNvPr",w),gw("xdr:cNvPicPr",void 0,[hw("a:picLocks",{noChangeAspect:1})])]),x=gw("xdr:blipFill",void 0,[hw("a:blip",{"r:embed":l}),gw("a:stretch",void 0,[hw("a:fillRect")])]),C=gw("xdr:spPr",void 0,[gw("a:xfrm",void 0,[hw("a:off",{x:0,y:0}),hw("a:ext",{cx:h,cy:p})]),gw("a:prstGeom",{prst:"rect"},[hw("a:avLst")])]),E=gw("xdr:pic",void 0,[I,x,C]),B=gw("xdr:twoCellAnchor",void 0,[A,b,E,hw("xdr:clientData")]);s.push(B)}if(n&&n.length>0){let t=e.length+2;for(let e=0;e<n.length;e++){const r=n[e],i=r.anchor.from.col,o=r.anchor.from.row,a=r.anchor.to?.col??i+3,l=r.anchor.to?.row??o+3,c=r.width?r.width*zk:2e6,u=r.height?r.height*zk:5e5,f=gw("xdr:from",void 0,[gw("xdr:col",void 0,String(i)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(o)),gw("xdr:rowOff",void 0,"0")]),d=gw("xdr:to",void 0,[gw("xdr:col",void 0,String(a)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(l)),gw("xdr:rowOff",void 0,"0")]),h={id:t++,name:`TextBox ${e+1}`};r.title&&(h.title=r.title),r.altText&&(h.descr=r.altText);const p=gw("xdr:nvSpPr",void 0,[hw("xdr:cNvPr",h),gw("xdr:cNvSpPr",{txBox:1},[])]),g=[gw("a:xfrm",void 0,[hw("a:off",{x:0,y:0}),hw("a:ext",{cx:c,cy:u})]),gw("a:prstGeom",{prst:"rect"},[hw("a:avLst")])],m=r.style?.fillColor??"FFFFFF";g.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:m})]));const y=r.style?.borderColor??"000000";g.push(gw("a:ln",void 0,[gw("a:solidFill",void 0,[hw("a:srgbClr",{val:y})])]));const v=gw("xdr:spPr",void 0,g),A={lang:"en-US",sz:100*(r.style?.fontSize??11)};r.style?.bold&&(A.b=1);const b=[];r.style?.color&&b.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:r.style.color})]));const w=b.length>0?gw("a:rPr",A,b):hw("a:rPr",A),I=gw("xdr:txBody",void 0,[hw("a:bodyPr",{wrap:"square"}),gw("a:p",void 0,[gw("a:r",void 0,[w,gw("a:t",void 0,uw(r.text))])])]),x=gw("xdr:sp",void 0,[p,v,I]),C=gw("xdr:twoCellAnchor",void 0,[f,d,x,hw("xdr:clientData")]);s.push(C)}}const l=[];if(r&&r.length>0){let t=e.length+(n?.length??0)+2;for(let n=0;n<r.length;n++){const o=r[n],c=i+n,u=`rId${e.length+n+1}`;a.push(hw("Relationship",{Id:u,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",Target:`../charts/chart${c}.xml`}));const f=o.anchor.from.col,d=o.anchor.from.row,h=o.anchor.to?.col??f+8,p=o.anchor.to?.row??d+15,g=gw("xdr:from",void 0,[gw("xdr:col",void 0,String(f)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(d)),gw("xdr:rowOff",void 0,"0")]),m=gw("xdr:to",void 0,[gw("xdr:col",void 0,String(h)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(p)),gw("xdr:rowOff",void 0,"0")]),y={id:t++,name:`Chart ${n+1}`};o.frameTitle&&(y.title=o.frameTitle),o.altText&&(y.descr=o.altText);const v=gw("xdr:nvGraphicFramePr",void 0,[hw("xdr:cNvPr",y),gw("xdr:cNvGraphicFramePr",void 0,[])]),A=gw("xdr:xfrm",void 0,[hw("a:off",{x:0,y:0}),hw("a:ext",{cx:0,cy:0})]),b=gw("a:graphic",void 0,gw("a:graphicData",{uri:$k},[hw("c:chart",{"xmlns:c":$k,"xmlns:r":Pk,"r:id":u})])),w=gw("xdr:graphicFrame",{macro:""},[v,A,b]),I=gw("xdr:twoCellAnchor",{editAs:"oneCell"},[g,m,w,hw("xdr:clientData")]);s.push(I),l.push({globalChartIndex:c})}}return{drawingXml:mw("xdr:wsDr",{"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:r":Pk},s),drawingRels:mw("Relationships",{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},a),images:o,charts:l}}function Wk(e,t){const n=e.showTitle??Boolean(e.title),r=function(e){if(!1===e.legend)return null;if(void 0===e.legend)return"scatter"===e.type?"b":"r";switch(e.legend){case"top":return"t";case"bottom":return"b";case"left":return"l";case"right":return"r";case"topRight":return"tr"}}(e),i=[];n&&e.title&&i.push(function(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g,m){const y=void 0===n?0:n*uI,v=void 0===r?1400:100*r,A=i?1:0,b=!0===o?1:void 0,w=!0===s?"sngStrike":void 0,I=!0===l?"sng":void 0,x=void 0!==a?gw("a:solidFill",void 0,[$w(a)]):void 0,C=c?hw("a:latin",{typeface:c}):void 0,E=[];x&&E.push(x),C&&E.push(C);const B=E.length>0?gw("a:defRPr",{sz:v,b:A,i:b,u:I,strike:w},E):hw("a:defRPr",{sz:v,b:A,i:b,u:I,strike:w}),S=E.length>0?gw("a:rPr",{lang:"en-US",sz:v,b:A,i:b,u:I,strike:w},E):hw("a:rPr",{lang:"en-US",sz:v,b:A,i:b,u:I,strike:w}),k=rI(u),F=[gw("c:tx",void 0,[gw("c:rich",void 0,[gw("a:bodyPr",{rot:y,spcFirstLastPara:1,vertOverflow:"ellipsis",wrap:"square",anchor:"ctr",anchorCtr:1},[]),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[B]),gw("a:r",void 0,[S,gw("a:t",void 0,uw(e))])])])])];void 0!==k&&F.push(k),F.push(hw("c:overlay",{val:t?1:0}));const D=dI(f,d,h,p,g,m);return void 0!==D&&F.push(D),gw("c:title",void 0,F)}(e.title,function(e){return!0===e.titleOverlay}(e),function(e){return hI(e.titleRotation)}(e),function(e){return pI(e.titleFontSize)}(e),function(e){return gI(e.titleBold)}(e),function(e){return mI(e.titleItalic)}(e),function(e){return yI(e.titleColor)}(e),function(e){return vI(e.titleStrike)}(e),function(e){return AI(e.titleUnderline)}(e),function(e){return function(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}(e.titleFontFamily)}(e),function(e){return tI(e.titleLayout)}(e),function(e){return yI(e.titleFillColor)}(e),function(e){return yI(e.titleBorderColor)}(e),function(e){return Gw(e.titleBorderWidth)}(e),function(e){return Jw(e.titleBorderDash)}(e),function(e){return Nw(e.titleBorderCap)}(e),function(e){return Mw(e.titleBorderCompound)}(e))),i.push(hw("c:autoTitleDeleted",{val:Sx(e)?1:0}));const o=function(e){if(void 0===e)return;const t=[],n=Kw(e.rotX,-90,90);void 0!==n&&t.push(hw("c:rotX",{val:n}));const r=Kw(e.hPercent,5,500);void 0!==r&&t.push(hw("c:hPercent",{val:r}));const i=Kw(e.rotY,0,360);void 0!==i&&t.push(hw("c:rotY",{val:i}));const o=Kw(e.depthPercent,20,2e3);void 0!==o&&t.push(hw("c:depthPercent",{val:o})),!0===e.rAngAx?t.push(hw("c:rAngAx",{val:1})):!1===e.rAngAx&&t.push(hw("c:rAngAx",{val:0}));const a=Kw(e.perspective,0,240);return void 0!==a&&t.push(hw("c:perspective",{val:a})),gw("c:view3D",void 0,t)}(e.view3D);void 0!==o&&i.push(o);const a=function(e){if("number"==typeof e&&Number.isFinite(e)&&Number.isInteger(e)&&!(e<=0||e>100))return gw("c:floor",void 0,[hw("c:thickness",{val:e})])}(e.floorThickness);void 0!==a&&i.push(a);const s=function(e){if("number"==typeof e&&Number.isFinite(e)&&Number.isInteger(e)&&!(e<=0||e>100))return gw("c:sideWall",void 0,[hw("c:thickness",{val:e})])}(e.sideWallThickness);void 0!==s&&i.push(s);const l=function(e){if("number"==typeof e&&Number.isFinite(e)&&Number.isInteger(e)&&!(e<=0||e>100))return gw("c:backWall",void 0,[hw("c:thickness",{val:e})])}(e.backWallThickness);void 0!==l&&i.push(l),i.push(DC(e,t)),r&&i.push(II(r,function(e){return!0===e.legendOverlay}(e),function(e){const t=e.legendEntries;if(!Array.isArray(t)||0===t.length)return[];const n=new Map;for(const e of t){if(!e||"object"!=typeof e)continue;const t=e.idx;if("number"!=typeof t||!Number.isFinite(t))continue;if(!Number.isInteger(t)||t<0)continue;const r={idx:t,delete:!0===e.delete};if("number"==typeof e.fontSize&&Number.isFinite(e.fontSize)){const t=Math.round(2*e.fontSize)/2;t>=1&&t<=wI&&(r.fontSize=t)}if(!0===e.bold?r.bold=!0:!1===e.bold&&(r.bold=!1),!0===e.italic?r.italic=!0:!1===e.italic&&(r.italic=!1),!0===e.underline?r.underline=!0:!1===e.underline&&(r.underline=!1),!0===e.strikethrough?r.strikethrough=!0:!1===e.strikethrough&&(r.strikethrough=!1),void 0!==e.color){const t=Pw(e.color);void 0!==t&&(r.color=t)}if("string"==typeof e.fontFamily){const t=e.fontFamily.trim();t.length>0&&(r.fontFamily=t)}n.set(t,r)}return Array.from(n.values()).sort((e,t)=>e.idx-t.idx)}(e),function(e){return pI(e.legendFontSize)}(e),function(e){const t=e.legendBold;return!0===t||!1!==t&&void 0}(e),function(e){const t=e.legendItalic;return!0===t||!1!==t&&void 0}(e),function(e){const t=e.legendUnderline;return!0===t||!1!==t&&void 0}(e),function(e){if(!0===e.legendStrikethrough)return!0}(e),function(e){return yI(e.legendFontColor)}(e),function(e){return function(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}(e.legendFontFamily)}(e),function(e){return tI(e.legendLayout)}(e),function(e){return yI(e.legendFillColor)}(e),function(e){return yI(e.legendBorderColor)}(e),function(e){return Gw(e.legendBorderWidth)}(e),function(e){return Jw(e.legendBorderDash)}(e),Nw(e.legendBorderCap),Mw(e.legendBorderCompound))),i.push(hw("c:plotVisOnly",{val:_k(e)?1:0})),i.push(hw("c:dispBlanksAs",{val:Jk(e)})),i.push(hw("c:showDLblsOverMax",{val:Xk(e)?1:0}));const c=gw("c:chart",void 0,i),u=[];(function(e){return!0===e.date1904})(e)&&u.push(hw("c:date1904",{val:1}));const f=function(e){const t=e.lang;return"string"!=typeof t?void 0:/^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(t)?t:void 0}(e);void 0!==f&&u.push(hw("c:lang",{val:f})),u.push(hw("c:roundedCorners",{val:Kk(e)?1:0}));const d=function(e){const t=e.style;return"number"!=typeof t?void 0:Number.isInteger(t)?t<1||t>48?void 0:t:void 0}(e);void 0!==d&&u.push(hw("c:style",{val:d}));const h=function(e){const t=e.protection;if(void 0===t||!1===t)return;if(!0===t)return{chartObject:!1,data:!1,formatting:!1,selection:!1,userInterface:!1};return{chartObject:!0===t.chartObject,data:!0===t.data,formatting:!0===t.formatting,selection:!0===t.selection,userInterface:!0===t.userInterface}}(e);void 0!==h&&u.push(function(e){return gw("c:protection",void 0,[hw("c:chartObject",{val:e.chartObject?1:0}),hw("c:data",{val:e.data?1:0}),hw("c:formatting",{val:e.formatting?1:0}),hw("c:selection",{val:e.selection?1:0}),hw("c:userInterface",{val:e.userInterface?1:0})])}(h)),u.push(c);const p=function(e){const t=(s=e.chartSpaceFillColor,yI(s)),n=function(e){return yI(e)}(e.chartSpaceBorderColor),r=Gw(e.chartSpaceBorderWidth),i=Jw(e.chartSpaceBorderDash),o=Nw(e.chartSpaceBorderCap),a=Mw(e.chartSpaceBorderCompound);var s;if(void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const l=[];void 0!==t&&l.push(gw("a:solidFill",void 0,[$w(t)]));if(void 0!==n||void 0!==r||void 0!==i||void 0!==o||void 0!==a){const e={};void 0!==r&&(e.w=Math.round(r*Bw)),void 0!==o&&(e.cap=o),void 0!==a&&(e.cmpd=a);const t=[];void 0!==n&&t.push(gw("a:solidFill",void 0,[$w(n)])),void 0!==i&&t.push(hw("a:prstDash",{val:i})),l.push(0===t.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,t))}return gw("c:spPr",void 0,l)}(e);void 0!==p&&u.push(p);return{chartXml:mw("c:chartSpace",{"xmlns:c":"http://schemas.openxmlformats.org/drawingml/2006/chart","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},u),chartRels:mw("Relationships",{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},[])}}const Gk=new Set(["gap","zero","span"]);function Jk(e){const t=e.dispBlanksAs;return t&&Gk.has(t)?t:"gap"}function _k(e){return"boolean"!=typeof e.plotVisOnly||e.plotVisOnly}function Xk(e){return"boolean"!=typeof e.showDLblsOverMax||e.showDLblsOverMax}function Kk(e){return"boolean"==typeof e.roundedCorners&&e.roundedCorners}const Zk="http://schemas.openxmlformats.org/spreadsheetml/2006/main";function eF(e,t){const n=[];for(const[t,r]of e){if(!r.comment)continue;const[e,i]=t.split(","),o=parseInt(e,10),a=parseInt(i,10),s=hS(o,a),l=r.comment.author??"",c=r.comment.text;n.push({ref:s,row:o,col:a,author:l,text:c})}if(0===n.length)return null;n.sort((e,t)=>e.row-t.row||e.col-t.col);const r=new Map;for(const e of n)r.has(e.author)||r.set(e.author,r.size);const i=function(e,t){const n=[];for(const[e]of t)n.push(gw("author",void 0,uw(e)));const r=gw("authors",void 0,n),i=[];for(const n of e){const e=t.get(n.author)??0,r=gw("text",void 0,[gw("r",void 0,[gw("t",void 0,uw(n.text))])]);i.push(gw("comment",{ref:n.ref,authorId:e},[r]))}const o=gw("commentList",void 0,i);return mw("comments",{xmlns:Zk},[r,o])}(n,r),o=function(e,t){const n=[];n.push('<xml xmlns:v="urn:schemas-microsoft-com:vml"',' xmlns:o="urn:schemas-microsoft-com:office:office"',' xmlns:x="urn:schemas-microsoft-com:office:excel">'),n.push('<o:shapelayout v:ext="edit">',`<o:idmap v:ext="edit" data="${t+1}"/>`,"</o:shapelayout>"),n.push('<v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202"',' path="m,l,21600r21600,l21600,xe">','<v:stroke joinstyle="miter"/>','<v:path gradientshapeok="t" o:connecttype="rect"/>',"</v:shapetype>");const r=1024*(t+1)+1;for(let t=0;t<e.length;t++){const i=e[t],o=r+t,a=i.col+1,s=i.row,l=a+2,c=s+4,u=48*(i.col+1),f=15*i.row;n.push(`<v:shape id="_x0000_s${o}" type="#_x0000_t202"`,` style="position:absolute;margin-left:${u}pt;margin-top:${f}pt;`,`width:108pt;height:59.25pt;z-index:${t+1};visibility:hidden"`,' fillcolor="#ffffe1" o:insetmode="auto">','<v:fill color2="#ffffe1"/>','<v:shadow on="t" color="black" obscured="t"/>','<v:path o:connecttype="none"/>','<v:textbox style="mso-direction-alt:auto">','<div style="text-align:left"/>',"</v:textbox>",'<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",`<x:Anchor>${a},15,${s},2,${l},31,${c},4</x:Anchor>`,"<x:AutoFill>False</x:AutoFill>",`<x:Row>${i.row}</x:Row>`,`<x:Column>${i.col}</x:Column>`,"</x:ClientData>","</v:shape>")}return n.push("</xml>"),n.join("")}(n,t);return{commentsXml:i,vmlXml:o,comments:n}}function tF(e,t,n){const r=e.displayName??e.name,i=e.range??"",o=!1!==e.showAutoFilter,a=!0===e.showTotalRow,s={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",id:t,name:e.name,displayName:r,ref:i};a?s.totalsRowCount=1:s.totalsRowShown=0;const l=[];if(o){const e=a?function(e){const t=e.indexOf(":");if(-1===t)return e;const n=e.slice(t+1);let r=n.length;for(;r>0&&n.charCodeAt(r-1)>=48&&n.charCodeAt(r-1)<=57;)r--;const i=n.slice(0,r),o=parseInt(n.slice(r),10);return isNaN(o)||o<=1?e:`${e.slice(0,t+1)}${i}${o-1}`}(i):i;l.push(hw("autoFilter",{ref:e}))}const c=[];for(let t=0;t<e.columns.length;t++){const n=e.columns[t],r={id:t+1,name:n.name};if(a&&n.totalFunction&&(r.totalsRowFunction=n.totalFunction),a&&n.totalLabel&&(r.totalsRowLabel=n.totalLabel),a&&"custom"===n.totalFunction&&n.totalFormula){const e=gw("totalsRowFormula",void 0,uw(n.totalFormula));c.push(gw("tableColumn",r,[e]))}else c.push(hw("tableColumn",r))}l.push(gw("tableColumns",{count:e.columns.length},c));const u=e.style??"TableStyleMedium2",f=!1!==e.showRowStripes,d=!0===e.showColumnStripes;l.push(hw("tableStyleInfo",{name:u,showFirstColumn:0,showLastColumn:0,showRowStripes:f?1:0,showColumnStripes:d?1:0}));return{tableXml:mw("table",s,l),tableId:t}}function nF(e,t){const n=e.columns.length;let r=0;if(t.rows)r=t.rows.length;else if(t.data){const e=t.columns?.some(e=>e.header);r=t.data.length+(e?1:0)}e.showTotalRow&&(r+=1),r<1&&(r=1);return`${fS(0)}1:${fS(n-1)}${r}`}const rF="http://schemas.openxmlformats.org/spreadsheetml/2006/main",iF="http://schemas.openxmlformats.org/officeDocument/2006/relationships",oF="http://schemas.openxmlformats.org/package/2006/relationships",aF="http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords",sF="http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition";function lF(e,t,n,r=1){const i=function(e,t){const n=t.fieldNames.map((e,n)=>({index:n,name:e,axis:"hidden",axisOrder:0,kind:uF(t.dataRows,n)})),r=(e,t)=>{if(e)for(let r=0;r<e.length;r++){const i=n.find(t=>t.name===e[r]);i&&(i.axis=t,i.axisOrder=r)}};r(e.rows,"row"),r(e.columns,"col"),r(e.pages,"page");const i=[];for(let r=0;r<e.values.length;r++){const o=e.values[r],a=t.fieldNames.indexOf(o.field);if(-1===a)continue;n[a].axis="data",n[a].axisOrder=r;const s=o.function??"sum",l={fieldIndex:a,function:s,displayName:o.displayName??gF(s,o.field)};void 0!==o.numberFormat&&(l.numberFormat=o.numberFormat),i.push(l)}for(const e of n){if("data"===e.axis||"hidden"===e.axis)continue;if("string"!==e.kind)continue;const n=new Set,r=[];for(const i of t.dataRows){const t=i[e.index],o=null==t?"":String(t);n.has(o)||(n.add(o),r.push(o))}e.sharedStrings=r,e.sharedIndex=new Map(r.map((e,t)=>[e,t]))}return{fields:n,dataFieldDefs:i}}(e,t),o=function(e,t){const n=gw("cacheSource",{type:"worksheet"},[hw("worksheetSource",{ref:e.ref,sheet:e.sheetName})]),r=[];for(const n of t.fields)r.push(fF(n,e.dataRows));return mw("pivotCacheDefinition",{xmlns:rF,"xmlns:r":iF,"r:id":"rId1",refreshOnLoad:1,refreshedBy:"hucre",refreshedDate:0,createdVersion:6,refreshedVersion:6,minRefreshableVersion:3,recordCount:e.dataRows.length},[n,gw("cacheFields",{count:t.fields.length},r)])}(t,i),a=function(e){return mw("Relationships",{xmlns:oF},[hw("Relationship",{Id:"rId1",Type:aF,Target:`pivotCacheRecords${e}.xml`})])}(r),s=function(e,t){const n=[];for(const r of e.dataRows){const e=[];for(const n of t.fields)e.push(dF(r[n.index],n));n.push(gw("r",void 0,e))}return mw("pivotCacheRecords",{xmlns:rF,"xmlns:r":iF,count:e.dataRows.length},n)}(t,i),l=function(e,t,n){const r=t.fields.filter(e=>"row"===e.axis).sort((e,t)=>e.axisOrder-t.axisOrder),i=t.fields.filter(e=>"col"===e.axis).sort((e,t)=>e.axisOrder-t.axisOrder),o=t.fields.filter(e=>"page"===e.axis).sort((e,t)=>e.axisOrder-t.axisOrder),a=e.targetCell??"A1",s=e.styleName??"PivotStyleLight16",l=e.dataCaption??"Values",c=function(e,t,n,r){const{col:i,row:o}=function(e){const t=/^([A-Z]+)(\d+)$/i.exec(e.trim());if(!t)throw new Error(`Invalid pivot targetCell "${e}" — expected an A1-style reference`);const n=t[1].toUpperCase();let r=0;for(let e=0;e<n.length;e++)r=26*r+(n.charCodeAt(e)-64);return{col:r-1,row:parseInt(t[2],10)-1}}(e),a=0,s=Math.max(1,n)+(r.dataFieldDefs.length>1?1:0),l=Math.max(1,t),c=Math.max(2,t+Math.max(1,r.dataFieldDefs.length)),u=s+2,f=pF(o,i),d=pF(o+u-1,i+c-1);return{ref:`${f}:${d}`,firstHeaderRow:a,firstDataRow:s,firstDataCol:l}}(a,r.length,i.length,t),u=[];u.push(hw("location",c));const f=[];for(const e of t.fields)f.push(hF(e));u.push(gw("pivotFields",{count:t.fields.length},f)),r.length>0&&(u.push(gw("rowFields",{count:r.length},r.map(e=>hw("field",{x:e.index})))),u.push(gw("rowItems",{count:1},[gw("i",void 0,[hw("x")])])));if(i.length>0)u.push(gw("colFields",{count:i.length},i.map(e=>hw("field",{x:e.index})))),u.push(gw("colItems",{count:1},[gw("i",void 0,[hw("x")])]));else if(t.dataFieldDefs.length>1){u.push(gw("colFields",{count:1},[hw("field",{x:-2})]));const e=[];for(let n=0;n<t.dataFieldDefs.length;n++)e.push(gw("i",0===n?void 0:{i:n},[hw("x",{v:n})]));u.push(gw("colItems",{count:t.dataFieldDefs.length},e))}o.length>0&&u.push(gw("pageFields",{count:o.length},o.map(e=>hw("pageField",{fld:e.index,hier:-1}))));if(t.dataFieldDefs.length>0){const e=[];for(const n of t.dataFieldDefs){const t={name:n.displayName,fld:n.fieldIndex,baseField:0,baseItem:0};"sum"!==n.function&&(t.subtotal=n.function),void 0!==n.numberFormat&&(t.numFmtId=0),e.push(hw("dataField",t))}u.push(gw("dataFields",{count:t.dataFieldDefs.length},e))}return u.push(hw("pivotTableStyleInfo",{name:s,showRowHeaders:1,showColHeaders:1,showRowStripes:0,showColStripes:0,showLastColumn:1})),mw("pivotTableDefinition",{xmlns:rF,"xmlns:r":iF,name:e.name,cacheId:n,applyNumberFormats:0,applyBorderFormats:0,applyFontFormats:0,applyPatternFormats:0,applyAlignmentFormats:0,applyWidthHeightFormats:1,dataCaption:l,updatedVersion:6,minRefreshableVersion:3,useAutoFormatting:1,itemPrintTitles:1,createdVersion:6,indent:0,outline:1,outlineData:1,multipleFieldFilters:0},u)}(e,i,n),c=function(e){return mw("Relationships",{xmlns:oF},[hw("Relationship",{Id:"rId1",Type:sF,Target:`../pivotCache/pivotCacheDefinition${e}.xml`})])}(r);return{cacheDefinitionXml:o,cacheDefinitionRels:a,cacheRecordsXml:s,pivotTableXml:l,pivotTableRels:c}}function cF(e,t,n){if(n.length<2)throw new Error(`Pivot "${e.name}" source sheet "${t}" needs at least a header row plus one data row (got ${n.length}).`);const r=n[0],i=[];for(let e=0;e<r.length;e++){const t=r[e];i.push(null==t?`Column${e+1}`:String(t))}const o=[];for(let e=1;e<n.length;e++){const t=n[e],r=[];for(let e=0;e<i.length;e++)r.push(e<t.length?t[e]:null);o.push(r)}const a=new Set(i),s=[...e.rows??[],...e.columns??[],...e.pages??[]];for(const t of e.values)s.push(t.field);for(const t of s)if(!a.has(t))throw new Error(`Pivot "${e.name}" references field "${t}" which is not in the source header (have: ${i.join(", ")}).`);const l=e.sourceRange??function(e,t){if(e<=0||t<=0)throw new Error("Pivot source range must contain at least one column and row");const n=pF(0,0),r=pF(t-1,e-1);return`${n}:${r}`}(i.length,n.length);return{sheetName:t,fieldNames:i,dataRows:o,ref:l}}function uF(e,t){for(const n of e){const e=n[t];if(null!=e&&""!==e&&("number"!=typeof e||!Number.isFinite(e)))return"string"}return"number"}function fF(e,t){if("string"===e.kind){const t=[];if(e.sharedStrings)for(const n of e.sharedStrings)t.push(hw("s",{v:n}));return gw("cacheField",{name:e.name,numFmtId:0},[gw("sharedItems",{count:t.length},t)])}let n=1/0,r=-1/0,i=!1;for(const o of t){const t=o[e.index];null!=t&&""!==t?"number"==typeof t&&(t<n&&(n=t),t>r&&(r=t)):i=!0}const o={containsSemiMixedTypes:0,containsString:0,containsNumber:1,containsInteger:Number.isInteger(n)&&Number.isInteger(r)?1:0};return i&&(o.containsBlank=1),Number.isFinite(n)&&(o.minValue=n),Number.isFinite(r)&&(o.maxValue=r),gw("cacheField",{name:e.name,numFmtId:0},[hw("sharedItems",o)])}function dF(e,t){if(null==e||""===e)return hw("m");if("string"===t.kind){const n=t.sharedIndex?.get(String(e));return void 0!==n?hw("x",{v:n}):hw("s",{v:String(e)})}return"number"==typeof e&&Number.isFinite(e)?hw("n",{v:e}):"boolean"==typeof e?hw("b",{v:e?1:0}):hw("s",{v:String(e)})}function hF(e){if("data"===e.axis)return hw("pivotField",{dataField:1,showAll:0});if("hidden"===e.axis)return hw("pivotField",{showAll:0});const t="row"===e.axis?"axisRow":"col"===e.axis?"axisCol":"axisPage",n=[];if(e.sharedStrings)for(let t=0;t<e.sharedStrings.length;t++)n.push(hw("item",{x:t}));return n.push(hw("item",{t:"default"})),gw("pivotField",{axis:t,showAll:0},[gw("items",{count:n.length},n)])}function pF(e,t){let n=t,r="";for(;n>=0;)r=String.fromCharCode(65+n%26)+r,n=Math.floor(n/26)-1;return`${r}${e+1}`}function gF(e,t){return`${"sum"===e?"Sum":"count"===e?"Count":"average"===e?"Average":"max"===e?"Max":"min"===e?"Min":"product"===e?"Product":"countNums"===e?"Count Nums":"stdDev"===e?"StdDev":"stdDevp"===e?"StdDevp":"var"===e?"Var":"Varp"} of ${t}`}function mF(e){return e.toISOString().replace(/\.\d{3}Z$/,"Z")}const yF=new TextEncoder;async function vF(e){const t=cS(e.sheets),{defaultFont:n,dateSystem:r,namedRanges:i,activeSheet:o,workbookProtection:a}=e;!function(e){const t=new Map;for(let n=0;n<e.length;n++){const r=e[n].name;aS(r,n);const i=r.toLowerCase(),o=t.get(i);if(void 0!==o)throw new Ab(`Duplicate sheet name "${r}" (sheets ${o+1} and ${n+1}); Excel compares sheet names case-insensitively`);t.set(i,n)}}(t);const s=function(e){const t=e.properties;if(t?.description)return t;for(const n of e.sheets){const e=n.a11y?.summary;if(e&&e.trim().length>0)return{...t,description:e}}return t}(e),l=Hk(n,{reuseStyleIdentity:!0}),c=function(){const e=[],t=new Map;return{add:function(n){const r=t.get(n);if(void 0!==r)return r;const i=e.length;return e.push(n),t.set(n,i),i},getAll:function(){return e},count:function(){return e.length}}}();let u=1;const f=[];for(const e of t)e.tables&&e.tables.length>0?(f.push(u),u+=e.tables.length):f.push(void 0);let d=1;const h=[];for(const e of t)e.pivotTables&&e.pivotTables.length>0?(h.push(d),d+=e.pivotTables.length):h.push(void 0);const p=[];for(let n=0;n<t.length;n++){const i=bS(t[n],l,c,r,f[n],"inline"===e.stringMode,h[n]);p.push(i)}const g=c.count()>0,m=[],y=[],v=new Set;let A=1,b=1;const w=[],I=[];for(let e=0;e<t.length;e++){const n=t[e],r=n.images&&n.images.length>0,i=n.textBoxes&&n.textBoxes.length>0,o=n.charts&&n.charts.length>0;if(r||i||o){const t=Yk(n.images??[],A,n.textBoxes,n.charts,b);m.push(t),y.push(e+1);for(const e of t.images){const t=e.path.split(".").pop();t&&v.add(t)}n.images&&(A+=n.images.length);const r=[];if(n.charts){for(let e=0;e<n.charts.length;e++){const t=Wk(n.charts[e],n.name),i=b+e;r.push({globalIndex:i,xml:t.chartXml,rels:t.chartRels}),I.push(i)}b+=n.charts.length}w.push(r)}else m.push(null),w.push([])}const{paths:x,nextIndex:C}=function(e,t,n){const r=[];let i=t;for(const t of e){if(!t.backgroundImage){r.push(null);continue}const e=qk(t.backgroundImage);r.push(`xl/media/image${i}.${e}`),n.add(e),i++}return{paths:r,nextIndex:i}}(t,A,v);A=C;const E=[],B=[];for(let e=0;e<t.length;e++){const n=t[e];if(n.cells){const t=eF(n.cells,e);t?(E.push(t),B.push(e+1)):E.push(null)}else E.push(null)}const S=[];for(const e of p)for(const t of e.tables)S.push(t.globalTableIndex);const k=[];for(let e=0;e<t.length;e++){const n=t[e];if(!n.pivotTables||0===n.pivotTables.length)continue;const r=h[e];if(void 0!==r)for(let e=0;e<n.pivotTables.length;e++){const i=n.pivotTables[e],o=i.sourceSheet??n.name,a=t.find(e=>e.name===o);if(!a)throw new Error(`Pivot "${i.name}" sourceSheet "${o}" not found in workbook`);const s=AF(a),l=r+e,c=lF(i,cF(i,o,s),l-1,l);k.push({parts:c,globalIndex:l})}}const F=k.map(e=>e.globalIndex),D=k.map(e=>({rId:`rIdPivot${e.globalIndex}`,target:`pivotCache/pivotCacheDefinition${e.globalIndex}.xml`})),N=k.map((e,t)=>({cacheId:e.globalIndex-1,rId:D[t].rId})),M=new Ek,Q=function(e){if(!e?.custom)return null;const t=Object.entries(e.custom);if(0===t.length)return null;const n=[];let r=2;for(const[e,i]of t){let t;if("string"==typeof i)t=gw("vt:lpwstr",void 0,uw(i));else if("number"==typeof i)t=Number.isInteger(i)?gw("vt:i4",void 0,String(i)):gw("vt:r8",void 0,String(i));else if("boolean"==typeof i)t=gw("vt:bool",void 0,i?"true":"false");else{if(!(i instanceof Date))continue;t=gw("vt:filetime",void 0,mF(i))}n.push(gw("property",{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:r++,name:e},t))}return 0===n.length?null:mw("Properties",{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},n)}(s),T=null!==Q,L=void 0!==e.vbaProject&&e.vbaProject.length>0,R=l.hasCheckboxFeature(),U=p.some(e=>e.hasDynamicArray),H={sheetCount:t.length,hasSharedStrings:g,drawingIndices:y.length>0?y:void 0,chartIndices:I.length>0?I:void 0,imageExtensions:v.size>0?v:void 0,commentIndices:B.length>0?B:void 0,tableIndices:S.length>0?S:void 0,pivotTableIndices:F.length>0?F:void 0,pivotCacheDefinitionIndices:F.length>0?F:void 0,pivotCacheRecordIndices:F.length>0?F:void 0,hasCoreProps:!0,hasAppProps:!0,hasCustomProps:T,hasMacros:L,hasFeaturePropertyBag:R,hasMetadata:U};M.add("[Content_Types].xml",yF.encode(function(e,t){let n;n="number"==typeof e?{sheetCount:e,hasSharedStrings:t??!1}:e;const r=[];if(r.push(hw("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"})),r.push(hw("Default",{Extension:"xml",ContentType:"application/xml"})),n.hasMacros&&r.push(hw("Default",{Extension:"bin",ContentType:"application/vnd.ms-office.vbaProject"})),n.imageExtensions)for(const e of n.imageExtensions){const t=Bk[e];t&&r.push(hw("Default",{Extension:e,ContentType:t}))}r.push(hw("Override",{PartName:"/xl/workbook.xml",ContentType:n.hasMacros?"application/vnd.ms-excel.sheet.macroEnabled.main+xml":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}));for(let e=1;e<=n.sheetCount;e++)r.push(hw("Override",{PartName:`/xl/worksheets/sheet${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"}));if(r.push(hw("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"})),r.push(hw("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"})),n.hasSharedStrings&&r.push(hw("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"})),n.drawingIndices)for(const e of n.drawingIndices)r.push(hw("Override",{PartName:`/xl/drawings/drawing${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"}));if(n.chartIndices)for(const e of n.chartIndices)r.push(hw("Override",{PartName:`/xl/charts/chart${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawingml.chart+xml"}));if(n.commentIndices&&n.commentIndices.length>0&&r.push(hw("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"})),n.commentIndices)for(const e of n.commentIndices)r.push(hw("Override",{PartName:`/xl/comments${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"}));if(n.tableIndices)for(const e of n.tableIndices)r.push(hw("Override",{PartName:`/xl/tables/table${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"}));if(n.threadedCommentSheetIndices)for(const e of n.threadedCommentSheetIndices)r.push(hw("Override",{PartName:`/xl/threadedComments/threadedComment${e}.xml`,ContentType:"application/vnd.ms-excel.threadedcomments+xml"}));if(n.hasPersons&&r.push(hw("Override",{PartName:"/xl/persons/person.xml",ContentType:"application/vnd.ms-excel.person+xml"})),n.externalLinkIndices)for(const e of n.externalLinkIndices)r.push(hw("Override",{PartName:`/xl/externalLinks/externalLink${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml"}));if(n.hasCellImages&&r.push(hw("Override",{PartName:"/xl/cellimages.xml",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})),n.pivotTableIndices)for(const e of n.pivotTableIndices)r.push(hw("Override",{PartName:`/xl/pivotTables/pivotTable${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml"}));if(n.pivotCacheDefinitionIndices)for(const e of n.pivotCacheDefinitionIndices)r.push(hw("Override",{PartName:`/xl/pivotCache/pivotCacheDefinition${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"}));if(n.pivotCacheRecordIndices)for(const e of n.pivotCacheRecordIndices)r.push(hw("Override",{PartName:`/xl/pivotCache/pivotCacheRecords${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml"}));if(n.slicerIndices)for(const e of n.slicerIndices)r.push(hw("Override",{PartName:`/xl/slicers/slicer${e}.xml`,ContentType:"application/vnd.ms-excel.slicer+xml"}));if(n.slicerCacheIndices)for(const e of n.slicerCacheIndices)r.push(hw("Override",{PartName:`/xl/slicerCaches/slicerCache${e}.xml`,ContentType:"application/vnd.ms-excel.slicerCache+xml"}));if(n.timelineIndices)for(const e of n.timelineIndices)r.push(hw("Override",{PartName:`/xl/timelines/timeline${e}.xml`,ContentType:"application/vnd.ms-excel.timeline+xml"}));if(n.timelineCacheIndices)for(const e of n.timelineCacheIndices)r.push(hw("Override",{PartName:`/xl/timelineCaches/timelineCache${e}.xml`,ContentType:"application/vnd.ms-excel.timelineCache+xml"}));if(n.chartStyleIndices)for(const e of n.chartStyleIndices)r.push(hw("Override",{PartName:`/xl/charts/style${e}.xml`,ContentType:"application/vnd.ms-office.chartstyle+xml"}));if(n.chartColorsIndices)for(const e of n.chartColorsIndices)r.push(hw("Override",{PartName:`/xl/charts/colors${e}.xml`,ContentType:"application/vnd.ms-office.chartcolorstyle+xml"}));return n.hasMetadata&&r.push(hw("Override",{PartName:`/${nS}`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml"})),n.hasFeaturePropertyBag&&r.push(hw("Override",{PartName:`/${gB}`,ContentType:"application/vnd.ms-excel.featurepropertybag+xml"})),n.hasCoreProps&&r.push(hw("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"})),n.hasAppProps&&r.push(hw("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"})),n.hasCustomProps&&r.push(hw("Override",{PartName:"/docProps/custom.xml",ContentType:"application/vnd.openxmlformats-officedocument.custom-properties+xml"})),mw("Types",{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},r)}(H))),M.add("_rels/.rels",yF.encode(function(e){const t=[];t.push(hw("Relationship",{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"}));let n=2;return e?.hasCoreProps&&t.push(hw("Relationship",{Id:"rId"+n++,Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"})),e?.hasAppProps&&t.push(hw("Relationship",{Id:"rId"+n++,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Target:"docProps/app.xml"})),e?.hasCustomProps&&t.push(hw("Relationship",{Id:"rId"+n++,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",Target:"docProps/custom.xml"})),mw("Relationships",{xmlns:Sk},t)}({hasCoreProps:!0,hasAppProps:!0,hasCustomProps:T}))),M.add("docProps/core.xml",yF.encode(function(e){const t=[];e?.title&&t.push(gw("dc:title",void 0,uw(e.title))),e?.subject&&t.push(gw("dc:subject",void 0,uw(e.subject))),e?.creator&&t.push(gw("dc:creator",void 0,uw(e.creator))),e?.keywords&&t.push(gw("cp:keywords",void 0,uw(e.keywords))),e?.description&&t.push(gw("dc:description",void 0,uw(e.description))),e?.lastModifiedBy&&t.push(gw("cp:lastModifiedBy",void 0,uw(e.lastModifiedBy))),e?.category&&t.push(gw("cp:category",void 0,uw(e.category))),e?.created&&t.push(gw("dcterms:created",{"xsi:type":"dcterms:W3CDTF"},mF(e.created)));const n=e?.modified??new Date;return t.push(gw("dcterms:modified",{"xsi:type":"dcterms:W3CDTF"},mF(n))),mw("cp:coreProperties",{"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},t)}(s))),M.add("docProps/app.xml",yF.encode(function(e){const t=[];return t.push(gw("Application",void 0,"hucre")),t.push(gw("DocSecurity",void 0,"0")),e?.company&&t.push(gw("Company",void 0,uw(e.company))),e?.manager&&t.push(gw("Manager",void 0,uw(e.manager))),mw("Properties",{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"},t)}(s))),Q&&M.add("docProps/custom.xml",yF.encode(Q));const q=function(e,t){const n=t?[...t]:[];for(const t of e){const e=t.pageSetup;if(!e)continue;e.printArea&&n.push({name:"_xlnm.Print_Area",range:`${t.name}!${e.printArea}`,scope:t.name});const r=[];e.printTitlesRow&&r.push(`${t.name}!${e.printTitlesRow}`),e.printTitlesColumn&&r.push(`${t.name}!${e.printTitlesColumn}`),r.length>0&&n.push({name:"_xlnm.Print_Titles",range:r.join(","),scope:t.name})}return n}(t,i);M.add("xl/workbook.xml",yF.encode(function(e,t,n,r,i,o,a,s,l){const c=[];for(let t=0;t<e.length;t++){const n=e[t],r={name:n.name,sheetId:t+1,"r:id":`rId${t+1}`};n.hidden?r.state="hidden":n.veryHidden&&(r.state="veryHidden"),c.push(hw("sheet",r))}const u=[];if("1904"===n&&u.push(hw("workbookPr",{date1904:1})),i){const e={};i.lockStructure&&(e.lockStructure=1),i.lockWindows&&(e.lockWindows=1),i.password&&(e.workbookPassword=iS(i.password)),u.push(hw("workbookProtection",e))}const f=r??0;if(u.push(gw("bookViews",void 0,[hw("workbookView",{xWindow:0,yWindow:0,windowWidth:16384,windowHeight:8192,activeTab:f})])),u.push(gw("sheets",void 0,c)),o&&o.length>0){const e=o.map(e=>hw("externalReference",{"r:id":e.rId}));u.push(gw("externalReferences",void 0,e))}if(t&&t.length>0){const n=new Map;for(let t=0;t<e.length;t++)n.set(e[t].name,t);const r=[];for(const e of t){const t={name:e.name};if(void 0!==e.scope){const r=n.get(e.scope);void 0!==r&&(t.localSheetId=r)}e.comment&&(t.comment=e.comment),r.push(gw("definedName",t,uw(e.range)))}u.push(gw("definedNames",void 0,r))}if(u.push(hw("calcPr",{calcId:0,fullCalcOnLoad:1})),a&&a.length>0){const e=a.map(e=>hw("pivotCache",{cacheId:e.cacheId,"r:id":e.rId}));u.push(gw("pivotCaches",void 0,e))}const d=[];if(s&&s.length>0){const e=gw("x14:slicerCaches",void 0,s.map(e=>hw("x14:slicerCache",{"r:id":e.rId})));d.push(gw("ext",{uri:"{BBE1A952-AA13-448E-AADC-164F8A28A991}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},[e]))}if(l&&l.length>0){const e=gw("x15:timelineCachePivotCaches",void 0,l.map(e=>hw("x15:timelineCachePivotCache",{"r:id":e.rId})));d.push(gw("ext",{uri:"{7E03D99C-DC04-49D9-9315-930204A7B6E9}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},[e]))}return d.length>0&&u.push(gw("extLst",void 0,d)),mw("workbook",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},u)}(t,q.length>0?q:void 0,r,o,a,void 0,N.length>0?N:void 0))),M.add("xl/_rels/workbook.xml.rels",yF.encode(function(e,t,n,r,i,o,a,s,l,c,u){const f=[];for(let t=1;t<=e;t++)f.push(hw("Relationship",{Id:`rId${t}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:`worksheets/sheet${t}.xml`}));let d=e+1;if(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"})),d++,t&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"})),d++),f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"})),d++,u&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",Target:"metadata.xml"})),d++),n&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.microsoft.com/office/2006/relationships/vbaProject",Target:"vbaProject.bin"})),d++),r&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.microsoft.com/office/2022/11/relationships/FeaturePropertyBag",Target:"featurePropertyBag/featurePropertyBag.xml"})),d++),i&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.microsoft.com/office/2017/10/relationships/person",Target:"persons/person.xml"})),d++),o){for(const e of o)f.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",Target:e.target}));d+=o.length}if(c&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://www.wps.cn/officeDocument/2017/relationships/cellimage",Target:"cellimages.xml"})),d++),a)for(const e of a)f.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition",Target:e.target}));if(s)for(const e of s)f.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.microsoft.com/office/2007/relationships/slicerCache",Target:e.target}));if(l)for(const e of l)f.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.microsoft.com/office/2011/relationships/timelineCache",Target:e.target}));return mw("Relationships",{xmlns:Sk},f)}(t.length,g,L,R,void 0,void 0,D.length>0?D:void 0,void 0,void 0,void 0,U))),M.add("xl/styles.xml",yF.encode(l.toXml())),M.add("xl/theme/theme1.xml",yF.encode('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light"/><a:ea typeface=""/><a:cs typeface=""/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="12700"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="19050"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements></a:theme>')),g&&M.add("xl/sharedStrings.xml",yF.encode(function(e){const t=e.getAll(),n=t.length;if(0===n)return mw("sst",{xmlns:uS,count:0,uniqueCount:0},"");const r=[];for(const e of t)r.push(gw("si",void 0,[pw(e)]));return mw("sst",{xmlns:uS,count:n,uniqueCount:n},r)}(c))),U&&M.add(nS,yF.encode(function(){const e=hw("metadataType",{name:eS,minSupportedVersion:12e4,copy:1,pasteAll:1,pasteValues:1,merge:1,splitFirst:1,rowColShift:1,clearFormats:1,clearComments:1,assign:1,coerce:1,cellMeta:1}),t=gw("bk",void 0,[gw("extLst",void 0,[gw("ext",{uri:tS},[hw("xda:dynamicArrayProperties",{fDynamic:1,fCollapsed:0})])])]),n=gw("bk",void 0,[hw("rc",{t:1,v:0})]);return mw("metadata",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:xda":"http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray"},[gw("metadataTypes",{count:1},[e]),gw("futureMetadata",{name:eS,count:1},[t]),gw("cellMetadata",{count:1},[n])])}())),R&&M.add(gB,yF.encode(function(){const e=[hw("bag",{type:"Checkbox"}),gw("bag",{type:"XFControls"},[gw("bagId",{k:"CellControl"},"0")]),gw("bag",{type:"XFComplement"},[gw("bagId",{k:"XFControls"},"1")]),gw("bag",{type:"XFComplements",extRef:"XFComplementsMapperExtRef"},[gw("a",{k:"MappedFeaturePropertyBags"},[gw("bagId",void 0,"2")])])];return mw("FeaturePropertyBags",{xmlns:hB},e)}())),L&&M.add("xl/vbaProject.bin",e.vbaProject);for(let e=0;e<p.length;e++){const n=p[e],r=m[e],i=E[e];M.add(`xl/worksheets/sheet${e+1}.xml`,yF.encode(n.xml));const o=n.hyperlinkRelationships.length>0,a=null!==r&&null!==n.drawingRId,s=null!==i&&null!==n.legacyDrawingRId,l=n.tables.length>0,c=null!==n.pictureRId&&null!==x[e],u=n.pivotTables.length>0;if(o||a||s||l||c||u){const t=[];for(const e of n.hyperlinkRelationships)t.push(hw("Relationship",{Id:e.id,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Target:e.target,TargetMode:"External"}));a&&n.drawingRId&&t.push(hw("Relationship",{Id:n.drawingRId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/drawing${e+1}.xml`})),s&&n.legacyDrawingRId&&n.commentsRId&&(t.push(hw("Relationship",{Id:n.legacyDrawingRId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Target:`../drawings/vmlDrawing${e+1}.vml`})),t.push(hw("Relationship",{Id:n.commentsRId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",Target:`../comments${e+1}.xml`})));for(const e of n.tables)t.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",Target:`../tables/table${e.globalTableIndex}.xml`}));if(c&&n.pictureRId&&x[e]){const r=`../${x[e].slice(3)}`;t.push(hw("Relationship",{Id:n.pictureRId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:r}))}for(const e of n.pivotTables)t.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable",Target:`../pivotTables/pivotTable${e.globalPivotIndex}.xml`}));const r=mw("Relationships",{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},t);M.add(`xl/worksheets/_rels/sheet${e+1}.xml.rels`,yF.encode(r))}if(r){M.add(`xl/drawings/drawing${e+1}.xml`,yF.encode(r.drawingXml)),M.add(`xl/drawings/_rels/drawing${e+1}.xml.rels`,yF.encode(r.drawingRels));for(const e of r.images)M.add(e.path,e.data,{compress:!1})}const f=w[e];if(f&&f.length>0)for(const e of f)M.add(`xl/charts/chart${e.globalIndex}.xml`,yF.encode(e.xml)),M.add(`xl/charts/_rels/chart${e.globalIndex}.xml.rels`,yF.encode(e.rels));c&&x[e]&&t[e].backgroundImage&&M.add(x[e],t[e].backgroundImage,{compress:!1}),i&&(M.add(`xl/comments${e+1}.xml`,yF.encode(i.commentsXml)),M.add(`xl/drawings/vmlDrawing${e+1}.vml`,yF.encode(i.vmlXml)));const d=t[e];if(d.tables&&d.tables.length>0)for(let e=0;e<d.tables.length;e++){const t=d.tables[e],r=n.tables[e].globalTableIndex;let i=t.range;i||(i=nF(t,d));const o=tF({...t,range:i},r);M.add(`xl/tables/table${r}.xml`,yF.encode(o.tableXml))}}for(const e of k){const t=e.globalIndex;M.add(`xl/pivotCache/pivotCacheDefinition${t}.xml`,yF.encode(e.parts.cacheDefinitionXml)),M.add(`xl/pivotCache/_rels/pivotCacheDefinition${t}.xml.rels`,yF.encode(e.parts.cacheDefinitionRels)),M.add(`xl/pivotCache/pivotCacheRecords${t}.xml`,yF.encode(e.parts.cacheRecordsXml)),M.add(`xl/pivotTables/pivotTable${t}.xml`,yF.encode(e.parts.pivotTableXml)),M.add(`xl/pivotTables/_rels/pivotTable${t}.xml.rels`,yF.encode(e.parts.pivotTableRels))}const O=await M.build(),P=e.encryption;return P?.password?aE(O,P.password,{spinCount:P.spinCount}):O}function AF(e){if(e.rows&&e.rows.length>0)return e.rows.map(e=>e.map(lS));if(e.data&&e.data.length>0&&e.columns&&e.columns.length>0){const t=[],n=e.columns.map(e=>e.header??e.key??"");t.push(n);for(const n of e.data){const r=e.columns.map(e=>{if(!e.key)return null;const t=n[e.key];return void 0===t?null:WB(t)});t.push(r)}return t}return[]}async function bF(e){if(!Be(e))return{error:"wb is not an effective object"};if(!Ce(Ae(e,"sheets")))return{error:"wb.sheets is not an array"};let t=null;try{t=await vF(e)}catch(e){return{error:e}}return t}async function wF(e,t="data",n){if(!ke(e)){let t="no filename";return console.log(t,e),{error:t}}if(ke(t)||(t="data"),!Ce(n)){let e="data is not an array";return console.log(e,n),{error:e}}Ce(n)&&Be(Ae(n,0,null))&&(n=lr(n));let r=pb(n,t);if(Me(r,"error"))return console.log(r.error),r;let i=await bF(r);if(Me(i,"error"))return console.log(i.error),i;if(_a())db(e,new Blob([i]));else{let t="fs";(await import(t)).default.writeFileSync(e,i)}}function IF(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Blob;if(!as(e))return r("invalid u8a");let i=null;try{i=new Blob([e])}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function xF(e,t,n=""){if(!Mn(t))return{};let r={};return vn(t,function(t){r[t]=Ae(e,t,n)}),r}function CF(e,t){if(!Ee(e))return{};if(!Mn(t))return{};let n={};return vn(t,function(t){Me(e,t)&&(n[t]=Ae(e,t))}),n}function EF(e,t=0,n={}){po(t)||(t=0),t=ji(t);let r=Ae(n,"rounding","");return"ROUND_HALF_UP"!==r&&"ROUND_HALF_EVEN"!==r&&(r="ROUND_HALF_UP"),Ne(e)?new Jl(e).toDecimalPlaces(t,Jl[r]).toNumber():""}function BF(e,t={}){if(!Ne(e))throw new Error("v is not a number");let n=Ae(t,"returnDigit");if(we(n)||(n=!1),xr(e))return n?0:Na(e);let r=null,i=null;for(let t=1;t<=16;t++){let n=e*Math.pow(10,t);if(Math.abs(n-Math.round(n))<1e-9){r=t,i=Xl(e,t);break}}return null===i&&(r=16,i=Na(e)),n?r:i}let SF=e=>{let t=1;e<0&&(t=-1);let n=null;if((e=Math.abs(e))<.1)for(let r=1;r<16;r++){let i=Math.pow(10,r);if((e*=i)<1){n={r:1/i,v:t*e};break}}else{if(e<1)return{r:1,v:t*e};if(e>=1)for(let r=1;r<16;r++){let i=Math.pow(10,r);if((e/=i)<1){n={r:i,v:t*e};break}}}if(null===n)throw new Error(`can not normalize v[${e}]`);return n};function kF(e,t,n={}){if(!ke(e))return"";if(!po(t))return e;if(t=ji(t),e.length<=t)return e;let r=Ae(n,"funWithMsg"),i="";if(Ui(r)){let n=r(e,t);ke(n)&&(i=n)}return ta(e,t)+`...${i}`}function FF(e){let t=Ga();return i(Number(e),"SIGKILL",n=>{n?t.reject(n):t.resolve(`pid[${e}] killed`)}),t}function DF(e,t={}){let n=Ae(t,"fs"),r=!1;try{n.statSync(e),r=!0}catch{r=!1}return r}function NF(e,t={}){let n=Ae(t,"fs");return!!DF(e,{fs:n})&&(!n.lstatSync(e).isDirectory()&&!n.lstatSync(e).isSymbolicLink())}function MF(e){return NF(e,{fs:a})}function QF(e,t={}){let n=null,r=Ae(t,"fs"),i="";try{i=r.readFileSync(e,"utf8")}catch(e){n=e}return null!==n?{error:n}:{success:i}}function TF(e){return QF(e,{fs:a})}let LF={buildSpawnArgs:function(e,t=[]){if(Ce(t)||(t=[]),"win32"!==process.platform)return{file:e,args:t,opt:{}};let n=function(e){if("win32"!==process.platform)return e;if(/\.(cmd|exe|bat|ps1)$/i.test(e))return e;if(o.isAbsolute(e))return e;try{let t=r.execFileSync("where",[e],{encoding:"utf8",timeout:5e3,windowsHide:!0,shell:!1,stdio:["ignore","pipe","ignore"]}).trim().split(/\r?\n/),n=t.find(e=>/\.cmd$/i.test(e));return n||(t.find(e=>/\.exe$/i.test(e))||t[0]||e)}catch{return e}}(e);if(/\.exe$/i.test(n))return{file:n,args:t,opt:{}};if(/\.(cmd|bat)$/i.test(n)){let e=function(e){let t=Ae(TF(e),"success","");if(!ke(t))return null;let n=t.match(/%dp0%\\(node_modules\\[^"]+)"/i);if(!n)return null;let r=o.dirname(e),i=o.join(r,n[1]);return MF(i)?i:null}(n);if(e)return/\.exe$/i.test(e)?{file:e,args:t,opt:{}}:{file:process.execPath,args:[e,...t],opt:{}};let r=t.map(e=>`"${e.replace(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`.replace(/[()%!^"<>&|]/g,"^$&")),a=`${i=n,i.replace(/[()%!^"<>&|;, ]/g,"^$&")} ${r.join(" ")}`;return{file:process.env.comspec||process.env.COMSPEC||"cmd.exe",args:["/d","/s","/c",`"${a}"`],opt:{windowsVerbatimArguments:!0}}}var i;return{file:n,args:t,opt:{}}},buildSpawnEnv:function(e=void 0){let t={...process.env,PYTHONIOENCODING:"utf-8"};if(void 0!==e){if("win32"===process.platform){let n=Object.keys(e).map(e=>e.toLowerCase());for(let e of Object.keys(t))n.includes(e.toLowerCase())&&delete t[e]}t={...t,...e}}return t}},{buildSpawnArgs:RF,buildSpawnEnv:UF}=LF,HF={funWithMsg:e=>`(truncated, total ${e.length} chars)`};function qF(e,t=[],n={}){let{timeoutMs:i=12e4,cwd:o=process.cwd(),input:a,validate:s,maxBuffer:l=10485760,onStdout:c,onStderr:u,env:f}=n,d=function(e){if(Ui(e))return e;if(!ke(e))return null;let t=e.split(",").map(e=>e.trim()).filter(Boolean);return 0===t.length?null:e=>{for(let n of t)if("nonempty"===n){if(!ke(e)||""===e.trim())return!1}else if("json"===n)try{JSON.parse(e)}catch{return!1}else if("min:"===ta(n,4)){let t=ra(n,4);if(!Ne(t))return!1;let r=ji(t);if(!ke(e)||e.length<r)return!1}return!0}}(s),h=Date.now(),p=Ga(),g=UF(f),m=RF(e,t),y=r.spawn(m.file,m.args,{cwd:o,stdio:["pipe","pipe","pipe"],windowsHide:!0,env:g,...m.opt}),v="",A="",b=new TextDecoder("utf-8"),w=new TextDecoder("utf-8"),I=!1,x=!1;y.stdout.on("data",e=>{let t=b.decode(e,{stream:!0});t&&(Ui(c)&&c(t),v.length<l&&(v+=t))}),y.stderr.on("data",e=>{let t=w.decode(e,{stream:!0});t&&(Ui(u)&&u(t),A.length<l&&(A+=t))}),y.stdin.on("error",()=>{}),void 0!==a&&y.stdin.write(a,"utf8"),y.stdin.end();let C=setTimeout(()=>{I||(x=!0,FF(y.pid).catch(()=>{}),setTimeout(()=>{I||(I=!0,p.resolve({ok:!1,stdout:kF(v,500,HF),stderr:kF(A,500,HF),code:null,error:`TIMEOUT after ${i/1e3}s(子進程未能結束)`,durationMs:Date.now()-h,pid:y.pid}))},3e3).unref())},i);return y.on("error",e=>{I||(I=!0,clearTimeout(C),p.resolve({ok:!1,stdout:"",stderr:"",code:null,error:`${e.code||"UNKNOWN"}: ${e.message}`,durationMs:Date.now()-h,pid:y.pid}))}),y.on("close",(e,t)=>{if(I)return;I=!0,clearTimeout(C);let n=b.decode();n&&v.length<l&&(v+=n);let r=w.decode();r&&A.length<l&&(A+=r);let o=Date.now()-h;x?p.resolve({ok:!1,stdout:kF(v,500,HF),stderr:kF(A,500,HF),code:e,error:`TIMEOUT after ${i/1e3}s`,durationMs:o,pid:y.pid}):0===e?!d||d(v)?p.resolve({ok:!0,stdout:v,stderr:A,code:0,error:"",durationMs:o,pid:y.pid}):p.resolve({ok:!1,stdout:kF(v,500,HF),stderr:kF(A,500,HF),code:0,error:"OUTPUT_VALIDATION_FAILED",durationMs:o,pid:y.pid}):p.resolve({ok:!1,stdout:kF(v,500,HF),stderr:kF(A,1e3,HF),code:e,error:t?`Signal: ${t}`:`Exit code ${e}`,durationMs:o,pid:y.pid})}),p}let{buildSpawnArgs:OF,buildSpawnEnv:PF}=LF;function $F(e,t=[],n={}){Ce(t)||(t=[]),Ee(n)||(n={});let i=Ae(n,"cwd");ke(i)||(i=process.cwd());let o=Ae(n,"env");Ee(o)||(o=void 0);let a=Ae(n,"timeoutMs");Vi(a)||(a=null);let s=Ae(n,"exitGraceMs");po(s)||(s=2e3);let l=Ae(n,"killWaitMs");po(l)||(l=3e3);let c=Ae(n,"stderrKeep");po(c)||(c=4e3);let u=Ae(n,"onLine"),f=Ae(n,"onStdout"),d=Ae(n,"onStderr"),h=Ae(n,"onExit"),p=Date.now(),g=!1,m=null,y=!1,v=!1,A=!1,b="",w="",I=null,x=null,C=null,E=Ga(),B=null,S={pid:null,exited:!1,write:null,writeLine:null,stop:null},k=e=>{g||(g=!0,clearTimeout(I),clearTimeout(x),clearTimeout(C),m={code:null,signal:null,exited:!0,timeout:y,killed:v,error:"",stderr:b,durationMs:Date.now()-p,pid:S.pid,...e},S.exited=!0,Ui(h)&&h(m),E.resolve(m))},F=()=>B||(B=Ga(),E.then(e=>{B.resolve(e)}),B);if(!ke(e))return S.write=async()=>!1,S.writeLine=async()=>!1,S.stop=F,setTimeout(()=>{k({error:"command 須為非空字串"})},1),S;let D,N=OF(e,t);try{D=r.spawn(N.file,N.args,{cwd:i,stdio:["pipe","pipe","pipe"],windowsHide:!0,env:PF(o),...N.opt})}catch(e){return S.write=async()=>!1,S.writeLine=async()=>!1,S.stop=F,setTimeout(()=>{k({error:`${e.code||"UNKNOWN"}: ${e.message}`})},1),S}S.pid=D.pid||null;let M=new TextDecoder("utf-8"),Q=new TextDecoder("utf-8"),T=(e,t)=>{w+=e;let n=w.indexOf("\n");for(;n>=0;){let e=w.slice(0,n);w=w.slice(n+1),e.endsWith("\r")&&(e=e.slice(0,-1)),Ui(u)&&u(e),n=w.indexOf("\n")}if(t&&""!==w){let e=w;w="",e.endsWith("\r")&&(e=e.slice(0,-1)),Ui(u)&&u(e)}},L=e=>{b=0!==c?(b+e).slice(-c):""};D.stdout.on("data",e=>{let t=M.decode(e,{stream:!0});t&&(Ui(f)&&f(t),T(t,!1))}),D.stderr.on("data",e=>{let t=Q.decode(e,{stream:!0});t&&(Ui(d)&&d(t),L(t))}),D.stdin.on("error",()=>{});let R=e=>{v=!0,FF(D.pid).catch(()=>{}),C=setTimeout(()=>{g||k({code:null,exited:!1,error:e})},l)};return null!==a&&(I=setTimeout(()=>{g||(y=!0,R(`TIMEOUT after ${a/1e3}s(子進程未能結束)`))},a)),D.on("error",e=>{k({error:`${e.code||"UNKNOWN"}: ${e.message}`})}),D.on("close",(e,t)=>{if(g)return;let n=M.decode();n&&(Ui(f)&&f(n),T(n,!1)),T("",!0);let r=Q.decode();r&&(Ui(d)&&d(r),L(r));let i="";y?i=`TIMEOUT after ${a/1e3}s`:v||(t?i=`Signal: ${t}`:0!==e&&(i=`Exit code ${e}`)),k({code:e,signal:t,error:i})}),S.write=e=>{let t=Ga();if(g||A||D.stdin.destroyed||!D.stdin.writable)return t.resolve(!1),t;try{D.stdin.write(String(e),"utf8",e=>{t.resolve(!e)})}catch{t.resolve(!1)}return t},S.writeLine=e=>S.write(String(e)+"\n"),S.stop=()=>{if(B)return B;if(B=Ga(),g)return B.resolve(m),B;A=!0;try{D.stdin.end()}catch{}return x=setTimeout(()=>{g||R("STOP_TIMEOUT(子進程未能結束)")},s),E.then(e=>{B.resolve(e)}),B},S}function zF(e,t){return e>t}function jF(e){return e&&e.length?Om(e,un,zF):void 0}function VF(e){return null==e?[]:function(e,t){return fe(t,function(t){return e[t]})}(e,ht(e))}function YF(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function WF(e,t,n,r){return gt(e,function(e,i,o){t(r,e,n(e),o)}),r}var GF,JF,_F=Object.prototype.hasOwnProperty,XF=(GF=function(e,t,n){_F.call(e,n)?e[n].push(t):ei(e,n,[t])},function(e,t){var n=y(e)?YF:WF,r=JF?JF():{};return n(e,GF,hn(t),r)}),KF=XF;function ZF(e,t){if(!Ce(e)||!Ce(t))return[];if(e.length!==t.length)return[];return bn(e,function(n,r){return zy(e[r],t[r])})}function eD(e,t={}){let n=Ae(t,"fs");if(!DF(e,{fs:n}))return!1;let r=n.lstatSync(e);return!r.isFile()&&!r.isSymbolicLink()}function tD(e,t={}){let n=Ae(t,"fs");if(eD(e,{fs:n}))return{success:"input folder is already exists: "+e};if(DF(e,{fs:n}))return{error:"input path already exists: "+e};try{n.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function nD(e,t={}){let n=Ae(t,"path"),r=Ae(t,"fs");if(!DF(e,{fs:r})){let t=tD(e,{fs:r});return t.error?t.error:{success:"done: "+e}}if(!eD(e,{fs:r}))return{error:"input path is not a folder"};try{let t=r.readdirSync(e);for(let i of t){let t=n.join(e,i);r.statSync(t).isDirectory()?r.rmSync(t,{recursive:!0,force:!0}):r.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}function rD(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"useSync","");we(o)||(o=!0);let a="";return a=o?function(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!NF(e,{fs:i}))return{error:`fpSrc[${e}] is not a file`};try{tD(r.dirname(t),{fs:i}),i.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:r,fs:i}):async function(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!NF(e,{fs:i}))return{error:`fpSrc[${e}] is not a file`};let o=null;return await(async(e,t)=>{tD(r.dirname(t),{fs:i}),await new Promise((n,r)=>{let o=i.createReadStream(e),a=i.createWriteStream(t);o.on("error",r),a.on("error",r),a.on("finish",n),o.pipe(a)})})(e,t).then(()=>{o={success:"done: "+t}}).catch(e=>{o={error:e}}),o}(e,t,{path:r,fs:i}),a}function iD(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!eD(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};try{i.readdirSync(e).forEach(function(n){let o=r.resolve(e,n),a=r.resolve(t,n),s=i.lstatSync(o);if(s.isDirectory())tD(a,{fs:i}),iD(o,a,{path:r,fs:i});else if(s.isSymbolicLink()){let e=i.readlinkSync(o);i.symlinkSync(e,a)}else tD(r.dirname(a),{fs:i}),i.copyFileSync(o,a)})}catch(e){return{error:e}}return{success:"done: "+t}}function oD(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"useSync","");we(o)||(o=!0);let a="";return a=o?iD(e,t,{path:r,fs:i}):async function(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!eD(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};let o=async(e,t)=>{let n=i.readdirSync(e);for(let a of n){let n=r.join(e,a),s=r.join(t,a),l=i.lstatSync(n);if(l.isDirectory())tD(s,{fs:i}),await o(n,s);else if(l.isSymbolicLink()){let e=i.readlinkSync(n);i.symlinkSync(e,s)}else tD(r.dirname(s),{fs:i}),await new Promise((e,t)=>{let r=i.createReadStream(n),o=i.createWriteStream(s);r.on("error",t),o.on("error",t),o.on("finish",e),r.pipe(o)})}},a=null;return await o(e,t).then(()=>{a={success:"done: "+t}}).catch(e=>{a={error:e}}),a}(e,t,{path:r,fs:i}),a}function aD(e){if(!ke(e))return{path:"",isRoot:!1};for(;e.indexOf("\\\\")>=0;)e=e.replace("\\\\","\\");for(;e.indexOf("//")>=0;)e=e.replace("//","/");if(":"===na(e,1))return{path:`${e}\\`,isRoot:!0};if("\\"===na(e,1)){let t=Qa(e,1);return":"===na(t,1)?{path:e,isRoot:!0}:{path:t,isRoot:!1}}if("/"===na(e,1)){let t=Qa(e,1);return 0===t.length?{path:e,isRoot:!0}:{path:t,isRoot:!1}}return{path:e,isRoot:!1}}function sD(e){if(!ke(e))return"";let t=aD(e);if(t.isRoot)return t.path;let n=t.path;try{n=n.split("\\").pop().split("/").pop()}catch(e){}return n}function lD(e){if(!ke(e))return"";let t=aD(e);if(t.isRoot)return t.path;let n=sD(e=t.path);if(!ke(n))return e;let r=aD(e=Qa(e,n.length));return r.isRoot,r.path}function cD(e,t="",n={}){let r=Ae(n,"fs"),i=Ae(n,"encoding","");if(ke(i)||(i="utf8"),DF(e,{fs:r}))return{error:"input path already exists: "+e};if(NF(e,{fs:r}))return{error:"input file is already exists: "+e};let o=lD(e);eD(o,{fs:r})||tD(o,{fs:r});try{r.writeFileSync(e,t,{encoding:i})}catch(e){return{error:e}}return{success:"done: "+e}}function uD(e){return tD(e,{fs:a})}function fD(e,t={}){let n=Ae(t,"fs");if(!DF(e,{fs:n}))return{success:"file does not exist: "+e};if(!NF(e,{fs:n}))return{error:"input path is not a file: "+e};try{n.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}async function dD(e,t={}){let n=Ae(t,"numRetry");Vi(n)||(n=5),n=ji(n);let r=Ae(t,"fs",null);if(!DF(e,{fs:r}))return"file does not exist: "+e;if(!NF(e,{fs:r}))return Promise.reject("input path is not a file: "+e);for(let t=0;t<n;t++)try{r.unlinkSync(e);break}catch(e){if("EBUSY"!==e.code)return Promise.reject(e);await fs(300)}return"done: "+e}function hD(e,t={}){let n=Ae(t,"fs");if(!DF(e,{fs:n}))return{success:"folder does not exist: "+e};if(!eD(e,{fs:n}))return{error:"input path is not a folder: "+e};try{n.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function pD(e){return hD(e,{fs:a})}async function gD(e,t={}){let n=Ae(t,"numRetry");Vi(n)||(n=5),n=ji(n);let r=Ae(t,"fs",null);if(!DF(e,{fs:r}))return"folder does not exist: "+e;if(!eD(e,{fs:r}))return Promise.reject("input path is not a folder: "+e);for(let t=0;t<n;t++)try{r.rmSync(e,{recursive:!0,force:!0});break}catch(e){if("EBUSY"!==e.code)return Promise.reject(e);await fs(300)}return"done: "+e}async function mD(e,t,n={}){let r="",i=Ae(n,"fs"),o=Ae(n,"Readable");if(!ke(e))throw new Error("urlIn in not an effective string");let a=lD(t),s=Ae(n,"fnOut","");ke(s)||(s=sD(t)),eD(a,{fs:i})||tD(a,{fs:i});let l=Ga();try{let n=await fetch(e);if(!n.ok)return l.reject(n.statusText),l;let a=i.createWriteStream(t);o.fromWeb(n.body).pipe(a),a.on("finish",()=>{l.resolve(t)}),a.on("error",e=>{r=e.message,l.reject(r)})}catch(e){r=e.message,l.reject(r)}return l}function yD(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYY-MM-DDTHH:mm:ssZ")}function vD(e){if(!ke(e))return"";let t=sD(e),n=Lo(t,".");if(or(n)<=1)return t;let r="";try{n=Ro(n),r=yo(n,".")}catch(e){}return r}function AD(e){return eD(e,{fs:a})}function bD(e,t={}){let n=Ae(t,"polling");we(n)||(n=!1);let r=Ae(t,"timeInterval");Vi(r)||(r=100),r=ji(r);let i=Ae(t,"timeBinaryInterval");Vi(i)||(i=300),i=ji(i);let a=qi({type:"safe"}),s=e,l=null,c=setInterval(()=>{null===l?AD(s)&&(l=u.watch(s,{usePolling:n,interval:r,binaryInterval:i,awaitWriteFinish:!0}),l.on("all",(e,t,n)=>{t=o.resolve(t),a.emit("change",{type:e,fp:t,stats:n}),"unlinkDir"===e&&o.resolve(s)===t&&setTimeout(()=>{f()},1)}).on("error",e=>{a.emit("error",{fun:"watcher",msg:e})})):AD(s)||(a.emit("change",{type:"unlinkDir",fp:o.resolve(s),stats:void 0}),setTimeout(()=>{f()},1))},r),f=()=>{if(null!==l){try{l.unwatch(s)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}};return a.clear=()=>{f(),clearInterval(c)},a}function wD(e,t={}){let n=Ae(t,"fs"),r=Ae(t,"crypto"),i=Ae(t,"type","");ke(i)||(i="sha512");let o=Ga();if(!NF(e,{fs:n}))return o.reject(`fp[${e}] is not a file`),o;try{let t=r.createHash(i),a=n.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 ID=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 xD(){return function(e){const{exports:{mem:t,xxh32:n,xxh64:r,init32:i,update32:o,digest32:a,init64:s,update64:l,digest64:c}}=e;let u=new Uint8Array(t.buffer);function f(e,n){if(t.buffer.byteLength<e+n){const r=Math.ceil((e+n-t.buffer.byteLength)/65536);t.grow(r),u=new Uint8Array(t.buffer)}}function d(e,t,n,r,i,o){f(e);const a=new Uint8Array(e);return u.set(a),n(0,t),a.set(u.subarray(0,e)),{update(t){let n;return u.set(a),"string"==typeof t?(f(3*t.length,e),n=m.encodeInto(t,u.subarray(e)).written):(f(t.byteLength,e),u.set(t,e),n=t.byteLength),r(0,e,n),a.set(u.subarray(0,e)),this},digest:()=>(u.set(a),o(i(0)))}}function h(e){return e>>>0}const p=2n**64n-1n;function g(e){return e&p}const m=new TextEncoder;function y(e,t=0){return f(3*e.length,0),h(n(0,m.encodeInto(e,u).written,t))}function v(e,t=0n){return f(3*e.length,0),g(r(0,m.encodeInto(e,u).written,t))}return{h32:y,h32ToString:(e,t=0)=>y(e,t).toString(16).padStart(8,"0"),h32Raw:(e,t=0)=>(f(e.byteLength,0),u.set(e),h(n(0,e.byteLength,t))),create32:(e=0)=>d(48,e,i,o,a,h),h64:v,h64ToString:(e,t=0n)=>v(e,t).toString(16).padStart(16,"0"),h64Raw:(e,t=0n)=>(f(e.byteLength,0),u.set(e),g(r(0,e.byteLength,t))),create64:(e=0n)=>d(88,e,s,l,c,g)}}((await WebAssembly.instantiate(ID)).instance)}async function CD(e,t={}){let n=Ae(t,"fs"),r=Ae(t,"chunkSize");if(Ne(r)||(r=67108864),r=Ir(r),!NF(e,{fs:n}))return Promise.reject("fp is not a file");let i=Ga();try{let{create64:t}=await xD(),o=t(),a=n.createReadStream(e,{highWaterMark:r});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 ED(e,t={}){let n=Ae(t,"fs"),r=Ae(t,"crypto"),i=Ae(t,"type","");ke(i)||(i="sha512");let o=Ae(t,"chunkSize");Ne(o)||(o=67108864),o=Ir(o);let a=Ga();return NF(e,{fs:n})?"xxhash64"===i?CD(e,{fs:n,chunkSize:o}):wD(e,{fs:n,crypto:r,type:i}):(a.reject(`fp[${e}] is not a file`),a)}function BD(e,t=1,n={}){let r=1,i=Ae(n,"path"),o=Ae(n,"fs");if(!eD(e,{fs:o}))throw new Error(`fd[${e}] is not a folder`);return null!==t&&Vi(t)&&(t=ji(t))<1&&(t=1),function e(n){let a=[];return eD(n,{fs:o})?(vn(o.readdirSync(n),function(s){let l=i.resolve(n,s),c=null;try{c=o.statSync(l)}catch(e){}c&&c.isDirectory()?(a.push({isFolder:!0,level:r,path:l,name:i.basename(l)}),r+=1,(r<=t||null===t)&&(a=a.concat(e(l))),r-=1):a.push({isFolder:!1,level:r,path:l,name:i.basename(l)})}),a):a}(e)}function SD(e,t=1,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!eD(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let o=[];return o=BD(e,t,{path:r,fs:i}),o=oa(o,{isFolder:!1}),o=bn(o,e=>(delete e.isFolder,e)),o}async function kD(e,t=1,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"crypto"),a=Ae(n,"type","");if(ke(a)||(a="md5"),!eD(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let s=SD(e,t,{path:r,fs:i});return s=await ec(s,async e=>{let t=Ae(e,"path","");return e.hashType=a,e.hash="",ke(t)&&(e.hash=await ED(t,{fs:i,crypto:o,type:a,useSync:!1})),e}),s}async function FD(e,t=1,n={}){return kD(e,t,{path:o,fs:a,crypto:f,...n})}async function DD(e,t={}){let n=Ae(t,"path"),r=Ae(t,"fs"),i=Ae(t,"crypto"),o=Ae(t,"type","");ke(o)||(o="md5");let a=[],s=BD(e,null,{path:n,fs:r});return await ec(s,async e=>{if(e.isFolder)return;let t=await wD(e.path,{fs:r,crypto:i,type:o});a.push(t)}),yo(a,"|")}function ND(e,t=1,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!eD(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let o=[];return o=BD(e,t,{path:r,fs:i}),o=oa(o,{isFolder:!0}),o=bn(o,e=>(delete e.isFolder,e)),o}async function MD(e,t,n={}){let r="",i=Ae(n,"fs");if(!Mn(e))throw new Error("fpsIn in not an effective array");let o=lD(t),a=Ae(n,"fnOut","");ke(a)||(a=sD(t)),eD(o,{fs:i})||tD(o,{fs:i});let s=Ga();s.catch(()=>{});let l=null,c=null,u=Ga();u.catch(()=>{});try{l=i.createWriteStream(t),l.on("error",e=>{c=e,r=e.message,u.reject(e),s.reject(r)}),l.on("finish",()=>{let e={filename:a,path:t};s.resolve(e)});for(let t=0;t<e.length;t++){if(null!==c)throw c;let n=e[t];if(!NF(n,{fs:i}))throw new Error(`fpIn[${n}] is not a file`);let r=async()=>{let e=i.createReadStream(n),t=null;for await(let n of e){if(null!==c)throw c;let e=!1,r=new Promise((t,r)=>{e=!l.write(n,e=>{e?r(e):t()})});r.catch(()=>{}),t=r,e&&await Promise.race([d.once(l,"drain"),u])}if(null!==t&&await t,null!==c)throw c;fD(n,{fs:i})};await r()}l.end()}catch(e){r=Ae(e,"message",String(e));try{l.destroy()}catch(e){}s.reject(r)}return s}function QD(e,t,n={}){let r=Ae(n,"fs");if(!NF(e,{fs:r}))return{error:`pahOld[${e}] is not a file`};if(DF(t,{fs:r}))return{error:`pahNew[${t}] already exists`};let i=lD(t);eD(i,{fs:r})||tD(i,{fs:r});try{r.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}function TD(e,t,n={}){let r=Ae(n,"fs");if(!eD(e,{fs:r}))return{error:`pahOld[${e}] is not a folder`};if(DF(t,{fs:r}))return{error:`pahNew[${t}] already exists`};let i=lD(t);eD(i,{fs:r})||tD(i,{fs:r});try{r.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}function LD(e,t,n,r={}){let i=Ae(r,"withInfor");we(i)||(i=!0);let o={del:[],add:[],same:[],diff:[]};if(!ke(n))return console.log("invalid key"),i&&(o.infor={}),o;Ce(e)||(e=[e]),Ce(t)||(t=[t]),e=oa(e,e=>Me(e,n)),t=oa(t,e=>Me(e,n));let a=new Map(t.map(e=>[e[n],e]));for(let t of e){let e=a.get(t[n]);if(e){JSON.stringify(t)===JSON.stringify(e)?o.same.push(e):o.diff.push(e),a.delete(t[n])}else o.del.push(t)}if(o.add=Array.from(a.values()),i){let e={};for(let t of o.del)e[t[n]]="del";for(let t of o.add)e[t[n]]="add";for(let t of o.diff)e[t[n]]="diff";for(let t of o.same)e[t[n]]="same";o.infor=e}return o}async function RD(e,t=1,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"crypto"),a=Ae(n,"type","");ke(a)||(a="md5");let s=Ae(n,"forFile",null);we(s)||(s=!0);let l=Ae(n,"forFolder",null);if(we(l)||(l=!1),!eD(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let c=BD(e,t,{path:r,fs:i});return c=await ec(c,async e=>{let t="";return s&&!e.isFolder&&(t=await wD(e.path,{fs:i,crypto:o,type:a})),l&&e.isFolder&&(t=await DD(e.path,{path:r,fs:i,crypto:o,type:a})),e.hash=t,e}),c}async function UD(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"crypto"),a=Ae(n,"type","");if(ke(a)||(a="md5"),!eD(e,{fs:i}))throw new Error(`fdSrc[${e}] is not a folder`);let s=!1;if(!eD(t,{fs:i}))return await oD(e,t,{path:r,fs:i,useSync:!1}),s=!0,s;let l=r.sep,c=r.sep.length,u=(e,t)=>(e=bn(e,e=>((e,t)=>{let n=e.isFolder?"folder":"file",r=e.path.replace(t,"");return ta(r,c)===l&&(r=ra(r,c)),r=r.replaceAll("\\","/"),{id:`${n}|${r}`,isFolder:e.isFolder,name:e.name,rpath:r,hash:e.hash}})(e,t)),e),f=await RD(e,null,{path:r,fs:i,crypto:o,type:a,forFile:!0,forFolder:!1});f=u(f,r.resolve(e));let d=await RD(t,null,{path:r,fs:i,crypto:o,type:a,forFile:!0,forFolder:!1});d=u(d,r.resolve(t));let h=LD(d,f,"id",{withInfor:!1});return s=or(h.del)>0||or(h.add)>0||or(h.diff)>0,await ec(h.del,async e=>{if(e.isFolder){hD(r.resolve(t,e.rpath),{fs:i})}}),await ec(h.del,async e=>{if(!e.isFolder){fD(r.resolve(t,e.rpath),{fs:i})}}),await ec([...h.add,...h.diff],async n=>{if(!n.isFolder){let o=r.resolve(e,n.rpath),a=r.resolve(t,n.rpath);await rD(o,a,{path:r,fs:i,useSync:!1})}}),s}function HD(e,t={}){let n=Ae(t,"polling");we(n)||(n=!1);let r=Ae(t,"timeInterval");Vi(r)||(r=100),r=ji(r);let i=Ae(t,"timeBinaryInterval");Vi(i)||(i=300),i=ji(i);let a=qi({type:"safe"}),s=e,l=null,c=setInterval(()=>{null===l&&MF(s)&&(l=u.watch(s,{usePolling:n,interval:r,binaryInterval:i,awaitWriteFinish:!0}),l.on("all",(e,t,n)=>{t=o.resolve(t),a.emit("change",{type:e,fp:t,stats:n})}).on("error",e=>{a.emit("error",{fun:"watcher",msg:e})}))},r);return a.clear=()=>{(()=>{if(null!==l){try{l.unwatch(s)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(c)},a}function qD(e,t,n={}){let r=null,i=Ae(n,"fs"),o=lD(e);eD(o,{fs:i})||tD(o,{fs:i});try{i.writeFileSync(e,t,"utf8")}catch(e){r=e}return null!==r?{error:r}:{success:e}}const OD=[];for(let e=0;e<256;++e)OD.push((e+256).toString(16).slice(1));const PD=new Uint8Array(16);function $D(){return crypto.getRandomValues(PD)}const zD={};function jD(e,t,n){let r;if(e)r=VD(e.random??e.rng?.()??$D(),e.msecs,e.seq,t,n);else{const e=Date.now(),i=$D();!function(e,t,n){e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=YD(n),e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++)}(zD,e,i),r=VD(i,zD.msecs,zD.seq,t,n)}return t??function(e,t=0){return(OD[e[t+0]]+OD[e[t+1]]+OD[e[t+2]]+OD[e[t+3]]+"-"+OD[e[t+4]]+OD[e[t+5]]+"-"+OD[e[t+6]]+OD[e[t+7]]+"-"+OD[e[t+8]]+OD[e[t+9]]+"-"+OD[e[t+10]]+OD[e[t+11]]+OD[e[t+12]]+OD[e[t+13]]+OD[e[t+14]]+OD[e[t+15]]).toLowerCase()}(r)}function VD(e,t,n,r,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(r){if(i<0||i+16>r.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else r=new Uint8Array(16),i=0;return t??=Date.now(),n??=YD(e),r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=255&t,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|3&e[10],r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}function YD(e){return(127&e[6])<<24|e[7]<<16|e[8]<<8|e[9]}function WD(e){return"[object Uint16Array]"===Object.prototype.toString.call(e)}function GD(e){if(!(Ie(e)||Ja(e)||as(e)||WD(e)))return null;try{if(Ne(e.byteLength))return e.byteLength}catch(e){}try{if(Ne(e.length))return e.length}catch(e){}try{if(Ne(e.size))return e.size}catch(e){}return null}function JD(e,t=!0){if(!Mn(e)){return{error:"no data"}}let n=null;try{n=function(e,t=!0){let n=t?"\ufeff":"";return vn(e,e=>{let t=[];vn(e,e=>{Se(e)?(e=ac(e,"\r\n",""),e=ac(e,"\r",""),e=`"${e=ac(e,"\n","")}"`):e=we(e)?e?"true":"false":Na(e),t.push(e)}),n+=yo(t,",")+"\r\n"}),n}(e,t)}catch(e){return{error:e}}return n}function _D(e){return we(e)?e?"true":"false":Na(e)}function XD(e,t){let n=[];return vn(e,e=>{let r=bn(e.rows,e=>bn(e,e=>null===e?"":t?_D(e):e));n.push({sheetname:e.name,data:r})}),n}async function KD(e,t){let n=Ae(t,"fmt","ltdt");if(!ua(["ltdt","csv","array"],n))return{error:"opt.fmt is not one of 'ltdt', 'csv', 'array'"};let r,i=Ae(t,"valueToString",!0);if(!we(i))return{error:"opt.valueToString is not a boolean"};try{r=await rk(e)}catch(e){return console.log("error: ",e),{error:"can not read data from u8a"}}let o=null;try{"ltdt"===n?o=function(e,t){let n=[];return vn(e,e=>{let r=e.rows,i=bn(Ae(r,0,[]),e=>null===e||""===e?null:_D(e)),o=[];for(let e=1;e<r.length;e++){let n=r[e];if(gn(n,e=>null===e))continue;let a={};for(let e=0;e<i.length;e++){if(null===i[e])continue;let r=Ae(n,e,null);null!==r&&(t&&(r=_D(r)),a[i[e]]=r)}o.push(a)}n.push({sheetname:e.name,data:o})}),n}(r.sheets,i):"array"===n?o=XD(r.sheets,i):"csv"===n&&(o=function(e,t){let n=XD(e,t);return vn(n,(e,t)=>{n[t].data=JD(e.data,!1)}),n}(r.sheets,i))}catch(e){return console.log("error: ",e),{error:"can not convert data"}}return o}var ZD;function eN(e){if(!F(e))return!1;var t=k(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!yu(e)}function tN(e){return eN(e)}
24
+ */!function(e){e.exports=function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function s(e){var t=a(e,"string");return"symbol"==typeof t?t:t+""}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}var c={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},u='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>',f="undefined"!=typeof window&&void 0!==window.document,d=f?window:{},h=!(!f||!d.document.documentElement)&&"ontouchstart"in d.document.documentElement,p=!!f&&"PointerEvent"in d,g="viewer",m="move",y="switch",v="zoom",A="".concat(g,"-active"),b="".concat(g,"-close"),w="".concat(g,"-fade"),I="".concat(g,"-fixed"),x="".concat(g,"-fullscreen"),C="".concat(g,"-fullscreen-exit"),E="".concat(g,"-hide"),B="".concat(g,"-hide-md-down"),S="".concat(g,"-hide-sm-down"),k="".concat(g,"-hide-xs-down"),F="".concat(g,"-in"),D="".concat(g,"-invisible"),N="".concat(g,"-loading"),M="".concat(g,"-move"),Q="".concat(g,"-open"),T="".concat(g,"-show"),L="".concat(g,"-transition"),R="click",U="dblclick",H="dragstart",q="focusin",O="keydown",P="load",$="error",z=h?"touchend touchcancel":"mouseup",j=h?"touchmove":"mousemove",V=h?"touchstart":"mousedown",Y=p?"pointerdown":V,W=p?"pointermove":j,G=p?"pointerup pointercancel":z,J="resize",_="transitionend",X="wheel",K="ready",Z="show",ee="shown",te="hide",ne="hidden",re="view",ie="viewed",oe="move",ae="moved",se="rotate",le="rotated",ce="scale",ue="scaled",fe="zoom",de="zoomed",he="play",pe="stop",ge="".concat(g,"Action"),me=/\s+/,ye=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function ve(e){return"string"==typeof e}var Ae=Number.isNaN||d.isNaN;function be(e){return"number"==typeof e&&!Ae(e)}function we(e){return void 0===e}function Ie(e){return"object"===l(e)&&null!==e}var xe=Object.prototype.hasOwnProperty;function Ce(e){if(!Ie(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&xe.call(n,"isPrototypeOf")}catch(e){return!1}}function Ee(e){return"function"==typeof e}function Be(e,t){if(e&&Ee(t))if(Array.isArray(e)||be(e.length)){var n,r=e.length;for(n=0;n<r&&!1!==t.call(e,e[n],n,e);n+=1);}else Ie(e)&&Object.keys(e).forEach(function(n){t.call(e,e[n],n,e)});return e}var Se=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Ie(e)&&n.length>0&&n.forEach(function(t){Ie(t)&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e},ke=/^(?:width|height|left|top|marginLeft|marginTop)$/;function Fe(e,t){var n=e.style;Be(t,function(e,t){ke.test(t)&&be(e)&&(e+="px"),n[t]=e})}function De(e){return ve(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):e}function Ne(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.split(me).indexOf(t)>-1)}function Me(e,t){if(e&&t)if(be(e.length))Be(e,function(e){Me(e,t)});else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function Qe(e,t){if(e&&t)if(be(e.length))Be(e,function(e){Qe(e,t)});else if(e.classList)e.classList.remove(t);else{var n=e.className;n&&n.indexOf(t)>=0&&(e.className=n.split(me).filter(function(e){return e&&e!==t}).join(" "))}}function Te(e,t,n){t&&(be(e.length)?Be(e,function(e){Te(e,t,n)}):n?Me(e,t):Qe(e,t))}var Le=/([a-z\d])([A-Z])/g;function Re(e){return e.replace(Le,"$1-$2").toLowerCase()}function Ue(e,t){return Ie(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Re(t)))}function He(e,t,n){Ie(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(Re(t)),n)}var qe=function(){var e=!1;if(f){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});d.addEventListener("test",n,r),d.removeEventListener("test",n,r)}return e}();function Oe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(me).forEach(function(t){if(!qe){var o=e.listeners;o&&o[t]&&o[t][n]&&(i=o[t][n],delete o[t][n],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,i,r)})}function Pe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(me).forEach(function(t){if(r.once&&!qe){var o=e.listeners,a=void 0===o?{}:o;i=function(){delete a[t][n],e.removeEventListener(t,i,r);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(e,s)},a[t]||(a[t]={}),a[t][n]&&e.removeEventListener(t,a[t][n],r),a[t][n]=i,e.listeners=a}e.addEventListener(t,i,r)})}function $e(e,t,n,r){var i;return Ee(Event)&&Ee(CustomEvent)?i=new CustomEvent(t,o({bubbles:!0,cancelable:!0,detail:n},r)):(i=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(i)}function ze(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}function je(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,o=e.translateY,a=[];be(i)&&0!==i&&a.push("translateX(".concat(i,"px)")),be(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),be(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),be(n)&&1!==n&&a.push("scaleX(".concat(n,")")),be(r)&&1!==r&&a.push("scaleY(".concat(r,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function Ve(e){return ve(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}var Ye=d.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(d.navigator.userAgent);function We(e,t,n){var r=document.createElement("img");if(e.naturalWidth&&!Ye)return n(e.naturalWidth,e.naturalHeight),r;var i=document.body||document.documentElement;return r.onload=function(){n(r.width,r.height),Ye||i.removeChild(r)},Be(t.inheritedAttributes,function(t){var n=e.getAttribute(t);null!==n&&r.setAttribute(t,n)}),r.src=e.src,Ye||(r.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",i.appendChild(r)),r}function Ge(e){switch(e){case 2:return k;case 3:return S;case 4:return B;default:return""}}function Je(e){var t=o({},e),n=[];return Be(e,function(e,r){delete t[r],Be(t,function(t){var r=Math.abs(e.startX-t.startX),i=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(r*r+i*i),l=(Math.sqrt(o*o+a*a)-s)/s;n.push(l)})}),n.sort(function(e,t){return Math.abs(e)<Math.abs(t)}),n[0]}function _e(e,t){var n=e.pageX,r=e.pageY,i={endX:n,endY:r};return t?i:o({timeStamp:Date.now(),startX:n,startY:r},i)}function Xe(e){var t=0,n=0,r=0;return Be(e,function(e){var i=e.startX,o=e.startY;t+=i,n+=o,r+=1}),{pageX:t/=r,pageY:n/=r}}var Ke,Ze={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var e=this.element.ownerDocument,t=e.body||e.documentElement;this.body=t,this.scrollbarWidth=window.innerWidth-e.documentElement.clientWidth,this.initialBodyPaddingRight=t.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(t).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var e,t=this.options,n=this.parent;t.inline&&(e={width:Math.max(n.offsetWidth,t.minWidth),height:Math.max(n.offsetHeight,t.minHeight)},this.parentData=e),!this.fulled&&e||(e=this.containerData),this.viewerData=Se({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&Fe(this.viewer,this.viewerData)},initList:function(){var e=this,t=this.element,n=this.options,r=this.list,i=[];r.innerHTML="",Be(this.images,function(t,o){var a=t.src,s=t.alt||Ve(a),l=e.getImageURL(t);if(a||l){var c=document.createElement("li"),u=document.createElement("img");Be(n.inheritedAttributes,function(e){var n=t.getAttribute(e);null!==n&&u.setAttribute(e,n)}),n.navbar&&(u.src=a||l),u.alt=s,u.setAttribute("data-original-url",l||a),c.setAttribute("data-index",o),c.setAttribute("data-viewer-action","view"),c.setAttribute("role","button"),n.keyboard&&c.setAttribute("tabindex",0),c.appendChild(u),r.appendChild(c),i.push(c)}}),this.items=i,Be(i,function(t){var r,i,o=t.firstElementChild;He(o,"filled",!0),n.loading&&Me(t,N),Pe(o,P,r=function(r){Oe(o,$,i),n.loading&&Qe(t,N),e.loadImage(r)},{once:!0}),Pe(o,$,i=function(){Oe(o,P,r),n.loading&&Qe(t,N)},{once:!0})}),n.transition&&Pe(t,ie,function(){Me(r,L)},{once:!0})},renderList:function(){var e=this.index,t=this.items[e];if(t){var n=t.nextElementSibling,r=parseInt(window.getComputedStyle(n||t).marginLeft,10),i=t.offsetWidth,o=i+r;Fe(this.list,Se({width:o*this.length-r},je({translateX:(this.viewerData.width-i)/2-o*e})))}},resetList:function(){var e=this.list;e.innerHTML="",Qe(e,L),Fe(e,Se({width:0},je({translateX:0})))},initImage:function(e){var t,n=this,r=this.options,i=this.image,o=this.viewerData,a=this.footer.offsetHeight,s=o.width,l=Math.max(o.height-a,a),c=this.imageData||{};this.imageInitializing={abort:function(){t.onload=null}},t=We(i,r,function(t,i){var o=t/i,a=Math.max(0,Math.min(1,r.initialCoverage)),u=s,f=l;n.imageInitializing=!1,l*o>s?f=s/o:u=l*o,a=be(a)?a:.9,u=Math.min(u*a,t),f=Math.min(f*a,i);var d=(s-u)/2,h=(l-f)/2,p={left:d,top:h,x:d,y:h,width:u,height:f,oldRatio:1,ratio:u/t,aspectRatio:o,naturalWidth:t,naturalHeight:i},g=Se({},p);r.rotatable&&(p.rotate=c.rotate||0,g.rotate=0),r.scalable&&(p.scaleX=c.scaleX||1,p.scaleY=c.scaleY||1,g.scaleX=1,g.scaleY=1),n.imageData=p,n.initialImageData=g,e&&e()})},renderImage:function(e){var t=this,n=this.image,r=this.imageData;if(Fe(n,Se({width:r.width,height:r.height,marginLeft:r.x,marginTop:r.y},je(r))),e)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&Ne(n,L)){var i=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){Oe(n,_,i)}},Pe(n,_,i,{once:!0})}else e()},resetImage:function(){var e=this.image;e&&(this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null,this.title.innerHTML="")}},et={bind:function(){var e=this.options,t=this.viewer,n=this.canvas,r=this.element.ownerDocument;Pe(t,R,this.onClick=this.click.bind(this)),Pe(t,H,this.onDragStart=this.dragstart.bind(this)),Pe(n,Y,this.onPointerDown=this.pointerdown.bind(this)),Pe(r,W,this.onPointerMove=this.pointermove.bind(this)),Pe(r,G,this.onPointerUp=this.pointerup.bind(this)),Pe(r,O,this.onKeyDown=this.keydown.bind(this)),Pe(window,J,this.onResize=this.resize.bind(this)),e.zoomable&&e.zoomOnWheel&&Pe(t,X,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleOnDblclick&&Pe(n,U,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,n=this.canvas,r=this.element.ownerDocument;Oe(t,R,this.onClick),Oe(t,H,this.onDragStart),Oe(n,Y,this.onPointerDown),Oe(r,W,this.onPointerMove),Oe(r,G,this.onPointerUp),Oe(r,O,this.onKeyDown),Oe(window,J,this.onResize),e.zoomable&&e.zoomOnWheel&&Oe(t,X,this.onWheel,{passive:!1,capture:!0}),e.toggleOnDblclick&&Oe(n,U,this.onDblclick)}},tt={click:function(e){var t=this.options,n=this.imageData,r=e.target,i=Ue(r,ge);switch(i||"img"!==r.localName||"li"!==r.parentElement.localName||(i=Ue(r=r.parentElement,ge)),h&&e.isTrusted&&r===this.canvas&&clearTimeout(this.clickCanvasTimeout),i){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(Ue(r,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-n.scaleX||-1);break;case"flip-vertical":this.scaleY(-n.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(h&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(e.isTrusted?e:e.detail&&e.detail.originalEvent))},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,n=this.options,r=this.image,i=this.index,o=this.viewerData;Qe(r,D),n.loading&&Qe(this.canvas,N),r.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){Te(r,M,n.movable),Te(r,L,n.transition),e.renderImage(function(){e.viewed=!0,e.viewing=!1,Ee(n.viewed)&&Pe(t,ie,n.viewed,{once:!0}),$e(t,ie,{originalImage:e.images[i],index:i,image:r},{cancelable:!1})})})},loadImage:function(e){var t=e.target,n=t.parentNode,r=n.offsetWidth||30,i=n.offsetHeight||50,o=!!Ue(t,"filled");We(t,this.options,function(e,n){var a=e/n,s=r,l=i;i*a>r?o?s=i*a:l=r/a:o?l=r/a:s=i*a,Fe(t,Se({width:s,height:l},je({translateX:(r-s)/2,translateY:(i-l)/2})))})},keydown:function(e){var t=this.options;if(t.keyboard){var n=e.keyCode||e.which||e.charCode;if(13===n&&this.viewer.contains(e.target)&&this.click(e),this.fulled)switch(n){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},pointerdown:function(e){var t=this.options,n=this.pointers,r=e.buttons,i=e.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(be(r)&&1!==r||be(i)&&0!==i||e.ctrlKey))){e.preventDefault(),e.changedTouches?Be(e.changedTouches,function(e){n[e.identifier]=_e(e)}):n[e.pointerId||0]=_e(e);var o=!!t.movable&&m;t.zoomOnTouch&&t.zoomable&&Object.keys(n).length>1?o=v:t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(o=y),!t.transition||o!==m&&o!==v||Qe(this.image,L),this.action=o}},pointermove:function(e){var t=this.pointers,n=this.action;this.viewed&&n&&(e.preventDefault(),e.changedTouches?Be(e.changedTouches,function(e){Se(t[e.identifier]||{},_e(e,!0))}):Se(t[e.pointerId||0]||{},_e(e,!0)),this.change(e))},pointerup:function(e){var t,n=this,r=this.options,i=this.action,o=this.pointers;e.changedTouches?Be(e.changedTouches,function(e){t=o[e.identifier],delete o[e.identifier]}):(t=o[e.pointerId||0],delete o[e.pointerId||0]),i&&(e.preventDefault(),!r.transition||i!==m&&i!==v||Me(this.image,L),this.action=!1,h&&i!==v&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),r.toggleOnDblclick&&this.viewed&&e.target===this.image?this.pointerMoved?this.imageClicked=!1:this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){$e(n.image,U,{originalEvent:e})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){n.imageClicked=!1},500)):(this.imageClicked=!1,r.backdrop&&"static"!==r.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){$e(n.canvas,R,{originalEvent:e})},50)))))},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();Be(this.player.getElementsByTagName("img"),function(t){Pe(t,P,e.loadImage.bind(e),{once:!0}),$e(t,P)})}},wheel:function(e){var t=this;if(this.viewed&&(e.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50);var n=Number(this.options.zoomRatio)||.1,r=1;e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),this.zoom(-r*n,!0,null,e)}}},nt={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,n=this.options;if(n.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;if(Ee(n.show)&&Pe(t,Z,n.show,{once:!0}),!1===$e(t,Z)||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var r=this.viewer;if(Qe(r,E),r.setAttribute("role","dialog"),r.setAttribute("aria-labelledby",this.title.id),r.setAttribute("aria-modal",!0),r.removeAttribute("aria-hidden"),n.transition&&!e){var i=this.shown.bind(this);this.transitioning={abort:function(){Oe(r,_,i),Qe(r,F)}},Me(r,L),r.initialOffsetWidth=r.offsetWidth,Pe(r,_,i,{once:!0}),Me(r,F)}else Me(r,F),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.element,r=this.options;if(r.inline||this.hiding||!this.isShown&&!this.showing)return this;if(Ee(r.hide)&&Pe(n,te,r.hide,{once:!0}),!1===$e(n,te))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var i=this.viewer,o=this.image,a=function(){Qe(i,F),e.hidden()};if(r.transition&&!t){var s=function(t){t&&t.target===i&&(Oe(i,_,s),e.hidden())},l=function(){Ne(i,L)?(Pe(i,_,s),Qe(i,F)):a()};this.transitioning={abort:function(){e.viewed&&Ne(o,L)?Oe(o,_,l):Ne(i,L)&&Oe(i,_,s)}},this.viewed&&Ne(o,L)?(Pe(o,_,l,{once:!0}),this.zoomTo(0,!1,null,null,!0)):l()}else a();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var n=this.element,r=this.options,i=this.title,o=this.canvas,a=this.items[t],s=a.querySelector("img"),l=Ue(s,"originalUrl"),c=s.getAttribute("alt"),u=document.createElement("img");if(Be(r.inheritedAttributes,function(e){var t=s.getAttribute(e);null!==t&&u.setAttribute(e,t)}),u.src=l,u.alt=c,Ee(r.view)&&Pe(n,re,r.view,{once:!0}),!1===$e(n,re,{originalImage:this.images[t],index:t,image:u})||!this.isShown||this.hiding||this.played)return this;var f=this.items[this.index];f&&(Qe(f,A),f.removeAttribute("aria-selected")),Me(a,A),a.setAttribute("aria-selected",!0),r.focus&&a.focus(),this.image=u,this.viewed=!1,this.index=t,this.imageData={},Me(u,D),r.loading&&Me(o,N),o.innerHTML="",o.appendChild(u),this.renderList(),i.innerHTML="";var d,h,p=function(){var t=e.imageData,n=Array.isArray(r.title)?r.title[1]:r.title;i.innerHTML=De(Ee(n)?n.call(e,u,t):"".concat(c," (").concat(t.naturalWidth," × ").concat(t.naturalHeight,")"))};return Pe(n,ie,p,{once:!0}),this.viewing={abort:function(){Oe(n,ie,p),u.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(u.src="",Oe(u,P,d),e.timeout&&clearTimeout(e.timeout))}},u.complete?this.load():(Pe(u,P,d=function(){Oe(u,$,h),e.load()},{once:!0}),Pe(u,$,h=function(){Oe(u,P,d),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1),Qe(u,D),r.loading&&Qe(e.canvas,N)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){Qe(u,D),e.timeout=!1},1e3)),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,n=this.index+1;return n>t&&(n=e?0:t),this.view(n),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData;return this.moveTo(we(e)?e:n.x+Number(e),we(t)?t:n.y+Number(t)),this},moveTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.element,o=this.options,a=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&o.movable){var s=a.x,l=a.y,c=!1;if(be(e)?c=!0:e=s,be(n)?c=!0:n=l,c){if(Ee(o.move)&&Pe(i,oe,o.move,{once:!0}),!1===$e(i,oe,{x:e,y:n,oldX:s,oldY:l,originalEvent:r}))return this;a.x=e,a.y=n,a.left=e,a.top=n,this.moving=!0,this.renderImage(function(){t.moving=!1,Ee(o.moved)&&Pe(i,ae,o.moved,{once:!0}),$e(i,ae,{x:e,y:n,oldX:s,oldY:l,originalEvent:r},{cancelable:!1})})}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,n=this.element,r=this.options,i=this.imageData;if(be(e=Number(e))&&this.viewed&&!this.played&&r.rotatable){var o=i.rotate;if(Ee(r.rotate)&&Pe(n,se,r.rotate,{once:!0}),!1===$e(n,se,{degree:e,oldDegree:o}))return this;i.rotate=e,this.rotating=!0,this.renderImage(function(){t.rotating=!1,Ee(r.rotated)&&Pe(n,le,r.rotated,{once:!0}),$e(n,le,{degree:e,oldDegree:o},{cancelable:!1})})}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=this.element,i=this.options,o=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&i.scalable){var a=o.scaleX,s=o.scaleY,l=!1;if(be(e)?l=!0:e=a,be(n)?l=!0:n=s,l){if(Ee(i.scale)&&Pe(r,ce,i.scale,{once:!0}),!1===$e(r,ce,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s}))return this;o.scaleX=e,o.scaleY=n,this.scaling=!0,this.renderImage(function(){t.scaling=!1,Ee(i.scaled)&&Pe(r,ue,i.scaled,{once:!0}),$e(r,ue,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s},{cancelable:!1})})}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(i.width*e/i.naturalWidth,t,n,r),this},zoomTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=this.element,s=this.options,l=this.pointers,c=this.imageData,u=c.x,f=c.y,d=c.width,h=c.height,p=c.naturalWidth,g=c.naturalHeight;if(be(e=Math.max(0,e))&&this.viewed&&!this.played&&(o||s.zoomable)){if(!o){var m=Math.max(.01,s.minZoomRatio),y=Math.min(100,s.maxZoomRatio);e=Math.min(Math.max(e,m),y)}if(i)switch(i.type){case"wheel":s.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);break;case"pointermove":case"touchmove":case"mousemove":e>.99&&e<1.01&&(e=1)}var v=p*e,A=g*e,b=v-d,w=A-h,I=c.ratio;if(Ee(s.zoom)&&Pe(a,fe,s.zoom,{once:!0}),!1===$e(a,fe,{ratio:e,oldRatio:I,originalEvent:i}))return this;if(this.zooming=!0,i){var x=ze(this.viewer),C=l&&Object.keys(l).length>0?Xe(l):{pageX:i.pageX,pageY:i.pageY};c.x-=b*((C.pageX-x.left-u)/d),c.y-=w*((C.pageY-x.top-f)/h)}else Ce(r)&&be(r.x)&&be(r.y)?(c.x-=b*((r.x-u)/d),c.y-=w*((r.y-f)/h)):(c.x-=b/2,c.y-=w/2);c.left=c.x,c.top=c.y,c.width=v,c.height=A,c.oldRatio=I,c.ratio=e,this.renderImage(function(){t.zooming=!1,Ee(s.zoomed)&&Pe(a,de,s.zoomed,{once:!0}),$e(a,de,{ratio:e,oldRatio:I,originalEvent:i},{cancelable:!1})}),n&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var n=this.element,r=this.options;if(Ee(r.play)&&Pe(n,he,r.play,{once:!0}),!1===$e(n,he))return this;var i=this.player,o=this.loadImage.bind(this),a=[],s=0,l=0;if(this.played=!0,this.onLoadWhenPlay=o,t&&this.requestFullscreen(t),Me(i,T),Be(this.items,function(e,t){var n=e.querySelector("img"),c=document.createElement("img");c.src=Ue(n,"originalUrl"),c.alt=n.getAttribute("alt"),c.referrerPolicy=n.referrerPolicy,s+=1,Me(c,w),Te(c,L,r.transition),Ne(e,A)&&(Me(c,F),l=t),a.push(c),Pe(c,P,o,{once:!0}),i.appendChild(c)}),be(r.interval)&&r.interval>0){var c=function(){clearTimeout(e.playing.timeout),Qe(a[l],F),Me(a[l=(l-=1)>=0?l:s-1],F),e.playing.timeout=setTimeout(c,r.interval)},u=function(){clearTimeout(e.playing.timeout),Qe(a[l],F),Me(a[l=(l+=1)<s?l:0],F),e.playing.timeout=setTimeout(u,r.interval)};s>1&&(this.playing={prev:c,next:u,timeout:setTimeout(u,r.interval)})}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,n=this.options;if(Ee(n.stop)&&Pe(t,pe,n.stop,{once:!0}),!1===$e(t,pe))return this;var r=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,Be(r.getElementsByTagName("img"),function(t){Oe(t,P,e.onLoadWhenPlay)}),Qe(r,T),r.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,n=this.viewer,r=this.image,i=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),Me(this.button,C),t.transition&&(Qe(i,L),this.viewed&&Qe(r,L)),Me(n,I),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("style"),Fe(n,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=Se({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){Me(r,L),Me(i,L)},0)})})),this},exit:function(){var e=this,t=this.options,n=this.viewer,r=this.image,i=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),Qe(this.button,C),t.transition&&(Qe(i,L),this.viewed&&Qe(r,L)),t.focus&&this.clearEnforceFocus(),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),Qe(n,I),Fe(n,{zIndex:t.zIndexInline}),this.viewerData=Se({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){Me(r,L),Me(i,L)},0)})}),this):this},tooltip:function(){var e=this,t=this.options,n=this.tooltipBox,r=this.imageData;return this.viewed&&!this.played&&t.tooltip?(n.textContent="".concat(Math.round(100*r.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&$e(n,_),Me(n,T),Me(n,w),Me(n,L),n.removeAttribute("aria-hidden"),n.initialOffsetWidth=n.offsetWidth,Me(n,F)):(Me(n,T),n.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){t.transition?(Pe(n,_,function(){Qe(n,T),Qe(n,w),Qe(n,L),n.setAttribute("aria-hidden",!0),e.fading=!1},{once:!0}),Qe(n,F),e.fading=!0):(Qe(n,T),n.setAttribute("aria-hidden",!0)),e.tooltipping=!1},1e3),this):this},toggle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0,null,e):this.zoomTo(1,!0,null,e),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=Se({},this.initialImageData),this.renderImage()),this},update:function(){var e=this,t=this.element,n=this.options,r=this.isImg;if(r&&!t.parentNode)return this.destroy();var i=[];if(Be(r?[t]:t.querySelectorAll("img"),function(t){Ee(n.filter)?n.filter.call(e,t)&&i.push(t):e.getImageURL(t)&&i.push(t)}),!i.length)return this;if(this.images=i,this.length=i.length,this.ready){var o=[];if(Be(this.items,function(e,t){var n=e.querySelector("img"),r=i[t];r&&n&&r.src===n.src&&r.alt===n.alt||o.push(t)}),Fe(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var a=o.indexOf(this.index);if(a>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-a,this.length-1),0));else{var s=this.items[this.index];Me(s,A),s.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e[g]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||(Oe(e,R,this.onElementClick),Oe(e,O,this.onElementKeyDown)),e[g]=void 0,this):this}},rt={getImageURL:function(e){var t=this.options.url;return t=ve(t)?e.getAttribute(t):Ee(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),Pe(document,q,this.onFocusin=function(t){var n=e.viewer,r=t.target;if(r!==document&&r!==n&&!n.contains(r)){for(;r;){if(null!==r.getAttribute("tabindex")||"true"===r.getAttribute("aria-modal"))return;r=r.parentElement}n.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(Oe(document,q,this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;Me(e,Q),this.scrollbarWidth>0&&(e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var e=this.body;Qe(e,Q),this.scrollbarWidth>0&&(e.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var e=this.element,t=this.options,n=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(n.focus(),this.enforceFocus()),Ee(t.shown)&&Pe(e,ee,t.shown,{once:!0}),!1!==$e(e,ee)&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var e=this.element,t=this.options,n=this.viewer,r=n.ownerDocument.activeElement;r&&n.contains(r)&&Ee(r.blur)&&r.blur(),t.focus&&this.clearEnforceFocus(),this.close(),this.unbind(),Me(n,E),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),n.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(Ee(t.hidden)&&Pe(e,ne,t.hidden,{once:!0}),$e(e,ne,null,{cancelable:!1}))},requestFullscreen:function(e){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var n=t.documentElement;n.requestFullscreen?Ce(e)?n.requestFullscreen(e):n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen()}},exitFullscreen:function(){var e=this.element.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,n=this.pointers,r=n[Object.keys(n)[0]];if(r){var i=r.endX-r.startX,o=r.endY-r.startY;switch(this.action){case m:0===i&&0===o||(this.pointerMoved=!0,this.move(i,o,e));break;case v:this.zoom(Je(n),!1,null,e);break;case y:this.action="switched";var a=Math.abs(i);a>1&&a>Math.abs(o)&&(this.pointers={},i>1?this.prev(t.loop):i<-1&&this.next(t.loop))}Be(n,function(e){e.startX=e.endX,e.startY=e.endY})}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},it=d.Viewer,ot=(Ke=-1,function(){return Ke+=1}),at=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!n||1!==n.nodeType)throw new Error("The first argument is required and must be an element.");this.element=n,this.options=Se({},c,Ce(r)&&r),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=ot(),this.init()}return n(t,[{key:"init",value:function(){var e=this,t=this.element,n=this.options;if(!t[g]){t[g]=this,n.focus&&!n.keyboard&&(n.focus=!1);var r="img"===t.localName,i=[];if(Be(r?[t]:t.querySelectorAll("img"),function(t){Ee(n.filter)?n.filter.call(e,t)&&i.push(t):e.getImageURL(t)&&i.push(t)}),this.isImg=r,this.length=i.length,this.images=i,this.initBody(),we(document.createElement(g).style.transition)&&(n.transition=!1),n.inline){var o=0,a=function(){var t;(o+=1)===e.length&&(e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout(function(){e.delaying=!1,e.build()},0))};this.initializing={abort:function(){Be(i,function(e){e.complete||(Oe(e,P,a),Oe(e,$,a))})}},Be(i,function(e){var t,n;e.complete?a():(Pe(e,P,t=function(){Oe(e,$,n),a()},{once:!0}),Pe(e,$,n=function(){Oe(e,P,t),a()},{once:!0}))})}else Pe(t,R,this.onElementClick=function(t){var r=t.target;"img"!==r.localName||Ee(n.filter)&&!n.filter.call(e,r)||e.view(e.images.indexOf(r))}),Pe(t,O,this.onElementKeyDown=function(t){var r=t.target,i=t.key;"img"!==r.localName||"Enter"!==i&&" "!==i||(t.preventDefault(),Ee(n.filter)&&!n.filter.call(e,r)||e.view(e.images.indexOf(r)))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,n=e.parentNode,r=document.createElement("div");r.innerHTML=u;var i=r.querySelector(".".concat(g,"-container")),o=i.querySelector(".".concat(g,"-title")),a=i.querySelector(".".concat(g,"-toolbar")),s=i.querySelector(".".concat(g,"-navbar")),l=i.querySelector(".".concat(g,"-button")),c=i.querySelector(".".concat(g,"-canvas"));if(this.parent=n,this.viewer=i,this.title=o,this.toolbar=a,this.navbar=s,this.button=l,this.canvas=c,this.footer=i.querySelector(".".concat(g,"-footer")),this.tooltipBox=i.querySelector(".".concat(g,"-tooltip")),this.player=i.querySelector(".".concat(g,"-player")),this.list=i.querySelector(".".concat(g,"-list")),i.id="".concat(g).concat(this.id),o.id="".concat(g,"Title").concat(this.id),Me(o,t.title?Ge(Array.isArray(t.title)?t.title[0]:t.title):E),Me(s,t.navbar?Ge(t.navbar):E),Te(l,E,!t.button),t.keyboard&&l.setAttribute("tabindex",0),t.backdrop&&(Me(i,"".concat(g,"-backdrop")),t.inline||"static"===t.backdrop||He(c,ge,"hide")),ve(t.className)&&t.className&&t.className.split(me).forEach(function(e){Me(i,e)}),t.toolbar){var f=document.createElement("ul"),d=Ce(t.toolbar),h=ye.slice(0,3),p=ye.slice(7,9),m=ye.slice(9);d||Me(a,Ge(t.toolbar)),Be(d?t.toolbar:ye,function(e,n){var r=d&&Ce(e),i=d?Re(n):e,o=r&&!we(e.show)?e.show:e;if(o&&(t.zoomable||-1===h.indexOf(i))&&(t.rotatable||-1===p.indexOf(i))&&(t.scalable||-1===m.indexOf(i))){var a=r&&!we(e.size)?e.size:e,s=r&&!we(e.click)?e.click:e,l=document.createElement("li");t.keyboard&&l.setAttribute("tabindex",0),l.setAttribute("role","button"),Me(l,"".concat(g,"-").concat(i)),Ee(s)||He(l,ge,i),be(o)&&Me(l,Ge(o)),-1!==["small","large"].indexOf(a)?Me(l,"".concat(g,"-").concat(a)):"play"===i&&Me(l,"".concat(g,"-large")),Ee(s)&&Pe(l,R,s),f.appendChild(l)}}),a.appendChild(f)}else Me(a,E);if(!t.rotatable){var y=a.querySelectorAll('li[class*="rotate"]');Me(y,D),Be(y,function(e){a.appendChild(e)})}if(t.inline)Me(l,x),Fe(i,{zIndex:t.zIndexInline}),"static"===window.getComputedStyle(n).position&&Fe(n,{position:"relative"}),n.insertBefore(i,e.nextSibling);else{Me(l,b),Me(i,I),Me(i,w),Me(i,E),Fe(i,{zIndex:t.zIndex});var v=t.container;ve(v)&&(v=e.ownerDocument.querySelector(v)),v||(v=this.body),v.appendChild(i)}t.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,Ee(t.ready)&&Pe(e,K,t.ready,{once:!0}),!1!==$e(e,K)?this.ready&&t.inline&&this.view(this.index):this.ready=!1}}}],[{key:"noConflict",value:function(){return window.Viewer=it,t}},{key:"setDefaults",value:function(e){Se(c,Ce(e)&&e)}}])}();return Se(at.prototype,Ze,et,tt,nt,rt),at}()}(Ty);var Ly=Er(Ty.exports);function Ry(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}function Uy(e,t,n){(void 0!==n&&!Z(e[t],n)||void 0===n&&!(t in e))&&ei(e,t,n)}function Hy(e){return F(e)&&dt(e)}function qy(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Oy(e,t,n,r,i,o,a){var s=qy(e,n),l=qy(t,n),c=a.get(l);if(c)Uy(e,n,c);else{var u,f=o?o(s,l,n+"",e,t,a):void 0,d=void 0===f;if(d){var h=y(l),p=!h&&Ye(l),g=!h&&!p&&rt(l);f=l,h||p||g?y(s)?f=s:Hy(s)?f=Cn(s):p?(d=!1,f=fi(l,!0)):g?(d=!1,f=bi(l,!0)):f=[]:yu(l)||$e(l)?(f=s,$e(s)?f=ri(u=s,ai(u)):T(s)&&!L(s)||(f=Ci(l))):d=!1}d&&(a.set(l,f),i(f,l,r,o,a),a.delete(l)),Uy(e,n,f)}}function Py(e,t,n,r,i){e!==t&&Le(t,function(o,a){if(i||(i=new yt),T(o))Oy(e,t,a,n,Py,r,i);else{var s=r?r(qy(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Uy(e,a,s)}},ai)}Ry("/*!\n * Viewer.js v1.12.0\n * https://fengyuanchen.github.io/viewerjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2026-08-22T13:00:37.884Z\n */\n\n.viewer-zoom-in::before, .viewer-zoom-out::before, .viewer-one-to-one::before, .viewer-reset::before, .viewer-prev::before, .viewer-play::before, .viewer-next::before, .viewer-rotate-left::before, .viewer-rotate-right::before, .viewer-flip-horizontal::before, .viewer-flip-vertical::before, .viewer-fullscreen::before, .viewer-fullscreen-exit::before, .viewer-close::before {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 560 40%22%3E%3Cpath fill%3D%22%23fff%22 d%3D%22M49.6 17.9h20.2v3.9H49.6zm123.1 2 10.9-11 2.7 2.8-8.2 8.2 8.2 8.2-2.7 2.7-10.9-10.9zm94 0-10.8-11-2.7 2.8 8.1 8.2-8.1 8.2 2.7 2.7 10.8-10.9zM212 9.3l20.1 10.6L212 30.5V9.3zm161.5 4.6-7.2 6 7.2 5.9v-4h12.4v4l7.3-5.9-7.3-6v4h-12.4v-4zm40.2 12.3 5.9 7.2 5.9-7.2h-4V13.6h4l-5.9-7.3-5.9 7.3h4v12.6h-4zm35.9-16.5h6.3v2h-4.3V16h-2V9.7Zm14 0h6.2V16h-2v-4.3h-4.2v-2Zm6.2 14V30h-6.2v-2h4.2v-4.3h2Zm-14 6.3h-6.2v-6.3h2v4.4h4.3v2Zm-438 .1v-8.3H9.6v-3.9h8.2V9.7h3.9v8.2h8.1v3.9h-8.1v8.3h-3.9zM93.6 9.7h-5.8v3.9h2V30h3.8V9.7zm16.1 0h-5.8v3.9h1.9V30h3.9V9.7zm-11.9 4.1h3.9v3.9h-3.9zm0 8.2h3.9v3.9h-3.9zm244.6-11.7 7.2 5.9-7.2 6v-3.6c-5.4-.4-7.8.8-8.7 2.8-.8 1.7-1.8 4.9 2.8 8.2-6.3-2-7.5-6.9-6-11.3 1.6-4.4 8-5 11.9-4.9v-3.1Zm147.2 13.4h6.3V30h-2v-4.3h-4.3v-2zm14 6.3v-6.3h6.2v2h-4.3V30h-1.9zm6.2-14h-6.2V9.7h1.9V14h4.3v2zm-13.9 0h-6.3v-2h4.3V9.7h2V16zm33.3 12.5 8.6-8.6-8.6-8.7 1.9-1.9 8.6 8.7 8.6-8.7 1.9 1.9-8.6 8.7 8.6 8.6-1.9 2-8.6-8.7-8.6 8.7-1.9-2zM297 10.3l-7.1 5.9 7.2 6v-3.6c5.3-.4 7.7.8 8.7 2.8.8 1.7 1.7 4.9-2.9 8.2 6.3-2 7.5-6.9 6-11.3-1.6-4.4-7.9-5-11.8-4.9v-3.1Zm-157.3-.6c2.3 0 4.4.7 6 2l2.5-3 1.9 9.2h-9.3l2.6-3.1a6.2 6.2 0 0 0-9.9 5.1c0 3.4 2.8 6.3 6.2 6.3 2.8 0 5.1-1.9 6-4.4h4c-1 4.7-5 8.3-10 8.3a10 10 0 0 1-10-10.2 10 10 0 0 1 10-10.2Z%22%2F%3E%3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-size: 280px;\n color: transparent;\n display: block;\n font-size: 0;\n height: 20px;\n line-height: 0;\n width: 20px;\n }\n\n.viewer-zoom-in::before {\n background-position: 0 0;\n content: 'Zoom In';\n}\n\n.viewer-zoom-out::before {\n background-position: -20px 0;\n content: 'Zoom Out';\n}\n\n.viewer-one-to-one::before {\n background-position: -40px 0;\n content: 'One to One';\n}\n\n.viewer-reset::before {\n background-position: -60px 0;\n content: 'Reset';\n}\n\n.viewer-prev::before {\n background-position: -80px 0;\n content: 'Previous';\n}\n\n.viewer-play::before {\n background-position: -100px 0;\n content: 'Play';\n}\n\n.viewer-next::before {\n background-position: -120px 0;\n content: 'Next';\n}\n\n.viewer-rotate-left::before {\n background-position: -140px 0;\n content: 'Rotate Left';\n}\n\n.viewer-rotate-right::before {\n background-position: -160px 0;\n content: 'Rotate Right';\n}\n\n.viewer-flip-horizontal::before {\n background-position: -180px 0;\n content: 'Flip Horizontal';\n}\n\n.viewer-flip-vertical::before {\n background-position: -200px 0;\n content: 'Flip Vertical';\n}\n\n.viewer-fullscreen::before {\n background-position: -220px 0;\n content: 'Enter Full Screen';\n}\n\n.viewer-fullscreen-exit::before {\n background-position: -240px 0;\n content: 'Exit Full Screen';\n}\n\n.viewer-close::before {\n background-position: -260px 0;\n content: 'Close';\n}\n\n.viewer-container {\n bottom: 0;\n direction: ltr;\n font-size: 0;\n left: 0;\n line-height: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n -webkit-tap-highlight-color: transparent;\n top: 0;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.viewer-container::-moz-selection, .viewer-container *::-moz-selection {\n background-color: transparent;\n }\n\n.viewer-container::selection,\n .viewer-container *::selection {\n background-color: transparent;\n }\n\n.viewer-container:focus {\n outline: 0;\n }\n\n.viewer-container img {\n display: block;\n height: auto;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n }\n\n.viewer-canvas {\n bottom: 0;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.viewer-canvas > img {\n height: auto;\n margin: 15px auto;\n max-width: 90% !important;\n width: auto;\n }\n\n.viewer-footer {\n bottom: 0;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n text-align: center;\n}\n\n.viewer-navbar {\n background-color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.viewer-list {\n box-sizing: content-box;\n height: 50px;\n margin: 0;\n overflow: hidden;\n padding: 1px 0;\n}\n\n.viewer-list > li {\n color: transparent;\n cursor: pointer;\n float: left;\n font-size: 0;\n height: 50px;\n line-height: 0;\n opacity: 0.5;\n overflow: hidden;\n transition: opacity 0.15s;\n width: 30px;\n }\n\n.viewer-list > li:focus,\n .viewer-list > li:hover {\n opacity: 0.75;\n }\n\n.viewer-list > li:focus {\n outline: 0;\n }\n\n.viewer-list > li + li {\n margin-left: 1px;\n }\n\n.viewer-list > .viewer-loading {\n position: relative;\n }\n\n.viewer-list > .viewer-loading::after {\n border-width: 2px;\n height: 20px;\n margin-left: -10px;\n margin-top: -10px;\n width: 20px;\n }\n\n.viewer-list > .viewer-active,\n .viewer-list > .viewer-active:focus,\n .viewer-list > .viewer-active:hover {\n opacity: 1;\n }\n\n.viewer-player {\n background-color: #000;\n bottom: 0;\n cursor: none;\n display: none;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 1;\n}\n\n.viewer-player > img {\n left: 0;\n position: absolute;\n top: 0;\n }\n\n.viewer-toolbar > ul {\n display: inline-block;\n margin: 0 auto 5px;\n overflow: hidden;\n padding: 6px 3px;\n }\n\n.viewer-toolbar > ul > li {\n background-color: rgba(0, 0, 0, 0.5);\n border-radius: 50%;\n cursor: pointer;\n float: left;\n height: 24px;\n overflow: hidden;\n transition: background-color 0.15s;\n width: 24px;\n }\n\n.viewer-toolbar > ul > li:focus,\n .viewer-toolbar > ul > li:hover {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n.viewer-toolbar > ul > li:focus {\n box-shadow: 0 0 3px #fff;\n outline: 0;\n position: relative;\n z-index: 1;\n }\n\n.viewer-toolbar > ul > li::before {\n margin: 2px;\n }\n\n.viewer-toolbar > ul > li + li {\n margin-left: 1px;\n }\n\n.viewer-toolbar > ul > .viewer-small {\n height: 18px;\n margin-bottom: 3px;\n margin-top: 3px;\n width: 18px;\n }\n\n.viewer-toolbar > ul > .viewer-small::before {\n margin: -1px;\n }\n\n.viewer-toolbar > ul > .viewer-large {\n height: 30px;\n margin-bottom: -3px;\n margin-top: -3px;\n width: 30px;\n }\n\n.viewer-toolbar > ul > .viewer-large::before {\n margin: 5px;\n }\n\n.viewer-tooltip {\n background-color: rgba(0, 0, 0, 0.8);\n border-radius: 10px;\n color: #fff;\n display: none;\n font-size: 12px;\n height: 20px;\n left: 50%;\n line-height: 20px;\n margin-left: -25px;\n margin-top: -10px;\n position: absolute;\n text-align: center;\n top: 50%;\n width: 50px;\n}\n\n.viewer-title {\n color: #ccc;\n display: inline-block;\n font-size: 12px;\n line-height: 1.2;\n margin: 5px 5%;\n max-width: 90%;\n min-height: 14px;\n opacity: 0.8;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: opacity 0.15s;\n white-space: nowrap;\n}\n\n.viewer-title:hover {\n opacity: 1;\n }\n\n.viewer-button {\n -webkit-app-region: no-drag;\n background-color: rgba(0, 0, 0, 0.5);\n border-radius: 50%;\n cursor: pointer;\n height: 80px;\n overflow: hidden;\n position: absolute;\n right: -40px;\n top: -40px;\n transition: background-color 0.15s;\n width: 80px;\n}\n\n.viewer-button:focus,\n .viewer-button:hover {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n.viewer-button:focus {\n box-shadow: 0 0 3px #fff;\n outline: 0;\n }\n\n.viewer-button::before {\n bottom: 15px;\n left: 15px;\n position: absolute;\n }\n\n.viewer-fixed {\n position: fixed;\n}\n\n.viewer-open {\n overflow: hidden;\n}\n\n.viewer-show {\n display: block;\n}\n\n.viewer-hide {\n display: none;\n}\n\n.viewer-backdrop {\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.viewer-invisible {\n visibility: hidden;\n}\n\n.viewer-move {\n cursor: move;\n cursor: grab;\n}\n\n.viewer-fade {\n opacity: 0;\n}\n\n.viewer-in {\n opacity: 1;\n}\n\n.viewer-transition {\n transition: all 0.3s;\n}\n\n@keyframes viewer-spinner {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.viewer-loading::after {\n animation: viewer-spinner 1s linear infinite;\n border: 4px solid rgba(255, 255, 255, 0.1);\n border-left-color: rgba(255, 255, 255, 0.5);\n border-radius: 50%;\n content: '';\n display: inline-block;\n height: 40px;\n left: 50%;\n margin-left: -20px;\n margin-top: -20px;\n position: absolute;\n top: 50%;\n width: 40px;\n z-index: 1;\n }\n\n@media (max-width: 767px) {\n .viewer-hide-xs-down {\n display: none;\n }\n}\n\n@media (max-width: 991px) {\n .viewer-hide-sm-down {\n display: none;\n }\n}\n\n@media (max-width: 1199px) {\n .viewer-hide-md-down {\n display: none;\n }\n}\n");var $y,zy=($y=function(e,t,n){Py(e,t,n)},ka(function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=$y.length>3&&"function"==typeof i?(r--,i):void 0,o&&pn(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var a=t[n];a&&$y(e,a,n,i)}return e}));async function jy(e,t=null,n={}){let r=!0,i=null,o=Ga();Be(n)||(n={});let a=Ae(n,"disTouchMoveToHide",null);if(po(a)||(a=4),a=ji(a),!Cu(e))return o.reject("eleImg is not a HTMLElement"),o;if(i=e,null!==t){if(!Cu(t))return o.reject("eleGroup is not a HTMLElement"),o;r=!1,i=t}if(!r){let e=or(t.querySelectorAll("img"));if(0===e)return o.reject("eleGroup does not contain any img"),o;1===e&&(r=!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};r||(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=zy(s,Ti(n)),s.shown=function(){(async()=>{let e=null;await ds(()=>(e=c.viewer,Cu(e)));let t=!1,n=0,r=0,i=0;e.addEventListener("touchstart",e=>{let i=e.touches[0];n=i.clientX,r=i.clientY,((e,t)=>{let n=document.elementsFromPoint(e,t).find(e=>"IMG"===e.tagName);if(!Cu(n))return!0;let r=n?.classList?.contains("viewer-move");return!r})(n,r)&&(t=!0)},{passive:!1}),e.addEventListener("touchmove",e=>{if(!t)return;let o=e.touches[0],a=o.clientX,s=o.clientY,l=a-n,c=s-r,u=Math.sqrt(l*l+c*c);i+=u,n=o.clientX,r=o.clientY},{passive:!1}),e.addEventListener("touchend",e=>{t&&(i<a&&(e.preventDefault(),e.stopPropagation(),c.hide(!0)),t=!1,i=0)},{passive:!1}),e.addEventListener("touchcancel",e=>{t=!1,i=0})})().catch(e=>{console.log(e)})};let l=!1;s.hide=function(){l||(l=!0,c.hide(!0))},s.hidden=function(){c.destroy(),o.resolve("close")};let c=new Ly(i,s);return c.show(),o}function Vy(e,t){let n=new MouseEvent(t,{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(n)}function Yy(e={}){let t=Ae(e,"kind","*"),n=Ae(e,"multiple");we(n)||(n=!1);let r=Ae(e,"entireHierarchy");we(r)||(r=!1),r&&!n&&(n=!0);let i=Ae(e,"sizeMbLimit");Ne(i)||(i=1e3),i=Ir(i);let o=Ga(),a="drf"+Tu(),s="GrpDomReadFile";dm(`[name=${s}]`);let l=Hm(t),c=`<div name="${s}" style="position:relative; width:0px; height:0px; overflow:hidden;"><input id="${a}" type="file" accept="${l}" ${n?"multiple":""} ${r?"webkitdirectory":""} style="opacity:0; position:absolute; top:-10000px; left:-10000px;"></div>`;ju(document.querySelector("body"),c);let u=Dm("#"+a),f=!1;function d(e){f=!0;let t=qm(this,i);o.resolve(t),u.removeEventListener("change",d,!0),u.removeEventListener("cancel",h,!0),r||window.removeEventListener("focus",p),dm(`[name=${s}]`)}function h(e){f||d.call(u,e)}function p(e){setTimeout(()=>{f||d.call(u,e)},1500)}return u.addEventListener("change",d,!0),u.addEventListener("cancel",h,!0),r||window.addEventListener("focus",p),Vy(u,"click"),o}function Wy(e){if(!ke(e))return!1;let n="YYYY-MM-DDTHH:mm:ss";return e===t(e,n).format(n)}_a()&&function(){try{return new MouseEvent("MouseEventPolyfillTest"),!1}catch(e){}let e=function(e,t){t=t||{bubbles:!1,cancelable:!1};let n=document.createEvent("MouseEvent");return n.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),n};e.prototype=Event.prototype,window.MouseEvent=e}();var Gy="top",Jy="bottom",_y="right",Xy="left",Ky="auto",Zy=[Gy,Jy,_y,Xy],ev="start",tv="end",nv="viewport",rv="popper",iv=Zy.reduce(function(e,t){return e.concat([t+"-"+ev,t+"-"+tv])},[]),ov=[].concat(Zy,[Ky]).reduce(function(e,t){return e.concat([t,t+"-"+ev,t+"-"+tv])},[]),av=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function sv(e){return e?(e.nodeName||"").toLowerCase():null}function lv(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function cv(e){return e instanceof lv(e).Element||e instanceof Element}function uv(e){return e instanceof lv(e).HTMLElement||e instanceof HTMLElement}function fv(e){return"undefined"!=typeof ShadowRoot&&(e instanceof lv(e).ShadowRoot||e instanceof ShadowRoot)}var dv={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];uv(i)&&sv(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});uv(r)&&sv(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function hv(e){return e.split("-")[0]}var pv=Math.max,gv=Math.min,mv=Math.round;function yv(){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 vv(){return!/^((?!chrome|android).)*safari/i.test(yv())}function Av(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&uv(e)&&(i=e.offsetWidth>0&&mv(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&mv(r.height)/e.offsetHeight||1);var a=(cv(e)?lv(e):window).visualViewport,s=!vv()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/i,c=(r.top+(s&&a?a.offsetTop:0))/o,u=r.width/i,f=r.height/o;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l,x:l,y:c}}function bv(e){var t=Av(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function wv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&fv(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Iv(e){return lv(e).getComputedStyle(e)}function xv(e){return["table","td","th"].indexOf(sv(e))>=0}function Cv(e){return((cv(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ev(e){return"html"===sv(e)?e:e.assignedSlot||e.parentNode||(fv(e)?e.host:null)||Cv(e)}function Bv(e){return uv(e)&&"fixed"!==Iv(e).position?e.offsetParent:null}function Sv(e){for(var t=lv(e),n=Bv(e);n&&xv(n)&&"static"===Iv(n).position;)n=Bv(n);return n&&("html"===sv(n)||"body"===sv(n)&&"static"===Iv(n).position)?t:n||function(e){var t=/firefox/i.test(yv());if(/Trident/i.test(yv())&&uv(e)&&"fixed"===Iv(e).position)return null;var n=Ev(e);for(fv(n)&&(n=n.host);uv(n)&&["html","body"].indexOf(sv(n))<0;){var r=Iv(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function kv(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Fv(e,t,n){return pv(e,gv(t,n))}function Dv(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Nv(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Mv={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=hv(n.placement),l=kv(s),c=[Xy,_y].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(e,t){return Dv("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Nv(e,Zy))}(i.padding,n),f=bv(o),d="y"===l?Gy:Xy,h="y"===l?Jy:_y,p=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],g=a[l]-n.rects.reference[l],m=Sv(o),y=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,v=p/2-g/2,A=u[d],b=y-f[c]-u[h],w=y/2-f[c]/2+v,I=Fv(A,w,b),x=l;n.modifiersData[r]=((t={})[x]=I,t.centerOffset=I-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&wv(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qv(e){return e.split("-")[1]}var Tv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Lv(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=a.x,h=void 0===d?0:d,p=a.y,g=void 0===p?0:p,m="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=m.x,g=m.y;var y=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),A=Xy,b=Gy,w=window;if(c){var I=Sv(n),x="clientHeight",C="clientWidth";if(I===lv(n)&&"static"!==Iv(I=Cv(n)).position&&"absolute"===s&&(x="scrollHeight",C="scrollWidth"),i===Gy||(i===Xy||i===_y)&&o===tv)b=Jy,g-=(f&&I===w&&w.visualViewport?w.visualViewport.height:I[x])-r.height,g*=l?1:-1;if(i===Xy||(i===Gy||i===Jy)&&o===tv)A=_y,h-=(f&&I===w&&w.visualViewport?w.visualViewport.width:I[C])-r.width,h*=l?1:-1}var E,B=Object.assign({position:s},c&&Tv),S=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:mv(n*i)/i||0,y:mv(r*i)/i||0}}({x:h,y:g},lv(n)):{x:h,y:g};return h=S.x,g=S.y,l?Object.assign({},B,((E={})[b]=v?"0":"",E[A]=y?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",E)):Object.assign({},B,((t={})[b]=v?g+"px":"",t[A]=y?h+"px":"",t.transform="",t))}var Rv={passive:!0};var Uv={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,l=lv(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,Rv)}),s&&l.addEventListener("resize",n.update,Rv),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,Rv)}),s&&l.removeEventListener("resize",n.update,Rv)}},data:{}},Hv={left:"right",right:"left",bottom:"top",top:"bottom"};function qv(e){return e.replace(/left|right|bottom|top/g,function(e){return Hv[e]})}var Ov={start:"end",end:"start"};function Pv(e){return e.replace(/start|end/g,function(e){return Ov[e]})}function $v(e){var t=lv(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function zv(e){return Av(Cv(e)).left+$v(e).scrollLeft}function jv(e){var t=Iv(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Vv(e){return["html","body","#document"].indexOf(sv(e))>=0?e.ownerDocument.body:uv(e)&&jv(e)?e:Vv(Ev(e))}function Yv(e,t){var n;void 0===t&&(t=[]);var r=Vv(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=lv(r),a=i?[o].concat(o.visualViewport||[],jv(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Yv(Ev(a)))}function Wv(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Gv(e,t,n){return t===nv?Wv(function(e,t){var n=lv(e),r=Cv(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=vv();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+zv(e),y:l}}(e,n)):cv(t)?function(e,t){var n=Av(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Wv(function(e){var t,n=Cv(e),r=$v(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=pv(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=pv(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+zv(e),l=-r.scrollTop;return"rtl"===Iv(i||n).direction&&(s+=pv(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(Cv(e)))}function Jv(e,t,n,r){var i="clippingParents"===t?function(e){var t=Yv(Ev(e)),n=["absolute","fixed"].indexOf(Iv(e).position)>=0&&uv(e)?Sv(e):e;return cv(n)?t.filter(function(e){return cv(e)&&wv(e,n)&&"body"!==sv(e)}):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(t,n){var i=Gv(e,n,r);return t.top=pv(i.top,t.top),t.right=gv(i.right,t.right),t.bottom=gv(i.bottom,t.bottom),t.left=pv(i.left,t.left),t},Gv(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function _v(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?hv(i):null,a=i?Qv(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Gy:t={x:s,y:n.y-r.height};break;case Jy:t={x:s,y:n.y+n.height};break;case _y:t={x:n.x+n.width,y:l};break;case Xy:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?kv(o):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case ev:t[c]=t[c]-(n[u]/2-r[u]/2);break;case tv:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function Xv(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?nv:c,f=n.elementContext,d=void 0===f?rv:f,h=n.altBoundary,p=void 0!==h&&h,g=n.padding,m=void 0===g?0:g,y=Dv("number"!=typeof m?m:Nv(m,Zy)),v=d===rv?"reference":rv,A=e.rects.popper,b=e.elements[p?v:d],w=Jv(cv(b)?b:b.contextElement||Cv(e.elements.popper),l,u,a),I=Av(e.elements.reference),x=_v({reference:I,element:A,strategy:"absolute",placement:i}),C=Wv(Object.assign({},A,x)),E=d===rv?C:I,B={top:w.top-E.top+y.top,bottom:E.bottom-w.bottom+y.bottom,left:w.left-E.left+y.left,right:E.right-w.right+y.right},S=e.modifiersData.offset;if(d===rv&&S){var k=S[i];Object.keys(B).forEach(function(e){var t=[_y,Jy].indexOf(e)>=0?1:-1,n=[Gy,Jy].indexOf(e)>=0?"y":"x";B[e]+=k[n]*t})}return B}function Kv(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?ov:l,u=Qv(r),f=u?s?iv:iv.filter(function(e){return Qv(e)===u}):Zy,d=f.filter(function(e){return c.indexOf(e)>=0});0===d.length&&(d=f);var h=d.reduce(function(t,n){return t[n]=Xv(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[hv(n)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}var Zv={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,m=t.options.placement,y=hv(m),v=l||(y===m||!p?[qv(m)]:function(e){if(hv(e)===Ky)return[];var t=qv(e);return[Pv(e),t,Pv(t)]}(m)),A=[m].concat(v).reduce(function(e,n){return e.concat(hv(n)===Ky?Kv(t,{placement:n,boundary:u,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)},[]),b=t.rects.reference,w=t.rects.popper,I=new Map,x=!0,C=A[0],E=0;E<A.length;E++){var B=A[E],S=hv(B),k=Qv(B)===ev,F=[Gy,Jy].indexOf(S)>=0,D=F?"width":"height",N=Xv(t,{placement:B,boundary:u,rootBoundary:f,altBoundary:d,padding:c}),M=F?k?_y:Xy:k?Jy:Gy;b[D]>w[D]&&(M=qv(M));var Q=qv(M),T=[];if(o&&T.push(N[S]<=0),s&&T.push(N[M]<=0,N[Q]<=0),T.every(function(e){return e})){C=B,x=!1;break}I.set(B,T)}if(x)for(var L=function(e){var t=A.find(function(t){var n=I.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return C=t,"break"},R=p?3:1;R>0;R--){if("break"===L(R))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function eA(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function tA(e){return[Gy,_y,Jy,Xy].some(function(t){return e[t]>=0})}var nA={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=ov.reduce(function(e,n){return e[n]=function(e,t,n){var r=hv(e),i=[Xy,Gy].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Xy,_y].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var rA={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,d=n.tether,h=void 0===d||d,p=n.tetherOffset,g=void 0===p?0:p,m=Xv(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),y=hv(t.placement),v=Qv(t.placement),A=!v,b=kv(y),w="x"===b?"y":"x",I=t.modifiersData.popperOffsets,x=t.rects.reference,C=t.rects.popper,E="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,B="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(I){if(o){var F,D="y"===b?Gy:Xy,N="y"===b?Jy:_y,M="y"===b?"height":"width",Q=I[b],T=Q+m[D],L=Q-m[N],R=h?-C[M]/2:0,U=v===ev?x[M]:C[M],H=v===ev?-C[M]:-x[M],q=t.elements.arrow,O=h&&q?bv(q):{width:0,height:0},P=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},$=P[D],z=P[N],j=Fv(0,x[M],O[M]),V=A?x[M]/2-R-j-$-B.mainAxis:U-j-$-B.mainAxis,Y=A?-x[M]/2+R+j+z+B.mainAxis:H+j+z+B.mainAxis,W=t.elements.arrow&&Sv(t.elements.arrow),G=W?"y"===b?W.clientTop||0:W.clientLeft||0:0,J=null!=(F=null==S?void 0:S[b])?F:0,_=Q+Y-J,X=Fv(h?gv(T,Q+V-J-G):T,Q,h?pv(L,_):L);I[b]=X,k[b]=X-Q}if(s){var K,Z="x"===b?Gy:Xy,ee="x"===b?Jy:_y,te=I[w],ne="y"===w?"height":"width",re=te+m[Z],ie=te-m[ee],oe=-1!==[Gy,Xy].indexOf(y),ae=null!=(K=null==S?void 0:S[w])?K:0,se=oe?re:te-x[ne]-C[ne]-ae+B.altAxis,le=oe?te+x[ne]+C[ne]-ae-B.altAxis:ie,ce=h&&oe?function(e,t,n){var r=Fv(e,t,n);return r>n?n:r}(se,te,le):Fv(h?se:re,te,h?le:ie);I[w]=ce,k[w]=ce-te}t.modifiersData[r]=k}},requiresIfExists:["offset"]};function iA(e,t,n){void 0===n&&(n=!1);var r,i,o=uv(t),a=uv(t)&&function(e){var t=e.getBoundingClientRect(),n=mv(t.width)/e.offsetWidth||1,r=mv(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=Cv(t),l=Av(e,a,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==sv(t)||jv(s))&&(c=(r=t)!==lv(r)&&uv(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:$v(r)),uv(t)?((u=Av(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=zv(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function oA(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),r}function aA(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var sA={placement:"bottom",modifiers:[],strategy:"absolute"};function lA(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function cA(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?sA:i;return function(e,t,n){void 0===n&&(n=o);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},sA,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:i,setOptions:function(n){var s="function"==typeof n?n(i.options):n;c(),i.options=Object.assign({},o,i.options,s),i.scrollParents={reference:cv(e)?Yv(e):e.contextElement?Yv(e.contextElement):[],popper:Yv(t)};var u,f,d=function(e){var t=oA(e);return av.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((u=[].concat(r,i.options.modifiers),f=u.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(f).map(function(e){return f[e]})));return i.orderedModifiers=d.filter(function(e){return e.enabled}),i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var s=o({state:i,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}}),l.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(lA(t,n)){i.rects={reference:iA(t,Sv(n),"fixed"===i.options.strategy),popper:bv(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var o=i.orderedModifiers[r],a=o.fn,c=o.options,u=void 0===c?{}:c,f=o.name;"function"==typeof a&&(i=a({state:i,options:u,name:f,instance:l})||i)}else i.reset=!1,r=-1}}},update:aA(function(){return new Promise(function(e){l.forceUpdate(),e(i)})}),destroy:function(){c(),s=!0}};if(!lA(e,t))return l;function c(){a.forEach(function(e){return e()}),a=[]}return l.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}}var uA=cA({defaultModifiers:[Uv,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=_v({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,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,c={placement:hv(t.placement),variation:Qv(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,Lv(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Lv(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},dv,nA,Zv,rA,Mv,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Xv(t,{elementContext:"reference"}),s=Xv(t,{altBoundary:!0}),l=eA(a,r),c=eA(s,i,o),u=tA(l),f=tA(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}}]}),fA="tippy-content",dA="tippy-arrow",hA="tippy-svg-arrow",pA={passive:!0,capture:!0},gA=function(){return document.body};function mA(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function yA(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function vA(e,t){return"function"==typeof e?e.apply(void 0,t):e}function AA(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)};var n}function bA(e){return[].concat(e)}function wA(e,t){-1===e.indexOf(t)&&e.push(t)}function IA(e){return[].slice.call(e)}function xA(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function CA(){return document.createElement("div")}function EA(e){return["Element","Fragment"].some(function(t){return yA(e,t)})}function BA(e){return EA(e)?[e]:function(e){return yA(e,"NodeList")}(e)?IA(e):Array.isArray(e)?e:IA(document.querySelectorAll(e))}function SA(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function kA(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function FA(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[r](t,n)})}function DA(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var NA={isTouch:!1},MA=0;function QA(){NA.isTouch||(NA.isTouch=!0,window.performance&&document.addEventListener("mousemove",TA))}function TA(){var e=performance.now();e-MA<20&&(NA.isTouch=!1,document.removeEventListener("mousemove",TA)),MA=e}function LA(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var RA,UA=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function HA(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 qA(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function OA(e){return qA("\n %ctippy.js\n\n %c"+qA(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function PA(e){return[OA(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function $A(e,t){var n;e&&!RA.has(t)&&(RA.add(t),(n=console).warn.apply(n,PA(t)))}function zA(e,t){var n;e&&!RA.has(t)&&(RA.add(t),(n=console).error.apply(n,PA(t)))}RA=new Set;var jA={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},VA=Object.assign({appendTo:gA,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},jA,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),YA=Object.keys(VA);function WA(e){var t=(e.plugins||[]).reduce(function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=VA[i])?r:o);return t},{});return Object.assign({},e,t)}function GA(e,t){var n=Object.assign({},t,{content:vA(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(WA(Object.assign({},VA,{plugins:t}))):YA).reduce(function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t},{})}(e,t.plugins));return n.aria=Object.assign({},VA.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function JA(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach(function(e){var n=function(e,t){var n=Object.assign({},e);return t.forEach(function(e){delete n[e]}),n}(VA,Object.keys(jA)),r=!function(e,t){return{}.hasOwnProperty.call(e,t)}(n,e);r&&(r=0===t.filter(function(t){return t.name===e}).length),$A(r,["`"+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 _A(e,t){e.innerHTML=t}function XA(e){var t=CA();return!0===e?t.className=dA:(t.className=hA,EA(e)?t.appendChild(e):_A(t,e)),t}function KA(e,t){EA(t.content)?(_A(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?_A(e,t.content):e.textContent=t.content)}function ZA(e){var t=e.firstElementChild,n=IA(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(fA)}),arrow:n.find(function(e){return e.classList.contains(dA)||e.classList.contains(hA)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function eb(e){var t=CA(),n=CA();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=CA();function i(n,r){var i=ZA(t),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||KA(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(XA(r.arrow))):o.appendChild(XA(r.arrow)):s&&o.removeChild(s)}return r.className=fA,r.setAttribute("data-state","hidden"),KA(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}eb.$$tippy=!0;var tb=1,nb=[],rb=[];function ib(e,t){var n,r,i,o,a,s,l,c,u=GA(e,Object.assign({},VA,WA(xA(t)))),f=!1,d=!1,h=!1,p=!1,g=[],m=AA(W,u.interactiveDebounce),y=tb++,v=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),A={id:y,reference:e,popper:CA(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){if($A(A.state.isDestroyed,HA("setProps")),A.state.isDestroyed)return;Q("onBeforeUpdate",[A,t]),V();var n=A.props,r=GA(e,Object.assign({},n,xA(t),{ignoreAttributes:!0}));A.props=r,j(),n.interactiveDebounce!==r.interactiveDebounce&&(R(),m=AA(W,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?bA(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):r.triggerTarget&&e.removeAttribute("aria-expanded");L(),M(),I&&I(n,r);A.popperInstance&&(X(),Z().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));Q("onAfterUpdate",[A,t])},setContent:function(e){A.setProps({content:e})},show:function(){$A(A.state.isDestroyed,HA("show"));var e=A.state.isVisible,t=A.state.isDestroyed,n=!A.state.isEnabled,r=NA.isTouch&&!A.props.touch,i=mA(A.props.duration,0,VA.duration);if(e||t||n||r)return;if(k().hasAttribute("disabled"))return;if(Q("onShow",[A],!1),!1===A.props.onShow(A))return;A.state.isVisible=!0,S()&&(w.style.visibility="visible");M(),O(),A.state.isMounted||(w.style.transition="none");if(S()){var o=D();SA([o.box,o.content],0)}s=function(){var e;if(A.state.isVisible&&!p){if(p=!0,w.offsetHeight,w.style.transition=A.props.moveTransition,S()&&A.props.animation){var t=D(),n=t.box,r=t.content;SA([n,r],i),kA([n,r],"visible")}T(),L(),wA(rb,A),null==(e=A.popperInstance)||e.forceUpdate(),Q("onMount",[A]),A.props.animation&&S()&&function(e,t){$(e,t)}(i,function(){A.state.isShown=!0,Q("onShown",[A])})}},function(){var e,t=A.props.appendTo,n=k();e=A.props.interactive&&t===gA||"parent"===t?n.parentNode:vA(t,[n]);e.contains(w)||e.appendChild(w);A.state.isMounted=!0,X(),$A(A.props.interactive&&t===VA.appendTo&&n.nextElementSibling!==w,["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(){$A(A.state.isDestroyed,HA("hide"));var e=!A.state.isVisible,t=A.state.isDestroyed,n=!A.state.isEnabled,r=mA(A.props.duration,1,VA.duration);if(e||t||n)return;if(Q("onHide",[A],!1),!1===A.props.onHide(A))return;A.state.isVisible=!1,A.state.isShown=!1,p=!1,f=!1,S()&&(w.style.visibility="hidden");if(R(),P(),M(!0),S()){var i=D(),o=i.box,a=i.content;A.props.animation&&(SA([o,a],r),kA([o,a],"hidden"))}T(),L(),A.props.animation?S()&&function(e,t){$(e,function(){!A.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()})}(r,A.unmount):A.unmount()},hideWithInteractivity:function(e){$A(A.state.isDestroyed,HA("hideWithInteractivity")),F().addEventListener("mousemove",m),wA(nb,m),m(e)},enable:function(){A.state.isEnabled=!0},disable:function(){A.hide(),A.state.isEnabled=!1},unmount:function(){$A(A.state.isDestroyed,HA("unmount")),A.state.isVisible&&A.hide();if(!A.state.isMounted)return;K(),Z().forEach(function(e){e._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w);rb=rb.filter(function(e){return e!==A}),A.state.isMounted=!1,Q("onHidden",[A])},destroy:function(){if($A(A.state.isDestroyed,HA("destroy")),A.state.isDestroyed)return;A.clearDelayTimeouts(),A.unmount(),V(),delete e._tippy,A.state.isDestroyed=!0,Q("onDestroy",[A])}};if(!u.render)return zA(!0,"render() function has not been supplied."),A;var b=u.render(A),w=b.popper,I=b.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+A.id,A.popper=w,e._tippy=A,w._tippy=A;var x=v.map(function(e){return e.fn(A)}),C=e.hasAttribute("aria-expanded");return j(),L(),M(),Q("onCreate",[A]),u.showOnCreate&&ee(),w.addEventListener("mouseenter",function(){A.props.interactive&&A.state.isVisible&&A.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){A.props.interactive&&A.props.trigger.indexOf("mouseenter")>=0&&F().addEventListener("mousemove",m)}),A;function E(){var e=A.props.touch;return Array.isArray(e)?e:[e,0]}function B(){return"hold"===E()[0]}function S(){var e;return!(null==(e=A.props.render)||!e.$$tippy)}function k(){return l||e}function F(){var e,t,n=k().parentNode;return n?null!=(t=bA(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function D(){return ZA(w)}function N(e){return A.state.isMounted&&!A.state.isVisible||NA.isTouch||o&&"focus"===o.type?0:mA(A.props.delay,e?0:1,VA.delay)}function M(e){void 0===e&&(e=!1),w.style.pointerEvents=A.props.interactive&&!e?"":"none",w.style.zIndex=""+A.props.zIndex}function Q(e,t,n){var r;(void 0===n&&(n=!0),x.forEach(function(n){n[e]&&n[e].apply(n,t)}),n)&&(r=A.props)[e].apply(r,t)}function T(){var t=A.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;bA(A.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(A.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}})}}function L(){!C&&A.props.aria.expanded&&bA(A.props.triggerTarget||e).forEach(function(e){A.props.interactive?e.setAttribute("aria-expanded",A.state.isVisible&&e===k()?"true":"false"):e.removeAttribute("aria-expanded")})}function R(){F().removeEventListener("mousemove",m),nb=nb.filter(function(e){return e!==m})}function U(t){if(!NA.isTouch||!h&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!A.props.interactive||!DA(w,n)){if(bA(A.props.triggerTarget||e).some(function(e){return DA(e,n)})){if(NA.isTouch)return;if(A.state.isVisible&&A.props.trigger.indexOf("click")>=0)return}else Q("onClickOutside",[A,t]);!0===A.props.hideOnClick&&(A.clearDelayTimeouts(),A.hide(),d=!0,setTimeout(function(){d=!1}),A.state.isMounted||P())}}}function H(){h=!0}function q(){h=!1}function O(){var e=F();e.addEventListener("mousedown",U,!0),e.addEventListener("touchend",U,pA),e.addEventListener("touchstart",q,pA),e.addEventListener("touchmove",H,pA)}function P(){var e=F();e.removeEventListener("mousedown",U,!0),e.removeEventListener("touchend",U,pA),e.removeEventListener("touchstart",q,pA),e.removeEventListener("touchmove",H,pA)}function $(e,t){var n=D().box;function r(e){e.target===n&&(FA(n,"remove",r),t())}if(0===e)return t();FA(n,"remove",a),FA(n,"add",r),a=r}function z(t,n,r){void 0===r&&(r=!1),bA(A.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,r),g.push({node:e,eventType:t,handler:n,options:r})})}function j(){var e;B()&&(z("touchstart",Y,{passive:!0}),z("touchend",G,{passive:!0})),(e=A.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(z(e,Y),e){case"mouseenter":z("mouseleave",G);break;case"focus":z(UA?"focusout":"blur",J);break;case"focusin":z("focusout",J)}})}function V(){g.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),g=[]}function Y(e){var t,n=!1;if(A.state.isEnabled&&!_(e)&&!d){var r="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,L(),!A.state.isVisible&&yA(e,"MouseEvent")&&nb.forEach(function(t){return t(e)}),"click"===e.type&&(A.props.trigger.indexOf("mouseenter")<0||f)&&!1!==A.props.hideOnClick&&A.state.isVisible?n=!0:ee(e),"click"===e.type&&(f=!n),n&&!r&&te(e)}}function W(e){var t=e.target,n=k().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Z().concat(w).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null}).filter(Boolean);(function(e,t){var n=t.clientX,r=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 l="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=t.top-r+l>o,h=r-t.bottom-c>o,p=t.left-n+u>o,g=n-t.right-f>o;return d||h||p||g})})(r,e)&&(R(),te(e))}}function G(e){_(e)||A.props.trigger.indexOf("click")>=0&&f||(A.props.interactive?A.hideWithInteractivity(e):te(e))}function J(e){A.props.trigger.indexOf("focusin")<0&&e.target!==k()||A.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function _(e){return!!NA.isTouch&&B()!==e.type.indexOf("touch")>=0}function X(){K();var t=A.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,l=S()?ZA(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||k()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var n=D().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.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];S()&&l&&f.push({name:"arrow",options:{element:l,padding:3}}),f.push.apply(f,(null==n?void 0:n.modifiers)||[]),A.popperInstance=uA(c,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:f}))}function K(){A.popperInstance&&(A.popperInstance.destroy(),A.popperInstance=null)}function Z(){return IA(w.querySelectorAll("[data-tippy-root]"))}function ee(e){A.clearDelayTimeouts(),e&&Q("onTrigger",[A,e]),O();var t=N(!0),r=E(),i=r[0],o=r[1];NA.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout(function(){A.show()},t):A.show()}function te(e){if(A.clearDelayTimeouts(),Q("onUntrigger",[A,e]),A.state.isVisible){if(!(A.props.trigger.indexOf("mouseenter")>=0&&A.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=N(!1);t?r=setTimeout(function(){A.state.isVisible&&A.hide()},t):i=requestAnimationFrame(function(){A.hide()})}}else P()}}function ob(e,t){void 0===t&&(t={});var n=VA.plugins.concat(t.plugins||[]);!function(e){var t=!e,n="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;zA(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),zA(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),JA(t,n),document.addEventListener("touchstart",QA,pA),window.addEventListener("blur",LA);var r=Object.assign({},t,{plugins:n}),i=BA(e),o=EA(r.content),a=i.length>1;$A(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 n=t&&ib(t,r);return n&&e.push(n),e},[]);return EA(e)?s[0]:s}ob.defaultProps=VA,ob.setDefaultProps=function(e){JA(e,[]),Object.keys(e).forEach(function(t){VA[t]=e[t]})},ob.currentInput=NA,Object.assign({},dv,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),ob.setDefaultProps({render:eb});Ry('.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 ab(e,t={}){if(!Ui(e))throw new Error("invalid fun");let n=Ae(t,"width");n=ke(n)?Ko(n):Ne(n)?Ir(n):null;let r=Ae(t,"height");r=ke(r)?Ko(r):Ne(r)?Ir(r):null;let i=document.createElement("div");Ne(n)&&(i.style.width=`${n}px`),Ne(r)&&(i.style.height=`${r}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,l=document.createElement("div");l.style.position="fixed",l.style.zIndex=-1,l.appendChild(a),hm(document.querySelector("body"),l);let c=e(i);return s=Hi(c)?await c:c,dm(l),s}function sb(e){if(!Ui(e))throw new Error("fn is not a function");return function(){let t=Ga(),n=null,r=null;try{n=e.apply(this,arguments)}catch(e){r=e}return null!==r?t.resolve({state:"error",msg:r}):Hi(n)?n.then(e=>{t.resolve({state:"success",msg:e})}).catch(e=>{"cancelled"===Ae(e,"reason")?t.resolve({state:"cancelled",msg:""}):t.resolve({state:"error",msg:e})}):t.resolve({state:"success",msg:n}),t}}Ry(".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 lb=sb;function cb(e){if(!xr(e))return!1;return ji(e)<0}function ub(e=0){let t=0,n=[];cb(e)&&(e=0),e=ji(e);let r=qi({type:"safe"});return r.get=function(){if(n.length>0){return t+=1,n.splice(0,1)[0]}return null},r.cb=function(){t-=1,t<0&&(t=0),n.length>0&&r.emit("message",n)},r.push=function(i){n.push(i),(e<=0||t<e)&&r.emit("message",n)},r.clear=function(){t=0,n=[]},r}function fb(e=0,t=!1){return new function(e,t){let n=null;po(e)||(e=0),e=ji(e),be(t)||(t=!1);let r=ub(e);return r.on("message",async function(e){let t=r.get();if(!t)return;await fs(1);let n,i=Ae(t,"id"),o=Ae(t,"fun"),a=Ae(t,"input");n=Ui(o)?await lb(o)(...a):{state:"error",msg:"fun is not a function"},r.emit(i,n),r.cb()}),function(e,...i){let o=Ga(),a=Tu();n=a;let s={id:a,fun:e,input:i};return r.push(s),r.once(a,e=>{t?a===n?"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 db(e,t){_a()?ke(e)?Vu()?function(e,t){window.navigator.msSaveOrOpenBlob(t,e)}(e,t):function(e,t){let n=window.URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)}(e,t):console.log("no filename"):console.log("no window")}function hb(e,t="data"){if(!Ee(e))return{error:"sheet is not an object"};if(!Ce(Ae(e,"rows")))return{error:"sheet.rows is not an array"};ke(t)||(t="data");let n={sheets:[]};return n.sheets.push({...e,name:t}),n}function pb(e,t="data"){if(!Ce(e))return{error:"data is not an array"};ke(t)||(t="data");let n=null,r=cr(e);return Me(r,"error")?r:(n=hb(r,t),Me(n,"error"),n)}class gb extends Error{name="HucreError";constructor(e,t){super(e,t)}}class mb extends gb{details;name="ParseError";constructor(e,t,n){super(e,n),this.details=t}}class yb extends gb{name="ZipError"}class vb extends gb{name="XmlError"}class Ab extends gb{name="InvalidArgumentError"}class bb extends gb{name="EncryptedFileError";format;constructor(e,t){super(t??(e?`File is password-protected (${e.toUpperCase()} encrypted with the OLE2/CFB container). Provide a password in options to decrypt it.`:"File is password-protected. Provide a password in options.")),this.format=e}}class wb extends gb{name="DecryptionError";constructor(e="Failed to decrypt: incorrect password or corrupt encryption data.",t){super(e,t)}}const Ib=536870888;class xb extends mb{}function Cb(e,t){try{return new TextDecoder("utf-8").decode(e)}catch(n){if(n instanceof RangeError||"ERR_STRING_TOO_LONG"===n?.code||e.length>Ib)throw function(e,t){return new xb(`Part "${e}" is ${t.toLocaleString("en-US")} bytes, over the ${Ib.toLocaleString("en-US")}-character maximum string length this runtime supports, so it cannot be read into memory whole.\n - streamXlsxRows(input) reads a worksheet of any size, a row at a time.\n - The workbook is not damaged; this is a limit of the buffered reader.`)}(t,e.length);throw n}}const Eb={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};function Bb(e){return-1===e.indexOf("\r")?e:e.replace(/\r\n?/g,"\n")}function Sb(e){return-1===e.indexOf("&")?e:e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-zA-Z]+);/g,(e,t)=>{if(35===t.charCodeAt(0)){const n=120===t.charCodeAt(1)||88===t.charCodeAt(1)?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Number.isNaN(n)||(n<0||n>1114111)?e:String.fromCodePoint(n)}return Eb[t]??e})}function kb(e){return-1===e.indexOf("_x")?e:e.replace(/_x([0-9A-Fa-f]{4})_/g,(e,t)=>String.fromCharCode(parseInt(t,16)))}function Fb(e){const t={};let n=0;const r=e.length;for(;n<r;){for(;n<r&&Db(e.charCodeAt(n));)n++;if(n>=r)break;const i=n;for(;n<r&&61!==e.charCodeAt(n)&&!Db(e.charCodeAt(n));)n++;const o=e.slice(i,n);if(!o)break;for(;n<r&&Db(e.charCodeAt(n));)n++;if(n>=r||61!==e.charCodeAt(n)){t[o]="";continue}for(n++;n<r&&Db(e.charCodeAt(n));)n++;if(n>=r)break;const a=e.charCodeAt(n);if(34===a||39===a){n++;const i=n;for(;n<r&&e.charCodeAt(n)!==a;)n++;t[o]=Sb(Bb(e.slice(i,n))),n++}else{const i=n;for(;n<r&&!Db(e.charCodeAt(n));)n++;t[o]=Sb(Bb(e.slice(i,n)))}}return t}function Db(e){return 32===e||9===e||10===e||13===e}function Nb(e,t){const n=65279===e.charCodeAt(0)?e.slice(1):e,r=n.length;let i=0;function o(e){let t=1,o=1;for(let e=0;e<i&&e<r;e++)10===n.charCodeAt(e)?(t++,o=1):o++;throw new vb(`${e} at line ${t}, column ${o}`)}for(;i<r;){if(60===n.charCodeAt(i)){const e=i+1<r?n.charCodeAt(i+1):0;if(33===e){if("\x3c!--"===n.slice(i,i+4)){const e=n.indexOf("--\x3e",i+4);-1===e&&o("Unterminated comment"),i=e+3;continue}if("<![CDATA["===n.slice(i,i+9)){const e=n.indexOf("]]>",i+9);-1===e&&o("Unterminated CDATA section");const r=n.slice(i+9,e);t.onCData?.(r),t.onText?.(r),i=e+3;continue}const e=n.indexOf(">",i+2);-1===e&&o("Unterminated declaration"),i=e+1;continue}if(63===e){const e=n.indexOf("?>",i+2);-1===e&&o("Unterminated processing instruction"),i=e+2;continue}if(47===e){const e=n.indexOf(">",i+2);-1===e&&o("Unterminated closing tag");const r=n.slice(i+2,e).trim();t.onCloseTag?.(r),i=e+1;continue}let a=i+1,s=0;for(;a<r;){const e=n.charCodeAt(a);if(s)e===s&&(s=0);else if(34===e||39===e)s=e;else if(62===e)break;a++}a>=r&&o("Unterminated opening tag");const l=47===n.charCodeAt(a-1),c=n.slice(i+1,l?a-1:a);let u=0;const f=c.length;for(;u<f&&!Db(c.charCodeAt(u));)u++;const d=c.slice(0,u),h=u<f?c.slice(u+1):"",p=h?Fb(h):{};t.onOpenTag?.(d,p),l&&t.onCloseTag?.(d),i=a+1;continue}const e=i;for(;i<r&&60!==n.charCodeAt(i);)i++;const a=n.slice(e,i);if(a){const e=Sb(Bb(a));t.onText?.(e)}}}const Mb=262144,Qb=64;function Tb(e,t,n){let r=n;const i=e.lastIndexOf("&",r-1);i>=t&&n-i<=Qb&&-1===e.indexOf(";",i)&&(r=i);const o=r>t?e.charCodeAt(r-1):0;return(o>=55296&&o<=56319||13===o)&&r--,r>t?r:t}function Lb(e,t,n,r){if(e)throw new vb(r);return t.slice(n)}function Rb(e,t,n,r){let i=0;const o=e.length;for(;i<o;){if(60===e.charCodeAt(i)){const a=i+1<o?e.charCodeAt(i+1):-1;if(-1===a&&!n)return e.slice(i);if(33===a){if("\x3c!--"===e.slice(i,i+4)){const t=e.indexOf("--\x3e",i+4);if(-1===t)return Lb(n&&r,e,i,"Unterminated comment");i=t+3;continue}if("<![CDATA["===e.slice(i,i+9)){const o=e.indexOf("]]>",i+9);if(-1===o)return Lb(n&&r,e,i,"Unterminated CDATA section");const a=e.slice(i+9,o);t.onCData?.(a),t.onText?.(a),i=o+3;continue}if(!n&&o-i<9)return e.slice(i);const a=e.indexOf(">",i+2);if(-1===a)return Lb(n&&r,e,i,"Unterminated declaration");i=a+1;continue}if(63===a){const t=e.indexOf("?>",i+2);if(-1===t)return Lb(n&&r,e,i,"Unterminated processing instruction");i=t+2;continue}if(47===a){const o=e.indexOf(">",i+2);if(-1===o)return Lb(n&&r,e,i,"Unterminated closing tag");const a=e.slice(i+2,o).trim();t.onCloseTag?.(a),i=o+1;continue}let s=i+1,l=0;for(;s<o;){const t=e.charCodeAt(s);if(l)t===l&&(l=0);else if(34===t||39===t)l=t;else if(62===t)break;s++}if(s>=o)return Lb(n&&r,e,i,"Unterminated opening tag");const c=47===e.charCodeAt(s-1),u=e.slice(i+1,c?s-1:s);let f=0;const d=u.length;for(;f<d&&!Db(u.charCodeAt(f));)f++;const h=u.slice(0,f),p=f<d?u.slice(f+1):"",g=p?Fb(p):{};t.onOpenTag?.(h,g),c&&t.onCloseTag?.(h),i=s+1;continue}const a=i;for(;i<o&&60!==e.charCodeAt(i);)i++;if(i>=o&&!n){if(o-a>Mb){const n=Tb(e,a,o);if(n>a)return t.onText?.(Sb(Bb(e.slice(a,n)))),e.slice(n)}return e.slice(a)}const s=e.slice(a,i);if(s){const e=Sb(Bb(s));t.onText?.(e)}}return""}function Ub(e){const t={tag:"",local:"",prefix:"",attrs:{},children:[]},n=[t];if(Nb(e,{onOpenTag(e,t){const{local:r,prefix:i}=function(e){const t=e.indexOf(":");return-1===t?{local:e,prefix:""}:{prefix:e.slice(0,t),local:e.slice(t+1)}}(e),o={tag:e,local:r,prefix:i,attrs:t,children:[]};n[n.length-1].children.push(o),n.push(o)},onCloseTag(e){if(n.length<=1)throw new vb("Unexpected closing tag: no matching open tag");const t=n[n.length-1];if(t.tag!==e)throw new vb(`Mismatched closing tag: expected </${t.tag}> but found </${e}>`);if(n.pop(),t.children.length>0){const e=[];for(const n of t.children)"string"==typeof n&&e.push(n);e.length>0&&(t.text=e.join(""))}},onText(e){n[n.length-1].children.push(e)}}),n.length>1){const e=n[n.length-1].tag;throw new vb(`Unexpected end of document: unclosed element <${e}>`)}if(0===t.children.length)throw new vb("Empty document: no root element found");for(const e of t.children)if("string"!=typeof e)return e;throw new vb("No root element found in document")}function Hb(e,t){for(const n of e.children)if("string"!=typeof n&&n.local===t)return n}function qb(e){const t=[];for(const n of e.children)"string"!=typeof n&&t.push(n);return t}function Ob(e,t){if(e.local===t)return e;for(const n of e.children){if("string"==typeof n)continue;const e=Ob(n,t);if(e)return e}}function Pb(e,t){const n=Hb(e,t);if(!n)return"";let r="";for(const e of n.children)"string"==typeof e&&(r+=e);return r}function $b(e,t){if(void 0===e)return t;const n=parseInt(e,10);return Number.isNaN(n)?t:n}function zb(e){const t=Ub(e),n=[];for(const e of qb(t)){if("threadedComment"!==e.local)continue;const t=e.attrs.id,r=e.attrs.personId;if(!t||!r)continue;const i={id:t,personId:r,text:Pb(e,"text")};e.attrs.ref&&(i.ref=e.attrs.ref),e.attrs.parentId&&(i.parentId=e.attrs.parentId),e.attrs.dT&&(i.date=e.attrs.dT),"1"!==e.attrs.done&&"true"!==e.attrs.done||(i.done=!0);const o=Hb(e,"mentions");if(o){const e=[];for(const t of qb(o)){if("mention"!==t.local)continue;const n=t.attrs.mentionpersonId,r=t.attrs.mentionId;n&&r&&e.push({mentionPersonId:n,mentionId:r,startIndex:$b(t.attrs.startIndex,0),length:$b(t.attrs.length,0)})}e.length>0&&(i.mentions=e)}n.push(i)}return n}function jb(e){const t=Ub(e),n=[];for(const e of t.children){if("string"==typeof e)continue;if("Relationship"===(e.local||e.tag)){const t=e.attrs.Id??"",r=e.attrs.Type??"",i=e.attrs.Target??"",o=e.attrs.TargetMode;if(t&&r&&i){const e={id:t,type:r,target:i};o&&(e.targetMode=o),n.push(e)}}}return n}function Vb(e,t){if(t.startsWith("/"))return t.slice(1);const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(const e of r)".."===e?n.pop():"."!==e&&n.push(e);return n.join("/")}function Yb(e){const t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}function Wb(e){for(const t of Object.keys(e))if(t.endsWith(":id")&&e[t].startsWith("rId"))return e[t]}const Gb=new Set(["n","s","b","e","str"]);function Jb(e,t){const n=Hb(Ub(e),"externalBook");let r,i="";if(n&&t){const e=jb(t),o=n.attrs["r:id"]??n.attrs.id,a=o?e.find(e=>e.id===o):void 0;a&&(i=a.target,"External"!==a.targetMode&&"Internal"!==a.targetMode||(r=a.targetMode))}const o=function(e){const t=e?Hb(e,"sheetNames"):void 0;if(!t)return[];const n=[];for(const e of qb(t))"sheetName"===e.local&&n.push(e.attrs.val??"");return n}(n),a=function(e){const t=e?Hb(e,"sheetDataSet"):void 0;if(!t)return[];const n=[];for(const e of qb(t)){if("sheetData"!==e.local)continue;const t=$b(e.attrs.sheetId,0),r=[];for(const t of qb(e))if("row"===t.local)for(const e of qb(t)){if("cell"!==e.local)continue;const t=e.attrs.r??"";if(!t)continue;const n=e.attrs.t??"n",i=Gb.has(n)?n:"n",o=Pb(e,"v");r.push({ref:t,type:i,value:_b(i,o)})}n.push({sheetId:t,cells:r})}return n}(n),s=function(e){const t=e?Hb(e,"definedNames"):void 0;if(!t)return[];const n=[];for(const e of qb(t)){if("definedName"!==e.local)continue;const t={name:e.attrs.name??""};if(e.attrs.refersTo&&(t.refersTo=e.attrs.refersTo),void 0!==e.attrs.sheetId){const n=$b(e.attrs.sheetId,NaN);Number.isNaN(n)||(t.sheetId=n)}t.name&&n.push(t)}return n}(n),l={target:i,sheetNames:o,sheetData:a};return r&&(l.targetMode=r),s&&s.length>0&&(l.definedNames=s),l}function _b(e,t){switch(e){case"n":case"s":{const e=Number(t);return Number.isFinite(e)?e:0}case"b":return"1"===t||"true"===t;case"e":case"str":return t}}function Xb(e){const t=Hb(e,"pic");if(!t)return;const n=Hb(t,"nvPicPr"),r=n?Hb(n,"cNvPr"):void 0,i=r?.attrs.name;if(!i)return;const o=Hb(t,"blipFill"),a=o?Hb(o,"blip"):void 0,s=a?.attrs["r:embed"]??a?.attrs.embed;if(!s)return;const l={id:i,embedRId:s},c=r?.attrs.descr;return c&&(l.description=c),l}function Kb(e){const t=Ub(e),n="pivotCacheDefinition"===t.local?t:Hb(t,"pivotCacheDefinition");if(!n)return;const r={cacheId:0,fieldNames:[]},i=Hb(n,"cacheSource");if(i){const e=i.attrs.type;"worksheet"!==e&&"external"!==e&&"consolidation"!==e&&"scenario"!==e||(r.sourceType=e);const t=Hb(i,"worksheetSource");t&&(t.attrs.ref?r.sourceRef=t.attrs.ref:t.attrs.name&&(r.sourceRef=t.attrs.name),t.attrs.sheet&&(r.sourceSheet=t.attrs.sheet))}const o=Hb(n,"cacheFields");if(o)for(const e of qb(o)){if("cacheField"!==e.local)continue;const t=e.attrs.name??"";r.fieldNames.push(t)}return r}function Zb(e){const t=Ub(e),n="pivotTableDefinition"===t.local?t:Hb(t,"pivotTableDefinition");if(!n)return;const r=n.attrs.name;if(!r)return;const i=$b(n.attrs.cacheId,NaN),o={name:r,cacheId:Number.isNaN(i)?0:i,location:"",fields:[]},a=Hb(n,"location");if(a){a.attrs.ref&&(o.location=a.attrs.ref);const e=$b(a.attrs.firstHeaderRow,NaN);Number.isNaN(e)||(o.firstHeaderRow=e);const t=$b(a.attrs.firstDataRow,NaN);Number.isNaN(t)||(o.firstDataRow=t);const n=$b(a.attrs.firstDataCol,NaN);Number.isNaN(n)||(o.firstDataCol=n);const r=$b(a.attrs.rowPageCount,NaN);Number.isNaN(r)||(o.rowPageCount=r);const i=$b(a.attrs.colPageCount,NaN);Number.isNaN(i)||(o.colPageCount=i)}const s=Hb(n,"pivotFields"),l=[];if(s)for(const e of qb(s)){if("pivotField"!==e.local)continue;const t=e.attrs.axis,n="1"===e.attrs.dataField||"true"===e.attrs.dataField;let r="hidden";"axisRow"===t?r="row":"axisCol"===t?r="col":"axisPage"===t?r="page":("axisValues"===t||n)&&(r="data"),l.push({axis:r,raw:e})}const c=Hb(n,"dataFields"),u=new Map;if(c)for(const e of qb(c)){if("dataField"!==e.local)continue;const t=$b(e.attrs.fld,NaN);if(Number.isNaN(t))continue;const n={};e.attrs.name&&(n.name=e.attrs.name);const r=tw(e.attrs.subtotal);r&&(n.subtotal=r),u.set(t,n)}for(let e=0;e<l.length;e++){const{axis:t}=l[e],n={name:`field${e+1}`,axis:t};if("data"===t){const t=u.get(e);n.function=t?.subtotal?t.subtotal:"sum",t?.name&&(n.displayName=t.name)}o.fields.push(n)}const f=Hb(n,"pivotTableStyleInfo");return f?.attrs.name&&(o.styleName=f.attrs.name),n.attrs.dataCaption&&(o.dataCaption=n.attrs.dataCaption),o}function ew(e,t){for(let n=0;n<e.fields.length;n++){const r=t.fieldNames[n];r&&(e.fields[n].name=r)}}function tw(e){if(e)switch(e){case"sum":case"count":case"average":case"max":case"min":case"product":case"countNums":case"stdDev":case"stdDevp":case"var":case"varp":return e;case"countA":return"count";default:return}}function nw(e){const t=Ub(e),n=[];for(const e of qb(t)){if("slicer"!==e.local)continue;const t=e.attrs.name,r=e.attrs.cache;if(!t||!r)continue;const i={name:t,cache:r};if(e.attrs.caption&&(i.caption=e.attrs.caption),void 0!==e.attrs.columnCount){const t=$b(e.attrs.columnCount,NaN);Number.isNaN(t)||(i.columnCount=t)}if(e.attrs.style&&(i.style=e.attrs.style),e.attrs.sortOrder&&(i.sortOrder=e.attrs.sortOrder),void 0!==e.attrs.rowHeight){const t=$b(e.attrs.rowHeight,NaN);Number.isNaN(t)||(i.rowHeight=t)}n.push(i)}return n}function rw(e){const t=Ub(e),n="slicerCacheDefinition"===t.local?t:Hb(t,"slicerCacheDefinition");if(!n)return;const r=n.attrs.name;if(!r)return;const i={name:r};n.attrs.sourceName&&(i.sourceName=n.attrs.sourceName);const o=aw(n);o.length>0&&(i.pivotTables=o);const a=function(e){const t=Hb(e,"extLst");if(!t)return;for(const e of qb(t)){if("ext"!==e.local)continue;const t=Hb(e,"tableSlicerCache");if(!t)continue;const n=t.attrs.name??t.attrs.tableId;if(!n)continue;const r={name:n};return t.attrs.column&&(r.column=t.attrs.column),r}return}(n);return a&&(i.tableSource=a),i}function iw(e){const t=Ub(e),n=[];for(const e of qb(t)){if("timeline"!==e.local)continue;const t=e.attrs.name,r=e.attrs.cache;if(!t||!r)continue;const i={name:t,cache:r};e.attrs.caption&&(i.caption=e.attrs.caption),e.attrs.style&&(i.style=e.attrs.style),e.attrs.level&&(i.level=e.attrs.level),void 0!==e.attrs.showHeader&&(i.showHeader=sw(e.attrs.showHeader)),void 0!==e.attrs.showSelectionLabel&&(i.showSelectionLabel=sw(e.attrs.showSelectionLabel)),void 0!==e.attrs.showTimeLevel&&(i.showTimeLevel=sw(e.attrs.showTimeLevel)),void 0!==e.attrs.showHorizontalScrollbar&&(i.showHorizontalScrollbar=sw(e.attrs.showHorizontalScrollbar)),n.push(i)}return n}function ow(e){const t=Ub(e),n="timelineCacheDefinition"===t.local?t:Hb(t,"timelineCacheDefinition");if(!n)return;const r=n.attrs.name;if(!r)return;const i={name:r};n.attrs.sourceName&&(i.sourceName=n.attrs.sourceName);const o=aw(n);return o.length>0&&(i.pivotTables=o),i}function aw(e){const t=Hb(e,"pivotTables");if(!t)return[];const n=[];for(const e of qb(t)){if("pivotTable"!==e.local)continue;const t=e.attrs.name;if(!t)continue;const r=$b(e.attrs.tabId,NaN);Number.isNaN(r)||n.push({tabId:r,name:t})}return n}function sw(e){return"1"===e||"true"===e}function lw(e){return`_x${e.toString(16).toUpperCase().padStart(4,"0")}_`}function cw(e){return e>=0&&e<=8||11===e||12===e||e>=14&&e<=31}function uw(e,t="ooxml"){let n="",r=0;for(let i=0;i<e.length;i++){const o=e.charCodeAt(i);let a;switch(o){case 38:a="&amp;";break;case 60:a="&lt;";break;case 62:a="&gt;";break;case 13:a="charRef"===t?"&#13;":lw(13);break;default:cw(o)&&(a=lw(o))}a&&(n+=e.slice(r,i)+a,r=i+1)}return 0===r?e:n+e.slice(r)}function fw(e){let t="",n=0;for(let r=0;r<e.length;r++){let i;switch(e.charCodeAt(r)){case 38:i="&amp;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;case 34:i="&quot;";break;case 39:i="&apos;";break;case 9:i="&#9;";break;case 10:i="&#10;";break;case 13:i="&#13;";break;default:cw(e.charCodeAt(r))&&(i=lw(e.charCodeAt(r)))}i&&(t+=e.slice(n,r)+i,n=r+1)}return 0===n?e:t+e.slice(n)}function dw(e){if(!e)return"";let t="";const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r],o=e[i];null!=o&&(t+="boolean"==typeof o?` ${i}="${o?"true":"false"}"`:` ${i}="${fw(String(o))}"`)}return t}function hw(e,t){return`<${e}${dw(t)}/>`}function pw(e){const t=uw(e);return e.length>0&&(" "===e[0]||" "===e[e.length-1]||e.includes("\n")||e.includes("\t"))?`<t xml:space="preserve">${t}</t>`:gw("t",void 0,t)}function gw(e,t,n){const r=dw(t);if(null==n)return`<${e}${r}/>`;const i=Array.isArray(n)?n.join(""):n;return i?`<${e}${r}>${i}</${e}>`:`<${e}${r}/>`}function mw(e,t,n,r){const i=[];return!1!==r?.declaration&&i.push(function(e){return`<?xml version="1.0" encoding="UTF-8" standalone="${e?.standalone??"yes"}"?>`}(r)),null==n?i.push(hw(e,t)):i.push(gw(e,t,n)),i.join("")}function yw(e,t){for(const n of e.children)"string"!=typeof n&&("t"===n.local?t.push(vw(n)):yw(n,t))}function vw(e){let t="";for(const n of e.children)t+="string"==typeof n?n:vw(n);return t}function Aw(e){if("string"!=typeof e)return;const t=e.trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}function bw(e){const t=e.attrs.val;if("string"==typeof t)return"1"===t||"true"===t.toLowerCase()}function ww(e){if(void 0!==e)return"1"===e||"true"===e||"0"!==e&&"false"!==e&&void 0}function Iw(e){if(!e)return;const t=Hb(e,"numRef")??Hb(e,"strRef");if(t){const e=Hb(t,"f");if(e){const t=vw(e).trim();if(t.length>0)return t}}const n=Hb(e,"f");if(n){const e=vw(n).trim();if(e.length>0)return e}}function xw(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;const i=r.trim();if(0===i.length)return;const o=Number(i);return Number.isFinite(o)?o:void 0}const Cw=.25,Ew=13.5,Bw=12700,Sw=new Set(["solid","dot","dash","lgDash","dashDot","lgDashDot","lgDashDotDot","sysDash","sysDot","sysDashDot","sysDashDotDot"]),kw=new Set(["solid","dash","dashDot","dot","lgDash","lgDashDot","lgDashDotDot","sysDash","sysDashDot","sysDashDotDot","sysDot"]),Fw=new Set(["rnd","sq","flat"]),Dw=new Set(["sng","dbl","thickThin","thinThick","tri"]);function Nw(e){if("string"==typeof e&&Fw.has(e)&&"flat"!==e)return e}function Mw(e){if("string"==typeof e&&Dw.has(e)&&"sng"!==e)return e}function Qw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=n.attrs.cap;if("string"!=typeof r)return;const i=r.trim();return Fw.has(i)&&"flat"!==i?i:void 0}function Tw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=n.attrs.cmpd;if("string"!=typeof r)return;const i=r.trim();return Dw.has(i)&&"sng"!==i?i:void 0}const Lw=new Set(["bg1","tx1","bg2","tx2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink","phClr","dk1","lt1","dk2","lt2"]),Rw=1e5,Uw=-1e5,Hw=1e5;function qw(e,t,n,r){const i=Hb(e,t);if(!i)return;const o=i.attrs.val;if("string"!=typeof o)return;const a=Number.parseInt(o.trim(),10);return Number.isFinite(a)&&!(a<n||a>r)?a:void 0}function Ow(e){const t=e.attrs.val;if("string"!=typeof t)return;const n=t.trim();if(!Lw.has(n))return;const r={theme:n},i=qw(e,"lumMod",0,Rw);void 0!==i&&(r.lumMod=i);const o=qw(e,"lumOff",0,Rw);void 0!==o&&(r.lumOff=o);const a=qw(e,"tint",Uw,Hw);void 0!==a&&(r.tint=a);const s=qw(e,"shade",Uw,Hw);void 0!==s&&(r.shade=s);const l=qw(e,"alpha",0,Rw);return void 0!==l&&(r.alpha=l),r}function Pw(e){if(null==e)return;if("string"==typeof e){return zw(e)}if("object"!=typeof e)return;const t=e.theme;if("string"!=typeof t||!Lw.has(t))return;const n={theme:t},r=(e,t,n)=>{if("number"!=typeof e||!Number.isFinite(e))return;const r=Math.round(e);return r<t||r>n?void 0:r},i=r(e.lumMod,0,Rw);void 0!==i&&(n.lumMod=i);const o=r(e.lumOff,0,Rw);void 0!==o&&(n.lumOff=o);const a=r(e.tint,Uw,Hw);void 0!==a&&(n.tint=a);const s=r(e.shade,Uw,Hw);void 0!==s&&(n.shade=s);const l=r(e.alpha,0,Rw);return void 0!==l&&(n.alpha=l),n}function $w(e){if("string"==typeof e)return hw("a:srgbClr",{val:e});const t=[];return void 0!==e.tint&&t.push(hw("a:tint",{val:e.tint})),void 0!==e.shade&&t.push(hw("a:shade",{val:e.shade})),void 0!==e.alpha&&t.push(hw("a:alpha",{val:e.alpha})),void 0!==e.lumMod&&t.push(hw("a:lumMod",{val:e.lumMod})),void 0!==e.lumOff&&t.push(hw("a:lumOff",{val:e.lumOff})),0===t.length?hw("a:schemeClr",{val:e.theme}):gw("a:schemeClr",{val:e.theme},t)}function zw(e){if("string"!=typeof e)return;const t=e.trim();if(0===t.length)return;const n=t.startsWith("#")?t.slice(1):t;return 6===n.length&&/^[0-9a-fA-F]{6}$/.test(n)?n.toUpperCase():void 0}function jw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}function Vw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=Hb(n,"solidFill");if(!r)return;const i=Hb(r,"srgbClr");if(i)return zw(i.attrs.val);const o=Hb(r,"schemeClr");return o?Ow(o):void 0}function Yw(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=n.attrs.w;if("string"!=typeof r)return;const i=Number.parseFloat(r);if(!Number.isFinite(i)||i<=0)return;const o=Math.round(i/Bw*4)/4;return o<Cw?Cw:o>Ew?Ew:o}function Ww(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=Hb(n,"prstDash");if(!r)return;const i=r.attrs.val;if("string"!=typeof i)return;const o=i.trim();return kw.has(o)&&"solid"!==o?o:void 0}function Gw(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(4*e)/4;return t<Cw?Cw:t>Ew?Ew:t}function Jw(e){if("string"==typeof e&&kw.has(e)&&"solid"!==e)return e}function _w(e){const t=Hb(e,"view3D");if(!t)return;const n={},r=Xw(t,"rotX",-90,90);void 0!==r&&(n.rotX=r);const i=Xw(t,"hPercent",5,500);void 0!==i&&(n.hPercent=i);const o=Xw(t,"rotY",0,360);void 0!==o&&(n.rotY=o);const a=Xw(t,"depthPercent",20,2e3);void 0!==a&&(n.depthPercent=a);const s=function(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;switch(r){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}(t,"rAngAx");void 0!==s&&(n.rAngAx=s);const l=Xw(t,"perspective",0,240);return void 0!==l&&(n.perspective=l),n}function Xw(e,t,n,r){const i=Hb(e,t);if(!i)return;const o=i.attrs.val;if("string"!=typeof o)return;if(!/^-?\d+$/.test(o))return;const a=Number(o);return Number.isInteger(a)&&!(a<n||a>r)?a:void 0}function Kw(e,t,n){if("number"==typeof e&&Number.isFinite(e)&&Number.isInteger(e)&&!(e<t||e>n))return e}function Zw(e){if(!e)return;const t=e.attrs.val;if("string"!=typeof t)return;const n=t.trim();if(0===n.length)return;const r=Number(n);return Number.isFinite(r)&&!(r<0||r>1)?r:void 0}function eI(e){const t=Hb(e,"layout");if(!t)return;const n=Hb(t,"manualLayout");if(!n)return;const r=Zw(Hb(n,"x")),i=Zw(Hb(n,"y")),o=Zw(Hb(n,"w")),a=Zw(Hb(n,"h"));if(void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const s={};return void 0!==r&&(s.x=r),void 0!==i&&(s.y=i),void 0!==o&&(s.w=o),void 0!==a&&(s.h=a),s}function tI(e){if(!e||"object"!=typeof e)return;const t={},n=nI(e.x);void 0!==n&&(t.x=n);const r=nI(e.y);void 0!==r&&(t.y=r);const i=nI(e.w);void 0!==i&&(t.w=i);const o=nI(e.h);return void 0!==o&&(t.h=o),void 0!==t.x||void 0!==t.y||void 0!==t.w||void 0!==t.h?t:void 0}function nI(e){if("number"==typeof e&&Number.isFinite(e)&&!(e<0||e>1))return e}function rI(e){if(!e)return;const t=[];return void 0!==e.x&&t.push(hw("c:xMode",{val:"edge"})),void 0!==e.y&&t.push(hw("c:yMode",{val:"edge"})),void 0!==e.w&&t.push(hw("c:wMode",{val:"edge"})),void 0!==e.h&&t.push(hw("c:hMode",{val:"edge"})),void 0!==e.x&&t.push(hw("c:x",{val:e.x})),void 0!==e.y&&t.push(hw("c:y",{val:e.y})),void 0!==e.w&&t.push(hw("c:w",{val:e.w})),void 0!==e.h&&t.push(hw("c:h",{val:e.h})),0!==t.length?gw("c:layout",void 0,[gw("c:manualLayout",void 0,t)]):void 0}function iI(e){const t=Hb(e,"txPr");if(t)return aI(t)}function oI(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");return r?aI(r):void 0}function aI(e){const t=Hb(e,"p");if(!t)return;const n=Hb(t,"pPr");return n?Hb(n,"defRPr"):void 0}const sI=6e4,lI=100,cI=400,uI=sI,fI=-90;function dI(e,t,n,r,i,o){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o)return;const a=[];if(void 0!==e&&a.push(gw("a:solidFill",void 0,[$w(e)])),void 0!==t||void 0!==n||void 0!==r||void 0!==i||void 0!==o){const e={};void 0!==n&&(e.w=Math.round(n*Bw)),void 0!==i&&(e.cap=i),void 0!==o&&(e.cmpd=o);const s=[];void 0!==t&&s.push(gw("a:solidFill",void 0,[$w(t)])),void 0!==r&&s.push(hw("a:prstDash",{val:r})),a.push(0===s.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,s))}return gw("c:spPr",void 0,a)}function hI(e){if(void 0===e||"number"!=typeof e||!Number.isFinite(e))return;let t=Math.round(e);return t<fI?t=fI:t>90&&(t=90),0!==t?t:void 0}function pI(e){if(void 0===e||"number"!=typeof e||!Number.isFinite(e))return;const t=Math.round(2*e)/2;return t<1||t>400?void 0:t}function gI(e){return!0===e||!1!==e&&void 0}function mI(e){return!0===e||!1!==e&&void 0}function yI(e){return"string"==typeof e?zw(e):Pw(e)}function vI(e){return!0===e||!1!==e&&void 0}function AI(e){return!0===e||!1!==e&&void 0}const bI=lI,wI=cI;function II(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g,m){const y=[hw("c:legendPos",{val:e})];for(const e of n){const t=[hw("c:idx",{val:e.idx}),hw("c:delete",{val:e.delete?1:0})],n=xI(e.fontSize,e.bold,e.italic,e.underline,e.strikethrough,e.color,e.fontFamily);void 0!==n&&t.push(n),y.push(gw("c:legendEntry",void 0,t))}const v=rI(u);void 0!==v&&y.push(v),y.push(hw("c:overlay",{val:t?1:0}));const A=function(e,t,n,r,i,o){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o)return;const a=[];void 0!==e&&a.push(gw("a:solidFill",void 0,[$w(e)]));if(void 0!==t||void 0!==n||void 0!==r||void 0!==i||void 0!==o){const e={};void 0!==n&&(e.w=Math.round(n*Bw)),void 0!==i&&(e.cap=i),void 0!==o&&(e.cmpd=o);const s=[];void 0!==t&&s.push(gw("a:solidFill",void 0,[$w(t)])),void 0!==r&&s.push(hw("a:prstDash",{val:r})),a.push(0===s.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,s))}return gw("c:spPr",void 0,a)}(f,d,h,p,g,m);void 0!==A&&y.push(A);const b=xI(r,i,o,a,s,l,c);return void 0!==b&&y.push(b),gw("c:legend",void 0,y)}function xI(e,t,n,r,i,o,a){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const s={};void 0!==e&&(s.sz=e*bI),void 0!==t&&(s.b=t?1:0),void 0!==n&&(s.i=n?1:0),void 0!==r&&(s.u=r?"sng":"none"),!0===i&&(s.strike="sngStrike");const l=void 0!==o?gw("a:solidFill",void 0,[$w(o)]):void 0,c=a?hw("a:latin",{typeface:a}):void 0,u=[];l&&u.push(l),c&&u.push(c);const f=u.length>0?gw("a:defRPr",s,u):hw("a:defRPr",s);return gw("c:txPr",void 0,[hw("a:bodyPr"),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[f]),hw("a:endParaRPr",{lang:"en-US"})])])}const CI=lI;function EI(e){const t=Hb(e,"dTable");if(!t)return;const n={},r=BI(t,"showHorzBorder");void 0!==r&&(n.showHorzBorder=r);const i=BI(t,"showVertBorder");void 0!==i&&(n.showVertBorder=i);const o=BI(t,"showOutline");void 0!==o&&(n.showOutline=o);const a=BI(t,"showKeys");void 0!==a&&(n.showKeys=a);const s=function(e){const t=iI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/CI*2)/2;return o<1||o>400?void 0:o}(t);void 0!==s&&(n.fontSize=s);const l=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(t);void 0!==l&&(n.fontColor=l);const c=function(e){const t=iI(e);if(!t)return;const n=t.attrs.b;if("string"!=typeof n)return;switch(n){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}(t);void 0!==c&&(n.bold=c);const u=function(e){const t=iI(e);if(!t)return;const n=t.attrs.i;if("string"!=typeof n)return;switch(n){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}(t);void 0!==u&&(n.italic=u);const f=function(e){const t=iI(e);if(!t)return;const n=t.attrs.u;return"sng"===n||"none"!==n&&void 0}(t);void 0!==f&&(n.underline=f);const d=function(e){const t=iI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(t);void 0!==d&&(n.strikethrough=d);const h=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0===i.length?void 0:i}(t);void 0!==h&&(n.fontFamily=h);const p=jw(t);void 0!==p&&(n.fillColor=p);const g=function(e){return Vw(e)}(t);void 0!==g&&(n.borderColor=g);const m=Yw(t);void 0!==m&&(n.borderWidth=m);const y=Ww(t);void 0!==y&&(n.borderDash=y);const v=Qw(t);void 0!==v&&(n.borderCap=v);const A=Tw(t);return void 0!==A&&(n.borderCompound=A),n}function BI(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"==typeof r)switch(r){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}function SI(e){return yI(e)}function kI(e){return!0===e||!1!==e&&void 0}function FI(e){return!0===e||!1!==e&&void 0}function DI(e){return!0===e||!1!==e&&void 0}function NI(e){if(!0===e)return!0}function MI(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}function QI(e){return yI(e)}function TI(e){return yI(e)}function LI(e){const t=[hw("c:showHorzBorder",{val:e.showHorzBorder?1:0}),hw("c:showVertBorder",{val:e.showVertBorder?1:0}),hw("c:showOutline",{val:e.showOutline?1:0}),hw("c:showKeys",{val:e.showKeys?1:0})],n=function(e,t,n,r,i,o){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o)return;const a=[];void 0!==e&&a.push(gw("a:solidFill",void 0,[$w(e)]));if(void 0!==t||void 0!==n||void 0!==r||void 0!==i||void 0!==o){const e={};void 0!==n&&(e.w=Math.round(n*Bw)),void 0!==i&&(e.cap=i),void 0!==o&&(e.cmpd=o);const s=[];void 0!==t&&s.push(gw("a:solidFill",void 0,[$w(t)])),void 0!==r&&s.push(hw("a:prstDash",{val:r})),a.push(0===s.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,s))}return gw("c:spPr",void 0,a)}(e.fillColor,e.borderColor,e.borderWidth,e.borderDash,e.borderCap,e.borderCompound);void 0!==n&&t.push(n);const r=function(e,t,n,r,i,o,a){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const s={};void 0!==e&&(s.sz=e*CI);void 0!==n&&(s.b=n?1:0);void 0!==r&&(s.i=r?1:0);void 0!==i&&(s.u=i?"sng":"none");!0===o&&(s.strike="sngStrike");const l=void 0!==t?gw("a:solidFill",void 0,[$w(t)]):void 0,c=a?hw("a:latin",{typeface:a}):void 0,u=[];l&&u.push(l);c&&u.push(c);const f=u.length>0?gw("a:defRPr",s,u):hw("a:defRPr",s);return gw("c:txPr",void 0,[hw("a:bodyPr"),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[f]),hw("a:endParaRPr",{lang:"en-US"})])])}(e.fontSize,e.fontColor,e.bold,e.italic,e.underline,e.strikethrough,e.fontFamily);return void 0!==r&&t.push(r),gw("c:dTable",void 0,t)}const RI=lI,UI=new Set(["t","b","l","r","ctr","inEnd","inBase","outEnd","bestFit"]);function HI(e){const t=Hb(e,"delete");if(t&&!0===bw(t))return;const n={},r=Hb(e,"dLblPos");if(r){const e=r.attrs.val;"string"==typeof e&&UI.has(e)&&(n.position=e)}const i=Hb(e,"showLegendKey");i&&!0===bw(i)&&(n.showLegendKey=!0);const o=Hb(e,"showVal");o&&!0===bw(o)&&(n.showValue=!0);const a=Hb(e,"showCatName");a&&!0===bw(a)&&(n.showCategoryName=!0);const s=Hb(e,"showSerName");s&&!0===bw(s)&&(n.showSeriesName=!0);const l=Hb(e,"showPercent");l&&!0===bw(l)&&(n.showPercent=!0);const c=Hb(e,"separator");if(c){const e=vw(c);e.length>0&&(n.separator=e)}const u=function(e){const t=Hb(e,"numFmt");if(!t)return;const n=t.attrs.formatCode;if("string"!=typeof n||0===n.length)return;const r={formatCode:n},i=t.attrs.sourceLinked;"string"==typeof i&&("1"!==i&&"true"!==i.toLowerCase()||(r.sourceLinked=!0));return r}(e);u&&(n.numberFormat=u);const f=Hb(e,"showLeaderLines");if(f){const e=f.attrs.val;"string"!=typeof e||"0"!==e&&"false"!==e.toLowerCase()||(n.showLeaderLines=!1)}const d=function(e){const t=iI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/RI*2)/2;return o<1||o>400?void 0:o}(e);void 0!==d&&(n.fontSize=d);const h=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(e);void 0!==h&&(n.fontColor=h);const p=function(e){const t=iI(e);if(!t)return;const n=t.attrs.b;return"1"===n||"true"===n||void 0}(e);void 0!==p&&(n.bold=p);const g=function(e){const t=iI(e);if(!t)return;const n=t.attrs.i;return"1"===n||"true"===n||void 0}(e);void 0!==g&&(n.italic=g);const m=function(e){const t=iI(e);if(!t)return;return"sng"===t.attrs.u||void 0}(e);void 0!==m&&(n.underline=m);const y=function(e){const t=iI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(e);void 0!==y&&(n.strikethrough=y);const v=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0===i.length?void 0:i}(e);void 0!==v&&(n.fontFamily=v);const A=jw(e);void 0!==A&&(n.fillColor=A);const b=function(e){return Vw(e)}(e);void 0!==b&&(n.borderColor=b);const w=Yw(e);void 0!==w&&(n.borderWidth=w);const I=Ww(e);void 0!==I&&(n.borderDash=I);const x=Qw(e);void 0!==x&&(n.borderCap=x);const C=Tw(e);return void 0!==C&&(n.borderCompound=C),void 0!==n.position||n.showValue||n.showCategoryName||n.showSeriesName||n.showPercent||n.showLegendKey||void 0!==n.separator||void 0!==n.numberFormat||void 0!==n.showLeaderLines||void 0!==n.fontSize||void 0!==n.fontColor||void 0!==n.bold||void 0!==n.italic||void 0!==n.underline||void 0!==n.strikethrough||void 0!==n.fontFamily||void 0!==n.fillColor||void 0!==n.borderColor||void 0!==n.borderWidth||void 0!==n.borderDash||void 0!==n.borderCap||void 0!==n.borderCompound?n:void 0}function qI(e){if(e.dataLabels)return OI(e.dataLabels,e.type)}function OI(e,t){const n=[],r=function(e){if(!e)return;const t=e.formatCode;if("string"!=typeof t||0===t.length)return;const n={formatCode:t};!0===e.sourceLinked&&(n.sourceLinked=!0);return n}(e.numberFormat);r&&n.push(hw("c:numFmt",{formatCode:r.formatCode,sourceLinked:!0===r.sourceLinked?1:0}));const i=function(e,t,n,r,i,o){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o)return;const a=[];void 0!==e&&a.push(gw("a:solidFill",void 0,[$w(e)]));if(void 0!==t||void 0!==n||void 0!==r||void 0!==i||void 0!==o){const e={};void 0!==n&&(e.w=Math.round(n*Bw)),void 0!==i&&(e.cap=i),void 0!==o&&(e.cmpd=o);const s=[];void 0!==t&&s.push(gw("a:solidFill",void 0,[$w(t)])),void 0!==r&&s.push(hw("a:prstDash",{val:r})),a.push(0===s.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,s))}return gw("c:spPr",void 0,a)}(yI(e.fillColor),function(e){return yI(e)}(e.borderColor),Gw(e.borderWidth),Jw(e.borderDash),Nw(e.borderCap),Mw(e.borderCompound));void 0!==i&&n.push(i);const o=function(e,t,n,r,i,o,a){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const s={};void 0!==e&&(s.sz=e*RI);void 0!==n&&(s.b=n?1:0);void 0!==r&&(s.i=r?1:0);void 0!==i&&(s.u=i?"sng":"none");!0===o&&(s.strike="sngStrike");const l=void 0!==t?gw("a:solidFill",void 0,[$w(t)]):void 0,c=a?hw("a:latin",{typeface:a}):void 0,u=[];l&&u.push(l);c&&u.push(c);const f=u.length>0?gw("a:defRPr",s,u):hw("a:defRPr",s);return gw("c:txPr",void 0,[hw("a:bodyPr"),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[f]),hw("a:endParaRPr",{lang:"en-US"})])])}(function(e){return pI(e)}(e.fontSize),function(e){return yI(e)}(e.fontColor),function(e){return!0===e||!1!==e&&void 0}(e.bold),function(e){return!0===e||!1!==e&&void 0}(e.italic),function(e){return!0===e||!1!==e&&void 0}(e.underline),function(e){return!0===e||void 0}(e.strikethrough),function(e){if("string"!=typeof e)return;const t=e.trim();return 0===t.length?void 0:t}(e.fontFamily));return void 0!==o&&n.push(o),e.position&&n.push(hw("c:dLblPos",{val:e.position})),n.push(hw("c:showLegendKey",{val:!0===e.showLegendKey?1:0})),n.push(hw("c:showVal",{val:e.showValue?1:0})),n.push(hw("c:showCatName",{val:e.showCategoryName?1:0})),n.push(hw("c:showSerName",{val:e.showSeriesName?1:0})),n.push(hw("c:showPercent",{val:e.showPercent?1:0})),n.push(hw("c:showBubbleSize",{val:0})),void 0!==e.separator&&n.push(gw("c:separator",void 0,uw(e.separator))),"pie"!==t&&"doughnut"!==t||!1!==e.showLeaderLines||n.push(hw("c:showLeaderLines",{val:0})),gw("c:dLbls",void 0,n)}const PI=new Set(["cone","coneToMax","box","cylinder","pyramid","pyramidToMax"]),$I=new Set(["linear","log","exp","power","poly","movingAvg"]),zI=new Set(["x","y"]),jI=new Set(["both","minus","plus"]),VI=new Set(["cust","fixedVal","percentage","stdDev","stdErr"]);function YI(e){const t=function(e){if("string"==typeof e)return PI.has(e)?e:void 0}(e);if(void 0!==t)return hw("c:shape",{val:t})}function WI(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");return r?zw(r.attrs.val):void 0}function GI(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=Hb(n,"solidFill");if(!r)return;const i=Hb(r,"srgbClr");return i?zw(i.attrs.val):void 0}function JI(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=n.attrs.w;if("string"!=typeof r)return;const i=Number.parseFloat(r);if(!Number.isFinite(i)||i<=0)return;const o=Math.round(i/Bw*4)/4;return o<Cw?Cw:o>Ew?Ew:o}function _I(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r=Hb(n,"prstDash");if(!r)return;const i=r.attrs.val;if("string"!=typeof i)return;const o=i.trim();return kw.has(o)&&"solid"!==o?o:void 0}function XI(e){const t="string"==typeof e.type&&$I.has(e.type)?e.type:void 0;if(void 0===t)return;const n=[];"string"==typeof e.name&&e.name.trim().length>0&&n.push(gw("c:name",void 0,e.name.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")));const r=function(e){const t=zw(e.lineColor),n=Gw(e.lineWidth),r=Jw(e.lineDash);if(!t&&void 0===n&&void 0===r)return;const i={};void 0!==n&&(i.w=Math.round(n*Bw));const o=[];t&&o.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:t})]));void 0!==r&&o.push(hw("a:prstDash",{val:r}));const a=0===o.length?hw("a:ln",i):gw("a:ln",Object.keys(i).length>0?i:void 0,o);return gw("c:spPr",void 0,[a])}(e);if(r&&n.push(r),n.push(hw("c:trendlineType",{val:t})),"poly"===t&&"number"==typeof e.order&&Number.isFinite(e.order)){const t=Math.max(2,Math.min(6,Math.round(e.order)));n.push(hw("c:order",{val:t}))}if("movingAvg"===t&&"number"==typeof e.period&&Number.isFinite(e.period)){const t=Math.max(2,Math.min(100,Math.round(e.period)));n.push(hw("c:period",{val:t}))}return"number"==typeof e.forward&&Number.isFinite(e.forward)&&n.push(hw("c:forward",{val:e.forward})),"number"==typeof e.backward&&Number.isFinite(e.backward)&&n.push(hw("c:backward",{val:e.backward})),"number"==typeof e.intercept&&Number.isFinite(e.intercept)&&n.push(hw("c:intercept",{val:e.intercept})),!0===e.dispRSquared&&n.push(hw("c:dispRSqr",{val:1})),!0===e.dispEquation&&n.push(hw("c:dispEq",{val:1})),gw("c:trendline",void 0,n)}function KI(e){if(!zI.has(e.direction))return;if(!jI.has(e.type))return;if(!VI.has(e.valType))return;const t=[hw("c:errDir",{val:e.direction}),hw("c:errBarType",{val:e.type}),hw("c:errValType",{val:e.valType})];!0===e.noEndCap&&t.push(hw("c:noEndCap",{val:1})),"stdErr"!==e.valType&&"cust"!==e.valType&&"number"==typeof e.value&&Number.isFinite(e.value)&&t.push(hw("c:val",{val:e.value}));const n=zw(e.lineColor),r=Gw(e.lineWidth),i=Jw(e.lineDash);if(n||void 0!==r||void 0!==i){const e={};void 0!==r&&(e.w=Math.round(r*Bw));const o=[];n&&o.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:n})])),void 0!==i&&o.push(hw("a:prstDash",{val:i}));const a=0===o.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,o);t.push(gw("c:spPr",void 0,[a]))}return gw("c:errBars",void 0,t)}const ZI=new Set(["none","auto","circle","square","diamond","triangle","x","star","dot","dash","plus"]),ex=2,tx=72;function nx(e,t){return e.includes("!")?e:`${n=t,/^[A-Za-z_][A-Za-z0-9_]*$/.test(n)?n:`'${n.replace(/'/g,"''")}'`}!${e}`;var n}function rx(e,t,n){const r={kind:t,index:n},i=function(e){const t=Hb(e,"tx");if(!t)return;const n=Hb(t,"v");if(n){const e=vw(n).trim();if(e.length>0)return e}const r=Hb(t,"strRef");if(r){const e=Hb(r,"strCache");if(e)for(const t of qb(e)){if("pt"!==t.local)continue;const e=Hb(t,"v");if(e){const t=vw(e).trim();if(t.length>0)return t}}const t=Iw(r);if(t)return t}return}(e);void 0!==i&&(r.name=i);const o=Iw(Hb(e,"val"))??Iw(Hb(e,"yVal"));void 0!==o&&(r.valuesRef=o);const a=Iw(Hb(e,"cat"))??Iw(Hb(e,"xVal"));void 0!==a&&(r.categoriesRef=a);const s=function(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r){const e=r.attrs.val;if("string"!=typeof e)return;const t=e.replace(/^#/,"").toUpperCase();return/^[0-9A-F]{6}$/.test(t)?t:void 0}const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(e);void 0!==s&&(r.color=s);const l=Hb(e,"dLbls");if(l){const e=HI(l);e&&(r.dataLabels=e)}if("line"===t||"line3D"===t||"scatter"===t){const t=function(e){const t=Hb(e,"smooth");if(!t)return;return!0===bw(t)||void 0}(e);void 0!==t&&(r.smooth=t);const n=function(e){const t=Hb(e,"spPr");if(!t)return;const n=Hb(t,"ln");if(!n)return;const r={},i=n.attrs.w;if("string"==typeof i){const e=Number.parseFloat(i);if(Number.isFinite(e)&&e>0){const t=Math.round(e/Bw*4)/4;r.width=t<Cw?Cw:t>Ew?Ew:t}}const o=Hb(n,"prstDash");if(o){const e=o.attrs.val;"string"==typeof e&&Sw.has(e)&&(r.dash=e)}const a=n.attrs.cap;if("string"==typeof a){const e=a.trim();Fw.has(e)&&"flat"!==e&&(r.cap=e)}const s=n.attrs.cmpd;if("string"==typeof s){const e=s.trim();Dw.has(e)&&"sng"!==e&&(r.compound=e)}return void 0===r.dash&&void 0===r.width&&void 0===r.cap&&void 0===r.compound?void 0:r}(e);void 0!==n&&(r.stroke=n);const i=ix(e);void 0!==i&&(r.marker=i)}if("bar"===t||"bar3D"===t){const t=function(e){const t=Hb(e,"invertIfNegative");if(!t)return;return!0===bw(t)||void 0}(e);void 0!==t&&(r.invertIfNegative=t)}if("pie"===t||"pie3D"===t||"doughnut"===t||"ofPie"===t){const t=function(e){const t=Hb(e,"explosion");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseFloat(n);if(!Number.isFinite(r)||r<0)return;const i=Math.round(r);return 0===i?void 0:i}(e);void 0!==t&&(r.explosion=t)}const c=function(e){const t=[];for(const n of qb(e)){if("dPt"!==n.local)continue;const e=Hb(n,"idx");if(!e)continue;const r=e.attrs.val;if("string"!=typeof r)continue;const i=Number.parseInt(r,10);if(!Number.isFinite(i)||i<0)continue;const o={idx:i},a=Hb(n,"explosion");if(a){const e=a.attrs.val;if("string"==typeof e){const t=Number.parseFloat(e);if(Number.isFinite(t)&&t>0){const e=Math.round(t);e>0&&(o.explosion=e)}}}const s=Hb(n,"bubble3D");s&&!0===bw(s)&&(o.bubble3D=!0);const l=WI(n);void 0!==l&&(o.fillColor=l);const c=GI(n);void 0!==c&&(o.borderColor=c);const u=JI(n);void 0!==u&&(o.borderWidth=u);const f=_I(n);void 0!==f&&(o.borderDash=f);const d=ix(n);void 0!==d&&(o.marker=d),t.push(o)}return t.length>0?t:void 0}(e);if(void 0!==c&&(r.dataPoints=c),"bar"===t||"bar3D"===t||"line"===t||"line3D"===t||"area"===t||"area3D"===t||"scatter"===t||"bubble"===t){const t=function(e){const t=[];for(const n of qb(e)){if("trendline"!==n.local)continue;const e=Hb(n,"trendlineType");if(!e)continue;const r=e.attrs.val;if("string"!=typeof r)continue;const i=r.trim();if(!$I.has(i))continue;const o={type:i},a=Hb(n,"name");if(a){let e="";for(const t of a.children)"string"==typeof t&&(e+=t);const t=e.trim();t.length>0&&(o.name=t)}const s=Hb(n,"order");if(s){const e=parseFloat(String(s.attrs.val??""));if(Number.isFinite(e)){const t=Math.round(e);t>=2&&t<=6&&(o.order=t)}}const l=Hb(n,"period");if(l){const e=parseFloat(String(l.attrs.val??""));if(Number.isFinite(e)){const t=Math.round(e);t>=2&&t<=100&&(o.period=t)}}const c=Hb(n,"forward");if(c){const e=parseFloat(String(c.attrs.val??""));Number.isFinite(e)&&(o.forward=e)}const u=Hb(n,"backward");if(u){const e=parseFloat(String(u.attrs.val??""));Number.isFinite(e)&&(o.backward=e)}const f=Hb(n,"intercept");if(f){const e=parseFloat(String(f.attrs.val??""));Number.isFinite(e)&&(o.intercept=e)}const d=Hb(n,"dispEq");d&&!0===bw(d)&&(o.dispEquation=!0);const h=Hb(n,"dispRSqr");h&&!0===bw(h)&&(o.dispRSquared=!0);const p=Hb(n,"spPr");if(p){const e=Hb(p,"ln");if(e){const t=Hb(e,"solidFill");if(t){const e=Hb(t,"srgbClr");if(e){const t=zw(e.attrs.val);t&&(o.lineColor=t)}}const n=e.attrs.w;if("string"==typeof n){const e=Number.parseFloat(n);if(Number.isFinite(e)&&e>0){const t=Math.round(e/Bw*4)/4;o.lineWidth=t>=Cw&&t<=Ew?t:t<Cw?Cw:Ew}}const r=Hb(e,"prstDash");if(r){const e=r.attrs.val;if("string"==typeof e){const t=e.trim();kw.has(t)&&"solid"!==t&&(o.lineDash=t)}}}}t.push(o)}return t.length>0?t:void 0}(e);void 0!==t&&(r.trendlines=t);const n=function(e){const t=[];for(const n of qb(e)){if("errBars"!==n.local)continue;const e=Hb(n,"errDir");if(!e)continue;const r=e.attrs.val;if("string"!=typeof r)continue;const i=r.trim();if(!zI.has(i))continue;const o=Hb(n,"errBarType");if(!o)continue;const a=o.attrs.val;if("string"!=typeof a)continue;const s=a.trim();if(!jI.has(s))continue;const l=Hb(n,"errValType");if(!l)continue;const c=l.attrs.val;if("string"!=typeof c)continue;const u=c.trim();if(!VI.has(u))continue;const f={direction:i,type:s,valType:u},d=Hb(n,"val");if(d){const e=parseFloat(String(d.attrs.val??""));Number.isFinite(e)&&(f.value=e)}const h=Hb(n,"noEndCap");h&&!0===bw(h)&&(f.noEndCap=!0);const p=Hb(n,"spPr");if(p){const e=Hb(p,"ln");if(e){const t=Hb(e,"solidFill");if(t){const e=Hb(t,"srgbClr");if(e){const t=zw(e.attrs.val);t&&(f.lineColor=t)}}const n=e.attrs.w;if("string"==typeof n){const e=Number.parseFloat(n);if(Number.isFinite(e)&&e>0){const t=Math.round(e/Bw*4)/4;f.lineWidth=t<Cw?Cw:t>Ew?Ew:t}}const r=Hb(e,"prstDash");if(r){const e=r.attrs.val;if("string"==typeof e){const t=e.trim();kw.has(t)&&"solid"!==t&&(f.lineDash=t)}}}}t.push(f)}return t.length>0?t:void 0}(e);void 0!==n&&(r.errorBars=n)}if("bubble"===t){const t=function(e){return Iw(Hb(e,"bubbleSize"))}(e);void 0!==t&&(r.bubbleSizeRef=t)}if("bar3D"===t){const t=function(e){const t=Hb(e,"shape");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();return PI.has(r)?r:void 0}(e);void 0!==t&&(r.shape3D=t)}return r}function ix(e){const t=Hb(e,"marker");if(!t)return;const n={},r=Hb(t,"symbol");if(r){const e=r.attrs.val;"string"==typeof e&&ZI.has(e)&&(n.symbol=e)}const i=Hb(t,"size");if(i){const e=i.attrs.val;if("string"==typeof e){const t=Number.parseInt(e,10);Number.isFinite(t)&&(n.size=t<2?2:t>72?72:t)}}const o=Hb(t,"spPr");if(o){const e=Hb(o,"solidFill");if(e){const t=Hb(e,"srgbClr"),r=t?.attrs.val;if("string"==typeof r){const e=r.replace(/^#/,"").toUpperCase();/^[0-9A-F]{6}$/.test(e)&&(n.fill=e)}}const t=Hb(o,"ln");if(t){const e=Hb(t,"solidFill");if(e){const t=Hb(e,"srgbClr"),r=t?.attrs.val;if("string"==typeof r){const e=r.replace(/^#/,"").toUpperCase();/^[0-9A-F]{6}$/.test(e)&&(n.line=e)}}}}return void 0!==n.symbol||void 0!==n.size||void 0!==n.fill||void 0!==n.line?n:void 0}function ox(e,t,n,r,i){const o=[hw("c:idx",{val:t}),hw("c:order",{val:t})];e.name&&o.push(gw("c:tx",void 0,[gw("c:v",void 0,uw(e.name))]));const a=function(e,t){let n;if("string"==typeof e){const t=e.replace(/^#/,"").toUpperCase();n=/^[0-9A-F]{6}$/.test(t)?t:void 0}else void 0!==e&&(n=Pw(e));const r=(c=t?.dash,void 0===c?void 0:Sw.has(c)?c:void 0),i=Gw(t?.width),o=Nw(t?.cap),a="flat"===o?void 0:o,s=Mw(t?.compound),l="sng"===s?void 0:s;var c;if(!n&&void 0===r&&void 0===i&&void 0===a&&void 0===l)return;const u=[];void 0!==n&&u.push(gw("a:solidFill",void 0,[$w(n)]));if(void 0!==n||void 0!==r||void 0!==i||void 0!==a||void 0!==l){const e={};void 0!==i&&(e.w=Math.round(i*Bw)),void 0!==a&&(e.cap=a),void 0!==l&&(e.cmpd=l);const t=[];void 0!==n&&t.push(gw("a:solidFill",void 0,[$w(n)])),void 0!==r&&t.push(hw("a:prstDash",{val:r})),u.push(0===t.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,t))}return gw("c:spPr",void 0,u)}(e.color,i?.stroke);a&&o.push(a);const s=ax(i?.marker);s&&o.push(s),!0===i?.invertIfNegative&&o.push(hw("c:invertIfNegative",{val:1}));const l=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<=0?void 0:t>400?400:t}(i?.explosion);void 0!==l&&o.push(hw("c:explosion",{val:l}));const c=function(e,t){if(!e||0===e.length)return[];const n="pie"===t||"doughnut"===t||"pie3D"===t,r=[];for(const t of e){if(!Number.isFinite(t.idx)||t.idx<0)continue;const e=Math.floor(t.idx),i=[];i.push(hw("c:idx",{val:e}));const o=ax(t.marker);if(o&&i.push(o),i.push(hw("c:bubble3D",{val:!0===t.bubble3D?1:0})),n&&void 0!==t.explosion&&Number.isFinite(t.explosion)){const e=Math.max(0,Math.min(400,Math.round(t.explosion)));e>0&&i.push(hw("c:explosion",{val:e}))}const a=zw(t.fillColor),s=zw(t.borderColor),l=Gw(t.borderWidth),c=Jw(t.borderDash);if(a||s||void 0!==l||void 0!==c){const e=[];if(a&&e.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:a})])),s||void 0!==l||void 0!==c){const t={};void 0!==l&&(t.w=Math.round(l*Bw));const n=[];s&&n.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:s})])),void 0!==c&&n.push(hw("a:prstDash",{val:c})),e.push(0===n.length?hw("a:ln",t):gw("a:ln",Object.keys(t).length>0?t:void 0,n))}i.push(gw("c:spPr",void 0,e))}r.push(gw("c:dPt",void 0,i))}return r}(i.dataPoints,i.chartType);for(const e of c)o.push(e);const u=(f=e.dataLabels,i.dataLabels,d=i.chartType,!1===f?gw("c:dLbls",void 0,[gw("c:dLbl",void 0,[hw("c:idx",{val:0}),hw("c:delete",{val:1})]),hw("c:delete",{val:1})]):f?OI(f,d):void 0);var f,d;if(u&&o.push(u),i.trendlines&&i.trendlines.length>0){if(!("pie"===i.chartType||"doughnut"===i.chartType)){const e=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const e=XI(n);e&&t.push(e)}return t}(i.trendlines);for(const t of e)o.push(t)}}if(i.errorBars&&i.errorBars.length>0){if(!("pie"===i.chartType||"doughnut"===i.chartType)){const e=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const e=KI(n);e&&t.push(e)}return t}(i.errorBars);for(const t of e)o.push(t)}}if(e.categories){const t=nx(e.categories,n);r?o.push(gw("c:xVal",void 0,[gw("c:numRef",void 0,[gw("c:f",void 0,uw(t))])])):o.push(gw("c:cat",void 0,[gw("c:strRef",void 0,[gw("c:f",void 0,uw(t))])]))}const h=nx(e.values,n);if(r?o.push(gw("c:yVal",void 0,[gw("c:numRef",void 0,[gw("c:f",void 0,uw(h))])])):o.push(gw("c:val",void 0,[gw("c:numRef",void 0,[gw("c:f",void 0,uw(h))])])),void 0!==i?.smooth&&o.push(hw("c:smooth",{val:i.smooth?1:0})),void 0!==i.shape3D){const e=YI(i.shape3D);e&&o.push(e)}if("string"==typeof i.bubbleSize&&i.bubbleSize.length>0){const e=nx(i.bubbleSize,n);o.push(gw("c:bubbleSize",void 0,[gw("c:numRef",void 0,[gw("c:f",void 0,uw(e))])]))}return gw("c:ser",void 0,o)}function ax(e){if(!e)return;const t=function(e){if(void 0!==e)return ZI.has(e)?e:void 0}(e.symbol),n=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<ex?ex:t>tx?tx:t}(e.size),r=zw(e.fill),i=zw(e.line);if(void 0===t&&void 0===n&&!r&&!i)return;const o=[];if(void 0!==t&&o.push(hw("c:symbol",{val:t})),void 0!==n&&o.push(hw("c:size",{val:n})),r||i){const e=[];r&&e.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:r})])),i&&e.push(gw("a:ln",void 0,[gw("a:solidFill",void 0,[hw("a:srgbClr",{val:i})])])),o.push(gw("c:spPr",void 0,e))}return gw("c:marker",void 0,o)}const sx=lI,lx=cI,cx=new Set(["none","in","out","cross"]),ux=new Set(["nextTo","low","high","none"]),fx=new Set(["ctr","l","r"]),dx=-90,hx=90,px=new Set(["autoZero","min","max"]),gx=new Set(["hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions"]),mx=new Set(["between","midCat"]);function yx(e,t){const n=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");if(r){const e=[];yw(r,e);const t=e.join("").trim();return t.length>0?t:void 0}const i=Hb(n,"strRef");if(i){const e=Hb(i,"strCache");if(e)for(const t of qb(e)){if("pt"!==t.local)continue;const e=Hb(t,"v");if(e){const t=vw(e).trim();if(t.length>0)return t}}}return}(e),r=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");if(!r)return;const i=Hb(r,"bodyPr");if(!i)return;const o=i.attrs.rot;if("string"!=typeof o)return;const a=o.trim();if(0===a.length)return;const s=Number.parseInt(a,10);if(!Number.isFinite(s))return;const l=Math.round(s/sI);return 0===l?void 0:l<dx?dx:l>hx?hx:l}(e),i=function(e){const t=oI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/sx*2)/2;return o<1||o>lx?void 0:o}(e),o=function(e){const t=oI(e);if(!t)return;return!0===Aw(t.attrs.b)||void 0}(e),a=function(e){const t=oI(e);if(!t)return;return!0===Aw(t.attrs.i)||void 0}(e),s=function(e){const t=oI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(e),l=function(e){const t=oI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(e),c=function(e){const t=oI(e);if(!t)return;return"sng"===t.attrs.u||void 0}(e),u=function(e){const t=oI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0===i.length?void 0:i}(e),f=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"overlay");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;switch(r){case"1":case"true":return!0;default:return}}(e),d=function(e){const t=Hb(e,"title");return t?eI(t):void 0}(e),h=function(e){const t=Hb(e,"title");return t?jw(t):void 0}(e),p=function(e){const t=Hb(e,"title");return t?Vw(t):void 0}(e),g=function(e){const t=Hb(e,"title");return t?Yw(t):void 0}(e),m=function(e){const t=Hb(e,"title");return t?Ww(t):void 0}(e),y=function(e){const t=Hb(e,"title");return t?Qw(t):void 0}(e),v=function(e){const t=Hb(e,"title");return t?Tw(t):void 0}(e),A=function(e){const t=void 0!==Hb(e,"majorGridlines"),n=void 0!==Hb(e,"minorGridlines");if(!t&&!n)return;const r={};t&&(r.major=!0);n&&(r.minor=!0);return r}(e),b=function(e){const t={},n=Hb(e,"scaling");if(n){const e=xw(n,"min");void 0!==e&&(t.min=e);const r=xw(n,"max");void 0!==r&&(t.max=r);const i=xw(n,"logBase");void 0!==i&&(t.logBase=i)}const r=xw(e,"majorUnit");void 0!==r&&r>0&&(t.majorUnit=r);const i=xw(e,"minorUnit");void 0!==i&&i>0&&(t.minorUnit=i);return Object.keys(t).length>0?t:void 0}(e),w=function(e){const t=Hb(e,"numFmt");if(!t)return;const n=t.attrs.formatCode;if("string"!=typeof n||0===n.length)return;const r={formatCode:n},i=t.attrs.sourceLinked;void 0!==i&&!0===Aw(i)&&(r.sourceLinked=!0);return r}(e),I=vx(e,"majorTickMark","out"),x=vx(e,"minorTickMark","none"),C=function(e){const t=Hb(e,"tickLblPos");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();return ux.has(r)?"nextTo"===r?void 0:r:void 0}(e),E=function(e){const t=Hb(e,"txPr");if(!t)return;const n=Hb(t,"bodyPr");if(!n)return;const r=n.attrs.rot;if("string"!=typeof r)return;const i=r.trim();if(0===i.length)return;const o=Number.parseInt(i,10);if(!Number.isFinite(o))return;const a=Math.round(o/sI);return 0===a?void 0:a<dx?dx:a>hx?hx:a}(e),B=function(e){const t=iI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/sx*2)/2;return o<1||o>lx?void 0:o}(e),S=function(e){const t=iI(e);if(!t)return;return!0===Aw(t.attrs.b)||void 0}(e),k=function(e){const t=iI(e);if(!t)return;return!0===Aw(t.attrs.i)||void 0}(e),F=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(e),D=function(e){const t=iI(e);if(!t)return;return"sng"===t.attrs.u||void 0}(e),N=function(e){const t=iI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(e),M=function(e){const t=iI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0===i.length?void 0:i}(e),Q=function(e){const t=Hb(e,"scaling");if(!t)return;const n=Hb(t,"orientation");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;return"maxMin"===r.trim()||void 0}(e),T="catAx"===e.local||"dateAx"===e.local,L=T?Ax(e,"tickLblSkip"):void 0,R=T?Ax(e,"tickMarkSkip"):void 0,U=T?function(e){const t=Hb(e,"lblOffset");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);return Number.isFinite(i)?i<0||i>1e3||100===i?void 0:i:void 0}(e):void 0,H=T?function(e){const t=Hb(e,"lblAlgn");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();return fx.has(r)?"ctr"===r?void 0:r:void 0}(e):void 0,q="catAx"===e.local?function(e){const t=Hb(e,"noMultiLvlLbl");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n.trim()){case"1":case"true":return!0;default:return}}(e):void 0,O="catAx"===e.local?function(e){const t=Hb(e,"auto");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n.trim()){case"0":case"false":return!1;default:return}}(e):void 0,P=function(e){const t=Hb(e,"delete");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n.trim()){case"1":case"true":return!0;default:return}}(e),$=function(e){const t=Hb(e,"crossesAt");if(t){const e=t.attrs.val;if("string"==typeof e){const t=e.trim();if(t.length>0){const e=Number.parseFloat(t);if(Number.isFinite(e))return{crossesAt:e}}}}const n=Hb(e,"crosses");if(!n)return{};const r=n.attrs.val;if("string"!=typeof r)return{};const i=r.trim();return px.has(i)?"autoZero"===i?{}:{crosses:i}:{}}(e),z=$.crosses,j=$.crossesAt,V="valAx"===e.local?function(e){const t=Hb(e,"dispUnits");if(!t)return;const n={},r=Hb(t,"custUnit");if(r){const e=r.attrs.val;if("string"==typeof e){const t=Number.parseFloat(e.trim());Number.isFinite(t)&&t>0&&(n.custUnit=t)}}if(void 0===n.custUnit){const e=Hb(t,"builtInUnit");if(e){const t=e.attrs.val;if("string"==typeof t){const e=t.trim();gx.has(e)&&(n.unit=e)}}}if(void 0===n.unit&&void 0===n.custUnit)return;const i=Hb(t,"dispUnitsLbl");if(i){n.showLabel=!0;const e=Hb(i,"tx");if(e){const t=Hb(e,"rich");if(t){const e=[];for(const n of t.children){if("string"==typeof n)continue;if("p"!==n.local)continue;const t=[];for(const e of n.children)if("string"!=typeof e&&"r"===e.local)for(const n of e.children){if("string"==typeof n)continue;if("t"!==n.local)continue;let e="";for(const t of n.children)"string"==typeof t&&(e+=t);t.push(e)}t.length>0&&e.push(t.join(""))}const r=e.join("\n").trim();r.length>0&&(n.customLabel=r)}}}return n}(e):void 0,Y="valAx"===e.local?function(e){const t=Hb(e,"crossBetween");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=n.trim();return mx.has(r)?r:void 0}(e):void 0,W=Y===t?void 0:Y;if(void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a&&void 0===s&&void 0===l&&void 0===c&&void 0===u&&void 0===f&&void 0===d&&void 0===h&&void 0===p&&void 0===g&&void 0===m&&void 0===y&&void 0===v&&void 0===A&&void 0===b&&void 0===w&&void 0===I&&void 0===x&&void 0===C&&void 0===E&&void 0===B&&void 0===S&&void 0===k&&void 0===F&&void 0===M&&void 0===D&&void 0===N&&void 0===Q&&void 0===L&&void 0===R&&void 0===U&&void 0===H&&void 0===q&&void 0===O&&void 0===P&&void 0===z&&void 0===j&&void 0===V&&void 0===W)return;const G={};return void 0!==n&&(G.title=n),void 0!==r&&(G.axisTitleRotation=r),void 0!==i&&(G.axisTitleFontSize=i),void 0!==o&&(G.axisTitleBold=o),void 0!==a&&(G.axisTitleItalic=a),void 0!==s&&(G.axisTitleColor=s),void 0!==l&&(G.axisTitleStrike=l),void 0!==c&&(G.axisTitleUnderline=c),void 0!==u&&(G.axisTitleFontFamily=u),void 0!==f&&(G.axisTitleOverlay=f),void 0!==d&&(G.axisTitleLayout=d),void 0!==h&&(G.axisTitleFillColor=h),void 0!==p&&(G.axisTitleBorderColor=p),void 0!==g&&(G.axisTitleBorderWidth=g),void 0!==m&&(G.axisTitleBorderDash=m),void 0!==y&&(G.axisTitleBorderCap=y),void 0!==v&&(G.axisTitleBorderCompound=v),void 0!==A&&(G.gridlines=A),void 0!==b&&(G.scale=b),void 0!==w&&(G.numberFormat=w),void 0!==I&&(G.majorTickMark=I),void 0!==x&&(G.minorTickMark=x),void 0!==C&&(G.tickLblPos=C),void 0!==E&&(G.labelRotation=E),void 0!==B&&(G.labelFontSize=B),void 0!==S&&(G.labelBold=S),void 0!==k&&(G.labelItalic=k),void 0!==F&&(G.labelColor=F),void 0!==M&&(G.labelFontFamily=M),void 0!==D&&(G.labelUnderline=D),void 0!==N&&(G.labelStrike=N),void 0!==Q&&(G.reverse=Q),void 0!==L&&(G.tickLblSkip=L),void 0!==R&&(G.tickMarkSkip=R),void 0!==U&&(G.lblOffset=U),void 0!==H&&(G.lblAlgn=H),void 0!==q&&(G.noMultiLvlLbl=q),void 0!==O&&(G.auto=O),void 0!==P&&(G.hidden=P),void 0!==z&&(G.crosses=z),void 0!==j&&(G.crossesAt=j),void 0!==V&&(G.dispUnits=V),void 0!==W&&(G.crossBetween=W),G}function vx(e,t,n){const r=Hb(e,t);if(!r)return;const i=r.attrs.val;if("string"!=typeof i)return;const o=i.trim();return cx.has(o)?o===n?void 0:o:void 0}function Ax(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;const i=r.trim();if(0===i.length)return;const o=Number.parseInt(i,10);return Number.isFinite(o)&&!(o<1||o>32767)&&1!==o?o:void 0}const bx=new Set(["autoZero","min","max"]),wx=111111111,Ix=222222222,xx=333333333,Cx=444444444,Ex=new Set(["none","in","out","cross"]),Bx=new Set(["nextTo","low","high","none"]);function Sx(e){if(!0===e.autoTitleDeleted)return!0;if(!1===e.autoTitleDeleted)return!1;return!((e.showTitle??Boolean(e.title))&&e.title)}function kx(e){if("string"!=typeof e)return;const t=e.trim();return t.length>0?t:void 0}function Fx(e){if(!e)return;const t=!0===e.major,n=!0===e.minor;return t||n?{major:t,minor:n}:void 0}function Dx(e){if(!e)return[];const t=[];return e.major&&t.push(gw("c:majorGridlines",void 0,[])),e.minor&&t.push(gw("c:minorGridlines",void 0,[])),t}function Nx(e){if(!e)return;const t={};return"number"==typeof e.min&&Number.isFinite(e.min)&&(t.min=e.min),"number"==typeof e.max&&Number.isFinite(e.max)&&(t.max=e.max),void 0!==t.min&&void 0!==t.max&&t.min>=t.max&&delete t.max,"number"==typeof e.majorUnit&&Number.isFinite(e.majorUnit)&&e.majorUnit>0&&(t.majorUnit=e.majorUnit),"number"==typeof e.minorUnit&&Number.isFinite(e.minorUnit)&&e.minorUnit>0&&(t.minorUnit=e.minorUnit),"number"==typeof e.logBase&&Number.isFinite(e.logBase)&&e.logBase>=2&&e.logBase<=1e3&&(t.logBase=e.logBase),Object.keys(t).length>0?t:void 0}function Mx(e){if(!e)return;const t="string"==typeof e.formatCode?e.formatCode:"";if(0===t.length)return;const n={formatCode:t};return!0===e.sourceLinked&&(n.sourceLinked=!0),n}function Qx(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<1||t>32767||1===t?void 0:t}function Tx(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<0||t>1e3||100===t?void 0:t}function Lx(e){if(void 0!==e&&("ctr"===e||"l"===e||"r"===e)&&"ctr"!==e)return e}function Rx(e){return!0===e}function Ux(e){if(void 0===e||"number"!=typeof e||!Number.isFinite(e))return;let t=Math.round(e);return t<dx?t=dx:t>hx&&(t=hx),0!==t?t:void 0}function Hx(e){if(void 0===e||"number"!=typeof e||!Number.isFinite(e))return;const t=Math.round(2*e)/2;return t<1||t>lx?void 0:t}function qx(e){return gI(e)}function Ox(e){return mI(e)}function Px(e){return yI(e)}function $x(e){return AI(e)}function zx(e){return vI(e)}function jx(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}function Vx(e,t,n,r,i,o,a,s){if(void 0===e&&void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a&&void 0===s)return;const l=void 0===e?void 0:e*sI,c=void 0===t?void 0:t*sx,u=void 0===n?void 0:n?1:0,f=void 0===r?void 0:r?1:0,d=!0===o?"sng":void 0,h=!0===a?"sngStrike":void 0,p=void 0!==i?gw("a:solidFill",void 0,[$w(i)]):void 0,g=s?hw("a:latin",{typeface:s}):void 0,m=[];p&&m.push(p),g&&m.push(g);const y=m.length>0?gw("a:defRPr",{sz:c,b:u,i:f,u:d,strike:h},m):hw("a:defRPr",{sz:c,b:u,i:f,u:d,strike:h});return gw("c:txPr",void 0,[hw("a:bodyPr",{rot:l}),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[y]),hw("a:endParaRPr",{lang:"en-US"})])])}function Yx(e,t){return"number"==typeof t&&Number.isFinite(t)?{kind:"numeric",value:t}:void 0!==e&&bx.has(e)&&"autoZero"!==e?{kind:"semantic",value:e}:{kind:"default"}}function Wx(e){switch(e.kind){case"numeric":return hw("c:crossesAt",{val:e.value});case"semantic":return hw("c:crosses",{val:e.value});case"default":return hw("c:crosses",{val:"autoZero"})}}function Gx(e,t=!1){const{before:n,after:r}=function(e){if(!e)return{before:[],after:[]};const t=[],n=[];return void 0!==e.logBase&&t.push(hw("c:logBase",{val:e.logBase})),void 0!==e.max&&n.push(hw("c:max",{val:e.max})),void 0!==e.min&&n.push(hw("c:min",{val:e.min})),{before:t,after:n}}(e);return gw("c:scaling",void 0,[...n,hw("c:orientation",{val:t?"maxMin":"minMax"}),...r])}function Jx(e){if(!e)return[];const t=[];return void 0!==e.majorUnit&&t.push(hw("c:majorUnit",{val:e.majorUnit})),void 0!==e.minorUnit&&t.push(hw("c:minorUnit",{val:e.minorUnit})),t}function _x(e){if(void 0===e)return;if("string"==typeof e)return gx.has(e)?{unit:e}:void 0;if("object"!=typeof e||null===e)return;const t={},n=e.unit;"string"==typeof n&&gx.has(n)&&(t.unit=n);const r=e.custUnit;if("number"==typeof r&&Number.isFinite(r)&&r>0&&(t.custUnit=r),void 0!==t.unit||void 0!==t.custUnit){if(!0===e.showLabel&&(t.showLabel=!0),"string"==typeof e.customLabel){const n=e.customLabel.trim();n.length>0&&(t.customLabel=n)}return t}}function Xx(e){if(!e)return[];const t=[];if(void 0!==e.custUnit)t.push(hw("c:custUnit",{val:e.custUnit}));else{if(void 0===e.unit)return[];t.push(hw("c:builtInUnit",{val:e.unit}))}if(!0===e.showLabel||"string"==typeof e.customLabel&&e.customLabel.trim().length>0){const n="string"==typeof e.customLabel?e.customLabel.trim():"";if(n.length>0){const e=n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=gw("c:rich",void 0,[hw("a:bodyPr"),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:r",void 0,[gw("a:t",void 0,e)])])]),i=gw("c:tx",void 0,[r]);t.push(gw("c:dispUnitsLbl",void 0,[i]))}else t.push(hw("c:dispUnitsLbl"))}return[gw("c:dispUnits",void 0,t)]}function Kx(e){if("string"==typeof e)return mx.has(e)?e:void 0}function Zx(e){if(!e)return[];const t=!0===e.sourceLinked?1:0;return[hw("c:numFmt",{formatCode:e.formatCode,sourceLinked:t})]}function eC(e){if(void 0!==e)return Ex.has(e)?e:void 0}function tC(e){if(void 0!==e)return Bx.has(e)?e:void 0}function nC(e,t,n){const r=[];return void 0!==e&&r.push(hw("c:majorTickMark",{val:e})),void 0!==t&&r.push(hw("c:minorTickMark",{val:t})),void 0!==n&&r.push(hw("c:tickLblPos",{val:n})),r}function rC(e,t){const n="column"===e?"b":"l",r="column"===e?"l":"b",i=[hw("c:axId",{val:wx}),Gx(t.xScale,t.xReverse),hw("c:delete",{val:t.xHidden?1:0}),hw("c:axPos",{val:n}),...Dx(t.xGridlines)];t.xAxisTitle&&i.push(iC(t.xAxisTitle,t.xAxisTitleRotation,t.xAxisTitleFontSize,t.xAxisTitleBold,t.xAxisTitleItalic,t.xAxisTitleColor,t.xAxisTitleStrike,t.xAxisTitleUnderline,t.xAxisTitleFontFamily,t.xAxisTitleOverlay,t.xAxisTitleLayout,t.xAxisTitleFillColor,t.xAxisTitleBorderColor,t.xAxisTitleBorderWidth,t.xAxisTitleBorderDash,t.xAxisTitleBorderCap,t.xAxisTitleBorderCompound)),i.push(...Zx(t.xNumFmt),...nC(t.xMajorTickMark,t.xMinorTickMark,t.xTickLblPos));const o=Vx(t.xLabelRotation,t.xLabelFontSize,t.xLabelBold,t.xLabelItalic,t.xLabelColor,t.xLabelUnderline,t.xLabelStrike,t.xLabelFontFamily);o&&i.push(o),i.push(hw("c:crossAx",{val:Ix}),Wx(t.xCrosses),hw("c:auto",{val:t.xAuto?1:0}),hw("c:lblAlgn",{val:t.xLblAlgn??"ctr"}),hw("c:lblOffset",{val:t.xLblOffset??100}),...function(e,t){const n=[];return void 0!==e&&n.push(hw("c:tickLblSkip",{val:e})),void 0!==t&&n.push(hw("c:tickMarkSkip",{val:t})),n}(t.xTickLblSkip,t.xTickMarkSkip),hw("c:noMultiLvlLbl",{val:t.xNoMultiLvlLbl?1:0}));const a=[hw("c:axId",{val:Ix}),Gx(t.yScale,t.yReverse),hw("c:delete",{val:t.yHidden?1:0}),hw("c:axPos",{val:r}),...Dx(t.yGridlines)];t.yAxisTitle&&a.push(iC(t.yAxisTitle,t.yAxisTitleRotation,t.yAxisTitleFontSize,t.yAxisTitleBold,t.yAxisTitleItalic,t.yAxisTitleColor,t.yAxisTitleStrike,t.yAxisTitleUnderline,t.yAxisTitleFontFamily,t.yAxisTitleOverlay,t.yAxisTitleLayout,t.yAxisTitleFillColor,t.yAxisTitleBorderColor,t.yAxisTitleBorderWidth,t.yAxisTitleBorderDash,t.yAxisTitleBorderCap,t.yAxisTitleBorderCompound)),a.push(...Zx(t.yNumFmt),...nC(t.yMajorTickMark,t.yMinorTickMark,t.yTickLblPos));const s=Vx(t.yLabelRotation,t.yLabelFontSize,t.yLabelBold,t.yLabelItalic,t.yLabelColor,t.yLabelUnderline,t.yLabelStrike,t.yLabelFontFamily);return s&&a.push(s),a.push(hw("c:crossAx",{val:wx}),Wx(t.yCrosses),hw("c:crossBetween",{val:t.yCrossBetween??"between"}),...Jx(t.yScale),...Xx(t.yDispUnits)),[gw("c:catAx",void 0,i),gw("c:valAx",void 0,a)]}function iC(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g,m){const y=void 0===t?0:6e4*t,v=void 0===n?1e3:n*sx,A=r?1:0,b=!0===i?1:void 0,w=!0===a?"sngStrike":void 0,I=!0===s?"sng":void 0,x=void 0!==o?gw("a:solidFill",void 0,[$w(o)]):void 0,C=l?hw("a:latin",{typeface:l}):void 0,E=[];x&&E.push(x),C&&E.push(C);const B=E.length>0?gw("a:defRPr",{sz:v,b:A,i:b,u:I,strike:w},E):hw("a:defRPr",{sz:v,b:A,i:b,u:I,strike:w}),S=E.length>0?gw("a:rPr",{lang:"en-US",sz:v,b:A,i:b,u:I,strike:w},E):hw("a:rPr",{lang:"en-US",sz:v,b:A,i:b,u:I,strike:w}),k=rI(u),F=[gw("c:tx",void 0,[gw("c:rich",void 0,[gw("a:bodyPr",{rot:y,spcFirstLastPara:1,vertOverflow:"ellipsis",wrap:"square",anchor:"ctr",anchorCtr:1},[]),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[B]),gw("a:r",void 0,[S,gw("a:t",void 0,uw(e))])])])])];k&&F.push(k),F.push(hw("c:overlay",{val:c?1:0}));const D=dI(f,d,h,p,g,m);return void 0!==D&&F.push(D),gw("c:title",void 0,F)}function oC(e){return hI(e)}function aC(e){return pI(e)}function sC(e){return gI(e)}function lC(e){return mI(e)}function cC(e){return yI(e)}function uC(e){return vI(e)}function fC(e){return AI(e)}function dC(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}const hC=new Set(["pie","pie3D","doughnut","ofPie"]),pC=new Set(["none","line","lineMarker","marker","smooth","smoothMarker"]),gC=new Set(["pie","doughnut"]),mC=new Set(["none","line","lineMarker","marker","smooth","smoothMarker"]);function yC(e,t){const n=Hb(e,"varyColors");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;const i=hC.has(t);let o;switch(r){case"1":case"true":o=!0;break;case"0":case"false":o=!1;break;default:return}return o!==i?o:void 0}function vC(e){const t=Hb(e,"scatterStyle");if(!t)return;const n=t.attrs.val;return"string"==typeof n&&pC.has(n)?n:void 0}function AC(e){return!!Hb(e,"dropLines")||void 0}function bC(e){return!!Hb(e,"hiLowLines")||void 0}function wC(e){return!!Hb(e,"serLines")||void 0}function IC(e){const t=Hb(e,"marker");if(!t)return;const n=t.attrs.val;if("string"==typeof n)switch(n){case"0":case"false":return!1;default:return}}function xC(e){const t=Hb(e,"grouping");if(!t)return;const n=t.attrs.val;if("string"==typeof n)switch(n){case"stacked":return"stacked";case"percentStacked":return"percentStacked";case"clustered":return"clustered";default:return}}function CC(e){const t=Hb(e,"holeSize");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<1||r>99)?r:void 0}function EC(e){const t=Hb(e,"gapWidth");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<0||r>500)&&150!==r?r:void 0}function BC(e){const t=Hb(e,"gapWidth");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<0||r>500)&&150!==r?r:void 0}function SC(e){const t=Hb(e,"overlap");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<-100||r>100)&&0!==r?r:void 0}function kC(e){const t=Hb(e,"firstSliceAng");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;const r=Number.parseInt(n,10);return Number.isFinite(r)&&!(r<0||r>360)&&0!==r&&360!==r?r:void 0}function FC(e){const t=Hb(e,"grouping");if(!t)return;const n=t.attrs.val;if("string"==typeof n)switch(n){case"stacked":return"stacked";case"percentStacked":return"percentStacked";default:return}}function DC(e,t){const n=rI(function(e){return tI(e.plotAreaLayout)}(e)),r=[n??hw("c:layout")],i={xAxisTitle:kx(e.axes?.x?.title),yAxisTitle:kx(e.axes?.y?.title),xAxisTitleRotation:oC(e.axes?.x?.axisTitleRotation),yAxisTitleRotation:oC(e.axes?.y?.axisTitleRotation),xAxisTitleFontSize:aC(e.axes?.x?.axisTitleFontSize),yAxisTitleFontSize:aC(e.axes?.y?.axisTitleFontSize),xAxisTitleBold:sC(e.axes?.x?.axisTitleBold),yAxisTitleBold:sC(e.axes?.y?.axisTitleBold),xAxisTitleItalic:lC(e.axes?.x?.axisTitleItalic),yAxisTitleItalic:lC(e.axes?.y?.axisTitleItalic),xAxisTitleColor:cC(e.axes?.x?.axisTitleColor),yAxisTitleColor:cC(e.axes?.y?.axisTitleColor),xAxisTitleStrike:uC(e.axes?.x?.axisTitleStrike),yAxisTitleStrike:uC(e.axes?.y?.axisTitleStrike),xAxisTitleUnderline:fC(e.axes?.x?.axisTitleUnderline),yAxisTitleUnderline:fC(e.axes?.y?.axisTitleUnderline),xAxisTitleFontFamily:dC(e.axes?.x?.axisTitleFontFamily),yAxisTitleFontFamily:dC(e.axes?.y?.axisTitleFontFamily),xAxisTitleOverlay:!0===e.axes?.x?.axisTitleOverlay,yAxisTitleOverlay:!0===e.axes?.y?.axisTitleOverlay,xAxisTitleLayout:tI(e.axes?.x?.axisTitleLayout),yAxisTitleLayout:tI(e.axes?.y?.axisTitleLayout),xAxisTitleFillColor:yI(e.axes?.x?.axisTitleFillColor),yAxisTitleFillColor:yI(e.axes?.y?.axisTitleFillColor),xAxisTitleBorderColor:yI(e.axes?.x?.axisTitleBorderColor),yAxisTitleBorderColor:yI(e.axes?.y?.axisTitleBorderColor),xAxisTitleBorderWidth:Gw(e.axes?.x?.axisTitleBorderWidth),yAxisTitleBorderWidth:Gw(e.axes?.y?.axisTitleBorderWidth),xAxisTitleBorderDash:Jw(e.axes?.x?.axisTitleBorderDash),yAxisTitleBorderDash:Jw(e.axes?.y?.axisTitleBorderDash),xAxisTitleBorderCap:Nw(e.axes?.x?.axisTitleBorderCap),yAxisTitleBorderCap:Nw(e.axes?.y?.axisTitleBorderCap),xAxisTitleBorderCompound:Mw(e.axes?.x?.axisTitleBorderCompound),yAxisTitleBorderCompound:Mw(e.axes?.y?.axisTitleBorderCompound),xGridlines:Fx(e.axes?.x?.gridlines),yGridlines:Fx(e.axes?.y?.gridlines),xScale:Nx(e.axes?.x?.scale),yScale:Nx(e.axes?.y?.scale),xNumFmt:Mx(e.axes?.x?.numberFormat),yNumFmt:Mx(e.axes?.y?.numberFormat),xMajorTickMark:eC(e.axes?.x?.majorTickMark),yMajorTickMark:eC(e.axes?.y?.majorTickMark),xMinorTickMark:eC(e.axes?.x?.minorTickMark),yMinorTickMark:eC(e.axes?.y?.minorTickMark),xTickLblPos:tC(e.axes?.x?.tickLblPos),yTickLblPos:tC(e.axes?.y?.tickLblPos),xLabelRotation:Ux(e.axes?.x?.labelRotation),yLabelRotation:Ux(e.axes?.y?.labelRotation),xLabelFontSize:Hx(e.axes?.x?.labelFontSize),yLabelFontSize:Hx(e.axes?.y?.labelFontSize),xLabelBold:qx(e.axes?.x?.labelBold),yLabelBold:qx(e.axes?.y?.labelBold),xLabelItalic:Ox(e.axes?.x?.labelItalic),yLabelItalic:Ox(e.axes?.y?.labelItalic),xLabelColor:Px(e.axes?.x?.labelColor),yLabelColor:Px(e.axes?.y?.labelColor),xLabelUnderline:$x(e.axes?.x?.labelUnderline),yLabelUnderline:$x(e.axes?.y?.labelUnderline),xLabelStrike:zx(e.axes?.x?.labelStrike),yLabelStrike:zx(e.axes?.y?.labelStrike),xLabelFontFamily:jx(e.axes?.x?.labelFontFamily),yLabelFontFamily:jx(e.axes?.y?.labelFontFamily),xReverse:!0===e.axes?.x?.reverse,yReverse:!0===e.axes?.y?.reverse,xTickLblSkip:Qx(e.axes?.x?.tickLblSkip),xTickMarkSkip:Qx(e.axes?.x?.tickMarkSkip),xLblOffset:Tx(e.axes?.x?.lblOffset),xLblAlgn:Lx(e.axes?.x?.lblAlgn),xNoMultiLvlLbl:!0===e.axes?.x?.noMultiLvlLbl,xAuto:!1!==e.axes?.x?.auto,xHidden:Rx(e.axes?.x?.hidden),yHidden:Rx(e.axes?.y?.hidden),xCrosses:Yx(e.axes?.x?.crosses,e.axes?.x?.crossesAt),yCrosses:Yx(e.axes?.y?.crosses,e.axes?.y?.crossesAt),xDispUnits:_x(e.axes?.x?.dispUnits),yDispUnits:_x(e.axes?.y?.dispUnits),xCrossBetween:Kx(e.axes?.x?.crossBetween),yCrossBetween:Kx(e.axes?.y?.crossBetween)};switch(e.type){case"bar":case"column":r.push(function(e,t){const n=e.barGrouping??"clustered",r="bar"===e.type?"bar":"col",i="percentStacked"===n||"stacked"===n,o=[hw("c:barDir",{val:r}),hw("c:grouping",{val:n}),hw("c:varyColors",{val:QC(e)?1:0})];for(let n=0;n<e.series.length;n++)o.push(ox(e.series[n],n,t,!1,{chartType:e.type,dataLabels:e.dataLabels,invertIfNegative:!0===e.series[n].invertIfNegative,dataPoints:e.series[n].dataPoints,trendlines:e.series[n].trendlines,errorBars:e.series[n].errorBars}));const a=qI(e);a&&o.push(a);const s=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<0?0:t>500?500:t}(e.gapWidth),l=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<-100?-100:t>100?100:t}(e.overlap),c=s??(i?void 0:150);void 0!==c&&o.push(hw("c:gapWidth",{val:c}));const u=l??(i?100:void 0);void 0!==u&&o.push(hw("c:overlap",{val:u}));!0===e.serLines&&o.push(gw("c:serLines",void 0,[]));return o.push(hw("c:axId",{val:wx})),o.push(hw("c:axId",{val:Ix})),gw("c:barChart",void 0,o)}(e,t)),r.push(...rC(e.type,i));break;case"line":r.push(function(e,t){const n=e.lineGrouping??"standard",r=[hw("c:grouping",{val:n}),hw("c:varyColors",{val:QC(e)?1:0})];for(let n=0;n<e.series.length;n++){const i=ox(e.series[n],n,t,!1,{chartType:e.type,smooth:!0===e.series[n].smooth,dataLabels:e.dataLabels,stroke:e.series[n].stroke,marker:e.series[n].marker,dataPoints:e.series[n].dataPoints,trendlines:e.series[n].trendlines,errorBars:e.series[n].errorBars});r.push(i)}const i=qI(e);i&&r.push(i);!0===e.dropLines&&r.push(gw("c:dropLines",void 0,[]));!0===e.hiLowLines&&r.push(gw("c:hiLowLines",void 0,[]));!0===e.upDownBars&&r.push(function(e){const t=function(e){if(void 0===e||!Number.isFinite(e))return;const t=Math.round(e);return t<0||t>500?void 0:t}(e)??150;return gw("c:upDownBars",void 0,[hw("c:gapWidth",{val:t})])}(e.upDownBarsGapWidth));return r.push(hw("c:marker",{val:!1===e.showLineMarkers?0:1})),r.push(hw("c:axId",{val:wx})),r.push(hw("c:axId",{val:Ix})),gw("c:lineChart",void 0,r)}(e,t)),r.push(...rC("column",i));break;case"area":r.push(function(e,t){const n=e.areaGrouping??"standard",r=[hw("c:grouping",{val:n}),hw("c:varyColors",{val:QC(e)?1:0})];for(let n=0;n<e.series.length;n++)r.push(ox(e.series[n],n,t,!1,{chartType:e.type,dataLabels:e.dataLabels,dataPoints:e.series[n].dataPoints,trendlines:e.series[n].trendlines,errorBars:e.series[n].errorBars}));const i=qI(e);i&&r.push(i);!0===e.dropLines&&r.push(gw("c:dropLines",void 0,[]));return r.push(hw("c:axId",{val:wx})),r.push(hw("c:axId",{val:Ix})),gw("c:areaChart",void 0,r)}(e,t)),r.push(...rC("column",i));break;case"pie":r.push(function(e,t){const n=[hw("c:varyColors",{val:QC(e)?1:0})];e.series.length>0&&n.push(ox(e.series[0],0,t,!1,{chartType:e.type,dataLabels:e.dataLabels,explosion:e.series[0].explosion,dataPoints:e.series[0].dataPoints}));const r=qI(e);r&&n.push(r);const i=NC(e.firstSliceAng);void 0!==i&&n.push(hw("c:firstSliceAng",{val:i}));return gw("c:pieChart",void 0,n)}(e,t));break;case"doughnut":r.push(function(e,t){const n=[hw("c:varyColors",{val:QC(e)?1:0})];for(let r=0;r<e.series.length;r++)n.push(ox(e.series[r],r,t,!1,{chartType:e.type,dataLabels:e.dataLabels,explosion:e.series[r].explosion,dataPoints:e.series[r].dataPoints}));const r=qI(e);r&&n.push(r);return n.push(hw("c:firstSliceAng",{val:NC(e.firstSliceAng)??0})),n.push(hw("c:holeSize",{val:MC(e.holeSize)})),gw("c:doughnutChart",void 0,n)}(e,t));break;case"scatter":r.push(function(e,t){const n=[hw("c:scatterStyle",{val:TC(e)}),hw("c:varyColors",{val:QC(e)?1:0})];for(let r=0;r<e.series.length;r++)n.push(ox(e.series[r],r,t,!0,{chartType:e.type,smooth:!0===e.series[r].smooth||void 0,dataLabels:e.dataLabels,stroke:e.series[r].stroke,marker:e.series[r].marker,dataPoints:e.series[r].dataPoints,trendlines:e.series[r].trendlines,errorBars:e.series[r].errorBars}));const r=qI(e);r&&n.push(r);return n.push(hw("c:axId",{val:xx})),n.push(hw("c:axId",{val:Cx})),gw("c:scatterChart",void 0,n)}(e,t)),r.push(...function(e){const t=[hw("c:axId",{val:xx}),Gx(e.xScale,e.xReverse),hw("c:delete",{val:e.xHidden?1:0}),hw("c:axPos",{val:"b"}),...Dx(e.xGridlines)];e.xAxisTitle&&t.push(iC(e.xAxisTitle,e.xAxisTitleRotation,e.xAxisTitleFontSize,e.xAxisTitleBold,e.xAxisTitleItalic,e.xAxisTitleColor,e.xAxisTitleStrike,e.xAxisTitleUnderline,e.xAxisTitleFontFamily,e.xAxisTitleOverlay,e.xAxisTitleLayout,e.xAxisTitleFillColor,e.xAxisTitleBorderColor,e.xAxisTitleBorderWidth,e.xAxisTitleBorderDash,e.xAxisTitleBorderCap,e.xAxisTitleBorderCompound)),t.push(...Zx(e.xNumFmt),...nC(e.xMajorTickMark,e.xMinorTickMark,e.xTickLblPos));const n=Vx(e.xLabelRotation,e.xLabelFontSize,e.xLabelBold,e.xLabelItalic,e.xLabelColor,e.xLabelUnderline,e.xLabelStrike,e.xLabelFontFamily);n&&t.push(n),t.push(hw("c:crossAx",{val:Cx}),Wx(e.xCrosses),hw("c:crossBetween",{val:e.xCrossBetween??"midCat"}),...Jx(e.xScale),...Xx(e.xDispUnits));const r=[hw("c:axId",{val:Cx}),Gx(e.yScale,e.yReverse),hw("c:delete",{val:e.yHidden?1:0}),hw("c:axPos",{val:"l"}),...Dx(e.yGridlines)];e.yAxisTitle&&r.push(iC(e.yAxisTitle,e.yAxisTitleRotation,e.yAxisTitleFontSize,e.yAxisTitleBold,e.yAxisTitleItalic,e.yAxisTitleColor,e.yAxisTitleStrike,e.yAxisTitleUnderline,e.yAxisTitleFontFamily,e.yAxisTitleOverlay,e.yAxisTitleLayout,e.yAxisTitleFillColor,e.yAxisTitleBorderColor,e.yAxisTitleBorderWidth,e.yAxisTitleBorderDash,e.yAxisTitleBorderCap,e.yAxisTitleBorderCompound)),r.push(...Zx(e.yNumFmt),...nC(e.yMajorTickMark,e.yMinorTickMark,e.yTickLblPos));const i=Vx(e.yLabelRotation,e.yLabelFontSize,e.yLabelBold,e.yLabelItalic,e.yLabelColor,e.yLabelUnderline,e.yLabelStrike,e.yLabelFontFamily);return i&&r.push(i),r.push(hw("c:crossAx",{val:xx}),Wx(e.yCrosses),hw("c:crossBetween",{val:e.yCrossBetween??"midCat"}),...Jx(e.yScale),...Xx(e.yDispUnits)),[gw("c:valAx",void 0,t),gw("c:valAx",void 0,r)]}(i));break;default:{const t=e.type;throw new Error(`Unsupported chart type: ${String(t)}`)}}const o=function(e){if("pie"===e.type||"doughnut"===e.type)return;const t=e.dataTable;var n;return void 0!==t&&!1!==t?!0===t?{showHorzBorder:!0,showVertBorder:!0,showOutline:!0,showKeys:!0,fontSize:void 0,fontColor:void 0,bold:void 0,italic:void 0,underline:void 0,strikethrough:void 0,fontFamily:void 0,fillColor:void 0,borderColor:void 0,borderWidth:void 0,borderDash:void 0,borderCap:void 0,borderCompound:void 0}:{showHorzBorder:!1!==t.showHorzBorder,showVertBorder:!1!==t.showVertBorder,showOutline:!1!==t.showOutline,showKeys:!1!==t.showKeys,fontSize:(n=t.fontSize,pI(n)),fontColor:SI(t.fontColor),bold:kI(t.bold),italic:FI(t.italic),underline:DI(t.underline),strikethrough:NI(t.strikethrough),fontFamily:MI(t.fontFamily),fillColor:QI(t.fillColor),borderColor:TI(t.borderColor),borderWidth:Gw(t.borderWidth),borderDash:Jw(t.borderDash),borderCap:Nw(t.borderCap),borderCompound:Mw(t.borderCompound)}:void 0}(e);void 0!==o&&r.push(LI(o));const a=function(e){const t=(s=e.plotAreaFillColor,yI(s)),n=function(e){return yI(e)}(e.plotAreaBorderColor),r=Gw(e.plotAreaBorderWidth),i=Jw(e.plotAreaBorderDash),o=Nw(e.plotAreaBorderCap),a=Mw(e.plotAreaBorderCompound);var s;if(void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const l=[];void 0!==t&&l.push(gw("a:solidFill",void 0,[$w(t)]));if(void 0!==n||void 0!==r||void 0!==i||void 0!==o||void 0!==a){const e={};void 0!==r&&(e.w=Math.round(r*Bw)),void 0!==o&&(e.cap=o),void 0!==a&&(e.cmpd=a);const t=[];void 0!==n&&t.push(gw("a:solidFill",void 0,[$w(n)])),void 0!==i&&t.push(hw("a:prstDash",{val:i})),l.push(0===t.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,t))}return gw("c:spPr",void 0,l)}(e);return void 0!==a&&r.push(a),gw("c:plotArea",void 0,r)}function NC(e){if(void 0===e||!Number.isFinite(e))return;let t=Math.round(e)%360;return t<0&&(t+=360),0!==t?t:void 0}function MC(e){if(void 0===e||!Number.isFinite(e))return 50;const t=Math.round(e);return t<10?10:t>90?90:t}function QC(e){return"boolean"==typeof e.varyColors?e.varyColors:gC.has(e.type)}function TC(e){const t=e.scatterStyle;return t&&mC.has(t)?t:"lineMarker"}const LC=new Map([["barChart","bar"],["bar3DChart","bar3D"],["lineChart","line"],["line3DChart","line3D"],["pieChart","pie"],["pie3DChart","pie3D"],["doughnutChart","doughnut"],["areaChart","area"],["area3DChart","area3D"],["scatterChart","scatter"],["bubbleChart","bubble"],["radarChart","radar"],["surfaceChart","surface"],["surface3DChart","surface3D"],["stockChart","stock"],["ofPieChart","ofPie"]]);function RC(e){const t=Ub(e),n="chartSpace"===t.local?t:Ob(t,"chartSpace");if(!n)return;const r=Hb(n,"chart");if(!r)return{kinds:[],seriesCount:0};const i={kinds:[],seriesCount:0},o=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");if(r){const e=[];yw(r,e);const t=e.join("").trim();return t.length>0?t:void 0}const i=Hb(n,"strRef");if(i){const e=Hb(i,"strCache");if(e)for(const t of qb(e)){if("pt"!==t.local)continue;const e=Hb(t,"v");if(e){const t=vw(e).trim();if(t.length>0)return t}}}}(r);void 0!==o&&(i.title=o);const a=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"overlay");if(!n)return;const r=n.attrs.val;if("string"==typeof r)switch(r){case"1":case"true":return!0;default:return}}(r);void 0!==a&&(i.titleOverlay=a);const s=function(e){const t=Hb(e,"title");if(!t)return;const n=Hb(t,"tx");if(!n)return;const r=Hb(n,"rich");if(!r)return;const i=Hb(r,"bodyPr");if(!i)return;const o=i.attrs.rot;if("string"!=typeof o)return;const a=o.trim();if(0===a.length)return;const s=Number.parseInt(a,10);if(!Number.isFinite(s))return;const l=Math.round(s/uI);return 0!==l?l<fI?fI:l>90?90:l:void 0}(r);void 0!==s&&(i.titleRotation=s);const l=function(e){const t=oI(e);if(!t)return;const n=t.attrs.sz;if("string"!=typeof n)return;const r=n.trim();if(0===r.length)return;const i=Number.parseInt(r,10);if(!Number.isFinite(i))return;const o=Math.round(i/100*2)/2;return o<1||o>400?void 0:o}(r);void 0!==l&&(i.titleFontSize=l);const c=function(e){const t=oI(e);if(!t)return;return!0===Aw(t.attrs.b)||void 0}(r);void 0!==c&&(i.titleBold=c);const u=function(e){const t=oI(e);if(!t)return;return!0===Aw(t.attrs.i)||void 0}(r);void 0!==u&&(i.titleItalic=u);const f=function(e){const t=oI(e);if(!t)return;const n=Hb(t,"solidFill");if(!n)return;const r=Hb(n,"srgbClr");if(r)return zw(r.attrs.val);const i=Hb(n,"schemeClr");return i?Ow(i):void 0}(r);void 0!==f&&(i.titleColor=f);const d=function(e){const t=oI(e);if(!t)return;return"sngStrike"===t.attrs.strike||void 0}(r);void 0!==d&&(i.titleStrike=d);const h=function(e){const t=oI(e);if(!t)return;return"sng"===t.attrs.u||void 0}(r);void 0!==h&&(i.titleUnderline=h);const p=function(e){const t=oI(e);if(!t)return;const n=Hb(t,"latin");if(!n)return;const r=n.attrs.typeface;if("string"!=typeof r)return;const i=r.trim();return 0!==i.length?i:void 0}(r);void 0!==p&&(i.titleFontFamily=p);const g=function(e){const t=Hb(e,"title");if(t)return eI(t)}(r);void 0!==g&&(i.titleLayout=g);const m=function(e){const t=Hb(e,"title");if(t)return jw(t)}(r);void 0!==m&&(i.titleFillColor=m);const y=function(e){const t=Hb(e,"title");if(t)return Vw(t)}(r);void 0!==y&&(i.titleBorderColor=y);const v=function(e){const t=Hb(e,"title");if(t)return Yw(t)}(r);void 0!==v&&(i.titleBorderWidth=v);const A=function(e){const t=Hb(e,"title");if(t)return Ww(t)}(r);void 0!==A&&(i.titleBorderDash=A);const b=function(e){const t=Hb(e,"title");if(t)return Qw(t)}(r);void 0!==b&&(i.titleBorderCap=b);const w=function(e){const t=Hb(e,"title");if(t)return Tw(t)}(r);void 0!==w&&(i.titleBorderCompound=w);const I=function(e){const t=Hb(e,"autoTitleDeleted");if(!t)return;const n=t.attrs.val;if("string"==typeof n)switch(n){case"1":case"true":return!0;default:return}}(r);void 0!==I&&(i.autoTitleDeleted=I);const x=Hb(r,"plotArea");if(x){let e=0;const t=[];let n,r,o,a,s,l,c,u,f,d,h,p,g,m,y,v;for(const A of qb(x)){const b=LC.get(A.local);if(!b)continue;if(i.kinds.includes(b)||i.kinds.push(b),void 0===f&&(f=yC(A,b)),void 0!==n||"bar"!==b&&"bar3D"!==b||(n=xC(A)),void 0!==l||"bar"!==b&&"bar3D"!==b||(l=EC(A)),void 0!==c||"bar"!==b&&"bar3D"!==b||(c=SC(A)),void 0!==r||"line"!==b&&"line3D"!==b||(r=FC(A)),void 0!==o||"area"!==b&&"area3D"!==b||(o=FC(A)),void 0===s&&"doughnut"===b&&(s=CC(A)),void 0!==u||"pie"!==b&&"pie3D"!==b&&"doughnut"!==b&&"ofPie"!==b||(u=kC(A)),void 0===d&&"scatter"===b&&(d=vC(A)),void 0!==h||"line"!==b&&"line3D"!==b&&"area"!==b&&"area3D"!==b||(h=AC(A)),void 0!==p||"line"!==b&&"line3D"!==b&&"stock"!==b||(p=bC(A)),void 0!==g||"bar"!==b&&"ofPie"!==b||(g=wC(A)),void 0===m&&("line"===b||"line3D"===b||"stock"===b)){const e=Hb(A,"upDownBars");void 0!==e&&(m=!0,y=BC(e))}void 0===v&&"line"===b&&(v=IC(A));let w=0;for(const n of qb(A))"ser"===n.local&&(e++,t.push(rx(n,b,w)),w++);if(void 0===a){const e=Hb(A,"dLbls");if(e){const t=HI(e);t&&(a=t)}}}i.seriesCount=e,t.length>0&&(i.series=t),void 0!==n&&(i.barGrouping=n),void 0!==r&&(i.lineGrouping=r),void 0!==o&&(i.areaGrouping=o),a&&(i.dataLabels=a),void 0!==s&&(i.holeSize=s),void 0!==l&&(i.gapWidth=l),void 0!==c&&(i.overlap=c),void 0!==u&&(i.firstSliceAng=u),void 0!==f&&(i.varyColors=f),void 0!==d&&(i.scatterStyle=d),void 0!==h&&(i.dropLines=h),void 0!==p&&(i.hiLowLines=p),void 0!==g&&(i.serLines=g),void 0!==m&&(i.upDownBars=m),void 0!==y&&(i.upDownBarsGapWidth=y),void 0!==v&&(i.showLineMarkers=v);const A=function(e){let t;const n=[];for(const r of qb(e))"catAx"===r.local?t??=r:"valAx"===r.local&&n.push(r);let r,i;t?(r=t,i=n[0]):(r=n[0],i=n[1]);const o=t?"between":"midCat",a=r?yx(r,o):void 0,s=i?yx(i,o):void 0;if(!a&&!s)return;const l={};return a&&(l.x=a),s&&(l.y=s),l}(x);void 0!==A&&(i.axes=A);const b=EI(x);void 0!==b&&(i.dataTable=b);const w=function(e){return eI(e)}(x);void 0!==w&&(i.plotAreaLayout=w);const I=function(e){return jw(e)}(x);void 0!==I&&(i.plotAreaFillColor=I);const C=function(e){return Vw(e)}(x);void 0!==C&&(i.plotAreaBorderColor=C);const E=function(e){return Yw(e)}(x);void 0!==E&&(i.plotAreaBorderWidth=E);const B=Ww(x);void 0!==B&&(i.plotAreaBorderDash=B);const S=Qw(x);void 0!==S&&(i.plotAreaBorderCap=S);const k=Tw(x);void 0!==k&&(i.plotAreaBorderCompound=k)}const C=function(e){const t=Hb(e,"legend");if(!t)return;const n=Hb(t,"delete");if(n&&!0===ww(n.attrs.val))return!1;const r=Hb(t,"legendPos");if(!r)return"right";const i=r.attrs.val;if("string"!=typeof i)return"right";switch(i){case"t":return"top";case"b":return"bottom";case"l":return"left";case"r":return"right";case"tr":return"topRight";default:return}}(r);if(void 0!==C&&(i.legend=C),void 0!==C&&!1!==C){const e=function(e){const t=Hb(e,"legend");if(!t)return;const n=Hb(t,"overlay");if(!n)return;const r=n.attrs.val;if("string"==typeof r)switch(r){case"1":case"true":return!0;default:return}}(r);void 0!==e&&(i.legendOverlay=e);const t=function(e){const t=Hb(e,"legend");if(!t)return;const n=new Set,r=[];for(const e of qb(t)){if("legendEntry"!==e.local)continue;const t=Hb(e,"idx");if(!t)continue;const i=t.attrs.val;if("string"!=typeof i)continue;const o=Number.parseInt(i,10);if(!Number.isFinite(o)||o<0)continue;if(n.has(o))continue;n.add(o);const a=Hb(e,"delete"),s={idx:o,delete:void 0!==a&&!0===ww(a.attrs.val)},l=iI(e);if(l){const e=l.attrs.sz;if("string"==typeof e){const t=e.trim();if(t.length>0){const e=Number.parseInt(t,10);if(Number.isFinite(e)){const t=Math.round(e/bI*2)/2;t>=1&&t<=wI&&(s.fontSize=t)}}}const t=l.attrs.b;"string"==typeof t&&!0===ww(t)&&(s.bold=!0);const n=l.attrs.i;"string"==typeof n&&!0===ww(n)&&(s.italic=!0);const r=l.attrs.u;"string"==typeof r&&"sng"===r&&(s.underline=!0);const i=l.attrs.strike;"string"==typeof i&&"sngStrike"===i&&(s.strikethrough=!0);const o=Hb(l,"solidFill");if(o){const e=Hb(o,"srgbClr");if(e){const t=e.attrs.val;if("string"==typeof t){const e=t.replace(/^#/,"").toUpperCase();/^[0-9A-F]{6}$/.test(e)&&(s.color=e)}}}const a=Hb(l,"latin");if(a){const e=a.attrs.typeface;if("string"==typeof e){const t=e.trim();t.length>0&&(s.fontFamily=t)}}}r.push(s)}return r.length>0?r:void 0}(r);void 0!==t&&(i.legendEntries=t);const n=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=n.attrs.sz;if("string"!=typeof r)return;const i=r.trim();if(0===i.length)return;const o=Number.parseInt(i,10);if(!Number.isFinite(o))return;const a=Math.round(o/bI*2)/2;return a<1||a>wI?void 0:a}(r);void 0!==n&&(i.legendFontSize=n);const o=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=n.attrs.b;return"1"===r||"true"===r||void 0}(r);void 0!==o&&(i.legendBold=o);const a=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=n.attrs.i;return"1"===r||"true"===r||void 0}(r);void 0!==a&&(i.legendItalic=a);const s=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;return"sng"===n.attrs.u||void 0}(r);void 0!==s&&(i.legendUnderline=s);const l=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;return"sngStrike"===n.attrs.strike||void 0}(r);void 0!==l&&(i.legendStrikethrough=l);const c=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=Hb(n,"solidFill");if(!r)return;const i=Hb(r,"srgbClr");if(i)return zw(i.attrs.val);const o=Hb(r,"schemeClr");return o?Ow(o):void 0}(r);void 0!==c&&(i.legendFontColor=c);const u=function(e){const t=Hb(e,"legend");if(!t)return;const n=iI(t);if(!n)return;const r=Hb(n,"latin");if(!r)return;const i=r.attrs.typeface;if("string"!=typeof i)return;const o=i.trim();return 0!==o.length?o:void 0}(r);void 0!==u&&(i.legendFontFamily=u);const f=function(e){const t=Hb(e,"legend");if(t)return eI(t)}(r);void 0!==f&&(i.legendLayout=f);const d=function(e){const t=Hb(e,"legend");if(t)return jw(t)}(r);void 0!==d&&(i.legendFillColor=d);const h=function(e){const t=Hb(e,"legend");if(t)return Vw(t)}(r);void 0!==h&&(i.legendBorderColor=h);const p=function(e){const t=Hb(e,"legend");if(t)return Yw(t)}(r);void 0!==p&&(i.legendBorderWidth=p);const g=function(e){const t=Hb(e,"legend");if(t)return Ww(t)}(r);void 0!==g&&(i.legendBorderDash=g);const m=function(e){const t=Hb(e,"legend");if(t)return Qw(t)}(r);void 0!==m&&(i.legendBorderCap=m);const y=function(e){const t=Hb(e,"legend");if(t)return Tw(t)}(r);void 0!==y&&(i.legendBorderCompound=y)}const E=function(e){const t=Hb(e,"dispBlanksAs");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"zero":return"zero";case"span":return"span";default:return}}(r);void 0!==E&&(i.dispBlanksAs=E);const B=function(e){const t=Hb(e,"plotVisOnly");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"0":case"false":return!1;default:return}}(r);void 0!==B&&(i.plotVisOnly=B);const S=function(e){const t=Hb(e,"showDLblsOverMax");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"0":case"false":return!1;default:return}}(r);void 0!==S&&(i.showDLblsOverMax=S);const k=function(e){const t=Hb(e,"roundedCorners");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"1":case"true":return!0;default:return}}(n);void 0!==k&&(i.roundedCorners=k);const F=function(e){const t=Hb(e,"style");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;if(!/^\d+$/.test(n))return;const r=Number(n);return Number.isInteger(r)?r<1||r>48?void 0:r:void 0}(n);void 0!==F&&(i.style=F);const D=function(e){const t=Hb(e,"lang");if(!t)return;const n=t.attrs.val;return"string"!=typeof n?void 0:/^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(n)?n:void 0}(n);void 0!==D&&(i.lang=D);const N=function(e){const t=Hb(e,"date1904");if(!t)return;const n=t.attrs.val;if("string"!=typeof n)return;switch(n){case"1":case"true":return!0;default:return}}(n);void 0!==N&&(i.date1904=N);const M=function(e){const t=Hb(e,"protection");if(!t)return;const n={},r=UC(t,"chartObject");void 0!==r&&(n.chartObject=r);const i=UC(t,"data");void 0!==i&&(n.data=i);const o=UC(t,"formatting");void 0!==o&&(n.formatting=o);const a=UC(t,"selection");void 0!==a&&(n.selection=a);const s=UC(t,"userInterface");void 0!==s&&(n.userInterface=s);return n}(n);void 0!==M&&(i.protection=M);const Q=_w(r);void 0!==Q&&(i.view3D=Q);const T=function(e){const t=Hb(e,"floor");if(!t)return;const n=Hb(t,"thickness");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;if(!/^\d+$/.test(r))return;const i=Number(r);return!Number.isInteger(i)||0===i||i>100?void 0:i}(r);void 0!==T&&(i.floorThickness=T);const L=function(e){const t=Hb(e,"sideWall");if(!t)return;const n=Hb(t,"thickness");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;if(!/^\d+$/.test(r))return;const i=Number(r);return!Number.isInteger(i)||0===i||i>100?void 0:i}(r);void 0!==L&&(i.sideWallThickness=L);const R=function(e){const t=Hb(e,"backWall");if(!t)return;const n=Hb(t,"thickness");if(!n)return;const r=n.attrs.val;if("string"!=typeof r)return;if(!/^\d+$/.test(r))return;const i=Number(r);return!Number.isInteger(i)||0===i||i>100?void 0:i}(r);void 0!==R&&(i.backWallThickness=R);const U=function(e){return jw(e)}(n);void 0!==U&&(i.chartSpaceFillColor=U);const H=function(e){return Vw(e)}(n);void 0!==H&&(i.chartSpaceBorderColor=H);const q=Yw(n);void 0!==q&&(i.chartSpaceBorderWidth=q);const O=Ww(n);void 0!==O&&(i.chartSpaceBorderDash=O);const P=Qw(n);void 0!==P&&(i.chartSpaceBorderCap=P);const $=Tw(n);return void 0!==$&&(i.chartSpaceBorderCompound=$),i}function UC(e,t){const n=Hb(e,t);if(!n)return;const r=n.attrs.val;if("string"==typeof r)switch(r){case"1":case"true":return!0;case"0":case"false":return!1;default:return}}const HC=1073741824,qC=1048575,OC=16383,PC=16777216,$C=Object.freeze([208,207,17,224,161,177,26,225]);async function zC(e,t){if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if("object"==typeof(n=e)&&null!==n&&"function"==typeof n.getReader)return async function(e,t=1073741824){const n=Number.isFinite(t)&&t>0?t:HC,r=e.getReader(),i=[];let o=0;try{for(;;){const{done:e,value:t}=await r.read();if(e)break;if(t){if(o+=t.length,o>n)throw new mb(`Input stream exceeds the maximum of ${n} bytes. Raise \`maxInputBytes\` if the file really is this large.`);i.push(t)}}if(0===i.length)return new Uint8Array(0);if(1===i.length)return i[0];const e=new Uint8Array(o);let t=0;for(const n of i)e.set(n,t),t+=n.length;return e}finally{try{await r.cancel()}catch{}try{r.releaseLock()}catch{}}}(e,t);var n;throw new mb("Unsupported input type. Expected Uint8Array, ArrayBuffer, or ReadableStream<Uint8Array>.")}const jC=[208,207,17,224,161,177,26,225],VC=4294967294,YC=4294967295,WC=4096,GC=64;function JC(e){if(e.length<512)throw new mb("CFB: file too small");for(let t=0;t<jC.length;t++)if(e[t]!==jC[t])throw new mb("CFB: bad signature");const t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1<<t.getUint16(30,!0),r=1<<t.getUint16(32,!0),i=t.getUint32(44,!0),o=t.getUint32(48,!0),a=t.getUint32(56,!0),s=t.getUint32(60,!0),l=t.getUint32(64,!0),c=t.getUint32(68,!0),u=t.getUint32(72,!0),f=t=>{const r=(e=>(e+1)*n)(t);if(r+n>e.length)throw new mb("CFB: sector out of range");return e.subarray(r,r+n)},d=[];for(let e=0;e<109&&d.length<i;e++){const n=t.getUint32(76+4*e,!0);if(n===YC||n===VC)break;d.push(n)}const h=Math.floor(e.length/n)+1,p=Math.min(u,h);let g=c,m=0;for(;g!==VC&&g!==YC&&p>0&&m++<p+1;){const e=f(g),t=new DataView(e.buffer,e.byteOffset,e.byteLength),r=n/4-1;for(let e=0;e<r&&d.length<i;e++){const n=t.getUint32(4*e,!0);n!==YC&&n!==VC&&d.push(n)}g=t.getUint32(n-4,!0)}const y=[];for(const e of d){const t=f(e),r=new DataView(t.buffer,t.byteOffset,t.byteLength);for(let e=0;e<n/4;e++)y.push(r.getUint32(4*e,!0))}const v=(e,t)=>{const r=(e=>{const t=[];let n=e,r=0;for(;n!==VC&&n!==YC&&r++<y.length+1;)t.push(n),n=y[n]??VC;return t})(e),i=new Uint8Array(r.length*n);let o=0;for(const e of r)i.set(f(e),o),o+=n;return t>=0?i.subarray(0,t):i},A=v(o,-1),b=new DataView(A.buffer,A.byteOffset,A.byteLength),w=[];for(let e=0;e+128<=A.length;e+=128){const t=A[e+66];if(0===t)continue;const n=b.getUint16(e+64,!0);let r="";for(let t=0;t+1<n;t+=2){const n=b.getUint16(e+t,!0);if(0===n)break;r+=String.fromCharCode(n)}const i=b.getUint32(e+116,!0),o=b.getUint32(e+120,!0);w.push({name:r,type:t,startSector:i,size:o})}const I=w.find(e=>5===e.type);if(!I)throw new mb("CFB: missing root entry");const x=v(I.startSector,I.size),C=[];if(l>0&&s!==VC){const e=v(s,l*n),t=new DataView(e.buffer,e.byteOffset,e.byteLength);for(let n=0;n<e.length/4;n++)C.push(t.getUint32(4*n,!0))}const E=(e,t)=>{if(t<0||t>x.length)throw new mb("CFB: mini stream size out of range");const n=new Uint8Array(t);let i=e,o=0,a=0;for(;i!==VC&&i!==YC&&o<t&&a++<C.length+1;){const e=i*r,a=Math.min(r,t-o);n.set(x.subarray(e,e+a),o),o+=a,i=C[i]??VC}return n},B=new Map;for(const e of w){if(2!==e.type)continue;const t=a||WC;B.set(e.name,e.size<t?E(e.startSector,e.size):v(e.startSector,e.size))}return B}function _C(e){const t=512,n=[],r=[],i=[],o=new Map;let a=0;for(const t of e)if(t.data.length<WC){o.set(t.name,{mini:!0}),r.push(a);const e=XC(t.data,GC);n.push(e),a+=e.length/GC}else o.set(t.name,{mini:!1}),i.push({name:t.name,data:t.data});const s=function(e){let t=0;for(const n of e)t+=n.length;const n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(n);let l=0;const c=e=>{const n=Math.max(1,Math.ceil(e/t)),r=l;return l+=n,{startSector:r,sectorCount:n}},u=i.map(e=>({name:e.name,data:e.data,region:c(e.data.length)})),f=s.length>0?c(s.length):null,d=new Uint8Array(Math.ceil(Math.max(a,0)/128)*t);{const t=new DataView(d.buffer);for(let e=0;e<d.length/4;e++)t.setUint32(4*e,YC,!0);let n=0;for(const i of e){if(i.data.length>=WC)continue;const e=XC(i.data,GC).length/GC;for(let i=0;i<e;i++){const o=r[n]+i;t.setUint32(4*o,i===e-1?VC:o+1,!0)}n++}}const h=a>0?c(d.length):null,p=1+e.length,g=Math.ceil(p/4)*t,m=c(g),y=l;let v=1;for(;;){const e=y+v,t=Math.ceil(e/128);if(t<=v)break;v=t}const A={startSector:l,sectorCount:v};l+=v;const b=l,w=new Uint32Array(128*v);w.fill(YC);const I=e=>{for(let t=0;t<e.sectorCount;t++)w[e.startSector+t]=t===e.sectorCount-1?VC:e.startSector+t+1};for(const e of u)I(e.region);f&&I(f),h&&I(h),I(m);for(let e=0;e<v;e++)w[A.startSector+e]=4294967293;const x=new Uint8Array(g),C=new DataView(x.buffer),E=(e,t,n,r,i,o,a,s,l)=>{const c=128*e;for(let e=0;e<t.length;e++)C.setUint16(c+2*e,t.charCodeAt(e),!0);C.setUint16(c+64,2*(t.length+1),!0),x[c+66]=n,x[c+67]=r,C.setUint32(c+68,i,!0),C.setUint32(c+72,o,!0),C.setUint32(c+76,a,!0),C.setUint32(c+116,s,!0),C.setUint32(c+120,l,!0)};for(let e=0;e<g/128;e++)C.setUint32(128*e+68,YC,!0),C.setUint32(128*e+72,YC,!0),C.setUint32(128*e+76,YC,!0);E(0,"Root Entry",5,1,YC,YC,e.length>0?1:YC,f?f.startSector:VC,s.length);for(let t=0;t<e.length;t++){const n=e[t],r=o.get(n.name),i=t+1,a=t+1<e.length?i+1:YC;let s;if(r.mini){let n=0;for(let r=0;r<t;r++){const t=e[r];t.data.length<WC&&(n+=XC(t.data,GC).length/GC)}s=n}else{s=u.find(e=>e.name===n.name).region.startSector}E(i,n.name,2,1,YC,a,YC,s,n.data.length)}const B=new Uint8Array((b+1)*t),S=new DataView(B.buffer);for(let e=0;e<jC.length;e++)B[e]=jC[e];S.setUint16(24,62,!0),S.setUint16(26,3,!0),S.setUint16(28,65534,!0),S.setUint16(30,9,!0),S.setUint16(32,6,!0),S.setUint32(44,v,!0),S.setUint32(48,m.startSector,!0),S.setUint32(56,WC,!0),S.setUint32(60,h?h.startSector:VC,!0),S.setUint32(64,h?h.sectorCount:0,!0),S.setUint32(68,VC,!0),S.setUint32(72,0,!0);for(let e=0;e<109;e++)S.setUint32(76+4*e,e<v?A.startSector+e:YC,!0);const k=e=>(e+1)*t,F=(e,t)=>{B.set(t,k(e.startSector))};for(const e of u)F(e.region,e.data);f&&F(f,s),h&&F(h,d),F(m,x);{const e=k(A.startSector),n=new DataView(B.buffer,e,v*t);for(let e=0;e<w.length;e++)n.setUint32(4*e,w[e],!0)}return B}function XC(e,t){if(e.length%t===0)return e;const n=new Uint8Array(Math.ceil(e.length/t)*t);return n.set(e,0),n}const KC=new Uint8Array([254,167,210,118,59,75,158,121]),ZC=new Uint8Array([215,170,15,109,48,97,52,78]),eE=new Uint8Array([20,110,11,231,171,172,208,214]),tE=new Uint8Array([95,178,173,1,12,185,225,246]),nE=new Uint8Array([160,103,127,2,178,44,132,51]),rE=4096,iE=new Uint8Array(16);async function oE(e,t,n=1e7){let r;try{r=JC(e)}catch(e){throw new wb("Not a valid encrypted workbook container.",{cause:e})}const i=r.get("EncryptionInfo"),o=r.get("EncryptedPackage");if(!i||!o)throw new wb("Encrypted workbook missing EncryptionInfo/EncryptedPackage.");const a=i[0]|i[1]<<8,s=i[2]|i[3]<<8;if(4!==a||4!==s)throw new wb(`Unsupported encryption (version ${a}.${s}); only ECMA-376 Agile is supported.`);const l=new TextDecoder("utf-8").decode(i.subarray(8)),c=function(e,t){const n=AE(e,"encryptedKey");if(!n)throw new wb("EncryptionInfo missing encryptedKey.");const r=parseInt(bE(n,"spinCount"),10);if(!Number.isFinite(r)||r<0)throw new wb("EncryptionInfo has an invalid spinCount.");if(r>t)throw new wb(`EncryptionInfo spinCount ${r} exceeds the maximum of ${t}. Raise \`maxSpinCount\` to agree to spend that time.`);return{saltValue:kE(bE(n,"saltValue")),hashAlgorithm:IE(bE(n,"hashAlgorithm")),keyBytes:parseInt(bE(n,"keyBits"),10)/8,blockSize:parseInt(bE(n,"blockSize"),10),spinCount:r,encryptedVerifierHashInput:kE(bE(n,"encryptedVerifierHashInput")),encryptedVerifierHashValue:kE(bE(n,"encryptedVerifierHashValue")),encryptedKeyValue:kE(bE(n,"encryptedKeyValue"))}}(l,n),u=function(e){const t=AE(e,"keyData");if(!t)throw new wb("EncryptionInfo missing keyData.");return{saltValue:kE(bE(t,"saltValue")),hashAlgorithm:IE(bE(t,"hashAlgorithm")),keyBytes:parseInt(bE(t,"keyBits"),10)/8,blockSize:parseInt(bE(t,"blockSize"),10)}}(l),f=await async function(e,t){const n=await lE(e,t.saltValue,t.spinCount,t.hashAlgorithm),r=await cE(n,KC,t.keyBytes,t.hashAlgorithm),i=await cE(n,ZC,t.keyBytes,t.hashAlgorithm),o=await cE(n,eE,t.keyBytes,t.hashAlgorithm),a=await mE(r,t.saltValue,t.encryptedVerifierHashInput),s=await mE(i,t.saltValue,t.encryptedVerifierHashValue),l=await hE(t.hashAlgorithm,a),c=Math.min(l.length,s.length);if(!function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n}(l.subarray(0,c),s.subarray(0,c)))return null;const u=await mE(o,t.saltValue,t.encryptedKeyValue);return u.subarray(0,t.keyBytes)}(t,c);if(!f)throw new wb("Incorrect password.");return await async function(e,t,n,r){const i=AE(e,"dataIntegrity");if(!i)return;if("SHA-512"!==r.hashAlgorithm)return;const o=kE(bE(i,"encryptedHmacKey")),a=kE(bE(i,"encryptedHmacValue"));if(0===o.length||0===a.length)return;const s=await uE(r.saltValue,tE,r.hashAlgorithm,r.blockSize),l=await uE(r.saltValue,nE,r.hashAlgorithm,r.blockSize),c=await mE(n,s,o),u=await mE(n,l,a),f=await vE(c,t),d=Math.min(f.length,u.length);let h=0===f.length?1:0;for(let e=0;e<d;e++)h|=f[e]^u[e];if(0!==h)throw new wb("Encrypted package failed integrity check (HMAC mismatch).")}(l,o,f,u),async function(e,t,n){const r=Number(new DataView(e.buffer,e.byteOffset,8).getBigUint64(0,!0)),i=e.subarray(8),o=new Uint8Array(Math.ceil(i.length/rE)*rE),a=new Uint8Array(4),s=new DataView(a.buffer);let l=0,c=0;for(;l<i.length;){const e=i.subarray(l,Math.min(l+rE,i.length));s.setUint32(0,c,!0);const r=fE(await hE(n.hashAlgorithm,EE([n.saltValue,a])),n.blockSize),u=await mE(t,r,e);o.set(u,l),l+=rE,c++}return o.subarray(0,r)}(o,f,u)}async function aE(e,t,n){const r=n?.spinCount??1e5,i="SHA-512",o=32,a=16,s=xE(16),l=xE(16),c=xE(o),u=await lE(t,l,r,i),f=xE(a),d=await hE(i,f),h=await cE(u,KC,o,i),p=await cE(u,ZC,o,i),g=await cE(u,eE,o,i),m=await yE(h,l,f),y=await yE(p,l,CE(d,a)),v=await yE(g,l,c),A=await async function(e,t,n){const r=new Uint8Array(8);new DataView(r.buffer).setBigUint64(0,BigInt(e.length),!0);const i=CE(e,rE),o=new Uint8Array(i.length),a=new Uint8Array(4),s=new DataView(a.buffer);let l=0,c=0;for(;l<i.length;){const e=i.subarray(l,l+rE);s.setUint32(0,c,!0);const r=fE(await hE(n.hashAlgorithm,EE([n.saltValue,a])),n.blockSize),u=await yE(t,r,e);o.set(u,l),l+=rE,c++}return EE([r,o])}(e,c,{saltValue:s,hashAlgorithm:i,keyBytes:o,blockSize:a}),b=xE(64),w=await uE(s,tE,i,a),I=await yE(c,w,CE(b,a)),x=await vE(b,A),C=await uE(s,nE,i,a),E=function(e){const t=SE;return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><encryption xmlns="http://schemas.microsoft.com/office/2006/encryption" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password"><keyData saltSize="${e.keyDataSalt.length}" blockSize="${e.blockSize}" keyBits="${e.keyBits}" hashSize="${e.hashSize}" cipherAlgorithm="AES" cipherChaining="ChainingModeCBC" hashAlgorithm="SHA512" saltValue="${t(e.keyDataSalt)}"/><dataIntegrity encryptedHmacKey="${t(e.encryptedHmacKey)}" encryptedHmacValue="${t(e.encryptedHmacValue)}"/><keyEncryptors><keyEncryptor uri="http://schemas.microsoft.com/office/2006/keyEncryptor/password"><p:encryptedKey spinCount="${e.spinCount}" saltSize="${e.pwSalt.length}" blockSize="${e.blockSize}" keyBits="${e.keyBits}" hashSize="${e.hashSize}" cipherAlgorithm="AES" cipherChaining="ChainingModeCBC" hashAlgorithm="SHA512" saltValue="${t(e.pwSalt)}" encryptedVerifierHashInput="${t(e.encryptedVerifierHashInput)}" encryptedVerifierHashValue="${t(e.encryptedVerifierHashValue)}" encryptedKeyValue="${t(e.encryptedKeyValue)}"/></keyEncryptor></keyEncryptors></encryption>`}({keyDataSalt:s,pwSalt:l,spinCount:r,keyBits:256,hashSize:64,blockSize:a,encryptedVerifierHashInput:m,encryptedVerifierHashValue:y,encryptedKeyValue:v,encryptedHmacKey:I,encryptedHmacValue:await yE(c,C,CE(x,a))}),B=new Uint8Array(8),S=new DataView(B.buffer);S.setUint16(0,4,!0),S.setUint16(2,4,!0),S.setUint32(4,64,!0);return _C([{name:"EncryptionInfo",data:EE([B,(new TextEncoder).encode(E)])},{name:"EncryptedPackage",data:A}])}function sE(e){const t=new Uint8Array(2*e.length),n=new DataView(t.buffer);for(let t=0;t<e.length;t++)n.setUint16(2*t,e.charCodeAt(t),!0);return t}async function lE(e,t,n,r){let i=await hE(r,EE([t,sE(e)]));const o=new Uint8Array(4),a=new DataView(o.buffer);for(let e=0;e<n;e++)a.setUint32(0,e,!0),i=await hE(r,EE([o,i]));return i}async function cE(e,t,n,r){return function(e,t){if(e.length>=t)return e.subarray(0,t);const n=new Uint8Array(t).fill(54);return n.set(e,0),n}(await hE(r,EE([e,t])),n)}async function uE(e,t,n,r){return fE(await hE(n,EE([e,t])),r)}function fE(e,t){if(e.length>=t)return e.subarray(0,t);const n=new Uint8Array(t).fill(54);return n.set(e,0),n}const dE=e=>e;async function hE(e,t){return new Uint8Array(await crypto.subtle.digest(e,dE(t)))}async function pE(e){return crypto.subtle.importKey("raw",dE(e),{name:"AES-CBC"},!1,["encrypt","decrypt"])}async function gE(e,t,n){if(0===n.length)return new Uint8Array(0);const r=n.subarray(n.length-16),i=new Uint8Array(16);for(let e=0;e<16;e++)i[e]=16^r[e];const o=await async function(e,t){return new Uint8Array(await crypto.subtle.encrypt({name:"AES-CBC",iv:dE(iE)},e,dE(t))).subarray(0,16)}(e,i),a=EE([n,o]);return new Uint8Array(await crypto.subtle.decrypt({name:"AES-CBC",iv:dE(t)},e,dE(a))).subarray(0,n.length)}async function mE(e,t,n){return gE(await pE(e),t,n)}async function yE(e,t,n){return async function(e,t,n){return 0===n.length?new Uint8Array(0):new Uint8Array(await crypto.subtle.encrypt({name:"AES-CBC",iv:dE(t)},e,dE(n))).subarray(0,n.length)}(await pE(e),t,n)}async function vE(e,t){const n=await crypto.subtle.importKey("raw",dE(e),{name:"HMAC",hash:"SHA-512"},!1,["sign"]);return new Uint8Array(await crypto.subtle.sign("HMAC",n,dE(t)))}function AE(e,t){const n=new RegExp(`<(?:\\w+:)?${t}\\b[^>]*?/?>`).exec(e);return n?n[0]:null}function bE(e,t){const n=new RegExp(`\\b${t}="([^"]*)"`).exec(e);return n?n[1]:""}const wE={SHA512:"SHA-512",SHA384:"SHA-384",SHA256:"SHA-256",SHA1:"SHA-1"};function IE(e){return wE[e]??"SHA-512"}function xE(e){const t=new Uint8Array(e);return crypto.getRandomValues(t),t}function CE(e,t){if(e.length%t===0)return e;const n=new Uint8Array(Math.ceil(e.length/t)*t);return n.set(e,0),n}function EE(e){let t=0;for(const n of e)t+=n.length;const n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}const BE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function SE(e){let t="",n=0;for(;n+2<e.length;n+=3){const r=e[n]<<16|e[n+1]<<8|e[n+2];t+=BE[r>>18&63]+BE[r>>12&63]+BE[r>>6&63]+BE[63&r]}if(n<e.length){if(1===e.length-n){const r=e[n]<<16;t+=BE[r>>18&63]+BE[r>>12&63]+"=="}else{const r=e[n]<<16|e[n+1]<<8;t+=BE[r>>18&63]+BE[r>>12&63]+BE[r>>6&63]+"="}}return t}function kE(e){const t=e.replace(/[^A-Za-z0-9+/]/g,""),n=Math.floor(3*t.length/4),r=new Uint8Array(n);let i=0,o=0,a=0;for(let e=0;e<t.length;e++)o=o<<6|BE.indexOf(t[e]),i+=6,i>=8&&(i-=8,r[a++]=o>>i&255);return r.subarray(0,a)}function FE(e){let t=0;return new ReadableStream({pull(n){if(t>=e.length)return void n.close();const r=Math.min(t+1048576,e.length);n.enqueue(e.subarray(t,r)),t=r}})}const DE=(()=>{const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e})();function NE(e){return t=function(e,t){let n=e;for(let e=0;e<t.length;e++)n=DE[255&(n^t[e])]^n>>>8;return n>>>0}(4294967295,e),(4294967295^t)>>>0;var t}class ME{data;pos=0;bitBuf=0;bitCount=0;constructor(e){this.data=e}readBits(e){for(;this.bitCount<e;){if(this.pos>=this.data.length)throw new yb("Unexpected end of DEFLATE data");this.bitBuf|=this.data[this.pos++]<<this.bitCount,this.bitCount+=8}const t=this.bitBuf&(1<<e)-1;return this.bitBuf>>>=e,this.bitCount-=e,t}alignToByte(){this.bitBuf=0,this.bitCount=0}readByte(){if(this.pos>=this.data.length)throw new yb("Unexpected end of DEFLATE data");return this.data[this.pos++]}readUint16LE(){return this.readByte()|this.readByte()<<8}get offset(){return this.pos}get available(){return this.pos<this.data.length||this.bitCount>0}}function QE(e,t){const n=new Uint16Array(16);for(let r=0;r<t;r++)e[r]&&n[e[r]]++;const r=new Uint16Array(16);for(let e=1;e<15;e++)r[e+1]=r[e]+n[e];const i=r[15]+n[15],o=new Uint16Array(i);for(let n=0;n<t;n++)e[n]&&(o[r[e[n]]++]=n);return{counts:n,symbols:o}}function TE(e,t){let n=0,r=0,i=0;for(let o=1;o<=15;o++){n|=e.readBits(1);const a=t.counts[o];if(n<r+a)return t.symbols[i+(n-r)];i+=a,r=r+a<<1,n<<=1}throw new yb("Invalid Huffman code")}const LE=(()=>{const e=new Uint8Array(288);for(let t=0;t<=143;t++)e[t]=8;for(let t=144;t<=255;t++)e[t]=9;for(let t=256;t<=279;t++)e[t]=7;for(let t=280;t<=287;t++)e[t]=8;return QE(e,288)})(),RE=(()=>{const e=new Uint8Array(32);for(let t=0;t<32;t++)e[t]=5;return QE(e,32)})(),UE=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],HE=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],qE=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],OE=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],PE=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function $E(e,t=2147483648){const n=new ME(e);let r=new Uint8Array(3*e.length||1024),i=0;function o(e){if(i+e>t)throw new yb(`Decompressed size exceeds limit of ${t} bytes (possible zip bomb)`);if(i+e>r.length){let n=2*r.length;for(;i+e>n;)n*=2;n>t&&(n=t);const o=new Uint8Array(n);o.set(r),r=o}}function a(e){o(1),r[i++]=e}function s(e,t){o(t);let n=i-e;for(let e=0;e<t;e++)r[i++]=r[n++]}function l(e,t){for(;;){const r=TE(n,e);if(r<256)a(r);else{if(256===r)return;{const e=r-257,i=UE[e]+n.readBits(HE[e]),o=TE(n,t);s(qE[o]+n.readBits(OE[o]),i)}}}}let c=0;do{c=n.readBits(1);const e=n.readBits(2);if(0===e){n.alignToByte();const e=n.readUint16LE();n.readUint16LE(),o(e);for(let t=0;t<e;t++)r[i++]=n.readByte()}else if(1===e)l(LE,RE);else{if(2!==e)throw new yb(`Invalid DEFLATE block type: ${e}`);{const e=n.readBits(5)+257,t=n.readBits(5)+1,r=n.readBits(4)+4,i=new Uint8Array(19);for(let e=0;e<r;e++)i[PE[e]]=n.readBits(3);const o=QE(i,19),a=e+t,s=new Uint8Array(a);let c=0;for(;c<a;){const e=TE(n,o);if(e<16)s[c++]=e;else if(16===e){const e=n.readBits(2)+3,t=c>0?s[c-1]:0;for(let n=0;n<e;n++)s[c++]=t}else if(17===e){const e=n.readBits(3)+3;for(let t=0;t<e;t++)s[c++]=0}else if(18===e){const e=n.readBits(7)+11;for(let t=0;t<e;t++)s[c++]=0}}const u=s.subarray(0,e),f=s.subarray(e,e+t);l(QE(u,e),QE(f,t))}}}while(0===c);return r.subarray(0,i)}function zE(e){return 0===e.length?new Uint8Array([3,0]):e.length<=64?function(e){const t=[];let n=0;for(;n<e.length;){const r=e.length-n,i=Math.min(r,65535),o=n+i>=e.length,a=new Uint8Array(5+i);a[0]=o?1:0,a[1]=255&i,a[2]=i>>8&255,a[3]=255&~i,a[4]=~i>>8&255,a.set(e.subarray(n,n+i),5),t.push(a),n+=i}const r=t.reduce((e,t)=>e+t.length,0),i=new Uint8Array(r);let o=0;for(const e of t)i.set(e,o),o+=e.length;return i}(e):function(e){let t=new Uint8Array(e.length+512),n=0,r=0,i=0;function o(e){if(n+e>t.length){let r=2*t.length;for(;n+e>r;)r*=2;const i=new Uint8Array(r);i.set(t),t=i}}function a(e,a){for(r|=e<<i,i+=a;i>=8;)o(1),t[n++]=255&r,r>>>=8,i-=8}function s(){i>0&&(o(1),t[n++]=255&r,r=0,i=0)}function l(e){e<=143?a(jE(48+e,8),8):e<=255?a(jE(e-144+400,9),9):e<=279?a(jE(e-256,7),7):a(jE(e-280+192,8),8)}function c(e){a(jE(e,5),5)}a(1,1),a(1,2);const u=32768,f=258,d=3,h=32768,p=h-1,g=new Int32Array(h).fill(-1),m=new Int32Array(u);function y(t){return t+2>=e.length?0:(e[t]<<10^e[t+1]<<5^e[t+2])&p}let v=0;for(;v<e.length;){if(v+d>e.length){l(e[v]),v++;continue}const t=y(v);let n=d-1,r=0,i=g[t],o=0;const s=128,h=Math.max(0,v-u);for(;i>=h&&o<s;){const t=v-i;if(t>0&&t<=u){let o=0;const a=Math.min(f,e.length-v);for(;o<a&&e[i+o]===e[v+o];)o++;if(o>n&&(n=o,r=t,o===f))break}i=m[i&u-1],o++}if(m[v&u-1]=g[t],g[t]=v,n>=d){const t=VE(n);l(t+257),a(n-UE[t],HE[t]);const i=YE(r);c(i),a(r-qE[i],OE[i]);for(let t=1;t<n;t++){const n=v+t;if(n+d<=e.length){const e=y(n);m[n&u-1]=g[e],g[e]=n}}v+=n}else l(e[v]),v++}return l(256),s(),t.subarray(0,n)}(e)}function jE(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}function VE(e){for(let t=UE.length-1;t>=0;t--)if(e>=UE[t])return t;return 0}function YE(e){for(let t=qE.length-1;t>=0;t--)if(e>=qE[t])return t;return 0}let WE,GE;function JE(){if(void 0===GE)try{new DecompressionStream("deflate-raw"),GE="undefined"!=typeof ReadableStream}catch{GE=!1}return GE}const _E=67324752,XE=4294967295;class KE{data;view;centralDir=[];entryMap=new Map;maxDecompressedBytes;constructor(e,t=2147483648){if(this.data=e,this.maxDecompressedBytes=t,e.length<22)throw new yb("Data too small to be a valid ZIP archive");this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.readEndOfCentralDir()}entries(){return this.centralDir.map(e=>e.fileName)}has(e){return this.entryMap.has(e)}declaredSize(e){const t=this.entryMap.get(e);if(!t?.uncompressedSize)return;const n=0===t.compressionMethod?t.compressedSize:1032*t.compressedSize;return t.compressedSize>0&&t.uncompressedSize>n?void 0:t.uncompressedSize}async extract(e){const t=this.entryMap.get(e);if(!t)throw new yb(`Entry not found: ${e}`);return this.extractEntry(t)}extractStream(e){const t=this.entryMap.get(e);if(!t)throw new yb(`Entry not found: ${e}`);return this.extractEntryStream(t)}async extractAll(){const e=new Map;for(const t of this.centralDir){if(t.fileName.endsWith("/"))continue;const n=await this.extractEntry(t);e.set(t.fileName,n)}return e}readEndOfCentralDir(){const e=Math.max(0,this.data.length-65557);let t=-1;for(let n=this.data.length-22;n>=e;n--)if(101010256===this.view.getUint32(n,!0)){t=n;break}if(-1===t)throw new yb("End of Central Directory not found — not a valid ZIP file");let n=this.view.getUint32(t+12,!0),r=this.view.getUint32(t+16,!0),i=this.view.getUint16(t+10,!0);if(65535===i||n===XE||r===XE){const e=this.readZip64EndOfCentralDir(t);i=e.entryCount,n=e.centralDirSize,r=e.centralDirOffset}this.readCentralDirectory(r,n,i)}readZip64EndOfCentralDir(e){const t=e-20;if(t<0||117853008!==this.view.getUint32(t,!0))throw new yb("ZIP64 End of Central Directory locator not found");const n=this.readUint64(t+8,"ZIP64 EOCD offset");if(n+56>this.data.length)throw new yb("ZIP64 End of Central Directory record extends beyond file");if(101075792!==this.view.getUint32(n,!0))throw new yb("Invalid ZIP64 End of Central Directory signature");return{entryCount:this.readUint64(n+32,"ZIP64 entry count"),centralDirSize:this.readUint64(n+40,"ZIP64 central directory size"),centralDirOffset:this.readUint64(n+48,"ZIP64 central directory offset")}}readUint64(e,t){if(e+8>this.data.length)throw new yb(`${t} extends beyond file`);const n=this.view.getBigUint64(e,!0);if(n>BigInt(Number.MAX_SAFE_INTEGER))throw new yb(`${t} (${n}) exceeds the addressable range`);return Number(n)}readCentralDirectory(e,t,n){let r=e;for(let e=0;e<n;e++){if(r+46>this.data.length)throw new yb("Central Directory entry extends beyond file");const e=this.view.getUint32(r,!0);if(33639248!==e)throw new yb(`Invalid Central Directory signature at offset ${r}: 0x${e.toString(16)}`);const t=this.view.getUint16(r+8,!0),n=this.view.getUint16(r+10,!0),i=this.view.getUint32(r+16,!0);let o=this.view.getUint32(r+20,!0),a=this.view.getUint32(r+24,!0);const s=this.view.getUint16(r+28,!0),l=this.view.getUint16(r+30,!0),c=this.view.getUint16(r+32,!0);let u=this.view.getUint32(r+42,!0);const f=this.data.subarray(r+46,r+46+s),d=(new TextDecoder).decode(f);if(o===XE||a===XE||u===XE){const e=this.readZip64Extra(r+46+s,l,a===XE,o===XE,u===XE,d);void 0!==e.uncompressedSize&&(a=e.uncompressedSize),void 0!==e.compressedSize&&(o=e.compressedSize),void 0!==e.localHeaderOffset&&(u=e.localHeaderOffset)}const h={fileName:d,compressionMethod:n,compressedSize:o,uncompressedSize:a,crc32:i,localHeaderOffset:u,hasDataDescriptor:!!(8&t)};this.centralDir.push(h),this.entryMap.set(d,h),r+=46+s+l+c}}readZip64Extra(e,t,n,r,i,o){const a=Math.min(e+t,this.data.length);let s=e;for(;s+4<=a;){const e=this.view.getUint16(s,!0),t=this.view.getUint16(s+2,!0),a=s+4;if(1!==e){s=a+t;continue}const l=a+t;let c=a;const u={},f=e=>{if(c+8>l)throw new yb(`Truncated ZIP64 extra field for entry: ${o}`);const t=this.readUint64(c,e);return c+=8,t};return n&&(u.uncompressedSize=f("ZIP64 uncompressed size")),r&&(u.compressedSize=f("ZIP64 compressed size")),i&&(u.localHeaderOffset=f("ZIP64 local header offset")),u}throw new yb(`Missing ZIP64 extra field for entry: ${o}`)}async extractEntry(e){const t=e.localHeaderOffset;if(t+30>this.data.length)throw new yb("Local file header extends beyond file");if(this.view.getUint32(t,!0)!==_E)throw new yb(`Invalid local file header signature at offset ${t}`);const n=t+30+this.view.getUint16(t+26,!0)+this.view.getUint16(t+28,!0);let{compressedSize:r,uncompressedSize:i,crc32:o}=e;if(e.hasDataDescriptor&&0===r){const e=this.view.getUint32(t+18,!0);e>0&&e!==XE&&(r=e);const a=this.view.getUint32(t+22,!0);if(a>0&&a!==XE&&(i=a),0===r){const e=this.findDataDescriptor(n);e&&(o=e.crc,r=e.compressedSize,i=e.uncompressedSize)}}if(n+r>this.data.length)throw new yb(`Compressed data extends beyond file for entry: ${e.fileName}`);const a=this.data.subarray(n,n+r);let s;if(0===e.compressionMethod)s=a;else{if(8!==e.compressionMethod)throw new yb(`Unsupported compression method ${e.compressionMethod} for entry: ${e.fileName}`);if(0===r&&0===i)s=new Uint8Array(0);else{const e=i>0?Math.min(i,this.maxDecompressedBytes):this.maxDecompressedBytes;s=await async function(e,t=2147483648){if(JE())try{const n=new DecompressionStream("deflate-raw"),r=n.writable.getWriter(),i=n.readable.getReader();r.write(e).catch(()=>{}),r.close().catch(()=>{});const o=[];let a=0;for(;;){const{done:e,value:n}=await i.read();if(e)break;if(a+=n.length,a>t){try{await i.cancel()}catch{}throw new yb(`Decompressed size exceeds limit of ${t} bytes (possible zip bomb)`)}o.push(n)}const s=new Uint8Array(a);let l=0;for(const e of o)s.set(e,l),l+=e.length;return s}catch(e){if(e instanceof yb)throw e}return $E(e,t)}(a,e)}}if(0!==o&&s.length>0){const t=NE(s);if(t!==o)throw new yb(`CRC-32 mismatch for ${e.fileName}: expected 0x${o.toString(16)}, got 0x${t.toString(16)}`)}return s}extractEntryStream(e){const t=e.localHeaderOffset;if(t+30>this.data.length)throw new yb("Local file header extends beyond file");if(this.view.getUint32(t,!0)!==_E)throw new yb(`Invalid local file header signature at offset ${t}`);const n=t+30+this.view.getUint16(t+26,!0)+this.view.getUint16(t+28,!0);let{compressedSize:r}=e;if(e.hasDataDescriptor&&0===r){const e=this.view.getUint32(t+18,!0);if(e>0&&e!==XE&&(r=e),0===r){const e=this.findDataDescriptor(n);e&&(r=e.compressedSize)}}if(n+r>this.data.length)throw new yb(`Compressed data extends beyond file for entry: ${e.fileName}`);const i=this.data.subarray(n,n+r);if(0===e.compressionMethod)return FE(i);if(8===e.compressionMethod){if(0===r&&0===e.uncompressedSize)return new ReadableStream({start(e){e.close()}});const t=e.uncompressedSize>0?Math.min(e.uncompressedSize,this.maxDecompressedBytes):this.maxDecompressedBytes;if(JE()){return new ReadableStream({start(e){e.enqueue(i),e.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).pipeThrough(function(e){let t=0;return new TransformStream({transform(n,r){if(t+=n.length,t>e)throw new yb(`Decompressed size exceeds limit of ${e} bytes (possible zip bomb)`);r.enqueue(n)}})}(t))}return FE($E(i,t))}throw new yb(`Unsupported compression method ${e.compressionMethod} for entry: ${e.fileName}`)}findDataDescriptor(e){for(let t=e;t<this.data.length-16;t++)if(134695760===this.view.getUint32(t,!0))return{crc:this.view.getUint32(t+4,!0),compressedSize:this.view.getUint32(t+8,!0),uncompressedSize:this.view.getUint32(t+12,!0)};return null}}function ZE(e){const t=[];let n=null;for(const r of e.children){if("string"==typeof r)continue;const e=r.local||r.tag;"t"===e?n=eB(r):"r"===e&&t.push(r)}if(0===t.length)return{text:kb(n??"")};const r=[],i=[];for(const e of t){let t,n="";for(const r of e.children){if("string"==typeof r)continue;const e=r.local||r.tag;"t"===e?n=eB(r):"rPr"===e&&(t=tB(r))}const o=kb(n);i.push(o),r.push(t?{text:o,font:t}:{text:o})}return{text:i.join(""),richText:r}}function eB(e){return e.text??""}function tB(e){const t={};for(const n of e.children){if("string"==typeof n)continue;switch(n.local||n.tag){case"b":t.bold="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"i":t.italic="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"u":{const e=n.attrs.val;t.underline="double"===e?"double":"singleAccounting"===e?"singleAccounting":"doubleAccounting"!==e||"doubleAccounting";break}case"strike":t.strikethrough="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"sz":n.attrs.val&&(t.size=Number(n.attrs.val));break;case"rFont":n.attrs.val&&(t.name=n.attrs.val);break;case"color":if(t.color={},n.attrs.rgb){const e=n.attrs.rgb;t.color.rgb=8===e.length?e.slice(2):e}n.attrs.theme&&(t.color.theme=Number(n.attrs.theme)),n.attrs.tint&&(t.color.tint=Number(n.attrs.tint)),n.attrs.indexed&&(t.color.indexed=Number(n.attrs.indexed));break;case"vertAlign":"superscript"!==n.attrs.val&&"subscript"!==n.attrs.val||(t.vertAlign=n.attrs.val);break;case"family":n.attrs.val&&(t.family=Number(n.attrs.val));break;case"charset":n.attrs.val&&(t.charset=Number(n.attrs.val));break;case"scheme":"major"!==n.attrs.val&&"minor"!==n.attrs.val&&"none"!==n.attrs.val||(t.scheme=n.attrs.val)}}return t}const nB=Date.UTC(1899,11,31),rB=Date.UTC(1904,0,1),iB=864e5;function oB(e,t){const n=e.getTime();if(t)return(n-rB)/iB;let r=(n-nB)/iB;return r>=60&&(r+=1),Math.round(1e10*r)/1e10}const aB=new Set([14,15,16,17,18,19,20,21,22,27,28,29,30,31,32,33,34,35,36,45,46,47,50,51,52,53,54,55,56,57,58]);function sB(e){if(!e)return!1;const t=Number(e);if(!Number.isNaN(t)&&Number.isInteger(t)&&aB.has(t))return!0;let n=e.replace(/\[[$\-\w]*\]/g,"");if(n=n.replace(/\\./g,""),n=n.replace(/"[^"]*"/g,""),n=n.replace(/[*_]./g,""),/^(General|@)$/i.test(n.trim()))return!1;const r=n.toLowerCase();if(/[hs]/.test(r)){if(/\bh{1,2}\b|(?:^|[^a-z])h{1,2}(?:[^a-z]|$)/i.test(r))return!0;if(/\bs{1,2}\b|(?:^|[^a-z])s{1,2}(?:[^a-z]|$)/i.test(r))return!0}return!!/am\/pm|a\/p/i.test(r)||(!!/\[h+\]|\[m+\]|\[s+\]/i.test(e)||(!!/y{1,4}/.test(r)||(!!/d{1,4}/.test(r)||!!/m{3,}/.test(r))))}const lB=["January","February","March","April","May","June","July","August","September","October","November","December"],cB=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],uB=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],fB=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];const dB=["000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","800000","008000","000080","808000","800080","008080","C0C0C0","808080","9999FF","993366","FFFFCC","CCFFFF","660066","FF8080","0066CC","CCCCFF","000080","FF00FF","FFFF00","00FFFF","800080","800000","008080","0000FF","00CCFF","CCFFFF","CCFFCC","FFFF99","99CCFF","FF99CC","CC99FF","FFCC99","3366FF","33CCCC","99CC00","FFCC00","FF9900","FF6600","666699","969696","003366","339966","003300","333300","993300","993366","333399","333333"],hB="http://schemas.microsoft.com/office/spreadsheetml/2022/featurepropertybag",pB="{C7286773-470A-42A8-94C5-96B5CB345126}",gB="xl/featurePropertyBag/featurePropertyBag.xml";const mB={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",5:"$#,##0_);\\($#,##0\\)",6:"$#,##0_);[Red]\\($#,##0\\)",7:"$#,##0.00_);\\($#,##0.00\\)",8:"$#,##0.00_);[Red]\\($#,##0.00\\)",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yyyy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yyyy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"};function yB(e){const t=Ub(e),n=new Map,r=[],i=[],o=[],a=[],s=[];for(const e of t.children){if("string"==typeof e)continue;switch(e.local||e.tag){case"numFmts":AB(e,n);break;case"fonts":bB(e,r);break;case"fills":xB(e,i);break;case"borders":SB(e,o);break;case"cellXfs":DB(e,a);break;case"dxfs":MB(e,s)}}const l=function(e){for(const t of e.children)if("string"!=typeof t&&"colors"===(t.local||t.tag))for(const e of t.children){if("string"==typeof e)continue;if("indexedColors"!==(e.local||e.tag))continue;const t=[];for(const n of e.children){if("string"==typeof n)continue;if("rgbColor"!==(n.local||n.tag))continue;const e=n.attrs.rgb;e&&t.push(8===e.length?e.slice(2):e)}if(t.length>0)return t}return dB}(t);for(const e of[r,i,o,s])vB(e,l);return{numFmts:n,fonts:r,fills:i,borders:o,cellXfs:a,dxfs:s}}function vB(e,t){if(null===e||"object"!=typeof e)return;if(Array.isArray(e)){for(const n of e)vB(n,t);return}const n=e;if("number"==typeof n.indexed&&"string"!=typeof n.rgb){const e=t[n.indexed];e&&(n.rgb=e)}for(const e of Object.values(n))vB(e,t)}function AB(e,t){for(const n of e.children){if("string"==typeof n)continue;if("numFmt"===(n.local||n.tag)){const e=Number(n.attrs.numFmtId),r=n.attrs.formatCode??"";Number.isNaN(e)||t.set(e,r)}}}function bB(e,t){for(const n of e.children){if("string"==typeof n)continue;"font"===(n.local||n.tag)&&t.push(wB(n))}}function wB(e){const t={};for(const n of e.children){if("string"==typeof n)continue;switch(n.local||n.tag){case"b":t.bold="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"i":t.italic="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"u":{const e=n.attrs.val;t.underline="double"===e?"double":"singleAccounting"===e?"singleAccounting":"doubleAccounting"!==e||"doubleAccounting";break}case"strike":t.strikethrough="0"!==n.attrs.val&&"false"!==n.attrs.val;break;case"sz":n.attrs.val&&(t.size=Number(n.attrs.val));break;case"name":n.attrs.val&&(t.name=n.attrs.val);break;case"color":t.color=IB(n);break;case"vertAlign":"superscript"!==n.attrs.val&&"subscript"!==n.attrs.val||(t.vertAlign=n.attrs.val);break;case"family":n.attrs.val&&(t.family=Number(n.attrs.val));break;case"charset":n.attrs.val&&(t.charset=Number(n.attrs.val));break;case"scheme":"major"!==n.attrs.val&&"minor"!==n.attrs.val&&"none"!==n.attrs.val||(t.scheme=n.attrs.val)}}return t}function IB(e){const t={};if(e.attrs.rgb){const n=e.attrs.rgb;t.rgb=8===n.length?n.slice(2):n}return e.attrs.theme&&(t.theme=Number(e.attrs.theme)),e.attrs.tint&&(t.tint=Number(e.attrs.tint)),e.attrs.indexed&&(t.indexed=Number(e.attrs.indexed)),t}function xB(e,t){for(const n of e.children){if("string"==typeof n)continue;"fill"===(n.local||n.tag)&&t.push(CB(n))}}function CB(e){for(const t of e.children){if("string"==typeof t)continue;const e=t.local||t.tag;if("patternFill"===e)return EB(t);if("gradientFill"===e)return BB(t)}return{type:"pattern",pattern:"none"}}function EB(e){const t={type:"pattern",pattern:e.attrs.patternType??"none"};for(const n of e.children){if("string"==typeof n)continue;const e=n.local||n.tag;"fgColor"===e?t.fgColor=IB(n):"bgColor"===e&&(t.bgColor=IB(n))}return t}function BB(e){const t=e.attrs.degree?Number(e.attrs.degree):void 0,n=[];for(const t of e.children){if("string"==typeof t)continue;if("stop"===(t.local||t.tag)){const e=Number(t.attrs.position??"0");for(const r of t.children){if("string"==typeof r)continue;"color"===(r.local||r.tag)&&n.push({position:e,color:IB(r)})}}}return{type:"gradient",degree:t,stops:n}}function SB(e,t){for(const n of e.children){if("string"==typeof n)continue;"border"===(n.local||n.tag)&&t.push(kB(n))}}function kB(e){const t={},n=e.attrs.diagonalUp,r=e.attrs.diagonalDown;"1"!==n&&"true"!==n||(t.diagonalUp=!0),"1"!==r&&"true"!==r||(t.diagonalDown=!0);for(const n of e.children){if("string"==typeof n)continue;const e=n.local||n.tag,r=FB(n);if(r)switch(e){case"left":t.left=r;break;case"right":t.right=r;break;case"top":t.top=r;break;case"bottom":t.bottom=r;break;case"diagonal":t.diagonal=r}}return t}function FB(e){const t=e.attrs.style;if(!t)return;const n={style:t};for(const t of e.children){if("string"==typeof t)continue;"color"===(t.local||t.tag)&&(n.color=IB(t))}return n}function DB(e,t){for(const n of e.children){if("string"==typeof n)continue;"xf"===(n.local||n.tag)&&t.push(NB(n))}}function NB(e){const t={numFmtId:Number(e.attrs.numFmtId??"0"),fontId:Number(e.attrs.fontId??"0"),fillId:Number(e.attrs.fillId??"0"),borderId:Number(e.attrs.borderId??"0")};"1"!==e.attrs.applyNumberFormat&&"true"!==e.attrs.applyNumberFormat||(t.applyNumberFormat=!0),"1"!==e.attrs.applyFont&&"true"!==e.attrs.applyFont||(t.applyFont=!0),"1"!==e.attrs.applyFill&&"true"!==e.attrs.applyFill||(t.applyFill=!0),"1"!==e.attrs.applyBorder&&"true"!==e.attrs.applyBorder||(t.applyBorder=!0),"1"!==e.attrs.applyAlignment&&"true"!==e.attrs.applyAlignment||(t.applyAlignment=!0),"1"!==e.attrs.applyProtection&&"true"!==e.attrs.applyProtection||(t.applyProtection=!0);for(const n of e.children){if("string"==typeof n)continue;const e=n.local||n.tag;"alignment"===e?t.alignment=RB(n):"protection"===e?t.protection=LB(n):"extLst"===e&&TB(n)&&(t.hasCheckboxFeature=!0)}return t}function MB(e,t){for(const n of e.children){if("string"==typeof n)continue;"dxf"===(n.local||n.tag)&&t.push(QB(n))}}function QB(e){const t={};for(const n of e.children){if("string"==typeof n)continue;switch(n.local||n.tag){case"font":t.font=wB(n);break;case"numFmt":{const e=n.attrs.formatCode;if(e)t.numFmt=e;else{const e=Number(n.attrs.numFmtId),r=Number.isNaN(e)?void 0:mB[e];r&&(t.numFmt=r)}break}case"fill":t.fill=CB(n);break;case"border":t.border=kB(n);break;case"alignment":t.alignment=RB(n)}}return t}function TB(e){for(const t of e.children){if("string"==typeof t)continue;if("ext"===(t.local||t.tag)&&t.attrs.uri===pB)return!0}return!1}function LB(e){const t={},n=e.attrs.locked;void 0!==n&&(t.locked="1"===n||"true"===n);const r=e.attrs.hidden;return void 0!==r&&(t.hidden="1"===r||"true"===r),t}function RB(e){const t={};if(e.attrs.horizontal&&(t.horizontal=e.attrs.horizontal),e.attrs.vertical&&(t.vertical=e.attrs.vertical),"1"!==e.attrs.wrapText&&"true"!==e.attrs.wrapText||(t.wrapText=!0),"1"!==e.attrs.shrinkToFit&&"true"!==e.attrs.shrinkToFit||(t.shrinkToFit=!0),e.attrs.textRotation&&(t.textRotation=Number(e.attrs.textRotation)),e.attrs.indent&&(t.indent=Number(e.attrs.indent)),e.attrs.readingOrder){const n=Number(e.attrs.readingOrder);t.readingOrder=1===n?"ltr":2===n?"rtl":"context"}return t}function UB(e,t){const n=e.cellXfs[t];if(!n)return{};const r={};if(0!==n.numFmtId){const t=e.numFmts.get(n.numFmtId)??mB[n.numFmtId];t&&(r.numFmt=t)}return n.fontId<e.fonts.length&&0!==n.fontId&&(r.font=e.fonts[n.fontId]),n.fillId<e.fills.length&&n.fillId>1&&(r.fill=e.fills[n.fillId]),n.borderId<e.borders.length&&0!==n.borderId&&(r.border=e.borders[n.borderId]),n.alignment&&(r.alignment=n.alignment),n.protection&&(r.protection=n.protection),r}function HB(e,t){const n=e.cellXfs[t];if(!n)return!1;const r=n.numFmtId,i=e.numFmts.get(r);if(i)return sB(i);if(o=r,aB.has(o))return!0;var o;const a=mB[r];return!!a&&sB(a)}function qB(e){return void 0===e?void 0:{...e}}function OB(e){const t={...e};return e.color&&(t.color=qB(e.color)),t}function PB(e){if("gradient"===e.type)return{...e,stops:e.stops.map(e=>({...e,color:{...e.color}}))};const t={...e};return e.fgColor&&(t.fgColor=qB(e.fgColor)),e.bgColor&&(t.bgColor=qB(e.bgColor)),t}function $B(e){if(void 0===e)return;const t={...e};return e.color&&(t.color=qB(e.color)),t}function zB(e){const t={...e};for(const n of["top","right","bottom","left","diagonal"])e[n]&&(t[n]=$B(e[n]));return t}function jB(e){const t={...e};return e.font&&(t.font=OB(e.font)),e.fill&&(t.fill=PB(e.fill)),e.border&&(t.border=zB(e.border)),e.alignment&&(t.alignment={...e.alignment}),e.protection&&(t.protection={...e.protection}),t}function VB(e){return"string"==typeof e?function(e){const t=e.split(":"),n=HS(t[0]),r=t.length>1?HS(t[1]):n;return{startRow:n.row,startCol:n.col,endRow:r.row,endCol:r.col}}(e):e}function YB(e){return"object"==typeof e&&null!==e&&"string"==typeof e.hyperlink&&"string"==typeof e.text}function WB(e){return YB(e)?e.text:e}function GB(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=63744&&e<=64255||e>=44032&&e<=55215||e>=12448&&e<=12543||e>=12352&&e<=12447||e>=12288&&e<=12351||e>=65280&&e<=65376||e>=65504&&e<=65510}function JB(e){const t=e.indexOf(".");if(-1===t)return 0;let n=0;for(let r=t+1;r<e.length&&("0"===e[r]||"#"===e[r]);r++)n++;return n}function _B(e,t){if(!t.includes(","))return e;const n=e.split(".");let r=n[0];const i=r.startsWith("-");i&&(r=r.slice(1));let o="";for(let e=0;e<r.length;e++)e>0&&(r.length-e)%3==0&&(o+=","),o+=r[e];return i&&(o="-"+o),void 0!==n[1]&&(o+="."+n[1]),o}function XB(e){let t=0;for(const n of e){const e=n.codePointAt(0);void 0!==e&&GB(e)?t+=2:t+=1}return t}function KB(e,t){if(null==e)return 0;if("boolean"==typeof e)return e?5:6;if("string"==typeof e){if(0===e.length)return 0;if(e.includes("\n")){const t=e.split("\n");let n=0;for(const e of t){const t=XB(e);t>n&&(n=t)}return n}return XB(e)}if("number"==typeof e){if(t){const n=function(e,t){const n=t.trim().split(";");let r;if(e>0?r=n[0]:e<0&&n.length>1?(r=n[1],e=Math.abs(e)):r=0===e&&n.length>2?n[2]:n[0],r=r.replace(/\[[^\]]*\]/g,""),r=r.replace(/\\./g,e=>e[1]),r=r.replace(/"([^"]*)"/g,"$1"),r.includes("%")){const t=JB(r.replace(/%/g,""));return _B((100*e).toFixed(t),r)+"%"}const i=JB(r);return _B(e.toFixed(i),r)}(e,t),r=function(e){let t=0;const n=e.split(";")[0].replace(/\[[^\]]*\]/g,"");for(let e=0;e<n.length;e++){const r=n[e];if('"'===r)for(e++;e<n.length&&'"'!==n[e];)t++,e++;else"\\"===r?(t++,e++):"$"!==r&&"€"!==r&&"£"!==r&&"¥"!==r||t++}return t}(t);return XB(n)+r}return XB(String(e))}if(e instanceof Date){if(t){const n=function(e,t,n){const r=e.getUTCFullYear(),i=e.getUTCMonth(),o=e.getUTCDate(),a=e.getUTCDay();let s=e.getUTCHours();const l=e.getUTCMinutes(),c=e.getUTCSeconds(),u=e.getUTCMilliseconds();let f="",d=s;/am\/pm|a\/p/i.test(t)&&(f=s>=12?"PM":"AM",d=s%12,0===d&&(d=12));const h=function(e){const t=[];let n=0;for(;n<e.length;){if("["===e[n]&&"$"===e[n+1]){const t=e.indexOf("]",n);if(-1!==t){n=t+1;continue}}if("["===e[n]){const r=e.indexOf("]",n);if(-1!==r){const i=e.slice(n+1,r);if(/^h+$/i.test(i)||/^m+$/i.test(i)||/^s+$/i.test(i)){t.push(e.slice(n,r+1)),n=r+1;continue}n=r+1;continue}}if('"'===e[n]){let r="";for(n++;n<e.length&&'"'!==e[n];)r+=e[n],n++;n++,t.push(r);continue}if("\\"===e[n]){n++,n<e.length&&(t.push(e[n]),n++);continue}if(/^am\/pm/i.test(e.slice(n))){t.push(e.slice(n,n+5)),n+=5;continue}if(/^a\/p/i.test(e.slice(n))){t.push(e.slice(n,n+3)),n+=3;continue}if("."===e[n]&&n+1<e.length&&"0"===e[n+1]){let r=".",i=n+1;for(;i<e.length&&"0"===e[i];)r+="0",i++;t.push(r),n=i;continue}const r=e[n].toLowerCase();if("ymdhsn".includes(r)){let i="";const o=r;for(;n<e.length&&e[n].toLowerCase()===o;)i+=e[n],n++;t.push(i);continue}t.push(e[n]),n++}return t}(t),p=void 0!==n&&n>0?n:0,g=Math.floor(24*p),m=Math.floor(24*p*60),y=Math.floor(24*p*60*60),v=Array.from({length:h.length},()=>!1);for(let e=0;e<h.length;e++){const t=h[e].toLowerCase();if("m"!==t&&"mm"!==t)continue;let n=!1;for(let t=e-1;t>=0;t--){const e=h[t].toLowerCase();if("h"===e||"hh"===e||/^\[h+\]$/.test(e)){n=!0;break}if(/^[ymdhs]+$/.test(e)||/^\[[ms]+\]$/.test(e)||"am/pm"===e||"a/p"===e)break}let r=!1;for(let t=e+1;t<h.length;t++){const e=h[t].toLowerCase();if("s"===e||"ss"===e){r=!0;break}if(/^[ymdh]+$/.test(e)||"am/pm"===e||"a/p"===e)break}v[e]=n||r}let A="";for(let e=0;e<h.length;e++){const t=h[e],n=t.toLowerCase();if(t.startsWith("[")&&t.endsWith("]")){const e=n.slice(1,-1);/^h+$/.test(e)?A+=String(g).padStart(e.length,"0"):/^m+$/.test(e)?A+=String(m).padStart(e.length,"0"):/^s+$/.test(e)&&(A+=String(y).padStart(e.length,"0"));continue}switch(n){case"yyyy":A+=String(r);break;case"yy":A+=String(r%100).padStart(2,"0");break;case"mmmm":A+=lB[i];break;case"mmm":A+=cB[i];break;case"mm":v[e]?A+=String(l).padStart(2,"0"):A+=String(i+1).padStart(2,"0");break;case"m":v[e]?A+=String(l):A+=String(i+1);break;case"dddd":A+=uB[a];break;case"ddd":A+=fB[a];break;case"dd":A+=String(o).padStart(2,"0");break;case"d":A+=String(o);break;case"hh":A+=String(d).padStart(2,"0");break;case"h":A+=String(d);break;case"ss":A+=String(c).padStart(2,"0");break;case"s":A+=String(c);break;case".0":case".00":case".000":{const e=n.length-1;A+="."+String(u).padStart(3,"0").slice(0,e)}break;case"am/pm":A+=f;break;case"a/p":A+=f.charAt(0);break;default:A+=t}}return A}(e,t);return XB(n)}return XB(`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`)}return 0}function ZB(e,t){const n=t?.minWidth??8,r=t?.maxWidth??255,i=t?.padding??2,o=!0===t?.font?.bold;let a=0;for(const n of e){const e=KB(n,t?.numFmt);e>a&&(a=e)}let s=1.1*a;return o&&(s*=1.05),s+=i,s=Math.ceil(2*s)/2,s<n&&(s=n),s>r&&(s=r),s}const eS="XLDAPR",tS="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}",nS="xl/metadata.xml";function rS(e){for(const t of qb(e))if("extLst"===t.local)for(const e of qb(t))if("ext"===e.local&&(e.attrs.uri??"").toLowerCase()===tS)for(const t of qb(e)){if("dynamicArrayProperties"!==t.local)continue;const e=t.attrs.fDynamic;return"0"!==e&&"false"!==e}return!0}function iS(e){let t=0;for(let n=e.length-1;n>=0;n--){t=t>>14&1|t<<1&32767,t^=e.charCodeAt(n)}return t=t>>14&1|t<<1&32767,t^=e.length,t^=52811,t.toString(16).toUpperCase().padStart(4,"0")}const oS=/[[\]:*?/\\]/;function aS(e,t){const n=`sheet ${t+1}`;if("string"!=typeof e||0===e.length)throw new Ab(`Sheet name is empty (${n}); Excel requires a name`);if(e.length>31)throw new Ab(`Sheet name "${e}" is ${e.length} characters (${n}); Excel allows at most 31`);const r=e.match(oS);if(r)throw new Ab(`Sheet name "${e}" contains ${JSON.stringify(r[0])} (${n}); Excel forbids [ ] : * ? / \\ in sheet names`);if(e.startsWith("'")||e.endsWith("'"))throw new Ab(`Sheet name "${e}" starts or ends with an apostrophe (${n}); Excel forbids it because it breaks quoted range references`);if("history"===e.toLowerCase())throw new Ab(`Sheet name "${e}" is reserved by Excel for change tracking (${n})`)}function sS(e){return!("object"!=typeof e||null===e||e instanceof Date||Array.isArray(e)||YB(e))}function lS(e){return sS(e)?e.value??null:e}function cS(e){let t=!1;const n=e.map(e=>{const n=function(e){const t=e.rows;if(!t)return e;let n=!1;for(const e of t){for(const t of e)if(sS(t)){n=!0;break}if(n)break}if(!n)return e;const r=[],i=new Map;for(let e=0;e<t.length;e++){const n=t[e],o=[];for(let t=0;t<n.length;t++){const r=n[t];sS(r)?(i.set(`${e},${t}`,r),o.push(r.value??null)):o.push(r)}r[e]=o}if(e.cells)for(const[t,n]of e.cells)i.set(t,n);return{...e,rows:r,cells:i}}(e);return n!==e&&(t=!0),n});return t?n:e}const uS="http://schemas.openxmlformats.org/spreadsheetml/2006/main";function fS(e){!function(e){if(!Number.isInteger(e)||e<0||e>OC)throw new Ab(`Column index ${e} is not a valid 0-based column (Excel allows 0..16383)`)}(e);let t="",n=e;do{t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26)-1}while(n>=0);return t}function dS(e,t){const n={r:e+1};return void 0!==t?.height&&(n.ht=t.height,n.customHeight=1),t?.hidden&&(n.hidden=1),t?.outlineLevel&&(n.outlineLevel=t.outlineLevel),t?.collapsed&&(n.collapsed=1),n}function hS(e,t){return fS(t)+(e+1)}function pS(e,t,n,r){return`${hS(e,t)}:${hS(n,r)}`}function gS(e){const t=e.hyperlink.startsWith("#")?{target:"",location:e.hyperlink.slice(1),display:e.text}:{target:e.hyperlink,display:e.text};return void 0!==e.tooltip&&(t.tooltip=e.tooltip),t}const mS="yyyy-mm-dd",yS=Object.freeze({numFmt:mS}),vS=new WeakMap,AS=new Set(["#VALUE!","#REF!","#N/A","#NAME?","#NULL!","#DIV/0!","#NUM!","#GETTING_DATA","#SPILL!","#CALC!"]);function bS(e,t,n,r,i,o,a){const s="1904"===r,l=IS(e),c=l.length;let u=0;for(const e of l)e.length>u&&(u=e.length);e.columns&&e.columns.length>u&&(u=e.columns.length);const f=[];{const t=[];if(e.view?.tabColor&&t.push(hw("tabColor",kS(e.view.tabColor))),e.outlineProperties){const n={};void 0!==e.outlineProperties.summaryBelow&&(n.summaryBelow=e.outlineProperties.summaryBelow?1:0),void 0!==e.outlineProperties.summaryRight&&(n.summaryRight=e.outlineProperties.summaryRight?1:0),t.push(hw("outlinePr",n))}e.pageSetup?.fitToPage&&t.push(hw("pageSetUpPr",{fitToPage:1})),t.length>0&&f.push(gw("sheetPr",void 0,t))}if(c>0||u>0){const e=c>0?c-1:0,t=u>0?u-1:0;f.push(hw("dimension",{ref:pS(0,0,e,t)}))}const d=[];if(e.freezePane){const t=e.freezePane,n=hS(t.rows??0,t.columns??0),r={};t.columns&&t.columns>0&&(r.xSplit=t.columns),t.rows&&t.rows>0&&(r.ySplit=t.rows),r.topLeftCell=n,r.state="frozen";const i=t.columns&&t.columns>0,o=t.rows&&t.rows>0;r.activePane=i&&o?"bottomRight":i?"topRight":"bottomLeft",d.push(hw("pane",r))}else if(e.splitPane){const t=e.splitPane,n={},r=void 0!==t.xSplit&&t.xSplit>0,i=void 0!==t.ySplit&&t.ySplit>0;r&&(n.xSplit=t.xSplit),i&&(n.ySplit=t.ySplit),n.topLeftCell="A1",n.state="split",n.activePane=r&&i?"bottomRight":r?"topRight":"bottomLeft",d.push(hw("pane",n))}const h={workbookViewId:0};e.view&&(!1===e.view.showGridLines&&(h.showGridLines=0),!1===e.view.showRowColHeaders&&(h.showRowColHeaders=0),void 0!==e.view.zoomScale&&(h.zoomScale=e.view.zoomScale),e.view.rightToLeft&&(h.rightToLeft=1)),f.push(gw("sheetViews",void 0,[d.length>0?gw("sheetView",h,d):hw("sheetView",h)]));const p={defaultRowHeight:e.defaultRowHeight??15};if(void 0!==e.defaultRowHeight&&(p.customHeight=1),void 0!==e.defaultColWidth&&(p.defaultColWidth=e.defaultColWidth),f.push(hw("sheetFormatPr",p)),e.columns&&e.columns.length>0){const n=[];for(let r=0;r<e.columns.length;r++){const i=e.columns[r];let o=i.width;if(i.autoWidth&&void 0===o){const e=[];for(const t of l)t&&r<t.length&&t[r]&&e.push(t[r].value);o=ZB(e,{font:i.style?.font,numFmt:i.numFmt??i.style?.numFmt})}const a=i.numFmt&&!i.style?.numFmt?{...i.style,numFmt:i.numFmt}:i.style??void 0,s=a?t.addStyle(a):0;if(void 0!==o||i.hidden||i.outlineLevel||i.collapsed||0!==s){const e={min:r+1,max:r+1};void 0!==o&&(e.width=o,e.customWidth=!0),0!==s&&(e.style=s),i.hidden&&(e.hidden=!0),i.outlineLevel&&(e.outlineLevel=i.outlineLevel),i.collapsed&&(e.collapsed=!0),n.push(hw("col",e))}}n.length>0&&f.push(gw("cols",void 0,n))}const g=[];let m=!1;for(let r=0;r<c;r++){const i=l[r],a=e.rowDefs?.get(r),c=a&&(void 0!==a.height||a.hidden||a.outlineLevel||a.collapsed);if(!(i&&0!==i.length||c))continue;const u=[];let f=!1;if(i)for(let e=0;e<i.length;e++){const a=i[e];if(!a)continue;a.formulaDynamic&&void 0!==a.formula&&null!==a.formula&&(m=!0);const l=CS(r,e,a,t,n,s,o);l&&(u.push(l),f=!0)}if(f||c){const e=dS(r,a);f?g.push(gw("row",e,u)):g.push(hw("row",e))}}if(f.push(gw("sheetData",void 0,g.length>0?g:"")),e.protection&&f.push(function(e){const t={};e.password&&(t.password=iS(e.password));!1!==e.sheet&&(t.sheet=1);e.objects&&(t.objects=1);e.scenarios&&(t.scenarios=1);const n=[["selectLockedCells","selectLockedCells"],["selectUnlockedCells","selectUnlockedCells"],["formatCells","formatCells"],["formatColumns","formatColumns"],["formatRows","formatRows"],["insertColumns","insertColumns"],["insertRows","insertRows"],["insertHyperlinks","insertHyperlinks"],["deleteColumns","deleteColumns"],["deleteRows","deleteRows"],["sort","sort"],["autoFilter","autoFilter"],["pivotTables","pivotTables"]];for(const[r,i]of n){const n=e[r];void 0!==n&&"boolean"==typeof n&&(t[i]=n?0:1)}return hw("sheetProtection",t)}(e.protection)),e.autoFilter)if(e.autoFilter.columns&&e.autoFilter.columns.length>0){const t=[];for(const n of e.autoFilter.columns)if(n.filters&&n.filters.length>0){const e=n.filters.map(e=>hw("filter",{val:e}));t.push(gw("filterColumn",{colId:n.colIndex},[gw("filters",void 0,e)]))}f.push(gw("autoFilter",{ref:e.autoFilter.range},t))}else f.push(hw("autoFilter",{ref:e.autoFilter.range}));const y=function(e){if(e)return e.some(e=>"string"==typeof e)?e.map(VB):e}(e.merges);if(y&&y.length>0){const e=y.map(e=>hw("mergeCell",{ref:pS(e.startRow,e.startCol,e.endRow,e.endCol)}));f.push(gw("mergeCells",{count:y.length},e))}e.conditionalRules&&e.conditionalRules.length>0&&f.push(...function(e,t){const n=new Map;for(const t of e){const e=n.get(t.range);e?e.push(t):n.set(t.range,[t])}const r=[];for(const[e,i]of n){const n=[];for(const e of i)n.push(DS(e,t));r.push(gw("conditionalFormatting",{sqref:e},n))}return r}(e.conditionalRules,t)),e.dataValidations&&e.dataValidations.length>0&&f.push(function(e){const t=[];for(const n of e){const e={type:n.type,sqref:n.range};n.operator&&(e.operator=n.operator),n.allowBlank&&(e.allowBlank=1),n.showInputMessage&&(e.showInputMessage=1),n.showErrorMessage&&(e.showErrorMessage=1),n.errorStyle&&(e.errorStyle=n.errorStyle),n.inputTitle&&(e.promptTitle=n.inputTitle),n.inputMessage&&(e.prompt=n.inputMessage),n.errorTitle&&(e.errorTitle=n.errorTitle),n.errorMessage&&(e.error=n.errorMessage);const r=[];if("list"===n.type&&n.values&&n.values.length>0){const e=`"${n.values.join(",")}"`;r.push(gw("formula1",void 0,uw(e)))}else void 0!==n.formula1&&r.push(gw("formula1",void 0,uw(n.formula1)));void 0!==n.formula2&&r.push(gw("formula2",void 0,uw(n.formula2))),r.length>0?t.push(gw("dataValidation",e,r)):t.push(hw("dataValidation",e))}return gw("dataValidations",{count:e.length},t)}(e.dataValidations));const{xml:v,relationships:A}=function(e,t){const n=t??IS(e),r=[],i=[];let o=1;for(let e=0;e<n.length;e++){const t=n[e];for(let n=0;n<t.length;n++){const a=t[n]?.hyperlink;if(!a)continue;const s={ref:hS(e,n)};if(a.location)s.location=a.location;else if(a.target){const e="rId"+o++;s["r:id"]=e,i.push({id:e,target:a.target})}a.tooltip&&(s.tooltip=a.tooltip),a.display&&(s.display=a.display),r.push(hw("hyperlink",s))}}if(0===r.length)return{xml:"",relationships:[]};return{xml:gw("hyperlinks",void 0,r),relationships:i}}(e,l);v&&f.push(v);const b=function(e){if(!e)return"";const t={};e.showGridLines&&(t.gridLines=1);e.showRowColHeaders&&(t.headings=1);e.horizontalCentered&&(t.horizontalCentered=1);e.verticalCentered&&(t.verticalCentered=1);return 0===Object.keys(t).length?"":hw("printOptions",t)}(e.pageSetup);if(b&&f.push(b),f.push(function(e){const t=e??{};return hw("pageMargins",{left:t.left??SS.left,right:t.right??SS.right,top:t.top??SS.top,bottom:t.bottom??SS.bottom,header:t.header??SS.header,footer:t.footer??SS.footer})}(e.pageSetup?.margins)),e.pageSetup&&f.push(function(e){const t={};if(void 0!==e.paperSize){const n=function(e){if("number"==typeof e)return Number.isInteger(e)&&e>0?e:void 0;return ES[e]}(e.paperSize);void 0!==n&&(t.paperSize=n)}e.orientation&&(t.orientation=e.orientation);void 0!==e.scale&&(t.scale=e.scale);e.fitToPage&&(void 0!==e.fitToWidth&&(t.fitToWidth=e.fitToWidth),void 0!==e.fitToHeight&&(t.fitToHeight=e.fitToHeight));void 0!==e.paperWidth&&(t.paperWidth=e.paperWidth);void 0!==e.paperHeight&&(t.paperHeight=e.paperHeight);void 0!==e.firstPageNumber&&(t.firstPageNumber=e.firstPageNumber);const n=e.useFirstPageNumber??(void 0!==e.firstPageNumber||void 0);void 0!==n&&(t.useFirstPageNumber=n?1:0);void 0!==e.pageOrder&&"downThenOver"!==e.pageOrder&&(t.pageOrder=e.pageOrder);e.blackAndWhite&&(t.blackAndWhite=1);e.draft&&(t.draft=1);void 0!==e.cellComments&&"none"!==e.cellComments&&(t.cellComments=e.cellComments);void 0!==e.errors&&"displayed"!==e.errors&&(t.errors=e.errors);void 0!==e.copies&&(t.copies=e.copies);void 0!==e.horizontalDpi&&(t.horizontalDpi=e.horizontalDpi);void 0!==e.verticalDpi&&(t.verticalDpi=e.verticalDpi);!1===e.usePrinterDefaults&&(t.usePrinterDefaults=0);if(0===Object.keys(t).length)return"";return hw("pageSetup",t)}(e.pageSetup)),e.headerFooter&&f.push(function(e){const t={};e.differentOddEven&&(t.differentOddEven=1);e.differentFirst&&(t.differentFirst=1);const n=[];e.oddHeader&&n.push(gw("oddHeader",void 0,uw(e.oddHeader)));e.oddFooter&&n.push(gw("oddFooter",void 0,uw(e.oddFooter)));e.evenHeader&&n.push(gw("evenHeader",void 0,uw(e.evenHeader)));e.evenFooter&&n.push(gw("evenFooter",void 0,uw(e.evenFooter)));e.firstHeader&&n.push(gw("firstHeader",void 0,uw(e.firstHeader)));e.firstFooter&&n.push(gw("firstFooter",void 0,uw(e.firstFooter)));if(0===n.length)return"";return gw("headerFooter",Object.keys(t).length>0?t:void 0,n)}(e.headerFooter)),e.rowBreaks&&e.rowBreaks.length>0){const t=[...e.rowBreaks].sort((e,t)=>e-t),n=t.map(e=>hw("brk",{id:e+1,max:16383,man:1}));f.push(gw("rowBreaks",{count:t.length,manualBreakCount:t.length},n))}if(e.colBreaks&&e.colBreaks.length>0){const t=[...e.colBreaks].sort((e,t)=>e-t),n=t.map(e=>hw("brk",{id:e+1,max:1048575,man:1}));f.push(gw("colBreaks",{count:t.length,manualBreakCount:t.length},n))}let w=null,I=A.length+1;const x=e.images&&e.images.length>0,C=e.textBoxes&&e.textBoxes.length>0,E=e.charts&&e.charts.length>0,B=f.length;(x||C||E)&&(w=`rId${I}`,I++,f.push(hw("drawing",{"r:id":w})));let S=null,k=null,F=!1;if(e.cells)for(const[,t]of e.cells)if(t.comment){F=!0;break}F&&(S=`rId${I}`,I++,k=`rId${I}`,I++,f.push(hw("legacyDrawing",{"r:id":S})));let D=null;e.backgroundImage&&(D=`rId${I}`,I++,f.push(hw("picture",{"r:id":D})));const N=[];if(e.tables&&e.tables.length>0&&void 0!==i){const t=[];for(let n=0;n<e.tables.length;n++){const e=`rId${I}`;I++;const r=i+n;N.push({rId:e,globalTableIndex:r}),t.push(hw("tablePart",{"r:id":e}))}f.push(gw("tableParts",{count:e.tables.length},t))}e.sparklines&&e.sparklines.length>0&&f.push(function(e){const t=[];let n=1;for(const r of e){const e={},i=r.type??"line";"line"!==i&&(e.type=i),e.displayEmptyCellsAs="gap";const o=`{00000000-0000-0000-0000-${String(n++).padStart(12,"0")}}`;e["xr2:uid"]=o,r.markers&&(e.markers="1");const a=[],s=r.color??"376092",l=6===s.length?`FF${s}`:s;a.push(hw("x14:colorSeries",{rgb:l}));const c=gw("x14:sparkline",void 0,[gw("xm:f",void 0,r.dataRange),gw("xm:sqref",void 0,r.location)]);a.push(gw("x14:sparklines",void 0,[c])),t.push(gw("x14:sparklineGroup",e,a))}const r=gw("x14:sparklineGroups",{"xmlns:xm":MS},t),i=gw("ext",{uri:TS,"xmlns:x14":NS,"xmlns:xr2":QS},[r]);return gw("extLst",void 0,[i])}(e.sparklines));const M=[];if(e.pivotTables&&e.pivotTables.length>0&&void 0!==a)for(let t=0;t<e.pivotTables.length;t++){const e=`rId${I}`;I++,M.push({rId:e,globalPivotIndex:a+t})}const Q=mw("worksheet",{xmlns:uS,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},f);return{xml:Q,drawingInsertOffset:LS(Q,f,B),hyperlinkRelationships:A,drawingRId:w,legacyDrawingRId:S,commentsRId:k,hasComments:F,tables:N,pictureRId:D,pivotTables:M,hasDynamicArray:m}}function wS(e){if(e)return e.numFmt&&!e.style?.numFmt?{...e.style,numFmt:e.numFmt}:e.style}function IS(e){const t=[];if(e.data&&e.columns){const n=e.columns.map(e=>e.key);if(e.columns.some(e=>e.header)){const n=[];for(let t=0;t<e.columns.length;t++){const r=e.columns[t];n.push({value:r.header??r.key??null,style:r.style})}t.push(n)}for(const r of e.data){const i=[];for(let t=0;t<n.length;t++){const o=n[t],a=void 0!==o?r[o]??null:null,s={value:YB(a)?a.text:a,style:wS(e.columns[t])};YB(a)&&(s.hyperlink=gS(a)),i.push(s)}t.push(i)}}else if(e.rows)for(const n of e.rows){const r=[];for(let t=0;t<n.length;t++){const i=lS(n[t]),o=e.columns?wS(e.columns[t]):void 0;r.push(o?{value:i,style:o}:{value:i})}t.push(r)}if(e.cells)for(const[n,r]of e.cells){const[e,i]=n.split(","),o=parseInt(e,10),a=parseInt(i,10);for(;t.length<=o;)t.push([]);const s=t[o];for(;s.length<=a;)s.push(null);const l=s[a];s[a]={value:r.value??l?.value??null,style:r.style??l?.style,checkbox:r.checkbox??l?.checkbox,formula:r.formula??l?.formula,formulaResult:r.formulaResult??l?.formulaResult,formulaType:r.formulaType??l?.formulaType,formulaSharedIndex:r.formulaSharedIndex??l?.formulaSharedIndex,formulaRef:r.formulaRef??l?.formulaRef,formulaDynamic:r.formulaDynamic??l?.formulaDynamic,richText:r.richText??l?.richText,hyperlink:r.hyperlink??l?.hyperlink}}return t}function xS(e,t,n,r){return 0===t?""===n?`<c r="${e}"><v>${r}</v></c>`:`<c r="${e}" t="${n}"><v>${r}</v></c>`:""===n?`<c r="${e}" s="${t}"><v>${r}</v></c>`:`<c r="${e}" t="${n}" s="${t}"><v>${r}</v></c>`}function CS(e,t,n,r,i,o,a){const{value:s,style:l,formula:c,formulaResult:u,formulaType:f,formulaSharedIndex:d,formulaRef:h,formulaDynamic:p,richText:g}=n;let m=0,y=l;if(s instanceof Date&&(!y||!y.numFmt))if(y){const e=vS.get(y);if(e)y=e;else{const e={...y,numFmt:mS};vS.set(y,e),y=e}}else y=yS;n.checkbox?m=r.addCheckboxStyle(y):y&&(m=r.addStyle(y));const v=hS(e,t);if(g&&g.length>0){const e={r:v,t:"inlineStr"};0!==m&&(e.s=m);const t=function(e){const t=[];for(const n of e){const e=[];if(n.font){const t=FS(n.font);t.length>0&&e.push(gw("rPr",void 0,t))}e.push(pw(n.text)),t.push(gw("r",void 0,e))}return t}(g);return gw("c",e,[gw("is",void 0,t)])}if(null!=c){const e={r:v};let t;if(0!==m&&(e.s=m),p&&(e.cm=1),"shared"===f){const e={t:"shared"};void 0!==d&&(e.si=d),h&&(e.ref=h),t=""===c?hw("f",e):gw("f",e,uw(c))}else if("array"===f){const e={t:"array"};h&&(e.ref=h),t=gw("f",e,uw(c))}else t=gw("f",void 0,uw(c));const n=[t];return null!=u&&("string"==typeof u?(e.t="str",n.push(gw("v",void 0,uw(u)))):"boolean"==typeof u?(e.t="b",n.push(gw("v",void 0,u?"1":"0"))):"number"==typeof u?Number.isFinite(u)&&n.push(gw("v",void 0,String(u))):u instanceof Date&&n.push(gw("v",void 0,String(oB(u,o))))),gw("c",e,n)}if(null==s)return 0!==m?hw("c",{r:v,s:m}):null;if("string"==typeof s&&AS.has(s))return xS(v,m,"e",s);if("string"==typeof s){if(a){const e=`<is>${pw(s)}</is>`;return 0===m?`<c r="${v}" t="inlineStr">${e}</c>`:`<c r="${v}" t="inlineStr" s="${m}">${e}</c>`}return xS(v,m,"s",String(i.add(s)))}return"number"==typeof s?Number.isFinite(s)?xS(v,m,"",String(s)):0!==m?hw("c",{r:v,s:m}):null:"boolean"==typeof s?xS(v,m,"b",s?"1":"0"):s instanceof Date?xS(v,m,"",String(oB(s,o))):null}const ES={letter:1,letterSmall:2,tabloid:3,ledger:4,legal:5,statement:6,executive:7,a3:8,a4:9,a4Small:10,a5:11,b4:12,b5:13,folio:14,quarto:15,note:18,envelope9:19,envelope10:20,envelope11:21,envelope12:22,envelope14:23,cSheet:24,dSheet:25,eSheet:26,envelopeDL:27,envelopeC5:28,envelopeC3:29,envelopeC4:30,envelopeC6:31,envelopeC65:32,envelopeB4:33,envelopeB5:34,envelopeB6:35,envelopeItaly:36,envelopeMonarch:37,envelopePersonal:38,fanfoldUS:39,fanfoldGermanStd:40,fanfoldGermanLegal:41,a6:70,japanesePostcard:43,japaneseDoublePostcard:69},BS={};for(const[e,t]of Object.entries(ES))BS[t]=e;const SS={left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3};function kS(e){const t={};if(void 0!==e.rgb){const n=e.rgb;t.rgb=6===n.length?`FF${n}`:n}return void 0!==e.theme&&(t.theme=e.theme),void 0!==e.tint&&(t.tint=e.tint),void 0!==e.indexed&&(t.indexed=e.indexed),t}function FS(e){const t=[];return e.bold&&t.push(hw("b")),e.italic&&t.push(hw("i")),e.underline&&(!0===e.underline||"single"===e.underline?t.push(hw("u")):t.push(hw("u",{val:e.underline}))),e.strikethrough&&t.push(hw("strike")),e.vertAlign&&t.push(hw("vertAlign",{val:e.vertAlign})),void 0!==e.size&&t.push(hw("sz",{val:e.size})),e.color&&t.push(hw("color",kS(e.color))),e.name&&t.push(hw("rFont",{val:e.name})),void 0!==e.family&&t.push(hw("family",{val:e.family})),void 0!==e.charset&&t.push(hw("charset",{val:e.charset})),e.scheme&&t.push(hw("scheme",{val:e.scheme})),t}function DS(e,t){const n={type:e.type,priority:e.priority};e.style&&(n.dxfId=t.addDxf(e.style)),e.operator&&(n.operator=e.operator),e.stopIfTrue&&(n.stopIfTrue=!0),void 0!==e.text&&(n.text=e.text);const r=[];if(void 0!==e.formula){const t=Array.isArray(e.formula)?e.formula:[e.formula];for(const e of t)r.push(gw("formula",void 0,uw(e)))}if("colorScale"===e.type&&e.colorScale){const t=[];for(const n of e.colorScale.cfvo){const e={type:n.type};void 0!==n.value&&(e.val=n.value),t.push(hw("cfvo",e))}for(const n of e.colorScale.colors)t.push(hw("color",{rgb:n}));r.push(gw("colorScale",void 0,t))}if("dataBar"===e.type&&e.dataBar){const t=[];for(const n of e.dataBar.cfvo){const e={type:n.type};void 0!==n.value&&(e.val=n.value),t.push(hw("cfvo",e))}t.push(hw("color",{rgb:e.dataBar.color})),r.push(gw("dataBar",void 0,t))}if("iconSet"===e.type&&e.iconSet){const t={iconSet:e.iconSet.iconSet};e.iconSet.reverse&&(t.reverse=!0),!1===e.iconSet.showValue&&(t.showValue=!1);const n=[];for(const t of e.iconSet.cfvo){const e={type:t.type};void 0!==t.value&&(e.val=t.value),n.push(hw("cfvo",e))}r.push(gw("iconSet",t,n))}return r.length>0?gw("cfRule",n,r):hw("cfRule",n)}const NS="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main",MS="http://schemas.microsoft.com/office/excel/2006/main",QS="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2",TS="{05C60535-1F16-4fd2-B633-F4F36F0B64E0}";function LS(e,t,n){const r=t.join(""),i=0===r.length?e.lastIndexOf("</worksheet>"):e.indexOf(r);if(i<0)return e.lastIndexOf("</worksheet>");let o=i;for(let e=0;e<n;e++)o+=t[e].length;return o}function RS(e,t,n){if(!(e.size<PC||e.has(t)))throw new mb(`Sheet "${n??"?"}" has more than 16777216 filled cells, which is the most \`Sheet.cells\` can hold — a Map caps at 2^24 entries.\n - streamXlsxRows(input) reads it a row at a time and has no such bound.\nThe file is not damaged; it is larger than this model.`)}function US(e,t){if(void 0===e)return!1;const n=Number(e);return!(!Number.isFinite(n)||n<=0)&&(!t.dynamicArrayCm||t.dynamicArrayCm.has(n))}function HS(e){let t=0,n=0;for(;t<e.length;){const r=e.charCodeAt(t);if(r>=65&&r<=90)n=26*n+(r-64),t++;else{if(!(r>=97&&r<=122))break;n=26*n+(r-96),t++}}n--;return{row:Number(e.slice(t))-1,col:n}}function qS(e,t){const n=Number(e??"");if(Number.isNaN(n))return t;const r=Math.trunc(n);return r<1?t:Math.min(r,16384)}function OS(e){const t=e.split(":"),n=HS(t[0]),r=t.length>1?HS(t[1]):n;return{startRow:n.row,startCol:n.col,endRow:r.row,endCol:r.col}}function PS(e,t){const n=[],r=new Map,i=[];let o,a=-1,s=-1,l=0,c=!1;t.range&&(o=OS(t.range));const u=[],f=[],d=[];let h,p,g,m,y,v,A,b,w,I=!1,x=-1,C=[],E=!1,B=!1;const S=[],k=[];let F=!1,D=!1;const N=[];let M=!1,Q=!1,T=!1,L=!1,R=!1,U="",H="",q=!1,O="",P="",$=!1,z=!1,j=!1,V=!1,Y=!1,W=!1,G=!1,J="";const _=t.maxRows??0;let X=0;const K=new Map,Z=[];let ee,te,ne,re=!1,ie=!1,oe=!1,ae=!1,se=!1,le=!1,ce=!1,ue=!1,fe=!1,de=!1,he=!1,pe=!1,ge=!1,me=!1,ye="",ve="",Ae={},be=!1,we="",Ie=!1,xe={},Ce=!1,Ee="",Be=[],Se=!1,ke=[],Fe=[],De=!1,Ne=[],Me="",Qe=!1,Te={},Le=[],Re=!1,Ue=!1,He=!1,qe="",Oe=0,Pe=0,$e="",ze=-1,je="",Ve="",Ye="",We=-1,Ge="",Je=!1,_e="",Xe=[],Ke="";const Ze={onOpenTag(e,n){const r=e.includes(":")?e.slice(e.indexOf(":")+1):e;switch(r){case"cols":re=!0;break;case"col":if(re){const e=qS(n.min,1),r=qS(n.max,0),i=n.width?Number(n.width):void 0,o="1"===n.hidden||"true"===n.hidden,a=n.outlineLevel?Number(n.outlineLevel):void 0,s="1"===n.collapsed||"true"===n.collapsed,l="1"===n.bestFit||"true"===n.bestFit,c=void 0!==n.style?Number(n.style):void 0,u=t.readStyles&&t.styles&&void 0!==c&&c>=0?UB(t.styles,c):void 0;for(let t=e;t<=r;t++){const e=t-1;for(;Z.length<=e;)Z.push({});const n={};void 0===i||Number.isNaN(i)||(n.width=i),o&&(n.hidden=!0),void 0!==a&&!Number.isNaN(a)&&a>0&&(n.outlineLevel=a),s&&(n.collapsed=!0),l&&(n.autoWidth=!0),u&&Object.keys(u).length>0&&(n.style=jB(u)),Object.keys(n).length>0&&(Z[e]=n)}}break;case"sheetFormatPr":{const e=n.defaultRowHeight,t=n.defaultColWidth;if(void 0!==e){const t=Number(e);Number.isFinite(t)&&t>0&&15!==t&&(ee=t)}if(void 0!==t){const e=Number(t);Number.isFinite(e)&&e>0&&(te=e)}break}case"sheetData":ie=!0;break;case"row":if(ie){if(_>0&&X>=_)break;if(oe=!0,Oe=Number(n.r)||Oe+1,Pe=0,n.ht&&("1"===n.customHeight||"true"===n.customHeight)){const e=Number(n.r)-1,t=Number(n.ht);if(!Number.isNaN(e)&&!Number.isNaN(t)){const n=K.get(e)??{};n.height=t,K.set(e,n)}}if("1"===n.hidden||"true"===n.hidden){const e=Number(n.r)-1;if(!Number.isNaN(e)){const t=K.get(e)??{};t.hidden=!0,K.set(e,t)}}if(n.outlineLevel){const e=Number(n.r)-1,t=Number(n.outlineLevel);if(!Number.isNaN(e)&&!Number.isNaN(t)&&t>0){const n=K.get(e)??{};n.outlineLevel=t,K.set(e,n)}}if("1"===n.collapsed||"true"===n.collapsed){const e=Number(n.r)-1;if(!Number.isNaN(e)){const t=K.get(e)??{};t.collapsed=!0,K.set(e,t)}}}break;case"c":oe&&(ae=!0,qe=n.r??"",$e=n.t??"",ze=n.s?Number(n.s):-1,je="",Ve="",Ye="",We=-1,Ge="",Je=US(n.cm,t),_e="",Xe=[]);break;case"v":ae&&(se=!0);break;case"f":T?(L=!0,O=""):ae&&(le=!0,Ye=n.t??"",void 0!==n.si&&(We=Number(n.si)),n.ref&&(Ge=n.ref),void 0!==n.cm&&US(n.cm,t)&&(Je=!0));break;case"is":ae&&(ce=!0);break;case"t":ce&&!Re?ue=!0:Re&&(He=!0);break;case"r":ce&&(Re=!0,Ke="",ne=void 0);break;case"rPr":Re&&(Ue=!0,ne={});break;case"sheetPr":E=!0;break;case"outlinePr":if(E){const e={};void 0!==n.summaryBelow&&(e.summaryBelow="1"===n.summaryBelow||"true"===n.summaryBelow),void 0!==n.summaryRight&&(e.summaryRight="1"===n.summaryRight||"true"===n.summaryRight),Object.keys(e).length>0&&(m=e)}break;case"pageSetUpPr":E&&(B="1"===n.fitToPage||"true"===n.fitToPage);break;case"tabColor":E&&(g||(g={}),g.tabColor=function(e){const t={};if(e.rgb){const n=e.rgb;t.rgb=8===n.length?n.slice(2):n}e.theme&&(t.theme=Number(e.theme));e.tint&&(t.tint=Number(e.tint));e.indexed&&(t.indexed=Number(e.indexed));return t}(n));break;case"sheetView":if(!ie){if(g||(g={}),"0"!==n.showGridLines&&"false"!==n.showGridLines||(g.showGridLines=!1),"0"!==n.showRowColHeaders&&"false"!==n.showRowColHeaders||(g.showRowColHeaders=!1),n.zoomScale){const e=Number(n.zoomScale);Number.isNaN(e)||(g.zoomScale=e)}"1"!==n.rightToLeft&&"true"!==n.rightToLeft||(g.rightToLeft=!0)}break;case"pane":if(!ie){const e=n.state;if("frozen"===e||"frozenSplit"===e){const e=Number(n.xSplit||"0"),t=Number(n.ySplit||"0");(e>0||t>0)&&(y={},e>0&&(y.columns=e),t>0&&(y.rows=t))}else if("split"===e){const e=Number(n.xSplit||"0"),t=Number(n.ySplit||"0");(e>0||t>0)&&(v={},e>0&&(v.xSplit=e),t>0&&(v.ySplit=t))}}break;case"sheetProtection":p=function(e){const t={};"1"!==e.sheet&&"true"!==e.sheet||(t.sheet=!0);"1"!==e.objects&&"true"!==e.objects||(t.objects=!0);"1"!==e.scenarios&&"true"!==e.scenarios||(t.scenarios=!0);const n=[["selectLockedCells","selectLockedCells"],["selectUnlockedCells","selectUnlockedCells"],["formatCells","formatCells"],["formatColumns","formatColumns"],["formatRows","formatRows"],["insertColumns","insertColumns"],["insertRows","insertRows"],["insertHyperlinks","insertHyperlinks"],["deleteColumns","deleteColumns"],["deleteRows","deleteRows"],["sort","sort"],["autoFilter","autoFilter"],["pivotTables","pivotTables"]];for(const[r,i]of n){const n=e[r];void 0!==n&&(t[i]=!("1"===n||"true"===n))}return t}(n);break;case"autoFilter":n.ref&&(h={range:n.ref},I=!0);break;case"filterColumn":I&&void 0!==n.colId&&(x=Number(n.colId),C=[]);break;case"filter":I&&x>=0&&void 0!==n.val&&C.push(n.val);break;case"mergeCells":fe=!0;break;case"mergeCell":fe&&n.ref&&i.push(OS(n.ref));break;case"hyperlinks":de=!0;break;case"hyperlink":if(de&&n.ref){const e={ref:n.ref},t=n["r:id"]??n["R:id"];t&&(e.rId=t),n.location&&(e.location=n.location),n.tooltip&&(e.tooltip=n.tooltip),n.display&&(e.display=n.display),u.push(e)}break;case"conditionalFormatting":be=!0,we=n.sqref??"";break;case"cfRule":be&&(Ie=!0,xe={...n},Be=[],ke=[],Fe=[],Ne=[],Me="",Le=[],Te={});break;case"colorScale":Ie&&(Se=!0,ke=[],Fe=[]);break;case"cfvo":Se?ke.push({type:n.type??"min",value:n.val}):De?Ne.push({type:n.type??"min",value:n.val}):Qe&&Le.push({type:n.type??"min",value:n.val});break;case"dataBar":Ie&&(De=!0,Ne=[],Me="");break;case"iconSet":Ie&&(Qe=!0,Te={...n},Le=[]);break;case"dataValidations":he=!0;break;case"dataValidation":he&&(pe=!0,Ae={...n},ye="",ve="");break;case"formula1":pe&&(ge=!0);break;case"formula2":pe&&(me=!0);break;case"pageMargins":b=function(e){const t={};e.left&&(t.left=Number(e.left));e.right&&(t.right=Number(e.right));e.top&&(t.top=Number(e.top));e.bottom&&(t.bottom=Number(e.bottom));e.header&&(t.header=Number(e.header));e.footer&&(t.footer=Number(e.footer));return t}(n);break;case"pageSetup":A={...A,...WS(n,t)};break;case"printOptions":A=function(e,t){const n=e??{},r=e=>"1"===e||"true"===e;r(t.gridLines)&&(n.showGridLines=!0);r(t.headings)&&(n.showRowColHeaders=!0);r(t.horizontalCentered)&&(n.horizontalCentered=!0);r(t.verticalCentered)&&(n.verticalCentered=!0);return n}(A,n);break;case"headerFooter":$=!0,w={},"1"!==n.differentOddEven&&"true"!==n.differentOddEven||(w.differentOddEven=!0),"1"!==n.differentFirst&&"true"!==n.differentFirst||(w.differentFirst=!0);break;case"oddHeader":$&&(z=!0,J="");break;case"oddFooter":$&&(j=!0,J="");break;case"evenHeader":$&&(V=!0,J="");break;case"evenFooter":$&&(Y=!0,J="");break;case"firstHeader":$&&(W=!0,J="");break;case"firstFooter":$&&(G=!0,J="");break;case"rowBreaks":F=!0;break;case"colBreaks":D=!0;break;case"brk":if(F||D){const e=n.id;if(e){const t=Number(e)-1;F?S.push(t):k.push(t)}}break;case"color":Se?Fe.push(n.rgb??""):De?Me=n.rgb??"":Ue&&ne&&YS(ne,r,n);break;case"formula":Ie&&!pe&&(Ce=!0,Ee="");break;case"sparklineGroups":M=!0;break;case"sparklineGroup":M&&(Q=!0,U=n.type??"line",H="",q="1"===n.markers||"true"===n.markers);break;case"colorSeries":if(Q){const e=n.rgb??"";H=8===e.length?e.slice(2):e}break;case"sparkline":Q&&(T=!0,O="",P="");break;default:if(T&&"sqref"===r){R=!0,P="";break}Ue&&ne&&YS(ne,r,n)}},onText(e){se?je+=e:le?Ve+=e:Ce?Ee+=e:ue?_e+=e:He?Ke+=e:ge?ye+=e:me?ve+=e:z||j||V||Y||W||G?J+=e:L?O+=e:R&&(P+=e)},onCloseTag(e){const i=e.includes(":")?e.slice(e.indexOf(":")+1):e;switch(i){case"cols":re=!1;break;case"sheetData":ie=!1;break;case"row":oe&&X++,oe=!1;break;case"c":if(ae){const e=qe?HS(qe).row:Oe-1,i=qe?HS(qe).col:Pe;Pe=i+1;let u=!1;o&&(e<o.startRow||e>o.endRow||i<o.startCol||i>o.endCol)&&(u=!0);const f=""!==je||""!==_e||Xe.length>0||""!==Ve||"e"===$e||"inlineStr"===$e||t.readStyles&&ze>=0||!!(t.styles&&ze>=0)&&(t.styles.cellXfs[ze]?.hasCheckboxFeature??!1);!u&&f&&(!function(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g){const m=""!==e?HS(e):void 0!==p&&void 0!==g?{row:p,col:g}:null;if(!m)return;const{row:y,col:v}=m;if(y>qC||v>OC)throw new mb(`Cell reference "${e}" is outside the supported sheet bounds (max row 1048576, max col 16384)`);if(!Number.isInteger(y)||!Number.isInteger(v)||y<0||v<0)return void s.onWarning?.({code:"malformed-cell-ref",message:`Cell reference "${e}" is not a cell reference — a column needs a row number and rows are 1-based. The cell is dropped; the rest of the sheet is read.`,sheet:s.sheetName});if(!s.sparse){for(;l.length<=y;)l.push([]);for(;l[y].length<=v;)l[y].push(null)}let A,b,w,I=null,x="empty";i?A=i:"shared"===u&&void 0!==f&&f>=0&&(A="");switch(t){case"s":{const t=Number(r);if(!Number.isNaN(t)&&t>=0&&t<s.sharedStrings.length){const e=s.sharedStrings[t];I=e.text,e.richText&&e.richText.length>0?(w=e.richText,x="richText"):x="string"}else s.onWarning?.({code:"unresolved-shared-string",message:`Cell ${e||`${y},${v}`} points at shared string ${r}, which the file does not have (${s.sharedStrings.length} present). Read as empty.`,sheet:s.sheetName,row:y,col:v}),I=null,x="empty";break}case"str":I=kb(r),x=A?"formula":"string",A&&(b=I);break;case"inlineStr":a&&a.length>0?(I=a.map(e=>e.text).join(""),w=a,x="richText"):(I=kb(o),x="string");break;case"b":I="1"===r||"true"===r.toLowerCase(),x=A?"formula":"boolean",A&&(b=I);break;case"e":I=r,x=A?"formula":"error",A&&(b=I);break;case"d":{const e=function(e){const t=e.trim();if(!/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})?)?$/.test(t))return;const n=/(?:Z|[+-]\d{2}:?\d{2})$/.test(t),r=/[T ]\d{2}:/.test(t),i=t.replace(" ","T"),o=new Date(r&&!n?`${i}Z`:i);return Number.isNaN(o.getTime())?void 0:o}(r);e?(I=e,x="date"):""!==r?(I=r,x="string"):(I=null,x="empty"),A&&(b=I,x="formula");break}default:{if(""===r&&!A){I=null,x="empty";break}const e=Number(r);Number.isNaN(e)||""===r?""!==r&&(I=r,x="string"):s.styles&&n>=0&&HB(s.styles,n)?(I=function(e,t){if(t){const t=rB+Math.round(e*iB);return new Date(t)}if(60===e)return new Date(Date.UTC(1900,1,28));let n=e;e>60&&(n=e-1);const r=nB+Math.round(n*iB);return new Date(r)}(e,"1904"===s.dateSystem),x="date"):(I=e,x="number"),A&&(b=I,x="formula");break}}s.sparse||(l[y][v]=I);const C=!!(s.styles&&n>=0)&&(s.styles.cellXfs[n]?.hasCheckboxFeature??!1),E=s.sparse||void 0!==A||void 0!==w||s.readStyles&&s.styles&&n>=0||C||"error"===x||"formula"===x||"richText"===x;if(E){const t={value:I,type:x};if(C&&(t.checkbox=!0),void 0!==A&&(t.formula=A,void 0!==b&&(t.formulaResult=b),"shared"===u?(t.formulaType="shared",void 0!==f&&f>=0&&(t.formulaSharedIndex=f),d&&(t.formulaRef=d)):"array"===u&&(t.formulaType="array",d&&(t.formulaRef=d)),h&&(t.formulaDynamic=!0)),w&&(t.richText=w),s.readStyles&&s.styles&&n>=0){const r=UB(s.styles,n);Object.keys(r).length>0?t.style=r:n>=s.styles.cellXfs.length&&s.onWarning?.({code:"unresolved-style",message:`Cell ${e||`${y},${v}`} points at cell format ${n}, which the file does not have (${s.styles.cellXfs.length} present). Read unstyled.`,sheet:s.sheetName,row:y,col:v})}const r=`${y},${v}`;RS(c,r,s.sheetName),c.set(r,t)}}(qe,$e,ze,je,Ve,_e,Xe.length>0?Xe:void 0,t,n,r,Ye,We,Ge,Je,e,i),e>=0&&i>=0&&(i>a&&(a=i),e>s&&(s=e),c=!0,l++)),ae=!1}break;case"v":se=!1;break;case"f":L?L=!1:le=!1;break;case"is":ce=!1;break;case"t":He?He=!1:ue&&(ue=!1);break;case"r":if(Re){const e=kb(Ke);Xe.push(ne?{text:e,font:ne}:{text:e}),Re=!1}break;case"rPr":Ue=!1;break;case"sheetPr":E=!1;break;case"mergeCells":fe=!1;break;case"autoFilter":I=!1;break;case"filterColumn":I&&h&&x>=0&&C.length>0&&(h.columns||(h.columns=[]),h.columns.push({colIndex:x,filters:C})),x=-1,C=[];break;case"hyperlinks":de=!1;break;case"conditionalFormatting":be=!1;break;case"cfRule":if(Ie){const e=function(e,t,n,r,i,o,a,s,l,c,u){const f=e.type;if(!f||!VS.has(f))return null;if(!t)return null;const d={type:f,priority:Number(e.priority??"1"),range:t},h=e.operator;h&&jS.has(h)&&(d.operator=h);const p=Number(e.dxfId);if(c&&!Number.isNaN(p)){const e=c[p];e&&Object.keys(e).length>0?d.style=e:e||u?.onWarning?.({code:"unresolved-dxf",message:`Conditional rule on ${t} asks for differential format ${p}, which the file does not have (${c.length} present). The rule keeps its condition and loses its formatting.`,sheet:u.sheetName})}"1"!==e.stopIfTrue&&"true"!==e.stopIfTrue||(d.stopIfTrue=!0);void 0!==e.text&&(d.text=e.text);1===n.length?d.formula=n[0]:n.length>1&&(d.formula=n);"colorScale"===f&&r.length>0&&(d.colorScale={cfvo:r.map(e=>({type:e.type,value:e.value})),colors:i});"dataBar"===f&&o.length>0&&(d.dataBar={cfvo:o.map(e=>({type:e.type,value:e.value})),color:a});"iconSet"===f&&s.length>0&&(d.iconSet={iconSet:l.iconSet??"3TrafficLights1",cfvo:s.map(e=>({type:e.type,value:e.value}))},"1"!==l.reverse&&"true"!==l.reverse||(d.iconSet.reverse=!0),"0"!==l.showValue&&"false"!==l.showValue||(d.iconSet.showValue=!1));return d}(xe,we,Be,ke,Fe,Ne,Me,Le,Te,t.styles?.dxfs,t);e&&d.push(e),Ie=!1}break;case"colorScale":Se=!1;break;case"dataBar":Ie&&(De=!1);break;case"iconSet":Qe=!1;break;case"formula":Ce&&(Be.push(Ee),Ce=!1);break;case"dataValidations":he=!1;break;case"dataValidation":if(pe){const e=function(e,t,n){const r=e.type;if(!r||!zS.has(r))return null;const i=e.sqref;if(!i)return null;const o={type:r,range:i},a=e.operator;a&&jS.has(a)&&(o.operator=a);"1"!==e.allowBlank&&"true"!==e.allowBlank||(o.allowBlank=!0);"1"!==e.showInputMessage&&"true"!==e.showInputMessage||(o.showInputMessage=!0);"1"!==e.showErrorMessage&&"true"!==e.showErrorMessage||(o.showErrorMessage=!0);const s=e.errorStyle;"stop"!==s&&"warning"!==s&&"information"!==s||(o.errorStyle=s);e.promptTitle&&(o.inputTitle=e.promptTitle);e.prompt&&(o.inputMessage=e.prompt);e.errorTitle&&(o.errorTitle=e.errorTitle);e.error&&(o.errorMessage=e.error);if(t)if("list"===r){const e=t.trim();if(e.startsWith('"')&&e.endsWith('"')){const t=e.slice(1,-1);o.values=t.split(",")}else o.formula1=t}else o.formula1=t;n&&(o.formula2=n);return o}(Ae,ye,ve);e&&f.push(e),pe=!1}break;case"formula1":ge=!1;break;case"formula2":me=!1;break;case"headerFooter":$=!1;break;case"oddHeader":z&&w&&(w.oddHeader=J,z=!1);break;case"oddFooter":j&&w&&(w.oddFooter=J,j=!1);break;case"evenHeader":V&&w&&(w.evenHeader=J,V=!1);break;case"evenFooter":Y&&w&&(w.evenFooter=J,Y=!1);break;case"firstHeader":W&&w&&(w.firstHeader=J,W=!1);break;case"firstFooter":G&&w&&(w.firstFooter=J,G=!1);break;case"rowBreaks":F=!1;break;case"colBreaks":D=!1;break;case"sparklineGroups":M=!1;break;case"sparklineGroup":Q=!1;break;case"sparkline":if(T&&P){const e={location:P,dataRange:O};U&&"line"!==U&&(e.type=U),H&&(e.color=H),q&&(e.markers=!0),N.push(e)}T=!1;break;default:if(T&&"sqref"===i){R=!1;break}}}};return{handlers:Ze,finish:function(){if(c&&!t.sparse){const r=a+1,i=(s+1)*r,o=t.maxTotalCells??2e7;if(i>o)throw new mb(function(e,t,n,r,i,o){const a=i<=PC;return`Sheet "${e}" spans ${t} rows x ${n} columns (${r} cells, ${(r>0?100*i/r:100).toFixed(2)}% of them filled), over the ${o} limit.\n - streamXlsxRows(input) reads it a row at a time, whatever the box.\n`+(a?" - readXlsx(input, { sparse: true }) returns the cells and no grid.\n":` - \`sparse: true\` cannot help here: ${i} filled cells is past the 16777216 a Map can hold.\n`)+" - `range` or `maxRows` bound the area, if you know where the data is.\n - `maxTotalCells` raises the bound, if the sheet really is this large."}(e,s+1,r,i,l,o));for(let e=0;e<=s;e++)if(n[e])for(;n[e].length<r;)n[e].push(null);else n[e]=Array.from({length:r},()=>null)}const o=new Map;if(t.worksheetRels)for(const e of t.worksheetRels)o.set(e.id,e.target);for(const i of u){const a=HS(i.ref),s=`${a.row},${a.col}`;let l=r.get(s);l||(l={value:(n[a.row]&&n[a.row][a.col])??null,type:"string"},RS(r,s,e),r.set(s,l));const c={target:""};if(i.location)c.location=i.location,c.target=i.location;else if(i.rId){const e=o.get(i.rId);e?c.target=e:t.onWarning?.({code:"unresolved-hyperlink",message:`Cell ${i.ref} links through ${i.rId}, which the sheet's relationships do not define. Read with an empty target.`,sheet:t.sheetName,row:a.row,col:a.col})}i.tooltip&&(c.tooltip=i.tooltip),i.display&&(c.display=i.display),l.hyperlink=c}const I={name:e,rows:n};if(r.size>0&&(I.cells=r),void 0!==ee&&(I.defaultRowHeight=ee),void 0!==te&&(I.defaultColWidth=te),Z.some(e=>Object.keys(e).length>0)&&(I.columns=Z),i.length>0&&(I.merges=i),f.length>0&&(I.dataValidations=f),d.length>0&&(I.conditionalRules=d),h&&(I.autoFilter=h),y&&(I.freezePane=y),v&&(I.splitPane=v),p&&(I.protection=p),g&&Object.keys(g).length>0&&(I.view=g),A||b||B){const e=A??{};b&&(e.margins=b),B&&(e.fitToPage=!0),I.pageSetup=e}return w&&Object.keys(w).length>0&&(I.headerFooter=w),S.length>0&&(I.rowBreaks=S.sort((e,t)=>e-t)),k.length>0&&(I.colBreaks=k.sort((e,t)=>e-t)),K.size>0&&(I.rowDefs=K),N.length>0&&(I.sparklines=N),m&&(I.outlineProperties=m),I}}}async function $S(e,t,n){const{handlers:r,finish:i}=PS(t,n);return await async function(e,t,n){const r=n?.strict??!1,i=e.getReader(),o=new TextDecoder("utf-8");let a="",s=!1;try{for(;;){const{done:e,value:n}=await i.read();if(e)break;a+=o.decode(n,{stream:!0}),s||(65279===a.charCodeAt(0)&&(a=a.slice(1)),s=!0),a=Rb(a,t,!1,r)}a+=o.decode(),a.length>0&&Rb(a,t,!0,r)}finally{try{await i.cancel()}catch{}try{i.releaseLock()}catch{}}}(e,r,{strict:!0}),i()}const zS=new Set(["list","whole","decimal","date","time","textLength","custom"]),jS=new Set(["between","notBetween","equal","notEqual","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual"]);const VS=new Set(["cellIs","expression","colorScale","dataBar","iconSet","top10","aboveAverage","duplicateValues","uniqueValues","containsText","notContainsText","beginsWith","endsWith","containsBlanks","notContainsBlanks"]);function YS(e,t,n){switch(t){case"b":e.bold="0"!==n.val&&"false"!==n.val;break;case"i":e.italic="0"!==n.val&&"false"!==n.val;break;case"u":{const t=n.val;e.underline="double"!==t||"double";break}case"strike":e.strikethrough="0"!==n.val&&"false"!==n.val;break;case"sz":n.val&&(e.size=Number(n.val));break;case"rFont":n.val&&(e.name=n.val);break;case"color":if(e.color={},n.rgb){const t=n.rgb;e.color.rgb=8===t.length?t.slice(2):t}n.theme&&(e.color.theme=Number(n.theme)),n.tint&&(e.color.tint=Number(n.tint)),n.indexed&&(e.color.indexed=Number(n.indexed));break;case"vertAlign":"superscript"!==n.val&&"subscript"!==n.val||(e.vertAlign=n.val);break;case"family":n.val&&(e.family=Number(n.val));break;case"charset":n.val&&(e.charset=Number(n.val));break;case"scheme":"major"!==n.val&&"minor"!==n.val&&"none"!==n.val||(e.scheme=n.val)}}function WS(e,t){const n={};if(e.paperSize){const r=Number(e.paperSize);Number.isInteger(r)&&r>0?n.paperSize=BS[r]??r:t?.onWarning?.({code:"unusable-paper-size",message:`Page setup names paper size "${e.paperSize}", which is not a positive integer code. Dropped; the sheet reads with no paper size set.`,sheet:t.sheetName})}"landscape"!==e.orientation&&"portrait"!==e.orientation||(n.orientation=e.orientation),e.scale&&(n.scale=Number(e.scale)),void 0===e.fitToWidth&&void 0===e.fitToHeight||(n.fitToPage=!0,e.fitToWidth&&(n.fitToWidth=Number(e.fitToWidth)),e.fitToHeight&&(n.fitToHeight=Number(e.fitToHeight))),"1"!==e.horizontalCentered&&"true"!==e.horizontalCentered||(n.horizontalCentered=!0),"1"!==e.verticalCentered&&"true"!==e.verticalCentered||(n.verticalCentered=!0),e.paperWidth&&(n.paperWidth=e.paperWidth),e.paperHeight&&(n.paperHeight=e.paperHeight);const r=JS(e.firstPageNumber);void 0!==r&&(n.firstPageNumber=r),void 0!==e.useFirstPageNumber&&(n.useFirstPageNumber=GS(e.useFirstPageNumber)),"overThenDown"!==e.pageOrder&&"downThenOver"!==e.pageOrder||(n.pageOrder=e.pageOrder),GS(e.blackAndWhite)&&(n.blackAndWhite=!0),GS(e.draft)&&(n.draft=!0);const i=e.cellComments;"none"!==i&&"asDisplayed"!==i&&"atEnd"!==i||(n.cellComments=i);const o=e.errors;"displayed"!==o&&"blank"!==o&&"dash"!==o&&"NA"!==o||(n.errors=o);const a=JS(e.copies);void 0!==a&&(n.copies=a);const s=JS(e.horizontalDpi);void 0!==s&&(n.horizontalDpi=s);const l=JS(e.verticalDpi);return void 0!==l&&(n.verticalDpi=l),void 0!==e.usePrinterDefaults&&(n.usePrinterDefaults=GS(e.usePrinterDefaults)),n}function GS(e){return"1"===e||"true"===e}function JS(e){if(void 0===e)return;const t=Number(e);return Number.isInteger(t)&&t>=0?t:void 0}function _S(e){const t=new Map,n=[];let r=!1,i=!1,o=!1,a=!1,s=!1,l=!1,c="",u="",f=-1,d="";return Nb(e,{onOpenTag(e,t){switch(e.includes(":")?e.slice(e.indexOf(":")+1):e){case"authors":r=!0;break;case"author":r&&(i=!0,c="");break;case"commentList":o=!0;break;case"comment":o&&(a=!0,u=t.ref??"",f=t.authorId?Number(t.authorId):-1,d="");break;case"text":a&&(s=!0);break;case"r":break;case"t":s&&(l=!0)}},onText(e){i?c+=e:l&&(d+=e)},onCloseTag(e){switch(e.includes(":")?e.slice(e.indexOf(":")+1):e){case"authors":r=!1;break;case"author":i&&(n.push(c),i=!1);break;case"commentList":o=!1;break;case"comment":if(a&&u){const e={text:d};if(f>=0&&f<n.length){const t=n[f];t&&(e.author=t)}t.set(u,e),a=!1}break;case"text":s=!1;break;case"r":break;case"t":l=!1}}}),t}function XS(e,t){for(const n of e.children){if("string"==typeof n)continue;if((n.local||n.tag)===t){return n.children.filter(e=>"string"==typeof e).join("")||void 0}}}function KS(e){if(e)return function(e){const t=e.trim(),n=t.indexOf("T"),r=n>=0&&/(?:Z|[+-]\d{2}:?\d{2})$/.test(t.slice(n+1)),i=new Date(n>=0&&!r?`${t}Z`:t);return Number.isNaN(i.getTime())?void 0:i}(e)}const ZS=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function ek(e,t){return e===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/${t}`||e===`http://purl.oclc.org/ooxml/officeDocument/relationships/${t}`||e.endsWith("/"+t)}function tk(e,t="(unknown)"){return Cb(e,t)}async function nk(e,t,n,r){const i=e.declaredSize(t);if(void 0===i||i<=Ib)try{return function(e,t,n){const{handlers:r,finish:i}=PS(t,n);return Nb(e,r),i()}(tk(await e.extract(t),t),n,r)}catch(e){if(!function(e){return e instanceof xb}(e))throw e}return $S(e.extractStream(t),n,r)}async function rk(e,t){let n,r=await zC(e,t?.maxInputBytes);if(function(e){if(e.length<$C.length)return!1;for(let t=0;t<$C.length;t++)if(e[t]!==$C[t])return!1;return!0}(r)){if(!t?.password)throw new bb("xlsx");r=await oE(r,t.password,t.maxSpinCount)}try{n=new KE(r,t?.maxDecompressedBytes)}catch(e){if(e instanceof yb)throw e;throw new mb("Failed to open XLSX file: not a valid ZIP archive",void 0,{cause:e})}if(!n.has("[Content_Types].xml"))throw new mb("Invalid XLSX: missing [Content_Types].xml");if(function(e){const t=Ub(e),n=new Map,r=new Map;for(const e of t.children){if("string"==typeof e)continue;const t=e.local||e.tag;if("Default"===t){const t=e.attrs.Extension,r=e.attrs.ContentType;t&&r&&n.set(t,r)}else if("Override"===t){const t=e.attrs.PartName,n=e.attrs.ContentType;t&&n&&r.set(t,n)}}}(tk(await n.extract("[Content_Types].xml"),"[Content_Types].xml")),!n.has("_rels/.rels"))throw new mb("Invalid XLSX: missing _rels/.rels");const i=jb(tk(await n.extract("_rels/.rels"),"_rels/.rels")).find(e=>ek(e.type,"officeDocument"));if(!i)throw new mb("Invalid XLSX: cannot find workbook relationship in _rels/.rels");const o=i.target.startsWith("/")?i.target.slice(1):i.target,a=Yb(o),s=a?`${a}/_rels/${o.slice(a.length+1)}.rels`:`_rels/${o}.rels`;let l=[];if(n.has(s)){l=jb(tk(await n.extract(s),s))}if(!n.has(o))throw new mb(`Invalid XLSX: missing workbook at ${o}`);const c=tk(await n.extract(o),o),{sheets:u,dateSystem:f,namedRanges:d,workbookProtection:h,activeSheet:p,pivotCacheRefs:g}=function(e,t){const n=Ub(e),r=[],i=[],o=[];let a,s,l="1900";"1904"===t?.dateSystem?l="1904":"1900"===t?.dateSystem&&(l="1900");for(const e of n.children){if("string"==typeof e)continue;const n=e.local||e.tag;if("workbookPr"===n&&("1"!==e.attrs.date1904&&"true"!==e.attrs.date1904||t?.dateSystem&&"auto"!==t.dateSystem||(l="1904")),"workbookProtection"===n){const t="1"===e.attrs.lockStructure||"true"===e.attrs.lockStructure,n="1"===e.attrs.lockWindows||"true"===e.attrs.lockWindows;(t||n)&&(a={},t&&(a.lockStructure=!0),n&&(a.lockWindows=!0))}if("bookViews"===n)for(const t of e.children){if("string"==typeof t)continue;if("workbookView"!==(t.local||t.tag))continue;const e=Number(t.attrs.activeTab);Number.isInteger(e)&&e>0&&void 0===s&&(s=e)}if("sheets"===n)for(const t of e.children){if("string"==typeof t)continue;if("sheet"===(t.local||t.tag)){const e=t.attrs.name??"",n=Number(t.attrs.sheetId??"0"),i=t.attrs["r:id"]??t.attrs["R:id"]??Wb(t.attrs)??"",o=t.attrs.state;let a="visible";"hidden"===o?a="hidden":"veryHidden"===o&&(a="veryHidden"),e&&i&&r.push({name:e,sheetId:n,rId:i,state:a})}}if("pivotCaches"===n)for(const t of e.children){if("string"==typeof t)continue;if("pivotCache"===(t.local||t.tag)){const e=t.attrs.cacheId,n=void 0===e?NaN:Number(e),r=t.attrs["r:id"]??t.attrs["R:id"]??Wb(t.attrs)??"";r&&!Number.isNaN(n)&&o.push({cacheId:n,rId:r})}}}for(const e of n.children){if("string"==typeof e)continue;if("definedNames"===(e.local||e.tag))for(const t of e.children){if("string"==typeof t)continue;if("definedName"===(t.local||t.tag)){const e=t.attrs.name??"",n=t.children.filter(e=>"string"==typeof e).join("");if(e&&n){const o={name:e,range:n},a=t.attrs.localSheetId;if(void 0!==a){const e=Number(a);e>=0&&e<r.length&&(o.scope=r[e].name)}t.attrs.comment&&(o.comment=t.attrs.comment),i.push(o)}}}}return{sheets:r,dateSystem:l,namedRanges:i,workbookProtection:a,activeSheet:s,pivotCacheRefs:o}}(c,t);let m=[];const y=l.find(e=>ek(e.type,"sharedStrings"));if(y){const e=Vb(a,y.target);if(n.has(e)){m=function(e){const t=Ub(e),n=[];for(const e of t.children)"string"!=typeof e&&"si"===(e.local||e.tag)&&n.push(ZE(e));return n}(tk(await n.extract(e),e))}}let v=null;const A=l.find(e=>ek(e.type,"styles"));if(A){const e=Vb(a,A.target);if(n.has(e)){v=yB(tk(await n.extract(e),e))}}let b;const w=a?`${a}/theme/theme1.xml`:"theme/theme1.xml";if(n.has(w)){b=function(e){const t=new Map;let n=!1,r="";return Nb(e,{onOpenTag(e,i){if("clrScheme"===e||"a:clrScheme"===e)return void(n=!0);if(!n)return;const o=e.includes(":")?e.split(":").pop():e;ZS.includes(o)?r=o:r&&("srgbClr"===o&&i.val?t.set(r,i.val.toUpperCase()):"sysClr"===o&&i.lastClr&&t.set(r,i.lastClr.toUpperCase()))},onCloseTag(e){const t=e.includes(":")?e.split(":").pop():e;"clrScheme"===t&&(n=!1),r&&ZS.includes(t)&&(r="")}}),ZS.map(e=>t.get(e)??"000000")}(tk(await n.extract(w),w))}let I;const x=l.find(e=>ek(e.type,"person"));if(x){const e=Vb(a,x.target);if(n.has(e)){I=function(e){const t=Ub(e),n=[];for(const e of qb(t)){if("person"!==e.local)continue;const t=e.attrs.id,r=e.attrs.displayName;if(!t||void 0===r)continue;const i={id:t,displayName:r};e.attrs.userId&&(i.userId=e.attrs.userId),e.attrs.providerId&&(i.providerId=e.attrs.providerId),n.push(i)}return n}(tk(await n.extract(e),e))}}const C=l.filter(e=>ek(e.type,"externalLink")).sort((e,t)=>ok(e.id)-ok(t.id)),E=[];for(const e of C){const t=Vb(a,e.target);if(!n.has(t))continue;const r=tk(await n.extract(t),t),i=ak(t),o=n.has(i)?tk(await n.extract(i),i):void 0;E.push(Jb(r,o))}let B;const S=l.find(e=>"http://www.wps.cn/officeDocument/2017/relationships/cellimage"===e.type);if(S){const e=Vb(a,S.target);if(n.has(e)){const t=function(e){const t=Ub(e),n=[];for(const e of qb(t)){if("cellImage"!==e.local)continue;const t=Xb(e);t&&n.push(t)}return n}(tk(await n.extract(e),e)),r=ak(e),i=Yb(e),o=new Map;if(n.has(r)){const e=tk(await n.extract(r),r);for(const t of jb(e)){if(!ek(t.type,"image"))continue;const e=Vb(i,t.target);if(!n.has(e))continue;const r=e.split(".").pop()?.toLowerCase()??"",a=sk[r];a&&o.set(t.id,{data:await n.extract(e),type:a})}}const a=function(e,t){const n=[],r=new Set;for(const i of e){if(r.has(i.id))continue;const e=t.get(i.embedRId);if(!e)continue;const o={id:i.id,data:e.data,type:e.type};i.description&&(o.description=i.description),n.push(o),r.add(i.id)}return n}(t,o);a.length>0&&(B=a)}}const k=new Map,F=new Map;for(const e of g){const t=l.find(t=>t.id===e.rId);if(!t)continue;const r=Vb(a,t.target);if(!n.has(r))continue;const i=Kb(tk(await n.extract(r),r));if(!i)continue;i.cacheId=e.cacheId;const o=ak(r);if(n.has(o)){jb(tk(await n.extract(o),o)).some(e=>ek(e.type,"pivotCacheRecords"))&&(i.hasRecords=!0)}k.set(e.cacheId,i),F.set(e.rId,i)}const D=g.map(e=>k.get(e.cacheId)).filter(e=>void 0!==e),N=l.filter(e=>ek(e.type,"slicerCache")).sort((e,t)=>ik(e.target)-ik(t.target)),M=[];for(const e of N){const t=Vb(a,e.target);if(!n.has(t))continue;const r=rw(tk(await n.extract(t),t));r&&M.push(r)}const Q=l.filter(e=>ek(e.type,"timelineCache")).sort((e,t)=>ik(e.target)-ik(t.target)),T=[];for(const e of Q){const t=Vb(a,e.target);if(!n.has(t))continue;const r=ow(tk(await n.extract(t),t));r&&T.push(r)}let L;const R=l.find(e=>ek(e.type,"sheetMetadata"));if(R){const e=Vb(a,R.target);n.has(e)&&(L=function(e){const t=new Set,n=Ub(e),r="metadata"===n.local?n:Hb(n,"metadata");if(!r)return t;const i=[],o=Hb(r,"metadataTypes");if(o)for(const e of qb(o))"metadataType"===e.local&&i.push(e.attrs.name??"");const a=new Map;for(const e of qb(r)){if("futureMetadata"!==e.local)continue;const t=e.attrs.name??"",n=a.get(t)??[];for(const t of qb(e))"bk"===t.local&&n.push(rS(t));a.set(t,n)}const s=Hb(r,"cellMetadata");if(!s)return t;let l=0;for(const e of qb(s))if("bk"===e.local){l++;for(const n of qb(e)){if("rc"!==n.local)continue;if(i[$b(n.attrs.t,0)-1]!==eS)continue;const e=a.get(eS),r=$b(n.attrs.v,-1);(!e||r<0||r>=e.length||e[r])&&t.add(l)}}return t}(tk(await n.extract(e),e)))}const U=new Map,H=new Map;for(const e of l)ek(e.type,"worksheet")?U.set(e.id,Vb(a,e.target)):ek(e.type,"chartsheet")?H.set(e.id,"chartsheet"):ek(e.type,"dialogsheet")&&H.set(e.id,"dialogsheet");const q=function(e,t){if(void 0===t)return e;if("function"==typeof t){const n=[];for(let r=0;r<e.length;r++){const i=e[r];t({name:i.name,index:r,hidden:"hidden"===i.state,veryHidden:"veryHidden"===i.state},r)&&n.push(i)}return n}if(0===t.length)return e;const n=[];for(const r of t)if("number"==typeof r)r>=0&&r<e.length&&n.push(e[r]);else{const t=e.find(e=>e.name===r);t&&n.push(t)}return n}(u,t?.sheets),O=t?.readStyles??!1,P=[];for(const e of q){const r=H.get(e.rId);if(void 0!==r){const t={name:e.name,rows:[],kind:r};"hidden"===e.state&&(t.hidden=!0),"veryHidden"===e.state&&(t.veryHidden=!0),P.push(t);continue}const i=U.get(e.rId);if(!i||!n.has(i))throw new mb(`Invalid XLSX: missing worksheet file for sheet "${e.name}"`);const o=Yb(i),s=ak(i);let c;if(n.has(s)){c=jb(tk(await n.extract(s),s))}const u={sharedStrings:m,styles:v,readStyles:O,dateSystem:f,worksheetRels:c,maxRows:t?.maxRows,range:t?.range,maxTotalCells:t?.maxTotalCells,sparse:t?.sparse,dynamicArrayCm:L,sheetName:e.name,onWarning:t?.onWarning},d=await nk(n,i,e.name,u);if("hidden"===e.state&&(d.hidden=!0),"veryHidden"===e.state&&(d.veryHidden=!0),c){const e=c.find(e=>ek(e.type,"drawing"));if(e){const t=Vb(o,e.target),r=await lk(n,t);if(r.images.length>0&&(d.images=r.images),r.textBoxes.length>0&&(d.textBoxes=r.textBoxes),r.chartRefs.length>0){const e=[];for(const t of r.chartRefs){if(!n.has(t.path))continue;const r=RC(tk(await n.extract(t.path),t.path));r&&(t.anchor&&(r.anchor=t.anchor),t.altText&&(r.altText=t.altText),t.frameTitle&&(r.frameTitle=t.frameTitle),e.push(r))}e.length>0&&(d.charts=e)}}}if(c){const e=c.find(e=>ek(e.type,"comments"));if(e){const t=Vb(o,e.target);if(n.has(t)){const e=_S(tk(await n.extract(t),t));if(e.size>0){d.cells||(d.cells=new Map);for(const[t,n]of e){const e=HS(t),r=`${e.row},${e.col}`;let i=d.cells.get(r);i||(i={value:(d.rows[e.row]&&d.rows[e.row][e.col])??null,type:"string"},d.cells.set(r,i)),i.comment=n}}}}const t=c.find(e=>ek(e.type,"threadedComment"));if(t){const e=Vb(o,t.target);if(n.has(e)){const t=zb(tk(await n.extract(e),e));t.length>0&&(d.threadedComments=t)}}}if(c){const e=c.filter(e=>ek(e.type,"table"));if(e.length>0){const t=[];for(const r of e){const e=Vb(o,r.target);if(n.has(e)){const r=xk(tk(await n.extract(e),e));r&&t.push(r)}}t.length>0&&(d.tables=t)}}if(c){const e=c.find(e=>ek(e.type,"image"));if(e){const t=Vb(o,e.target);n.has(t)&&(d.backgroundImage=await n.extract(t))}}if(c){const e=c.filter(e=>ek(e.type,"pivotTable"));if(e.length>0){const t=[];for(const r of e){const e=Vb(o,r.target);if(!n.has(e))continue;const i=Zb(tk(await n.extract(e),e));if(!i)continue;const s=ak(e);if(n.has(s)){const t=jb(tk(await n.extract(s),s)).find(e=>ek(e.type,"pivotCacheDefinition"));if(t){const n=Vb(Yb(e),t.target);for(const e of g){const t=l.find(t=>t.id===e.rId);if(!t)continue;if(Vb(a,t.target)===n){i.cacheId=e.cacheId;break}}}}const c=k.get(i.cacheId);c&&ew(i,c),t.push(i)}t.length>0&&(d.pivotTables=t)}const t=c.filter(e=>ek(e.type,"slicer"));if(t.length>0){const e=[];for(const r of t){const t=Vb(o,r.target);if(!n.has(t))continue;const i=tk(await n.extract(t),t);for(const t of nw(i))e.push(t)}e.length>0&&(d.slicers=e)}const r=c.filter(e=>ek(e.type,"timeline"));if(r.length>0){const e=[];for(const t of r){const r=Vb(o,t.target);if(!n.has(r))continue;const i=tk(await n.extract(r),r);for(const t of iw(i))e.push(t)}e.length>0&&(d.timelines=e)}}P.push(d)}let $;if(n.has("docProps/core.xml")){const e=function(e){const t=Ub(e),n={};for(const e of t.children){if("string"==typeof e)continue;const t=e.local||e.tag,r=e.children.filter(e=>"string"==typeof e).join("");switch(t){case"title":r&&(n.title=r);break;case"subject":r&&(n.subject=r);break;case"creator":r&&(n.creator=r);break;case"keywords":r&&(n.keywords=r);break;case"description":r&&(n.description=r);break;case"lastModifiedBy":r&&(n.lastModifiedBy=r);break;case"category":r&&(n.category=r);break;case"created":if(r){const e=KS(r);e&&(n.created=e)}break;case"modified":if(r){const e=KS(r);e&&(n.modified=e)}}}return n}(tk(await n.extract("docProps/core.xml"),"docProps/core.xml"));Object.keys(e).length>0&&($={...e})}if(n.has("docProps/app.xml")){const e=function(e){const t=Ub(e),n={},r=XS(t,"Company");r&&(n.company=r);const i=XS(t,"Manager");return i&&(n.manager=i),n}(tk(await n.extract("docProps/app.xml"),"docProps/app.xml"));Object.keys(e).length>0&&($={...$,...e})}if(n.has("docProps/custom.xml")){const e=function(e){const t=Ub(e),n={};for(const e of t.children){if("string"==typeof e)continue;if("property"!==(e.local||e.tag))continue;const t=e.attrs.name;if(t)for(const r of e.children){if("string"==typeof r)continue;const e=r.local||r.tag,i=r.children.filter(e=>"string"==typeof e).join("");switch(e){case"lpwstr":n[t]=i;break;case"i4":case"i8":case"int":i&&(n[t]=parseInt(i,10));break;case"r8":case"decimal":i&&(n[t]=parseFloat(i));break;case"bool":n[t]="true"===i||"1"===i;break;case"filetime":case"date":if(i){const e=new Date(i);Number.isNaN(e.getTime())||(n[t]=e)}}break}}return n}(tk(await n.extract("docProps/custom.xml"),"docProps/custom.xml"));Object.keys(e).length>0&&($||($={}),$.custom=e)}const z={sheets:P,dateSystem:f},j=function(e,t){if(0===t.length)return t;const n=new Map;for(const t of e)n.set(t.name,t);const r=[];for(const e of t){const t="_xlnm.Print_Area"===e.name,i="_xlnm.Print_Titles"===e.name,o=void 0!==e.scope?n.get(e.scope):void 0;if(!t&&!i||!o){r.push(e);continue}const a=o.pageSetup??(o.pageSetup={});if(t){const t=e.range.split(",").map(Ik).filter(e=>e.length>0).join(",");t&&(a.printArea=t)}else for(const t of e.range.split(",")){const e=Ik(t);e&&(/\d/.test(e)?a.printTitlesRow=e:a.printTitlesColumn=e)}}return r}(P,d);j.length>0&&(z.namedRanges=j),$&&(z.properties=$),b&&(z.themeColors=b),h&&(z.workbookProtection=h),void 0!==p&&(z.activeSheet=p);const V=v?.fonts[0];return V&&Object.keys(V).length>0&&(z.defaultFont=V),I&&I.length>0&&(z.persons=I),E.length>0&&(z.externalLinks=E),B&&B.length>0&&(z.cellImages=B),D.length>0&&(z.pivotCaches=D),M.length>0&&(z.slicerCaches=M),T.length>0&&(z.timelineCaches=T),z}function ik(e){const t=e.match(/(\d+)\.xml$/i);return t?parseInt(t[1],10):Number.POSITIVE_INFINITY}function ok(e){const t=e.match(/(\d+)$/);return t?parseInt(t[1],10):Number.POSITIVE_INFINITY}function ak(e){const t=e.lastIndexOf("/");return-1===t?`_rels/${e}.rels`:`${e.slice(0,t)}/_rels/${e.slice(t+1)}.rels`}const sk={png:"png",jpg:"jpeg",jpeg:"jpeg",gif:"gif",svg:"svg",webp:"webp"};async function lk(e,t){if(!e.has(t))return{images:[],textBoxes:[],chartRefs:[]};const n=tk(await e.extract(t),t),r=Yb(t),i=ak(t),o=new Map,a=new Map;if(e.has(i)){const t=jb(tk(await e.extract(i),i));for(const e of t)ek(e.type,"image")?o.set(e.id,Vb(r,e.target)):ek(e.type,"chart")&&a.set(e.id,Vb(r,e.target))}const s=Ub(n),l=[],c=[],u=[];for(const t of s.children){if("string"==typeof t)continue;const n=t.local||t.tag;if("twoCellAnchor"===n||"oneCellAnchor"===n||"absoluteAnchor"===n){const e=uk(t);if(e){const r=a.get(e);if(r&&!u.some(e=>e.path===r)){const e="absoluteAnchor"===n?void 0:ck(t,n),i={path:r};e&&(i.anchor=e);const o=pk(t,"graphicFrame");if(o){const e=vk(o,"nvGraphicFramePr");e.altText&&(i.altText=e.altText),e.title&&(i.frameTitle=e.title)}u.push(i)}}}if("twoCellAnchor"===n){const n=hk(t);if(n){c.push(n);continue}const r=fk(t,o);if(r){const t=r.mediaPath;if(e.has(t)){const n={data:await e.extract(t),type:r.type,anchor:r.anchor};void 0!==r.width&&(n.width=r.width),void 0!==r.height&&(n.height=r.height),void 0!==r.altText&&(n.altText=r.altText),void 0!==r.title&&(n.title=r.title),l.push(n)}}}else if("oneCellAnchor"===n){const n=yk(t,o);if(n){const t=n.mediaPath;if(e.has(t)){const r={data:await e.extract(t),type:n.type,anchor:n.anchor};void 0!==n.width&&(r.width=n.width),void 0!==n.height&&(r.height=n.height),void 0!==n.altText&&(r.altText=n.altText),void 0!==n.title&&(r.title=n.title),l.push(r)}}}}return{images:l,textBoxes:c,chartRefs:u}}function ck(e,t){let n,r;for(const t of e.children){if("string"==typeof t)continue;const e=t,i=e.local||e.tag;"from"===i?n=Ak(e):"to"===i&&(r=Ak(e))}if(n)return"twoCellAnchor"===t&&r?{from:n,to:r}:{from:n}}function uk(e){for(const t of e.children){if("string"==typeof t)continue;const e=t;if("chart"===(e.local||e.tag)){const t=e.attrs["r:id"]??e.attrs.id;if(t)return t}const n=uk(e);if(n)return n}}function fk(e,t){let n,r,i,o,a=0,s=0,l=0,c=0;for(const t of e.children){if("string"==typeof t)continue;const e=t,u=e.local||e.tag;if("from"===u){const t=Ak(e);a=t.row,s=t.col}else if("to"===u){const t=Ak(e);l=t.row,c=t.col}else if("pic"===u){n=bk(e);const t=vk(e,"nvPicPr");r=t.altText,i=t.title,o=dk(e)}}if(!n)return null;const u=t.get(n);if(!u)return null;const f=u.split(".").pop()?.toLowerCase()??"",d={mediaPath:u,type:sk[f]??"png",anchor:{from:{row:a,col:s},to:{row:l,col:c}}};return o&&(d.width=o.width,d.height=o.height),r&&(d.altText=r),i&&(d.title=i),d}function dk(e){const t=pk(e,"spPr");if(!t)return;const n=pk(t,"xfrm");if(!n)return;const r=pk(n,"ext");if(!r)return;const i=Number(r.attrs.cx),o=Number(r.attrs.cy);return i>0&&o>0?{width:Math.round(i/mk),height:Math.round(o/mk)}:void 0}function hk(e){let t=0,n=0,r=0,i=0,o=null;for(const a of e.children){if("string"==typeof a)continue;const e=a,s=e.local||e.tag;if("from"===s){const r=Ak(e);t=r.row,n=r.col}else if("to"===s){const t=Ak(e);r=t.row,i=t.col}else if("sp"===s){const t=pk(e,"nvSpPr");if(t){const n=pk(t,"cNvSpPr");!n||"1"!==n.attrs.txBox&&"true"!==n.attrs.txBox||(o=e)}}}if(!o)return null;const a=pk(o,"txBody");let s,l,c,u,f,d="";if(a){const e=[];for(const t of a.children){if("string"==typeof t)continue;if("p"===(t.local||t.tag)){const n=gk(t);e.push(n.text),void 0!==n.fontSize&&void 0===s&&(s=n.fontSize),void 0!==n.bold&&void 0===l&&(l=n.bold),void 0!==n.color&&void 0===c&&(c=n.color)}}d=e.join("\n")}if(!d)return null;const h=pk(o,"spPr");if(h){const e=pk(h,"solidFill");if(e){const t=pk(e,"srgbClr");t&&t.attrs.val&&(u=t.attrs.val)}const t=pk(h,"ln");if(t){const e=pk(t,"solidFill");if(e){const t=pk(e,"srgbClr");t&&t.attrs.val&&(f=t.attrs.val)}}}const p={text:d,anchor:{from:{row:t,col:n},to:{row:r,col:i}}},g=dk(o);g&&(p.width=g.width,p.height=g.height);const m=vk(o,"nvSpPr");m.altText&&(p.altText=m.altText),m.title&&(p.title=m.title);const y={};let v=!1;return void 0!==s&&(y.fontSize=s,v=!0),void 0!==l&&(y.bold=l,v=!0),void 0!==c&&(y.color=c,v=!0),void 0!==u&&(y.fillColor=u,v=!0),void 0!==f&&(y.borderColor=f,v=!0),v&&(p.style=y),p}function pk(e,t){for(const n of e.children){if("string"==typeof n)continue;const e=n;if((e.local||e.tag)===t)return e}return null}function gk(e){let t,n,r,i="";for(const o of e.children){if("string"==typeof o)continue;const e=o;if("r"===(e.local||e.tag)){const o=pk(e,"rPr");if(o){o.attrs.sz&&(t=Number(o.attrs.sz)/100),"1"!==o.attrs.b&&"true"!==o.attrs.b||(n=!0);const e=pk(o,"solidFill");if(e){const t=pk(e,"srgbClr");t&&t.attrs.val&&(r=t.attrs.val)}}const a=pk(e,"t");a&&(i+=a.children.filter(e=>"string"==typeof e).join(""))}}return{text:i,fontSize:t,bold:n,color:r}}const mk=9525;function yk(e,t){let n,r,i,o=0,a=0,s=0,l=0;for(const t of e.children){if("string"==typeof t)continue;const e=t,c=e.local||e.tag;if("from"===c){const t=Ak(e);o=t.row,a=t.col}else if("ext"===c)s=Number(e.attrs.cx)||0,l=Number(e.attrs.cy)||0;else if("pic"===c){n=bk(e);const t=vk(e,"nvPicPr");r=t.altText,i=t.title}}if(!n)return null;const c=t.get(n);if(!c)return null;const u=c.split(".").pop()?.toLowerCase()??"",f={mediaPath:c,type:sk[u]??"png",anchor:{from:{row:o,col:a}}};return s>0&&(f.width=Math.round(s/mk)),l>0&&(f.height=Math.round(l/mk)),r&&(f.altText=r),i&&(f.title=i),f}function vk(e,t){const n=pk(e,t);if(!n)return{};const r=pk(n,"cNvPr");if(!r)return{};const i={};return r.attrs.descr&&(i.altText=r.attrs.descr),r.attrs.title&&(i.title=r.attrs.title),i}function Ak(e){let t=0,n=0;for(const r of e.children){if("string"==typeof r)continue;const e=r,i=e.local||e.tag,o=e.children.filter(e=>"string"==typeof e).join("");"row"===i?t=Number(o)||0:"col"===i&&(n=Number(o)||0)}return{row:t,col:n}}function bk(e){for(const t of e.children){if("string"==typeof t)continue;const e=t;if("blipFill"===(e.local||e.tag))for(const t of e.children){if("string"==typeof t)continue;const e=t;if("blip"===(e.local||e.tag))return e.attrs["r:embed"]??e.attrs["R:embed"]??wk(e.attrs)}}}function wk(e){for(const t of Object.keys(e))if(t.endsWith(":embed")&&e[t].startsWith("rId"))return e[t]}function Ik(e){const t=e.trim(),n=t.lastIndexOf("!");return-1===n?t:t.slice(n+1)}function xk(e){const t=Ub(e),n=t.attrs.name??"",r=t.attrs.displayName??n,i=t.attrs.ref??"";if(!n)return null;const o=t.attrs.totalsRowCount,a=void 0!==o&&"0"!==o,s=[];let l,c,u,f=!1;for(const e of t.children){if("string"==typeof e)continue;const t=e.local||e.tag;if("autoFilter"===t)f=!0;else if("tableColumns"===t)for(const t of e.children){if("string"==typeof t)continue;if("tableColumn"===(t.local||t.tag)){const e={name:t.attrs.name??""};t.attrs.totalsRowFunction&&(e.totalFunction=t.attrs.totalsRowFunction),t.attrs.totalsRowLabel&&(e.totalLabel=t.attrs.totalsRowLabel);for(const n of t.children){if("string"==typeof n)continue;if("totalsRowFormula"===(n.local||n.tag)){const t=n.children.filter(e=>"string"==typeof e).join("");t&&(e.totalFormula=t)}}s.push(e)}}else"tableStyleInfo"===t&&(l=e.attrs.name,c="1"===e.attrs.showRowStripes,u="1"===e.attrs.showColumnStripes)}const d={name:n,columns:s};return r&&r!==n&&(d.displayName=r),i&&(d.range=i),l&&(d.style=l),void 0!==c&&(d.showRowStripes=c),void 0!==u&&(d.showColumnStripes=u),d.showAutoFilter=f,a&&(d.showTotalRow=!0),d}async function Ck(e){if(function(){if(void 0===WE)try{new CompressionStream("deflate-raw"),WE="undefined"!=typeof ReadableStream}catch{WE=!1}return WE}())try{const t=new CompressionStream("deflate-raw"),n=t.writable.getWriter(),r=t.readable.getReader();n.write(e),n.close();const i=[];let o=0;for(;;){const{done:e,value:t}=await r.read();if(e)break;i.push(t),o+=t.length}const a=new Uint8Array(o);let s=0;for(const e of i)a.set(e,s),s+=e.length;return a}catch{}return zE(e)}class Ek{entries=[];paths=new Set;add(e,t,n){if(this.paths.has(e))throw new yb(`Duplicate ZIP entry: "${e}"`);this.paths.add(e);const r=n?.compress??!0;this.entries.push({path:e,data:t,compress:r})}async build(){const e=[];for(const t of this.entries){const n=t.data.length>0?NE(t.data):0;let r,i;t.compress&&t.data.length>0?(r=await Ck(t.data),i=8,r.length>=t.data.length&&(r=t.data,i=0)):(r=t.data,i=0),e.push({path:t.path,data:t.data,compressedData:r,method:i,entryCrc32:n})}const t=new TextEncoder,n=e.map(e=>t.encode(e.path));let r=0;for(let t=0;t<e.length;t++)r+=30+n[t].length+e[t].compressedData.length;let i=0;for(let t=0;t<e.length;t++)i+=46+n[t].length;const o=new Uint8Array(r+i+22),a=new DataView(o.buffer);let s=0;const l=[];for(let t=0;t<e.length;t++){const r=e[t],i=n[t];l.push(s),a.setUint32(s,67324752,!0),a.setUint16(s+4,20,!0),a.setUint16(s+6,0,!0),a.setUint16(s+8,r.method,!0),a.setUint16(s+10,0,!0),a.setUint16(s+12,33,!0),a.setUint32(s+14,r.entryCrc32,!0),a.setUint32(s+18,r.compressedData.length,!0),a.setUint32(s+22,r.data.length,!0),a.setUint16(s+26,i.length,!0),a.setUint16(s+28,0,!0),o.set(i,s+30),s+=30+i.length,o.set(r.compressedData,s),s+=r.compressedData.length}const c=s;for(let t=0;t<e.length;t++){const r=e[t],i=n[t];a.setUint32(s,33639248,!0),a.setUint16(s+4,20,!0),a.setUint16(s+6,20,!0),a.setUint16(s+8,0,!0),a.setUint16(s+10,r.method,!0),a.setUint16(s+12,0,!0),a.setUint16(s+14,33,!0),a.setUint32(s+16,r.entryCrc32,!0),a.setUint32(s+20,r.compressedData.length,!0),a.setUint32(s+24,r.data.length,!0),a.setUint16(s+28,i.length,!0),a.setUint16(s+30,0,!0),a.setUint16(s+32,0,!0),a.setUint16(s+34,0,!0),a.setUint16(s+36,0,!0),a.setUint32(s+38,0,!0),a.setUint32(s+42,l[t],!0),o.set(i,s+46),s+=46+i.length}const u=s-c;return a.setUint32(s,101010256,!0),a.setUint16(s+4,0,!0),a.setUint16(s+6,0,!0),a.setUint16(s+8,e.length,!0),a.setUint16(s+10,e.length,!0),a.setUint32(s+12,u,!0),a.setUint32(s+16,c,!0),a.setUint16(s+20,0,!0),o}}const Bk={png:"image/png",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp"};const Sk="http://schemas.openxmlformats.org/package/2006/relationships";function kk(e,t){const n={};return void 0!==t.rgb&&(n.rgb=6===t.rgb.length?`FF${t.rgb}`:t.rgb),void 0!==t.theme&&(n.theme=t.theme),void 0!==t.tint&&(n.tint=t.tint),void 0!==t.indexed&&(n.indexed=t.indexed),hw(e,n)}function Fk(e){const t=[];return e.bold&&t.push(hw("b")),e.italic&&t.push(hw("i")),void 0!==e.underline&&!1!==e.underline&&(!0===e.underline||"single"===e.underline?t.push(hw("u")):t.push(hw("u",{val:e.underline}))),e.strikethrough&&t.push(hw("strike")),void 0!==e.charset&&t.push(hw("charset",{val:e.charset})),void 0!==e.family&&t.push(hw("family",{val:e.family})),e.scheme&&t.push(hw("scheme",{val:e.scheme})),e.color&&t.push(kk("color",e.color)),void 0!==e.size&&t.push(hw("sz",{val:e.size})),e.name&&t.push(hw("name",{val:e.name})),e.vertAlign&&t.push(hw("vertAlign",{val:e.vertAlign})),gw("font",void 0,t)}function Dk(e){if("pattern"===e.type){const t=[];e.fgColor&&t.push(kk("fgColor",e.fgColor)),e.bgColor&&t.push(kk("bgColor",e.bgColor));const n=gw("patternFill",{patternType:e.pattern},t.length>0?t:void 0);return gw("fill",void 0,[n])}const t=[];for(const n of e.stops)t.push(gw("stop",{position:n.position},[kk("color",n.color)]));const n={};void 0!==e.degree&&(n.degree=e.degree);const r=gw("gradientFill",n,t);return gw("fill",void 0,[r])}function Nk(e,t){return t?t.color?gw(""+e,{style:t.style},[kk("color",t.color)]):hw(e,{style:t.style}):hw(e)}function Mk(e){const t={};e.diagonalUp&&(t.diagonalUp=!0),e.diagonalDown&&(t.diagonalDown=!0);const n=[Nk("left",e.left),Nk("right",e.right),Nk("top",e.top),Nk("bottom",e.bottom),Nk("diagonal",e.diagonal)];return gw("border",Object.keys(t).length>0?t:void 0,n)}function Qk(e){if(!e)return"";const t=[];return void 0!==e.rgb&&t.push(`rgb:${e.rgb}`),void 0!==e.theme&&t.push(`th:${e.theme}`),void 0!==e.tint&&t.push(`tint:${e.tint}`),void 0!==e.indexed&&t.push(`idx:${e.indexed}`),t.join("|")}function Tk(e){const t=[];return e.name&&t.push(`n:${e.name}`),void 0!==e.size&&t.push(`s:${e.size}`),e.bold&&t.push("b"),e.italic&&t.push("i"),void 0!==e.underline&&!1!==e.underline&&t.push(`u:${e.underline}`),e.strikethrough&&t.push("st"),e.color&&t.push(`c:${Qk(e.color)}`),e.vertAlign&&t.push(`va:${e.vertAlign}`),void 0!==e.family&&t.push(`fam:${e.family}`),void 0!==e.charset&&t.push(`cs:${e.charset}`),e.scheme&&t.push(`sch:${e.scheme}`),t.join(",")}function Lk(e){return"pattern"===e.type?`p:${e.pattern}|fg:${Qk(e.fgColor)}|bg:${Qk(e.bgColor)}`:`g:${e.degree??""}|${e.stops.map(e=>`${e.position}:${Qk(e.color)}`).join(";")}`}function Rk(e){return e?`${e.style}:${Qk(e.color)}`:""}function Uk(e){return[`l:${Rk(e.left)}`,`r:${Rk(e.right)}`,`t:${Rk(e.top)}`,`b:${Rk(e.bottom)}`,`d:${Rk(e.diagonal)}`,e.diagonalUp?"du":"",e.diagonalDown?"dd":""].join("|")}function Hk(e,t){const n=t?.reuseStyleIdentity??!1,r={name:e?.name??"Calibri",size:e?.size??11,...e},i=[{key:Tk(r),font:r}],o=new Map([[i[0].key,0]]),a=[{key:"p:none|fg:|bg:",fill:{type:"pattern",pattern:"none"}},{key:"p:gray125|fg:|bg:",fill:{type:"pattern",pattern:"gray125"}}],s=new Map([[a[0].key,0],[a[1].key,1]]),l={},c=[{key:Uk(l),border:l}],u=new Map([[c[0].key,0]]),f=[],d=new Map;let h=164;const p="nf:0|f:0|fl:0|b:0|a:|p:",g=[{key:p,numFmtId:0,fontId:0,fillId:0,borderId:0}],m=new Map([[p,0]]);function y(e){const t=d.get(e);if(void 0!==t)return t;const n=h++;return f.push({id:n,formatCode:e}),d.set(e,n),n}function v(e){if(!e)return"";const t=[];return e.horizontal&&t.push(`h:${e.horizontal}`),e.vertical&&t.push(`v:${e.vertical}`),e.wrapText&&t.push("w"),e.shrinkToFit&&t.push("sf"),void 0!==e.textRotation&&t.push(`r:${e.textRotation}`),void 0!==e.indent&&t.push(`i:${e.indent}`),e.readingOrder&&t.push(`ro:${e.readingOrder}`),t.join(",")}function A(e){if(!e)return"";const t=[];return void 0!==e.locked&&t.push(`l:${e.locked}`),void 0!==e.hidden&&t.push(`h:${e.hidden}`),t.join(",")}const b=[],w=new Map;const I=n?new WeakMap:void 0;function x(e,t){if(I&&!t){const t=I.get(e);if(void 0!==t)return t}const n=e.font?function(e){const t=Tk(e),n=o.get(t);if(void 0!==n)return n;const r=i.length;return i.push({key:t,font:OB(e)}),o.set(t,r),r}(e.font):0,r=e.fill?function(e){const t=Lk(e),n=s.get(t);if(void 0!==n)return n;const r=a.length;return a.push({key:t,fill:PB(e)}),s.set(t,r),r}(e.fill):0,l=e.border?function(e){const t=Uk(e),n=u.get(t);if(void 0!==n)return n;const r=c.length;return c.push({key:t,border:zB(e)}),u.set(t,r),r}(e.border):0,f=e.numFmt?y(e.numFmt):0,d=[`nf:${f}`,`f:${n}`,`fl:${r}`,`b:${l}`,`a:${v(e.alignment)}`,`p:${A(e.protection)}`,t?"cb:1":"cb:0"].join("|"),h=m.get(d);if(void 0!==h)return I&&!t&&I.set(e,h),h;const p=g.length;return g.push({key:d,numFmtId:f,fontId:n,fillId:r,borderId:l,alignment:e.alignment?{...e.alignment}:void 0,protection:e.protection?{...e.protection}:void 0,hasCheckboxFeature:t||void 0}),m.set(d,p),I&&!t&&I.set(e,p),p}function C(e){const t={};if(e.horizontal&&(t.horizontal=e.horizontal),e.vertical&&(t.vertical=e.vertical),e.wrapText&&(t.wrapText=!0),e.shrinkToFit&&(t.shrinkToFit=!0),void 0!==e.textRotation&&(t.textRotation=e.textRotation),void 0!==e.indent&&(t.indent=e.indent),e.readingOrder){const n={ltr:1,rtl:2,context:0};t.readingOrder=n[e.readingOrder]}return hw("alignment",t)}return{addStyle:function(e){return x(e,!1)},addCheckboxStyle:function(e){return x(e??{},!0)},addNumFmt:y,addDxf:function(e){const t=function(e){const t=[];return e.font&&t.push(`f:${Tk(e.font)}`),e.fill&&t.push(`fl:${Lk(e.fill)}`),e.border&&t.push(`b:${Uk(e.border)}`),e.numFmt&&t.push(`nf:${e.numFmt}`),e.alignment&&t.push(`a:${v(e.alignment)}`),t.join("|")}(e),n=w.get(t);if(void 0!==n)return n;const r=b.length;return b.push(e),w.set(t,r),r},hasCheckboxFeature:function(){for(const e of g)if(e.hasCheckboxFeature)return!0;return!1},toXml:function(){const e=[];if(f.length>0){const t=f.map(e=>hw("numFmt",{numFmtId:e.id,formatCode:e.formatCode}));e.push(gw("numFmts",{count:f.length},t))}const t=i.map(e=>Fk(e.font));e.push(gw("fonts",{count:i.length},t));const n=a.map(e=>Dk(e.fill));e.push(gw("fills",{count:a.length},n));const r=c.map(e=>Mk(e.border));e.push(gw("borders",{count:c.length},r)),e.push(gw("cellStyleXfs",{count:1},[hw("xf",{numFmtId:0,fontId:0,fillId:0,borderId:0})]));const o=g.map(e=>{const t={numFmtId:e.numFmtId,fontId:e.fontId,fillId:e.fillId,borderId:e.borderId,xfId:0};0!==e.numFmtId&&(t.applyNumberFormat=!0),0!==e.fontId&&(t.applyFont=!0),0!==e.fillId&&(t.applyFill=!0),0!==e.borderId&&(t.applyBorder=!0);const n=void 0!==e.alignment,r=void 0!==e.protection,i=!0===e.hasCheckboxFeature;if(n&&(t.applyAlignment=!0),r&&(t.applyProtection=!0),n||r||i){const o=[];return n&&o.push(C(e.alignment)),r&&o.push(function(e){const t={};return void 0!==e.locked&&(t.locked=e.locked?1:0),void 0!==e.hidden&&(t.hidden=e.hidden?1:0),hw("protection",t)}(e.protection)),i&&o.push(gw("extLst",void 0,gw("ext",{uri:pB,"xmlns:xfpb":hB},hw("xfpb:xfComplement",{i:"0"})))),gw("xf",t,o)}return hw("xf",t)});if(e.push(gw("cellXfs",{count:g.length},o)),e.push(gw("cellStyles",{count:1},[hw("cellStyle",{name:"Normal",xfId:0,builtinId:0})])),b.length>0){const t=b.map(e=>{const t=[];if(e.font&&t.push(Fk(e.font)),e.numFmt){const n=y(e.numFmt);t.push(hw("numFmt",{numFmtId:n,formatCode:e.numFmt}))}return e.fill&&t.push(Dk(e.fill)),e.border&&t.push(Mk(e.border)),e.alignment&&t.push(C(e.alignment)),gw("dxf",void 0,t)});e.push(gw("dxfs",{count:b.length},t))}else e.push(hw("dxfs",{count:0}));return e.push(hw("tableStyles",{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"})),mw("styleSheet",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"},e)}}}function qk(e){const t=e;return t.length>=8&&137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?"png":t.length>=3&&255===t[0]&&216===t[1]&&255===t[2]?"jpeg":t.length>=6&&71===t[0]&&73===t[1]&&70===t[2]?"gif":t.length>=12&&82===t[0]&&73===t[1]&&70===t[2]&&70===t[3]&&87===t[8]&&69===t[9]&&66===t[10]&&80===t[11]?"webp":function(e){const t=e.subarray(0,Ok);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);const r=n.trimStart().replace(/^/,"");return!!r.startsWith("<")&&/<svg[\s>]/i.test(r)}(t)?"svg":"png"}const Ok=1024;const Pk="http://schemas.openxmlformats.org/officeDocument/2006/relationships",$k="http://schemas.openxmlformats.org/drawingml/2006/chart",zk=9525,jk={png:"png",jpeg:"jpeg",gif:"gif",svg:"svg",webp:"webp"},Vk={png:"image/png",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp"};function Yk(e,t,n,r,i=1){const o=[],a=[],s=[];for(let n=0;n<e.length;n++){const r=e[n],i=t+n,l=`rId${n+1}`,c=jk[r.type]??"png",u=Vk[r.type]??"image/png",f=`xl/media/image${i}.${c}`,d=`../media/image${i}.${c}`;o.push({path:f,data:r.data,contentType:u}),a.push(hw("Relationship",{Id:l,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:d}));const h=r.width?r.width*zk:3e6,p=r.height?r.height*zk:2e6,g=r.anchor.from.col,m=r.anchor.from.row,y=r.anchor.to?.col??g+3,v=r.anchor.to?.row??m+5,A=gw("xdr:from",void 0,[gw("xdr:col",void 0,String(g)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(m)),gw("xdr:rowOff",void 0,"0")]),b=gw("xdr:to",void 0,[gw("xdr:col",void 0,String(y)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(v)),gw("xdr:rowOff",void 0,"0")]),w={id:n+2,name:`Picture ${n+1}`};r.title&&(w.title=r.title),r.altText&&(w.descr=r.altText);const I=gw("xdr:nvPicPr",void 0,[hw("xdr:cNvPr",w),gw("xdr:cNvPicPr",void 0,[hw("a:picLocks",{noChangeAspect:1})])]),x=gw("xdr:blipFill",void 0,[hw("a:blip",{"r:embed":l}),gw("a:stretch",void 0,[hw("a:fillRect")])]),C=gw("xdr:spPr",void 0,[gw("a:xfrm",void 0,[hw("a:off",{x:0,y:0}),hw("a:ext",{cx:h,cy:p})]),gw("a:prstGeom",{prst:"rect"},[hw("a:avLst")])]),E=gw("xdr:pic",void 0,[I,x,C]),B=gw("xdr:twoCellAnchor",void 0,[A,b,E,hw("xdr:clientData")]);s.push(B)}if(n&&n.length>0){let t=e.length+2;for(let e=0;e<n.length;e++){const r=n[e],i=r.anchor.from.col,o=r.anchor.from.row,a=r.anchor.to?.col??i+3,l=r.anchor.to?.row??o+3,c=r.width?r.width*zk:2e6,u=r.height?r.height*zk:5e5,f=gw("xdr:from",void 0,[gw("xdr:col",void 0,String(i)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(o)),gw("xdr:rowOff",void 0,"0")]),d=gw("xdr:to",void 0,[gw("xdr:col",void 0,String(a)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(l)),gw("xdr:rowOff",void 0,"0")]),h={id:t++,name:`TextBox ${e+1}`};r.title&&(h.title=r.title),r.altText&&(h.descr=r.altText);const p=gw("xdr:nvSpPr",void 0,[hw("xdr:cNvPr",h),gw("xdr:cNvSpPr",{txBox:1},[])]),g=[gw("a:xfrm",void 0,[hw("a:off",{x:0,y:0}),hw("a:ext",{cx:c,cy:u})]),gw("a:prstGeom",{prst:"rect"},[hw("a:avLst")])],m=r.style?.fillColor??"FFFFFF";g.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:m})]));const y=r.style?.borderColor??"000000";g.push(gw("a:ln",void 0,[gw("a:solidFill",void 0,[hw("a:srgbClr",{val:y})])]));const v=gw("xdr:spPr",void 0,g),A={lang:"en-US",sz:100*(r.style?.fontSize??11)};r.style?.bold&&(A.b=1);const b=[];r.style?.color&&b.push(gw("a:solidFill",void 0,[hw("a:srgbClr",{val:r.style.color})]));const w=b.length>0?gw("a:rPr",A,b):hw("a:rPr",A),I=gw("xdr:txBody",void 0,[hw("a:bodyPr",{wrap:"square"}),gw("a:p",void 0,[gw("a:r",void 0,[w,gw("a:t",void 0,uw(r.text))])])]),x=gw("xdr:sp",void 0,[p,v,I]),C=gw("xdr:twoCellAnchor",void 0,[f,d,x,hw("xdr:clientData")]);s.push(C)}}const l=[];if(r&&r.length>0){let t=e.length+(n?.length??0)+2;for(let n=0;n<r.length;n++){const o=r[n],c=i+n,u=`rId${e.length+n+1}`;a.push(hw("Relationship",{Id:u,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",Target:`../charts/chart${c}.xml`}));const f=o.anchor.from.col,d=o.anchor.from.row,h=o.anchor.to?.col??f+8,p=o.anchor.to?.row??d+15,g=gw("xdr:from",void 0,[gw("xdr:col",void 0,String(f)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(d)),gw("xdr:rowOff",void 0,"0")]),m=gw("xdr:to",void 0,[gw("xdr:col",void 0,String(h)),gw("xdr:colOff",void 0,"0"),gw("xdr:row",void 0,String(p)),gw("xdr:rowOff",void 0,"0")]),y={id:t++,name:`Chart ${n+1}`};o.frameTitle&&(y.title=o.frameTitle),o.altText&&(y.descr=o.altText);const v=gw("xdr:nvGraphicFramePr",void 0,[hw("xdr:cNvPr",y),gw("xdr:cNvGraphicFramePr",void 0,[])]),A=gw("xdr:xfrm",void 0,[hw("a:off",{x:0,y:0}),hw("a:ext",{cx:0,cy:0})]),b=gw("a:graphic",void 0,gw("a:graphicData",{uri:$k},[hw("c:chart",{"xmlns:c":$k,"xmlns:r":Pk,"r:id":u})])),w=gw("xdr:graphicFrame",{macro:""},[v,A,b]),I=gw("xdr:twoCellAnchor",{editAs:"oneCell"},[g,m,w,hw("xdr:clientData")]);s.push(I),l.push({globalChartIndex:c})}}return{drawingXml:mw("xdr:wsDr",{"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:r":Pk},s),drawingRels:mw("Relationships",{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},a),images:o,charts:l}}function Wk(e,t){const n=e.showTitle??Boolean(e.title),r=function(e){if(!1===e.legend)return null;if(void 0===e.legend)return"scatter"===e.type?"b":"r";switch(e.legend){case"top":return"t";case"bottom":return"b";case"left":return"l";case"right":return"r";case"topRight":return"tr"}}(e),i=[];n&&e.title&&i.push(function(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g,m){const y=void 0===n?0:n*uI,v=void 0===r?1400:100*r,A=i?1:0,b=!0===o?1:void 0,w=!0===s?"sngStrike":void 0,I=!0===l?"sng":void 0,x=void 0!==a?gw("a:solidFill",void 0,[$w(a)]):void 0,C=c?hw("a:latin",{typeface:c}):void 0,E=[];x&&E.push(x),C&&E.push(C);const B=E.length>0?gw("a:defRPr",{sz:v,b:A,i:b,u:I,strike:w},E):hw("a:defRPr",{sz:v,b:A,i:b,u:I,strike:w}),S=E.length>0?gw("a:rPr",{lang:"en-US",sz:v,b:A,i:b,u:I,strike:w},E):hw("a:rPr",{lang:"en-US",sz:v,b:A,i:b,u:I,strike:w}),k=rI(u),F=[gw("c:tx",void 0,[gw("c:rich",void 0,[gw("a:bodyPr",{rot:y,spcFirstLastPara:1,vertOverflow:"ellipsis",wrap:"square",anchor:"ctr",anchorCtr:1},[]),hw("a:lstStyle"),gw("a:p",void 0,[gw("a:pPr",void 0,[B]),gw("a:r",void 0,[S,gw("a:t",void 0,uw(e))])])])])];void 0!==k&&F.push(k),F.push(hw("c:overlay",{val:t?1:0}));const D=dI(f,d,h,p,g,m);return void 0!==D&&F.push(D),gw("c:title",void 0,F)}(e.title,function(e){return!0===e.titleOverlay}(e),function(e){return hI(e.titleRotation)}(e),function(e){return pI(e.titleFontSize)}(e),function(e){return gI(e.titleBold)}(e),function(e){return mI(e.titleItalic)}(e),function(e){return yI(e.titleColor)}(e),function(e){return vI(e.titleStrike)}(e),function(e){return AI(e.titleUnderline)}(e),function(e){return function(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}(e.titleFontFamily)}(e),function(e){return tI(e.titleLayout)}(e),function(e){return yI(e.titleFillColor)}(e),function(e){return yI(e.titleBorderColor)}(e),function(e){return Gw(e.titleBorderWidth)}(e),function(e){return Jw(e.titleBorderDash)}(e),function(e){return Nw(e.titleBorderCap)}(e),function(e){return Mw(e.titleBorderCompound)}(e))),i.push(hw("c:autoTitleDeleted",{val:Sx(e)?1:0}));const o=function(e){if(void 0===e)return;const t=[],n=Kw(e.rotX,-90,90);void 0!==n&&t.push(hw("c:rotX",{val:n}));const r=Kw(e.hPercent,5,500);void 0!==r&&t.push(hw("c:hPercent",{val:r}));const i=Kw(e.rotY,0,360);void 0!==i&&t.push(hw("c:rotY",{val:i}));const o=Kw(e.depthPercent,20,2e3);void 0!==o&&t.push(hw("c:depthPercent",{val:o})),!0===e.rAngAx?t.push(hw("c:rAngAx",{val:1})):!1===e.rAngAx&&t.push(hw("c:rAngAx",{val:0}));const a=Kw(e.perspective,0,240);return void 0!==a&&t.push(hw("c:perspective",{val:a})),gw("c:view3D",void 0,t)}(e.view3D);void 0!==o&&i.push(o);const a=function(e){if("number"==typeof e&&Number.isFinite(e)&&Number.isInteger(e)&&!(e<=0||e>100))return gw("c:floor",void 0,[hw("c:thickness",{val:e})])}(e.floorThickness);void 0!==a&&i.push(a);const s=function(e){if("number"==typeof e&&Number.isFinite(e)&&Number.isInteger(e)&&!(e<=0||e>100))return gw("c:sideWall",void 0,[hw("c:thickness",{val:e})])}(e.sideWallThickness);void 0!==s&&i.push(s);const l=function(e){if("number"==typeof e&&Number.isFinite(e)&&Number.isInteger(e)&&!(e<=0||e>100))return gw("c:backWall",void 0,[hw("c:thickness",{val:e})])}(e.backWallThickness);void 0!==l&&i.push(l),i.push(DC(e,t)),r&&i.push(II(r,function(e){return!0===e.legendOverlay}(e),function(e){const t=e.legendEntries;if(!Array.isArray(t)||0===t.length)return[];const n=new Map;for(const e of t){if(!e||"object"!=typeof e)continue;const t=e.idx;if("number"!=typeof t||!Number.isFinite(t))continue;if(!Number.isInteger(t)||t<0)continue;const r={idx:t,delete:!0===e.delete};if("number"==typeof e.fontSize&&Number.isFinite(e.fontSize)){const t=Math.round(2*e.fontSize)/2;t>=1&&t<=wI&&(r.fontSize=t)}if(!0===e.bold?r.bold=!0:!1===e.bold&&(r.bold=!1),!0===e.italic?r.italic=!0:!1===e.italic&&(r.italic=!1),!0===e.underline?r.underline=!0:!1===e.underline&&(r.underline=!1),!0===e.strikethrough?r.strikethrough=!0:!1===e.strikethrough&&(r.strikethrough=!1),void 0!==e.color){const t=Pw(e.color);void 0!==t&&(r.color=t)}if("string"==typeof e.fontFamily){const t=e.fontFamily.trim();t.length>0&&(r.fontFamily=t)}n.set(t,r)}return Array.from(n.values()).sort((e,t)=>e.idx-t.idx)}(e),function(e){return pI(e.legendFontSize)}(e),function(e){const t=e.legendBold;return!0===t||!1!==t&&void 0}(e),function(e){const t=e.legendItalic;return!0===t||!1!==t&&void 0}(e),function(e){const t=e.legendUnderline;return!0===t||!1!==t&&void 0}(e),function(e){if(!0===e.legendStrikethrough)return!0}(e),function(e){return yI(e.legendFontColor)}(e),function(e){return function(e){if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?t:void 0}(e.legendFontFamily)}(e),function(e){return tI(e.legendLayout)}(e),function(e){return yI(e.legendFillColor)}(e),function(e){return yI(e.legendBorderColor)}(e),function(e){return Gw(e.legendBorderWidth)}(e),function(e){return Jw(e.legendBorderDash)}(e),Nw(e.legendBorderCap),Mw(e.legendBorderCompound))),i.push(hw("c:plotVisOnly",{val:_k(e)?1:0})),i.push(hw("c:dispBlanksAs",{val:Jk(e)})),i.push(hw("c:showDLblsOverMax",{val:Xk(e)?1:0}));const c=gw("c:chart",void 0,i),u=[];(function(e){return!0===e.date1904})(e)&&u.push(hw("c:date1904",{val:1}));const f=function(e){const t=e.lang;return"string"!=typeof t?void 0:/^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(t)?t:void 0}(e);void 0!==f&&u.push(hw("c:lang",{val:f})),u.push(hw("c:roundedCorners",{val:Kk(e)?1:0}));const d=function(e){const t=e.style;return"number"!=typeof t?void 0:Number.isInteger(t)?t<1||t>48?void 0:t:void 0}(e);void 0!==d&&u.push(hw("c:style",{val:d}));const h=function(e){const t=e.protection;if(void 0===t||!1===t)return;if(!0===t)return{chartObject:!1,data:!1,formatting:!1,selection:!1,userInterface:!1};return{chartObject:!0===t.chartObject,data:!0===t.data,formatting:!0===t.formatting,selection:!0===t.selection,userInterface:!0===t.userInterface}}(e);void 0!==h&&u.push(function(e){return gw("c:protection",void 0,[hw("c:chartObject",{val:e.chartObject?1:0}),hw("c:data",{val:e.data?1:0}),hw("c:formatting",{val:e.formatting?1:0}),hw("c:selection",{val:e.selection?1:0}),hw("c:userInterface",{val:e.userInterface?1:0})])}(h)),u.push(c);const p=function(e){const t=(s=e.chartSpaceFillColor,yI(s)),n=function(e){return yI(e)}(e.chartSpaceBorderColor),r=Gw(e.chartSpaceBorderWidth),i=Jw(e.chartSpaceBorderDash),o=Nw(e.chartSpaceBorderCap),a=Mw(e.chartSpaceBorderCompound);var s;if(void 0===t&&void 0===n&&void 0===r&&void 0===i&&void 0===o&&void 0===a)return;const l=[];void 0!==t&&l.push(gw("a:solidFill",void 0,[$w(t)]));if(void 0!==n||void 0!==r||void 0!==i||void 0!==o||void 0!==a){const e={};void 0!==r&&(e.w=Math.round(r*Bw)),void 0!==o&&(e.cap=o),void 0!==a&&(e.cmpd=a);const t=[];void 0!==n&&t.push(gw("a:solidFill",void 0,[$w(n)])),void 0!==i&&t.push(hw("a:prstDash",{val:i})),l.push(0===t.length?hw("a:ln",e):gw("a:ln",Object.keys(e).length>0?e:void 0,t))}return gw("c:spPr",void 0,l)}(e);void 0!==p&&u.push(p);return{chartXml:mw("c:chartSpace",{"xmlns:c":"http://schemas.openxmlformats.org/drawingml/2006/chart","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},u),chartRels:mw("Relationships",{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},[])}}const Gk=new Set(["gap","zero","span"]);function Jk(e){const t=e.dispBlanksAs;return t&&Gk.has(t)?t:"gap"}function _k(e){return"boolean"!=typeof e.plotVisOnly||e.plotVisOnly}function Xk(e){return"boolean"!=typeof e.showDLblsOverMax||e.showDLblsOverMax}function Kk(e){return"boolean"==typeof e.roundedCorners&&e.roundedCorners}const Zk="http://schemas.openxmlformats.org/spreadsheetml/2006/main";function eF(e,t){const n=[];for(const[t,r]of e){if(!r.comment)continue;const[e,i]=t.split(","),o=parseInt(e,10),a=parseInt(i,10),s=hS(o,a),l=r.comment.author??"",c=r.comment.text;n.push({ref:s,row:o,col:a,author:l,text:c})}if(0===n.length)return null;n.sort((e,t)=>e.row-t.row||e.col-t.col);const r=new Map;for(const e of n)r.has(e.author)||r.set(e.author,r.size);const i=function(e,t){const n=[];for(const[e]of t)n.push(gw("author",void 0,uw(e)));const r=gw("authors",void 0,n),i=[];for(const n of e){const e=t.get(n.author)??0,r=gw("text",void 0,[gw("r",void 0,[gw("t",void 0,uw(n.text))])]);i.push(gw("comment",{ref:n.ref,authorId:e},[r]))}const o=gw("commentList",void 0,i);return mw("comments",{xmlns:Zk},[r,o])}(n,r),o=function(e,t){const n=[];n.push('<xml xmlns:v="urn:schemas-microsoft-com:vml"',' xmlns:o="urn:schemas-microsoft-com:office:office"',' xmlns:x="urn:schemas-microsoft-com:office:excel">'),n.push('<o:shapelayout v:ext="edit">',`<o:idmap v:ext="edit" data="${t+1}"/>`,"</o:shapelayout>"),n.push('<v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202"',' path="m,l,21600r21600,l21600,xe">','<v:stroke joinstyle="miter"/>','<v:path gradientshapeok="t" o:connecttype="rect"/>',"</v:shapetype>");const r=1024*(t+1)+1;for(let t=0;t<e.length;t++){const i=e[t],o=r+t,a=i.col+1,s=i.row,l=a+2,c=s+4,u=48*(i.col+1),f=15*i.row;n.push(`<v:shape id="_x0000_s${o}" type="#_x0000_t202"`,` style="position:absolute;margin-left:${u}pt;margin-top:${f}pt;`,`width:108pt;height:59.25pt;z-index:${t+1};visibility:hidden"`,' fillcolor="#ffffe1" o:insetmode="auto">','<v:fill color2="#ffffe1"/>','<v:shadow on="t" color="black" obscured="t"/>','<v:path o:connecttype="none"/>','<v:textbox style="mso-direction-alt:auto">','<div style="text-align:left"/>',"</v:textbox>",'<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",`<x:Anchor>${a},15,${s},2,${l},31,${c},4</x:Anchor>`,"<x:AutoFill>False</x:AutoFill>",`<x:Row>${i.row}</x:Row>`,`<x:Column>${i.col}</x:Column>`,"</x:ClientData>","</v:shape>")}return n.push("</xml>"),n.join("")}(n,t);return{commentsXml:i,vmlXml:o,comments:n}}function tF(e,t,n){const r=e.displayName??e.name,i=e.range??"",o=!1!==e.showAutoFilter,a=!0===e.showTotalRow,s={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",id:t,name:e.name,displayName:r,ref:i};a?s.totalsRowCount=1:s.totalsRowShown=0;const l=[];if(o){const e=a?function(e){const t=e.indexOf(":");if(-1===t)return e;const n=e.slice(t+1);let r=n.length;for(;r>0&&n.charCodeAt(r-1)>=48&&n.charCodeAt(r-1)<=57;)r--;const i=n.slice(0,r),o=parseInt(n.slice(r),10);return isNaN(o)||o<=1?e:`${e.slice(0,t+1)}${i}${o-1}`}(i):i;l.push(hw("autoFilter",{ref:e}))}const c=[];for(let t=0;t<e.columns.length;t++){const n=e.columns[t],r={id:t+1,name:n.name};if(a&&n.totalFunction&&(r.totalsRowFunction=n.totalFunction),a&&n.totalLabel&&(r.totalsRowLabel=n.totalLabel),a&&"custom"===n.totalFunction&&n.totalFormula){const e=gw("totalsRowFormula",void 0,uw(n.totalFormula));c.push(gw("tableColumn",r,[e]))}else c.push(hw("tableColumn",r))}l.push(gw("tableColumns",{count:e.columns.length},c));const u=e.style??"TableStyleMedium2",f=!1!==e.showRowStripes,d=!0===e.showColumnStripes;l.push(hw("tableStyleInfo",{name:u,showFirstColumn:0,showLastColumn:0,showRowStripes:f?1:0,showColumnStripes:d?1:0}));return{tableXml:mw("table",s,l),tableId:t}}function nF(e,t){const n=e.columns.length;let r=0;if(t.rows)r=t.rows.length;else if(t.data){const e=t.columns?.some(e=>e.header);r=t.data.length+(e?1:0)}e.showTotalRow&&(r+=1),r<1&&(r=1);return`${fS(0)}1:${fS(n-1)}${r}`}const rF="http://schemas.openxmlformats.org/spreadsheetml/2006/main",iF="http://schemas.openxmlformats.org/officeDocument/2006/relationships",oF="http://schemas.openxmlformats.org/package/2006/relationships",aF="http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords",sF="http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition";function lF(e,t,n,r=1){const i=function(e,t){const n=t.fieldNames.map((e,n)=>({index:n,name:e,axis:"hidden",axisOrder:0,kind:uF(t.dataRows,n)})),r=(e,t)=>{if(e)for(let r=0;r<e.length;r++){const i=n.find(t=>t.name===e[r]);i&&(i.axis=t,i.axisOrder=r)}};r(e.rows,"row"),r(e.columns,"col"),r(e.pages,"page");const i=[];for(let r=0;r<e.values.length;r++){const o=e.values[r],a=t.fieldNames.indexOf(o.field);if(-1===a)continue;n[a].axis="data",n[a].axisOrder=r;const s=o.function??"sum",l={fieldIndex:a,function:s,displayName:o.displayName??gF(s,o.field)};void 0!==o.numberFormat&&(l.numberFormat=o.numberFormat),i.push(l)}for(const e of n){if("data"===e.axis||"hidden"===e.axis)continue;if("string"!==e.kind)continue;const n=new Set,r=[];for(const i of t.dataRows){const t=i[e.index],o=null==t?"":String(t);n.has(o)||(n.add(o),r.push(o))}e.sharedStrings=r,e.sharedIndex=new Map(r.map((e,t)=>[e,t]))}return{fields:n,dataFieldDefs:i}}(e,t),o=function(e,t){const n=gw("cacheSource",{type:"worksheet"},[hw("worksheetSource",{ref:e.ref,sheet:e.sheetName})]),r=[];for(const n of t.fields)r.push(fF(n,e.dataRows));return mw("pivotCacheDefinition",{xmlns:rF,"xmlns:r":iF,"r:id":"rId1",refreshOnLoad:1,refreshedBy:"hucre",refreshedDate:0,createdVersion:6,refreshedVersion:6,minRefreshableVersion:3,recordCount:e.dataRows.length},[n,gw("cacheFields",{count:t.fields.length},r)])}(t,i),a=function(e){return mw("Relationships",{xmlns:oF},[hw("Relationship",{Id:"rId1",Type:aF,Target:`pivotCacheRecords${e}.xml`})])}(r),s=function(e,t){const n=[];for(const r of e.dataRows){const e=[];for(const n of t.fields)e.push(dF(r[n.index],n));n.push(gw("r",void 0,e))}return mw("pivotCacheRecords",{xmlns:rF,"xmlns:r":iF,count:e.dataRows.length},n)}(t,i),l=function(e,t,n){const r=t.fields.filter(e=>"row"===e.axis).sort((e,t)=>e.axisOrder-t.axisOrder),i=t.fields.filter(e=>"col"===e.axis).sort((e,t)=>e.axisOrder-t.axisOrder),o=t.fields.filter(e=>"page"===e.axis).sort((e,t)=>e.axisOrder-t.axisOrder),a=e.targetCell??"A1",s=e.styleName??"PivotStyleLight16",l=e.dataCaption??"Values",c=function(e,t,n,r){const{col:i,row:o}=function(e){const t=/^([A-Z]+)(\d+)$/i.exec(e.trim());if(!t)throw new Error(`Invalid pivot targetCell "${e}" — expected an A1-style reference`);const n=t[1].toUpperCase();let r=0;for(let e=0;e<n.length;e++)r=26*r+(n.charCodeAt(e)-64);return{col:r-1,row:parseInt(t[2],10)-1}}(e),a=0,s=Math.max(1,n)+(r.dataFieldDefs.length>1?1:0),l=Math.max(1,t),c=Math.max(2,t+Math.max(1,r.dataFieldDefs.length)),u=s+2,f=pF(o,i),d=pF(o+u-1,i+c-1);return{ref:`${f}:${d}`,firstHeaderRow:a,firstDataRow:s,firstDataCol:l}}(a,r.length,i.length,t),u=[];u.push(hw("location",c));const f=[];for(const e of t.fields)f.push(hF(e));u.push(gw("pivotFields",{count:t.fields.length},f)),r.length>0&&(u.push(gw("rowFields",{count:r.length},r.map(e=>hw("field",{x:e.index})))),u.push(gw("rowItems",{count:1},[gw("i",void 0,[hw("x")])])));if(i.length>0)u.push(gw("colFields",{count:i.length},i.map(e=>hw("field",{x:e.index})))),u.push(gw("colItems",{count:1},[gw("i",void 0,[hw("x")])]));else if(t.dataFieldDefs.length>1){u.push(gw("colFields",{count:1},[hw("field",{x:-2})]));const e=[];for(let n=0;n<t.dataFieldDefs.length;n++)e.push(gw("i",0===n?void 0:{i:n},[hw("x",{v:n})]));u.push(gw("colItems",{count:t.dataFieldDefs.length},e))}o.length>0&&u.push(gw("pageFields",{count:o.length},o.map(e=>hw("pageField",{fld:e.index,hier:-1}))));if(t.dataFieldDefs.length>0){const e=[];for(const n of t.dataFieldDefs){const t={name:n.displayName,fld:n.fieldIndex,baseField:0,baseItem:0};"sum"!==n.function&&(t.subtotal=n.function),void 0!==n.numberFormat&&(t.numFmtId=0),e.push(hw("dataField",t))}u.push(gw("dataFields",{count:t.dataFieldDefs.length},e))}return u.push(hw("pivotTableStyleInfo",{name:s,showRowHeaders:1,showColHeaders:1,showRowStripes:0,showColStripes:0,showLastColumn:1})),mw("pivotTableDefinition",{xmlns:rF,"xmlns:r":iF,name:e.name,cacheId:n,applyNumberFormats:0,applyBorderFormats:0,applyFontFormats:0,applyPatternFormats:0,applyAlignmentFormats:0,applyWidthHeightFormats:1,dataCaption:l,updatedVersion:6,minRefreshableVersion:3,useAutoFormatting:1,itemPrintTitles:1,createdVersion:6,indent:0,outline:1,outlineData:1,multipleFieldFilters:0},u)}(e,i,n),c=function(e){return mw("Relationships",{xmlns:oF},[hw("Relationship",{Id:"rId1",Type:sF,Target:`../pivotCache/pivotCacheDefinition${e}.xml`})])}(r);return{cacheDefinitionXml:o,cacheDefinitionRels:a,cacheRecordsXml:s,pivotTableXml:l,pivotTableRels:c}}function cF(e,t,n){if(n.length<2)throw new Error(`Pivot "${e.name}" source sheet "${t}" needs at least a header row plus one data row (got ${n.length}).`);const r=n[0],i=[];for(let e=0;e<r.length;e++){const t=r[e];i.push(null==t?`Column${e+1}`:String(t))}const o=[];for(let e=1;e<n.length;e++){const t=n[e],r=[];for(let e=0;e<i.length;e++)r.push(e<t.length?t[e]:null);o.push(r)}const a=new Set(i),s=[...e.rows??[],...e.columns??[],...e.pages??[]];for(const t of e.values)s.push(t.field);for(const t of s)if(!a.has(t))throw new Error(`Pivot "${e.name}" references field "${t}" which is not in the source header (have: ${i.join(", ")}).`);const l=e.sourceRange??function(e,t){if(e<=0||t<=0)throw new Error("Pivot source range must contain at least one column and row");const n=pF(0,0),r=pF(t-1,e-1);return`${n}:${r}`}(i.length,n.length);return{sheetName:t,fieldNames:i,dataRows:o,ref:l}}function uF(e,t){for(const n of e){const e=n[t];if(null!=e&&""!==e&&("number"!=typeof e||!Number.isFinite(e)))return"string"}return"number"}function fF(e,t){if("string"===e.kind){const t=[];if(e.sharedStrings)for(const n of e.sharedStrings)t.push(hw("s",{v:n}));return gw("cacheField",{name:e.name,numFmtId:0},[gw("sharedItems",{count:t.length},t)])}let n=1/0,r=-1/0,i=!1;for(const o of t){const t=o[e.index];null!=t&&""!==t?"number"==typeof t&&(t<n&&(n=t),t>r&&(r=t)):i=!0}const o={containsSemiMixedTypes:0,containsString:0,containsNumber:1,containsInteger:Number.isInteger(n)&&Number.isInteger(r)?1:0};return i&&(o.containsBlank=1),Number.isFinite(n)&&(o.minValue=n),Number.isFinite(r)&&(o.maxValue=r),gw("cacheField",{name:e.name,numFmtId:0},[hw("sharedItems",o)])}function dF(e,t){if(null==e||""===e)return hw("m");if("string"===t.kind){const n=t.sharedIndex?.get(String(e));return void 0!==n?hw("x",{v:n}):hw("s",{v:String(e)})}return"number"==typeof e&&Number.isFinite(e)?hw("n",{v:e}):"boolean"==typeof e?hw("b",{v:e?1:0}):hw("s",{v:String(e)})}function hF(e){if("data"===e.axis)return hw("pivotField",{dataField:1,showAll:0});if("hidden"===e.axis)return hw("pivotField",{showAll:0});const t="row"===e.axis?"axisRow":"col"===e.axis?"axisCol":"axisPage",n=[];if(e.sharedStrings)for(let t=0;t<e.sharedStrings.length;t++)n.push(hw("item",{x:t}));return n.push(hw("item",{t:"default"})),gw("pivotField",{axis:t,showAll:0},[gw("items",{count:n.length},n)])}function pF(e,t){let n=t,r="";for(;n>=0;)r=String.fromCharCode(65+n%26)+r,n=Math.floor(n/26)-1;return`${r}${e+1}`}function gF(e,t){return`${"sum"===e?"Sum":"count"===e?"Count":"average"===e?"Average":"max"===e?"Max":"min"===e?"Min":"product"===e?"Product":"countNums"===e?"Count Nums":"stdDev"===e?"StdDev":"stdDevp"===e?"StdDevp":"var"===e?"Var":"Varp"} of ${t}`}function mF(e){return e.toISOString().replace(/\.\d{3}Z$/,"Z")}const yF=new TextEncoder;async function vF(e){const t=cS(e.sheets),{defaultFont:n,dateSystem:r,namedRanges:i,activeSheet:o,workbookProtection:a}=e;!function(e){const t=new Map;for(let n=0;n<e.length;n++){const r=e[n].name;aS(r,n);const i=r.toLowerCase(),o=t.get(i);if(void 0!==o)throw new Ab(`Duplicate sheet name "${r}" (sheets ${o+1} and ${n+1}); Excel compares sheet names case-insensitively`);t.set(i,n)}}(t);const s=function(e){const t=e.properties;if(t?.description)return t;for(const n of e.sheets){const e=n.a11y?.summary;if(e&&e.trim().length>0)return{...t,description:e}}return t}(e),l=Hk(n,{reuseStyleIdentity:!0}),c=function(){const e=[],t=new Map;return{add:function(n){const r=t.get(n);if(void 0!==r)return r;const i=e.length;return e.push(n),t.set(n,i),i},getAll:function(){return e},count:function(){return e.length}}}();let u=1;const f=[];for(const e of t)e.tables&&e.tables.length>0?(f.push(u),u+=e.tables.length):f.push(void 0);let d=1;const h=[];for(const e of t)e.pivotTables&&e.pivotTables.length>0?(h.push(d),d+=e.pivotTables.length):h.push(void 0);const p=[];for(let n=0;n<t.length;n++){const i=bS(t[n],l,c,r,f[n],"inline"===e.stringMode,h[n]);p.push(i)}const g=c.count()>0,m=[],y=[],v=new Set;let A=1,b=1;const w=[],I=[];for(let e=0;e<t.length;e++){const n=t[e],r=n.images&&n.images.length>0,i=n.textBoxes&&n.textBoxes.length>0,o=n.charts&&n.charts.length>0;if(r||i||o){const t=Yk(n.images??[],A,n.textBoxes,n.charts,b);m.push(t),y.push(e+1);for(const e of t.images){const t=e.path.split(".").pop();t&&v.add(t)}n.images&&(A+=n.images.length);const r=[];if(n.charts){for(let e=0;e<n.charts.length;e++){const t=Wk(n.charts[e],n.name),i=b+e;r.push({globalIndex:i,xml:t.chartXml,rels:t.chartRels}),I.push(i)}b+=n.charts.length}w.push(r)}else m.push(null),w.push([])}const{paths:x,nextIndex:C}=function(e,t,n){const r=[];let i=t;for(const t of e){if(!t.backgroundImage){r.push(null);continue}const e=qk(t.backgroundImage);r.push(`xl/media/image${i}.${e}`),n.add(e),i++}return{paths:r,nextIndex:i}}(t,A,v);A=C;const E=[],B=[];for(let e=0;e<t.length;e++){const n=t[e];if(n.cells){const t=eF(n.cells,e);t?(E.push(t),B.push(e+1)):E.push(null)}else E.push(null)}const S=[];for(const e of p)for(const t of e.tables)S.push(t.globalTableIndex);const k=[];for(let e=0;e<t.length;e++){const n=t[e];if(!n.pivotTables||0===n.pivotTables.length)continue;const r=h[e];if(void 0!==r)for(let e=0;e<n.pivotTables.length;e++){const i=n.pivotTables[e],o=i.sourceSheet??n.name,a=t.find(e=>e.name===o);if(!a)throw new Error(`Pivot "${i.name}" sourceSheet "${o}" not found in workbook`);const s=AF(a),l=r+e,c=lF(i,cF(i,o,s),l-1,l);k.push({parts:c,globalIndex:l})}}const F=k.map(e=>e.globalIndex),D=k.map(e=>({rId:`rIdPivot${e.globalIndex}`,target:`pivotCache/pivotCacheDefinition${e.globalIndex}.xml`})),N=k.map((e,t)=>({cacheId:e.globalIndex-1,rId:D[t].rId})),M=new Ek,Q=function(e){if(!e?.custom)return null;const t=Object.entries(e.custom);if(0===t.length)return null;const n=[];let r=2;for(const[e,i]of t){let t;if("string"==typeof i)t=gw("vt:lpwstr",void 0,uw(i));else if("number"==typeof i)t=Number.isInteger(i)?gw("vt:i4",void 0,String(i)):gw("vt:r8",void 0,String(i));else if("boolean"==typeof i)t=gw("vt:bool",void 0,i?"true":"false");else{if(!(i instanceof Date))continue;t=gw("vt:filetime",void 0,mF(i))}n.push(gw("property",{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:r++,name:e},t))}return 0===n.length?null:mw("Properties",{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},n)}(s),T=null!==Q,L=void 0!==e.vbaProject&&e.vbaProject.length>0,R=l.hasCheckboxFeature(),U=p.some(e=>e.hasDynamicArray),H={sheetCount:t.length,hasSharedStrings:g,drawingIndices:y.length>0?y:void 0,chartIndices:I.length>0?I:void 0,imageExtensions:v.size>0?v:void 0,commentIndices:B.length>0?B:void 0,tableIndices:S.length>0?S:void 0,pivotTableIndices:F.length>0?F:void 0,pivotCacheDefinitionIndices:F.length>0?F:void 0,pivotCacheRecordIndices:F.length>0?F:void 0,hasCoreProps:!0,hasAppProps:!0,hasCustomProps:T,hasMacros:L,hasFeaturePropertyBag:R,hasMetadata:U};M.add("[Content_Types].xml",yF.encode(function(e,t){let n;n="number"==typeof e?{sheetCount:e,hasSharedStrings:t??!1}:e;const r=[];if(r.push(hw("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"})),r.push(hw("Default",{Extension:"xml",ContentType:"application/xml"})),n.hasMacros&&r.push(hw("Default",{Extension:"bin",ContentType:"application/vnd.ms-office.vbaProject"})),n.imageExtensions)for(const e of n.imageExtensions){const t=Bk[e];t&&r.push(hw("Default",{Extension:e,ContentType:t}))}r.push(hw("Override",{PartName:"/xl/workbook.xml",ContentType:n.hasMacros?"application/vnd.ms-excel.sheet.macroEnabled.main+xml":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}));for(let e=1;e<=n.sheetCount;e++)r.push(hw("Override",{PartName:`/xl/worksheets/sheet${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"}));if(r.push(hw("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"})),r.push(hw("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"})),n.hasSharedStrings&&r.push(hw("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"})),n.drawingIndices)for(const e of n.drawingIndices)r.push(hw("Override",{PartName:`/xl/drawings/drawing${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"}));if(n.chartIndices)for(const e of n.chartIndices)r.push(hw("Override",{PartName:`/xl/charts/chart${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawingml.chart+xml"}));if(n.commentIndices&&n.commentIndices.length>0&&r.push(hw("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"})),n.commentIndices)for(const e of n.commentIndices)r.push(hw("Override",{PartName:`/xl/comments${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"}));if(n.tableIndices)for(const e of n.tableIndices)r.push(hw("Override",{PartName:`/xl/tables/table${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"}));if(n.threadedCommentSheetIndices)for(const e of n.threadedCommentSheetIndices)r.push(hw("Override",{PartName:`/xl/threadedComments/threadedComment${e}.xml`,ContentType:"application/vnd.ms-excel.threadedcomments+xml"}));if(n.hasPersons&&r.push(hw("Override",{PartName:"/xl/persons/person.xml",ContentType:"application/vnd.ms-excel.person+xml"})),n.externalLinkIndices)for(const e of n.externalLinkIndices)r.push(hw("Override",{PartName:`/xl/externalLinks/externalLink${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml"}));if(n.hasCellImages&&r.push(hw("Override",{PartName:"/xl/cellimages.xml",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})),n.pivotTableIndices)for(const e of n.pivotTableIndices)r.push(hw("Override",{PartName:`/xl/pivotTables/pivotTable${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml"}));if(n.pivotCacheDefinitionIndices)for(const e of n.pivotCacheDefinitionIndices)r.push(hw("Override",{PartName:`/xl/pivotCache/pivotCacheDefinition${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"}));if(n.pivotCacheRecordIndices)for(const e of n.pivotCacheRecordIndices)r.push(hw("Override",{PartName:`/xl/pivotCache/pivotCacheRecords${e}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml"}));if(n.slicerIndices)for(const e of n.slicerIndices)r.push(hw("Override",{PartName:`/xl/slicers/slicer${e}.xml`,ContentType:"application/vnd.ms-excel.slicer+xml"}));if(n.slicerCacheIndices)for(const e of n.slicerCacheIndices)r.push(hw("Override",{PartName:`/xl/slicerCaches/slicerCache${e}.xml`,ContentType:"application/vnd.ms-excel.slicerCache+xml"}));if(n.timelineIndices)for(const e of n.timelineIndices)r.push(hw("Override",{PartName:`/xl/timelines/timeline${e}.xml`,ContentType:"application/vnd.ms-excel.timeline+xml"}));if(n.timelineCacheIndices)for(const e of n.timelineCacheIndices)r.push(hw("Override",{PartName:`/xl/timelineCaches/timelineCache${e}.xml`,ContentType:"application/vnd.ms-excel.timelineCache+xml"}));if(n.chartStyleIndices)for(const e of n.chartStyleIndices)r.push(hw("Override",{PartName:`/xl/charts/style${e}.xml`,ContentType:"application/vnd.ms-office.chartstyle+xml"}));if(n.chartColorsIndices)for(const e of n.chartColorsIndices)r.push(hw("Override",{PartName:`/xl/charts/colors${e}.xml`,ContentType:"application/vnd.ms-office.chartcolorstyle+xml"}));return n.hasMetadata&&r.push(hw("Override",{PartName:`/${nS}`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml"})),n.hasFeaturePropertyBag&&r.push(hw("Override",{PartName:`/${gB}`,ContentType:"application/vnd.ms-excel.featurepropertybag+xml"})),n.hasCoreProps&&r.push(hw("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"})),n.hasAppProps&&r.push(hw("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"})),n.hasCustomProps&&r.push(hw("Override",{PartName:"/docProps/custom.xml",ContentType:"application/vnd.openxmlformats-officedocument.custom-properties+xml"})),mw("Types",{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},r)}(H))),M.add("_rels/.rels",yF.encode(function(e){const t=[];t.push(hw("Relationship",{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"}));let n=2;return e?.hasCoreProps&&t.push(hw("Relationship",{Id:"rId"+n++,Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"})),e?.hasAppProps&&t.push(hw("Relationship",{Id:"rId"+n++,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Target:"docProps/app.xml"})),e?.hasCustomProps&&t.push(hw("Relationship",{Id:"rId"+n++,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",Target:"docProps/custom.xml"})),mw("Relationships",{xmlns:Sk},t)}({hasCoreProps:!0,hasAppProps:!0,hasCustomProps:T}))),M.add("docProps/core.xml",yF.encode(function(e){const t=[];e?.title&&t.push(gw("dc:title",void 0,uw(e.title))),e?.subject&&t.push(gw("dc:subject",void 0,uw(e.subject))),e?.creator&&t.push(gw("dc:creator",void 0,uw(e.creator))),e?.keywords&&t.push(gw("cp:keywords",void 0,uw(e.keywords))),e?.description&&t.push(gw("dc:description",void 0,uw(e.description))),e?.lastModifiedBy&&t.push(gw("cp:lastModifiedBy",void 0,uw(e.lastModifiedBy))),e?.category&&t.push(gw("cp:category",void 0,uw(e.category))),e?.created&&t.push(gw("dcterms:created",{"xsi:type":"dcterms:W3CDTF"},mF(e.created)));const n=e?.modified??new Date;return t.push(gw("dcterms:modified",{"xsi:type":"dcterms:W3CDTF"},mF(n))),mw("cp:coreProperties",{"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},t)}(s))),M.add("docProps/app.xml",yF.encode(function(e){const t=[];return t.push(gw("Application",void 0,"hucre")),t.push(gw("DocSecurity",void 0,"0")),e?.company&&t.push(gw("Company",void 0,uw(e.company))),e?.manager&&t.push(gw("Manager",void 0,uw(e.manager))),mw("Properties",{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"},t)}(s))),Q&&M.add("docProps/custom.xml",yF.encode(Q));const q=function(e,t){const n=t?[...t]:[];for(const t of e){const e=t.pageSetup;if(!e)continue;e.printArea&&n.push({name:"_xlnm.Print_Area",range:`${t.name}!${e.printArea}`,scope:t.name});const r=[];e.printTitlesRow&&r.push(`${t.name}!${e.printTitlesRow}`),e.printTitlesColumn&&r.push(`${t.name}!${e.printTitlesColumn}`),r.length>0&&n.push({name:"_xlnm.Print_Titles",range:r.join(","),scope:t.name})}return n}(t,i);M.add("xl/workbook.xml",yF.encode(function(e,t,n,r,i,o,a,s,l){const c=[];for(let t=0;t<e.length;t++){const n=e[t],r={name:n.name,sheetId:t+1,"r:id":`rId${t+1}`};n.hidden?r.state="hidden":n.veryHidden&&(r.state="veryHidden"),c.push(hw("sheet",r))}const u=[];if("1904"===n&&u.push(hw("workbookPr",{date1904:1})),i){const e={};i.lockStructure&&(e.lockStructure=1),i.lockWindows&&(e.lockWindows=1),i.password&&(e.workbookPassword=iS(i.password)),u.push(hw("workbookProtection",e))}const f=r??0;if(u.push(gw("bookViews",void 0,[hw("workbookView",{xWindow:0,yWindow:0,windowWidth:16384,windowHeight:8192,activeTab:f})])),u.push(gw("sheets",void 0,c)),o&&o.length>0){const e=o.map(e=>hw("externalReference",{"r:id":e.rId}));u.push(gw("externalReferences",void 0,e))}if(t&&t.length>0){const n=new Map;for(let t=0;t<e.length;t++)n.set(e[t].name,t);const r=[];for(const e of t){const t={name:e.name};if(void 0!==e.scope){const r=n.get(e.scope);void 0!==r&&(t.localSheetId=r)}e.comment&&(t.comment=e.comment),r.push(gw("definedName",t,uw(e.range)))}u.push(gw("definedNames",void 0,r))}if(u.push(hw("calcPr",{calcId:0,fullCalcOnLoad:1})),a&&a.length>0){const e=a.map(e=>hw("pivotCache",{cacheId:e.cacheId,"r:id":e.rId}));u.push(gw("pivotCaches",void 0,e))}const d=[];if(s&&s.length>0){const e=gw("x14:slicerCaches",void 0,s.map(e=>hw("x14:slicerCache",{"r:id":e.rId})));d.push(gw("ext",{uri:"{BBE1A952-AA13-448E-AADC-164F8A28A991}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},[e]))}if(l&&l.length>0){const e=gw("x15:timelineCachePivotCaches",void 0,l.map(e=>hw("x15:timelineCachePivotCache",{"r:id":e.rId})));d.push(gw("ext",{uri:"{7E03D99C-DC04-49D9-9315-930204A7B6E9}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},[e]))}return d.length>0&&u.push(gw("extLst",void 0,d)),mw("workbook",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},u)}(t,q.length>0?q:void 0,r,o,a,void 0,N.length>0?N:void 0))),M.add("xl/_rels/workbook.xml.rels",yF.encode(function(e,t,n,r,i,o,a,s,l,c,u){const f=[];for(let t=1;t<=e;t++)f.push(hw("Relationship",{Id:`rId${t}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:`worksheets/sheet${t}.xml`}));let d=e+1;if(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"})),d++,t&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"})),d++),f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"})),d++,u&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",Target:"metadata.xml"})),d++),n&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.microsoft.com/office/2006/relationships/vbaProject",Target:"vbaProject.bin"})),d++),r&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.microsoft.com/office/2022/11/relationships/FeaturePropertyBag",Target:"featurePropertyBag/featurePropertyBag.xml"})),d++),i&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://schemas.microsoft.com/office/2017/10/relationships/person",Target:"persons/person.xml"})),d++),o){for(const e of o)f.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",Target:e.target}));d+=o.length}if(c&&(f.push(hw("Relationship",{Id:`rId${d}`,Type:"http://www.wps.cn/officeDocument/2017/relationships/cellimage",Target:"cellimages.xml"})),d++),a)for(const e of a)f.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition",Target:e.target}));if(s)for(const e of s)f.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.microsoft.com/office/2007/relationships/slicerCache",Target:e.target}));if(l)for(const e of l)f.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.microsoft.com/office/2011/relationships/timelineCache",Target:e.target}));return mw("Relationships",{xmlns:Sk},f)}(t.length,g,L,R,void 0,void 0,D.length>0?D:void 0,void 0,void 0,void 0,U))),M.add("xl/styles.xml",yF.encode(l.toXml())),M.add("xl/theme/theme1.xml",yF.encode('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light"/><a:ea typeface=""/><a:cs typeface=""/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="12700"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="19050"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements></a:theme>')),g&&M.add("xl/sharedStrings.xml",yF.encode(function(e){const t=e.getAll(),n=t.length;if(0===n)return mw("sst",{xmlns:uS,count:0,uniqueCount:0},"");const r=[];for(const e of t)r.push(gw("si",void 0,[pw(e)]));return mw("sst",{xmlns:uS,count:n,uniqueCount:n},r)}(c))),U&&M.add(nS,yF.encode(function(){const e=hw("metadataType",{name:eS,minSupportedVersion:12e4,copy:1,pasteAll:1,pasteValues:1,merge:1,splitFirst:1,rowColShift:1,clearFormats:1,clearComments:1,assign:1,coerce:1,cellMeta:1}),t=gw("bk",void 0,[gw("extLst",void 0,[gw("ext",{uri:tS},[hw("xda:dynamicArrayProperties",{fDynamic:1,fCollapsed:0})])])]),n=gw("bk",void 0,[hw("rc",{t:1,v:0})]);return mw("metadata",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:xda":"http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray"},[gw("metadataTypes",{count:1},[e]),gw("futureMetadata",{name:eS,count:1},[t]),gw("cellMetadata",{count:1},[n])])}())),R&&M.add(gB,yF.encode(function(){const e=[hw("bag",{type:"Checkbox"}),gw("bag",{type:"XFControls"},[gw("bagId",{k:"CellControl"},"0")]),gw("bag",{type:"XFComplement"},[gw("bagId",{k:"XFControls"},"1")]),gw("bag",{type:"XFComplements",extRef:"XFComplementsMapperExtRef"},[gw("a",{k:"MappedFeaturePropertyBags"},[gw("bagId",void 0,"2")])])];return mw("FeaturePropertyBags",{xmlns:hB},e)}())),L&&M.add("xl/vbaProject.bin",e.vbaProject);for(let e=0;e<p.length;e++){const n=p[e],r=m[e],i=E[e];M.add(`xl/worksheets/sheet${e+1}.xml`,yF.encode(n.xml));const o=n.hyperlinkRelationships.length>0,a=null!==r&&null!==n.drawingRId,s=null!==i&&null!==n.legacyDrawingRId,l=n.tables.length>0,c=null!==n.pictureRId&&null!==x[e],u=n.pivotTables.length>0;if(o||a||s||l||c||u){const t=[];for(const e of n.hyperlinkRelationships)t.push(hw("Relationship",{Id:e.id,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Target:e.target,TargetMode:"External"}));a&&n.drawingRId&&t.push(hw("Relationship",{Id:n.drawingRId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/drawing${e+1}.xml`})),s&&n.legacyDrawingRId&&n.commentsRId&&(t.push(hw("Relationship",{Id:n.legacyDrawingRId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Target:`../drawings/vmlDrawing${e+1}.vml`})),t.push(hw("Relationship",{Id:n.commentsRId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",Target:`../comments${e+1}.xml`})));for(const e of n.tables)t.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",Target:`../tables/table${e.globalTableIndex}.xml`}));if(c&&n.pictureRId&&x[e]){const r=`../${x[e].slice(3)}`;t.push(hw("Relationship",{Id:n.pictureRId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:r}))}for(const e of n.pivotTables)t.push(hw("Relationship",{Id:e.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable",Target:`../pivotTables/pivotTable${e.globalPivotIndex}.xml`}));const r=mw("Relationships",{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},t);M.add(`xl/worksheets/_rels/sheet${e+1}.xml.rels`,yF.encode(r))}if(r){M.add(`xl/drawings/drawing${e+1}.xml`,yF.encode(r.drawingXml)),M.add(`xl/drawings/_rels/drawing${e+1}.xml.rels`,yF.encode(r.drawingRels));for(const e of r.images)M.add(e.path,e.data,{compress:!1})}const f=w[e];if(f&&f.length>0)for(const e of f)M.add(`xl/charts/chart${e.globalIndex}.xml`,yF.encode(e.xml)),M.add(`xl/charts/_rels/chart${e.globalIndex}.xml.rels`,yF.encode(e.rels));c&&x[e]&&t[e].backgroundImage&&M.add(x[e],t[e].backgroundImage,{compress:!1}),i&&(M.add(`xl/comments${e+1}.xml`,yF.encode(i.commentsXml)),M.add(`xl/drawings/vmlDrawing${e+1}.vml`,yF.encode(i.vmlXml)));const d=t[e];if(d.tables&&d.tables.length>0)for(let e=0;e<d.tables.length;e++){const t=d.tables[e],r=n.tables[e].globalTableIndex;let i=t.range;i||(i=nF(t,d));const o=tF({...t,range:i},r);M.add(`xl/tables/table${r}.xml`,yF.encode(o.tableXml))}}for(const e of k){const t=e.globalIndex;M.add(`xl/pivotCache/pivotCacheDefinition${t}.xml`,yF.encode(e.parts.cacheDefinitionXml)),M.add(`xl/pivotCache/_rels/pivotCacheDefinition${t}.xml.rels`,yF.encode(e.parts.cacheDefinitionRels)),M.add(`xl/pivotCache/pivotCacheRecords${t}.xml`,yF.encode(e.parts.cacheRecordsXml)),M.add(`xl/pivotTables/pivotTable${t}.xml`,yF.encode(e.parts.pivotTableXml)),M.add(`xl/pivotTables/_rels/pivotTable${t}.xml.rels`,yF.encode(e.parts.pivotTableRels))}const O=await M.build(),P=e.encryption;return P?.password?aE(O,P.password,{spinCount:P.spinCount}):O}function AF(e){if(e.rows&&e.rows.length>0)return e.rows.map(e=>e.map(lS));if(e.data&&e.data.length>0&&e.columns&&e.columns.length>0){const t=[],n=e.columns.map(e=>e.header??e.key??"");t.push(n);for(const n of e.data){const r=e.columns.map(e=>{if(!e.key)return null;const t=n[e.key];return void 0===t?null:WB(t)});t.push(r)}return t}return[]}async function bF(e){if(!Be(e))return{error:"wb is not an effective object"};if(!Ce(Ae(e,"sheets")))return{error:"wb.sheets is not an array"};let t=null;try{t=await vF(e)}catch(e){return{error:e}}return t}async function wF(e,t="data",n){if(!ke(e)){let t="no filename";return console.log(t,e),{error:t}}if(ke(t)||(t="data"),!Ce(n)){let e="data is not an array";return console.log(e,n),{error:e}}Ce(n)&&Be(Ae(n,0,null))&&(n=lr(n));let r=pb(n,t);if(Me(r,"error"))return console.log(r.error),r;let i=await bF(r);if(Me(i,"error"))return console.log(i.error),i;if(_a())db(e,new Blob([i]));else{let t="fs";(await import(t)).default.writeFileSync(e,i)}}function IF(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Blob;if(!as(e))return r("invalid u8a");let i=null;try{i=new Blob([e])}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function xF(e,t,n=""){if(!Mn(t))return{};let r={};return vn(t,function(t){r[t]=Ae(e,t,n)}),r}function CF(e,t){if(!Ee(e))return{};if(!Mn(t))return{};let n={};return vn(t,function(t){Me(e,t)&&(n[t]=Ae(e,t))}),n}function EF(e,t=0,n={}){po(t)||(t=0),t=ji(t);let r=Ae(n,"rounding","");return"ROUND_HALF_UP"!==r&&"ROUND_HALF_EVEN"!==r&&(r="ROUND_HALF_UP"),Ne(e)?new Jl(e).toDecimalPlaces(t,Jl[r]).toNumber():""}function BF(e,t={}){if(!Ne(e))throw new Error("v is not a number");let n=Ae(t,"returnDigit");if(we(n)||(n=!1),xr(e))return n?0:Na(e);let r=null,i=null;for(let t=1;t<=16;t++){let n=e*Math.pow(10,t);if(Math.abs(n-Math.round(n))<1e-9){r=t,i=Xl(e,t);break}}return null===i&&(r=16,i=Na(e)),n?r:i}let SF=e=>{let t=1;e<0&&(t=-1);let n=null;if((e=Math.abs(e))<.1)for(let r=1;r<16;r++){let i=Math.pow(10,r);if((e*=i)<1){n={r:1/i,v:t*e};break}}else{if(e<1)return{r:1,v:t*e};if(e>=1)for(let r=1;r<16;r++){let i=Math.pow(10,r);if((e/=i)<1){n={r:i,v:t*e};break}}}if(null===n)throw new Error(`can not normalize v[${e}]`);return n};function kF(e,t,n={}){if(!ke(e))return"";if(!po(t))return e;if(t=ji(t),e.length<=t)return e;let r=Ae(n,"funWithMsg"),i="";if(Ui(r)){let n=r(e,t);ke(n)&&(i=n)}return ta(e,t)+`...${i}`}function FF(e){let t=Ga();return i(Number(e),"SIGKILL",n=>{n?t.reject(n):t.resolve(`pid[${e}] killed`)}),t}function DF(e,t={}){let n=Ae(t,"fs"),r=!1;try{n.statSync(e),r=!0}catch{r=!1}return r}function NF(e,t={}){let n=Ae(t,"fs");return!!DF(e,{fs:n})&&(!n.lstatSync(e).isDirectory()&&!n.lstatSync(e).isSymbolicLink())}function MF(e){return NF(e,{fs:a})}function QF(e,t={}){let n=null,r=Ae(t,"fs"),i="";try{i=r.readFileSync(e,"utf8")}catch(e){n=e}return null!==n?{error:n}:{success:i}}function TF(e){return QF(e,{fs:a})}let LF={buildSpawnArgs:function(e,t=[]){if(Ce(t)||(t=[]),"win32"!==process.platform)return{file:e,args:t,opt:{}};let n=function(e){if("win32"!==process.platform)return e;if(/\.(cmd|exe|bat|ps1)$/i.test(e))return e;if(o.isAbsolute(e))return e;try{let t=r.execFileSync("where",[e],{encoding:"utf8",timeout:5e3,windowsHide:!0,shell:!1,stdio:["ignore","pipe","ignore"]}).trim().split(/\r?\n/),n=t.find(e=>/\.cmd$/i.test(e));return n||(t.find(e=>/\.exe$/i.test(e))||t[0]||e)}catch{return e}}(e);if(/\.exe$/i.test(n))return{file:n,args:t,opt:{}};if(/\.(cmd|bat)$/i.test(n)){let e=function(e){let t=Ae(TF(e),"success","");if(!ke(t))return null;let n=t.match(/%dp0%\\(node_modules\\[^"]+)"/i);if(!n)return null;let r=o.dirname(e),i=o.join(r,n[1]);return MF(i)?i:null}(n);if(e)return/\.exe$/i.test(e)?{file:e,args:t,opt:{}}:{file:process.execPath,args:[e,...t],opt:{}};let r=t.map(e=>`"${e.replace(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`.replace(/[()%!^"<>&|]/g,"^$&")),a=`${i=n,i.replace(/[()%!^"<>&|;, ]/g,"^$&")} ${r.join(" ")}`;return{file:process.env.comspec||process.env.COMSPEC||"cmd.exe",args:["/d","/s","/c",`"${a}"`],opt:{windowsVerbatimArguments:!0}}}var i;return{file:n,args:t,opt:{}}},buildSpawnEnv:function(e=void 0){let t={...process.env,PYTHONIOENCODING:"utf-8"};if(void 0!==e){if("win32"===process.platform){let n=Object.keys(e).map(e=>e.toLowerCase());for(let e of Object.keys(t))n.includes(e.toLowerCase())&&delete t[e]}t={...t,...e}}return t}},{buildSpawnArgs:RF,buildSpawnEnv:UF}=LF,HF={funWithMsg:e=>`(truncated, total ${e.length} chars)`};function qF(e,t=[],n={}){let{timeoutMs:i=12e4,cwd:o=process.cwd(),input:a,validate:s,maxBuffer:l=10485760,onStdout:c,onStderr:u,env:f}=n,d=function(e){if(Ui(e))return e;if(!ke(e))return null;let t=e.split(",").map(e=>e.trim()).filter(Boolean);return 0===t.length?null:e=>{for(let n of t)if("nonempty"===n){if(!ke(e)||""===e.trim())return!1}else if("json"===n)try{JSON.parse(e)}catch{return!1}else if("min:"===ta(n,4)){let t=ra(n,4);if(!Ne(t))return!1;let r=ji(t);if(!ke(e)||e.length<r)return!1}return!0}}(s),h=Date.now(),p=Ga(),g=UF(f),m=RF(e,t),y=r.spawn(m.file,m.args,{cwd:o,stdio:["pipe","pipe","pipe"],windowsHide:!0,env:g,...m.opt}),v="",A="",b=new TextDecoder("utf-8"),w=new TextDecoder("utf-8"),I=!1,x=!1;y.stdout.on("data",e=>{let t=b.decode(e,{stream:!0});t&&(Ui(c)&&c(t),v.length<l&&(v+=t))}),y.stderr.on("data",e=>{let t=w.decode(e,{stream:!0});t&&(Ui(u)&&u(t),A.length<l&&(A+=t))}),y.stdin.on("error",()=>{}),void 0!==a&&y.stdin.write(a,"utf8"),y.stdin.end();let C=setTimeout(()=>{I||(x=!0,FF(y.pid).catch(()=>{}),setTimeout(()=>{I||(I=!0,p.resolve({ok:!1,stdout:kF(v,500,HF),stderr:kF(A,500,HF),code:null,error:`TIMEOUT after ${i/1e3}s(子進程未能結束)`,durationMs:Date.now()-h,pid:y.pid}))},3e3).unref())},i);return y.on("error",e=>{I||(I=!0,clearTimeout(C),p.resolve({ok:!1,stdout:"",stderr:"",code:null,error:`${e.code||"UNKNOWN"}: ${e.message}`,durationMs:Date.now()-h,pid:y.pid}))}),y.on("close",(e,t)=>{if(I)return;I=!0,clearTimeout(C);let n=b.decode();n&&v.length<l&&(v+=n);let r=w.decode();r&&A.length<l&&(A+=r);let o=Date.now()-h;x?p.resolve({ok:!1,stdout:kF(v,500,HF),stderr:kF(A,500,HF),code:e,error:`TIMEOUT after ${i/1e3}s`,durationMs:o,pid:y.pid}):0===e?!d||d(v)?p.resolve({ok:!0,stdout:v,stderr:A,code:0,error:"",durationMs:o,pid:y.pid}):p.resolve({ok:!1,stdout:kF(v,500,HF),stderr:kF(A,500,HF),code:0,error:"OUTPUT_VALIDATION_FAILED",durationMs:o,pid:y.pid}):p.resolve({ok:!1,stdout:kF(v,500,HF),stderr:kF(A,1e3,HF),code:e,error:t?`Signal: ${t}`:`Exit code ${e}`,durationMs:o,pid:y.pid})}),p}let{buildSpawnArgs:OF,buildSpawnEnv:PF}=LF;function $F(e,t=[],n={}){Ce(t)||(t=[]),Ee(n)||(n={});let i=Ae(n,"cwd");ke(i)||(i=process.cwd());let o=Ae(n,"env");Ee(o)||(o=void 0);let a=Ae(n,"timeoutMs");Vi(a)||(a=null);let s=Ae(n,"exitGraceMs");po(s)||(s=2e3);let l=Ae(n,"killWaitMs");po(l)||(l=3e3);let c=Ae(n,"stderrKeep");po(c)||(c=4e3);let u=Ae(n,"onLine"),f=Ae(n,"onStdout"),d=Ae(n,"onStderr"),h=Ae(n,"onExit"),p=Date.now(),g=!1,m=null,y=!1,v=!1,A=!1,b="",w="",I=null,x=null,C=null,E=Ga(),B=null,S={pid:null,exited:!1,write:null,writeLine:null,stop:null},k=e=>{g||(g=!0,clearTimeout(I),clearTimeout(x),clearTimeout(C),m={code:null,signal:null,exited:!0,timeout:y,killed:v,error:"",stderr:b,durationMs:Date.now()-p,pid:S.pid,...e},S.exited=!0,Ui(h)&&h(m),E.resolve(m))},F=()=>B||(B=Ga(),E.then(e=>{B.resolve(e)}),B);if(!ke(e))return S.write=async()=>!1,S.writeLine=async()=>!1,S.stop=F,setTimeout(()=>{k({error:"command 須為非空字串"})},1),S;let D,N=OF(e,t);try{D=r.spawn(N.file,N.args,{cwd:i,stdio:["pipe","pipe","pipe"],windowsHide:!0,env:PF(o),...N.opt})}catch(e){return S.write=async()=>!1,S.writeLine=async()=>!1,S.stop=F,setTimeout(()=>{k({error:`${e.code||"UNKNOWN"}: ${e.message}`})},1),S}S.pid=D.pid||null;let M=new TextDecoder("utf-8"),Q=new TextDecoder("utf-8"),T=(e,t)=>{w+=e;let n=w.indexOf("\n");for(;n>=0;){let e=w.slice(0,n);w=w.slice(n+1),e.endsWith("\r")&&(e=e.slice(0,-1)),Ui(u)&&u(e),n=w.indexOf("\n")}if(t&&""!==w){let e=w;w="",e.endsWith("\r")&&(e=e.slice(0,-1)),Ui(u)&&u(e)}},L=e=>{b=0!==c?(b+e).slice(-c):""};D.stdout.on("data",e=>{let t=M.decode(e,{stream:!0});t&&(Ui(f)&&f(t),T(t,!1))}),D.stderr.on("data",e=>{let t=Q.decode(e,{stream:!0});t&&(Ui(d)&&d(t),L(t))}),D.stdin.on("error",()=>{});let R=e=>{v=!0,FF(D.pid).catch(()=>{}),C=setTimeout(()=>{g||k({code:null,exited:!1,error:e})},l)};return null!==a&&(I=setTimeout(()=>{g||(y=!0,R(`TIMEOUT after ${a/1e3}s(子進程未能結束)`))},a)),D.on("error",e=>{k({error:`${e.code||"UNKNOWN"}: ${e.message}`})}),D.on("close",(e,t)=>{if(g)return;let n=M.decode();n&&(Ui(f)&&f(n),T(n,!1)),T("",!0);let r=Q.decode();r&&(Ui(d)&&d(r),L(r));let i="";y?i=`TIMEOUT after ${a/1e3}s`:v||(t?i=`Signal: ${t}`:0!==e&&(i=`Exit code ${e}`)),k({code:e,signal:t,error:i})}),S.write=e=>{let t=Ga();if(g||A||D.stdin.destroyed||!D.stdin.writable)return t.resolve(!1),t;try{D.stdin.write(String(e),"utf8",e=>{t.resolve(!e)})}catch{t.resolve(!1)}return t},S.writeLine=e=>S.write(String(e)+"\n"),S.stop=()=>{if(B)return B;if(B=Ga(),g)return B.resolve(m),B;A=!0;try{D.stdin.end()}catch{}return x=setTimeout(()=>{g||R("STOP_TIMEOUT(子進程未能結束)")},s),E.then(e=>{B.resolve(e)}),B},S}function zF(e,t){return e>t}function jF(e){return e&&e.length?Om(e,un,zF):void 0}function VF(e){return null==e?[]:function(e,t){return fe(t,function(t){return e[t]})}(e,ht(e))}function YF(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function WF(e,t,n,r){return gt(e,function(e,i,o){t(r,e,n(e),o)}),r}var GF,JF,_F=Object.prototype.hasOwnProperty,XF=(GF=function(e,t,n){_F.call(e,n)?e[n].push(t):ei(e,n,[t])},function(e,t){var n=y(e)?YF:WF,r=JF?JF():{};return n(e,GF,hn(t),r)}),KF=XF;function ZF(e,t){if(!Ce(e)||!Ce(t))return[];if(e.length!==t.length)return[];return bn(e,function(n,r){return zy(e[r],t[r])})}function eD(e,t={}){let n=Ae(t,"fs");if(!DF(e,{fs:n}))return!1;let r=n.lstatSync(e);return!r.isFile()&&!r.isSymbolicLink()}function tD(e,t={}){let n=Ae(t,"fs");if(eD(e,{fs:n}))return{success:"input folder is already exists: "+e};if(DF(e,{fs:n}))return{error:"input path already exists: "+e};try{n.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function nD(e,t={}){let n=Ae(t,"path"),r=Ae(t,"fs");if(!DF(e,{fs:r})){let t=tD(e,{fs:r});return t.error?t.error:{success:"done: "+e}}if(!eD(e,{fs:r}))return{error:"input path is not a folder"};try{let t=r.readdirSync(e);for(let i of t){let t=n.join(e,i);r.statSync(t).isDirectory()?r.rmSync(t,{recursive:!0,force:!0}):r.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}function rD(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"useSync","");we(o)||(o=!0);let a="";return a=o?function(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!NF(e,{fs:i}))return{error:`fpSrc[${e}] is not a file`};try{tD(r.dirname(t),{fs:i}),i.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:r,fs:i}):async function(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!NF(e,{fs:i}))return{error:`fpSrc[${e}] is not a file`};let o=null;return await(async(e,t)=>{tD(r.dirname(t),{fs:i}),await new Promise((n,r)=>{let o=i.createReadStream(e),a=i.createWriteStream(t);o.on("error",r),a.on("error",r),a.on("finish",n),o.pipe(a)})})(e,t).then(()=>{o={success:"done: "+t}}).catch(e=>{o={error:e}}),o}(e,t,{path:r,fs:i}),a}function iD(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!eD(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};try{i.readdirSync(e).forEach(function(n){let o=r.resolve(e,n),a=r.resolve(t,n),s=i.lstatSync(o);if(s.isDirectory())tD(a,{fs:i}),iD(o,a,{path:r,fs:i});else if(s.isSymbolicLink()){let e=i.readlinkSync(o);i.symlinkSync(e,a)}else tD(r.dirname(a),{fs:i}),i.copyFileSync(o,a)})}catch(e){return{error:e}}return{success:"done: "+t}}function oD(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"useSync","");we(o)||(o=!0);let a="";return a=o?iD(e,t,{path:r,fs:i}):async function(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!eD(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};let o=async(e,t)=>{let n=i.readdirSync(e);for(let a of n){let n=r.join(e,a),s=r.join(t,a),l=i.lstatSync(n);if(l.isDirectory())tD(s,{fs:i}),await o(n,s);else if(l.isSymbolicLink()){let e=i.readlinkSync(n);i.symlinkSync(e,s)}else tD(r.dirname(s),{fs:i}),await new Promise((e,t)=>{let r=i.createReadStream(n),o=i.createWriteStream(s);r.on("error",t),o.on("error",t),o.on("finish",e),r.pipe(o)})}},a=null;return await o(e,t).then(()=>{a={success:"done: "+t}}).catch(e=>{a={error:e}}),a}(e,t,{path:r,fs:i}),a}function aD(e){if(!ke(e))return{path:"",isRoot:!1};for(;e.indexOf("\\\\")>=0;)e=e.replace("\\\\","\\");for(;e.indexOf("//")>=0;)e=e.replace("//","/");if(":"===na(e,1))return{path:`${e}\\`,isRoot:!0};if("\\"===na(e,1)){let t=Qa(e,1);return":"===na(t,1)?{path:e,isRoot:!0}:{path:t,isRoot:!1}}if("/"===na(e,1)){let t=Qa(e,1);return 0===t.length?{path:e,isRoot:!0}:{path:t,isRoot:!1}}return{path:e,isRoot:!1}}function sD(e){if(!ke(e))return"";let t=aD(e);if(t.isRoot)return t.path;let n=t.path;try{n=n.split("\\").pop().split("/").pop()}catch(e){}return n}function lD(e){if(!ke(e))return"";let t=aD(e);if(t.isRoot)return t.path;let n=sD(e=t.path);if(!ke(n))return e;let r=aD(e=Qa(e,n.length));return r.isRoot,r.path}function cD(e,t="",n={}){let r=Ae(n,"fs"),i=Ae(n,"encoding","");if(ke(i)||(i="utf8"),DF(e,{fs:r}))return{error:"input path already exists: "+e};if(NF(e,{fs:r}))return{error:"input file is already exists: "+e};let o=lD(e);eD(o,{fs:r})||tD(o,{fs:r});try{r.writeFileSync(e,t,{encoding:i})}catch(e){return{error:e}}return{success:"done: "+e}}function uD(e){return tD(e,{fs:a})}function fD(e,t={}){let n=Ae(t,"fs");if(!DF(e,{fs:n}))return{success:"file does not exist: "+e};if(!NF(e,{fs:n}))return{error:"input path is not a file: "+e};try{n.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}async function dD(e,t={}){let n=Ae(t,"numRetry");Vi(n)||(n=5),n=ji(n);let r=Ae(t,"fs",null);if(!DF(e,{fs:r}))return"file does not exist: "+e;if(!NF(e,{fs:r}))return Promise.reject("input path is not a file: "+e);for(let t=0;t<n;t++)try{r.unlinkSync(e);break}catch(e){if("EBUSY"!==e.code)return Promise.reject(e);await fs(300)}return"done: "+e}function hD(e,t={}){let n=Ae(t,"fs");if(!DF(e,{fs:n}))return{success:"folder does not exist: "+e};if(!eD(e,{fs:n}))return{error:"input path is not a folder: "+e};try{n.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function pD(e){return hD(e,{fs:a})}async function gD(e,t={}){let n=Ae(t,"numRetry");Vi(n)||(n=5),n=ji(n);let r=Ae(t,"fs",null);if(!DF(e,{fs:r}))return"folder does not exist: "+e;if(!eD(e,{fs:r}))return Promise.reject("input path is not a folder: "+e);for(let t=0;t<n;t++)try{r.rmSync(e,{recursive:!0,force:!0});break}catch(e){if("EBUSY"!==e.code)return Promise.reject(e);await fs(300)}return"done: "+e}async function mD(e,t,n={}){let r="",i=Ae(n,"fs"),o=Ae(n,"Readable");if(!ke(e))throw new Error("urlIn in not an effective string");let a=lD(t),s=Ae(n,"fnOut","");ke(s)||(s=sD(t)),eD(a,{fs:i})||tD(a,{fs:i});let l=Ga();try{let n=await fetch(e);if(!n.ok)return l.reject(n.statusText),l;let a=i.createWriteStream(t);o.fromWeb(n.body).pipe(a),a.on("finish",()=>{l.resolve(t)}),a.on("error",e=>{r=e.message,l.reject(r)})}catch(e){r=e.message,l.reject(r)}return l}function yD(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYY-MM-DDTHH:mm:ssZ")}function vD(e){if(!ke(e))return"";let t=sD(e),n=Lo(t,".");if(or(n)<=1)return t;let r="";try{n=Ro(n),r=yo(n,".")}catch(e){}return r}function AD(e){return eD(e,{fs:a})}function bD(e,t={}){let n=Ae(t,"polling");we(n)||(n=!1);let r=Ae(t,"timeInterval");Vi(r)||(r=100),r=ji(r);let i=Ae(t,"timeBinaryInterval");Vi(i)||(i=300),i=ji(i);let a=qi({type:"safe"}),s=e,l=null,c=setInterval(()=>{null===l?AD(s)&&(l=u.watch(s,{usePolling:n,interval:r,binaryInterval:i,awaitWriteFinish:!0}),l.on("all",(e,t,n)=>{t=o.resolve(t),a.emit("change",{type:e,fp:t,stats:n}),"unlinkDir"===e&&o.resolve(s)===t&&setTimeout(()=>{f()},1)}).on("error",e=>{a.emit("error",{fun:"watcher",msg:e})})):AD(s)||(a.emit("change",{type:"unlinkDir",fp:o.resolve(s),stats:void 0}),setTimeout(()=>{f()},1))},r),f=()=>{if(null!==l){try{l.unwatch(s)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}};return a.clear=()=>{f(),clearInterval(c)},a}function wD(e,t={}){let n=Ae(t,"fs"),r=Ae(t,"crypto"),i=Ae(t,"type","");ke(i)||(i="sha512");let o=Ga();if(!NF(e,{fs:n}))return o.reject(`fp[${e}] is not a file`),o;try{let t=r.createHash(i),a=n.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 ID=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 xD(){return function(e){const{exports:{mem:t,xxh32:n,xxh64:r,init32:i,update32:o,digest32:a,init64:s,update64:l,digest64:c}}=e;let u=new Uint8Array(t.buffer);function f(e,n){if(t.buffer.byteLength<e+n){const r=Math.ceil((e+n-t.buffer.byteLength)/65536);t.grow(r),u=new Uint8Array(t.buffer)}}function d(e,t,n,r,i,o){f(e);const a=new Uint8Array(e);return u.set(a),n(0,t),a.set(u.subarray(0,e)),{update(t){let n;return u.set(a),"string"==typeof t?(f(3*t.length,e),n=m.encodeInto(t,u.subarray(e)).written):(f(t.byteLength,e),u.set(t,e),n=t.byteLength),r(0,e,n),a.set(u.subarray(0,e)),this},digest:()=>(u.set(a),o(i(0)))}}function h(e){return e>>>0}const p=2n**64n-1n;function g(e){return e&p}const m=new TextEncoder;function y(e,t=0){return f(3*e.length,0),h(n(0,m.encodeInto(e,u).written,t))}function v(e,t=0n){return f(3*e.length,0),g(r(0,m.encodeInto(e,u).written,t))}return{h32:y,h32ToString:(e,t=0)=>y(e,t).toString(16).padStart(8,"0"),h32Raw:(e,t=0)=>(f(e.byteLength,0),u.set(e),h(n(0,e.byteLength,t))),create32:(e=0)=>d(48,e,i,o,a,h),h64:v,h64ToString:(e,t=0n)=>v(e,t).toString(16).padStart(16,"0"),h64Raw:(e,t=0n)=>(f(e.byteLength,0),u.set(e),g(r(0,e.byteLength,t))),create64:(e=0n)=>d(88,e,s,l,c,g)}}((await WebAssembly.instantiate(ID)).instance)}async function CD(e,t={}){let n=Ae(t,"fs"),r=Ae(t,"chunkSize");if(Ne(r)||(r=67108864),r=Ir(r),!NF(e,{fs:n}))return Promise.reject("fp is not a file");let i=Ga();try{let{create64:t}=await xD(),o=t(),a=n.createReadStream(e,{highWaterMark:r});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 ED(e,t={}){let n=Ae(t,"fs"),r=Ae(t,"crypto"),i=Ae(t,"type","");ke(i)||(i="sha512");let o=Ae(t,"chunkSize");Ne(o)||(o=67108864),o=Ir(o);let a=Ga();return NF(e,{fs:n})?"xxhash64"===i?CD(e,{fs:n,chunkSize:o}):wD(e,{fs:n,crypto:r,type:i}):(a.reject(`fp[${e}] is not a file`),a)}function BD(e,t=1,n={}){let r=1,i=Ae(n,"path"),o=Ae(n,"fs");if(!eD(e,{fs:o}))throw new Error(`fd[${e}] is not a folder`);return null!==t&&Vi(t)&&(t=ji(t))<1&&(t=1),function e(n){let a=[];return eD(n,{fs:o})?(vn(o.readdirSync(n),function(s){let l=i.resolve(n,s),c=null;try{c=o.statSync(l)}catch(e){}c&&c.isDirectory()?(a.push({isFolder:!0,level:r,path:l,name:i.basename(l)}),r+=1,(r<=t||null===t)&&(a=a.concat(e(l))),r-=1):a.push({isFolder:!1,level:r,path:l,name:i.basename(l)})}),a):a}(e)}function SD(e,t=1,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!eD(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let o=[];return o=BD(e,t,{path:r,fs:i}),o=oa(o,{isFolder:!1}),o=bn(o,e=>(delete e.isFolder,e)),o}async function kD(e,t=1,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"crypto"),a=Ae(n,"type","");if(ke(a)||(a="md5"),!eD(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let s=SD(e,t,{path:r,fs:i});return s=await ec(s,async e=>{let t=Ae(e,"path","");return e.hashType=a,e.hash="",ke(t)&&(e.hash=await ED(t,{fs:i,crypto:o,type:a,useSync:!1})),e}),s}async function FD(e,t=1,n={}){return kD(e,t,{path:o,fs:a,crypto:f,...n})}async function DD(e,t={}){let n=Ae(t,"path"),r=Ae(t,"fs"),i=Ae(t,"crypto"),o=Ae(t,"type","");ke(o)||(o="md5");let a=[],s=BD(e,null,{path:n,fs:r});return await ec(s,async e=>{if(e.isFolder)return;let t=await wD(e.path,{fs:r,crypto:i,type:o});a.push(t)}),yo(a,"|")}function ND(e,t=1,n={}){let r=Ae(n,"path"),i=Ae(n,"fs");if(!eD(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let o=[];return o=BD(e,t,{path:r,fs:i}),o=oa(o,{isFolder:!0}),o=bn(o,e=>(delete e.isFolder,e)),o}async function MD(e,t,n={}){let r="",i=Ae(n,"fs");if(!Mn(e))throw new Error("fpsIn in not an effective array");let o=lD(t),a=Ae(n,"fnOut","");ke(a)||(a=sD(t)),eD(o,{fs:i})||tD(o,{fs:i});let s=Ga();s.catch(()=>{});let l=null,c=null,u=Ga();u.catch(()=>{});try{l=i.createWriteStream(t),l.on("error",e=>{c=e,r=e.message,u.reject(e),s.reject(r)}),l.on("finish",()=>{let e={filename:a,path:t};s.resolve(e)});for(let t=0;t<e.length;t++){if(null!==c)throw c;let n=e[t];if(!NF(n,{fs:i}))throw new Error(`fpIn[${n}] is not a file`);let r=async()=>{let e=i.createReadStream(n),t=null;for await(let n of e){if(null!==c)throw c;let e=!1,r=new Promise((t,r)=>{e=!l.write(n,e=>{e?r(e):t()})});r.catch(()=>{}),t=r,e&&await Promise.race([d.once(l,"drain"),u])}if(null!==t&&await t,null!==c)throw c;fD(n,{fs:i})};await r()}l.end()}catch(e){r=Ae(e,"message",String(e));try{l.destroy()}catch(e){}s.reject(r)}return s}function QD(e,t,n={}){let r=Ae(n,"fs");if(!NF(e,{fs:r}))return{error:`pahOld[${e}] is not a file`};if(DF(t,{fs:r}))return{error:`pahNew[${t}] already exists`};let i=lD(t);eD(i,{fs:r})||tD(i,{fs:r});try{r.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}function TD(e,t,n={}){let r=Ae(n,"fs");if(!eD(e,{fs:r}))return{error:`pahOld[${e}] is not a folder`};if(DF(t,{fs:r}))return{error:`pahNew[${t}] already exists`};let i=lD(t);eD(i,{fs:r})||tD(i,{fs:r});try{r.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}function LD(e,t,n,r={}){let i=Ae(r,"withInfor");we(i)||(i=!0);let o={del:[],add:[],same:[],diff:[]};if(!ke(n))return console.log("invalid key"),i&&(o.infor={}),o;Ce(e)||(e=[e]),Ce(t)||(t=[t]),e=oa(e,e=>Me(e,n)),t=oa(t,e=>Me(e,n));let a=new Map(t.map(e=>[e[n],e]));for(let t of e){let e=a.get(t[n]);if(e){JSON.stringify(t)===JSON.stringify(e)?o.same.push(e):o.diff.push(e),a.delete(t[n])}else o.del.push(t)}if(o.add=Array.from(a.values()),i){let e={};for(let t of o.del)e[t[n]]="del";for(let t of o.add)e[t[n]]="add";for(let t of o.diff)e[t[n]]="diff";for(let t of o.same)e[t[n]]="same";o.infor=e}return o}async function RD(e,t=1,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"crypto"),a=Ae(n,"type","");ke(a)||(a="md5");let s=Ae(n,"forFile",null);we(s)||(s=!0);let l=Ae(n,"forFolder",null);if(we(l)||(l=!1),!eD(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);let c=BD(e,t,{path:r,fs:i});return c=await ec(c,async e=>{let t="";return s&&!e.isFolder&&(t=await wD(e.path,{fs:i,crypto:o,type:a})),l&&e.isFolder&&(t=await DD(e.path,{path:r,fs:i,crypto:o,type:a})),e.hash=t,e}),c}async function UD(e,t,n={}){let r=Ae(n,"path"),i=Ae(n,"fs"),o=Ae(n,"crypto"),a=Ae(n,"type","");if(ke(a)||(a="md5"),!eD(e,{fs:i}))throw new Error(`fdSrc[${e}] is not a folder`);let s=!1;if(!eD(t,{fs:i}))return await oD(e,t,{path:r,fs:i,useSync:!1}),s=!0,s;let l=r.sep,c=r.sep.length,u=(e,t)=>(e=bn(e,e=>((e,t)=>{let n=e.isFolder?"folder":"file",r=e.path.replace(t,"");return ta(r,c)===l&&(r=ra(r,c)),r=r.replaceAll("\\","/"),{id:`${n}|${r}`,isFolder:e.isFolder,name:e.name,rpath:r,hash:e.hash}})(e,t)),e),f=await RD(e,null,{path:r,fs:i,crypto:o,type:a,forFile:!0,forFolder:!1});f=u(f,r.resolve(e));let d=await RD(t,null,{path:r,fs:i,crypto:o,type:a,forFile:!0,forFolder:!1});d=u(d,r.resolve(t));let h=LD(d,f,"id",{withInfor:!1});return s=or(h.del)>0||or(h.add)>0||or(h.diff)>0,await ec(h.del,async e=>{if(e.isFolder){hD(r.resolve(t,e.rpath),{fs:i})}}),await ec(h.del,async e=>{if(!e.isFolder){fD(r.resolve(t,e.rpath),{fs:i})}}),await ec([...h.add,...h.diff],async n=>{if(!n.isFolder){let o=r.resolve(e,n.rpath),a=r.resolve(t,n.rpath);await rD(o,a,{path:r,fs:i,useSync:!1})}}),s}function HD(e,t={}){let n=Ae(t,"polling");we(n)||(n=!1);let r=Ae(t,"timeInterval");Vi(r)||(r=100),r=ji(r);let i=Ae(t,"timeBinaryInterval");Vi(i)||(i=300),i=ji(i);let a=qi({type:"safe"}),s=e,l=null,c=setInterval(()=>{null===l&&MF(s)&&(l=u.watch(s,{usePolling:n,interval:r,binaryInterval:i,awaitWriteFinish:!0}),l.on("all",(e,t,n)=>{t=o.resolve(t),a.emit("change",{type:e,fp:t,stats:n})}).on("error",e=>{a.emit("error",{fun:"watcher",msg:e})}))},r);return a.clear=()=>{(()=>{if(null!==l){try{l.unwatch(s)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(c)},a}function qD(e,t,n={}){let r=null,i=Ae(n,"fs"),o=lD(e);eD(o,{fs:i})||tD(o,{fs:i});try{i.writeFileSync(e,t,"utf8")}catch(e){r=e}return null!==r?{error:r}:{success:e}}const OD=[];for(let e=0;e<256;++e)OD.push((e+256).toString(16).slice(1));const PD=new Uint8Array(16);function $D(){return crypto.getRandomValues(PD)}const zD={};function jD(e,t,n){let r;if(e)r=VD(e.random??e.rng?.()??$D(),e.msecs,e.seq,t,n);else{const e=Date.now(),i=$D();!function(e,t,n){e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=YD(n),e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++)}(zD,e,i),r=VD(i,zD.msecs,zD.seq,t,n)}return t??function(e,t=0){return(OD[e[t+0]]+OD[e[t+1]]+OD[e[t+2]]+OD[e[t+3]]+"-"+OD[e[t+4]]+OD[e[t+5]]+"-"+OD[e[t+6]]+OD[e[t+7]]+"-"+OD[e[t+8]]+OD[e[t+9]]+"-"+OD[e[t+10]]+OD[e[t+11]]+OD[e[t+12]]+OD[e[t+13]]+OD[e[t+14]]+OD[e[t+15]]).toLowerCase()}(r)}function VD(e,t,n,r,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(r){if(i<0||i+16>r.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else r=new Uint8Array(16),i=0;return t??=Date.now(),n??=YD(e),r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=255&t,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|3&e[10],r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}function YD(e){return(127&e[6])<<24|e[7]<<16|e[8]<<8|e[9]}function WD(e){return"[object Uint16Array]"===Object.prototype.toString.call(e)}function GD(e){if(!(Ie(e)||Ja(e)||as(e)||WD(e)))return null;try{if(Ne(e.byteLength))return e.byteLength}catch(e){}try{if(Ne(e.length))return e.length}catch(e){}try{if(Ne(e.size))return e.size}catch(e){}return null}function JD(e,t=!0){if(!Mn(e)){return{error:"no data"}}let n=null;try{n=function(e,t=!0){let n=t?"\ufeff":"";return vn(e,e=>{let t=[];vn(e,e=>{Se(e)?(e=ac(e,"\r\n",""),e=ac(e,"\r",""),e=`"${e=ac(e,"\n","")}"`):e=we(e)?e?"true":"false":Na(e),t.push(e)}),n+=yo(t,",")+"\r\n"}),n}(e,t)}catch(e){return{error:e}}return n}function _D(e){return we(e)?e?"true":"false":Na(e)}function XD(e,t){let n=[];return vn(e,e=>{let r=bn(e.rows,e=>bn(e,e=>null===e?"":t?_D(e):e));n.push({sheetname:e.name,data:r})}),n}async function KD(e,t){let n=Ae(t,"fmt","ltdt");if(!ua(["ltdt","csv","array"],n))return{error:"opt.fmt is not one of 'ltdt', 'csv', 'array'"};let r,i=Ae(t,"valueToString",!0);if(!we(i))return{error:"opt.valueToString is not a boolean"};try{r=await rk(e)}catch(e){return console.log("error: ",e),{error:"can not read data from u8a"}}let o=null;try{"ltdt"===n?o=function(e,t){let n=[];return vn(e,e=>{let r=e.rows,i=bn(Ae(r,0,[]),e=>null===e||""===e?null:_D(e)),o=[];for(let e=1;e<r.length;e++){let n=r[e];if(gn(n,e=>null===e))continue;let a={};for(let e=0;e<i.length;e++){if(null===i[e])continue;let r=Ae(n,e,null);null!==r&&(t&&(r=_D(r)),a[i[e]]=r)}o.push(a)}n.push({sheetname:e.name,data:o})}),n}(r.sheets,i):"array"===n?o=XD(r.sheets,i):"csv"===n&&(o=function(e,t){let n=XD(e,t);return vn(n,(e,t)=>{n[t].data=JD(e.data,!1)}),n}(r.sheets,i))}catch(e){return console.log("error: ",e),{error:"can not convert data"}}return o}function ZD(e){try{let t=e();return"string"==typeof t?t:""}catch(e){return""}}function eN(e,t){try{let n=new WeakSet,r=[],i=JSON.stringify(e,function(e,i){for(;r.length>0&&r[r.length-1]!==this;)r.pop();if(r.length>=t)return"[Deep]";if("bigint"==typeof i)return String(i);if(null!==i&&"object"==typeof i){if(n.has(i))return"[Circular]";n.add(i),r.push(i)}return i});return"string"==typeof i?i:""}catch(e){return""}}function tN(e){if(e.length>=2&&'"'===e[0]&&'"'===e[e.length-1]){let t=ZD(()=>JSON.parse(e));if(""!==t)return t}return e}function nN(e,t){if(void 0===e)return"";if(null===e)return"null";let n=function(e){let t=typeof e;return"string"===t?e:null==e?"":"number"===t||"boolean"===t||"bigint"===t||"symbol"===t?String(e):""}(e);if(""!==n)return n;let r=eN(e,t);if(""!==r&&"{}"!==r)return tN(r);let i=ZD(()=>String(e));return""!==i&&"[object Object]"!==i?i:r}function rN(e,t){let n=new WeakSet;null===e||"object"!=typeof e&&"function"!=typeof e||n.add(e);let r=e,i=[];for(let e=0;e<t.levelCauseMax;e++){let e=null;try{e=r.cause}catch(e){break}if(null==e)break;if("object"==typeof e||"function"==typeof e){if(n.has(e))break;n.add(e)}let o=oN(e,{...t,useCause:!1,useAggregate:!1});""!==o&&i.push(o),r=e}return i.join(" <- ")}function iN(e,t){let n=null;try{n=e.errors}catch(e){return""}if(!Array.isArray(n)||0===n.length)return"";let r=[];for(let i=0;i<n.length&&i<t.levelCauseMax;i++){if(n[i]===e)continue;let o=oN(n[i],{...t,useCause:!1,useAggregate:!1});""!==o&&r.push(o)}return r.join("; ")}function oN(e,t){if("string"==typeof e)return e;if(null==e)return"";if("number"==typeof e)return Number.isNaN(e)?"":String(e);if("boolean"==typeof e||"bigint"==typeof e||"symbol"==typeof e)return String(e);let n=null,r=!1;try{n=e.message,r=!0}catch(e){r=!1}if(r&&"string"==typeof n){if(""!==n){let r=n;if(t.useCause){let n=rN(e,t);""!==n&&(r=`${r} <- ${n}`)}if(t.useAggregate){let n=iN(e,t);""!==n&&(r=`${r} [${n}]`)}return r}let r=rN(e,t);return""!==r?r:""}if(r){let e=nN(n,t.levelJsonMax);if(""!==e)return e}let i=rN(e,t);if(""!==i)return i;if(t.useAggregate){let n=iN(e,t);if(""!==n)return n}let o=eN(e,t.levelJsonMax),a=tN(o);if(""!==a&&"{}"!==a)return a;let s=ZD(()=>String(e));if(""!==s&&"[object Object]"!==s)return s;let l=ZD(()=>Object.prototype.toString.call(e));return""!==l&&"[object Object]"!==l?l:""!==o?o:""}
25
25
  /*!
26
26
  * hash-wasm (https://www.npmjs.com/package/hash-wasm)
27
27
  * (c) Dani Biro
28
28
  * @license MIT
29
29
  */
30
- function nN(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;class rN{constructor(){this.mutex=Promise.resolve()}lock(){let e=()=>{};return this.mutex=this.mutex.then(()=>new Promise(e)),new Promise(t=>{e=t})}dispatch(e){return nN(this,void 0,void 0,function*(){const t=yield this.lock();try{return yield Promise.resolve(e())}finally{t()}})}}const iN="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,oN=null!==(ZD=iN.Buffer)&&void 0!==ZD?ZD:null,aN=iN.TextEncoder?new iN.TextEncoder:null;function sN(e,t){return(15&e)+(e>>6|e>>3&8)<<4|(15&t)+(t>>6|t>>3&8)}const lN="a".charCodeAt(0)-10,cN="0".charCodeAt(0);function uN(e,t,n){let r=0;for(let i=0;i<n;i++){let n=t[i]>>>4;e[r++]=n>9?n+lN:n+cN,n=15&t[i],e[r++]=n>9?n+lN:n+cN}return String.fromCharCode.apply(null,e)}const fN=null!==oN?e=>{if("string"==typeof e){const t=oN.from(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.length)}if(oN.isBuffer(e))return new Uint8Array(e.buffer,e.byteOffset,e.length);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")}:e=>{if("string"==typeof e)return aN.encode(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")},dN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hN=new Uint8Array(256);for(let e=0;e<64;e++)hN[dN.charCodeAt(e)]=e;function pN(e){const t=function(e){let t=Math.floor(.75*e.length);const n=e.length;return"="===e[n-1]&&(t-=1,"="===e[n-2]&&(t-=1)),t}(e),n=e.length,r=new Uint8Array(t);let i=0;for(let t=0;t<n;t+=4){const n=hN[e.charCodeAt(t)],o=hN[e.charCodeAt(t+1)],a=hN[e.charCodeAt(t+2)],s=hN[e.charCodeAt(t+3)];r[i]=n<<2|o>>4,i+=1,r[i]=(15&o)<<4|a>>2,i+=1,r[i]=(3&a)<<6|63&s,i+=1}return r}const gN=16384,mN=new rN,yN=new Map;function vN(e,t){return nN(this,void 0,void 0,function*(){let n=null,r=null,i=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const o=()=>new DataView(n.exports.memory.buffer).getUint32(n.exports.STATE_SIZE,!0),a=mN.dispatch(()=>nN(this,void 0,void 0,function*(){if(!yN.has(e.name)){const t=pN(e.data),n=WebAssembly.compile(t);yN.set(e.name,n)}const t=yield yN.get(e.name);n=yield WebAssembly.instantiate(t,{})})),s=(e=null)=>{i=!0,n.exports.Hash_Init(e)},l=e=>{if(!i)throw new Error("update() called before init()");(e=>{let t=0;for(;t<e.length;){const i=e.subarray(t,t+gN);t+=i.length,r.set(i),n.exports.Hash_Update(i.length)}})(fN(e))},c=new Uint8Array(2*t),u=(e,o=null)=>{if(!i)throw new Error("digest() called before init()");return i=!1,n.exports.Hash_Final(o),"binary"===e?r.slice(0,t):uN(c,r,t)},f=e=>"string"==typeof e?e.length<4096:e.byteLength<gN;let d=f;switch(e.name){case"argon2":case"scrypt":d=()=>!0;break;case"blake2b":case"blake2s":d=(e,t)=>t<=512&&f(e);break;case"blake3":d=(e,t)=>0===t&&f(e);break;case"xxhash64":case"xxhash3":case"xxhash128":case"crc64":d=()=>!1}return yield(()=>nN(this,void 0,void 0,function*(){n||(yield a);const e=n.exports.Hash_GetBuffer(),t=n.exports.memory.buffer;r=new Uint8Array(t,e,gN)}))(),{getMemory:()=>r,writeMemory:(e,t=0)=>{r.set(e,t)},getExports:()=>n.exports,setMemorySize:e=>{n.exports.Hash_SetMemorySize(e);const t=n.exports.Hash_GetBuffer(),i=n.exports.memory.buffer;r=new Uint8Array(i,t,e)},init:s,update:l,digest:u,save:()=>{if(!i)throw new Error("save() can only be called after init() and before digest()");const t=n.exports.Hash_GetState(),r=o(),a=n.exports.memory.buffer,s=new Uint8Array(a,t,r),l=new Uint8Array(4+r);return function(e,t){const n=t.length>>1;for(let r=0;r<n;r++){const n=r<<1;e[r]=sN(t.charCodeAt(n),t.charCodeAt(n+1))}}(l,e.hash),l.set(s,4),l},load:t=>{if(!(t instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const r=n.exports.Hash_GetState(),a=o(),s=4+a,l=n.exports.memory.buffer;if(t.length!==s)throw new Error(`Bad state length (expected ${s} bytes, got ${t.length})`);if(!function(e,t){if(e.length!==2*t.length)return!1;for(let n=0;n<t.length;n++){const r=n<<1;if(t[n]!==sN(e.charCodeAt(r),e.charCodeAt(r+1)))return!1}return!0}(e.hash,t.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const c=t.subarray(4);new Uint8Array(l,r,a).set(c),i=!0},calculate:(e,i=null,o=null)=>{if(!d(e,i))return s(i),l(e),u("hex",o);const a=fN(e);return r.set(a),n.exports.Hash_Calculate(a.length,i,o),uN(c,r,t)},hashLength:t}})}new rN,new rN,new rN,new rN,new rN,new rN,new rN;var AN={name:"md5",data:"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",hash:"e6508e4b"};function bN(){return vN(AN,16).then(e=>{e.init();const t={init:()=>(e.init(),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:64,digestSize:16};return t})}new rN;var wN={name:"sha1",data:"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",hash:"6b530c24"};function IN(){return vN(wN,20).then(e=>{e.init();const t={init:()=>(e.init(),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:64,digestSize:20};return t})}new rN,new rN,new rN;var xN={name:"sha256",data:"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c2pBx6KerX1qIhkgASADcyACcSABIANxcyABQR53IAFBE3dzIAFBCndzaiAaaiICaiIJIBMgEnNxIBJzaiAJQRp3IAlBFXdzIAlBB3dzakHRxqk2aiIaIAIgAXMgA3EgAiABcXMgAkEedyACQRN3cyACQQp3c2ogGGoiA2oiESAJIBNzcSATc2ogEUEadyARQRV3cyARQQd3c2pB59KkoQFqIhggAyACcyABcSADIAJxcyADQR53IANBE3dzIANBCndzaiAUaiIBaiISIBEgCXNxIAlzaiASQRp3IBJBFXdzIBJBB3dzakGFldy9AmoiFCABIANzIAJxIAEgA3FzIAFBHncgAUETd3MgAUEKd3NqIBdqIgJqIhMgI2ogJiASaiAiIBFqICUgCWogEyASIBFzcSARc2ogE0EadyATQRV3cyATQQd3c2pBuMLs8AJqIhcgAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAZaiIDaiIJIBMgEnNxIBJzaiAJQRp3IAlBFXdzIAlBB3dzakH827HpBGoiGSADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBpqIgFqIhEgCSATc3EgE3NqIBFBGncgEUEVd3MgEUEHd3NqQZOa4JkFaiIaIAEgA3MgAnEgASADcXMgAUEedyABQRN3cyABQQp3c2ogGGoiAmoiEiARIAlzcSAJc2ogEkEadyASQRV3cyASQQd3c2pB1OapqAZqIhggAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAUaiIDaiITaiAoIBJqICQgEWogJyAJaiATIBIgEXNxIBFzaiATQRp3IBNBFXdzIBNBB3dzakG7laizB2oiFCADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBdqIgFqIgkgEyASc3EgEnNqIAlBGncgCUEVd3MgCUEHd3NqQa6Si454aiIXIAEgA3MgAnEgASADcXMgAUEedyABQRN3cyABQQp3c2ogGWoiAmoiESAJIBNzcSATc2ogEUEadyARQRV3cyARQQd3c2pBhdnIk3lqIhkgAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAaaiIDaiISIBEgCXNxIAlzaiASQRp3IBJBFXdzIBJBB3dzakGh0f+VemoiGiADIAJz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",hash:"8c18dd94"};function CN(){return vN(xN,32).then(e=>{e.init(256);const t={init:()=>(e.init(256),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:64,digestSize:32};return t})}new rN,new rN;var EN={name:"sha512",data:"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",hash:"f2e40eb1"};function BN(){return vN(EN,48).then(e=>{e.init(384);const t={init:()=>(e.init(384),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:128,digestSize:48};return t})}function SN(){return vN(EN,64).then(e=>{e.init(512);const t={init:()=>(e.init(512),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:128,digestSize:64};return t})}function kN(e){return"[object File]"===Object.prototype.toString.call(e)}async function FN(e,t={}){if(!Ja(e)&&!kN(e))return console.log("inp",e),Promise.reject("inp is not a Blob or File");let n=Ae(t,"type","");ke(n)||(n="sha512");let r=Ae(t,"chunkSize");Ne(r)||(r=67108864),r=Ir(r);let i={MD5:bN,"SHA-1":IN,"SHA-256":CN,"SHA-384":BN,"SHA-512":SN,md5:bN,sha1:IN,sha256:CN,sha384:BN,sha512:SN};if(!Me(i,n))return Promise.reject(`type[${n}] must be one of [ 'md5', 'sha1', 'sha256', 'sha384', 'sha512' ]`);let o=Ae(i,n),a=await o(),s=0;for(;s<e.size;){let t=e.slice(s,s+r),n=await t.arrayBuffer();a.update(new Uint8Array(n)),s+=r}return a.digest()}async function DN(e,t={}){if(!Ja(e)&&!kN(e))return console.log("inp",e),Promise.reject("inp is not a Blob or File");let n=Ae(t,"chunkSize");Ne(n)||(n=67108864),n=Ir(n);let{create64:r}=await xD(),i=r(),o=0;for(;o<e.size;){let t=e.slice(o,o+n),r=await t.arrayBuffer();i.update(new Uint8Array(r)),o+=n}return i.digest().toString(16).padStart(16,"0")}new rN,new rN,new rN,new rN,new rN,new rN,new rN,new rN,new rN;var NN=4294967295,MN=Math.min;function QN(e,t){if((e=wr(e))<1||e>9007199254740991)return[];var n=NN,r=MN(e,NN);t=yn(t),e-=NN;for(var i=Re(r,t);++n<e;)t(n);return i}function TN(e){let t="";return"years"===e?t="YYYY":"months"===e?t="YYYY-MM":"days"===e?t="YYYY-MM-DD":"hours"===e?t="YYYY-MM-DDTHH":"minutes"===e?t="YYYY-MM-DDTHH:mm":"seconds"===e&&(t="YYYY-MM-DDTHH:mm:ss"),t}function LN(e,n="days"){if(!ke(e))return null;if(!ke(n))return null;let r=function(e,n){let r="";return"years"===n?r="-01-01T00:00:00":"months"===n?r="-01T00:00:00":"days"===n?r="T00:00:00":"hours"===n?r=":00:00":"minutes"===n&&(r=":00"),t(e+r,"YYYY-MM-DDTHH:mm:ss")}(e,n),i=TN(n);return e===r.format(i)?r:null}function RN(){let e=Kl(),t=()=>Number(e.process.hrtime.bigint())/1e6,n=()=>e.performance.now(),r=null;return r=_a()?n:t,r}function UN(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!Wy(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH:mm")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o}function HN(e=null){let t,n=function(){let e=Kl();return h.UAParser||e.UAParser}();t=Se(e)?new n(e):new n;let r=t.getResult();return{browsername:r.browser.name,browserversion:r.browser.version,engineinfor:r.engine.name+r.engine.version,platform:r.os.name+r.os.version,devicetype:Ae(r.device,"type",""),cpuarchitecture:Ae(r.cpu,"architecture","")}}let qN="in x-range",ON="out of x-range",PN="order list",$N="reverse order list";function zN(e,t){let n=null,r=null;return n=e[0].x,r=e[or(e)-1].x,t<n?{err:ON,msg:`x[${t}] less than lower limit[${n}]`,data:{ps:e,x:t,xmin:n,xmax:r}}:t>r?{err:ON,msg:`x[${t}] greater than upper limit[${r}]`,data:{ps:e,x:t,xmin:n,xmax:r}}:qN}function jN(e){return!!Ce(e)&&e.length>=1}function VN(e){if(!xr(e))return!1;return ji(e)<=0}function YN(e){if(!Ne(e))return!1;return Ir(e)<=0}function WN(e){if(!Ne(e))return!1;return Ir(e)>=0}function GN(e){if(!ke(e))return!1;return!(null===e.match(/^.*[A-Z]+.*$/))}function JN(e){if(!ke(e))return!1;return!(null===e.match(/^.*[a-zA-Z]+.*$/))}function _N(e){if(!ke(e))return!1;return!(null===e.match(/^.*[a-z]+.*$/))}function XN(e){if(!ke(e))return!1;return!(null===e.match(/^.*[0-9]+.*$/))}function KN(e){if(!ke(e))return!1;return!(null===e.match(/^.*\s+.*$/))}function ZN(e){if(!ke(e))return!1;
30
+ function aN(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;class sN{constructor(){this.mutex=Promise.resolve()}lock(){let e=()=>{};return this.mutex=this.mutex.then(()=>new Promise(e)),new Promise(t=>{e=t})}dispatch(e){return aN(this,void 0,void 0,function*(){const t=yield this.lock();try{return yield Promise.resolve(e())}finally{t()}})}}var lN;const cN="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,uN=null!==(lN=cN.Buffer)&&void 0!==lN?lN:null,fN=cN.TextEncoder?new cN.TextEncoder:null;function dN(e,t){return(15&e)+(e>>6|e>>3&8)<<4|(15&t)+(t>>6|t>>3&8)}const hN="a".charCodeAt(0)-10,pN="0".charCodeAt(0);function gN(e,t,n){let r=0;for(let i=0;i<n;i++){let n=t[i]>>>4;e[r++]=n>9?n+hN:n+pN,n=15&t[i],e[r++]=n>9?n+hN:n+pN}return String.fromCharCode.apply(null,e)}const mN=null!==uN?e=>{if("string"==typeof e){const t=uN.from(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.length)}if(uN.isBuffer(e))return new Uint8Array(e.buffer,e.byteOffset,e.length);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")}:e=>{if("string"==typeof e)return fN.encode(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")},yN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vN=new Uint8Array(256);for(let e=0;e<64;e++)vN[yN.charCodeAt(e)]=e;function AN(e){const t=function(e){let t=Math.floor(.75*e.length);const n=e.length;return"="===e[n-1]&&(t-=1,"="===e[n-2]&&(t-=1)),t}(e),n=e.length,r=new Uint8Array(t);let i=0;for(let t=0;t<n;t+=4){const n=vN[e.charCodeAt(t)],o=vN[e.charCodeAt(t+1)],a=vN[e.charCodeAt(t+2)],s=vN[e.charCodeAt(t+3)];r[i]=n<<2|o>>4,i+=1,r[i]=(15&o)<<4|a>>2,i+=1,r[i]=(3&a)<<6|63&s,i+=1}return r}const bN=16384,wN=new sN,IN=new Map;function xN(e,t){return aN(this,void 0,void 0,function*(){let n=null,r=null,i=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const o=()=>new DataView(n.exports.memory.buffer).getUint32(n.exports.STATE_SIZE,!0),a=wN.dispatch(()=>aN(this,void 0,void 0,function*(){if(!IN.has(e.name)){const t=AN(e.data),n=WebAssembly.compile(t);IN.set(e.name,n)}const t=yield IN.get(e.name);n=yield WebAssembly.instantiate(t,{})})),s=(e=null)=>{i=!0,n.exports.Hash_Init(e)},l=e=>{if(!i)throw new Error("update() called before init()");(e=>{let t=0;for(;t<e.length;){const i=e.subarray(t,t+bN);t+=i.length,r.set(i),n.exports.Hash_Update(i.length)}})(mN(e))},c=new Uint8Array(2*t),u=(e,o=null)=>{if(!i)throw new Error("digest() called before init()");return i=!1,n.exports.Hash_Final(o),"binary"===e?r.slice(0,t):gN(c,r,t)},f=e=>"string"==typeof e?e.length<4096:e.byteLength<bN;let d=f;switch(e.name){case"argon2":case"scrypt":d=()=>!0;break;case"blake2b":case"blake2s":d=(e,t)=>t<=512&&f(e);break;case"blake3":d=(e,t)=>0===t&&f(e);break;case"xxhash64":case"xxhash3":case"xxhash128":case"crc64":d=()=>!1}return yield(()=>aN(this,void 0,void 0,function*(){n||(yield a);const e=n.exports.Hash_GetBuffer(),t=n.exports.memory.buffer;r=new Uint8Array(t,e,bN)}))(),{getMemory:()=>r,writeMemory:(e,t=0)=>{r.set(e,t)},getExports:()=>n.exports,setMemorySize:e=>{n.exports.Hash_SetMemorySize(e);const t=n.exports.Hash_GetBuffer(),i=n.exports.memory.buffer;r=new Uint8Array(i,t,e)},init:s,update:l,digest:u,save:()=>{if(!i)throw new Error("save() can only be called after init() and before digest()");const t=n.exports.Hash_GetState(),r=o(),a=n.exports.memory.buffer,s=new Uint8Array(a,t,r),l=new Uint8Array(4+r);return function(e,t){const n=t.length>>1;for(let r=0;r<n;r++){const n=r<<1;e[r]=dN(t.charCodeAt(n),t.charCodeAt(n+1))}}(l,e.hash),l.set(s,4),l},load:t=>{if(!(t instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const r=n.exports.Hash_GetState(),a=o(),s=4+a,l=n.exports.memory.buffer;if(t.length!==s)throw new Error(`Bad state length (expected ${s} bytes, got ${t.length})`);if(!function(e,t){if(e.length!==2*t.length)return!1;for(let n=0;n<t.length;n++){const r=n<<1;if(t[n]!==dN(e.charCodeAt(r),e.charCodeAt(r+1)))return!1}return!0}(e.hash,t.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const c=t.subarray(4);new Uint8Array(l,r,a).set(c),i=!0},calculate:(e,i=null,o=null)=>{if(!d(e,i))return s(i),l(e),u("hex",o);const a=mN(e);return r.set(a),n.exports.Hash_Calculate(a.length,i,o),gN(c,r,t)},hashLength:t}})}new sN,new sN,new sN,new sN,new sN,new sN,new sN;var CN={name:"md5",data:"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",hash:"e6508e4b"};function EN(){return xN(CN,16).then(e=>{e.init();const t={init:()=>(e.init(),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:64,digestSize:16};return t})}new sN;var BN={name:"sha1",data:"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",hash:"6b530c24"};function SN(){return xN(BN,20).then(e=>{e.init();const t={init:()=>(e.init(),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:64,digestSize:20};return t})}new sN,new sN,new sN;var kN={name:"sha256",data:"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c2pBx6KerX1qIhkgASADcyACcSABIANxcyABQR53IAFBE3dzIAFBCndzaiAaaiICaiIJIBMgEnNxIBJzaiAJQRp3IAlBFXdzIAlBB3dzakHRxqk2aiIaIAIgAXMgA3EgAiABcXMgAkEedyACQRN3cyACQQp3c2ogGGoiA2oiESAJIBNzcSATc2ogEUEadyARQRV3cyARQQd3c2pB59KkoQFqIhggAyACcyABcSADIAJxcyADQR53IANBE3dzIANBCndzaiAUaiIBaiISIBEgCXNxIAlzaiASQRp3IBJBFXdzIBJBB3dzakGFldy9AmoiFCABIANzIAJxIAEgA3FzIAFBHncgAUETd3MgAUEKd3NqIBdqIgJqIhMgI2ogJiASaiAiIBFqICUgCWogEyASIBFzcSARc2ogE0EadyATQRV3cyATQQd3c2pBuMLs8AJqIhcgAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAZaiIDaiIJIBMgEnNxIBJzaiAJQRp3IAlBFXdzIAlBB3dzakH827HpBGoiGSADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBpqIgFqIhEgCSATc3EgE3NqIBFBGncgEUEVd3MgEUEHd3NqQZOa4JkFaiIaIAEgA3MgAnEgASADcXMgAUEedyABQRN3cyABQQp3c2ogGGoiAmoiEiARIAlzcSAJc2ogEkEadyASQRV3cyASQQd3c2pB1OapqAZqIhggAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAUaiIDaiITaiAoIBJqICQgEWogJyAJaiATIBIgEXNxIBFzaiATQRp3IBNBFXdzIBNBB3dzakG7laizB2oiFCADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBdqIgFqIgkgEyASc3EgEnNqIAlBGncgCUEVd3MgCUEHd3NqQa6Si454aiIXIAEgA3MgAnEgASADcXMgAUEedyABQRN3cyABQQp3c2ogGWoiAmoiESAJIBNzcSATc2ogEUEadyARQRV3cyARQQd3c2pBhdnIk3lqIhkgAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAaaiIDaiISIBEgCXNxIAlzaiASQRp3IBJBFXdzIBJBB3dzakGh0f+VemoiGiADIAJz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",hash:"8c18dd94"};function FN(){return xN(kN,32).then(e=>{e.init(256);const t={init:()=>(e.init(256),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:64,digestSize:32};return t})}new sN,new sN;var DN={name:"sha512",data:"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",hash:"f2e40eb1"};function NN(){return xN(DN,48).then(e=>{e.init(384);const t={init:()=>(e.init(384),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:128,digestSize:48};return t})}function MN(){return xN(DN,64).then(e=>{e.init(512);const t={init:()=>(e.init(512),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:128,digestSize:64};return t})}function QN(e){return"[object File]"===Object.prototype.toString.call(e)}async function TN(e,t={}){if(!Ja(e)&&!QN(e))return console.log("inp",e),Promise.reject("inp is not a Blob or File");let n=Ae(t,"type","");ke(n)||(n="sha512");let r=Ae(t,"chunkSize");Ne(r)||(r=67108864),r=Ir(r);let i={MD5:EN,"SHA-1":SN,"SHA-256":FN,"SHA-384":NN,"SHA-512":MN,md5:EN,sha1:SN,sha256:FN,sha384:NN,sha512:MN};if(!Me(i,n))return Promise.reject(`type[${n}] must be one of [ 'md5', 'sha1', 'sha256', 'sha384', 'sha512' ]`);let o=Ae(i,n),a=await o(),s=0;for(;s<e.size;){let t=e.slice(s,s+r),n=await t.arrayBuffer();a.update(new Uint8Array(n)),s+=r}return a.digest()}async function LN(e,t={}){if(!Ja(e)&&!QN(e))return console.log("inp",e),Promise.reject("inp is not a Blob or File");let n=Ae(t,"chunkSize");Ne(n)||(n=67108864),n=Ir(n);let{create64:r}=await xD(),i=r(),o=0;for(;o<e.size;){let t=e.slice(o,o+n),r=await t.arrayBuffer();i.update(new Uint8Array(r)),o+=n}return i.digest().toString(16).padStart(16,"0")}new sN,new sN,new sN,new sN,new sN,new sN,new sN,new sN,new sN;var RN=4294967295,UN=Math.min;function HN(e,t){if((e=wr(e))<1||e>9007199254740991)return[];var n=RN,r=UN(e,RN);t=yn(t),e-=RN;for(var i=Re(r,t);++n<e;)t(n);return i}function qN(e){let t="";return"years"===e?t="YYYY":"months"===e?t="YYYY-MM":"days"===e?t="YYYY-MM-DD":"hours"===e?t="YYYY-MM-DDTHH":"minutes"===e?t="YYYY-MM-DDTHH:mm":"seconds"===e&&(t="YYYY-MM-DDTHH:mm:ss"),t}function ON(e,n="days"){if(!ke(e))return null;if(!ke(n))return null;let r=function(e,n){let r="";return"years"===n?r="-01-01T00:00:00":"months"===n?r="-01T00:00:00":"days"===n?r="T00:00:00":"hours"===n?r=":00:00":"minutes"===n&&(r=":00"),t(e+r,"YYYY-MM-DDTHH:mm:ss")}(e,n),i=qN(n);return e===r.format(i)?r:null}function PN(){let e=Kl(),t=()=>Number(e.process.hrtime.bigint())/1e6,n=()=>e.performance.now(),r=null;return r=_a()?n:t,r}function $N(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!Wy(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH:mm")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o}function zN(e=null){let t,n=function(){let e=Kl();return h.UAParser||e.UAParser}();t=Se(e)?new n(e):new n;let r=t.getResult();return{browsername:r.browser.name,browserversion:r.browser.version,engineinfor:r.engine.name+r.engine.version,platform:r.os.name+r.os.version,devicetype:Ae(r.device,"type",""),cpuarchitecture:Ae(r.cpu,"architecture","")}}let jN="in x-range",VN="out of x-range",YN="order list",WN="reverse order list";function GN(e,t){let n=null,r=null;return n=e[0].x,r=e[or(e)-1].x,t<n?{err:VN,msg:`x[${t}] less than lower limit[${n}]`,data:{ps:e,x:t,xmin:n,xmax:r}}:t>r?{err:VN,msg:`x[${t}] greater than upper limit[${r}]`,data:{ps:e,x:t,xmin:n,xmax:r}}:jN}function JN(e){return!!Ce(e)&&e.length>=1}function _N(e){if(!F(e))return!1;var t=k(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!yu(e)}function XN(e){if(!xr(e))return!1;return ji(e)<=0}function KN(e){if(!Ne(e))return!1;return Ir(e)<=0}function ZN(e){if(!Ne(e))return!1;return Ir(e)>=0}function eM(e){if(!ke(e))return!1;return!(null===e.match(/^.*[A-Z]+.*$/))}function tM(e){if(!ke(e))return!1;return!(null===e.match(/^.*[a-zA-Z]+.*$/))}function nM(e){if(!ke(e))return!1;return!(null===e.match(/^.*[a-z]+.*$/))}function rM(e){if(!ke(e))return!1;return!(null===e.match(/^.*[0-9]+.*$/))}function iM(e){if(!ke(e))return!1;return!(null===e.match(/^.*\s+.*$/))}function oM(e){if(!ke(e))return!1;
31
31
  //!"#$%&'()*+,-./ :;<=>?@ [\]^_` {|}~
32
- return/[!-/:-@[-`{-~]/.test(e)}function eM(e){if(!ke(e))return!1;let n="YYYY-MM-DDTHH:mm:ss.SSS";return e===t(e,n).format(n)}function tM(e){let t;return t=na(e,1),"Z"===t?`${e=Qa(e,1)}+00:00`:e}let nM={checkTZ:function(e){let t;return t=na(e,1),"Z"===t||(t=na(e,6),!!/[+|-]\d\d:\d\d/.test(t))},delTZ:function(e){let t;return t=na(e,1),Qa(e,"Z"===t?1:6)},normTZ:tM,sepTZ:function(e){let t=tM(e);return{t:Qa(t,6),tz:na(t,6)}}};function rM(e){if(!ke(e))return!1;if(!nM.checkTZ(e))return!1;let n=nM.delTZ(e),r="YYYY-MM-DDTHH:mm:ss.SSS";return n===t(n,r).format(r)}function iM(e){if(!ke(e))return!1;if(!nM.checkTZ(e))return!1;let n=nM.delTZ(e),r="YYYY-MM-DDTHH:mm:ss";return n===t(n,r).format(r)}let oM=["1234","12345","123456","1234567","12345678","123456789","1234567890","12345678910","111111","000000","666666","888888","7777777","11111111","123123","123321","654321","987654321","qwerty","qwerty123","qwerty1","qwertyuiop","qazwsx","1q2w3e4r","1q2w3e4r5t","1q2w3e","1qaz2wsx","zxcvbnm","password","password1","passw0rd","admin","admin123","welcome","letmein","login","master","monkey","dragon","shadow","sunshine","superman","batman","football","baseball","soccer","hockey","michael","jordan","jennifer","hunter","ranger","harley","thomas","charlie","andrew","daniel","ashley","bailey","mustang","access","secret","ninja","jesus","hello","freedom","trustno1","1qaz@WSX","P@ssw0rd","Pass@123","Aa123456","Aa@123456","Admin@123","abc@123","abc123","abcdef","abcd1234","abc","iloveyou","fuckyou","f*ckyou","whatever","nothing","google","computer","internet","samsung","apple","killer","princess","lovely","tigger","starwars","pokemon","minecraft","123qwe","zaq1zaq1","photoshop","adobe123","18atcskd2w","mynoob"];function aM(e,t){return new Jl(e).eq(t)}function sM(e,t,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:[];if(!Mn(e))return i("invalid keys");if(!Mn(t))return i("invalid mat");if(!Mn(t[0]))return i("invalid mat, the first row is not an effective array");let o=bn(t,function(t){let n=Yi(e,t);return vn(n,function(e,t){void 0===e&&(n[t]="")}),n});return r?{state:"success",msg:o}:o}var lM=ka(function(e){return On(xn(e,1,Hy,!0))});var cM=ka(function(e,t){var n=Aa(t);return Hy(n)&&(n=void 0),Hy(e)?function(e,t,n,r){var i=-1,o=Rn,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=fe(t,Xe(n))),r?(o=Un,a=!1):t.length>=200&&(o=bt,a=!1,t=new vt(t));e:for(;++i<s;){var u=e[i],f=null==n?u:n(u);if(u=r||0!==u?u:0,a&&f==f){for(var d=c;d--;)if(t[d]===f)continue e;l.push(u)}else o(t,f,r)||l.push(u)}return l}(e,xn(t,1,Hy,!0),hn(n)):[]}),uM=cM;function fM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!ke(e))return r("invalid str");let i="";try{let t=Gr.parse(e);i=Qr.stringify(t)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function dM(e,t,n=!1,r={}){let i=Ae(r,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:"";if(!ke(e))return o("invalid str");if(!ke(t))return o("invalid key");we(n)||(n=!1);let a="";try{let r=Yr.encrypt(e,t);if(n)a=r.toString();else{let e=r.toString();a=Qr.parse(e).toString(_r)}}catch(e){return o(e.toString())}return i?{state:"success",msg:a}:a}var hM={exports:{}};!function(e){var t;e.exports=(t=Fr(),function(){if("function"==typeof ArrayBuffer){var e=t.lib.WordArray,n=e.init,r=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,r=[],i=0;i<t;i++)r[i>>>2]|=e[i]<<24-i%4*8;n.call(this,r,t)}else n.apply(this,arguments)};r.prototype=e}}(),t.lib.WordArray)}(hM);var pM=Er(hM.exports);function gM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!as(e))return r("invalid u8a");let i="";try{i=pM.create(e).toString(Qr)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function mM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!WD(e))return r("invalid u16a");let i="";try{let t=gM(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),{returnWithStateAndMsg:!0});if("error"===t.state)return r(`u8arr2b64: ${t.msg}`);i=t.msg}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}let yM="[BlazeForPreventEscape]",vM=/^(?:\[BlazeForPreventEscape\])*\[(?:Uint8Array|Uint16Array)\]::[A-Za-z0-9+/]*={0,2}$/,AM=/^\[BlazeForPreventEscape\](?:\[BlazeForPreventEscape\])*\[(?:Uint8Array|Uint16Array)\]::[A-Za-z0-9+/]*={0,2}$/;let bM="[Uint8Array]::",wM=/^\[Uint8Array\]::([A-Za-z0-9+/]*={0,2})$/;let IM="[Uint16Array]::",xM=/^\[Uint16Array\]::([A-Za-z0-9+/]*={0,2})$/;let CM={tagEsc:yM,escape:function(e){return Se(e)&&91===e.charCodeAt(0)&&vM.test(e)?yM+e:e},unescape:function(e){return Se(e)&&91===e.charCodeAt(0)&&AM.test(e)?e.slice(23):e},tagU8A:bM,u8arr2b64:function(e){return as(e)?bM+gM(e):e},b642u8arr:function(e){if(Se(e)&&91===e.charCodeAt(0)){let t=wM.exec(e);if(null!==t)return Va(t[1])}return e},tagU16A:IM,u16arr2b64:function(e){return WD(e)?IM+mM(e):e},b642u16arr:function(e){if(Se(e)&&91===e.charCodeAt(0)){let t=xM.exec(e);if(null!==t)return Ya(t[1])}return e}};function EM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:{results:"",binarys:[]};if(!Ee(e)&&!Ce(e))return r("invalid data, data is not an object or array");if(kn(e)||Dn(e))return r("invalid data, data is an empty object or empty array");let i=/^(?:\[BlazeForPreventEscape\])*\[BlazeFor(?:Uint8Array|Uint16Array|ArrayBuffer)\]::\d+$/,o="",a=[];try{let t=-1;o=JSON.stringify(e,function(e,n){if(as(n)){t+=1;let e=`[BlazeForUint8Array]::${t}`;return a.push(n),e}if(WD(n)){t+=1;let e=`[BlazeForUint16Array]::${t}`;return a.push(n),e}if(Ie(n)){t+=1;let e=`[BlazeForArrayBuffer]::${t}`;return a.push(n),e}return eN(n)&&(n=n.toString()),ke(n)&&91===n.charCodeAt(0)&&i.test(n)?"[BlazeForPreventEscape]"+n:n})}catch(e){return r(e.toString())}return n?{state:"success",msg:{results:o,binarys:a}}:{results:o,binarys:a}}function BM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!ke(e))return r("invalid str");let i=null;try{let t=fM(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`str2b64: ${t.msg}`);let n=Va(t.msg,{returnWithStateAndMsg:!0});if("error"===n.state)return r(`b642u8arr: ${n.msg}`);i=n.msg}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function SM(e){let t=0;vn(e,e=>{t+=GD(e)});let n=new Uint8Array(t),r=0;return vn(e,e=>{let t=function(e){return Ie(e)?new Uint8Array(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0)}(e);n.set(t,r),r+=t.length}),n}function kM(e,t){if(!Be(e))return{};if(!Ui(t))throw new Error("fun is not a function");let n=bn(e,(e,n)=>({k:n,v:e,t:t(e,n)}));n=Fa(n,"t");let r={};return vn(n,e=>{r[e.k]=e.v}),r}function FM(e,t=()=>{}){if(!Ui(e))return null;function n(e,t){let n;return Sn(e)||Bn(e)?t:(n=Ae(e,"data",null),n||e)}return Ui(t)||(t=()=>{}),function(){let r,i=Ga(),o=t({mode:"before",data:arguments});return(Sn(o)||Bn(o))&&(o=arguments),e(...o).then(e=>{r=t({mode:"afterThen",data:e}),e=n(r,e),i.resolve(e)}).catch(e=>{r=t({mode:"afterCatch",data:e}),e=n(r,e),i.reject(e)}),i}}function DM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"success",msg:e}:e;if(!Se(e))return n?{state:"error",msg:"invalid str"}:null;if(""===e)return r(0);let i=e.split("").reduce((e,t)=>t.charCodeAt(0)+(e<<6)+(e<<16)-e,0);return r(i)}let NM=0;function MM(e="start1",t=!1){void 0===e?e=(new Date).getTime():"start1"===e&&(NM++,e=NM);let n=624,r=397,i=2147483648,o=2147483647,a=new Array(n),s=625,l=e=>{for(ca(e)?a[0]=e>>>0:(e=Na(e),a[0]=DM(e)),s=1;s<n;s++){let e=a[s-1]^a[s-1]>>>30;a[s]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+s,a[s]>>>=0}},c=()=>(()=>{let e,t=new Array(2567483615);if(s>=n){let c;for(625===s&&l(5489),c=0;c<227;c++)e=a[c]&i|a[c+1]&o,a[c]=a[c+r]^e>>>1^t[1&e];for(;c<623;c++)e=a[c]&i|a[c+1]&o,a[c]=a[c+(r-n)]^e>>>1^t[1&e];e=a[623]&i|a[0]&o,a[623]=a[396]^e>>>1^t[1&e],s=0}return e=a[s++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0})()*(1/4294967296);l(e);let u=null;return u=t?c:c(),u}let QM=MM((new Date).getTime(),!0);function TM(){return QM()}function LM(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}var RM=Math.floor,UM=Math.random;function HM(e,t){return e+RM(UM()*(t-e+1))}function qM(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=HM(n,i),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}function OM(e,t){return qM(Cn(e),LM(t,0,e.length))}function PM(e,t){var n=VF(e);return qM(n,LM(t,0,n.length))}var $M=Math.floor;function zM(e,t,n){return t=(n?pn(e,t,n):void 0===t)?1:wr(t),function(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=$M(t/2))&&(e+=e)}while(t);return n}(ge(e),t)}var jM=$i("floor");var VM=Er(Lr());var YM={exports:{}},WM={exports:{}};!function(e){var t;e.exports=(t=Fr(),function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,a=n.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),l[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],d=n[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,m=c[h-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[h]=g+c[h-7]+y+c[h-16]}var v=r&i^r&o^i&o,A=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+l[h]+c[h];d=f,f=u,u=s,s=a+b|0,a=o,o=i,i=r,r=b+(A+v)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=o._createHelper(u),n.HmacSHA256=o._createHmacHelper(u)}(Math),t.SHA256)}(WM);var GM=WM.exports,JM=Er(GM);!function(e){var t;e.exports=(t=Fr(),function(){var e=t,n=e.lib.WordArray,r=e.algo,i=r.SHA256,o=r.SHA224=i.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});e.SHA224=i._createHelper(o),e.HmacSHA224=i._createHmacHelper(o)}(),t.SHA224)}(YM);var _M,XM=Er(YM.exports),KM={exports:{}},ZM={exports:{}};function eQ(){return _M||(_M=1,function(e){var t;e.exports=(t=Fr(),function(e){var n=t,r=n.lib,i=r.Base,o=r.WordArray,a=n.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:8*t.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return o.create(n,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}})}(),t)}(ZM)),ZM.exports}var tQ={exports:{}};!function(e){var t;e.exports=(t=Fr(),eQ(),function(){var e=t,n=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=n.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],d=n[7],h=r.high,p=r.low,g=i.high,m=i.low,y=o.high,v=o.low,A=a.high,b=a.low,w=s.high,I=s.low,x=u.high,C=u.low,E=f.high,B=f.low,S=d.high,k=d.low,F=h,D=p,N=g,M=m,Q=y,T=v,L=A,R=b,U=w,H=I,q=x,O=C,P=E,$=B,z=S,j=k,V=0;V<80;V++){var Y,W,G=c[V];if(V<16)W=G.high=0|e[t+2*V],Y=G.low=0|e[t+2*V+1];else{var J=c[V-15],_=J.high,X=J.low,K=(_>>>1|X<<31)^(_>>>8|X<<24)^_>>>7,Z=(X>>>1|_<<31)^(X>>>8|_<<24)^(X>>>7|_<<25),ee=c[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[V-7],ae=oe.high,se=oe.low,le=c[V-16],ce=le.high,ue=le.low;W=(W=(W=K+ae+((Y=Z+se)>>>0<Z>>>0?1:0))+re+((Y+=ie)>>>0<ie>>>0?1:0))+ce+((Y+=ue)>>>0<ue>>>0?1:0),G.high=W,G.low=Y}var fe,de=U&q^~U&P,he=H&O^~H&$,pe=F&N^F&Q^N&Q,ge=D&M^D&T^M&T,me=(F>>>28|D<<4)^(F<<30|D>>>2)^(F<<25|D>>>7),ye=(D>>>28|F<<4)^(D<<30|F>>>2)^(D<<25|F>>>7),ve=(U>>>14|H<<18)^(U>>>18|H<<14)^(U<<23|H>>>9),Ae=(H>>>14|U<<18)^(H>>>18|U<<14)^(H<<23|U>>>9),be=l[V],we=be.high,Ie=be.low,xe=z+ve+((fe=j+Ae)>>>0<j>>>0?1:0),Ce=ye+ge;z=P,j=$,P=q,$=O,q=U,O=H,U=L+(xe=(xe=(xe=xe+de+((fe+=he)>>>0<he>>>0?1:0))+we+((fe+=Ie)>>>0<Ie>>>0?1:0))+W+((fe+=Y)>>>0<Y>>>0?1:0))+((H=R+fe|0)>>>0<R>>>0?1:0)|0,L=Q,R=T,Q=N,T=M,N=F,M=D,F=xe+(me+pe+(Ce>>>0<ye>>>0?1:0))+((D=fe+Ce|0)>>>0<fe>>>0?1:0)|0}p=r.low=p+D,r.high=h+F+(p>>>0<D>>>0?1:0),m=i.low=m+M,i.high=g+N+(m>>>0<M>>>0?1:0),v=o.low=v+T,o.high=y+Q+(v>>>0<T>>>0?1:0),b=a.low=b+R,a.high=A+L+(b>>>0<R>>>0?1:0),I=s.low=I+H,s.high=w+U+(I>>>0<H>>>0?1:0),C=u.low=C+O,u.high=x+q+(C>>>0<O>>>0?1:0),B=f.low=B+$,f.high=E+P+(B>>>0<$>>>0?1:0),k=d.low=k+j,d.high=S+z+(k>>>0<j>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=n._createHelper(u),e.HmacSHA512=n._createHmacHelper(u)}(),t.SHA512)}(tQ);var nQ=tQ.exports,rQ=Er(nQ);!function(e){var t;e.exports=(t=Fr(),eQ(),function(){var e=t,n=e.x64,r=n.Word,i=n.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),t.SHA384)}(KM);let iQ={1:Pr,224:XM,256:JM,384:Er(KM.exports),512:rQ};function oQ(e,t,n=!1,r={}){let i=Ae(r,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:"";if(!ke(e))return o("invalid str");if(!Vi(t)){if(i)return o("n is not a positive integer");throw new Error("n is not a positive integer")}if(t=ji(t),!Me(iQ,t)){if(i)return o(`invalid n[${t}]`);throw new Error(`invalid n[${t}]`)}we(n)||(n=!1);let a="";try{let r=(0,iQ[t])(e);a=n?r.toString(Qr):r.toString(_r)}catch(e){return o(e.toString())}return i?{state:"success",msg:a}:a}function aQ(e,t){return ke(e)&&ke(t)?function(e,t){if(e=e.replace(/\s+/g,""),t=t.replace(/\s+/g,""),!e.length&&!t.length)return 1;if(!e.length||!t.length)return 0;if(e===t)return 1;if(1===e.length&&1===t.length)return 0;if(e.length<2||t.length<2)return 0;let n=new Map;for(let t=0;t<e.length-1;t++){const r=e.substring(t,t+2),i=n.has(r)?n.get(r)+1:1;n.set(r,i)}let r=0;for(let e=0;e<t.length-1;e++){const i=t.substring(e,e+2),o=n.has(i)?n.get(i):0;o>0&&(n.set(i,o-1),r++)}return 2*r/(e.length+t.length-2)}(e,t):0}function sQ(e){if(!ke(e))return null;let t=e.match(/(\d+)\.(\d+)\.(\d+)/);return t?[Number(t[1]),Number(t[2]),Number(t[3])]:null}function lQ(e){return Array.isArray?Array.isArray(e):"[object Array]"===mQ(e)}function cQ(e){return null==e?"":function(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();const t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function uQ(e){return"string"==typeof e}function fQ(e){return"number"==typeof e}function dQ(e){return!0===e||!1===e||function(e){return hQ(e)&&null!==e}(e)&&"[object Boolean]"==mQ(e)}function hQ(e){return"object"==typeof e}function pQ(e){return null!=e}function gQ(e){return!e.trim().length}function mQ(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const yQ="Invalid doc index: must be a non-negative integer within the bounds of the docs array",vQ=Object.prototype.hasOwnProperty;var AQ=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{const n=bQ(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function bQ(e){let t=null,n=null,r=null,i=1,o=null;if(uQ(e)||lQ(e))r=e,t=wQ(e),n=IQ(e);else{if(!vQ.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const a=e.name;if(r=a,vQ.call(e,"weight")&&void 0!==e.weight&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(IQ(a)));t=wQ(a),n=IQ(a),o=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:o}}function wQ(e){return lQ(e)?e:e.split(".")}function IQ(e){return lQ(e)?e.join("."):e}const xQ={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:function(e,t){const n=[];let r=!1;const i=(e,t,o,a)=>{if(pQ(e))if(t[o]){const s=e[t[o]];if(!pQ(s))return;if(o===t.length-1&&(uQ(s)||fQ(s)||dQ(s)||"bigint"==typeof s))n.push(void 0!==a?{v:cQ(s),i:a}:cQ(s));else if(lQ(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,o+1,e)}else t.length&&i(s,t,o+1,a)}else n.push(void 0!==a?{v:e,i:a}:e)};return i(e,uQ(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},CQ=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...xQ});function EQ(e){return e>=9&&e<=13||32===e||160===e}var BQ=class{constructor({getFn:e=CQ.getFn,fieldNormWeight:t=CQ.fieldNormWeight}={}){this.norm=function(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(t){let i=0,o=!1;for(let e=0;e<t.length;e++)EQ(t.charCodeAt(e))?o=!1:o||(i++,o=!0);if(0===i&&(i=1),n.has(i))return n.get(i);const a=Math.round(r/Math.pow(i,.5*e))/r;return n.set(i,a),a},clear(){n.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(uQ(this.docs[0]))for(let n=0;n<e;n++){const e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(yQ);if(uQ(e)){const n=this._createStringRecord(e,t);return n&&this.records.push(n),n}const n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(yQ);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(0===t.size)return;this.records=this.records.filter(e=>!t.has(e.i));const n=Array.from(t).sort((e,t)=>e-t);for(const e of this.records){let t=0,r=n.length;for(;t<r;){const i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!pQ(e)||gQ(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){const r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(pQ(i))if(lQ(i)){const e=[];for(let t=0,n=i.length;t<n;t+=1){const n=i[t];if(pQ(n))if(uQ(n)){if(!gQ(n)){const r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(pQ(n.v)){const t=uQ(n.v)?n.v:cQ(n.v);if(!gQ(t)){const r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}n.$[t]=e}else if(uQ(i)&&!gQ(i)){const e={v:i,n:this.norm.get(i)};n.$[t]=e}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function SQ(e,t,{getFn:n=CQ.getFn,fieldNormWeight:r=CQ.fieldNormWeight}={}){const i=new BQ({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(bQ)),i.setSources(t),i.create(),i}function kQ(e,t,n,{location:r=CQ.location,distance:i=CQ.distance,threshold:o=CQ.threshold,findAllMatches:a=CQ.findAllMatches,minMatchCharLength:s=CQ.minMatchCharLength,includeMatches:l=CQ.includeMatches,ignoreLocation:c=CQ.ignoreLocation}={}){if(t.length>32)throw new Error((e=>`Pattern length exceeds max of ${e}.`)(32));const u=t.length,f=e.length,d=Math.max(0,Math.min(r,f));let h=o,p=d;const g=(e,t)=>{const n=e/u;if(c)return n;const r=Math.abs(d-t);return i?n+r/i:r?1:n},m=s>1||l,y=m?Array(f):[];let v;for(;(v=e.indexOf(t,p))>-1;){const e=g(0,v);if(h=Math.min(e,h),p=v+u,m){let e=0;for(;e<u;)y[v+e]=1,e+=1}}p=-1;let A=[],b=1,w=0,I=u+f;const x=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=I;for(;r<i;)g(t,d+i)<=h?r=i:I=i,i=Math.floor((I-r)/2+r);I=i;let o=Math.max(1,d-i+1);const s=a?f:Math.min(d+i,f)+u,l=Array(s+2);l[s+1]=(1<<t)-1;for(let r=s;r>=o;r-=1){const i=r-1,a=n[e[i]];if(l[r]=(l[r+1]<<1|1)&a,t&&(l[r]|=(A[r+1]|A[r])<<1|1|A[r+1]),l[r]&x&&(b=g(t,i),b<=h)){if(h=b,p=i,w=t,p<=d)break;o=Math.max(1,2*d-p)}}if(g(t+1,d)>h)break;A=l}if(m&&p>=0){const t=Math.min(f-1,p+u-1+w);for(let r=p;r<=t;r+=1)n[e[r]]&&(y[r]=1)}const C={isMatch:p>=0,score:Math.max(.001,b)};if(m){const e=function(e=[],t=CQ.minMatchCharLength){const n=[];let r=-1,i=-1,o=0;for(let a=e.length;o<a;o+=1){const a=e[o];a&&-1===r?r=o:a||-1===r||(i=o-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(y,s);e.length?l&&(C.indices=e):C.isMatch=!1}return C}function FQ(e){const t={};for(let n=0,r=e.length;n<r;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function DQ(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);const t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){const r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}const NQ={"ł":"l","Ł":"L","đ":"d","Đ":"D","ø":"o","Ø":"O","ħ":"h","Ħ":"H","ŧ":"t","Ŧ":"T","ı":"i","ß":"ss"},MQ=new RegExp("["+Object.keys(NQ).join("")+"]","g"),QQ="function"==typeof String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(MQ,e=>NQ[e]):e=>e;var TQ=class{constructor(e,{location:t=CQ.location,threshold:n=CQ.threshold,distance:r=CQ.distance,includeMatches:i=CQ.includeMatches,findAllMatches:o=CQ.findAllMatches,minMatchCharLength:a=CQ.minMatchCharLength,isCaseSensitive:s=CQ.isCaseSensitive,ignoreDiacritics:l=CQ.ignoreDiacritics,ignoreLocation:c=CQ.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:s,ignoreDiacritics:l,ignoreLocation:c},e=s?e:e.toLowerCase(),e=l?QQ(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const u=(e,t)=>{this.chunks.push({pattern:e,alphabet:FQ(e),startIndex:t})},f=this.pattern.length;if(f>32){let e=0;const t=f%32,n=f-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){const e=f-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?QQ(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}const{location:i,distance:o,threshold:a,findAllMatches:s,minMatchCharLength:l,ignoreLocation:c}=this.options,u=[];let f=0,d=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:h})=>{const{isMatch:p,score:g,indices:m}=kQ(e,t,n,{location:i+h,distance:o,threshold:a,findAllMatches:s,minMatchCharLength:l,includeMatches:r,ignoreLocation:c});p&&(d=!0),f+=g,p&&m&&u.push(...m)});const h={isMatch:d,score:d?f/this.chunks.length:1};return d&&r&&(h.indices=DQ(u)),h}};const LQ=new Set(["fuzzy","include"]);function RQ(e){return e.startsWith("inverse")}const UQ=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n,r=0;const i=[],o=e.length;for(;(n=t.indexOf(e,r))>-1;)r=n+o,i.push([n,r-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=-1===t.indexOf(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new TQ(e,{location:t.location??CQ.location,threshold:t.threshold??CQ.threshold,distance:t.distance??CQ.distance,includeMatches:t.includeMatches??CQ.includeMatches,findAllMatches:t.findAllMatches??CQ.findAllMatches,minMatchCharLength:t.minMatchCharLength??CQ.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??CQ.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??CQ.ignoreDiacritics,ignoreLocation:t.ignoreLocation??CQ.ignoreLocation});return{type:"fuzzy",search:e=>n.searchIn(e)}}}],HQ=UQ.length;function qQ(e,t){const n=e.match(t);return n?n[1]:null}const OQ=[];function PQ(...e){OQ.push(...e)}function $Q(e,t){for(let n=0,r=OQ.length;n<r;n+=1){const r=OQ[n];if(r.condition(e,t))return new r(e,t)}return new TQ(e,t)}const zQ="$and",jQ="$or",VQ="$path",YQ="$val",WQ=e=>!(!e[zQ]&&!e[jQ]),GQ=e=>({[zQ]:Object.keys(e).map(t=>({[t]:e[t]}))});function JQ(e,t,{auto:n=!0}={}){const r=e=>{if(uQ(e)){const r={keyId:null,pattern:e};return n&&(r.searcher=$Q(e,t)),r}const i=Object.keys(e),o=(e=>!!e[VQ])(e);if(!o&&i.length>1&&!WQ(e))return r(GQ(e));if((e=>!lQ(e)&&hQ(e)&&!WQ(e))(e)){const r=o?e[VQ]:i[0],a=o?e[YQ]:e[r];if(!uQ(a))throw new Error((e=>`Invalid value for key ${e}`)(r));const s={keyId:IQ(r),pattern:a};return n&&(s.searcher=$Q(a,t)),s}const a={children:[],operator:i[0]};return i.forEach(t=>{const n=e[t];lQ(n)&&n.forEach(e=>{a.children.push(r(e))})}),a};return WQ(e)||(e=GQ(e)),r(e)}function _Q(e,{ignoreFieldNorm:t=CQ.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{const o=e?e.weight:null;n*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(t?1:r))}),n}var XQ=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let r=e;do{const i=2*(e=r)+1,o=2*e+2;if(i<n&&this.comparator(t[i],t[r])>0&&(r=i),o<n&&this.comparator(t[o],t[r])>0&&(r=o),r!==e){const n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function KQ(e,t,{includeMatches:n=CQ.includeMatches,includeScore:r=CQ.includeScore}={}){return e.map(e=>{const{idx:i}=e,o={item:t[i],refIndex:i};return n&&(o.matches=function(e){const t=[];return e.matches.forEach(e=>{if(!pQ(e.indices)||!e.indices.length)return;const n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}(e)),r&&(o.score=e.score),o})}const ZQ=/[\p{L}\p{M}\p{N}_]+/gu,eT=new WeakSet;function tT(e){if("function"==typeof e){let t=!1;return n=>{const r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>"string"!=typeof e)))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?"array containing non-strings":typeof r}.`);return r}}return e instanceof RegExp?(e.global||function(e){eT.has(e)||(eT.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}(e),t=>t.match(e)||[]):e=>e.match(ZQ)||[]}function nT({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const r=tT(n);return{tokenize:n=>(e||(n=n.toLowerCase()),t&&(n=QQ(n)),r(n))}}function rT(e,t,n,r){const i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const o=new Set(i);let a=e.docTermFieldHits.get(n);a||(a=new Map,e.docTermFieldHits.set(n,a));for(const t of o)a.set(t,(a.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function iT(e,t,n,r){const{i:i,v:o,$:a}=t;if(void 0===o){if(a)for(let t=0;t<n;t++){const n=a[t];if(n)if(Array.isArray(n))for(const t of n)rT(e,t.v,i,r);else rT(e,n.v,i,r)}}else rT(e,o,i,r)}function oT(e,t){const n=e.docFieldCount.get(t);if(void 0===n)return;e.fieldCount-=n,e.docFieldCount.delete(t);const r=e.docTermFieldHits.get(t);if(r){for(const[t,n]of r){const r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function aT(e,t){if(0===t.length)return;const n=Array.from(new Set(t)).sort((e,t)=>e-t);for(const t of n)oT(e,t);const r=e=>{let t=0,r=n.length;for(;t<r;){const i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],o=new Map;for(const[t,n]of e.docFieldCount)o.set(t>i?r(t):t,n);e.docFieldCount=o;const a=new Map;for(const[t,n]of e.docTermFieldHits)a.set(t>i?r(t):t,n);e.docTermFieldHits=a}var sT=class{constructor(e,t,n){this.options={...CQ,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new AQ(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=$Q(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof BQ))throw new Error("Incorrect 'index' type");if(this._myIndex=t||SQ(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const e=nT({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function(e,t,n){const r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of e)iT(r,i,t,n);return r}(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!pQ(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const e=nT({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function(e,t,n,r){iT(e,t,n,r)}(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&aT(this._invertedIndex,n);const e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(yQ);this._invertedIndex&&aT(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:o,sortFn:a,ignoreFieldNorm:s}=this.options;if(uQ(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return fQ(n)&&n>-1&&(e=e.slice(0,n)),e}const l=o&&fQ(n)&&n>0&&uQ(e),c=a,u=(e,t)=>c(e,t)||e.idx-t.idx;let f;if(l){const t=new XQ(n,u);uQ(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),f=t.extractSorted()}else f=uQ(e)?uQ(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),function(e,{ignoreFieldNorm:t=CQ.ignoreFieldNorm}){e.forEach(e=>{e.score=_Q(e.matches,{ignoreFieldNorm:t})})}(f,{ignoreFieldNorm:s}),o&&f.sort(uQ(e)?u:c),fQ(n)&&n>-1&&(f=f.slice(0,n));return KQ(f,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const r=this._getSearcher(e),i=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:o}=this._myIndex,a=t?null:[];return o.forEach(({v:e,i:o,n:s})=>{if(!pQ(e))return;const l=r.searchIn(e);if(l.isMatch){const r={score:l.score,value:e,norm:s,indices:l.indices};i&&(r.matchedMask=l.matchedMask,r.matchedTerms=l.matchedTerms,r.termCount=l.termCount);const c=[r];if(!i||this._coversAllTokens(c)){const r={item:e,idx:o,matches:c};t?(r.score=_Q(r.matches,{ignoreFieldNorm:n}),t.insert(r)):a.push(r)}}}),a}_searchLogical(e){const t=JQ(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!("children"in e)){const{keyId:r,searcher:o}=e;let a;return null===r?(a=[],n.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:o}))})):a=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:o}),a&&a.length?[{idx:i,item:t,matches:a}]:[]}const{children:o,operator:a}=e,s=[];for(let e=0,n=o.length;e<n;e+=1){const n=o[e],l=r(n,t,i);if(l.length)s.push(...l);else if(a===zQ)return[]}return s},i=this._myIndex.records,o=new Map,a=[];return i.forEach(({$:e,i:n})=>{if(pQ(e)){const i=r(t,e,n);i.length&&(o.has(n)||(o.set(n,{idx:n,item:e,matches:[]}),a.push(o.get(n))),i.forEach(({matches:e})=>{o.get(n).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const r=this._getSearcher(e),i=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:o}=this._myIndex,a=this._normalizedKeys(),s=t?null:[];return o.forEach(({$:e,i:o})=>{if(!pQ(e))return;const l=[];let c=!1,u=!1;if(a.forEach((t,n)=>{const i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(l.push(...i),i[0].hasInverse&&(u=!0)):c=!0}),(!u||!c)&&l.length&&(!i||this._coversAllTokens(l))){const r={idx:o,item:e,matches:l};t?(r.score=_Q(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!pQ(t))return[];const r=[];if(lQ(t))t.forEach(({v:t,i:i,n:o})=>{if(!pQ(t))return;const a=n.searchIn(t);if(a.isMatch){const n={score:a.score,key:e,value:t,idx:i,norm:o,indices:a.indices,hasInverse:a.hasInverse};void 0!==a.termCount&&(n.matchedMask=a.matchedMask,n.matchedTerms=a.matchedTerms,n.termCount=a.termCount),r.push(n)}});else{const{v:i,n:o}=t,a=n.searchIn(i);if(a.isMatch){const t={score:a.score,key:e,value:i,norm:o,indices:a.indices,hasInverse:a.hasInverse};void 0!==a.termCount&&(t.matchedMask=a.matchedMask,t.matchedTerms=a.matchedTerms,t.termCount=a.termCount),r.push(t)}}return r}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(void 0===t)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}const n=new Set;for(let t=0;t<e.length;t++){const r=e[t].matchedTerms;if(r)for(const e of r)n.add(e)}return n.size===t}};sT.version="7.5.0",sT.createIndex=SQ,sT.parseIndex=function(e,{getFn:t=CQ.getFn,fieldNormWeight:n=CQ.fieldNormWeight}={}){const{keys:r,records:i}=e,o=new BQ({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(i),o},sT.config=CQ,sT.match=function(e,t,n){if(n&&n.useTokenSearch)throw new Error("Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.");return $Q(e,{...CQ,...n}).searchIn(t)},sT.parseQuery=JQ,PQ(class{constructor(e,{isCaseSensitive:t=CQ.isCaseSensitive,ignoreDiacritics:n=CQ.ignoreDiacritics,includeMatches:r=CQ.includeMatches,minMatchCharLength:i=CQ.minMatchCharLength,ignoreLocation:o=CQ.ignoreLocation,findAllMatches:a=CQ.findAllMatches,location:s=CQ.location,threshold:l=CQ.threshold,distance:c=CQ.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:a,ignoreLocation:o,location:s,threshold:l,distance:c},e=t?e:e.toLowerCase(),e=n?QQ(e):e,this.pattern=e,this.query=function(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(e=>{const n=function(e){const t=[],n=e.length;let r=0;for(;r<n;){for(;r<n&&" "===e[r];)r++;if(r>=n)break;let i=r;for(;i<n&&" "!==e[i]&&'"'!==e[i];)i++;if(i<n&&'"'===e[i]){for(i++;i<n;){if('"'===e[i]){const t=i+1;if(t>=n||" "===e[t]){i++;break}if("$"===e[t]&&(t+1>=n||" "===e[t+1])){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&" "!==e[i];)i++;t.push(e.substring(r,i)),r=i}}return t}(e.replace(/\u0000/g,"|").trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){const i=n[e];let o=!1,a=-1;for(;!o&&++a<HQ;){const e=UQ[a],n=qQ(i,e.multiRegex);n&&(r.push(e.create(n,t)),o=!0)}if(!o)for(a=-1;++a<HQ;){const e=UQ[a],n=qQ(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?QQ(e):e;let o=0;const a=[];let s=0,l=!1;for(let r=0,i=t.length;r<i;r+=1){const i=t[r];a.length=0,o=0,l=!1;for(let t=0,r=i.length;t<r;t+=1){const r=i[t],{isMatch:c,indices:u,score:f}=r.search(e);if(!c){s=0,o=0,a.length=0,l=!1;break}o+=1,s+=f,RQ(r.type)&&(l=!0),n&&(LQ.has(r.type)?a.push(...u):a.push(u))}if(o){const e={isMatch:!0,score:s/o};return l&&(e.hasInverse=!0),n&&(e.indices=DQ(a)),e}}return{isMatch:!1,score:1}}}),PQ(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=nT({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const e of n){this.termSearchers.push(new TQ(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const n=r.get(e)||0,o=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(o)}this.combineAll="all"===t.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,r=0,i=0,o=0;const a=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){const l=this.termSearchers[s].searchIn(e),c=this.idfWeights[s];r+=c,l.isMatch&&(i++,n+=c*(1-l.score),l.indices&&t.push(...l.indices),this.combineAll&&(this.useMask?o|=1<<s:a.add(s)))}if(0===i)return{isMatch:!1,score:1};const s=r>0?1-n/r:0,l={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(l.indices=DQ(t)),this.combineAll&&(this.useMask?l.matchedMask=o:l.matchedTerms=a,l.termCount=this.numTerms),l}}),sT.use=function(...e){e.forEach(e=>PQ(e))};var lT=sT;function cT(e){return function(e,t){var n=null==e?0:e.length;return n?pa(e,t)/n:NaN}(e,un)}function uT(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:{};if(!Be(e))return r("invalid data");let i=null,o=null;try{i=e.results,o=e.binarys}catch(e){return r(e.toString())}if(!ke(i))return r("invalid results");if(!Ce(o))return r("invalid binarys");let a=/^\[BlazeFor(Uint8Array|Uint16Array|ArrayBuffer)\]::(\d+)$/,s=/^\[BlazeForPreventEscape\](?:\[BlazeForPreventEscape\])*\[BlazeFor(?:Uint8Array|Uint16Array|ArrayBuffer)\]::\d+$/,l={};try{l=JSON.parse(i,function(e,t){if(!ke(t)||91!==t.charCodeAt(0))return t;let n=a.exec(t);if(null===n)return s.test(t)?t.slice(23):t;let r=Number(n[2]);if(r>=o.length)throw new Error(`binary index out of range[${r}], binarys.length[${o.length}]`);return((e,t,n)=>{if("Uint16Array"===e&&!WD(n)){if(!as(n))throw new Error(`binarys[${t}] can not be restored to Uint16Array`);if(n.byteLength%2!=0)throw new Error(`binarys[${t}] byteLength[${n.byteLength}] is not even, can not be restored to Uint16Array`);let e=0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n:new Uint8Array(n);return new Uint16Array(e.buffer)}if("ArrayBuffer"===e&&!Ie(n)){if(!as(n))throw new Error(`binarys[${t}] can not be restored to ArrayBuffer`);return n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}return n})(n[1],r,o[r])})}catch(e){return r(e.toString())}return n?{state:"success",msg:l}:l}function fT(e,n=null,r={}){let i=Ae(r,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=(e,t)=>i?{state:"error",msg:e}:{today:null,msg:"",err:t};if(!Ui(t))throw new Error("invalid dayjs");if(!rM(e))return o("invalid t","時間格式錯誤");let a=null;try{a=function(e,n){let r=t();rM(n)&&(r=t(n,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=t(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r>i)return{today:null,msg:"",err:"時間已過"};let o,a=r.format("YYYY-MM-DD"),s=i.format("YYYY-MM-DD"),l=t(a,"YYYY-MM-DD"),c=t(s,"YYYY-MM-DD"),u=i.diff(r,"seconds"),f=i.diff(r,"minutes"),d=i.diff(r,"hours"),h=c.diff(l,"days"),p=c.diff(l,"weeks"),g=c.diff(l,"months"),m=c.diff(l,"years"),y="即將到來";if(u>=0&&(o=!0,y=u+"秒後"),f>0&&(o=!0,y=f+"分鐘後"),d>0){let e=i.format("HH:mm");a===s?(o=!0,y=d+"小時後,今天"+e):(o=!1,y=d+"小時後,明天"+e)}return h>1&&(o=!1,y=2===h?"後天":h+"天後"),p>0&&(o=!1,y=p+"周後"),g>0&&(o=!1,y=g+"個月後"),m>0&&(o=!1,y=m+"年後"),{today:o,msg:y,err:""}}(e,n)}catch(e){return o(e.toString(),"時間轉換失敗")}return s=a,i?{state:"success",msg:s}:s;var s}function dT(e,n=null,r={}){let i=Ae(r,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=(e,t)=>i?{state:"error",msg:e}:{today:null,msg:"",err:t};if(!Ui(t))throw new Error("invalid dayjs");if(!rM(e))return o("invalid t","時間格式錯誤");let a=null;try{a=function(e,n){let r=t();rM(n)&&(r=t(n,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=t(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r<i)return{today:null,msg:"",err:"時間未到"};let o=r.format("YYYY-MM-DD"),a=i.format("YYYY-MM-DD"),s=t(o,"YYYY-MM-DD"),l=t(a,"YYYY-MM-DD"),c=r.diff(i,"seconds"),u=r.diff(i,"minutes"),f=r.diff(i,"hours"),d=s.diff(l,"days"),h=s.diff(l,"weeks"),p=s.diff(l,"months"),g=s.diff(l,"years"),m=!1,y="剛剛";if(c>=0&&(m=!0,y=c+"秒前"),u>0&&(m=!0,y=u+"分鐘前"),f>0){let e=i.format("HH:mm");o===a?(m=!0,y=f+"小時前"):(m=!1,y="昨天"+e)}return d>1&&(m=!1,y=d+"天前"),h>0&&(m=!1,y=h+"周前"),p>0&&(m=!1,y=p+"個月前"),g>0&&(m=!1,y=g+"年前"),{today:m,msg:y,err:""}}(e,n)}catch(e){return o(e.toString(),"時間轉換失敗")}return s=a,i?{state:"success",msg:s}:s;var s}function hT(e){let t=nM.sepTZ(e);return e=`${t.t}.000${t.tz}`}function pT(e){let t=nM.sepTZ(e);return e=`${t.t}.000${t.tz}`}function gT(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!as(e))return r("invalid u8a");let i="";try{let t=gM(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`u8arr2b64: ${t.msg}`);i=Oa(t.msg)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}e.ab2blob=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Blob;if(!Ie(e))return r("invalid ab");let i=null;try{let t=xe(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`ab2u8arr: ${t.msg}`);i=new Blob([t.msg])}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.ab2u8arr=xe,e.addExcelWorksheetFromData=function(e,t,n="data"){if(!Be(e))return{error:"wb is not an effective object"};if(!Ce(Ae(e,"sheets")))return{error:"wb.sheets is not an array"};ke(n)||(n="data");let r=cr(t);return Me(r,"error")?r:(e.sheets.push({...r,name:n}),e)},e.addMonth=function(e,n){return ur(e)&&xr(n)?t(e,"YYYY-MM").add(n,"months").format("YYYY-MM"):""},e.aes2str=Xr,e.alive=function(e={}){let t=qi({type:"safe"}),n={},r=null,i=Ae(e,"timeAlive");Vi(i)||(i=1e4),i=ji(i);let o=Ae(e,"timeDetect");return Vi(o)||(o=50),o=ji(o),t.trigger=function(e,a){ke(e)?(Me(n,e)||setTimeout(()=>{t.emit("message",{eventName:"enter",key:e,data:a,now:or(n)})},1),n[e]={data:a,time:Date.now()},null===r&&(r=setInterval(()=>{vn(n,(e,r)=>{if(Date.now()-e.time>i){let e=Ti(n[r]);delete n[r],t.emit("message",{eventName:"leave",key:r,data:e.data,now:or(n)})}}),Be(n)||(clearInterval(r),r=null)},o))):console.log("trigger need key")},t.get=function(){let e=[];return vn(n,(t,n)=>{e.push({key:n,data:t.data})}),e=Ti(e),e},t},e.arr2dt=function(e,t=""){if(!Mn(e))return{};if(Mn(t))return or(e)===or(t)?Yi(e,t):{};let n=[];for(let r=0;r<or(e);r++)n.push(Ti(t));return Yi(e,n)},e.arrAccum=function(e){if(!Mn(e))return[];let t=[],n=0;return vn(e,function(e){n+=Ir(e),Ne(e)?t.push(n):t.push("")}),t},e.arrAdd=function(){if(or(arguments)<2)return[];let e=arguments[0];for(let t=1;t<or(arguments);t++){e=Wi(e,arguments[t])}return e},e.arrAt=go,e.arrDiff=Xo,e.arrFilterByKeywords=function(e,t){if(!Mn(e))return[];if(!ke(t)&&!Mn(t))return[];let n=null;n=ke(t)?ea(t," "):t;let r=or(n);return bn(e,e=>function(e){let t=!1,i=0;for(let o=0;o<r;o++){let a=n[o],s=a,l="+"===ta(a,1),c="-"===ta(a,1);if((l||c)&&(s=ra(a,1)),""===Ko(s))continue;let u=e.indexOf(s)>=0;if(l){if(u){t=!0,i=1;break}t=!1,i=0;break}if(c){if(u){t=!1,i=0;break}t=!0,i=1;break}if(u){t=!0;let e=1-o/r;e=e**2,i+=e}}return{hasKeyword:t,weight:i}}(e))},e.arrFilterByNum=function(e){return Mn(e)?e=bn(e=oa(e=Ti(e),Ne),Ir):[]},e.arrFilterByPnum=sa,e.arrFilterByPnumAndToLog=function(e){return Mn(e)?e=bn(e=sa(e),Math.log):[]},e.arrFind=function(e,t){function n(e){return Ce(e)?e:[e]}return Nn(e)||0===(e=n(e)).length||Nn(t)?[]:bn(t=n(t),function(t){let n=-1;for(let r=0;r<e.length;r++)if(la(e[r],t)){n=r;break}return n})},e.arrGroupByMaxmin=function(e,t,n={}){let r=Ae(n,"keyMax");ke(r)||(r="max");let i=Ae(n,"keyMin");ke(i)||(i="min");let o=Ae(n,"keyValue");ke(o)||(o="value");let a=Ae(n,"keyItems");if(ke(a)||(a="items"),!Mn(e))return[];if(!Mn(t))return[];let s=Ti(t);return vn(e,(e,n)=>{let l=Ae(e,o);Ne(l)?l=Ir(l):Ne(e)&&(l=Ir(e)),ca(l)&&vn(t,(t,n)=>{let o=Ae(t,r,null),c=Ae(t,i,null);if(null!==o&&null!==c&&Ne(o)&&Ne(c)){let r=Ae(t,"maxType");"<="!==r&&"<"!==r&&(r="<=");let i,u,f=Ae(t,"minType");">="!==f&&">"!==f&&(f=">="),o=Ir(o),c=Ir(c),i=">="===f?l>=c:l>c,u="<="===r?l<=o:l<o,i&&u&&(Me(s[n],a)||(s[n][a]=[]),s[n][a].push(e))}})}),s},e.arrHas=ua,e.arrInsert=function(e,t,n){if(!Ce(e))return[];if(Ce(n)||(n=[n]),!po(t))return e;if((t=ji(t))>or(e))return e;let r=e;try{r=[...e.slice(0,t),...n,...e.slice(t)]}catch(e){}return r},e.arrLookupByMaxmin=function(e,t,n={}){let r=Ae(n,"keyMax");ke(r)||(r="max");let i=Ae(n,"keyMin");ke(i)||(i="min");let o=Ae(n,"keyValue");ke(o)||(o="value");let a=Ae(n,"keyItems");ke(a)||(a="items");let s=Ae(n,"beforeAddResult",null);if(!Mn(e))return[];if(!Mn(t))return[];if(!Be(Ae(e,0)))return[];let l=Ti(e);return vn(l,(e,n)=>{let c=Ae(e,o);Ne(c)&&(c=Ir(c)),ca(c)&&vn(t,(e,t)=>{let o=Ae(e,r,null),u=Ae(e,i,null);if(null!==o&&null!==u&&Ne(o)&&Ne(u)){let t=Ae(e,"maxType");"<="!==t&&"<"!==t&&(t="<=");let r,i,f=Ae(e,"minType");">="!==f&&">"!==f&&(f=">="),o=Ir(o),u=Ir(u),r=">="===f?c>=u:c>u,i="<="===t?c<=o:c<o,r&&i&&(Ui(s)&&(e=s(e,l[n],n)),Me(l[n],a)||(l[n][a]=[]),l[n][a].push(e))}})}),l},e.arrMax=function(e,t={}){if(!Mn(e))return null;let n=Ae(t,"returnIndex");we(n)||(n=!1);let r=Ae(t,"compareKey",null),i=e;ke(r)&&(i=bn(e,(e,t)=>Ae(e,r,"")));let o=null,a=fa(i,(e,t)=>Ne(t)?(t=Ir(t),null===e?(o=t,t):(e=Math.max(e,t),o=e,e)):e,{returnIndex:!0});if(n)return a;let s=null;return a>=0&&(s=ke(r)?e[a]:o),s},e.arrMin=function(e,t={}){if(!Mn(e))return null;let n=Ae(t,"returnIndex");we(n)||(n=!1);let r=Ae(t,"compareKey",null),i=e;ke(r)&&(i=bn(e,(e,t)=>Ae(e,r,"")));let o=null,a=fa(i,(e,t)=>Ne(t)?(t=Ir(t),null===e?(o=t,t):(e=Math.min(e,t),o=e,e)):e,{returnIndex:!0});if(n)return a;let s=null;return a>=0&&(s=ke(r)?e[a]:o),s},e.arrMulti=ha,e.arrNorm=function(e){if(!Mn(e))return null;let t=ga(e,e);return Ne(t)?t<=0?null:Math.sqrt(t):null},e.arrProduct=ga,e.arrPull=function(e,t){if(!Mn(e))return[];if((Ee(t)||Ne(t)||Se(t)||we(t))&&(t=[t]),!Mn(t))return e;let n=Ti(e);return va(n,t),n},e.arrPullAt=function(e,t){if(!Mn(e))return[];if(po(t)&&(t=[t]),!Mn(t))return e;t=bn(t,e=>ji(e));let n=Ti(e);return Ca(n,t),n},e.arrReduce=fa,e.arrReverse=function(e){if(!Mn(e))return[];let t=Ti(e);return Ba(t),t},e.arrSep=function(e,t){if(!Mn(e))return[];if(!Vi(t)&&!Be(t))return[];let n="",r=null;if(Vi(t))r=t,n="numCount";else if(Be(t))if(Vi(Ae(t,"numCount")))r=t.numCount,n="numCount";else{if(!Vi(Ae(t,"numGroup")))throw new Error("invalid opt.numCount or opt.numGroup");r=t.numGroup,n="numGroup"}let i=or(e),o=[];if("numCount"===n)for(let t=0;t<i;t+=r){let n=[];for(let o=0;o<r;o++){let r=t+o;r<i&&n.push(e[r])}o.push(n)}else if("numGroup"===n){for(let e=0;e<r;e++)o[e]=[];let t=-1;for(let n=0;n<i;n++)t++,t>r-1&&(t=0),o[t].push(e[n])}return o},e.arrSort=qa,e.asind=function(e){return Ne(e)?(e=Ir(e),180*Math.asin(e)/Math.PI):null},e.atan2d=function(e,t){return Ne(e)?(e=Ir(e),Ne(t)?(t=Ir(t),180*Math.atan2(t,e)/Math.PI):null):null},e.atand=function(e){return Ne(e)?(e=Ir(e),180*Math.atan(e)/Math.PI):null},e.attstr=function(e={}){let t=";",n="@",r="table",i="id",o=Ae(e,"uniqItems");we(o)||(o=!1);let a=Ae(e,"dlmItem","");ke(a)&&(t=a);let s=Ae(e,"dlmSep","");ke(s)&&(n=s);let l=Ae(e,"keyTable","");ke(l)&&(r=l);let c=Ae(e,"keyId","");ke(c)&&(i=c);let u=Ae(e,"mode");function f(e){if(!ke(e))return[];let n=Lo(e,t);return o&&(n=Pn(n)),n}function d(e){if(!Mn(e))return"";return o&&(e=Pn(e)),yo(e,t)}function h(e){return e=oa(e,ke),o&&(e=Pn(e)),d(e)}function p(e){let t=[];return vn(e,e=>{let o=Ae(e,r,""),a=Ae(e,i,"");if(ke(o),Se(a)||(Ce(a)?or(a):a=""),Se(a))t.push(`${o}${n}${a}`);else if(Ce(a)){let e=yo(a,n);t.push(`${o}${n}${e}`)}}),e=d(t)}function g(e){if(!ke(e))return[];return oa(f(e),ke)}function m(e){if(!ke(e))return[];let t=f(e),o=[];return vn(t,e=>{let t=Lo(e,n),a=Ae(t,0,""),s=Ae(t,1,"");or(t)>=3&&(t=Ma(t),s=t),o.push({item:e,[r]:a,[i]:s})}),o}function y(e,t){let n=[...g(e),...g(t)];return 0===or(n)?"":h(n)}function v(e,t){let n=[...m(e),...m(t)];return 0===or(n)?"":p(n)}function A(e,t){let n=g(e),r=g(t),i=[];return vn(n,e=>{ua(e,r)||i.push(e)}),0===or(i)?"":h(i)}function b(e,t){let n=m(e),r=m(t),i=[];return vn(n,e=>{ua(e,r)||i.push(e)}),0===or(i)?"":p(i)}"1p"!==u&&"2p"!==u&&(u="auto");let w={parse:function(e,t={}){if(!ke(e))return[];let r=Ae(t,"mode");return"1p"!==r&&"2p"!==r&&(r=u),"1p"===r?g(e):"2p"===r||e.indexOf(n)>=0?m(e):g(e)},join:function(e,t={}){if(!Mn(e))return"";let n=Ae(t,"mode");if("1p"!==n&&"2p"!==n&&(n=u),"1p"===n)return h(e);if("2p"===n)return p(e);let o=Ae(e,0);return Me(o,r)&&Me(o,i)?p(e):h(e)},remove:function(e,t,r={}){if(!ke(e))return"";if(!ke(t))return e;let i=Ae(r,"mode");return"1p"!==i&&"2p"!==i&&(i=u),"1p"===i?A(e,t):"2p"===i||t.indexOf(n)>=0?b(e,t):A(e,t)},add:function(e,t,r={}){let i=Ae(r,"mode");if("1p"!==i&&"2p"!==i&&(i=u),"1p"===i)return y(e,t);if("2p"===i)return v(e,t);let o=e.indexOf(n)>=0,a=t.indexOf(n)>=0;return o||a?v(e,t):y(e,t)}};return w},e.b642obj=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:{};if(!Se(e))return r("invalid b64");let i={};try{let t=Oa(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`b642str: ${t.msg}`);let n=Pa(t.msg,{returnWithStateAndMsg:!0});if("error"===n.state)return r(`j2o: ${n.msg}`);i=n.msg}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.b642str=Oa,e.b642u16arr=Ya,e.b642u8arr=Va,e.binstr=Wa,e.blob2ab=Xa,e.blob2b64=Ka,e.blob2str=function(e){if(!Ja(e))return Promise.reject("invalid bb");if(!_a())return Promise.reject("no window");let t=Ga();try{let n=new FileReader;n.onload=function(){t.resolve(n.result)},n.onerror=function(e){t.reject(e)},n.readAsText(e)}catch(e){t.reject(e)}return t},e.blob2u8arr=Za,e.blobs2b64s=es,e.blobs2u8arrs=ts,e.bodyLog=function(){let e=`\n <div style="padding:5px; font-size:10pt; font-family:Microsoft JhengHei, Helvetica;">\n <span style="color:#f26;">log: </span>\n <code>${is(bn(arguments,function(e){return ar(e)}).join(", "))}</code>\n </div>\n `;document.querySelector("body").insertAdjacentHTML("beforeend",e)},e.browserView=os,e.browserViewFromBlob=function(e,t){Ja(e)&&os(e,t)},e.browserViewFromText=function(e){Se(e)&&os(e,"text/plain")},e.browserViewFromU8arr=function(e,t){as(e)&&os(e,t)},e.bs2u8arr=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!ke(e))return r("invalid bs");let i=null;try{let t=e.length;i=new Uint8Array(t);for(let n=0;n<t;n++)i[n]=e.charCodeAt(n)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.bufRead=ss,e.bufReadDbl=ls,e.bufWrite=cs,e.bufWriteDbl=us,e.cache=function(){let e=qi({type:"safe"}),t={};function n(t,n){setTimeout(()=>{e.emit(t,n)},1)}function r(e,r={}){if(Me(t,e))return;let i=Ae(r,"fun");Ui(i)||(i=async()=>{});let o=Ae(r,"inputs");Ce(o)||(o=[]);let a=Ae(r,"timeExpired");Vi(a)||(a=5e3),a=ji(a);let s=Ae(r,"timeFrom");"end"!==s&&(s="start");let l=Ae(r,"useCacheWhenError");we(l)||(l=!1);let c=Ae(r,"useCloneDeep");we(c)||(c=!0),t[e]={needExec:!0,fun:i,pm:null,gen:0,inputs:o,value:null,time:null,timeExpired:a,timeFrom:s,useCacheWhenError:l,useCloneDeep:c},n("message",{fun:"set",key:e,timeExpired:a,timeFrom:s,useCacheWhenError:l,useCloneDeep:c})}async function i(e,r={}){if(Me(t,e)){let i=t[e],o=Ae(r,"useCloneDeep");if(we(o)||(o=i.useCloneDeep),i.pm)return n("message",{fun:"get",key:e,msg:"waiting"}),await i.pm,o?Ti(i.value):i.value;let a=Date.now(),s=i.needExec,l=a-i.time;if(s?n("message",{fun:"get",key:e,msg:"execute first"}):i.timeExpired>0&&l>i.timeExpired&&(n("message",{fun:"get",key:e,msg:"execute by timeExpired",timeDiff:l}),s=!0),s){n("message",{fun:"get",key:e,msg:"fun start"}),i.needExec=!1;let t=i.gen,r=async()=>{try{let r;try{r=await i.fun(...i.inputs)}catch(o){if(n("error",{fun:"get",key:e,msg:o}),!i.useCacheWhenError)throw i.gen===t&&(i.needExec=!0),o;r=void 0}i.gen===t&&(i.value=r,i.time="end"===i.timeFrom?Date.now():a)}finally{i.pm=null,n("message",{fun:"get",key:e,msg:"fun end"})}};i.pm=r(),await i.pm}else n("message",{fun:"get",key:e,msg:"use cache"});return o?Ti(i.value):i.value}return n("error",{fun:"get",key:e,msg:"invalid key"}),null}return e.set=r,e.getProxy=async function(e,t={}){return r(e,t),i(e,t)},e.get=i,e.update=function(e,r){Me(t,e)&&(n("message",{fun:"updateValue",key:e}),t[e].value=r,t[e].time=Date.now(),t[e].gen+=1)},e.clear=function(e){Me(t,e)&&(n("message",{fun:"clear",key:e}),t[e].needExec=!0)},e.remove=function(e){Me(t,e)&&(n("message",{fun:"remove",key:e}),delete t[e])},e},e.cacheBd=function(e,t={}){let n=Ae(t,"nMax");Vi(n)||(n=200),n=ji(n);let r=Ae(t,"nTrigger");Vi(r)||(r=3),r=ji(r);let i=null,o=!1,a=async(...t)=>(o=!0,i=await e(...t),o=!1,i);return{get:a,getFromCache:async(...e)=>{for(let t=1;t<=n&&(t>r&&!o&&await a(...e).catch(()=>{}),null===i);t++)await fs(1e3);if(null===i)throw new Error(`exceeded nMax[${n}]`);return i}}},e.cacheSt=function(e={}){let t=Ae(e,"timeExpire",null);Vi(t)||(t=18e5),t=ji(t);let n=Ae(e,"timeDetect",null);Vi(n)||(n=2e3),n=ji(n);let r=qi({type:"safe"}),i={},o=e=>{if(Me(i,e)){let t=`checkWithSet: key in use: ${e}`;return r.emit("checkWithSet",{state:"error",msg:t}),!1}i[e]={time:Date.now(),value:!0};let t=`checkWithSet: ${e}`;return r.emit("checkWithSet",{state:"success",msg:t}),!0},a=setInterval(()=>{r.emit("detect",{state:"start"});let e=Date.now();for(let n of Object.keys(i)){let r=i[n];r&&e-r.time>t&&delete i[n]}r.emit("detect",{state:"finish"})},n);return r.checkWithSet=o,r.setWithFree=async(e,t)=>{r.emit("setWithFree",{state:"start"});let n=[];for(let t of e){if(!o(t)){for(let e of n)delete i[e];let e=`setWithFree: key in use: ${t}`;return r.emit("setWithFree",{state:"error",msg:e}),Promise.reject(e)}n.push(t)}try{let n=await t(),i=`setWithFree: ${e.join(", ")}`;return r.emit("setWithFree",{state:"success",msg:i}),n}catch(e){let t=`setWithFree: fn threw: ${e&&e.message||e}`;throw r.emit("setWithFree",{state:"error",msg:t}),e}finally{for(let e of n)delete i[e]}},r.set=async(e,t=!0)=>{i[e]={time:Date.now(),value:t};let n=`set: ${e}`;r.emit("set",{state:"success",msg:n})},r.get=async e=>{let t=i[e],n=void 0===t?null:t.value,o=`get: ${e}`;return r.emit("get",{state:"success",msg:o}),n},r.check=async e=>{let t=Me(i,e),n=`check: ${e} = ${t}`;return r.emit("check",{state:"success",msg:n}),t},r.del=async e=>{delete i[e];let t=`del: ${e}`;r.emit("del",{state:"success",msg:t})},r.waitExist=async(e,t={})=>{let n=Ae(t,"attemptNum",null);Vi(n)||(n=30),n=ji(n);let o=Ae(t,"timeInterval",null);Vi(o)||(o=100),o=ji(o),r.emit("waitExist",{state:"start"});try{await ds(()=>Me(i,e),{attemptNum:n,timeInterval:o})}catch(t){let i=`waitExist timeout (${n*o}ms): ${e}`;return r.emit("waitExist",{state:"error",msg:i}),Promise.reject(i)}let a=`waitExist resolved: ${e}`;r.emit("waitExist",{state:"success",msg:a})},r.waitNotExist=async(e,t={})=>{let n=Ae(t,"attemptNum",null);Vi(n)||(n=30),n=ji(n);let o=Ae(t,"timeInterval",null);Vi(o)||(o=100),o=ji(o),r.emit("waitNotExist",{state:"start"});try{await ds(()=>!Me(i,e),{attemptNum:n,timeInterval:o})}catch(t){let i=`waitNotExist timeout (${n*o}ms): ${e}`;return r.emit("waitNotExist",{state:"error",msg:i}),Promise.reject(i)}let a=`waitNotExist resolved: ${e}`;r.emit("waitNotExist",{state:"success",msg:a})},r.clear=()=>{clearInterval(a)},r},e.cbol=function(e){if(we(e))return e;if(0===e)return!1;if(1===e)return!0;let t=!1;return ke(e)&&"true"===(e=hs(Ko(e)))&&(t=!0),t},e.cdbl=Ir,e.ceil=_l,e.cfilesize=function(e){return Ne(e)?(e=Ir(e))<1024?Xl(e,1)+" b":e<1048576?Xl(e/1024,1)+" kb":e<1073741824?Xl(e/1024/1024,1)+" mb":e<1099511627776?Xl(e/1024/1024/1024,1)+" gb":"":""},e.cfinancial=function(e,t=0){if(!Ne(e))return"";if(!po(t))return"";let n=(e=Xl(e,t)).split("."),r=n[0],i=n.length>1?"."+n[1]:"",o=/(\d+)(\d{3})/;for(;o.test(r);)r=r.replace(o,"$1,$2");return r+i},e.cint=ji,e.clearXSS=Zl,e.clearXSSDyn=async function(e,t={},n){return Mn(n)||(n=["https://cdn.jsdelivr.net/npm/xss@1.0.15/dist/xss.min.js"]),await ic(n),Zl(e)},e.color=uu,e.composeToTree=wu,e.convertToTree=function(e,t={}){if(!Be(e)&&!Mn(e))return[];let n=Ae(t,"bindKey",null);ke(n)||(n="id");let r=Ae(t,"bindParent",null);ke(r)||(r="parentId");let i=Ae(t,"bindText",null);ke(i)||(i="text");let o=Ae(t,"bindChildren",null);ke(o)||(o="children");let a=Ae(t,"bindType",null);ke(a)||(a="type");let s=Ae(t,"bindNumOfChilren",null);ke(s)||(s="numOfChilren");let l=Ae(t,"bindRoot",null);ke(l)||(l="root");let c=Ae(t,"saveExtProps",null);return we(c)||(c=!1),ke(l)&&(e={[l]:e}),wu(xu(e,{bindKey:n,bindParent:r,bindText:i,bindType:a,bindNumOfChilren:s}),{bindKey:n,bindParent:r,bindChildren:o,saveExtProps:c})},e.copyStrToClipboard=function(e,t={}){if(!Se(e))return"invalid input";let n=Ae(t,"eleParent");Cu(n)||(n=document.body);let r=document.createElement("textarea");if(r.style.position="fixed",r.style.left=0,r.style.top=0,r.style.zIndex=-1,r.style.background="transparent",r.style.color="transparent",r.value=e,n.appendChild(r),r.select(),!Eu(r))return"ele can not be focusd";try{document.execCommand("copy")}catch(e){return"can not copy str to clipboard"}return n.removeChild(r),""},e.cosd=Bu,e.cotd=function(e){return Ne(e)?1/Su(e=Ir(e)):null},e.createExcelWorkbook=ku,e.cscd=function(e){return Ne(e)?1/Fu(e=Ir(e)):null},e.cstr=Na,e.day2cht=function(e,n=!1){if(!Du(e))return"";let r=t(e,"YYYY-MM-DD"),i="";return i=n?r.month()+1+"月"+r.date()+"日":"民國 "+(r.year()-1911)+" 年 "+(r.month()+1)+" 月 "+r.date()+" 日",i},e.debounce=Nu,e.delay=fs,e.dig=Xl,e.digExp=function(e,t=0){if(!Ne(e))return"";if(!po(t))return"";let n="";return n=0===(e=Ir(e))?"0":Math.abs(e)<=1e-6?e.toExponential(t):Xl(e,t),n},e.domAlert=function(e,t={}){if(!ke(e))return;let n=Ae(t,"type","success");Me(Hu,n)||(n="success");let r=Ae(t,"icon",null);ke(r)||(r=Hu[n]);let i="top-right";"top-left"!==t.position&&"bottom-right"!==t.position&&"bottom-left"!==t.position||(i=t.position);let o=Ae(t,"time");ca(o)||(o=4e3),o<0&&(o=4e3);let a=Ae(t,"paddingStyle",null);null===a&&(a={top:14,right:26,bottom:14,left:14});let s="";{let e=Ae(a,"top",0),t=Ae(a,"bottom",0),n=Ae(a,"left",0);s=`padding:${e}px ${Ae(a,"right",0)}px ${t}px ${n}px;`}let l=Ae(t,"textColor","#000");l=ac(l,";","");let c=Ae(t,"backgroundColor","#fff");c=ac(c,";","");let u=Ae(t,"borderWidth",1),f=Ae(t,"borderColor","#ebeef5");f=ac(f,";","");let d=Ae(t,"borderRadius",8),h=Ae(t,"shadowStyle","0 2px 12px 0 rgba(0,0,0,.1)");h=ac(h,";","");let p=Ae(t,"closeIconShift",null);null===p&&(p={top:10,right:10});let g="";{let e=Ae(p,"top",""),t=Ae(p,"bottom",""),n=Ae(p,"left",""),r=Ae(p,"right","");ca(e)&&(e=`top:${e}px;`),ca(t)&&(t=`bottom:${t}px;`),ca(n)&&(n=`left:${n}px;`),ca(r)&&(r=`right:${r}px;`),g=`position:absolute; ${e} ${r} ${t} ${n}`}let m=`alt-${Tu()}`,y=`alt-${Tu()}`,v=`\n <div \n style="display:inline-block; color:${l}; background:${c}; border:${u}px solid ${f}; border-radius:${d}px; box-shadow:${h};"\n onmouseenter="ttWAlertFadeIn('${y}')"\n onmouseleave="ttWAlertFadeOut('${y}')"\n >\n <div style="position:relative; ${s}">\n\n <div style="display:flex; align-items:center;">\n <div style="margin-right:10px;">\n <div style="display:flex;">${r}</div>\n </div>\n <div>${e}</div>\n </div>\n\n <div style="${g}">\n <div \n id="${y}" \n style="display:flex; cursor:pointer; opacity:0;" \n onclick="ttWAlertCancel('${m}')"\n >\n ${Uu}\n </div>\n </div>\n\n </div>\n </div>\n `,A=document.createElement("div");A.id=m,A.style.position="fixed",A.style.transition="transform 0.3s, top 0.5s, bottom 0.5s",A.style.zIndex=-1,A.style.opacity=.001,i.indexOf("-left")>=0?A.style.transform="translateX(-100%)":A.style.transform="translateX(100%)",A.innerHTML=v,document.querySelector("body").appendChild(A);let b=Ga();return function({id:e,position:t,time:n,pm:r}){qu[e]={id:e,position:t,ele:null,loc:{height:null,top:null,bottom:null,left:null,right:null},timeShow:n,timeStart:Date.now(),pm:r},$u(),null===Ou&&(Ou=setInterval(()=>{vn(qu,e=>{Date.now()-e.timeStart>e.timeShow&&(e.pm.resolve(),zu(e.id))}),Be(qu)||(clearInterval(Ou),Ou=null)},50))}({id:m,position:i,time:o,pm:b}),b},e.domAppend=ju,e.domCancelEvent=Yu,e.domCompareText=function(e,t,n,r,i={}){if(!Cu(e))return Promise.reject("invalid ele");let o=Ae(i,"format");"side"!==o&&"line"!==o&&(o="side");let a="side"===o?"side-by-side":"line-by-line",s=zf();ke(t)||(t="Text");let l=Vo(t,t,n,r),c=s.html(l,{drawFileList:!0,matching:"lines",outputFormat:a,...i});c=c.replace('<span class="d2h-file-list-title">Files changed (1)</span>',"");try{e.innerHTML=c}catch(e){console.log(e)}return{diff:l,html:c}},e.domConvertToPic=pm,e.domConvertToPicDyn=async function(e,t={},n){return await pm(e,t)},e.domDetect=function(e,t={}){let n=Ae(t,"timeInterval",null);Vi(n)||(n=20);let r=Ae(t,"tolerancePixel",null);Vi(r)||(r=1);let i,o=qi(),a={offsetWidth:0,offsetHeight:0,clientWidth:0,clientHeight:0,windowWidth:0,windowHeight:0},s=Ti(a),l={width:"",height:""};if(!Ui(e))return console.log("invalid f",e),null;i=setInterval(()=>{let t=e();if(t){let e={offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight,clientWidth:t.clientWidth,clientHeight:t.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight},n=s.offsetWidth-e.offsetWidth,i=s.offsetHeight-e.offsetHeight,c=Math.abs(n)>r,u=Math.abs(i)>r,f="";n>0?f="smaller":n<0&&(f="larger");let d="";if(i>0?d="smaller":i<0&&(d="larger"),l={width:f,height:d},c||u){let n={...s};setTimeout(()=>{e.offsetWidth>0&&e.offsetHeight>0&&(o.emit("resize",{sold:n,snew:e,smode:l,ele:t}),o.emit("resizeWithWindow",{sold:n,snew:e,smode:l,ele:t,from:"dom"}))},1)}a=s,s=e}},n);let c=e=>{o.emit("resizeWithWindow",{sold:a,snew:s,smode:l,from:"window"})};return window.addEventListener("resize",c),o.clear=()=>{clearInterval(i),window.removeEventListener("resize",c)},o},e.domDrag=function(e,t={}){if(!Cu(e))return void console.log("ele is not a HTMLElement",e);let n=Ae(t,"attIdentify",null);ke(n)||(n="dragid");let r=Ae(t,"attIndex",null);ke(r)||(r="dragindex");let i=Ae(t,"attGroup",null);ke(i)||(i="draggroup");let o=Ae(t,"group",null);ke(o)||(o="group");let a=Ae(t,"previewOpacity",null);ca(a)||(a=.4);let s=Ae(t,"previewDisabledOpacity",null);ca(s)||(s=.2);let l=Ae(t,"previewBackground",null);ke(l)||(l="white");let c=Ae(t,"previewBorderWidth",null);ca(c)||(c=1);let u=Ae(t,"previewBorderColor",null);ke(u)||(u="#f26");let f=Ae(t,"timeDragStartDelay",null);ca(f)||(f=120);let d=`c${Tu(8)}`,h=o;e.setAttribute(i,h),e.setAttribute(n,d);let p=Cm(h,d,{attIdentify:n,previewOpacity:a,previewBackground:l,previewBorderWidth:c,previewBorderColor:u}),g=function(e,t){let n=[];return{bind:function(){let r;r="mousedown";let i=function(n){t.dragStart({e:n,ele:e,name:"mousedown"})};e.addEventListener(r,i,!1),n.push({ele:e,name:r,f:i}),r="touchstart";let o=function(n){t.dragStart({e:n,ele:e,name:"touchstart"})};e.addEventListener(r,o,!1),n.push({ele:e,name:r,f:o}),r="touchmove";let a=function(e){t.dragMove({e:e,name:"touchmove"}),e.cancelable&&e.preventDefault()};e.addEventListener(r,a,!1),n.push({ele:e,name:r,f:a})},unbind:function(){vn(n,({ele:e,name:t,f:n})=>{e.removeEventListener(t,n)})}}}(e,{dragStart:e=>{p.emit(h+"-dragStart",e)},dragMove:e=>{p.emit(h+"-dragMove",e)}});g.bind(),Bm({gid:h,attGroup:i,attIndex:r,attIdentify:n,timeDragStartDelay:f,previewOpacity:a,previewDisabledOpacity:s});let m=qi();return p.on(o+"-change",e=>{e.tarEid===d&&m.emit("change",e)}),p.on(o+"-start",e=>{e.tarEid===d&&m.emit("start",e)}),p.on(o+"-move",e=>{e.tarEid===d&&m.emit("move",e)}),p.on(o+"-enter",e=>{e.tarEid===d&&m.emit("enter",e)}),p.on(o+"-leave",e=>{e.tarEid===d&&m.emit("leave",e)}),p.on(o+"-drop",e=>{e.tarEid===d&&m.emit("drop",e)}),m.setIsActive=function(e){xm[h].isActive=e},m.unbind=function(){g.unbind(),function(e,t){let n=xm[e],r=Ti(n.eleIds);gm(r,t),n.eleIds=r,0===r.length&&(n.oevg.unbind(),n.pv.clear(),delete xm[e])}(h,d)},m},e.domDragBarAndScroll=function(e,t,n={}){let r=null,i=null,o=null,a=null,s=null,l=null,c=null,u=null,f=null,d=null,h=null,p=null,g=null,m=null,y=null,v=!1,A=Ae(n,"getHeighRatio",null);L(A)||(A=()=>1);let b=Ae(n,"getWidthRatio",null);L(b)||(b=()=>1);let w=Ae(n,"stopScrollPropagationForPanel",null);be(w)||(w=!1);let I=Ae(n,"stopTouchDragPropagationForPanel",null);be(I)||(I=!1);let x=Ae(n,"useTouchDragForPanel",null);be(x)||(x=!0);let C=e,E=t,B=qi();return r=e=>{let t=e.deltaY/Math.abs(e.deltaY),n=e.deltaX/Math.abs(e.deltaX);B.emit("scrollPanel",{ratioY:t,ratioX:n}),w&&Yu(e)},C.addEventListener("wheel",r),i=e=>{if(x){let t=Ae(e,"touches.0.clientY",0),n=Ae(e,"touches.0.clientX",0),r=-t*A(),i=-n*b();v=!0,B.emit("pressBar",{clientY:r,clientX:i}),I&&Yu(e)}},C.addEventListener("touchstart",i),o=e=>{if(x&&v){let t=Ae(e,"touches.0.clientY",0),n=Ae(e,"touches.0.clientX",0),r=-t*A(),i=-n*b();B.emit("dragBar",{clientY:r,clientX:i}),I&&Yu(e)}},C.addEventListener("touchmove",o,{passive:!1}),a=e=>{x&&v&&(v=!1,B.emit("freeBar"),I&&Yu(e))},C.addEventListener("touchend",a),s=e=>{v=!0,B.emit("pressBar",{clientY:e.clientY,clientX:e.clientX})},E.addEventListener("mousedown",s),l=e=>{v&&(v=!1,B.emit("freeBar"))},E.addEventListener("mouseup",l),c=e=>{v=!0,B.emit("pressBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX})},E.addEventListener("touchstart",c),u=e=>{v&&(B.emit("dragBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX}),Yu(e))},E.addEventListener("touchmove",u,{passive:!1}),f=e=>{v&&(v=!1,B.emit("freeBar"))},E.addEventListener("touchend",f),d=e=>{v&&B.emit("dragBar",{clientY:e.clientY,clientX:e.clientX})},window.addEventListener("mousemove",d),h=e=>{v&&(v=!1,B.emit("freeBar"),w&&Yu(e))},window.addEventListener("mouseup",h),p=e=>{},window.addEventListener("scroll",p,{passive:!1}),g=e=>{},window.addEventListener("wheel",g,{passive:!1}),m=e=>{},document.addEventListener("scroll",m,{passive:!1}),y=e=>{},document.addEventListener("wheel",y,{passive:!1}),B.clear=function(){C.removeEventListener("wheel",r),C.removeEventListener("touchstart",i),C.removeEventListener("touchmove",o),C.removeEventListener("touchend",a),E.removeEventListener("mousedown",s),E.removeEventListener("mouseup",l),E.removeEventListener("touchstart",c),E.removeEventListener("touchmove",u),E.removeEventListener("touchend",f),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",h),window.removeEventListener("scroll",p),window.removeEventListener("wheel",g),document.removeEventListener("scroll",m),document.removeEventListener("wheel",y)},B},e.domDragPreview=Im,e.domDropFiles=function(e){let t=!1,n=!1,r=qi();function i(e){Yu(e),n=!0,!1===t&&(t=!0,r.emit("dropIn",{ev:e}))}function o(e){Yu(e),n=!1,setTimeout(function(){n||(t=!1,r.emit("dropOut",{ev:e}))},100)}function a(e){i(e)}function s(e){o(e)}function l(e){function t(){o(e)}i(e),Fm(e.dataTransfer).then(n=>{let i=oa(n.entries,{type:"file"});r.emit("getFiles",{ev:e,files:n.files,filesTree:i,entries:n.entries,cb:t})}).catch(e=>{r.emit("error",e)})}return e.addEventListener("dragenter",a,!1),e.addEventListener("dragover",a,!1),e.addEventListener("dragleave",s,!1),e.addEventListener("drop",l,!1),r.off=function(){e.removeEventListener("dragenter",a,!1),e.removeEventListener("dragover",a,!1),e.removeEventListener("dragleave",s,!1),e.removeEventListener("drop",l,!1)},r},e.domElementsFromPoint=vm,e.domFadeIn=Lu,e.domFadeOut=Ru,e.domFind=Dm,e.domFinds=fm,e.domGetAttr=Am,e.domGetBoudRect=bm,e.domGetBoudRectRefSelf=wm,e.domGetFileAccept=Hm,e.domGetFiles=qm,e.domGetParents=mm,e.domGetPointFromEvent=ym,e.domGetScrollableParent=function(e){let t=/(auto|scroll)/,n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},r=function(e){return t.test(function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")}(e))};if(!(e instanceof HTMLElement||e instanceof SVGElement))return;let i=mm(e);for(let e=0;e<i.length;e+=1)if(r(i[e]))return i[e];return document.scrollingElement||document.documentElement},e.domGetWindowSize=function(){let e=Kl(),t={width:(()=>{let t=[Ae(e,"innerWidth"),Ae(e,"document.documentElement.clientWidth"),Ae(e,"document.body.clientWidth")];return t=oa(t,ca),$m(t)})(),height:(()=>{let t=[Ae(e,"innerHeight"),Ae(e,"document.documentElement.clientHeight"),Ae(e,"document.body.clientHeight")];return t=oa(t,ca),$m(t)})()};return t},e.domIsClientXYIn=function(e,t,n){if(!ca(e))return void console.log("clientX is not a number",e);if(!ca(t))return void console.log("clientY is not a number",t);if(!Cu(n))return void console.log("ele is not a HTMLElement",n);let r;try{r=n.getBoundingClientRect()}catch(e){return void console.log("invalid ele for getBoundingClientRect",e)}let i=!1;try{i=e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}catch(e){console.log("catch when calculating page information of element",e)}return i},e.domIsFocused=Eu,e.domIsStable=function(e,t={}){if(!Cu(e))return Promise.reject("invalid element");if(!Ui(e.getBoundingClientRect))return Promise.reject("invalid element.getBoundingClientRect");let n=Ae(t,"mode","");"promise"!==n&&"event"!==n&&(n="promise");let r=Ae(t,"tolerance",0),i=Ae(t,"timeDiff",100),o=Ae(t,"timeDetect",50),a=()=>{let t=e.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width,h:t.height}},s=()=>{try{return e.getAnimations({subtree:!0})}catch(e){return[]}},l=async()=>{let e=Ga();try{let t=a();await fs(i);let n=((e,t)=>!!e&&!!t&&Math.abs(e.x-t.x)<=r&&Math.abs(e.y-t.y)<=r&&Math.abs(e.w-t.w)<=r&&Math.abs(e.h-t.h)<=r)(t,a());await Promise.allSettled(s().map(e=>e.finished));let o=0===s().length,l=n&&o;e.resolve(l)}catch(t){e.reject(t)}return e},c=()=>{let t=qi(),n=!1,r=null,i=null,a=!1;return t.create=()=>{r=setInterval(()=>{n=(e=>{let n=!1;if(!Cu(e))return n;try{let e=!1,r=!1;i=setInterval(()=>{a?clearInterval(i):e||(e=!0,l().then(e=>{a||r!==e&&(r=e,t.emit("stable",e))}).catch(()=>{}).finally(()=>{e=!1}))},o),n=!0}catch(e){}return n})(e),n&&clearInterval(r)},50)},t.dispose=()=>{let e=!1;try{clearInterval(r),clearInterval(i),a=!0,e=!0}catch(e){}return e},t},u=null;return"promise"===n?u=l():"event"===n&&(u=c()),u},e.domIsVisible=function(e,t={}){if(!Cu(e))return Promise.reject("invalid element");if(zm())return Promise.reject("invalid IntersectionObserver");let n=Ae(t,"mode","");"promise"!==n&&"event"!==n&&(n="promise");let r=()=>{let t=qi(),n=!1,r=null,i=!1,o=new IntersectionObserver(e=>{if(i)return;let n=e[0].isIntersecting;t.emit("visible",n)});return t.create=()=>{r=setInterval(()=>{i?clearInterval(r):(n=(e=>{let t=!1;if(!Cu(e))return t;try{o.observe(e),t=!0}catch(e){}return t})(e),n&&clearInterval(r))},50)},t.dispose=()=>{let e=!1;try{clearInterval(r),o.disconnect(),i=!0,e=!0}catch(e){}return e},t},i=null;return"promise"===n?i=(()=>{let t=Ga();try{let n=new IntersectionObserver(e=>{t.resolve(e[0].isIntersecting),n.disconnect()});n.observe(e)}catch(e){t.reject(e)}return t})():"event"===n&&(i=r()),i},e.domPrepend=hm,e.domRemove=dm,e.domRenderMarkdownMind=jm,e.domRenderMarkdownMindDyn=async function(e,t,n={},r){return Mn(r)||(r=["https://cdn.jsdelivr.net/npm/d3@7.8.3/dist/d3.min.js","https://cdn.jsdelivr.net/npm/markmap-view@0.14.4/dist/index.min.js","https://cdn.jsdelivr.net/npm/markmap-lib@0.14.4/dist/browser/index.min.js"]),await ic(r),jm(e,t,n)},e.domRipple=function(e,t,n={}){let r=Ae(n,"timeDuration",null);Vi(r)||(r=1e3);let i=Ae(n,"color",null);if(ke(i)||(i="rgba(255, 255, 255, 0.5)"),!Cu(e))return;e.style.position="relative",e.style.overflow="hidden";let o=e.getBoundingClientRect(),a=t.clientX-o.left,s=t.clientY-o.top,l=2*Math.max(e.clientWidth,e.clientHeight),c=document.createElement("div");c.style.width=`${l}px`,c.style.height=`${l}px`,c.style.transition=`all ${r/1e3}s linear`,c.style.position="absolute",c.style.zIndex=1,c.style.left=`${a}px`,c.style.top=`${s}px`,c.style.borderRadius="50%",c.style.transformOrigin="center",c.style.transform="translate(-50%,-50%) scale(0)",c.style.background=i,c.style.userSelect="none",c.style.pointerEvents="none",e.appendChild(c),setTimeout(()=>{c.style.transform="translate(-50%,-50%) scale(2)",c.style.opacity=0},1),setTimeout(()=>{dm(c)},r)},e.domScrollIntoView=function(e,t={}){if(!Cu(e))return;Ee(t)||(t={});let n={behavior:"smooth"};n={...n,...t},Vu()&&Qy(),e.scrollIntoView(n)},e.domScrollTo=function(e,t={}){if(!Cu(e))return;Ee(t)||(t={});let n={behavior:"smooth"};n={...n,...t},Vu()&&Qy(),e.scrollTo(n)},e.domSetAttr=function(e,t,n){if(!Cu(e))return null;if(!ke(t))return null;if(!ke(n)&&!Ne(n))return null;try{return e.setAttribute(t,n),e.getAttribute(t)}catch(e){}return null},e.domShowImages=jy,e.domShowImagesDyn=async function(e,t=null,n={},r){return await jy(e,t,n)},e.domShowInputAndGetFiles=Yy,e.domShowInputAndGetFilesU8Arrs=function(e={}){let t=Ae(e,"kind","*"),n=Ae(e,"multiple");we(n)||(n=!1);let r=Ae(e,"entireHierarchy");we(r)||(r=!1);let i=Ae(e,"sizeMbLimit");Ne(i)||(i=1e3),i=Ir(i);let o=Ga(),a=[];return Yy({kind:t,multiple:n,entireHierarchy:r,sizeMbLimit:i}).then(function(e){let t=Ga(),n=Ae(e,"errs",{}),r=Ae(e,"files",[]);return Be(n)?t.reject(n):t.resolve(r),t}).then(function(e){return vn(e,function(e){a.push({name:e.name,size:e.size,type:e.type})}),ts(e)}).then(function(e){vn(e,function(e,t){a[t].u8a=e}),o.resolve(a)}).catch(function(e){o.reject(e)}),o},e.domShowInputDatatime=function(e,n={}){let r=Ae(n,"type","");"date"!==r&&"datetime-local"!==r&&(r="datetime-local");let i=Ae(n,"eleRef",null);Cu(i)||(i=document.activeElement);let o=Ga(),a="drf"+Tu(),s="GrpDomShowDatatime";dm(`[name=${s}]`);let l=!1,c="";if("date"===r)Du(e)&&(l=!0,c=e);else if(Wy(e)){l=!0,c=t(e).format("YYYY-MM-DDTHH:mm")}ke(c)&&(c=`value="${c}"`);let u=document.createElement("div");u.setAttribute("name",s),u.style.width=0,u.style.height=0,u.style.overflow="hidden",u.innerHTML=`\n <div style="transform:translateY(-100%);">\n <input id="${a}" type="${r}" style="opacity:0;" ${l?c:""} />\n </div>\n `;let f=null;Cu(i)?i.parentNode.insertBefore(u,i.nextSibling):document.querySelector("body").appendChild(u);let d=!1;function h(){if(!d){d=!0;try{f.removeEventListener("change",g,!0),i.removeEventListener("focusout",m,!0)}catch(e){}if(dm(`[name=${s}]`),ke(p)){let e="";e="date"===r?p:`${p}:00`,o.resolve(e)}}}let p="";function g(e){try{p=e.target.value}catch(e){console.log(e)}h()}function m(e){setTimeout(()=>{h()},50)}return setTimeout(()=>{f=Dm("#"+a),f.addEventListener("change",g,!0),f.showPicker()},1),i.addEventListener("focusout",m,!0),o},e.domTooltip=function(e,t,n={}){let r=null,i=null;function o(){null!==r&&r.destroy(!0),e.setAttribute("tippystate",""),clearInterval(i)}let a={arrow:!0,theme:"dark",placement:"bottom",delay:150};n=Be(n)?zy(a,n):a;let s=t;t||(s=e.innerHTML);let l=Ne(e.getAttribute("tippystate"));if(e.setAttribute("tippystate","5"),l)return;s=`<div style="text-align:left;">${s}</div>`;let c=ob;ob.default&&(c=ob.default),r=c(e,{...n,content:s,allowHTML:!0,onHidden(){o()},onDestroy(){r=null,o()}}),r.show(),i=setInterval(()=>{let t=e.getAttribute("tippystate");Ne(t)?(t=ji(t),t-=1,e.setAttribute("tippystate",t),t<=0&&o()):o()},1e3)},e.domTriggerEvent=Vy,e.domVirtualCreate=ab,e.domVirtualCreateQueue=function(){return new function(){let e=fb(1);return async function(t,n={}){return e(ab,t,n)}}},e.downloadExcelFileFromData=wF,e.downloadExcelFileFromDataDyn=async function(e,t="data",n,r){let i=await wF(e,t,n);return""!==Ae(i,"error","")?Promise.reject(i.error):i},e.downloadFileFromB64=function(e,t){if(!_a())return void console.log("no window");if(!ke(e))return void console.log("no filename");let n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e.downloadFileFromBlob=db,e.downloadFileFromText=function(e,t,n=!0){if(!_a())return void console.log("no window");if(!ke(e))return void console.log("invalid filename");if(!Se(t))return void console.log("invalid content");if(!we(n))return void console.log("withBOM is not a boolean");let r;r=n?new Blob(["\ufeff",t]):new Blob([t]),db(e,r)},e.downloadFileFromU8Arr=function(e,t){if(!_a())return void console.log("no window");if(!ke(e))return void console.log("no filename");if(!as(t))return void console.log("no data");db(e,IF(t))},e.dtmapping=xF,e.dtpick=CF,e.estimateTicks=function(e,t,n={}){if(!Ne(e))throw new Error("rmin is not a number");if(e=Ir(e),!Ne(t))throw new Error("rmax is not a number");if(e===(t=Ir(t))){let t=null;t=0===e?1:Math.abs(e/10);let n=BF(t,{returnDigit:!0});return t=EF(t,n),{tickNum:3,tickInterval:t,tickPositions:[e-t,e,e+t],tickDig:n}}if(e>t)throw new Error(`rmin[${e}] > rmax[${t}]`);let r=Ae(n,"testTickNums");Mn(r)||(r=[3,4,5]);let i=e,o=t,a=SF(i),s=SF(o),l=Math.max(a.r,s.r),c=Math.log10(l),u=i/l,f=o/l,d=(u+f)/2,h=f-u,p=[];vn(r,e=>{let t=h/(e-1),n=BF(t,{returnDigit:!0});n=Math.min(n,2),vn(Xi(n,-1,-1),n=>{let r=n-c;r=Math.max(r,0);let i=_l(t,n),o=i-1/Math.pow(10,n);o=EF(o,n);let a=i+1/Math.pow(10,n);a=EF(a,n);let s=[o,i,a];s=oa(s,e=>e>0);let g=EF(d,n),m=g-1/Math.pow(10,n);m=EF(m,n);let y=g+1/Math.pow(10,n);y=EF(y,n);let v=[m,g,y];vn(s,t=>{let i=l*t;i=EF(i,r),vn(v,o=>{let a=[],s=[];{let i=o-(e-1)/2*t;for(let o=0;o<e;o++){let e=i+o*t;e=EF(e,n),a.push(e);let c=l*e;c=EF(c,r),s.push(c)}}let c=(d=a)&&d.length?d[0]:void 0;var d;let g=Aa(a);if(c>u||g<f)return!0;let m=(u-c)/h,y=(g-f)/h,v=(m+y)/2,A=0;vn(s,e=>{xr(e)&&A++});let b=A/e,w=0;vn(a,e=>{0===e&&w++});let I=w/e,x=0;vn(a,e=>{.5===e&&x++});let C=x/e,E=0;vn(a,e=>{1===e&&E++});let B=E/e,S={diff:v,rngCenter:o,numInt:A,ratInt:b,num0:w,rat0:I,num5:x,rat5:C,num10:E,rat10:B,overMin:m,overMax:y,fitness:v+.2*n+.1*e+1.5*m+1.5*y+(1-.25*b)+(1-.4*I)+(1-.3*C)+(1-.3*B),idg:n,tickNum:e,_tickDig:n,_tickInterval:t,_tickPositions:a,tickDig:r,tickInterval:i,tickPositions:s};p.push(S)})})})}),p=Fa(p,"fitness");let g=Ae(p,0);return{tickNum:g.tickNum,tickInterval:g.tickInterval,tickPositions:g.tickPositions,tickDig:g.tickDig}},e.evem=qi,e.execCli=async function(e,t=[],n={}){if(!ke(e))return{ok:!1,stdout:"",stderr:"",code:null,error:"command 須為非空字串",durationMs:0,attempts:0};Ce(t)||(t=[]),Ee(n)||(n={});let{maxRetries:r=0,retryDelayMs:i=5e3,...o}=n,a=Ae(o,"cwd",null);ke(a)?o.cwd=a:o.cwd=process.cwd();let s=Ae(o,"input",null);ke(s)?o.input=s:o.input=void 0;let l=Ae(o,"env",null);Ee(l)?o.env=l:o.env=void 0;let c=Ae(o,"validate",null);Ui(c)||ke(c)?o.validate=c:o.validate=void 0;let u=Ae(o,"onStdout",null);Ui(u)?o.onStdout=u:o.onStdout=void 0;let f=Ae(o,"onStderr",null);Ui(f)?o.onStderr=f:o.onStderr=void 0,r=po(r)?ji(r):0,i=Vi(i)?ji(i):5e3;let d=Ae(o,"timeoutMs",null);Vi(d)?o.timeoutMs=ji(d):o.timeoutMs=12e4;let h,p=Ae(o,"maxBuffer",null);Vi(p)?o.maxBuffer=ji(p):o.maxBuffer=10485760;let g=0;for(let n=0;n<=r;n++){if(n>0){let e=Math.min(i*n,15e3);await fs(e)}if(h=await qF(e,t,o),g=n+1,h.ok)return h.attempts=g,h;if(h.error.includes("ENOENT"))break;if(2===h.code)break}return h.attempts=g,h},e.execCliCore=LF,e.execCliJsonRpc=async function(e,t=[],n=[],r={}){let i=Date.now(),o=(e,t,n={})=>({ok:!1,results:{},responses:[],error:t,errorType:e,durationMs:Date.now()-i,exitCode:null,...n});if(!ke(e))return o("params","command 須為非空字串");if(Ce(t)||(t=[]),!Ce(n))return o("params","requests 須為陣列");for(let e=0;e<n.length;e++){let t=n[e];if(!Ee(t)||!ke(t.method)&&!ke(t.notify))return o("params",`requests[${e}] 須為含method或notify之物件`)}Ee(r)||(r={});let a=Ae(r,"timeoutMs");Vi(a)||(a=12e4);let s=Ae(r,"jsonrpc");!0===s&&(s="2.0"),ke(s)||(s=null);let l=Ae(r,"continueOnError");we(l)||(l=!1);let c=Ae(r,"onNotify"),u=Ae(r,"onServerRequest"),f=new Map,d=null,h=0,p={},g=[],m=(e,t,n)=>{let r={};return null!==s&&(r.jsonrpc=s),void 0!==e&&(r.id=e),r.method=t,void 0!==n&&(r.params=n),r},y=$F(e,t,{cwd:Ae(r,"cwd"),env:Ae(r,"env"),timeoutMs:a,exitGraceMs:Ae(r,"exitGraceMs"),onStderr:Ae(r,"onStderr"),onLine:e=>{if(""===(e=e.trim()))return;let t;try{t=JSON.parse(e)}catch{return}if(!Ee(t))return;let n=void 0!==t.id&&null!==t.id;if(n&&("result"in t||"error"in t)){let e=f.get(t.id);return void(e&&(f.delete(t.id),e.pm.resolve({msg:t})))}n&&ke(t.method)?Ui(u)&&u(t,y):Ui(c)&&c(t)},onExit:e=>{d=e;for(let[t,n]of f)n.pm.resolve({exit:e});f.clear()}}),v=(e,t)=>{let n="exit";e.timeout?n="timeout":ke(e.error)&&e.error.includes("ENOENT")&&(n="notfound");let r=ke(e.error)?e.error:`子進程於回應前結束(code ${e.code})`;return o(n,`${t}: ${r}`,{results:p,responses:g,exitCode:e.code})},A=null;for(let e of n){if(!ke(e.method)){if(!await y.writeLine(JSON.stringify(m(void 0,e.notify,e.params)))){A=v(d||await y.stop(),e.notify);break}continue}let t=h;h+=1;let n=Ga();if(f.set(t,{method:e.method,pm:n}),!await y.writeLine(JSON.stringify(m(t,e.method,e.params)))){f.delete(t),A=v(d||await y.stop(),e.method);break}let r=await n;if(r.exit){A=v(r.exit,e.method);break}let i=r.msg;if("error"in i&&null!==i.error&&void 0!==i.error){if(p[e.method]=null,g.push({id:t,method:e.method,result:null,error:i.error}),!l){let t=Ae(i,"error.message");A=o("rpc",`${e.method}: ${ke(t)?t:JSON.stringify(i.error)}`,{results:p,responses:g});break}}else p[e.method]=i.result,g.push({id:t,method:e.method,result:i.result,error:null})}let b=await y.stop();if(A)return A.durationMs=Date.now()-i,null===A.exitCode&&(A.exitCode=b.code),A;let w=g.filter(e=>null!==e.error);if(w.length>0){let e=w[0],t=Ae(e,"error.message");return{ok:!1,results:p,responses:g,error:`${e.method}: ${ke(t)?t:JSON.stringify(e.error)}`,errorType:"rpc",durationMs:Date.now()-i,exitCode:b.code}}return{ok:!0,results:p,responses:g,error:"",errorType:"",durationMs:Date.now()-i,exitCode:b.code}},e.execCliSession=$F,e.execJsCode=async function(e,t={}){e=o.resolve(e);let n=(await import(s.pathToFileURL(e).href)).default;if(!Ui(n))throw new Error(`the default export of [${e}] is not a function`);return await n(t)},e.execProcess=function(e,t,n={}){if(!Mn(t)&&!ke(t))throw new Error("args is not an effective array or string");ke(t)&&(t=[t]);let i=Ae(n,"mode");"spawn"!==i&&"exec"!==i&&"execFile"!==i&&(i="spawn");let o=Ae(n,"cbStdout"),a=Ae(n,"cbStderr"),s=Ae(n,"codeCmd");ke(s)||(s="utf8");let l=Ae(n,"useChcp");we(l)||(l=!1);let c=Ae(n,"timeout");(!Ne(c)||c<=0)&&(c=null);let u=Ga();if(!ua(i,["spawn","exec","execFile"]))return u.reject(`invalid mode[${i}]`),u;let f=null,d="";try{if("spawn"===i){let n=ta(e,1),i=na(e,1);if('"'===n||'"'===i||"'"===n||"'"===i)throw new Error("prog of spawn doens not need to add quotes");f=r.spawn(e,t,{windowsHide:!0,shell:!1})}else if("exec"===i){let n="";l&&(n="cmd /c chcp 65001>nul &&"),f=r.exec(`${n} ${e} ${t.join(" ")} & exit`,{windowsHide:!0,encoding:s})}else"execFile"===i&&(f=r.execFile(e,t,{windowsHide:!0,encoding:s}))}catch(e){return u.reject(e),u}f.stdout.on("data",e=>{let t="";t="spawn"===i?e.toString(s):e.toString(),d+=t+"\n",Ui(o)&&o(t)}),f.stderr.on("data",e=>{let t="";t="spawn"===i?e.toString(s):e.toString(),d+=t+"\n",Ui(a)&&a(t)});let h=null,p=!1;return null!==c&&(h=setTimeout(()=>{p=!0,f&&f.pid&&FF(f.pid).catch(()=>{})},c)),f.on("close",e=>{null!==h&&clearTimeout(h),p?u.reject(`timeout[${c}ms]:\n${d}`):0!==e?u.reject(`code[${e}]:\n${d}`):u.resolve(d)}),f.on("error",e=>{null!==h&&clearTimeout(h),u.reject(e)}),u},e.execProcessKillPid=FF,e.filepathToTree=function(e,t={}){if(!Mn(e))return{};let n=Ae(t,"delimiter");ke(n)||(n="❯");let r=Ae(t,"bindRoot");ke(r)||(r="");let i=ke(r),o="";o=i?r:"root";let a=Ae(t,"soryItems"),s=bn(e,(e,t)=>{"folder"!==e.type&&"file"!==e.type&&(e.type="file");let r=(e=>{let t=ea(e=(e=e.replace(/\\\\/g,"\\")).replace(/\\/g,"/"),"/");return{ss:t,cfp:yo(t,n)}})(e.path);return{ind:t,type:e.type,ss:r.ss,data:Ti(e)}}),l=e=>{let t=or(e),r=[];for(let i=0;i<t;i++){let t=[];for(let n=0;n<=i;n++)t.push(e[n]);let o=yo(t,n);r.push({id:o,name:e[i]})}return r},c=-1,u=[],f={};vn(s,e=>{let t=null;t=[o];let r=null;r=o;let i=or(e.ss)-1;vn(e.ss,(o,a)=>{let s=a<i||"folder"===e.type;t.push(o);let d=null,h=null;a===i&&(d=e.ind,h=e.data);let p=yo(t,n),g=l(t);if(Me(f,p)){let t=f[p],n="folder"===Ae(t,"_type","");if(!n&&s)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${p}] is unrecognized from a file to folder`);if(!n&&!s)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${p}] get repeat data from two files`);if(n&&!s)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${p}] is unrecognized from a folder to file`);if(Be(f[p].data)&&Be(h))throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${p}] get repeat data from two folders`);if(null===f[p].data&&Be(h)){f[p]._indOri=d,f[p].data=h;let e=f[p]._indNormalize,t=u[e];u[e]={...h,type:t.type,path:t.path}}}else{c++;let e=c,n=null;n=s?{_indOri:d,_indNormalize:e,ns:or(t),ts:Ti(t),pathInfors:g,_type:"folder",type:"array",numOfChilren:-1,id:p,parentId:r,text:o,children:[],data:h}:{_indOri:d,_indNormalize:e,ns:or(t),ts:Ti(t),pathInfors:g,_type:"file",type:"node",numOfChilren:-1,id:p,parentId:r,text:o,data:h},f[p]=n,u.push({...Ae(f[p],"data",{}),type:f[p]._type,path:"/"+yo(t,"/")})}r=p})});let d=VF(f);if(d=Fa(d,"id"),d=Fa(d,"ns"),Ui(a)){let e=[];vn(KF(d,"ns"),(t,n)=>{vn(KF(t,"parentId"),(t,r)=>{let i=a(t,r,n);e=[...e,...i]})}),d=e}let h=[],p=[];vn(d,e=>{"folder"===e._type?h.push(e):p.push(e)});let g=KF(h,"ns"),m=KF(p,"ns"),y=jF(bn(h,"ns")),v=jF(bn(p,"ns")),A=null;{let e=[o];A=[{_indOri:null,_indNormalize:null,ns:or(e),ts:Ti(e),pathInfors:l(e),_type:"folder",type:"array",numOfChilren:-1,id:o,parentId:"",text:o,children:[],data:null}]}let b={};b[o]="0.children";let w={};w[o]="0";for(let e=2;e<=y;e++){vn(g[e],e=>{let t=Ae(b,e.parentId,"");if(!ke(t))throw console.log("kpPathFd",b),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in folder`);let n=Ae(A,t);if(Ce(n)||fu(A,t,[]),n=Ae(A,t),!Be(Tm(n,{id:e.id}))){n.push({...e,children:[]});let r=`${t}.${or(n)-1}`;b[e.id]=`${r}.children`,w[e.id]=r}})}let I=Ti(A),x={};for(let e=2;e<=v;e++){vn(m[e],e=>{let t=Ae(b,e.parentId,"");if(!ke(t))throw console.log("kpPathFd",b),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in file`);let n=Ae(A,t);if(!Ce(n))throw console.log("treeItems",A),console.log("k",t),console.log("v",e),new Error("無預先建置資料夾");if(!Be(Tm(n,{id:e.id}))){n.push(e);let r=`${t}.${or(n)-1}`;x[e.id]=r,w[e.id]=r}})}return{treeItems:A,treeItemsFolder:I,kpPath:w,fpsNormalize:u}},e.files2data=function(e){if(!Ce(e))return Promise.reject("invalid files");let t=Ga(),n=bn(e,function(e){return{name:e.name,size:e.size,type:e.type}});return es(e).then(function(e){let r=bn(e,function(e){return{b64:e}}),i=ZF(n,r);t.resolve(i)}).catch(function(e){t.reject(e)}),t},e.flattenToConn=xu,e.flattenTree=function(e,t={}){if(Ce(e)){if(0===e.length)return[]}else{if(!Ee(e))return[];if(kn(e))return[]}let n=Ae(t,"bindKey",null);ke(n)||(n="id");let r=Ae(t,"bindChildren",null);ke(r)||(r="children");let i=!1;Ee(e)&&(i=!0,e=[e]);let o=[];return Iu(e,(e,t,i)=>{let a=Ae(e,n,null),s=Ae(e,r,null);if(a){let n=function(e){let t=[e[0]];for(let n=1;n<e.length;n++){let i=e[n];t.push(r),t.push(i)}return t}([...i,t]);if(o.push({...e,level:(or(n)-1)/2,nk:n}),s)return s}}),i&&(o=o[0]),o},e.floor=function(e,t=0){return po(t)||(t=0),t=ji(t),Ne(e)?new Jl(e).toDecimalPlaces(t,Jl.ROUND_FLOOR).toNumber():""},e.fsBuildReadStreamText=function(e){if(!MF(e))throw new Error("fp is not a file");let t=qi({type:"safe"}),n=a.createReadStream(e,{encoding:"utf8"});n.on("error",e=>{t.emit("error",{fun:"stream",msg:e})}),process.nextTick(()=>{t.emit("create")});let r=l.createInterface({input:n,crlfDelay:1/0});return r.on("line",e=>{t.emit("line",e)}),r.on("error",()=>{}),n.on("close",()=>{t.emit("close")}),t},e.fsBuildWriteStreamText=function(){let e=null;return{create:t=>{let n=Ga();return e=a.createWriteStream(t,{flags:"w",encoding:"utf8"}),e.on("finish",()=>{n.resolve()}),e.on("error",e=>{n.reject(e)}),n},write:t=>{e.write(t+"\n")},end:()=>{let t=Ga();return e.on("close",()=>{t.resolve()}),e.end(),t}}},e.fsCleanFolder=function(e){return nD(e,{path:o,fs:a})},e.fsCleanFolderCore=nD,e.fsCopyFile=function(e,t,n={}){return rD(e,t,{path:o,fs:a,...n})},e.fsCopyFileCore=rD,e.fsCopyFolder=function(e,t,n={}){return oD(e,t,{path:o,fs:a,...n})},e.fsCopyFolderCore=oD,e.fsCreateFile=function(e,t,n={}){return cD(e,t,{fs:a,...n})},e.fsCreateFileCore=cD,e.fsCreateFolder=uD,e.fsCreateFolderCore=tD,e.fsDeleteFile=function(e){return fD(e,{fs:a})},e.fsDeleteFileCore=fD,e.fsDeleteFileSafe=async function(e,t={}){return await dD(e,{fs:a,...t})},e.fsDeleteFileSafeCore=dD,e.fsDeleteFolder=pD,e.fsDeleteFolderCore=hD,e.fsDeleteFolderSafe=async function(e,t={}){return await gD(e,{fs:a,...t})},e.fsDeleteFolderSafeCore=gD,e.fsDownloadFile=async function(e,t){return mD(e,t,{fs:a,Readable:c.Readable})},e.fsDownloadFileCore=mD,e.fsEvem=function(e={}){let t=Ae(e,"fd");ke(t)||(t="./_evps");let n=Ae(e,"polling");we(n)||(n=!1);let r=Ae(e,"timeInterval");Vi(r)||(r=100),r=ji(r);let i=Ae(e,"timeBinaryInterval");Vi(i)||(i=300),i=ji(i);let s=Ae(e,"keySys");ke(s)||(s="[::pkg_content::]"),AD(t)||uD(t);let l=bD(t,{polling:n,timeInterval:r,timeBinaryInterval:i});l.on("change",e=>{if("add"!==e.type&&"change"!==e.type)return;let t=vD(e.fp),n="";try{n=a.readFileSync(e.fp,"utf8"),n=Pa(n)}catch(e){}Be(n)&&c.emit(t,{[s]:n})});let c=qi({type:"safe",funGetListenerError:(e,t,n)=>{0!==c.listenerCount("error")?u.call(c,"error",{fun:"listener",name:e,msg:t,args:n}):console.error(`[wsemi fsEvem] listener of '${String(e)}' threw and no 'error' listener is registered:`,t)}}),u=c.emit;return c.emit=function(e,n){let r=!1;if(Be(n)&&(r=Me(n,s)),r){let t=Ae(n,s,null),r=Ae(t,"pkg",""),i=Ae(t,"time","");return u.call(this,e,r,i)}((e,n)=>{let r=o.resolve(t,e);Se(n)||(n=ar(n)),a.writeFileSync(r,n,"utf8")})(e,{pkg:n,time:yD()})},c.clear=()=>{l.clear(),pD(t)},c},e.fsExists=function(e){return DF(e,{fs:a})},e.fsExistsCore=DF,e.fsGetFileBasicHash=function(e,t={}){return wD(e,{fs:a,crypto:f,...t})},e.fsGetFileBasicHashCore=wD,e.fsGetFileHash=function(e,t={}){return ED(e,{fs:a,crypto:f,...t})},e.fsGetFileHashCore=ED,e.fsGetFileXxHash=function(e,t={}){return CD(e,{fs:a,...t})},e.fsGetFileXxHashCore=CD,e.fsGetFilesInFolder=function(e,t=1){return SD(e,t,{path:o,fs:a})},e.fsGetFilesInFolderCore=SD,e.fsGetFilesWithHashInFolder=FD,e.fsGetFilesWithHashInFolderCore=kD,e.fsGetFolderBasicHash=function(e,t={}){return DD(e,{path:o,fs:a,crypto:f,...t})},e.fsGetFolderBasicHashCore=DD,e.fsGetFoldersInFolder=function(e,t=1){return ND(e,t,{path:o,fs:a})},e.fsGetFoldersInFolderCore=ND,e.fsIsFile=MF,e.fsIsFileCore=NF,e.fsIsFolder=AD,e.fsIsFolderCore=eD,e.fsMergeFiles=async function(e,t,n={}){return MD(e,t,{fs:a,...n})},e.fsMergeFilesCore=MD,e.fsReadJson=function(e){let t=null,n=QF(e,{fs:a});if(n.error)return n;let r=n.success,i=null;try{i=JSON.parse(r)}catch(e){t=e}return null!==t?{error:t}:{success:i}},e.fsReadText=TF,e.fsReadTextCore=QF,e.fsRenameFile=function(e,t){return QD(e,t,{fs:a})},e.fsRenameFileCore=QD,e.fsRenameFolder=function(e,t){return TD(e,t,{fs:a})},e.fsRenameFolderCore=TD,e.fsSrlog=function(e={}){let n=Ae(e,"fdSys","");ke(n)||(n=o.resolve(),n=n.replaceAll("\\","/"));let r=Ae(e,"fdLog","");ke(r)||(r="./syslog"),AD(r)||uD(r);let i=Ae(e,"dlm","");ke(i)||(i="ꓹ");let s=Ae(e,"useTime",null);we(s)||(s=!0);let l=Ae(e,"useLoc",null);we(l)||(l=!0);let c=Ae(e,"useLocRela",null);async function u(e,n,...o){let c=(()=>{let e=t().format("YYYY-MM-DD");return`${r}/${e}.log`})(),u=bn(o,e=>{let t="";return t=Ee(e)||Ce(e)?JSON.stringify(e):we(e)?e?"true":"false":Na(e),t}),f="";s&&(f=`[${e}]\n`,a.appendFileSync(c,f,"utf8")),l&&(f=`[${n}]\n`,a.appendFileSync(c,f,"utf8")),f=`${yo(u,`${i} `)}\n\n`,a.appendFileSync(c,f,"utf8")}return we(c)||(c=!0),function(...e){let t="";s&&(t=yD());let r="",i="",o=[];if(l){if(o=ea((new Error).stack,"\n"),vn(o,e=>{if((e=Ko(e)).indexOf("file:")<0)return!0;if(e.indexOf("fsSrlog.mjs")>=0)return!0;return vn(ea(e," "),e=>{if(e.indexOf("file:")>=0)return r=e,!1}),!ke(r)&&void 0}),!ke(r))throw console.log("stackLines",o),new Error("can not parse stackLines");"("===ta(r,1)&&(r=ra(r,1)),")"===na(r,1)&&(r=Qa(r,1));try{r=decodeURIComponent(r)}catch(e){console.log(e)}i=r,i=ra(i,8),i=i.replace(n,"")}let a=[];s&&(a=[...a,`[${t}]`]);let f="";l&&(f=r,c&&(f=i),a=[...a,`[${f}]`]),a=[...a,...e],console.log(...a),u(t,f,...e)}},e.fsSyncFolder=function(e,t,n={}){return UD(e,t,{path:o,fs:a,crypto:f,...n})},e.fsSyncFolderCore=UD,e.fsTask=function(e,t={}){let n=Ae(t,"fdStorage","");ke(n)||(n="./_tkfs");let r=Ae(t,"levelLimit","");Vi(r)||(r=1),r=ji(r);let i=Ae(t,"typeHash","");ke(i)||(i="md5");let o=Ae(t,"timeInterval");aa(o)||(o=6e4),o=ji(o),uD(n);let s=qi({type:"safe"}),l=!1,c=`${n}/fpHash.json`,u=`${n}/fpResult.json`,f=async()=>{if(!0===l)return;let t=(()=>{let e={};try{e=Pa(a.readFileSync(c,"utf8"))}catch(e){}return e})(),n=await(async()=>{let t={};return AD(e)?(vn(await FD(e,r,{type:i}),e=>{t[e.path]=e.hash}),t):t})(),o=bn(t,(e,t)=>({path:t,hash:e})),u=bn(n,(e,t)=>({path:t,hash:e}));vn(LD(o,u,"path").infor,(e,r)=>{if("same"===e)return!0;let i=Ae(t,r,""),o=Ae(n,r,""),u="";u="del"===e?i:o;let f=e,d=r,h=sD(r);l=!0;let p=Ga();return s.emit("change",{type:f,fp:d,fn:h,hash:u,pm:p}),p.then(()=>{let e=Ti(t);e[d]=n[d],(e=>{try{let t=ar(e);a.writeFileSync(c,t,"utf8")}catch(e){}})(e)}).catch(()=>{}).finally(()=>{l=!1}),!1})},d=()=>{let e={};try{e=Pa(a.readFileSync(u,"utf8"))}catch(e){}return e},h=(e={})=>{try{let t=ar(e);a.writeFileSync(u,t,"utf8")}catch(e){}},p=!1,g=setInterval(()=>{p||(p=!0,f().catch(()=>{}).finally(()=>{p=!1}))},o);return s.getResult=(e,t)=>{let n=`${e}|${t}`,r=Ae(d(),n,[]);return Ce(r)||console.log(`result for key[${n}] is not an array`),r},s.getAndEliminateResult=(e,t)=>{let n=`${e}|${t}`,r=d(),i=Ae(r,n,[]);return Ce(i)||console.log(`result for key[${n}] is not an array`),r=((e,t)=>{let n={};return vn(e,(e,r)=>{Ae(ea(r,"|"),0,"")!==t&&(n[r]=e)}),n})(r,e),h(r),i},s.setResult=(e,t,n)=>{Ce(n)||(console.log("result is not an array, default to []"),n=[]);let r=`${e}|${t}`,i=d();i[r]=n,h(i)},s.clear=()=>{clearInterval(g)},s},e.fsTaskCp=function(e,t,n={}){AD(e)||uD(e),AD(t)||uD(t);let r=`${e}/fpHash.json`,i=`${t}/fpHash.json`,o=e=>{let t={};try{t=Pa(a.readFileSync(e,"utf8"))}catch(e){}return t},s=(e,t)=>{try{let n=ar(t);a.writeFileSync(e,n,"utf8")}catch(e){}},l=(e,t)=>Ae(o(e),t,""),c=(e,t,n)=>{let r=o(e);r[t]=n,s(e,r)},u=(e,t)=>{let n=o(e);Me(n,t)&&delete n[t],s(e,n)},f=()=>o(r),d=e=>s(r,e),h=e=>l(r,e),p=()=>o(i),g=e=>s(i,e),m=e=>l(i,e),y=(e,t)=>c(i,e,t),v=e=>u(i,e),A=e=>{let t=[];return vn(e,(e,n)=>{t.push({fp:n,hash:e})}),t},b={buildSrc:()=>{let e=qi({type:"safe"});return e.set=(t,n)=>{((e,t)=>{c(r,e,t)})(t,n),e.emit("set",{type:"set",fp:t,hash:n})},e.get=h,e.remove=t=>{(e=>{u(r,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=f,e.writeKp=d,e},buildTar:()=>{let e=qi({type:"safe"}),t=Nu(300),n=HD(r);return n.on("change",n=>{t(()=>{(async()=>{let t=f();if(!Be(t))return"no src";let n=p(),r=A(t),i=LD(A(n),r,"fp",{withInfor:!1}),o=Ga();return o.then(e=>{g(t)}).catch(()=>{}),e.emit("change",{kpSrc:t,kpTar:n,kpCmp:i,pm:o}),o})().catch(()=>{})})}),e.set=y,e.get=m,e.remove=v,e.readKp=p,e.writeKp=g,e.clear=n.clear,e}};return b},e.fsTreeFolder=function(e,t=1){return BD(e,t,{path:o,fs:a})},e.fsTreeFolderCore=BD,e.fsTreeFolderWithHash=function(e,t=1,n={}){return RD(e,t,{path:o,fs:a,crypto:f,...n})},e.fsTreeFolderWithHashCore=RD,e.fsWatchFile=HD,e.fsWatchFolder=bD,e.fsWriteJson=function(e,t,n={}){let r=null;if(!Ee(t)&&!Ce(t))return{error:"inp is not an object or array"};let i=Ae(n,"useFormat",null);we(i)||(i=!1);let o="";try{o=i?JSON.stringify(t,null,2):JSON.stringify(t)}catch(e){r=e}return null!==r?{error:r}:qD(e,o,{fs:a})},e.fsWriteText=function(e,t){return qD(e,t,{fs:a})},e.fsWriteTextCore=qD,e.genGradientColor=function(e){if(Nn(e))return{};let t;try{t=uu.toRgba(e)}catch(e){return{}}function n(e,t){return e.a=t,uu.toRgbaString(e)}return{linearGradient:{x1:0,x2:0,y1:0,y2:1},stops:[[0,n(t,.4)],[1,n(t,.9)]]}},e.genID=Tu,e.genIDSeq=function(){return jD()},e.genPm=Ga,e.getBufferSize=GD,e.getClearPathName=aD,e.getCsvStrFromData=JD,e.getDataFromExcelFileU8Arr=KD,e.getDataFromExcelFileU8ArrDyn=async function(e,t,n){let r=await KD(e,t);return""!==Ae(r,"error","")?Promise.reject(r.error):r},e.getEnv=function(){let e=_a(),t="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;return e=e||t,{isBrowser:e,isWebWorker:t,isNode:"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}},e.getErrorMessage=function(e){let t="";if(tN(e))t=e.message;else{if(Se(e))return e;if(Ee(e))return Me(e,"message")?e.message:JSON.stringify(e);if(Ce(e))return JSON.stringify(e);t=Na(e)}return t},e.getExcelU8ArrFromData=async function(e,t="data"){if(!Mn(e)){return{error:"no data"}}ke(t)||(t="data");let n=null,r=pb(e,t);return Me(r,"error")?r:(n=await bF(r),Me(n,"error"),n)},e.getExcelU8ArrFromWorkbook=bF,e.getExcelWorkbookFromData=pb,e.getExcelWorkbookFromWorksheet=hb,e.getExcelWorksheetFromData=cr,e.getFileAccept=Um,e.getFileBasicHash=FN,e.getFileHash=async function(e,t={}){if(!Ja(e)&&!kN(e))return console.log("inp",e),Promise.reject("inp is not a Blob or File");let n=Ae(t,"type","");ke(n)||(n="sha512");let r=Ae(t,"chunkSize");return Ne(r)||(r=67108864),r=Ir(r),Me({MD5:"md5","SHA-1":"sha1","SHA-256":"sha256","SHA-384":"sha384","SHA-512":"sha512",md5:"md5",sha1:"sha1",sha256:"sha256",sha384:"sha384",sha512:"sha512",xxhash64:"xxhash64"},n)?"xxhash64"===n?DN(e,t):FN(e,t):Promise.reject(`type[${n}] must be one of [ 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'xxhash64' ]`)},e.getFileName=sD,e.getFileNameExt=function(e){if(!ke(e))return"";let t=Lo(sD(e),".");if(or(t)<=1)return"";let n="";try{n=Aa(t)}catch(e){}return n},e.getFileTrueName=vD,e.getFileType=Rm,e.getFileXxHash=DN,e.getGlobal=Kl,e.getObjSize=function(e){let t=0,n=function e(n){if(null!=n)switch(typeof n){case"number":t+=8;break;case"string":t+=2*n.length;break;case"boolean":t+=4;break;case"object":let r=Object.prototype.toString.call(n).slice(8,-1);if("Object"===r||"Array"===r)for(let t in n)n.hasOwnProperty(t)&&e(n[t]);else t+=2*n.toString().length}return t}(e),r=function(e){return e<1024?e+" bytes":e<1048576?(e/1024).toFixed(3)+" KiB":e<1073741824?(e/1048576).toFixed(3)+" MiB":(e/1073741824).toFixed(3)+" GiB"}(n);return{int:n,str:r}},e.getPathParent=lD,e.getTimeBetween=function(e,t,n="days"){let r=TN(n);if(""===r)return[];let i=LN(e,n),o=LN(t,n);return null===i||null===o||e>=t?[]:bn(QN(o.diff(i,n)+1),function(e){return i.clone().add(e,n).format(r)})},e.getTimeFromUnit=TN,e.getTimeHp=RN,e.getTimeObject=LN,e.getTimeRange=function(e,n){if(!Wy(e))return"無起始時間";if(void 0===n&&(n=e),!Wy(n))return"結束時間格式錯誤";let r=t(e,"YYYY-MM-DDTHH:mm:ss"),i=t(n,"YYYY-MM-DDTHH:mm:ss"),o=r.format("YYYY-MM-DD"),a=i.format("YYYY-MM-DD");if(o===a){let t=i.format("HH:mm");if(e===n)return UN(e)+" 至 無";if(e<n)return UN(e)+" 至 "+t;if(e>n)return UN(e)+" 至 "+t+" (起始時間大於結束時間)"}else{if(o<a)return UN(e)+" 至 "+UN(n);if(o>a)return UN(e)+" 至 "+UN(n)+" (起始時間大於結束時間)"}return""},e.getUserAgent=HN,e.getUserAgentDyn=async function(e=null,t){return Mn(t)||(t=["https://cdn.jsdelivr.net/npm/ua-parser-js@2.0.3/dist/ua-parser.min.js"]),await ic(t),HN(e)},e.getltdtkeys=$n,e.haskey=Me,e.html2str=async function(e){if(!ke(e))return"";let t=await async function(){let e="htmlToText";if(Ui(Ae(m,e)))return m;if(Ui(Ae(m,["default",e])))return m.default;let t=globalThis,n=null;if(await ds(()=>(n=Ae(t,"ht",null),Be(n)),{attemptNum:4e3,timeInterval:50}),Ui(Ae(n,e)))return n;if(Ui(Ae(n,["default",e])))return n.default;throw console.log("ht",m,"g.ht",t.ht),new Error("invalid ht, g.ht, g.ht.default, use script for import")}();return t.htmlToText(e,{wordwrap:!1,selectors:[{selector:"script",format:"skip"},{selector:"style",format:"skip"}]})},e.htmlDecode=function(e,t={}){return ke(e)?rs.decode(e,t):""},e.htmlEncode=is,e.importResources=ic,e.interp1=function(e,t,n={}){if(!Ce(e))return{err:"ps is not an array"};{let e=!Ne(t),n=!Ce(t);if(e&&n)return{err:"px is not a number or an array"}}let r=function(e,t={}){if(or(e)<=0)return[];let n=Ae(t,"keyX");ke(n)||(n="x");let r=Ae(t,"keyY");ke(r)||(r="y");let i=[];return vn(e,e=>{let t=null,o=null;Ce(e)&&or(e)>=2?(t=Ae(e,0),o=Ae(e,1)):(t=Ae(e,n,null),o=Ae(e,r,null)),Ne(t)&&Ne(o)&&(t=vr(t),o=vr(o),i.push({x:t,y:o}))}),i}(e,n);if(Ae(r,"err"))return Ae(r,"err");if(0===or(r))return{err:"ps(length=0) is not an effective array",ps:e,psEff:r};if(1===or(r))return{err:"ps(length=1) is one point only",ps:e,psEff:r};let i=function(e){let t=!0,n=!0;for(let r=1;r<or(e);r++){let i=e[r-1],o=e[r];if(t&&i.x>o.x&&(t=!1),n&&i.x<o.x&&(n=!1),i.x===o.x)return{err:`x can not be equal: i=${r}, x=${i.x}`}}return t?PN:n?$N:"no"}(r);if("no"===i)return{err:"psEff is not increasing or decreasing"};i===$N&&(i=PN,r=Ba(r));let o=!Ce(t);o&&(t=[t]);let a=function(e,t={}){if(or(e)<=0)return[];let n=Ae(t,"keyX");ke(n)||(n="x");let r=[];return vn(e,e=>{let t=null;t=Ne(e)?vr(e):Ce(e)&&or(e)>=1?Ae(e,0):Ae(e,n,null),Ne(t)&&(t=vr(t),r.push({x:t}))}),r}(t,n),s=Ae(n,"mode");"linear"!==s&&"stairs"!==s&&"blocks"!==s&&(s="linear");let l,c=bn(a,(e,t)=>{let i=Ae(e,"x"),o=null;try{"linear"===s?o=function(e,t){let n=zN(e,t);if(n!==qN)return n;let r=null;for(let n=1;n<or(e);n++){let i=e[n-1],o=e[n];if(i.x<=t&&t<=o.x){r=((t-i.x)*o.y+(o.x-t)*i.y)/(o.x-i.x);break}}return null===r?{err:ON}:r}(r,i):"blocks"===s?o=function(e,t){let n=zN(e,t);if(n!==qN)return n;let r=null;for(let n=1;n<or(e);n++){let i=e[n-1],o=e[n],a=i.x,s=o.x;if(a<=t&&t<=s){r=o.y;break}}return null===r?{err:ON}:r}(r,i):"stairs"===s&&(o=function(e,t,n={}){let r=Ae(n,"xMin");if(ca(r)){if(r>e[0].x)return{err:`xMin=${r} > ps[0].x=${e[0].x}`};r===e[0].x||(e=[{x:r,y:e[0].y},...e])}let i=Ae(n,"xMax");if(ca(i)){if(i<e[or(e)-1].x)return{err:`xMax=${i} < ps[size(ps)-1].x=${e[or(e)-1].x}`};if(i===e[or(e)-1].x);else{let t={x:i,y:e[or(e)-1].y};e=[...e,t]}}let o=zN(e,t);if(o!==qN)return o;let a=null;for(let n=0;n<or(e);n++){let r=Ae(e,n-1,null),i=Ae(e,n,null),o=Ae(e,n+1,null),s=i.x;r&&(s=(r.x+i.x)/2);let l=i.x;if(o&&(l=(o.x+i.x)/2),s<=t&&t<=l){a=i.y;break}}return null===a?{err:ON}:a}(r,i,n))}catch(e){o={err:e.toString()}}return o});return l=o?c[0]:c,l},e.isDate=function(e){let t=e;return ke(e)&&(t=new Date(e)),Ne(e)&&(t=Ir(e),t=new Date(e)),t instanceof Date&&!isNaN(t)},e.isDev=function(){return!!location&&Wa(location.href,"localhost")},e.isEle=Cu,e.isEleExistByID=function(e){return!!ke(e)&&!(null===document.getElementById(e))},e.isEmail=function(e){return!!ke(e)&&/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)},e.isErr=tN,e.isIE=Vu,e.isNarrow=function(e){if(!_a())return!1;let t=window.innerWidth>0&&window.innerWidth<=1024,n=!1;if(e){let t=Ae(e,"clientWidth",0);n=t>0&&t<=700}return t||n},e.isStrHasCapital=GN,e.isStrHasLetter=JN,e.isStrHasLowerCase=_N,e.isStrHasNumber=XN,e.isStrHasSpace=KN,e.isStrHasSymbol=ZN,e.isUserIdentify=function(e){let t=Ga();if(!ke(e))return t.reject("身份證字號非有效字串"),t;if(10!==e.length)return t.reject("身份證字號長度非10位"),t;if(isNaN(e.substring(1,10))||!/^[A-Z]$/.test(e.substring(0,1)))return t.reject("身份證格式錯誤,字首需大寫英文"),t;e="ABCDEFGHJKLMNPQRSTUVXYWZIO".indexOf(e.substring(0,1))+10+""+e.substring(1,10);let n=parseInt(e.substring(0,1))+9*parseInt(e.substring(1,2))+8*parseInt(e.substring(2,3))+7*parseInt(e.substring(3,4))+6*parseInt(e.substring(4,5))+5*parseInt(e.substring(5,6))+4*parseInt(e.substring(6,7))+3*parseInt(e.substring(7,8))+2*parseInt(e.substring(8,9))+parseInt(e.substring(9,10)),r=parseInt(e.substring(10,11));return n%10!=0&&10-n%10!==r?(t.reject("非有效身份證"),t):(t.resolve(),t)},e.isUserName=function(e){let t=Ga();return ke(e)?(t.resolve(),t):(t.reject("請填入姓名"),t)},e.isUserPw=function(e,t={}){let n=[],r=Ae(t,"useKeyForError",null);we(r)||(r=!1);let i=Ae(t,"useOnlyOneError",null);if(we(i)||(i=!1),Se(e)||(r?n.push("keyInvalidPassword"):n.push("密碼非有效字串")),or(n)>0)throw new Error(n[0]);let o=Ae(t,"numLenMin","");(!xr(o)||ji(o)<0)&&(o=8),o=ji(o);let a=Ae(t,"numLenMax","");if((!xr(a)||ji(a)<0)&&(a=30),a=ji(a),o>a&&(r?n.push("keyLimNumLenMinOrMax"):n.push("設定密碼最小長度大於最大長度")),or(n)>0)throw new Error(n[0]);let s=Ae(t,"noSpace",null);if(we(s)||(s=!0),s&&(KN(e)&&(r?n.push("keyLimHasSpace"):n.push("密碼不可包含空白字元")),i&&or(n)>0))throw new Error(n[0]);let l=Ae(t,"onlyAscii",null);if(we(l)||(l=!0),l&&(/[^\x20-\x7e]/.test(e)&&(r?n.push("keyLimNonAsciiChar"):n.push("密碼僅允許使用英文大小寫、數字及特殊符號")),i&&or(n)>0))throw new Error(n[0]);if(or(e)<o&&(r?n.push("keyLimNumLenMin"):n.push(`密碼長度須大於等於${o}個字元`)),i&&or(n)>0)throw new Error(n[0]);if(or(e)>a&&(r?n.push("keyLimNumLenMax"):n.push(`密碼長度須小於等於${a}個字元`)),i&&or(n)>0)throw new Error(n[0]);let c=Ae(t,"requireLetter",null);we(c)||(c=!1);let u=Ae(t,"requireUppercase",null);we(u)||(u=!0);let f=Ae(t,"requireLowercase",null);we(f)||(f=!0);let d=Ae(t,"requireDigit",null);we(d)||(d=!0);let h=Ae(t,"requireSpecial",null);if(we(h)||(h=!0),c&&!JN(e)&&(r?n.push("keyLimRequireLetter"):n.push("密碼須包含至少一個英文字母")),i&&or(n)>0)throw new Error(n[0]);if(u&&!GN(e)&&(r?n.push("keyLimRequireUppercase"):n.push("密碼須包含至少一個大寫英文字母")),i&&or(n)>0)throw new Error(n[0]);if(f&&!_N(e)&&(r?n.push("keyLimRequireLowercase"):n.push("密碼須包含至少一個小寫英文字母")),i&&or(n)>0)throw new Error(n[0]);if(d&&!XN(e)&&(r?n.push("keyLimRequireDigit"):n.push("密碼須包含至少一個數字")),i&&or(n)>0)throw new Error(n[0]);if(h&&!ZN(e)&&(r?n.push("keyLimRequireSpecial"):n.push("密碼須包含至少一個特殊符號")),i&&or(n)>0)throw new Error(n[0]);let p=Ae(t,"forbiddenChars",null);if(Ce(p)||(p=[]),or(p)>0){for(let t of p)if(e.includes(t)){if(r){n.push("keyLimForbiddenChar");break}n.push(`密碼不可包含字元:${t}`)}if(i&&or(n)>0)throw new Error(n[0])}let g=Ae(t,"commonPasswordBlacklist",null);if(Ce(g)||(g=oM),or(g)>0){let t=e.toLowerCase();if(g.some(e=>Se(e)&&t===e.toLowerCase())&&(r?n.push("keyLimCommonPassword"):n.push("此密碼為常見弱密碼,不允許使用")),i&&or(n)>0)throw new Error(n[0])}let m=Ae(t,"account",""),y=Ae(t,"noConsecutiveCharsFromAccount",null);we(y)||(y=!1);let v=Ae(t,"consecutiveCharsMinMatch","");if(Vi(v)||(v=3),v=ji(v),y&&Se(m)&&or(m)>=v){let t=[...m.toLowerCase()],o=e.toLowerCase(),a=!1;for(let e=0;e<=t.length-v;e++){let n=t.slice(e,e+v).join("");if(o.includes(n)){a=!0;break}}if(a&&(r?n.push("keyLimConsecutiveCharsFromAccount"):n.push(`密碼不可包含與帳號相同之${v}個以上連續字元`)),i&&or(n)>0)throw new Error(n[0])}if(or(n)>0)throw new Error(n.join(" | "));return!0},e.isWindow=_a,e.isab=Ie,e.isarr=Ce,e.isarr0=Dn,e.isarr1=jN,e.isbigint=Da,e.isblob=Ja,e.isbol=we,e.isday=Du,e.isearr=Mn,e.iseobj=Be,e.iser=Nn,e.isernot=Nm,e.isestr=ke,e.isfile=kN,e.isfun=Ui,e.isint=xr,e.ismonth=ur,e.isn0int=VN,e.isn0num=YN,e.isnan=De,e.isnbr=Fe,e.isnint=cb,e.isnnum=function(e){return!!Ne(e)&&Ir(e)<0},e.isnull=Sn,e.isnum=Ne,e.isobj=Ee,e.isobj0=kn,e.isp0int=po,e.isp0num=WN,e.ispint=Vi,e.ispm=Hi,e.ispnum=aa,e.isstr=Se,e.isstr0=Fn,e.istime=Wy,e.istimeTZ=iM,e.istimems=eM,e.istimemsTZ=rM,e.isu16arr=WD,e.isu8arr=as,e.isundefined=Bn,e.j2o=Pa,e.judge=function(e,t,n,r={}){if(!Ne(e))throw new Error("x1 is not a number");if(!Ne(n))throw new Error("x2 is not a number");let i=Ae(r,"withPreciseNum");if(we(i)||(i=!0),i&&(e=BF(e),n=BF(n)),"==="===t)return e===n||aM(e,n);if("!=="===t)return function(e,t){return!aM(e,t)}(e,n);if(">="===t)return e===n||function(e,t){return new Jl(e).gte(t)}(e,n);if(">"===t)return function(e,t){return new Jl(e).gt(t)}(e,n);if("<="===t)return e===n||function(e,t){return new Jl(e).lte(t)}(e,n);if("<"===t)return function(e,t){return new Jl(e).lt(t)}(e,n);throw console.log(t),new Error(`invalid op[${t}]`)},e.keysmat2ltdt=sM,e.ltdt2vrtsable=function(e,t=[],n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:[];if(!Mn(e))return i("invalid ltdt");if(!Ce(t))return i("invalid mergerowkeys");let o=!1;if(vn(e,function(e){Be(e)||(o=!0)}),o)return i("invalid ltdt, every element must be an effective object");let a=$n(e),s=[];vn(e,function(e){let t={};vn(a,function(n){t[n]={value:e[n].value,style:e[n].style,rowspan:1}}),s.push(t)});let l=Ba(s),c=or(l);vn(a,function(e){if(ua(e,t)){let t=Xi(0,c,0),n=Xi(0,c,0),r=Xi(1,c+1,0);vn(l,function(i,o){if(o>0){la(l[o-1][e].value,l[o][e].value)&&(t[o-1]=1,t[o]=1,r[o]=r[o-1]+1),1===t[o-1]&&1===t[o]&&(n[o-1]=0,n[o]=1)}}),vn(l,function(i,o){1===t[o]&&(1===n[o]?l[o][e].rowspan=r[o]:l[o][e].rowspan=null)})}});let u=Ba(l);return r?{state:"success",msg:u}:u},e.ltdtDiff=function(e,t,n={}){if(!Ce(e))return{};if(!Ce(t))return{};if(0===or(e)&&0===or(t))return{};let r=Ae(n,"empty");ke(r)||(r="∗empty∗");let i=$n(e),o=$n(t),a=lM(i,o),s={};vn(a,(e,t)=>{s[t]=e});let l=Xo(sr(e,a,{empty:r}),sr(t,a,{empty:r}),{...n,mode:"matrix"});return l.dfs=bn(l.dfs,e=>{let t={};vn(e,e=>{e.k=s[e.k],t[e.k]=e});let n={};return vn(a,e=>{n[e]=t[e]}),n}),l},e.ltdtDiffByKey=LD,e.ltdtkeys2mat=sr,e.ltdtkeysheads2mat=lr,e.ltdtmapping=function(e,t,n=""){if(!Mn(e))return[];if(!Mn(t))return[];let r=bn(e,e=>xF(e,t,n));return r},e.ltdtmerge=ZF,e.ltdtpick=function(e,t){if(!Mn(e))return[];if(!Mn(t))return[];let n=bn(e,e=>CF(e,t));return n},e.ltdtpull=function(e,t,n){return Ce(e)&&Ce(t)&&ke(n)&&gn(e,e=>Ee(e))?0===t.length?e:gn(t,e=>Ee(e))?uM(e,t,n):[]:[]},e.mat2ltdt=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:[];if(!Mn(e))return r("invalid mat");if(e.length<=1)return r("invalid mat, at least 2 rows are required");let i=!1;if(vn(e,function(e){Mn(e)||(i=!0)}),i)return r("invalid mat, every row must be an effective array");var o,a;let s=sM(Wo(e)[0],(a=null==(o=e)?0:o.length)?vo(o,1,a):[],{returnWithStateAndMsg:!0});return"error"===s.state?r(`keysmat2ltdt: ${s.msg}`):n?s:s.msg},e.matConcat=function(e,t){if(!Ce(e))return[];if(!Ce(t))return[];if(0===or(e)&&0===or(t))return[];let n=or(e),r=or(Ae(e,0,[])),i=or(t),o=or(Ae(t,0,[])),a=[],s=Math.max(n,i);for(let n=0;n<s;n++){let i=[],s=-1;for(let t=0;t<r;t++){s++;let r=Ae(e,`${n}.${t}`,null);i[s]=r}for(let e=0;e<o;e++){s++;let r=Ae(t,`${n}.${e}`,null);i[s]=r}a[n]=i}return a},e.matDiff=function(e,t,n={}){return Ce(e)&&Ce(t)?0===or(e)&&0===or(t)?{}:Xo(e,t,{...n,mode:"matrix"}):{}},e.matat=function(e,t,n){return Mn(e)?bn(e,function(e){return go(e,t,n)}):[]},e.now2str=yD,e.now2strp=function(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYYMMDDHHmmss")},e.nowDay2str=function(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYY-MM-DD")},e.nowms2str=function(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYY-MM-DDTHH:mm:ss.SSSZ")},e.nowms2strp=function(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYYMMDDHHmmssSSS")},e.o2j=ar,e.obj2b64=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"",i="";try{let t=ar(e,!1,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`o2j: ${t.msg}`);let n=fM(t.msg,{returnWithStateAndMsg:!0});if("error"===n.state)return r(`str2b64: ${n.msg}`);i=n.msg}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.obj2pb64=function(e,t,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(void 0===e)return i("invalid data");if(!ke(t))return i("invalid key");let o="";try{let n=ar({data:e},!1,{returnWithStateAndMsg:!0});if("error"===n.state)return i(`o2j: ${n.msg}`);o=dM(n.msg,t,!0)}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.obj2str=function(e,t="Uint8Array",n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(Bn(e))return i("invalid data");Se(t)?t=[t]:Ce(t)||(t=["Uint8Array"]);let o="";try{o=JSON.stringify(e,function(e,n){return n=CM.escape(n),t.indexOf("Uint8Array")>=0&&(n=CM.u8arr2b64(n)),t.indexOf("Uint16Array")>=0&&(n=CM.u16arr2b64(n)),n})}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.obj2stru8arr=EM,e.obj2u8arr=function(e,t={}){let n=[],r=new Uint8Array,i=Ae(t,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:new Uint8Array;if(!jN(e)&&!Be(e))return o("invalid data, data is not an effective object or a non-empty array");let a=[],s=[];function l(e){a.push(GD(e)),s.push(e)}try{let t=EM(e,{returnWithStateAndMsg:!0});if("error"===t.state)return o(`obj2stru8arr: ${t.msg}`);let i=t.msg;l(BM(i.results)),vn(i.binarys,e=>{l(e)});let c=a,u=BM(JSON.stringify(c)),f=new Uint8Array(8);us(GD(u),f),n.push(f),n.push(u),vn(s,e=>{n.push(e)}),r=SM(n)}catch(e){return o(e.toString())}return i?{state:"success",msg:r}:r},e.objSortBy=kM,e.objSortByKeys=function(e,t){if(!Be(e))return{};if(!Mn(t))return{};let n={};return vn(t,(e,t)=>{n[e]=t}),kM(e,(e,t)=>Ae(n,t,0))},e.oo=function(e){if(void 0!==e)return Pa(ar(e))},e.openLink=function(e){if(!ke(e))return;let t=document.createElement("a");t.href=e,t.target="_blank",document.body.appendChild(t),t.click(),document.body.removeChild(t)},e.pb642obj=function(e,t,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!ke(e))return i("invalid b64");if(!ke(t))return i("invalid key");let o=null;try{if(o=Pa(Xr(e,t,!0)).data,void 0===o)return i("can not decrypt b64 with key, or the decrypted data is invalid")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.pm2resolve=lb,e.pmChain=function(e,t=null){if(!Ce(e)){let e=Ga();return e.reject("pms is not an array"),e}return e.reduce((e,t)=>e.then(t),Promise.resolve(t))},e.pmConvertResolve=sb,e.pmDebounce=function(e=300){return new function(e){let t=[],n=null,r=null,i="wait";return Vi(e)||(e=300),e=ji(e),function(o,...a){Ui(o)?((null===r||"wait"===i)&&(r=Date.now()),t.push({func:o,input:a,output:null}),null===n&&"wait"===i&&(n=setInterval(()=>{if(null===r)throw new Error("invalid tLast");if("wait"!==i)return;if("wait"===i&&0===t.length)return clearInterval(n),n=null,void(r=null);let o=Date.now();if(o-r>e){i="doing",r=o;let e=t.pop();t=[];let n=e.func(...e.input);Hi(n)?n.then(t=>{e.output=t}).catch(t=>{e.output={err:t}}).finally(()=>{i="wait",r=Date.now()}):(e.output=n,i="wait")}"wait"===i&&0===t.length&&(clearInterval(n),n=null,r=null)},20))):console.log("func is not a function")}}(e)},e.pmHook=FM,e.pmHookReject=function(e,t=()=>{}){return Ui(e)?(Ui(t)||(t=()=>{}),FM(e,e=>{if("afterCatch"===e.mode)return t(e.data)})):null},e.pmIni=function(){return Promise.resolve()},e.pmInvResolve=function(e,t={}){if(!Hi(e))throw new Error("pm is not a promise");let n=Ae(t,"thenExtractData");we(n)||(n=!1);let r=Ga();return e.then(e=>{n&&(e=Ae(e,"data"));let t=Ae(e,"state",""),i=Ae(e,"msg",{});"success"===t?r.resolve(i):"cancelled"===t?r.reject({reason:"cancelled"}):r.reject(i)}).catch(e=>{r.reject(e)}),r},e.pmKeyMutex=function(){return new function(){let e=new Map,t=new Map;return async(n,r)=>{let i=(e.get(n)||Promise.resolve()).then(async()=>await r(),async()=>await r());e.set(n,i.catch(()=>{})),t.set(n,(t.get(n)||0)+1);try{return await i}finally{let r=t.get(n)-1;r<=0?(t.delete(n),e.delete(n)):t.set(n,r)}}}},e.pmMap=function(e,t,n=0){let r={},i=!1,o=Ga();if(!Ce(e)&&!Ee(e))return o.reject("rs is not an array or object"),o;if(0===or(e))return o.resolve([]),o;let a=!1;if(Ee(e)){a=!0;let t=[];vn(e,(e,n)=>{t.push({k:n,v:e})}),e=t}let s=ub(n);return s.on("message",function(n){if(i)return;let l,c=s.get();if(Ui(t)){let e=c.key,n=c.value;if(a&&(e=c.value.k,n=c.value.v),l=t(n,e),!Hi(l))throw new Error("return of fun is not a promise")}else l=c.value;l.then(e=>{r[c.key]=e}).catch(e=>{i=!0,s.clear(),o.reject(e)}).finally(()=>{s.cb(),or(r)===or(e)&&o.resolve(VF(r))})}),vn(e,(e,t)=>{s.push({key:t,value:e})}),o},e.pmQueue=fb,e.pmSeries=ec,e.pmThrottle=function(){let e=qi(),t=[],n=null,r=!1;return function(i,...o){let a=Ga();if(!Ui(i))return void console.log("func is not a function");let s=Tu();return t.push({id:s,func:i,input:o}),null===n&&(n=setInterval(async()=>{if(r)return;r=!0;let i=t.pop();for(let n=0;n<t.length;n++){let r=t[n].id,i={state:"cancelled"};e.emit(r,i)}if(t=[],i){let t,n=i.id;t=Ui(i.func)?await lb(i.func)(...i.input):{state:"error",msg:"fun is not a function"},e.emit(n,t)}r=!1,r||0!==t.length||(clearInterval(n),n=null)},20)),e.once(s,e=>{"success"===e.state?a.resolve(e.msg):"cancelled"===e.state?a.reject({reason:"cancelled"}):a.reject(e.msg)}),a}},e.pmTimeout=async function(e,t,n={}){if(!Hi(e))throw new Error("invalid pm");if(!po(t))throw new Error(`invalid ms[${t}]`);let r=Ae(n,"label",null);ke(r)||(r="");let i,o=`timeout[${t}ms]`;ke(r)&&(o=`${r} ${o}`);let a=Ga();return i=setTimeout(()=>{let e=new Error(o);e.code="TIMEOUT",e.timeout=t,a.reject(e)},t),Promise.race([e,a]).finally(()=>clearTimeout(i))},e.preciseNum=BF,e.pseudoRandom=MM,e.pseudoRandomIntRange=function(e=0,t=100,n="start1"){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),e>(t=ji(t)))throw new Error(`vstart[${e}] > vend[${t}]`);let r=MM(n)*(t-e+1)+e;return r=Math.floor(r),r},e.pseudoRandomIntsNdpRange=function(e=0,t=100,n,r="start1"){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),t=ji(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let i=MM(r,!0),o=[],a=t-e;for(let n=0;n<=a;n++){let n=i()*(t-e+1)+e;n=Math.floor(n),o.push(n)}let s=qa(o,{returnIndex:!0});return s=Wo(s,n),s},e.pseudoRandomIntsRange=function(e=0,t=100,n,r="start1"){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),t=ji(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let i=MM(r,!0),o=[];for(let r=1;r<=n;r++){let n=i()*(t-e+1)+e;n=Math.floor(n),o.push(n)}return o},e.pseudoRandomRange=function(e=0,t=1,n="start1"){if(Ne(e)||(e=0),e=Ir(e),Ne(t)||(t=1),e>(t=Ir(t)))throw new Error(`vstart[${e}] > vend[${t}]`);return MM(n)*(t-e)+e},e.pseudoRandomsRange=function(e=0,t=1,n=1,r="start1"){if(Ne(e)||(e=0),e=Ir(e),Ne(t)||(t=1),t=Ir(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let i=MM(r,!0),o=[];for(let r=1;r<=n;r++){let n=i()*(t-e)+e;o.push(n)}return o},e.queue=ub,e.random=TM,e.randomIntRange=function(e=0,t=100){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),e>(t=ji(t)))throw new Error(`vstart[${e}] > vend[${t}]`);let n=TM()*(t-e+1)+e;return n=Math.floor(n),n},e.randomIntsNdpRange=function(e=0,t=100,n){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),t=ji(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=function(e,t,n){return t=(n?pn(e,t,n):void 0===t)?1:wr(t),(y(e)?OM:PM)(e,t)}(Xi(e,t+1),n);return r},e.randomIntsRange=function(e=0,t=100,n){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),t=ji(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=[];for(let i=1;i<=n;i++){let n=TM()*(t-e+1)+e;n=Math.floor(n),r.push(n)}return r},e.randomRange=function(e=0,t=1){if(Ne(e)||(e=0),e=Ir(e),Ne(t)||(t=1),e>(t=Ir(t)))throw new Error(`vstart[${e}] > vend[${t}]`);return TM()*(t-e)+e},e.randomsRange=function(e=0,t=1,n=1){if(Ne(e)||(e=0),e=Ir(e),Ne(t)||(t=1),t=Ir(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=[];for(let i=1;i<=n;i++){let n=TM()*(t-e)+e;r.push(n)}return r},e.rang=function(e,t,n=2){if(!Ne(e))return[];if(e=Ir(e),!Ne(t))return[];if(t=Ir(t),Vi(n)||(n=2),(n=ji(n))<=0)throw new Error(`num[${n}] <= 0`);let r=(t-e)/n,i=e,o=[];for(let e=0;e<=n;e++)o.push(i),i+=r;return o},e.rep=function(e,t){return ke(e)&&po(t)?zM(e,t):""},e.repObj=function(e,t){return Nn(e)?[]:Vi(t)?QN(t,no(e)):[]},e.replace=ac,e.replaceObj=function(e,t){return ke(e)&&Be(t)?(vn(t,function(e,t){e=Ee(e)||Ce(e)?JSON.stringify(e):Na(e)}),vn(t,function(t,n){e=ac(e,n,t)}),e):""},e.replacePlus=function(e,t,n,r=null,i){if(!ke(e)||!ke(t)||!ke(n))return"";if(!Se(i))return"";let o="[\\s\\S]*";ke(r)&&(o="[^"+r+"]*");let a=new RegExp(t+o+n,"g");return e.replace(a,i)},e.round=EF,e.secd=function(e){return Ne(e)?1/Bu(e=Ir(e)):null},e.sep=ea,e.sepInt=function(e,t,n=!0){if(!xr(e))return[];if(!po(t))return[];if(!we(n))return[];let r=jM(e/t),i=e-r*t,o=[];for(let e=1;e<=t;e++){let t=r;e<=i&&(t=r+1),o.push(t)}return n&&(o=Ba(o)),o},e.setIntervalHp=function(e,t=1){let n=Kl(),r=_a(),i=e=>{n.setTimeout(e,1)},o=e=>{n.requestAnimationFrame(e)},a=null;a=r?o:i;let s=RN(),l=!0,c=s(),u=()=>{if(!l)return;if(s()-c>=t){try{e()}catch(e){console.log(e)}c=s()}a(u)};return a(u),()=>{l=!1}},e.setTimeoutHp=function(e,t=1){let n=Kl(),r=_a(),i=e=>{n.setTimeout(e,1)},o=e=>{n.requestAnimationFrame(e)},a=null;a=r?o:i;let s=RN(),l=!0,c=s(),u=()=>{if(!l)return;if(s()-c>=t){l=!1;try{e()}catch(e){console.log(e)}}a(u)};return a(u),null},e.sind=Fu,e.split=Zo,e.str2aes=dM,e.str2b64=fM,e.str2hint=DM,e.str2md5=function(e,t=!1,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!ke(e))return i("invalid str");we(t)||(t=!1);let o="";try{let n=VM(e);o=t?n.toString(Qr):n.toString(_r)}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.str2obj=function(e,t="Uint8Array",n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:{};if(!Se(e))return i("invalid data");Se(t)?t=[t]:Ce(t)||(t=["Uint8Array"]);let o={};try{o=JSON.parse(e,function(e,n){return t.indexOf("Uint8Array")>=0&&(n=CM.b642u8arr(n)),t.indexOf("Uint16Array")>=0&&(n=CM.b642u16arr(n)),CM.unescape(n)})}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.str2sha=oQ,e.str2sha512=function(e,t=!1,n={}){let r=Ae(n,"returnWithStateAndMsg",null);if(we(r)||(r=!1),!r)return oQ(e,512,t);let i=oQ(e,512,t,{returnWithStateAndMsg:!0});return"error"===i.state?{state:"error",msg:`str2sha: ${i.msg}`}:i},e.str2u8arr=BM,e.strCompare=aQ,e.strCompareForVersion=function(e,t){let n=sQ(e),r=sQ(t);if(null===n||null===r)return null;for(let e=0;e<3;e++){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return 0},e.strDiff=Go,e.strDiffToHtml=function(e,t,n={}){if(!Se(e))return"";if(!Se(t))return"";if(""===e&&""===t)return"";let r=Ae(n,"useNormNewline");we(r)||(r=!0),r&&(e=(e=e.replaceAll("\r\n","\n")).replaceAll("\r","\n"),t=(t=t.replaceAll("\r\n","\n")).replaceAll("\r","\n"));let i=zf(),o=Vo("file","file",e,t),a=i.html(o,{drawFileList:!1,matching:"none",diffStyle:"char",outputFormat:"line-by-line"}),s=Lo(a,"\n"),l="",c=!1;return vn(s,e=>{'<div class="d2h-code-line">'===Ko(e)&&(c=!0),e.indexOf('class="d2h-code-line-prefix"')>=0&&(e=e.replaceAll('class="d2h-code-line-prefix"','class="d2h-code-line-prefix" style="display:inline-block; width: 0.7rem;"')),e.indexOf("<del>")>=0&&(e=e.replaceAll("<del>",'<del style="color:#f26; background:#ffefd5;">')),e.indexOf("<ins>")>=0&&(e=e.replaceAll("<ins>",'<ins style="color:#090; background:#e4fed1;">')),c&&(l+=e+"\n"),c&&"</div>"===Ko(e)&&(c=!1)}),a=l,a},e.strFindFuzz=function(e,t,n=!1){let r="";if(ke(e)||Ne(e))r=Na(e);else{if(!Mn(e))return!!n&&0;r=yo(e,"")}if(""===t)return!n||100;if(Nn(t))return!!n&&0;if(Wa(r,t))return!n||100;let i=ea(t," "),o=bn(i,function(e){return((e,t)=>{let n=new lT([e],{includeScore:!0}).search(t);n=Ae(n,0);let r=Ae(n,"score",1);return r=1-r,r*=100,r})(r,e)});if(n)return cT(o);{let e=80;return gn(o,function(t){return t>=e})}},e.strFindSimilar=function(e,t){let n="";if(ke(e)||Ne(e))n=Na(e);else{if(!Mn(e))return{};n=yo(e,"")}return Ne(t)&&(t=Na(t)),ke(t)&&(t=[t]),Mn(t)?function(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let o=t[i],a=aQ(e,o);n.push({target:o,rating:a}),a>n[r].rating&&(r=i)}return{ratings:n,bestMatch:n[r],bestMatchIndex:r}}(n,t=bn(t,function(e){return Na(e)})):{}},e.strTruncate=kF,e.strdelleft=ra,e.strdelright=Qa,e.strleft=ta,e.strmid=sc,e.strright=na,e.stru8arr2obj=uT,e.tand=Su,e.time2day=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!Wy(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.time2hour=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!Wy(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.time2min=UN,e.timeTZ2day=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!iM(e))return i("invalid t");let o="";try{e=nM.delTZ(e),o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timeTZ2expire=function(e,t=null,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=(e,t)=>r?{state:"error",msg:e}:{today:null,msg:"",err:t};if(!iM(e))return i("invalid t","時間格式錯誤");try{e=hT(e),t=hT(t)}catch(e){return i(e.toString(),"時間轉換失敗")}return fT(e,t,n)},e.timeTZ2hour=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!iM(e))return i("invalid t");let o="";try{e=nM.delTZ(e),o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timeTZ2min=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!iM(e))return i("invalid t");let o="";try{e=nM.delTZ(e),o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH:mm")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timeTZ2past=function(e,t=null,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=(e,t)=>r?{state:"error",msg:e}:{today:null,msg:"",err:t};if(!iM(e))return i("invalid t","時間格式錯誤");try{e=pT(e),t=pT(t)}catch(e){return i(e.toString(),"時間轉換失敗")}return dT(e,t,n)},e.timems2day=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!eM(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DD")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timems2hour=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!eM(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timems2min=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!eM(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timems2time=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!eM(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm:ss")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timemsTZ2day=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!rM(e))return i("invalid t");let o="";try{e=nM.delTZ(e),o=t(e).format("YYYY-MM-DD")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timemsTZ2expire=fT,e.timemsTZ2hour=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!rM(e))return i("invalid t");let o="";try{e=nM.delTZ(e),o=t(e).format("YYYY-MM-DDTHH")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timemsTZ2min=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!rM(e))return i("invalid t");let o="";try{e=nM.delTZ(e),o=t(e).format("YYYY-MM-DDTHH:mm")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timemsTZ2past=dT,e.timemsTZ2time=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!rM(e))return i("invalid t");let o="";try{e=nM.delTZ(e),o=t(e).format("YYYY-MM-DDTHH:mm:ss")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.treeObj=Iu,e.treeToFilepath=function(e,t={}){if(!Mn(e))return[];let n=Ae(t,"delimiter");ke(n)||(n="/");let r=Ae(t,"bindRoot");ke(r)||(r="root");let i=[];return Iu(e,(e,t,o)=>{let a=Ae(e,"_type","");if("folder"!==a&&"file"!==a)return e;let s=bn(Ae(e,"pathInfors",[]),"name"),l=Ae(s,0,"")===r;if(1===or(s)&&l)return e;l&&(s=Ma(s));let c={type:a,path:n+yo(s,n)};return i.push(c),e},{force:!0}),i},e.trim=Ta,e.u16arr2b64=mM,e.u16arr2u8arr=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!WD(e))return r("invalid u16a");let i=null;try{i=new Uint8Array(e)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.u8arr2ab=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new ArrayBuffer;if(!as(e))return r("invalid u8a");let i=null;try{i=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.u8arr2b64=gM,e.u8arr2blob=IF,e.u8arr2bs=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!as(e))return r("invalid u8a");let i="";try{let t=e.length;for(let n=0;n<t;n++)i+=String.fromCharCode(e[n])}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.u8arr2obj=function(e,t={}){let n={},r=Ae(t,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:{};if(!as(e))return i("invalid u8a");try{let t=8,r=e.slice(0,t),o=e.slice(t,GD(e)),a=ls(r),s=o.slice(0,a),l=o.slice(a,GD(o)),c=gT(s,{returnWithStateAndMsg:!0});if("error"===c.state)return i(`u8arr2str: ${c.msg}`);let u=c.msg,f=function(e,t){let n=0,r=0,i=[];return vn(t,t=>{r=n+t;let o=e.slice(n,r);n=r,i.push(o)}),i}(l,JSON.parse(u)),d=gT(f.shift(),{returnWithStateAndMsg:!0});if("error"===d.state)return i(`u8arr2str: ${d.msg}`);let h=uT({results:d.msg,binarys:f},{returnWithStateAndMsg:!0});if("error"===h.state)return i(`stru8arr2obj: ${h.msg}`);n=h.msg}catch(e){return i(e.toString())}return r?{state:"success",msg:n}:n},e.u8arr2str=gT,e.u8arr2u16arr=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint16Array;if(!as(e))return r("invalid u8a");let i=null;try{i=new Uint16Array(e)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.urlParse=function(e){if(!ke(e))return{};if(!ke(e=Ae(e=Lo(e,"?"),"[1]")))return{};let t=Lo(e,"&");return t=bn(t,function(e){return Lo(e,"=")}),t=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];ei(r,i[0],i[1])}return r}(t),t},e.verifyValue=function(e,t,n={}){let r=!1,i="";if("isstr"===t)Se(e)||(r=!0,i="需要為字串",e="");else if("isnum"===t)Ne(e)||(r=!0,i="需要為數字",e=0);else if("isp0num"===t)WN(e)||(r=!0,i="需要為含0的正浮點數",e=0);else if("isn0num"===t)YN(e)||(r=!0,i="需要為含0的負浮點數",e=0);else if("isint"===t)xr(e)||(r=!0,i="需要為整數",e=0);else if("ispint"===t)Vi(e)||(r=!0,i="需要為不含0正整數",e=0);else if("isp0int"===t)po(e)||(r=!0,i="需要為含0正整數",e=0);else if("isnint"===t)cb(e)||(r=!0,i="需要為不含0負整數",e=0);else if("isn0int"===t)VN(e)||(r=!0,i="需要為含0負整數",e=0);else if("custom"===t){let t=Ae(n,"funCustom");if(!Ui(t))throw new Error("invalid opt.funCustom when type='custom'");let o=t(e);if(!we(o.err))throw new Error("invalid return.err for type='custom'");if(o.err&&!ke(o.errmsg))throw new Error("invalid return.errmsg when return.err=true for type='custom'");if(!Ne(o.value)&!Se(o.value))throw new Error("invalid return.value for type='custom'");r=o.err,i=o.errmsg,e=o.value}else if(Ui(t)){e=t(e)}else"any"===t?Ne(e)||Se(e)||(r=!0,i="需要為字串或數字",e=""):(r=!0,i="需要指定驗證類型",e=null);return{value:e,err:r,errmsg:i}},e.waitFun=ds});
32
+ return/[!-/:-@[-`{-~]/.test(e)}function aM(e){if(!ke(e))return!1;let n="YYYY-MM-DDTHH:mm:ss.SSS";return e===t(e,n).format(n)}function sM(e){let t;return t=na(e,1),"Z"===t?`${e=Qa(e,1)}+00:00`:e}let lM={checkTZ:function(e){let t;return t=na(e,1),"Z"===t||(t=na(e,6),!!/[+|-]\d\d:\d\d/.test(t))},delTZ:function(e){let t;return t=na(e,1),Qa(e,"Z"===t?1:6)},normTZ:sM,sepTZ:function(e){let t=sM(e);return{t:Qa(t,6),tz:na(t,6)}}};function cM(e){if(!ke(e))return!1;if(!lM.checkTZ(e))return!1;let n=lM.delTZ(e),r="YYYY-MM-DDTHH:mm:ss.SSS";return n===t(n,r).format(r)}function uM(e){if(!ke(e))return!1;if(!lM.checkTZ(e))return!1;let n=lM.delTZ(e),r="YYYY-MM-DDTHH:mm:ss";return n===t(n,r).format(r)}let fM=["1234","12345","123456","1234567","12345678","123456789","1234567890","12345678910","111111","000000","666666","888888","7777777","11111111","123123","123321","654321","987654321","qwerty","qwerty123","qwerty1","qwertyuiop","qazwsx","1q2w3e4r","1q2w3e4r5t","1q2w3e","1qaz2wsx","zxcvbnm","password","password1","passw0rd","admin","admin123","welcome","letmein","login","master","monkey","dragon","shadow","sunshine","superman","batman","football","baseball","soccer","hockey","michael","jordan","jennifer","hunter","ranger","harley","thomas","charlie","andrew","daniel","ashley","bailey","mustang","access","secret","ninja","jesus","hello","freedom","trustno1","1qaz@WSX","P@ssw0rd","Pass@123","Aa123456","Aa@123456","Admin@123","abc@123","abc123","abcdef","abcd1234","abc","iloveyou","fuckyou","f*ckyou","whatever","nothing","google","computer","internet","samsung","apple","killer","princess","lovely","tigger","starwars","pokemon","minecraft","123qwe","zaq1zaq1","photoshop","adobe123","18atcskd2w","mynoob"];function dM(e,t){return new Jl(e).eq(t)}function hM(e,t,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:[];if(!Mn(e))return i("invalid keys");if(!Mn(t))return i("invalid mat");if(!Mn(t[0]))return i("invalid mat, the first row is not an effective array");let o=bn(t,function(t){let n=Yi(e,t);return vn(n,function(e,t){void 0===e&&(n[t]="")}),n});return r?{state:"success",msg:o}:o}var pM=ka(function(e){return On(xn(e,1,Hy,!0))});var gM=ka(function(e,t){var n=Aa(t);return Hy(n)&&(n=void 0),Hy(e)?function(e,t,n,r){var i=-1,o=Rn,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=fe(t,Xe(n))),r?(o=Un,a=!1):t.length>=200&&(o=bt,a=!1,t=new vt(t));e:for(;++i<s;){var u=e[i],f=null==n?u:n(u);if(u=r||0!==u?u:0,a&&f==f){for(var d=c;d--;)if(t[d]===f)continue e;l.push(u)}else o(t,f,r)||l.push(u)}return l}(e,xn(t,1,Hy,!0),hn(n)):[]}),mM=gM;function yM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!ke(e))return r("invalid str");let i="";try{let t=Gr.parse(e);i=Qr.stringify(t)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function vM(e,t,n=!1,r={}){let i=Ae(r,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:"";if(!ke(e))return o("invalid str");if(!ke(t))return o("invalid key");we(n)||(n=!1);let a="";try{let r=Yr.encrypt(e,t);if(n)a=r.toString();else{let e=r.toString();a=Qr.parse(e).toString(_r)}}catch(e){return o(e.toString())}return i?{state:"success",msg:a}:a}var AM={exports:{}};!function(e){var t;e.exports=(t=Fr(),function(){if("function"==typeof ArrayBuffer){var e=t.lib.WordArray,n=e.init,r=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,r=[],i=0;i<t;i++)r[i>>>2]|=e[i]<<24-i%4*8;n.call(this,r,t)}else n.apply(this,arguments)};r.prototype=e}}(),t.lib.WordArray)}(AM);var bM=Er(AM.exports);function wM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!as(e))return r("invalid u8a");let i="";try{i=bM.create(e).toString(Qr)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function IM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!WD(e))return r("invalid u16a");let i="";try{let t=wM(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),{returnWithStateAndMsg:!0});if("error"===t.state)return r(`u8arr2b64: ${t.msg}`);i=t.msg}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}let xM="[BlazeForPreventEscape]",CM=/^(?:\[BlazeForPreventEscape\])*\[(?:Uint8Array|Uint16Array)\]::[A-Za-z0-9+/]*={0,2}$/,EM=/^\[BlazeForPreventEscape\](?:\[BlazeForPreventEscape\])*\[(?:Uint8Array|Uint16Array)\]::[A-Za-z0-9+/]*={0,2}$/;let BM="[Uint8Array]::",SM=/^\[Uint8Array\]::([A-Za-z0-9+/]*={0,2})$/;let kM="[Uint16Array]::",FM=/^\[Uint16Array\]::([A-Za-z0-9+/]*={0,2})$/;let DM={tagEsc:xM,escape:function(e){return Se(e)&&91===e.charCodeAt(0)&&CM.test(e)?xM+e:e},unescape:function(e){return Se(e)&&91===e.charCodeAt(0)&&EM.test(e)?e.slice(23):e},tagU8A:BM,u8arr2b64:function(e){return as(e)?BM+wM(e):e},b642u8arr:function(e){if(Se(e)&&91===e.charCodeAt(0)){let t=SM.exec(e);if(null!==t)return Va(t[1])}return e},tagU16A:kM,u16arr2b64:function(e){return WD(e)?kM+IM(e):e},b642u16arr:function(e){if(Se(e)&&91===e.charCodeAt(0)){let t=FM.exec(e);if(null!==t)return Ya(t[1])}return e}};function NM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:{results:"",binarys:[]};if(!Ee(e)&&!Ce(e))return r("invalid data, data is not an object or array");if(kn(e)||Dn(e))return r("invalid data, data is an empty object or empty array");let i=/^(?:\[BlazeForPreventEscape\])*\[BlazeFor(?:Uint8Array|Uint16Array|ArrayBuffer)\]::\d+$/,o="",a=[];try{let t=-1;o=JSON.stringify(e,function(e,n){if(as(n)){t+=1;let e=`[BlazeForUint8Array]::${t}`;return a.push(n),e}if(WD(n)){t+=1;let e=`[BlazeForUint16Array]::${t}`;return a.push(n),e}if(Ie(n)){t+=1;let e=`[BlazeForArrayBuffer]::${t}`;return a.push(n),e}return _N(n)&&(n=n.toString()),ke(n)&&91===n.charCodeAt(0)&&i.test(n)?"[BlazeForPreventEscape]"+n:n})}catch(e){return r(e.toString())}return n?{state:"success",msg:{results:o,binarys:a}}:{results:o,binarys:a}}function MM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!ke(e))return r("invalid str");let i=null;try{let t=yM(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`str2b64: ${t.msg}`);let n=Va(t.msg,{returnWithStateAndMsg:!0});if("error"===n.state)return r(`b642u8arr: ${n.msg}`);i=n.msg}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function QM(e){let t=0;vn(e,e=>{t+=GD(e)});let n=new Uint8Array(t),r=0;return vn(e,e=>{let t=function(e){return Ie(e)?new Uint8Array(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0)}(e);n.set(t,r),r+=t.length}),n}function TM(e,t){if(!Be(e))return{};if(!Ui(t))throw new Error("fun is not a function");let n=bn(e,(e,n)=>({k:n,v:e,t:t(e,n)}));n=Fa(n,"t");let r={};return vn(n,e=>{r[e.k]=e.v}),r}function LM(e,t=()=>{}){if(!Ui(e))return null;function n(e,t){let n;return Sn(e)||Bn(e)?t:(n=Ae(e,"data",null),n||e)}return Ui(t)||(t=()=>{}),function(){let r,i=Ga(),o=t({mode:"before",data:arguments});return(Sn(o)||Bn(o))&&(o=arguments),e(...o).then(e=>{r=t({mode:"afterThen",data:e}),e=n(r,e),i.resolve(e)}).catch(e=>{r=t({mode:"afterCatch",data:e}),e=n(r,e),i.reject(e)}),i}}function RM(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"success",msg:e}:e;if(!Se(e))return n?{state:"error",msg:"invalid str"}:null;if(""===e)return r(0);let i=e.split("").reduce((e,t)=>t.charCodeAt(0)+(e<<6)+(e<<16)-e,0);return r(i)}let UM=0;function HM(e="start1",t=!1){void 0===e?e=(new Date).getTime():"start1"===e&&(UM++,e=UM);let n=624,r=397,i=2147483648,o=2147483647,a=new Array(n),s=625,l=e=>{for(ca(e)?a[0]=e>>>0:(e=Na(e),a[0]=RM(e)),s=1;s<n;s++){let e=a[s-1]^a[s-1]>>>30;a[s]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+s,a[s]>>>=0}},c=()=>(()=>{let e,t=new Array(2567483615);if(s>=n){let c;for(625===s&&l(5489),c=0;c<227;c++)e=a[c]&i|a[c+1]&o,a[c]=a[c+r]^e>>>1^t[1&e];for(;c<623;c++)e=a[c]&i|a[c+1]&o,a[c]=a[c+(r-n)]^e>>>1^t[1&e];e=a[623]&i|a[0]&o,a[623]=a[396]^e>>>1^t[1&e],s=0}return e=a[s++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0})()*(1/4294967296);l(e);let u=null;return u=t?c:c(),u}let qM=HM((new Date).getTime(),!0);function OM(){return qM()}function PM(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}var $M=Math.floor,zM=Math.random;function jM(e,t){return e+$M(zM()*(t-e+1))}function VM(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=jM(n,i),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}function YM(e,t){return VM(Cn(e),PM(t,0,e.length))}function WM(e,t){var n=VF(e);return VM(n,PM(t,0,n.length))}var GM=Math.floor;function JM(e,t,n){return t=(n?pn(e,t,n):void 0===t)?1:wr(t),function(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=GM(t/2))&&(e+=e)}while(t);return n}(ge(e),t)}var _M=$i("floor");var XM=Er(Lr());var KM={exports:{}},ZM={exports:{}};!function(e){var t;e.exports=(t=Fr(),function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,a=n.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),l[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],d=n[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,m=c[h-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[h]=g+c[h-7]+y+c[h-16]}var v=r&i^r&o^i&o,A=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+l[h]+c[h];d=f,f=u,u=s,s=a+b|0,a=o,o=i,i=r,r=b+(A+v)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=o._createHelper(u),n.HmacSHA256=o._createHmacHelper(u)}(Math),t.SHA256)}(ZM);var eQ=ZM.exports,tQ=Er(eQ);!function(e){var t;e.exports=(t=Fr(),function(){var e=t,n=e.lib.WordArray,r=e.algo,i=r.SHA256,o=r.SHA224=i.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});e.SHA224=i._createHelper(o),e.HmacSHA224=i._createHmacHelper(o)}(),t.SHA224)}(KM);var nQ,rQ=Er(KM.exports),iQ={exports:{}},oQ={exports:{}};function aQ(){return nQ||(nQ=1,function(e){var t;e.exports=(t=Fr(),function(e){var n=t,r=n.lib,i=r.Base,o=r.WordArray,a=n.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:8*t.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return o.create(n,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}})}(),t)}(oQ)),oQ.exports}var sQ={exports:{}};!function(e){var t;e.exports=(t=Fr(),aQ(),function(){var e=t,n=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=n.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],d=n[7],h=r.high,p=r.low,g=i.high,m=i.low,y=o.high,v=o.low,A=a.high,b=a.low,w=s.high,I=s.low,x=u.high,C=u.low,E=f.high,B=f.low,S=d.high,k=d.low,F=h,D=p,N=g,M=m,Q=y,T=v,L=A,R=b,U=w,H=I,q=x,O=C,P=E,$=B,z=S,j=k,V=0;V<80;V++){var Y,W,G=c[V];if(V<16)W=G.high=0|e[t+2*V],Y=G.low=0|e[t+2*V+1];else{var J=c[V-15],_=J.high,X=J.low,K=(_>>>1|X<<31)^(_>>>8|X<<24)^_>>>7,Z=(X>>>1|_<<31)^(X>>>8|_<<24)^(X>>>7|_<<25),ee=c[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[V-7],ae=oe.high,se=oe.low,le=c[V-16],ce=le.high,ue=le.low;W=(W=(W=K+ae+((Y=Z+se)>>>0<Z>>>0?1:0))+re+((Y+=ie)>>>0<ie>>>0?1:0))+ce+((Y+=ue)>>>0<ue>>>0?1:0),G.high=W,G.low=Y}var fe,de=U&q^~U&P,he=H&O^~H&$,pe=F&N^F&Q^N&Q,ge=D&M^D&T^M&T,me=(F>>>28|D<<4)^(F<<30|D>>>2)^(F<<25|D>>>7),ye=(D>>>28|F<<4)^(D<<30|F>>>2)^(D<<25|F>>>7),ve=(U>>>14|H<<18)^(U>>>18|H<<14)^(U<<23|H>>>9),Ae=(H>>>14|U<<18)^(H>>>18|U<<14)^(H<<23|U>>>9),be=l[V],we=be.high,Ie=be.low,xe=z+ve+((fe=j+Ae)>>>0<j>>>0?1:0),Ce=ye+ge;z=P,j=$,P=q,$=O,q=U,O=H,U=L+(xe=(xe=(xe=xe+de+((fe+=he)>>>0<he>>>0?1:0))+we+((fe+=Ie)>>>0<Ie>>>0?1:0))+W+((fe+=Y)>>>0<Y>>>0?1:0))+((H=R+fe|0)>>>0<R>>>0?1:0)|0,L=Q,R=T,Q=N,T=M,N=F,M=D,F=xe+(me+pe+(Ce>>>0<ye>>>0?1:0))+((D=fe+Ce|0)>>>0<fe>>>0?1:0)|0}p=r.low=p+D,r.high=h+F+(p>>>0<D>>>0?1:0),m=i.low=m+M,i.high=g+N+(m>>>0<M>>>0?1:0),v=o.low=v+T,o.high=y+Q+(v>>>0<T>>>0?1:0),b=a.low=b+R,a.high=A+L+(b>>>0<R>>>0?1:0),I=s.low=I+H,s.high=w+U+(I>>>0<H>>>0?1:0),C=u.low=C+O,u.high=x+q+(C>>>0<O>>>0?1:0),B=f.low=B+$,f.high=E+P+(B>>>0<$>>>0?1:0),k=d.low=k+j,d.high=S+z+(k>>>0<j>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=n._createHelper(u),e.HmacSHA512=n._createHmacHelper(u)}(),t.SHA512)}(sQ);var lQ=sQ.exports,cQ=Er(lQ);!function(e){var t;e.exports=(t=Fr(),aQ(),function(){var e=t,n=e.x64,r=n.Word,i=n.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),t.SHA384)}(iQ);let uQ={1:Pr,224:rQ,256:tQ,384:Er(iQ.exports),512:cQ};function fQ(e,t,n=!1,r={}){let i=Ae(r,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:"";if(!ke(e))return o("invalid str");if(!Vi(t)){if(i)return o("n is not a positive integer");throw new Error("n is not a positive integer")}if(t=ji(t),!Me(uQ,t)){if(i)return o(`invalid n[${t}]`);throw new Error(`invalid n[${t}]`)}we(n)||(n=!1);let a="";try{let r=(0,uQ[t])(e);a=n?r.toString(Qr):r.toString(_r)}catch(e){return o(e.toString())}return i?{state:"success",msg:a}:a}function dQ(e,t){return ke(e)&&ke(t)?function(e,t){if(e=e.replace(/\s+/g,""),t=t.replace(/\s+/g,""),!e.length&&!t.length)return 1;if(!e.length||!t.length)return 0;if(e===t)return 1;if(1===e.length&&1===t.length)return 0;if(e.length<2||t.length<2)return 0;let n=new Map;for(let t=0;t<e.length-1;t++){const r=e.substring(t,t+2),i=n.has(r)?n.get(r)+1:1;n.set(r,i)}let r=0;for(let e=0;e<t.length-1;e++){const i=t.substring(e,e+2),o=n.has(i)?n.get(i):0;o>0&&(n.set(i,o-1),r++)}return 2*r/(e.length+t.length-2)}(e,t):0}function hQ(e){if(!ke(e))return null;let t=e.match(/(\d+)\.(\d+)\.(\d+)/);return t?[Number(t[1]),Number(t[2]),Number(t[3])]:null}function pQ(e){return Array.isArray?Array.isArray(e):"[object Array]"===IQ(e)}function gQ(e){return null==e?"":function(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();const t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function mQ(e){return"string"==typeof e}function yQ(e){return"number"==typeof e}function vQ(e){return!0===e||!1===e||function(e){return AQ(e)&&null!==e}(e)&&"[object Boolean]"==IQ(e)}function AQ(e){return"object"==typeof e}function bQ(e){return null!=e}function wQ(e){return!e.trim().length}function IQ(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const xQ="Invalid doc index: must be a non-negative integer within the bounds of the docs array",CQ=Object.prototype.hasOwnProperty;var EQ=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{const n=BQ(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function BQ(e){let t=null,n=null,r=null,i=1,o=null;if(mQ(e)||pQ(e))r=e,t=SQ(e),n=kQ(e);else{if(!CQ.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const a=e.name;if(r=a,CQ.call(e,"weight")&&void 0!==e.weight&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(kQ(a)));t=SQ(a),n=kQ(a),o=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:o}}function SQ(e){return pQ(e)?e:e.split(".")}function kQ(e){return pQ(e)?e.join("."):e}const FQ={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:function(e,t){const n=[];let r=!1;const i=(e,t,o,a)=>{if(bQ(e))if(t[o]){const s=e[t[o]];if(!bQ(s))return;if(o===t.length-1&&(mQ(s)||yQ(s)||vQ(s)||"bigint"==typeof s))n.push(void 0!==a?{v:gQ(s),i:a}:gQ(s));else if(pQ(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,o+1,e)}else t.length&&i(s,t,o+1,a)}else n.push(void 0!==a?{v:e,i:a}:e)};return i(e,mQ(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},DQ=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...FQ});function NQ(e){return e>=9&&e<=13||32===e||160===e}var MQ=class{constructor({getFn:e=DQ.getFn,fieldNormWeight:t=DQ.fieldNormWeight}={}){this.norm=function(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(t){let i=0,o=!1;for(let e=0;e<t.length;e++)NQ(t.charCodeAt(e))?o=!1:o||(i++,o=!0);if(0===i&&(i=1),n.has(i))return n.get(i);const a=Math.round(r/Math.pow(i,.5*e))/r;return n.set(i,a),a},clear(){n.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(mQ(this.docs[0]))for(let n=0;n<e;n++){const e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(xQ);if(mQ(e)){const n=this._createStringRecord(e,t);return n&&this.records.push(n),n}const n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(xQ);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(0===t.size)return;this.records=this.records.filter(e=>!t.has(e.i));const n=Array.from(t).sort((e,t)=>e-t);for(const e of this.records){let t=0,r=n.length;for(;t<r;){const i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!bQ(e)||wQ(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){const r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(bQ(i))if(pQ(i)){const e=[];for(let t=0,n=i.length;t<n;t+=1){const n=i[t];if(bQ(n))if(mQ(n)){if(!wQ(n)){const r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(bQ(n.v)){const t=mQ(n.v)?n.v:gQ(n.v);if(!wQ(t)){const r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}n.$[t]=e}else if(mQ(i)&&!wQ(i)){const e={v:i,n:this.norm.get(i)};n.$[t]=e}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function QQ(e,t,{getFn:n=DQ.getFn,fieldNormWeight:r=DQ.fieldNormWeight}={}){const i=new MQ({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(BQ)),i.setSources(t),i.create(),i}function TQ(e,t,n,{location:r=DQ.location,distance:i=DQ.distance,threshold:o=DQ.threshold,findAllMatches:a=DQ.findAllMatches,minMatchCharLength:s=DQ.minMatchCharLength,includeMatches:l=DQ.includeMatches,ignoreLocation:c=DQ.ignoreLocation}={}){if(t.length>32)throw new Error((e=>`Pattern length exceeds max of ${e}.`)(32));const u=t.length,f=e.length,d=Math.max(0,Math.min(r,f));let h=o,p=d;const g=(e,t)=>{const n=e/u;if(c)return n;const r=Math.abs(d-t);return i?n+r/i:r?1:n},m=s>1||l,y=m?Array(f):[];let v;for(;(v=e.indexOf(t,p))>-1;){const e=g(0,v);if(h=Math.min(e,h),p=v+u,m){let e=0;for(;e<u;)y[v+e]=1,e+=1}}p=-1;let A=[],b=1,w=0,I=u+f;const x=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=I;for(;r<i;)g(t,d+i)<=h?r=i:I=i,i=Math.floor((I-r)/2+r);I=i;let o=Math.max(1,d-i+1);const s=a?f:Math.min(d+i,f)+u,l=Array(s+2);l[s+1]=(1<<t)-1;for(let r=s;r>=o;r-=1){const i=r-1,a=n[e[i]];if(l[r]=(l[r+1]<<1|1)&a,t&&(l[r]|=(A[r+1]|A[r])<<1|1|A[r+1]),l[r]&x&&(b=g(t,i),b<=h)){if(h=b,p=i,w=t,p<=d)break;o=Math.max(1,2*d-p)}}if(g(t+1,d)>h)break;A=l}if(m&&p>=0){const t=Math.min(f-1,p+u-1+w);for(let r=p;r<=t;r+=1)n[e[r]]&&(y[r]=1)}const C={isMatch:p>=0,score:Math.max(.001,b)};if(m){const e=function(e=[],t=DQ.minMatchCharLength){const n=[];let r=-1,i=-1,o=0;for(let a=e.length;o<a;o+=1){const a=e[o];a&&-1===r?r=o:a||-1===r||(i=o-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(y,s);e.length?l&&(C.indices=e):C.isMatch=!1}return C}function LQ(e){const t={};for(let n=0,r=e.length;n<r;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function RQ(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);const t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){const r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}const UQ={"ł":"l","Ł":"L","đ":"d","Đ":"D","ø":"o","Ø":"O","ħ":"h","Ħ":"H","ŧ":"t","Ŧ":"T","ı":"i","ß":"ss"},HQ=new RegExp("["+Object.keys(UQ).join("")+"]","g"),qQ="function"==typeof String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(HQ,e=>UQ[e]):e=>e;var OQ=class{constructor(e,{location:t=DQ.location,threshold:n=DQ.threshold,distance:r=DQ.distance,includeMatches:i=DQ.includeMatches,findAllMatches:o=DQ.findAllMatches,minMatchCharLength:a=DQ.minMatchCharLength,isCaseSensitive:s=DQ.isCaseSensitive,ignoreDiacritics:l=DQ.ignoreDiacritics,ignoreLocation:c=DQ.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:s,ignoreDiacritics:l,ignoreLocation:c},e=s?e:e.toLowerCase(),e=l?qQ(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const u=(e,t)=>{this.chunks.push({pattern:e,alphabet:LQ(e),startIndex:t})},f=this.pattern.length;if(f>32){let e=0;const t=f%32,n=f-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){const e=f-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?qQ(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}const{location:i,distance:o,threshold:a,findAllMatches:s,minMatchCharLength:l,ignoreLocation:c}=this.options,u=[];let f=0,d=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:h})=>{const{isMatch:p,score:g,indices:m}=TQ(e,t,n,{location:i+h,distance:o,threshold:a,findAllMatches:s,minMatchCharLength:l,includeMatches:r,ignoreLocation:c});p&&(d=!0),f+=g,p&&m&&u.push(...m)});const h={isMatch:d,score:d?f/this.chunks.length:1};return d&&r&&(h.indices=RQ(u)),h}};const PQ=new Set(["fuzzy","include"]);function $Q(e){return e.startsWith("inverse")}const zQ=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n,r=0;const i=[],o=e.length;for(;(n=t.indexOf(e,r))>-1;)r=n+o,i.push([n,r-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=-1===t.indexOf(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new OQ(e,{location:t.location??DQ.location,threshold:t.threshold??DQ.threshold,distance:t.distance??DQ.distance,includeMatches:t.includeMatches??DQ.includeMatches,findAllMatches:t.findAllMatches??DQ.findAllMatches,minMatchCharLength:t.minMatchCharLength??DQ.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??DQ.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??DQ.ignoreDiacritics,ignoreLocation:t.ignoreLocation??DQ.ignoreLocation});return{type:"fuzzy",search:e=>n.searchIn(e)}}}],jQ=zQ.length;function VQ(e,t){const n=e.match(t);return n?n[1]:null}const YQ=[];function WQ(...e){YQ.push(...e)}function GQ(e,t){for(let n=0,r=YQ.length;n<r;n+=1){const r=YQ[n];if(r.condition(e,t))return new r(e,t)}return new OQ(e,t)}const JQ="$and",_Q="$or",XQ="$path",KQ="$val",ZQ=e=>!(!e[JQ]&&!e[_Q]),eT=e=>({[JQ]:Object.keys(e).map(t=>({[t]:e[t]}))});function tT(e,t,{auto:n=!0}={}){const r=e=>{if(mQ(e)){const r={keyId:null,pattern:e};return n&&(r.searcher=GQ(e,t)),r}const i=Object.keys(e),o=(e=>!!e[XQ])(e);if(!o&&i.length>1&&!ZQ(e))return r(eT(e));if((e=>!pQ(e)&&AQ(e)&&!ZQ(e))(e)){const r=o?e[XQ]:i[0],a=o?e[KQ]:e[r];if(!mQ(a))throw new Error((e=>`Invalid value for key ${e}`)(r));const s={keyId:kQ(r),pattern:a};return n&&(s.searcher=GQ(a,t)),s}const a={children:[],operator:i[0]};return i.forEach(t=>{const n=e[t];pQ(n)&&n.forEach(e=>{a.children.push(r(e))})}),a};return ZQ(e)||(e=eT(e)),r(e)}function nT(e,{ignoreFieldNorm:t=DQ.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{const o=e?e.weight:null;n*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(t?1:r))}),n}var rT=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let r=e;do{const i=2*(e=r)+1,o=2*e+2;if(i<n&&this.comparator(t[i],t[r])>0&&(r=i),o<n&&this.comparator(t[o],t[r])>0&&(r=o),r!==e){const n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function iT(e,t,{includeMatches:n=DQ.includeMatches,includeScore:r=DQ.includeScore}={}){return e.map(e=>{const{idx:i}=e,o={item:t[i],refIndex:i};return n&&(o.matches=function(e){const t=[];return e.matches.forEach(e=>{if(!bQ(e.indices)||!e.indices.length)return;const n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}(e)),r&&(o.score=e.score),o})}const oT=/[\p{L}\p{M}\p{N}_]+/gu,aT=new WeakSet;function sT(e){if("function"==typeof e){let t=!1;return n=>{const r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>"string"!=typeof e)))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?"array containing non-strings":typeof r}.`);return r}}return e instanceof RegExp?(e.global||function(e){aT.has(e)||(aT.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}(e),t=>t.match(e)||[]):e=>e.match(oT)||[]}function lT({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const r=sT(n);return{tokenize:n=>(e||(n=n.toLowerCase()),t&&(n=qQ(n)),r(n))}}function cT(e,t,n,r){const i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const o=new Set(i);let a=e.docTermFieldHits.get(n);a||(a=new Map,e.docTermFieldHits.set(n,a));for(const t of o)a.set(t,(a.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function uT(e,t,n,r){const{i:i,v:o,$:a}=t;if(void 0===o){if(a)for(let t=0;t<n;t++){const n=a[t];if(n)if(Array.isArray(n))for(const t of n)cT(e,t.v,i,r);else cT(e,n.v,i,r)}}else cT(e,o,i,r)}function fT(e,t){const n=e.docFieldCount.get(t);if(void 0===n)return;e.fieldCount-=n,e.docFieldCount.delete(t);const r=e.docTermFieldHits.get(t);if(r){for(const[t,n]of r){const r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function dT(e,t){if(0===t.length)return;const n=Array.from(new Set(t)).sort((e,t)=>e-t);for(const t of n)fT(e,t);const r=e=>{let t=0,r=n.length;for(;t<r;){const i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],o=new Map;for(const[t,n]of e.docFieldCount)o.set(t>i?r(t):t,n);e.docFieldCount=o;const a=new Map;for(const[t,n]of e.docTermFieldHits)a.set(t>i?r(t):t,n);e.docTermFieldHits=a}var hT=class{constructor(e,t,n){this.options={...DQ,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new EQ(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=GQ(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof MQ))throw new Error("Incorrect 'index' type");if(this._myIndex=t||QQ(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const e=lT({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function(e,t,n){const r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of e)uT(r,i,t,n);return r}(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!bQ(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const e=lT({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function(e,t,n,r){uT(e,t,n,r)}(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&dT(this._invertedIndex,n);const e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(xQ);this._invertedIndex&&dT(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:o,sortFn:a,ignoreFieldNorm:s}=this.options;if(mQ(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return yQ(n)&&n>-1&&(e=e.slice(0,n)),e}const l=o&&yQ(n)&&n>0&&mQ(e),c=a,u=(e,t)=>c(e,t)||e.idx-t.idx;let f;if(l){const t=new rT(n,u);mQ(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),f=t.extractSorted()}else f=mQ(e)?mQ(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),function(e,{ignoreFieldNorm:t=DQ.ignoreFieldNorm}){e.forEach(e=>{e.score=nT(e.matches,{ignoreFieldNorm:t})})}(f,{ignoreFieldNorm:s}),o&&f.sort(mQ(e)?u:c),yQ(n)&&n>-1&&(f=f.slice(0,n));return iT(f,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const r=this._getSearcher(e),i=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:o}=this._myIndex,a=t?null:[];return o.forEach(({v:e,i:o,n:s})=>{if(!bQ(e))return;const l=r.searchIn(e);if(l.isMatch){const r={score:l.score,value:e,norm:s,indices:l.indices};i&&(r.matchedMask=l.matchedMask,r.matchedTerms=l.matchedTerms,r.termCount=l.termCount);const c=[r];if(!i||this._coversAllTokens(c)){const r={item:e,idx:o,matches:c};t?(r.score=nT(r.matches,{ignoreFieldNorm:n}),t.insert(r)):a.push(r)}}}),a}_searchLogical(e){const t=tT(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!("children"in e)){const{keyId:r,searcher:o}=e;let a;return null===r?(a=[],n.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:o}))})):a=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:o}),a&&a.length?[{idx:i,item:t,matches:a}]:[]}const{children:o,operator:a}=e,s=[];for(let e=0,n=o.length;e<n;e+=1){const n=o[e],l=r(n,t,i);if(l.length)s.push(...l);else if(a===JQ)return[]}return s},i=this._myIndex.records,o=new Map,a=[];return i.forEach(({$:e,i:n})=>{if(bQ(e)){const i=r(t,e,n);i.length&&(o.has(n)||(o.set(n,{idx:n,item:e,matches:[]}),a.push(o.get(n))),i.forEach(({matches:e})=>{o.get(n).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const r=this._getSearcher(e),i=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:o}=this._myIndex,a=this._normalizedKeys(),s=t?null:[];return o.forEach(({$:e,i:o})=>{if(!bQ(e))return;const l=[];let c=!1,u=!1;if(a.forEach((t,n)=>{const i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(l.push(...i),i[0].hasInverse&&(u=!0)):c=!0}),(!u||!c)&&l.length&&(!i||this._coversAllTokens(l))){const r={idx:o,item:e,matches:l};t?(r.score=nT(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!bQ(t))return[];const r=[];if(pQ(t))t.forEach(({v:t,i:i,n:o})=>{if(!bQ(t))return;const a=n.searchIn(t);if(a.isMatch){const n={score:a.score,key:e,value:t,idx:i,norm:o,indices:a.indices,hasInverse:a.hasInverse};void 0!==a.termCount&&(n.matchedMask=a.matchedMask,n.matchedTerms=a.matchedTerms,n.termCount=a.termCount),r.push(n)}});else{const{v:i,n:o}=t,a=n.searchIn(i);if(a.isMatch){const t={score:a.score,key:e,value:i,norm:o,indices:a.indices,hasInverse:a.hasInverse};void 0!==a.termCount&&(t.matchedMask=a.matchedMask,t.matchedTerms=a.matchedTerms,t.termCount=a.termCount),r.push(t)}}return r}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(void 0===t)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}const n=new Set;for(let t=0;t<e.length;t++){const r=e[t].matchedTerms;if(r)for(const e of r)n.add(e)}return n.size===t}};hT.version="7.5.0",hT.createIndex=QQ,hT.parseIndex=function(e,{getFn:t=DQ.getFn,fieldNormWeight:n=DQ.fieldNormWeight}={}){const{keys:r,records:i}=e,o=new MQ({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(i),o},hT.config=DQ,hT.match=function(e,t,n){if(n&&n.useTokenSearch)throw new Error("Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.");return GQ(e,{...DQ,...n}).searchIn(t)},hT.parseQuery=tT,WQ(class{constructor(e,{isCaseSensitive:t=DQ.isCaseSensitive,ignoreDiacritics:n=DQ.ignoreDiacritics,includeMatches:r=DQ.includeMatches,minMatchCharLength:i=DQ.minMatchCharLength,ignoreLocation:o=DQ.ignoreLocation,findAllMatches:a=DQ.findAllMatches,location:s=DQ.location,threshold:l=DQ.threshold,distance:c=DQ.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:a,ignoreLocation:o,location:s,threshold:l,distance:c},e=t?e:e.toLowerCase(),e=n?qQ(e):e,this.pattern=e,this.query=function(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(e=>{const n=function(e){const t=[],n=e.length;let r=0;for(;r<n;){for(;r<n&&" "===e[r];)r++;if(r>=n)break;let i=r;for(;i<n&&" "!==e[i]&&'"'!==e[i];)i++;if(i<n&&'"'===e[i]){for(i++;i<n;){if('"'===e[i]){const t=i+1;if(t>=n||" "===e[t]){i++;break}if("$"===e[t]&&(t+1>=n||" "===e[t+1])){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&" "!==e[i];)i++;t.push(e.substring(r,i)),r=i}}return t}(e.replace(/\u0000/g,"|").trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){const i=n[e];let o=!1,a=-1;for(;!o&&++a<jQ;){const e=zQ[a],n=VQ(i,e.multiRegex);n&&(r.push(e.create(n,t)),o=!0)}if(!o)for(a=-1;++a<jQ;){const e=zQ[a],n=VQ(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?qQ(e):e;let o=0;const a=[];let s=0,l=!1;for(let r=0,i=t.length;r<i;r+=1){const i=t[r];a.length=0,o=0,l=!1;for(let t=0,r=i.length;t<r;t+=1){const r=i[t],{isMatch:c,indices:u,score:f}=r.search(e);if(!c){s=0,o=0,a.length=0,l=!1;break}o+=1,s+=f,$Q(r.type)&&(l=!0),n&&(PQ.has(r.type)?a.push(...u):a.push(u))}if(o){const e={isMatch:!0,score:s/o};return l&&(e.hasInverse=!0),n&&(e.indices=RQ(a)),e}}return{isMatch:!1,score:1}}}),WQ(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=lT({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const e of n){this.termSearchers.push(new OQ(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const n=r.get(e)||0,o=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(o)}this.combineAll="all"===t.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,r=0,i=0,o=0;const a=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){const l=this.termSearchers[s].searchIn(e),c=this.idfWeights[s];r+=c,l.isMatch&&(i++,n+=c*(1-l.score),l.indices&&t.push(...l.indices),this.combineAll&&(this.useMask?o|=1<<s:a.add(s)))}if(0===i)return{isMatch:!1,score:1};const s=r>0?1-n/r:0,l={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(l.indices=RQ(t)),this.combineAll&&(this.useMask?l.matchedMask=o:l.matchedTerms=a,l.termCount=this.numTerms),l}}),hT.use=function(...e){e.forEach(e=>WQ(e))};var pT=hT;function gT(e){return function(e,t){var n=null==e?0:e.length;return n?pa(e,t)/n:NaN}(e,un)}function mT(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:{};if(!Be(e))return r("invalid data");let i=null,o=null;try{i=e.results,o=e.binarys}catch(e){return r(e.toString())}if(!ke(i))return r("invalid results");if(!Ce(o))return r("invalid binarys");let a=/^\[BlazeFor(Uint8Array|Uint16Array|ArrayBuffer)\]::(\d+)$/,s=/^\[BlazeForPreventEscape\](?:\[BlazeForPreventEscape\])*\[BlazeFor(?:Uint8Array|Uint16Array|ArrayBuffer)\]::\d+$/,l={};try{l=JSON.parse(i,function(e,t){if(!ke(t)||91!==t.charCodeAt(0))return t;let n=a.exec(t);if(null===n)return s.test(t)?t.slice(23):t;let r=Number(n[2]);if(r>=o.length)throw new Error(`binary index out of range[${r}], binarys.length[${o.length}]`);return((e,t,n)=>{if("Uint16Array"===e&&!WD(n)){if(!as(n))throw new Error(`binarys[${t}] can not be restored to Uint16Array`);if(n.byteLength%2!=0)throw new Error(`binarys[${t}] byteLength[${n.byteLength}] is not even, can not be restored to Uint16Array`);let e=0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n:new Uint8Array(n);return new Uint16Array(e.buffer)}if("ArrayBuffer"===e&&!Ie(n)){if(!as(n))throw new Error(`binarys[${t}] can not be restored to ArrayBuffer`);return n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}return n})(n[1],r,o[r])})}catch(e){return r(e.toString())}return n?{state:"success",msg:l}:l}function yT(e,n=null,r={}){let i=Ae(r,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=(e,t)=>i?{state:"error",msg:e}:{today:null,msg:"",err:t};if(!Ui(t))throw new Error("invalid dayjs");if(!cM(e))return o("invalid t","時間格式錯誤");let a=null;try{a=function(e,n){let r=t();cM(n)&&(r=t(n,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=t(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r>i)return{today:null,msg:"",err:"時間已過"};let o,a=r.format("YYYY-MM-DD"),s=i.format("YYYY-MM-DD"),l=t(a,"YYYY-MM-DD"),c=t(s,"YYYY-MM-DD"),u=i.diff(r,"seconds"),f=i.diff(r,"minutes"),d=i.diff(r,"hours"),h=c.diff(l,"days"),p=c.diff(l,"weeks"),g=c.diff(l,"months"),m=c.diff(l,"years"),y="即將到來";if(u>=0&&(o=!0,y=u+"秒後"),f>0&&(o=!0,y=f+"分鐘後"),d>0){let e=i.format("HH:mm");a===s?(o=!0,y=d+"小時後,今天"+e):(o=!1,y=d+"小時後,明天"+e)}return h>1&&(o=!1,y=2===h?"後天":h+"天後"),p>0&&(o=!1,y=p+"周後"),g>0&&(o=!1,y=g+"個月後"),m>0&&(o=!1,y=m+"年後"),{today:o,msg:y,err:""}}(e,n)}catch(e){return o(e.toString(),"時間轉換失敗")}return s=a,i?{state:"success",msg:s}:s;var s}function vT(e,n=null,r={}){let i=Ae(r,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=(e,t)=>i?{state:"error",msg:e}:{today:null,msg:"",err:t};if(!Ui(t))throw new Error("invalid dayjs");if(!cM(e))return o("invalid t","時間格式錯誤");let a=null;try{a=function(e,n){let r=t();cM(n)&&(r=t(n,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=t(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r<i)return{today:null,msg:"",err:"時間未到"};let o=r.format("YYYY-MM-DD"),a=i.format("YYYY-MM-DD"),s=t(o,"YYYY-MM-DD"),l=t(a,"YYYY-MM-DD"),c=r.diff(i,"seconds"),u=r.diff(i,"minutes"),f=r.diff(i,"hours"),d=s.diff(l,"days"),h=s.diff(l,"weeks"),p=s.diff(l,"months"),g=s.diff(l,"years"),m=!1,y="剛剛";if(c>=0&&(m=!0,y=c+"秒前"),u>0&&(m=!0,y=u+"分鐘前"),f>0){let e=i.format("HH:mm");o===a?(m=!0,y=f+"小時前"):(m=!1,y="昨天"+e)}return d>1&&(m=!1,y=d+"天前"),h>0&&(m=!1,y=h+"周前"),p>0&&(m=!1,y=p+"個月前"),g>0&&(m=!1,y=g+"年前"),{today:m,msg:y,err:""}}(e,n)}catch(e){return o(e.toString(),"時間轉換失敗")}return s=a,i?{state:"success",msg:s}:s;var s}function AT(e){let t=lM.sepTZ(e);return e=`${t.t}.000${t.tz}`}function bT(e){let t=lM.sepTZ(e);return e=`${t.t}.000${t.tz}`}function wT(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!as(e))return r("invalid u8a");let i="";try{let t=wM(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`u8arr2b64: ${t.msg}`);i=Oa(t.msg)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}e.ab2blob=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Blob;if(!Ie(e))return r("invalid ab");let i=null;try{let t=xe(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`ab2u8arr: ${t.msg}`);i=new Blob([t.msg])}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.ab2u8arr=xe,e.addExcelWorksheetFromData=function(e,t,n="data"){if(!Be(e))return{error:"wb is not an effective object"};if(!Ce(Ae(e,"sheets")))return{error:"wb.sheets is not an array"};ke(n)||(n="data");let r=cr(t);return Me(r,"error")?r:(e.sheets.push({...r,name:n}),e)},e.addMonth=function(e,n){return ur(e)&&xr(n)?t(e,"YYYY-MM").add(n,"months").format("YYYY-MM"):""},e.aes2str=Xr,e.alive=function(e={}){let t=qi({type:"safe"}),n={},r=null,i=Ae(e,"timeAlive");Vi(i)||(i=1e4),i=ji(i);let o=Ae(e,"timeDetect");return Vi(o)||(o=50),o=ji(o),t.trigger=function(e,a){ke(e)?(Me(n,e)||setTimeout(()=>{t.emit("message",{eventName:"enter",key:e,data:a,now:or(n)})},1),n[e]={data:a,time:Date.now()},null===r&&(r=setInterval(()=>{vn(n,(e,r)=>{if(Date.now()-e.time>i){let e=Ti(n[r]);delete n[r],t.emit("message",{eventName:"leave",key:r,data:e.data,now:or(n)})}}),Be(n)||(clearInterval(r),r=null)},o))):console.log("trigger need key")},t.get=function(){let e=[];return vn(n,(t,n)=>{e.push({key:n,data:t.data})}),e=Ti(e),e},t},e.arr2dt=function(e,t=""){if(!Mn(e))return{};if(Mn(t))return or(e)===or(t)?Yi(e,t):{};let n=[];for(let r=0;r<or(e);r++)n.push(Ti(t));return Yi(e,n)},e.arrAccum=function(e){if(!Mn(e))return[];let t=[],n=0;return vn(e,function(e){n+=Ir(e),Ne(e)?t.push(n):t.push("")}),t},e.arrAdd=function(){if(or(arguments)<2)return[];let e=arguments[0];for(let t=1;t<or(arguments);t++){e=Wi(e,arguments[t])}return e},e.arrAt=go,e.arrDiff=Xo,e.arrFilterByKeywords=function(e,t){if(!Mn(e))return[];if(!ke(t)&&!Mn(t))return[];let n=null;n=ke(t)?ea(t," "):t;let r=or(n);return bn(e,e=>function(e){let t=!1,i=0;for(let o=0;o<r;o++){let a=n[o],s=a,l="+"===ta(a,1),c="-"===ta(a,1);if((l||c)&&(s=ra(a,1)),""===Ko(s))continue;let u=e.indexOf(s)>=0;if(l){if(u){t=!0,i=1;break}t=!1,i=0;break}if(c){if(u){t=!1,i=0;break}t=!0,i=1;break}if(u){t=!0;let e=1-o/r;e=e**2,i+=e}}return{hasKeyword:t,weight:i}}(e))},e.arrFilterByNum=function(e){return Mn(e)?e=bn(e=oa(e=Ti(e),Ne),Ir):[]},e.arrFilterByPnum=sa,e.arrFilterByPnumAndToLog=function(e){return Mn(e)?e=bn(e=sa(e),Math.log):[]},e.arrFind=function(e,t){function n(e){return Ce(e)?e:[e]}return Nn(e)||0===(e=n(e)).length||Nn(t)?[]:bn(t=n(t),function(t){let n=-1;for(let r=0;r<e.length;r++)if(la(e[r],t)){n=r;break}return n})},e.arrGroupByMaxmin=function(e,t,n={}){let r=Ae(n,"keyMax");ke(r)||(r="max");let i=Ae(n,"keyMin");ke(i)||(i="min");let o=Ae(n,"keyValue");ke(o)||(o="value");let a=Ae(n,"keyItems");if(ke(a)||(a="items"),!Mn(e))return[];if(!Mn(t))return[];let s=Ti(t);return vn(e,(e,n)=>{let l=Ae(e,o);Ne(l)?l=Ir(l):Ne(e)&&(l=Ir(e)),ca(l)&&vn(t,(t,n)=>{let o=Ae(t,r,null),c=Ae(t,i,null);if(null!==o&&null!==c&&Ne(o)&&Ne(c)){let r=Ae(t,"maxType");"<="!==r&&"<"!==r&&(r="<=");let i,u,f=Ae(t,"minType");">="!==f&&">"!==f&&(f=">="),o=Ir(o),c=Ir(c),i=">="===f?l>=c:l>c,u="<="===r?l<=o:l<o,i&&u&&(Me(s[n],a)||(s[n][a]=[]),s[n][a].push(e))}})}),s},e.arrHas=ua,e.arrInsert=function(e,t,n){if(!Ce(e))return[];if(Ce(n)||(n=[n]),!po(t))return e;if((t=ji(t))>or(e))return e;let r=e;try{r=[...e.slice(0,t),...n,...e.slice(t)]}catch(e){}return r},e.arrLookupByMaxmin=function(e,t,n={}){let r=Ae(n,"keyMax");ke(r)||(r="max");let i=Ae(n,"keyMin");ke(i)||(i="min");let o=Ae(n,"keyValue");ke(o)||(o="value");let a=Ae(n,"keyItems");ke(a)||(a="items");let s=Ae(n,"beforeAddResult",null);if(!Mn(e))return[];if(!Mn(t))return[];if(!Be(Ae(e,0)))return[];let l=Ti(e);return vn(l,(e,n)=>{let c=Ae(e,o);Ne(c)&&(c=Ir(c)),ca(c)&&vn(t,(e,t)=>{let o=Ae(e,r,null),u=Ae(e,i,null);if(null!==o&&null!==u&&Ne(o)&&Ne(u)){let t=Ae(e,"maxType");"<="!==t&&"<"!==t&&(t="<=");let r,i,f=Ae(e,"minType");">="!==f&&">"!==f&&(f=">="),o=Ir(o),u=Ir(u),r=">="===f?c>=u:c>u,i="<="===t?c<=o:c<o,r&&i&&(Ui(s)&&(e=s(e,l[n],n)),Me(l[n],a)||(l[n][a]=[]),l[n][a].push(e))}})}),l},e.arrMax=function(e,t={}){if(!Mn(e))return null;let n=Ae(t,"returnIndex");we(n)||(n=!1);let r=Ae(t,"compareKey",null),i=e;ke(r)&&(i=bn(e,(e,t)=>Ae(e,r,"")));let o=null,a=fa(i,(e,t)=>Ne(t)?(t=Ir(t),null===e?(o=t,t):(e=Math.max(e,t),o=e,e)):e,{returnIndex:!0});if(n)return a;let s=null;return a>=0&&(s=ke(r)?e[a]:o),s},e.arrMin=function(e,t={}){if(!Mn(e))return null;let n=Ae(t,"returnIndex");we(n)||(n=!1);let r=Ae(t,"compareKey",null),i=e;ke(r)&&(i=bn(e,(e,t)=>Ae(e,r,"")));let o=null,a=fa(i,(e,t)=>Ne(t)?(t=Ir(t),null===e?(o=t,t):(e=Math.min(e,t),o=e,e)):e,{returnIndex:!0});if(n)return a;let s=null;return a>=0&&(s=ke(r)?e[a]:o),s},e.arrMulti=ha,e.arrNorm=function(e){if(!Mn(e))return null;let t=ga(e,e);return Ne(t)?t<=0?null:Math.sqrt(t):null},e.arrProduct=ga,e.arrPull=function(e,t){if(!Mn(e))return[];if((Ee(t)||Ne(t)||Se(t)||we(t))&&(t=[t]),!Mn(t))return e;let n=Ti(e);return va(n,t),n},e.arrPullAt=function(e,t){if(!Mn(e))return[];if(po(t)&&(t=[t]),!Mn(t))return e;t=bn(t,e=>ji(e));let n=Ti(e);return Ca(n,t),n},e.arrReduce=fa,e.arrReverse=function(e){if(!Mn(e))return[];let t=Ti(e);return Ba(t),t},e.arrSep=function(e,t){if(!Mn(e))return[];if(!Vi(t)&&!Be(t))return[];let n="",r=null;if(Vi(t))r=t,n="numCount";else if(Be(t))if(Vi(Ae(t,"numCount")))r=t.numCount,n="numCount";else{if(!Vi(Ae(t,"numGroup")))throw new Error("invalid opt.numCount or opt.numGroup");r=t.numGroup,n="numGroup"}let i=or(e),o=[];if("numCount"===n)for(let t=0;t<i;t+=r){let n=[];for(let o=0;o<r;o++){let r=t+o;r<i&&n.push(e[r])}o.push(n)}else if("numGroup"===n){for(let e=0;e<r;e++)o[e]=[];let t=-1;for(let n=0;n<i;n++)t++,t>r-1&&(t=0),o[t].push(e[n])}return o},e.arrSort=qa,e.asind=function(e){return Ne(e)?(e=Ir(e),180*Math.asin(e)/Math.PI):null},e.atan2d=function(e,t){return Ne(e)?(e=Ir(e),Ne(t)?(t=Ir(t),180*Math.atan2(t,e)/Math.PI):null):null},e.atand=function(e){return Ne(e)?(e=Ir(e),180*Math.atan(e)/Math.PI):null},e.attstr=function(e={}){let t=";",n="@",r="table",i="id",o=Ae(e,"uniqItems");we(o)||(o=!1);let a=Ae(e,"dlmItem","");ke(a)&&(t=a);let s=Ae(e,"dlmSep","");ke(s)&&(n=s);let l=Ae(e,"keyTable","");ke(l)&&(r=l);let c=Ae(e,"keyId","");ke(c)&&(i=c);let u=Ae(e,"mode");function f(e){if(!ke(e))return[];let n=Lo(e,t);return o&&(n=Pn(n)),n}function d(e){if(!Mn(e))return"";return o&&(e=Pn(e)),yo(e,t)}function h(e){return e=oa(e,ke),o&&(e=Pn(e)),d(e)}function p(e){let t=[];return vn(e,e=>{let o=Ae(e,r,""),a=Ae(e,i,"");if(ke(o),Se(a)||(Ce(a)?or(a):a=""),Se(a))t.push(`${o}${n}${a}`);else if(Ce(a)){let e=yo(a,n);t.push(`${o}${n}${e}`)}}),e=d(t)}function g(e){if(!ke(e))return[];return oa(f(e),ke)}function m(e){if(!ke(e))return[];let t=f(e),o=[];return vn(t,e=>{let t=Lo(e,n),a=Ae(t,0,""),s=Ae(t,1,"");or(t)>=3&&(t=Ma(t),s=t),o.push({item:e,[r]:a,[i]:s})}),o}function y(e,t){let n=[...g(e),...g(t)];return 0===or(n)?"":h(n)}function v(e,t){let n=[...m(e),...m(t)];return 0===or(n)?"":p(n)}function A(e,t){let n=g(e),r=g(t),i=[];return vn(n,e=>{ua(e,r)||i.push(e)}),0===or(i)?"":h(i)}function b(e,t){let n=m(e),r=m(t),i=[];return vn(n,e=>{ua(e,r)||i.push(e)}),0===or(i)?"":p(i)}"1p"!==u&&"2p"!==u&&(u="auto");let w={parse:function(e,t={}){if(!ke(e))return[];let r=Ae(t,"mode");return"1p"!==r&&"2p"!==r&&(r=u),"1p"===r?g(e):"2p"===r||e.indexOf(n)>=0?m(e):g(e)},join:function(e,t={}){if(!Mn(e))return"";let n=Ae(t,"mode");if("1p"!==n&&"2p"!==n&&(n=u),"1p"===n)return h(e);if("2p"===n)return p(e);let o=Ae(e,0);return Me(o,r)&&Me(o,i)?p(e):h(e)},remove:function(e,t,r={}){if(!ke(e))return"";if(!ke(t))return e;let i=Ae(r,"mode");return"1p"!==i&&"2p"!==i&&(i=u),"1p"===i?A(e,t):"2p"===i||t.indexOf(n)>=0?b(e,t):A(e,t)},add:function(e,t,r={}){let i=Ae(r,"mode");if("1p"!==i&&"2p"!==i&&(i=u),"1p"===i)return y(e,t);if("2p"===i)return v(e,t);let o=e.indexOf(n)>=0,a=t.indexOf(n)>=0;return o||a?v(e,t):y(e,t)}};return w},e.b642obj=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:{};if(!Se(e))return r("invalid b64");let i={};try{let t=Oa(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`b642str: ${t.msg}`);let n=Pa(t.msg,{returnWithStateAndMsg:!0});if("error"===n.state)return r(`j2o: ${n.msg}`);i=n.msg}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.b642str=Oa,e.b642u16arr=Ya,e.b642u8arr=Va,e.binstr=Wa,e.blob2ab=Xa,e.blob2b64=Ka,e.blob2str=function(e){if(!Ja(e))return Promise.reject("invalid bb");if(!_a())return Promise.reject("no window");let t=Ga();try{let n=new FileReader;n.onload=function(){t.resolve(n.result)},n.onerror=function(e){t.reject(e)},n.readAsText(e)}catch(e){t.reject(e)}return t},e.blob2u8arr=Za,e.blobs2b64s=es,e.blobs2u8arrs=ts,e.bodyLog=function(){let e=`\n <div style="padding:5px; font-size:10pt; font-family:Microsoft JhengHei, Helvetica;">\n <span style="color:#f26;">log: </span>\n <code>${is(bn(arguments,function(e){return ar(e)}).join(", "))}</code>\n </div>\n `;document.querySelector("body").insertAdjacentHTML("beforeend",e)},e.browserView=os,e.browserViewFromBlob=function(e,t){Ja(e)&&os(e,t)},e.browserViewFromText=function(e){Se(e)&&os(e,"text/plain")},e.browserViewFromU8arr=function(e,t){as(e)&&os(e,t)},e.bs2u8arr=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!ke(e))return r("invalid bs");let i=null;try{let t=e.length;i=new Uint8Array(t);for(let n=0;n<t;n++)i[n]=e.charCodeAt(n)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.bufRead=ss,e.bufReadDbl=ls,e.bufWrite=cs,e.bufWriteDbl=us,e.cache=function(){let e=qi({type:"safe"}),t={};function n(t,n){setTimeout(()=>{e.emit(t,n)},1)}function r(e,r={}){if(Me(t,e))return;let i=Ae(r,"fun");Ui(i)||(i=async()=>{});let o=Ae(r,"inputs");Ce(o)||(o=[]);let a=Ae(r,"timeExpired");Vi(a)||(a=5e3),a=ji(a);let s=Ae(r,"timeFrom");"end"!==s&&(s="start");let l=Ae(r,"useCacheWhenError");we(l)||(l=!1);let c=Ae(r,"useCloneDeep");we(c)||(c=!0),t[e]={needExec:!0,fun:i,pm:null,gen:0,inputs:o,value:null,time:null,timeExpired:a,timeFrom:s,useCacheWhenError:l,useCloneDeep:c},n("message",{fun:"set",key:e,timeExpired:a,timeFrom:s,useCacheWhenError:l,useCloneDeep:c})}async function i(e,r={}){if(Me(t,e)){let i=t[e],o=Ae(r,"useCloneDeep");if(we(o)||(o=i.useCloneDeep),i.pm)return n("message",{fun:"get",key:e,msg:"waiting"}),await i.pm,o?Ti(i.value):i.value;let a=Date.now(),s=i.needExec,l=a-i.time;if(s?n("message",{fun:"get",key:e,msg:"execute first"}):i.timeExpired>0&&l>i.timeExpired&&(n("message",{fun:"get",key:e,msg:"execute by timeExpired",timeDiff:l}),s=!0),s){n("message",{fun:"get",key:e,msg:"fun start"}),i.needExec=!1;let t=i.gen,r=async()=>{try{let r;try{r=await i.fun(...i.inputs)}catch(o){if(n("error",{fun:"get",key:e,msg:o}),!i.useCacheWhenError)throw i.gen===t&&(i.needExec=!0),o;r=void 0}i.gen===t&&(i.value=r,i.time="end"===i.timeFrom?Date.now():a)}finally{i.pm=null,n("message",{fun:"get",key:e,msg:"fun end"})}};i.pm=r(),await i.pm}else n("message",{fun:"get",key:e,msg:"use cache"});return o?Ti(i.value):i.value}return n("error",{fun:"get",key:e,msg:"invalid key"}),null}return e.set=r,e.getProxy=async function(e,t={}){return r(e,t),i(e,t)},e.get=i,e.update=function(e,r){Me(t,e)&&(n("message",{fun:"updateValue",key:e}),t[e].value=r,t[e].time=Date.now(),t[e].gen+=1)},e.clear=function(e){Me(t,e)&&(n("message",{fun:"clear",key:e}),t[e].needExec=!0)},e.remove=function(e){Me(t,e)&&(n("message",{fun:"remove",key:e}),delete t[e])},e},e.cacheBd=function(e,t={}){let n=Ae(t,"nMax");Vi(n)||(n=200),n=ji(n);let r=Ae(t,"nTrigger");Vi(r)||(r=3),r=ji(r);let i=null,o=!1,a=async(...t)=>(o=!0,i=await e(...t),o=!1,i);return{get:a,getFromCache:async(...e)=>{for(let t=1;t<=n&&(t>r&&!o&&await a(...e).catch(()=>{}),null===i);t++)await fs(1e3);if(null===i)throw new Error(`exceeded nMax[${n}]`);return i}}},e.cacheSt=function(e={}){let t=Ae(e,"timeExpire",null);Vi(t)||(t=18e5),t=ji(t);let n=Ae(e,"timeDetect",null);Vi(n)||(n=2e3),n=ji(n);let r=qi({type:"safe"}),i={},o=e=>{if(Me(i,e)){let t=`checkWithSet: key in use: ${e}`;return r.emit("checkWithSet",{state:"error",msg:t}),!1}i[e]={time:Date.now(),value:!0};let t=`checkWithSet: ${e}`;return r.emit("checkWithSet",{state:"success",msg:t}),!0},a=setInterval(()=>{r.emit("detect",{state:"start"});let e=Date.now();for(let n of Object.keys(i)){let r=i[n];r&&e-r.time>t&&delete i[n]}r.emit("detect",{state:"finish"})},n);return r.checkWithSet=o,r.setWithFree=async(e,t)=>{r.emit("setWithFree",{state:"start"});let n=[];for(let t of e){if(!o(t)){for(let e of n)delete i[e];let e=`setWithFree: key in use: ${t}`;return r.emit("setWithFree",{state:"error",msg:e}),Promise.reject(e)}n.push(t)}try{let n=await t(),i=`setWithFree: ${e.join(", ")}`;return r.emit("setWithFree",{state:"success",msg:i}),n}catch(e){let t=`setWithFree: fn threw: ${e&&e.message||e}`;throw r.emit("setWithFree",{state:"error",msg:t}),e}finally{for(let e of n)delete i[e]}},r.set=async(e,t=!0)=>{i[e]={time:Date.now(),value:t};let n=`set: ${e}`;r.emit("set",{state:"success",msg:n})},r.get=async e=>{let t=i[e],n=void 0===t?null:t.value,o=`get: ${e}`;return r.emit("get",{state:"success",msg:o}),n},r.check=async e=>{let t=Me(i,e),n=`check: ${e} = ${t}`;return r.emit("check",{state:"success",msg:n}),t},r.del=async e=>{delete i[e];let t=`del: ${e}`;r.emit("del",{state:"success",msg:t})},r.waitExist=async(e,t={})=>{let n=Ae(t,"attemptNum",null);Vi(n)||(n=30),n=ji(n);let o=Ae(t,"timeInterval",null);Vi(o)||(o=100),o=ji(o),r.emit("waitExist",{state:"start"});try{await ds(()=>Me(i,e),{attemptNum:n,timeInterval:o})}catch(t){let i=`waitExist timeout (${n*o}ms): ${e}`;return r.emit("waitExist",{state:"error",msg:i}),Promise.reject(i)}let a=`waitExist resolved: ${e}`;r.emit("waitExist",{state:"success",msg:a})},r.waitNotExist=async(e,t={})=>{let n=Ae(t,"attemptNum",null);Vi(n)||(n=30),n=ji(n);let o=Ae(t,"timeInterval",null);Vi(o)||(o=100),o=ji(o),r.emit("waitNotExist",{state:"start"});try{await ds(()=>!Me(i,e),{attemptNum:n,timeInterval:o})}catch(t){let i=`waitNotExist timeout (${n*o}ms): ${e}`;return r.emit("waitNotExist",{state:"error",msg:i}),Promise.reject(i)}let a=`waitNotExist resolved: ${e}`;r.emit("waitNotExist",{state:"success",msg:a})},r.clear=()=>{clearInterval(a)},r},e.cbol=function(e){if(we(e))return e;if(0===e)return!1;if(1===e)return!0;let t=!1;return ke(e)&&"true"===(e=hs(Ko(e)))&&(t=!0),t},e.cdbl=Ir,e.ceil=_l,e.cfilesize=function(e){return Ne(e)?(e=Ir(e))<1024?Xl(e,1)+" b":e<1048576?Xl(e/1024,1)+" kb":e<1073741824?Xl(e/1024/1024,1)+" mb":e<1099511627776?Xl(e/1024/1024/1024,1)+" gb":"":""},e.cfinancial=function(e,t=0){if(!Ne(e))return"";if(!po(t))return"";let n=(e=Xl(e,t)).split("."),r=n[0],i=n.length>1?"."+n[1]:"",o=/(\d+)(\d{3})/;for(;o.test(r);)r=r.replace(o,"$1,$2");return r+i},e.cint=ji,e.clearXSS=Zl,e.clearXSSDyn=async function(e,t={},n){return Mn(n)||(n=["https://cdn.jsdelivr.net/npm/xss@1.0.15/dist/xss.min.js"]),await ic(n),Zl(e)},e.color=uu,e.composeToTree=wu,e.convertToTree=function(e,t={}){if(!Be(e)&&!Mn(e))return[];let n=Ae(t,"bindKey",null);ke(n)||(n="id");let r=Ae(t,"bindParent",null);ke(r)||(r="parentId");let i=Ae(t,"bindText",null);ke(i)||(i="text");let o=Ae(t,"bindChildren",null);ke(o)||(o="children");let a=Ae(t,"bindType",null);ke(a)||(a="type");let s=Ae(t,"bindNumOfChilren",null);ke(s)||(s="numOfChilren");let l=Ae(t,"bindRoot",null);ke(l)||(l="root");let c=Ae(t,"saveExtProps",null);return we(c)||(c=!1),ke(l)&&(e={[l]:e}),wu(xu(e,{bindKey:n,bindParent:r,bindText:i,bindType:a,bindNumOfChilren:s}),{bindKey:n,bindParent:r,bindChildren:o,saveExtProps:c})},e.copyStrToClipboard=function(e,t={}){if(!Se(e))return"invalid input";let n=Ae(t,"eleParent");Cu(n)||(n=document.body);let r=document.createElement("textarea");if(r.style.position="fixed",r.style.left=0,r.style.top=0,r.style.zIndex=-1,r.style.background="transparent",r.style.color="transparent",r.value=e,n.appendChild(r),r.select(),!Eu(r))return"ele can not be focusd";try{document.execCommand("copy")}catch(e){return"can not copy str to clipboard"}return n.removeChild(r),""},e.cosd=Bu,e.cotd=function(e){return Ne(e)?1/Su(e=Ir(e)):null},e.createExcelWorkbook=ku,e.cscd=function(e){return Ne(e)?1/Fu(e=Ir(e)):null},e.cstr=Na,e.day2cht=function(e,n=!1){if(!Du(e))return"";let r=t(e,"YYYY-MM-DD"),i="";return i=n?r.month()+1+"月"+r.date()+"日":"民國 "+(r.year()-1911)+" 年 "+(r.month()+1)+" 月 "+r.date()+" 日",i},e.debounce=Nu,e.delay=fs,e.dig=Xl,e.digExp=function(e,t=0){if(!Ne(e))return"";if(!po(t))return"";let n="";return n=0===(e=Ir(e))?"0":Math.abs(e)<=1e-6?e.toExponential(t):Xl(e,t),n},e.domAlert=function(e,t={}){if(!ke(e))return;let n=Ae(t,"type","success");Me(Hu,n)||(n="success");let r=Ae(t,"icon",null);ke(r)||(r=Hu[n]);let i="top-right";"top-left"!==t.position&&"bottom-right"!==t.position&&"bottom-left"!==t.position||(i=t.position);let o=Ae(t,"time");ca(o)||(o=4e3),o<0&&(o=4e3);let a=Ae(t,"paddingStyle",null);null===a&&(a={top:14,right:26,bottom:14,left:14});let s="";{let e=Ae(a,"top",0),t=Ae(a,"bottom",0),n=Ae(a,"left",0);s=`padding:${e}px ${Ae(a,"right",0)}px ${t}px ${n}px;`}let l=Ae(t,"textColor","#000");l=ac(l,";","");let c=Ae(t,"backgroundColor","#fff");c=ac(c,";","");let u=Ae(t,"borderWidth",1),f=Ae(t,"borderColor","#ebeef5");f=ac(f,";","");let d=Ae(t,"borderRadius",8),h=Ae(t,"shadowStyle","0 2px 12px 0 rgba(0,0,0,.1)");h=ac(h,";","");let p=Ae(t,"closeIconShift",null);null===p&&(p={top:10,right:10});let g="";{let e=Ae(p,"top",""),t=Ae(p,"bottom",""),n=Ae(p,"left",""),r=Ae(p,"right","");ca(e)&&(e=`top:${e}px;`),ca(t)&&(t=`bottom:${t}px;`),ca(n)&&(n=`left:${n}px;`),ca(r)&&(r=`right:${r}px;`),g=`position:absolute; ${e} ${r} ${t} ${n}`}let m=`alt-${Tu()}`,y=`alt-${Tu()}`,v=`\n <div \n style="display:inline-block; color:${l}; background:${c}; border:${u}px solid ${f}; border-radius:${d}px; box-shadow:${h};"\n onmouseenter="ttWAlertFadeIn('${y}')"\n onmouseleave="ttWAlertFadeOut('${y}')"\n >\n <div style="position:relative; ${s}">\n\n <div style="display:flex; align-items:center;">\n <div style="margin-right:10px;">\n <div style="display:flex;">${r}</div>\n </div>\n <div>${e}</div>\n </div>\n\n <div style="${g}">\n <div \n id="${y}" \n style="display:flex; cursor:pointer; opacity:0;" \n onclick="ttWAlertCancel('${m}')"\n >\n ${Uu}\n </div>\n </div>\n\n </div>\n </div>\n `,A=document.createElement("div");A.id=m,A.style.position="fixed",A.style.transition="transform 0.3s, top 0.5s, bottom 0.5s",A.style.zIndex=-1,A.style.opacity=.001,i.indexOf("-left")>=0?A.style.transform="translateX(-100%)":A.style.transform="translateX(100%)",A.innerHTML=v,document.querySelector("body").appendChild(A);let b=Ga();return function({id:e,position:t,time:n,pm:r}){qu[e]={id:e,position:t,ele:null,loc:{height:null,top:null,bottom:null,left:null,right:null},timeShow:n,timeStart:Date.now(),pm:r},$u(),null===Ou&&(Ou=setInterval(()=>{vn(qu,e=>{Date.now()-e.timeStart>e.timeShow&&(e.pm.resolve(),zu(e.id))}),Be(qu)||(clearInterval(Ou),Ou=null)},50))}({id:m,position:i,time:o,pm:b}),b},e.domAppend=ju,e.domCancelEvent=Yu,e.domCompareText=function(e,t,n,r,i={}){if(!Cu(e))return Promise.reject("invalid ele");let o=Ae(i,"format");"side"!==o&&"line"!==o&&(o="side");let a="side"===o?"side-by-side":"line-by-line",s=zf();ke(t)||(t="Text");let l=Vo(t,t,n,r),c=s.html(l,{drawFileList:!0,matching:"lines",outputFormat:a,...i});c=c.replace('<span class="d2h-file-list-title">Files changed (1)</span>',"");try{e.innerHTML=c}catch(e){console.log(e)}return{diff:l,html:c}},e.domConvertToPic=pm,e.domConvertToPicDyn=async function(e,t={},n){return await pm(e,t)},e.domDetect=function(e,t={}){let n=Ae(t,"timeInterval",null);Vi(n)||(n=20);let r=Ae(t,"tolerancePixel",null);Vi(r)||(r=1);let i,o=qi(),a={offsetWidth:0,offsetHeight:0,clientWidth:0,clientHeight:0,windowWidth:0,windowHeight:0},s=Ti(a),l={width:"",height:""};if(!Ui(e))return console.log("invalid f",e),null;i=setInterval(()=>{let t=e();if(t){let e={offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight,clientWidth:t.clientWidth,clientHeight:t.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight},n=s.offsetWidth-e.offsetWidth,i=s.offsetHeight-e.offsetHeight,c=Math.abs(n)>r,u=Math.abs(i)>r,f="";n>0?f="smaller":n<0&&(f="larger");let d="";if(i>0?d="smaller":i<0&&(d="larger"),l={width:f,height:d},c||u){let n={...s};setTimeout(()=>{e.offsetWidth>0&&e.offsetHeight>0&&(o.emit("resize",{sold:n,snew:e,smode:l,ele:t}),o.emit("resizeWithWindow",{sold:n,snew:e,smode:l,ele:t,from:"dom"}))},1)}a=s,s=e}},n);let c=e=>{o.emit("resizeWithWindow",{sold:a,snew:s,smode:l,from:"window"})};return window.addEventListener("resize",c),o.clear=()=>{clearInterval(i),window.removeEventListener("resize",c)},o},e.domDrag=function(e,t={}){if(!Cu(e))return void console.log("ele is not a HTMLElement",e);let n=Ae(t,"attIdentify",null);ke(n)||(n="dragid");let r=Ae(t,"attIndex",null);ke(r)||(r="dragindex");let i=Ae(t,"attGroup",null);ke(i)||(i="draggroup");let o=Ae(t,"group",null);ke(o)||(o="group");let a=Ae(t,"previewOpacity",null);ca(a)||(a=.4);let s=Ae(t,"previewDisabledOpacity",null);ca(s)||(s=.2);let l=Ae(t,"previewBackground",null);ke(l)||(l="white");let c=Ae(t,"previewBorderWidth",null);ca(c)||(c=1);let u=Ae(t,"previewBorderColor",null);ke(u)||(u="#f26");let f=Ae(t,"timeDragStartDelay",null);ca(f)||(f=120);let d=`c${Tu(8)}`,h=o;e.setAttribute(i,h),e.setAttribute(n,d);let p=Cm(h,d,{attIdentify:n,previewOpacity:a,previewBackground:l,previewBorderWidth:c,previewBorderColor:u}),g=function(e,t){let n=[];return{bind:function(){let r;r="mousedown";let i=function(n){t.dragStart({e:n,ele:e,name:"mousedown"})};e.addEventListener(r,i,!1),n.push({ele:e,name:r,f:i}),r="touchstart";let o=function(n){t.dragStart({e:n,ele:e,name:"touchstart"})};e.addEventListener(r,o,!1),n.push({ele:e,name:r,f:o}),r="touchmove";let a=function(e){t.dragMove({e:e,name:"touchmove"}),e.cancelable&&e.preventDefault()};e.addEventListener(r,a,!1),n.push({ele:e,name:r,f:a})},unbind:function(){vn(n,({ele:e,name:t,f:n})=>{e.removeEventListener(t,n)})}}}(e,{dragStart:e=>{p.emit(h+"-dragStart",e)},dragMove:e=>{p.emit(h+"-dragMove",e)}});g.bind(),Bm({gid:h,attGroup:i,attIndex:r,attIdentify:n,timeDragStartDelay:f,previewOpacity:a,previewDisabledOpacity:s});let m=qi();return p.on(o+"-change",e=>{e.tarEid===d&&m.emit("change",e)}),p.on(o+"-start",e=>{e.tarEid===d&&m.emit("start",e)}),p.on(o+"-move",e=>{e.tarEid===d&&m.emit("move",e)}),p.on(o+"-enter",e=>{e.tarEid===d&&m.emit("enter",e)}),p.on(o+"-leave",e=>{e.tarEid===d&&m.emit("leave",e)}),p.on(o+"-drop",e=>{e.tarEid===d&&m.emit("drop",e)}),m.setIsActive=function(e){xm[h].isActive=e},m.unbind=function(){g.unbind(),function(e,t){let n=xm[e],r=Ti(n.eleIds);gm(r,t),n.eleIds=r,0===r.length&&(n.oevg.unbind(),n.pv.clear(),delete xm[e])}(h,d)},m},e.domDragBarAndScroll=function(e,t,n={}){let r=null,i=null,o=null,a=null,s=null,l=null,c=null,u=null,f=null,d=null,h=null,p=null,g=null,m=null,y=null,v=!1,A=Ae(n,"getHeighRatio",null);L(A)||(A=()=>1);let b=Ae(n,"getWidthRatio",null);L(b)||(b=()=>1);let w=Ae(n,"stopScrollPropagationForPanel",null);be(w)||(w=!1);let I=Ae(n,"stopTouchDragPropagationForPanel",null);be(I)||(I=!1);let x=Ae(n,"useTouchDragForPanel",null);be(x)||(x=!0);let C=e,E=t,B=qi();return r=e=>{let t=e.deltaY/Math.abs(e.deltaY),n=e.deltaX/Math.abs(e.deltaX);B.emit("scrollPanel",{ratioY:t,ratioX:n}),w&&Yu(e)},C.addEventListener("wheel",r),i=e=>{if(x){let t=Ae(e,"touches.0.clientY",0),n=Ae(e,"touches.0.clientX",0),r=-t*A(),i=-n*b();v=!0,B.emit("pressBar",{clientY:r,clientX:i}),I&&Yu(e)}},C.addEventListener("touchstart",i),o=e=>{if(x&&v){let t=Ae(e,"touches.0.clientY",0),n=Ae(e,"touches.0.clientX",0),r=-t*A(),i=-n*b();B.emit("dragBar",{clientY:r,clientX:i}),I&&Yu(e)}},C.addEventListener("touchmove",o,{passive:!1}),a=e=>{x&&v&&(v=!1,B.emit("freeBar"),I&&Yu(e))},C.addEventListener("touchend",a),s=e=>{v=!0,B.emit("pressBar",{clientY:e.clientY,clientX:e.clientX})},E.addEventListener("mousedown",s),l=e=>{v&&(v=!1,B.emit("freeBar"))},E.addEventListener("mouseup",l),c=e=>{v=!0,B.emit("pressBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX})},E.addEventListener("touchstart",c),u=e=>{v&&(B.emit("dragBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX}),Yu(e))},E.addEventListener("touchmove",u,{passive:!1}),f=e=>{v&&(v=!1,B.emit("freeBar"))},E.addEventListener("touchend",f),d=e=>{v&&B.emit("dragBar",{clientY:e.clientY,clientX:e.clientX})},window.addEventListener("mousemove",d),h=e=>{v&&(v=!1,B.emit("freeBar"),w&&Yu(e))},window.addEventListener("mouseup",h),p=e=>{},window.addEventListener("scroll",p,{passive:!1}),g=e=>{},window.addEventListener("wheel",g,{passive:!1}),m=e=>{},document.addEventListener("scroll",m,{passive:!1}),y=e=>{},document.addEventListener("wheel",y,{passive:!1}),B.clear=function(){C.removeEventListener("wheel",r),C.removeEventListener("touchstart",i),C.removeEventListener("touchmove",o),C.removeEventListener("touchend",a),E.removeEventListener("mousedown",s),E.removeEventListener("mouseup",l),E.removeEventListener("touchstart",c),E.removeEventListener("touchmove",u),E.removeEventListener("touchend",f),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",h),window.removeEventListener("scroll",p),window.removeEventListener("wheel",g),document.removeEventListener("scroll",m),document.removeEventListener("wheel",y)},B},e.domDragPreview=Im,e.domDropFiles=function(e){let t=!1,n=!1,r=qi();function i(e){Yu(e),n=!0,!1===t&&(t=!0,r.emit("dropIn",{ev:e}))}function o(e){Yu(e),n=!1,setTimeout(function(){n||(t=!1,r.emit("dropOut",{ev:e}))},100)}function a(e){i(e)}function s(e){o(e)}function l(e){function t(){o(e)}i(e),Fm(e.dataTransfer).then(n=>{let i=oa(n.entries,{type:"file"});r.emit("getFiles",{ev:e,files:n.files,filesTree:i,entries:n.entries,cb:t})}).catch(e=>{r.emit("error",e)})}return e.addEventListener("dragenter",a,!1),e.addEventListener("dragover",a,!1),e.addEventListener("dragleave",s,!1),e.addEventListener("drop",l,!1),r.off=function(){e.removeEventListener("dragenter",a,!1),e.removeEventListener("dragover",a,!1),e.removeEventListener("dragleave",s,!1),e.removeEventListener("drop",l,!1)},r},e.domElementsFromPoint=vm,e.domFadeIn=Lu,e.domFadeOut=Ru,e.domFind=Dm,e.domFinds=fm,e.domGetAttr=Am,e.domGetBoudRect=bm,e.domGetBoudRectRefSelf=wm,e.domGetFileAccept=Hm,e.domGetFiles=qm,e.domGetParents=mm,e.domGetPointFromEvent=ym,e.domGetScrollableParent=function(e){let t=/(auto|scroll)/,n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},r=function(e){return t.test(function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")}(e))};if(!(e instanceof HTMLElement||e instanceof SVGElement))return;let i=mm(e);for(let e=0;e<i.length;e+=1)if(r(i[e]))return i[e];return document.scrollingElement||document.documentElement},e.domGetWindowSize=function(){let e=Kl(),t={width:(()=>{let t=[Ae(e,"innerWidth"),Ae(e,"document.documentElement.clientWidth"),Ae(e,"document.body.clientWidth")];return t=oa(t,ca),$m(t)})(),height:(()=>{let t=[Ae(e,"innerHeight"),Ae(e,"document.documentElement.clientHeight"),Ae(e,"document.body.clientHeight")];return t=oa(t,ca),$m(t)})()};return t},e.domIsClientXYIn=function(e,t,n){if(!ca(e))return void console.log("clientX is not a number",e);if(!ca(t))return void console.log("clientY is not a number",t);if(!Cu(n))return void console.log("ele is not a HTMLElement",n);let r;try{r=n.getBoundingClientRect()}catch(e){return void console.log("invalid ele for getBoundingClientRect",e)}let i=!1;try{i=e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}catch(e){console.log("catch when calculating page information of element",e)}return i},e.domIsFocused=Eu,e.domIsStable=function(e,t={}){if(!Cu(e))return Promise.reject("invalid element");if(!Ui(e.getBoundingClientRect))return Promise.reject("invalid element.getBoundingClientRect");let n=Ae(t,"mode","");"promise"!==n&&"event"!==n&&(n="promise");let r=Ae(t,"tolerance",0),i=Ae(t,"timeDiff",100),o=Ae(t,"timeDetect",50),a=()=>{let t=e.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width,h:t.height}},s=()=>{try{return e.getAnimations({subtree:!0})}catch(e){return[]}},l=async()=>{let e=Ga();try{let t=a();await fs(i);let n=((e,t)=>!!e&&!!t&&Math.abs(e.x-t.x)<=r&&Math.abs(e.y-t.y)<=r&&Math.abs(e.w-t.w)<=r&&Math.abs(e.h-t.h)<=r)(t,a());await Promise.allSettled(s().map(e=>e.finished));let o=0===s().length,l=n&&o;e.resolve(l)}catch(t){e.reject(t)}return e},c=()=>{let t=qi(),n=!1,r=null,i=null,a=!1;return t.create=()=>{r=setInterval(()=>{n=(e=>{let n=!1;if(!Cu(e))return n;try{let e=!1,r=!1;i=setInterval(()=>{a?clearInterval(i):e||(e=!0,l().then(e=>{a||r!==e&&(r=e,t.emit("stable",e))}).catch(()=>{}).finally(()=>{e=!1}))},o),n=!0}catch(e){}return n})(e),n&&clearInterval(r)},50)},t.dispose=()=>{let e=!1;try{clearInterval(r),clearInterval(i),a=!0,e=!0}catch(e){}return e},t},u=null;return"promise"===n?u=l():"event"===n&&(u=c()),u},e.domIsVisible=function(e,t={}){if(!Cu(e))return Promise.reject("invalid element");if(zm())return Promise.reject("invalid IntersectionObserver");let n=Ae(t,"mode","");"promise"!==n&&"event"!==n&&(n="promise");let r=()=>{let t=qi(),n=!1,r=null,i=!1,o=new IntersectionObserver(e=>{if(i)return;let n=e[0].isIntersecting;t.emit("visible",n)});return t.create=()=>{r=setInterval(()=>{i?clearInterval(r):(n=(e=>{let t=!1;if(!Cu(e))return t;try{o.observe(e),t=!0}catch(e){}return t})(e),n&&clearInterval(r))},50)},t.dispose=()=>{let e=!1;try{clearInterval(r),o.disconnect(),i=!0,e=!0}catch(e){}return e},t},i=null;return"promise"===n?i=(()=>{let t=Ga();try{let n=new IntersectionObserver(e=>{t.resolve(e[0].isIntersecting),n.disconnect()});n.observe(e)}catch(e){t.reject(e)}return t})():"event"===n&&(i=r()),i},e.domPrepend=hm,e.domRemove=dm,e.domRenderMarkdownMind=jm,e.domRenderMarkdownMindDyn=async function(e,t,n={},r){return Mn(r)||(r=["https://cdn.jsdelivr.net/npm/d3@7.8.3/dist/d3.min.js","https://cdn.jsdelivr.net/npm/markmap-view@0.14.4/dist/index.min.js","https://cdn.jsdelivr.net/npm/markmap-lib@0.14.4/dist/browser/index.min.js"]),await ic(r),jm(e,t,n)},e.domRipple=function(e,t,n={}){let r=Ae(n,"timeDuration",null);Vi(r)||(r=1e3);let i=Ae(n,"color",null);if(ke(i)||(i="rgba(255, 255, 255, 0.5)"),!Cu(e))return;e.style.position="relative",e.style.overflow="hidden";let o=e.getBoundingClientRect(),a=t.clientX-o.left,s=t.clientY-o.top,l=2*Math.max(e.clientWidth,e.clientHeight),c=document.createElement("div");c.style.width=`${l}px`,c.style.height=`${l}px`,c.style.transition=`all ${r/1e3}s linear`,c.style.position="absolute",c.style.zIndex=1,c.style.left=`${a}px`,c.style.top=`${s}px`,c.style.borderRadius="50%",c.style.transformOrigin="center",c.style.transform="translate(-50%,-50%) scale(0)",c.style.background=i,c.style.userSelect="none",c.style.pointerEvents="none",e.appendChild(c),setTimeout(()=>{c.style.transform="translate(-50%,-50%) scale(2)",c.style.opacity=0},1),setTimeout(()=>{dm(c)},r)},e.domScrollIntoView=function(e,t={}){if(!Cu(e))return;Ee(t)||(t={});let n={behavior:"smooth"};n={...n,...t},Vu()&&Qy(),e.scrollIntoView(n)},e.domScrollTo=function(e,t={}){if(!Cu(e))return;Ee(t)||(t={});let n={behavior:"smooth"};n={...n,...t},Vu()&&Qy(),e.scrollTo(n)},e.domSetAttr=function(e,t,n){if(!Cu(e))return null;if(!ke(t))return null;if(!ke(n)&&!Ne(n))return null;try{return e.setAttribute(t,n),e.getAttribute(t)}catch(e){}return null},e.domShowImages=jy,e.domShowImagesDyn=async function(e,t=null,n={},r){return await jy(e,t,n)},e.domShowInputAndGetFiles=Yy,e.domShowInputAndGetFilesU8Arrs=function(e={}){let t=Ae(e,"kind","*"),n=Ae(e,"multiple");we(n)||(n=!1);let r=Ae(e,"entireHierarchy");we(r)||(r=!1);let i=Ae(e,"sizeMbLimit");Ne(i)||(i=1e3),i=Ir(i);let o=Ga(),a=[];return Yy({kind:t,multiple:n,entireHierarchy:r,sizeMbLimit:i}).then(function(e){let t=Ga(),n=Ae(e,"errs",{}),r=Ae(e,"files",[]);return Be(n)?t.reject(n):t.resolve(r),t}).then(function(e){return vn(e,function(e){a.push({name:e.name,size:e.size,type:e.type})}),ts(e)}).then(function(e){vn(e,function(e,t){a[t].u8a=e}),o.resolve(a)}).catch(function(e){o.reject(e)}),o},e.domShowInputDatatime=function(e,n={}){let r=Ae(n,"type","");"date"!==r&&"datetime-local"!==r&&(r="datetime-local");let i=Ae(n,"eleRef",null);Cu(i)||(i=document.activeElement);let o=Ga(),a="drf"+Tu(),s="GrpDomShowDatatime";dm(`[name=${s}]`);let l=!1,c="";if("date"===r)Du(e)&&(l=!0,c=e);else if(Wy(e)){l=!0,c=t(e).format("YYYY-MM-DDTHH:mm")}ke(c)&&(c=`value="${c}"`);let u=document.createElement("div");u.setAttribute("name",s),u.style.width=0,u.style.height=0,u.style.overflow="hidden",u.innerHTML=`\n <div style="transform:translateY(-100%);">\n <input id="${a}" type="${r}" style="opacity:0;" ${l?c:""} />\n </div>\n `;let f=null;Cu(i)?i.parentNode.insertBefore(u,i.nextSibling):document.querySelector("body").appendChild(u);let d=!1;function h(){if(!d){d=!0;try{f.removeEventListener("change",g,!0),i.removeEventListener("focusout",m,!0)}catch(e){}if(dm(`[name=${s}]`),ke(p)){let e="";e="date"===r?p:`${p}:00`,o.resolve(e)}}}let p="";function g(e){try{p=e.target.value}catch(e){console.log(e)}h()}function m(e){setTimeout(()=>{h()},50)}return setTimeout(()=>{f=Dm("#"+a),f.addEventListener("change",g,!0),f.showPicker()},1),i.addEventListener("focusout",m,!0),o},e.domTooltip=function(e,t,n={}){let r=null,i=null;function o(){null!==r&&r.destroy(!0),e.setAttribute("tippystate",""),clearInterval(i)}let a={arrow:!0,theme:"dark",placement:"bottom",delay:150};n=Be(n)?zy(a,n):a;let s=t;t||(s=e.innerHTML);let l=Ne(e.getAttribute("tippystate"));if(e.setAttribute("tippystate","5"),l)return;s=`<div style="text-align:left;">${s}</div>`;let c=ob;ob.default&&(c=ob.default),r=c(e,{...n,content:s,allowHTML:!0,onHidden(){o()},onDestroy(){r=null,o()}}),r.show(),i=setInterval(()=>{let t=e.getAttribute("tippystate");Ne(t)?(t=ji(t),t-=1,e.setAttribute("tippystate",t),t<=0&&o()):o()},1e3)},e.domTriggerEvent=Vy,e.domVirtualCreate=ab,e.domVirtualCreateQueue=function(){return new function(){let e=fb(1);return async function(t,n={}){return e(ab,t,n)}}},e.downloadExcelFileFromData=wF,e.downloadExcelFileFromDataDyn=async function(e,t="data",n,r){let i=await wF(e,t,n);return""!==Ae(i,"error","")?Promise.reject(i.error):i},e.downloadFileFromB64=function(e,t){if(!_a())return void console.log("no window");if(!ke(e))return void console.log("no filename");let n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e.downloadFileFromBlob=db,e.downloadFileFromText=function(e,t,n=!0){if(!_a())return void console.log("no window");if(!ke(e))return void console.log("invalid filename");if(!Se(t))return void console.log("invalid content");if(!we(n))return void console.log("withBOM is not a boolean");let r;r=n?new Blob(["\ufeff",t]):new Blob([t]),db(e,r)},e.downloadFileFromU8Arr=function(e,t){if(!_a())return void console.log("no window");if(!ke(e))return void console.log("no filename");if(!as(t))return void console.log("no data");db(e,IF(t))},e.dtmapping=xF,e.dtpick=CF,e.estimateTicks=function(e,t,n={}){if(!Ne(e))throw new Error("rmin is not a number");if(e=Ir(e),!Ne(t))throw new Error("rmax is not a number");if(e===(t=Ir(t))){let t=null;t=0===e?1:Math.abs(e/10);let n=BF(t,{returnDigit:!0});return t=EF(t,n),{tickNum:3,tickInterval:t,tickPositions:[e-t,e,e+t],tickDig:n}}if(e>t)throw new Error(`rmin[${e}] > rmax[${t}]`);let r=Ae(n,"testTickNums");Mn(r)||(r=[3,4,5]);let i=e,o=t,a=SF(i),s=SF(o),l=Math.max(a.r,s.r),c=Math.log10(l),u=i/l,f=o/l,d=(u+f)/2,h=f-u,p=[];vn(r,e=>{let t=h/(e-1),n=BF(t,{returnDigit:!0});n=Math.min(n,2),vn(Xi(n,-1,-1),n=>{let r=n-c;r=Math.max(r,0);let i=_l(t,n),o=i-1/Math.pow(10,n);o=EF(o,n);let a=i+1/Math.pow(10,n);a=EF(a,n);let s=[o,i,a];s=oa(s,e=>e>0);let g=EF(d,n),m=g-1/Math.pow(10,n);m=EF(m,n);let y=g+1/Math.pow(10,n);y=EF(y,n);let v=[m,g,y];vn(s,t=>{let i=l*t;i=EF(i,r),vn(v,o=>{let a=[],s=[];{let i=o-(e-1)/2*t;for(let o=0;o<e;o++){let e=i+o*t;e=EF(e,n),a.push(e);let c=l*e;c=EF(c,r),s.push(c)}}let c=(d=a)&&d.length?d[0]:void 0;var d;let g=Aa(a);if(c>u||g<f)return!0;let m=(u-c)/h,y=(g-f)/h,v=(m+y)/2,A=0;vn(s,e=>{xr(e)&&A++});let b=A/e,w=0;vn(a,e=>{0===e&&w++});let I=w/e,x=0;vn(a,e=>{.5===e&&x++});let C=x/e,E=0;vn(a,e=>{1===e&&E++});let B=E/e,S={diff:v,rngCenter:o,numInt:A,ratInt:b,num0:w,rat0:I,num5:x,rat5:C,num10:E,rat10:B,overMin:m,overMax:y,fitness:v+.2*n+.1*e+1.5*m+1.5*y+(1-.25*b)+(1-.4*I)+(1-.3*C)+(1-.3*B),idg:n,tickNum:e,_tickDig:n,_tickInterval:t,_tickPositions:a,tickDig:r,tickInterval:i,tickPositions:s};p.push(S)})})})}),p=Fa(p,"fitness");let g=Ae(p,0);return{tickNum:g.tickNum,tickInterval:g.tickInterval,tickPositions:g.tickPositions,tickDig:g.tickDig}},e.evem=qi,e.execCli=async function(e,t=[],n={}){if(!ke(e))return{ok:!1,stdout:"",stderr:"",code:null,error:"command 須為非空字串",durationMs:0,attempts:0};Ce(t)||(t=[]),Ee(n)||(n={});let{maxRetries:r=0,retryDelayMs:i=5e3,...o}=n,a=Ae(o,"cwd",null);ke(a)?o.cwd=a:o.cwd=process.cwd();let s=Ae(o,"input",null);ke(s)?o.input=s:o.input=void 0;let l=Ae(o,"env",null);Ee(l)?o.env=l:o.env=void 0;let c=Ae(o,"validate",null);Ui(c)||ke(c)?o.validate=c:o.validate=void 0;let u=Ae(o,"onStdout",null);Ui(u)?o.onStdout=u:o.onStdout=void 0;let f=Ae(o,"onStderr",null);Ui(f)?o.onStderr=f:o.onStderr=void 0,r=po(r)?ji(r):0,i=Vi(i)?ji(i):5e3;let d=Ae(o,"timeoutMs",null);Vi(d)?o.timeoutMs=ji(d):o.timeoutMs=12e4;let h,p=Ae(o,"maxBuffer",null);Vi(p)?o.maxBuffer=ji(p):o.maxBuffer=10485760;let g=0;for(let n=0;n<=r;n++){if(n>0){let e=Math.min(i*n,15e3);await fs(e)}if(h=await qF(e,t,o),g=n+1,h.ok)return h.attempts=g,h;if(h.error.includes("ENOENT"))break;if(2===h.code)break}return h.attempts=g,h},e.execCliCore=LF,e.execCliJsonRpc=async function(e,t=[],n=[],r={}){let i=Date.now(),o=(e,t,n={})=>({ok:!1,results:{},responses:[],error:t,errorType:e,durationMs:Date.now()-i,exitCode:null,...n});if(!ke(e))return o("params","command 須為非空字串");if(Ce(t)||(t=[]),!Ce(n))return o("params","requests 須為陣列");for(let e=0;e<n.length;e++){let t=n[e];if(!Ee(t)||!ke(t.method)&&!ke(t.notify))return o("params",`requests[${e}] 須為含method或notify之物件`)}Ee(r)||(r={});let a=Ae(r,"timeoutMs");Vi(a)||(a=12e4);let s=Ae(r,"jsonrpc");!0===s&&(s="2.0"),ke(s)||(s=null);let l=Ae(r,"continueOnError");we(l)||(l=!1);let c=Ae(r,"onNotify"),u=Ae(r,"onServerRequest"),f=new Map,d=null,h=0,p={},g=[],m=(e,t,n)=>{let r={};return null!==s&&(r.jsonrpc=s),void 0!==e&&(r.id=e),r.method=t,void 0!==n&&(r.params=n),r},y=$F(e,t,{cwd:Ae(r,"cwd"),env:Ae(r,"env"),timeoutMs:a,exitGraceMs:Ae(r,"exitGraceMs"),onStderr:Ae(r,"onStderr"),onLine:e=>{if(""===(e=e.trim()))return;let t;try{t=JSON.parse(e)}catch{return}if(!Ee(t))return;let n=void 0!==t.id&&null!==t.id;if(n&&("result"in t||"error"in t)){let e=f.get(t.id);return void(e&&(f.delete(t.id),e.pm.resolve({msg:t})))}n&&ke(t.method)?Ui(u)&&u(t,y):Ui(c)&&c(t)},onExit:e=>{d=e;for(let[t,n]of f)n.pm.resolve({exit:e});f.clear()}}),v=(e,t)=>{let n="exit";e.timeout?n="timeout":ke(e.error)&&e.error.includes("ENOENT")&&(n="notfound");let r=ke(e.error)?e.error:`子進程於回應前結束(code ${e.code})`;return o(n,`${t}: ${r}`,{results:p,responses:g,exitCode:e.code})},A=null;for(let e of n){if(!ke(e.method)){if(!await y.writeLine(JSON.stringify(m(void 0,e.notify,e.params)))){A=v(d||await y.stop(),e.notify);break}continue}let t=h;h+=1;let n=Ga();if(f.set(t,{method:e.method,pm:n}),!await y.writeLine(JSON.stringify(m(t,e.method,e.params)))){f.delete(t),A=v(d||await y.stop(),e.method);break}let r=await n;if(r.exit){A=v(r.exit,e.method);break}let i=r.msg;if("error"in i&&null!==i.error&&void 0!==i.error){if(p[e.method]=null,g.push({id:t,method:e.method,result:null,error:i.error}),!l){let t=Ae(i,"error.message");A=o("rpc",`${e.method}: ${ke(t)?t:JSON.stringify(i.error)}`,{results:p,responses:g});break}}else p[e.method]=i.result,g.push({id:t,method:e.method,result:i.result,error:null})}let b=await y.stop();if(A)return A.durationMs=Date.now()-i,null===A.exitCode&&(A.exitCode=b.code),A;let w=g.filter(e=>null!==e.error);if(w.length>0){let e=w[0],t=Ae(e,"error.message");return{ok:!1,results:p,responses:g,error:`${e.method}: ${ke(t)?t:JSON.stringify(e.error)}`,errorType:"rpc",durationMs:Date.now()-i,exitCode:b.code}}return{ok:!0,results:p,responses:g,error:"",errorType:"",durationMs:Date.now()-i,exitCode:b.code}},e.execCliSession=$F,e.execJsCode=async function(e,t={}){e=o.resolve(e);let n=(await import(s.pathToFileURL(e).href)).default;if(!Ui(n))throw new Error(`the default export of [${e}] is not a function`);return await n(t)},e.execProcess=function(e,t,n={}){if(!Mn(t)&&!ke(t))throw new Error("args is not an effective array or string");ke(t)&&(t=[t]);let i=Ae(n,"mode");"spawn"!==i&&"exec"!==i&&"execFile"!==i&&(i="spawn");let o=Ae(n,"cbStdout"),a=Ae(n,"cbStderr"),s=Ae(n,"codeCmd");ke(s)||(s="utf8");let l=Ae(n,"useChcp");we(l)||(l=!1);let c=Ae(n,"timeout");(!Ne(c)||c<=0)&&(c=null);let u=Ga();if(!ua(i,["spawn","exec","execFile"]))return u.reject(`invalid mode[${i}]`),u;let f=null,d="";try{if("spawn"===i){let n=ta(e,1),i=na(e,1);if('"'===n||'"'===i||"'"===n||"'"===i)throw new Error("prog of spawn doens not need to add quotes");f=r.spawn(e,t,{windowsHide:!0,shell:!1})}else if("exec"===i){let n="";l&&(n="cmd /c chcp 65001>nul &&"),f=r.exec(`${n} ${e} ${t.join(" ")} & exit`,{windowsHide:!0,encoding:s})}else"execFile"===i&&(f=r.execFile(e,t,{windowsHide:!0,encoding:s}))}catch(e){return u.reject(e),u}f.stdout.on("data",e=>{let t="";t="spawn"===i?e.toString(s):e.toString(),d+=t+"\n",Ui(o)&&o(t)}),f.stderr.on("data",e=>{let t="";t="spawn"===i?e.toString(s):e.toString(),d+=t+"\n",Ui(a)&&a(t)});let h=null,p=!1;return null!==c&&(h=setTimeout(()=>{p=!0,f&&f.pid&&FF(f.pid).catch(()=>{})},c)),f.on("close",e=>{null!==h&&clearTimeout(h),p?u.reject(`timeout[${c}ms]:\n${d}`):0!==e?u.reject(`code[${e}]:\n${d}`):u.resolve(d)}),f.on("error",e=>{null!==h&&clearTimeout(h),u.reject(e)}),u},e.execProcessKillPid=FF,e.filepathToTree=function(e,t={}){if(!Mn(e))return{};let n=Ae(t,"delimiter");ke(n)||(n="❯");let r=Ae(t,"bindRoot");ke(r)||(r="");let i=ke(r),o="";o=i?r:"root";let a=Ae(t,"soryItems"),s=bn(e,(e,t)=>{"folder"!==e.type&&"file"!==e.type&&(e.type="file");let r=(e=>{let t=ea(e=(e=e.replace(/\\\\/g,"\\")).replace(/\\/g,"/"),"/");return{ss:t,cfp:yo(t,n)}})(e.path);return{ind:t,type:e.type,ss:r.ss,data:Ti(e)}}),l=e=>{let t=or(e),r=[];for(let i=0;i<t;i++){let t=[];for(let n=0;n<=i;n++)t.push(e[n]);let o=yo(t,n);r.push({id:o,name:e[i]})}return r},c=-1,u=[],f={};vn(s,e=>{let t=null;t=[o];let r=null;r=o;let i=or(e.ss)-1;vn(e.ss,(o,a)=>{let s=a<i||"folder"===e.type;t.push(o);let d=null,h=null;a===i&&(d=e.ind,h=e.data);let p=yo(t,n),g=l(t);if(Me(f,p)){let t=f[p],n="folder"===Ae(t,"_type","");if(!n&&s)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${p}] is unrecognized from a file to folder`);if(!n&&!s)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${p}] get repeat data from two files`);if(n&&!s)throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${p}] is unrecognized from a folder to file`);if(Be(f[p].data)&&Be(h))throw console.log("kpLv[id]",t),console.log("v",e),new Error(`id[${p}] get repeat data from two folders`);if(null===f[p].data&&Be(h)){f[p]._indOri=d,f[p].data=h;let e=f[p]._indNormalize,t=u[e];u[e]={...h,type:t.type,path:t.path}}}else{c++;let e=c,n=null;n=s?{_indOri:d,_indNormalize:e,ns:or(t),ts:Ti(t),pathInfors:g,_type:"folder",type:"array",numOfChilren:-1,id:p,parentId:r,text:o,children:[],data:h}:{_indOri:d,_indNormalize:e,ns:or(t),ts:Ti(t),pathInfors:g,_type:"file",type:"node",numOfChilren:-1,id:p,parentId:r,text:o,data:h},f[p]=n,u.push({...Ae(f[p],"data",{}),type:f[p]._type,path:"/"+yo(t,"/")})}r=p})});let d=VF(f);if(d=Fa(d,"id"),d=Fa(d,"ns"),Ui(a)){let e=[];vn(KF(d,"ns"),(t,n)=>{vn(KF(t,"parentId"),(t,r)=>{let i=a(t,r,n);e=[...e,...i]})}),d=e}let h=[],p=[];vn(d,e=>{"folder"===e._type?h.push(e):p.push(e)});let g=KF(h,"ns"),m=KF(p,"ns"),y=jF(bn(h,"ns")),v=jF(bn(p,"ns")),A=null;{let e=[o];A=[{_indOri:null,_indNormalize:null,ns:or(e),ts:Ti(e),pathInfors:l(e),_type:"folder",type:"array",numOfChilren:-1,id:o,parentId:"",text:o,children:[],data:null}]}let b={};b[o]="0.children";let w={};w[o]="0";for(let e=2;e<=y;e++){vn(g[e],e=>{let t=Ae(b,e.parentId,"");if(!ke(t))throw console.log("kpPathFd",b),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in folder`);let n=Ae(A,t);if(Ce(n)||fu(A,t,[]),n=Ae(A,t),!Be(Tm(n,{id:e.id}))){n.push({...e,children:[]});let r=`${t}.${or(n)-1}`;b[e.id]=`${r}.children`,w[e.id]=r}})}let I=Ti(A),x={};for(let e=2;e<=v;e++){vn(m[e],e=>{let t=Ae(b,e.parentId,"");if(!ke(t))throw console.log("kpPathFd",b),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in file`);let n=Ae(A,t);if(!Ce(n))throw console.log("treeItems",A),console.log("k",t),console.log("v",e),new Error("無預先建置資料夾");if(!Be(Tm(n,{id:e.id}))){n.push(e);let r=`${t}.${or(n)-1}`;x[e.id]=r,w[e.id]=r}})}return{treeItems:A,treeItemsFolder:I,kpPath:w,fpsNormalize:u}},e.files2data=function(e){if(!Ce(e))return Promise.reject("invalid files");let t=Ga(),n=bn(e,function(e){return{name:e.name,size:e.size,type:e.type}});return es(e).then(function(e){let r=bn(e,function(e){return{b64:e}}),i=ZF(n,r);t.resolve(i)}).catch(function(e){t.reject(e)}),t},e.flattenToConn=xu,e.flattenTree=function(e,t={}){if(Ce(e)){if(0===e.length)return[]}else{if(!Ee(e))return[];if(kn(e))return[]}let n=Ae(t,"bindKey",null);ke(n)||(n="id");let r=Ae(t,"bindChildren",null);ke(r)||(r="children");let i=!1;Ee(e)&&(i=!0,e=[e]);let o=[];return Iu(e,(e,t,i)=>{let a=Ae(e,n,null),s=Ae(e,r,null);if(a){let n=function(e){let t=[e[0]];for(let n=1;n<e.length;n++){let i=e[n];t.push(r),t.push(i)}return t}([...i,t]);if(o.push({...e,level:(or(n)-1)/2,nk:n}),s)return s}}),i&&(o=o[0]),o},e.floor=function(e,t=0){return po(t)||(t=0),t=ji(t),Ne(e)?new Jl(e).toDecimalPlaces(t,Jl.ROUND_FLOOR).toNumber():""},e.fsBuildReadStreamText=function(e){if(!MF(e))throw new Error("fp is not a file");let t=qi({type:"safe"}),n=a.createReadStream(e,{encoding:"utf8"});n.on("error",e=>{t.emit("error",{fun:"stream",msg:e})}),process.nextTick(()=>{t.emit("create")});let r=l.createInterface({input:n,crlfDelay:1/0});return r.on("line",e=>{t.emit("line",e)}),r.on("error",()=>{}),n.on("close",()=>{t.emit("close")}),t},e.fsBuildWriteStreamText=function(){let e=null;return{create:t=>{let n=Ga();return e=a.createWriteStream(t,{flags:"w",encoding:"utf8"}),e.on("finish",()=>{n.resolve()}),e.on("error",e=>{n.reject(e)}),n},write:t=>{e.write(t+"\n")},end:()=>{let t=Ga();return e.on("close",()=>{t.resolve()}),e.end(),t}}},e.fsCleanFolder=function(e){return nD(e,{path:o,fs:a})},e.fsCleanFolderCore=nD,e.fsCopyFile=function(e,t,n={}){return rD(e,t,{path:o,fs:a,...n})},e.fsCopyFileCore=rD,e.fsCopyFolder=function(e,t,n={}){return oD(e,t,{path:o,fs:a,...n})},e.fsCopyFolderCore=oD,e.fsCreateFile=function(e,t,n={}){return cD(e,t,{fs:a,...n})},e.fsCreateFileCore=cD,e.fsCreateFolder=uD,e.fsCreateFolderCore=tD,e.fsDeleteFile=function(e){return fD(e,{fs:a})},e.fsDeleteFileCore=fD,e.fsDeleteFileSafe=async function(e,t={}){return await dD(e,{fs:a,...t})},e.fsDeleteFileSafeCore=dD,e.fsDeleteFolder=pD,e.fsDeleteFolderCore=hD,e.fsDeleteFolderSafe=async function(e,t={}){return await gD(e,{fs:a,...t})},e.fsDeleteFolderSafeCore=gD,e.fsDownloadFile=async function(e,t){return mD(e,t,{fs:a,Readable:c.Readable})},e.fsDownloadFileCore=mD,e.fsEvem=function(e={}){let t=Ae(e,"fd");ke(t)||(t="./_evps");let n=Ae(e,"polling");we(n)||(n=!1);let r=Ae(e,"timeInterval");Vi(r)||(r=100),r=ji(r);let i=Ae(e,"timeBinaryInterval");Vi(i)||(i=300),i=ji(i);let s=Ae(e,"keySys");ke(s)||(s="[::pkg_content::]"),AD(t)||uD(t);let l=bD(t,{polling:n,timeInterval:r,timeBinaryInterval:i});l.on("change",e=>{if("add"!==e.type&&"change"!==e.type)return;let t=vD(e.fp),n="";try{n=a.readFileSync(e.fp,"utf8"),n=Pa(n)}catch(e){}Be(n)&&c.emit(t,{[s]:n})});let c=qi({type:"safe",funGetListenerError:(e,t,n)=>{0!==c.listenerCount("error")?u.call(c,"error",{fun:"listener",name:e,msg:t,args:n}):console.error(`[wsemi fsEvem] listener of '${String(e)}' threw and no 'error' listener is registered:`,t)}}),u=c.emit;return c.emit=function(e,n){let r=!1;if(Be(n)&&(r=Me(n,s)),r){let t=Ae(n,s,null),r=Ae(t,"pkg",""),i=Ae(t,"time","");return u.call(this,e,r,i)}((e,n)=>{let r=o.resolve(t,e);Se(n)||(n=ar(n)),a.writeFileSync(r,n,"utf8")})(e,{pkg:n,time:yD()})},c.clear=()=>{l.clear(),pD(t)},c},e.fsExists=function(e){return DF(e,{fs:a})},e.fsExistsCore=DF,e.fsGetFileBasicHash=function(e,t={}){return wD(e,{fs:a,crypto:f,...t})},e.fsGetFileBasicHashCore=wD,e.fsGetFileHash=function(e,t={}){return ED(e,{fs:a,crypto:f,...t})},e.fsGetFileHashCore=ED,e.fsGetFileXxHash=function(e,t={}){return CD(e,{fs:a,...t})},e.fsGetFileXxHashCore=CD,e.fsGetFilesInFolder=function(e,t=1){return SD(e,t,{path:o,fs:a})},e.fsGetFilesInFolderCore=SD,e.fsGetFilesWithHashInFolder=FD,e.fsGetFilesWithHashInFolderCore=kD,e.fsGetFolderBasicHash=function(e,t={}){return DD(e,{path:o,fs:a,crypto:f,...t})},e.fsGetFolderBasicHashCore=DD,e.fsGetFoldersInFolder=function(e,t=1){return ND(e,t,{path:o,fs:a})},e.fsGetFoldersInFolderCore=ND,e.fsIsFile=MF,e.fsIsFileCore=NF,e.fsIsFolder=AD,e.fsIsFolderCore=eD,e.fsMergeFiles=async function(e,t,n={}){return MD(e,t,{fs:a,...n})},e.fsMergeFilesCore=MD,e.fsReadJson=function(e){let t=null,n=QF(e,{fs:a});if(n.error)return n;let r=n.success,i=null;try{i=JSON.parse(r)}catch(e){t=e}return null!==t?{error:t}:{success:i}},e.fsReadText=TF,e.fsReadTextCore=QF,e.fsRenameFile=function(e,t){return QD(e,t,{fs:a})},e.fsRenameFileCore=QD,e.fsRenameFolder=function(e,t){return TD(e,t,{fs:a})},e.fsRenameFolderCore=TD,e.fsSrlog=function(e={}){let n=Ae(e,"fdSys","");ke(n)||(n=o.resolve(),n=n.replaceAll("\\","/"));let r=Ae(e,"fdLog","");ke(r)||(r="./syslog"),AD(r)||uD(r);let i=Ae(e,"dlm","");ke(i)||(i="ꓹ");let s=Ae(e,"useTime",null);we(s)||(s=!0);let l=Ae(e,"useLoc",null);we(l)||(l=!0);let c=Ae(e,"useLocRela",null);async function u(e,n,...o){let c=(()=>{let e=t().format("YYYY-MM-DD");return`${r}/${e}.log`})(),u=bn(o,e=>{let t="";return t=Ee(e)||Ce(e)?JSON.stringify(e):we(e)?e?"true":"false":Na(e),t}),f="";s&&(f=`[${e}]\n`,a.appendFileSync(c,f,"utf8")),l&&(f=`[${n}]\n`,a.appendFileSync(c,f,"utf8")),f=`${yo(u,`${i} `)}\n\n`,a.appendFileSync(c,f,"utf8")}return we(c)||(c=!0),function(...e){let t="";s&&(t=yD());let r="",i="",o=[];if(l){if(o=ea((new Error).stack,"\n"),vn(o,e=>{if((e=Ko(e)).indexOf("file:")<0)return!0;if(e.indexOf("fsSrlog.mjs")>=0)return!0;return vn(ea(e," "),e=>{if(e.indexOf("file:")>=0)return r=e,!1}),!ke(r)&&void 0}),!ke(r))throw console.log("stackLines",o),new Error("can not parse stackLines");"("===ta(r,1)&&(r=ra(r,1)),")"===na(r,1)&&(r=Qa(r,1));try{r=decodeURIComponent(r)}catch(e){console.log(e)}i=r,i=ra(i,8),i=i.replace(n,"")}let a=[];s&&(a=[...a,`[${t}]`]);let f="";l&&(f=r,c&&(f=i),a=[...a,`[${f}]`]),a=[...a,...e],console.log(...a),u(t,f,...e)}},e.fsSyncFolder=function(e,t,n={}){return UD(e,t,{path:o,fs:a,crypto:f,...n})},e.fsSyncFolderCore=UD,e.fsTask=function(e,t={}){let n=Ae(t,"fdStorage","");ke(n)||(n="./_tkfs");let r=Ae(t,"levelLimit","");Vi(r)||(r=1),r=ji(r);let i=Ae(t,"typeHash","");ke(i)||(i="md5");let o=Ae(t,"timeInterval");aa(o)||(o=6e4),o=ji(o),uD(n);let s=qi({type:"safe"}),l=!1,c=`${n}/fpHash.json`,u=`${n}/fpResult.json`,f=async()=>{if(!0===l)return;let t=(()=>{let e={};try{e=Pa(a.readFileSync(c,"utf8"))}catch(e){}return e})(),n=await(async()=>{let t={};return AD(e)?(vn(await FD(e,r,{type:i}),e=>{t[e.path]=e.hash}),t):t})(),o=bn(t,(e,t)=>({path:t,hash:e})),u=bn(n,(e,t)=>({path:t,hash:e}));vn(LD(o,u,"path").infor,(e,r)=>{if("same"===e)return!0;let i=Ae(t,r,""),o=Ae(n,r,""),u="";u="del"===e?i:o;let f=e,d=r,h=sD(r);l=!0;let p=Ga();return s.emit("change",{type:f,fp:d,fn:h,hash:u,pm:p}),p.then(()=>{let e=Ti(t);e[d]=n[d],(e=>{try{let t=ar(e);a.writeFileSync(c,t,"utf8")}catch(e){}})(e)}).catch(()=>{}).finally(()=>{l=!1}),!1})},d=()=>{let e={};try{e=Pa(a.readFileSync(u,"utf8"))}catch(e){}return e},h=(e={})=>{try{let t=ar(e);a.writeFileSync(u,t,"utf8")}catch(e){}},p=!1,g=setInterval(()=>{p||(p=!0,f().catch(()=>{}).finally(()=>{p=!1}))},o);return s.getResult=(e,t)=>{let n=`${e}|${t}`,r=Ae(d(),n,[]);return Ce(r)||console.log(`result for key[${n}] is not an array`),r},s.getAndEliminateResult=(e,t)=>{let n=`${e}|${t}`,r=d(),i=Ae(r,n,[]);return Ce(i)||console.log(`result for key[${n}] is not an array`),r=((e,t)=>{let n={};return vn(e,(e,r)=>{Ae(ea(r,"|"),0,"")!==t&&(n[r]=e)}),n})(r,e),h(r),i},s.setResult=(e,t,n)=>{Ce(n)||(console.log("result is not an array, default to []"),n=[]);let r=`${e}|${t}`,i=d();i[r]=n,h(i)},s.clear=()=>{clearInterval(g)},s},e.fsTaskCp=function(e,t,n={}){AD(e)||uD(e),AD(t)||uD(t);let r=`${e}/fpHash.json`,i=`${t}/fpHash.json`,o=e=>{let t={};try{t=Pa(a.readFileSync(e,"utf8"))}catch(e){}return t},s=(e,t)=>{try{let n=ar(t);a.writeFileSync(e,n,"utf8")}catch(e){}},l=(e,t)=>Ae(o(e),t,""),c=(e,t,n)=>{let r=o(e);r[t]=n,s(e,r)},u=(e,t)=>{let n=o(e);Me(n,t)&&delete n[t],s(e,n)},f=()=>o(r),d=e=>s(r,e),h=e=>l(r,e),p=()=>o(i),g=e=>s(i,e),m=e=>l(i,e),y=(e,t)=>c(i,e,t),v=e=>u(i,e),A=e=>{let t=[];return vn(e,(e,n)=>{t.push({fp:n,hash:e})}),t},b={buildSrc:()=>{let e=qi({type:"safe"});return e.set=(t,n)=>{((e,t)=>{c(r,e,t)})(t,n),e.emit("set",{type:"set",fp:t,hash:n})},e.get=h,e.remove=t=>{(e=>{u(r,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=f,e.writeKp=d,e},buildTar:()=>{let e=qi({type:"safe"}),t=Nu(300),n=HD(r);return n.on("change",n=>{t(()=>{(async()=>{let t=f();if(!Be(t))return"no src";let n=p(),r=A(t),i=LD(A(n),r,"fp",{withInfor:!1}),o=Ga();return o.then(e=>{g(t)}).catch(()=>{}),e.emit("change",{kpSrc:t,kpTar:n,kpCmp:i,pm:o}),o})().catch(()=>{})})}),e.set=y,e.get=m,e.remove=v,e.readKp=p,e.writeKp=g,e.clear=n.clear,e}};return b},e.fsTreeFolder=function(e,t=1){return BD(e,t,{path:o,fs:a})},e.fsTreeFolderCore=BD,e.fsTreeFolderWithHash=function(e,t=1,n={}){return RD(e,t,{path:o,fs:a,crypto:f,...n})},e.fsTreeFolderWithHashCore=RD,e.fsWatchFile=HD,e.fsWatchFolder=bD,e.fsWriteJson=function(e,t,n={}){let r=null;if(!Ee(t)&&!Ce(t))return{error:"inp is not an object or array"};let i=Ae(n,"useFormat",null);we(i)||(i=!1);let o="";try{o=i?JSON.stringify(t,null,2):JSON.stringify(t)}catch(e){r=e}return null!==r?{error:r}:qD(e,o,{fs:a})},e.fsWriteText=function(e,t){return qD(e,t,{fs:a})},e.fsWriteTextCore=qD,e.genGradientColor=function(e){if(Nn(e))return{};let t;try{t=uu.toRgba(e)}catch(e){return{}}function n(e,t){return e.a=t,uu.toRgbaString(e)}return{linearGradient:{x1:0,x2:0,y1:0,y2:1},stops:[[0,n(t,.4)],[1,n(t,.9)]]}},e.genID=Tu,e.genIDSeq=function(){return jD()},e.genPm=Ga,e.getBufferSize=GD,e.getClearPathName=aD,e.getCsvStrFromData=JD,e.getDataFromExcelFileU8Arr=KD,e.getDataFromExcelFileU8ArrDyn=async function(e,t,n){let r=await KD(e,t);return""!==Ae(r,"error","")?Promise.reject(r.error):r},e.getEnv=function(){let e=_a(),t="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;return e=e||t,{isBrowser:e,isWebWorker:t,isNode:"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}},e.getErrorMessage=function(e,t={}){let n=Ae(t,"useCause",null);we(n)||(n=!1);let r=Ae(t,"useAggregate",null);we(r)||(r=!1);let i=Ae(t,"levelCauseMax",null);Vi(i,{useLimitSafe:!0})||(i=8),i=ji(i);let o=Ae(t,"levelJsonMax",null);Vi(o,{useLimitSafe:!0})||(o=6),o=ji(o);let a=Ae(t,"lengthMessageMax",null);Vi(a,{useLimitSafe:!0})||(a=0),a=ji(a);let s={useCause:n,useAggregate:r,levelCauseMax:i,levelJsonMax:o,lengthMessageMax:a},l="";try{l=oN(e,s)}catch(e){return l="",l}return ke(l)?(s.lengthMessageMax>0&&l.length>s.lengthMessageMax&&(l=s.lengthMessageMax>3?l.slice(0,s.lengthMessageMax-3)+"...":l.slice(0,s.lengthMessageMax)),l):(l="",l)},e.getExcelU8ArrFromData=async function(e,t="data"){if(!Mn(e)){return{error:"no data"}}ke(t)||(t="data");let n=null,r=pb(e,t);return Me(r,"error")?r:(n=await bF(r),Me(n,"error"),n)},e.getExcelU8ArrFromWorkbook=bF,e.getExcelWorkbookFromData=pb,e.getExcelWorkbookFromWorksheet=hb,e.getExcelWorksheetFromData=cr,e.getFileAccept=Um,e.getFileBasicHash=TN,e.getFileHash=async function(e,t={}){if(!Ja(e)&&!QN(e))return console.log("inp",e),Promise.reject("inp is not a Blob or File");let n=Ae(t,"type","");ke(n)||(n="sha512");let r=Ae(t,"chunkSize");return Ne(r)||(r=67108864),r=Ir(r),Me({MD5:"md5","SHA-1":"sha1","SHA-256":"sha256","SHA-384":"sha384","SHA-512":"sha512",md5:"md5",sha1:"sha1",sha256:"sha256",sha384:"sha384",sha512:"sha512",xxhash64:"xxhash64"},n)?"xxhash64"===n?LN(e,t):TN(e,t):Promise.reject(`type[${n}] must be one of [ 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'xxhash64' ]`)},e.getFileName=sD,e.getFileNameExt=function(e){if(!ke(e))return"";let t=Lo(sD(e),".");if(or(t)<=1)return"";let n="";try{n=Aa(t)}catch(e){}return n},e.getFileTrueName=vD,e.getFileType=Rm,e.getFileXxHash=LN,e.getGlobal=Kl,e.getObjSize=function(e){let t=0,n=function e(n){if(null!=n)switch(typeof n){case"number":t+=8;break;case"string":t+=2*n.length;break;case"boolean":t+=4;break;case"object":let r=Object.prototype.toString.call(n).slice(8,-1);if("Object"===r||"Array"===r)for(let t in n)n.hasOwnProperty(t)&&e(n[t]);else t+=2*n.toString().length}return t}(e),r=function(e){return e<1024?e+" bytes":e<1048576?(e/1024).toFixed(3)+" KiB":e<1073741824?(e/1048576).toFixed(3)+" MiB":(e/1073741824).toFixed(3)+" GiB"}(n);return{int:n,str:r}},e.getPathParent=lD,e.getTimeBetween=function(e,t,n="days"){let r=qN(n);if(""===r)return[];let i=ON(e,n),o=ON(t,n);return null===i||null===o||e>=t?[]:bn(HN(o.diff(i,n)+1),function(e){return i.clone().add(e,n).format(r)})},e.getTimeFromUnit=qN,e.getTimeHp=PN,e.getTimeObject=ON,e.getTimeRange=function(e,n){if(!Wy(e))return"無起始時間";if(void 0===n&&(n=e),!Wy(n))return"結束時間格式錯誤";let r=t(e,"YYYY-MM-DDTHH:mm:ss"),i=t(n,"YYYY-MM-DDTHH:mm:ss"),o=r.format("YYYY-MM-DD"),a=i.format("YYYY-MM-DD");if(o===a){let t=i.format("HH:mm");if(e===n)return $N(e)+" 至 無";if(e<n)return $N(e)+" 至 "+t;if(e>n)return $N(e)+" 至 "+t+" (起始時間大於結束時間)"}else{if(o<a)return $N(e)+" 至 "+$N(n);if(o>a)return $N(e)+" 至 "+$N(n)+" (起始時間大於結束時間)"}return""},e.getUserAgent=zN,e.getUserAgentDyn=async function(e=null,t){return Mn(t)||(t=["https://cdn.jsdelivr.net/npm/ua-parser-js@2.0.3/dist/ua-parser.min.js"]),await ic(t),zN(e)},e.getltdtkeys=$n,e.haskey=Me,e.html2str=async function(e){if(!ke(e))return"";let t=await async function(){let e="htmlToText";if(Ui(Ae(m,e)))return m;if(Ui(Ae(m,["default",e])))return m.default;let t=globalThis,n=null;if(await ds(()=>(n=Ae(t,"ht",null),Be(n)),{attemptNum:4e3,timeInterval:50}),Ui(Ae(n,e)))return n;if(Ui(Ae(n,["default",e])))return n.default;throw console.log("ht",m,"g.ht",t.ht),new Error("invalid ht, g.ht, g.ht.default, use script for import")}();return t.htmlToText(e,{wordwrap:!1,selectors:[{selector:"script",format:"skip"},{selector:"style",format:"skip"}]})},e.htmlDecode=function(e,t={}){return ke(e)?rs.decode(e,t):""},e.htmlEncode=is,e.importResources=ic,e.interp1=function(e,t,n={}){if(!Ce(e))return{err:"ps is not an array"};{let e=!Ne(t),n=!Ce(t);if(e&&n)return{err:"px is not a number or an array"}}let r=function(e,t={}){if(or(e)<=0)return[];let n=Ae(t,"keyX");ke(n)||(n="x");let r=Ae(t,"keyY");ke(r)||(r="y");let i=[];return vn(e,e=>{let t=null,o=null;Ce(e)&&or(e)>=2?(t=Ae(e,0),o=Ae(e,1)):(t=Ae(e,n,null),o=Ae(e,r,null)),Ne(t)&&Ne(o)&&(t=vr(t),o=vr(o),i.push({x:t,y:o}))}),i}(e,n);if(Ae(r,"err"))return Ae(r,"err");if(0===or(r))return{err:"ps(length=0) is not an effective array",ps:e,psEff:r};if(1===or(r))return{err:"ps(length=1) is one point only",ps:e,psEff:r};let i=function(e){let t=!0,n=!0;for(let r=1;r<or(e);r++){let i=e[r-1],o=e[r];if(t&&i.x>o.x&&(t=!1),n&&i.x<o.x&&(n=!1),i.x===o.x)return{err:`x can not be equal: i=${r}, x=${i.x}`}}return t?YN:n?WN:"no"}(r);if("no"===i)return{err:"psEff is not increasing or decreasing"};i===WN&&(i=YN,r=Ba(r));let o=!Ce(t);o&&(t=[t]);let a=function(e,t={}){if(or(e)<=0)return[];let n=Ae(t,"keyX");ke(n)||(n="x");let r=[];return vn(e,e=>{let t=null;t=Ne(e)?vr(e):Ce(e)&&or(e)>=1?Ae(e,0):Ae(e,n,null),Ne(t)&&(t=vr(t),r.push({x:t}))}),r}(t,n),s=Ae(n,"mode");"linear"!==s&&"stairs"!==s&&"blocks"!==s&&(s="linear");let l,c=bn(a,(e,t)=>{let i=Ae(e,"x"),o=null;try{"linear"===s?o=function(e,t){let n=GN(e,t);if(n!==jN)return n;let r=null;for(let n=1;n<or(e);n++){let i=e[n-1],o=e[n];if(i.x<=t&&t<=o.x){r=((t-i.x)*o.y+(o.x-t)*i.y)/(o.x-i.x);break}}return null===r?{err:VN}:r}(r,i):"blocks"===s?o=function(e,t){let n=GN(e,t);if(n!==jN)return n;let r=null;for(let n=1;n<or(e);n++){let i=e[n-1],o=e[n],a=i.x,s=o.x;if(a<=t&&t<=s){r=o.y;break}}return null===r?{err:VN}:r}(r,i):"stairs"===s&&(o=function(e,t,n={}){let r=Ae(n,"xMin");if(ca(r)){if(r>e[0].x)return{err:`xMin=${r} > ps[0].x=${e[0].x}`};r===e[0].x||(e=[{x:r,y:e[0].y},...e])}let i=Ae(n,"xMax");if(ca(i)){if(i<e[or(e)-1].x)return{err:`xMax=${i} < ps[size(ps)-1].x=${e[or(e)-1].x}`};if(i===e[or(e)-1].x);else{let t={x:i,y:e[or(e)-1].y};e=[...e,t]}}let o=GN(e,t);if(o!==jN)return o;let a=null;for(let n=0;n<or(e);n++){let r=Ae(e,n-1,null),i=Ae(e,n,null),o=Ae(e,n+1,null),s=i.x;r&&(s=(r.x+i.x)/2);let l=i.x;if(o&&(l=(o.x+i.x)/2),s<=t&&t<=l){a=i.y;break}}return null===a?{err:VN}:a}(r,i,n))}catch(e){o={err:e.toString()}}return o});return l=o?c[0]:c,l},e.isDate=function(e){let t=e;return ke(e)&&(t=new Date(e)),Ne(e)&&(t=Ir(e),t=new Date(e)),t instanceof Date&&!isNaN(t)},e.isDev=function(){return!!location&&Wa(location.href,"localhost")},e.isEle=Cu,e.isEleExistByID=function(e){return!!ke(e)&&!(null===document.getElementById(e))},e.isEmail=function(e){return!!ke(e)&&/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)},e.isErr=function(e){return _N(e)},e.isIE=Vu,e.isNarrow=function(e){if(!_a())return!1;let t=window.innerWidth>0&&window.innerWidth<=1024,n=!1;if(e){let t=Ae(e,"clientWidth",0);n=t>0&&t<=700}return t||n},e.isStrHasCapital=eM,e.isStrHasLetter=tM,e.isStrHasLowerCase=nM,e.isStrHasNumber=rM,e.isStrHasSpace=iM,e.isStrHasSymbol=oM,e.isUserIdentify=function(e){let t=Ga();if(!ke(e))return t.reject("身份證字號非有效字串"),t;if(10!==e.length)return t.reject("身份證字號長度非10位"),t;if(isNaN(e.substring(1,10))||!/^[A-Z]$/.test(e.substring(0,1)))return t.reject("身份證格式錯誤,字首需大寫英文"),t;e="ABCDEFGHJKLMNPQRSTUVXYWZIO".indexOf(e.substring(0,1))+10+""+e.substring(1,10);let n=parseInt(e.substring(0,1))+9*parseInt(e.substring(1,2))+8*parseInt(e.substring(2,3))+7*parseInt(e.substring(3,4))+6*parseInt(e.substring(4,5))+5*parseInt(e.substring(5,6))+4*parseInt(e.substring(6,7))+3*parseInt(e.substring(7,8))+2*parseInt(e.substring(8,9))+parseInt(e.substring(9,10)),r=parseInt(e.substring(10,11));return n%10!=0&&10-n%10!==r?(t.reject("非有效身份證"),t):(t.resolve(),t)},e.isUserName=function(e){let t=Ga();return ke(e)?(t.resolve(),t):(t.reject("請填入姓名"),t)},e.isUserPw=function(e,t={}){let n=[],r=Ae(t,"useKeyForError",null);we(r)||(r=!1);let i=Ae(t,"useOnlyOneError",null);if(we(i)||(i=!1),Se(e)||(r?n.push("keyInvalidPassword"):n.push("密碼非有效字串")),or(n)>0)throw new Error(n[0]);let o=Ae(t,"numLenMin","");(!xr(o)||ji(o)<0)&&(o=8),o=ji(o);let a=Ae(t,"numLenMax","");if((!xr(a)||ji(a)<0)&&(a=30),a=ji(a),o>a&&(r?n.push("keyLimNumLenMinOrMax"):n.push("設定密碼最小長度大於最大長度")),or(n)>0)throw new Error(n[0]);let s=Ae(t,"noSpace",null);if(we(s)||(s=!0),s&&(iM(e)&&(r?n.push("keyLimHasSpace"):n.push("密碼不可包含空白字元")),i&&or(n)>0))throw new Error(n[0]);let l=Ae(t,"onlyAscii",null);if(we(l)||(l=!0),l&&(/[^\x20-\x7e]/.test(e)&&(r?n.push("keyLimNonAsciiChar"):n.push("密碼僅允許使用英文大小寫、數字及特殊符號")),i&&or(n)>0))throw new Error(n[0]);if(or(e)<o&&(r?n.push("keyLimNumLenMin"):n.push(`密碼長度須大於等於${o}個字元`)),i&&or(n)>0)throw new Error(n[0]);if(or(e)>a&&(r?n.push("keyLimNumLenMax"):n.push(`密碼長度須小於等於${a}個字元`)),i&&or(n)>0)throw new Error(n[0]);let c=Ae(t,"requireLetter",null);we(c)||(c=!1);let u=Ae(t,"requireUppercase",null);we(u)||(u=!0);let f=Ae(t,"requireLowercase",null);we(f)||(f=!0);let d=Ae(t,"requireDigit",null);we(d)||(d=!0);let h=Ae(t,"requireSpecial",null);if(we(h)||(h=!0),c&&!tM(e)&&(r?n.push("keyLimRequireLetter"):n.push("密碼須包含至少一個英文字母")),i&&or(n)>0)throw new Error(n[0]);if(u&&!eM(e)&&(r?n.push("keyLimRequireUppercase"):n.push("密碼須包含至少一個大寫英文字母")),i&&or(n)>0)throw new Error(n[0]);if(f&&!nM(e)&&(r?n.push("keyLimRequireLowercase"):n.push("密碼須包含至少一個小寫英文字母")),i&&or(n)>0)throw new Error(n[0]);if(d&&!rM(e)&&(r?n.push("keyLimRequireDigit"):n.push("密碼須包含至少一個數字")),i&&or(n)>0)throw new Error(n[0]);if(h&&!oM(e)&&(r?n.push("keyLimRequireSpecial"):n.push("密碼須包含至少一個特殊符號")),i&&or(n)>0)throw new Error(n[0]);let p=Ae(t,"forbiddenChars",null);if(Ce(p)||(p=[]),or(p)>0){for(let t of p)if(e.includes(t)){if(r){n.push("keyLimForbiddenChar");break}n.push(`密碼不可包含字元:${t}`)}if(i&&or(n)>0)throw new Error(n[0])}let g=Ae(t,"commonPasswordBlacklist",null);if(Ce(g)||(g=fM),or(g)>0){let t=e.toLowerCase();if(g.some(e=>Se(e)&&t===e.toLowerCase())&&(r?n.push("keyLimCommonPassword"):n.push("此密碼為常見弱密碼,不允許使用")),i&&or(n)>0)throw new Error(n[0])}let m=Ae(t,"account",""),y=Ae(t,"noConsecutiveCharsFromAccount",null);we(y)||(y=!1);let v=Ae(t,"consecutiveCharsMinMatch","");if(Vi(v)||(v=3),v=ji(v),y&&Se(m)&&or(m)>=v){let t=[...m.toLowerCase()],o=e.toLowerCase(),a=!1;for(let e=0;e<=t.length-v;e++){let n=t.slice(e,e+v).join("");if(o.includes(n)){a=!0;break}}if(a&&(r?n.push("keyLimConsecutiveCharsFromAccount"):n.push(`密碼不可包含與帳號相同之${v}個以上連續字元`)),i&&or(n)>0)throw new Error(n[0])}if(or(n)>0)throw new Error(n.join(" | "));return!0},e.isWindow=_a,e.isab=Ie,e.isarr=Ce,e.isarr0=Dn,e.isarr1=JN,e.isbigint=Da,e.isblob=Ja,e.isbol=we,e.isday=Du,e.isearr=Mn,e.iseobj=Be,e.iser=Nn,e.isernot=Nm,e.isestr=ke,e.isfile=QN,e.isfun=Ui,e.isint=xr,e.ismonth=ur,e.isn0int=XN,e.isn0num=KN,e.isnan=De,e.isnbr=Fe,e.isnint=cb,e.isnnum=function(e){return!!Ne(e)&&Ir(e)<0},e.isnull=Sn,e.isnum=Ne,e.isobj=Ee,e.isobj0=kn,e.isp0int=po,e.isp0num=ZN,e.ispint=Vi,e.ispm=Hi,e.ispnum=aa,e.isstr=Se,e.isstr0=Fn,e.istime=Wy,e.istimeTZ=uM,e.istimems=aM,e.istimemsTZ=cM,e.isu16arr=WD,e.isu8arr=as,e.isundefined=Bn,e.j2o=Pa,e.judge=function(e,t,n,r={}){if(!Ne(e))throw new Error("x1 is not a number");if(!Ne(n))throw new Error("x2 is not a number");let i=Ae(r,"withPreciseNum");if(we(i)||(i=!0),i&&(e=BF(e),n=BF(n)),"==="===t)return e===n||dM(e,n);if("!=="===t)return function(e,t){return!dM(e,t)}(e,n);if(">="===t)return e===n||function(e,t){return new Jl(e).gte(t)}(e,n);if(">"===t)return function(e,t){return new Jl(e).gt(t)}(e,n);if("<="===t)return e===n||function(e,t){return new Jl(e).lte(t)}(e,n);if("<"===t)return function(e,t){return new Jl(e).lt(t)}(e,n);throw console.log(t),new Error(`invalid op[${t}]`)},e.keysmat2ltdt=hM,e.ltdt2vrtsable=function(e,t=[],n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:[];if(!Mn(e))return i("invalid ltdt");if(!Ce(t))return i("invalid mergerowkeys");let o=!1;if(vn(e,function(e){Be(e)||(o=!0)}),o)return i("invalid ltdt, every element must be an effective object");let a=$n(e),s=[];vn(e,function(e){let t={};vn(a,function(n){t[n]={value:e[n].value,style:e[n].style,rowspan:1}}),s.push(t)});let l=Ba(s),c=or(l);vn(a,function(e){if(ua(e,t)){let t=Xi(0,c,0),n=Xi(0,c,0),r=Xi(1,c+1,0);vn(l,function(i,o){if(o>0){la(l[o-1][e].value,l[o][e].value)&&(t[o-1]=1,t[o]=1,r[o]=r[o-1]+1),1===t[o-1]&&1===t[o]&&(n[o-1]=0,n[o]=1)}}),vn(l,function(i,o){1===t[o]&&(1===n[o]?l[o][e].rowspan=r[o]:l[o][e].rowspan=null)})}});let u=Ba(l);return r?{state:"success",msg:u}:u},e.ltdtDiff=function(e,t,n={}){if(!Ce(e))return{};if(!Ce(t))return{};if(0===or(e)&&0===or(t))return{};let r=Ae(n,"empty");ke(r)||(r="∗empty∗");let i=$n(e),o=$n(t),a=pM(i,o),s={};vn(a,(e,t)=>{s[t]=e});let l=Xo(sr(e,a,{empty:r}),sr(t,a,{empty:r}),{...n,mode:"matrix"});return l.dfs=bn(l.dfs,e=>{let t={};vn(e,e=>{e.k=s[e.k],t[e.k]=e});let n={};return vn(a,e=>{n[e]=t[e]}),n}),l},e.ltdtDiffByKey=LD,e.ltdtkeys2mat=sr,e.ltdtkeysheads2mat=lr,e.ltdtmapping=function(e,t,n=""){if(!Mn(e))return[];if(!Mn(t))return[];let r=bn(e,e=>xF(e,t,n));return r},e.ltdtmerge=ZF,e.ltdtpick=function(e,t){if(!Mn(e))return[];if(!Mn(t))return[];let n=bn(e,e=>CF(e,t));return n},e.ltdtpull=function(e,t,n){return Ce(e)&&Ce(t)&&ke(n)&&gn(e,e=>Ee(e))?0===t.length?e:gn(t,e=>Ee(e))?mM(e,t,n):[]:[]},e.mat2ltdt=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:[];if(!Mn(e))return r("invalid mat");if(e.length<=1)return r("invalid mat, at least 2 rows are required");let i=!1;if(vn(e,function(e){Mn(e)||(i=!0)}),i)return r("invalid mat, every row must be an effective array");var o,a;let s=hM(Wo(e)[0],(a=null==(o=e)?0:o.length)?vo(o,1,a):[],{returnWithStateAndMsg:!0});return"error"===s.state?r(`keysmat2ltdt: ${s.msg}`):n?s:s.msg},e.matConcat=function(e,t){if(!Ce(e))return[];if(!Ce(t))return[];if(0===or(e)&&0===or(t))return[];let n=or(e),r=or(Ae(e,0,[])),i=or(t),o=or(Ae(t,0,[])),a=[],s=Math.max(n,i);for(let n=0;n<s;n++){let i=[],s=-1;for(let t=0;t<r;t++){s++;let r=Ae(e,`${n}.${t}`,null);i[s]=r}for(let e=0;e<o;e++){s++;let r=Ae(t,`${n}.${e}`,null);i[s]=r}a[n]=i}return a},e.matDiff=function(e,t,n={}){return Ce(e)&&Ce(t)?0===or(e)&&0===or(t)?{}:Xo(e,t,{...n,mode:"matrix"}):{}},e.matat=function(e,t,n){return Mn(e)?bn(e,function(e){return go(e,t,n)}):[]},e.now2str=yD,e.now2strp=function(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYYMMDDHHmmss")},e.nowDay2str=function(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYY-MM-DD")},e.nowms2str=function(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYY-MM-DDTHH:mm:ss.SSSZ")},e.nowms2strp=function(){if(!Ui(t))throw new Error("invalid dayjs");return t().format("YYYYMMDDHHmmssSSS")},e.o2j=ar,e.obj2b64=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"",i="";try{let t=ar(e,!1,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`o2j: ${t.msg}`);let n=yM(t.msg,{returnWithStateAndMsg:!0});if("error"===n.state)return r(`str2b64: ${n.msg}`);i=n.msg}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.obj2pb64=function(e,t,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(void 0===e)return i("invalid data");if(!ke(t))return i("invalid key");let o="";try{let n=ar({data:e},!1,{returnWithStateAndMsg:!0});if("error"===n.state)return i(`o2j: ${n.msg}`);o=vM(n.msg,t,!0)}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.obj2str=function(e,t="Uint8Array",n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(Bn(e))return i("invalid data");Se(t)?t=[t]:Ce(t)||(t=["Uint8Array"]);let o="";try{o=JSON.stringify(e,function(e,n){return n=DM.escape(n),t.indexOf("Uint8Array")>=0&&(n=DM.u8arr2b64(n)),t.indexOf("Uint16Array")>=0&&(n=DM.u16arr2b64(n)),n})}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.obj2stru8arr=NM,e.obj2u8arr=function(e,t={}){let n=[],r=new Uint8Array,i=Ae(t,"returnWithStateAndMsg",null);we(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:new Uint8Array;if(!JN(e)&&!Be(e))return o("invalid data, data is not an effective object or a non-empty array");let a=[],s=[];function l(e){a.push(GD(e)),s.push(e)}try{let t=NM(e,{returnWithStateAndMsg:!0});if("error"===t.state)return o(`obj2stru8arr: ${t.msg}`);let i=t.msg;l(MM(i.results)),vn(i.binarys,e=>{l(e)});let c=a,u=MM(JSON.stringify(c)),f=new Uint8Array(8);us(GD(u),f),n.push(f),n.push(u),vn(s,e=>{n.push(e)}),r=QM(n)}catch(e){return o(e.toString())}return i?{state:"success",msg:r}:r},e.objSortBy=TM,e.objSortByKeys=function(e,t){if(!Be(e))return{};if(!Mn(t))return{};let n={};return vn(t,(e,t)=>{n[e]=t}),TM(e,(e,t)=>Ae(n,t,0))},e.oo=function(e){if(void 0!==e)return Pa(ar(e))},e.openLink=function(e){if(!ke(e))return;let t=document.createElement("a");t.href=e,t.target="_blank",document.body.appendChild(t),t.click(),document.body.removeChild(t)},e.pb642obj=function(e,t,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!ke(e))return i("invalid b64");if(!ke(t))return i("invalid key");let o=null;try{if(o=Pa(Xr(e,t,!0)).data,void 0===o)return i("can not decrypt b64 with key, or the decrypted data is invalid")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.pm2resolve=lb,e.pmChain=function(e,t=null){if(!Ce(e)){let e=Ga();return e.reject("pms is not an array"),e}return e.reduce((e,t)=>e.then(t),Promise.resolve(t))},e.pmConvertResolve=sb,e.pmDebounce=function(e=300){return new function(e){let t=[],n=null,r=null,i="wait";return Vi(e)||(e=300),e=ji(e),function(o,...a){Ui(o)?((null===r||"wait"===i)&&(r=Date.now()),t.push({func:o,input:a,output:null}),null===n&&"wait"===i&&(n=setInterval(()=>{if(null===r)throw new Error("invalid tLast");if("wait"!==i)return;if("wait"===i&&0===t.length)return clearInterval(n),n=null,void(r=null);let o=Date.now();if(o-r>e){i="doing",r=o;let e=t.pop();t=[];let n=e.func(...e.input);Hi(n)?n.then(t=>{e.output=t}).catch(t=>{e.output={err:t}}).finally(()=>{i="wait",r=Date.now()}):(e.output=n,i="wait")}"wait"===i&&0===t.length&&(clearInterval(n),n=null,r=null)},20))):console.log("func is not a function")}}(e)},e.pmHook=LM,e.pmHookReject=function(e,t=()=>{}){return Ui(e)?(Ui(t)||(t=()=>{}),LM(e,e=>{if("afterCatch"===e.mode)return t(e.data)})):null},e.pmIni=function(){return Promise.resolve()},e.pmInvResolve=function(e,t={}){if(!Hi(e))throw new Error("pm is not a promise");let n=Ae(t,"thenExtractData");we(n)||(n=!1);let r=Ga();return e.then(e=>{n&&(e=Ae(e,"data"));let t=Ae(e,"state",""),i=Ae(e,"msg",{});"success"===t?r.resolve(i):"cancelled"===t?r.reject({reason:"cancelled"}):r.reject(i)}).catch(e=>{r.reject(e)}),r},e.pmKeyMutex=function(){return new function(){let e=new Map,t=new Map;return async(n,r)=>{let i=(e.get(n)||Promise.resolve()).then(async()=>await r(),async()=>await r());e.set(n,i.catch(()=>{})),t.set(n,(t.get(n)||0)+1);try{return await i}finally{let r=t.get(n)-1;r<=0?(t.delete(n),e.delete(n)):t.set(n,r)}}}},e.pmMap=function(e,t,n=0){let r={},i=!1,o=Ga();if(!Ce(e)&&!Ee(e))return o.reject("rs is not an array or object"),o;if(0===or(e))return o.resolve([]),o;let a=!1;if(Ee(e)){a=!0;let t=[];vn(e,(e,n)=>{t.push({k:n,v:e})}),e=t}let s=ub(n);return s.on("message",function(n){if(i)return;let l,c=s.get();if(Ui(t)){let e=c.key,n=c.value;if(a&&(e=c.value.k,n=c.value.v),l=t(n,e),!Hi(l))throw new Error("return of fun is not a promise")}else l=c.value;l.then(e=>{r[c.key]=e}).catch(e=>{i=!0,s.clear(),o.reject(e)}).finally(()=>{s.cb(),or(r)===or(e)&&o.resolve(VF(r))})}),vn(e,(e,t)=>{s.push({key:t,value:e})}),o},e.pmQueue=fb,e.pmSeries=ec,e.pmThrottle=function(){let e=qi(),t=[],n=null,r=!1;return function(i,...o){let a=Ga();if(!Ui(i))return void console.log("func is not a function");let s=Tu();return t.push({id:s,func:i,input:o}),null===n&&(n=setInterval(async()=>{if(r)return;r=!0;let i=t.pop();for(let n=0;n<t.length;n++){let r=t[n].id,i={state:"cancelled"};e.emit(r,i)}if(t=[],i){let t,n=i.id;t=Ui(i.func)?await lb(i.func)(...i.input):{state:"error",msg:"fun is not a function"},e.emit(n,t)}r=!1,r||0!==t.length||(clearInterval(n),n=null)},20)),e.once(s,e=>{"success"===e.state?a.resolve(e.msg):"cancelled"===e.state?a.reject({reason:"cancelled"}):a.reject(e.msg)}),a}},e.pmTimeout=async function(e,t,n={}){if(!Hi(e))throw new Error("invalid pm");if(!po(t))throw new Error(`invalid ms[${t}]`);let r=Ae(n,"label",null);ke(r)||(r="");let i,o=`timeout[${t}ms]`;ke(r)&&(o=`${r} ${o}`);let a=Ga();return i=setTimeout(()=>{let e=new Error(o);e.code="TIMEOUT",e.timeout=t,a.reject(e)},t),Promise.race([e,a]).finally(()=>clearTimeout(i))},e.preciseNum=BF,e.pseudoRandom=HM,e.pseudoRandomIntRange=function(e=0,t=100,n="start1"){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),e>(t=ji(t)))throw new Error(`vstart[${e}] > vend[${t}]`);let r=HM(n)*(t-e+1)+e;return r=Math.floor(r),r},e.pseudoRandomIntsNdpRange=function(e=0,t=100,n,r="start1"){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),t=ji(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let i=HM(r,!0),o=[],a=t-e;for(let n=0;n<=a;n++){let n=i()*(t-e+1)+e;n=Math.floor(n),o.push(n)}let s=qa(o,{returnIndex:!0});return s=Wo(s,n),s},e.pseudoRandomIntsRange=function(e=0,t=100,n,r="start1"){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),t=ji(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let i=HM(r,!0),o=[];for(let r=1;r<=n;r++){let n=i()*(t-e+1)+e;n=Math.floor(n),o.push(n)}return o},e.pseudoRandomRange=function(e=0,t=1,n="start1"){if(Ne(e)||(e=0),e=Ir(e),Ne(t)||(t=1),e>(t=Ir(t)))throw new Error(`vstart[${e}] > vend[${t}]`);return HM(n)*(t-e)+e},e.pseudoRandomsRange=function(e=0,t=1,n=1,r="start1"){if(Ne(e)||(e=0),e=Ir(e),Ne(t)||(t=1),t=Ir(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let i=HM(r,!0),o=[];for(let r=1;r<=n;r++){let n=i()*(t-e)+e;o.push(n)}return o},e.queue=ub,e.random=OM,e.randomIntRange=function(e=0,t=100){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),e>(t=ji(t)))throw new Error(`vstart[${e}] > vend[${t}]`);let n=OM()*(t-e+1)+e;return n=Math.floor(n),n},e.randomIntsNdpRange=function(e=0,t=100,n){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),t=ji(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=function(e,t,n){return t=(n?pn(e,t,n):void 0===t)?1:wr(t),(y(e)?YM:WM)(e,t)}(Xi(e,t+1),n);return r},e.randomIntsRange=function(e=0,t=100,n){if(xr(e)||(e=0),e=ji(e),xr(t)||(t=100),t=ji(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=[];for(let i=1;i<=n;i++){let n=OM()*(t-e+1)+e;n=Math.floor(n),r.push(n)}return r},e.randomRange=function(e=0,t=1){if(Ne(e)||(e=0),e=Ir(e),Ne(t)||(t=1),e>(t=Ir(t)))throw new Error(`vstart[${e}] > vend[${t}]`);return OM()*(t-e)+e},e.randomsRange=function(e=0,t=1,n=1){if(Ne(e)||(e=0),e=Ir(e),Ne(t)||(t=1),t=Ir(t),Vi(n)||(n=1),n=ji(n),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=[];for(let i=1;i<=n;i++){let n=OM()*(t-e)+e;r.push(n)}return r},e.rang=function(e,t,n=2){if(!Ne(e))return[];if(e=Ir(e),!Ne(t))return[];if(t=Ir(t),Vi(n)||(n=2),(n=ji(n))<=0)throw new Error(`num[${n}] <= 0`);let r=(t-e)/n,i=e,o=[];for(let e=0;e<=n;e++)o.push(i),i+=r;return o},e.rep=function(e,t){return ke(e)&&po(t)?JM(e,t):""},e.repObj=function(e,t){return Nn(e)?[]:Vi(t)?HN(t,no(e)):[]},e.replace=ac,e.replaceObj=function(e,t){return ke(e)&&Be(t)?(vn(t,function(e,t){e=Ee(e)||Ce(e)?JSON.stringify(e):Na(e)}),vn(t,function(t,n){e=ac(e,n,t)}),e):""},e.replacePlus=function(e,t,n,r=null,i){if(!ke(e)||!ke(t)||!ke(n))return"";if(!Se(i))return"";let o="[\\s\\S]*";ke(r)&&(o="[^"+r+"]*");let a=new RegExp(t+o+n,"g");return e.replace(a,i)},e.round=EF,e.secd=function(e){return Ne(e)?1/Bu(e=Ir(e)):null},e.sep=ea,e.sepInt=function(e,t,n=!0){if(!xr(e))return[];if(!po(t))return[];if(!we(n))return[];let r=_M(e/t),i=e-r*t,o=[];for(let e=1;e<=t;e++){let t=r;e<=i&&(t=r+1),o.push(t)}return n&&(o=Ba(o)),o},e.setIntervalHp=function(e,t=1){let n=Kl(),r=_a(),i=e=>{n.setTimeout(e,1)},o=e=>{n.requestAnimationFrame(e)},a=null;a=r?o:i;let s=PN(),l=!0,c=s(),u=()=>{if(!l)return;if(s()-c>=t){try{e()}catch(e){console.log(e)}c=s()}a(u)};return a(u),()=>{l=!1}},e.setTimeoutHp=function(e,t=1){let n=Kl(),r=_a(),i=e=>{n.setTimeout(e,1)},o=e=>{n.requestAnimationFrame(e)},a=null;a=r?o:i;let s=PN(),l=!0,c=s(),u=()=>{if(!l)return;if(s()-c>=t){l=!1;try{e()}catch(e){console.log(e)}}a(u)};return a(u),null},e.sind=Fu,e.split=Zo,e.str2aes=vM,e.str2b64=yM,e.str2hint=RM,e.str2md5=function(e,t=!1,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!ke(e))return i("invalid str");we(t)||(t=!1);let o="";try{let n=XM(e);o=t?n.toString(Qr):n.toString(_r)}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.str2obj=function(e,t="Uint8Array",n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:{};if(!Se(e))return i("invalid data");Se(t)?t=[t]:Ce(t)||(t=["Uint8Array"]);let o={};try{o=JSON.parse(e,function(e,n){return t.indexOf("Uint8Array")>=0&&(n=DM.b642u8arr(n)),t.indexOf("Uint16Array")>=0&&(n=DM.b642u16arr(n)),DM.unescape(n)})}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.str2sha=fQ,e.str2sha512=function(e,t=!1,n={}){let r=Ae(n,"returnWithStateAndMsg",null);if(we(r)||(r=!1),!r)return fQ(e,512,t);let i=fQ(e,512,t,{returnWithStateAndMsg:!0});return"error"===i.state?{state:"error",msg:`str2sha: ${i.msg}`}:i},e.str2u8arr=MM,e.strCompare=dQ,e.strCompareForVersion=function(e,t){let n=hQ(e),r=hQ(t);if(null===n||null===r)return null;for(let e=0;e<3;e++){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return 0},e.strDiff=Go,e.strDiffToHtml=function(e,t,n={}){if(!Se(e))return"";if(!Se(t))return"";if(""===e&&""===t)return"";let r=Ae(n,"useNormNewline");we(r)||(r=!0),r&&(e=(e=e.replaceAll("\r\n","\n")).replaceAll("\r","\n"),t=(t=t.replaceAll("\r\n","\n")).replaceAll("\r","\n"));let i=zf(),o=Vo("file","file",e,t),a=i.html(o,{drawFileList:!1,matching:"none",diffStyle:"char",outputFormat:"line-by-line"}),s=Lo(a,"\n"),l="",c=!1;return vn(s,e=>{'<div class="d2h-code-line">'===Ko(e)&&(c=!0),e.indexOf('class="d2h-code-line-prefix"')>=0&&(e=e.replaceAll('class="d2h-code-line-prefix"','class="d2h-code-line-prefix" style="display:inline-block; width: 0.7rem;"')),e.indexOf("<del>")>=0&&(e=e.replaceAll("<del>",'<del style="color:#f26; background:#ffefd5;">')),e.indexOf("<ins>")>=0&&(e=e.replaceAll("<ins>",'<ins style="color:#090; background:#e4fed1;">')),c&&(l+=e+"\n"),c&&"</div>"===Ko(e)&&(c=!1)}),a=l,a},e.strFindFuzz=function(e,t,n=!1){let r="";if(ke(e)||Ne(e))r=Na(e);else{if(!Mn(e))return!!n&&0;r=yo(e,"")}if(""===t)return!n||100;if(Nn(t))return!!n&&0;if(Wa(r,t))return!n||100;let i=ea(t," "),o=bn(i,function(e){return((e,t)=>{let n=new pT([e],{includeScore:!0}).search(t);n=Ae(n,0);let r=Ae(n,"score",1);return r=1-r,r*=100,r})(r,e)});if(n)return gT(o);{let e=80;return gn(o,function(t){return t>=e})}},e.strFindSimilar=function(e,t){let n="";if(ke(e)||Ne(e))n=Na(e);else{if(!Mn(e))return{};n=yo(e,"")}return Ne(t)&&(t=Na(t)),ke(t)&&(t=[t]),Mn(t)?function(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let o=t[i],a=dQ(e,o);n.push({target:o,rating:a}),a>n[r].rating&&(r=i)}return{ratings:n,bestMatch:n[r],bestMatchIndex:r}}(n,t=bn(t,function(e){return Na(e)})):{}},e.strTruncate=kF,e.strdelleft=ra,e.strdelright=Qa,e.strleft=ta,e.strmid=sc,e.strright=na,e.stru8arr2obj=mT,e.tand=Su,e.time2day=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!Wy(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.time2hour=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!Wy(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.time2min=$N,e.timeTZ2day=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!uM(e))return i("invalid t");let o="";try{e=lM.delTZ(e),o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timeTZ2expire=function(e,t=null,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=(e,t)=>r?{state:"error",msg:e}:{today:null,msg:"",err:t};if(!uM(e))return i("invalid t","時間格式錯誤");try{e=AT(e),t=AT(t)}catch(e){return i(e.toString(),"時間轉換失敗")}return yT(e,t,n)},e.timeTZ2hour=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!uM(e))return i("invalid t");let o="";try{e=lM.delTZ(e),o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timeTZ2min=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!uM(e))return i("invalid t");let o="";try{e=lM.delTZ(e),o=t(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH:mm")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timeTZ2past=function(e,t=null,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=(e,t)=>r?{state:"error",msg:e}:{today:null,msg:"",err:t};if(!uM(e))return i("invalid t","時間格式錯誤");try{e=bT(e),t=bT(t)}catch(e){return i(e.toString(),"時間轉換失敗")}return vT(e,t,n)},e.timems2day=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!aM(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DD")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timems2hour=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!aM(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timems2min=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!aM(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timems2time=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!aM(e))return i("invalid t");let o="";try{o=t(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm:ss")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timemsTZ2day=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!cM(e))return i("invalid t");let o="";try{e=lM.delTZ(e),o=t(e).format("YYYY-MM-DD")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timemsTZ2expire=yT,e.timemsTZ2hour=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!cM(e))return i("invalid t");let o="";try{e=lM.delTZ(e),o=t(e).format("YYYY-MM-DDTHH")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timemsTZ2min=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!cM(e))return i("invalid t");let o="";try{e=lM.delTZ(e),o=t(e).format("YYYY-MM-DDTHH:mm")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.timemsTZ2past=vT,e.timemsTZ2time=function(e,n={}){let r=Ae(n,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(!cM(e))return i("invalid t");let o="";try{e=lM.delTZ(e),o=t(e).format("YYYY-MM-DDTHH:mm:ss")}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o},e.treeObj=Iu,e.treeToFilepath=function(e,t={}){if(!Mn(e))return[];let n=Ae(t,"delimiter");ke(n)||(n="/");let r=Ae(t,"bindRoot");ke(r)||(r="root");let i=[];return Iu(e,(e,t,o)=>{let a=Ae(e,"_type","");if("folder"!==a&&"file"!==a)return e;let s=bn(Ae(e,"pathInfors",[]),"name"),l=Ae(s,0,"")===r;if(1===or(s)&&l)return e;l&&(s=Ma(s));let c={type:a,path:n+yo(s,n)};return i.push(c),e},{force:!0}),i},e.trim=Ta,e.u16arr2b64=IM,e.u16arr2u8arr=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!WD(e))return r("invalid u16a");let i=null;try{i=new Uint8Array(e)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.u8arr2ab=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new ArrayBuffer;if(!as(e))return r("invalid u8a");let i=null;try{i=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.u8arr2b64=wM,e.u8arr2blob=IF,e.u8arr2bs=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!as(e))return r("invalid u8a");let i="";try{let t=e.length;for(let n=0;n<t;n++)i+=String.fromCharCode(e[n])}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.u8arr2obj=function(e,t={}){let n={},r=Ae(t,"returnWithStateAndMsg",null);we(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:{};if(!as(e))return i("invalid u8a");try{let t=8,r=e.slice(0,t),o=e.slice(t,GD(e)),a=ls(r),s=o.slice(0,a),l=o.slice(a,GD(o)),c=wT(s,{returnWithStateAndMsg:!0});if("error"===c.state)return i(`u8arr2str: ${c.msg}`);let u=c.msg,f=function(e,t){let n=0,r=0,i=[];return vn(t,t=>{r=n+t;let o=e.slice(n,r);n=r,i.push(o)}),i}(l,JSON.parse(u)),d=wT(f.shift(),{returnWithStateAndMsg:!0});if("error"===d.state)return i(`u8arr2str: ${d.msg}`);let h=mT({results:d.msg,binarys:f},{returnWithStateAndMsg:!0});if("error"===h.state)return i(`stru8arr2obj: ${h.msg}`);n=h.msg}catch(e){return i(e.toString())}return r?{state:"success",msg:n}:n},e.u8arr2str=wT,e.u8arr2u16arr=function(e,t={}){let n=Ae(t,"returnWithStateAndMsg",null);we(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint16Array;if(!as(e))return r("invalid u8a");let i=null;try{i=new Uint16Array(e)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i},e.urlParse=function(e){if(!ke(e))return{};if(!ke(e=Ae(e=Lo(e,"?"),"[1]")))return{};let t=Lo(e,"&");return t=bn(t,function(e){return Lo(e,"=")}),t=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];ei(r,i[0],i[1])}return r}(t),t},e.verifyValue=function(e,t,n={}){let r=!1,i="";if("isstr"===t)Se(e)||(r=!0,i="需要為字串",e="");else if("isnum"===t)Ne(e)||(r=!0,i="需要為數字",e=0);else if("isp0num"===t)ZN(e)||(r=!0,i="需要為含0的正浮點數",e=0);else if("isn0num"===t)KN(e)||(r=!0,i="需要為含0的負浮點數",e=0);else if("isint"===t)xr(e)||(r=!0,i="需要為整數",e=0);else if("ispint"===t)Vi(e)||(r=!0,i="需要為不含0正整數",e=0);else if("isp0int"===t)po(e)||(r=!0,i="需要為含0正整數",e=0);else if("isnint"===t)cb(e)||(r=!0,i="需要為不含0負整數",e=0);else if("isn0int"===t)XN(e)||(r=!0,i="需要為含0負整數",e=0);else if("custom"===t){let t=Ae(n,"funCustom");if(!Ui(t))throw new Error("invalid opt.funCustom when type='custom'");let o=t(e);if(!we(o.err))throw new Error("invalid return.err for type='custom'");if(o.err&&!ke(o.errmsg))throw new Error("invalid return.errmsg when return.err=true for type='custom'");if(!Ne(o.value)&!Se(o.value))throw new Error("invalid return.value for type='custom'");r=o.err,i=o.errmsg,e=o.value}else if(Ui(t)){e=t(e)}else"any"===t?Ne(e)||Se(e)||(r=!0,i="需要為字串或數字",e=""):(r=!0,i="需要指定驗證類型",e=null);return{value:e,err:r,errmsg:i}},e.waitFun=ds});
33
33
  //# sourceMappingURL=wsemi.umd.js.map