wsemi 1.9.0 → 1.9.1
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.
- package/README.md +1 -1
- package/dist/wsemi.umd.js +3 -3
- package/dist/wsemi.umd.js.map +1 -1
- package/docs/-_class.mjs.html +1 -1
- package/docs/-_const.mjs.html +1 -1
- package/docs/ab2blob.mjs.html +1 -1
- package/docs/ab2u8arr.mjs.html +1 -1
- package/docs/addExcelWorksheetFromData.mjs.html +1 -1
- package/docs/addMonth.mjs.html +1 -1
- package/docs/aes2str.mjs.html +1 -1
- package/docs/alive.mjs.html +1 -1
- package/docs/arr2dt.mjs.html +1 -1
- package/docs/arrAccum.mjs.html +1 -1
- package/docs/arrAdd.mjs.html +1 -1
- package/docs/arrAt.mjs.html +1 -1
- package/docs/arrDiff.mjs.html +1 -1
- package/docs/arrFilterByKeywords.mjs.html +1 -1
- package/docs/arrFilterByNum.mjs.html +1 -1
- package/docs/arrFilterByPnum.mjs.html +1 -1
- package/docs/arrFilterByPnumAndToLog.mjs.html +1 -1
- package/docs/arrFind.mjs.html +1 -1
- package/docs/arrGroupByMaxmin.mjs.html +1 -1
- package/docs/arrHas.mjs.html +1 -1
- package/docs/arrInsert.mjs.html +1 -1
- package/docs/arrLookupByMaxmin.mjs.html +1 -1
- package/docs/arrMax.mjs.html +1 -1
- package/docs/arrMin.mjs.html +1 -1
- package/docs/arrMulti.mjs.html +1 -1
- package/docs/arrNorm.mjs.html +1 -1
- package/docs/arrProduct.mjs.html +1 -1
- package/docs/arrPull.mjs.html +1 -1
- package/docs/arrPullAt.mjs.html +1 -1
- package/docs/arrReduce.mjs.html +1 -1
- package/docs/arrReverse.mjs.html +1 -1
- package/docs/arrSep.mjs.html +1 -1
- package/docs/arrSort.mjs.html +1 -1
- package/docs/asind.mjs.html +1 -1
- package/docs/atan2d.mjs.html +1 -1
- package/docs/atand.mjs.html +1 -1
- package/docs/attstr.mjs.html +1 -1
- package/docs/b642obj.mjs.html +1 -1
- package/docs/b642str.mjs.html +1 -1
- package/docs/b642u16arr.mjs.html +1 -1
- package/docs/b642u8arr.mjs.html +1 -1
- package/docs/binstr.mjs.html +1 -1
- package/docs/blob2ab.mjs.html +1 -1
- package/docs/blob2b64.mjs.html +1 -1
- package/docs/blob2str.mjs.html +1 -1
- package/docs/blob2u8arr.mjs.html +1 -1
- package/docs/blobs2b64s.mjs.html +1 -1
- package/docs/blobs2u8arrs.mjs.html +1 -1
- package/docs/bodyLog.mjs.html +1 -1
- package/docs/browserView.mjs.html +1 -1
- package/docs/browserViewFromBlob.mjs.html +1 -1
- package/docs/browserViewFromText.mjs.html +1 -1
- package/docs/browserViewFromU8arr.mjs.html +1 -1
- package/docs/bs2u8arr.mjs.html +1 -1
- package/docs/bufRead.mjs.html +1 -1
- package/docs/bufReadDbl.mjs.html +1 -1
- package/docs/bufWrite.mjs.html +1 -1
- package/docs/bufWriteDbl.mjs.html +1 -1
- package/docs/cache.mjs.html +1 -1
- package/docs/cacheBd.mjs.html +1 -1
- package/docs/cacheSt.mjs.html +1 -1
- package/docs/cbol.mjs.html +1 -1
- package/docs/cdbl.mjs.html +1 -1
- package/docs/ceil.mjs.html +1 -1
- package/docs/cfilesize.mjs.html +1 -1
- package/docs/cfinancial.mjs.html +1 -1
- package/docs/cint.mjs.html +1 -1
- package/docs/clearXSS.mjs.html +1 -1
- package/docs/clearXSSDyn.mjs.html +1 -1
- package/docs/color.mjs.html +1 -1
- package/docs/composeToTree.mjs.html +1 -1
- package/docs/convertToTree.mjs.html +1 -1
- package/docs/copyStrToClipboard.mjs.html +1 -1
- package/docs/cosd.mjs.html +1 -1
- package/docs/cotd.mjs.html +1 -1
- package/docs/createExcelWorkbook.mjs.html +1 -1
- package/docs/cscd.mjs.html +1 -1
- package/docs/cstr.mjs.html +1 -1
- package/docs/day2cht.mjs.html +1 -1
- package/docs/debounce.mjs.html +1 -1
- package/docs/delay.mjs.html +1 -1
- package/docs/dig.mjs.html +1 -1
- package/docs/digExp.mjs.html +1 -1
- package/docs/domAlert.mjs.html +1 -1
- package/docs/domAppend.mjs.html +1 -1
- package/docs/domCancelEvent.mjs.html +1 -1
- package/docs/domCompareText.mjs.html +1 -1
- package/docs/domConvertToPic.mjs.html +1 -1
- package/docs/domConvertToPicDyn.mjs.html +1 -1
- package/docs/domDetect.mjs.html +1 -1
- package/docs/domDrag.mjs.html +1 -1
- package/docs/domDragBarAndScroll.mjs.html +1 -1
- package/docs/domDragPreview.mjs.html +1 -1
- package/docs/domDropFiles.mjs.html +1 -1
- package/docs/domElementsFromPoint.mjs.html +1 -1
- package/docs/domFadeIn.mjs.html +1 -1
- package/docs/domFadeOut.mjs.html +1 -1
- package/docs/domFind.mjs.html +1 -1
- package/docs/domFinds.mjs.html +1 -1
- package/docs/domGetAttr.mjs.html +1 -1
- package/docs/domGetBoudRect.mjs.html +1 -1
- package/docs/domGetBoudRectRefSelf.mjs.html +1 -1
- package/docs/domGetFileAccept.mjs.html +1 -1
- package/docs/domGetFiles.mjs.html +1 -1
- package/docs/domGetParents.mjs.html +1 -1
- package/docs/domGetPointFromEvent.mjs.html +1 -1
- package/docs/domGetScrollableParent.mjs.html +1 -1
- package/docs/domGetWindowSize.mjs.html +1 -1
- package/docs/domIsClientXYIn.mjs.html +1 -1
- package/docs/domIsFocused.mjs.html +1 -1
- package/docs/domIsStable.mjs.html +1 -1
- package/docs/domIsVisible.mjs.html +1 -1
- package/docs/domPrepend.mjs.html +1 -1
- package/docs/domRemove.mjs.html +1 -1
- package/docs/domRenderMarkdownMind.mjs.html +1 -1
- package/docs/domRenderMarkdownMindDyn.mjs.html +1 -1
- package/docs/domRipple.mjs.html +1 -1
- package/docs/domScrollIntoView.mjs.html +1 -1
- package/docs/domScrollTo.mjs.html +1 -1
- package/docs/domSetAttr.mjs.html +1 -1
- package/docs/domShowImages.mjs.html +1 -1
- package/docs/domShowImagesDyn.mjs.html +1 -1
- package/docs/domShowInputAndGetFiles.mjs.html +1 -1
- package/docs/domShowInputAndGetFilesU8Arrs.mjs.html +1 -1
- package/docs/domShowInputDatatime.mjs.html +1 -1
- package/docs/domTooltip.mjs.html +1 -1
- package/docs/domTriggerEvent.mjs.html +1 -1
- package/docs/domVirtualCreate.mjs.html +1 -1
- package/docs/domVirtualCreateQueue.mjs.html +1 -1
- package/docs/downloadExcelFileFromData.mjs.html +1 -1
- package/docs/downloadExcelFileFromDataDyn.mjs.html +1 -1
- package/docs/downloadFileFromB64.mjs.html +1 -1
- package/docs/downloadFileFromBlob.mjs.html +1 -1
- package/docs/downloadFileFromText.mjs.html +1 -1
- package/docs/downloadFileFromU8Arr.mjs.html +1 -1
- package/docs/dtmapping.mjs.html +1 -1
- package/docs/dtpick.mjs.html +1 -1
- package/docs/estimateTicks.mjs.html +1 -1
- package/docs/evEmit.mjs.html +1 -1
- package/docs/evEmitDelay.mjs.html +1 -1
- package/docs/evem.mjs.html +1 -1
- package/docs/examples/ex-blob2b64.html +1 -1
- package/docs/examples/ex-clearXSS.html +1 -1
- package/docs/examples/ex-clearXSSDyn.html +1 -1
- package/docs/examples/ex-colorConverter.html +1 -1
- package/docs/examples/ex-domCompareText.html +1 -1
- package/docs/examples/ex-domConvertToPic.html +1 -1
- package/docs/examples/ex-domDrag.html +1 -1
- package/docs/examples/ex-domDropFiles.html +1 -1
- package/docs/examples/ex-domIsVisible.html +1 -1
- package/docs/examples/ex-domRenderMarkdownMind.html +1 -1
- package/docs/examples/ex-domRenderMarkdownMindDyn.html +1 -1
- package/docs/examples/ex-domRipple.html +1 -1
- package/docs/examples/ex-domScrollIntoView.html +1 -1
- package/docs/examples/ex-domScrollTo.html +1 -1
- package/docs/examples/ex-domShowImages.html +1 -1
- package/docs/examples/ex-domShowImagesDyn.html +1 -1
- package/docs/examples/ex-domShowInputAndGetFiles.html +1 -1
- package/docs/examples/ex-domTooltip.html +1 -1
- package/docs/examples/ex-getFileHash.html +1 -1
- package/docs/examples/ex-getUserAgent.html +1 -1
- package/docs/examples/ex-getUserAgentDyn.html +1 -1
- package/docs/examples/ex-html2str.html +1 -1
- package/docs/examples/ex-obj2u8arr-u8arr2obj.html +1 -1
- package/docs/examples/ex-openLink.html +1 -1
- package/docs/examples/ex-str2aes-aes2str.html +1 -1
- package/docs/examples/ex-str2b64-b642str.html +1 -1
- package/docs/examples/ex-strFindFuzz.html +1 -1
- package/docs/examples/ex-timeTZ2expire-timeTZ2past.html +1 -1
- package/docs/examples/ex-xlsx.html +1 -1
- package/docs/execCli.mjs.html +1 -1
- package/docs/execCliCore.mjs.html +1 -1
- package/docs/execCliJsonRpc.mjs.html +1 -1
- package/docs/execCliSession.mjs.html +1 -1
- package/docs/execJsCode.mjs.html +1 -1
- package/docs/execProcess.mjs.html +1 -1
- package/docs/execProcessKillPid.mjs.html +1 -1
- package/docs/filepathToTree.mjs.html +1 -1
- package/docs/files2data.mjs.html +1 -1
- package/docs/flattenToConn.mjs.html +1 -1
- package/docs/flattenTree.mjs.html +1 -1
- package/docs/floor.mjs.html +1 -1
- package/docs/fsBuildReadStreamText.mjs.html +1 -1
- package/docs/fsBuildWriteStreamText.mjs.html +1 -1
- package/docs/fsCleanFolder.mjs.html +1 -1
- package/docs/fsCleanFolderCore.mjs.html +1 -1
- package/docs/fsCopyFile.mjs.html +1 -1
- package/docs/fsCopyFileCore.mjs.html +1 -1
- package/docs/fsCopyFolder.mjs.html +1 -1
- package/docs/fsCopyFolderCore.mjs.html +1 -1
- package/docs/fsCreateFile.mjs.html +1 -1
- package/docs/fsCreateFileCore.mjs.html +1 -1
- package/docs/fsCreateFolder.mjs.html +1 -1
- package/docs/fsCreateFolderCore.mjs.html +1 -1
- package/docs/fsDeleteFile.mjs.html +1 -1
- package/docs/fsDeleteFileCore.mjs.html +1 -1
- package/docs/fsDeleteFileSafe.mjs.html +1 -1
- package/docs/fsDeleteFileSafeCore.mjs.html +1 -1
- package/docs/fsDeleteFolder.mjs.html +1 -1
- package/docs/fsDeleteFolderCore.mjs.html +1 -1
- package/docs/fsDeleteFolderSafe.mjs.html +1 -1
- package/docs/fsDeleteFolderSafeCore.mjs.html +1 -1
- package/docs/fsDownloadFile.mjs.html +1 -1
- package/docs/fsDownloadFileCore.mjs.html +1 -1
- package/docs/fsEvem.mjs.html +1 -1
- package/docs/fsExists.mjs.html +1 -1
- package/docs/fsExistsCore.mjs.html +1 -1
- package/docs/fsGetFileBasicHash.mjs.html +1 -1
- package/docs/fsGetFileBasicHashCore.mjs.html +1 -1
- package/docs/fsGetFileHash.mjs.html +1 -1
- package/docs/fsGetFileHashCore.mjs.html +1 -1
- package/docs/fsGetFileXxHash.mjs.html +1 -1
- package/docs/fsGetFileXxHashCore.mjs.html +1 -1
- package/docs/fsGetFilesInFolder.mjs.html +1 -1
- package/docs/fsGetFilesInFolderCore.mjs.html +1 -1
- package/docs/fsGetFilesWithHashInFolder.mjs.html +1 -1
- package/docs/fsGetFilesWithHashInFolderCore.mjs.html +1 -1
- package/docs/fsGetFolderBasicHash.mjs.html +1 -1
- package/docs/fsGetFolderBasicHashCore.mjs.html +1 -1
- package/docs/fsGetFoldersInFolder.mjs.html +1 -1
- package/docs/fsGetFoldersInFolderCore.mjs.html +1 -1
- package/docs/fsIsFile.mjs.html +1 -1
- package/docs/fsIsFileCore.mjs.html +1 -1
- package/docs/fsIsFolder.mjs.html +1 -1
- package/docs/fsIsFolderCore.mjs.html +1 -1
- package/docs/fsMergeFiles.mjs.html +1 -1
- package/docs/fsMergeFilesCore.mjs.html +1 -1
- package/docs/fsReadJson.mjs.html +1 -1
- package/docs/fsReadText.mjs.html +1 -1
- package/docs/fsReadTextCore.mjs.html +1 -1
- package/docs/fsRenameFile.mjs.html +1 -1
- package/docs/fsRenameFileCore.mjs.html +1 -1
- package/docs/fsRenameFolder.mjs.html +1 -1
- package/docs/fsRenameFolderCore.mjs.html +1 -1
- package/docs/fsSrlog.mjs.html +1 -1
- package/docs/fsSyncFolder.mjs.html +1 -1
- package/docs/fsSyncFolderCore.mjs.html +1 -1
- package/docs/fsTask.mjs.html +1 -1
- package/docs/fsTaskCp.mjs.html +1 -1
- package/docs/fsTreeFolder.mjs.html +1 -1
- package/docs/fsTreeFolderCore.mjs.html +1 -1
- package/docs/fsTreeFolderWithHash.mjs.html +1 -1
- package/docs/fsTreeFolderWithHashCore.mjs.html +1 -1
- package/docs/fsWatchFile.mjs.html +1 -1
- package/docs/fsWatchFolder.mjs.html +1 -1
- package/docs/fsWriteJson.mjs.html +1 -1
- package/docs/fsWriteText.mjs.html +1 -1
- package/docs/fsWriteTextCore.mjs.html +1 -1
- package/docs/genGradientColor.mjs.html +1 -1
- package/docs/genID.mjs.html +1 -1
- package/docs/genIDSeq.mjs.html +1 -1
- package/docs/genPm.mjs.html +1 -1
- package/docs/getBufferSize.mjs.html +1 -1
- package/docs/getClearPathName.mjs.html +1 -1
- package/docs/getCsvStrFromData.mjs.html +1 -1
- package/docs/getDataFromExcelFileU8Arr.mjs.html +1 -1
- package/docs/getDataFromExcelFileU8ArrDyn.mjs.html +1 -1
- package/docs/getEnv.mjs.html +1 -1
- package/docs/getErrorMessage.mjs.html +1 -1
- package/docs/getExcelU8ArrFromData.mjs.html +1 -1
- package/docs/getExcelU8ArrFromWorkbook.mjs.html +1 -1
- package/docs/getExcelWorkbookFromData.mjs.html +1 -1
- package/docs/getExcelWorkbookFromWorksheet.mjs.html +1 -1
- package/docs/getExcelWorksheetFromData.mjs.html +1 -1
- package/docs/getFileAccept.mjs.html +1 -1
- package/docs/getFileBasicHash.mjs.html +1 -1
- package/docs/getFileHash.mjs.html +1 -1
- package/docs/getFileName.mjs.html +1 -1
- package/docs/getFileNameExt.mjs.html +1 -1
- package/docs/getFileTrueName.mjs.html +1 -1
- package/docs/getFileType.mjs.html +1 -1
- package/docs/getFileXxHash.mjs.html +1 -1
- package/docs/getGlobal.mjs.html +1 -1
- package/docs/getObjSize.mjs.html +1 -1
- package/docs/getPathParent.mjs.html +1 -1
- package/docs/getTimeBetween.mjs.html +1 -1
- package/docs/getTimeFromUnit.mjs.html +1 -1
- package/docs/getTimeHp.mjs.html +1 -1
- package/docs/getTimeObject.mjs.html +1 -1
- package/docs/getTimeRange.mjs.html +1 -1
- package/docs/getUserAgent.mjs.html +1 -1
- package/docs/getUserAgentDyn.mjs.html +1 -1
- package/docs/getltdtkeys.mjs.html +1 -1
- package/docs/global.html +1 -1
- package/docs/haskey.mjs.html +1 -1
- package/docs/html2str.mjs.html +1 -1
- package/docs/htmlDecode.mjs.html +1 -1
- package/docs/htmlEncode.mjs.html +1 -1
- package/docs/importResources.mjs.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interp1.mjs.html +1 -1
- package/docs/isDate.mjs.html +1 -1
- package/docs/isDev.mjs.html +1 -1
- package/docs/isEle.mjs.html +1 -1
- package/docs/isEleExistByID.mjs.html +1 -1
- package/docs/isEmail.mjs.html +1 -1
- package/docs/isErr.mjs.html +1 -1
- package/docs/isIE.mjs.html +1 -1
- package/docs/isNarrow.mjs.html +1 -1
- package/docs/isStrHasCapital.mjs.html +1 -1
- package/docs/isStrHasLetter.mjs.html +1 -1
- package/docs/isStrHasLowerCase.mjs.html +1 -1
- package/docs/isStrHasNumber.mjs.html +1 -1
- package/docs/isStrHasSpace.mjs.html +1 -1
- package/docs/isStrHasSymbol.mjs.html +1 -1
- package/docs/isUserIdentify.mjs.html +1 -1
- package/docs/isUserName.mjs.html +1 -1
- package/docs/isUserPw.mjs.html +1 -1
- package/docs/isWindow.mjs.html +1 -1
- package/docs/isab.mjs.html +1 -1
- package/docs/isarr.mjs.html +1 -1
- package/docs/isarr0.mjs.html +1 -1
- package/docs/isarr1.mjs.html +1 -1
- package/docs/isbigint.mjs.html +1 -1
- package/docs/isblob.mjs.html +42 -23
- package/docs/isbol.mjs.html +1 -1
- package/docs/isday.mjs.html +1 -1
- package/docs/isearr.mjs.html +1 -1
- package/docs/iseobj.mjs.html +1 -1
- package/docs/iser.mjs.html +1 -1
- package/docs/isernot.mjs.html +1 -1
- package/docs/isestr.mjs.html +1 -1
- package/docs/isfile.mjs.html +2 -2
- package/docs/isfun.mjs.html +1 -1
- package/docs/isint.mjs.html +1 -1
- package/docs/ismonth.mjs.html +1 -1
- package/docs/isn0int.mjs.html +1 -1
- package/docs/isn0num.mjs.html +1 -1
- package/docs/isnan.mjs.html +1 -1
- package/docs/isnbr.mjs.html +1 -1
- package/docs/isnint.mjs.html +1 -1
- package/docs/isnnum.mjs.html +1 -1
- package/docs/isnull.mjs.html +1 -1
- package/docs/isnum.mjs.html +1 -1
- package/docs/isobj.mjs.html +1 -1
- package/docs/isobj0.mjs.html +1 -1
- package/docs/isp0int.mjs.html +1 -1
- package/docs/isp0num.mjs.html +1 -1
- package/docs/ispint.mjs.html +1 -1
- package/docs/ispm.mjs.html +1 -1
- package/docs/ispnum.mjs.html +1 -1
- package/docs/isstr.mjs.html +1 -1
- package/docs/isstr0.mjs.html +1 -1
- package/docs/istime.mjs.html +1 -1
- package/docs/istimeTZ.mjs.html +1 -1
- package/docs/istimems.mjs.html +1 -1
- package/docs/istimemsTZ.mjs.html +1 -1
- package/docs/isu16arr.mjs.html +1 -1
- package/docs/isu8arr.mjs.html +1 -1
- package/docs/isundefined.mjs.html +1 -1
- package/docs/j2o.mjs.html +1 -1
- package/docs/judge.mjs.html +1 -1
- package/docs/keysmat2ltdt.mjs.html +1 -1
- package/docs/ltdt2vrtsable.mjs.html +1 -1
- package/docs/ltdtDiff.mjs.html +1 -1
- package/docs/ltdtDiffByKey.mjs.html +1 -1
- package/docs/ltdtkeys2mat.mjs.html +1 -1
- package/docs/ltdtkeysheads2mat.mjs.html +1 -1
- package/docs/ltdtmapping.mjs.html +1 -1
- package/docs/ltdtmerge.mjs.html +1 -1
- package/docs/ltdtpick.mjs.html +1 -1
- package/docs/ltdtpull.mjs.html +1 -1
- package/docs/mat2ltdt.mjs.html +1 -1
- package/docs/matConcat.mjs.html +1 -1
- package/docs/matDiff.mjs.html +1 -1
- package/docs/matat.mjs.html +1 -1
- package/docs/now2str.mjs.html +1 -1
- package/docs/now2strp.mjs.html +1 -1
- package/docs/nowDay2str.mjs.html +1 -1
- package/docs/nowms2str.mjs.html +1 -1
- package/docs/nowms2strp.mjs.html +1 -1
- package/docs/o2j.mjs.html +1 -1
- package/docs/obj2b64.mjs.html +1 -1
- package/docs/obj2pb64.mjs.html +1 -1
- package/docs/obj2str.mjs.html +1 -1
- package/docs/obj2stru8arr.mjs.html +1 -1
- package/docs/obj2u8arr.mjs.html +1 -1
- package/docs/objSortBy.mjs.html +1 -1
- package/docs/objSortByKeys.mjs.html +1 -1
- package/docs/oo.mjs.html +1 -1
- package/docs/openLink.mjs.html +1 -1
- package/docs/pb642obj.mjs.html +1 -1
- package/docs/pmChain.mjs.html +1 -1
- package/docs/pmConvertResolve.mjs.html +1 -1
- package/docs/pmDebounce.mjs.html +1 -1
- package/docs/pmHook.mjs.html +1 -1
- package/docs/pmHookReject.mjs.html +1 -1
- package/docs/pmIni.mjs.html +1 -1
- package/docs/pmInvResolve.mjs.html +1 -1
- package/docs/pmKeyMutex.mjs.html +1 -1
- package/docs/pmMap.mjs.html +1 -1
- package/docs/pmQueue.mjs.html +1 -1
- package/docs/pmSeries.mjs.html +1 -1
- package/docs/pmThrottle.mjs.html +1 -1
- package/docs/pmTimeout.mjs.html +1 -1
- package/docs/preciseNum.mjs.html +1 -1
- package/docs/pseudoRandom.mjs.html +1 -1
- package/docs/pseudoRandomIntRange.mjs.html +1 -1
- package/docs/pseudoRandomIntsNdpRange.mjs.html +1 -1
- package/docs/pseudoRandomIntsRange.mjs.html +1 -1
- package/docs/pseudoRandomRange.mjs.html +1 -1
- package/docs/pseudoRandomsRange.mjs.html +1 -1
- package/docs/queue.mjs.html +1 -1
- package/docs/random.mjs.html +1 -1
- package/docs/randomIntRange.mjs.html +1 -1
- package/docs/randomIntsNdpRange.mjs.html +1 -1
- package/docs/randomIntsRange.mjs.html +1 -1
- package/docs/randomRange.mjs.html +1 -1
- package/docs/randomsRange.mjs.html +1 -1
- package/docs/rang.mjs.html +1 -1
- package/docs/rep.mjs.html +1 -1
- package/docs/repObj.mjs.html +1 -1
- package/docs/replace.mjs.html +1 -1
- package/docs/replaceObj.mjs.html +1 -1
- package/docs/replacePlus.mjs.html +1 -1
- package/docs/round.mjs.html +1 -1
- package/docs/secd.mjs.html +1 -1
- package/docs/sep.mjs.html +1 -1
- package/docs/sepInt.mjs.html +1 -1
- package/docs/setIntervalHp.mjs.html +1 -1
- package/docs/setTimeoutHp.mjs.html +1 -1
- package/docs/sind.mjs.html +1 -1
- package/docs/split.mjs.html +1 -1
- package/docs/str2aes.mjs.html +1 -1
- package/docs/str2b64.mjs.html +1 -1
- package/docs/str2hint.mjs.html +1 -1
- package/docs/str2md5.mjs.html +1 -1
- package/docs/str2obj.mjs.html +1 -1
- package/docs/str2sha.mjs.html +1 -1
- package/docs/str2sha512.mjs.html +1 -1
- package/docs/str2u8arr.mjs.html +1 -1
- package/docs/strCompare.mjs.html +1 -1
- package/docs/strCompareForVersion.mjs.html +1 -1
- package/docs/strDiff.mjs.html +1 -1
- package/docs/strDiffToHtml.mjs.html +1 -1
- package/docs/strFindFuzz.mjs.html +1 -1
- package/docs/strFindSimilar.mjs.html +1 -1
- package/docs/strTruncate.mjs.html +1 -1
- package/docs/strdelleft.mjs.html +1 -1
- package/docs/strdelright.mjs.html +1 -1
- package/docs/strleft.mjs.html +1 -1
- package/docs/strmid.mjs.html +1 -1
- package/docs/strright.mjs.html +1 -1
- package/docs/stru8arr2obj.mjs.html +1 -1
- package/docs/tand.mjs.html +1 -1
- package/docs/time2day.mjs.html +1 -1
- package/docs/time2hour.mjs.html +1 -1
- package/docs/time2min.mjs.html +1 -1
- package/docs/timeTZ2day.mjs.html +1 -1
- package/docs/timeTZ2expire.mjs.html +1 -1
- package/docs/timeTZ2hour.mjs.html +1 -1
- package/docs/timeTZ2min.mjs.html +1 -1
- package/docs/timeTZ2past.mjs.html +1 -1
- package/docs/timems2day.mjs.html +1 -1
- package/docs/timems2hour.mjs.html +1 -1
- package/docs/timems2min.mjs.html +1 -1
- package/docs/timems2time.mjs.html +1 -1
- package/docs/timemsTZ2day.mjs.html +1 -1
- package/docs/timemsTZ2expire.mjs.html +1 -1
- package/docs/timemsTZ2hour.mjs.html +1 -1
- package/docs/timemsTZ2min.mjs.html +1 -1
- package/docs/timemsTZ2past.mjs.html +1 -1
- package/docs/timemsTZ2time.mjs.html +1 -1
- package/docs/treeObj.mjs.html +1 -1
- package/docs/treeToFilepath.mjs.html +1 -1
- package/docs/trim.mjs.html +1 -1
- package/docs/u16arr2b64.mjs.html +1 -1
- package/docs/u16arr2u8arr.mjs.html +1 -1
- package/docs/u8arr2ab.mjs.html +1 -1
- package/docs/u8arr2b64.mjs.html +1 -1
- package/docs/u8arr2blob.mjs.html +1 -1
- package/docs/u8arr2bs.mjs.html +1 -1
- package/docs/u8arr2obj.mjs.html +1 -1
- package/docs/u8arr2str.mjs.html +1 -1
- package/docs/u8arr2u16arr.mjs.html +1 -1
- package/docs/urlParse.mjs.html +1 -1
- package/docs/verifyValue.mjs.html +1 -1
- package/docs/waitFun.mjs.html +1 -1
- package/docs/wsemi.html +12 -5
- package/package.json +1 -1
- package/src/_getDiff2Html.mjs +44 -38
- package/src/isblob.mjs +41 -22
- package/src/isfile.mjs +1 -1
- package/test/_getDiff2Html.test.mjs +56 -0
- package/test/blob2ab.test.mjs +6 -0
- package/test/isblob.test.mjs +28 -1
- package/test/isfile.test.mjs +11 -1
- package/toolfp/dist/wsemip.umd.js +2 -2
- package/toolg/gDistRollup.mjs +2 -0
- package/toolparfor/dist/wpf.umd.js +1 -1
- package/toolparfor/dist/wpf_pmSeries.umd.js +1 -1
package/dist/wsemi.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* wsemi v1.9.
|
|
2
|
+
* wsemi v1.9.1
|
|
3
3
|
* (c) 2018-2021 yuda-lyu(semisphere)
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("dayjs"),require("xss"),require("child_process"),require("tree-kill"),require("path"),require("fs"),require("url"),require("readline"),require("stream"),require("stream/promises"),require("chokidar"),require("crypto"),require("events"),require("ua-parser-js"),require("html-to-text")):"function"==typeof define&&define.amd?define(["exports","dayjs","xss","child_process","tree-kill","path","fs","url","readline","stream","stream/promises","chokidar","crypto","events","ua-parser-js","html-to-text"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wsemi={},e.dayjs,e.filterXSS,e.child_process,e.treeKill,e.path,e.fs,e.url,e.readline,e.stream,e.promises,e.chokidar,e.crypto,e.events,e.UAParser,e["html-to-text"])}(this,function(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var y=m(g),v=Array.isArray,A="object"==typeof global&&global&&global.Object===Object&&global,b="object"==typeof self&&self&&self.Object===Object&&self,w=A||b||Function("return this")(),I=w.Symbol,x=Object.prototype,C=x.hasOwnProperty,B=x.toString,E=I?I.toStringTag:void 0;var S=Object.prototype.toString;var k=I?I.toStringTag:void 0;function F(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":k&&k in Object(e)?function(e){var t=C.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var i=B.call(e);return r&&(t?e[E]=n:delete e[E]),i}(e):function(e){return S.call(e)}(e)}function D(e){return null!=e&&"object"==typeof e}function N(e){return"symbol"==typeof e||D(e)&&"[object Symbol]"==F(e)}var M=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/;function Q(e,t){if(v(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!N(e))||(T.test(e)||!M.test(e)||null!=t&&e in Object(t))}function L(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function R(e){if(!L(e))return!1;var t=F(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var U,H=w["__core-js_shared__"],q=(U=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"";var O=Function.prototype.toString;function P(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var $=/^\[object .+?Constructor\]$/,z=Function.prototype,j=Object.prototype,V=z.toString,Y=j.hasOwnProperty,W=RegExp("^"+V.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function G(e){return!(!L(e)||(t=e,q&&q in t))&&(R(e)?W:$).test(P(e));var t}function J(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return G(n)?n:void 0}var _=J(Object,"create");var X=Object.prototype.hasOwnProperty;var K=Object.prototype.hasOwnProperty;function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ee(e,t){return e===t||e!=e&&t!=t}function te(e,t){for(var n=e.length;n--;)if(ee(e[n][0],t))return n;return-1}Z.prototype.clear=function(){this.__data__=_?_(null):{},this.size=0},Z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Z.prototype.get=function(e){var t=this.__data__;if(_){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return X.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return _?void 0!==t[e]:K.call(t,e)},Z.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_&&void 0===t?"__lodash_hash_undefined__":t,this};var ne=Array.prototype.splice;function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}re.prototype.clear=function(){this.__data__=[],this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=te(t,e);return!(n<0)&&(n==t.length-1?t.pop():ne.call(t,n,1),--this.size,!0)},re.prototype.get=function(e){var t=this.__data__,n=te(t,e);return n<0?void 0:t[n][1]},re.prototype.has=function(e){return te(this.__data__,e)>-1},re.prototype.set=function(e,t){var n=this.__data__,r=te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ie=J(w,"Map");function oe(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ae.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(ie||re),string:new Z}},ae.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},ae.prototype.get=function(e){return oe(this,e).get(e)},ae.prototype.has=function(e){return oe(this,e).has(e)},ae.prototype.set=function(e,t){var n=oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function se(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(se.Cache||ae),n}se.Cache=ae;var le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/\\(\\)?/g,ue=function(e){var t=se(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(le,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t}),fe=ue;function de(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var he=I?I.prototype:void 0,pe=he?he.toString:void 0;function ge(e){if("string"==typeof e)return e;if(v(e))return de(e,ge)+"";if(N(e))return pe?pe.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function me(e){return null==e?"":ge(e)}function ye(e,t){return v(e)?e:Q(e,t)?[e]:fe(me(e))}function ve(e){if("string"==typeof e||N(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ae(e,t){for(var n=0,r=(t=ye(t,e)).length;null!=e&&n<r;)e=e[ve(t[n++])];return n&&n==r?e:void 0}function be(e,t,n){var r=null==e?void 0:Ae(e,t);return void 0===r?n:r}function we(e){return!0===e||!1===e||D(e)&&"[object Boolean]"==F(e)}function Ie(e){return we(e)}function xe(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}function Ce(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!xe(e))return r("invalid ab");let i=null;try{i=new Uint8Array(e)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function Be(e){return"[object Array]"===Object.prototype.toString.call(e)}function Ee(e){return"[object Object]"===Object.prototype.toString.call(e)}function Se(e){if(Ee(e)){for(let t in e)return!0;return!1}return!1}function ke(e){return"[object String]"===Object.prototype.toString.call(e)}function Fe(e){return!(!ke(e)||""===e)}function De(e){return"[object Number]"===Object.prototype.toString.call(e)}function Ne(e){return e!=e}function Me(e){let t=!1;if(Fe(e))t=!isNaN(Number(e));else if(De(e)){if(Ne(e))return!1;t=!0}return t}function Te(e,t){return!!Ee(e)&&(!(!Fe(t)&&!Me(t))&&t in e)}function Qe(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var Le,Re=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[Le?a:++r];if(!1===t(i[s],s,i))break}return e};function Ue(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function He(e){return D(e)&&"[object Arguments]"==F(e)}var qe=Object.prototype,Oe=qe.hasOwnProperty,Pe=qe.propertyIsEnumerable,$e=He(function(){return arguments}())?He:function(e){return D(e)&&Oe.call(e,"callee")&&!Pe.call(e,"callee")},ze=$e;var je="object"==typeof e&&e&&!e.nodeType&&e,Ve=je&&"object"==typeof module&&module&&!module.nodeType&&module,Ye=Ve&&Ve.exports===je?w.Buffer:void 0,We=(Ye?Ye.isBuffer:void 0)||function(){return!1},Ge=/^(?:0|[1-9]\d*)$/;function Je(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function _e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var Xe={};function Ke(e){return function(t){return e(t)}}Xe["[object Float32Array]"]=Xe["[object Float64Array]"]=Xe["[object Int8Array]"]=Xe["[object Int16Array]"]=Xe["[object Int32Array]"]=Xe["[object Uint8Array]"]=Xe["[object Uint8ClampedArray]"]=Xe["[object Uint16Array]"]=Xe["[object Uint32Array]"]=!0,Xe["[object Arguments]"]=Xe["[object Array]"]=Xe["[object ArrayBuffer]"]=Xe["[object Boolean]"]=Xe["[object DataView]"]=Xe["[object Date]"]=Xe["[object Error]"]=Xe["[object Function]"]=Xe["[object Map]"]=Xe["[object Number]"]=Xe["[object Object]"]=Xe["[object RegExp]"]=Xe["[object Set]"]=Xe["[object String]"]=Xe["[object WeakMap]"]=!1;var Ze="object"==typeof e&&e&&!e.nodeType&&e,et=Ze&&"object"==typeof module&&module&&!module.nodeType&&module,tt=et&&et.exports===Ze&&A.process,nt=function(){try{var e=et&&et.require&&et.require("util").types;return e||tt&&tt.binding&&tt.binding("util")}catch(e){}}(),rt=nt&&nt.isTypedArray,it=rt?Ke(rt):function(e){return D(e)&&_e(e.length)&&!!Xe[F(e)]},ot=Object.prototype.hasOwnProperty;function at(e,t){var n=v(e),r=!n&&ze(e),i=!n&&!r&&We(e),o=!n&&!r&&!i&&it(e),a=n||r||i||o,s=a?Ue(e.length,String):[],l=s.length;for(var c in e)!t&&!ot.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Je(c,l))||s.push(c);return s}var st=Object.prototype;function lt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||st)}function ct(e,t){return function(n){return e(t(n))}}var ut=ct(Object.keys,Object),ft=Object.prototype.hasOwnProperty;function dt(e){if(!lt(e))return ut(e);var t=[];for(var n in Object(e))ft.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ht(e){return null!=e&&_e(e.length)&&!R(e)}function pt(e){return ht(e)?at(e):dt(e)}var gt=function(e,t){return function(n,r){if(null==n)return n;if(!ht(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}(function(e,t){return e&&Re(e,t,pt)}),mt=gt;function yt(e,t){var n=!0;return mt(e,function(e,r,i){return n=!!t(e,r,i)}),n}function vt(e){var t=this.__data__=new re(e);this.size=t.size}vt.prototype.clear=function(){this.__data__=new re,this.size=0},vt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},vt.prototype.get=function(e){return this.__data__.get(e)},vt.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof re){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ae(r)}return n.set(e,t),this.size=n.size,this};function At(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ae;++t<n;)this.add(e[t])}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wt(e,t){return e.has(t)}At.prototype.add=At.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},At.prototype.has=function(e){return this.__data__.has(e)};function It(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,h=2&n?new At:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var p=e[f],g=t[f];if(r)var m=a?r(g,p,f,t,e,o):r(p,g,f,e,t,o);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!bt(t,function(e,t){if(!wt(h,t)&&(p===e||i(p,e,n,r,o)))return h.push(t)})){d=!1;break}}else if(p!==g&&!i(p,g,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d}var xt=w.Uint8Array;function Ct(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Bt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Et=I?I.prototype:void 0,St=Et?Et.valueOf:void 0;function kt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n){var r=t(e);return v(e)?r:kt(r,n(e))}function Dt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Nt(){return[]}var Mt=Object.prototype.propertyIsEnumerable,Tt=Object.getOwnPropertySymbols,Qt=Tt?function(e){return null==e?[]:(e=Object(e),Dt(Tt(e),function(t){return Mt.call(e,t)}))}:Nt;function Lt(e){return Ft(e,pt,Qt)}var Rt=Object.prototype.hasOwnProperty;var Ut=J(w,"DataView"),Ht=J(w,"Promise"),qt=J(w,"Set"),Ot=J(w,"WeakMap"),Pt="[object Map]",$t="[object Promise]",zt="[object Set]",jt="[object WeakMap]",Vt="[object DataView]",Yt=P(Ut),Wt=P(ie),Gt=P(Ht),Jt=P(qt),_t=P(Ot),Xt=F;(Ut&&Xt(new Ut(new ArrayBuffer(1)))!=Vt||ie&&Xt(new ie)!=Pt||Ht&&Xt(Ht.resolve())!=$t||qt&&Xt(new qt)!=zt||Ot&&Xt(new Ot)!=jt)&&(Xt=function(e){var t=F(e),n="[object Object]"==t?e.constructor:void 0,r=n?P(n):"";if(r)switch(r){case Yt:return Vt;case Wt:return Pt;case Gt:return $t;case Jt:return zt;case _t:return jt}return t});var Kt=Xt,Zt="[object Arguments]",en="[object Array]",tn="[object Object]",nn=Object.prototype.hasOwnProperty;function rn(e,t,n,r,i,o){var a=v(e),s=v(t),l=a?en:Kt(e),c=s?en:Kt(t),u=(l=l==Zt?tn:l)==tn,f=(c=c==Zt?tn:c)==tn,d=l==c;if(d&&We(e)){if(!We(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new vt),a||it(e)?It(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new xt(e),new xt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ee(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Ct;case"[object Set]":var l=1&r;if(s||(s=Bt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=It(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(St)return St.call(e)==St.call(t)}return!1}(e,t,l,n,r,i,o);if(!(1&n)){var h=u&&nn.call(e,"__wrapped__"),p=f&&nn.call(t,"__wrapped__");if(h||p){var g=h?e.value():e,m=p?t.value():t;return o||(o=new vt),i(g,m,n,r,o)}}return!!d&&(o||(o=new vt),function(e,t,n,r,i,o){var a=1&n,s=Lt(e),l=s.length;if(l!=Lt(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Rt.call(t,u)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var h=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var g=e[u=s[c]],m=t[u];if(r)var y=a?r(m,g,u,t,e,o):r(g,m,u,e,t,o);if(!(void 0===y?g===m||i(g,m,n,r,o):y)){h=!1;break}p||(p="constructor"==u)}if(h&&!p){var v=e.constructor,A=t.constructor;v==A||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof A&&A instanceof A||(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,i,o))}function on(e,t,n,r,i){return e===t||(null==e||null==t||!D(e)&&!D(t)?e!=e&&t!=t:rn(e,t,n,r,on,i))}function an(e){return e==e&&!L(e)}function sn(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function ln(e){var t=function(e){for(var t=pt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,an(i)]}return t}(e);return 1==t.length&&t[0][2]?sn(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var f=new vt;if(r)var d=r(c,u,l,e,t,f);if(!(void 0===d?on(u,c,3,r,f):d))return!1}}return!0}(n,e,t)}}function cn(e,t){return null!=e&&t in Object(e)}function un(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=ye(t,e)).length,o=!1;++r<i;){var a=ve(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&_e(i)&&Je(a,i)&&(v(e)||ze(e))}(e,t,cn)}function fn(e){return e}function dn(e){return function(t){return null==t?void 0:t[e]}}function hn(e){return Q(e)?dn(ve(e)):function(e){return function(t){return Ae(t,e)}}(e)}function pn(e){return"function"==typeof e?e:null==e?fn:"object"==typeof e?v(e)?function(e,t){return Q(e)&&an(t)?sn(ve(e),t):function(n){var r=be(n,e);return void 0===r&&r===t?un(n,e):on(t,r,3)}}(e[0],e[1]):ln(e):hn(e)}function gn(e,t,n){if(!L(n))return!1;var r=typeof t;return!!("number"==r?ht(n)&&Je(t,n.length):"string"==r&&t in n)&&ee(n[t],e)}function mn(e,t,n){var r=v(e)?Qe:yt;return n&&gn(e,t,n)&&(t=void 0),r(e,pn(t))}function yn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function vn(e){return"function"==typeof e?e:fn}function An(e,t){return(v(e)?yn:mt)(e,vn(t))}function bn(e,t){var n=-1,r=ht(e)?Array(e.length):[];return mt(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function wn(e,t){return(v(e)?de:bn)(e,pn(t))}var In=I?I.isConcatSpreadable:void 0;function xn(e){return v(e)||ze(e)||!!(In&&e&&e[In])}function Cn(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=xn),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?Cn(s,t-1,n,r,i):kt(i,s):r||(i[i.length]=s)}return i}function Bn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function En(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return kt(v(n)?Bn(n):[n],Cn(t,1))}function Sn(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function kn(e){return"[object Null]"===Object.prototype.toString.call(e)}function Fn(e){if(Ee(e)){for(let t in e)return!1;return!0}return!1}function Dn(e){return!(!ke(e)||""!==e)}function Nn(e){return!!Be(e)&&0===e.length}function Mn(e){return!!Sn(e)||(!!kn(e)||(!!Fn(e)||(!!Dn(e)||(!!Nn(e)||!!Ne(e)))))}function Tn(e){return!!Be(e)&&(0!==e.length&&(1!==e.length||!Mn(e[0])))}function Qn(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ln(e){return e!=e}function Rn(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Qn(e,Ln,n)}function Un(e,t){return!!(null==e?0:e.length)&&Rn(e,t,0)>-1}function Hn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var qn=qt&&1/Bt(new qt([,-0]))[1]==1/0?function(e){return new qt(e)}:function(){},On=qn;function Pn(e,t,n){var r=-1,i=Un,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Hn;else if(o>=200){var c=t?null:On(e);if(c)return Bt(c);a=!1,i=wt,l=new At}else l=t?[]:s;e:for(;++r<o;){var u=e[r],f=t?t(u):u;if(u=n||0!==u?u:0,a&&f==f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(u)}else i(l,f,n)||(l!==s&&l.push(f),s.push(u))}return s}function $n(e){return e&&e.length?Pn(e):[]}function zn(e){if(!Tn(e))return[];let t=[];return An(e,function(e){let n=pt(e);t=[...t,...n],t=$n(t)}),t}var jn=dn("length"),Vn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Yn(e){return Vn.test(e)}var Wn="\\ud800-\\udfff",Gn="["+Wn+"]",Jn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",_n="\\ud83c[\\udffb-\\udfff]",Xn="[^"+Wn+"]",Kn="(?:\\ud83c[\\udde6-\\uddff]){2}",Zn="[\\ud800-\\udbff][\\udc00-\\udfff]",er="(?:"+Jn+"|"+_n+")"+"?",tr="[\\ufe0e\\ufe0f]?",nr=tr+er+("(?:\\u200d(?:"+[Xn,Kn,Zn].join("|")+")"+tr+er+")*"),rr="(?:"+[Xn+Jn+"?",Jn,Kn,Zn,Gn].join("|")+")",ir=RegExp(_n+"(?="+_n+")|"+rr+nr,"g");function or(e){return Yn(e)?function(e){for(var t=ir.lastIndex=0;ir.test(e);)++t;return t}(e):jn(e)}function ar(e){if(null==e)return 0;if(ht(e))return"string"==typeof(t=e)||!v(t)&&D(t)&&"[object String]"==F(t)?or(e):e.length;var t,n=Kt(e);return"[object Map]"==n||"[object Set]"==n?e.size:dt(e).length}function sr(e,t=!1,n={}){let r=be(n,"returnWithStateAndMsg",null);Ie(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(Sn(e))return i("invalid v");let o="";try{o=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o}function lr(e,t=null,n={}){let r=be(n,"returnWithStateAndMsg",null);Ie(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:[];if(!Tn(e))return i("invalid ltdt");if(Tn(t)||(t=zn(e)),0===ar(t))return i("invalid keys, can not extract any key from ltdt");let o=!1;if(An(e,function(e){Se(e)||(o=!0)}),o)return i("invalid ltdt, every element must be an effective object");let a=be(n,"empty",""),s=[];return An(e,function(e){let n=wn(t,function(t){return Te(e,t)?Ie(e[t])?e[t]?"true":"false":ke(e[t])||Me(e[t])?e[t]:sr(e[t]):a});s.push(n)}),r?{state:"success",msg:s}:s}function cr(e,t=[],n={},r={}){let i=be(r,"returnWithStateAndMsg",null);Ie(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:[];if(!Tn(e))return o("invalid ltdt");Tn(t)||(t=zn(e)),Se(n)||(n={},An(t,e=>{n[e]=e}));let a=!1;if(An(e,function(e){Se(e)||(a=!0)}),a)return o("invalid ltdt, every element must be an effective object");let s=wn(t,function(e){return be(n,e)}),l=lr(e,t,{returnWithStateAndMsg:!0});if("error"===l.state)return o(`ltdtkeys2mat: ${l.msg}`);let c=En([s],l.msg);return i?{state:"success",msg:c}:c}function ur(e){if(!Be(e))return{error:"data is not an array"};let t=null;try{mn(e,Se)&&(e=cr(e)),t={rows:e}}catch(e){return{error:e}}return t}function fr(e){if(!Fe(e))return!1;let n="YYYY-MM";return e===t(e,n).format(n)}var dr=/\s/;var hr=/^\s+/;function pr(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&dr.test(e.charAt(t)););return t}(e)+1).replace(hr,""):e}var gr=/^[-+]0x[0-9a-f]+$/i,mr=/^0b[01]+$/i,yr=/^0o[0-7]+$/i,vr=parseInt;function Ar(e){if("number"==typeof e)return e;if(N(e))return NaN;if(L(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=L(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=pr(e);var n=mr.test(e);return n||yr.test(e)?vr(e.slice(2),n?2:8):gr.test(e)?NaN:+e}var br=1/0;function wr(e){return e?(e=Ar(e))===br||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Ir(e){var t=wr(e),n=t%1;return t==t?n?t-n:t:0}function xr(e){if(!Me(e))return 0;return wr(e)}function Cr(e,t={}){let n=be(t,"useLimitSafe",null);return Ie(n)||(n=!1),!!Me(e)&&(e=xr(e),n?Number.isSafeInteger(e):"number"==typeof(r=e)&&r==Ir(r));var r}var Br="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sr={exports:{}};var kr,Fr={exports:{}};function Dr(){return kr||(kr=1,function(e){var t;e.exports=(t=t||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==Br&&Br.crypto&&(n=Br.crypto),!n)try{n=require("crypto")}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=a.WordArray=s.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new l.init(t,e)}}),c=o.enc={},u=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},d=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*c,o);if(c){for(var f=0;f<c;f+=a)this._doProcessBlock(i,f);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=h.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}});var p=o.algo={};return o}(Math),t)}(Fr)),Fr.exports}var Nr={exports:{}};!function(e){var t;e.exports=(t=Dr(),function(){var e=t,n=e.lib.WordArray;function r(e,t,r){for(var i=[],o=0,a=0;a<t;a++)if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2|r[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return n.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)i.push(r.charAt(a>>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var a=n.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(Nr);var Mr,Tr=Nr.exports,Qr=Er(Tr),Lr={exports:{}};function Rr(){return Mr||(Mr=1,function(e){var t;e.exports=(t=Dr(),function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,a=n.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],h=e[t+2],p=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],v=e[t+7],A=e[t+8],b=e[t+9],w=e[t+10],I=e[t+11],x=e[t+12],C=e[t+13],B=e[t+14],E=e[t+15],S=o[0],k=o[1],F=o[2],D=o[3];S=c(S,k,F,D,a,7,s[0]),D=c(D,S,k,F,l,12,s[1]),F=c(F,D,S,k,h,17,s[2]),k=c(k,F,D,S,p,22,s[3]),S=c(S,k,F,D,g,7,s[4]),D=c(D,S,k,F,m,12,s[5]),F=c(F,D,S,k,y,17,s[6]),k=c(k,F,D,S,v,22,s[7]),S=c(S,k,F,D,A,7,s[8]),D=c(D,S,k,F,b,12,s[9]),F=c(F,D,S,k,w,17,s[10]),k=c(k,F,D,S,I,22,s[11]),S=c(S,k,F,D,x,7,s[12]),D=c(D,S,k,F,C,12,s[13]),F=c(F,D,S,k,B,17,s[14]),S=u(S,k=c(k,F,D,S,E,22,s[15]),F,D,l,5,s[16]),D=u(D,S,k,F,y,9,s[17]),F=u(F,D,S,k,I,14,s[18]),k=u(k,F,D,S,a,20,s[19]),S=u(S,k,F,D,m,5,s[20]),D=u(D,S,k,F,w,9,s[21]),F=u(F,D,S,k,E,14,s[22]),k=u(k,F,D,S,g,20,s[23]),S=u(S,k,F,D,b,5,s[24]),D=u(D,S,k,F,B,9,s[25]),F=u(F,D,S,k,p,14,s[26]),k=u(k,F,D,S,A,20,s[27]),S=u(S,k,F,D,C,5,s[28]),D=u(D,S,k,F,h,9,s[29]),F=u(F,D,S,k,v,14,s[30]),S=f(S,k=u(k,F,D,S,x,20,s[31]),F,D,m,4,s[32]),D=f(D,S,k,F,A,11,s[33]),F=f(F,D,S,k,I,16,s[34]),k=f(k,F,D,S,B,23,s[35]),S=f(S,k,F,D,l,4,s[36]),D=f(D,S,k,F,g,11,s[37]),F=f(F,D,S,k,v,16,s[38]),k=f(k,F,D,S,w,23,s[39]),S=f(S,k,F,D,C,4,s[40]),D=f(D,S,k,F,a,11,s[41]),F=f(F,D,S,k,p,16,s[42]),k=f(k,F,D,S,y,23,s[43]),S=f(S,k,F,D,b,4,s[44]),D=f(D,S,k,F,x,11,s[45]),F=f(F,D,S,k,E,16,s[46]),S=d(S,k=f(k,F,D,S,h,23,s[47]),F,D,a,6,s[48]),D=d(D,S,k,F,v,10,s[49]),F=d(F,D,S,k,B,15,s[50]),k=d(k,F,D,S,m,21,s[51]),S=d(S,k,F,D,x,6,s[52]),D=d(D,S,k,F,p,10,s[53]),F=d(F,D,S,k,w,15,s[54]),k=d(k,F,D,S,l,21,s[55]),S=d(S,k,F,D,A,6,s[56]),D=d(D,S,k,F,E,10,s[57]),F=d(F,D,S,k,y,15,s[58]),k=d(k,F,D,S,C,21,s[59]),S=d(S,k,F,D,g,6,s[60]),D=d(D,S,k,F,I,10,s[61]),F=d(F,D,S,k,h,15,s[62]),k=d(k,F,D,S,b,21,s[63]),o[0]=o[0]+S|0,o[1]=o[1]+k|0,o[2]=o[2]+F|0,o[3]=o[3]+D|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<<o|s>>>32-o)+t}function u(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<<o|s>>>32-o)+t}n.MD5=o._createHelper(l),n.HmacMD5=o._createHmacHelper(l)}(Math),t.MD5)}(Lr)),Lr.exports}var Ur={exports:{}},Hr={exports:{}};!function(e){var t;e.exports=(t=Dr(),function(){var e=t,n=e.lib,r=n.WordArray,i=n.Hasher,o=e.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],l=n[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var u=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=u<<1|u>>>31}var f=(r<<5|r>>>27)+l+a[c];f+=c<20?1518500249+(i&o|~i&s):c<40?1859775393+(i^o^s):c<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,l=s,s=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+l|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[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=i._createHelper(s),e.HmacSHA1=i._createHmacHelper(s)}(),t.SHA1)}(Hr);var qr,Or,Pr=Hr.exports,$r=Er(Pr),zr={exports:{}};function jr(){return Or||(Or=1,function(e){var t;e.exports=(t=Dr(),qr||(qr=1,function(e){var t;e.exports=(t=Dr(),void function(){var e=t,n=e.lib.Base,r=e.enc.Utf8;e.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,l=a.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())}(zr)),function(){var e=t,n=e.lib,r=n.Base,i=n.WordArray,o=e.algo,a=o.MD5,s=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),a=i.create(),s=a.words,l=r.keySize,c=r.iterations;s.length<l;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var u=1;u<c;u++)n=o.finalize(n),o.reset();a.concat(n)}return a.sigBytes=4*l,a}});e.EvpKDF=function(e,t,n){return s.create(n).compute(e,t)}}(),t.EvpKDF)}(Ur)),Ur.exports}var Vr,Yr={exports:{}};!function(e){var t;e.exports=(t=Dr(),Rr(),jr(),Vr||(Vr=1,function(e){var t;e.exports=(t=Dr(),jr(),void(t.lib.Cipher||function(e){var n=t,r=n.lib,i=r.Base,o=r.WordArray,a=r.BufferedBlockAlgorithm,s=n.enc;s.Utf8;var l=s.Base64,c=n.algo.EvpKDF,u=r.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?A:y}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});r.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=n.mode={},d=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=f.CBC=function(){var t=d.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var a=0;a<r;a++)t[n+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),p=(n.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,a=[],s=0;s<r;s+=4)a.push(i);var l=o.create(a,r);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:h,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var g=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),m=(n.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(l)},parse:function(e){var t,n=l.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},y=r.SerializableCipher=i.extend({cfg:i.extend({format:m}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(n.kdf={}).OpenSSL={execute:function(e,t,n,r,i){if(r||(r=o.random(8)),i)a=c.create({keySize:t+n,hasher:i}).compute(e,r);else var a=c.create({keySize:t+n}).compute(e,r);var s=o.create(a.words.slice(t),4*n);return a.sigBytes=4*t,g.create({key:a,iv:s,salt:r})}},A=r.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:v}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=y.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,y.decrypt.call(this,e,t,i.key,r)}})}()))}(Yr)),function(){var e=t,n=e.lib.BlockCipher,r=e.algo,i=[],o=[],a=[],s=[],l=[],c=[],u=[],f=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],m=e[g],y=e[m],v=257*e[p]^16843008*p;a[n]=v<<24|v>>>8,s[n]=v<<16|v>>>16,l[n]=v<<8|v>>>24,c[n]=v,v=16843009*y^65537*m^257*g^16843008*n,u[p]=v<<24|v>>>8,f[p]=v<<16|v>>>16,d[p]=v<<8|v>>>24,h[p]=v,n?(n=g^e[e[e[y^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<n?o[a]=t[a]:(c=o[a-1],a%n?n>6&&a%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/n|0]<<24),o[a]=o[a-n]^c);for(var s=this._invKeySchedule=[],l=0;l<r;l++){if(a=r-l,l%4)var c=o[a];else c=o[a-4];s[l]=l<4||a<=4?c:u[i[c>>>24]]^f[i[c>>>16&255]]^d[i[c>>>8&255]]^h[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,f,d,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],f=e[t+2]^n[2],d=e[t+3]^n[3],h=4,p=1;p<l;p++){var g=r[c>>>24]^i[u>>>16&255]^o[f>>>8&255]^a[255&d]^n[h++],m=r[u>>>24]^i[f>>>16&255]^o[d>>>8&255]^a[255&c]^n[h++],y=r[f>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&u]^n[h++],v=r[d>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&f]^n[h++];c=g,u=m,f=y,d=v}g=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&d])^n[h++],m=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^n[h++],y=(s[f>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[h++],v=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[h++],e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=v},keySize:8});e.AES=n._createHelper(g)}(),t.AES)}(Sr);var Wr=Er(Sr.exports),Gr={exports:{}};!function(e){e.exports=Dr().enc.Utf8}(Gr);var Jr=Er(Gr.exports),_r={exports:{}};!function(e){e.exports=Dr().enc.Hex}(_r);var Xr=Er(_r.exports);function Kr(e,t,n=!1,r={}){let i=be(r,"returnWithStateAndMsg",null);Ie(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:"";if(!Fe(e))return o("invalid str");if(!Fe(t))return o("invalid key");Ie(n)||(n=!1);let a="";try{if(n){a=Wr.decrypt(e,t).toString(Jr)}else{let n=Xr.parse(e).toString(Qr);a=Wr.decrypt(n,t).toString(Jr)}}catch(e){return o(e.toString())}return""===a?o("can not decrypt str with key, or str is not a valid cipher text"):i?{state:"success",msg:a}:a}var Zr=function(){try{var e=J(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ei=Zr;function ti(e,t,n){"__proto__"==t&&ei?ei(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ni=Object.prototype.hasOwnProperty;function ri(e,t,n){var r=e[t];ni.call(e,t)&&ee(r,n)&&(void 0!==n||t in e)||ti(e,t,n)}function ii(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?ti(n,s,l):ri(n,s,l)}return n}var oi=Object.prototype.hasOwnProperty;function ai(e){if(!L(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=lt(e),n=[];for(var r in e)("constructor"!=r||!t&&oi.call(e,r))&&n.push(r);return n}function si(e){return ht(e)?at(e,!0):ai(e)}var li="object"==typeof e&&e&&!e.nodeType&&e,ci=li&&"object"==typeof module&&module&&!module.nodeType&&module,ui=ci&&ci.exports===li?w.Buffer:void 0,fi=ui?ui.allocUnsafe:void 0;function di(e,t){if(t)return e.slice();var n=e.length,r=fi?fi(n):new e.constructor(n);return e.copy(r),r}var hi=ct(Object.getPrototypeOf,Object),pi=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)kt(t,Qt(e)),e=hi(e);return t}:Nt;function gi(e){return Ft(e,si,pi)}var mi=Object.prototype.hasOwnProperty;function yi(e){var t=new e.constructor(e.byteLength);return new xt(t).set(new xt(e)),t}var vi=/\w*$/;var Ai=I?I.prototype:void 0,bi=Ai?Ai.valueOf:void 0;function wi(e,t){var n=t?yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ii(e,t,n){var r,i,o,a=e.constructor;switch(t){case"[object ArrayBuffer]":return yi(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return wi(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(o=new(i=e).constructor(i.source,vi.exec(i))).lastIndex=i.lastIndex,o;case"[object Symbol]":return r=e,bi?Object(bi.call(r)):{}}}var xi=Object.create,Ci=function(){function e(){}return function(t){if(!L(t))return{};if(xi)return xi(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Bi(e){return"function"!=typeof e.constructor||lt(e)?{}:Ci(hi(e))}var Ei=nt&&nt.isMap,Si=Ei?Ke(Ei):function(e){return D(e)&&"[object Map]"==Kt(e)};var ki=nt&&nt.isSet,Fi=ki?Ke(ki):function(e){return D(e)&&"[object Set]"==Kt(e)},Di="[object Arguments]",Ni="[object Function]",Mi="[object Object]",Ti={};function Qi(e,t,n,r,i,o){var a,s=1&t,l=2&t,c=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!L(e))return e;var u=v(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&mi.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Bn(e,a)}else{var f=Kt(e),d=f==Ni||"[object GeneratorFunction]"==f;if(We(e))return di(e,s);if(f==Mi||f==Di||d&&!i){if(a=l||d?{}:Bi(e),!s)return l?function(e,t){return ii(e,pi(e),t)}(e,function(e,t){return e&&ii(t,si(t),e)}(a,e)):function(e,t){return ii(e,Qt(e),t)}(e,function(e,t){return e&&ii(t,pt(t),e)}(a,e))}else{if(!Ti[f])return i?e:{};a=Ii(e,f,s)}}o||(o=new vt);var h=o.get(e);if(h)return h;o.set(e,a),Fi(e)?e.forEach(function(r){a.add(Qi(r,t,n,r,e,o))}):Si(e)&&e.forEach(function(r,i){a.set(i,Qi(r,t,n,i,e,o))});var p=u?void 0:(c?l?gi:Lt:l?si:pt)(e);return yn(p||e,function(r,i){p&&(r=e[i=r]),ri(a,i,Qi(r,t,n,i,e,o))}),a}Ti[Di]=Ti["[object Array]"]=Ti["[object ArrayBuffer]"]=Ti["[object DataView]"]=Ti["[object Boolean]"]=Ti["[object Date]"]=Ti["[object Float32Array]"]=Ti["[object Float64Array]"]=Ti["[object Int8Array]"]=Ti["[object Int16Array]"]=Ti["[object Int32Array]"]=Ti["[object Map]"]=Ti["[object Number]"]=Ti[Mi]=Ti["[object RegExp]"]=Ti["[object Set]"]=Ti["[object String]"]=Ti["[object Symbol]"]=Ti["[object Uint8Array]"]=Ti["[object Uint8ClampedArray]"]=Ti["[object Uint16Array]"]=Ti["[object Uint32Array]"]=!0,Ti["[object Error]"]=Ti[Ni]=Ti["[object WeakMap]"]=!1;function Li(e){return Qi(e,5)}let Ri=2147483647;var Ui={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],f=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),f){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,a),!0}for(c=1,l=new Array(f-1);c<f;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var d,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),f){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!l)for(d=1,l=new Array(f-1);d<f;d++)l[d-1]=arguments[d];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(Ui);var Hi=Er(Ui.exports);function qi(){return new Hi}function Oi(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function Pi(e,t,n=[],r={}){let i=r.funSettle,o=r.tag||"evem",a=(t,...n)=>e.emit(t,...n);Oi(r.funEmit)&&(a=r.funEmit);try{return a(t,...n)}catch(r){if(Oi(i))try{i(r)}catch(e){}try{"error"!==t&&e.listenerCount("error")>0?a("error",{fun:"listener",name:t,msg:r,args:n}):console.error(`[wsemi ${o}] listener of '${String(t)}' threw:`,r)}catch(e){try{console.error(`[wsemi ${o}] listener of '${String(t)}' threw, and reporting it also threw:`,e,r)}catch(e){}}return!1}}var $i=w.isFinite,zi=Math.min;function ji(e){var t=Math[e];return function(e,n){if(e=Ar(e),(n=null==n?0:zi(Ir(n),292))&&$i(e)){var r=(me(e)+"e").split("e");return+((r=(me(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vi=ji("round");function Yi(e,t={}){let n=be(t,"useClampSafe",null);Ie(n)||(n=!1);let r=be(t,"useLimitSafe",null);Ie(r)||(r=!1);let i=be(t,"returnWithStateAndMsg",null);Ie(i)||(i=!1);let o=e=>i?{state:"success",msg:e}:e,a=e=>{if(i)return{state:"error",msg:e};throw new Error(e)};if(!Me(e))return o(0);let s=null;try{e=xr(e),s=Vi(e),n&&(s>Number.MAX_SAFE_INTEGER?s=Number.MAX_SAFE_INTEGER:s<Number.MIN_SAFE_INTEGER&&(s=Number.MIN_SAFE_INTEGER))}catch(e){return a(e.toString())}return r&&!Number.isSafeInteger(Number(s))?a(`v[${e}] is not a safe integer`):("0"===String(s)&&(s=0),o(s))}function Wi(e,t={}){if(!Cr(e,t))return!1;return Yi(e)>0}function Gi(e,t){return function(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var s=r<o?t[r]:void 0;n(a,e[r],s)}return a}(e||[],t||[],ri)}function Ji(e,t){if(!Be(e))return[];if(!Be(t))return[];if(ar(e)!==ar(t))return[];let n=[];return An(e,function(r,i){let o=null,a=Me(e[i]),s=Me(t[i]);(a||s)&&(o=0),a&&(o+=xr(e[i])),s&&(o+=xr(t[i])),n.push(o)}),n}var _i=Math.ceil,Xi=Math.max;var Ki=function(e){return function(t,n,r){return r&&"number"!=typeof r&&gn(t,n,r)&&(n=r=void 0),t=wr(t),void 0===n?(n=t,t=0):n=wr(n),function(e,t,n,r){for(var i=-1,o=Xi(_i((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,r=void 0===r?t<n?1:-1:wr(r),e)}}(),Zi=Ki;function eo(e,t){for(var n=-1,r=t.length,i=Array(r),o=null==e;++n<r;)i[n]=o?void 0:be(e,t[n]);return i}function to(e){return(null==e?0:e.length)?Cn(e,1):[]}var no=Math.max;function ro(e,t,n){return t=no(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=no(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}function io(e){return function(){return e}}var oo=ei?function(e,t){return ei(e,"toString",{configurable:!0,enumerable:!1,value:io(t),writable:!0})}:fn,ao=oo,so=Date.now;var lo,co,uo,fo=(lo=ao,co=0,uo=0,function(){var e=so(),t=16-(e-uo);if(uo=e,t>0){if(++co>=800)return arguments[0]}else co=0;return lo.apply(void 0,arguments)}),ho=fo;function po(e){return ho(ro(e,void 0,to),e+"")}var go=po(eo);function mo(e,t={}){if(!Cr(e,t))return!1;return Yi(e)>=0}function yo(e,t,n=null){if(!Tn(e))return[];if(!mo(t))return[];let r;if(t=Yi(t),Mn(n)){if(t>=e.length)return[];r=go(e,t)}else{if(!mo(n))return[];if(n=Yi(n),t>=e.length||n>=e.length)return[];let i=Zi(t,n+1);r=go(e,i)}return r}var vo=Array.prototype.join;function Ao(e,t){return null==e?"":vo.call(e,t)}function bo(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function wo(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:bo(e,t,n)}var Io=nt&&nt.isRegExp,xo=Io?Ke(Io):function(e){return D(e)&&"[object RegExp]"==F(e)};var Co="\\ud800-\\udfff",Bo="["+Co+"]",Eo="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",So="\\ud83c[\\udffb-\\udfff]",ko="[^"+Co+"]",Fo="(?:\\ud83c[\\udde6-\\uddff]){2}",Do="[\\ud800-\\udbff][\\udc00-\\udfff]",No="(?:"+Eo+"|"+So+")"+"?",Mo="[\\ufe0e\\ufe0f]?",To=Mo+No+("(?:\\u200d(?:"+[ko,Fo,Do].join("|")+")"+Mo+No+")*"),Qo="(?:"+[ko+Eo+"?",Eo,Fo,Do,Bo].join("|")+")",Lo=RegExp(So+"(?="+So+")|"+Qo+To,"g");function Ro(e){return Yn(e)?function(e){return e.match(Lo)||[]}(e):function(e){return e.split("")}(e)}function Uo(e,t,n){return n&&"number"!=typeof n&&gn(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=me(e))&&("string"==typeof t||null!=t&&!xo(t))&&!(t=ge(t))&&Yn(e)?wo(Ro(e),0,n):e.split(t,n):[]}function Ho(e,t,n){var r=null==e?0:e.length;return r?bo(e,0,(t=r-(t=n||void 0===t?1:Ir(t)))<0?0:t):[]}let qo=class{diff(e,t,n={}){let r;"function"==typeof n?(r=n,n={}):"callback"in n&&(r=n.callback);const i=this.castInput(e,n),o=this.castInput(t,n),a=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(a,s,n,r)}diffWithOptionsObj(e,t,n,r){var i;const o=e=>(e=this.postProcess(e,n),r?void setTimeout(function(){r(e)},0):e),a=t.length,s=e.length;let l=1,c=a+s;null!=n.maxEditLength&&(c=Math.min(c,n.maxEditLength));const u=null!==(i=n.timeout)&&void 0!==i?i:1/0,f=Date.now()+u,d=[{oldPos:-1,lastComponent:void 0}];let h=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=s&&h+1>=a)return o(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,g=1/0;const m=()=>{for(let r=Math.max(p,-l);r<=Math.min(g,l);r+=2){let i;const l=d[r-1],c=d[r+1];l&&(d[r-1]=void 0);let u=!1;if(c){const e=c.oldPos-r;u=c&&0<=e&&e<a}const f=l&&l.oldPos+1<s;if(u||f){if(i=!f||u&&l.oldPos<c.oldPos?this.addToPath(c,!0,!1,0,n):this.addToPath(l,!1,!0,1,n),h=this.extractCommon(i,t,e,r,n),i.oldPos+1>=s&&h+1>=a)return o(this.buildValues(i.lastComponent,t,e))||!0;d[r]=i,i.oldPos+1>=s&&(g=Math.min(g,r-1)),h+1>=a&&(p=Math.max(p,r+1))}else d[r]=void 0}l++};if(r)!function e(){setTimeout(function(){if(l>c||Date.now()>f)return r(void 0);m()||e()},0)}();else for(;l<=c&&Date.now()<=f;){const e=m();if(e)return e}}addToPath(e,t,n,r,i){const o=e.lastComponent;return o&&!i.oneChangePerToken&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}}extractCommon(e,t,n,r,i){const o=t.length,a=n.length;let s=e.oldPos,l=s-r,c=0;for(;l+1<o&&s+1<a&&this.equals(n[s+1],t[l+1],i);)l++,s++,c++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return c&&!i.oneChangePerToken&&(e.lastComponent={count:c,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const r=[];let i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();const o=r.length;let a=0,s=0,l=0;for(;a<o;a++){const e=r[a];if(e.removed)e.value=this.join(n.slice(l,l+e.count)),l+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){const r=n[l+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(l+=e.count)}}return r}};const Oo=new class extends qo{constructor(){super(...arguments),this.tokenize=$o}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes("\n")||(e=e.trim()),n.newlineIsToken&&t.includes("\n")||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith("\n")&&(e=e.slice(0,-1)),t.endsWith("\n")&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function Po(e,t,n){return Oo.diff(e,t,n)}function $o(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,"\n"));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){const i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function zo(e){if(!function(e){for(let t=0;t<e.length;t++)if(e[t]<" "||e[t]>"~"||'"'===e[t]||"\\"===e[t])return!0;return!1}(e))return e;let t='"';const n=(new TextEncoder).encode(e);let r=0;for(;r<n.length;){const e=n[r];t+=7===e?"\\a":8===e?"\\b":9===e?"\\t":10===e?"\\n":11===e?"\\v":12===e?"\\f":13===e?"\\r":34===e?'\\"':92===e?"\\\\":e>=32&&e<=126?String.fromCharCode(e):"\\"+e.toString(8).padStart(3,"0"),r++}return t+='"',t}const jo={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function Vo(e,t,n,r,i,o,a){let s;s=a?"function"==typeof a?{callback:a}:a:{},void 0===s.context&&(s.context=4);const l=s.context;if(s.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(!s.callback)return c(Po(n,r,s));{const{callback:e}=s;Po(n,r,Object.assign(Object.assign({},s),{callback:t=>{const n=c(t);e(n)}}))}function c(n){if(!n)return;function r(e){return e.map(function(e){return" "+e})}n.push({value:"",lines:[]});const a=[];let s=0,c=0,u=[],f=1,d=1;for(let e=0;e<n.length;e++){const t=n[e],i=t.lines||Go(t.value);if(t.lines=i,t.added||t.removed){if(!s){const t=n[e-1];s=f,c=d,t&&(u=l>0?r(t.lines.slice(-l)):[],s-=u.length,c-=u.length)}for(const e of i)u.push((t.added?"+":"-")+e);t.added?d+=i.length:f+=i.length}else{if(s)if(i.length<=2*l&&e<n.length-2)for(const e of r(i))u.push(e);else{const e=Math.min(i.length,l);for(const t of r(i.slice(0,e)))u.push(t);const t={oldStart:s,oldLines:f-s+e,newStart:c,newLines:d-c+e,lines:u};a.push(t),s=0,c=0,u=[]}f+=i.length,d+=i.length}}for(const e of a)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith("\n")?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,"\"),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:o,hunks:a}}}function Yo(e,t){var n,r,i,o,a,s;if(t||(t=jo),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(e=>Yo(e,t)).join("\n")}const l=[];if(e.isGit){if(t=jo,!e.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!e.newFileName)throw new Error("newFileName must be specified for Git patches");let c=e.oldFileName,u=e.newFileName;e.isCreate&&"/dev/null"===c?c=u.replace(/^b\//,"a/"):e.isDelete&&"/dev/null"===u&&(u=c.replace(/^a\//,"b/")),l.push("diff --git "+zo(c)+" "+zo(u)),e.isDelete&&l.push("deleted file mode "+(null!==(n=e.oldMode)&&void 0!==n?n:"100644")),e.isCreate&&l.push("new file mode "+(null!==(r=e.newMode)&&void 0!==r?r:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(l.push("old mode "+e.oldMode),l.push("new mode "+e.newMode)),e.isRename&&(l.push("rename from "+zo((null!==(i=e.oldFileName)&&void 0!==i?i:"").replace(/^a\//,""))),l.push("rename to "+zo((null!==(o=e.newFileName)&&void 0!==o?o:"").replace(/^b\//,"")))),e.isCopy&&(l.push("copy from "+zo((null!==(a=e.oldFileName)&&void 0!==a?a:"").replace(/^a\//,""))),l.push("copy to "+zo((null!==(s=e.newFileName)&&void 0!==s?s:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&void 0!==e.oldFileName&&l.push("Index: "+e.oldFileName),t.includeUnderline&&l.push("===================================================================");const c=e.hunks.length>0;!t.includeFileHeaders||void 0===e.oldFileName||void 0===e.newFileName||e.isGit&&!c||(l.push("--- "+zo(e.oldFileName)+(e.oldHeader?"\t"+e.oldHeader:"")),l.push("+++ "+zo(e.newFileName)+(e.newHeader?"\t"+e.newHeader:"")));for(let t=0;t<e.hunks.length;t++){const n=e.hunks[t],r=0===n.oldLines?n.oldStart-1:n.oldStart,i=0===n.newLines?n.newStart-1:n.newStart;l.push("@@ -"+r+","+n.oldLines+" +"+i+","+n.newLines+" @@");for(const e of n.lines)l.push(e)}return l.join("\n")+"\n"}function Wo(e,t,n,r,i,o,a){if("function"==typeof a&&(a={callback:a}),!(null==a?void 0:a.callback)){const s=Vo(e,t,n,r,i,o,a);if(!s)return;return Yo(s,null==a?void 0:a.headerOptions)}{const{callback:s}=a;Vo(e,t,n,r,i,o,Object.assign(Object.assign({},a),{callback:e=>{s(e?Yo(e,a.headerOptions):void 0)}}))}}function Go(e){const t=e.endsWith("\n"),n=e.split("\n").map(e=>e+"\n");return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Jo(e,t,n){return e&&e.length?bo(e,0,(t=n||void 0===t?1:Ir(t))<0?0:t):[]}function _o(e,t,n={}){if(!ke(e))return{};if(!ke(t))return{};if(""===e&&""===t)return{};let r=be(n,"useNormNewline");Ie(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,o=Po(e,t),a=ar(o),s=[],l=[];for(i=-1;i++,!(i>a-1);){let e=o[i],t=be(e,"count",0),n=be(e,"removed",!1),r=be(e,"added",!1),a=Uo(be(e,"value",""),"\n");a=Jo(a,t);for(let e=1;e<=t;e++){let t=a[e-1];n||r?n&&!r?(s.push({p:"remove",v:t}),l.push({p:"empty",v:""})):!n&&r&&(s.push({p:"empty",v:""}),l.push({p:"add",v:t})):(s.push({p:"",v:t}),l.push({p:"",v:t}))}}let c=ar(s);for(i=-1;i++,!(i>c-1);){let e=be(s,i,null),t=be(l,i,null),n=be(e,"p",""),r=be(t,"p","");if("remove"===n&&"empty"===r){let e=0,t=i,n=-1;for(let t=i;t<=c-1;t++){let r=be(s,t,null),i=be(l,t,null),o=be(r,"p",""),a=be(i,"p","");if("remove"!==o||"empty"!==a)break;e++,n=t}if(e<=0)continue;let r=0,o=!1,a=-1;for(let t=i;t<=n+e;t++){let e=be(s,t,null),n=be(l,t,null),i=be(e,"p",""),c=be(n,"p","");if("empty"===i&&"add"===c)o||(a=t),o=!0,r++;else if(o)break}if(r<=0)continue;let u=Math.min(e,r);if(u>=1){for(let e=0;e<=u-1;e++){let n=t+e,r=a+e;s[n]={p:"modify",vo:be(s,`${n}.v`,""),vn:be(l,`${r}.v`,"")},l[n]=null,s[r]=null,l[r]=null}i+=u+1}}}let u=[];for(i=-1;i++,!(i>c-1);){let e=be(s,i,null),t=be(l,i,null),n=be(e,"p",""),r=be(t,"p",""),o=be(e,"v",""),a=be(t,"v","");if(null===e&&null===t)continue;let c="",f=o,d="";"modify"===n?(c="modify",f=e.vo,d=e.vn):"remove"===n&&"empty"===r?(c="remove",f=o,d=""):"empty"===n&&"add"===r&&(c="add",f=a,d=""),u.push({p:c,vo:f,vn:d})}return{diff:o,dfs:u}}let Xo="\n";function Ko(e,t){if(!Be(e))return{};if(!Be(t))return{};let n=wn(e,e=>`${e}${Xo}`);n=Ao(n,"");let r=wn(t,e=>`${e}${Xo}`);r=Ao(r,"");let i=_o(n,r,{eliminateEndLine:!0});return i.dfs=wn(i.dfs,(e,t)=>({p:e.p,k:t,vo:e.vo,vn:e.vn})),i}function Zo(e,t,n={}){if(!Be(e))return{};if(!Be(t))return{};if(0===ar(e)&&0===ar(t))return{};let r,i=be(n,"mode","");return"array"!==i&&"matrix"!==i&&(i="array"),"array"===i?r=Ko(e,t):"matrix"===i&&(r=function(e,t,n={}){if(!Be(e))return{};if(!Be(t))return{};let r=be(n,"dls","");Fe(r)||(r="⟋");let i=be(n,"dlq","");Fe(i)||(i="∶");let o=[];An(e,(t,n)=>{if(!Be(t))throw console.log("arrOld",e),console.log(n,t),new Error("arrOld is not a matrix");An(t,(e,t)=>{o.push(`${t}${i}${e}${r}`)}),o.push(Xo)}),o=Ao(o,"");let a=[];An(t,(e,n)=>{if(!Be(e))throw console.log("arrNew",t),console.log(n,e),new Error("arrNew is not a matrix");An(e,(e,t)=>{a.push(`${t}${i}${e}${r}`)}),a.push(Xo)}),a=Ao(a,"");let s=_o(o,a,{...n,eliminateEndLine:!0}),l=[];return An(s.dfs,e=>{let t=Uo(e.vo,r);if(t=Ho(t,1),"modify"===e.p){let n=Uo(e.vn,r);n=Ho(n,1);let i=Ko(t,n);e.dfs=i.dfs}let n=[];"modify"===e.p?An(e.dfs,e=>{n.push(e)}):An(t,t=>{n.push({p:e.p,vo:t,vn:""})}),n=wn(n,(e,t)=>{let n=be(Uo(e.vo,i),1,""),r=be(Uo(e.vn,i),1,"");return{p:e.p,k:t,vo:n,vn:r}}),l.push(n)}),{diff:s.diff,dfs:l}}(e,t,n)),r}function ea(e,t,n){if((e=me(e))&&(n||void 0===t))return pr(e);if(!e||!(t=ge(t)))return e;var r=Ro(e),i=Ro(t),o=function(e,t){for(var n=-1,r=e.length;++n<r&&Rn(t,e[n],0)>-1;);return n}(r,i),a=function(e,t){for(var n=e.length;n--&&Rn(t,e[n],0)>-1;);return n}(r,i)+1;return wo(r,o,a).join("")}function ta(e,t){if(!Fe(e))return[];if(!Fe(t))return[];return e.split(t)}function na(e,t){if(!Fe(e))return[];if(!Fe(t))return[];let n=ta(e,t);n=wn(n,ea);let r=[];return An(n,function(e){Fe(e)&&r.push(e)}),r}function ra(e,t){return Fe(e)&&mo(t)?0===(t=Yi(t))?"":e.substring(0,t):""}function ia(e,t){if(!Fe(e))return"";if(!mo(t))return"";if(0===(t=Yi(t)))return"";let n=e.length-t;return n<0&&(n=0),e.substring(n,n+t)}function oa(e,t){return Fe(e)&&mo(t)?0===(t=Yi(t))?e:ia(e,e.length-t):""}function aa(e,t){var n=[];return mt(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function sa(e,t){return(v(e)?Dt:aa)(e,pn(t))}function la(e){if(!Me(e))return!1;return xr(e)>0}function ca(e){return Tn(e)?e=wn(e=sa(e=Li(e),la),xr):[]}function ua(e,t){return on(e,t)}function fa(e){return"number"==typeof e||D(e)&&"[object Number]"==F(e)}function da(e,t){function n(e){return Be(e)?e:[e]}if(Mn(e))return!1;if(0===(e=n(e)).length)return!1;if(Mn(e))return!1;if(0===(t=n(t)).length)return!1;for(let n=0;n<e.length;n++)for(let r=0;r<t.length;r++)if(ua(e[n],t[r]))return!0;return!1}function ha(e,t,n={}){if(!Tn(e))return null;if(!Oi(t))return null;let r=be(n,"returnIndex");Ie(r)||(r=!1);let i=-1,o=null;for(let n=0;n<ar(e);n++){let r=t(o,e[n]);ua(o,r)||(o=r,i=n)}let a=null;return a=r?i:o,a}function pa(e,t){if(!Be(e))return[];if(!Be(t))return[];if(ar(e)!==ar(t))return[];let n=[];return An(e,function(r,i){let o=null,a=Me(e[i]),s=Me(t[i]);(a||s)&&(o=1),a&&(o*=xr(e[i])),s&&(o*=xr(t[i])),n.push(o)}),n}function ga(){if(ar(arguments)<2)return[];let e=arguments[0];for(let t=1;t<ar(arguments);t++){e=pa(e,arguments[t])}return e}function ma(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function ya(){if(ar(arguments)<2)return null;let e=ga(...arguments);return 0===ar(e)?null:(e=(t=e)&&t.length?ma(t,fn):0,e);var t}function va(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}var Aa=Array.prototype.splice;function ba(e,t){return e&&e.length&&t&&t.length?function(e,t,n,r){var i=r?va:Rn,o=-1,a=t.length,s=e;for(e===t&&(t=Bn(t)),n&&(s=de(e,Ke(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&Aa.call(s,l,1),Aa.call(e,l,1);return e}(e,t):e}function wa(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Ia=Object.prototype.hasOwnProperty;function xa(e,t){var n=-1,r=(t=ye(t,e)).length;if(!r)return!0;for(;++n<r;){var i=ve(t[n]);if("__proto__"===i&&!Ia.call(e,"__proto__"))return!1;if(("constructor"===i||"prototype"===i)&&n<r-1)return!1}var o=function(e,t){return t.length<2?e:Ae(e,bo(t,0,-1))}(e,t);return null==o||delete o[ve(wa(t))]}var Ca=Array.prototype.splice;function Ba(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=N(e),a=void 0!==t,s=null===t,l=t==t,c=N(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}var Ea=po(function(e,t){var n=null==e?0:e.length,r=eo(e,t);return function(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Je(i)?Ca.call(e,i,1):xa(e,i)}}}(e,de(t,function(e){return Je(e,n)?+e:e}).sort(Ba)),r});var Sa=Array.prototype.reverse;function ka(e){return null==e?e:Sa.call(e)}function Fa(e,t,n){t=t.length?de(t,function(e){return v(e)?function(t){return Ae(t,1===e.length?e[0]:e)}:e}):[fn];var r=-1;return t=de(t,Ke(pn)),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(bn(e,function(e,n,i){return{criteria:de(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=Ba(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Da(e,t){return ho(ro(e,t,fn),e+"")}var Na=Da(function(e,t){if(null==e)return[];var n=t.length;return n>1&&gn(e,t[0],t[1])?t=[]:n>2&&gn(t[0],t[1],t[2])&&(t=[t[0]]),Fa(e,Cn(t,1),[])});function Ma(e){return"[object BigInt]"===Object.prototype.toString.call(e)}function Ta(e){if(!(Fe(e)||Me(e)||N(e)||Ma(e)))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}function Qa(e,t,n){var r=null==e?0:e.length;return r?bo(e,(t=n||void 0===t?1:Ir(t))<0?0:t,r):[]}function La(e,t){return Fe(e)&&mo(t)?0===(t=Yi(t))?e:ra(e,e.length-t):""}function Ra(e,t={}){let n=be(t,"excludeString");if(Ie(n)||(n=!1),!Fe(e))return"";let r=e=>e>="0"&&e<="9"||"."===e||"-"===e||"+"===e,i=ea(e);if(n){let e=i.split("");for(let t=0;t<e.length;t++)if(r(e[t])){i=oa(i,t),e=Qa(e,t);break}e=ka(e);for(let t=0;t<e.length;t++)if(r(e[t])){i=La(i,t);break}}return i}function Ua(e){let t=0,n=0,r=0,i=ar(e);An(e,e=>{Me(e)?t+=1:ke(e)?n+=1:Ee(e)&&(r+=1)});let o="";return t===i?o="num":n===i?o="str":r===i?o="obj":t+n===i?o="str":console.log("eles in array are non-homogeneous",e),o}function Ha(e,t,n={}){let r=[];if("num"!==t&&"str"!==t&&"files"!==t)throw new Error(`invalid type[${t}]`);if("num"===t)r=wn(e,(e,t)=>({key:t,payload:e,value:xr(e)}));else if("files"===t)r=wn(e,(e,t)=>({key:t,payload:e,value:Ta(e)}));else if("str"===t){let t=wn(e,e=>Ra(e,{excludeString:!0})),n=0;An(t,e=>{Me(e)&&n++});let i=n===ar(t);r=wn(e,(e,n)=>{let r=e;return i?(r=t[n],r=xr(r)):r=Ta(r),{key:n,payload:e,value:r}})}return r}function qa(e,t){let n=Na(e,"value");return wn(n,t?"key":"payload")}function Oa(e,t){let n=function(e,t){let n=Li(e);return n.sort((e,n)=>e[t].localeCompare(n[t],"standard",{numeric:!0})),n}(e,"value");return wn(n,t?"key":"payload")}function Pa(e,t={}){if(!Tn(e))return[];if(1===ar(e))return e;let n=be(t,"localeCompare");Ie(n)||(n=!1);let r=be(t,"returnIndex");Ie(r)||(r=!1);let i=be(t,"compareKey",null),o=null;o=n?Oa:qa;let a,s=Ua(e);if(""===s)return[];if("obj"===s){if(!Fe(i))return[];let s=wn(e,(e,t)=>be(e,i,"")),l=Ua(s);if("num"!==l&&"str"!==l)return[];{n&&(l="files");let i=o(Ha(s,l,t),!0);a=r?i:wn(i,t=>e[t])}}else if("num"===s||"str"===s){n&&(s="files"),a=o(Ha(e,s,t),r)}return a}function $a(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!Fe(e))return r("invalid b64");let i="";try{i=Qr.parse(e).toString(Jr)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function za(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:{};if(!Fe(e))return r("invalid v");let i={};try{i=JSON.parse(e)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}let ja=/[\t\n\f\r ]/g,Va=/^[A-Za-z0-9+/]*={0,2}$/,Ya=/=+$/;function Wa(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!ke(e))return r("invalid b64");let i=e.replace(ja,"");if(!Va.test(i))return r("invalid b64, contains characters outside the base64 alphabet or misplaced padding");let o=i.length-i.replace(Ya,"").length,a=(i.length-o)%4;if(0===o&&1===a)return r(`invalid b64, the last chunk has only 1 character[${i.length}]`);if(1===o&&3!==a)return r("invalid b64, malformed padding, 1 padding requires the last chunk to have 3 characters");if(2===o&&2!==a)return r("invalid b64, malformed padding, 2 paddings require the last chunk to have 2 characters");let s=null;try{let e=Qr.parse(i),t=e.words,n=e.sigBytes;s=new Uint8Array(n);for(let e=0;e<n;e++){let n=t[e>>>2]>>>24-e%4*8&255;s[e]=n}}catch(e){return r(e.toString())}return n?{state:"success",msg:s}:s}function Ga(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint16Array;if(!ke(e))return r("invalid b64");let i=null;try{let t=Wa(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`b642u8arr: ${t.msg}`);let n=t.msg;if(n.byteLength%2!=0)return r(`byteLength[${n.byteLength}] is not even, can not be restored to Uint16Array`);let o=0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n:new Uint8Array(n);i=new Uint16Array(o.buffer)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function Ja(e,t,n="anyone"){if(!Fe(e))return!1;if("anyone"!==n&&"all"!==n)return!1;if(ke(t)){if(!Fe(t))return!1;t=[t]}if(!Tn(t))return!1;let r=!1;if(An(t,function(e){Fe(e)||(r=!0)}),r)return!1;let i=0;return An(t,function(t){-1!==function(e,t){return e.indexOf(t)}(e,t)&&i++}),"anyone"===n?i>0:"all"===n&&i===t.length}function _a(){let e,t,n=new Promise(function(){e=arguments[0],t=arguments[1]});return n.resolve=e,n.reject=t,n}function Xa(e){return"[object Blob]"===Object.prototype.toString.call(e)}function Ka(){return"undefined"!=typeof window&&void 0!==window.document}function Za(e){if(!Xa(e))return Promise.reject("invalid bb");if(!Ka())return Promise.reject("no window");try{return function(e){return e.arrayBuffer()}(e)}catch(t){return function(e){let t=_a();try{let n=new FileReader;n.onload=function(){let e=n.result;t.resolve(e)},n.onerror=function(e){t.reject(e)},n.readAsArrayBuffer(e)}catch(e){t.reject(e)}return t}(e)}}function es(e){if(!Xa(e))return Promise.reject("invalid bb");if(!Ka())return Promise.reject("no window");let t=_a();try{let n=new FileReader;n.onload=function(){t.resolve(n.result)},n.onerror=function(e){t.reject(e)},n.readAsDataURL(e)}catch(e){t.reject(e)}return t}function ts(e){let t=_a();return Za(e).then(e=>{let n=new Uint8Array(e);t.resolve(n)}).catch(e=>{t.reject(e)}),t}function ns(e){if(!Be(e))return Promise.reject("invalid bbs");if(0===e.length)return Promise.resolve([]);let t=wn(e,function(e){return es(e)});return Promise.all(t)}function rs(e){if(!Be(e))return Promise.reject("invalid bbs");if(0===e.length)return Promise.resolve([]);let t=wn(e,function(e){return ts(e)});return Promise.all(t)}var is={exports:{}};
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("dayjs"),require("xss"),require("child_process"),require("tree-kill"),require("path"),require("fs"),require("url"),require("readline"),require("stream"),require("stream/promises"),require("chokidar"),require("crypto"),require("events"),require("ua-parser-js"),require("html-to-text")):"function"==typeof define&&define.amd?define(["exports","dayjs","xss","child_process","tree-kill","path","fs","url","readline","stream","stream/promises","chokidar","crypto","events","ua-parser-js","html-to-text"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wsemi={},e.dayjs,e.filterXSS,e.child_process,e.treeKill,e.path,e.fs,e.url,e.readline,e.stream,e.streamPromises,e.chokidar,e.crypto,e.events,e.UAParser,e["html-to-text"])}(this,function(e,t,n,r,i,o,a,s,l,c,u,f,d,h,p,g){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var y=m(g),v=Array.isArray,A="object"==typeof global&&global&&global.Object===Object&&global,b="object"==typeof self&&self&&self.Object===Object&&self,w=A||b||Function("return this")(),I=w.Symbol,x=Object.prototype,C=x.hasOwnProperty,B=x.toString,E=I?I.toStringTag:void 0;var S=Object.prototype.toString;var k=I?I.toStringTag:void 0;function F(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":k&&k in Object(e)?function(e){var t=C.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var i=B.call(e);return r&&(t?e[E]=n:delete e[E]),i}(e):function(e){return S.call(e)}(e)}function D(e){return null!=e&&"object"==typeof e}function N(e){return"symbol"==typeof e||D(e)&&"[object Symbol]"==F(e)}var M=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/;function Q(e,t){if(v(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!N(e))||(T.test(e)||!M.test(e)||null!=t&&e in Object(t))}function L(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function R(e){if(!L(e))return!1;var t=F(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var U,H=w["__core-js_shared__"],q=(U=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"";var O=Function.prototype.toString;function P(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var $=/^\[object .+?Constructor\]$/,z=Function.prototype,j=Object.prototype,V=z.toString,Y=j.hasOwnProperty,W=RegExp("^"+V.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function G(e){return!(!L(e)||(t=e,q&&q in t))&&(R(e)?W:$).test(P(e));var t}function J(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return G(n)?n:void 0}var _=J(Object,"create");var X=Object.prototype.hasOwnProperty;var K=Object.prototype.hasOwnProperty;function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ee(e,t){return e===t||e!=e&&t!=t}function te(e,t){for(var n=e.length;n--;)if(ee(e[n][0],t))return n;return-1}Z.prototype.clear=function(){this.__data__=_?_(null):{},this.size=0},Z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Z.prototype.get=function(e){var t=this.__data__;if(_){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return X.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return _?void 0!==t[e]:K.call(t,e)},Z.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_&&void 0===t?"__lodash_hash_undefined__":t,this};var ne=Array.prototype.splice;function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}re.prototype.clear=function(){this.__data__=[],this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=te(t,e);return!(n<0)&&(n==t.length-1?t.pop():ne.call(t,n,1),--this.size,!0)},re.prototype.get=function(e){var t=this.__data__,n=te(t,e);return n<0?void 0:t[n][1]},re.prototype.has=function(e){return te(this.__data__,e)>-1},re.prototype.set=function(e,t){var n=this.__data__,r=te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ie=J(w,"Map");function oe(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ae.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(ie||re),string:new Z}},ae.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},ae.prototype.get=function(e){return oe(this,e).get(e)},ae.prototype.has=function(e){return oe(this,e).has(e)},ae.prototype.set=function(e,t){var n=oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function se(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(se.Cache||ae),n}se.Cache=ae;var le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/\\(\\)?/g,ue=function(e){var t=se(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(le,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t}),fe=ue;function de(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var he=I?I.prototype:void 0,pe=he?he.toString:void 0;function ge(e){if("string"==typeof e)return e;if(v(e))return de(e,ge)+"";if(N(e))return pe?pe.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function me(e){return null==e?"":ge(e)}function ye(e,t){return v(e)?e:Q(e,t)?[e]:fe(me(e))}function ve(e){if("string"==typeof e||N(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ae(e,t){for(var n=0,r=(t=ye(t,e)).length;null!=e&&n<r;)e=e[ve(t[n++])];return n&&n==r?e:void 0}function be(e,t,n){var r=null==e?void 0:Ae(e,t);return void 0===r?n:r}function we(e){return!0===e||!1===e||D(e)&&"[object Boolean]"==F(e)}function Ie(e){return we(e)}function xe(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}function Ce(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!xe(e))return r("invalid ab");let i=null;try{i=new Uint8Array(e)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function Be(e){return"[object Array]"===Object.prototype.toString.call(e)}function Ee(e){return"[object Object]"===Object.prototype.toString.call(e)}function Se(e){if(Ee(e)){for(let t in e)return!0;return!1}return!1}function ke(e){return"[object String]"===Object.prototype.toString.call(e)}function Fe(e){return!(!ke(e)||""===e)}function De(e){return"[object Number]"===Object.prototype.toString.call(e)}function Ne(e){return e!=e}function Me(e){let t=!1;if(Fe(e))t=!isNaN(Number(e));else if(De(e)){if(Ne(e))return!1;t=!0}return t}function Te(e,t){return!!Ee(e)&&(!(!Fe(t)&&!Me(t))&&t in e)}function Qe(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var Le,Re=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[Le?a:++r];if(!1===t(i[s],s,i))break}return e};function Ue(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function He(e){return D(e)&&"[object Arguments]"==F(e)}var qe=Object.prototype,Oe=qe.hasOwnProperty,Pe=qe.propertyIsEnumerable,$e=He(function(){return arguments}())?He:function(e){return D(e)&&Oe.call(e,"callee")&&!Pe.call(e,"callee")},ze=$e;var je="object"==typeof e&&e&&!e.nodeType&&e,Ve=je&&"object"==typeof module&&module&&!module.nodeType&&module,Ye=Ve&&Ve.exports===je?w.Buffer:void 0,We=(Ye?Ye.isBuffer:void 0)||function(){return!1},Ge=/^(?:0|[1-9]\d*)$/;function Je(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function _e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var Xe={};function Ke(e){return function(t){return e(t)}}Xe["[object Float32Array]"]=Xe["[object Float64Array]"]=Xe["[object Int8Array]"]=Xe["[object Int16Array]"]=Xe["[object Int32Array]"]=Xe["[object Uint8Array]"]=Xe["[object Uint8ClampedArray]"]=Xe["[object Uint16Array]"]=Xe["[object Uint32Array]"]=!0,Xe["[object Arguments]"]=Xe["[object Array]"]=Xe["[object ArrayBuffer]"]=Xe["[object Boolean]"]=Xe["[object DataView]"]=Xe["[object Date]"]=Xe["[object Error]"]=Xe["[object Function]"]=Xe["[object Map]"]=Xe["[object Number]"]=Xe["[object Object]"]=Xe["[object RegExp]"]=Xe["[object Set]"]=Xe["[object String]"]=Xe["[object WeakMap]"]=!1;var Ze="object"==typeof e&&e&&!e.nodeType&&e,et=Ze&&"object"==typeof module&&module&&!module.nodeType&&module,tt=et&&et.exports===Ze&&A.process,nt=function(){try{var e=et&&et.require&&et.require("util").types;return e||tt&&tt.binding&&tt.binding("util")}catch(e){}}(),rt=nt&&nt.isTypedArray,it=rt?Ke(rt):function(e){return D(e)&&_e(e.length)&&!!Xe[F(e)]},ot=Object.prototype.hasOwnProperty;function at(e,t){var n=v(e),r=!n&&ze(e),i=!n&&!r&&We(e),o=!n&&!r&&!i&&it(e),a=n||r||i||o,s=a?Ue(e.length,String):[],l=s.length;for(var c in e)!t&&!ot.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Je(c,l))||s.push(c);return s}var st=Object.prototype;function lt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||st)}function ct(e,t){return function(n){return e(t(n))}}var ut=ct(Object.keys,Object),ft=Object.prototype.hasOwnProperty;function dt(e){if(!lt(e))return ut(e);var t=[];for(var n in Object(e))ft.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ht(e){return null!=e&&_e(e.length)&&!R(e)}function pt(e){return ht(e)?at(e):dt(e)}var gt=function(e,t){return function(n,r){if(null==n)return n;if(!ht(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}(function(e,t){return e&&Re(e,t,pt)}),mt=gt;function yt(e,t){var n=!0;return mt(e,function(e,r,i){return n=!!t(e,r,i)}),n}function vt(e){var t=this.__data__=new re(e);this.size=t.size}vt.prototype.clear=function(){this.__data__=new re,this.size=0},vt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},vt.prototype.get=function(e){return this.__data__.get(e)},vt.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof re){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ae(r)}return n.set(e,t),this.size=n.size,this};function At(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ae;++t<n;)this.add(e[t])}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wt(e,t){return e.has(t)}At.prototype.add=At.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},At.prototype.has=function(e){return this.__data__.has(e)};function It(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,h=2&n?new At:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var p=e[f],g=t[f];if(r)var m=a?r(g,p,f,t,e,o):r(p,g,f,e,t,o);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!bt(t,function(e,t){if(!wt(h,t)&&(p===e||i(p,e,n,r,o)))return h.push(t)})){d=!1;break}}else if(p!==g&&!i(p,g,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d}var xt=w.Uint8Array;function Ct(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Bt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Et=I?I.prototype:void 0,St=Et?Et.valueOf:void 0;function kt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n){var r=t(e);return v(e)?r:kt(r,n(e))}function Dt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Nt(){return[]}var Mt=Object.prototype.propertyIsEnumerable,Tt=Object.getOwnPropertySymbols,Qt=Tt?function(e){return null==e?[]:(e=Object(e),Dt(Tt(e),function(t){return Mt.call(e,t)}))}:Nt;function Lt(e){return Ft(e,pt,Qt)}var Rt=Object.prototype.hasOwnProperty;var Ut=J(w,"DataView"),Ht=J(w,"Promise"),qt=J(w,"Set"),Ot=J(w,"WeakMap"),Pt="[object Map]",$t="[object Promise]",zt="[object Set]",jt="[object WeakMap]",Vt="[object DataView]",Yt=P(Ut),Wt=P(ie),Gt=P(Ht),Jt=P(qt),_t=P(Ot),Xt=F;(Ut&&Xt(new Ut(new ArrayBuffer(1)))!=Vt||ie&&Xt(new ie)!=Pt||Ht&&Xt(Ht.resolve())!=$t||qt&&Xt(new qt)!=zt||Ot&&Xt(new Ot)!=jt)&&(Xt=function(e){var t=F(e),n="[object Object]"==t?e.constructor:void 0,r=n?P(n):"";if(r)switch(r){case Yt:return Vt;case Wt:return Pt;case Gt:return $t;case Jt:return zt;case _t:return jt}return t});var Kt=Xt,Zt="[object Arguments]",en="[object Array]",tn="[object Object]",nn=Object.prototype.hasOwnProperty;function rn(e,t,n,r,i,o){var a=v(e),s=v(t),l=a?en:Kt(e),c=s?en:Kt(t),u=(l=l==Zt?tn:l)==tn,f=(c=c==Zt?tn:c)==tn,d=l==c;if(d&&We(e)){if(!We(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new vt),a||it(e)?It(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new xt(e),new xt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ee(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Ct;case"[object Set]":var l=1&r;if(s||(s=Bt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=It(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(St)return St.call(e)==St.call(t)}return!1}(e,t,l,n,r,i,o);if(!(1&n)){var h=u&&nn.call(e,"__wrapped__"),p=f&&nn.call(t,"__wrapped__");if(h||p){var g=h?e.value():e,m=p?t.value():t;return o||(o=new vt),i(g,m,n,r,o)}}return!!d&&(o||(o=new vt),function(e,t,n,r,i,o){var a=1&n,s=Lt(e),l=s.length;if(l!=Lt(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Rt.call(t,u)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var h=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var g=e[u=s[c]],m=t[u];if(r)var y=a?r(m,g,u,t,e,o):r(g,m,u,e,t,o);if(!(void 0===y?g===m||i(g,m,n,r,o):y)){h=!1;break}p||(p="constructor"==u)}if(h&&!p){var v=e.constructor,A=t.constructor;v==A||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof A&&A instanceof A||(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,i,o))}function on(e,t,n,r,i){return e===t||(null==e||null==t||!D(e)&&!D(t)?e!=e&&t!=t:rn(e,t,n,r,on,i))}function an(e){return e==e&&!L(e)}function sn(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function ln(e){var t=function(e){for(var t=pt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,an(i)]}return t}(e);return 1==t.length&&t[0][2]?sn(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var f=new vt;if(r)var d=r(c,u,l,e,t,f);if(!(void 0===d?on(u,c,3,r,f):d))return!1}}return!0}(n,e,t)}}function cn(e,t){return null!=e&&t in Object(e)}function un(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=ye(t,e)).length,o=!1;++r<i;){var a=ve(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&_e(i)&&Je(a,i)&&(v(e)||ze(e))}(e,t,cn)}function fn(e){return e}function dn(e){return function(t){return null==t?void 0:t[e]}}function hn(e){return Q(e)?dn(ve(e)):function(e){return function(t){return Ae(t,e)}}(e)}function pn(e){return"function"==typeof e?e:null==e?fn:"object"==typeof e?v(e)?function(e,t){return Q(e)&&an(t)?sn(ve(e),t):function(n){var r=be(n,e);return void 0===r&&r===t?un(n,e):on(t,r,3)}}(e[0],e[1]):ln(e):hn(e)}function gn(e,t,n){if(!L(n))return!1;var r=typeof t;return!!("number"==r?ht(n)&&Je(t,n.length):"string"==r&&t in n)&&ee(n[t],e)}function mn(e,t,n){var r=v(e)?Qe:yt;return n&&gn(e,t,n)&&(t=void 0),r(e,pn(t))}function yn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function vn(e){return"function"==typeof e?e:fn}function An(e,t){return(v(e)?yn:mt)(e,vn(t))}function bn(e,t){var n=-1,r=ht(e)?Array(e.length):[];return mt(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function wn(e,t){return(v(e)?de:bn)(e,pn(t))}var In=I?I.isConcatSpreadable:void 0;function xn(e){return v(e)||ze(e)||!!(In&&e&&e[In])}function Cn(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=xn),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?Cn(s,t-1,n,r,i):kt(i,s):r||(i[i.length]=s)}return i}function Bn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function En(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return kt(v(n)?Bn(n):[n],Cn(t,1))}function Sn(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function kn(e){return"[object Null]"===Object.prototype.toString.call(e)}function Fn(e){if(Ee(e)){for(let t in e)return!1;return!0}return!1}function Dn(e){return!(!ke(e)||""!==e)}function Nn(e){return!!Be(e)&&0===e.length}function Mn(e){return!!Sn(e)||(!!kn(e)||(!!Fn(e)||(!!Dn(e)||(!!Nn(e)||!!Ne(e)))))}function Tn(e){return!!Be(e)&&(0!==e.length&&(1!==e.length||!Mn(e[0])))}function Qn(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ln(e){return e!=e}function Rn(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Qn(e,Ln,n)}function Un(e,t){return!!(null==e?0:e.length)&&Rn(e,t,0)>-1}function Hn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var qn=qt&&1/Bt(new qt([,-0]))[1]==1/0?function(e){return new qt(e)}:function(){},On=qn;function Pn(e,t,n){var r=-1,i=Un,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Hn;else if(o>=200){var c=t?null:On(e);if(c)return Bt(c);a=!1,i=wt,l=new At}else l=t?[]:s;e:for(;++r<o;){var u=e[r],f=t?t(u):u;if(u=n||0!==u?u:0,a&&f==f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(u)}else i(l,f,n)||(l!==s&&l.push(f),s.push(u))}return s}function $n(e){return e&&e.length?Pn(e):[]}function zn(e){if(!Tn(e))return[];let t=[];return An(e,function(e){let n=pt(e);t=[...t,...n],t=$n(t)}),t}var jn=dn("length"),Vn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Yn(e){return Vn.test(e)}var Wn="\\ud800-\\udfff",Gn="["+Wn+"]",Jn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",_n="\\ud83c[\\udffb-\\udfff]",Xn="[^"+Wn+"]",Kn="(?:\\ud83c[\\udde6-\\uddff]){2}",Zn="[\\ud800-\\udbff][\\udc00-\\udfff]",er="(?:"+Jn+"|"+_n+")"+"?",tr="[\\ufe0e\\ufe0f]?",nr=tr+er+("(?:\\u200d(?:"+[Xn,Kn,Zn].join("|")+")"+tr+er+")*"),rr="(?:"+[Xn+Jn+"?",Jn,Kn,Zn,Gn].join("|")+")",ir=RegExp(_n+"(?="+_n+")|"+rr+nr,"g");function or(e){return Yn(e)?function(e){for(var t=ir.lastIndex=0;ir.test(e);)++t;return t}(e):jn(e)}function ar(e){if(null==e)return 0;if(ht(e))return"string"==typeof(t=e)||!v(t)&&D(t)&&"[object String]"==F(t)?or(e):e.length;var t,n=Kt(e);return"[object Map]"==n||"[object Set]"==n?e.size:dt(e).length}function sr(e,t=!1,n={}){let r=be(n,"returnWithStateAndMsg",null);Ie(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:"";if(Sn(e))return i("invalid v");let o="";try{o=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){return i(e.toString())}return r?{state:"success",msg:o}:o}function lr(e,t=null,n={}){let r=be(n,"returnWithStateAndMsg",null);Ie(r)||(r=!1);let i=e=>r?{state:"error",msg:e}:[];if(!Tn(e))return i("invalid ltdt");if(Tn(t)||(t=zn(e)),0===ar(t))return i("invalid keys, can not extract any key from ltdt");let o=!1;if(An(e,function(e){Se(e)||(o=!0)}),o)return i("invalid ltdt, every element must be an effective object");let a=be(n,"empty",""),s=[];return An(e,function(e){let n=wn(t,function(t){return Te(e,t)?Ie(e[t])?e[t]?"true":"false":ke(e[t])||Me(e[t])?e[t]:sr(e[t]):a});s.push(n)}),r?{state:"success",msg:s}:s}function cr(e,t=[],n={},r={}){let i=be(r,"returnWithStateAndMsg",null);Ie(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:[];if(!Tn(e))return o("invalid ltdt");Tn(t)||(t=zn(e)),Se(n)||(n={},An(t,e=>{n[e]=e}));let a=!1;if(An(e,function(e){Se(e)||(a=!0)}),a)return o("invalid ltdt, every element must be an effective object");let s=wn(t,function(e){return be(n,e)}),l=lr(e,t,{returnWithStateAndMsg:!0});if("error"===l.state)return o(`ltdtkeys2mat: ${l.msg}`);let c=En([s],l.msg);return i?{state:"success",msg:c}:c}function ur(e){if(!Be(e))return{error:"data is not an array"};let t=null;try{mn(e,Se)&&(e=cr(e)),t={rows:e}}catch(e){return{error:e}}return t}function fr(e){if(!Fe(e))return!1;let n="YYYY-MM";return e===t(e,n).format(n)}var dr=/\s/;var hr=/^\s+/;function pr(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&dr.test(e.charAt(t)););return t}(e)+1).replace(hr,""):e}var gr=/^[-+]0x[0-9a-f]+$/i,mr=/^0b[01]+$/i,yr=/^0o[0-7]+$/i,vr=parseInt;function Ar(e){if("number"==typeof e)return e;if(N(e))return NaN;if(L(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=L(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=pr(e);var n=mr.test(e);return n||yr.test(e)?vr(e.slice(2),n?2:8):gr.test(e)?NaN:+e}var br=1/0;function wr(e){return e?(e=Ar(e))===br||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Ir(e){var t=wr(e),n=t%1;return t==t?n?t-n:t:0}function xr(e){if(!Me(e))return 0;return wr(e)}function Cr(e,t={}){let n=be(t,"useLimitSafe",null);return Ie(n)||(n=!1),!!Me(e)&&(e=xr(e),n?Number.isSafeInteger(e):"number"==typeof(r=e)&&r==Ir(r));var r}var Br="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sr={exports:{}};var kr,Fr={exports:{}};function Dr(){return kr||(kr=1,function(e){var t;e.exports=(t=t||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==Br&&Br.crypto&&(n=Br.crypto),!n)try{n=require("crypto")}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=a.WordArray=s.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new l.init(t,e)}}),c=o.enc={},u=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},d=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*c,o);if(c){for(var f=0;f<c;f+=a)this._doProcessBlock(i,f);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=h.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}});var p=o.algo={};return o}(Math),t)}(Fr)),Fr.exports}var Nr={exports:{}};!function(e){var t;e.exports=(t=Dr(),function(){var e=t,n=e.lib.WordArray;function r(e,t,r){for(var i=[],o=0,a=0;a<t;a++)if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2|r[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return n.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)i.push(r.charAt(a>>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var a=n.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(Nr);var Mr,Tr=Nr.exports,Qr=Er(Tr),Lr={exports:{}};function Rr(){return Mr||(Mr=1,function(e){var t;e.exports=(t=Dr(),function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,a=n.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],h=e[t+2],p=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],v=e[t+7],A=e[t+8],b=e[t+9],w=e[t+10],I=e[t+11],x=e[t+12],C=e[t+13],B=e[t+14],E=e[t+15],S=o[0],k=o[1],F=o[2],D=o[3];S=c(S,k,F,D,a,7,s[0]),D=c(D,S,k,F,l,12,s[1]),F=c(F,D,S,k,h,17,s[2]),k=c(k,F,D,S,p,22,s[3]),S=c(S,k,F,D,g,7,s[4]),D=c(D,S,k,F,m,12,s[5]),F=c(F,D,S,k,y,17,s[6]),k=c(k,F,D,S,v,22,s[7]),S=c(S,k,F,D,A,7,s[8]),D=c(D,S,k,F,b,12,s[9]),F=c(F,D,S,k,w,17,s[10]),k=c(k,F,D,S,I,22,s[11]),S=c(S,k,F,D,x,7,s[12]),D=c(D,S,k,F,C,12,s[13]),F=c(F,D,S,k,B,17,s[14]),S=u(S,k=c(k,F,D,S,E,22,s[15]),F,D,l,5,s[16]),D=u(D,S,k,F,y,9,s[17]),F=u(F,D,S,k,I,14,s[18]),k=u(k,F,D,S,a,20,s[19]),S=u(S,k,F,D,m,5,s[20]),D=u(D,S,k,F,w,9,s[21]),F=u(F,D,S,k,E,14,s[22]),k=u(k,F,D,S,g,20,s[23]),S=u(S,k,F,D,b,5,s[24]),D=u(D,S,k,F,B,9,s[25]),F=u(F,D,S,k,p,14,s[26]),k=u(k,F,D,S,A,20,s[27]),S=u(S,k,F,D,C,5,s[28]),D=u(D,S,k,F,h,9,s[29]),F=u(F,D,S,k,v,14,s[30]),S=f(S,k=u(k,F,D,S,x,20,s[31]),F,D,m,4,s[32]),D=f(D,S,k,F,A,11,s[33]),F=f(F,D,S,k,I,16,s[34]),k=f(k,F,D,S,B,23,s[35]),S=f(S,k,F,D,l,4,s[36]),D=f(D,S,k,F,g,11,s[37]),F=f(F,D,S,k,v,16,s[38]),k=f(k,F,D,S,w,23,s[39]),S=f(S,k,F,D,C,4,s[40]),D=f(D,S,k,F,a,11,s[41]),F=f(F,D,S,k,p,16,s[42]),k=f(k,F,D,S,y,23,s[43]),S=f(S,k,F,D,b,4,s[44]),D=f(D,S,k,F,x,11,s[45]),F=f(F,D,S,k,E,16,s[46]),S=d(S,k=f(k,F,D,S,h,23,s[47]),F,D,a,6,s[48]),D=d(D,S,k,F,v,10,s[49]),F=d(F,D,S,k,B,15,s[50]),k=d(k,F,D,S,m,21,s[51]),S=d(S,k,F,D,x,6,s[52]),D=d(D,S,k,F,p,10,s[53]),F=d(F,D,S,k,w,15,s[54]),k=d(k,F,D,S,l,21,s[55]),S=d(S,k,F,D,A,6,s[56]),D=d(D,S,k,F,E,10,s[57]),F=d(F,D,S,k,y,15,s[58]),k=d(k,F,D,S,C,21,s[59]),S=d(S,k,F,D,g,6,s[60]),D=d(D,S,k,F,I,10,s[61]),F=d(F,D,S,k,h,15,s[62]),k=d(k,F,D,S,b,21,s[63]),o[0]=o[0]+S|0,o[1]=o[1]+k|0,o[2]=o[2]+F|0,o[3]=o[3]+D|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<<o|s>>>32-o)+t}function u(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<<o|s>>>32-o)+t}n.MD5=o._createHelper(l),n.HmacMD5=o._createHmacHelper(l)}(Math),t.MD5)}(Lr)),Lr.exports}var Ur={exports:{}},Hr={exports:{}};!function(e){var t;e.exports=(t=Dr(),function(){var e=t,n=e.lib,r=n.WordArray,i=n.Hasher,o=e.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],l=n[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var u=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=u<<1|u>>>31}var f=(r<<5|r>>>27)+l+a[c];f+=c<20?1518500249+(i&o|~i&s):c<40?1859775393+(i^o^s):c<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,l=s,s=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+l|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[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=i._createHelper(s),e.HmacSHA1=i._createHmacHelper(s)}(),t.SHA1)}(Hr);var qr,Or,Pr=Hr.exports,$r=Er(Pr),zr={exports:{}};function jr(){return Or||(Or=1,function(e){var t;e.exports=(t=Dr(),qr||(qr=1,function(e){var t;e.exports=(t=Dr(),void function(){var e=t,n=e.lib.Base,r=e.enc.Utf8;e.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,l=a.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())}(zr)),function(){var e=t,n=e.lib,r=n.Base,i=n.WordArray,o=e.algo,a=o.MD5,s=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),a=i.create(),s=a.words,l=r.keySize,c=r.iterations;s.length<l;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var u=1;u<c;u++)n=o.finalize(n),o.reset();a.concat(n)}return a.sigBytes=4*l,a}});e.EvpKDF=function(e,t,n){return s.create(n).compute(e,t)}}(),t.EvpKDF)}(Ur)),Ur.exports}var Vr,Yr={exports:{}};!function(e){var t;e.exports=(t=Dr(),Rr(),jr(),Vr||(Vr=1,function(e){var t;e.exports=(t=Dr(),jr(),void(t.lib.Cipher||function(e){var n=t,r=n.lib,i=r.Base,o=r.WordArray,a=r.BufferedBlockAlgorithm,s=n.enc;s.Utf8;var l=s.Base64,c=n.algo.EvpKDF,u=r.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?A:y}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});r.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=n.mode={},d=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=f.CBC=function(){var t=d.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var a=0;a<r;a++)t[n+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),p=(n.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,a=[],s=0;s<r;s+=4)a.push(i);var l=o.create(a,r);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:h,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var g=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),m=(n.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(l)},parse:function(e){var t,n=l.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},y=r.SerializableCipher=i.extend({cfg:i.extend({format:m}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(n.kdf={}).OpenSSL={execute:function(e,t,n,r,i){if(r||(r=o.random(8)),i)a=c.create({keySize:t+n,hasher:i}).compute(e,r);else var a=c.create({keySize:t+n}).compute(e,r);var s=o.create(a.words.slice(t),4*n);return a.sigBytes=4*t,g.create({key:a,iv:s,salt:r})}},A=r.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:v}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=y.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,y.decrypt.call(this,e,t,i.key,r)}})}()))}(Yr)),function(){var e=t,n=e.lib.BlockCipher,r=e.algo,i=[],o=[],a=[],s=[],l=[],c=[],u=[],f=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],m=e[g],y=e[m],v=257*e[p]^16843008*p;a[n]=v<<24|v>>>8,s[n]=v<<16|v>>>16,l[n]=v<<8|v>>>24,c[n]=v,v=16843009*y^65537*m^257*g^16843008*n,u[p]=v<<24|v>>>8,f[p]=v<<16|v>>>16,d[p]=v<<8|v>>>24,h[p]=v,n?(n=g^e[e[e[y^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<n?o[a]=t[a]:(c=o[a-1],a%n?n>6&&a%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/n|0]<<24),o[a]=o[a-n]^c);for(var s=this._invKeySchedule=[],l=0;l<r;l++){if(a=r-l,l%4)var c=o[a];else c=o[a-4];s[l]=l<4||a<=4?c:u[i[c>>>24]]^f[i[c>>>16&255]]^d[i[c>>>8&255]]^h[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,f,d,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],f=e[t+2]^n[2],d=e[t+3]^n[3],h=4,p=1;p<l;p++){var g=r[c>>>24]^i[u>>>16&255]^o[f>>>8&255]^a[255&d]^n[h++],m=r[u>>>24]^i[f>>>16&255]^o[d>>>8&255]^a[255&c]^n[h++],y=r[f>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&u]^n[h++],v=r[d>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&f]^n[h++];c=g,u=m,f=y,d=v}g=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&d])^n[h++],m=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^n[h++],y=(s[f>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[h++],v=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[h++],e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=v},keySize:8});e.AES=n._createHelper(g)}(),t.AES)}(Sr);var Wr=Er(Sr.exports),Gr={exports:{}};!function(e){e.exports=Dr().enc.Utf8}(Gr);var Jr=Er(Gr.exports),_r={exports:{}};!function(e){e.exports=Dr().enc.Hex}(_r);var Xr=Er(_r.exports);function Kr(e,t,n=!1,r={}){let i=be(r,"returnWithStateAndMsg",null);Ie(i)||(i=!1);let o=e=>i?{state:"error",msg:e}:"";if(!Fe(e))return o("invalid str");if(!Fe(t))return o("invalid key");Ie(n)||(n=!1);let a="";try{if(n){a=Wr.decrypt(e,t).toString(Jr)}else{let n=Xr.parse(e).toString(Qr);a=Wr.decrypt(n,t).toString(Jr)}}catch(e){return o(e.toString())}return""===a?o("can not decrypt str with key, or str is not a valid cipher text"):i?{state:"success",msg:a}:a}var Zr=function(){try{var e=J(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ei=Zr;function ti(e,t,n){"__proto__"==t&&ei?ei(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ni=Object.prototype.hasOwnProperty;function ri(e,t,n){var r=e[t];ni.call(e,t)&&ee(r,n)&&(void 0!==n||t in e)||ti(e,t,n)}function ii(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?ti(n,s,l):ri(n,s,l)}return n}var oi=Object.prototype.hasOwnProperty;function ai(e){if(!L(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=lt(e),n=[];for(var r in e)("constructor"!=r||!t&&oi.call(e,r))&&n.push(r);return n}function si(e){return ht(e)?at(e,!0):ai(e)}var li="object"==typeof e&&e&&!e.nodeType&&e,ci=li&&"object"==typeof module&&module&&!module.nodeType&&module,ui=ci&&ci.exports===li?w.Buffer:void 0,fi=ui?ui.allocUnsafe:void 0;function di(e,t){if(t)return e.slice();var n=e.length,r=fi?fi(n):new e.constructor(n);return e.copy(r),r}var hi=ct(Object.getPrototypeOf,Object),pi=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)kt(t,Qt(e)),e=hi(e);return t}:Nt;function gi(e){return Ft(e,si,pi)}var mi=Object.prototype.hasOwnProperty;function yi(e){var t=new e.constructor(e.byteLength);return new xt(t).set(new xt(e)),t}var vi=/\w*$/;var Ai=I?I.prototype:void 0,bi=Ai?Ai.valueOf:void 0;function wi(e,t){var n=t?yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ii(e,t,n){var r,i,o,a=e.constructor;switch(t){case"[object ArrayBuffer]":return yi(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return wi(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(o=new(i=e).constructor(i.source,vi.exec(i))).lastIndex=i.lastIndex,o;case"[object Symbol]":return r=e,bi?Object(bi.call(r)):{}}}var xi=Object.create,Ci=function(){function e(){}return function(t){if(!L(t))return{};if(xi)return xi(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Bi(e){return"function"!=typeof e.constructor||lt(e)?{}:Ci(hi(e))}var Ei=nt&&nt.isMap,Si=Ei?Ke(Ei):function(e){return D(e)&&"[object Map]"==Kt(e)};var ki=nt&&nt.isSet,Fi=ki?Ke(ki):function(e){return D(e)&&"[object Set]"==Kt(e)},Di="[object Arguments]",Ni="[object Function]",Mi="[object Object]",Ti={};function Qi(e,t,n,r,i,o){var a,s=1&t,l=2&t,c=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!L(e))return e;var u=v(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&mi.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Bn(e,a)}else{var f=Kt(e),d=f==Ni||"[object GeneratorFunction]"==f;if(We(e))return di(e,s);if(f==Mi||f==Di||d&&!i){if(a=l||d?{}:Bi(e),!s)return l?function(e,t){return ii(e,pi(e),t)}(e,function(e,t){return e&&ii(t,si(t),e)}(a,e)):function(e,t){return ii(e,Qt(e),t)}(e,function(e,t){return e&&ii(t,pt(t),e)}(a,e))}else{if(!Ti[f])return i?e:{};a=Ii(e,f,s)}}o||(o=new vt);var h=o.get(e);if(h)return h;o.set(e,a),Fi(e)?e.forEach(function(r){a.add(Qi(r,t,n,r,e,o))}):Si(e)&&e.forEach(function(r,i){a.set(i,Qi(r,t,n,i,e,o))});var p=u?void 0:(c?l?gi:Lt:l?si:pt)(e);return yn(p||e,function(r,i){p&&(r=e[i=r]),ri(a,i,Qi(r,t,n,i,e,o))}),a}Ti[Di]=Ti["[object Array]"]=Ti["[object ArrayBuffer]"]=Ti["[object DataView]"]=Ti["[object Boolean]"]=Ti["[object Date]"]=Ti["[object Float32Array]"]=Ti["[object Float64Array]"]=Ti["[object Int8Array]"]=Ti["[object Int16Array]"]=Ti["[object Int32Array]"]=Ti["[object Map]"]=Ti["[object Number]"]=Ti[Mi]=Ti["[object RegExp]"]=Ti["[object Set]"]=Ti["[object String]"]=Ti["[object Symbol]"]=Ti["[object Uint8Array]"]=Ti["[object Uint8ClampedArray]"]=Ti["[object Uint16Array]"]=Ti["[object Uint32Array]"]=!0,Ti["[object Error]"]=Ti[Ni]=Ti["[object WeakMap]"]=!1;function Li(e){return Qi(e,5)}let Ri=2147483647;var Ui={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],f=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),f){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,a),!0}for(c=1,l=new Array(f-1);c<f;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var d,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),f){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!l)for(d=1,l=new Array(f-1);d<f;d++)l[d-1]=arguments[d];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(Ui);var Hi=Er(Ui.exports);function qi(){return new Hi}function Oi(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function Pi(e,t,n=[],r={}){let i=r.funSettle,o=r.tag||"evem",a=(t,...n)=>e.emit(t,...n);Oi(r.funEmit)&&(a=r.funEmit);try{return a(t,...n)}catch(r){if(Oi(i))try{i(r)}catch(e){}try{"error"!==t&&e.listenerCount("error")>0?a("error",{fun:"listener",name:t,msg:r,args:n}):console.error(`[wsemi ${o}] listener of '${String(t)}' threw:`,r)}catch(e){try{console.error(`[wsemi ${o}] listener of '${String(t)}' threw, and reporting it also threw:`,e,r)}catch(e){}}return!1}}var $i=w.isFinite,zi=Math.min;function ji(e){var t=Math[e];return function(e,n){if(e=Ar(e),(n=null==n?0:zi(Ir(n),292))&&$i(e)){var r=(me(e)+"e").split("e");return+((r=(me(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vi=ji("round");function Yi(e,t={}){let n=be(t,"useClampSafe",null);Ie(n)||(n=!1);let r=be(t,"useLimitSafe",null);Ie(r)||(r=!1);let i=be(t,"returnWithStateAndMsg",null);Ie(i)||(i=!1);let o=e=>i?{state:"success",msg:e}:e,a=e=>{if(i)return{state:"error",msg:e};throw new Error(e)};if(!Me(e))return o(0);let s=null;try{e=xr(e),s=Vi(e),n&&(s>Number.MAX_SAFE_INTEGER?s=Number.MAX_SAFE_INTEGER:s<Number.MIN_SAFE_INTEGER&&(s=Number.MIN_SAFE_INTEGER))}catch(e){return a(e.toString())}return r&&!Number.isSafeInteger(Number(s))?a(`v[${e}] is not a safe integer`):("0"===String(s)&&(s=0),o(s))}function Wi(e,t={}){if(!Cr(e,t))return!1;return Yi(e)>0}function Gi(e,t){return function(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var s=r<o?t[r]:void 0;n(a,e[r],s)}return a}(e||[],t||[],ri)}function Ji(e,t){if(!Be(e))return[];if(!Be(t))return[];if(ar(e)!==ar(t))return[];let n=[];return An(e,function(r,i){let o=null,a=Me(e[i]),s=Me(t[i]);(a||s)&&(o=0),a&&(o+=xr(e[i])),s&&(o+=xr(t[i])),n.push(o)}),n}var _i=Math.ceil,Xi=Math.max;var Ki=function(e){return function(t,n,r){return r&&"number"!=typeof r&&gn(t,n,r)&&(n=r=void 0),t=wr(t),void 0===n?(n=t,t=0):n=wr(n),function(e,t,n,r){for(var i=-1,o=Xi(_i((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,r=void 0===r?t<n?1:-1:wr(r),e)}}(),Zi=Ki;function eo(e,t){for(var n=-1,r=t.length,i=Array(r),o=null==e;++n<r;)i[n]=o?void 0:be(e,t[n]);return i}function to(e){return(null==e?0:e.length)?Cn(e,1):[]}var no=Math.max;function ro(e,t,n){return t=no(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=no(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}function io(e){return function(){return e}}var oo=ei?function(e,t){return ei(e,"toString",{configurable:!0,enumerable:!1,value:io(t),writable:!0})}:fn,ao=oo,so=Date.now;var lo,co,uo,fo=(lo=ao,co=0,uo=0,function(){var e=so(),t=16-(e-uo);if(uo=e,t>0){if(++co>=800)return arguments[0]}else co=0;return lo.apply(void 0,arguments)}),ho=fo;function po(e){return ho(ro(e,void 0,to),e+"")}var go=po(eo);function mo(e,t={}){if(!Cr(e,t))return!1;return Yi(e)>=0}function yo(e,t,n=null){if(!Tn(e))return[];if(!mo(t))return[];let r;if(t=Yi(t),Mn(n)){if(t>=e.length)return[];r=go(e,t)}else{if(!mo(n))return[];if(n=Yi(n),t>=e.length||n>=e.length)return[];let i=Zi(t,n+1);r=go(e,i)}return r}var vo=Array.prototype.join;function Ao(e,t){return null==e?"":vo.call(e,t)}function bo(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function wo(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:bo(e,t,n)}var Io=nt&&nt.isRegExp,xo=Io?Ke(Io):function(e){return D(e)&&"[object RegExp]"==F(e)};var Co="\\ud800-\\udfff",Bo="["+Co+"]",Eo="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",So="\\ud83c[\\udffb-\\udfff]",ko="[^"+Co+"]",Fo="(?:\\ud83c[\\udde6-\\uddff]){2}",Do="[\\ud800-\\udbff][\\udc00-\\udfff]",No="(?:"+Eo+"|"+So+")"+"?",Mo="[\\ufe0e\\ufe0f]?",To=Mo+No+("(?:\\u200d(?:"+[ko,Fo,Do].join("|")+")"+Mo+No+")*"),Qo="(?:"+[ko+Eo+"?",Eo,Fo,Do,Bo].join("|")+")",Lo=RegExp(So+"(?="+So+")|"+Qo+To,"g");function Ro(e){return Yn(e)?function(e){return e.match(Lo)||[]}(e):function(e){return e.split("")}(e)}function Uo(e,t,n){return n&&"number"!=typeof n&&gn(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=me(e))&&("string"==typeof t||null!=t&&!xo(t))&&!(t=ge(t))&&Yn(e)?wo(Ro(e),0,n):e.split(t,n):[]}function Ho(e,t,n){var r=null==e?0:e.length;return r?bo(e,0,(t=r-(t=n||void 0===t?1:Ir(t)))<0?0:t):[]}let qo=class{diff(e,t,n={}){let r;"function"==typeof n?(r=n,n={}):"callback"in n&&(r=n.callback);const i=this.castInput(e,n),o=this.castInput(t,n),a=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(a,s,n,r)}diffWithOptionsObj(e,t,n,r){var i;const o=e=>(e=this.postProcess(e,n),r?void setTimeout(function(){r(e)},0):e),a=t.length,s=e.length;let l=1,c=a+s;null!=n.maxEditLength&&(c=Math.min(c,n.maxEditLength));const u=null!==(i=n.timeout)&&void 0!==i?i:1/0,f=Date.now()+u,d=[{oldPos:-1,lastComponent:void 0}];let h=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=s&&h+1>=a)return o(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,g=1/0;const m=()=>{for(let r=Math.max(p,-l);r<=Math.min(g,l);r+=2){let i;const l=d[r-1],c=d[r+1];l&&(d[r-1]=void 0);let u=!1;if(c){const e=c.oldPos-r;u=c&&0<=e&&e<a}const f=l&&l.oldPos+1<s;if(u||f){if(i=!f||u&&l.oldPos<c.oldPos?this.addToPath(c,!0,!1,0,n):this.addToPath(l,!1,!0,1,n),h=this.extractCommon(i,t,e,r,n),i.oldPos+1>=s&&h+1>=a)return o(this.buildValues(i.lastComponent,t,e))||!0;d[r]=i,i.oldPos+1>=s&&(g=Math.min(g,r-1)),h+1>=a&&(p=Math.max(p,r+1))}else d[r]=void 0}l++};if(r)!function e(){setTimeout(function(){if(l>c||Date.now()>f)return r(void 0);m()||e()},0)}();else for(;l<=c&&Date.now()<=f;){const e=m();if(e)return e}}addToPath(e,t,n,r,i){const o=e.lastComponent;return o&&!i.oneChangePerToken&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}}extractCommon(e,t,n,r,i){const o=t.length,a=n.length;let s=e.oldPos,l=s-r,c=0;for(;l+1<o&&s+1<a&&this.equals(n[s+1],t[l+1],i);)l++,s++,c++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return c&&!i.oneChangePerToken&&(e.lastComponent={count:c,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const r=[];let i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();const o=r.length;let a=0,s=0,l=0;for(;a<o;a++){const e=r[a];if(e.removed)e.value=this.join(n.slice(l,l+e.count)),l+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){const r=n[l+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(l+=e.count)}}return r}};const Oo=new class extends qo{constructor(){super(...arguments),this.tokenize=$o}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes("\n")||(e=e.trim()),n.newlineIsToken&&t.includes("\n")||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith("\n")&&(e=e.slice(0,-1)),t.endsWith("\n")&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function Po(e,t,n){return Oo.diff(e,t,n)}function $o(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,"\n"));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){const i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function zo(e){if(!function(e){for(let t=0;t<e.length;t++)if(e[t]<" "||e[t]>"~"||'"'===e[t]||"\\"===e[t])return!0;return!1}(e))return e;let t='"';const n=(new TextEncoder).encode(e);let r=0;for(;r<n.length;){const e=n[r];t+=7===e?"\\a":8===e?"\\b":9===e?"\\t":10===e?"\\n":11===e?"\\v":12===e?"\\f":13===e?"\\r":34===e?'\\"':92===e?"\\\\":e>=32&&e<=126?String.fromCharCode(e):"\\"+e.toString(8).padStart(3,"0"),r++}return t+='"',t}const jo={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function Vo(e,t,n,r,i,o,a){let s;s=a?"function"==typeof a?{callback:a}:a:{},void 0===s.context&&(s.context=4);const l=s.context;if(s.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(!s.callback)return c(Po(n,r,s));{const{callback:e}=s;Po(n,r,Object.assign(Object.assign({},s),{callback:t=>{const n=c(t);e(n)}}))}function c(n){if(!n)return;function r(e){return e.map(function(e){return" "+e})}n.push({value:"",lines:[]});const a=[];let s=0,c=0,u=[],f=1,d=1;for(let e=0;e<n.length;e++){const t=n[e],i=t.lines||Go(t.value);if(t.lines=i,t.added||t.removed){if(!s){const t=n[e-1];s=f,c=d,t&&(u=l>0?r(t.lines.slice(-l)):[],s-=u.length,c-=u.length)}for(const e of i)u.push((t.added?"+":"-")+e);t.added?d+=i.length:f+=i.length}else{if(s)if(i.length<=2*l&&e<n.length-2)for(const e of r(i))u.push(e);else{const e=Math.min(i.length,l);for(const t of r(i.slice(0,e)))u.push(t);const t={oldStart:s,oldLines:f-s+e,newStart:c,newLines:d-c+e,lines:u};a.push(t),s=0,c=0,u=[]}f+=i.length,d+=i.length}}for(const e of a)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith("\n")?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,"\"),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:o,hunks:a}}}function Yo(e,t){var n,r,i,o,a,s;if(t||(t=jo),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(e=>Yo(e,t)).join("\n")}const l=[];if(e.isGit){if(t=jo,!e.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!e.newFileName)throw new Error("newFileName must be specified for Git patches");let c=e.oldFileName,u=e.newFileName;e.isCreate&&"/dev/null"===c?c=u.replace(/^b\//,"a/"):e.isDelete&&"/dev/null"===u&&(u=c.replace(/^a\//,"b/")),l.push("diff --git "+zo(c)+" "+zo(u)),e.isDelete&&l.push("deleted file mode "+(null!==(n=e.oldMode)&&void 0!==n?n:"100644")),e.isCreate&&l.push("new file mode "+(null!==(r=e.newMode)&&void 0!==r?r:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(l.push("old mode "+e.oldMode),l.push("new mode "+e.newMode)),e.isRename&&(l.push("rename from "+zo((null!==(i=e.oldFileName)&&void 0!==i?i:"").replace(/^a\//,""))),l.push("rename to "+zo((null!==(o=e.newFileName)&&void 0!==o?o:"").replace(/^b\//,"")))),e.isCopy&&(l.push("copy from "+zo((null!==(a=e.oldFileName)&&void 0!==a?a:"").replace(/^a\//,""))),l.push("copy to "+zo((null!==(s=e.newFileName)&&void 0!==s?s:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&void 0!==e.oldFileName&&l.push("Index: "+e.oldFileName),t.includeUnderline&&l.push("===================================================================");const c=e.hunks.length>0;!t.includeFileHeaders||void 0===e.oldFileName||void 0===e.newFileName||e.isGit&&!c||(l.push("--- "+zo(e.oldFileName)+(e.oldHeader?"\t"+e.oldHeader:"")),l.push("+++ "+zo(e.newFileName)+(e.newHeader?"\t"+e.newHeader:"")));for(let t=0;t<e.hunks.length;t++){const n=e.hunks[t],r=0===n.oldLines?n.oldStart-1:n.oldStart,i=0===n.newLines?n.newStart-1:n.newStart;l.push("@@ -"+r+","+n.oldLines+" +"+i+","+n.newLines+" @@");for(const e of n.lines)l.push(e)}return l.join("\n")+"\n"}function Wo(e,t,n,r,i,o,a){if("function"==typeof a&&(a={callback:a}),!(null==a?void 0:a.callback)){const s=Vo(e,t,n,r,i,o,a);if(!s)return;return Yo(s,null==a?void 0:a.headerOptions)}{const{callback:s}=a;Vo(e,t,n,r,i,o,Object.assign(Object.assign({},a),{callback:e=>{s(e?Yo(e,a.headerOptions):void 0)}}))}}function Go(e){const t=e.endsWith("\n"),n=e.split("\n").map(e=>e+"\n");return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Jo(e,t,n){return e&&e.length?bo(e,0,(t=n||void 0===t?1:Ir(t))<0?0:t):[]}function _o(e,t,n={}){if(!ke(e))return{};if(!ke(t))return{};if(""===e&&""===t)return{};let r=be(n,"useNormNewline");Ie(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,o=Po(e,t),a=ar(o),s=[],l=[];for(i=-1;i++,!(i>a-1);){let e=o[i],t=be(e,"count",0),n=be(e,"removed",!1),r=be(e,"added",!1),a=Uo(be(e,"value",""),"\n");a=Jo(a,t);for(let e=1;e<=t;e++){let t=a[e-1];n||r?n&&!r?(s.push({p:"remove",v:t}),l.push({p:"empty",v:""})):!n&&r&&(s.push({p:"empty",v:""}),l.push({p:"add",v:t})):(s.push({p:"",v:t}),l.push({p:"",v:t}))}}let c=ar(s);for(i=-1;i++,!(i>c-1);){let e=be(s,i,null),t=be(l,i,null),n=be(e,"p",""),r=be(t,"p","");if("remove"===n&&"empty"===r){let e=0,t=i,n=-1;for(let t=i;t<=c-1;t++){let r=be(s,t,null),i=be(l,t,null),o=be(r,"p",""),a=be(i,"p","");if("remove"!==o||"empty"!==a)break;e++,n=t}if(e<=0)continue;let r=0,o=!1,a=-1;for(let t=i;t<=n+e;t++){let e=be(s,t,null),n=be(l,t,null),i=be(e,"p",""),c=be(n,"p","");if("empty"===i&&"add"===c)o||(a=t),o=!0,r++;else if(o)break}if(r<=0)continue;let u=Math.min(e,r);if(u>=1){for(let e=0;e<=u-1;e++){let n=t+e,r=a+e;s[n]={p:"modify",vo:be(s,`${n}.v`,""),vn:be(l,`${r}.v`,"")},l[n]=null,s[r]=null,l[r]=null}i+=u+1}}}let u=[];for(i=-1;i++,!(i>c-1);){let e=be(s,i,null),t=be(l,i,null),n=be(e,"p",""),r=be(t,"p",""),o=be(e,"v",""),a=be(t,"v","");if(null===e&&null===t)continue;let c="",f=o,d="";"modify"===n?(c="modify",f=e.vo,d=e.vn):"remove"===n&&"empty"===r?(c="remove",f=o,d=""):"empty"===n&&"add"===r&&(c="add",f=a,d=""),u.push({p:c,vo:f,vn:d})}return{diff:o,dfs:u}}let Xo="\n";function Ko(e,t){if(!Be(e))return{};if(!Be(t))return{};let n=wn(e,e=>`${e}${Xo}`);n=Ao(n,"");let r=wn(t,e=>`${e}${Xo}`);r=Ao(r,"");let i=_o(n,r,{eliminateEndLine:!0});return i.dfs=wn(i.dfs,(e,t)=>({p:e.p,k:t,vo:e.vo,vn:e.vn})),i}function Zo(e,t,n={}){if(!Be(e))return{};if(!Be(t))return{};if(0===ar(e)&&0===ar(t))return{};let r,i=be(n,"mode","");return"array"!==i&&"matrix"!==i&&(i="array"),"array"===i?r=Ko(e,t):"matrix"===i&&(r=function(e,t,n={}){if(!Be(e))return{};if(!Be(t))return{};let r=be(n,"dls","");Fe(r)||(r="⟋");let i=be(n,"dlq","");Fe(i)||(i="∶");let o=[];An(e,(t,n)=>{if(!Be(t))throw console.log("arrOld",e),console.log(n,t),new Error("arrOld is not a matrix");An(t,(e,t)=>{o.push(`${t}${i}${e}${r}`)}),o.push(Xo)}),o=Ao(o,"");let a=[];An(t,(e,n)=>{if(!Be(e))throw console.log("arrNew",t),console.log(n,e),new Error("arrNew is not a matrix");An(e,(e,t)=>{a.push(`${t}${i}${e}${r}`)}),a.push(Xo)}),a=Ao(a,"");let s=_o(o,a,{...n,eliminateEndLine:!0}),l=[];return An(s.dfs,e=>{let t=Uo(e.vo,r);if(t=Ho(t,1),"modify"===e.p){let n=Uo(e.vn,r);n=Ho(n,1);let i=Ko(t,n);e.dfs=i.dfs}let n=[];"modify"===e.p?An(e.dfs,e=>{n.push(e)}):An(t,t=>{n.push({p:e.p,vo:t,vn:""})}),n=wn(n,(e,t)=>{let n=be(Uo(e.vo,i),1,""),r=be(Uo(e.vn,i),1,"");return{p:e.p,k:t,vo:n,vn:r}}),l.push(n)}),{diff:s.diff,dfs:l}}(e,t,n)),r}function ea(e,t,n){if((e=me(e))&&(n||void 0===t))return pr(e);if(!e||!(t=ge(t)))return e;var r=Ro(e),i=Ro(t),o=function(e,t){for(var n=-1,r=e.length;++n<r&&Rn(t,e[n],0)>-1;);return n}(r,i),a=function(e,t){for(var n=e.length;n--&&Rn(t,e[n],0)>-1;);return n}(r,i)+1;return wo(r,o,a).join("")}function ta(e,t){if(!Fe(e))return[];if(!Fe(t))return[];return e.split(t)}function na(e,t){if(!Fe(e))return[];if(!Fe(t))return[];let n=ta(e,t);n=wn(n,ea);let r=[];return An(n,function(e){Fe(e)&&r.push(e)}),r}function ra(e,t){return Fe(e)&&mo(t)?0===(t=Yi(t))?"":e.substring(0,t):""}function ia(e,t){if(!Fe(e))return"";if(!mo(t))return"";if(0===(t=Yi(t)))return"";let n=e.length-t;return n<0&&(n=0),e.substring(n,n+t)}function oa(e,t){return Fe(e)&&mo(t)?0===(t=Yi(t))?e:ia(e,e.length-t):""}function aa(e,t){var n=[];return mt(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function sa(e,t){return(v(e)?Dt:aa)(e,pn(t))}function la(e){if(!Me(e))return!1;return xr(e)>0}function ca(e){return Tn(e)?e=wn(e=sa(e=Li(e),la),xr):[]}function ua(e,t){return on(e,t)}function fa(e){return"number"==typeof e||D(e)&&"[object Number]"==F(e)}function da(e,t){function n(e){return Be(e)?e:[e]}if(Mn(e))return!1;if(0===(e=n(e)).length)return!1;if(Mn(e))return!1;if(0===(t=n(t)).length)return!1;for(let n=0;n<e.length;n++)for(let r=0;r<t.length;r++)if(ua(e[n],t[r]))return!0;return!1}function ha(e,t,n={}){if(!Tn(e))return null;if(!Oi(t))return null;let r=be(n,"returnIndex");Ie(r)||(r=!1);let i=-1,o=null;for(let n=0;n<ar(e);n++){let r=t(o,e[n]);ua(o,r)||(o=r,i=n)}let a=null;return a=r?i:o,a}function pa(e,t){if(!Be(e))return[];if(!Be(t))return[];if(ar(e)!==ar(t))return[];let n=[];return An(e,function(r,i){let o=null,a=Me(e[i]),s=Me(t[i]);(a||s)&&(o=1),a&&(o*=xr(e[i])),s&&(o*=xr(t[i])),n.push(o)}),n}function ga(){if(ar(arguments)<2)return[];let e=arguments[0];for(let t=1;t<ar(arguments);t++){e=pa(e,arguments[t])}return e}function ma(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function ya(){if(ar(arguments)<2)return null;let e=ga(...arguments);return 0===ar(e)?null:(e=(t=e)&&t.length?ma(t,fn):0,e);var t}function va(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}var Aa=Array.prototype.splice;function ba(e,t){return e&&e.length&&t&&t.length?function(e,t,n,r){var i=r?va:Rn,o=-1,a=t.length,s=e;for(e===t&&(t=Bn(t)),n&&(s=de(e,Ke(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&Aa.call(s,l,1),Aa.call(e,l,1);return e}(e,t):e}function wa(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Ia=Object.prototype.hasOwnProperty;function xa(e,t){var n=-1,r=(t=ye(t,e)).length;if(!r)return!0;for(;++n<r;){var i=ve(t[n]);if("__proto__"===i&&!Ia.call(e,"__proto__"))return!1;if(("constructor"===i||"prototype"===i)&&n<r-1)return!1}var o=function(e,t){return t.length<2?e:Ae(e,bo(t,0,-1))}(e,t);return null==o||delete o[ve(wa(t))]}var Ca=Array.prototype.splice;function Ba(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=N(e),a=void 0!==t,s=null===t,l=t==t,c=N(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}var Ea=po(function(e,t){var n=null==e?0:e.length,r=eo(e,t);return function(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Je(i)?Ca.call(e,i,1):xa(e,i)}}}(e,de(t,function(e){return Je(e,n)?+e:e}).sort(Ba)),r});var Sa=Array.prototype.reverse;function ka(e){return null==e?e:Sa.call(e)}function Fa(e,t,n){t=t.length?de(t,function(e){return v(e)?function(t){return Ae(t,1===e.length?e[0]:e)}:e}):[fn];var r=-1;return t=de(t,Ke(pn)),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(bn(e,function(e,n,i){return{criteria:de(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=Ba(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Da(e,t){return ho(ro(e,t,fn),e+"")}var Na=Da(function(e,t){if(null==e)return[];var n=t.length;return n>1&&gn(e,t[0],t[1])?t=[]:n>2&&gn(t[0],t[1],t[2])&&(t=[t[0]]),Fa(e,Cn(t,1),[])});function Ma(e){return"[object BigInt]"===Object.prototype.toString.call(e)}function Ta(e){if(!(Fe(e)||Me(e)||N(e)||Ma(e)))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}function Qa(e,t,n){var r=null==e?0:e.length;return r?bo(e,(t=n||void 0===t?1:Ir(t))<0?0:t,r):[]}function La(e,t){return Fe(e)&&mo(t)?0===(t=Yi(t))?e:ra(e,e.length-t):""}function Ra(e,t={}){let n=be(t,"excludeString");if(Ie(n)||(n=!1),!Fe(e))return"";let r=e=>e>="0"&&e<="9"||"."===e||"-"===e||"+"===e,i=ea(e);if(n){let e=i.split("");for(let t=0;t<e.length;t++)if(r(e[t])){i=oa(i,t),e=Qa(e,t);break}e=ka(e);for(let t=0;t<e.length;t++)if(r(e[t])){i=La(i,t);break}}return i}function Ua(e){let t=0,n=0,r=0,i=ar(e);An(e,e=>{Me(e)?t+=1:ke(e)?n+=1:Ee(e)&&(r+=1)});let o="";return t===i?o="num":n===i?o="str":r===i?o="obj":t+n===i?o="str":console.log("eles in array are non-homogeneous",e),o}function Ha(e,t,n={}){let r=[];if("num"!==t&&"str"!==t&&"files"!==t)throw new Error(`invalid type[${t}]`);if("num"===t)r=wn(e,(e,t)=>({key:t,payload:e,value:xr(e)}));else if("files"===t)r=wn(e,(e,t)=>({key:t,payload:e,value:Ta(e)}));else if("str"===t){let t=wn(e,e=>Ra(e,{excludeString:!0})),n=0;An(t,e=>{Me(e)&&n++});let i=n===ar(t);r=wn(e,(e,n)=>{let r=e;return i?(r=t[n],r=xr(r)):r=Ta(r),{key:n,payload:e,value:r}})}return r}function qa(e,t){let n=Na(e,"value");return wn(n,t?"key":"payload")}function Oa(e,t){let n=function(e,t){let n=Li(e);return n.sort((e,n)=>e[t].localeCompare(n[t],"standard",{numeric:!0})),n}(e,"value");return wn(n,t?"key":"payload")}function Pa(e,t={}){if(!Tn(e))return[];if(1===ar(e))return e;let n=be(t,"localeCompare");Ie(n)||(n=!1);let r=be(t,"returnIndex");Ie(r)||(r=!1);let i=be(t,"compareKey",null),o=null;o=n?Oa:qa;let a,s=Ua(e);if(""===s)return[];if("obj"===s){if(!Fe(i))return[];let s=wn(e,(e,t)=>be(e,i,"")),l=Ua(s);if("num"!==l&&"str"!==l)return[];{n&&(l="files");let i=o(Ha(s,l,t),!0);a=r?i:wn(i,t=>e[t])}}else if("num"===s||"str"===s){n&&(s="files"),a=o(Ha(e,s,t),r)}return a}function $a(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:"";if(!Fe(e))return r("invalid b64");let i="";try{i=Qr.parse(e).toString(Jr)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function za(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:{};if(!Fe(e))return r("invalid v");let i={};try{i=JSON.parse(e)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}let ja=/[\t\n\f\r ]/g,Va=/^[A-Za-z0-9+/]*={0,2}$/,Ya=/=+$/;function Wa(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint8Array;if(!ke(e))return r("invalid b64");let i=e.replace(ja,"");if(!Va.test(i))return r("invalid b64, contains characters outside the base64 alphabet or misplaced padding");let o=i.length-i.replace(Ya,"").length,a=(i.length-o)%4;if(0===o&&1===a)return r(`invalid b64, the last chunk has only 1 character[${i.length}]`);if(1===o&&3!==a)return r("invalid b64, malformed padding, 1 padding requires the last chunk to have 3 characters");if(2===o&&2!==a)return r("invalid b64, malformed padding, 2 paddings require the last chunk to have 2 characters");let s=null;try{let e=Qr.parse(i),t=e.words,n=e.sigBytes;s=new Uint8Array(n);for(let e=0;e<n;e++){let n=t[e>>>2]>>>24-e%4*8&255;s[e]=n}}catch(e){return r(e.toString())}return n?{state:"success",msg:s}:s}function Ga(e,t={}){let n=be(t,"returnWithStateAndMsg",null);Ie(n)||(n=!1);let r=e=>n?{state:"error",msg:e}:new Uint16Array;if(!ke(e))return r("invalid b64");let i=null;try{let t=Wa(e,{returnWithStateAndMsg:!0});if("error"===t.state)return r(`b642u8arr: ${t.msg}`);let n=t.msg;if(n.byteLength%2!=0)return r(`byteLength[${n.byteLength}] is not even, can not be restored to Uint16Array`);let o=0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n:new Uint8Array(n);i=new Uint16Array(o.buffer)}catch(e){return r(e.toString())}return n?{state:"success",msg:i}:i}function Ja(e,t,n="anyone"){if(!Fe(e))return!1;if("anyone"!==n&&"all"!==n)return!1;if(ke(t)){if(!Fe(t))return!1;t=[t]}if(!Tn(t))return!1;let r=!1;if(An(t,function(e){Fe(e)||(r=!0)}),r)return!1;let i=0;return An(t,function(t){-1!==function(e,t){return e.indexOf(t)}(e,t)&&i++}),"anyone"===n?i>0:"all"===n&&i===t.length}function _a(){let e,t,n=new Promise(function(){e=arguments[0],t=arguments[1]});return n.resolve=e,n.reject=t,n}function Xa(e){let t=Object.prototype.toString.call(e);if("[object Blob]"===t||"[object File]"===t)return!0;try{if("undefined"!=typeof Blob&&e instanceof Blob)return!0}catch(e){}return!1}function Ka(){return"undefined"!=typeof window&&void 0!==window.document}function Za(e){if(!Xa(e))return Promise.reject("invalid bb");if(!Ka())return Promise.reject("no window");try{return function(e){return e.arrayBuffer()}(e)}catch(t){return function(e){let t=_a();try{let n=new FileReader;n.onload=function(){let e=n.result;t.resolve(e)},n.onerror=function(e){t.reject(e)},n.readAsArrayBuffer(e)}catch(e){t.reject(e)}return t}(e)}}function es(e){if(!Xa(e))return Promise.reject("invalid bb");if(!Ka())return Promise.reject("no window");let t=_a();try{let n=new FileReader;n.onload=function(){t.resolve(n.result)},n.onerror=function(e){t.reject(e)},n.readAsDataURL(e)}catch(e){t.reject(e)}return t}function ts(e){let t=_a();return Za(e).then(e=>{let n=new Uint8Array(e);t.resolve(n)}).catch(e=>{t.reject(e)}),t}function ns(e){if(!Be(e))return Promise.reject("invalid bbs");if(0===e.length)return Promise.resolve([]);let t=wn(e,function(e){return es(e)});return Promise.all(t)}function rs(e){if(!Be(e))return Promise.reject("invalid bbs");if(0===e.length)return Promise.resolve([]);let t=wn(e,function(e){return ts(e)});return Promise.all(t)}var is={exports:{}};
|
|
7
7
|
/*! https://mths.be/he v1.2.0 by @mathias | MIT license */!function(e,t){!function(n){var r=t,i=e&&e.exports==r&&e,o="object"==typeof Br&&Br;o.global!==o&&o.window!==o||(n=o);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,l=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,c=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,u={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp"," ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},f=/["&'<>`]/g,d={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},h=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,p=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,m={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},y={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},v={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},A=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],b=String.fromCharCode,w={}.hasOwnProperty,I=function(e,t){return w.call(e,t)},x=function(e,t){if(!e)return t;var n,r={};for(n in t)r[n]=I(e,n)?e[n]:t[n];return r},C=function(e,t){var n="";return e>=55296&&e<=57343||e>1114111?(t&&S("character reference outside the permissible Unicode range"),"�"):I(v,e)?(t&&S("disallowed character reference"),v[e]):(t&&function(e,t){for(var n=-1,r=e.length;++n<r;)if(e[n]==t)return!0;return!1}(A,e)&&S("disallowed character reference"),e>65535&&(n+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),n+=b(e))},B=function(e){return"&#x"+e.toString(16).toUpperCase()+";"},E=function(e){return"&#"+e+";"},S=function(e){throw Error("Parse error: "+e)},k=function(e,t){(t=x(t,k.options)).strict&&p.test(e)&&S("forbidden code point");var n=t.encodeEverything,r=t.useNamedReferences,i=t.allowUnsafeSymbols,o=t.decimal?E:B,d=function(e){return o(e.charCodeAt(0))};return n?(e=e.replace(s,function(e){return r&&I(u,e)?"&"+u[e]+";":d(e)}),r&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),r&&(e=e.replace(c,function(e){return"&"+u[e]+";"}))):r?(i||(e=e.replace(f,function(e){return"&"+u[e]+";"})),e=(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(c,function(e){return"&"+u[e]+";"})):i||(e=e.replace(f,d)),e.replace(a,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return o(1024*(t-55296)+n-56320+65536)}).replace(l,d)};k.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var F=function(e,t){var n=(t=x(t,F.options)).strict;return n&&h.test(e)&&S("malformed character reference"),e.replace(g,function(e,r,i,o,a,s,l,c,u){var f,d,h,p,g,v;return r?m[g=r]:i?(g=i,(v=o)&&t.isAttributeValue?(n&&"="==v&&S("`&` did not start a character reference"),e):(n&&S("named character reference was not terminated by a semicolon"),y[g]+(v||""))):a?(h=a,d=s,n&&!d&&S("character reference was not terminated by a semicolon"),f=parseInt(h,10),C(f,n)):l?(p=l,d=c,n&&!d&&S("character reference was not terminated by a semicolon"),f=parseInt(p,16),C(f,n)):(n&&S("named character reference was not terminated by a semicolon"),e)})};F.options={isAttributeValue:!1,strict:!1};var D={version:"1.2.0",encode:k,decode:F,escape:function(e){return e.replace(f,function(e){return d[e]})},unescape:F};if(r&&!r.nodeType)if(i)i.exports=D;else for(var N in D)I(D,N)&&(r[N]=D[N]);else n.he=D}(Br)}(is,is.exports);var os=Er(is.exports);function as(e,t={}){if(!Fe(e))return"";return os.encode(e,t)}function ss(e,t){let n=new Blob([e],{type:t});try{let e=window.URL.createObjectURL(n);window.open(e)}catch(e){console.log("window.URL.createObjectURL is not support for IE11",e)}}function ls(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function cs(e,t,n,r,i){if(!ls(e))return null;if(!Cr(t))return null;if(!Ie(n))return null;if(!Cr(r))return null;if(!Cr(i))return null;let o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,f=n?0:i-1,d=n?1:-1,h=e[t+f];for(f+=d,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+f],f+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+f],f+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)}function us(e,t=0,n=!0,r=52,i=8){return cs(e,t,n,r,i)}function fs(e,t,n,r,i,o){if(!Me(e))return null;if(!ls(t))return null;if(!Cr(n))return null;if(!Ie(r))return null;if(!Cr(i))return null;if(!Cr(o))return null;let a,s,l;e=xr(e);let c=8*o-i-1,u=(1<<c)-1,f=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?o-1:0,p=r?-1:1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(e*l-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+h]=255&a,h+=p,a/=256,c-=8);return t[n+h-p]|=128*g,null}function ds(e,t,n=0,r=!0,i=52,o=8){return fs(e,t,n,r,i,o)}function hs(e,t,n=[],r={}){let i=r.ms;return Wi(i)||(i=1),i=Yi(i),i=Math.min(i,Ri),setTimeout(()=>{Pi(e,t,n,r)},i)}function ps(e=10){Me(e)||(e=10),e=Math.min(e,Ri);let t=_a();return setTimeout(function(){t.resolve()},e),t}function gs(e){let t,n=Object.prototype.toString.call(e);if(t="[object Promise]"===n,t)return!0;if("[object Function]"!==n)return!1;try{t="function"!=typeof e.subscribe&&"function"==typeof e.then}catch(e){}return t}async function ms(e,t={}){let n=null,r=_a();if(!Oi(e))return r.reject("waitfunction需輸入函數f"),r;let i=async()=>{let t=e();return gs(t)&&(t=await t),t};if(n=await i(),!0===n)return r.resolve(),r;let o=be(t,"attemptNum",null);Wi(o)||(o=200);let a=be(t,"timeInterval",null);Wi(a)||(a=1e3),a=Math.min(a,Ri);let s=0,l=setInterval(async()=>{s+=1,n=await i(),!0===n&&(clearInterval(l),r.resolve()),s>o&&(clearInterval(l),r.reject(`exceeded attemptNum[${o}]`))},a);return r}function ys(e){return me(e).toLowerCase()}
|
|
8
8
|
/*!
|
|
9
9
|
* decimal.js v10.6.0
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
13
13
|
* MIT Licence
|
|
14
14
|
*/
|
|
15
|
-
var vs,As,bs=9e15,ws=1e9,Is="0123456789abcdef",xs="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Cs="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Bs={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-bs,maxE:bs,crypto:!1},Es=!0,Ss="[DecimalError] ",ks=Ss+"Invalid argument: ",Fs=Ss+"Precision limit exceeded",Ds=Ss+"crypto unavailable",Ns="[object Decimal]",Ms=Math.floor,Ts=Math.pow,Qs=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ls=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Rs=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Us=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Hs=1e7,qs=xs.length-1,Os=Cs.length-1,Ps={toStringTag:Ns};function $s(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=Zs(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=Zs(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function zs(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ks+e)}function js(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=Ts(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==Ts(10,t-2)-1||(s==o/2||0==s)&&!(e[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==Ts(10,t-3)-1,a}function Vs(e,t,n){for(var r,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=Is.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}Ps.absoluteValue=Ps.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),Ws(e)},Ps.ceil=function(){return Ws(new this.constructor(this),this.e+1,2)},Ps.clampedTo=Ps.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(ks+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},Ps.comparedTo=Ps.cmp=function(e){var t,n,r,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,l=o.s,c=e.s;if(!a||!s)return l&&c?l!==c?l:a===s?0:!a^l<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?l:s[0]?-c:0;if(l!==c)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(t=0,n=(r=a.length)<(i=s.length)?r:i;t<n;++t)if(a[t]!==s[t])return a[t]>s[t]^l<0?1:-1;return r===i?0:r>i^l<0?1:-1},Ps.cosine=Ps.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?i=(1/cl(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=ll(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,ul(r,n)),r.precision=e,r.rounding=t,Ws(2==As||3==As?n.neg():n,e,t,!0)):new r(1):new r(NaN)},Ps.cubeRoot=Ps.cbrt=function(){var e,t,n,r,i,o,a,s,l,c,u=this,f=u.constructor;if(!u.isFinite()||u.isZero())return new f(u);for(Es=!1,(o=u.s*Ts(u.s*u,1/3))&&Math.abs(o)!=1/0?r=new f(o.toString()):(n=$s(u.d),(o=((e=u.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Ts(n,1/3),e=Ms((e+1)/3)-(e%3==(e<0?-1:2)),(r=new f(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=u.s),a=(e=f.precision)+3;;)if(c=(l=(s=r).times(s).times(s)).plus(u),r=Ys(c.plus(u).times(s),c.plus(l),a+2,1),$s(s.d).slice(0,a)===(n=$s(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(Ws(r,e+1,1),t=!r.times(r).times(r).eq(u));break}if(!i&&(Ws(s,e+1,0),s.times(s).times(s).eq(u))){r=s;break}a+=4,i=1}return Es=!0,Ws(r,e,f.rounding,t)},Ps.decimalPlaces=Ps.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-Ms(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},Ps.dividedBy=Ps.div=function(e){return Ys(this,new this.constructor(e))},Ps.dividedToIntegerBy=Ps.divToInt=function(e){var t=this.constructor;return Ws(Ys(this,new t(e),0,1,1),t.precision,t.rounding)},Ps.equals=Ps.eq=function(e){return 0===this.cmp(e)},Ps.floor=function(){return Ws(new this.constructor(this),this.e+1,3)},Ps.greaterThan=Ps.gt=function(e){return this.cmp(e)>0},Ps.greaterThanOrEqualTo=Ps.gte=function(e){var t=this.cmp(e);return 1==t||0===t},Ps.hyperbolicCosine=Ps.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/cl(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=ll(a,1,o.times(t),new a(1),!0);for(var l,c=e,u=new a(8);c--;)l=o.times(o),o=s.minus(l.times(u.minus(l.times(u))));return Ws(o,a.precision=n,a.rounding=r,!0)},Ps.hyperbolicSine=Ps.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=ll(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=ll(o,2,i=i.times(1/cl(5,e)),i,!0);for(var a,s=new o(5),l=new o(16),c=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(l.times(a).plus(c))))}return o.precision=t,o.rounding=n,Ws(i,t,n,!0)},Ps.hyperbolicTangent=Ps.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,Ys(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},Ps.inverseCosine=Ps.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return-1!==n?0===n?e.isNeg()?Xs(t,r,i):new t(0):new t(NaN):e.isZero()?Xs(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2))},Ps.inverseHyperbolicCosine=Ps.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Es=!1,n=n.times(n).minus(1).sqrt().plus(n),Es=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},Ps.inverseHyperbolicSine=Ps.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Es=!1,n=n.times(n).plus(1).sqrt().plus(n),Es=!0,r.precision=e,r.rounding=t,n.ln())},Ps.inverseHyperbolicTangent=Ps.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?Ws(new o(i),e,t,!0):(o.precision=n=r-i.e,i=Ys(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},Ps.inverseSine=Ps.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=Xs(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},Ps.inverseTangent=Ps.atan=function(){var e,t,n,r,i,o,a,s,l,c=this,u=c.constructor,f=u.precision,d=u.rounding;if(c.isFinite()){if(c.isZero())return new u(c);if(c.abs().eq(1)&&f+4<=Os)return(a=Xs(u,f+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new u(NaN);if(f+4<=Os)return(a=Xs(u,f+4,d).times(.5)).s=c.s,a}for(u.precision=s=f+10,u.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Es=!1,t=Math.ceil(s/7),r=1,l=c.times(c),a=new u(c),i=c;-1!==e;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),Es=!0,Ws(a,u.precision=f,u.rounding=d,!0)},Ps.isFinite=function(){return!!this.d},Ps.isInteger=Ps.isInt=function(){return!!this.d&&Ms(this.e/7)>this.d.length-2},Ps.isNaN=function(){return!this.s},Ps.isNegative=Ps.isNeg=function(){return this.s<0},Ps.isPositive=Ps.isPos=function(){return this.s>0},Ps.isZero=function(){return!!this.d&&0===this.d[0]},Ps.lessThan=Ps.lt=function(e){return this.cmp(e)<0},Ps.lessThanOrEqualTo=Ps.lte=function(e){return this.cmp(e)<1},Ps.logarithm=Ps.log=function(e){var t,n,r,i,o,a,s,l,c=this,u=c.constructor,f=u.precision,d=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new u(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Es=!1,a=il(c,s=f+5),r=t?_s(u,s+10):il(e,s),js((l=Ys(a,r,s,1)).d,i=f,d))do{if(a=il(c,s+=10),r=t?_s(u,s+10):il(e,s),l=Ys(a,r,s,1),!o){+$s(l.d).slice(i+1,i+15)+1==1e14&&(l=Ws(l,f+1,0));break}}while(js(l.d,i+=10,d));return Es=!0,Ws(l,f,d)},Ps.minus=Ps.sub=function(e){var t,n,r,i,o,a,s,l,c,u,f,d,h=this,p=h.constructor;if(e=new p(e),!h.d||!e.d)return h.s&&e.s?h.d?e.s=-e.s:e=new p(e.d||h.s!==e.s?h:NaN):e=new p(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.plus(e);if(c=h.d,d=e.d,s=p.precision,l=p.rounding,!c[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!c[0])return new p(3===l?-0:0);e=new p(h)}return Es?Ws(e,s,l):e}if(n=Ms(e.e/7),u=Ms(h.e/7),c=c.slice(),o=u-n){for((f=o<0)?(t=c,o=-o,a=d.length):(t=d,n=u,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((f=(r=c.length)<(a=d.length))&&(a=r),r=0;r<a;r++)if(c[r]!=d[r]){f=c[r]<d[r];break}o=0}for(f&&(t=c,c=d,d=t,e.s=-e.s),a=c.length,r=d.length-a;r>0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r]<d[r]){for(i=r;i&&0===c[--i];)c[i]=Hs-1;--c[i],c[r]+=Hs}c[r]-=d[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(e.d=c,e.e=Js(c,n),Es?Ws(e,s,l):e):new p(3===l?-0:0)},Ps.modulo=Ps.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?Ws(new r(n),r.precision,r.rounding):(Es=!1,9==r.modulo?(t=Ys(n,e.abs(),0,3,1)).s*=e.s:t=Ys(n,e,0,r.modulo,1),t=t.times(e),Es=!0,n.minus(t))},Ps.naturalExponential=Ps.exp=function(){return rl(this)},Ps.naturalLogarithm=Ps.ln=function(){return il(this)},Ps.negated=Ps.neg=function(){var e=new this.constructor(this);return e.s=-e.s,Ws(e)},Ps.plus=Ps.add=function(e){var t,n,r,i,o,a,s,l,c,u,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new d(e.d||f.s===e.s?f:NaN)):e=new d(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(c=f.d,u=e.d,s=d.precision,l=d.rounding,!c[0]||!u[0])return u[0]||(e=new d(f)),Es?Ws(e,s,l):e;if(o=Ms(f.e/7),r=Ms(e.e/7),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,a=u.length):(n=u,r=o,a=c.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=u.length)<0&&(i=a,n=u,u=c,c=n),t=0;i;)t=(c[--i]=c[i]+u[i]+t)/Hs|0,c[i]%=Hs;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=Js(c,r),Es?Ws(e,s,l):e},Ps.precision=Ps.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(ks+e);return n.d?(t=Ks(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},Ps.round=function(){var e=this,t=e.constructor;return Ws(new t(e),e.e+1,t.rounding)},Ps.sine=Ps.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:ll(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/cl(5,n)),t=ll(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,ul(r,n)),r.precision=e,r.rounding=t,Ws(As>2?n.neg():n,e,t,!0)):new r(NaN)},Ps.squareRoot=Ps.sqrt=function(){var e,t,n,r,i,o,a=this,s=a.d,l=a.e,c=a.s,u=a.constructor;if(1!==c||!s||!s[0])return new u(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(Es=!1,0==(c=Math.sqrt(+a))||c==1/0?(((t=$s(s)).length+l)%2==0&&(t+="0"),c=Math.sqrt(t),l=Ms((l+1)/2)-(l<0||l%2),r=new u(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new u(c.toString()),n=(l=u.precision)+3;;)if(r=(o=r).plus(Ys(a,o,n+2,1)).times(.5),$s(o.d).slice(0,n)===(t=$s(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Ws(r,l+1,1),e=!r.times(r).eq(a));break}if(!i&&(Ws(o,l+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Es=!0,Ws(r,l,u.rounding,e)},Ps.tangent=Ps.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=Ys(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,Ws(2==As||4==As?n.neg():n,e,t,!0)):new r(NaN)},Ps.times=Ps.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,f=u.constructor,d=u.d,h=(e=new f(e)).d;if(e.s*=u.s,!(d&&d[0]&&h&&h[0]))return new f(!e.s||d&&!d[0]&&!h||h&&!h[0]&&!d?NaN:d&&h?0*e.s:e.s/0);for(n=Ms(u.e/7)+Ms(e.e/7),(l=d.length)<(c=h.length)&&(o=d,d=h,h=o,a=l,l=c,c=a),o=[],r=a=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+h[r]*d[i-r-1]+t,o[i--]=s%Hs|0,t=s/Hs|0;o[i]=(o[i]+t)%Hs|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=Js(o,n),Es?Ws(e,f.precision,f.rounding):e},Ps.toBinary=function(e,t){return fl(this,2,e,t)},Ps.toDecimalPlaces=Ps.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(zs(e,0,ws),void 0===t?t=r.rounding:zs(t,0,8),Ws(n,e+n.e+1,t))},Ps.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=Gs(r,!0):(zs(e,0,ws),void 0===t?t=i.rounding:zs(t,0,8),n=Gs(r=Ws(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},Ps.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=Gs(i):(zs(e,0,ws),void 0===t?t=o.rounding:zs(t,0,8),n=Gs(r=Ws(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},Ps.toFraction=function(e){var t,n,r,i,o,a,s,l,c,u,f,d,h=this,p=h.d,g=h.constructor;if(!p)return new g(h);if(c=n=new g(1),r=l=new g(0),a=(o=(t=new g(r)).e=Ks(p)-h.e-1)%7,t.d[0]=Ts(10,a<0?7+a:a),null==e)e=o>0?t:c;else{if(!(s=new g(e)).isInt()||s.lt(c))throw Error(ks+s);e=s.gt(t)?o>0?t:c:s}for(Es=!1,s=new g($s(p)),u=g.precision,g.precision=o=7*p.length*2;f=Ys(s,t,0,1,1),1!=(i=n.plus(f.times(r))).cmp(e);)n=r,r=i,i=c,c=l.plus(f.times(i)),l=i,i=t,t=s.minus(f.times(i)),s=i;return i=Ys(e.minus(n),r,0,1,1),l=l.plus(i.times(c)),n=n.plus(i.times(r)),l.s=c.s=h.s,d=Ys(c,r,o,1).minus(h).abs().cmp(Ys(l,n,o,1).minus(h).abs())<1?[c,r]:[l,n],g.precision=u,Es=!0,d},Ps.toHexadecimal=Ps.toHex=function(e,t){return fl(this,16,e,t)},Ps.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:zs(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(Es=!1,n=Ys(n,e,0,t,1).times(e),Es=!0,Ws(n)):(e.s=n.s,n=e),n},Ps.toNumber=function(){return+this},Ps.toOctal=function(e,t){return fl(this,8,e,t)},Ps.toPower=Ps.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=+(e=new l(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new l(Ts(+s,c));if((s=new l(s)).eq(1))return s;if(r=l.precision,o=l.rounding,e.eq(1))return Ws(s,r,o);if((t=Ms(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=el(l,s,n,r),e.s<0?new l(1).div(i):Ws(i,r,o);if((a=s.s)<0){if(t<e.d.length-1)return new l(NaN);if(1&e.d[t]||(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(n=Ts(+s,c))&&isFinite(n)?new l(n+"").e:Ms(c*(Math.log("0."+$s(s.d))/Math.LN10+s.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(Es=!1,l.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=rl(e.times(il(s,r+n)),r)).d&&js((i=Ws(i,r+5,1)).d,r,o)&&(t=r+10,+$s((i=Ws(rl(e.times(il(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=Ws(i,r+1,0))),i.s=a,Es=!0,l.rounding=o,Ws(i,r,o))},Ps.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=Gs(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(zs(e,1,ws),void 0===t?t=i.rounding:zs(t,0,8),n=Gs(r=Ws(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},Ps.toSignificantDigits=Ps.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(zs(e,1,ws),void 0===t?t=n.rounding:zs(t,0,8)),Ws(new n(this),e,t)},Ps.toString=function(){var e=this,t=e.constructor,n=Gs(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},Ps.truncated=Ps.trunc=function(){return Ws(new this.constructor(this),this.e+1,1)},Ps.valueOf=Ps.toJSON=function(){var e=this,t=e.constructor,n=Gs(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var Ys=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a,s,l){var c,u,f,d,h,p,g,m,y,v,A,b,w,I,x,C,B,E,S,k,F=r.constructor,D=r.s==i.s?1:-1,N=r.d,M=i.d;if(!(N&&N[0]&&M&&M[0]))return new F(r.s&&i.s&&(N?!M||N[0]!=M[0]:M)?N&&0==N[0]||!M?0*D:D/0:NaN);for(l?(h=1,u=r.e-i.e):(l=Hs,h=7,u=Ms(r.e/h)-Ms(i.e/h)),S=M.length,B=N.length,v=(y=new F(D)).d=[],f=0;M[f]==(N[f]||0);f++);if(M[f]>(N[f]||0)&&u--,null==o?(I=o=F.precision,a=F.rounding):I=s?o+(r.e-i.e)+1:o,I<0)v.push(1),p=!0;else{if(I=I/h+2|0,f=0,1==S){for(d=0,M=M[0],I++;(f<B||d)&&I--;f++)x=d*l+(N[f]||0),v[f]=x/M|0,d=x%M|0;p=d||f<B}else{for((d=l/(M[0]+1)|0)>1&&(M=e(M,d,l),N=e(N,d,l),S=M.length,B=N.length),C=S,b=(A=N.slice(0,S)).length;b<S;)A[b++]=0;(k=M.slice()).unshift(0),E=M[0],M[1]>=l/2&&++E;do{d=0,(c=t(M,A,S,b))<0?(w=A[0],S!=b&&(w=w*l+(A[1]||0)),(d=w/E|0)>1?(d>=l&&(d=l-1),1==(c=t(g=e(M,d,l),A,m=g.length,b=A.length))&&(d--,n(g,S<m?k:M,m,l))):(0==d&&(c=d=1),g=M.slice()),(m=g.length)<b&&g.unshift(0),n(A,g,b,l),-1==c&&(c=t(M,A,S,b=A.length))<1&&(d++,n(A,S<b?k:M,b,l)),b=A.length):0===c&&(d++,A=[0]),v[f++]=d,c&&A[0]?A[b++]=N[C]||0:(A=[N[C]],b=1)}while((C++<B||void 0!==A[0])&&I--);p=void 0!==A[0]}v[0]||v.shift()}if(1==h)y.e=u,vs=p;else{for(f=1,d=v[0];d>=10;d/=10)f++;y.e=f+u*h-1,Ws(y,s?o+y.e+1:o,a,p)}return y}}();function Ws(e,t,n,r){var i,o,a,s,l,c,u,f,d,h=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,s=f[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,l=(u=f[d=0])/Ts(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=f.length)){if(!r)break e;for(;s++<=d;)f.push(0);u=l=0,i=1,a=(o%=7)-7+1}else{for(u=s=f[d],i=1;s>=10;s/=10)i++;l=(a=(o%=7)-7+i)<0?0:u/Ts(10,i-a-1)%10|0}if(r=r||t<0||void 0!==f[d+1]||(a<0?u:u%Ts(10,i-a-1)),c=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?u/Ts(10,i-a):0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=Ts(10,(7-t%7)%7),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=d,s=1,d--):(f.length=d+1,s=Ts(10,7-o),f[d]=a>0?(u/Ts(10,i-a)%Ts(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,f[0]==Hs&&(f[0]=1));break}if(f[d]+=s,f[d]!=Hs)break;f[d--]=0,s=1}for(o=f.length;0===f[--o];)f.pop()}return Es&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e<h.minE&&(e.e=0,e.d=[0])),e}function Gs(e,t,n){if(!e.isFinite())return ol(e);var r,i=e.e,o=$s(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Zs(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Zs(-i-1)+o,n&&(r=n-a)>0&&(o+=Zs(r))):i>=a?(o+=Zs(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Zs(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Zs(r))),o}function Js(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function _s(e,t,n){if(t>qs)throw Es=!0,n&&(e.precision=n),Error(Fs);return Ws(new e(xs),t,1,!0)}function Xs(e,t,n){if(t>Os)throw Error(Fs);return Ws(new e(Cs),t,n,!0)}function Ks(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function Zs(e){for(var t="";e--;)t+="0";return t}function el(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(Es=!1;;){if(n%2&&dl((o=o.times(t)).d,a)&&(i=!0),0===(n=Ms(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}dl((t=t.times(t)).d,a)}return Es=!0,o}function tl(e){return 1&e.d[e.d.length-1]}function nl(e,t,n){for(var r,i,o=new e(t[0]),a=0;++a<t.length;){if(!(i=new e(t[a])).s){o=i;break}((r=o.cmp(i))===n||0===r&&o.s===n)&&(o=i)}return o}function rl(e,t){var n,r,i,o,a,s,l,c=0,u=0,f=0,d=e.constructor,h=d.rounding,p=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(Es=!1,l=p):l=t,s=new d(.03125);e.e>-2;)e=e.times(s),f+=5;for(l+=r=Math.log(Ts(2,f))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=l;;){if(o=Ws(o.times(e),l,1),n=n.times(++u),$s((s=a.plus(Ys(o,n,l,1))).d).slice(0,l)===$s(a.d).slice(0,l)){for(i=f;i--;)a=Ws(a.times(a),l,1);if(null!=t)return d.precision=p,a;if(!(c<3&&js(a.d,l-r,h,c)))return Ws(a,d.precision=p,h,Es=!0);d.precision=l+=10,n=o=s=new d(1),u=0,c++}a=s}}function il(e,t){var n,r,i,o,a,s,l,c,u,f,d,h=1,p=e,g=p.d,m=p.constructor,y=m.rounding,v=m.precision;if(p.s<0||!g||!g[0]||!p.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=p.s?NaN:g?0:p);if(null==t?(Es=!1,u=v):u=t,m.precision=u+=10,r=(n=$s(g)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=_s(m,u+2,v).times(o+""),p=il(new m(r+"."+n.slice(1)),u-10).plus(c),m.precision=v,null==t?Ws(p,v,y,Es=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=$s((p=p.times(e)).d)).charAt(0),h++;for(o=p.e,r>1?(p=new m("0."+n),o++):p=new m(r+"."+n.slice(1)),f=p,l=a=p=Ys(p.minus(1),p.plus(1),u,1),d=Ws(p.times(p),u,1),i=3;;){if(a=Ws(a.times(d),u,1),$s((c=l.plus(Ys(a,new m(i),u,1))).d).slice(0,u)===$s(l.d).slice(0,u)){if(l=l.times(2),0!==o&&(l=l.plus(_s(m,u+2,v).times(o+""))),l=Ys(l,new m(h),u,1),null!=t)return m.precision=v,l;if(!js(l.d,u-10,y,s))return Ws(l,m.precision=v,y,Es=!0);m.precision=u+=10,c=a=p=Ys(f.minus(1),f.plus(1),u,1),d=Ws(p.times(p),u,1),i=s=1}l=c,i+=2}}function ol(e){return String(e.s*e.s/0)}function al(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),Es&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function sl(e,t){var n,r,i,o,a,s,l,c,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Us.test(t))return al(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ls.test(t))n=16,t=t.toLowerCase();else if(Qs.test(t))n=2;else{if(!Rs.test(t))throw Error(ks+t);n=8}for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=el(r,new r(n),o,2*o)),o=u=(c=Vs(t,n,Hs)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=Js(c,u),e.d=c,Es=!1,a&&(e=Ys(e,i,4*s)),l&&(e=e.times(Math.abs(l)<54?Ts(2,l):Zl.pow(2,l))),Es=!0,e)}function ll(e,t,n,r,i){var o,a,s,l,c=e.precision,u=Math.ceil(c/7);for(Es=!1,l=n.times(n),s=new e(r);;){if(a=Ys(s.times(l),new e(t++*t++),c,1),s=i?r.plus(a):r.minus(a),r=Ys(a.times(l),new e(t++*t++),c,1),void 0!==(a=s.plus(r)).d[u]){for(o=u;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return Es=!0,a.d.length=u+1,a}function cl(e,t){for(var n=e;--t;)n*=e;return n}function ul(e,t){var n,r=t.s<0,i=Xs(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return As=r?4:1,t;if((n=t.divToInt(i)).isZero())As=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return As=tl(n)?r?2:3:r?4:1,t;As=tl(n)?r?1:4:r?3:2}return t.minus(i).abs()}function fl(e,t,n,r){var i,o,a,s,l,c,u,f,d,h=e.constructor,p=void 0!==n;if(p?(zs(n,1,ws),void 0===r?r=h.rounding:zs(r,0,8)):(n=h.precision,r=h.rounding),e.isFinite()){for(p?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(a=(u=Gs(e)).indexOf("."))>=0&&(u=u.replace(".",""),(d=new h(1)).e=u.length-a,d.d=Vs(Gs(d),10,i),d.e=d.d.length),o=l=(f=Vs(u,10,i)).length;0==f[--l];)f.pop();if(f[0]){if(a<0?o--:((e=new h(e)).d=f,e.e=o,f=(e=Ys(e,d,n,r,0,i)).d,o=e.e,c=vs),a=f[n],s=i/2,c=c||void 0!==f[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(e.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&f[n-1]||r===(e.s<0?8:7)),f.length=n,c)for(;++f[--n]>i-1;)f[n]=0,n||(++o,f.unshift(1));for(l=f.length;!f[l-1];--l);for(a=0,u="";a<l;a++)u+=Is.charAt(f[a]);if(p){if(l>1)if(16==t||8==t){for(a=16==t?4:3,--l;l%a;l++)u+="0";for(l=(f=Vs(u,i,t)).length;!f[l-1];--l);for(a=1,u="1.";a<l;a++)u+=Is.charAt(f[a])}else u=u.charAt(0)+"."+u.slice(1);u=u+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)u="0"+u;u="0."+u}else if(++o>l)for(o-=l;o--;)u+="0";else o<l&&(u=u.slice(0,o)+"."+u.slice(o))}else u=p?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=ol(e);return e.s<0?"-"+u:u}function dl(e,t){if(e.length>t)return e.length=t,!0}function hl(e){return new this(e).abs()}function pl(e){return new this(e).acos()}function gl(e){return new this(e).acosh()}function ml(e,t){return new this(e).plus(t)}function yl(e){return new this(e).asin()}function vl(e){return new this(e).asinh()}function Al(e){return new this(e).atan()}function bl(e){return new this(e).atanh()}function wl(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?Xs(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=Xs(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(Ys(e,t,o,1)),t=Xs(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(Ys(e,t,o,1)):(n=Xs(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function Il(e){return new this(e).cbrt()}function xl(e){return Ws(e=new this(e),e.e+1,2)}function Cl(e,t,n){return new this(e).clamp(t,n)}function Bl(e){if(!e||"object"!=typeof e)throw Error(Ss+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,ws,"rounding",0,8,"toExpNeg",-bs,0,"toExpPos",0,bs,"maxE",0,bs,"minE",-bs,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=Bs[n]),void 0!==(r=e[n])){if(!(Ms(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(ks+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=Bs[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(ks+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Ds);this[n]=!0}else this[n]=!1}return this}function El(e){return new this(e).cos()}function Sl(e){return new this(e).cosh()}function kl(e,t){return new this(e).div(t)}function Fl(e){return new this(e).exp()}function Dl(e){return Ws(e=new this(e),e.e+1,3)}function Nl(){var e,t,n=new this(0);for(Es=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return Es=!0,new this(1/0);n=t}return Es=!0,n.sqrt()}function Ml(e){return e instanceof Zl||e&&e.toStringTag===Ns||!1}function Tl(e){return new this(e).ln()}function Ql(e,t){return new this(e).log(t)}function Ll(e){return new this(e).log(2)}function Rl(e){return new this(e).log(10)}function Ul(){return nl(this,arguments,-1)}function Hl(){return nl(this,arguments,1)}function ql(e,t){return new this(e).mod(t)}function Ol(e,t){return new this(e).mul(t)}function Pl(e,t){return new this(e).pow(t)}function $l(e){var t,n,r,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:zs(e,1,ws),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(Ds);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(e%=7,(r=s[--o])&&e&&(i=Ts(10,7-e),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function zl(e){return Ws(e=new this(e),e.e+1,this.rounding)}function jl(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Vl(e){return new this(e).sin()}function Yl(e){return new this(e).sinh()}function Wl(e){return new this(e).sqrt()}function Gl(e,t){return new this(e).sub(t)}function Jl(){var e=0,t=arguments,n=new this(t[e]);for(Es=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return Es=!0,Ws(n,this.precision,this.rounding)}function _l(e){return new this(e).tan()}function Xl(e){return new this(e).tanh()}function Kl(e){return Ws(e=new this(e),e.e+1,1)}Ps[Symbol.for("nodejs.util.inspect.custom")]=Ps.toString,Ps[Symbol.toStringTag]="Decimal";var Zl=Ps.constructor=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,Ml(e))return i.s=e.s,void(Es?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(Es?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):al(i,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),Us.test(e)?al(i,e):sl(i,e);if("bigint"===r)return e<0?(e=-e,i.s=-1):i.s=1,al(i,e.toString());throw Error(ks+e)}if(o.prototype=Ps,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=Bl,o.clone=e,o.isDecimal=Ml,o.abs=hl,o.acos=pl,o.acosh=gl,o.add=ml,o.asin=yl,o.asinh=vl,o.atan=Al,o.atanh=bl,o.atan2=wl,o.cbrt=Il,o.ceil=xl,o.clamp=Cl,o.cos=El,o.cosh=Sl,o.div=kl,o.exp=Fl,o.floor=Dl,o.hypot=Nl,o.ln=Tl,o.log=Ql,o.log10=Rl,o.log2=Ll,o.max=Ul,o.min=Hl,o.mod=ql,o.mul=Ol,o.pow=Pl,o.random=$l,o.round=zl,o.sign=jl,o.sin=Vl,o.sinh=Yl,o.sqrt=Wl,o.sub=Gl,o.sum=Jl,o.tan=_l,o.tanh=Xl,o.trunc=Kl,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(Bs);function ec(e,t=0){if(mo(t)||(t=0),t=Yi(t),!Me(e))return"";return new Zl(e).toDecimalPlaces(t,Zl.ROUND_CEIL).toNumber()}function tc(e,t=0){if(!Me(e))return"";if(!mo(t))return"";return e=xr(e),Vi(e,t).toFixed(t)}function nc(){return"undefined"!=typeof self?self:Ka()?window:"undefined"!=typeof global?global:null}function rc(e){let t=function(){let e=nc();return n||e.xss}();let r=function e(n){return Be(n)||Ee(n)?(An(n,function(t,r){n[r]=e(t)}),n):Fe(n)?t(n,{onIgnoreTagAttr:function(e,n,r,i){if("style"===n)return n+'="'+t.escapeAttrValue(r)+'"'}}):n}(Li(e));return r}function ic(e,t){let n=_a();if(!Be(e)&&!Ee(e))return n.reject("rs is not an array or object"),n;let r=!1;if(Ee(e)){r=!0;let t=[];An(e,(e,n)=>{t.push({k:n,v:e})}),e=t}Oi(t)||(t=function(e){return e});let i=-1,o=[];return e.reduce(function(e,n){return e.then(function(e){o.push(e),i+=1;let a=i,s=n;return r&&(a=n.k,s=n.v),Oi(t)?t(s,a):s})},Promise.resolve()).then(function(e){o.push(e),o=Qa(o),n.resolve(o)}).catch(function(e){n.reject(e)}),n}xs=new Zl(xs),Cs=new Zl(Cs);let oc={},ac={};function sc({tagName:e,path:t,attributes:n={},func:r}){let i=_a();if("done"===oc[t])return i.resolve("loaded"),i;if("loading"===oc[t])return ms(()=>"done"===oc[t]).then(function(){i.resolve("loaded")}),i;oc[t]="loading";let o=document.createElement(e);return An(n,(e,t)=>{o.setAttribute(t,e)}),n.rel&&"stylesheet"===n.rel?(o.setAttribute("href",t),setTimeout(()=>{i.resolve(o),oc[t]="done"},1)):(o.src=t,o.addEventListener("load",()=>{let e;Oi(r)?e=ms(r):(e=_a(),e.resolve()),e.then(()=>ps(500)).then(function(){i.resolve(o),oc[t]="done"})}),o.addEventListener("error",()=>{i.reject(o),oc[t]="done"})),document.getElementsByTagName("head")[0].appendChild(o),i}function lc(e){let t=_a();Be(e)||(e=[e]),An(e,(t,n)=>{ke(t)&&(e[n]={path:t})});let n=Ao(wn(e,"path"),"|");return"done"===ac[n]?(t.resolve("loaded"),t):"loading"===ac[n]?(ms(()=>"done"===ac[n]).then(function(){t.resolve("loaded")}),t):(ac[n]="loading",An(e,(e,t)=>{e.type||(".js"===ia(e.path,3)?e.type="js":".css"===ia(e.path,4)?e.type="css":e.type="unknow")}),ic(e,e=>{let t=_a();if("js"===e.type)t=sc({tagName:"script",path:e.path,attributes:{type:"text/javascript"},func:e.func});else if("css"===e.type)t=sc({tagName:"link",path:e.path,attributes:{rel:"stylesheet"}});else{let n="invalid pathItem.type: "+e.type;console.log(n),t.reject(n)}return t}).finally(()=>{ac[n]="done"}))}function cc(e){return me(e).toUpperCase()}function uc(e,t,n){if(!Fe(e))return"";if(!Fe(t))return"";if(!ke(n))return"";return String(e).replaceAll(t,n)}function fc(e,t,n=1){return Fe(e)&&mo(t)?(n=Wi(n)?Yi(n):1,e.substring(t,t+n)):""}let dc={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function hc(e){return gc(e,1)}function pc(e){return gc(e,360)}function gc(e,t=1){if(e.indexOf("%")>=0){if(!Me(e=uc(e,"%","")))throw new Error("invalid color: value is not a number");e=xr(e)/100}else{if(!Me(e))throw new Error("invalid color: value is not a number");e=xr(e)/t}if(e>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function mc(e){if(!Me(e))throw new Error("invalid color: value is not a number");if((e=xr(e))>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function yc(e,t="rgba"){if(!Be(e))throw new Error("invalid colors array");let n=be(e,0,0),r=be(e,1,0),i=be(e,2,0),o=be(e,3,1);if(4!==ar(t=t.split("")))throw new Error("tar.length !== 4");let a=be(t,0),s=be(t,1),l=be(t,2),c=be(t,3);return{[a]:n,[s]:r,[l]:i,[c]:o}}function vc(e){let t=(e=oa(e,1)).length;if(2===t)e=`${e}${e}${e}ff`;else if(3===t){let t=fc(e,0,1),n=fc(e,1,1),r=fc(e,2,1);e=`${t}${t}${n}${n}${r}${r}ff`}else if(6===t)e=`${e}ff`;else if(8!==t)throw new Error("invalid hex color");function n(e){if(2!==e.length)throw new Error("hex.length of color is not equal to 2");if(!Me(e=parseInt(e,16)))throw new Error("invalid hex of color");return(e=xr(e))/255}return{r:n(fc(e,0,2)),g:n(fc(e,2,2)),b:n(fc(e,4,2)),a:n(fc(e,6,2))}}function Ac(e){return e=yc(e=wn(e,(e,t)=>t<=2?gc(e,255):3===t?mc(e):null),"rgba")}function bc(e){return e=kc(e=yc(e=wn(e,(e,t)=>0===t?pc(e):1===t||2===t?hc(e):3===t?mc(e):null),"hsla"))}function wc(e){return e=Fc(e=yc(e=wn(e,(e,t)=>0===t?pc(e):1===t||2===t?hc(e):3===t?mc(e):null),"hsva"))}function Ic(e){if("transparent"===e)return{r:0,g:0,b:0,a:0};if(function(e){return Te(dc,e)}(e))return vc(e=function(e){return`#${dc[e]}`}(e));if(function(e){return"#"===ra(e,1)&&(!!/[0-9A-Fa-f]{2}/g.test(e)||(!!/[0-9A-Fa-f]{3}/g.test(e)||(!!/[0-9A-Fa-f]{6}/g.test(e)||!!/[0-9A-Fa-f]{8}/g.test(e))))}(e))return vc(e);if(function(e){return"rgb"===ra(e,3)||"rgba"===ra(e,4)}(e))return function(e){return e=uc(e,"rgba",""),e=uc(e,"rgb",""),Ac(na(e=uc(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsl"===ra(e,3)||"hsla"===ra(e,4)}(e))return function(e){return e=uc(e,"hsla",""),e=uc(e,"hsl",""),bc(na(e=uc(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsv"===ra(e,3)||"hsva"===ra(e,4)}(e))return function(e){return e=uc(e,"hsva",""),e=uc(e,"hsv",""),wc(na(e=uc(e=e.replace(/[()]/g,""),","," ")," "))}(e);throw new Error("format of color string is not hex-color, name-color, rgba, hsla, hsva")}function xc(e,t){return!!Te(e,t=ys(t))||!!Te(e,t=cc(t))}function Cc(e,t,n){let r;return r=be(e,t,null),null!==r?r:(r=be(e,t=cc(t),null),null!==r?r:n)}function Bc(e){if(function(e){let t=xc(e,"r"),n=xc(e,"g"),r=xc(e,"b");return t&&n&&r}(e))return function(e){let t=[Cc(e,"r",null),Cc(e,"g",null),Cc(e,"b",null),Cc(e,"a",1)];return t=wn(t,Ta),Ac(t)}(e);if(function(e){let t=xc(e,"h"),n=xc(e,"s"),r=xc(e,"l");return t&&n&&r}(e))return function(e){let t=[Cc(e,"h",null),Cc(e,"s",null),Cc(e,"l",null),Cc(e,"a",1)];return t=wn(t,Ta),bc(t)}(e);if(function(e){let t=xc(e,"h"),n=xc(e,"s"),r=xc(e,"v");return t&&n&&r}(e))return function(e){let t=[Cc(e,"h",null),Cc(e,"s",null),Cc(e,"v",null),Cc(e,"a",1)];return t=wn(t,Ta),wc(t)}(e);throw new Error("color object is not one of rgba, hsla, hsva")}function Ec(e){let t,n,r=e.r,i=e.g,o=e.b,a=Math.max(r,i,o),s=Math.min(r,i,o),l=(a+s)/2;if(a===s)t=n=0;else{let e=a-s;switch(n=l>.5?e/(2-a-s):e/(a+s),a){case r:t=(i-o)/e+(i<o?6:0);break;case i:t=(o-r)/e+2;break;case o:t=(r-i)/e+4}t/=6}return{h:t,s:n,l:l,a:e.a}}function Sc(e){let t,n,r=e.r,i=e.g,o=e.b,a=Math.max(r,i,o),s=Math.min(r,i,o),l=a,c=a-s;if(n=0===a?0:c/a,a===s)t=0;else{switch(a){case r:t=(i-o)/c+(i<o?6:0);break;case i:t=(o-r)/c+2;break;case o:t=(r-i)/c+4}t/=6}return{h:t,s:n,v:l,a:e.a}}function kc(e){let t,n,r,i=e.h,o=e.s,a=e.l;function s(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(0===o)t=n=r=a;else{let e=a<.5?a*(1+o):a+o-a*o,l=2*a-e;t=s(l,e,i+1/3),n=s(l,e,i),r=s(l,e,i-1/3)}return{r:t,g:n,b:r,a:e.a}}function Fc(e){let t,n,r,i=e.h,o=e.s,a=e.v,s=Math.floor(6*i),l=6*i-s,c=a*(1-o),u=a*(1-l*o),f=a*(1-(1-l)*o);switch(s%6){case 0:t=a,n=f,r=c;break;case 1:t=u,n=a,r=c;break;case 2:t=c,n=a,r=f;break;case 3:t=c,n=u,r=a;break;case 4:t=f,n=c,r=a;break;case 5:t=a,n=c,r=u}return{r:t,g:n,b:r,a:e.a}}function Dc(e){let t=Math.round(255*e).toString(16);if(1===t.length)return`0${t}`;if(2===t.length)return t;throw new Error("invalid value")}function Nc(e,t=!0){let n=e.r,r=e.g,i=e.b,o=e.a,a=`${Dc(n)}${Dc(r)}${Dc(i)}`;return t&&(a=`${a}${Dc(o)}`),a}function Mc(e){return Math.min(1,Math.max(0,e))}function Tc(e,t){if(!Fe(t))throw new Error("fmtOutput is not a string");if(!hu[t])throw console.log(`fmtOutput must be [${pt(hu)}]`),new Error("invalid fmtOutput");return e=hu[t](e)}function Qc(e,t,n="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let r=Ec(e);return r.h+=t,r.h=r.h%1,Tc(kc(r),n)}function Lc(e,t,n,r,i="toRgbString"){if(t<0||t>1)throw new Error("w1 < 0 or > 1");if(r<0||r>1)throw new Error("w1 < 0 or > 1");return Tc({r:e.r*t+n.r*r,g:e.g*t+n.g*r,b:e.b*t+n.b*r,a:e.a*t+n.a*r},i)}function Rc(e){return`${Vi(100*e,1)}%`}function Uc(e){return Vi(e,0)}function Hc(e){return Vi(e,3)}function qc(e){return{r:Uc(255*e.r),g:Uc(255*e.g),b:Uc(255*e.b)}}function Oc(e){return`rgb(${Uc(255*e.r)}, ${Uc(255*e.g)}, ${Uc(255*e.b)})`}function Pc(e){return{r:Uc(255*e.r),g:Uc(255*e.g),b:Uc(255*e.b),a:Hc(e.a)}}function $c(e){return`rgba(${Uc(255*e.r)}, ${Uc(255*e.g)}, ${Uc(255*e.b)}, ${Hc(e.a)})`}function zc(e){let t=Ec(e);return{h:Uc(360*t.h),s:Hc(t.s),l:Hc(t.l)}}function jc(e){let t=Ec(e);return`hsl(${Uc(360*t.h)}, ${Hc(t.s)}, ${Hc(t.l)})`}function Vc(e){let t=Ec(e);return{h:Uc(360*t.h),s:Hc(t.s),l:Hc(t.l),a:Hc(t.a)}}function Yc(e){let t=Ec(e);return`hsla(${Uc(360*t.h)}, ${Hc(t.s)}, ${Hc(t.l)}, ${Hc(t.a)})`}function Wc(e){let t=Sc(e);return{h:Uc(360*t.h),s:Hc(t.s),v:Hc(t.v)}}function Gc(e){let t=Sc(e);return`hsv(${Uc(360*t.h)}, ${Hc(t.s)}, ${Hc(t.v)})`}function Jc(e){let t=Sc(e);return{h:Uc(360*t.h),s:Hc(t.s),v:Hc(t.v),a:Hc(t.a)}}function _c(e){let t=Sc(e);return`hsva(${Uc(360*t.h)}, ${Hc(t.s)}, ${Hc(t.v)}, ${Hc(t.a)})`}function Xc(e){return{r:Rc(e.r),g:Rc(e.g),b:Rc(e.b)}}function Kc(e){return`rgb(${Rc(e.r)}, ${Rc(e.g)}, ${Rc(e.b)})`}function Zc(e){return{r:Rc(e.r),g:Rc(e.g),b:Rc(e.b),a:Hc(e.a)}}function eu(e){return`rgba(${Rc(e.r)}, ${Rc(e.g)}, ${Rc(e.b)}, ${Hc(e.a)})`}function tu(e){let t=Ec(e);return{h:Uc(360*t.h),s:Rc(t.s),l:Rc(t.l)}}function nu(e){let t=Ec(e);return`hsl(${Uc(360*t.h)}, ${Rc(t.s)}, ${Rc(t.l)})`}function ru(e){let t=Ec(e);return{h:Uc(360*t.h),s:Rc(t.s),l:Rc(t.l),a:Hc(t.a)}}function iu(e){let t=Ec(e);return`hsla(${Uc(360*t.h)}, ${Rc(t.s)}, ${Rc(t.l)}, ${Hc(t.a)})`}function ou(e){let t=Sc(e);return{h:Uc(360*t.h),s:Rc(t.s),v:Rc(t.v)}}function au(e){let t=Sc(e);return`hsv(${Uc(360*t.h)}, ${Rc(t.s)}, ${Rc(t.v)})`}function su(e){let t=Sc(e);return{h:Uc(360*t.h),s:Rc(t.s),v:Rc(t.v),a:Hc(t.a)}}function lu(e){let t=Sc(e);return`hsva(${Uc(360*t.h)}, ${Rc(t.s)}, ${Rc(t.v)}, ${Hc(t.a)})`}function cu(e){let t=function(e){return Nc(e,!1)}(e);return`#${t}`}function uu(e){return`#${Nc(e)}`}function fu(e){let t=null,n=null,r=null;if(Fe(e))t=ys(ea(e));else{if(!Se(e))throw console.log("color=",e),new Error("color is not a string or an object");n=e}if(null!==t)try{r=Ic(t)}catch(e){throw console.log(e),new Error(`can not parse color: ${t}`)}else if(null!==n)try{r=Bc(n)}catch(e){throw console.log(e),new Error(`can not parse color: ${JSON.stringify(n)}`)}return r}function du(e){if(!Se(e))return console.log("gradient is not an effective object"),e=>`rgb(${255*(e=Math.min(Math.max(e,0),1))},${255*e},${255*e})`;let t=[];return An(e,(e,n)=>{t.push([xr(n),Pc(fu(e)),e])}),t=Na(t,0),function(e){let n=null;for(let r=1;r<t.length;r++){let i=t[r-1][0],o=t[r-1][1],a=t[r][0],s=t[r][1];if(i<=e&&a>=e){let t=(a-e)/(a-i),r=(e-i)/(a-i);n=Lc(fu(o),t,fu(s),r,"toRgbaString");break}}return n}}let hu={toRgb:qc,toRgbString:Oc,toRgba:Pc,toRgbaString:$c,toHsl:zc,toHslString:jc,toHsla:Vc,toHslaString:Yc,toHsv:Wc,toHsvString:Gc,toHsva:Jc,toHsvaString:_c,toRgbP:Xc,toRgbPString:Kc,toRgbaP:Zc,toRgbaPString:eu,toHslP:tu,toHslPString:nu,toHslaP:ru,toHslaPString:iu,toHsvP:ou,toHsvPString:au,toHsvaP:su,toHsvaPString:lu,toHexString:cu,toHex8String:uu};var pu=function(){let e={toRgb:e=>qc(fu(e)),toRgbString:e=>Oc(fu(e)),toRgba:e=>Pc(fu(e)),toRgbaString:e=>$c(fu(e)),toHsl:e=>zc(fu(e)),toHslString:e=>jc(fu(e)),toHsla:e=>Vc(fu(e)),toHslaString:e=>Yc(fu(e)),toHsv:e=>Wc(fu(e)),toHsvString:e=>Gc(fu(e)),toHsva:e=>Jc(fu(e)),toHsvaString:e=>_c(fu(e)),toRgbP:e=>Xc(fu(e)),toRgbPString:e=>Kc(fu(e)),toRgbaP:e=>Zc(fu(e)),toRgbaPString:e=>eu(fu(e)),toHslP:e=>tu(fu(e)),toHslPString:e=>nu(fu(e)),toHslaP:e=>ru(fu(e)),toHslaPString:e=>iu(fu(e)),toHsvP:e=>ou(fu(e)),toHsvPString:e=>au(fu(e)),toHsvaP:e=>su(fu(e)),toHsvaPString:e=>lu(fu(e)),toHexString:e=>cu(fu(e)),toHex8String:e=>uu(fu(e)),modSaturate:(e,t,n)=>function(e,t,n="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let r=Ec(e);return r.s+=t,r.s=Mc(r.s),Tc(kc(r),n)}(fu(e),t,n),modGrey:(e,t)=>function(e,t="toRgbString"){let n=Ec(e);return n.s=0,Tc(kc(n),t)}(fu(e),t),modLighten:(e,t,n)=>function(e,t,n="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let r=Ec(e);return r.l+=t,r.l=Mc(r.l),Tc(kc(r),n)}(fu(e),t,n),modBrighten:(e,t,n)=>function(e,t,n="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");return e.r+=t,e.r=Mc(e.r),e.g+=t,e.g=Mc(e.g),e.b+=t,e.b=Mc(e.b),Tc(e,n)}(fu(e),t,n),modHue:(e,t,n)=>Qc(fu(e),t,n),modComplement:(e,t)=>function(e,t="toRgbString"){return Qc(e,.5,t)}(fu(e),t),spreadHue:(e,t,n)=>function(e,t,n="toRgbString"){if(!Cr(t))throw new Error("num is not an integer");if((t=Yi(t))<=1)return[e];let r=Ec(e),i=1/t,o=[];for(let e=0;e<t;e++)o.push(Tc(kc(r),n)),r.h+=i,r.h=r.h%1;return o}(fu(e),t,n),spreadMonochromatic:(e,t,n)=>function(e,t,n="toRgbString"){if(!Cr(t))throw new Error("num is not an integer");if((t=Yi(t))<=1)return[e];let r=Sc(e);r.s=1,r.l=1;let i=1/t,o=[];for(let e=0;e<t;e++)o.push(Tc(Fc(r),n)),r.h-=i,r.l-=i;return o}(fu(e),t,n),mix:(e,t,n,r,i)=>Lc(fu(e),t,fu(n),r,i),getBrightness:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");return(299*e.r+587*e.g+114*e.b)/1e3}(fu(e)),getLuminance:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");let t,n,r,i=e.r,o=e.g,a=e.b;return t=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4),n=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),r=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),.2126*t+.7152*n+.0722*r}(fu(e)),interp:du};return e}();function gu(e,t,n){return null==e?e:function(e,t,n,r){if(!L(e))return e;for(var i=-1,o=(t=ye(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var l=ve(t[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=a){var u=s[l];void 0===(c=r?r(u,l,s):void 0)&&(c=L(u)?u:Je(t[i+1])?[]:{})}ri(s,l,c),s=s[l]}return e}(e,t,n)}var mu=Function.prototype,yu=Object.prototype,vu=mu.toString,Au=yu.hasOwnProperty,bu=vu.call(Object);function wu(e){if(!D(e)||"[object Object]"!=F(e))return!1;var t=hi(e);if(null===t)return!0;var n=Au.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&vu.call(n)==bu}function Iu(e){return wu(e)?void 0:e}var xu=po(function(e,t){var n={};if(null==e)return n;var r=!1;t=de(t,function(t){return t=ye(t,e),r||(r=t.length>1),t}),ii(e,gi(e),n),r&&(n=Qi(n,7,Iu));for(var i=t.length;i--;)xa(n,t[i]);return n}),Cu=xu;function Bu(e,t={}){let n="$level",r="$parents";if(!Tn(e))return[];let i=be(t,"bindKey",null);Fe(i)||(i="id");let o=be(t,"bindParent",null);Fe(o)||(o="parentId");let a=be(t,"bindChildren",null);Fe(a)||(a="children");let s=be(t,"saveExtProps",null);Ie(s)||(s=!1),e=function(e){let t=[];function a(a){let s=[];An(e,(e,l)=>{let c=be(e,o),u=be(a,i);if(c&&u&&c===u){let o=be(a,r,[]);o=Li(o),o.push(a[i]),t.push({[n]:a[n]+1,[r]:o,...e})}else s.push(e)}),e=s}if(e=Li(e),function(){let i=[];An(e,(e,a)=>{Mn(e[o])?t.push({[n]:0,[r]:[],...e}):i.push(e)}),e=i}(),0===t.length)return t;let s=-1;for(;s+=1,!(s>t.length-1);){if(a(t[s]),0===e.length)break}return t}(e);let l=function(e){let t=[];function l(e){return s?e:Cu(e,[n,r])}let c={};return An(e,(r,s)=>{if(0===r[n]){let e=l(r);t.push(e),c[r[i]]=[s]}else{let n=function(t){for(let n=0;n<e.length;n++){let r=e[n];if(t[o]===r[i])return r}return null}(r);if(null!==n){let e=c[n[i]];e=[...e,a];let o=be(t,e,[]),s=l(r);o.push(s),c[r[i]]=[...e,o.length-1],gu(t,e,o)}else console.log(`can not find parent for ${be(r,o)}`)}}),t}(e);return l}function Eu(e,t=null,n={}){R(t)||(t=e=>e);let r=be(n,"force",!1);return Ie(r)||(r=!1),function(e,t,n=!1){let r=[];if(!Be(e)&&!Ee(e))return t(e,null,[]);function i(e){if(Be(e))return Zi(ar(e));if(Ee(e)){let t=Object.getOwnPropertyNames(e),r=null;return n&&(r=Object.getOwnPropertySymbols(e)),Be(t)||(t=[]),Be(r)||(r=[]),[...t,...r]}return e}return function e(n,o){if(Be(n))return i(n).map(i=>{let o=n[i],a=Li(r);return r.push(i),o=t(o,i,a),o=e(o),r.pop(),o});if(Ee(n)){let o=i(n),a={};return o.map(i=>{let o=n[i],s=Li(r);r.push(i),o=t(o,i,s),o=e(o),r.pop(),a[i]=o}),a}return n}(e)}(e,t,r)}function Su(e,t={}){if(!Se(e)&&!Tn(e))return[];let n=be(t,"bindKey",null);Fe(n)||(n="id");let r=be(t,"bindParent",null);Fe(r)||(r="parentId");let i=be(t,"bindBelong",null);Fe(i)||(i="key");let o=be(t,"bindText",null);Fe(o)||(o="text");let a=be(t,"bindType",null);Fe(a)||(a="type");let s=be(t,"bindNumOfChilren",null);function l(e,t){return e=wn(e=Li(e),e=>N(e)?Ta(e):e),N(t)&&(t=Ta(t)),(Fe(t)||Me(t))&&e.push(t),Ao(e,"-")}Fe(s)||(s="numOfChilren");let c=[];return Eu(e,(e,t,u)=>{let f=l(u,t),d=l(u,null),h="node";Ee(e)?h="object":Be(e)&&(h="array");let p={[n]:f,[r]:d,[a]:h};if((Fe(t)||fa(t))&&(p[i]=t),Ee(e)||Be(e)||(p[o]=e),Ee(e)||Be(e)){let t=null;Ee(e)?t=ar(pt(e)):Be(e)&&(t=ar(e)),p[s]=t}return c.push(p),e},{force:!0}),c}function ku(e){return D(t=e)&&1===t.nodeType&&!wu(t);var t}function Fu(e){if(!ku(e))return"invalid element";let t=!1;try{t=document.activeElement===e}catch(e){console.log(e)}return t}function Du(e){return Me(e)?(e=xr(e),Math.cos(e*Math.PI/180)):null}function Nu(e){return Me(e)?(e=xr(e),Math.tan(e*Math.PI/180)):null}function Mu(){return{sheets:[]}}function Tu(e){return Me(e)?(e=xr(e),Math.sin(e*Math.PI/180)):null}function Qu(e){if(!Fe(e))return!1;let n="YYYY-MM-DD";return e===t(e,n).format(n)}function Lu(e=300){return new function(e){let t=[],n=null,r=Date.now();return Wi(e)||(e=300),e=Yi(e),function(i,...o){Oi(i)?(r=Date.now(),t.push({func:i,input:o}),null===n&&(n=setInterval(()=>{if(0===ar(t))return clearInterval(n),void(n=null);if(Date.now()-r>e){let e=t.pop();t=[];try{e.func(...e.input)}catch(e){console.log("m.func catch",e)}}},10))):console.log("func is not a function")}}(e)}let Ru="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Uu=Ru.length;function Hu(e=32){let t=[];e=Wi(e)?Yi(e):32;for(let n=0;n<e;n++)t[n]=Ru[0|Math.random()*Uu];return t.join("")}function qu(e,t={}){if(!ku(e))return;let n=be(t,"duration",500);n=xr(n),n<0&&(n=1e3);let r=be(t,"delay",0);r=xr(r),r<0&&(r=0);let i=be(t,"opacityIni",0);i=xr(i),i=Math.min(Math.max(i,0),1),Me(e.style.opacity)&&(i=xr(e.style.opacity));let o=10/n,a=`tag-${Hu()}`;e.setAttribute("dom-fade-tag",a),setTimeout(()=>{let t=setInterval(()=>{try{e.getAttribute("dom-fade-tag")!==a&&clearInterval(t),e.style.opacity=i,i>=1&&(clearInterval(t),e.removeAttribute("dom-fade-tag")),i+=o,i>1&&(i=1)}catch(e){console.log(e),clearInterval(t)}},10)},r)}function Ou(e,t={}){if(!ku(e))return;let n=be(t,"duration",500);n=xr(n),n<0&&(n=1e3);let r=be(t,"delay",0);r=xr(r),r<0&&(r=0);let i=be(t,"opacityIni",1);i=xr(i),i=Math.min(Math.max(i,0),1),Me(e.style.opacity)&&(i=xr(e.style.opacity));let o=10/n,a=`tag-${Hu()}`;e.setAttribute("dom-fade-tag",a),setTimeout(()=>{let t=setInterval(()=>{try{e.getAttribute("dom-fade-tag")!==a&&clearInterval(t),e.style.opacity=i,i<=0&&(clearInterval(t),e.removeAttribute("dom-fade-tag")),i-=o,i<0&&(i=0)}catch(e){console.log(e),clearInterval(t)}},10)},r)}let Pu='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 512.001 512.001" style="width:12px; height:12px; enable-background:new 0 0 512.001 512.001;" xml:space="preserve"><g><g><path d="M284.286,256.002L506.143,34.144c7.811-7.811,7.811-20.475,0-28.285c-7.811-7.81-20.475-7.811-28.285,0L256,227.717L34.143,5.859c-7.811-7.811-20.475-7.811-28.285,0c-7.81,7.811-7.811,20.475,0,28.285l221.857,221.857L5.858,477.859c-7.811,7.811-7.811,20.475,0,28.285c3.905,3.905,9.024,5.857,14.143,5.857c5.119,0,10.237-1.952,14.143-5.857L256,284.287l221.857,221.857c3.905,3.905,9.024,5.857,14.143,5.857s10.237-1.952,14.143-5.857c7.811-7.811,7.811-20.475,0-28.285L284.286,256.002z"/></g></g></svg>',$u={success:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 426.667 426.667" style="width:24px; height:24px; enable-background:new 0 0 426.667 426.667" xml:space="preserve"><path style="fill:#6ac259" d="M213.333,0C95.518,0,0,95.514,0,213.333s95.518,213.333,213.333,213.333 c117.828,0,213.333-95.514,213.333-213.333S331.157,0,213.333,0z M174.199,322.918l-93.935-93.931l31.309-31.309l62.626,62.622 l140.894-140.898l31.309,31.309L174.199,322.918z"/></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 496.158 496.158" style="width:24px; height:24px; enable-background:new 0 0 496.158 496.158" xml:space="preserve"><path style="fill:#e04f5f" d="M496.158,248.085c0-137.021-111.07-248.082-248.076-248.082C111.07,0.003,0,111.063,0,248.085 c0,137.002,111.07,248.07,248.082,248.07C385.088,496.155,496.158,385.087,496.158,248.085z"/><path style="fill:#fff" d="M277.042,248.082l72.528-84.196c7.91-9.182,6.876-23.041-2.31-30.951 c-9.172-7.904-23.032-6.876-30.947,2.306l-68.236,79.212l-68.229-79.212c-7.91-9.188-21.771-10.216-30.954-2.306 c-9.186,7.91-10.214,21.77-2.304,30.951l72.522,84.196l-72.522,84.192c-7.91,9.182-6.882,23.041,2.304,30.951 c4.143,3.569,9.241,5.318,14.316,5.318c6.161,0,12.294-2.586,16.638-7.624l68.229-79.212l68.236,79.212 c4.338,5.041,10.47,7.624,16.637,7.624c5.069,0,10.168-1.749,14.311-5.318c9.186-7.91,10.22-21.77,2.31-30.951L277.042,248.082z"/></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 497.472 497.472" style="width:24px; height:24px; enable-background:new 0 0 497.472 497.472" xml:space="preserve"><g transform="matrix(1.25 0 0 -1.25 0 45)"><path style="fill:#ffcc4d" d="M24.374-357.857c-20.958,0-30.197,15.223-20.548,33.826L181.421,17.928 c9.648,18.603,25.463,18.603,35.123,0L394.14-324.031c9.671-18.603,0.421-33.826-20.548-33.826H24.374z"/><path style="fill:#231f20" d="M173.605-80.922c0,14.814,10.934,23.984,25.395,23.984c14.12,0,25.407-9.512,25.407-23.984 V-216.75c0-14.461-11.287-23.984-25.407-23.984c-14.461,0-25.395,9.182-25.395,23.984V-80.922z M171.489-289.056 c0,15.167,12.345,27.511,27.511,27.511c15.167,0,27.523-12.345,27.523-27.511c0-15.178-12.356-27.523-27.523-27.523 C183.834-316.579,171.489-304.234,171.489-289.056"/></g></svg>',infor:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 496.16 496.16" style="width:24px; height:24px; enable-background:new 0 0 496.158 496.158;" xml:space="preserve"><path d="m496.16 248.08c0-137.02-111.07-248.08-248.08-248.08-137.01 0-248.08 111.06-248.08 248.08 0 137 111.07 248.07 248.08 248.07 137.01 0 248.08-111.07 248.08-248.07z" fill="#25B7D3"/><g fill="#fff"><path d="m315.25 359.56c-1.387-2.032-4.048-2.755-6.27-1.702-24.582 11.637-52.482 23.94-57.958 25.015-0.138-0.123-0.357-0.348-0.644-0.737-0.742-1.005-1.103-2.318-1.103-4.015 0-13.905 10.495-56.205 31.192-125.72 17.451-58.406 19.469-70.499 19.469-74.514 0-6.198-2.373-11.435-6.865-15.146-4.267-3.519-10.229-5.302-17.719-5.302-12.459 0-26.899 4.73-44.146 14.461-16.713 9.433-35.352 25.41-55.396 47.487-1.569 1.729-1.733 4.314-0.395 6.228 1.34 1.915 3.825 2.644 5.986 1.764 7.037-2.872 42.402-17.359 47.557-20.597 4.221-2.646 7.875-3.989 10.861-3.989 0.107 0 0.199 4e-3 0.276 0.01 0.036 0.198 0.07 0.5 0.07 0.933 0 3.047-0.627 6.654-1.856 10.703-30.136 97.641-44.785 157.5-44.785 182.99 0 8.998 2.501 16.242 7.432 21.528 5.025 5.393 11.803 8.127 20.146 8.127 8.891 0 19.712-3.714 33.08-11.354 12.936-7.392 32.68-23.653 60.363-49.717 1.793-1.687 2.092-4.426 0.705-6.458z"/><path d="m314.28 76.672c-4.925-5.041-11.227-7.597-18.729-7.597-9.34 0-17.475 3.691-24.176 10.971-6.594 7.16-9.938 15.946-9.938 26.113 0 8.033 2.463 14.69 7.32 19.785 4.922 5.172 11.139 7.794 18.476 7.794 8.958 0 17.049-3.898 24.047-11.586 6.876-7.553 10.363-16.433 10.363-26.393 1e-3 -7.654-2.476-14.075-7.363-19.087z"/></g></svg>',cancel:Pu},zu={},ju=null,Vu=nc();function Yu(){An(["top-right","top-left","bottom-right","bottom-left"],e=>{!function(e){let t=sa(zu,{position:e});t=Na(t,"timeStart");let n=16;An(t,e=>{zu[e.id].ele||(zu[e.id].ele=document.querySelector(`#${e.id}`)),zu[e.id].loc.top=n,zu[e.id].loc.height=zu[e.id].ele.offsetHeight,n+=zu[e.id].loc.height+16}),An(t,t=>{e.indexOf("bottom-")>=0?(zu[t.id].ele.style.bottom=`${zu[t.id].loc.top}px`,zu[t.id].loc.bottom=zu[t.id].loc.top):zu[t.id].ele.style.top=`${zu[t.id].loc.top}px`,e.indexOf("-left")>=0?(zu[t.id].ele.style.left="16px",zu[t.id].loc.left=16):(zu[t.id].ele.style.right="16px",zu[t.id].loc.right=16),zu[t.id].ele.style.zIndex=2e5,zu[t.id].ele.style.opacity=1,zu[t.id].ele.style.transform="",zu[t.id].ele.style.transform=null})}(e)})}function Wu(e){zu[e].ele&&zu[e].ele.parentNode.removeChild(zu[e].ele),zu[e]&&delete zu[e],Yu()}function Gu(e,t){if(!ku(e))return"invalid eleParent";if(ke(t))e.insertAdjacentHTML("beforeend",t);else{if(!ku(t))return"invalid itemChild";e.appendChild(t)}}function Ju(){return null!==navigator.userAgent.toLowerCase().match(/rv:([\d.]+)\) like gecko/)}function _u(e){if(!e)return"invalid event";if(!e.cancelable)return"event is not cancelable";try{Ju()?e.cancelBubble=!0:e.stopPropagation(),e.preventDefault()}catch(e){}}var Xu;Vu.ttWAlertCancel=function(e){Wu(e)},Vu.ttWAlertFadeIn=function(e){qu(document.querySelector(`#${e}`))},Vu.ttWAlertFadeOut=function(e){Ou(document.querySelector(`#${e}`))},function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"}(Xu||(Xu={}));var Ku;!function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"}(Ku||(Ku={}));const Zu=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");function ef(e){return e?e.replace(/\\/g,"/"):e}function tf(e){const t=e.length;let n=-1/0;for(let r=0;r<t;r++)n=Math.max(n,e[r]);return n}function nf(e,t){const n=e.split(".");return n.length>1?n[n.length-1]:t}function rf(e,t){return t.reduce((t,n)=>t||e.startsWith(n),!1)}const of=["a/","b/","i/","w/","c/","o/"];function af(e,t,n){const r=void 0!==n?[...of,n]:of,i=t?new RegExp(`^${o=t,o.replace(Zu,"\\$&")} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$');var o;const[,a=""]=i.exec(e)||[],s=r.find(e=>0===a.indexOf(e));return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function sf(e,t={}){const n=[];let r=null,i=null,o=null,a=null,s=null,l=null,c=null;const u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,g=/^deleted file mode (\d{6})/,m=/^new file mode (\d{6})/,y=/^copy from "?(.+)"?/,v=/^copy to "?(.+)"?/,A=/^rename from "?(.+)"?/,b=/^rename to "?(.+)"?/,w=/^similarity index (\d+)%/,I=/^dissimilarity index (\d+)%/,x=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,C=/^Binary files (.*) and (.*) differ/,B=/^GIT binary patch/,E=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,S=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,k=/^new file mode (\d{6})/,F=/^deleted file mode (\d{6}),(\d{6})/,D=e.replace(/\/g,"").replace(/\r\n?/g,"\n").split("\n");function N(){null!==i&&null!==r&&(r.blocks.push(i),i=null)}function M(){null!==r&&(r.oldName||null===l||(r.oldName=l),r.newName||null===c||(r.newName=c),r.newName&&(n.push(r),r=null)),l=null,c=null}function T(){N(),M(),r={blocks:[],deletedLines:0,addedLines:0}}function Q(e){let t;N(),null!==r&&((t=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))?(r.isCombined=!1,o=parseInt(t[1],10),s=parseInt(t[2],10)):(t=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))?(r.isCombined=!0,o=parseInt(t[1],10),a=parseInt(t[2],10),s=parseInt(t[3],10)):(e.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),o=0,s=0,r.isCombined=!1)),i={lines:[],oldStartLine:o,oldStartLine2:a,newStartLine:s,header:e}}return D.forEach((e,a)=>{if(!e||e.startsWith("*"))return;let N;const M=D[a-1],L=D[a+1],R=D[a+2];if(e.startsWith("diff --git")||e.startsWith("diff --combined")){T();if((N=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(e))&&(l=af(N[1],void 0,t.dstPrefix),c=af(N[2],void 0,t.srcPrefix)),null===r)throw new Error("Where is my file !!!");return void(r.isGitDiff=!0)}if(e.startsWith("Binary files")&&!(null==r?void 0:r.isGitDiff)){T();if((N=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(e))&&(l=af(N[1],void 0,t.dstPrefix),c=af(N[2],void 0,t.srcPrefix)),null===r)throw new Error("Where is my file !!!");return void(r.isBinary=!0)}if((!r||!r.isGitDiff&&r&&e.startsWith(u)&&L.startsWith(f)&&R.startsWith(d))&&T(),null==r?void 0:r.isTooBig)return;if(r&&("number"==typeof t.diffMaxChanges&&r.addedLines+r.deletedLines>t.diffMaxChanges||"number"==typeof t.diffMaxLineLength&&e.length>t.diffMaxLineLength)){r.isTooBig=!0,r.addedLines=0,r.deletedLines=0,r.blocks=[],i=null;return void Q("function"==typeof t.diffTooBigMessage?t.diffTooBigMessage(n.length):"Diff too big to be displayed")}if(e.startsWith(u)&&L.startsWith(f)||e.startsWith(f)&&M.startsWith(u)){if(r&&!r.oldName&&e.startsWith("--- ")&&(N=function(e,t){return af(e,"---",t)}(e,t.srcPrefix)))return r.oldName=N,void(r.language=nf(r.oldName,r.language));if(r&&!r.newName&&e.startsWith("+++ ")&&(N=function(e,t){return af(e,"+++",t)}(e,t.dstPrefix)))return r.newName=N,void(r.language=nf(r.newName,r.language))}if(r&&(e.startsWith(d)||r.isGitDiff&&r.oldName&&r.newName&&!i))return void Q(e);if(i&&(e.startsWith("+")||e.startsWith("-")||e.startsWith(" ")))return void function(e){if(null===r||null===i||null===o||null===s)return;const t={content:e},n=r.isCombined?["+ "," +","++"]:["+"],a=r.isCombined?["- "," -","--"]:["-"];rf(e,n)?(r.addedLines++,t.type=Xu.INSERT,t.oldNumber=void 0,t.newNumber=s++):rf(e,a)?(r.deletedLines++,t.type=Xu.DELETE,t.oldNumber=o++,t.newNumber=void 0):(t.type=Xu.CONTEXT,t.oldNumber=o++,t.newNumber=s++),i.lines.push(t)}(e);const U=!function(e,t){let n=t;for(;n<D.length-3;){if(e.startsWith("diff"))return!1;if(D[n].startsWith(u)&&D[n+1].startsWith(f)&&D[n+2].startsWith(d))return!0;n++}return!1}(e,a);if(null===r)throw new Error("Where is my file !!!");(N=h.exec(e))?r.oldMode=N[1]:(N=p.exec(e))?r.newMode=N[1]:(N=g.exec(e))?(r.deletedFileMode=N[1],r.isDeleted=!0):(N=m.exec(e))?(r.newFileMode=N[1],r.isNew=!0):(N=y.exec(e))?(U&&(r.oldName=N[1]),r.isCopy=!0):(N=v.exec(e))?(U&&(r.newName=N[1]),r.isCopy=!0):(N=A.exec(e))?(U&&(r.oldName=N[1]),r.isRename=!0):(N=b.exec(e))?(U&&(r.newName=N[1]),r.isRename=!0):(N=C.exec(e))?(r.isBinary=!0,r.oldName=af(N[1],void 0,t.srcPrefix),r.newName=af(N[2],void 0,t.dstPrefix),Q("Binary file")):B.test(e)?(r.isBinary=!0,Q(e)):(N=w.exec(e))?r.unchangedPercentage=parseInt(N[1],10):(N=I.exec(e))?r.changedPercentage=parseInt(N[1],10):(N=x.exec(e))?(r.checksumBefore=N[1],r.checksumAfter=N[2],N[3]&&(r.mode=N[3])):(N=E.exec(e))?(r.checksumBefore=[N[2],N[3]],r.checksumAfter=N[1]):(N=S.exec(e))?(r.oldMode=[N[2],N[3]],r.newMode=N[1]):(N=k.exec(e))?(r.newFileMode=N[1],r.isNew=!0):(N=F.exec(e))&&(r.deletedFileMode=N[1],r.isDeleted=!0)}),N(),M(),n}class lf{diff(e,t,n={}){let r;"function"==typeof n?(r=n,n={}):"callback"in n&&(r=n.callback);const i=this.castInput(e,n),o=this.castInput(t,n),a=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(a,s,n,r)}diffWithOptionsObj(e,t,n,r){var i;const o=e=>(e=this.postProcess(e,n),r?void setTimeout(function(){r(e)},0):e),a=t.length,s=e.length;let l=1,c=a+s;null!=n.maxEditLength&&(c=Math.min(c,n.maxEditLength));const u=null!==(i=n.timeout)&&void 0!==i?i:1/0,f=Date.now()+u,d=[{oldPos:-1,lastComponent:void 0}];let h=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=s&&h+1>=a)return o(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,g=1/0;const m=()=>{for(let r=Math.max(p,-l);r<=Math.min(g,l);r+=2){let i;const l=d[r-1],c=d[r+1];l&&(d[r-1]=void 0);let u=!1;if(c){const e=c.oldPos-r;u=c&&0<=e&&e<a}const f=l&&l.oldPos+1<s;if(u||f){if(i=!f||u&&l.oldPos<c.oldPos?this.addToPath(c,!0,!1,0,n):this.addToPath(l,!1,!0,1,n),h=this.extractCommon(i,t,e,r,n),i.oldPos+1>=s&&h+1>=a)return o(this.buildValues(i.lastComponent,t,e))||!0;d[r]=i,i.oldPos+1>=s&&(g=Math.min(g,r-1)),h+1>=a&&(p=Math.max(p,r+1))}else d[r]=void 0}l++};if(r)!function e(){setTimeout(function(){if(l>c||Date.now()>f)return r(void 0);m()||e()},0)}();else for(;l<=c&&Date.now()<=f;){const e=m();if(e)return e}}addToPath(e,t,n,r,i){const o=e.lastComponent;return o&&!i.oneChangePerToken&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}}extractCommon(e,t,n,r,i){const o=t.length,a=n.length;let s=e.oldPos,l=s-r,c=0;for(;l+1<o&&s+1<a&&this.equals(n[s+1],t[l+1],i);)l++,s++,c++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return c&&!i.oneChangePerToken&&(e.lastComponent={count:c,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const r=[];let i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();const o=r.length;let a=0,s=0,l=0;for(;a<o;a++){const e=r[a];if(e.removed)e.value=this.join(n.slice(l,l+e.count)),l+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){const r=n[l+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(l+=e.count)}}return r}}const cf=new class extends lf{};const uf="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";const ff=new class extends lf{tokenize(e){const t=new RegExp(`(\\r?\\n)|[${uf}]+|[^\\S\\n\\r]+|[^${uf}]`,"ug");return e.match(t)||[]}};function df(e){return(t,n)=>{const r=e(t).trim(),i=e(n).trim();return function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const n=[];let r,i;for(r=0;r<=t.length;r++)n[r]=[r];for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}(r,i)/(r.length+i.length)}}function hf(e){return function t(n,r,i=0,o=new Map){const a=function(t,n,r=new Map){let i,o=1/0;for(let a=0;a<t.length;++a)for(let s=0;s<n.length;++s){const l=JSON.stringify([t[a],n[s]]);let c;r.has(l)&&(c=r.get(l))||(c=e(t[a],n[s]),r.set(l,c)),c<o&&(o=c,i={indexA:a,indexB:s,score:o})}return i}(n,r,o);if(!a||n.length+r.length<3)return[[n,r]];const s=n.slice(0,a.indexA),l=r.slice(0,a.indexB),c=[n[a.indexA]],u=[r[a.indexB]],f=a.indexA+1,d=a.indexB+1,h=n.slice(f),p=r.slice(d),g=t(s,l,i+1,o),m=t(c,u,i+1,o),y=t(h,p,i+1,o);let v=m;return(a.indexA>0||a.indexB>0)&&(v=g.concat(v)),(n.length>f||r.length>d)&&(v=v.concat(y)),v}}const pf={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},gf={matching:"none",matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:"word",colorScheme:Ku.LIGHT},mf="/",yf=df(e=>e.value),vf=hf(yf);function Af(e){return-1!==e.indexOf("dev/null")}function bf(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function wf(e){switch(e){case Xu.CONTEXT:return pf.CONTEXT;case Xu.INSERT:return pf.INSERTS;case Xu.DELETE:return pf.DELETES}}function If(e){switch(e){case Ku.DARK:return"d2h-dark-color-scheme";case Ku.AUTO:return"d2h-auto-color-scheme";case Ku.LIGHT:default:return"d2h-light-color-scheme"}}function xf(e){return e.slice(0).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function Cf(e,t,n=!0){const r=function(e){return e?2:1}(t);return{prefix:e.substring(0,r),content:n?xf(e.substring(r)):e.substring(r)}}function Bf(e){const t=ef(e.oldName),n=ef(e.newName);if(t===n||Af(t)||Af(n))return Af(n)?t:n;{const e=[],r=[],i=t.split(mf),o=n.split(mf);let a=0,s=i.length-1,l=o.length-1;for(;a<s&&a<l&&i[a]===o[a];)e.push(o[a]),a+=1;for(;s>a&&l>a&&i[s]===o[l];)r.unshift(o[l]),s-=1,l-=1;const c=e.join(mf),u=r.join(mf),f=i.slice(a,s+1).join(mf),d=o.slice(a,l+1).join(mf);return c.length&&u.length?c+mf+"{"+f+" → "+d+"}"+mf+u:c.length?c+mf+"{"+f+" → "+d+"}":u.length?"{"+f+" → "+d+"}"+mf+u:t+" → "+n}}function Ef(e){return`d2h-${function(e){let t,n,r,i=0;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i|=0;return i}(Bf(e)).toString().slice(-6)}`}function Sf(e){let t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t}function kf(e,t,n,r={}){const{matching:i,maxLineLengthHighlight:o,matchWordsThreshold:a,diffStyle:s}=Object.assign(Object.assign({},gf),r),l=Cf(e,n,!1),c=Cf(t,n,!1);if(l.content.length>o||c.content.length>o)return{oldLine:{prefix:l.prefix,content:xf(l.content)},newLine:{prefix:c.prefix,content:xf(c.content)}};const u="char"===s?(f=l.content,d=c.content,cf.diff(f,d,h)):function(e,t,n){return ff.diff(e,t,n)}(l.content,c.content);var f,d,h;const p=[];if("word"===s&&"words"===i){const e=u.filter(e=>e.removed),t=u.filter(e=>e.added);vf(t,e).forEach(e=>{if(1===e[0].length&&1===e[1].length){yf(e[0][0],e[1][0])<a&&(p.push(e[0][0]),p.push(e[1][0]))}})}const g=u.reduce((e,t)=>{const n=t.added?"ins":t.removed?"del":null,r=p.indexOf(t)>-1?' class="d2h-change"':"",i=xf(t.value);return null!==n?`${e}<${n}${r}>${i}</${n}>`:`${e}${i}`},"");return{oldLine:{prefix:l.prefix,content:(m=g,m.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,""))},newLine:{prefix:c.prefix,content:bf(g)}};var m}const Ff="file-summary",Df={colorScheme:gf.colorScheme};class Nf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Df),t)}render(e){const t=e.map(e=>this.hoganUtils.render(Ff,"line",{fileHtmlId:Ef(e),oldName:e.oldName,newName:e.newName,fileName:Bf(e),deletedLines:"-"+e.deletedLines,addedLines:"+"+e.addedLines},{fileIcon:this.hoganUtils.template("icon",Sf(e))})).join("\n");return this.hoganUtils.render(Ff,"wrapper",{colorScheme:If(this.config.colorScheme),filesNumber:e.length,files:t})}}const Mf=Object.assign(Object.assign({},gf),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Tf="generic",Qf="line-by-line";class Lf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Mf),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(Tf,"wrapper",{colorScheme:If(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const n=this.hoganUtils.template(Qf,"file-diff"),r=this.hoganUtils.template(Tf,"file-path"),i=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",Sf(e));return n.render({file:e,fileHtmlId:Ef(e),diffs:t,filePath:r.render({fileDiffName:Bf(e)},{fileIcon:i,fileTag:o})})}generateEmptyDiff(){return this.hoganUtils.render(Tf,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:pf})}generateFileHtml(e){const t=hf(df(t=>Cf(t.content,e.isCombined).content));return e.blocks.map(n=>{let r=this.hoganUtils.render(Tf,"block-header",{CSSLineClass:pf,blockHeader:e.isTooBig?n.header:xf(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([n,i,o])=>{if(i.length&&o.length&&!n.length)this.applyRematchMatching(i,o,t).map(([t,n])=>{const{left:i,right:o}=this.processChangedLines(e,e.isCombined,t,n);r+=i,r+=o});else if(n.length)n.forEach(t=>{const{prefix:n,content:i}=Cf(t.content,e.isCombined);r+=this.generateSingleLineHtml(e,{type:pf.CONTEXT,prefix:n,content:i,oldNumber:t.oldNumber,newNumber:t.newNumber})});else if(i.length||o.length){const{left:t,right:n}=this.processChangedLines(e,e.isCombined,i,o);r+=t,r+=n}else console.error("Unknown state reached while processing groups of lines",n,i,o)}),r}).join("\n")}applyLineGroupping(e){const t=[];let n=[],r=[];for(let i=0;i<e.lines.length;i++){const o=e.lines[i];(o.type!==Xu.INSERT&&r.length||o.type===Xu.CONTEXT&&n.length>0)&&(t.push([[],n,r]),n=[],r=[]),o.type===Xu.CONTEXT?t.push([[o],[],[]]):o.type===Xu.INSERT&&0===n.length?t.push([[],[],[o]]):o.type===Xu.INSERT&&n.length>0?r.push(o):o.type===Xu.DELETE&&n.push(o)}return(n.length||r.length)&&(t.push([[],n,r]),n=[],r=[]),t}applyRematchMatching(e,t,n){const r=e.length*t.length,i=tf(e.concat(t).map(e=>e.content.length));return r<this.config.matchingMaxComparisons&&i<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?n(e,t):[[e,t]]}processChangedLines(e,t,n,r){const i={right:"",left:""},o=Math.max(n.length,r.length);for(let a=0;a<o;a++){const o=n[a],s=r[a],l=void 0!==o&&void 0!==s?kf(o.content,s.content,t,this.config):void 0,c=void 0!==o&&void 0!==o.oldNumber?Object.assign(Object.assign({},void 0!==l?{prefix:l.oldLine.prefix,content:l.oldLine.content,type:pf.DELETE_CHANGES}:Object.assign(Object.assign({},Cf(o.content,t)),{type:wf(o.type)})),{oldNumber:o.oldNumber,newNumber:o.newNumber}):void 0,u=void 0!==s&&void 0!==s.newNumber?Object.assign(Object.assign({},void 0!==l?{prefix:l.newLine.prefix,content:l.newLine.content,type:pf.INSERT_CHANGES}:Object.assign(Object.assign({},Cf(s.content,t)),{type:wf(s.type)})),{oldNumber:s.oldNumber,newNumber:s.newNumber}):void 0,{left:f,right:d}=this.generateLineHtml(e,c,u);i.left+=f,i.right+=d}return i}generateLineHtml(e,t,n){return{left:this.generateSingleLineHtml(e,t),right:this.generateSingleLineHtml(e,n)}}generateSingleLineHtml(e,t){if(void 0===t)return"";const n=this.hoganUtils.render(Qf,"numbers",{oldNumber:t.oldNumber||"",newNumber:t.newNumber||""});return this.hoganUtils.render(Tf,"line",{type:t.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:" "===t.prefix?" ":t.prefix,content:t.content,lineNumber:n,line:t,file:e})}}const Rf=Object.assign(Object.assign({},gf),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Uf="generic";class Hf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Rf),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(Uf,"wrapper",{colorScheme:If(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const n=this.hoganUtils.template("side-by-side","file-diff"),r=this.hoganUtils.template(Uf,"file-path"),i=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",Sf(e));return n.render({file:e,fileHtmlId:Ef(e),diffs:t,filePath:r.render({fileDiffName:Bf(e)},{fileIcon:i,fileTag:o})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(Uf,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:pf})}}generateFileHtml(e){const t=hf(df(t=>Cf(t.content,e.isCombined).content));return e.blocks.map(n=>{const r={left:this.makeHeaderHtml(n.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([n,i,o])=>{if(i.length&&o.length&&!n.length)this.applyRematchMatching(i,o,t).map(([t,n])=>{const{left:i,right:o}=this.processChangedLines(e.isCombined,t,n);r.left+=i,r.right+=o});else if(n.length)n.forEach(t=>{const{prefix:n,content:i}=Cf(t.content,e.isCombined),{left:o,right:a}=this.generateLineHtml({type:pf.CONTEXT,prefix:n,content:i,number:t.oldNumber},{type:pf.CONTEXT,prefix:n,content:i,number:t.newNumber});r.left+=o,r.right+=a});else if(i.length||o.length){const{left:t,right:n}=this.processChangedLines(e.isCombined,i,o);r.left+=t,r.right+=n}else console.error("Unknown state reached while processing groups of lines",n,i,o)}),r}).reduce((e,t)=>({left:e.left+t.left,right:e.right+t.right}),{left:"",right:""})}applyLineGroupping(e){const t=[];let n=[],r=[];for(let i=0;i<e.lines.length;i++){const o=e.lines[i];(o.type!==Xu.INSERT&&r.length||o.type===Xu.CONTEXT&&n.length>0)&&(t.push([[],n,r]),n=[],r=[]),o.type===Xu.CONTEXT?t.push([[o],[],[]]):o.type===Xu.INSERT&&0===n.length?t.push([[],[],[o]]):o.type===Xu.INSERT&&n.length>0?r.push(o):o.type===Xu.DELETE&&n.push(o)}return(n.length||r.length)&&(t.push([[],n,r]),n=[],r=[]),t}applyRematchMatching(e,t,n){const r=e.length*t.length,i=tf(e.concat(t).map(e=>e.content.length));return r<this.config.matchingMaxComparisons&&i<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?n(e,t):[[e,t]]}makeHeaderHtml(e,t){return this.hoganUtils.render(Uf,"block-header",{CSSLineClass:pf,blockHeader:(null==t?void 0:t.isTooBig)?e:xf(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(e,t,n){const r={right:"",left:""},i=Math.max(t.length,n.length);for(let o=0;o<i;o++){const i=t[o],a=n[o],s=void 0!==i&&void 0!==a?kf(i.content,a.content,e,this.config):void 0,l=void 0!==i&&void 0!==i.oldNumber?Object.assign(Object.assign({},void 0!==s?{prefix:s.oldLine.prefix,content:s.oldLine.content,type:pf.DELETE_CHANGES}:Object.assign(Object.assign({},Cf(i.content,e)),{type:wf(i.type)})),{number:i.oldNumber}):void 0,c=void 0!==a&&void 0!==a.newNumber?Object.assign(Object.assign({},void 0!==s?{prefix:s.newLine.prefix,content:s.newLine.content,type:pf.INSERT_CHANGES}:Object.assign(Object.assign({},Cf(a.content,e)),{type:wf(a.type)})),{number:a.newNumber}):void 0,{left:u,right:f}=this.generateLineHtml(l,c);r.left+=u,r.right+=f}return r}generateLineHtml(e,t){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(t)}}generateSingleHtml(e){const t="d2h-code-side-linenumber",n="d2h-code-side-line";return this.hoganUtils.render(Uf,"line",{type:(null==e?void 0:e.type)||`${pf.CONTEXT} d2h-emptyplaceholder`,lineClass:void 0!==e?t:`${t} d2h-code-side-emptyplaceholder`,contentClass:void 0!==e?n:`${n} d2h-code-side-emptyplaceholder`,prefix:" "===(null==e?void 0:e.prefix)?" ":null==e?void 0:e.prefix,content:null==e?void 0:e.content,lineNumber:null==e?void 0:e.number})}}var qf={};!function(e){!function(e){var t=/\S/,n=/\"/g,r=/\n/g,i=/\r/g,o=/\\/g,a=/\u2028/,s=/\u2029/;function l(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function c(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function u(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var r=1,i=e.length;r<i;r++)if(t.charAt(n+r)!=e.charAt(r))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(n,r){var i=n.length,o=0,a=null,s=null,f="",d=[],h=!1,p=0,g=0,m="{{",y="}}";function v(){f.length>0&&(d.push({tag:"_t",text:new String(f)}),f="")}function A(n,r){if(v(),n&&function(){for(var n=!0,r=g;r<d.length;r++)if(!(n=e.tags[d[r].tag]<e.tags._v||"_t"==d[r].tag&&null===d[r].text.match(t)))return!1;return n}())for(var i,o=g;o<d.length;o++)d[o].text&&((i=d[o+1])&&">"==i.tag&&(i.indent=d[o].text.toString()),d.splice(o,1));else r||d.push({tag:"\n"});h=!1,g=d.length}function b(e,t){var n="="+y,r=e.indexOf(n,t),i=c(e.substring(e.indexOf("=",t)+1,r)).split(" ");return m=i[0],y=i[i.length-1],r+n.length-1}for(r&&(r=r.split(" "),m=r[0],y=r[1]),p=0;p<i;p++)0==o?u(m,n,p)?(--p,v(),o=1):"\n"==n.charAt(p)?A(h):f+=n.charAt(p):1==o?(p+=m.length-1,"="==(a=(s=e.tags[n.charAt(p+1)])?n.charAt(p+1):"_v")?(p=b(n,p),o=0):(s&&p++,o=2),h=p):u(y,n,p)?(d.push({tag:a,n:c(f),otag:m,ctag:y,i:"/"==a?h-m.length:p+y.length}),f="",p+=y.length-1,o=0,"{"==a&&("}}"==y?p++:l(d[d.length-1]))):f+=n.charAt(p);return A(h,!0),d};var f={_t:!0,"\n":!0,$:!0,"/":!0};function d(t,n,r,i){var o,a=[],s=null,l=null;for(o=r[r.length-1];t.length>0;){if(l=t.shift(),o&&"<"==o.tag&&!(l.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[l.tag]<=e.tags.$||h(l,i))r.push(l),l.nodes=d(t,l.tag,r,i);else{if("/"==l.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+l.n);if(s=r.pop(),l.n!=s.n&&!p(l.n,s.n,i))throw new Error("Nesting error: "+s.n+" vs. "+l.n);return s.end=l.i,a}"\n"==l.tag&&(l.last=0==t.length||"\n"==t[0].tag)}a.push(l)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return a}function h(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].o==e.n)return e.tag="#",!0}function p(e,t,n){for(var r=0,i=n.length;r<i;r++)if(n[r].c==e&&n[r].o==t)return!0}function g(e){var t=[];for(var n in e.partials)t.push('"'+y(n)+'":{name:"'+y(e.partials[n].name)+'", '+g(e.partials[n])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var n in e)t.push('"'+y(n)+'": function(c,p,t,i) {'+e[n]+"}");return"{ "+t.join(",")+" }"}(e.subs)}e.stringify=function(t,n,r){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+g(t)+"}"};var m=0;function y(e){return e.replace(o,"\\\\").replace(n,'\\"').replace(r,"\\n").replace(i,"\\r").replace(a,"\\u2028").replace(s,"\\u2029")}function v(e){return~e.indexOf(".")?"d":"f"}function A(e,t){var n="<"+(t.prefix||"")+e.n+m++;return t.partials[n]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+y(n)+'",c,p,"'+(e.indent||"")+'"));',n}function b(e,t){t.code+="t.b(t.t(t."+v(e.n)+'("'+y(e.n)+'",c,p,0)));'}function w(e){return"t.b("+e+");"}e.generate=function(t,n,r){m=0;var i={code:"",subs:{},partials:{}};return e.walk(t,i),r.asString?this.stringify(i,n,r):this.makeTemplate(i,n,r)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,n){var r=this.makePartials(e);return r.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(r,t,this,n)},e.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},e.codegen={"#":function(t,n){n.code+="if(t.s(t."+v(t.n)+'("'+y(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,n),n.code+="});c.pop();}"},"^":function(t,n){n.code+="if(!t.s(t."+v(t.n)+'("'+y(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,n),n.code+="};"},">":A,"<":function(t,n){var r={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,r);var i=n.partials[A(t,n)];i.subs=r.subs,i.partials=r.partials},$:function(t,n){var r={subs:{},code:"",partials:n.partials,prefix:t.n};e.walk(t.nodes,r),n.subs[t.n]=r.code,n.inPartial||(n.code+='t.sub("'+y(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+v(e.n)+'("'+y(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=w('"'+y(e.text)+'"')},"{":b,"&":b},e.walk=function(t,n){for(var r,i=0,o=t.length;i<o;i++)(r=e.codegen[t[i].tag])&&r(t[i],n);return n},e.parse=function(e,t,n){return d(e,0,[],(n=n||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,n){n=n||{};var r=e.cacheKey(t,n),i=this.cache[r];if(i){var o=i.partials;for(var a in o)delete o[a].instance;return i}return i=this.generate(this.parse(this.scan(t,n.delimiters),t,n),t,n),this.cache[r]=i}}(e)}(qf);var Of={};!function(e){!function(e){function t(e,t,n){var r;return t&&"object"==typeof t&&(void 0!==t[e]?r=t[e]:n&&t.get&&"function"==typeof t.get&&(r=t.get(e))),r}e.Template=function(e,t,n,r){e=e||{},this.r=e.code||this.r,this.c=n,this.options=r||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=l(e),s.test(e)?e.replace(n,"&").replace(r,"<").replace(i,">").replace(o,"'").replace(a,"""):e},t:l,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],r=t[n.name];if(n.instance&&n.base==r)return n.instance;if("string"==typeof r){if(!this.c)throw new Error("No compiler available.");r=this.c.compile(r,this.options)}if(!r)return null;if(this.partials[e].base=r,n.subs){for(key in t.stackText||(t.stackText={}),n.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);r=function(e,t,n,r,i,o){function a(){}function s(){}var l;a.prototype=e,s.prototype=e.subs;var c=new a;for(l in c.subs=new s,c.subsText={},c.buf="",r=r||{},c.stackSubs=r,c.subsText=o,t)r[l]||(r[l]=t[l]);for(l in r)c.subs[l]=r[l];for(l in i=i||{},c.stackPartials=i,n)i[l]||(i[l]=n[l]);for(l in i)c.partials[l]=i[l];return c}(r,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=r,r},rp:function(e,t,n,r){var i=this.ep(e,n);return i?i.ri(t,n,r):""},rs:function(e,t,n){var r=e[e.length-1];if(c(r))for(var i=0;i<r.length;i++)e.push(r[i]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,r,i,o,a){var s;return(!c(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,n,r,i,o,a)),s=!!e,!r&&s&&t&&t.push("object"==typeof e?e:t[t.length-1]),s)},d:function(e,n,r,i){var o,a=e.split("."),s=this.f(a[0],n,r,i),l=this.options.modelGet,u=null;if("."===e&&c(n[n.length-2]))s=n[n.length-1];else for(var f=1;f<a.length;f++)void 0!==(o=t(a[f],s,l))?(u=s,s=o):s="";return!(i&&!s)&&(i||"function"!=typeof s||(n.push(u),s=this.mv(s,n,r),n.pop()),s)},f:function(e,n,r,i){for(var o=!1,a=!1,s=this.options.modelGet,l=n.length-1;l>=0;l--)if(void 0!==(o=t(e,n[l],s))){a=!0;break}return a?(i||"function"!=typeof o||(o=this.mv(o,n,r)),o):!i&&""},ls:function(e,t,n,r,i,o){var a=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(l(e.call(t,i,n)),t,r)),this.options.delimiters=a,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,r,i,o,a){var s,l=t[t.length-1],c=e.call(l);return"function"==typeof c?!!r||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,l,t,n,s.substring(i,o),a)):c},mv:function(e,t,n){var r=t[t.length-1],i=e.call(r);return"function"==typeof i?this.ct(l(i.call(r)),r,n):i},sub:function(e,t,n,r){var i=this.subs[e];i&&(this.activeSub=e,i(t,n,this,r),this.activeSub=!1)}};var n=/&/g,r=/</g,i=/>/g,o=/\'/g,a=/\"/g,s=/[&<>\"\']/;function l(e){return String(null==e?"":e)}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(e)}(Of);var Pf=qf;Pf.Template=Of.Template,Pf.template=Pf.Template;var $f=Pf;const zf={};zf["file-summary-line"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<li class="d2h-file-list-line">'),r.b("\n"+n),r.b(' <span class="d2h-file-name-wrapper">'),r.b("\n"+n),r.b(r.rp("<fileIcon0",e,t," ")),r.b(' <a href="#'),r.b(r.v(r.f("fileHtmlId",e,t,0))),r.b('" class="d2h-file-name">'),r.b(r.v(r.f("fileName",e,t,0))),r.b("</a>"),r.b("\n"+n),r.b(' <span class="d2h-file-stats">'),r.b("\n"+n),r.b(' <span class="d2h-lines-added">'),r.b(r.v(r.f("addedLines",e,t,0))),r.b("</span>"),r.b("\n"+n),r.b(' <span class="d2h-lines-deleted">'),r.b(r.v(r.f("deletedLines",e,t,0))),r.b("</span>"),r.b("\n"+n),r.b(" </span>"),r.b("\n"+n),r.b(" </span>"),r.b("\n"+n),r.b("</li>"),r.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}}),zf["file-summary-wrapper"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div class="d2h-file-list-wrapper '),r.b(r.v(r.f("colorScheme",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="d2h-file-list-header">'),r.b("\n"+n),r.b(' <span class="d2h-file-list-title">Files changed ('),r.b(r.v(r.f("filesNumber",e,t,0))),r.b(")</span>"),r.b("\n"+n),r.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),r.b("\n"+n),r.b(' <a class="d2h-file-switch d2h-show">show</a>'),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(' <ol class="d2h-file-list">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("files",e,t,0))),r.b("\n"+n),r.b(" </ol>"),r.b("\n"+n),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["generic-block-header"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b("<tr>"),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.f("lineClass",e,t,0))),r.b(" "),r.b(r.v(r.d("CSSLineClass.INFO",e,t,0))),r.b('"></td>'),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.d("CSSLineClass.INFO",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="'),r.b(r.v(r.f("contentClass",e,t,0))),r.b('">'),r.s(r.f("blockHeader",e,t,1),e,t,0,156,173,"{{ }}")&&(r.rs(e,t,function(e,t,n){n.b(n.t(n.f("blockHeader",e,t,0)))}),e.pop()),r.s(r.f("blockHeader",e,t,1),e,t,1,0,0,"")||r.b(" "),r.b("</div>"),r.b("\n"+n),r.b(" </td>"),r.b("\n"+n),r.b("</tr>"),r.fl()},partials:{},subs:{}}),zf["generic-empty-diff"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b("<tr>"),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.d("CSSLineClass.INFO",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="'),r.b(r.v(r.f("contentClass",e,t,0))),r.b('">'),r.b("\n"+n),r.b(" File without changes"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </td>"),r.b("\n"+n),r.b("</tr>"),r.fl()},partials:{},subs:{}}),zf["generic-file-path"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-file-name-wrapper">'),r.b("\n"+n),r.b(r.rp("<fileIcon0",e,t," ")),r.b(' <span class="d2h-file-name">'),r.b(r.v(r.f("fileDiffName",e,t,0))),r.b("</span>"),r.b("\n"+n),r.b(r.rp("<fileTag1",e,t," ")),r.b("</span>"),r.b("\n"+n),r.b('<label class="d2h-file-collapse">'),r.b("\n"+n),r.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),r.b("\n"+n),r.b(" Viewed"),r.b("\n"+n),r.b("</label>"),r.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}}),zf["generic-line"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b("<tr>"),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.f("lineClass",e,t,0))),r.b(" "),r.b(r.v(r.f("type",e,t,0))),r.b('">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("lineNumber",e,t,0))),r.b("\n"+n),r.b(" </td>"),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.f("type",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="'),r.b(r.v(r.f("contentClass",e,t,0))),r.b('">'),r.b("\n"+n),r.s(r.f("prefix",e,t,1),e,t,0,162,238,"{{ }}")&&(r.rs(e,t,function(e,t,r){r.b(' <span class="d2h-code-line-prefix">'),r.b(r.t(r.f("prefix",e,t,0))),r.b("</span>"),r.b("\n"+n)}),e.pop()),r.s(r.f("prefix",e,t,1),e,t,1,0,0,"")||(r.b(' <span class="d2h-code-line-prefix"> </span>'),r.b("\n"+n)),r.s(r.f("content",e,t,1),e,t,0,371,445,"{{ }}")&&(r.rs(e,t,function(e,t,r){r.b(' <span class="d2h-code-line-ctn">'),r.b(r.t(r.f("content",e,t,0))),r.b("</span>"),r.b("\n"+n)}),e.pop()),r.s(r.f("content",e,t,1),e,t,1,0,0,"")||(r.b(' <span class="d2h-code-line-ctn"><br></span>'),r.b("\n"+n)),r.b(" </div>"),r.b("\n"+n),r.b(" </td>"),r.b("\n"+n),r.b("</tr>"),r.fl()},partials:{},subs:{}}),zf["generic-wrapper"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div class="d2h-wrapper '),r.b(r.v(r.f("colorScheme",e,t,0))),r.b('">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("content",e,t,0))),r.b("\n"+n),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["icon-file-added"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),r.b("\n"+n),r.b(' width="14">'),r.b("\n"+n),r.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["icon-file-changed"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),r.b("\n"+n),r.b(' viewBox="0 0 14 16" width="14">'),r.b("\n"+n),r.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["icon-file-deleted"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),r.b("\n"+n),r.b(' viewBox="0 0 14 16" width="14">'),r.b("\n"+n),r.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["icon-file-renamed"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),r.b("\n"+n),r.b(' viewBox="0 0 14 16" width="14">'),r.b("\n"+n),r.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["icon-file"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),r.b("\n"+n),r.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["line-by-line-file-diff"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div id="'),r.b(r.v(r.f("fileHtmlId",e,t,0))),r.b('" class="d2h-file-wrapper" data-lang="'),r.b(r.v(r.d("file.language",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="d2h-file-header">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("filePath",e,t,0))),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(' <div class="d2h-file-diff">'),r.b("\n"+n),r.b(' <div class="d2h-code-wrapper">'),r.b("\n"+n),r.b(' <table class="d2h-diff-table">'),r.b("\n"+n),r.b(' <tbody class="d2h-diff-tbody">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("diffs",e,t,0))),r.b("\n"+n),r.b(" </tbody>"),r.b("\n"+n),r.b(" </table>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["line-by-line-numbers"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div class="line-num1">'),r.b(r.v(r.f("oldNumber",e,t,0))),r.b("</div>"),r.b("\n"+n),r.b('<div class="line-num2">'),r.b(r.v(r.f("newNumber",e,t,0))),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["side-by-side-file-diff"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div id="'),r.b(r.v(r.f("fileHtmlId",e,t,0))),r.b('" class="d2h-file-wrapper" data-lang="'),r.b(r.v(r.d("file.language",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="d2h-file-header">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("filePath",e,t,0))),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(' <div class="d2h-files-diff">'),r.b("\n"+n),r.b(' <div class="d2h-file-side-diff">'),r.b("\n"+n),r.b(' <div class="d2h-code-wrapper">'),r.b("\n"+n),r.b(' <table class="d2h-diff-table">'),r.b("\n"+n),r.b(' <tbody class="d2h-diff-tbody">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.d("diffs.left",e,t,0))),r.b("\n"+n),r.b(" </tbody>"),r.b("\n"+n),r.b(" </table>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(' <div class="d2h-file-side-diff">'),r.b("\n"+n),r.b(' <div class="d2h-code-wrapper">'),r.b("\n"+n),r.b(' <table class="d2h-diff-table">'),r.b("\n"+n),r.b(' <tbody class="d2h-diff-tbody">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.d("diffs.right",e,t,0))),r.b("\n"+n),r.b(" </tbody>"),r.b("\n"+n),r.b(" </table>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["tag-file-added"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),r.fl()},partials:{},subs:{}}),zf["tag-file-changed"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),r.fl()},partials:{},subs:{}}),zf["tag-file-deleted"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),r.fl()},partials:{},subs:{}}),zf["tag-file-renamed"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),r.fl()},partials:{},subs:{}});class jf{constructor({compiledTemplates:e={},rawTemplates:t={}}){const n=Object.entries(t).reduce((e,[t,n])=>{const r=$f.compile(n,{asString:!1});return Object.assign(Object.assign({},e),{[t]:r})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},zf),e),n)}static compile(e){return $f.compile(e,{asString:!1})}render(e,t,n,r,i){const o=this.templateKey(e,t);try{return this.preCompiledTemplates[o].render(n,r,i)}catch(e){throw new Error(`Could not find template to render '${o}'`)}}template(e,t){return this.preCompiledTemplates[this.templateKey(e,t)]}templateKey(e,t){return`${e}-${t}`}}const Vf=Object.assign(Object.assign(Object.assign({},Mf),Rf),{outputFormat:"line-by-line",drawFileList:!0});var Yf=Object.freeze({__proto__:null,defaultDiff2HtmlConfig:Vf,html:function(e,t={}){const n=Object.assign(Object.assign({},Vf),t),r="string"==typeof e?sf(e,n):e,i=new jf(n),{colorScheme:o}=n,a={colorScheme:o};return(n.drawFileList?new Nf(i,a).render(r):"")+("side-by-side"===n.outputFormat?new Hf(i,n).render(r):new Lf(i,n).render(r))},parse:function(e,t={}){return sf(e,Object.assign(Object.assign({},Vf),t))}});function Wf(){if("[object Module]"===Object.prototype.toString.call(Yf))return Yf;let e=nc(),t=be(e,"Diff2Html.default",null),n=be(e,"Diff2Html",null),r="html";if(Se(t)&&Oi(t[r]))return t;if(Se(n)&&Oi(n[r]))return n;throw console.log("Diff2Html",Yf,"g.Diff2Html",e.Diff2Html),new Error("invalid Diff2Html, g.Diff2Html, g.Diff2Html.default, use script for import")}var Gf=Object.defineProperty,Jf=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},_f=(e,t)=>{for(var n in t)Gf(e,n,{get:t[n],enumerable:!0})};var Xf,Kf,Zf=Jf(()=>{Xf=class extends Map{constructor(e=100,...t){super(...t),this._maxSize=e}set(e,t){if(this.size>=this._maxSize&&!this.has(e)){let e=this.keys().next().value;void 0!==e&&this.delete(e)}return super.set(e,t)}},Kf={image:new Xf(100),background:new Xf(100),resource:new Xf(150),defaultStyle:new Xf(30),baseStyle:new Xf(50),compress:new Xf(50),computedStyle:new WeakMap,measureHints:new WeakMap,burstAdvice:new WeakMap,warnedReconcile:!1,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}});function ed(e){let t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)return null;let n=t[2].trim();return n.startsWith("#")?null:n}function td(e,t=1){let n=e.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let e of n[1].split(",")){let t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)continue;let n=e.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(n&&!rd.test(n[1].trim()))continue;let i=e.match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)/i),o=1;if(i){let e=parseFloat(i[1]);o=/dpi/i.test(i[2])?e/96:e}r.push({url:t[2].trim(),dppx:o})}return r.length?(r.sort((e,t)=>e.dppx-t.dppx),(r.find(e=>e.dppx>=t)||r[r.length-1]).url):null}function nd(e){if(/%[0-9A-Fa-f]{2}/.test(e))return e;try{return encodeURI(e)}catch{return e}}var rd,id=Jf(()=>{rd=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i});function od(e,t){if(!t||function(e){return/^data:|^blob:|^about:blank$/i.test(e)}(e)||function(e,t){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=t.includes("{url}")?t.split("{url}")[0]:t,i=new URL(r||".",n),o=new URL(e,n);if(o.origin===i.origin)return!0;let a=o.searchParams;if(a&&(a.has("url")||a.has("target")))return!0}catch{}return!1}(e,t))return!1;try{let t=typeof location<"u"&&location.href?location.href:"http://localhost/",n=new URL(e,t);return!(typeof location<"u")||n.origin!==location.origin}catch{return!!t}}function ad(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(e)})}async function sd(e,t={}){let n=t.as??"blob",r=t.timeout??3e3,i=t.useProxy||"",o=t.errorTTL??8e3,a=t.headers||{},s=!!t.silent;if(/^data:/i.test(e))try{if("text"===n)return{ok:!0,data:String(e),status:200,url:e,fromCache:!1};if("dataURL"===n)return{ok:!0,data:String(e),status:200,url:e,fromCache:!1,mime:String(e).slice(5).split(";")[0]||""};let[,t="",r=""]=String(e).match(/^data:([^,]*),(.*)$/)||[],i=/;base64/i.test(t)?atob(r):decodeURIComponent(r),o=new Uint8Array([...i].map(e=>e.charCodeAt(0))),a=new Blob([o],{type:(t||"").split(";")[0]||""});return{ok:!0,data:a,status:200,url:e,fromCache:!1,mime:a.type||""}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(e))try{let t=await fetch(e);if(!t.ok)return{ok:!1,data:null,status:t.status,url:e,fromCache:!1,reason:"http_error"};let r=await t.blob(),i=r.type||t.headers.get("content-type")||"";return"dataURL"===n?{ok:!0,data:await ad(r),status:t.status,url:e,fromCache:!1,mime:i}:"text"===n?{ok:!0,data:await r.text(),status:t.status,url:e,fromCache:!1,mime:i}:{ok:!0,data:r,status:t.status,url:e,fromCache:!1,mime:i}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(e))return"dataURL"===n?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:e,fromCache:!1,mime:"image/png"}:{ok:!0,data:"text"===n?"":new Blob([]),status:200,url:e,fromCache:!1};let l=function(e,t){return[t.as||"blob",t.timeout??3e3,t.useProxy||"",t.errorTTL??8e3,e].join("|")}(e,{as:n,timeout:r,useProxy:i,errorTTL:o}),c=ud.get(l);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&ud.delete(l);let u=cd.get(l);if(u)return u;let f=od(e,i)?function(e,t){if(!t)return e;if(t.includes("{url}"))return t.replace("{urlRaw}",nd(e)).replace("{url}",encodeURIComponent(e));if(/[?&]url=?$/.test(t))return`${t}${encodeURIComponent(e)}`;if(t.endsWith("?"))return`${t}url=${encodeURIComponent(e)}`;if(t.endsWith("/"))return`${t}${nd(e)}`;let n=t.includes("?")?"&":"?";return`${t}${n}url=${encodeURIComponent(e)}`}(e,i):e,d=t.credentials;if(!d)try{let t=typeof location<"u"&&location.href?location.href:"http://localhost/",n=new URL(e,t);d=typeof location<"u"&&n.origin===location.origin?"include":"omit"}catch{d="omit"}let h=new AbortController,p=setTimeout(()=>h.abort("timeout"),r),g=(async()=>{try{let r=await fetch(f,{signal:h.signal,credentials:d,headers:a});if(!r.ok){let i={ok:!1,data:null,status:r.status,url:f,fromCache:!1,reason:"http_error"};if(o>0&&ud.set(l,{until:Date.now()+o,result:i}),!s){let t=`${r.status} ${r.statusText||""}`.trim();ld.warnOnce(`http:${r.status}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,`HTTP error ${t} while fetching ${n} ${e}`)}return t.onError&&t.onError(i),i}if("text"===n)return{ok:!0,data:await r.text(),status:r.status,url:f,fromCache:!1};let i=await r.blob(),c=i.type||r.headers.get("content-type")||"";return"dataURL"===n?{ok:!0,data:await ad(i),status:r.status,url:f,fromCache:!1,mime:c}:{ok:!0,data:i,status:r.status,url:f,fromCache:!1,mime:c}}catch(i){let a=i&&"object"==typeof i&&"name"in i&&"AbortError"===i.name?String(i.message||"").includes("timeout")?"timeout":"abort":"network",c={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:a};if(!/^blob:/i.test(e)&&o>0&&ud.set(l,{until:Date.now()+o,result:c}),!s){let t=`${a}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,i="timeout"===a?`Timeout after ${r}ms. Consider increasing timeout or using a proxy for ${e}`:"abort"===a?`Request aborted while fetching ${n} ${e}`:`Network/CORS issue while fetching ${n} ${e}. A proxy may be required`;ld.errorOnce(t,i)}return t.onError&&t.onError(c),c}finally{clearTimeout(p),cd.delete(l)}})();return cd.set(l,g),g}var ld,cd,ud,fd=Jf(()=>{id(),ld=function(e="[snapDOM]",{ttlMs:t=3e5,maxEntries:n=12}={}){let r=new Map,i=0;function o(o,a,s){if(i>=n)return;let l=Date.now();(r.get(a)||0)>l||(r.set(a,l+t),i++,"warn"===o&&console&&console.warn?console.warn(`${e} ${s}`):console&&console.error&&console.error(`${e} ${s}`))}return{warnOnce(e,t){o("warn",e,t)},errorOnce(e,t){o("error",e,t)},reset(){r.clear(),i=0}}}("[snapDOM]",{ttlMs:18e4,maxEntries:10}),cd=new Map,ud=new Map});async function dd(e,t={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(e)||"none"===e.trim())return e;let n=td(e,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??ed(e);if(!n)return e;let r=function(e,t){if(!e||/^(data|blob|about|#)/i.test(e.trim()))return e;try{let n=t||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(e,n).href}catch{return e}}(n),i=nd(r),o=(t.useProxy||"")+"|"+i;if(Kf.background.has(o)){let e=Kf.background.get(o);return e?`url("${e}")`:"none"}try{let e=await sd(i,{as:"dataURL",useProxy:t.useProxy});return e.ok?(Kf.background.set(o,e.data),`url("${e.data}")`):(Kf.background.set(o,null),"none")}catch{return Kf.background.set(o,null),"none"}}var hd=Jf(()=>{Zf(),id(),fd()});function pd(e){if(e=String(e).toLowerCase(),Id.has(e)){let t={};return Kf.defaultStyle.set(e,t),t}if(Kf.defaultStyle.has(e))return Kf.defaultStyle.get(e);let t=document.getElementById("snapdom-sandbox");t||(t=document.createElement("div"),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t));let n=document.createElement(e);n.style.all="initial",t.appendChild(n);let r=getComputedStyle(n),i={};for(let e of r){if(gd(e))continue;let t=r.getPropertyValue(e);i[e]=t}return t.removeChild(n),Kf.defaultStyle.set(e,i),i}function gd(e){let t=Ed.get(e);if(void 0===t){let n=String(e).toLowerCase();t=Bd.has(n)||Cd.test(n)||xd.test(n),Ed.set(e,t)}return t}function md(e,t){return!Fd.has(e)&&("inline"===t||Sd.has(e)||kd.has(e))}function yd(e,t,n=!0,r=!1){if(t=String(t||"").toLowerCase(),Id.has(t))return"";let i=[],o=pd(t),a=(e.display||"").toLowerCase(),s="inline"===a,l=md(t,a),c=e["text-wrap-mode"]||e["white-space"]||"",u="nowrap"===c||"pre"===c,f=l&&n&&!(l&&n&&!s&&u),d=!1;for(let t in e){if(gd(t))continue;let n=e[t];if(f){if(Dd.has(t))continue;if(Nd.has(t)){n&&n!==o[t]&&(i.push(`${t}:${n}`),"auto"!==n&&(d=!0));continue}}if(n&&n!==o[t]){if(!u&&("width"===t||"inline-size"===t)&&n.endsWith("px")&&n.includes(".")){let e=parseFloat(n);if(Number.isFinite(e)){i.push(`${t}:${(e+Md).toFixed(3)}px`);continue}}i.push(`${t}:${n}`)}}if(f&&!s&&!r&&!d){let t=e.width;t&&"auto"!==t&&t!==o.width&&i.push(`min-width:${t}`)}return i.sort(),i.join(";")}function vd(e,t=null){let n=()=>{let e={length:0,getPropertyValue:()=>"",item:()=>""};return e[Symbol.iterator]=function*(){},e};if(1!==e?.nodeType){let r=typeof window<"u"?window:null;if(r&&"function"==typeof r.getComputedStyle)try{return r.getComputedStyle(e,t)||n()}catch{return n()}return n()}let r=Kf.computedStyle.get(e);r||(r=new Map,Kf.computedStyle.set(e,r));let i=r.get(t);if(!i){let o=function(e){try{let t=e?.ownerDocument;if(!t)return typeof window<"u"?window:null;let n=t.defaultView;if(n&&"function"==typeof n.getComputedStyle)return n;if(typeof window<"u"&&window.frames)for(let e=0;e<window.frames.length;e++)try{if(window.frames[e]?.document===t)return window.frames[e]}catch{}}catch{}return typeof window<"u"?window:null}(e),a=null;try{a=o&&"function"==typeof o.getComputedStyle?o.getComputedStyle(e,t):null}catch{}if(!a&&typeof window<"u"&&"function"==typeof window.getComputedStyle)try{e.ownerDocument===document&&(a=window.getComputedStyle(e,t))}catch{}i=a||n(),r.set(t,i)}return i}function Ad(e){let t={};for(let n of e)t[n]=e.getPropertyValue(n);for(let e of Qd){let n=t[`border-${e}-style`],r=t[`border-${e}-width`];("none"===n||"hidden"===n||"0px"===r)&&(delete t[`border-${e}-style`],delete t[`border-${e}-width`],delete t[`border-${e}-color`])}return t}function bd(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o&&n++,")"===o&&n--,","===o&&0===n&&(t.push(e.slice(r,i).trim()),r=i+1)}return t.push(e.slice(r).trim()),t}var wd,Id,xd,Cd,Bd,Ed,Sd,kd,Fd,Dd,Nd,Md,Td,Qd,Ld=Jf(()=>{Zf(),wd=new Set(["meta","script","noscript","title","link","template"]),Id=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),xd=/(?:^|-)(animation|transition)(?:-|$)/i,Cd=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Bd=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),Ed=new Map,Sd=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),kd=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Fd=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Dd=new Set(["width","max-width","inline-size","max-inline-size"]),Nd=new Set(["min-width","min-inline-size"]),Md=.001,Td=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]),Qd=["top","right","bottom","left"]});function Rd(e,{fast:t=!1}={}){if(t)return e();"requestIdleCallback"in window?requestIdleCallback(e,{timeout:50}):setTimeout(e,1)}function Ud(e=1e3){return"function"!=typeof requestAnimationFrame||typeof document<"u"&&"hidden"===document.visibilityState?Promise.resolve():new Promise(t=>{let n=!1,r=()=>{n||(n=!0,t())};try{requestAnimationFrame(r)}catch{return void r()}setTimeout(r,e)})}function Hd(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||"",t=e.toLowerCase(),n=t.includes("safari")&&!t.includes("chrome")&&!t.includes("crios")&&!t.includes("fxios")&&!t.includes("android"),r=/applewebkit/i.test(e),i=/mobile/i.test(e),o=!/safari/i.test(e),a=r&&i&&o,s=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(e),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(t),c=/ipad|iphone|ipod/.test(t)&&r;return n||a||s||l||c}var qd=Jf(()=>{});function Od(e,t,n){let r=e&&"object"==typeof e&&(e.options||e);r&&r.debug&&(void 0!==n?console.warn("[snapdom]",t,n):console.warn("[snapdom]",t))}var Pd=Jf(()=>{}),$d=Jf(()=>{hd(),Ld(),qd(),id(),Pd()}),zd={};function jd(e){return"string"==typeof e&&/^data:image\/svg\+xml/i.test(e)}function Vd(e){let t=e.indexOf(",");return t>=0?decodeURIComponent(e.slice(t+1)):""}function Yd(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}function Wd(e){let t=[],n="",r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o&&r++,")"===o&&(r=Math.max(0,r-1)),";"===o&&0===r?(t.push(n),n=""):n+=o}return n.trim()&&t.push(n),t.map(e=>e.trim()).filter(Boolean)}function Gd(e){let t=Wd(e),n=null,r=null,i=null,o=[];for(let e of t){let t=e.indexOf(":");if(t<0)continue;let a=e.slice(0,t).trim().toLowerCase(),s=e.slice(t+1).trim();"box-shadow"===a?i=s:"filter"===a?n=s:"-webkit-filter"===a?r=s:o.push([a,s])}if(i){let e=function(e){let t=[],n="",r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o&&r++,")"===o&&(r=Math.max(0,r-1)),","===o&&0===r?(t.push(n.trim()),n=""):n+=o}n.trim()&&t.push(n.trim());let i=[];for(let e of t){if(/\binset\b/i.test(e))continue;let t=e.match(/-?\d+(?:\.\d+)?px/gi)||[],[n="0px",r="0px",o="0px"]=t;o=parseFloat(o)/2+"px";let a=e.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/gi,"").trim().replace(/\s{2,}/g," "),s=!!a&&","!==a;i.push(`drop-shadow(${n} ${r} ${o}${s?` ${a}`:""})`)}return i.join(" ")}(i);e&&(n=n?`${n} ${e}`:e,r=r?`${r} ${e}`:e)}let a=[...o];return n&&a.push(["filter",n]),r&&a.push(["-webkit-filter",r]),a.map(([e,t])=>`${e}:${t}`).join(";")}function Jd(e){return e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,t)=>e.replace(t,function(e){return e.replace(/([^{}]+)\{([^}]*)\}/g,(e,t,n)=>`${t}{${Gd(n)}}`)}(t))),e=e.replace(/style=(['"])([\s\S]*?)\1/gi,(e,t,n)=>`style=${t}${Gd(n)}${t}`)}function _d(e,t){let n=e=>Wd(e).map(e=>{let n=e.indexOf(":");if(n<0)return e;let r=e.slice(0,n).trim().toLowerCase();return"text-shadow"===r||t&&"box-shadow"===r?`${r}:${function(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o?n++:")"===o?n=Math.max(0,n-1):","===o&&0===n&&(t.push(e.slice(r,i)),r=i+1)}return t.push(e.slice(r)),t.map(e=>{let t=0,n=0,r="",i=0;for(;i<e.length;){let o=e[i];if("("===o?t++:")"===o&&(t=Math.max(0,t-1)),0===t&&(0===i||" "===e[i-1])){let t=/^-?\d*\.?\d+px/.exec(e.slice(i));if(t){n++,r+=2===n?-parseFloat(t[0])+"px":t[0],i+=t[0].length;continue}}r+=o,i++}return r}).join(",")}(e.slice(n+1))}`:e}).join(";");return e=(e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,t)=>e.replace(t,t.replace(/([^{}]+)\{([^}]*)\}/g,(e,t,r)=>`${t}{${n(r)}}`)))).replace(/style=(['"])([\s\S]*?)\1/gi,(e,t,r)=>`style=${t}${n(r)}${t}`)}async function Xd(e){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(e))return{svg:e,naturalOnly:!1};let{native:t,flippedY:n}=await(th||(th=(async()=>{try{let e='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',t=new Image;t.decoding="sync",t.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,await t.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let r=n.getContext("2d",{willReadFrequently:!0});r.drawImage(t,0,0);let i=r.getImageData(2,18,1,1).data[3]>128,o=r.getImageData(2,2,1,1).data[3]>128;return{native:i||o,flippedY:o&&!i}}catch{return{native:!1,flippedY:!1}}})(),th));try{let r=e;return t||(r=Jd(r)),n&&(r=_d(r,t)),{svg:r,naturalOnly:!0}}catch{return{svg:e,naturalOnly:!0}}}async function Kd(e,t){let{width:n,height:r,scale:i=1,dpr:o=1,meta:a={},backgroundColor:s,crop:l=null}=t,c=e,u=!1,f=!1;if(l&&!jd(e))throw new RangeError("[snapdom] canvas crop requires an SVG capture payload");if(jd(e)){let t=(function(e){let t=e.indexOf(",");if(t<0)return"";let n=e.slice(t+1,t+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}(e).match(/<svg\b[^>]*>/i)||[])[0]||"",n=parseFloat((t.match(/\bwidth="([\d.]+)/i)||[])[1]),r=parseFloat((t.match(/\bheight="([\d.]+)/i)||[])[1]),i=Number.isFinite(n)&&Number.isFinite(r)&&n>0&&r>0&&Math.min(1,Zd/n,Zd/r,Math.sqrt(eh/(n*r)))<1;if(l||i||Hd())try{let t=Vd(e);if(l&&(t=function(e,t){let n=["x","y","width","height"].map(e=>Number(t?.[e]));if(!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new RangeError("[snapdom] canvas crop requires finite x/y and positive width/height");let r=e.match(/<svg\b[^>]*>/i);if(!r)throw new Error("[snapdom] cannot crop a non-SVG capture");let i=r[0],o=(i.match(/\bviewBox="([^"]+)"/i)||[])[1],a=String(o||"").trim().split(/[\s,]+/).map(Number);if(4!==a.length||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("[snapdom] cannot crop an SVG without a finite viewBox");let[s,l,c,u]=a,f=Math.max(s,n[0]),d=Math.max(l,n[1]),h=Math.min(s+c,n[0]+n[2]),p=Math.min(l+u,n[1]+n[3]);if(!(h>f&&p>d))throw new RangeError("[snapdom] canvas crop does not intersect the SVG viewBox");let g=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),m=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(g)&&g>0?g/c:1,v=Number.isFinite(m)&&m>0?m/u:1,A=Math.max(1,(h-f)*y),b=Math.max(1,(p-d)*v),w=i.replace(/(\bwidth=")[^"]*/i,`$1${A}`).replace(/(\bheight=")[^"]*/i,`$1${b}`).replace(/(\bviewBox=")[^"]*/i,`$1${f} ${d} ${h-f} ${p-d}`);return e.replace(i,w)}(t,l)),Hd()){let e=await Xd(t);t=e.svg,u=e.naturalOnly,f=/@font-face|data:image\//i.test(t)}(i||l)&&(t=function(e){try{let t=e.match(/<svg\b[^>]*>/i);if(!t)return e;let n=t[0],r=parseFloat((n.match(/\bwidth="([\d.]+)/i)||[])[1]),i=parseFloat((n.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(i)||r<=0||i<=0)return e;let o=Math.min(1,Zd/r,Zd/i,Math.sqrt(eh/(r*i)));if(o>=1)return e;let a=Math.max(1,Math.floor(r*o)),s=Math.max(1,Math.floor(i*o));return console.warn(`[snapDOM] Capture ${Math.round(r)}×${Math.round(i)}px exceeds the browser image-decode limit (${Zd}px/side); downscaling to ${a}×${s}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`),e.replace(n,n.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${s}`))}catch{return e}}(t)),c=Yd(t)}catch(t){if(l)throw t;c=e}}let d=new Image;d.loading="eager",d.decoding="sync",d.crossOrigin="anonymous",d.src=c,await d.decode(),Hd()&&await async function(e,t){e.setAttribute("data-snapdom-internal",""),e.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(e);try{let n=document.createElement("canvas");n.width=16,n.height=16;let r=()=>new Promise(e=>{requestAnimationFrame(e),setTimeout(e,50)}),i=n.getContext("2d",{willReadFrequently:!0});if(!i)return await r(),void await r();let o=performance.now()+(t?600:150);for(;;){i.clearRect(0,0,16,16);try{i.drawImage(e,0,0,16,16)}catch{return}let t=i.getImageData(0,0,16,16).data,n=!1;for(let e=3;e<t.length;e+=4)if(t[e]>0){n=!0;break}if(n||performance.now()>o)return;await r()}}finally{try{e.remove()}catch{}}}(d,f);let h,p,g=d.naturalWidth,m=d.naturalHeight,y=l?g:Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:g,v=l?m:Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:m,A=Number.isFinite(n),b=Number.isFinite(r);if(A&&b)h=Math.max(1,n),p=Math.max(1,r);else if(A){h=n,p=v*(n/Math.max(1,y))}else if(b){p=r,h=y*(r/Math.max(1,v))}else h=g,p=m;h*=i,p*=i;let w=h*o,I=p*o,x=Math.max(w/Zd,I/Zd,Math.sqrt(w*I/eh));x>1&&(console.warn(`[snapDOM] Output ${Math.round(w)}×${Math.round(I)}px exceeds the browser canvas limit (${Zd}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),h/=x,p/=x);let C=document.createElement("canvas");C.width=h*o,C.height=p*o,C.style.width=`${h}px`,C.style.height=`${p}px`;let B=C.getContext("2d");if(1!==o&&B.scale(o,o),s&&(B.save(),B.fillStyle=s,B.fillRect(0,0,h,p),B.restore()),!u||Math.round(h*o)===g&&Math.round(p*o)===m)B.drawImage(d,0,0,h,p);else{let e=document.createElement("canvas");e.width=g,e.height=m,e.getContext("2d").drawImage(d,0,0),B.drawImage(e,0,0,h,p)}return C}_f(zd,{decodeSvgFromDataURL:()=>Vd,encodeSvgToDataURL:()=>Yd,fixSafariShadows:()=>Xd,toCanvas:()=>Kd});var Zd,eh,th,nh=Jf(()=>{qd(),Zd=16384,eh=268435456,th=null}),rh={};async function ih(e,t){let n=await Kd(e,t),r=await new Promise(e=>{let r=()=>e(n.toDataURL(`image/${t.format}`,t.quality));try{n.toBlob(t=>{if(!t)return r();let n=new FileReader;n.onload=()=>e(String(n.result||"")),n.onerror=r,n.readAsDataURL(t)},`image/${t.format}`,t.quality)}catch{r()}}),i=new Image;return i.src=r,await i.decode(),i.style.width=n.width/t.dpr+"px",i.style.height=n.height/t.dpr+"px",i}_f(rh,{rasterize:()=>ih});var oh=Jf(()=>{nh()}),ah={};async function sh(e,t){let{scale:n=1,width:r,height:i,meta:o={}}=t,a=Number.isFinite(r),s=Number.isFinite(i),l=Number.isFinite(n)&&1!==n||a||s;if(Hd()&&l)try{let{svg:t}=await Xd(Vd(e)),l=(t.match(/<svg\b[^>]*>/i)||[])[0]||"",c=parseFloat((l.match(/\bwidth="([\d.]+)/i)||[])[1]),u=parseFloat((l.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(c)||!Number.isFinite(u))throw new Error("svg without dimensions");let f,d,h=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:c,p=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u;a&&s?(f=r,d=i):a?(f=r,d=Math.round(p*(r/Math.max(1,h)))):s?(d=i,f=Math.round(h*(i/Math.max(1,p)))):(f=Math.round(c*n),d=Math.round(u*n));let g=t.replace(/width="[^"]*"/,`width="${f}"`).replace(/height="[^"]*"/,`height="${d}"`),m=new Image;return m.decoding="sync",m.loading="eager",m.src=Yd(g),await m.decode(),m.style.width=`${f}px`,m.style.height=`${d}px`,m}catch(n){return Od(t,"safari vector toImg failed, falling back to PNG",n),ih(e,{...t,format:"png",quality:1,meta:o})}let c=new Image;if(c.decoding="sync",c.loading="eager",c.src=e,await c.decode(),a&&s)c.style.width=`${r}px`,c.style.height=`${i}px`;else if(a){let e=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:c.naturalWidth,t=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:c.naturalHeight,n=r/Math.max(1,e);c.style.width=`${r}px`,c.style.height=`${Math.round(t*n)}px`}else if(s){let e=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:c.naturalWidth,t=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:c.naturalHeight,n=i/Math.max(1,t);c.style.height=`${i}px`,c.style.width=`${Math.round(e*n)}px`}else{let r=Math.round(c.naturalWidth*n),i=Math.round(c.naturalHeight*n);if(c.style.width=`${r}px`,c.style.height=`${i}px`,"string"==typeof e&&e.startsWith("data:image/svg+xml"))try{let t=decodeURIComponent(e.split(",")[1]).replace(/width="[^"]*"/,`width="${r}"`).replace(/height="[^"]*"/,`height="${i}"`);e=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,c.src=e}catch(e){Od(t,"SVG width/height patch in toImg failed",e)}}return c}_f(ah,{toImg:()=>sh,toSvg:()=>sh});var lh=Jf(()=>{$d(),oh(),nh()}),ch={};async function uh(e,t){let n=t.type;if("svg"===n){let t=decodeURIComponent(e.split(",")[1]);return new Blob([t],{type:"image/svg+xml"})}let r=await Kd(e,t);return new Promise(e=>r.toBlob(t=>e(t),`image/${n}`,t.quality))}_f(ch,{toBlob:()=>uh});var fh=Jf(()=>{nh()}),dh={};async function hh(e,t){let n=new File([e],t,{type:e.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:t})}catch(e){if("AbortError"!==e.name)return!1}return!0}async function ph(e,t){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(t?.type||"").toLowerCase(),i=n.has(r)?r:"",o=(t?.format||i||"").toLowerCase(),a="jpg"===o?"jpeg":o||"png",s=t?.filename||`snapdom.${a}`,l={...t||{},format:a,type:a};l.dpr=1;let c=function(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return"iOS"===navigator.userAgentData.platform;let e=navigator.userAgent||"",t=/iPhone|iPad|iPod/.test(e),n=navigator.maxTouchPoints>2&&/Macintosh/.test(e);return t||n}();if("svg"===a){let t=await uh(e,{...l,type:"svg"});if(c&&await hh(t,s))return;let n=URL.createObjectURL(t),r=document.createElement("a");return r.href=n,r.download=s,document.body.appendChild(r),r.click(),URL.revokeObjectURL(n),void r.remove()}let u=await Kd(e,l);if(c){let e=`image/${a}`,n=await new Promise(n=>u.toBlob(n,e,t?.quality));if(n&&await hh(n,s))return}let f=document.createElement("a");f.href=u.toDataURL(`image/${a}`,t?.quality),f.download=s,document.body.appendChild(f),f.click(),f.remove()}_f(dh,{download:()=>ph});var gh=Jf(()=>{fh(),nh(),qd()});$d(),$d(),Zf();var mh=new WeakMap,yh=new Map,vh=0;function Ah(){vh++,yh.size>2e3&&yh.clear()}function bh(e){let t=e&&(1===e.nodeType?e:e.parentElement);return!!(t&&t.closest&&t.closest("[data-snapdom-sandbox],[data-snapdom-internal],[data-snapdom]"))}function wh(e){for(let t of e)if(!bh(t.target)){if("childList"===t.type){let e=!0;for(let n of t.addedNodes)if(!bh(n)){e=!1;break}if(e)for(let n of t.removedNodes)if(!bh(n)){e=!1;break}if(e)continue}return!0}return!1}var Ih=!1;var xh=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function Ch(e){let t=mh.get(e);if(t&&t.epoch===vh){let e=t.snapshot&&t.snapshot.__needsBgInline;if(void 0!==e)return e}return!0}function Bh(e,t,n){try{if("function"==typeof e.computedStyleMap){let t=e.computedStyleMap().get("width");if(null!=t)return!Sh(String(t).trim().toLowerCase())}}catch{}let r=e.style&&(e.style.width||e.style.inlineSize);return!(!r||Sh(String(r).trim().toLowerCase()))||!!function(e,t){let n=e.getBoundingClientRect().width-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0)-(parseFloat(t.borderLeftWidth)||0)-(parseFloat(t.borderRightWidth)||0);if(!(n>0))return!1;let r=1/0,i=-1/0,o=null;for(let t=e.firstChild;t;t=t.nextSibling){let e;if(3===t.nodeType){if(!/\S/.test(t.nodeValue||"")||(o=o||document.createRange(),o.selectNode(t),e=o.getBoundingClientRect(),!e.width&&!e.height))continue}else{if(1!==t.nodeType)continue;{let n=vd(t);if("none"===n.display||"absolute"===n.position||"fixed"===n.position)continue;e=t.getBoundingClientRect()}}e.left<r&&(r=e.left),e.right>i&&(i=e.right)}return i!==-1/0&&i-r<n-.5}(e,t)&&(n||function(e,t){let n=e.parentElement;if(!n)return!1;let r=vd(n),i=n.getBoundingClientRect().width-(parseFloat(r.paddingLeft)||0)-(parseFloat(r.paddingRight)||0)-(parseFloat(r.borderLeftWidth)||0)-(parseFloat(r.borderRightWidth)||0)-(parseFloat(t.marginLeft)||0)-(parseFloat(t.marginRight)||0);return i>0&&Math.abs(e.getBoundingClientRect().width-i)>.5}(e,t))}var Eh=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function Sh(e){return Eh.has(e)||e.startsWith("fit-content")}var kh=new WeakMap;function Fh(e,t=null,n={}){let r=mh.get(e),i=!(!n||!n.embedFonts),o=n&&n.excludeStyleProps||null;if(r&&r.epoch===vh&&r.embedFonts===i&&r.excludeStyleProps===o)return r.snapshot;let a=t||getComputedStyle(e),s=function(e,t={}){let n={},r=t.excludeStyleProps;for(let t=0;t<e.length;t++){let i=e[t];if(gd(i)||r&&(r instanceof RegExp&&r.test(i)||"function"==typeof r&&r(i)))continue;let o=e.getPropertyValue(i);("background-image"===i||"content"===i)&&o.includes("url(")&&!o.includes("data:")&&(o="none"),n[i]=o}let i=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let t of i)if(!n[t])try{let r=e.getPropertyValue(t);r&&(n[t]=r)}catch{}let o=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let t of o)if(!n[t])try{let r=e.getPropertyValue(t);r&&(n[t]=r)}catch{}if(t.embedFonts){let t=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let r of t)if(!n[r])try{let t=e.getPropertyValue(r);t&&(n[r]=t)}catch{}}try{"hidden"===(n["content-visibility"]||e.getPropertyValue("content-visibility"))&&(n["content-visibility"]="hidden")}catch{}let a=!1;{let t=e.getPropertyValue("background-image");if(t&&"none"!==t&&(a=!0),!a){let t=e.getPropertyValue("background-color");t&&"rgba(0, 0, 0, 0)"!==t&&"transparent"!==t&&(a=!0)}if(!a)for(let t of xh){let n=e.getPropertyValue(t);if(n&&"none"!==n){a=!0;break}}if(!a){let t=e.getPropertyValue("background");t&&/url\s*\(/i.test(t)&&(a=!0)}}Object.defineProperty(n,"__needsBgInline",{value:a,enumerable:!1});let s=parseFloat(e.getPropertyValue("border-top-width")||0)||0,l=parseFloat(e.getPropertyValue("border-right-width")||0)||0,c=parseFloat(e.getPropertyValue("border-bottom-width")||0)||0,u=parseFloat(e.getPropertyValue("border-left-width")||0)||0;if(0===s&&0===l&&0===c&&0===u){let t=(e.getPropertyValue("border-image-source")||"").trim(),r=t&&"none"!==t,i=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color"];for(let e of i)delete n[e];r||(n.border="none")}return n}(a,n);return function(e,t,n){if(e instanceof HTMLElement&&e.style&&e.style.height)return;let r=e.tagName&&e.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r)||t.aspectRatio&&"none"!==t.aspectRatio&&"auto"!==t.aspectRatio)return;let i=t.display||"";if(i.includes("flex")||i.includes("grid"))return;let o=t.position;if("absolute"===o||"fixed"===o||"sticky"===o||"none"!==t.transform||function(e){return!!(e.backgroundImage&&"none"!==e.backgroundImage||e.backgroundColor&&"rgba(0, 0, 0, 0)"!==e.backgroundColor&&"transparent"!==e.backgroundColor||(parseFloat(e.borderTopWidth)||0)>0||(parseFloat(e.borderBottomWidth)||0)>0||(parseFloat(e.paddingTop)||0)>0||(parseFloat(e.paddingBottom)||0)>0)||"visible"!==(e.overflowBlock||e.overflowY||"visible")}(t)||Nh(e))return;let a=t.overflowX||t.overflow||"visible",s=t.overflowY||t.overflow||"visible";if("visible"!==a||"visible"!==s)return;let l=t.clip;if(l&&"auto"!==l&&"rect(auto, auto, auto, auto)"!==l||"hidden"===t.visibility||"0"===t.opacity||!function(e){for(let t=e.firstChild;t;t=t.nextSibling)if(3===t.nodeType&&/\S/.test(t.nodeValue))return!0;let t=e.firstElementChild,n=e.lastElementChild;if(t&&"BR"===t.tagName||n&&"BR"===n.tagName)return!0;for(let t=e.firstElementChild;t;t=t.nextElementSibling){let e=vd(t);if("none"===e.display)continue;let n=e.position;if("absolute"!==n&&"fixed"!==n)return!0}return!1}(e))return;let c=parseFloat(t.height),u=function(e){let t=e.getBoundingClientRect().top,n=-1/0,r=null;for(let t=e.firstChild;t;t=t.nextSibling){if(3===t.nodeType){if(!/\S/.test(t.nodeValue||""))continue;r=r||document.createRange(),r.selectNode(t);let e=r.getBoundingClientRect();(e.width||e.height)&&(n=Math.max(n,e.bottom));continue}if(1!==t.nodeType)continue;let e=vd(t);if("none"===e.display)continue;let i=e.position;"absolute"===i||"fixed"===i||e.float&&"none"!==e.float||(n=Math.max(n,t.getBoundingClientRect().bottom))}return n===-1/0?NaN:n-t}(e);Number.isFinite(c)&&Number.isFinite(u)&&Math.abs(c-u)>2||(delete n.height,delete n["block-size"])}(e,a,s),mh.set(e,{epoch:vh,snapshot:s,embedFonts:i,excludeStyleProps:o}),s}async function Dh(e,t,n,r){if("STYLE"===e.tagName)return;let i=function(e,t){return e&&e.session&&e.persist?e:e&&(e.styleMap||e.styleCache||e.nodeMap)?{session:e,persist:{snapshotKeyCache:yh,defaultStyle:Kf.defaultStyle,baseStyle:Kf.baseStyle,image:Kf.image,resource:Kf.resource,background:Kf.background,font:Kf.font},options:t||{}}:{session:Kf.session,persist:{snapshotKeyCache:yh,defaultStyle:Kf.defaultStyle,baseStyle:Kf.baseStyle,image:Kf.image,resource:Kf.resource,background:Kf.background,font:Kf.font},options:e||t||{}}}(n,r),o=i.options&&i.options.cache||"auto";"disabled"!==o&&function(e=document.documentElement){if(Ih)return;Ih=!0;let t=e=>{wh(e)&&Ah()};try{new MutationObserver(t).observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(t).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let e=document.fonts;e&&(e.addEventListener?.("loadingdone",Ah),e.ready?.then(()=>Ah()).catch(()=>{}))}catch{}}(document.documentElement),"disabled"===o&&!i.session.__bumpedForDisabled&&(Ah(),yh.clear(),i.session.__bumpedForDisabled=!0);let{session:a,persist:s}=i;if(!a.styleCache.has(e)){let t=null;try{t=getComputedStyle(e)}catch{}a.styleCache.set(e,t||getComputedStyle(document.documentElement))}let l=a.styleCache.get(e);e.getAttribute?.("style")&&function(e,t,n){if(e.style&&0!==e.style.length)for(let r=0;r<e.style.length;r++){let i=e.style[r],o=n.getPropertyValue(i);o&&t.style.setProperty(i,o)}}(e,t,l);let c=l.getPropertyValue("animation-name");t&&t.style&&c&&"none"!==c&&t.style.setProperty("animation","none","important");let u=Fh(e,l,i.options),f=Nh(e);if(f){let e=l.getPropertyValue("min-width");(!e||"auto"===e||"0px"===e)&&(u["min-width"]="0px")}let d=e.tagName?.toLowerCase()||"div",h=function(e){let t=kh.get(e);return t||(t=Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0).map(([e,t])=>`${e}:${t}`).join(";"),kh.set(e,t),t)}(u),p=!0;if(md(d,(u.display||"").toLowerCase())){p=function(e){for(let t=e.firstChild;t;t=t.nextSibling){if(3===t.nodeType&&/\S/.test(t.nodeValue||""))return!0;if(1===t.nodeType){let e=vd(t).position;if("absolute"!==e&&"fixed"!==e)return!0}}return!1}(e),p&&function(e,t,n){let r=(t.display||"").toLowerCase();if("inline"===r||kd.has(e))return!1;if(n)return!0;if("none"!==(t.float||"none").toLowerCase())return!1;let i=(t.position||"static").toLowerCase();return"absolute"!==i&&"fixed"!==i&&!Td.has(r)}(d,u,f)&&Bh(e,l,f)&&(p=!1),h=`${h}|${d}${p?"|c":""}${f?"|f":""}`;let t=u["text-wrap-mode"]||u["white-space"]||"";p&&"nowrap"!==t&&"pre"!==t&&(a.reconcileRisk=(a.reconcileRisk||0)+1)}let g=s.snapshotKeyCache.get(h);void 0===g&&(g=yd(u,d,p,f),s.snapshotKeyCache.set(h,g)),a.styleMap.set(t,g)}function Nh(e){let t=e.parentElement;if(!t)return!1;let n=vd(t).display||"";return n.includes("flex")||n.includes("grid")}Ld();var Mh=["fill","stroke","color","background-color","stop-color"],Th=new Set(["symbol","defs","pattern","marker","linearGradient","radialGradient","filter"]);function Qh(e){let t=e;for(;t&&1===t.nodeType;){if("http://www.w3.org/2000/svg"===t.namespaceURI){if("mask"===t.localName||"clipPath"===t.localName)return!1;if(Th.has(t.localName))return!0}t=t.parentNode}return!1}var Lh=new Map;function Rh(e,t){if(1!==e?.nodeType||1!==t?.nodeType||Qh(e))return;let n=e.getAttribute?.("style"),r=!(!n||!n.includes("var("));if(!r&&e.attributes?.length){let t=e.attributes;for(let e=0;e<t.length;e++){let n=t[e];if(n&&"string"==typeof n.value&&n.value.includes("var(")){r=!0;break}}}let i=null;if(r)try{i=getComputedStyle(e)}catch{}if(r){let n=e.style;if(n&&n.length){let e=new Set;for(let r=0;r<n.length;r++){let o=n[r];if(e.has(o))continue;e.add(o);let a=n.getPropertyValue(o);if(!a||!a.includes("var("))continue;let s=i&&i.getPropertyValue(o);if(s)try{t.style.setProperty(o,s.trim(),n.getPropertyPriority(o))}catch{}}}}if(r&&e.attributes?.length){let n=e.attributes;for(let e=0;e<n.length;e++){let r=n[e];if(!r||"string"!=typeof r.value||!r.value.includes("var("))continue;let o=r.name,a=i&&i.getPropertyValue(o);if(a)try{t.style.setProperty(o,a.trim())}catch{}}}if(!r){if(!i)try{i=getComputedStyle(e)}catch{i=null}if(!i)return;let n=e.namespaceURI||"html",r=function(e,t){let n=t+"::"+e.toLowerCase(),r=Lh.get(n);if(r)return r;let i=document,o="http://www.w3.org/2000/svg"===t?i.createElementNS(t,e):i.createElement(e),a=i.createElement("div");a.setAttribute("data-snapdom-internal",""),a.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",a.appendChild(o),i.documentElement.appendChild(a);let s=getComputedStyle(o),l={};for(let e of Mh)l[e]=s.getPropertyValue(e)||"";return a.remove(),Lh.set(n,l),l}(e.tagName,n);for(let e of Mh){let n=i.getPropertyValue(e)||"",o=r[e]||"";if(n&&n!==o)try{t.style.setProperty(e,n.trim())}catch{}}}}function Uh(e){return!!(!e||e.startsWith("data:")||e.startsWith("blob:")||/^data:image\/(gif|png|svg)/.test(e)&&e.length<200)}$d(),$d(),Zf(),fd(),fd();var Hh="img[data-src], img[data-lazy-src], img[data-original], img[data-hi-res-src], img[data-srcset], img[data-lazy-srcset]";var qh=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i;function Oh(e,t){if(!e)return null;let n=0;try{n=t?t.getBoundingClientRect().width||t.width:0}catch{}n||(n=window.innerWidth||1e3);let r=[];for(let t of e.split(",")){let e=t.trim().split(/\s+/);if(!e[0])continue;let i=e[1]||"",o=1;/^\d*\.?\d+x$/i.test(i)?o=parseFloat(i):/^\d+w$/i.test(i)&&(o=parseInt(i,10)/n),r.push({url:e[0],d:o})}if(!r.length)return null;r.sort((e,t)=>e.d-t.d);let i=window.devicePixelRatio||1;return(r.find(e=>e.d>=i)||r[r.length-1]).url}function Ph(e,t){let n=e.currentSrc||"";if(n&&!Uh(n))return n;let r=t.querySelectorAll("source[srcset]"),i=null;for(let t of r){let n=t.getAttribute("srcset");if(!n||Uh(n))continue;let r=t.getAttribute("type");if(r&&!qh.test(r.trim()))continue;let o=t.getAttribute("media");if(o)try{if(window.matchMedia(o).matches)return Oh(n,e)}catch{}i||(i=Oh(n,e))}return i}function $h(e){let t=[e.getAttribute("data-src"),e.getAttribute("data-lazy-src"),e.getAttribute("data-original"),e.getAttribute("data-hi-res-src")];for(let e of t)if(e&&!Uh(e))return e;let n=e.getAttribute("data-srcset")||e.getAttribute("data-lazy-srcset");if(n){let e=n.split(",")[0].trim().split(/\s+/)[0];if(e&&!Uh(e))return e}return null}async function zh(e,t={}){if(!e||1!==e?.nodeType||!1===t.resolvePicturePlaceholders)return null;let{timeout:n,concurrency:r,resolveLazySrc:i,silent:o,useProxy:a}=function(e={}){let t=e.pictureResolver&&"object"==typeof e.pictureResolver?e.pictureResolver:{};return{timeout:t.timeout??5e3,concurrency:t.concurrency??4,resolveLazySrc:!1!==t.resolveLazySrc,silent:t.silent??!1,useProxy:"string"==typeof e.useProxy?e.useProxy:""}}(t);if(!function(e,t){return!!(e&&1===e?.nodeType&&(e.matches?.("picture")||e.querySelector("picture")||t&&(e.matches?.(Hh)||e.querySelector(Hh))))}(e,i))return null;let s=[],l=[];async function c(e){let t=await sd(e,{as:"dataURL",timeout:n,useProxy:a,silent:!0});return t.ok?t.data:null}let u=Array.from(e.querySelectorAll("picture"));e.matches?.("picture")&&u.unshift(e);for(let e of u){let t=e.querySelector("img");if(!t)continue;if(!Uh(t.getAttribute("src")||""))continue;let n=Ph(t,e);n&&l.push(async()=>{let r=await c(n);if(!r)return void(o||console.warn(`[snapdom:picture-resolver] Failed to fetch: ${n.slice(0,60)}`));let i=t.getAttribute("src"),a=t.getAttribute("srcset"),l=t.getAttribute("sizes"),u=[];t.src=r,t.setAttribute("src",r),t.removeAttribute("srcset"),t.removeAttribute("sizes");let f=e.querySelectorAll("source");for(let e of f)u.push({el:e,parent:e.parentElement,next:e.nextSibling}),e.remove();s.push(()=>{null!==i?t.setAttribute("src",i):t.removeAttribute("src"),null!==a&&t.setAttribute("srcset",a),null!==l&&t.setAttribute("sizes",l);for(let{el:e,parent:t,next:n}of u)t&&t.insertBefore(e,n)})})}if(i){let t=Array.from(e.querySelectorAll("img"));"img"===e.localName&&t.unshift(e);for(let e of t){if(e.closest("picture")&&Uh(e.getAttribute("src")||""))continue;let t=e.getAttribute("src")||"",n=$h(e);n&&Uh(t)&&l.push(async()=>{let t=await c(n);if(!t)return;let r=e.getAttribute("src");e.src=t,e.setAttribute("src",t),e.removeAttribute("srcset"),e.removeAttribute("sizes"),s.push(()=>{null!==r?e.setAttribute("src",r):e.removeAttribute("src")})})}}return 0===l.length?null:(await async function(e){for(let t=0;t<e.length;t+=r){let n=e.slice(t,t+r);await Promise.allSettled(n.map(e=>e()))}}(l),async function(){for(let e of s)try{e()}catch{}})}function jh(e,t,n){return n?Promise.all(e.map(e=>new Promise(n=>t(e,n)))):Promise.all(e.map(e=>new Promise(r=>{!function i(){Rd(n=>{!n||"function"!=typeof n.timeRemaining||n.timeRemaining()>0?t(e,r):i()},{fast:n})}()})))}function Vh(e,t,n){return e?(e=(e=(e=(e=(e=e.replace(/:host\(([^)]+)\)/g,(e,n)=>`:where(${t}:is(${n.trim()}))`)).replace(/:host\b/g,`:where(${t})`)).replace(/:host-context\(([^)]+)\)/g,(e,n)=>`:where(:where(${n.trim()}) ${t})`)).replace(/::slotted\(([^)]+)\)/g,(e,n)=>`:where(${t} ${n.trim()})`)).replace(/(^|})(\s*)([^@}{]+){/g,(e,r,i,o)=>{let a=function(e,t,n=!0,r){return e.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{if(e.startsWith(":where(")||e.startsWith("@"))return e;let i=n?function(e,t){if(!(e=e.trim()))return e;let n=t?`[data-sd-slotted~="${t}"]`:"[data-sd-slotted]";return e.endsWith(":not([data-sd-slotted])")||e.endsWith(`:not(${n})`)?e:`${e}:not(${n})`}(e,r):e;return`:where(${t} ${i})`}).join(", ")}(o,t,!0,n);return`${r}${i}${a}{`}),e):""}function Yh(e,t){try{let n=getComputedStyle(e).getPropertyValue(t).trim();if(n)return n}catch{}try{let e=getComputedStyle(document.documentElement).getPropertyValue(t).trim();if(e)return e}catch{}return""}function Wh(e){let t=0,n=0;if(e.offsetWidth>0&&(t=e.offsetWidth),e.offsetHeight>0&&(n=e.offsetHeight),0===t||0===n)try{let r=getComputedStyle(e);if(0===t){let e=parseFloat(r.width);!isNaN(e)&&e>0&&(t=e)}if(0===n){let e=parseFloat(r.height);!isNaN(e)&&e>0&&(n=e)}}catch{}if(0===t||0===n)try{if(0===t){let n=parseFloat(e.getAttribute("width"));!isNaN(n)&&n>0&&(t=n)}if(0===n){let t=parseFloat(e.getAttribute("height"));!isNaN(t)&&t>0&&(n=t)}}catch{}if((0===t||0===n)&&(e.naturalWidth||e.naturalHeight))try{0===t&&e.naturalWidth>0&&(t=e.naturalWidth),0===n&&e.naturalHeight>0&&(n=e.naturalHeight)}catch{}return{width:t,height:n}}async function Gh(e,t,n){let r=await async function(e,t=3){let n=()=>{try{return e.contentDocument||e.contentWindow?.document||null}catch{return null}},r=n(),i=0;for(;i<t&&(!r||!r.body&&!r.documentElement);)await new Promise(e=>setTimeout(e,0)),r=n(),i++;return r&&(r.body||r.documentElement)?r:null}(e,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:i,contentHeight:o,rect:a}=function(e){let t=e.getBoundingClientRect(),n=0,r=0,i=0,o=0;try{let t=getComputedStyle(e);n=parseFloat(t.borderLeftWidth)||0,r=parseFloat(t.borderRightWidth)||0,i=parseFloat(t.borderTopWidth)||0,o=parseFloat(t.borderBottomWidth)||0}catch{}return{contentWidth:Math.max(0,Math.round(t.width-(n+r))),contentHeight:Math.max(0,Math.round(t.height-(i+o))),rect:t}}(e),s=n?.snap;if(!s&&typeof window<"u"&&window.snapdom&&(s=window.snapdom),!s||"function"!=typeof s.toPng)throw new Error("[snapdom] iframe capture requires snapdom.toPng. Use snapdom(el) or pass options.snap. With ESM, assign window.snapdom = snapdom after import if using iframes.");let l,c={...n,scale:1,clip:null},u=function(e,t,n){let r=e.defaultView,i=r?r.scrollX:0,o=r?r.scrollY:0,a=e.body?e.body.scrollLeft:0,s=e.body?e.body.scrollTop:0,l=e.documentElement?e.documentElement.scrollLeft:0,c=e.documentElement?e.documentElement.scrollTop:0,u=0,f=0,d=0,h=0;try{let t=r&&e.body?r.getComputedStyle(e.body):null;t&&(u=(parseFloat(t.marginTop)||0)+(parseFloat(t.paddingTop)||0),f=(parseFloat(t.marginRight)||0)+(parseFloat(t.paddingRight)||0),d=(parseFloat(t.marginBottom)||0)+(parseFloat(t.paddingBottom)||0),h=(parseFloat(t.marginLeft)||0)+(parseFloat(t.paddingLeft)||0))}catch{}try{e.documentElement.setAttribute("data-sd-pinned","")}catch{}let p=e.createElement("style");return p.setAttribute("data-sd-iframe-pin",""),p.textContent=`html {margin: 0 !important;padding: 0 !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${u}px ${f}px ${d}px ${h}px !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(e.head||e.documentElement).appendChild(p),()=>{try{p.remove()}catch{}try{e.documentElement.removeAttribute("data-sd-pinned")}catch{}try{r&&"function"==typeof r.scrollTo&&r.scrollTo(i,o),e.body&&(e.body.scrollLeft=a,e.body.scrollTop=s),e.documentElement&&(e.documentElement.scrollLeft=l,e.documentElement.scrollTop=c)}catch{}}}(r,i,o),f=Kf.session.nodeMap,d=Kf.session.styleMap,h=Kf.session.styleCache;try{l=await s.toPng(r.documentElement,c)}finally{u(),Kf.session.nodeMap=f,Kf.session.styleMap=d,Kf.session.styleCache=h}l.style.display="block",l.style.width=`${i}px`,l.style.height=`${o}px`;let p=document.createElement("div");return t.nodeMap.set(p,e),Dh(e,p,t,n),p.style.overflow="hidden",p.style.display="block",p.style.width||(p.style.width=`${Math.round(a.width)}px`),p.style.height||(p.style.height=`${Math.round(a.height)}px`),p.appendChild(l),p}var Jh=new Xf(80);async function _h(e){if(Kf.resource?.has(e))return Kf.resource.get(e);if(Jh.has(e))return Jh.get(e);let t=(async()=>{let t=await sd(e,{as:"dataURL",silent:!0});if(!t.ok||"string"!=typeof t.data)throw new Error(`[snapDOM] Failed to read blob URL: ${e}`);return Kf.resource?.set(e,t.data),t.data})();Jh.set(e,t);try{let n=await t;return Jh.set(e,n),n}catch(t){throw Jh.delete(e),t}}var Xh=/\bblob:[^)"'\s]+/g;async function Kh(e){if(!e||-1===e.indexOf("blob:"))return e;let t=Array.from(new Set(e.match(Xh)||[]));if(0===t.length)return e;let n=e;for(let e of t)try{let t=await _h(e);n=n.split(e).join(t)}catch{}return n}function Zh(e){return"string"==typeof e&&e.startsWith("blob:")}function ep(e){return(e||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let t=e.match(/^(\S+)(\s+.+)?$/);return t?{url:t[1],desc:t[2]||""}:null}).filter(Boolean)}function tp(e){return e.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function np(e,t){let n=e.querySelectorAll?Array.from(e.querySelectorAll(t)):[];return e.matches?.(t)&&n.unshift(e),n}qd();var rp=new Map,ip=new Set(["IFRAME"]);function op(e,t){rp.set(String(e).toUpperCase(),t)}function ap(e){let{width:t,height:n}=Wh(e),r=t,i=n;if(!r||!i){let t=e.getBoundingClientRect();r=r||t.width||0,i=i||t.height||0}let o=document.createElement("div");return o.style.cssText=`display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`,o}var sp=200,lp=new Set(["img","canvas","video","iframe","object","embed"]);function cp(e,t){return e.right>=t.left-sp&&e.left<=t.right+sp&&e.bottom>=t.top-sp&&e.top<=t.bottom+sp}async function up(e,t,n){if(!e)throw new Error("Invalid node");let r,i=new Set,o=null,a=null;if(e.nodeType===Node.ELEMENT_NODE){let n=(e.localName||e.tagName||"").toLowerCase();if("snapdom-sandbox"===e.id||e.hasAttribute("data-snapdom-sandbox")||wd.has(n))return null;if("foreignobject"===n&&e.parentElement?.closest?.("foreignObject"))return Od(t,"Nested <foreignObject> skipped (SVG spec limitation — not rendered by browsers)"),null;if("source"===n&&"picture"===e.parentElement?.localName)return null}if(e.nodeType===Node.TEXT_NODE||e.nodeType!==Node.ELEMENT_NODE)return e.cloneNode(!0);if("exclude"===e.getAttribute("data-capture")){if("hide"===n.excludeMode)return ap(e);if("remove"===n.excludeMode)return null}if(n.exclude&&Array.isArray(n.exclude))for(let t of n.exclude)try{if(e.matches?.(t)){if("hide"===n.excludeMode)return ap(e);if("remove"===n.excludeMode)return null}}catch(e){console.warn(`Invalid selector in exclude option: ${t}`,e)}if("function"==typeof n.filter)try{if(!n.filter(e)){if("hide"===n.filterMode)return ap(e);if("remove"===n.filterMode)return null}}catch(e){console.warn("Error in filter function:",e)}if(t.clip&&function(e,t){if(e===t.root)return!1;let n;try{n=e.getBoundingClientRect()}catch{return!1}if(0===n.width&&0===n.height)return!1;let r=vd(e);if("inline"===r.display&&!lp.has((e.localName||"").toLowerCase()))return!1;let i=t.rect,o=e.scrollWidth||0,a=e.scrollHeight||0,s={left:"rtl"===r.direction?Math.min(n.left,n.right-o):n.left,top:n.top,right:Math.max(n.right,n.left+o),bottom:Math.max(n.bottom,n.top+a)},l=r.writingMode||"";if((l.startsWith("vertical")||l.startsWith("sideways"))&&(s.top=Math.min(n.top,n.bottom-a),s.left=Math.min(s.left,n.right-o)),cp(s,i))return!1;let c=(e.ownerDocument||document).createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;c.nextNode();){let e=c.currentNode.getBoundingClientRect();if((e.width>0||e.height>0)&&cp(e,i))return!1}return!0}(e,t.clip))return function(e,t,n){let r=e.cloneNode(!1);"IMG"===e.tagName&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),Dh(e,r,t,n);let{width:i,height:o}=Wh(e);return i>0&&(r.style.width=`${i}px`,r.style.minWidth=`${i}px`,r.style.maxWidth=`${i}px`),o>0&&(r.style.height=`${o}px`,r.style.minHeight=`${o}px`,r.style.maxHeight=`${o}px`),r.style.visibility="hidden",r.style.overflow="hidden",r.style.boxSizing="border-box",r}(e,t,n);if(n.__resolveNodeHooks)for(let r of n.__resolveNodeHooks){let i;try{i=await r(e,n)}catch(e){Od(t,"resolveNode plugin hook failed",e)}if(null===i)return null;if(i instanceof Node)return i.nodeType===Node.ELEMENT_NODE&&(t.nodeMap.set(i,e),Dh(e,i,t,n)),i}{let r=ip.has(e.tagName)&&rp.get(e.tagName);if(r){let i=await r(e,t,n);if(void 0!==i)return i}}if("placeholder"===e.getAttribute("data-capture")){let r=e.cloneNode(!1);t.nodeMap.set(r,e),Dh(e,r,t,n);let i=document.createElement("div");return i.textContent=e.getAttribute("data-placeholder-text")||"",i.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",r.appendChild(i),r}{let r=!ip.has(e.tagName)&&rp.get(e.tagName);if(r){let i=await r(e,t,n);if(void 0!==i)return i}}try{if(r=e.cloneNode(!1),r.attributes?.length)try{for(let e of r.attributes)/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(e.value)&&r.setAttribute(e.name,e.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,""))}catch{}if(Rh(e,r),t.nodeMap.set(r,e),"IMG"===e.tagName){!function(e,t){try{let n=null,r=vd(e).content;if(r&&r.includes("url(")){let e=r.match(/url\(["']?([^"')]+)["']?\)/);e&&(n=e[1])}let i=e.closest?.("picture"),o=n||(i?Ph(e,i):e.currentSrc)||e.src||Oh(e.getAttribute("srcset"),e)||"";if(!o)return;t.setAttribute("src",o),t.removeAttribute("srcset"),t.removeAttribute("sizes"),t.loading="eager",t.decoding="sync"}catch{}}(e,r);try{let{width:t,height:n}=Wh(e),i=Math.round(t||0),o=Math.round(n||0);i&&(r.dataset.snapdomWidth=String(i)),o&&(r.dataset.snapdomHeight=String(o))}catch(e){Od(t,"getUnscaledDimensions for IMG failed",e)}try{let t=e.getAttribute("style")||"",n=window.getComputedStyle(e),i=e=>{let r=t.match(new RegExp(`${e}\\s*:\\s*([^;]+)`,"i")),i=r?r[1].trim():n.getPropertyValue(e);return/%|auto/i.test(String(i||""))},o=parseInt(r.dataset.snapdomWidth||"0",10),a=parseInt(r.dataset.snapdomHeight||"0",10),s=i("width")||!o,l=i("height")||!a;s&&o&&(r.style.width=`${o}px`),l&&a&&(r.style.height=`${a}px`);let c=n.getPropertyValue("object-fit"),u=n.getPropertyValue("object-position");c&&"fill"!==c?(r.style.objectFit=c,u&&(r.style.objectPosition=u)):(o&&(r.style.minWidth=`${o}px`),a&&(r.style.minHeight=`${a}px`))}catch(e){Od(t,"IMG dimension freeze failed",e)}}}catch(t){throw console.error("[Snapdom] Failed to clone node:",e,t),t}let s=null;if(e instanceof HTMLTextAreaElement){let{width:t,height:n}=Wh(e),i=t||e.getBoundingClientRect().width||0,o=n||e.getBoundingClientRect().height||0;i&&(r.style.width=`${i}px`),o&&(r.style.height=`${o}px`)}if(e instanceof HTMLInputElement){let n=(e.type||"text").toLowerCase();if("checkbox"!==n&&"radio"!==n||!function(){if(typeof navigator>"u")return!1;let e=(navigator.userAgent||"").toLowerCase();return e.includes("firefox")||e.includes("fxios")}())r.value=e.value,r.setAttribute("value",e.value),void 0!==e.checked&&(r.checked=e.checked,e.checked&&r.setAttribute("checked",""),e.indeterminate&&(r.indeterminate=e.indeterminate));else{let{el:n,applyVisual:i}=function(e){let t,{width:n,height:r}=Wh(e),i=e.getBoundingClientRect();try{t=window.getComputedStyle(e)}catch{}let o=t?parseFloat(t.width):NaN,a=t?parseFloat(t.height):NaN,s=Math.round(n||i.width||0),l=Math.round(r||i.height||0),c=Number.isFinite(o)&&o>0?Math.round(o):Math.max(12,s||16),u=Number.isFinite(a)&&a>0?Math.round(a):Math.max(12,l||16),f="checkbox"===(e.type||"text").toLowerCase(),d=!!e.checked,h=!!e.indeterminate,p=Math.max(Math.min(c,u),12),g="middle";try{t&&t.verticalAlign&&(g=t.verticalAlign)}catch{}let m=document.createElement("div");m.setAttribute("data-snapdom-input-replacement",e.type||"checkbox"),m.style.cssText=`display:inline-block;width:${p}px;height:${p}px;vertical-align:${g};flex-shrink:0;line-height:0;`;let y=document.createElementNS("http://www.w3.org/2000/svg","svg");function v(){let e="#0a6ed1";try{t&&(e=t.accentColor||t.color||e)}catch{}let n=p-2;if(y.innerHTML="",f){let t=document.createElementNS("http://www.w3.org/2000/svg","rect");if(t.setAttribute("x",String(1)),t.setAttribute("y",String(1)),t.setAttribute("width",String(n)),t.setAttribute("height",String(n)),t.setAttribute("rx","2"),t.setAttribute("ry","2"),t.setAttribute("fill",d?e:"none"),t.setAttribute("stroke",e),t.setAttribute("stroke-width",String(2)),y.appendChild(t),d){let e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",`M 3 ${p/2} L ${p/2-1} ${p-1-2} L ${p-1-2} 3`),e.setAttribute("stroke","white"),e.setAttribute("stroke-width",String(Math.max(1.5,2))),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),y.appendChild(e)}else if(h){let t=document.createElementNS("http://www.w3.org/2000/svg","rect"),r=Math.max(6,n-4);t.setAttribute("x",String((p-r)/2)),t.setAttribute("y",String((p-2)/2)),t.setAttribute("width",String(r)),t.setAttribute("height",String(2)),t.setAttribute("fill",e),t.setAttribute("rx","1"),y.appendChild(t)}}else{let t=document.createElementNS("http://www.w3.org/2000/svg","circle");if(t.setAttribute("cx",String(p/2)),t.setAttribute("cy",String(p/2)),t.setAttribute("r",String((p-2)/2)),t.setAttribute("fill",d?e:"none"),t.setAttribute("stroke",e),t.setAttribute("stroke-width",String(2)),y.appendChild(t),d){let e=document.createElementNS("http://www.w3.org/2000/svg","circle"),t=Math.max(2,.35*(p-4));e.setAttribute("cx",String(p/2)),e.setAttribute("cy",String(p/2)),e.setAttribute("r",String(t)),e.setAttribute("fill","white"),y.appendChild(e)}}m.style.setProperty("width",`${p}px`,"important"),m.style.setProperty("height",`${p}px`,"important"),m.style.setProperty("min-width",`${p}px`,"important"),m.style.setProperty("min-height",`${p}px`,"important")}return y.setAttribute("width",String(p)),y.setAttribute("height",String(p)),y.setAttribute("viewBox",`0 0 ${p} ${p}`),m.appendChild(y),v(),{el:m,applyVisual:v}}(e);t.nodeMap.set(n,e),s=i,r=n}}if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&!e.value&&e.placeholder)try{let t=window.getComputedStyle(e,"::placeholder"),n=t&&t.color;if(n&&"rgba(0, 0, 0, 0)"!==n){let e="snapdom-ph-"+(1e6*Math.random()|0);r.classList.add(e);let i=document.createElement("style");i.textContent=`.${e}::placeholder{color:${n}!important;opacity:${t.opacity||"1"}!important;-webkit-text-fill-color:${n}!important;}`,r.prepend(i)}}catch{}if(e instanceof HTMLSelectElement&&(o=e.value),e instanceof HTMLTextAreaElement&&(a=e.value),e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){e.disabled&&r.setAttribute("disabled",""),e.required&&r.setAttribute("required",""),e.readOnly&&r.setAttribute("readonly","");let t=e;void 0!==t.min&&""!==t.min&&r.setAttribute("min",t.min),void 0!==t.max&&""!==t.max&&r.setAttribute("max",t.max),void 0!==t.pattern&&""!==t.pattern&&r.setAttribute("pattern",t.pattern);let n=e.getAttribute("aria-invalid");null!==n&&r.setAttribute("aria-invalid",n)}if(Qh(e)||Dh(e,r,t,n),s&&s(),e instanceof SVGElement&&!Qh(e)){let t=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display"];try{let n=window.getComputedStyle(e);for(let e of t){let t=n.getPropertyValue(e);t&&r.style.setProperty(e,t)}}catch{}}if(e.shadowRoot){try{let t=e.shadowRoot.querySelectorAll("slot");for(let e of t){let t=e.assignedNodes?.()||[];for(let e of t)i.add(e)}}catch{}let o=function(e){return e.shadowScopeSeq=(e.shadowScopeSeq||0)+1,`s${e.shadowScopeSeq}`}(t),a=`[data-sd="${o}"]`;t.shadowScopes||=new WeakMap,t.shadowScopes.set(e.shadowRoot,o);try{r.setAttribute("data-sd",o)}catch{}let s=function(e){let t="";try{e.querySelectorAll("style").forEach(e=>{t+=(e.textContent||"")+"\n"});let n=e.adoptedStyleSheets||[];for(let e of n)try{if(e&&e.cssRules)for(let n of e.cssRules)t+=n.cssText+"\n"}catch{}}catch{}return t}(e.shadowRoot),l=Vh(s,a,o),c=function(e){let t=new Set;if(!e)return t;let n,r=/var\(\s*(--[A-Za-z0-9_-]+)\b/g;for(;n=r.exec(e);)t.add(n[1]);return t}(s),u=function(e,t,n){let r=[];for(let n of t){let t=Yh(e,n);t&&r.push(`${n}: ${t};`)}return r.length?`${n}{${r.join("")}}\n`:""}(e,c,a);!function(e,t,n){if(!t)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=t,e.insertBefore(r,e.firstChild||null)}(r,u+l,o);let f=document.createDocumentFragment(),d=(e,r)=>{if(e.nodeType===Node.ELEMENT_NODE&&"STYLE"===e.tagName)return r(null);up(e,t,n).then(e=>{r(e||null)}).catch(()=>{r(null)})},h=await jh(Array.from(e.shadowRoot.childNodes),d,n.fast);f.append(...h.filter(e=>!!e)),r.appendChild(f)}if("SLOT"===e.tagName){let r=t.shadowScopes?.get(e.getRootNode()),i=e.assignedNodes?.()||[],o=i.length?e.assignedNodes?.({flatten:!0})||i:[],a=o.length?o:Array.from(e.childNodes),s=document.createDocumentFragment(),l=(e,o)=>{up(e,t,n).then(e=>{e&&i.length&&function(e,t){if(!e)return;let n=e=>{let n=e.getAttribute("data-sd-slotted")||"";t?` ${n} `.includes(` ${t} `)||e.setAttribute("data-sd-slotted",n?`${n} ${t}`:t):e.setAttribute("data-sd-slotted",n)};e.nodeType===Node.ELEMENT_NODE&&n(e),e.querySelectorAll?.("*").forEach(n)}(e,r),o(e||null)}).catch(()=>{o(null)})},c=await jh(Array.from(a),l,n.fast);return s.append(...c.filter(e=>!!e)),s}let l=await jh(Array.from(e.childNodes),function(r,o){if(i.has(r)||e.shadowRoot&&!r.assignedSlot)return o(null);up(r,t,n).then(e=>{o(e||null)}).catch(()=>{o(null)})},n.fast);if(r.append(...l.filter(e=>!!e)),null!==o&&r instanceof HTMLSelectElement){r.value=o;for(let e of r.options)e.value===o?e.setAttribute("selected",""):e.removeAttribute("selected")}return null!==a&&r instanceof HTMLTextAreaElement&&(r.textContent=a),r}op("IFRAME",async function(e,t,n){let r=!1;try{r=!(!e.contentDocument&&!e.contentWindow?.document)}catch(e){Od(t,"iframe same-origin probe failed",e)}if(r)try{return await Gh(e,t,n)}catch(e){console.warn("[SnapDOM] iframe rasterization failed, fallback:",e)}if(r||console.warn("[snapdom] cross-origin <iframe> skipped (its document cannot be read). Captured as a placeholder that keeps the frame's box; pass { placeholders: false } for an invisible spacer.",e),n.placeholders){let{width:r,height:i}=Wh(e),o=document.createElement("div");return o.style.cssText=`width:${r}px;height:${i}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,Dh(e,o,t,n),o}{let{width:r,height:i}=Wh(e),o=document.createElement("div");return o.style.cssText=`display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`,Dh(e,o,t,n),o}}),op("CANVAS",async function(e,t,n){let r="";try{let t=e.getContext("2d",{willReadFrequently:!0});try{t&&t.getImageData(0,0,1,1)}catch{}if((Hd()||!t)&&await Ud(),r=e.toDataURL("image/png"),!r||"data:,"===r){try{t&&t.getImageData(0,0,1,1)}catch{}if(await Ud(),r=e.toDataURL("image/png"),!r||"data:,"===r){let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n&&(n.drawImage(e,0,0),r=t.toDataURL("image/png"))}}}catch(e){Od(t,"Canvas toDataURL failed, using empty/fallback",e)}n&&n.debug&&r&&function(e){try{let t=Math.max(1,Math.min(32,e.width)),n=Math.max(1,Math.min(32,e.height)),r=document.createElement("canvas");r.width=t,r.height=n;let i=r.getContext("2d",{willReadFrequently:!0});if(!i)return!1;i.drawImage(e,0,0,t,n);let o=i.getImageData(0,0,t,n).data;for(let e=3;e<o.length;e+=4)if(0!==o[e])return!1;return!0}catch{return!1}}(e)&&Od(t,"canvas is empty at capture time — capture it after its first frame is drawn",e);let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch(e){Od(t,"img decoding/loading hints failed",e)}r&&(i.src=r),i.width=e.width,i.height=e.height;let{width:o,height:a}=Wh(e);return o>0&&(i.style.width=`${o}px`),a>0&&(i.style.height=`${a}px`),t.nodeMap.set(i,e),Dh(e,i,t,n),i}),op("VIDEO",async function(e,t,n){let r="";try{let t=document.createElement("canvas");t.width=e.videoWidth||e.offsetWidth||320,t.height=e.videoHeight||e.offsetHeight||240;let n=t.getContext("2d");n&&(n.drawImage(e,0,0,t.width,t.height),r=t.toDataURL("image/png"),(!r||"data:,"===r)&&(r=""))}catch(e){Od(t,"Video frame capture failed, using poster fallback",e)}let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch{}r?i.src=r:e.poster&&(i.src=e.poster),i.width=e.videoWidth||e.offsetWidth||0,i.height=e.videoHeight||e.offsetHeight||0;let{width:o,height:a}=Wh(e);return o>0&&(i.style.width=`${o}px`),a>0&&(i.style.height=`${a}px`),i.style.objectFit="contain",t.nodeMap.set(i,e),Dh(e,i,t,n),i}),op("AUDIO",async function(e,t,n){if(!e.controls)return;let{width:r,height:i}=Wh(e),o=Math.round(r||e.offsetWidth||300),a=Math.round(i||e.offsetHeight||54),s=a/2,l=Math.max(4,.16*a),c=.34*a,u=o-.34*a,f=c+l+.55*a,d=Math.max(0,u-.7*a-f),h=Math.max(9,Math.round(.24*a)),p=`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${a}" viewBox="0 0 ${o} ${a}"><rect width="${o}" height="${a}" rx="${Math.min(a/2,10)}" fill="#f1f3f4"/><path d="M ${c} ${s-l} L ${c+l} ${s} L ${c} ${s+l} Z" fill="#5f6368"/><rect x="${f}" y="${s-1.5}" width="${d}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${f}" cy="${s}" r="${Math.max(3,.09*a)}" fill="#5f6368"/><text x="${u}" y="${s}" fill="#5f6368" font-family="sans-serif" font-size="${h}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,g=document.createElement("img");try{g.decoding="sync",g.loading="eager"}catch{}return g.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,g.width=o,g.height=a,g.style.width=`${o}px`,g.style.height=`${a}px`,t.nodeMap.set(g,e),Dh(e,g,t,n),g}),$d(),id(),Ld(),Zf(),Zf();var fp=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],dp=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{}),hp=[],pp=new Set;function gp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mp(e){let t="string"==typeof e?e:"",n=[...fp,...hp];for(let e of n)if(e instanceof RegExp&&e.test(t))return!0;return!!(/icon/i.test(t)||/glyph/i.test(t)||/symbols/i.test(t)||/feather/i.test(t)||/fontawesome/i.test(t))}function yp(e=""){let t=String(e).toLowerCase();return/\bmaterial\s*icons\b/.test(t)||/\bmaterial\s*symbols\b/.test(t)}var vp=new Map;function Ap(e){let t=e.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(t)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(t);if(t&&!n&&"currentcolor"!==t.toLowerCase())return t;let r=e.color?.trim();return r&&"inherit"!==r?r:"#000"}async function bp(e,{family:t="Material Icons",weight:n="normal",fontSize:r=32,color:i="#000",variation:o="",className:a=""}={}){let s=String(t||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,c=function(e=""){let t,n=Object.create(null),r=String(e||""),i=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g;for(;t=i.exec(r);)n[t[1].toUpperCase()]=Number(t[2]);return n}(o),{familyForMeasure:u,familyForCanvas:f}=await async function(e,t,n){let r=String(e||""),i=r.toLowerCase(),o=String(t||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(i)&&!/\bsymbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),s="outlined";/\brounded\b/.test(o)||/\bround\b/.test(o)?s="rounded":/\bsharp\b/.test(o)?s="sharp":/\boutlined\b/.test(o)&&(s="outlined");let l=null;if(1===a&&("outlined"===s&&dp.materialIconsFilled?l={url:dp.materialIconsFilled,alias:"snapdom-mi-filled"}:"rounded"===s&&dp.materialIconsRound?l={url:dp.materialIconsRound,alias:"snapdom-mi-round"}:"sharp"===s&&dp.materialIconsSharp&&(l={url:dp.materialIconsSharp,alias:"snapdom-mi-sharp"})),!l)return{familyForMeasure:r,familyForCanvas:r};if(!vp.has(l.alias))try{let e=new FontFace(l.alias,`url(${l.url})`,{style:"normal",weight:"400"});document.fonts.add(e),await e.load(),vp.set(l.alias,!0)}catch{return{familyForMeasure:r,familyForCanvas:r}}let c=`"${l.alias}"`;return{familyForMeasure:c,familyForCanvas:c}}(s,a,c);await async function(e="Material Icons",t=24){try{await Promise.all([document.fonts.load(`400 ${t}px "${String(e).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}(f.replace(/^["']+|["']+$/g,""),r);let d=document.createElement("span");d.setAttribute("data-snapdom-internal",""),d.textContent=e,d.style.position="absolute",d.style.visibility="hidden",d.style.left="-99999px",d.style.whiteSpace="nowrap",d.style.fontFamily=u,d.style.fontWeight=String(n||"normal"),d.style.fontSize=`${r}px`,d.style.lineHeight="1",d.style.margin="0",d.style.padding="0",d.style.fontFeatureSettings="'liga' 1",d.style.fontVariantLigatures="normal",d.style.color=i,document.body.appendChild(d);let h=d.getBoundingClientRect(),p=Math.max(1,Math.ceil(h.width)),g=Math.max(1,Math.ceil(h.height));document.body.removeChild(d);let m=document.createElement("canvas");m.width=p*l,m.height=g*l;let y=m.getContext("2d");y.scale(l,l),y.font=`${n?`${n} `:""}${r}px ${f}`,y.textAlign="left",y.textBaseline="top",y.fillStyle=i;try{y.fontKerning="normal"}catch{}return y.fillText(e,0,0),{dataUrl:m.toDataURL(),width:p,height:g}}async function wp(e,t,n,r=32,i="#000"){t=t.replace(/^['"]+|['"]+$/g,"");let o=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");a.setAttribute("data-snapdom-internal",""),a.textContent=e,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${t}"`,a.style.fontWeight=n||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let s=a.getBoundingClientRect(),l=Math.ceil(s.width),c=Math.ceil(s.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,l*o),u.height=Math.max(1,c*o);let f=u.getContext("2d");return f.scale(o,o),f.font=n?`${n} ${r}px "${t}"`:`${r}px "${t}"`,f.textAlign="left",f.textBaseline="top",f.fillStyle=i,f.fillText(e,0,0),{dataUrl:u.toDataURL(),width:l,height:c}}fd(),qd();var Ip=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),xp=["katex","mathjax","mathml"];function Cp(e){if(!e)return"";for(let t of e.split(",")){let e=t.trim().replace(/^['"]+|['"]+$/g,"");if(e&&!Ip.has(e.toLowerCase()))return e}return""}function Bp(e){let t=String(e??"400").trim().toLowerCase();if("normal"===t)return 400;if("bold"===t)return 700;let n=parseInt(t,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function Ep(e){let t=String(e??"normal").trim().toLowerCase();return t.startsWith("italic")?"italic":t.startsWith("oblique")?"oblique":"normal"}function Sp(e){let t=String(e??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return t?Math.max(50,Math.min(200,parseFloat(t[1]))):100}function kp(e){return e&&"string"==typeof e?e.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-"):""}function Fp(e,t,n=[]){if(!e)return!1;try{let r=new URL(e,location.href);if(r.origin===location.origin)return!0;let i=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(e=>i.endsWith(e))||n.some(e=>i===e.toLowerCase()||i.endsWith("."+e.toLowerCase())))return!0;let o=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(o)||/\.woff2?(\b|$)/.test(o)||xp.some(e=>o.includes(e)))return!0;for(let e of t){let t=e.toLowerCase().replace(/\s+/g,"+"),n=e.toLowerCase().replace(/\s+/g,"-"),r=kp(e);if(o.includes(t)||o.includes(n)||r&&o.includes(r))return!0}return!1}catch{return!1}}function Dp(e,t){return e&&e.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(e,n,r)=>{let i=(r||"").trim();if(!i||/^data:|^blob:|^https?:|^file:|^about:/i.test(i))return e;let o=i;try{o=new URL(i,t||location.href).href}catch{}return`url("${o}")`})}var Np=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g;async function Mp(e,t,n){if(!e)return e;let r=new Set;function i(e,t){try{return new URL(e,t||location.href).href}catch{return e}}let o=Dp(e,t||location.href);return o=await async function e(t,o,a=0){if(a>4)return console.warn(`[snapDOM] @import depth exceeded (4) at ${o}`),t;let s,l="",c=0;for(;s=Np.exec(t);){l+=t.slice(c,s.index),c=Np.lastIndex;let u=i((s[2]||s[4]||"").trim(),o);if(r.has(u)){console.warn(`[snapDOM] Skipping circular @import: ${u}`);continue}r.add(u);let f="";try{let e=await sd(u,{as:"text",useProxy:n,silent:!0});e.ok&&"string"==typeof e.data&&(f=e.data)}catch{}f?(f=Dp(f,u),f=await e(f,u,a+1),l+=`\n/* inlined: ${u} */\n${f}\n`):l+=s[0]}return l+=t.slice(c),l}(o,t||location.href,0),o}var Tp=/url\((["']?)([^"')]+)\1\)/g,Qp=/@font-face[^{}]*\{[^}]*\}/g;function Lp(e,t,n=""){return(e.match(new RegExp(`${t}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function Rp(e){if(!e)return[];let t=[],n=e.split(",").map(e=>e.trim()).filter(Boolean);for(let e of n){let n=e.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!n)continue;let r=n[1],i=n[2],o=e=>{if(!e.includes("?"))return parseInt(e,16);return[parseInt(e.replace(/\?/g,"0"),16),parseInt(e.replace(/\?/g,"F"),16)]};if(i){let e=o(r),n=o(i),a=Array.isArray(e)?e[0]:e,s=Array.isArray(n)?n[1]:n;t.push([Math.min(a,s),Math.max(a,s)])}else{let e=o(r);Array.isArray(e)?t.push([e[0],e[1]]):t.push([e,e])}}return t}function Up(e,t){if(!t.length||!e||0===e.size)return!0;for(let n of e)for(let[e,r]of t)if(n>=e&&n<=r)return!0;return!1}function Hp(e,t){let n=[];if(!e)return n;for(let r of e.matchAll(Tp)){let e=(r[2]||"").trim();if(e&&!e.startsWith("data:")){if(!/^https?:/i.test(e))try{e=new URL(e,t||location.href).href}catch{}n.push(e)}}return n}async function qp(e,t,n=""){let r=e;for(let i of e.matchAll(Tp)){let e=ed(i[0]);if(!e)continue;let o=e;if(!o.startsWith("http")&&!o.startsWith("data:"))try{o=new URL(o,t||location.href).href}catch{}if(!mp(o)){if(Kf.resource?.has(o)){Kf.font?.add(o),r=r.replace(i[0],`url(${Kf.resource.get(o)})`);continue}try{let e=await sd(o,{as:"dataURL",useProxy:n,silent:!0});if(e.ok&&"string"==typeof e.data){let t=e.data;Kf.resource?.set(o,t),Kf.font?.add(o),r=r.replace(i[0],`url(${t})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",o)}}}return r}function Op(e={}){let t=new Set((e.families||[]).map(e=>String(e).toLowerCase())),n=new Set((e.domains||[]).map(e=>String(e).toLowerCase())),r=new Set((e.subsets||[]).map(e=>String(e).toLowerCase()));return(e,i)=>{if(t.size&&t.has(e.family.toLowerCase()))return!0;if(n.size)for(let t of e.srcUrls)try{if(n.has(new URL(t).host.toLowerCase()))return!0}catch{}if(r.size){let e=function(e){if(!e.length)return null;let t=(t,n)=>e.some(([e,r])=>!(r<t||e>n)),n=t(0,255)||t(305,305),r=t(256,591)||t(7680,7935),i=t(880,1023),o=t(1024,1279);return t(7840,7929)||t(258,259)||t(416,417)||t(431,432)?"vietnamese":o?"cyrillic":i?"greek":r?"latin-ext":n?"latin":null}(i);if(e&&r.has(e))return!0}return!1}}var Pp=new WeakMap,$p=0;function zp(e,t,n,r,i,o){let a=Array.from(e||[]).sort().join("|"),s=t?JSON.stringify({families:(t.families||[]).map(e=>String(e).toLowerCase()).sort(),domains:(t.domains||[]).map(e=>String(e).toLowerCase()).sort(),subsets:(t.subsets||[]).map(e=>String(e).toLowerCase()).sort()}):"",l=(n||[]).map(e=>`${(e.family||"").toLowerCase()}::${e.weight||"normal"}::${e.style||"normal"}::${e.src||""}`).sort().join("|"),c=r||"",u=(i||[]).map(e=>String(e).toLowerCase()).sort().join("|"),f=function(e){let t=Pp.get(e);return void 0===t&&(t=$p++,Pp.set(e,t)),t}(o||document);return`fonts-embed-css::req=${a}::ex=${s}::lf=${l}::px=${c}::fd=${u}::doc=${f}`}async function jp(e,t,n,r){let i;try{i=e.cssRules||[]}catch{return}let o=(e,t)=>{try{return new URL(e,t||location.href).href}catch{return e}};for(let e of i){if(e.type===CSSRule.IMPORT_RULE&&e.styleSheet){let i=e.href?o(e.href,t):t;if(r.depth>=4){console.warn(`[snapDOM] CSSOM import depth exceeded (4) at ${i}`);continue}if(i&&r.visitedSheets.has(i)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${i}`);continue}i&&r.visitedSheets.add(i);let a={...r,depth:(r.depth||0)+1};await jp(e.styleSheet,i,n,a);continue}if(e.type===CSSRule.FONT_FACE_RULE){let i=Cp((e.style.getPropertyValue("font-family")||"").trim());if(!i||mp(i))continue;let o=(e.style.getPropertyValue("font-weight")||"").trim(),a=(e.style.getPropertyValue("font-style")||"").trim(),s=(e.style.getPropertyValue("font-stretch")||"").trim(),l=(e.style.getPropertyValue("font-variation-settings")||"").trim(),c=(e.style.getPropertyValue("src")||"").trim(),u=(e.style.getPropertyValue("unicode-range")||"").trim(),f=o||"400",d=a||"normal",h=s||"100%",p=(a?`font-style:${a};`:"")+(o?`font-weight:${o};`:"")+(s?`font-stretch:${s};`:"")+(l?`font-variation-settings:${l};`:"")+(u?`unicode-range:${u};`:""),g=r.faceMatchesRequired(i,d,f,h);if(!g&&!r.requiredIndex.has(i.toLowerCase()))continue;let m=Rp(u);if(!Up(r.usedCodepoints,m))continue;let y={family:i,weightSpec:f,styleSpec:d,stretchSpec:h,unicodeRange:u,srcRaw:c,srcUrls:Hp(c,t||location.href),href:t||location.href};if(r.simpleExcluder&&r.simpleExcluder(y,m))continue;if(!g){r.provisionalFaces.push({family:i.toLowerCase(),block:`@font-face{font-family:${i};src:${c};${p}}`,srcRaw:c,baseHref:t||location.href});continue}if(r.coveredFamilies.add(i.toLowerCase()),/url\(/i.test(c)){let e=await qp(c,t||location.href,r.useProxy);await n(`@font-face{font-family:${i};src:${e};${p}}`)}else await n(`@font-face{font-family:${i};src:${c};${p}}`)}}}async function Vp({required:e,usedCodepoints:t,exclude:n,localFonts:r=[],useProxy:i="",fontStylesheetDomains:o=[],doc:a=document}={}){e instanceof Set||(e=new Set),t instanceof Set||(t=new Set);let s=new Map;for(let t of e){let[e,n,r,i]=String(t).split("__");if(!e)continue;let o=e.toLowerCase(),a=s.get(o)||[];a.push({w:parseInt(n,10),s:r,st:parseInt(i,10)}),s.set(o,a)}function l(e,t,n,r){let i=String(e).toLowerCase();if(!s.has(i))return!1;let o=s.get(i),a=function(e){let t=String(e||"400").trim(),n=t.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let e=Bp(n[1]),t=Bp(n[2]);return{min:Math.min(e,t),max:Math.max(e,t)}}let r=Bp(t);return{min:r,max:r}}(n),l=function(e){let t=String(e||"normal").trim().toLowerCase();return"italic"===t?{kind:"italic"}:t.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}(t),c=function(e){let t=String(e||"100%").trim(),n=t.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let e=parseFloat(n[1]),t=parseFloat(n[2]);return{min:Math.min(e,t),max:Math.max(e,t)}}let r=t.match(/(\d+(?:\.\d+)?)\s*%/),i=r?parseFloat(r[1]):100;return{min:i,max:i}}(r),u=a.min!==a.max,f=a.min,d=e=>"normal"===l.kind&&"normal"===e||"normal"!==l.kind&&("italic"===e||"oblique"===e),h=!1;for(let e of o){let t=u?e.w>=a.min&&e.w<=a.max:e.w===f,n=d(Ep(e.s)),r=e.st>=c.min&&e.st<=c.max;if(t&&n&&r){h=!0;break}}if(h)return!0;if(!u)for(let e of o){let t=d(Ep(e.s)),n=e.st>=c.min&&e.st<=c.max;if(Math.abs(f-e.w)<=300&&t&&n)return!0}if(!u&&"normal"===l.kind&&o.some(e=>"normal"!==Ep(e.s)))for(let e of o){let t=Math.abs(f-e.w)<=300,n=e.st>=c.min&&e.st<=c.max;if(t&&n)return!0}return!1}let c=Op(n),u=zp(e,n,r,i,o,a);if(Kf.resource?.has(u))return Kf.resource.get(u);let f=function(e){let t=new Set;for(let n of e||[]){let e=String(n).split("__")[0]?.trim();e&&t.add(e)}return t}(e),d=[],h=Np;for(let e of a.querySelectorAll("style")){let t=e.textContent||"";for(let e of t.matchAll(h)){let t=(e[2]||e[4]||"").trim();t&&!mp(t)&&(a.querySelector(`link[rel="stylesheet"][href="${t}"]`)||d.push(t))}}let p=[];d.length&&await Promise.all(d.map(e=>new Promise(t=>{if(a.querySelector(`link[rel="stylesheet"][href="${e}"]`))return t(null);let n=a.createElement("link");n.rel="stylesheet",n.href=e,n.setAttribute("data-snapdom","injected-import"),n.onload=()=>t(n),n.onerror=()=>t(null),a.head.appendChild(n),p.push(n)})));let g="",m=new Set,y=[],v=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(e=>!!e.href);for(let e of p)try{e.remove()}catch{}for(let e of v)try{if(mp(e.href))continue;let r="",u=!1;try{u=new URL(e.href,location.href).origin===location.origin}catch{}if(!u){let t=Array.isArray(o)?o:[];if(!Fp(e.href,f,t))continue}if(u){let t=Array.from(a.styleSheets).find(t=>t.href===e.href);if(t)try{let e=t.cssRules||[];r=Array.from(e).map(e=>e.cssText).join("")}catch{}}if(!r){let t=await sd(e.href,{as:"text",useProxy:i});if(t?.ok&&"string"==typeof t.data&&(r=t.data),mp(e.href))continue}r=await Mp(r,e.href,i);let d="";for(let o of r.match(Qp)||[]){let r=Cp(Lp(o,"font-family"));if(!r||mp(r))continue;let a=Lp(o,"font-weight","400"),u=Lp(o,"font-style","normal"),f=Lp(o,"font-stretch","100%"),h=Lp(o,"unicode-range"),p=Lp(o,"src"),g=Hp(p,e.href),v=l(r,u,a,f);if(!v&&!s.has(r.toLowerCase()))continue;let A=Rp(h);if(!Up(t,A))continue;let b={family:r,weightSpec:a,styleSpec:u,stretchSpec:f,unicodeRange:h,srcRaw:p,srcUrls:g,href:e.href};n&&c(b,A)||(v?(m.add(r.toLowerCase()),d+=/url\(/i.test(p)?await qp(o,e.href,i):o):y.push({family:r.toLowerCase(),block:o,srcRaw:p,baseHref:e.href}))}d.trim()&&(g+=d)}catch{console.warn("[snapDOM] Failed to process stylesheet:",e.href)}let A={requiredIndex:s,usedCodepoints:t,faceMatchesRequired:l,coveredFamilies:m,provisionalFaces:y,simpleExcluder:n?Op(n):null,useProxy:i,visitedSheets:new Set,depth:0};for(let e of a.styleSheets)if(!e.href||!v.some(t=>t.href===e.href))try{let t=e.href||location.origin+"/";t&&A.visitedSheets.add(t),await jp(e,t,async e=>{g+=e},A)}catch{}for(let e of y)m.has(e.family)||(g+=/url\(/i.test(e.srcRaw)?await qp(e.block,e.baseHref,i):e.block);try{for(let e of a.fonts||[]){if(!e||!e.family||"loaded"!==e.status||!e._snapdomSrc)continue;let t=String(e.family).replace(/^['"]+|['"]+$/g,"");if(mp(t)||!s.has(t.toLowerCase())||n?.families&&n.families.some(e=>String(e).toLowerCase()===t.toLowerCase()))continue;let r=e._snapdomSrc;if(!String(r).startsWith("data:"))if(Kf.resource?.has(e._snapdomSrc))r=Kf.resource.get(e._snapdomSrc),Kf.font?.add(e._snapdomSrc);else if(!Kf.font?.has(e._snapdomSrc))try{let t=await sd(e._snapdomSrc,{as:"dataURL",useProxy:i,silent:!0});if(!t.ok||"string"!=typeof t.data)continue;r=t.data,Kf.resource?.set(e._snapdomSrc,r),Kf.font?.add(e._snapdomSrc)}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",e._snapdomSrc);continue}g+=`@font-face{font-family:'${t}';src:url(${r});font-style:${e.style||"normal"};font-weight:${e.weight||"normal"};}`}}catch{}for(let e of r){if(!e||"object"!=typeof e)continue;let t=String(e.family||"").replace(/^['"]+|['"]+$/g,"");if(!t||mp(t)||!s.has(t.toLowerCase())||n?.families&&n.families.some(e=>String(e).toLowerCase()===t.toLowerCase()))continue;let r=null!=e.weight?String(e.weight):"normal",o=null!=e.style?String(e.style):"normal",a=null!=e.stretchPct?`${e.stretchPct}%`:"100%",l=String(e.src||""),c=l;if(!c.startsWith("data:"))if(Kf.resource?.has(l))c=Kf.resource.get(l),Kf.font?.add(l);else if(!Kf.font?.has(l))try{let e=await sd(l,{as:"dataURL",useProxy:i,silent:!0});if(!e.ok||"string"!=typeof e.data)continue;c=e.data,Kf.resource?.set(l,c),Kf.font?.add(l)}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",l);continue}g+=`@font-face{font-family:'${t}';src:url(${c});font-style:${o};font-weight:${r};font-stretch:${a};}`}return g&&(g=function(e){if(!e)return e;let t=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let i of e.match(t)||[]){let e=Cp(Lp(i,"font-family")),t=Lp(i,"font-weight","400"),o=Lp(i,"font-style","normal"),a=Lp(i,"font-stretch","100%"),s=Lp(i,"unicode-range"),l=Lp(i,"src"),c=Hp(l,location.href),u=c.length?c.map(e=>String(e).toLowerCase()).sort().join("|"):l.toLowerCase(),f=[String(e||"").toLowerCase(),t,o,a,s.toLowerCase(),u].join("|");n.has(f)||(n.add(f),r.push(i))}if(0===r.length)return e;let i=0;return e.replace(t,()=>r[i++]||"")}(g),Kf.resource?.set(u,g)),g}function Yp(e,t){let n=new Set,r=new Set;if(!e)return{required:n,usedCodepoints:r};let i=e=>{if(e)for(let t of e)r.add(t.codePointAt(0))},o=e=>{let t=function(e){if(!e)return[];let t=[];for(let n of e.split(",")){let e=n.trim().replace(/^['"]+|['"]+$/g,"");e&&(Ip.has(e.toLowerCase())||t.push(e))}return t}(e.fontFamily);if(t.length)for(let r of t)n.add(`${r}__${Bp(e.fontWeight)}__${Ep(e.fontStyle)}__${Sp(e.fontStretch)}`)},a=e=>{o(vd(e));for(let t of["::before","::after"]){let n=vd(e,t),a=n&&n.content;if(a&&"none"!==a&&"normal"!==a)if(o(n),/^["']/.test(a))i(a.slice(1,-1));else{let e=a.match(/\\[0-9A-Fa-f]{1,6}/g);if(e)for(let t of e)try{r.add(parseInt(t.slice(1),16))}catch{}}}};a(e);let s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;s.nextNode();){let e=s.currentNode;if(e.nodeType===Node.TEXT_NODE){if(t&&e.parentElement&&!t(e.parentElement))continue;i(e.nodeValue||"")}else{if(t&&!t(e))continue;a(e)}}return{required:n,usedCodepoints:r}}async function Wp(e,t=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(e||[]).filter(Boolean);if(0===r.length)return;let i=()=>{let e=n.createElement("div");e.setAttribute("data-snapdom-internal",""),e.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let t of r){let r=n.createElement("span");r.textContent="AaBbGg1234ÁÉÍÓÚçñ—∞",r.style.fontFamily=`"${t}"`,r.style.fontWeight="700",r.style.fontStyle="italic",r.style.fontSize="32px",r.style.lineHeight="1",r.style.whiteSpace="nowrap",r.style.margin="0",r.style.padding="0",e.appendChild(r)}n.body.appendChild(e),e.offsetWidth,n.body.removeChild(e)};for(let e=0;e<Math.max(1,t);e++)i(),await Ud(),await Ud()}function Gp(e,t=!1){let n="",r=Math.max(1,e);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return t?n.toUpperCase():n}function Jp(e,t=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,e)),i="";for(let[e,t]of n)for(;r>=e;)i+=t,r-=e;return t?i:i.toLowerCase()}function _p(e,t){switch((t||"decimal").toLowerCase()){case"decimal":default:return String(e);case"decimal-leading-zero":{let t=Math.abs(e);return(e<0?"-":"")+(t<10?"0":"")+String(t)}case"lower-alpha":return Gp(e,!1);case"upper-alpha":return Gp(e,!0);case"lower-roman":return Jp(e,!1);case"upper-roman":return Jp(e,!0)}}function Xp(e){let t=new WeakMap,n=e instanceof Document?e.documentElement:e,r=e=>{let t=0,n=e?.parentElement;if(!n)return 0;for(let r of n.children){if(r===e)break;"LI"===r.tagName&&t++}return t},i=(e,t,n)=>{let i,o,a,s=(e=>{let t=new Map;for(let[n,r]of e)t.set(n,r.slice());return t})(e);try{i=n.style?.counterReset||getComputedStyle(n).counterReset}catch{}if(i&&"none"!==i)for(let e of i.split(",")){let n=e.trim().split(/\s+/),r=n[0],i=Number.isFinite(Number(n[1]))?Number(n[1]):0;if(!r)continue;let o=t.get(r);if(o&&o.length){let e=o.slice();e.push(i),s.set(r,e)}else s.set(r,[i])}try{o=n.style?.counterSet||getComputedStyle(n).counterSet}catch{}if(o&&"none"!==o)for(let e of o.split(",")){let t=e.trim().split(/\s+/),n=t[0],r=Number.isFinite(Number(t[1]))?Number(t[1]):0;if(!n)continue;let i=s.get(n)||[];0===i.length&&i.push(0),i[i.length-1]=r,s.set(n,i)}try{a=n.style?.counterIncrement||getComputedStyle(n).counterIncrement}catch{}if(a&&"none"!==a)for(let e of a.split(",")){let t=e.trim().split(/\s+/),n=t[0],r=Number.isFinite(Number(t[1]))?Number(t[1]):1;if(!n)continue;let i=s.get(n)||[];0===i.length&&i.push(0),i[i.length-1]+=r,s.set(n,i)}try{if("list-item"===getComputedStyle(n).display&&(e=>e&&"LI"===e.tagName)(n)){let e=n.parentElement,t=1;if(e&&"OL"===e.tagName){let i=e.getAttribute("start"),o=Number.isFinite(Number(i))?Number(i):1,a=r(n),s=n.getAttribute("value");t=Number.isFinite(Number(s))?Number(s):o+a}else t=1+r(n);let i=s.get("list-item")||[];0===i.length&&i.push(0),i[i.length-1]=t,s.set("list-item",i)}}catch{}return s},o=(e,n,r)=>{let a=i(r,n,e);t.set(e,a);let s=a;for(let t of e.children)s=o(t,a,s);let l=new Map;for(let[e,t]of r){let n=t.length,r=s.get(e);l.set(e,r&&r.length?r.slice(0,n):t.slice())}for(let[e,t]of s)!l.has(e)&&t.length&&!n.has(e)&&l.set(e,t.slice(0,1));return l},a=new Map;return o(n,a,a),{get(e,n){let r=t.get(e)?.get(n);return r&&r.length?r[r.length-1]:0},getStack(e,n){let r=t.get(e)?.get(n);return r?r.slice():[]}}}fd();var Kp=new WeakMap;function Zp(e){try{return e&&e.cssRules?e.cssRules:null}catch{return null}}function eg(e){let t=e.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${t.length}|`,r=0;for(let e=0;e<t.length;e++){let i=t[e];if("STYLE"===i.tagName){n+=`S${i.textContent?i.textContent.length:0}|`;let e=i.sheet,t=e?Zp(e):null;t&&(r+=t.length)}else{n+=`L${i.getAttribute("href")||""}|m:${i.getAttribute("media")||"all"}|`;let e=i.sheet,t=e?Zp(e):null;t&&(r+=t.length)}}let i=e.adoptedStyleSheets;return n+=`ass:${Array.isArray(i)?i.length:0}|tr:${r}`,n}function tg(e,t,n){let r=Zp(e);if(!r)return!1;for(let e=0;e<r.length;e++){if(n.budget<=0)return!1;let i=r[e],o=i&&i.cssText?i.cssText:"";n.budget--;for(let e of t)if(o.includes(e))return!0;if(i&&i.cssRules&&i.cssRules.length)for(let e=0;e<i.cssRules.length&&n.budget>0;e++){let r=i.cssRules[e],o=r&&r.cssText?r.cssText:"";n.budget--;for(let e of t)if(o.includes(e))return!0}if(n.budget<=0)return!1}return!1}function ng(e=document,t=eg(e)){let n=Kp.get(e);if(n&&n.fingerprint===t)return n.result;let r=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],i=e.querySelectorAll("style");for(let n=0;n<i.length;n++){let o=i[n].textContent||"";for(let n of r)if(o.includes(n))return Kp.set(e,{fingerprint:t,result:!0}),!0}let o=e.adoptedStyleSheets;if(Array.isArray(o)&&o.length){let n={budget:1e3};try{for(let i of o)if(tg(i,r,n))return Kp.set(e,{fingerprint:t,result:!0}),!0}catch{}}{let n=e.querySelectorAll('style,link[rel~="stylesheet"]'),i={budget:1e3};for(let o=0;o<n.length&&i.budget>0;o++){let a=n[o],s=null;if(a.tagName,s=a.sheet||null,s&&tg(s,r,i))return Kp.set(e,{fingerprint:t,result:!0}),!0}}return e.querySelector('[style*="counter("], [style*="counters("]')?(Kp.set(e,{fingerprint:t,result:!0}),!0):(Kp.set(e,{fingerprint:t,result:!1}),!1)}function rg(e){for(let t of["Top","Right","Bottom","Left"]){let n=parseFloat(e[`border${t}Width`])||0,r=e[`border${t}Style`];if(n>0&&r&&"none"!==r&&"hidden"!==r)return!0}return!1}function ig(e){if(!e)return"";let t,n=[],r=/"([^"]*)"/g,i=0;for(;t=r.exec(e);){let o=e.slice(i,t.index).trim();o&&n.push(o),n.push(t[1]),i=r.lastIndex}let o=e.slice(i).trim();return o&&n.push(o),n.join("")}function og(e,t,n){let r=e.parentElement,i=r&&n?n.get(r):null;return i?{get(e,n){let r=t.get(e,n),o=i.get(n);return"number"==typeof o?Math.max(r,o):r},getStack(e,n){let r=t.getStack(e,n);if(!r.length)return r;let o=i.get(n);if("number"==typeof o){let e=r.slice();return e[e.length-1]=Math.max(e[e.length-1],o),e}return r}}:t}function ag(e,t,n){let r=new Map;function i(e){let t=[];if(!e||"none"===e)return t;for(let n of String(e).split(",")){let e=n.trim().split(/\s+/),r=e[0],i=Number.isFinite(Number(e[1]))?Number(e[1]):void 0;r&&t.push({name:r,num:i})}return t}let o=i(t?.counterReset),a=i(t?.counterSet),s=i(t?.counterIncrement);function l(t){if(r.has(t))return r.get(t).slice();let i=n.getStack(e,t);i=i.length?i.slice():[];let l=o.find(e=>e.name===t);if(l){let e=Number.isFinite(l.num)?l.num:0;i=i.length?[...i,e]:[e]}let c=a.find(e=>e.name===t);if(c){let e=Number.isFinite(c.num)?c.num:0;0===i.length&&(i=[0]),i[i.length-1]=e}let u=s.find(e=>e.name===t);if(u){let e=Number.isFinite(u.num)?u.num:1;0===i.length&&(i=[0]),i[i.length-1]+=e}return r.set(t,i.slice()),i}return{get(e,t){let n=l(t);return n.length?n[n.length-1]:0},getStack:(e,t)=>l(t),__incs:s}}function sg(e,t,n,r){let i;try{i=vd(e,t)}catch{}let o=i?.content;if(!o||"none"===o||"normal"===o)return{text:"",incs:[]};o=function(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if('"'===r)t=!t;else if("/"===r&&!t)return e.slice(0,n).trim()}return e}(o);let a=ag(e,i,og(e,n,r)),s=function(e){return/\bcounter\s*\(|\bcounters\s*\(/.test(e||"")}(o)?function(e,t,n){if(!e||"none"===e)return e;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return e.replace(r,(e,r,i)=>{let o=String(i).split(",").map(e=>e.trim());if("counter"===r){let e=o[0]?.replace(/^["']|["']$/g,""),r=(o[1]||"decimal").toLowerCase();return _p(n.get(t,e),r)}{let e=o[0]?.replace(/^["']|["']$/g,""),r=o[1]?.replace(/^["']|["']$/g,"")??"",i=(o[2]||"decimal").toLowerCase(),a=n.getStack(t,e);return a.length?a.map(e=>_p(e,i)).join(r):""}})}catch{return"- "}}(o,e,a):o;return{text:ig(s),incs:a.__incs||[]}}async function lg(e,t,n,r){if(1!==e?.nodeType||1!==t?.nodeType||"TEXTAREA"===e.tagName)return;if(!function(e,t){let n=eg(e);return t?(t.__pseudoPreflightFp!==n&&(t.__pseudoPreflight=ng(e,n),t.__pseudoPreflightFp=n),!!t.__pseudoPreflight):ng(e,n)}(e.ownerDocument||document,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=function(e,t){let n=null,r=()=>{if(!n)try{n=Xp(e)}catch(e){Od(t,"buildCounterContext failed",e),n={get:()=>0,getStack:()=>[]}}return n};return{get:(e,t)=>r().get(e,t),getStack:(e,t)=>r().getStack(e,t)}}(e.ownerDocument||document,n));let i=n.__counterCtx;for(let o of["::before","::after","::first-letter"])try{let a=vd(e,o);if(!a||"none"===a.content&&"none"===a.backgroundImage&&"transparent"===a.backgroundColor&&!rg(a)&&(!a.transform||"none"===a.transform)&&"inline"===a.display)continue;if("::first-letter"===o){let r=vd(e),i=(r?.display||"").toLowerCase();if(i.includes("flex")||i.includes("grid"))continue;let o=e=>a[e]!==r[e]&&0!==(parseFloat(a[e])||0);if(!(a.color!==r.color||a.fontSize!==r.fontSize||a.fontWeight!==r.fontWeight||a.fontFamily!==r.fontFamily||a.fontStyle!==r.fontStyle||a.textTransform!==r.textTransform||a.float!==r.float&&"none"!==a.float||o("paddingTop")||o("paddingRight")||o("paddingBottom")||o("paddingLeft")||o("marginTop")||o("marginRight")||o("marginBottom")||o("marginLeft")))continue;let s=Array.from(t.childNodes).find(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim().length>0);if(!s)continue;let l=s.textContent,c=l.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],u=l.slice(c?.length||0);if(!c||/[\uD800-\uDFFF]/.test(c))continue;let f=document.createElement("span");f.textContent=c,f.dataset.snapdomPseudo="::first-letter";let d=yd(Ad(a),"span");n.styleMap.set(f,d);let h=document.createTextNode(u);t.replaceChild(h,s),t.insertBefore(f,h);continue}let s=a.content??"",l=""===s||"none"===s||"normal"===s,{text:c,incs:u}=sg(e,o,i,n.__siblingCounters),f=a.backgroundImage,d=a.backgroundColor,h=a.fontFamily,p=parseInt(a.fontSize)||32,g=parseInt(a.fontWeight)||!1,m=a.color||"#000",y=a.transform,v=mp(h),A=!l&&""!==c,b=f&&"none"!==f,w=d&&"transparent"!==d&&"rgba(0, 0, 0, 0)"!==d,I=rg(a),x=y&&"none"!==y,C="none"!==s&&"normal"!==s,B=C&&((parseFloat(a.width)||0)>0||(parseFloat(a.height)||0)>0),E=C&&a.boxShadow&&"none"!==a.boxShadow,S=C&&a.outlineStyle&&"none"!==a.outlineStyle&&(parseFloat(a.outlineWidth)||0)>0;if(!(A||b||w||I||x||B||E||S)){if(u&&u.length&&e.parentElement){let t=n.__siblingCounters.get(e.parentElement)||new Map;for(let{name:r}of u){if(!r)continue;let a=og(e,i,n.__siblingCounters),s=ag(e,vd(e,o),a).get(e,r);t.set(r,s)}n.__siblingCounters.set(e.parentElement,t)}continue}let k=c.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(c),F=!1;if(A&&!v&&c.length>1&&!k){let n=vd(e),r=parseFloat(n.fontSize)||16,i=parseFloat(n.lineHeight);Number.isFinite(i)||(i=1.5*r),e.getBoundingClientRect().height<1.6*i&&(t.style.whiteSpace="nowrap",F=!0)}let D=document.createElement("span");D.dataset.snapdomPseudo=o,D.style.pointerEvents="none",F&&(D.style.whiteSpace="nowrap");let N=Ad(a),M=(vd(e).display||"").toLowerCase(),T=M.includes("flex")||M.includes("grid");if(T){let e=N["min-width"];(!e||"auto"===e||"0px"===e)&&(N["min-width"]="0px")}let Q=yd(N,"span",A,T);if(n.styleMap.set(D,Q),v&&c&&1===c.length){let{dataUrl:e,width:n,height:r}=await wp(c,h,g,p,m),i=document.createElement("img");i.src=e,i.style=`height:${p}px;width:${n/r*p}px;object-fit:contain;`,D.appendChild(i),t.dataset.snapdomHasIcon="true"}else if(c&&k){let t=td(c,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??ed(c);if(t?.trim())try{let e=await sd(nd(t),{as:"dataURL",useProxy:r.useProxy});if(e?.ok&&"string"==typeof e.data){let t=document.createElement("img");t.src=e.data,t.style=`width:${p}px;height:auto;object-fit:contain;`,D.appendChild(t)}}catch(t){console.error(`[snapdom] Error in pseudo ${o} for`,e,t)}}else!v&&A&&(D.textContent=c);D.style.backgroundImage="none","maskImage"in D.style&&(D.style.maskImage="none"),"webkitMaskImage"in D.style&&(D.style.webkitMaskImage="none");try{D.style.backgroundRepeat=a.backgroundRepeat,D.style.backgroundSize=a.backgroundSize,a.backgroundPositionX&&a.backgroundPositionY?(D.style.backgroundPositionX=a.backgroundPositionX,D.style.backgroundPositionY=a.backgroundPositionY):D.style.backgroundPosition=a.backgroundPosition,D.style.backgroundOrigin=a.backgroundOrigin,D.style.backgroundClip=a.backgroundClip,D.style.backgroundAttachment=a.backgroundAttachment,D.style.backgroundBlendMode=a.backgroundBlendMode}catch{}if(b)try{let e=bd(f),t=await Promise.all(e.map(dd));D.style.backgroundImage=t.join(", ")}catch(e){console.warn(`[snapdom] Failed to inline background-image for ${o}`,e)}w&&(D.style.backgroundColor=d);let L=D.childNodes.length>0||""!==D.textContent?.trim()||b||w||I||x||B||E||S;if(u&&u.length&&e.parentElement){let t=n.__siblingCounters.get(e.parentElement)||new Map,r=og(e,i,n.__siblingCounters),a=ag(e,vd(e,o),r);for(let{name:n}of u){if(!n)continue;let r=a.get(e,n);t.set(n,r)}n.__siblingCounters.set(e.parentElement,t)}if(!L)continue;"::before"===o?(t.dataset.snapdomHasBefore="1",t.insertBefore(D,t.firstChild)):(t.dataset.snapdomHasAfter="1",t.appendChild(D))}catch(t){console.warn(`[snapdom] Failed to capture ${o} for`,e,t)}let o=Array.from(t.children).filter(e=>!e.dataset.snapdomPseudo);if(n.nodeMap)for(let e of o){let t=n.nodeMap.get(e);1===t?.nodeType&&await lg(t,e,n,r)}else{let t=Array.from(e.children);for(let e=0;e<Math.min(t.length,o.length);e++)await lg(t[e],o[e],n,r)}}function cg(e,t){if(!e||1!==e?.nodeType)return;let n=e.ownerDocument||document,r=t||n,i=e instanceof SVGSVGElement?[e]:Array.from(e.querySelectorAll("svg"));if(0===i.length)return;let o=/url\(\s*#([^)]+)\)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],s=e=>{if(!e||!e.getAttribute)return null;let t=e.getAttribute("href")||e.getAttribute("xlink:href")||("function"==typeof e.getAttributeNS?e.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(t)return t;let n=e.attributes;if(!n)return null;for(let e=0;e<n.length;e++){let t=n[e];if(!t||!t.name)continue;if("href"===t.name)return t.value;let r=t.name.indexOf(":");if(-1!==r&&"href"===t.name.slice(r+1))return t.value}return null},l=new Set(Array.from(e.querySelectorAll("[id]")).map(e=>e.id)),c=new Set,u=!1,f=(e,t=null)=>{if(!e)return;let n;for(o.lastIndex=0;n=o.exec(e);){u=!0;let e=(n[1]||"").trim();e&&(l.has(e)||(c.add(e),t&&!t.has(e)&&t.add(e)))}},d=e=>{let t=e.querySelectorAll("use");for(let e of t){let t=s(e);if(!t||!t.startsWith("#"))continue;u=!0;let n=t.slice(1).trim();n&&!l.has(n)&&c.add(n)}f(e.getAttribute("style")||"");for(let t of a)f(e.getAttribute(t));let n=e.querySelectorAll('*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]');for(let e of n){f(e.getAttribute("style")||"");for(let t of a)f(e.getAttribute(t))}};for(let e of i)d(e);if(!u)return;let h=e.querySelector("svg.inline-defs-container");h||(h=n.createElementNS("http://www.w3.org/2000/svg","svg"),h.classList.add("inline-defs-container"),h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),e.insertBefore(h,e.firstChild||null));let p=h.querySelector("defs")||null,g=t=>{if(!t||l.has(t))return null;let n=(e=>window.CSS&&CSS.escape?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,"\\$&"))(t),i=t=>{let n=r.querySelector(t);return n&&!e.contains(n)?n:null};return i(`svg defs > *#${n}`)||i(`svg > symbol#${n}`)||i(`*#${n}`)};if(!c.size)return;let m=new Set(c),y=new Set;for(;m.size;){let e=m.values().next().value;if(m.delete(e),!e||l.has(e)||y.has(e))continue;let t=g(e);if(!t){y.add(e);continue}p||(p=n.createElementNS("http://www.w3.org/2000/svg","defs"),h.appendChild(p));let r=t.cloneNode(!0);r.id||r.setAttribute("id",e),p.appendChild(r),y.add(e),l.add(e);let i=[r,...r.querySelectorAll("*")];for(let e of i){let t=s(e);if(t&&t.startsWith("#")){let e=t.slice(1).trim();e&&!l.has(e)&&!y.has(e)&&m.add(e)}let n=e.getAttribute?.("style")||"";n&&f(n,m);for(let t of a){let n=e.getAttribute?.(t);n&&f(n,m)}}}}function ug(e){if(!e||"none"===e)return{top:0,right:0,bottom:0,left:0};let t=[],n="",r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o?r++:")"===o&&(r=Math.max(0,r-1)),","===o&&0===r?(t.push(n),n=""):n+=o}n.trim()&&t.push(n);let i=0,o=0,a=0,s=0;for(let e of t){if(/\binset\b/i.test(e))continue;let t=e.match(/-?\d+(\.\d+)?px/g)?.map(e=>parseFloat(e))||[];if(t.length<2)continue;let[n,r,l=0,c=0]=t,u=Math.abs(n)+l+c,f=Math.abs(r)+l+c;o=Math.max(o,u+Math.max(n,0)),s=Math.max(s,u+Math.max(-n,0)),a=Math.max(a,f+Math.max(r,0)),i=Math.max(i,f+Math.max(-r,0))}return{top:Math.ceil(i),right:Math.ceil(o),bottom:Math.ceil(a),left:Math.ceil(s)}}function fg(e,t,n,r,i){let o=n.a,a=n.b,s=n.c,l=n.d,c=n.e||0,u=n.f||0;function f(e,t){let n=e-r,f=t-i,d=o*n+s*f,h=a*n+l*f;return d+=r+c,h+=i+u,[d,h]}let d=[f(0,0),f(e,0),f(0,t),f(e,t)],h=1/0,p=1/0,g=-1/0,m=-1/0;for(let[e,t]of d)e<h&&(h=e),t<p&&(p=t),e>g&&(g=e),t>m&&(m=t);return{minX:h,minY:p,maxX:g,maxY:m,width:g-h,height:m-p}}function dg(e,t,n){let r=(e.transformOrigin||"0 0").trim().split(/\s+/),[i,o]=[r[0]||"0",r[1]||"0"],a=(e,t)=>{let n=e.toLowerCase();return"left"===n||"top"===n?0:"center"===n?t/2:"right"===n||"bottom"===n?t:n.endsWith("px")?parseFloat(n)||0:n.endsWith("%")?(parseFloat(n)||0)*t/100:/^-?\d+(\.\d+)?$/.test(n)&&parseFloat(n)||0};return{ox:a(i,t),oy:a(o,n)}}function hg(e){let t={rotate:"0deg",scale:null,translate:null},n="function"==typeof e.computedStyleMap?e.computedStyleMap():null;if(n){let r=e=>{try{return"function"==typeof n.has&&!n.has(e)||"function"!=typeof n.get?null:n.get(e)}catch{return null}},i=r("rotate");if(i)if(i.angle){let e=i.angle;t.rotate="rad"===e.unit?180*e.value/Math.PI+"deg":e.value+e.unit}else i.unit?t.rotate="rad"===i.unit?180*i.value/Math.PI+"deg":i.value+i.unit:t.rotate=String(i);else{let n=getComputedStyle(e);t.rotate=n.rotate&&"none"!==n.rotate?n.rotate:"0deg"}let o=r("scale");if(o){let e="x"in o&&null!=o.x?.value?o.x.value:Array.isArray(o)?o[0]?.value:Number(o)||1,n="y"in o&&null!=o.y?.value?o.y.value:Array.isArray(o)?o[1]?.value:e;t.scale=`${e} ${n}`}else{let n=getComputedStyle(e);t.scale=n.scale&&"none"!==n.scale?n.scale:null}let a=r("translate");if(a){let e="x"in a&&"value"in a.x?a.x.value:Array.isArray(a)?a[0]?.value:0,n="y"in a&&"value"in a.y?a.y.value:Array.isArray(a)?a[1]?.value:0,r="x"in a&&a.x?.unit?a.x.unit:"px",i="y"in a&&a.y?.unit?a.y.unit:"px";t.translate=`${e}${r} ${n}${i}`}else{let n=getComputedStyle(e);t.translate=n.translate&&"none"!==n.translate?n.translate:null}return t}let r=getComputedStyle(e);return t.rotate=r.rotate&&"none"!==r.rotate?r.rotate:"0deg",t.scale=r.scale&&"none"!==r.scale?r.scale:null,t.translate=r.translate&&"none"!==r.translate?r.translate:null,t}Zf(),$d(),Ld();var pg=null;function gg(e){let t=function(){if(pg)return pg;let e=document.createElement("div");return e.id="snapdom-measure-slot",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(e),pg=e,e}(),n=document.createElement("div");n.style.transformOrigin="0 0",e.baseTransform&&(n.style.transform=e.baseTransform),e.rotate&&(n.style.rotate=e.rotate),e.scale&&(n.style.scale=e.scale),e.translate&&(n.style.translate=e.translate),t.appendChild(n);let r=function(e){let t=getComputedStyle(e).transform;if(!t||"none"===t)return new DOMMatrix;try{return new DOMMatrix(t)}catch{return new WebKitCSSMatrix(t)}}(n);return t.removeChild(n),r}var mg="http://www.w3.org/1999/xhtml",yg=new WeakSet;function vg(e,t){if(!t)return null;let n,r,i,o,a=e.ownerDocument||document,s=a.defaultView||window;if("viewport"===t)n=0,r=0,i=a.documentElement?.clientWidth||s.innerWidth,o=a.documentElement?.clientHeight||s.innerHeight;else{if("object"!=typeof t)return null;n=(Number(t.x)||0)-(s.scrollX||0),r=(Number(t.y)||0)-(s.scrollY||0),i=Number(t.width),o=Number(t.height)}return i>0&&o>0?{left:n,top:r,width:i,height:o,right:n+i,bottom:r+o}:null}function Ag(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode&&e.getRootNode();return t instanceof ShadowRoot?t.host:null}function bg(e,t){for(let n=t;n;n=Ag(n))if(n===e)return!0;return!1}function wg(e,t){for(let n=Ag(e);n&&n!==t&&1===n?.nodeType;n=Ag(n)){let e=vd(n);if("static"!==e.position||e.transform&&"none"!==e.transform||e.filter&&"none"!==e.filter||e.backdropFilter&&"none"!==e.backdropFilter||e.perspective&&"none"!==e.perspective||/transform|perspective|filter/.test(e.willChange||"")||/layout|paint|strict|content/.test(e.contain||""))return n}return null}function Ig(e,t){try{let n=new DOMMatrix;if(t&&t.rotate&&"0deg"!==t.rotate&&(n=n.multiply(new DOMMatrix(`rotate(${t.rotate})`))),t&&t.scale){let e=String(t.scale).trim().split(/\s+/).filter(Boolean);e.length&&e.every(e=>Number.isFinite(Number(e)))&&(n=n.multiply(new DOMMatrix(`scale(${e.join(",")})`)))}return e&&(n=n.multiply(new DOMMatrix(e))),n}catch{return null}}function xg(e){let t=e.display||"";if(t.includes("flex")||t.includes("grid")||t.startsWith("table")||"inline-block"===t||"flow-root"===t||"absolute"===e.position||"fixed"===e.position||e.float&&"none"!==e.float)return!0;let n=e.overflowX||e.overflow||"visible",r=e.overflowY||e.overflow||"visible";return!!("visible"!==n||"visible"!==r||e.contain&&/\b(layout|content|paint|strict)\b/.test(e.contain))}function Cg(e,t){let n=Array.from(e.childNodes),r="top"===t?n:n.reverse();for(let e of r){if(e.nodeType===Node.TEXT_NODE){if(/\S/.test(e.textContent||""))return null;continue}if(e.nodeType!==Node.ELEMENT_NODE)continue;let t=getComputedStyle(e),n=String(t.display||"");if("none"!==n&&"contents"!==n&&"absolute"!==t.position&&"fixed"!==t.position)return t.float&&"none"!==t.float||n.startsWith("inline")?null:e}return null}var Bg=/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g;function Eg(e,t={}){e&&(function(e,t={}){let{stripFrameworkDirectives:n=!0}=t,r=new Set(["xml","xlink"]),i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;i.nextNode();){let e=i.currentNode;for(let t of Array.from(e.attributes)){let i=t.name;if(i.startsWith("*"))e.removeAttribute(i);else if(i.includes("@"))e.removeAttribute(i);else{if(i.includes(":")){let t=i.split(":",1)[0];if(!r.has(t)){e.removeAttribute(i);continue}}n&&(i.startsWith("x-")||i.startsWith("v-")||i.startsWith(":")||i.startsWith("on:")||i.startsWith("bind:")||i.startsWith("let:")||i.startsWith("class:"))&&e.removeAttribute(i)}}}}(e,t),function(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),n=[];for(;t.nextNode();)n.push(t.currentNode);for(let e of n)e.remove()}(e),function(e){if(!e)return;let t=e=>{if(e.nodeType===Node.ELEMENT_NODE){if(e.attributes)for(let t of Array.from(e.attributes)){let n=t.value.replace(Bg,"");if(n!==t.value)try{e.setAttribute(t.name,n)}catch{}}}else if(e.nodeType===Node.TEXT_NODE||e.nodeType===Node.CDATA_SECTION_NODE){let t=e.data.replace(Bg,"");t!==e.data&&(e.data=t)}};t(e);let n,r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);for(;n=r.nextNode();)t(n)}(e))}function Sg(e,t){if(1!==e?.nodeType||function(e){try{let t=e.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(t)}catch{return!1}}(e)||function(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLIFrameElement||e instanceof SVGElement||e instanceof HTMLObjectElement||e instanceof HTMLEmbedElement}(e))return!1;let n=t.position;if("absolute"===n||"fixed"===n||"sticky"===n)return!1;let r=t.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||t.transform&&"none"!==t.transform)}function kg(e){let t=getComputedStyle(e);return!("none"===t.display||"absolute"===t.position||"fixed"===t.position)}function Fg(e,t){if(1!==e?.nodeType)return!1;if("exclude"===e.getAttribute("data-capture")&&"remove"===t?.excludeMode)return!0;if(Array.isArray(t?.exclude))for(let n of t.exclude)try{if(e.matches(n))return"remove"===t.excludeMode}catch(e){Od(t,"exclude selector match failed",e)}if("function"==typeof t?.filter&&"remove"===t.filterMode)try{if(!t.filter(e))return!0}catch(e){Od(t,"filter function failed",e)}return!1}var Dg=(e,t=3)=>Number.isFinite(e)?Math.round(e*10**t)/10**t:e,Ng=.75;var Mg=/::-webkit-scrollbar(-[a-z]+)?\b/i;function Tg(e,t=new Set){let n="";if(!e)return n;for(let r=0;r<e.length;r++){let i=e[r];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){n+=Tg(i.styleSheet.cssRules,t);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let e=Tg(i.cssRules,t);e&&(n+=`@media ${i.conditionText}{${e}}`);continue}if(i.type===CSSRule.STYLE_RULE){let e=i.selectorText||"";if(Mg.test(e)){let e=i.cssText;e&&!t.has(e)&&(t.add(e),n+=e)}}}catch{}}return n}var Qg=new WeakMap;qd();var Lg=new Set;async function Rg(e,t={}){let n=t.__session||Kf.session,r={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:t},i=null;if(t.clip){let n=vg(e,t.clip);if(n){r.clip={rect:n,root:e};let t=e.getBoundingClientRect();i={x:n.left-t.left,y:n.top-t.top,width:n.width,height:n.height}}}let o,a="",s="";if(Lg.size){let t=(e,t)=>{for(let n=t;n;n=n.assignedSlot||n.parentElement||n.getRootNode()?.host)if(n===e)return!0;return!1};for(;;){let n=[...Lg].filter(({root:n})=>t(n,e)||t(e,n)).map(({promise:e})=>e.catch(()=>{}));if(!n.length)break;await Promise.all(n)}}if(!r.clip&&e.isConnected&&"hidden"!==e.ownerDocument?.visibilityState)try{let t=e.getBoundingClientRect(),n=e.ownerDocument?.defaultView||window,r=t.right<=0||t.bottom<=0||t.left>=n.innerWidth||t.top>=n.innerHeight,i=[];if(r&&(()=>{let t=[];e.shadowRoot&&t.push(e.shadowRoot);for(let n of e.querySelectorAll("*"))n.shadowRoot&&t.push(n.shadowRoot);for(;t.length;){let e=t.pop(),n="calcite-icon"===e.host?.localName;for(let r of e.querySelectorAll("*")){if(r.shadowRoot&&t.push(r.shadowRoot),!n||"svg"!==r.localName)continue;let e=r.querySelectorAll("path");if(!e.length||[...e].some(e=>e.getAttribute("d")?.trim()))continue;let o=r.getBoundingClientRect();o.width&&o.height&&i.push(r)}}})(),i.length){let t=(async()=>{let t=e.style,r=e.hasAttribute("style"),o=new Map,a=(e,n)=>{o.has(e)||o.set(e,{value:t.getPropertyValue(e),priority:t.getPropertyPriority(e)}),t.setProperty(e,n,"important");let r=o.get(e);r.forcedValue=t.getPropertyValue(e),r.forcedPriority=t.getPropertyPriority(e)};try{a("left","0"),a("top","0"),a("right","auto"),a("bottom","auto"),a("margin-top","0"),a("margin-right","0"),a("margin-bottom","0"),a("margin-left","0"),a("transform","none"),a("translate","none"),a("opacity","0"),a("pointer-events","none");let t=e.getBoundingClientRect();if(t.right<=0||t.bottom<=0||t.left>=n.innerWidth||t.top>=n.innerHeight){let t=e.parentElement?.getBoundingClientRect(),r=t&&t.right>0&&t.left<n.innerWidth?Math.max(0,t.left):0,i=t&&t.bottom>0&&t.top<n.innerHeight?Math.max(0,t.top):0;a("position","fixed"),a("left",`${r}px`),a("top",`${i}px`)}await Ud(100);let r=Date.now()+1500,o=()=>i.some(e=>{if([...e.querySelectorAll("path")].some(e=>e.getAttribute("d")?.trim()))return!1;let t=e.getBoundingClientRect();return t.width&&t.height&&t.right>0&&t.bottom>0&&t.left<n.innerWidth&&t.top<n.innerHeight});for(;Date.now()<r&&o();)await new Promise(e=>setTimeout(e,25));await Ud(100)}finally{for(let[e,n]of o)t.getPropertyValue(e)!==n.forcedValue||t.getPropertyPriority(e)!==n.forcedPriority||(n.value?t.setProperty(e,n.value,n.priority):t.removeProperty(e));!r&&!t.length&&e.removeAttribute("style"),await Ud(100)}})(),r={root:e,promise:t};Lg.add(r);try{await t}finally{Lg.delete(r)}}}catch{}let l=function(e){let t=getComputedStyle(e),n=t.outlineStyle,r=t.outlineWidth,i=t.borderStyle,o=t.borderWidth,a="none"!==n&&parseFloat(r)>0,s="none"===i||0===parseFloat(o);if(a&&s){let t=e.style.border;return e.style.border=`${r} solid transparent`,()=>{e.style.border=t}}return()=>{}}(e),c=r.clip?()=>{}:function(e){let t=[];try{let n=e.querySelectorAll("*");for(let e of n){if(!(e instanceof HTMLElement))continue;let n=e.style.contentVisibility||"",r=getComputedStyle(e);"auto"===(r.contentVisibility||r.getPropertyValue("content-visibility")||"")&&(t.push({el:e,original:n}),e.style.contentVisibility="visible")}if(e instanceof HTMLElement){let n=getComputedStyle(e);"auto"===(n.contentVisibility||n.getPropertyValue("content-visibility")||"")&&(t.push({el:e,original:e.style.contentVisibility||""}),e.style.contentVisibility="visible")}}catch{}return()=>{for(let{el:e,original:n}of t)try{e.style.contentVisibility=n}catch{}}}(e);try{o=await up(e,r,t)}catch(e){throw console.warn("deepClone failed:",e),e}finally{c(),l()}try{cg(o)}catch(e){console.warn("inlineExternal defs or symbol failed:",e)}try{await lg(e,o,r,t)}catch(e){console.warn("inlinePseudoElements failed:",e)}await async function(e,t=null){if(!e)return;let n=t,r=np(e,"img");for(let e of r)try{let t=e.getAttribute("src")||e.currentSrc||"";if(Zh(t)){let n=await _h(t);e.setAttribute("src",n)}let r=e.getAttribute("srcset");if(r&&r.includes("blob:")){let t=ep(r),i=!1;for(let e of t)if(Zh(e.url))try{e.url=await _h(e.url),i=!0}catch(e){Od(n,"blobUrlToDataUrl for srcset item failed",e)}i&&e.setAttribute("srcset",tp(t))}}catch(e){Od(n,"resolveBlobUrls for img failed",e)}let i=np(e,"image");for(let e of i)try{let t="http://www.w3.org/1999/xlink",n=e.getAttribute("href")||e.getAttributeNS?.(t,"href");if(Zh(n)){let r=await _h(n);e.setAttribute("href",r),e.removeAttributeNS?.(t,"href")}}catch(e){Od(n,"resolveBlobUrls for SVG image href failed",e)}let o=np(e,"[style*='blob:']");for(let e of o)try{let t=e.getAttribute("style");if(t&&t.includes("blob:")){let n=await Kh(t);e.setAttribute("style",n)}}catch(e){Od(n,"replaceBlobUrls in inline style failed",e)}let a=e.querySelectorAll?e.querySelectorAll("style"):[];for(let e of a)try{let t=e.textContent||"";t.includes("blob:")&&(e.textContent=await Kh(t))}catch(e){Od(n,"replaceBlobUrls in style tag failed",e)}let s=["poster"];for(let t of s){let r=np(e,`[${t}^='blob:']`);for(let e of r)try{let n=e.getAttribute(t);Zh(n)&&e.setAttribute(t,await _h(n))}catch(e){Od(n,`resolveBlobUrls for ${t} failed`,e)}}}(o,r);try{let e=o.querySelectorAll("style[data-sd]");for(let t of e)s+=t.textContent||"",t.remove()}catch(e){Od(r,"Failed to extract shadow CSS from style[data-sd]",e)}let u=function(e){let t=Array.from(new Set(e.values())).filter(Boolean).sort(),n=new Map,r=1;for(let e of t)n.set(e,"c"+r++);return n}(r.styleMap);a=Array.from(u.entries()).map(([e,t])=>`.${t}{${e}}`).join(""),a=s+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+a;for(let[e,t]of r.styleMap.entries()){if("STYLE"===e.tagName)continue;if(e.getRootNode&&e.getRootNode()instanceof ShadowRoot){e.setAttribute("style",t.replace(/;/g,"; "));continue}let n=u.get(t);n&&e.classList.add(n);let r=e.style?.backgroundImage,i=e.dataset?.snapdomHasIcon;r&&"none"!==r&&(e.style.backgroundImage=r),i&&(e.style.verticalAlign="middle",e.style.display="inline")}if((r.clip||e.scrollTop||e.scrollLeft)&&1===o?.nodeType)try{let t=r.clip&&i?{x:i.x,y:i.y}:{x:0,y:0};!function(e,t,n,r,i){let o=e.getBoundingClientRect();1===t?.nodeType&&t.namespaceURI===mg&&"static"===vd(e).position&&(t.style.position="relative");let a=[];for(let[t,s]of n){if(1!==t?.nodeType||t.namespaceURI!==mg||1!==s?.nodeType||s===e||!bg(e,s))continue;let n=r.get(s)||vd(s),l=n.position;if("fixed"!==l&&"sticky"!==l&&"-webkit-sticky"!==l||"absolute"===t.style.position)continue;let c=s.getBoundingClientRect();if(!(c.width>0&&c.height>0))continue;yg.add(t);let u=n.transform&&"none"!==n.transform?n.transform:"",f=hg(s),d=!!(u||"0deg"!==f.rotate||f.scale||f.translate),h=d?Ig(u,f):null,p=!h||!h.is2D||1===h.a&&0===h.b&&0===h.c&&1===h.d,g=c.width,m=c.height;p||(g=s.offsetWidth||c.width,m=s.offsetHeight||c.height);let y=s.getRootNode&&s.getRootNode()instanceof ShadowRoot,v=o,A=e.clientLeft||0,b=e.clientTop||0;if(y){let t=wg(s,e);t&&(v=t.getBoundingClientRect(),A=t.clientLeft||0,b=t.clientTop||0)}let w=c.left-v.left-A,I=c.top-v.top-b;if(d)if(t.style.translate="none",t.style.rotate="none",t.style.scale="none",p)t.style.transform="none";else{t.style.transform=`matrix(${h.a},${h.b},${h.c},${h.d},0,0)`;let{ox:e,oy:r}=dg(n,g,m),i=fg(g,m,{a:h.a,b:h.b,c:h.c,d:h.d,e:0,f:0},e,r);w-=i.minX,I-=i.minY}if("fixed"!==l){let e=t.cloneNode(!1);e.setAttribute("data-snap-ph","1"),e.style.position="static",e.style.visibility="hidden",e.style.width=`${g}px`,e.style.height=`${m}px`,e.style.boxSizing="border-box",t.parentElement?.insertBefore(e,t)}let x=g+2,C=m;i&&(Math.abs(I-i.y)<.5&&(I-=1,C+=1),Math.abs(w-i.x)<.5&&(w-=1,x+=1)),t.style.position="absolute",t.style.left=`${w}px`,t.style.top=`${I}px`,t.style.right="auto",t.style.bottom="auto",t.style.margin="0",t.style.width=`${x}px`,t.style.height=`${C}px`,t.style.boxSizing="border-box",y||a.push(t)}for(let e of a)t.appendChild(e)}(e,o,r.nodeMap,r.styleCache,t)}catch(e){Od(r,"freezeViewportPositioned failed",e)}for(let[t,n]of r.nodeMap.entries()){if(r.clip&&n===e)continue;let i=n.scrollLeft,o=n.scrollTop;if((i||o)&&1===t?.nodeType&&"http://www.w3.org/1999/xhtml"===t.namespaceURI){t.style.overflow="hidden",t.style.scrollbarWidth="none",t.style.msOverflowStyle="none";try{let e=t.querySelectorAll("*");for(let t of e){if(1!==t.nodeType||"http://www.w3.org/1999/xhtml"!==t.namespaceURI)continue;let e=t.style.position;if("fixed"===e||"absolute"===e){let n=parseFloat(t.style.top)||0,r=parseFloat(t.style.left)||0;t.style.top=`${n+o}px`,t.style.left=`${r+i}px`,"fixed"===e&&(t.style.position="absolute")}}}catch{}let e=document.createElement("div");for(e.style.all="unset",e.style.transform=`translate(${-i}px, ${-o}px)`,e.style.willChange="transform",e.style.display="inline-block",e.style.width="100%";t.firstChild;)e.appendChild(t.firstChild);t.appendChild(e)}}if(e===r.nodeMap.get(o)){let t=r.styleCache.get(e)||vd(e);r.styleCache.set(e,t);let n=function(e){if(!e||"none"===e)return"";let t=e.replace(/translate[XY]?\([^)]*\)/g,"");return t=t.replace(/matrix\(([^)]+)\)/g,(e,t)=>{let n=t.split(",").map(e=>e.trim());return 6!==n.length?`matrix(${t})`:(n[4]="0",n[5]="0",`matrix(${n.join(", ")})`)}),t=t.replace(/matrix3d\(([^)]+)\)/g,(e,t)=>{let n=t.split(",").map(e=>e.trim());return 16!==n.length?`matrix3d(${t})`:(n[12]="0",n[13]="0",`matrix3d(${n.join(", ")})`)}),t.trim().replace(/\s{2,}/g," ")}(t.transform);o.style.margin="0",o.style.top="auto",o.style.left="auto",o.style.right="auto",o.style.bottom="auto",o.style.animation="none",o.style.transition="none",o.style.willChange="auto",o.style.float="none",o.style.clear="none",o.style.transform=n||""}for(let[e,t]of r.nodeMap.entries())"PRE"===t.tagName&&(e.style.marginTop="0",e.style.marginBlockStart="0");return{clone:o,classCSS:a,styleCache:r.styleCache,nodeMap:r.nodeMap,reconcileRisk:r.reconcileRisk||0,clipWindow:i}}fd(),Zf();var Ug="http://www.w3.org/1999/xlink";async function Hg(e,t={}){let n=Array.from(e.querySelectorAll("img"));"IMG"===e.tagName&&n.unshift(e);let r=async e=>{if(!e.getAttribute("src")){let t=e.currentSrc||e.src||Oh(e.getAttribute("srcset"),e)||"";t&&e.setAttribute("src",t)}e.removeAttribute("srcset"),e.removeAttribute("sizes");let n=e.src||"";if(!n)return;let r=Kf.image?.get(n);if(r)return e.src=r,e.width||(e.width=e.naturalWidth||100),void(e.height||(e.height=e.naturalHeight||100));let i=await sd(n,{as:"dataURL",useProxy:t.useProxy});if(i.ok&&"string"==typeof i.data&&i.data.startsWith("data:"))return Kf.image?.set(n,i.data),e.src=i.data,e.width||(e.width=e.naturalWidth||100),void(e.height||(e.height=e.naturalHeight||100));let{width:o,height:a}=function(e){let t=parseInt(e.dataset?.snapdomWidth||"",10)||0,n=parseInt(e.dataset?.snapdomHeight||"",10)||0,r=parseInt(e.getAttribute("width")||"",10)||0,i=parseInt(e.getAttribute("height")||"",10)||0,o=parseFloat(e.style?.width||"")||0,a=parseFloat(e.style?.height||"")||0;return{width:t||o||r||e.width||e.naturalWidth||100,height:n||a||i||e.height||e.naturalHeight||100}}(e),{fallbackURL:s}=t||{};if(s)try{let r="function"==typeof s?await s({width:o,height:a,src:n,element:e}):s;if(r){let n=await sd(r,{as:"dataURL",useProxy:t.useProxy});if(n?.ok&&"string"==typeof n.data)return e.src=n.data,e.width||(e.width=o),void(e.height||(e.height=a))}}catch{}if(!1!==t.placeholders){let t=document.createElement("div");t.style.cssText=[`width:${o}px`,`height:${a}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${a}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),t.textContent="img",e.replaceWith(t)}else{let t=document.createElement("div");t.style.cssText=`display:inline-block;width:${o}px;height:${a}px;visibility:hidden;`,e.replaceWith(t)}};for(let e=0;e<n.length;e+=6){let t=n.slice(e,e+6).map(r);await Promise.allSettled(t)}let i=Array.from(e.querySelectorAll("image"));"image"===e.localName&&i.unshift(e);let o=async e=>{let n=function(e){return e.getAttribute("href")||e.getAttribute("xlink:href")||("function"==typeof e.getAttributeNS?e.getAttributeNS(Ug,"href"):null)}(e);if(!n||n.startsWith("data:")||n.startsWith("blob:"))return;let r=await sd(n,{as:"dataURL",useProxy:t.useProxy});r.ok&&"string"==typeof r.data&&r.data.startsWith("data:")&&(e.setAttribute("href",r.data),e.removeAttribute("xlink:href"),"function"==typeof e.removeAttributeNS&&e.removeAttributeNS(Ug,"href"))};for(let e=0;e<i.length;e+=6){let t=i.slice(e,e+6).map(o);await Promise.allSettled(t)}}$d(),Zf();var qg=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],Og=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],Pg=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],$g=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function zg(e,t,n,r){let i=n.get(e)||vd(e);n.has(e)||n.set(e,i);let o=i.getPropertyValue("border-image"),a=i.getPropertyValue("border-image-source"),s=o&&"none"!==o||a&&"none"!==a,l=i.getPropertyValue("background-image"),c=i.getPropertyValue("background-color");if(l&&"none"!==l||c&&"rgba(0, 0, 0, 0)"!==c&&"transparent"!==c||/url\s*\(|gradient\s*\(/i.test(i.getPropertyValue("background")||""))for(let e of Pg){let n=i.getPropertyValue(e);n&&t.style.setProperty(e,n)}for(let e of qg){let n=i.getPropertyValue(e);if("background-image"===e&&(!n||"none"===n)){let e=i.getPropertyValue("background");e&&/url\s*\(/.test(e)&&(n=bd(e).filter(e=>/url\s*\(/.test(e)).join(", ")||n)}if(!n||"none"===n)continue;let o=bd(n),a=await Promise.all(o.map(e=>dd(e,r)));a.some(e=>e&&"none"!==e&&!/^url\(undefined/.test(e))&&t.style.setProperty(e,a.join(", "))}for(let e of Og){let n=i.getPropertyValue(e);!n||"initial"===n||t.style.setProperty(e,n)}if(s)for(let e of $g){let n=i.getPropertyValue(e);!n||"initial"===n||t.style.setProperty(e,n)}}function jg(e,t,n=Kf.session.nodeMap){let r=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(let e=i.currentNode;e;e=i.nextNode()){let i=n.get(e);if(1!==i?.nodeType)continue;let o=vd(i),a=o.getPropertyValue("backdrop-filter")||o.getPropertyValue("-webkit-backdrop-filter");a&&"none"!==a&&e!==t&&r.push({cloneEl:e,orig:i,bf:a,path:Wg(t,e)})}if(!r.length)return;let o=e.getBoundingClientRect(),a=r.map((e,i)=>{let o=t.cloneNode(!0);(function(e,t,n,r){let i=[[e,t]];for(;i.length;){let[e,t]=i.pop(),o=r.get(t);if(1===o?.nodeType){let t=o.getBoundingClientRect();(t.left>n.right+Yg||t.right<n.left-Yg||t.top>n.bottom+Yg||t.bottom<n.top-Yg)&&("IMG"===e.tagName&&e.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),e.style&&(e.style.backgroundImage="none"))}let a=e.children,s=t.children;for(let e=0;e<a.length;e++)i.push([a[e],s[e]])}})(o,t,e.orig.getBoundingClientRect(),n),function(e){if(e)for(let t=e;t&&t.parentNode;){let n=t.parentNode;for(;t.nextSibling;)t.nextSibling.remove();t===e&&t.remove(),t=n}}(Gg(o,e.path));for(let e=0;e<i;e++){let t=Gg(o,r[e].path);t&&(t.style.setProperty("backdrop-filter","none","important"),t.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...e,copy:o}});for(let{cloneEl:e,orig:t,bf:n,copy:r}of a)Vg(e,t,n,r,o)}function Vg(e,t,n,r,i){let o=t.getBoundingClientRect();if(!o.width||!o.height)return;let a=vd(t),s=t.offsetWidth?o.width/t.offsetWidth:1,l=Math.abs(s-1)>.001?1/s:1;r.style.position="absolute",r.style.left=(i.left-o.left)*l+"px",r.style.top=(i.top-o.top)*l+"px",r.style.width=`${i.width}px`,r.style.height=`${i.height}px`,r.style.margin="0",r.style.filter=n,1!==l&&(r.style.transform=`scale(${l})`,r.style.transformOrigin="top left");let c=document.createElement("div");c.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",c.appendChild(r);let u=document.createElement("div");u.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",u.style.backgroundColor=a.backgroundColor,u.style.backgroundImage=e.style.backgroundImage||a.backgroundImage;for(let e of["background-size","background-position","background-repeat","background-origin","background-clip"])u.style.setProperty(e,a.getPropertyValue(e));e.style.setProperty("background-color","transparent","important"),e.style.setProperty("background-image","none","important"),e.style.setProperty("backdrop-filter","none","important"),e.style.setProperty("-webkit-backdrop-filter","none","important"),"static"===a.position&&(e.style.position="relative"),e.style.isolation="isolate",e.prepend(u),e.prepend(c)}Zf(),$d();var Yg=128;function Wg(e,t){let n=[];for(let r=t;r!==e;r=r.parentElement){if(!r?.parentElement)return null;n.push([...r.parentElement.children].indexOf(r))}return n.reverse()}function Gg(e,t){if(!t)return null;let n=e;for(let e of t)if(n=n.children[e],!n)return null;return n}function Jg(e,t){if(!e)return()=>{};let n=[],r=200;return function e(i){if(t){let e=i.getBoundingClientRect();if(e.width>0||e.height>0){let n=Math.max(e.right,e.left+(i.scrollWidth||0)),o=Math.max(e.bottom,e.top+(i.scrollHeight||0));if(n<t.left-r||e.left>t.right+r||o<t.top-r||e.top>t.bottom+r)return}}let o=getComputedStyle(i),a=function(e,t){if(!e)return()=>{};t=t||getComputedStyle(e);let n=function(e){let t=e.getPropertyValue("-webkit-line-clamp")||e.getPropertyValue("line-clamp");t=(t||"").trim();let n=parseInt(t,10);return Number.isFinite(n)&&n>0?n:0}(t);if(n<=0)return()=>{};if(!Xg(e))return()=>{};let r=_g(e),i=r.text,o=function(e){return(parseFloat(e.paddingTop)||0)+(parseFloat(e.paddingBottom)||0)}(t);r.write("X");let a=e.scrollHeight-o;r.restore();let s=a>0?a:function(e){let t=(e.lineHeight||"").trim(),n=parseFloat(e.fontSize)||16;return t&&"normal"!==t?t.endsWith("px")?parseFloat(t):/^\d+(\.\d+)?$/.test(t)?Math.round(parseFloat(t)*n):t.endsWith("%")?Math.round(parseFloat(t)/100*n):Math.round(1.2*n):Math.round(1.2*n)}(t),l=Math.round(s*n+o);if(e.scrollHeight<=l+.5)return()=>{};let c=0,u=i.length,f=-1;for(;c<=u;){let t=c+u>>1;r.write(i.slice(0,t)+"…"),e.scrollHeight<=l+.5?(f=t,c=t+1):u=t-1}return r.write((f>=0?i.slice(0,f):"")+"…"),()=>{r.restore()}}(i,o);a&&n.push(a);let s=function(e,t){if(!e)return()=>{};if(t=t||getComputedStyle(e),"ellipsis"!==t.textOverflow)return()=>{};if("nowrap"!==t.whiteSpace&&"pre"!==t.whiteSpace)return()=>{};if("hidden"!==t.overflowX&&"clip"!==t.overflowX)return()=>{};if(!Xg(e))return()=>{};if(e.scrollWidth<=e.clientWidth+.5)return()=>{};let n=_g(e),r=n.text,i=0,o=r.length,a=-1;for(;i<=o;){let t=i+o>>1;n.write(r.slice(0,t)+"…"),e.scrollWidth<=e.clientWidth+.5?(a=t,i=t+1):o=t-1}return n.write((a>=0?r.slice(0,a):"")+"…"),()=>{n.restore()}}(i,o);s&&n.push(s);for(let t of i.children||[])e(t)}(e),()=>n.forEach(e=>e())}function _g(e){let t=[];for(let n=e.firstChild;n;n=n.nextSibling)n.nodeType===Node.TEXT_NODE&&t.push(n);let n=t.map(e=>e.data);return{text:n.join(""),write(e){t[0].data=e;for(let e=1;e<t.length;e++)t[e].data=""},restore(){for(let e=0;e<t.length;e++)t[e].data=n[e]}}}function Xg(e){return!(e.childElementCount>0)&&Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}$d(),Zf();var Kg=[];function Zg(e){if(!e)return null;if(Array.isArray(e)){let[t,n]=e;return"function"==typeof t?t(n):t}if("object"==typeof e&&"plugin"in e){let{plugin:t,options:n}=e;return"function"==typeof t?t(n):t}return"function"==typeof e?e():e}function em(e){return e&&Array.isArray(e.plugins)?e.plugins:Kg}async function tm(e,t,n){let r=n,i=em(t);for(let n of i){let i=n&&"function"==typeof n[e]?n[e]:null;if(!i)continue;let o=await i(t,r);typeof o<"u"&&(r=o)}return r}function nm(e,t,n=!1){return!e||e.plugins&&!n||(e.plugins=function(e){let t=[];if(Array.isArray(e))for(let n of e){let e=Zg(n);if(!e||!e.name)continue;let r=t.findIndex(t=>t&&t.name===e.name);r>=0&&t.splice(r,1),t.push(e)}for(let e of Kg)e&&e.name&&!t.some(t=>t.name===e.name)&&t.push(e);return Object.freeze(t)}(t)),e}function rm(){return Kg.slice()}Zf();async function im(e,t,n){if("string"!=typeof e||!e.startsWith("data:image")||e.startsWith("data:image/svg"))return null;let r=e.length+":"+e.slice(0,64)+e.slice(-64)+":"+Math.round(t)+"x"+Math.round(n);if(Kf.compress.has(r))return Kf.compress.get(r);let i=await(async()=>{let r;try{r=await async function(e){let t=new Image;if(t.decoding="sync",t.src=e,"function"==typeof t.decode)try{return await t.decode(),t}catch{}return await new Promise((e,n)=>{t.onload=()=>e(),t.onerror=n}),t}(e)}catch{return null}let i=r.naturalWidth||r.width,o=r.naturalHeight||r.height;if(!i||!o)return null;let a=Math.min(1,Math.max(t/i,n/o));if(!(a>0)||a>=.95)return null;let s=.95*a,l=Math.max(1,Math.round(i*s)),c=Math.max(1,Math.round(o*s)),u=document.createElement("canvas");u.width=l,u.height=c;let f=u.getContext("2d");if(!f)return null;f.imageSmoothingEnabled=!0,f.imageSmoothingQuality="high",f.drawImage(r,0,0,l,c);let d=function(e){let t=/^data:([^;,]+)/.exec(e);return t?t[1]:""}(e),h="image/jpeg"===d?"image/jpeg":"image/webp"===d?"image/webp":"image/png";try{let t=u.toDataURL(h,.92);if("string"==typeof t&&t.startsWith("data:image")&&t.length<e.length)return t}catch{}return null})();return Kf.compress.set(r,i),i}async function om(e,t,n){t.compress&&(await async function(e,t){if(!t.compress)return{count:0,before:0,after:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("img"));"IMG"===e.tagName&&r.unshift(e);let i=0,o=0,a=0,s=async e=>{let t=e.getAttribute("src")||"";if(!t.startsWith("data:image")||t.startsWith("data:image/svg"))return;let r=parseFloat(e.dataset.snapdomWidth)||parseFloat(e.style.width)||e.width||0,s=parseFloat(e.dataset.snapdomHeight)||parseFloat(e.style.height)||e.height||0;if(!r||!s)return;let l=await im(t,r*n,s*n);l&&(i++,o+=t.length,a+=l.length,e.setAttribute("src",l))};for(let e=0;e<r.length;e+=6)await Promise.allSettled(r.slice(e,e+6).map(s));return{count:i,before:o,after:a}}(e,t),await async function(e,t,n=Kf.session.nodeMap){if(!t.compress)return{count:0};let r=(t.scale||1)*(t.dpr||1),i=[],o=[e,...e.querySelectorAll("*")];for(let e of o){let t=e.style&&e.style.backgroundImage;t&&t.includes("data:image")&&i.push(e)}let a=0,s=async e=>{let t,i=n.get(e);if(!i||!i.isConnected)return;try{t=getComputedStyle(i)}catch{return}if((t.backgroundRepeat||"repeat").toLowerCase().split(",").some(e=>"no-repeat"!==e.trim()))return;let{w:o,h:s}=function(e){return{w:e.offsetWidth||e.getBoundingClientRect().width||0,h:e.offsetHeight||e.getBoundingClientRect().height||0}}(i);if(!o||!s)return;let l=o*r,c=s*r,u=e.style.backgroundImage,f=[...u.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],d=u;for(let e of f){let t=e[2];if(t.startsWith("data:image/svg"))continue;let n=await im(t,l,c);n&&(d=d.split(t).join(n),a++)}d!==u&&(e.style.backgroundImage=d)};for(let e=0;e<i.length;e+=6)await Promise.allSettled(i.slice(e,e+6).map(s));return{count:a}}(e,t,n),await async function(e,t){if(!t.compress)return{count:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("image"));"image"===e.localName&&r.unshift(e);let i=0,o=async e=>{let t=e.getAttribute("href")||("function"==typeof e.getAttributeNS?e.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!t||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return;let r=parseFloat(e.getAttribute("width"))||0,o=parseFloat(e.getAttribute("height"))||0;if(!r||!o)return;let a=await im(t,r*n,o*n);a&&(e.setAttribute("href",a),e.hasAttribute("xlink:href")&&e.setAttribute("xlink:href",a),i++)};for(let e=0;e<r.length;e+=6)await Promise.allSettled(r.slice(e,e+6).map(o));return{count:i}}(e,t))}async function am(e,t){if(!e)throw new Error("Element cannot be null or undefined");(function(e="soft"){switch(e){case"auto":return Kf.session.styleMap=new Map,void(Kf.session.nodeMap=new Map);case"soft":default:return Kf.session.styleMap=new Map,Kf.session.nodeMap=new Map,void(Kf.session.styleCache=new WeakMap);case"full":return;case"disabled":Kf.session.styleMap=new Map,Kf.session.nodeMap=new Map,Kf.session.styleCache=new WeakMap,Kf.computedStyle=new WeakMap,Kf.measureHints=new WeakMap,Kf.baseStyle=new Xf(50),Kf.defaultStyle=new Xf(30),Kf.image=new Xf(100),Kf.background=new Xf(100),Kf.resource=new Xf(150),Kf.compress=new Xf(50),Kf.font=new Set}})(t.cache),t.__session={styleMap:Kf.session.styleMap,styleCache:Kf.session.styleCache,nodeMap:Kf.session.nodeMap},t.burst||function(e){let t=Date.now(),n=Kf.burstAdvice.get(e);!n||t-n.firstTs>2e3?Kf.burstAdvice.set(e,{count:1,firstTs:t,warned:!1}):(n.count++,n.count>=3&&!n.warned&&(n.warned=!0,console.warn("[snapdom] Captured this element multiple times. Pass { burst: true } to increase the speed.")))}(e),t.__resolveNodeHooks=function(e){let t=Array.isArray(e.plugins)?e.plugins:rm(),n=[];for(let e of t){let t=Zg(e);t&&"function"==typeof t.resolveNode&&n.push(t.resolveNode.bind(t))}return n.length?n:null}(t);let n,r,i,o,a,s,l,c,u=t.fast,f=!1!==t.outerTransforms,d=!!t.outerShadows,h=t.clip?vg(e,t.clip):null,p={element:e,options:t,plugins:t.plugins},g="",m="",y=null;await tm("beforeSnap",p);let v=null;!1!==t.resolvePicturePlaceholders&&!function(e){if(Array.isArray(e.plugins))for(let t of e.plugins)if("picture-resolver"===Zg(t)?.name)return!0;return rm().some(e=>"picture-resolver"===e?.name)}(t)&&(v=await zh(p.element,p.options)),await tm("beforeClone",p);let A=Jg(p.element,h);try{({clone:n,classCSS:r,styleCache:i,nodeMap:o,reconcileRisk:a,clipWindow:s}=await Rg(p.element,p.options)),a>0&&!t.reconcile&&!Kf.warnedReconcile&&(Kf.warnedReconcile=!0,console.warn("[snapdom] Text in inline/table-cell elements kept its natural width and may re-wrap under font-fallback rasterization. Pass { reconcile: true } for pixel-exact layout (roughly doubles capture time).")),!f&&n&&(y=function(e,t){if(!e||!t||!t.style)return null;let n=getComputedStyle(e);try{t.style.transformOrigin="0 0"}catch{}try{"translate"in t.style&&(t.style.translate="none"),"rotate"in t.style&&(t.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||"none"===r){let n=null;try{n=hg(e).scale}catch{}try{t.style.transform="none"}catch{}if(!n)return{a:1,b:0,c:0,d:1};let r=n.trim().split(/\s+/).map(parseFloat),i=Number.isFinite(r[0])?r[0]:1;return{a:i,b:0,c:0,d:Number.isFinite(r[1])?r[1]:i}}function i(e,t,n,r){let i=Math.sqrt(e*e+t*t)||0,o=0,a=0;if(i>0){let s=e/i,l=t/i;o=s*n+l*r;let c=n-s*o,u=r-l*o;a=Math.sqrt(c*c+u*u)||0,a>0?o/=a:o=0}return{a:i,b:0,c:o*a,d:a}}let o=r.match(/^matrix\(\s*([^)]+)\)$/i);if(o){let e=o[1].split(",").map(e=>parseFloat(e.trim()));if(6===e.length&&e.every(Number.isFinite)){let[n,r,o,a]=e,s=i(n,r,o,a);try{t.style.transform=`matrix(${s.a}, ${s.b}, ${s.c}, ${s.d}, 0, 0)`}catch{}return s}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let e=a[1].split(",").map(e=>parseFloat(e.trim()));if(16===e.length&&e.every(Number.isFinite)){let n=i(e[0],e[1],e[4],e[5]);try{t.style.transform=`matrix(${n.a}, ${n.b}, ${n.c}, ${n.d}, 0, 0)`}catch{}return n}}try{let e=new DOMMatrix(r),n=i(e.a,e.b,e.c,e.d);try{t.style.transform=`matrix(${n.a}, ${n.b}, ${n.c}, ${n.d}, 0, 0)`}catch{}return n}catch{return null}}(p.element,n)),!d&&n&&function(e,t,n={}){if(!e||!t||!t.style)return;let r=getComputedStyle(e);try{t.style.boxShadow="none"}catch(e){Od(n,"stripRootShadows boxShadow",e)}try{t.style.textShadow="none"}catch(e){Od(n,"stripRootShadows textShadow",e)}try{t.style.outline="none"}catch(e){Od(n,"stripRootShadows outline",e)}let i=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{t.style.filter=i.length?i:"none"}catch(e){Od(n,"stripRootShadows filter",e)}}(p.element,n,p.options),n&&(function(e,t,n){if(!e||!t||!t.style)return;let r=getComputedStyle(e);if(!xg(r))for(let i of["top","bottom"]){let o="top"===i?"Top":"Bottom";if((parseFloat(r[`border${o}Width`])||0)>0||(parseFloat(r[`padding${o}`])||0)>0)continue;let a=e,s=t;for(;a&&s;){let e=Cg(a,i);if(!e)break;let t=n?Array.from(s.children).find(t=>n.get(t)===e)||null:s.children[Array.from(a.children).indexOf(e)]||null,r=getComputedStyle(e),l=parseFloat(r[`margin${o}`])||0;if(t&&t.style&&l>0&&(t.style[`margin${o}`]="0px"),xg(r)||(parseFloat(r[`border${o}Width`])||0)>0||(parseFloat(r[`padding${o}`])||0)>0)break;a=e,s=t}}}(p.element,n,o),function(e,t){if(!e||!t||!t.style)return;let n=1;try{n=parseFloat(getComputedStyle(e).zoom)}catch{return}if(t.style.getPropertyValue("zoom")||Number.isFinite(n)&&1!==n)try{t.style.setProperty("zoom","1","important")}catch{}}(p.element,n))}finally{A()}if(p={clone:n,classCSS:r,styleCache:i,nodeMap:o,...p},await tm("afterClone",p),v&&await v(),Eg(p.clone),"remove"===p.options?.excludeMode||"remove"===p.options?.filterMode)try{!function(e,t,n=new Map){!function e(t,r){if(1!==t?.nodeType||1!==r?.nodeType)return;let i=t.childElementCount>r.childElementCount,o=n.get(t)||getComputedStyle(t);if(n.has(t)||n.set(t,o),i&&Sg(t,o)){r.style.height||(r.style.height="auto"),r.style.width||(r.style.width="auto"),r.style.removeProperty("block-size"),r.style.removeProperty("inline-size"),r.style.minHeight||(r.style.minHeight="0"),r.style.minWidth||(r.style.minWidth="0"),r.style.maxHeight||(r.style.maxHeight="none"),r.style.maxWidth||(r.style.maxWidth="none");let e=o.overflowY||o.overflowBlock||"visible",t=o.overflowX||o.overflowInline||"visible";("visible"!==e||"visible"!==t)&&(r.style.overflow="visible")}let a=Array.from(t.children),s=Array.from(r.children);for(let t=0;t<Math.min(a.length,s.length);t++)e(a[t],s[t])}(e,t)}(p.element,p.clone,p.styleCache)}catch(e){console.warn("[snapdom] shrink pass failed:",e)}try{await async function(e,t,n=Kf.session.nodeMap){if(1!==e?.nodeType)return 0;let r='.material-icons, [class*="material-symbols"]',i=Array.from(e.querySelectorAll(r)).filter(e=>e&&e.textContent&&e.textContent.trim());if(e.matches?.(r)&&e.textContent&&e.textContent.trim()&&i.unshift(e),0===i.length)return 0;let o=1===t?.nodeType?Array.from(t.querySelectorAll(r)).filter(e=>e&&e.textContent&&e.textContent.trim()):[];1===t?.nodeType&&t.matches?.(r)&&t.textContent&&t.textContent.trim()&&o.unshift(t);let a=0;for(let e=0;e<i.length;e++){let t=i[e],r=n&&n.get(t)||o[e]||null;try{let e=getComputedStyle(r||t),n=e.fontFamily||"Material Icons";if(!yp(n))continue;let i=(r||t).textContent.trim();if(!i)continue;let o=parseInt(e.fontSize,10)||24,s=e.fontWeight&&"normal"!==e.fontWeight?e.fontWeight:"normal",l=Ap(e),c=e.fontVariationSettings&&"normal"!==e.fontVariationSettings?e.fontVariationSettings:"",u=(r||t).className||"",{dataUrl:f,width:d,height:h}=await bp(i,{family:n,weight:s,fontSize:o,color:l,variation:c,className:u});t.textContent="";let p=t.ownerDocument.createElement("img");p.src=f,p.alt=i,p.style.height=`${o}px`,p.style.width=`${Math.max(1,Math.round(d/h*o))}px`,p.style.objectFit="contain",p.style.verticalAlign=getComputedStyle(t).verticalAlign||"baseline",t.appendChild(p),a++}catch{}}return a}(p.clone,p.element,p.nodeMap)}catch{}let b=e=>new Promise((t,n)=>{Rd(()=>{Promise.resolve().then(e).then(t,n)},{fast:u})}),w=(async()=>{await Promise.all([b(()=>Hg(p.clone,p.options)),b(()=>async function(e,t,n,r={},i=Kf.session.nodeMap){if(!t)return;let o=[];e&&Ch(e)&&o.push([e,t]);let a=[t];for(;a.length;){let e=a.pop();if(e.children)for(let t of e.children){if("STYLE"===t.tagName)continue;let e=i.get(t);e&&Ch(e)&&o.push([e,t]),a.push(t)}}for(let e=0;e<o.length;e+=6)await Promise.allSettled(o.slice(e,e+6).map(([e,t])=>zg(e,t,n,r)))}(p.element,p.clone,p.styleCache,p.options,p.nodeMap))]);try{jg(p.element,p.clone,p.nodeMap)}catch(e){console.warn("[snapdom] backdrop-filter emulation failed:",e)}t.compress&&await b(()=>om(p.clone,p.options,p.nodeMap))})(),I=Promise.resolve();t.embedFonts&&(I=b(async()=>{let e=p.element.ownerDocument||document,t=h?e=>{try{let t=e.getBoundingClientRect();return t.right>=h.left-200&&t.left<=h.right+200&&t.bottom>=h.top-200&&t.top<=h.bottom+200}catch{return!0}}:null,{required:n,usedCodepoints:r}=Yp(p.element,t);if(Hd()){let t=new Set(Array.from(n).map(e=>String(e).split("__")[0]).filter(Boolean));await Wp(t,1,e)}g=await Vp({required:n,usedCodepoints:r,preCached:!1,exclude:p.options.excludeFonts,localFonts:p.options.localFonts,useProxy:p.options.useProxy,fontStylesheetDomains:p.options.fontStylesheetDomains,doc:e})})),await Promise.all([w,I]);let x=function(e){let t=new Set;return e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(e.tagName&&t.add(e.tagName.toLowerCase()),"function"==typeof e.querySelectorAll&&e.querySelectorAll("*").forEach(e=>t.add(e.tagName.toLowerCase())),Array.from(t))}(p.clone).sort(),C=x.join(",");Kf.baseStyle.has(C)?m=Kf.baseStyle.get(C):await new Promise(e=>{Rd(()=>{m=function(e){let t=new Map;for(let n of e){let e=pd(n);if(!e)continue;let r=Object.entries(e).map(([e,t])=>`${e}:${t};`).sort().join("");r&&(t.has(r)||t.set(r,[]),t.get(r).push(n))}let n="";for(let[e,r]of t.entries())n+=`${r.join(",")} { ${e} }\n`;return n}(x),Kf.baseStyle.set(C,m),e()},{fast:u})});let B=function(e){if(!e||!e.styleSheets)return"";let t=function(e){let t="";for(let n of e.styleSheets){let e=-1;try{e=n.cssRules?n.cssRules.length:-1}catch{}t+=(n.href||"inline")+":"+e+"|"}return t}(e),n=Qg.get(e);if(n&&n.fp===t)return n.css;let r=new Set,i="";for(let t of Array.from(e.styleSheets))try{let e=t.cssRules;e&&(i+=Tg(e,r))}catch{}return Qg.set(e,{fp:t,css:i}),i}(p.element?.ownerDocument||document);p={fontsCSS:g,baseCSS:m,scrollbarCSS:B,...p},await tm("beforeRender",p),await new Promise(e=>{Rd(()=>{let n=vd(p.element),r=p.element.getBoundingClientRect(),i=Math.max(1,Dg(p.element.offsetWidth||parseFloat(n.width)||r.width||1)),o=Math.max(1,Dg(p.element.offsetHeight||parseFloat(n.height)||r.height||1)),a=p.element.ownerDocument||document;if(!(s||p.element!==a.body&&p.element!==a.documentElement||a.documentElement.hasAttribute("data-sd-pinned"))){let e=Math.max(p.element.scrollHeight||0,a.documentElement?.scrollHeight||0,a.body?.scrollHeight||0),t=Math.max(p.element.scrollWidth||0,a.documentElement?.scrollWidth||0,a.body?.scrollWidth||0);e>0&&(o=Math.max(o,Dg(e))),t>0&&(i=Math.max(i,Dg(t)));try{let e=(p.scrollbarCSS||"").length+(p.baseCSS||"").length+(p.fontsCSS||"").length+(p.classCSS||"").length,t=Kf.measureHints.get(p.element);if(t&&t.cssLen===e&&t.w0===i)t.csh>0&&(o=Math.max(o,Dg(t.csh))),t.csw>0&&(i=Math.max(i,Dg(t.csw)));else{let t=a.createElement("div");t.setAttribute("data-snapdom-internal",""),t.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let n=t.attachShadow({mode:"open"}),r=a.createElement("style");r.textContent=(p.scrollbarCSS||"")+p.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+p.classCSS,n.appendChild(r),n.appendChild(p.clone.cloneNode(!0)),a.body.appendChild(t);let s=t.scrollHeight,l=t.scrollWidth;a.body.removeChild(t),Kf.measureHints.set(p.element,{cssLen:e,w0:i,csh:s,csw:l}),s>0&&(o=Math.max(o,Dg(s))),l>0&&(i=Math.max(i,Dg(l)))}}catch{}}if("remove"===p.options?.excludeMode||"remove"===p.options?.filterMode){let e=function(e,t){let n=getComputedStyle(e),r=e.getBoundingClientRect(),i=1/0,o=-1/0,a=!1,s=Array.from(e.children);for(let e of s){if(Fg(e,t)||!kg(e))continue;let n=e.getBoundingClientRect(),s=n.top-r.top,l=n.bottom-r.top;l<=s||(s<i&&(i=s),l>o&&(o=l),a=!0)}let l=a?Math.max(0,o-i):0;return(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0)+(parseFloat(n.paddingTop)||0)+(parseFloat(n.paddingBottom)||0)+l}(p.element,p.options);Number.isFinite(e)&&e>0&&(o=Math.max(1,Math.min(o,Dg(e+1))))}if(p.options?.reconcile)try{let e=(p.scrollbarCSS||"")+p.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+p.classCSS;!function(e,t,n,r,i,o){let a=e.ownerDocument||document,s=e.getBoundingClientRect(),l=i>0&&s.width>0?s.width/i:1,c=o>0&&s.height>0?s.height/o:1;if(Math.abs(l-c)>.02)return 0;let u=a.createElement("div");u.setAttribute("data-snapdom-internal",""),u.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let f=u.attachShadow({mode:"open"}),d=a.createElement("style");d.textContent=n,f.appendChild(d);let h=t.cloneNode(!0);f.appendChild(h),a.body.appendChild(u);let p=0,g=(e,t,n)=>{let r=vd(e),i="border-box"===r.boxSizing,o=(e,t,...n)=>{let r=parseFloat(e);if(!Number.isFinite(r))return t;let o=r+(i?0:n.reduce((e,t)=>e+(parseFloat(t)||0),0));return Math.abs(o-t)<=.51?o:t};return{width:o(r.width,t,r.paddingLeft,r.paddingRight,r.borderLeftWidth,r.borderRightWidth),height:o(r.height,n,r.paddingTop,r.paddingBottom,r.borderTopWidth,r.borderBottomWidth)}};try{let e=h.getBoundingClientRect(),n=h.offsetWidth||i,a=h.offsetHeight||o,s=n>0&&e.width>0?e.width/n:1,u=a>0&&e.height>0?e.height/a:1,f=(e,t,n=!1)=>{let i=e.children,o=t.children,a=Math.min(i.length,o.length);for(let e=0;e<a;e++){let t=i[e],a=o[e],d=r.get(t),h=n||yg.has(t);if(1===d?.nodeType&&t?.namespaceURI===mg&&t.style&&d.isConnected){let e=d.getBoundingClientRect();if(e.width>0&&e.height>0){let n=a.getBoundingClientRect(),r=e.width/l,i=e.height/c,o=n.width,f=n.height,m=d.offsetWidth||r,y=d.offsetHeight||i,v=a.offsetWidth||o,A=a.offsetHeight||f,b=Math.abs(r-m)>Ng||Math.abs(i-y)>Ng||Math.abs(o-v)>Ng||Math.abs(f-A)>Ng;if(h){let e=g(a,v,A);r=o>0?r*s*e.width/o:r,i=f>0?i*u*e.height/f:i,o=e.width,f=e.height}else if(b){let e=g(d,m,y),t=g(a,v,A);r=e.width,i=e.height,o=t.width,f=t.height}let w=o-r,I=f-i;(Math.abs(w)>Ng||Math.abs(I)>Ng)&&(t.style.boxSizing="border-box",t.style.width=`${Dg(r)}px`,t.style.height=`${Dg(i)}px`,p++)}}f(t,a,h)}};f(t,h)}finally{u.remove()}}(p.element,p.clone,e,p.nodeMap,i,o)}catch(e){console.warn("[snapdom] reconcile pass failed:",e)}let u=(e,t=NaN)=>{let n="string"==typeof e?parseFloat(e):e;return Number.isFinite(n)?n:t},h=u(p.options.width),g=u(p.options.height),m=s?Dg(s.width):i,v=s?Dg(s.height):o,A=m,b=v,w=Number.isFinite(h),I=Number.isFinite(g),x=v>0?m/v:1;w&&I?(A=Math.max(1,Dg(h)),b=Math.max(1,Dg(g))):w?(A=Math.max(1,Dg(h)),b=Math.max(1,Dg(A/(x||1)))):I&&(b=Math.max(1,Dg(g)),A=Math.max(1,Dg(b*(x||1))));let C=0,B=0,E=i,S=o;if(s){let e=0,t=0;if(sm(p.element)){let r=null;if(!f&&y&&Number.isFinite(y.a))r={a:y.a,b:y.b||0,c:y.c||0,d:y.d||1,e:0,f:0};else{let e=hg(p.element),t=Ig(n.transform&&"none"!==n.transform?n.transform:"",e);t&&t.is2D&&(r={a:t.a,b:t.b,c:t.c,d:t.d,e:0,f:0})}if(r&&(1!==r.a||0!==r.b||0!==r.c||1!==r.d)){let{ox:a,oy:s}=dg(n,i,o),l=fg(i,o,r,a,s);e=l.minX,t=l.minY}}C=Dg(s.x+e),B=Dg(s.y+t),E=Dg(C+s.width),S=Dg(B+s.height)}else if(!f&&y&&Number.isFinite(y.a)){let e=fg(i,o,{a:y.a,b:y.b||0,c:y.c||0,d:y.d||1,e:0,f:0},0,0);C=Dg(e.minX),B=Dg(e.minY),E=Dg(e.maxX),S=Dg(e.maxY)}else if(f&&sm(p.element)){let e=n.transform&&"none"!==n.transform?n.transform:"",t=hg(p.element),r=gg({baseTransform:e,rotate:t.rotate||"0deg",scale:t.scale,translate:t.translate}),{ox:a,oy:s}=dg(n,i,o),l=r.is2D?r:new DOMMatrix(r.toString()),c=fg(i,o,{a:l.a,b:l.b,c:l.c,d:l.d,e:0,f:0},a,s);C=Dg(c.minX),B=Dg(c.minY),E=Dg(c.maxX),S=Dg(c.maxY)}let k=function(e){return ug(e.boxShadow)}(n),F=function(e){return ug(e.textShadow)}(n),D=function(e){let t,n=e.filter&&"none"!==e.filter?e.filter:e.webkitFilter||"",r=/blur\(\s*([0-9.]+)px\s*\)/gi,i=0;for(;t=r.exec(n);)i+=parseFloat(t[1])||0;let o=Math.ceil(i);return{top:o,right:o,bottom:o,left:o}}(n),N=function(e){if("none"===(e.outlineStyle||"none"))return{top:0,right:0,bottom:0,left:0};let t=Math.ceil(parseFloat(e.outlineWidth||"0")||0),n=parseFloat(e.outlineOffset||"0")||0,r=t+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}(n),M=function(e){let t=`${e.filter||""} ${e.webkitFilter||""}`.trim();if(!t||"none"===t)return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=t.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,i=0,o=0,a=0,s=!1;for(let e of n){s=!0;let t=e.match(/-?\d+(?:\.\d+)?px/gi)?.map(e=>parseFloat(e))||[],[n=0,l=0,c=0]=t,u=Math.abs(n)+c,f=Math.abs(l)+c;i=Math.max(i,u+Math.max(n,0)),a=Math.max(a,u+Math.max(-n,0)),o=Math.max(o,f+Math.max(l,0)),r=Math.max(r,f+Math.max(-l,0))}return{bleed:{top:Dg(r),right:Dg(i),bottom:Dg(o),left:Dg(a)},has:s}}(n),T=s?{top:0,right:0,bottom:0,left:0}:d?{top:Dg(Math.max(k.top,F.top)+D.top+N.top+M.bleed.top),right:Dg(Math.max(k.right,F.right)+D.right+N.right+M.bleed.right),bottom:Dg(Math.max(k.bottom,F.bottom)+D.bottom+N.bottom+M.bleed.bottom),left:Dg(Math.max(k.left,F.left)+D.left+N.left+M.bleed.left)}:{top:D.top,right:D.right,bottom:D.bottom,left:D.left};C=Dg(C-T.left),B=Dg(B-T.top),E=Dg(E+T.right),S=Dg(S+T.bottom);let Q=Math.max(1,Dg(E-C)),L=Math.max(1,Dg(S-B)),R=w||I?Dg(A/m):1,U=I||w?Dg(b/v):1,H=Math.max(1,Dg(Q*R)),q=Math.max(1,Dg(L*U)),O="http://www.w3.org/2000/svg",P=sm(p.element)?2:0,$=Dg(P+(f?0:1)),z=Math.ceil(Q+2*$),j=Math.ceil(L+2*$),V=Dg(-(Dg(C)-$)),Y=Dg(-(Dg(B)-$)),W=Math.max(0,V),G=Math.max(0,Y),J=Dg(z-Math.min(0,V)),_=Dg(j-Math.min(0,Y)),X=document.createElementNS(O,"foreignObject");X.setAttribute("x",String(Math.min(0,V))),X.setAttribute("y",String(Math.min(0,Y))),X.setAttribute("width",String(J)),X.setAttribute("height",String(_)),X.style.overflow="visible";let K=document.createElement("style");K.textContent=(p.scrollbarCSS||"")+p.baseCSS+p.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}"+p.classCSS,X.appendChild(K);let Z=document.createElement("div");Z.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Z.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${J}px;height:${_}px`+(0!==W||0!==G?`;padding:${G}px 0 0 ${W}px !important`:""),Z.appendChild(p.clone),X.appendChild(Z);let ee=(new XMLSerializer).serializeToString(X),te=w||I,ne=Object.freeze({w0:m,h0:v,vbW:z,vbH:j,targetW:A,targetH:b,contentX:Dg(V+(s?C:0)),contentY:Dg(Y+(s?B:0)),clip:s?Object.freeze({x:Dg(C),y:Dg(B),width:m,height:v}):null});Object.defineProperty(t,"meta",{value:ne,enumerable:!0,writable:!1,configurable:!0});let re=!te||Hd()?z:Dg(H+2*$),ie=!te||Hd()?j:Dg(q+2*$),oe=parseFloat(vd(a.documentElement)?.fontSize)||16;c=`<svg xmlns="${O}" width="${re}" height="${ie}" viewBox="0 0 ${z} ${j}" font-size="${oe}px">`+ee+"</svg>",l=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(c)}`,p={svgString:c,dataURL:l,...p},e()},{fast:u})}),await tm("afterRender",p);let E=document.getElementById("snapdom-sandbox");return E&&"absolute"===E.style.position&&E.remove(),p.dataURL}function sm(e){return function(e){let t=vd(e),n=t.transform||"none";if("none"!==n&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let r=t.rotate&&"none"!==t.rotate&&"0deg"!==t.rotate,i=t.scale&&"none"!==t.scale&&"1"!==t.scale,o=t.translate&&"none"!==t.translate&&"0px 0px"!==t.translate;return!!(r||i||o)}(e)}Zf(),qd(),Pd();var lm=new WeakMap;function cm(e,t,n){let r=new Set;if(e instanceof HTMLVideoElement&&r.add(e),e.querySelectorAll)for(let t of e.querySelectorAll("video"))r.add(t);for(let e of t.trackedVideos)r.has(e)||(e.removeEventListener("timeupdate",n),e.removeEventListener("seeked",n),t.trackedVideos.delete(e));for(let e of r)t.trackedVideos.has(e)||(e.addEventListener("timeupdate",n),e.addEventListener("seeked",n),t.trackedVideos.add(e))}function um(e){let{burst:t,invalidate:n,...r}=e||{};try{return JSON.stringify(r,Object.keys(r).sort())}catch{return null}}function fm(e,t,n,r){let i=lm.get(e);i||(i=function(e){let t={dirty:!0,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedVideos:new Set},n=e=>{t.capturing||wh(e)&&(t.dirty=!0)},r=()=>{t.capturing||(t.dirty=!0)},i=e.ownerDocument||document;try{let r=new MutationObserver(n);r.observe(e,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),t.observers.push(r)}catch{}try{if(i.head){let e=new MutationObserver(n);e.observe(i.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),t.observers.push(e)}}catch{}return t.markDirty=n,t.onMediaDirty=r,cm(e,t,r),t}(e),i.baselineSignature=um(t),lm.set(e,i));let o=um(t),a=null===o||o!==i.baselineSignature,s=async()=>{for(let e of i.observers)i.markDirty(e.takeRecords());if(n.invalidate&&(i.dirty=!0),!a&&!i.dirty&&i.last)return i.last;i.capturing=!0,a||(i.dirty=!1);try{let e=await r();return a||(i.last=e),e}finally{for(let e of i.observers)e.takeRecords();i.capturing=!1,cm(e,i,i.onMediaDirty)}},l=i.inflight.then(s,s);return i.inflight=l.catch(()=>{}),l}$d(),fd(),Zf();var dm=Object.assign(async function(e,t){if(!e)throw new Error("Element cannot be null or undefined");let n=function(e={}){let t=e.format??"png";"jpg"===t&&(t="jpeg");let n=function(e){if(!0===e)return"soft";if(!1===e)return"disabled";if("string"==typeof e){let t=e.toLowerCase().trim();if("auto"===t)return"auto";if("full"===t)return"full";if("soft"===t||"disabled"===t)return t}return"soft"}(e.cache);return{debug:e.debug??!1,fast:e.fast??!0,scale:e.scale??1,exclude:e.exclude??[],excludeMode:e.excludeMode??"hide",filter:e.filter??null,filterMode:e.filterMode??"hide",placeholders:!1!==e.placeholders,embedFonts:e.embedFonts??!1,iconFonts:Array.isArray(e.iconFonts)?e.iconFonts:e.iconFonts?[e.iconFonts]:[],localFonts:Array.isArray(e.localFonts)?e.localFonts:[],excludeFonts:e.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(e.fontStylesheetDomains)?e.fontStylesheetDomains:[],fallbackURL:e.fallbackURL??void 0,cache:n,useProxy:"string"==typeof e.useProxy?e.useProxy:"",width:e.width??null,height:e.height??null,format:t,type:e.type??"svg",quality:e.quality??.92,dpr:e.dpr??(window.devicePixelRatio||1),backgroundColor:e.backgroundColor??(["jpeg","webp"].includes(t)?"#ffffff":null),filename:e.filename??"snapDOM",outerTransforms:e.outerTransforms??!0,outerShadows:e.outerShadows??!1,reconcile:e.reconcile??!1,burst:e.burst??!1,invalidate:e.invalidate??!1,clip:e.clip??null,compress:!1!==e.compress,excludeStyleProps:e.excludeStyleProps??null,resolvePicturePlaceholders:!1!==e.resolvePicturePlaceholders,pictureResolver:e.pictureResolver&&"object"==typeof e.pictureResolver?e.pictureResolver:{}}}(t);if(nm(n,t&&t.plugins),Hd()){if(!0===n.embedFonts)try{let t=function(e,t){return Yp(e,t).required}(e),n=new Set([...t].map(e=>String(e).split("__")[0]).filter(Boolean));await Wp(n,1)}catch{}let r=Array.from(e.querySelectorAll("canvas"));"CANVAS"===e.tagName&&r.unshift(e);for(let e of r)try{let t=e.getContext("2d",{willReadFrequently:!0});t&&t.getImageData(0,0,1,1)}catch(e){Od(t,"safari canvas poke failed",e)}}return n.iconFonts&&n.iconFonts.length>0&&function(e){let t=Array.isArray(e)?e:[e];for(let e of t){let t;if(e instanceof RegExp)t=e;else{if("string"!=typeof e){console.warn("[snapdom] Ignored invalid iconFont value:",e);continue}t=new RegExp(gp(e),"i")}let n=`${t.source}/${t.flags}`;pp.has(n)||(pp.add(n),hp.push(t))}}(n.iconFonts),n.snap||(n.snap={toPng:(e,t)=>dm.toPng(e,t),toSvg:(e,t)=>dm.toSvg(e,t)}),n.burst?fm(e,t,n,()=>dm.capture(e,n,hm)):dm.capture(e,n,hm)},{plugins:function(...e){return function(...e){let t=e.flat();for(let e of t){let t=Zg(e);t&&(Kg.some(e=>e&&e.name&&t.name&&e.name===t.name)||Kg.push(t))}}(...e),dm}}),hm=Symbol("snapdom.internal"),pm=Symbol("snapdom.internal.silent");function gm(e){return document.querySelectorAll(e)}function mm(e){function t(e){e.parentNode.removeChild(e)}if(ku(e)){return void t(e)}if(!Fe(e))return;An(gm(e),function(e){t(e)})}function ym(e,t){if(!ku(e))return"invalid eleParent";if(ke(t))e.insertAdjacentHTML("afterbegin",t);else{if(!ku(t))return"invalid itemChild";e.insertBefore(t,e.firstChild)}}async function vm(e,t={}){if(!ku(e))return Promise.reject("invalid ele");let n=be(t,"scale",null);if(Me(n)||(n=1),n=xr(n),n<1)return Promise.reject("opt.scale can not less then 1");let r=be(t,"picType",null);"image/jpg"!==r&&"image/jpeg"!==r&&"image/png"!==r&&"svg"!==r&&(r="image/png");let i=be(t,"toBase64",null);Ie(i)||(i=!0);let o=e.cloneNode(!0),a=document.createElement("div");a.style.position="absolute",a.style.top=0,a.style.left=0,a.style.zIndex=-1,a.appendChild(o);let s=document.createElement("div");s.style.opacity=0,s.style.position="relative",s.appendChild(a),ym(document.querySelector("body"),s);let l,c={scale:n,quality:1,cache:"disabled"};return"image/jpg"===r||"image/jpeg"===r?l=await dm.toJpg(a,c):"image/png"===r?l=await dm.toPng(a,c):"svg"===r&&(l=await dm.toSvg(a,c)),i&&(l=be(l,"src","")),mm(s),l}dm.capture=async(e,t,n)=>{if(n!==hm)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");t.element=e;let r=await am(e,t),i={img:async(e,t)=>{let{toImg:n}=await Promise.resolve().then(()=>(lh(),ah));return n(r,{...e,...t||{}})},svg:async(e,t)=>{let{toSvg:n}=await Promise.resolve().then(()=>(lh(),ah));return n(r,{...e,...t||{}})},canvas:async(e,t)=>{let{toCanvas:n}=await Promise.resolve().then(()=>(nh(),zd));return n(r,{...e,...t||{}})},blob:async(e,t)=>{let{toBlob:n}=await Promise.resolve().then(()=>(fh(),ch));return n(r,{...e,...t||{}})},png:async(e,t)=>{let{rasterize:n}=await Promise.resolve().then(()=>(oh(),rh));return n(r,{...e,...t||{},format:"png"})},jpeg:async(e,t)=>{let{rasterize:n}=await Promise.resolve().then(()=>(oh(),rh));return n(r,{...e,...t||{},format:"jpeg"})},webp:async(e,t)=>{let{rasterize:n}=await Promise.resolve().then(()=>(oh(),rh));return n(r,{...e,...t||{},format:"webp"})},download:async(e,t)=>{let{download:n}=await Promise.resolve().then(()=>(gh(),dh));return n(r,{...e,...t||{}})}},o={};for(let e of["img","svg","canvas","blob","png","jpeg","webp"])o[e]=async n=>i[e](t,{...n||{},[pm]:!0});o.jpg=o.jpeg;let a={...t,export:{url:r},exports:o},s=await async function(e,t,n){let r=[],i=em(t);for(let o of i){let i=o&&"function"==typeof o[e]?o[e]:null;if(!i)continue;let a=await i(t,n);typeof a<"u"&&r.push(a)}return r}("defineExports",a),l=Object.assign({},...s.filter(e=>e&&"object"==typeof e).reverse()),c={...i,...l};c.jpeg&&!c.jpg&&(c.jpg=(e,t)=>c.jpeg(e,t));let u=!1,f=Promise.resolve();async function d(e,n){let i=Object.freeze(n&&"object"==typeof n?{...n}:{}),o=f.then(async()=>{let n=c[e];if(!n)throw new Error(`[snapdom] Unknown export type: ${e}`);let o=function(e,n){let r={...t,...n||{}};return[e,r.format,r.type].map(e=>"string"==typeof e?e.toLowerCase():"").find(e=>"jpeg"===e||"jpg"===e||"webp"===e)&&(null==r.backgroundColor||"transparent"===r.backgroundColor)&&(r.backgroundColor="#ffffff"),r}(e,i),a={...t,export:{type:e,options:o,requestedOptions:i,url:r}};await tm("beforeExport",a,{format:e,options:o});let s=await n(a,o);return await tm("afterExport",a,{format:e,options:o,result:s}),u||(u=!0,await tm("afterSnap",t)),s});return f=o.catch(()=>{}),o}let h={url:r,toRaw:()=>r,to:(e,t)=>d(e,t),toImg:e=>d("img",e),toSvg:e=>d("svg",e),toCanvas:e=>d("canvas",e),toBlob:e=>d("blob",e),toPng:e=>d("png",e),toJpg:e=>d("jpg",e),toWebp:e=>d("webp",e),download:e=>d("download",e)};Object.defineProperty(h,"meta",{value:t.meta,enumerable:!0,writable:!1,configurable:!1});for(let e of Object.keys(c)){let t="to"+e.charAt(0).toUpperCase()+e.slice(1);h[t]||(h[t]=t=>d(e,t))}return h},dm.toRaw=(e,t)=>dm(e,t).then(e=>e.toRaw()),dm.toImg=(e,t)=>dm(e,t).then(e=>e.toImg()),dm.toSvg=(e,t)=>dm(e,t).then(e=>e.toSvg()),dm.toCanvas=(e,t)=>dm(e,t).then(e=>e.toCanvas()),dm.toBlob=(e,t)=>dm(e,t).then(e=>e.toBlob()),dm.toPng=(e,t)=>dm(e,{...t,format:"png"}).then(e=>e.toPng()),dm.toJpg=(e,t)=>dm(e,{...t,format:"jpeg"}).then(e=>e.toJpg()),dm.toWebp=(e,t)=>dm(e,{...t,format:"webp"}).then(e=>e.toWebp()),dm.download=(e,t)=>dm(e,t).then(e=>e.download());var Am=Da(ba);function bm(e){let t=function(e,n){return null===e.parentNode?n:t(e.parentNode,n.concat([e]))};return e instanceof HTMLElement||e instanceof SVGElement?t(e.parentNode,[]):[]}function wm(e){let t=be(e,"clientX",null),n=be(e,"clientY",null),r=be(e,"pageX",null),i=be(e,"pageY",null);if(null!==t&&null!==n&&null!==r&&null!==i)return{clientX:t,clientY:n,pageX:r,pageY:i};let o=be(e,"changedTouches",[]);if(1!==ar(o))return null;let a=o[0];return{clientX:be(a,"clientX",null),clientY:be(a,"clientY",null),pageX:be(a,"pageX",null),pageY:be(a,"pageY",null)}}function Im(e,t){let n=[];try{n=document.elementsFromPoint(e,t)}catch(e){console.log(e)}return n}function xm(e,t){if(!ku(e))return null;if(!Fe(t))return null;try{return e.getAttribute(t)}catch(e){}return null}function Cm(e){if(!ku(e))return null;try{return e.getBoundingClientRect()}catch(e){}return null}function Bm(e,t){if(!Se(e))return null;if(!fa(e.clientX)||!fa(e.clientY))return null;if(!ku(t))return null;let n=Cm(t);return n?{x:e.clientX-n.left,y:e.clientY-n.top,w:t.offsetWidth,h:t.offsetHeight}:null}function Em(e={}){let t="dragpreviewid",n=null,r=null,i=null,o=null,a=null,s=!1,l=be(e,"attIdentify",null);Fe(l)||(l="dragprevid");let c=be(e,"containerOpacity",null);fa(c)||(c=.4);let u=be(e,"containerBackground",null);Fe(u)||(u="white");let f=be(e,"containerBorderWidth",null);fa(f)||(f=1);let d=be(e,"containerBorderColor",null);Fe(d)||(d="#f26");let h=`c${Hu(8)}`;function p(e,t,n){r&&i&&o&&a&&!s&&(a.style.top=t-r.tShiftY+"px",a.style.left=e-r.tShiftX+"px")}function g(){mm(`[${t}='${h}']`),r=null,i=null,o=null,a=null}let m=function(e){p(e.clientX,e.clientY)};window.addEventListener("mousemove",m);let y=function(e){let t=wm(e);t&&p(t.clientX,t.clientY)};return window.addEventListener("touchmove",y),{createPreview:function(e,s,m){try{!function(){let g=function(e,t,r){let i=Cm(e);if(!i)return null;n=e;let o=e.cloneNode(!0);return o.tShiftX=t-i.left,o.tShiftY=r-i.top,o.tWidth=e.offsetWidth,o.tHeight=e.offsetHeight,o.tParent=e.parentNode,o.setAttribute(l,""),o}(e,s,m);if(null===g)return;let y=document.createElement("div");y.style.position="absolute",y.style.zIndex=1,y.style.top=0,y.style.left=0,y.style.width="100%",y.style.height="100%",y.appendChild(g);let v=document.createElement("div");v.style.position="relative",v.appendChild(y);let A=document.createElement("div");A.setAttribute(t,h),A.style.position="fixed",A.style.zIndex=1e5,A.style.width=`${g.tWidth+2*f}px`,A.style.height=`${g.tHeight+2*f}px`,A.style.opacity=c,A.style.background=u,A.style.border=`${f}px solid ${d}`,A.style.pointerEvents="none",A.appendChild(v),document.querySelector("body").appendChild(A),r=g,i=y,o=v,a=A,p(s,m)}()}catch(e){}let y=setInterval(()=>{let e=xm(n,l);document.querySelector(`[${l}='${e}']`)||(clearInterval(y),g())},500)},updateDragPreview:p,pauseDragPreview:function(e){s=e},removeDragPreview:g,setNodeStyle:function(e){try{An(e,(e,t)=>{r.style[t]=e})}catch(e){}},setCoverStyle:function(e){try{An(e,(e,t)=>{i.style[t]=e})}catch(e){}},setSellStyle:function(e){try{An(e,(e,t)=>{o.style[t]=e})}catch(e){}},setContainerStyle:function(e){try{An(e,(e,t)=>{a.style[t]=e})}catch(e){}},clear:function(){window.removeEventListener("mousemove",m),window.removeEventListener("touchmove",y)}}}let Sm={};function km(e,t,{attIdentify:n,previewOpacity:r,previewBackground:i,previewBorderWidth:o,previewBorderColor:a}){if(!Te(Sm,e)){let t=qi(),s=function(e){let t=[];function n(){let n;n="mousemove";let r=function(t){e.dragMove({e:t,name:"mousemove"})};window.addEventListener(n,r),t.push({ele:window,name:n,f:r}),n="mouseup";let i=function(t){e.dragDrop({e:t,name:"mouseup"})};window.addEventListener(n,i),t.push({ele:window,name:n,f:i}),n="touchmove";let o=function(t){e.dragMove({e:t,name:"touchmove"})};window.addEventListener(n,o),t.push({ele:window,name:n,f:o}),n="touchend";let a=function(t){e.dragDrop({e:t,name:"touchend"})};window.addEventListener(n,a),t.push({ele:window,name:n,f:a})}function r(){An(t,({ele:e,name:t,f:n})=>{e.removeEventListener(t,n)})}return{bind:n,unbind:r}}({dragMove:n=>{t.emit(e+"-dragMove",n)},dragDrop:n=>{t.emit(e+"-dragDrop",n)}});s.bind();let l=Em({attIdentify:n,containerOpacity:r,containerBackground:i,containerBorderWidth:o,containerBorderColor:a});Sm[e]={eleIds:[],evg:t,oevg:s,pv:l,isInit:!1,isActive:!0}}return Sm[e].eleIds.push(t),Sm[e].evg}function Fm(e,t){let n=xm(e,t);return n=Yi(n),n}function Dm({gid:e,attGroup:t,attIndex:n,attIdentify:r,timeDragStartDelay:i,previewOpacity:o,previewDisabledOpacity:a}){let s=null,l=null,c=null,u=null;if(Sm[e].isInit)return Sm[e].evg;Sm[e].isInit=!0;let f=Sm[e].evg;f.on(e+"-dragStart",function({e:t,ele:o,from:c}){if(!Sm[e].isActive)return;let u=Fm(o,n);if(null===u)return;s=u,l=o;let h={event:t,startInd:s,startEle:l,tarInd:s,tarEid:xm(l,r)};f.emit(e+"-change",{mode:"start",...h}),f.emit(e+"-start",h);let p=wm(t);if(!p)return;setTimeout(()=>{null!==s&&(d.createPreview(l,p.clientX,p.clientY),d.setContainerStyle({opacity:a}))},i)}),f.on(e+"-dragMove",function({e:i,name:h,from:p}){if(!Sm[e].isActive)return;let g=function(e,t,n){let r=null;return An(bm(e.target),e=>{if(xm(e,t)===n)return r=e,!1}),r}(i,t,e);if(null===s)return;let m=wm(i);if(!m)return;function y(){let t={event:i,startInd:s,startEle:l,endInd:c,endEle:u,tarInd:c,tarEid:xm(u,r)};f.emit(e+"-change",{mode:"leave",...t}),f.emit(e+"-leave",t),c=null,u=null,d.setContainerStyle({opacity:a})}if(!g)return void(null!==c&&y());let v=Fm(g,n);if(null===v)return;if(v===s)return void(null!==c&&y());if(v!==c)null!==c&&y(),function(t,n){c=t,u=n;let a={event:i,startInd:s,startEle:l,endInd:c,endEle:u,tarInd:c,tarEid:xm(u,r)};f.emit(e+"-change",{mode:"enter",...a}),f.emit(e+"-enter",a),d.setContainerStyle({opacity:o})}(v,g);else{let t=Bm(m,g),n=0;t.w>0&&(n=t.x/t.w);let a=0;t.h>0&&(a=t.y/t.h),n>=0&&n<=1&&a>=0&&a<=1&&function(t,n,a){let h={event:i,startInd:s,startEle:l,endInd:c,endEle:u,tarInd:c,tarEid:xm(u,r),...t,rx:n,ry:a};f.emit(e+"-change",{mode:"move",...h}),f.emit(e+"-move",h),d.setContainerStyle({opacity:o})}(t,n,a)}}),f.on(e+"-dragDrop",function({e:i,name:o,from:a}){if(d.removeDragPreview(),!Sm[e].isActive)return;if(null===s)return;let h=function(e,t,n){let r=null,i=wm(e);return i?(An(Im(i.clientX,i.clientY),e=>{if(xm(e,t)===n)return r=e,!1}),r):r}(i,t,e);if(!h)return s=null,l=null,c=null,void(u=null);let p=Fm(h,n);if(null===p)return;(function(t,n){c=t,u=n;let o={event:i,startInd:s,startEle:l,endInd:c,endEle:u,tarInd:c,tarEid:xm(u,r)};f.emit(e+"-change",{mode:"drop",...o}),f.emit(e+"-drop",o)})(p,h),s=null,l=null,c=null,u=null});let d=Sm[e].pv}async function Nm(e){let t=[],n=_a();return await async function e(n){let r=null;if(n.isFile&&(r=await function(e){let t=_a();try{e.file(t.resolve,t.reject)}catch(e){t.reject(e)}return t}(n)),t.push({type:n.isDirectory?"folder":n.isFile?"file":"unknow",path:n.fullPath,name:n.name,entry:n,file:r}),n.isDirectory){let t=n.createReader(),r=await function(e){let t=_a();try{e.readEntries(t.resolve,t.reject)}catch(e){t.reject(e)}return t}(t);await ic(r,async t=>{await e(t)})}}(e),n.resolve(t),n}async function Mm(e){let t=[];An(e,e=>{let n=e.webkitGetAsEntry();n&&t.push(n)});let n=await async function(e){let t=[];return await ic(e,async e=>{An(await Nm(e),e=>{t.push(e)})}),t}(t);return n}async function Tm(e){let t=[],n=[];try{t=await async function(e){let t=[];return An(e,e=>{e.type&&t.push({type:"file",name:e.name,file:e})}),t}(be(e,"files",[])),Ju()||(n=await Mm(be(e,"items",[])).catch(e=>{console.log(e)}))}catch(e){return Promise.reject(e)}return{files:t,entries:n}}function Qm(e){return document.querySelector(e)}function Lm(e){return!Mn(e)}var Rm=Math.max;var Um,Hm=(Um=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ir(n);return i<0&&(i=Rm(r+i,0)),Qn(e,pn(t),i)},function(e,t,n){var r=Object(e);if(!ht(e)){var i=pn(t);e=pt(e),t=function(e){return i(r[e],e,r)}}var o=Um(e,t,n);return o>-1?r[i?e[o]:o]:void 0});let qm=[{name:"pic",group:"image",acp:"image/*",exec:"imageviwer"},{name:"xml",group:"data",acp:"text/xml",exec:"textviwer"},{name:"htm",group:"docums",acp:"text/html",exec:"browser"},{name:"html",group:"docums",acp:"text/html",exec:"browser"},{name:"json",group:"data",acp:"application/json",exec:"textviwer"},{name:"geojson",group:"data",acp:"application/geo+json",exec:"textviwer"},{name:"txt",group:"data",acp:"text/plain",exec:"textviwer"},{name:"csv",group:"data",acp:"text/csv",exec:"excel"},{name:"dat",group:"data",acp:"application/octet-stream",exec:"binaryviwer"},{name:"7z",group:"compress",acp:"application/x-7z-compressed",exec:"compressor"},{name:"bzip",group:"compress",acp:"application/x-bzip",exec:"7z"},{name:"bzip2",group:"compress",acp:"application/x-bzip2",exec:"compressor"},{name:"bz2",group:"compress",acp:"application/x-bzip2",exec:"compressor"},{name:"ace",group:"compress",acp:"application/x-ace-compressed",exec:"compressor"},{name:"Z",group:"compress",acp:"application/x-compress",exec:"compressor"},{name:"lzh",group:"compress",acp:"application/x-lzh-compressed",exec:"compressor"},{name:"lz",group:"compress",acp:"application/x-lzip",exec:"compressor"},{name:"rar",group:"compress",acp:"application/x-rar-compressed",exec:"compressor"},{name:"tar",group:"compress",acp:"application/x-tar",exec:"compressor"},{name:"ar",group:"compress",acp:"application/x-unix-archive",exec:"compressor"},{name:"zip",group:"compress",acp:"application/zip",exec:"compressor"},{name:"gz",group:"compress",acp:"application/gzip",exec:"compressor"},{name:"avro",group:"",acp:"application/avro",exec:""},{name:"dcm",group:"",acp:"application/dicom",exec:""},{name:"eps",group:"",acp:"application/eps",exec:""},{name:"epub",group:"",acp:"application/epub+zip",exec:""},{name:"class",group:"",acp:"application/java-vm",exec:""},{name:"mxf",group:"",acp:"application/mxf",exec:""},{name:"ogx",group:"",acp:"application/ogg",exec:""},{name:"pdf",group:"docums",acp:"application/pdf",exec:"acrobat"},{name:"pgp",group:"",acp:"application/pgp-encrypted",exec:""},{name:"ps",group:"",acp:"application/postscript",exec:""},{name:"ai",group:"",acp:"application/postscript",exec:""},{name:"rtf",group:"docums",acp:"application/rtf",exec:"word"},{name:"icc",group:"",acp:"application/vnd.iccprofile",exec:""},{name:"asf",group:"",acp:"application/vnd.ms-asf",exec:"",msg:"asf的acp可能為application/vnd.ms-asf或audio/x-ms-asf或video/x-ms-asf"},{name:"cab",group:"",acp:"application/vnd.ms-cab-compressed",exec:""},{name:"eot",group:"",acp:"application/vnd.ms-fontobject",exec:""},{name:"chm",group:"",acp:"application/vnd.ms-htmlhelp",exec:""},{name:"pst",group:"",acp:"application/vnd.ms-outlook",exec:""},{name:"odp",group:"docums",acp:"application/vnd.oasis.opendocument.presentation",exec:"powerpoint"},{name:"ods",group:"docums",acp:"application/vnd.oasis.opendocument.spreadsheet",exec:"excel"},{name:"odt",group:"docums",acp:"application/vnd.oasis.opendocument.text",exec:"word"},{name:"ppt",group:"docums",acp:"application/vnd.ms-powerpoint",exec:"powerpoint"},{name:"pptx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.presentationml.presentation",exec:"powerpoint"},{name:"xls",group:"docums",acp:"application/vnd.ms-excel",exec:"excel"},{name:"xlsx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",exec:"excel"},{name:"doc",group:"docums",acp:"application/msword",exec:"word"},{name:"docx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",exec:"word"},{name:"skp",group:"",acp:"application/vnd.sketchup.skp",exec:""},{name:"pcap",group:"",acp:"application/vnd.tcpdump.pcap",exec:""},{name:"wasm",group:"",acp:"application/wasm",exec:""},{name:"arrow",group:"",acp:"application/x-apache-arrow",exec:""},{name:"dmg",group:"",acp:"application/x-apple-diskimage",exec:""},{name:"arj",group:"",acp:"application/x-arj",exec:""},{name:"asar",group:"",acp:"application/x-asar",exec:""},{name:"blend",group:"",acp:"application/x-blender",exec:"blender"},{name:"cfb",group:"",acp:"application/x-cfb",exec:""},{name:"cpio",group:"",acp:"application/x-cpio",exec:""},{name:"deb",group:"",acp:"application/x-deb",exec:""},{name:"elf",group:"",acp:"application/x-elf",exec:""},{name:"shp",group:"",acp:"application/x-esri-shape",exec:""},{name:"crx",group:"",acp:"application/x-google-chrome-extension",exec:""},{name:"indd",group:"",acp:"application/x-indesign",exec:""},{name:"macho",group:"",acp:"application/x-mach-binary",exec:""},{name:"mie",group:"",acp:"application/x-mie",exec:""},{name:"mobi",group:"",acp:"application/x-mobipocket-ebook",exec:""},{name:"exe",group:"",acp:"application/x-msdownload",exec:""},{name:"nes",group:"",acp:"application/x-nintendo-nes-rom",exec:""},{name:"parquet",group:"",acp:"application/x-parquet",exec:""},{name:"rpm",group:"",acp:"application/x-rpm",exec:""},{name:"swf",group:"",acp:"application/x-shockwave-flash",exec:""},{name:"sqlite",group:"",acp:"application/x-sqlite3",exec:""},{name:"xpi",group:"",acp:"application/x-xpinstall",exec:""},{name:"xz",group:"",acp:"application/x-xz",exec:""},{name:"alias",group:"",acp:"application/x.apple.alias",exec:""},{name:"fbx",group:"",acp:"application/x.autodesk.fbx",exec:""},{name:"lnk",group:"",acp:"application/x.ms.shortcut",exec:""},{name:"zst",group:"",acp:"application/zstd",exec:""},{name:"aac",group:"audio",acp:"audio/aac",exec:"audioplayer"},{name:"aif",group:"audio",acp:"audio/aiff",exec:"audioplayer"},{name:"amr",group:"audio",acp:"audio/amr",exec:"audioplayer"},{name:"ape",group:"audio",acp:"audio/ape",exec:"audioplayer"},{name:"mid",group:"audio",acp:"audio/midi",exec:"audioplayer"},{name:"m4b",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"f4a",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"f4b",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"mp3",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"mp2",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"mp1",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"oga",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"spx",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"ogg",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"opus",group:"audio",acp:"audio/opus",exec:"audioplayer"},{name:"qcp",group:"audio",acp:"audio/qcelp",exec:"audioplayer"},{name:"ac3",group:"audio",acp:"audio/vnd.dolby.dd-raw",exec:"audioplayer"},{name:"wav",group:"audio",acp:"audio/wav",exec:"audioplayer"},{name:"wv",group:"audio",acp:"audio/wavpack",exec:"audioplayer"},{name:"dsf",group:"audio",acp:"audio/x-dsf",exec:"audioplayer"},{name:"flac",group:"audio",acp:"audio/x-flac",exec:"audioplayer"},{name:"it",group:"audio",acp:"audio/x-it",exec:"audioplayer"},{name:"m4a",group:"audio",acp:"audio/x-m4a",exec:"audioplayer"},{name:"mpc",group:"audio",acp:"audio/x-musepack",exec:"audioplayer"},{name:"s3m",group:"audio",acp:"audio/x-s3m",exec:"audioplayer"},{name:"voc",group:"audio",acp:"audio/x-voc",exec:"audioplayer"},{name:"xm",group:"audio",acp:"audio/x-xm",exec:"audioplayer"},{name:"otf",group:"",acp:"font/otf",exec:""},{name:"ttf",group:"",acp:"font/ttf",exec:""},{name:"woff",group:"",acp:"font/woff",exec:""},{name:"woff2",group:"",acp:"font/woff2",exec:""},{name:"apng",group:"image",acp:"image/apng",exec:"imageviwer"},{name:"avif",group:"image",acp:"image/avif",exec:"imageviwer"},{name:"bmp",group:"image",acp:"image/bmp",exec:"imageviwer"},{name:"bpg",group:"image",acp:"image/bpg",exec:"imageviwer"},{name:"flif",group:"image",acp:"image/flif",exec:"imageviwer"},{name:"gif",group:"image",acp:"image/gif",exec:"imageviwer"},{name:"heic",group:"image",acp:"image/heif",exec:"imageviwer"},{name:"icns",group:"image",acp:"image/icns",exec:"imageviwer"},{name:"j2c",group:"image",acp:"image/j2c",exec:"imageviwer"},{name:"jls",group:"image",acp:"image/jls",exec:"imageviwer"},{name:"jp2",group:"image",acp:"image/jp2",exec:"imageviwer"},{name:"jpg",group:"image",acp:"image/jpeg",exec:"imageviwer"},{name:"jpm",group:"image",acp:"image/jpm",exec:"imageviwer"},{name:"jpx",group:"image",acp:"image/jpx",exec:"imageviwer"},{name:"jxl",group:"image",acp:"image/jxl",exec:"imageviwer"},{name:"ktx",group:"image",acp:"image/ktx",exec:"imageviwer"},{name:"mj2",group:"image",acp:"image/mj2",exec:"imageviwer"},{name:"png",group:"image",acp:"image/png",exec:"imageviwer"},{name:"tif",group:"image",acp:"image/tiff",exec:"imageviwer"},{name:"psd",group:"image",acp:"image/vnd.adobe.photoshop",exec:"imageviwer"},{name:"dwg",group:"image",acp:"image/vnd.dwg",exec:"imageviwer"},{name:"jxr",group:"image",acp:"image/vnd.ms-photo",exec:"imageviwer"},{name:"webp",group:"image",acp:"image/webp",exec:"imageviwer"},{name:"dng",group:"image",acp:"image/x-adobe-dng",exec:"imageviwer"},{name:"cr2",group:"image",acp:"image/x-canon-cr2",exec:"imageviwer"},{name:"cr3",group:"image",acp:"image/x-canon-cr3",exec:"imageviwer"},{name:"raf",group:"image",acp:"image/x-fujifilm-raf",exec:"imageviwer"},{name:"ico",group:"image",acp:"image/x-icon",exec:"imageviwer"},{name:"cur",group:"image",acp:"image/x-icon",exec:"imageviwer"},{name:"nef",group:"image",acp:"image/x-nikon-nef",exec:"imageviwer"},{name:"orf",group:"image",acp:"image/x-olympus-orf",exec:"imageviwer"},{name:"rw2",group:"image",acp:"image/x-panasonic-rw2",exec:"imageviwer"},{name:"arw",group:"image",acp:"image/x-sony-arw",exec:"imageviwer"},{name:"xcf",group:"image",acp:"image/x-xcf",exec:"imageviwer"},{name:"3mf",group:"",acp:"model/3mf",exec:""},{name:"glb",group:"",acp:"model/gltf-binary",exec:""},{name:"stl",group:"",acp:"model/stl",exec:""},{name:"vtp",group:"",acp:"model/vtp",exec:""},{name:"vtk",group:"",acp:"model/vtk",exec:""},{name:"vtu",group:"",acp:"model/vtu",exec:""},{name:"vti",group:"",acp:"model/vti",exec:""},{name:"vts",group:"",acp:"model/vts",exec:""},{name:"vtr",group:"",acp:"model/vtr",exec:""},{name:"ics",group:"",acp:"text/calendar",exec:""},{name:"vcf",group:"",acp:"text/vcard",exec:""},{name:"3gp",group:"video",acp:"video/3gpp",exec:"videoplayer"},{name:"3g2",group:"video",acp:"video/3gpp2",exec:"videoplayer"},{name:"m2p",group:"video",acp:"video/MP2P",exec:"videoplayer"},{name:"vob",group:"video",acp:"video/MP2P",exec:"videoplayer"},{name:"sub",group:"video",acp:"video/MP2P",exec:"videoplayer",msg:"與字幕檔衝突"},{name:"mts",group:"video",acp:"video/mp2t",exec:"videoplayer"},{name:"m4p",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"f4v",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"f4p",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"mp4",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"mpg",group:"video",acp:"video/mpeg",exec:"videoplayer",msg:"mpg可能為mpeg或video/MP1S或video/MP2S"},{name:"ogv",group:"video",acp:"video/ogg",exec:"videoplayer"},{name:"ogm",group:"video",acp:"video/ogg",exec:"videoplayer"},{name:"mov",group:"video",acp:"video/quicktime",exec:"videoplayer"},{name:"avi",group:"video",acp:"video/vnd.avi",exec:"videoplayer"},{name:"webm",group:"video",acp:"video/webm",exec:"videoplayer"},{name:"flv",group:"video",acp:"video/x-flv",exec:"videoplayer"},{name:"m4v",group:"video",acp:"video/x-m4v",exec:"videoplayer"},{name:"mkv",group:"video",acp:"video/x-matroska",exec:"videoplayer"}];function Om(e=""){let t=null;return Fe(e)?(t=Hm(qm,{name:e}),Se(t)||(t=null)):t=qm,t}function Pm(e=""){if(""!==e&&"name"!==e&&"group"!==e&&"acp"!==e&&"exec"!==e)return[];let t=Om();if(""===e)return t;let n={};return An(t,function(t){let r=t[e];Te(n,r)||(n[r]=[]),n[r].push(t)}),n}function $m(e="*"){if("*"===e)return e;if(!ke(e)&&!Tn(e))return"*";"common"===e&&(e=["docums","compress","image","data"]);let t=Pm();function n(e){return $n(wn(e,"acp"))}ke(e)&&(e=[e]);let r="";if(Tn(e)){let i=wn(e,function(e){return function(e){return n(sa(t,{group:e}))}(e)}),o=En(i,wn(e,function(e){return n(sa(t,{name:e}))}));o=sa(o,Lm),r=Ao(o,",")}return r}function zm(e,t=1e3){(t=xr(t))<=0&&(t=1e3);let n={},r=[];return An(be(e,"files",[]),function(e,i){let o=e.size/1024/1024;o>t&&(n[i]=`file size[${o}]mb > ${t}mb`),r.push(e)}),{files:r,errs:n}}function jm(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(void 0===s?a==a&&!N(a):n(a,s)))var s=a,l=o}return l}function Vm(e,t){return e<t}function Ym(e){return e&&e.length?jm(e,fn,Vm):void 0}function Wm(){return!function(){try{return"IntersectionObserver"in window}catch(e){return!1}}()||!function(){try{return"IntersectionObserverEntry"in window}catch(e){return!1}}()||!(function(){try{return"intersectionRatio"in window.IntersectionObserverEntry.prototype}catch(e){return!1}}()||Oi(window.IntersectionObserverEntry))}function Gm(e,t,n={}){if(!ku(e))return Promise.reject("invalid ele");let r=nc().markmap,{Transformer:i,Markmap:o,loadCSS:a,loadJS:s}=r,l=e=>{let t=new i,{root:n,features:r}=t.transform(e),{styles:o,scripts:a}=t.getUsedAssets(r);return{root:n,features:r,styles:o,scripts:a}},{root:c,styles:u,scripts:f}=l(t);u&&a(u),f&&s(f,{getMarkmap:()=>r}),e.innerHTML="";let d=o.create(e,null,c);return d.transMarkdown=l,d}const Jm=e=>void 0===e||"auto"===e||"instant"===e||"smooth"===e;function _m(e,t){this.scrollLeft=e,this.scrollTop=t}const Xm=(e,t,n="cannot convert to dictionary.")=>`Failed to execute '${e}' on '${t}': ${n}`,Km=(e,t,n)=>Xm(e,t,`The provided value '${n}' is not a valid enum value of type ScrollBehavior.`),Zm=(e,t,n)=>{var r;const i=`__SEAMLESS.BACKUP$${t}`;return e[i]||!e[t]||(null===(r=e[t])||void 0===r?void 0:r.__isPolyfill)||(e[i]=e[t]),e[i]||n},ey=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},ty=e=>"scrollBehavior"in window.document.documentElement.style&&!0!==(null==e?void 0:e.forcePolyfill),ny=e=>{Object.defineProperty(e,"__isPolyfill",{value:!0})},ry=(e,t)=>{ny(t),[HTMLElement.prototype,SVGElement.prototype,Element.prototype].forEach(n=>{Zm(n,e),n[e]=t})},iy=e=>e.ownerDocument.scrollingElement||e.ownerDocument.documentElement;const oy=e=>.5*(1-Math.cos(Math.PI*e));function ay(){var e;let t;return t=(null===(e=window.performance)||void 0===e?void 0:e.now)?()=>window.performance.now():()=>window.Date.now(),ay=t,t()}const sy=e=>{const t=(ay()-e.timeStamp)/(e.duration||500);if(t>1)return e.method(e.targetX,e.targetY),void e.callback();const n=(e.timingFunc||oy)(t),r=e.startX+(e.targetX-e.startX)*n,i=e.startY+(e.targetY-e.startY)*n;e.method(r,i),e.rafId=window.requestAnimationFrame(()=>{sy(e)})},ly=e=>isFinite(e)?Number(e):0,cy=(e,t,n)=>{var r,i;if(!(e=>{var t;return null!==(t=e.isConnected)&&void 0!==t?t:!(e.ownerDocument&&1&e.ownerDocument.compareDocumentPosition(e))})(e))return;const o=e.scrollLeft,a=e.scrollTop,s=ly(null!==(r=t.left)&&void 0!==r?r:o),l=ly(null!==(i=t.top)&&void 0!==i?i:a);if(s===o&&l===a)return;const c=Zm(HTMLElement.prototype,"scroll",_m),u=Zm(Object.getPrototypeOf(e),"scroll",c).bind(e);if("smooth"!==t.behavior)return void u(s,l);const f=()=>{window.removeEventListener("wheel",h),window.removeEventListener("touchmove",h)},d=Object.assign(Object.assign({},n),{timeStamp:ay(),startX:o,startY:a,targetX:s,targetY:l,rafId:0,method:u,callback:()=>{f();const t=9===e.nodeType;e.dispatchEvent(function(e){if("function"==typeof Event)return new Event("scrollend",{bubbles:e,cancelable:!1});const t=document.createEvent("Event");return t.initEvent("scrollend",e,!1),t}(t))}}),h=()=>{window.cancelAnimationFrame(d.rafId),f()};window.addEventListener("wheel",h,{passive:!0,once:!0}),window.addEventListener("touchmove",h,{passive:!0,once:!0}),sy(d)},uy=e=>(t,n,r)=>{const[i,o]=(a=t).window===a?[iy(t.document.documentElement),"Window"]:[t,"Element"];var a;const s=null!=n?n:{};if(!ey(s))throw new TypeError(Xm(e,o));if(!Jm(s.behavior))throw new TypeError(Km(e,o,s.behavior));"scrollBy"===e&&(s.left=ly(s.left)+i.scrollLeft,s.top=ly(s.top)+i.scrollTop),cy(i,s,r)},fy=uy("scroll"),dy=uy("scrollTo"),hy=uy("scrollBy"),py=fy,gy=e=>{switch(e){case"horizontal-tb":case"lr":case"lr-tb":case"rl":case"rl-tb":return 0;case"vertical-rl":case"tb":case"tb-rl":return 1;case"vertical-lr":case"tb-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4}return 0},my=(e,t,n,r)=>{let i=0;switch(t||(i^=2),e){case 0:i=i>>1|(1&i)<<1,[n,r]=[r,n];break;case 1:case 3:i^=1;break;case 4:i^=2}return[i,n,r]},yy=e=>!(1&~my(gy(e.writingMode),"rtl"!==e.direction,void 0,void 0)[0]),vy=(e,t,n,r,i,o,a)=>0!==e?e:i<t&&o>n||i>t&&o<n?null:i<=t&&a<=r||o>=n&&a>=r?2:o>n&&a<r||i<t&&a>r?3:null,Ay=e=>"visible"!==e&&"clip"!==e,by=(e,t)=>(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth)&&(Ay(t.overflowY)||Ay(t.overflowX)||e===iy(e)),wy=e=>{const t=e.parentNode,n=e.parentElement;if(null===n&&null!==t){if(11===t.nodeType)return t.host;if(9===t.nodeType)return(e=>{var t;try{return(null===(t=e.ownerDocument.defaultView)||void 0===t?void 0:t.frameElement)||null}catch(e){return null}})(e)}return n},Iy=(e,t,n)=>e<t?t:e>n?n:e,xy=(e,t,n)=>{switch(e){case 1:return(t+n)/2;case 3:return n;case 2:case 0:return t}},Cy=(e,t)=>{var n,r,i;const o=null===(n=e.ownerDocument.defaultView)||void 0===n?void 0:n.visualViewport,[a,s,l,c]=e===iy(e)?[0,0,null!==(r=null==o?void 0:o.width)&&void 0!==r?r:e.clientWidth,null!==(i=null==o?void 0:o.height)&&void 0!==i?i:e.clientHeight]:[t.left,t.top,e.clientWidth,e.clientHeight],u=a+e.clientLeft,f=s+e.clientTop;return[f,u+l,f+c,u]},By=(e,t)=>{const n=[];let r=e.ownerDocument,i=r.defaultView;if(!i)return n;const o=window.getComputedStyle(e),a="rtl"!==o.direction,s=gy(o.writingMode||o.getPropertyValue("-webkit-writing-mode")||o.getPropertyValue("-ms-writing-mode")),[l,c]=((e,t,n)=>{const[r,i,o]=my(t,n,e.block||"start",e.inline||"nearest");return[i,o].map((e,t)=>{switch(e){case"center":return 1;case"nearest":return 0;default:return"start"===e==!(r>>t&1)?2:3}})})(t,s,a);let[u,f,d,h]=((e,t,n)=>{const{top:r,right:i,bottom:o,left:a}=t,s=(l=e.ownerDocument,["scroll-margin","scroll-snap-margin"].filter(e=>e in l.documentElement.style)[0]);var l;if(!s)return[r,i,o,a];const c=e=>{const t=n.getPropertyValue(`${s}-${e}`);return parseInt(t,10)||0};return[r-c("top"),i+c("right"),o+c("bottom"),a-c("left")]})(e,e.getBoundingClientRect(),o);for(let o=wy(e);null!==o;o=wy(o)){if(r!==o.ownerDocument){if(r=o.ownerDocument,i=r.defaultView,!i)break;const{left:e,top:t}=o.getBoundingClientRect();u+=t,f+=e,d+=t,h+=e}const e=i.getComputedStyle(o);if("fixed"===e.position)break;if(!by(o,e))continue;const a=o.getBoundingClientRect(),[s,p,g,m]=Cy(o,a),y=vy(l,m,p,o.clientWidth,h,f,f-h),v=vy(c,s,g,o.clientHeight,u,d,d-u),A=null===y?0:xy(y,h,f)-xy(y,m,p),b=null===v?0:xy(v,u,d)-xy(v,s,g),w=yy(e)?Iy(A,-o.scrollWidth+o.clientWidth-o.scrollLeft,-o.scrollLeft):Iy(A,-o.scrollLeft,o.scrollWidth-o.clientWidth-o.scrollLeft),I=Iy(b,-o.scrollTop,o.scrollHeight-o.clientHeight-o.scrollTop);n.push([o,{left:o.scrollLeft+w,top:o.scrollTop+I,behavior:t.behavior}]),u=Math.max(u-I,s),f=Math.min(f-w,p),d=Math.min(d-I,g),h=Math.max(h-w,m)}return n},Ey=(e,t,n)=>{const r=t||{};if(!Jm(r.behavior))throw new TypeError(Km("scrollIntoView","Element",r.behavior));By(e,r).forEach(([e,t])=>{py(e,t,n)})},Sy=(e,t)=>n=>{if(ty(n))return;const r={scroll:fy,scrollTo:dy,scrollBy:hy}[e];t(e,function(){const e=arguments;if(1===arguments.length)return void r(this,e[0],n);r(this,{left:e[0],top:e[1]})})},ky=Sy("scroll",ry),Fy=Sy("scrollTo",ry),Dy=Sy("scrollBy",ry),Ny=(e,t)=>{ny(t),Zm(window,e),window[e]=t},My=Sy("scroll",Ny),Ty=Sy("scrollTo",Ny),Qy=Sy("scrollBy",Ny);function Ly(e){Ey(this,{block:null==e||e?"start":"end",inline:"nearest"})}const Ry=e=>{if(ty(e))return;const t=Zm(window.HTMLElement.prototype,"scrollIntoView",Ly);ry("scrollIntoView",function(){const n=arguments,r=n[0];1===n.length&&ey(r)?Ey(this,r,e):t.apply(this,n)})},Uy=e=>{ty(e)||(ky(e),Fy(e),Dy(e),Ry(e),My(e),Ty(e),Qy(e))};var Hy={exports:{}};
|
|
15
|
+
var vs,As,bs=9e15,ws=1e9,Is="0123456789abcdef",xs="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Cs="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Bs={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-bs,maxE:bs,crypto:!1},Es=!0,Ss="[DecimalError] ",ks=Ss+"Invalid argument: ",Fs=Ss+"Precision limit exceeded",Ds=Ss+"crypto unavailable",Ns="[object Decimal]",Ms=Math.floor,Ts=Math.pow,Qs=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ls=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Rs=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Us=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Hs=1e7,qs=xs.length-1,Os=Cs.length-1,Ps={toStringTag:Ns};function $s(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=Zs(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=Zs(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function zs(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ks+e)}function js(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=Ts(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==Ts(10,t-2)-1||(s==o/2||0==s)&&!(e[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==Ts(10,t-3)-1,a}function Vs(e,t,n){for(var r,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=Is.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}Ps.absoluteValue=Ps.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),Ws(e)},Ps.ceil=function(){return Ws(new this.constructor(this),this.e+1,2)},Ps.clampedTo=Ps.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(ks+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},Ps.comparedTo=Ps.cmp=function(e){var t,n,r,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,l=o.s,c=e.s;if(!a||!s)return l&&c?l!==c?l:a===s?0:!a^l<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?l:s[0]?-c:0;if(l!==c)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(t=0,n=(r=a.length)<(i=s.length)?r:i;t<n;++t)if(a[t]!==s[t])return a[t]>s[t]^l<0?1:-1;return r===i?0:r>i^l<0?1:-1},Ps.cosine=Ps.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?i=(1/cl(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=ll(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,ul(r,n)),r.precision=e,r.rounding=t,Ws(2==As||3==As?n.neg():n,e,t,!0)):new r(1):new r(NaN)},Ps.cubeRoot=Ps.cbrt=function(){var e,t,n,r,i,o,a,s,l,c,u=this,f=u.constructor;if(!u.isFinite()||u.isZero())return new f(u);for(Es=!1,(o=u.s*Ts(u.s*u,1/3))&&Math.abs(o)!=1/0?r=new f(o.toString()):(n=$s(u.d),(o=((e=u.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Ts(n,1/3),e=Ms((e+1)/3)-(e%3==(e<0?-1:2)),(r=new f(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=u.s),a=(e=f.precision)+3;;)if(c=(l=(s=r).times(s).times(s)).plus(u),r=Ys(c.plus(u).times(s),c.plus(l),a+2,1),$s(s.d).slice(0,a)===(n=$s(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(Ws(r,e+1,1),t=!r.times(r).times(r).eq(u));break}if(!i&&(Ws(s,e+1,0),s.times(s).times(s).eq(u))){r=s;break}a+=4,i=1}return Es=!0,Ws(r,e,f.rounding,t)},Ps.decimalPlaces=Ps.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-Ms(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},Ps.dividedBy=Ps.div=function(e){return Ys(this,new this.constructor(e))},Ps.dividedToIntegerBy=Ps.divToInt=function(e){var t=this.constructor;return Ws(Ys(this,new t(e),0,1,1),t.precision,t.rounding)},Ps.equals=Ps.eq=function(e){return 0===this.cmp(e)},Ps.floor=function(){return Ws(new this.constructor(this),this.e+1,3)},Ps.greaterThan=Ps.gt=function(e){return this.cmp(e)>0},Ps.greaterThanOrEqualTo=Ps.gte=function(e){var t=this.cmp(e);return 1==t||0===t},Ps.hyperbolicCosine=Ps.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/cl(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=ll(a,1,o.times(t),new a(1),!0);for(var l,c=e,u=new a(8);c--;)l=o.times(o),o=s.minus(l.times(u.minus(l.times(u))));return Ws(o,a.precision=n,a.rounding=r,!0)},Ps.hyperbolicSine=Ps.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=ll(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=ll(o,2,i=i.times(1/cl(5,e)),i,!0);for(var a,s=new o(5),l=new o(16),c=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(l.times(a).plus(c))))}return o.precision=t,o.rounding=n,Ws(i,t,n,!0)},Ps.hyperbolicTangent=Ps.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,Ys(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},Ps.inverseCosine=Ps.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return-1!==n?0===n?e.isNeg()?Xs(t,r,i):new t(0):new t(NaN):e.isZero()?Xs(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2))},Ps.inverseHyperbolicCosine=Ps.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Es=!1,n=n.times(n).minus(1).sqrt().plus(n),Es=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},Ps.inverseHyperbolicSine=Ps.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Es=!1,n=n.times(n).plus(1).sqrt().plus(n),Es=!0,r.precision=e,r.rounding=t,n.ln())},Ps.inverseHyperbolicTangent=Ps.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?Ws(new o(i),e,t,!0):(o.precision=n=r-i.e,i=Ys(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},Ps.inverseSine=Ps.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=Xs(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},Ps.inverseTangent=Ps.atan=function(){var e,t,n,r,i,o,a,s,l,c=this,u=c.constructor,f=u.precision,d=u.rounding;if(c.isFinite()){if(c.isZero())return new u(c);if(c.abs().eq(1)&&f+4<=Os)return(a=Xs(u,f+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new u(NaN);if(f+4<=Os)return(a=Xs(u,f+4,d).times(.5)).s=c.s,a}for(u.precision=s=f+10,u.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Es=!1,t=Math.ceil(s/7),r=1,l=c.times(c),a=new u(c),i=c;-1!==e;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),Es=!0,Ws(a,u.precision=f,u.rounding=d,!0)},Ps.isFinite=function(){return!!this.d},Ps.isInteger=Ps.isInt=function(){return!!this.d&&Ms(this.e/7)>this.d.length-2},Ps.isNaN=function(){return!this.s},Ps.isNegative=Ps.isNeg=function(){return this.s<0},Ps.isPositive=Ps.isPos=function(){return this.s>0},Ps.isZero=function(){return!!this.d&&0===this.d[0]},Ps.lessThan=Ps.lt=function(e){return this.cmp(e)<0},Ps.lessThanOrEqualTo=Ps.lte=function(e){return this.cmp(e)<1},Ps.logarithm=Ps.log=function(e){var t,n,r,i,o,a,s,l,c=this,u=c.constructor,f=u.precision,d=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new u(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Es=!1,a=il(c,s=f+5),r=t?_s(u,s+10):il(e,s),js((l=Ys(a,r,s,1)).d,i=f,d))do{if(a=il(c,s+=10),r=t?_s(u,s+10):il(e,s),l=Ys(a,r,s,1),!o){+$s(l.d).slice(i+1,i+15)+1==1e14&&(l=Ws(l,f+1,0));break}}while(js(l.d,i+=10,d));return Es=!0,Ws(l,f,d)},Ps.minus=Ps.sub=function(e){var t,n,r,i,o,a,s,l,c,u,f,d,h=this,p=h.constructor;if(e=new p(e),!h.d||!e.d)return h.s&&e.s?h.d?e.s=-e.s:e=new p(e.d||h.s!==e.s?h:NaN):e=new p(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.plus(e);if(c=h.d,d=e.d,s=p.precision,l=p.rounding,!c[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!c[0])return new p(3===l?-0:0);e=new p(h)}return Es?Ws(e,s,l):e}if(n=Ms(e.e/7),u=Ms(h.e/7),c=c.slice(),o=u-n){for((f=o<0)?(t=c,o=-o,a=d.length):(t=d,n=u,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((f=(r=c.length)<(a=d.length))&&(a=r),r=0;r<a;r++)if(c[r]!=d[r]){f=c[r]<d[r];break}o=0}for(f&&(t=c,c=d,d=t,e.s=-e.s),a=c.length,r=d.length-a;r>0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r]<d[r]){for(i=r;i&&0===c[--i];)c[i]=Hs-1;--c[i],c[r]+=Hs}c[r]-=d[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(e.d=c,e.e=Js(c,n),Es?Ws(e,s,l):e):new p(3===l?-0:0)},Ps.modulo=Ps.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?Ws(new r(n),r.precision,r.rounding):(Es=!1,9==r.modulo?(t=Ys(n,e.abs(),0,3,1)).s*=e.s:t=Ys(n,e,0,r.modulo,1),t=t.times(e),Es=!0,n.minus(t))},Ps.naturalExponential=Ps.exp=function(){return rl(this)},Ps.naturalLogarithm=Ps.ln=function(){return il(this)},Ps.negated=Ps.neg=function(){var e=new this.constructor(this);return e.s=-e.s,Ws(e)},Ps.plus=Ps.add=function(e){var t,n,r,i,o,a,s,l,c,u,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new d(e.d||f.s===e.s?f:NaN)):e=new d(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(c=f.d,u=e.d,s=d.precision,l=d.rounding,!c[0]||!u[0])return u[0]||(e=new d(f)),Es?Ws(e,s,l):e;if(o=Ms(f.e/7),r=Ms(e.e/7),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,a=u.length):(n=u,r=o,a=c.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=u.length)<0&&(i=a,n=u,u=c,c=n),t=0;i;)t=(c[--i]=c[i]+u[i]+t)/Hs|0,c[i]%=Hs;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=Js(c,r),Es?Ws(e,s,l):e},Ps.precision=Ps.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(ks+e);return n.d?(t=Ks(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},Ps.round=function(){var e=this,t=e.constructor;return Ws(new t(e),e.e+1,t.rounding)},Ps.sine=Ps.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:ll(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/cl(5,n)),t=ll(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,ul(r,n)),r.precision=e,r.rounding=t,Ws(As>2?n.neg():n,e,t,!0)):new r(NaN)},Ps.squareRoot=Ps.sqrt=function(){var e,t,n,r,i,o,a=this,s=a.d,l=a.e,c=a.s,u=a.constructor;if(1!==c||!s||!s[0])return new u(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(Es=!1,0==(c=Math.sqrt(+a))||c==1/0?(((t=$s(s)).length+l)%2==0&&(t+="0"),c=Math.sqrt(t),l=Ms((l+1)/2)-(l<0||l%2),r=new u(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new u(c.toString()),n=(l=u.precision)+3;;)if(r=(o=r).plus(Ys(a,o,n+2,1)).times(.5),$s(o.d).slice(0,n)===(t=$s(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Ws(r,l+1,1),e=!r.times(r).eq(a));break}if(!i&&(Ws(o,l+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Es=!0,Ws(r,l,u.rounding,e)},Ps.tangent=Ps.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=Ys(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,Ws(2==As||4==As?n.neg():n,e,t,!0)):new r(NaN)},Ps.times=Ps.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,f=u.constructor,d=u.d,h=(e=new f(e)).d;if(e.s*=u.s,!(d&&d[0]&&h&&h[0]))return new f(!e.s||d&&!d[0]&&!h||h&&!h[0]&&!d?NaN:d&&h?0*e.s:e.s/0);for(n=Ms(u.e/7)+Ms(e.e/7),(l=d.length)<(c=h.length)&&(o=d,d=h,h=o,a=l,l=c,c=a),o=[],r=a=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+h[r]*d[i-r-1]+t,o[i--]=s%Hs|0,t=s/Hs|0;o[i]=(o[i]+t)%Hs|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=Js(o,n),Es?Ws(e,f.precision,f.rounding):e},Ps.toBinary=function(e,t){return fl(this,2,e,t)},Ps.toDecimalPlaces=Ps.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(zs(e,0,ws),void 0===t?t=r.rounding:zs(t,0,8),Ws(n,e+n.e+1,t))},Ps.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=Gs(r,!0):(zs(e,0,ws),void 0===t?t=i.rounding:zs(t,0,8),n=Gs(r=Ws(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},Ps.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=Gs(i):(zs(e,0,ws),void 0===t?t=o.rounding:zs(t,0,8),n=Gs(r=Ws(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},Ps.toFraction=function(e){var t,n,r,i,o,a,s,l,c,u,f,d,h=this,p=h.d,g=h.constructor;if(!p)return new g(h);if(c=n=new g(1),r=l=new g(0),a=(o=(t=new g(r)).e=Ks(p)-h.e-1)%7,t.d[0]=Ts(10,a<0?7+a:a),null==e)e=o>0?t:c;else{if(!(s=new g(e)).isInt()||s.lt(c))throw Error(ks+s);e=s.gt(t)?o>0?t:c:s}for(Es=!1,s=new g($s(p)),u=g.precision,g.precision=o=7*p.length*2;f=Ys(s,t,0,1,1),1!=(i=n.plus(f.times(r))).cmp(e);)n=r,r=i,i=c,c=l.plus(f.times(i)),l=i,i=t,t=s.minus(f.times(i)),s=i;return i=Ys(e.minus(n),r,0,1,1),l=l.plus(i.times(c)),n=n.plus(i.times(r)),l.s=c.s=h.s,d=Ys(c,r,o,1).minus(h).abs().cmp(Ys(l,n,o,1).minus(h).abs())<1?[c,r]:[l,n],g.precision=u,Es=!0,d},Ps.toHexadecimal=Ps.toHex=function(e,t){return fl(this,16,e,t)},Ps.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:zs(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(Es=!1,n=Ys(n,e,0,t,1).times(e),Es=!0,Ws(n)):(e.s=n.s,n=e),n},Ps.toNumber=function(){return+this},Ps.toOctal=function(e,t){return fl(this,8,e,t)},Ps.toPower=Ps.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=+(e=new l(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new l(Ts(+s,c));if((s=new l(s)).eq(1))return s;if(r=l.precision,o=l.rounding,e.eq(1))return Ws(s,r,o);if((t=Ms(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=el(l,s,n,r),e.s<0?new l(1).div(i):Ws(i,r,o);if((a=s.s)<0){if(t<e.d.length-1)return new l(NaN);if(1&e.d[t]||(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(n=Ts(+s,c))&&isFinite(n)?new l(n+"").e:Ms(c*(Math.log("0."+$s(s.d))/Math.LN10+s.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(Es=!1,l.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=rl(e.times(il(s,r+n)),r)).d&&js((i=Ws(i,r+5,1)).d,r,o)&&(t=r+10,+$s((i=Ws(rl(e.times(il(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=Ws(i,r+1,0))),i.s=a,Es=!0,l.rounding=o,Ws(i,r,o))},Ps.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=Gs(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(zs(e,1,ws),void 0===t?t=i.rounding:zs(t,0,8),n=Gs(r=Ws(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},Ps.toSignificantDigits=Ps.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(zs(e,1,ws),void 0===t?t=n.rounding:zs(t,0,8)),Ws(new n(this),e,t)},Ps.toString=function(){var e=this,t=e.constructor,n=Gs(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},Ps.truncated=Ps.trunc=function(){return Ws(new this.constructor(this),this.e+1,1)},Ps.valueOf=Ps.toJSON=function(){var e=this,t=e.constructor,n=Gs(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var Ys=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a,s,l){var c,u,f,d,h,p,g,m,y,v,A,b,w,I,x,C,B,E,S,k,F=r.constructor,D=r.s==i.s?1:-1,N=r.d,M=i.d;if(!(N&&N[0]&&M&&M[0]))return new F(r.s&&i.s&&(N?!M||N[0]!=M[0]:M)?N&&0==N[0]||!M?0*D:D/0:NaN);for(l?(h=1,u=r.e-i.e):(l=Hs,h=7,u=Ms(r.e/h)-Ms(i.e/h)),S=M.length,B=N.length,v=(y=new F(D)).d=[],f=0;M[f]==(N[f]||0);f++);if(M[f]>(N[f]||0)&&u--,null==o?(I=o=F.precision,a=F.rounding):I=s?o+(r.e-i.e)+1:o,I<0)v.push(1),p=!0;else{if(I=I/h+2|0,f=0,1==S){for(d=0,M=M[0],I++;(f<B||d)&&I--;f++)x=d*l+(N[f]||0),v[f]=x/M|0,d=x%M|0;p=d||f<B}else{for((d=l/(M[0]+1)|0)>1&&(M=e(M,d,l),N=e(N,d,l),S=M.length,B=N.length),C=S,b=(A=N.slice(0,S)).length;b<S;)A[b++]=0;(k=M.slice()).unshift(0),E=M[0],M[1]>=l/2&&++E;do{d=0,(c=t(M,A,S,b))<0?(w=A[0],S!=b&&(w=w*l+(A[1]||0)),(d=w/E|0)>1?(d>=l&&(d=l-1),1==(c=t(g=e(M,d,l),A,m=g.length,b=A.length))&&(d--,n(g,S<m?k:M,m,l))):(0==d&&(c=d=1),g=M.slice()),(m=g.length)<b&&g.unshift(0),n(A,g,b,l),-1==c&&(c=t(M,A,S,b=A.length))<1&&(d++,n(A,S<b?k:M,b,l)),b=A.length):0===c&&(d++,A=[0]),v[f++]=d,c&&A[0]?A[b++]=N[C]||0:(A=[N[C]],b=1)}while((C++<B||void 0!==A[0])&&I--);p=void 0!==A[0]}v[0]||v.shift()}if(1==h)y.e=u,vs=p;else{for(f=1,d=v[0];d>=10;d/=10)f++;y.e=f+u*h-1,Ws(y,s?o+y.e+1:o,a,p)}return y}}();function Ws(e,t,n,r){var i,o,a,s,l,c,u,f,d,h=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,s=f[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,l=(u=f[d=0])/Ts(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=f.length)){if(!r)break e;for(;s++<=d;)f.push(0);u=l=0,i=1,a=(o%=7)-7+1}else{for(u=s=f[d],i=1;s>=10;s/=10)i++;l=(a=(o%=7)-7+i)<0?0:u/Ts(10,i-a-1)%10|0}if(r=r||t<0||void 0!==f[d+1]||(a<0?u:u%Ts(10,i-a-1)),c=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?u/Ts(10,i-a):0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=Ts(10,(7-t%7)%7),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=d,s=1,d--):(f.length=d+1,s=Ts(10,7-o),f[d]=a>0?(u/Ts(10,i-a)%Ts(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,f[0]==Hs&&(f[0]=1));break}if(f[d]+=s,f[d]!=Hs)break;f[d--]=0,s=1}for(o=f.length;0===f[--o];)f.pop()}return Es&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e<h.minE&&(e.e=0,e.d=[0])),e}function Gs(e,t,n){if(!e.isFinite())return ol(e);var r,i=e.e,o=$s(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Zs(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Zs(-i-1)+o,n&&(r=n-a)>0&&(o+=Zs(r))):i>=a?(o+=Zs(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Zs(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Zs(r))),o}function Js(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function _s(e,t,n){if(t>qs)throw Es=!0,n&&(e.precision=n),Error(Fs);return Ws(new e(xs),t,1,!0)}function Xs(e,t,n){if(t>Os)throw Error(Fs);return Ws(new e(Cs),t,n,!0)}function Ks(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function Zs(e){for(var t="";e--;)t+="0";return t}function el(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(Es=!1;;){if(n%2&&dl((o=o.times(t)).d,a)&&(i=!0),0===(n=Ms(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}dl((t=t.times(t)).d,a)}return Es=!0,o}function tl(e){return 1&e.d[e.d.length-1]}function nl(e,t,n){for(var r,i,o=new e(t[0]),a=0;++a<t.length;){if(!(i=new e(t[a])).s){o=i;break}((r=o.cmp(i))===n||0===r&&o.s===n)&&(o=i)}return o}function rl(e,t){var n,r,i,o,a,s,l,c=0,u=0,f=0,d=e.constructor,h=d.rounding,p=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(Es=!1,l=p):l=t,s=new d(.03125);e.e>-2;)e=e.times(s),f+=5;for(l+=r=Math.log(Ts(2,f))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=l;;){if(o=Ws(o.times(e),l,1),n=n.times(++u),$s((s=a.plus(Ys(o,n,l,1))).d).slice(0,l)===$s(a.d).slice(0,l)){for(i=f;i--;)a=Ws(a.times(a),l,1);if(null!=t)return d.precision=p,a;if(!(c<3&&js(a.d,l-r,h,c)))return Ws(a,d.precision=p,h,Es=!0);d.precision=l+=10,n=o=s=new d(1),u=0,c++}a=s}}function il(e,t){var n,r,i,o,a,s,l,c,u,f,d,h=1,p=e,g=p.d,m=p.constructor,y=m.rounding,v=m.precision;if(p.s<0||!g||!g[0]||!p.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=p.s?NaN:g?0:p);if(null==t?(Es=!1,u=v):u=t,m.precision=u+=10,r=(n=$s(g)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=_s(m,u+2,v).times(o+""),p=il(new m(r+"."+n.slice(1)),u-10).plus(c),m.precision=v,null==t?Ws(p,v,y,Es=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=$s((p=p.times(e)).d)).charAt(0),h++;for(o=p.e,r>1?(p=new m("0."+n),o++):p=new m(r+"."+n.slice(1)),f=p,l=a=p=Ys(p.minus(1),p.plus(1),u,1),d=Ws(p.times(p),u,1),i=3;;){if(a=Ws(a.times(d),u,1),$s((c=l.plus(Ys(a,new m(i),u,1))).d).slice(0,u)===$s(l.d).slice(0,u)){if(l=l.times(2),0!==o&&(l=l.plus(_s(m,u+2,v).times(o+""))),l=Ys(l,new m(h),u,1),null!=t)return m.precision=v,l;if(!js(l.d,u-10,y,s))return Ws(l,m.precision=v,y,Es=!0);m.precision=u+=10,c=a=p=Ys(f.minus(1),f.plus(1),u,1),d=Ws(p.times(p),u,1),i=s=1}l=c,i+=2}}function ol(e){return String(e.s*e.s/0)}function al(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),Es&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function sl(e,t){var n,r,i,o,a,s,l,c,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Us.test(t))return al(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ls.test(t))n=16,t=t.toLowerCase();else if(Qs.test(t))n=2;else{if(!Rs.test(t))throw Error(ks+t);n=8}for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=el(r,new r(n),o,2*o)),o=u=(c=Vs(t,n,Hs)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=Js(c,u),e.d=c,Es=!1,a&&(e=Ys(e,i,4*s)),l&&(e=e.times(Math.abs(l)<54?Ts(2,l):Zl.pow(2,l))),Es=!0,e)}function ll(e,t,n,r,i){var o,a,s,l,c=e.precision,u=Math.ceil(c/7);for(Es=!1,l=n.times(n),s=new e(r);;){if(a=Ys(s.times(l),new e(t++*t++),c,1),s=i?r.plus(a):r.minus(a),r=Ys(a.times(l),new e(t++*t++),c,1),void 0!==(a=s.plus(r)).d[u]){for(o=u;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return Es=!0,a.d.length=u+1,a}function cl(e,t){for(var n=e;--t;)n*=e;return n}function ul(e,t){var n,r=t.s<0,i=Xs(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return As=r?4:1,t;if((n=t.divToInt(i)).isZero())As=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return As=tl(n)?r?2:3:r?4:1,t;As=tl(n)?r?1:4:r?3:2}return t.minus(i).abs()}function fl(e,t,n,r){var i,o,a,s,l,c,u,f,d,h=e.constructor,p=void 0!==n;if(p?(zs(n,1,ws),void 0===r?r=h.rounding:zs(r,0,8)):(n=h.precision,r=h.rounding),e.isFinite()){for(p?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(a=(u=Gs(e)).indexOf("."))>=0&&(u=u.replace(".",""),(d=new h(1)).e=u.length-a,d.d=Vs(Gs(d),10,i),d.e=d.d.length),o=l=(f=Vs(u,10,i)).length;0==f[--l];)f.pop();if(f[0]){if(a<0?o--:((e=new h(e)).d=f,e.e=o,f=(e=Ys(e,d,n,r,0,i)).d,o=e.e,c=vs),a=f[n],s=i/2,c=c||void 0!==f[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(e.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&f[n-1]||r===(e.s<0?8:7)),f.length=n,c)for(;++f[--n]>i-1;)f[n]=0,n||(++o,f.unshift(1));for(l=f.length;!f[l-1];--l);for(a=0,u="";a<l;a++)u+=Is.charAt(f[a]);if(p){if(l>1)if(16==t||8==t){for(a=16==t?4:3,--l;l%a;l++)u+="0";for(l=(f=Vs(u,i,t)).length;!f[l-1];--l);for(a=1,u="1.";a<l;a++)u+=Is.charAt(f[a])}else u=u.charAt(0)+"."+u.slice(1);u=u+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)u="0"+u;u="0."+u}else if(++o>l)for(o-=l;o--;)u+="0";else o<l&&(u=u.slice(0,o)+"."+u.slice(o))}else u=p?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=ol(e);return e.s<0?"-"+u:u}function dl(e,t){if(e.length>t)return e.length=t,!0}function hl(e){return new this(e).abs()}function pl(e){return new this(e).acos()}function gl(e){return new this(e).acosh()}function ml(e,t){return new this(e).plus(t)}function yl(e){return new this(e).asin()}function vl(e){return new this(e).asinh()}function Al(e){return new this(e).atan()}function bl(e){return new this(e).atanh()}function wl(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?Xs(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=Xs(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(Ys(e,t,o,1)),t=Xs(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(Ys(e,t,o,1)):(n=Xs(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function Il(e){return new this(e).cbrt()}function xl(e){return Ws(e=new this(e),e.e+1,2)}function Cl(e,t,n){return new this(e).clamp(t,n)}function Bl(e){if(!e||"object"!=typeof e)throw Error(Ss+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,ws,"rounding",0,8,"toExpNeg",-bs,0,"toExpPos",0,bs,"maxE",0,bs,"minE",-bs,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=Bs[n]),void 0!==(r=e[n])){if(!(Ms(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(ks+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=Bs[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(ks+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Ds);this[n]=!0}else this[n]=!1}return this}function El(e){return new this(e).cos()}function Sl(e){return new this(e).cosh()}function kl(e,t){return new this(e).div(t)}function Fl(e){return new this(e).exp()}function Dl(e){return Ws(e=new this(e),e.e+1,3)}function Nl(){var e,t,n=new this(0);for(Es=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return Es=!0,new this(1/0);n=t}return Es=!0,n.sqrt()}function Ml(e){return e instanceof Zl||e&&e.toStringTag===Ns||!1}function Tl(e){return new this(e).ln()}function Ql(e,t){return new this(e).log(t)}function Ll(e){return new this(e).log(2)}function Rl(e){return new this(e).log(10)}function Ul(){return nl(this,arguments,-1)}function Hl(){return nl(this,arguments,1)}function ql(e,t){return new this(e).mod(t)}function Ol(e,t){return new this(e).mul(t)}function Pl(e,t){return new this(e).pow(t)}function $l(e){var t,n,r,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:zs(e,1,ws),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(Ds);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(e%=7,(r=s[--o])&&e&&(i=Ts(10,7-e),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function zl(e){return Ws(e=new this(e),e.e+1,this.rounding)}function jl(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Vl(e){return new this(e).sin()}function Yl(e){return new this(e).sinh()}function Wl(e){return new this(e).sqrt()}function Gl(e,t){return new this(e).sub(t)}function Jl(){var e=0,t=arguments,n=new this(t[e]);for(Es=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return Es=!0,Ws(n,this.precision,this.rounding)}function _l(e){return new this(e).tan()}function Xl(e){return new this(e).tanh()}function Kl(e){return Ws(e=new this(e),e.e+1,1)}Ps[Symbol.for("nodejs.util.inspect.custom")]=Ps.toString,Ps[Symbol.toStringTag]="Decimal";var Zl=Ps.constructor=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,Ml(e))return i.s=e.s,void(Es?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(Es?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):al(i,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),Us.test(e)?al(i,e):sl(i,e);if("bigint"===r)return e<0?(e=-e,i.s=-1):i.s=1,al(i,e.toString());throw Error(ks+e)}if(o.prototype=Ps,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=Bl,o.clone=e,o.isDecimal=Ml,o.abs=hl,o.acos=pl,o.acosh=gl,o.add=ml,o.asin=yl,o.asinh=vl,o.atan=Al,o.atanh=bl,o.atan2=wl,o.cbrt=Il,o.ceil=xl,o.clamp=Cl,o.cos=El,o.cosh=Sl,o.div=kl,o.exp=Fl,o.floor=Dl,o.hypot=Nl,o.ln=Tl,o.log=Ql,o.log10=Rl,o.log2=Ll,o.max=Ul,o.min=Hl,o.mod=ql,o.mul=Ol,o.pow=Pl,o.random=$l,o.round=zl,o.sign=jl,o.sin=Vl,o.sinh=Yl,o.sqrt=Wl,o.sub=Gl,o.sum=Jl,o.tan=_l,o.tanh=Xl,o.trunc=Kl,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(Bs);function ec(e,t=0){if(mo(t)||(t=0),t=Yi(t),!Me(e))return"";return new Zl(e).toDecimalPlaces(t,Zl.ROUND_CEIL).toNumber()}function tc(e,t=0){if(!Me(e))return"";if(!mo(t))return"";return e=xr(e),Vi(e,t).toFixed(t)}function nc(){return"undefined"!=typeof self?self:Ka()?window:"undefined"!=typeof global?global:null}function rc(e){let t=function(){let e=nc();return n||e.xss}();let r=function e(n){return Be(n)||Ee(n)?(An(n,function(t,r){n[r]=e(t)}),n):Fe(n)?t(n,{onIgnoreTagAttr:function(e,n,r,i){if("style"===n)return n+'="'+t.escapeAttrValue(r)+'"'}}):n}(Li(e));return r}function ic(e,t){let n=_a();if(!Be(e)&&!Ee(e))return n.reject("rs is not an array or object"),n;let r=!1;if(Ee(e)){r=!0;let t=[];An(e,(e,n)=>{t.push({k:n,v:e})}),e=t}Oi(t)||(t=function(e){return e});let i=-1,o=[];return e.reduce(function(e,n){return e.then(function(e){o.push(e),i+=1;let a=i,s=n;return r&&(a=n.k,s=n.v),Oi(t)?t(s,a):s})},Promise.resolve()).then(function(e){o.push(e),o=Qa(o),n.resolve(o)}).catch(function(e){n.reject(e)}),n}xs=new Zl(xs),Cs=new Zl(Cs);let oc={},ac={};function sc({tagName:e,path:t,attributes:n={},func:r}){let i=_a();if("done"===oc[t])return i.resolve("loaded"),i;if("loading"===oc[t])return ms(()=>"done"===oc[t]).then(function(){i.resolve("loaded")}),i;oc[t]="loading";let o=document.createElement(e);return An(n,(e,t)=>{o.setAttribute(t,e)}),n.rel&&"stylesheet"===n.rel?(o.setAttribute("href",t),setTimeout(()=>{i.resolve(o),oc[t]="done"},1)):(o.src=t,o.addEventListener("load",()=>{let e;Oi(r)?e=ms(r):(e=_a(),e.resolve()),e.then(()=>ps(500)).then(function(){i.resolve(o),oc[t]="done"})}),o.addEventListener("error",()=>{i.reject(o),oc[t]="done"})),document.getElementsByTagName("head")[0].appendChild(o),i}function lc(e){let t=_a();Be(e)||(e=[e]),An(e,(t,n)=>{ke(t)&&(e[n]={path:t})});let n=Ao(wn(e,"path"),"|");return"done"===ac[n]?(t.resolve("loaded"),t):"loading"===ac[n]?(ms(()=>"done"===ac[n]).then(function(){t.resolve("loaded")}),t):(ac[n]="loading",An(e,(e,t)=>{e.type||(".js"===ia(e.path,3)?e.type="js":".css"===ia(e.path,4)?e.type="css":e.type="unknow")}),ic(e,e=>{let t=_a();if("js"===e.type)t=sc({tagName:"script",path:e.path,attributes:{type:"text/javascript"},func:e.func});else if("css"===e.type)t=sc({tagName:"link",path:e.path,attributes:{rel:"stylesheet"}});else{let n="invalid pathItem.type: "+e.type;console.log(n),t.reject(n)}return t}).finally(()=>{ac[n]="done"}))}function cc(e){return me(e).toUpperCase()}function uc(e,t,n){if(!Fe(e))return"";if(!Fe(t))return"";if(!ke(n))return"";return String(e).replaceAll(t,n)}function fc(e,t,n=1){return Fe(e)&&mo(t)?(n=Wi(n)?Yi(n):1,e.substring(t,t+n)):""}let dc={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function hc(e){return gc(e,1)}function pc(e){return gc(e,360)}function gc(e,t=1){if(e.indexOf("%")>=0){if(!Me(e=uc(e,"%","")))throw new Error("invalid color: value is not a number");e=xr(e)/100}else{if(!Me(e))throw new Error("invalid color: value is not a number");e=xr(e)/t}if(e>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function mc(e){if(!Me(e))throw new Error("invalid color: value is not a number");if((e=xr(e))>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function yc(e,t="rgba"){if(!Be(e))throw new Error("invalid colors array");let n=be(e,0,0),r=be(e,1,0),i=be(e,2,0),o=be(e,3,1);if(4!==ar(t=t.split("")))throw new Error("tar.length !== 4");let a=be(t,0),s=be(t,1),l=be(t,2),c=be(t,3);return{[a]:n,[s]:r,[l]:i,[c]:o}}function vc(e){let t=(e=oa(e,1)).length;if(2===t)e=`${e}${e}${e}ff`;else if(3===t){let t=fc(e,0,1),n=fc(e,1,1),r=fc(e,2,1);e=`${t}${t}${n}${n}${r}${r}ff`}else if(6===t)e=`${e}ff`;else if(8!==t)throw new Error("invalid hex color");function n(e){if(2!==e.length)throw new Error("hex.length of color is not equal to 2");if(!Me(e=parseInt(e,16)))throw new Error("invalid hex of color");return(e=xr(e))/255}return{r:n(fc(e,0,2)),g:n(fc(e,2,2)),b:n(fc(e,4,2)),a:n(fc(e,6,2))}}function Ac(e){return e=yc(e=wn(e,(e,t)=>t<=2?gc(e,255):3===t?mc(e):null),"rgba")}function bc(e){return e=kc(e=yc(e=wn(e,(e,t)=>0===t?pc(e):1===t||2===t?hc(e):3===t?mc(e):null),"hsla"))}function wc(e){return e=Fc(e=yc(e=wn(e,(e,t)=>0===t?pc(e):1===t||2===t?hc(e):3===t?mc(e):null),"hsva"))}function Ic(e){if("transparent"===e)return{r:0,g:0,b:0,a:0};if(function(e){return Te(dc,e)}(e))return vc(e=function(e){return`#${dc[e]}`}(e));if(function(e){return"#"===ra(e,1)&&(!!/[0-9A-Fa-f]{2}/g.test(e)||(!!/[0-9A-Fa-f]{3}/g.test(e)||(!!/[0-9A-Fa-f]{6}/g.test(e)||!!/[0-9A-Fa-f]{8}/g.test(e))))}(e))return vc(e);if(function(e){return"rgb"===ra(e,3)||"rgba"===ra(e,4)}(e))return function(e){return e=uc(e,"rgba",""),e=uc(e,"rgb",""),Ac(na(e=uc(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsl"===ra(e,3)||"hsla"===ra(e,4)}(e))return function(e){return e=uc(e,"hsla",""),e=uc(e,"hsl",""),bc(na(e=uc(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsv"===ra(e,3)||"hsva"===ra(e,4)}(e))return function(e){return e=uc(e,"hsva",""),e=uc(e,"hsv",""),wc(na(e=uc(e=e.replace(/[()]/g,""),","," ")," "))}(e);throw new Error("format of color string is not hex-color, name-color, rgba, hsla, hsva")}function xc(e,t){return!!Te(e,t=ys(t))||!!Te(e,t=cc(t))}function Cc(e,t,n){let r;return r=be(e,t,null),null!==r?r:(r=be(e,t=cc(t),null),null!==r?r:n)}function Bc(e){if(function(e){let t=xc(e,"r"),n=xc(e,"g"),r=xc(e,"b");return t&&n&&r}(e))return function(e){let t=[Cc(e,"r",null),Cc(e,"g",null),Cc(e,"b",null),Cc(e,"a",1)];return t=wn(t,Ta),Ac(t)}(e);if(function(e){let t=xc(e,"h"),n=xc(e,"s"),r=xc(e,"l");return t&&n&&r}(e))return function(e){let t=[Cc(e,"h",null),Cc(e,"s",null),Cc(e,"l",null),Cc(e,"a",1)];return t=wn(t,Ta),bc(t)}(e);if(function(e){let t=xc(e,"h"),n=xc(e,"s"),r=xc(e,"v");return t&&n&&r}(e))return function(e){let t=[Cc(e,"h",null),Cc(e,"s",null),Cc(e,"v",null),Cc(e,"a",1)];return t=wn(t,Ta),wc(t)}(e);throw new Error("color object is not one of rgba, hsla, hsva")}function Ec(e){let t,n,r=e.r,i=e.g,o=e.b,a=Math.max(r,i,o),s=Math.min(r,i,o),l=(a+s)/2;if(a===s)t=n=0;else{let e=a-s;switch(n=l>.5?e/(2-a-s):e/(a+s),a){case r:t=(i-o)/e+(i<o?6:0);break;case i:t=(o-r)/e+2;break;case o:t=(r-i)/e+4}t/=6}return{h:t,s:n,l:l,a:e.a}}function Sc(e){let t,n,r=e.r,i=e.g,o=e.b,a=Math.max(r,i,o),s=Math.min(r,i,o),l=a,c=a-s;if(n=0===a?0:c/a,a===s)t=0;else{switch(a){case r:t=(i-o)/c+(i<o?6:0);break;case i:t=(o-r)/c+2;break;case o:t=(r-i)/c+4}t/=6}return{h:t,s:n,v:l,a:e.a}}function kc(e){let t,n,r,i=e.h,o=e.s,a=e.l;function s(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(0===o)t=n=r=a;else{let e=a<.5?a*(1+o):a+o-a*o,l=2*a-e;t=s(l,e,i+1/3),n=s(l,e,i),r=s(l,e,i-1/3)}return{r:t,g:n,b:r,a:e.a}}function Fc(e){let t,n,r,i=e.h,o=e.s,a=e.v,s=Math.floor(6*i),l=6*i-s,c=a*(1-o),u=a*(1-l*o),f=a*(1-(1-l)*o);switch(s%6){case 0:t=a,n=f,r=c;break;case 1:t=u,n=a,r=c;break;case 2:t=c,n=a,r=f;break;case 3:t=c,n=u,r=a;break;case 4:t=f,n=c,r=a;break;case 5:t=a,n=c,r=u}return{r:t,g:n,b:r,a:e.a}}function Dc(e){let t=Math.round(255*e).toString(16);if(1===t.length)return`0${t}`;if(2===t.length)return t;throw new Error("invalid value")}function Nc(e,t=!0){let n=e.r,r=e.g,i=e.b,o=e.a,a=`${Dc(n)}${Dc(r)}${Dc(i)}`;return t&&(a=`${a}${Dc(o)}`),a}function Mc(e){return Math.min(1,Math.max(0,e))}function Tc(e,t){if(!Fe(t))throw new Error("fmtOutput is not a string");if(!hu[t])throw console.log(`fmtOutput must be [${pt(hu)}]`),new Error("invalid fmtOutput");return e=hu[t](e)}function Qc(e,t,n="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let r=Ec(e);return r.h+=t,r.h=r.h%1,Tc(kc(r),n)}function Lc(e,t,n,r,i="toRgbString"){if(t<0||t>1)throw new Error("w1 < 0 or > 1");if(r<0||r>1)throw new Error("w1 < 0 or > 1");return Tc({r:e.r*t+n.r*r,g:e.g*t+n.g*r,b:e.b*t+n.b*r,a:e.a*t+n.a*r},i)}function Rc(e){return`${Vi(100*e,1)}%`}function Uc(e){return Vi(e,0)}function Hc(e){return Vi(e,3)}function qc(e){return{r:Uc(255*e.r),g:Uc(255*e.g),b:Uc(255*e.b)}}function Oc(e){return`rgb(${Uc(255*e.r)}, ${Uc(255*e.g)}, ${Uc(255*e.b)})`}function Pc(e){return{r:Uc(255*e.r),g:Uc(255*e.g),b:Uc(255*e.b),a:Hc(e.a)}}function $c(e){return`rgba(${Uc(255*e.r)}, ${Uc(255*e.g)}, ${Uc(255*e.b)}, ${Hc(e.a)})`}function zc(e){let t=Ec(e);return{h:Uc(360*t.h),s:Hc(t.s),l:Hc(t.l)}}function jc(e){let t=Ec(e);return`hsl(${Uc(360*t.h)}, ${Hc(t.s)}, ${Hc(t.l)})`}function Vc(e){let t=Ec(e);return{h:Uc(360*t.h),s:Hc(t.s),l:Hc(t.l),a:Hc(t.a)}}function Yc(e){let t=Ec(e);return`hsla(${Uc(360*t.h)}, ${Hc(t.s)}, ${Hc(t.l)}, ${Hc(t.a)})`}function Wc(e){let t=Sc(e);return{h:Uc(360*t.h),s:Hc(t.s),v:Hc(t.v)}}function Gc(e){let t=Sc(e);return`hsv(${Uc(360*t.h)}, ${Hc(t.s)}, ${Hc(t.v)})`}function Jc(e){let t=Sc(e);return{h:Uc(360*t.h),s:Hc(t.s),v:Hc(t.v),a:Hc(t.a)}}function _c(e){let t=Sc(e);return`hsva(${Uc(360*t.h)}, ${Hc(t.s)}, ${Hc(t.v)}, ${Hc(t.a)})`}function Xc(e){return{r:Rc(e.r),g:Rc(e.g),b:Rc(e.b)}}function Kc(e){return`rgb(${Rc(e.r)}, ${Rc(e.g)}, ${Rc(e.b)})`}function Zc(e){return{r:Rc(e.r),g:Rc(e.g),b:Rc(e.b),a:Hc(e.a)}}function eu(e){return`rgba(${Rc(e.r)}, ${Rc(e.g)}, ${Rc(e.b)}, ${Hc(e.a)})`}function tu(e){let t=Ec(e);return{h:Uc(360*t.h),s:Rc(t.s),l:Rc(t.l)}}function nu(e){let t=Ec(e);return`hsl(${Uc(360*t.h)}, ${Rc(t.s)}, ${Rc(t.l)})`}function ru(e){let t=Ec(e);return{h:Uc(360*t.h),s:Rc(t.s),l:Rc(t.l),a:Hc(t.a)}}function iu(e){let t=Ec(e);return`hsla(${Uc(360*t.h)}, ${Rc(t.s)}, ${Rc(t.l)}, ${Hc(t.a)})`}function ou(e){let t=Sc(e);return{h:Uc(360*t.h),s:Rc(t.s),v:Rc(t.v)}}function au(e){let t=Sc(e);return`hsv(${Uc(360*t.h)}, ${Rc(t.s)}, ${Rc(t.v)})`}function su(e){let t=Sc(e);return{h:Uc(360*t.h),s:Rc(t.s),v:Rc(t.v),a:Hc(t.a)}}function lu(e){let t=Sc(e);return`hsva(${Uc(360*t.h)}, ${Rc(t.s)}, ${Rc(t.v)}, ${Hc(t.a)})`}function cu(e){let t=function(e){return Nc(e,!1)}(e);return`#${t}`}function uu(e){return`#${Nc(e)}`}function fu(e){let t=null,n=null,r=null;if(Fe(e))t=ys(ea(e));else{if(!Se(e))throw console.log("color=",e),new Error("color is not a string or an object");n=e}if(null!==t)try{r=Ic(t)}catch(e){throw console.log(e),new Error(`can not parse color: ${t}`)}else if(null!==n)try{r=Bc(n)}catch(e){throw console.log(e),new Error(`can not parse color: ${JSON.stringify(n)}`)}return r}function du(e){if(!Se(e))return console.log("gradient is not an effective object"),e=>`rgb(${255*(e=Math.min(Math.max(e,0),1))},${255*e},${255*e})`;let t=[];return An(e,(e,n)=>{t.push([xr(n),Pc(fu(e)),e])}),t=Na(t,0),function(e){let n=null;for(let r=1;r<t.length;r++){let i=t[r-1][0],o=t[r-1][1],a=t[r][0],s=t[r][1];if(i<=e&&a>=e){let t=(a-e)/(a-i),r=(e-i)/(a-i);n=Lc(fu(o),t,fu(s),r,"toRgbaString");break}}return n}}let hu={toRgb:qc,toRgbString:Oc,toRgba:Pc,toRgbaString:$c,toHsl:zc,toHslString:jc,toHsla:Vc,toHslaString:Yc,toHsv:Wc,toHsvString:Gc,toHsva:Jc,toHsvaString:_c,toRgbP:Xc,toRgbPString:Kc,toRgbaP:Zc,toRgbaPString:eu,toHslP:tu,toHslPString:nu,toHslaP:ru,toHslaPString:iu,toHsvP:ou,toHsvPString:au,toHsvaP:su,toHsvaPString:lu,toHexString:cu,toHex8String:uu};var pu=function(){let e={toRgb:e=>qc(fu(e)),toRgbString:e=>Oc(fu(e)),toRgba:e=>Pc(fu(e)),toRgbaString:e=>$c(fu(e)),toHsl:e=>zc(fu(e)),toHslString:e=>jc(fu(e)),toHsla:e=>Vc(fu(e)),toHslaString:e=>Yc(fu(e)),toHsv:e=>Wc(fu(e)),toHsvString:e=>Gc(fu(e)),toHsva:e=>Jc(fu(e)),toHsvaString:e=>_c(fu(e)),toRgbP:e=>Xc(fu(e)),toRgbPString:e=>Kc(fu(e)),toRgbaP:e=>Zc(fu(e)),toRgbaPString:e=>eu(fu(e)),toHslP:e=>tu(fu(e)),toHslPString:e=>nu(fu(e)),toHslaP:e=>ru(fu(e)),toHslaPString:e=>iu(fu(e)),toHsvP:e=>ou(fu(e)),toHsvPString:e=>au(fu(e)),toHsvaP:e=>su(fu(e)),toHsvaPString:e=>lu(fu(e)),toHexString:e=>cu(fu(e)),toHex8String:e=>uu(fu(e)),modSaturate:(e,t,n)=>function(e,t,n="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let r=Ec(e);return r.s+=t,r.s=Mc(r.s),Tc(kc(r),n)}(fu(e),t,n),modGrey:(e,t)=>function(e,t="toRgbString"){let n=Ec(e);return n.s=0,Tc(kc(n),t)}(fu(e),t),modLighten:(e,t,n)=>function(e,t,n="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");let r=Ec(e);return r.l+=t,r.l=Mc(r.l),Tc(kc(r),n)}(fu(e),t,n),modBrighten:(e,t,n)=>function(e,t,n="toRgbString"){if(t<0||t>1)throw new Error("amount < 0 or > 1");return e.r+=t,e.r=Mc(e.r),e.g+=t,e.g=Mc(e.g),e.b+=t,e.b=Mc(e.b),Tc(e,n)}(fu(e),t,n),modHue:(e,t,n)=>Qc(fu(e),t,n),modComplement:(e,t)=>function(e,t="toRgbString"){return Qc(e,.5,t)}(fu(e),t),spreadHue:(e,t,n)=>function(e,t,n="toRgbString"){if(!Cr(t))throw new Error("num is not an integer");if((t=Yi(t))<=1)return[e];let r=Ec(e),i=1/t,o=[];for(let e=0;e<t;e++)o.push(Tc(kc(r),n)),r.h+=i,r.h=r.h%1;return o}(fu(e),t,n),spreadMonochromatic:(e,t,n)=>function(e,t,n="toRgbString"){if(!Cr(t))throw new Error("num is not an integer");if((t=Yi(t))<=1)return[e];let r=Sc(e);r.s=1,r.l=1;let i=1/t,o=[];for(let e=0;e<t;e++)o.push(Tc(Fc(r),n)),r.h-=i,r.l-=i;return o}(fu(e),t,n),mix:(e,t,n,r,i)=>Lc(fu(e),t,fu(n),r,i),getBrightness:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");return(299*e.r+587*e.g+114*e.b)/1e3}(fu(e)),getLuminance:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");let t,n,r,i=e.r,o=e.g,a=e.b;return t=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4),n=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),r=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),.2126*t+.7152*n+.0722*r}(fu(e)),interp:du};return e}();function gu(e,t,n){return null==e?e:function(e,t,n,r){if(!L(e))return e;for(var i=-1,o=(t=ye(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var l=ve(t[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=a){var u=s[l];void 0===(c=r?r(u,l,s):void 0)&&(c=L(u)?u:Je(t[i+1])?[]:{})}ri(s,l,c),s=s[l]}return e}(e,t,n)}var mu=Function.prototype,yu=Object.prototype,vu=mu.toString,Au=yu.hasOwnProperty,bu=vu.call(Object);function wu(e){if(!D(e)||"[object Object]"!=F(e))return!1;var t=hi(e);if(null===t)return!0;var n=Au.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&vu.call(n)==bu}function Iu(e){return wu(e)?void 0:e}var xu=po(function(e,t){var n={};if(null==e)return n;var r=!1;t=de(t,function(t){return t=ye(t,e),r||(r=t.length>1),t}),ii(e,gi(e),n),r&&(n=Qi(n,7,Iu));for(var i=t.length;i--;)xa(n,t[i]);return n}),Cu=xu;function Bu(e,t={}){let n="$level",r="$parents";if(!Tn(e))return[];let i=be(t,"bindKey",null);Fe(i)||(i="id");let o=be(t,"bindParent",null);Fe(o)||(o="parentId");let a=be(t,"bindChildren",null);Fe(a)||(a="children");let s=be(t,"saveExtProps",null);Ie(s)||(s=!1),e=function(e){let t=[];function a(a){let s=[];An(e,(e,l)=>{let c=be(e,o),u=be(a,i);if(c&&u&&c===u){let o=be(a,r,[]);o=Li(o),o.push(a[i]),t.push({[n]:a[n]+1,[r]:o,...e})}else s.push(e)}),e=s}if(e=Li(e),function(){let i=[];An(e,(e,a)=>{Mn(e[o])?t.push({[n]:0,[r]:[],...e}):i.push(e)}),e=i}(),0===t.length)return t;let s=-1;for(;s+=1,!(s>t.length-1);){if(a(t[s]),0===e.length)break}return t}(e);let l=function(e){let t=[];function l(e){return s?e:Cu(e,[n,r])}let c={};return An(e,(r,s)=>{if(0===r[n]){let e=l(r);t.push(e),c[r[i]]=[s]}else{let n=function(t){for(let n=0;n<e.length;n++){let r=e[n];if(t[o]===r[i])return r}return null}(r);if(null!==n){let e=c[n[i]];e=[...e,a];let o=be(t,e,[]),s=l(r);o.push(s),c[r[i]]=[...e,o.length-1],gu(t,e,o)}else console.log(`can not find parent for ${be(r,o)}`)}}),t}(e);return l}function Eu(e,t=null,n={}){R(t)||(t=e=>e);let r=be(n,"force",!1);return Ie(r)||(r=!1),function(e,t,n=!1){let r=[];if(!Be(e)&&!Ee(e))return t(e,null,[]);function i(e){if(Be(e))return Zi(ar(e));if(Ee(e)){let t=Object.getOwnPropertyNames(e),r=null;return n&&(r=Object.getOwnPropertySymbols(e)),Be(t)||(t=[]),Be(r)||(r=[]),[...t,...r]}return e}return function e(n,o){if(Be(n))return i(n).map(i=>{let o=n[i],a=Li(r);return r.push(i),o=t(o,i,a),o=e(o),r.pop(),o});if(Ee(n)){let o=i(n),a={};return o.map(i=>{let o=n[i],s=Li(r);r.push(i),o=t(o,i,s),o=e(o),r.pop(),a[i]=o}),a}return n}(e)}(e,t,r)}function Su(e,t={}){if(!Se(e)&&!Tn(e))return[];let n=be(t,"bindKey",null);Fe(n)||(n="id");let r=be(t,"bindParent",null);Fe(r)||(r="parentId");let i=be(t,"bindBelong",null);Fe(i)||(i="key");let o=be(t,"bindText",null);Fe(o)||(o="text");let a=be(t,"bindType",null);Fe(a)||(a="type");let s=be(t,"bindNumOfChilren",null);function l(e,t){return e=wn(e=Li(e),e=>N(e)?Ta(e):e),N(t)&&(t=Ta(t)),(Fe(t)||Me(t))&&e.push(t),Ao(e,"-")}Fe(s)||(s="numOfChilren");let c=[];return Eu(e,(e,t,u)=>{let f=l(u,t),d=l(u,null),h="node";Ee(e)?h="object":Be(e)&&(h="array");let p={[n]:f,[r]:d,[a]:h};if((Fe(t)||fa(t))&&(p[i]=t),Ee(e)||Be(e)||(p[o]=e),Ee(e)||Be(e)){let t=null;Ee(e)?t=ar(pt(e)):Be(e)&&(t=ar(e)),p[s]=t}return c.push(p),e},{force:!0}),c}function ku(e){return D(t=e)&&1===t.nodeType&&!wu(t);var t}function Fu(e){if(!ku(e))return"invalid element";let t=!1;try{t=document.activeElement===e}catch(e){console.log(e)}return t}function Du(e){return Me(e)?(e=xr(e),Math.cos(e*Math.PI/180)):null}function Nu(e){return Me(e)?(e=xr(e),Math.tan(e*Math.PI/180)):null}function Mu(){return{sheets:[]}}function Tu(e){return Me(e)?(e=xr(e),Math.sin(e*Math.PI/180)):null}function Qu(e){if(!Fe(e))return!1;let n="YYYY-MM-DD";return e===t(e,n).format(n)}function Lu(e=300){return new function(e){let t=[],n=null,r=Date.now();return Wi(e)||(e=300),e=Yi(e),function(i,...o){Oi(i)?(r=Date.now(),t.push({func:i,input:o}),null===n&&(n=setInterval(()=>{if(0===ar(t))return clearInterval(n),void(n=null);if(Date.now()-r>e){let e=t.pop();t=[];try{e.func(...e.input)}catch(e){console.log("m.func catch",e)}}},10))):console.log("func is not a function")}}(e)}let Ru="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Uu=Ru.length;function Hu(e=32){let t=[];e=Wi(e)?Yi(e):32;for(let n=0;n<e;n++)t[n]=Ru[0|Math.random()*Uu];return t.join("")}function qu(e,t={}){if(!ku(e))return;let n=be(t,"duration",500);n=xr(n),n<0&&(n=1e3);let r=be(t,"delay",0);r=xr(r),r<0&&(r=0);let i=be(t,"opacityIni",0);i=xr(i),i=Math.min(Math.max(i,0),1),Me(e.style.opacity)&&(i=xr(e.style.opacity));let o=10/n,a=`tag-${Hu()}`;e.setAttribute("dom-fade-tag",a),setTimeout(()=>{let t=setInterval(()=>{try{e.getAttribute("dom-fade-tag")!==a&&clearInterval(t),e.style.opacity=i,i>=1&&(clearInterval(t),e.removeAttribute("dom-fade-tag")),i+=o,i>1&&(i=1)}catch(e){console.log(e),clearInterval(t)}},10)},r)}function Ou(e,t={}){if(!ku(e))return;let n=be(t,"duration",500);n=xr(n),n<0&&(n=1e3);let r=be(t,"delay",0);r=xr(r),r<0&&(r=0);let i=be(t,"opacityIni",1);i=xr(i),i=Math.min(Math.max(i,0),1),Me(e.style.opacity)&&(i=xr(e.style.opacity));let o=10/n,a=`tag-${Hu()}`;e.setAttribute("dom-fade-tag",a),setTimeout(()=>{let t=setInterval(()=>{try{e.getAttribute("dom-fade-tag")!==a&&clearInterval(t),e.style.opacity=i,i<=0&&(clearInterval(t),e.removeAttribute("dom-fade-tag")),i-=o,i<0&&(i=0)}catch(e){console.log(e),clearInterval(t)}},10)},r)}let Pu='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 512.001 512.001" style="width:12px; height:12px; enable-background:new 0 0 512.001 512.001;" xml:space="preserve"><g><g><path d="M284.286,256.002L506.143,34.144c7.811-7.811,7.811-20.475,0-28.285c-7.811-7.81-20.475-7.811-28.285,0L256,227.717L34.143,5.859c-7.811-7.811-20.475-7.811-28.285,0c-7.81,7.811-7.811,20.475,0,28.285l221.857,221.857L5.858,477.859c-7.811,7.811-7.811,20.475,0,28.285c3.905,3.905,9.024,5.857,14.143,5.857c5.119,0,10.237-1.952,14.143-5.857L256,284.287l221.857,221.857c3.905,3.905,9.024,5.857,14.143,5.857s10.237-1.952,14.143-5.857c7.811-7.811,7.811-20.475,0-28.285L284.286,256.002z"/></g></g></svg>',$u={success:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 426.667 426.667" style="width:24px; height:24px; enable-background:new 0 0 426.667 426.667" xml:space="preserve"><path style="fill:#6ac259" d="M213.333,0C95.518,0,0,95.514,0,213.333s95.518,213.333,213.333,213.333 c117.828,0,213.333-95.514,213.333-213.333S331.157,0,213.333,0z M174.199,322.918l-93.935-93.931l31.309-31.309l62.626,62.622 l140.894-140.898l31.309,31.309L174.199,322.918z"/></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 496.158 496.158" style="width:24px; height:24px; enable-background:new 0 0 496.158 496.158" xml:space="preserve"><path style="fill:#e04f5f" d="M496.158,248.085c0-137.021-111.07-248.082-248.076-248.082C111.07,0.003,0,111.063,0,248.085 c0,137.002,111.07,248.07,248.082,248.07C385.088,496.155,496.158,385.087,496.158,248.085z"/><path style="fill:#fff" d="M277.042,248.082l72.528-84.196c7.91-9.182,6.876-23.041-2.31-30.951 c-9.172-7.904-23.032-6.876-30.947,2.306l-68.236,79.212l-68.229-79.212c-7.91-9.188-21.771-10.216-30.954-2.306 c-9.186,7.91-10.214,21.77-2.304,30.951l72.522,84.196l-72.522,84.192c-7.91,9.182-6.882,23.041,2.304,30.951 c4.143,3.569,9.241,5.318,14.316,5.318c6.161,0,12.294-2.586,16.638-7.624l68.229-79.212l68.236,79.212 c4.338,5.041,10.47,7.624,16.637,7.624c5.069,0,10.168-1.749,14.311-5.318c9.186-7.91,10.22-21.77,2.31-30.951L277.042,248.082z"/></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 497.472 497.472" style="width:24px; height:24px; enable-background:new 0 0 497.472 497.472" xml:space="preserve"><g transform="matrix(1.25 0 0 -1.25 0 45)"><path style="fill:#ffcc4d" d="M24.374-357.857c-20.958,0-30.197,15.223-20.548,33.826L181.421,17.928 c9.648,18.603,25.463,18.603,35.123,0L394.14-324.031c9.671-18.603,0.421-33.826-20.548-33.826H24.374z"/><path style="fill:#231f20" d="M173.605-80.922c0,14.814,10.934,23.984,25.395,23.984c14.12,0,25.407-9.512,25.407-23.984 V-216.75c0-14.461-11.287-23.984-25.407-23.984c-14.461,0-25.395,9.182-25.395,23.984V-80.922z M171.489-289.056 c0,15.167,12.345,27.511,27.511,27.511c15.167,0,27.523-12.345,27.523-27.511c0-15.178-12.356-27.523-27.523-27.523 C183.834-316.579,171.489-304.234,171.489-289.056"/></g></svg>',infor:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 496.16 496.16" style="width:24px; height:24px; enable-background:new 0 0 496.158 496.158;" xml:space="preserve"><path d="m496.16 248.08c0-137.02-111.07-248.08-248.08-248.08-137.01 0-248.08 111.06-248.08 248.08 0 137 111.07 248.07 248.08 248.07 137.01 0 248.08-111.07 248.08-248.07z" fill="#25B7D3"/><g fill="#fff"><path d="m315.25 359.56c-1.387-2.032-4.048-2.755-6.27-1.702-24.582 11.637-52.482 23.94-57.958 25.015-0.138-0.123-0.357-0.348-0.644-0.737-0.742-1.005-1.103-2.318-1.103-4.015 0-13.905 10.495-56.205 31.192-125.72 17.451-58.406 19.469-70.499 19.469-74.514 0-6.198-2.373-11.435-6.865-15.146-4.267-3.519-10.229-5.302-17.719-5.302-12.459 0-26.899 4.73-44.146 14.461-16.713 9.433-35.352 25.41-55.396 47.487-1.569 1.729-1.733 4.314-0.395 6.228 1.34 1.915 3.825 2.644 5.986 1.764 7.037-2.872 42.402-17.359 47.557-20.597 4.221-2.646 7.875-3.989 10.861-3.989 0.107 0 0.199 4e-3 0.276 0.01 0.036 0.198 0.07 0.5 0.07 0.933 0 3.047-0.627 6.654-1.856 10.703-30.136 97.641-44.785 157.5-44.785 182.99 0 8.998 2.501 16.242 7.432 21.528 5.025 5.393 11.803 8.127 20.146 8.127 8.891 0 19.712-3.714 33.08-11.354 12.936-7.392 32.68-23.653 60.363-49.717 1.793-1.687 2.092-4.426 0.705-6.458z"/><path d="m314.28 76.672c-4.925-5.041-11.227-7.597-18.729-7.597-9.34 0-17.475 3.691-24.176 10.971-6.594 7.16-9.938 15.946-9.938 26.113 0 8.033 2.463 14.69 7.32 19.785 4.922 5.172 11.139 7.794 18.476 7.794 8.958 0 17.049-3.898 24.047-11.586 6.876-7.553 10.363-16.433 10.363-26.393 1e-3 -7.654-2.476-14.075-7.363-19.087z"/></g></svg>',cancel:Pu},zu={},ju=null,Vu=nc();function Yu(){An(["top-right","top-left","bottom-right","bottom-left"],e=>{!function(e){let t=sa(zu,{position:e});t=Na(t,"timeStart");let n=16;An(t,e=>{zu[e.id].ele||(zu[e.id].ele=document.querySelector(`#${e.id}`)),zu[e.id].loc.top=n,zu[e.id].loc.height=zu[e.id].ele.offsetHeight,n+=zu[e.id].loc.height+16}),An(t,t=>{e.indexOf("bottom-")>=0?(zu[t.id].ele.style.bottom=`${zu[t.id].loc.top}px`,zu[t.id].loc.bottom=zu[t.id].loc.top):zu[t.id].ele.style.top=`${zu[t.id].loc.top}px`,e.indexOf("-left")>=0?(zu[t.id].ele.style.left="16px",zu[t.id].loc.left=16):(zu[t.id].ele.style.right="16px",zu[t.id].loc.right=16),zu[t.id].ele.style.zIndex=2e5,zu[t.id].ele.style.opacity=1,zu[t.id].ele.style.transform="",zu[t.id].ele.style.transform=null})}(e)})}function Wu(e){zu[e].ele&&zu[e].ele.parentNode.removeChild(zu[e].ele),zu[e]&&delete zu[e],Yu()}function Gu(e,t){if(!ku(e))return"invalid eleParent";if(ke(t))e.insertAdjacentHTML("beforeend",t);else{if(!ku(t))return"invalid itemChild";e.appendChild(t)}}function Ju(){return null!==navigator.userAgent.toLowerCase().match(/rv:([\d.]+)\) like gecko/)}function _u(e){if(!e)return"invalid event";if(!e.cancelable)return"event is not cancelable";try{Ju()?e.cancelBubble=!0:e.stopPropagation(),e.preventDefault()}catch(e){}}var Xu;Vu.ttWAlertCancel=function(e){Wu(e)},Vu.ttWAlertFadeIn=function(e){qu(document.querySelector(`#${e}`))},Vu.ttWAlertFadeOut=function(e){Ou(document.querySelector(`#${e}`))},function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"}(Xu||(Xu={}));var Ku;!function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"}(Ku||(Ku={}));const Zu=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");function ef(e){return e?e.replace(/\\/g,"/"):e}function tf(e){const t=e.length;let n=-1/0;for(let r=0;r<t;r++)n=Math.max(n,e[r]);return n}function nf(e,t){const n=e.split(".");return n.length>1?n[n.length-1]:t}function rf(e,t){return t.reduce((t,n)=>t||e.startsWith(n),!1)}const of=["a/","b/","i/","w/","c/","o/"];function af(e,t,n){const r=void 0!==n?[...of,n]:of,i=t?new RegExp(`^${o=t,o.replace(Zu,"\\$&")} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$');var o;const[,a=""]=i.exec(e)||[],s=r.find(e=>0===a.indexOf(e));return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function sf(e,t={}){const n=[];let r=null,i=null,o=null,a=null,s=null,l=null,c=null;const u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,g=/^deleted file mode (\d{6})/,m=/^new file mode (\d{6})/,y=/^copy from "?(.+)"?/,v=/^copy to "?(.+)"?/,A=/^rename from "?(.+)"?/,b=/^rename to "?(.+)"?/,w=/^similarity index (\d+)%/,I=/^dissimilarity index (\d+)%/,x=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,C=/^Binary files (.*) and (.*) differ/,B=/^GIT binary patch/,E=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,S=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,k=/^new file mode (\d{6})/,F=/^deleted file mode (\d{6}),(\d{6})/,D=e.replace(/\/g,"").replace(/\r\n?/g,"\n").split("\n");function N(){null!==i&&null!==r&&(r.blocks.push(i),i=null)}function M(){null!==r&&(r.oldName||null===l||(r.oldName=l),r.newName||null===c||(r.newName=c),r.newName&&(n.push(r),r=null)),l=null,c=null}function T(){N(),M(),r={blocks:[],deletedLines:0,addedLines:0}}function Q(e){let t;N(),null!==r&&((t=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))?(r.isCombined=!1,o=parseInt(t[1],10),s=parseInt(t[2],10)):(t=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))?(r.isCombined=!0,o=parseInt(t[1],10),a=parseInt(t[2],10),s=parseInt(t[3],10)):(e.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),o=0,s=0,r.isCombined=!1)),i={lines:[],oldStartLine:o,oldStartLine2:a,newStartLine:s,header:e}}return D.forEach((e,a)=>{if(!e||e.startsWith("*"))return;let N;const M=D[a-1],L=D[a+1],R=D[a+2];if(e.startsWith("diff --git")||e.startsWith("diff --combined")){T();if((N=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(e))&&(l=af(N[1],void 0,t.dstPrefix),c=af(N[2],void 0,t.srcPrefix)),null===r)throw new Error("Where is my file !!!");return void(r.isGitDiff=!0)}if(e.startsWith("Binary files")&&!(null==r?void 0:r.isGitDiff)){T();if((N=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(e))&&(l=af(N[1],void 0,t.dstPrefix),c=af(N[2],void 0,t.srcPrefix)),null===r)throw new Error("Where is my file !!!");return void(r.isBinary=!0)}if((!r||!r.isGitDiff&&r&&e.startsWith(u)&&L.startsWith(f)&&R.startsWith(d))&&T(),null==r?void 0:r.isTooBig)return;if(r&&("number"==typeof t.diffMaxChanges&&r.addedLines+r.deletedLines>t.diffMaxChanges||"number"==typeof t.diffMaxLineLength&&e.length>t.diffMaxLineLength)){r.isTooBig=!0,r.addedLines=0,r.deletedLines=0,r.blocks=[],i=null;return void Q("function"==typeof t.diffTooBigMessage?t.diffTooBigMessage(n.length):"Diff too big to be displayed")}if(e.startsWith(u)&&L.startsWith(f)||e.startsWith(f)&&M.startsWith(u)){if(r&&!r.oldName&&e.startsWith("--- ")&&(N=function(e,t){return af(e,"---",t)}(e,t.srcPrefix)))return r.oldName=N,void(r.language=nf(r.oldName,r.language));if(r&&!r.newName&&e.startsWith("+++ ")&&(N=function(e,t){return af(e,"+++",t)}(e,t.dstPrefix)))return r.newName=N,void(r.language=nf(r.newName,r.language))}if(r&&(e.startsWith(d)||r.isGitDiff&&r.oldName&&r.newName&&!i))return void Q(e);if(i&&(e.startsWith("+")||e.startsWith("-")||e.startsWith(" ")))return void function(e){if(null===r||null===i||null===o||null===s)return;const t={content:e},n=r.isCombined?["+ "," +","++"]:["+"],a=r.isCombined?["- "," -","--"]:["-"];rf(e,n)?(r.addedLines++,t.type=Xu.INSERT,t.oldNumber=void 0,t.newNumber=s++):rf(e,a)?(r.deletedLines++,t.type=Xu.DELETE,t.oldNumber=o++,t.newNumber=void 0):(t.type=Xu.CONTEXT,t.oldNumber=o++,t.newNumber=s++),i.lines.push(t)}(e);const U=!function(e,t){let n=t;for(;n<D.length-3;){if(e.startsWith("diff"))return!1;if(D[n].startsWith(u)&&D[n+1].startsWith(f)&&D[n+2].startsWith(d))return!0;n++}return!1}(e,a);if(null===r)throw new Error("Where is my file !!!");(N=h.exec(e))?r.oldMode=N[1]:(N=p.exec(e))?r.newMode=N[1]:(N=g.exec(e))?(r.deletedFileMode=N[1],r.isDeleted=!0):(N=m.exec(e))?(r.newFileMode=N[1],r.isNew=!0):(N=y.exec(e))?(U&&(r.oldName=N[1]),r.isCopy=!0):(N=v.exec(e))?(U&&(r.newName=N[1]),r.isCopy=!0):(N=A.exec(e))?(U&&(r.oldName=N[1]),r.isRename=!0):(N=b.exec(e))?(U&&(r.newName=N[1]),r.isRename=!0):(N=C.exec(e))?(r.isBinary=!0,r.oldName=af(N[1],void 0,t.srcPrefix),r.newName=af(N[2],void 0,t.dstPrefix),Q("Binary file")):B.test(e)?(r.isBinary=!0,Q(e)):(N=w.exec(e))?r.unchangedPercentage=parseInt(N[1],10):(N=I.exec(e))?r.changedPercentage=parseInt(N[1],10):(N=x.exec(e))?(r.checksumBefore=N[1],r.checksumAfter=N[2],N[3]&&(r.mode=N[3])):(N=E.exec(e))?(r.checksumBefore=[N[2],N[3]],r.checksumAfter=N[1]):(N=S.exec(e))?(r.oldMode=[N[2],N[3]],r.newMode=N[1]):(N=k.exec(e))?(r.newFileMode=N[1],r.isNew=!0):(N=F.exec(e))&&(r.deletedFileMode=N[1],r.isDeleted=!0)}),N(),M(),n}class lf{diff(e,t,n={}){let r;"function"==typeof n?(r=n,n={}):"callback"in n&&(r=n.callback);const i=this.castInput(e,n),o=this.castInput(t,n),a=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(a,s,n,r)}diffWithOptionsObj(e,t,n,r){var i;const o=e=>(e=this.postProcess(e,n),r?void setTimeout(function(){r(e)},0):e),a=t.length,s=e.length;let l=1,c=a+s;null!=n.maxEditLength&&(c=Math.min(c,n.maxEditLength));const u=null!==(i=n.timeout)&&void 0!==i?i:1/0,f=Date.now()+u,d=[{oldPos:-1,lastComponent:void 0}];let h=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=s&&h+1>=a)return o(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,g=1/0;const m=()=>{for(let r=Math.max(p,-l);r<=Math.min(g,l);r+=2){let i;const l=d[r-1],c=d[r+1];l&&(d[r-1]=void 0);let u=!1;if(c){const e=c.oldPos-r;u=c&&0<=e&&e<a}const f=l&&l.oldPos+1<s;if(u||f){if(i=!f||u&&l.oldPos<c.oldPos?this.addToPath(c,!0,!1,0,n):this.addToPath(l,!1,!0,1,n),h=this.extractCommon(i,t,e,r,n),i.oldPos+1>=s&&h+1>=a)return o(this.buildValues(i.lastComponent,t,e))||!0;d[r]=i,i.oldPos+1>=s&&(g=Math.min(g,r-1)),h+1>=a&&(p=Math.max(p,r+1))}else d[r]=void 0}l++};if(r)!function e(){setTimeout(function(){if(l>c||Date.now()>f)return r(void 0);m()||e()},0)}();else for(;l<=c&&Date.now()<=f;){const e=m();if(e)return e}}addToPath(e,t,n,r,i){const o=e.lastComponent;return o&&!i.oneChangePerToken&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}}extractCommon(e,t,n,r,i){const o=t.length,a=n.length;let s=e.oldPos,l=s-r,c=0;for(;l+1<o&&s+1<a&&this.equals(n[s+1],t[l+1],i);)l++,s++,c++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return c&&!i.oneChangePerToken&&(e.lastComponent={count:c,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const r=[];let i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();const o=r.length;let a=0,s=0,l=0;for(;a<o;a++){const e=r[a];if(e.removed)e.value=this.join(n.slice(l,l+e.count)),l+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){const r=n[l+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(l+=e.count)}}return r}}const cf=new class extends lf{};const uf="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";const ff=new class extends lf{tokenize(e){const t=new RegExp(`(\\r?\\n)|[${uf}]+|[^\\S\\n\\r]+|[^${uf}]`,"ug");return e.match(t)||[]}};function df(e){return(t,n)=>{const r=e(t).trim(),i=e(n).trim();return function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const n=[];let r,i;for(r=0;r<=t.length;r++)n[r]=[r];for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}(r,i)/(r.length+i.length)}}function hf(e){return function t(n,r,i=0,o=new Map){const a=function(t,n,r=new Map){let i,o=1/0;for(let a=0;a<t.length;++a)for(let s=0;s<n.length;++s){const l=JSON.stringify([t[a],n[s]]);let c;r.has(l)&&(c=r.get(l))||(c=e(t[a],n[s]),r.set(l,c)),c<o&&(o=c,i={indexA:a,indexB:s,score:o})}return i}(n,r,o);if(!a||n.length+r.length<3)return[[n,r]];const s=n.slice(0,a.indexA),l=r.slice(0,a.indexB),c=[n[a.indexA]],u=[r[a.indexB]],f=a.indexA+1,d=a.indexB+1,h=n.slice(f),p=r.slice(d),g=t(s,l,i+1,o),m=t(c,u,i+1,o),y=t(h,p,i+1,o);let v=m;return(a.indexA>0||a.indexB>0)&&(v=g.concat(v)),(n.length>f||r.length>d)&&(v=v.concat(y)),v}}const pf={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},gf={matching:"none",matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:"word",colorScheme:Ku.LIGHT},mf="/",yf=df(e=>e.value),vf=hf(yf);function Af(e){return-1!==e.indexOf("dev/null")}function bf(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function wf(e){switch(e){case Xu.CONTEXT:return pf.CONTEXT;case Xu.INSERT:return pf.INSERTS;case Xu.DELETE:return pf.DELETES}}function If(e){switch(e){case Ku.DARK:return"d2h-dark-color-scheme";case Ku.AUTO:return"d2h-auto-color-scheme";case Ku.LIGHT:default:return"d2h-light-color-scheme"}}function xf(e){return e.slice(0).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function Cf(e,t,n=!0){const r=function(e){return e?2:1}(t);return{prefix:e.substring(0,r),content:n?xf(e.substring(r)):e.substring(r)}}function Bf(e){const t=ef(e.oldName),n=ef(e.newName);if(t===n||Af(t)||Af(n))return Af(n)?t:n;{const e=[],r=[],i=t.split(mf),o=n.split(mf);let a=0,s=i.length-1,l=o.length-1;for(;a<s&&a<l&&i[a]===o[a];)e.push(o[a]),a+=1;for(;s>a&&l>a&&i[s]===o[l];)r.unshift(o[l]),s-=1,l-=1;const c=e.join(mf),u=r.join(mf),f=i.slice(a,s+1).join(mf),d=o.slice(a,l+1).join(mf);return c.length&&u.length?c+mf+"{"+f+" → "+d+"}"+mf+u:c.length?c+mf+"{"+f+" → "+d+"}":u.length?"{"+f+" → "+d+"}"+mf+u:t+" → "+n}}function Ef(e){return`d2h-${function(e){let t,n,r,i=0;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i|=0;return i}(Bf(e)).toString().slice(-6)}`}function Sf(e){let t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t}function kf(e,t,n,r={}){const{matching:i,maxLineLengthHighlight:o,matchWordsThreshold:a,diffStyle:s}=Object.assign(Object.assign({},gf),r),l=Cf(e,n,!1),c=Cf(t,n,!1);if(l.content.length>o||c.content.length>o)return{oldLine:{prefix:l.prefix,content:xf(l.content)},newLine:{prefix:c.prefix,content:xf(c.content)}};const u="char"===s?(f=l.content,d=c.content,cf.diff(f,d,h)):function(e,t,n){return ff.diff(e,t,n)}(l.content,c.content);var f,d,h;const p=[];if("word"===s&&"words"===i){const e=u.filter(e=>e.removed),t=u.filter(e=>e.added);vf(t,e).forEach(e=>{if(1===e[0].length&&1===e[1].length){yf(e[0][0],e[1][0])<a&&(p.push(e[0][0]),p.push(e[1][0]))}})}const g=u.reduce((e,t)=>{const n=t.added?"ins":t.removed?"del":null,r=p.indexOf(t)>-1?' class="d2h-change"':"",i=xf(t.value);return null!==n?`${e}<${n}${r}>${i}</${n}>`:`${e}${i}`},"");return{oldLine:{prefix:l.prefix,content:(m=g,m.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,""))},newLine:{prefix:c.prefix,content:bf(g)}};var m}const Ff="file-summary",Df={colorScheme:gf.colorScheme};class Nf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Df),t)}render(e){const t=e.map(e=>this.hoganUtils.render(Ff,"line",{fileHtmlId:Ef(e),oldName:e.oldName,newName:e.newName,fileName:Bf(e),deletedLines:"-"+e.deletedLines,addedLines:"+"+e.addedLines},{fileIcon:this.hoganUtils.template("icon",Sf(e))})).join("\n");return this.hoganUtils.render(Ff,"wrapper",{colorScheme:If(this.config.colorScheme),filesNumber:e.length,files:t})}}const Mf=Object.assign(Object.assign({},gf),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Tf="generic",Qf="line-by-line";class Lf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Mf),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(Tf,"wrapper",{colorScheme:If(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const n=this.hoganUtils.template(Qf,"file-diff"),r=this.hoganUtils.template(Tf,"file-path"),i=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",Sf(e));return n.render({file:e,fileHtmlId:Ef(e),diffs:t,filePath:r.render({fileDiffName:Bf(e)},{fileIcon:i,fileTag:o})})}generateEmptyDiff(){return this.hoganUtils.render(Tf,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:pf})}generateFileHtml(e){const t=hf(df(t=>Cf(t.content,e.isCombined).content));return e.blocks.map(n=>{let r=this.hoganUtils.render(Tf,"block-header",{CSSLineClass:pf,blockHeader:e.isTooBig?n.header:xf(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([n,i,o])=>{if(i.length&&o.length&&!n.length)this.applyRematchMatching(i,o,t).map(([t,n])=>{const{left:i,right:o}=this.processChangedLines(e,e.isCombined,t,n);r+=i,r+=o});else if(n.length)n.forEach(t=>{const{prefix:n,content:i}=Cf(t.content,e.isCombined);r+=this.generateSingleLineHtml(e,{type:pf.CONTEXT,prefix:n,content:i,oldNumber:t.oldNumber,newNumber:t.newNumber})});else if(i.length||o.length){const{left:t,right:n}=this.processChangedLines(e,e.isCombined,i,o);r+=t,r+=n}else console.error("Unknown state reached while processing groups of lines",n,i,o)}),r}).join("\n")}applyLineGroupping(e){const t=[];let n=[],r=[];for(let i=0;i<e.lines.length;i++){const o=e.lines[i];(o.type!==Xu.INSERT&&r.length||o.type===Xu.CONTEXT&&n.length>0)&&(t.push([[],n,r]),n=[],r=[]),o.type===Xu.CONTEXT?t.push([[o],[],[]]):o.type===Xu.INSERT&&0===n.length?t.push([[],[],[o]]):o.type===Xu.INSERT&&n.length>0?r.push(o):o.type===Xu.DELETE&&n.push(o)}return(n.length||r.length)&&(t.push([[],n,r]),n=[],r=[]),t}applyRematchMatching(e,t,n){const r=e.length*t.length,i=tf(e.concat(t).map(e=>e.content.length));return r<this.config.matchingMaxComparisons&&i<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?n(e,t):[[e,t]]}processChangedLines(e,t,n,r){const i={right:"",left:""},o=Math.max(n.length,r.length);for(let a=0;a<o;a++){const o=n[a],s=r[a],l=void 0!==o&&void 0!==s?kf(o.content,s.content,t,this.config):void 0,c=void 0!==o&&void 0!==o.oldNumber?Object.assign(Object.assign({},void 0!==l?{prefix:l.oldLine.prefix,content:l.oldLine.content,type:pf.DELETE_CHANGES}:Object.assign(Object.assign({},Cf(o.content,t)),{type:wf(o.type)})),{oldNumber:o.oldNumber,newNumber:o.newNumber}):void 0,u=void 0!==s&&void 0!==s.newNumber?Object.assign(Object.assign({},void 0!==l?{prefix:l.newLine.prefix,content:l.newLine.content,type:pf.INSERT_CHANGES}:Object.assign(Object.assign({},Cf(s.content,t)),{type:wf(s.type)})),{oldNumber:s.oldNumber,newNumber:s.newNumber}):void 0,{left:f,right:d}=this.generateLineHtml(e,c,u);i.left+=f,i.right+=d}return i}generateLineHtml(e,t,n){return{left:this.generateSingleLineHtml(e,t),right:this.generateSingleLineHtml(e,n)}}generateSingleLineHtml(e,t){if(void 0===t)return"";const n=this.hoganUtils.render(Qf,"numbers",{oldNumber:t.oldNumber||"",newNumber:t.newNumber||""});return this.hoganUtils.render(Tf,"line",{type:t.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:" "===t.prefix?" ":t.prefix,content:t.content,lineNumber:n,line:t,file:e})}}const Rf=Object.assign(Object.assign({},gf),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Uf="generic";class Hf{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Rf),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(Uf,"wrapper",{colorScheme:If(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const n=this.hoganUtils.template("side-by-side","file-diff"),r=this.hoganUtils.template(Uf,"file-path"),i=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",Sf(e));return n.render({file:e,fileHtmlId:Ef(e),diffs:t,filePath:r.render({fileDiffName:Bf(e)},{fileIcon:i,fileTag:o})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(Uf,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:pf})}}generateFileHtml(e){const t=hf(df(t=>Cf(t.content,e.isCombined).content));return e.blocks.map(n=>{const r={left:this.makeHeaderHtml(n.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([n,i,o])=>{if(i.length&&o.length&&!n.length)this.applyRematchMatching(i,o,t).map(([t,n])=>{const{left:i,right:o}=this.processChangedLines(e.isCombined,t,n);r.left+=i,r.right+=o});else if(n.length)n.forEach(t=>{const{prefix:n,content:i}=Cf(t.content,e.isCombined),{left:o,right:a}=this.generateLineHtml({type:pf.CONTEXT,prefix:n,content:i,number:t.oldNumber},{type:pf.CONTEXT,prefix:n,content:i,number:t.newNumber});r.left+=o,r.right+=a});else if(i.length||o.length){const{left:t,right:n}=this.processChangedLines(e.isCombined,i,o);r.left+=t,r.right+=n}else console.error("Unknown state reached while processing groups of lines",n,i,o)}),r}).reduce((e,t)=>({left:e.left+t.left,right:e.right+t.right}),{left:"",right:""})}applyLineGroupping(e){const t=[];let n=[],r=[];for(let i=0;i<e.lines.length;i++){const o=e.lines[i];(o.type!==Xu.INSERT&&r.length||o.type===Xu.CONTEXT&&n.length>0)&&(t.push([[],n,r]),n=[],r=[]),o.type===Xu.CONTEXT?t.push([[o],[],[]]):o.type===Xu.INSERT&&0===n.length?t.push([[],[],[o]]):o.type===Xu.INSERT&&n.length>0?r.push(o):o.type===Xu.DELETE&&n.push(o)}return(n.length||r.length)&&(t.push([[],n,r]),n=[],r=[]),t}applyRematchMatching(e,t,n){const r=e.length*t.length,i=tf(e.concat(t).map(e=>e.content.length));return r<this.config.matchingMaxComparisons&&i<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?n(e,t):[[e,t]]}makeHeaderHtml(e,t){return this.hoganUtils.render(Uf,"block-header",{CSSLineClass:pf,blockHeader:(null==t?void 0:t.isTooBig)?e:xf(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(e,t,n){const r={right:"",left:""},i=Math.max(t.length,n.length);for(let o=0;o<i;o++){const i=t[o],a=n[o],s=void 0!==i&&void 0!==a?kf(i.content,a.content,e,this.config):void 0,l=void 0!==i&&void 0!==i.oldNumber?Object.assign(Object.assign({},void 0!==s?{prefix:s.oldLine.prefix,content:s.oldLine.content,type:pf.DELETE_CHANGES}:Object.assign(Object.assign({},Cf(i.content,e)),{type:wf(i.type)})),{number:i.oldNumber}):void 0,c=void 0!==a&&void 0!==a.newNumber?Object.assign(Object.assign({},void 0!==s?{prefix:s.newLine.prefix,content:s.newLine.content,type:pf.INSERT_CHANGES}:Object.assign(Object.assign({},Cf(a.content,e)),{type:wf(a.type)})),{number:a.newNumber}):void 0,{left:u,right:f}=this.generateLineHtml(l,c);r.left+=u,r.right+=f}return r}generateLineHtml(e,t){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(t)}}generateSingleHtml(e){const t="d2h-code-side-linenumber",n="d2h-code-side-line";return this.hoganUtils.render(Uf,"line",{type:(null==e?void 0:e.type)||`${pf.CONTEXT} d2h-emptyplaceholder`,lineClass:void 0!==e?t:`${t} d2h-code-side-emptyplaceholder`,contentClass:void 0!==e?n:`${n} d2h-code-side-emptyplaceholder`,prefix:" "===(null==e?void 0:e.prefix)?" ":null==e?void 0:e.prefix,content:null==e?void 0:e.content,lineNumber:null==e?void 0:e.number})}}var qf={};!function(e){!function(e){var t=/\S/,n=/\"/g,r=/\n/g,i=/\r/g,o=/\\/g,a=/\u2028/,s=/\u2029/;function l(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function c(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function u(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var r=1,i=e.length;r<i;r++)if(t.charAt(n+r)!=e.charAt(r))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(n,r){var i=n.length,o=0,a=null,s=null,f="",d=[],h=!1,p=0,g=0,m="{{",y="}}";function v(){f.length>0&&(d.push({tag:"_t",text:new String(f)}),f="")}function A(n,r){if(v(),n&&function(){for(var n=!0,r=g;r<d.length;r++)if(!(n=e.tags[d[r].tag]<e.tags._v||"_t"==d[r].tag&&null===d[r].text.match(t)))return!1;return n}())for(var i,o=g;o<d.length;o++)d[o].text&&((i=d[o+1])&&">"==i.tag&&(i.indent=d[o].text.toString()),d.splice(o,1));else r||d.push({tag:"\n"});h=!1,g=d.length}function b(e,t){var n="="+y,r=e.indexOf(n,t),i=c(e.substring(e.indexOf("=",t)+1,r)).split(" ");return m=i[0],y=i[i.length-1],r+n.length-1}for(r&&(r=r.split(" "),m=r[0],y=r[1]),p=0;p<i;p++)0==o?u(m,n,p)?(--p,v(),o=1):"\n"==n.charAt(p)?A(h):f+=n.charAt(p):1==o?(p+=m.length-1,"="==(a=(s=e.tags[n.charAt(p+1)])?n.charAt(p+1):"_v")?(p=b(n,p),o=0):(s&&p++,o=2),h=p):u(y,n,p)?(d.push({tag:a,n:c(f),otag:m,ctag:y,i:"/"==a?h-m.length:p+y.length}),f="",p+=y.length-1,o=0,"{"==a&&("}}"==y?p++:l(d[d.length-1]))):f+=n.charAt(p);return A(h,!0),d};var f={_t:!0,"\n":!0,$:!0,"/":!0};function d(t,n,r,i){var o,a=[],s=null,l=null;for(o=r[r.length-1];t.length>0;){if(l=t.shift(),o&&"<"==o.tag&&!(l.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[l.tag]<=e.tags.$||h(l,i))r.push(l),l.nodes=d(t,l.tag,r,i);else{if("/"==l.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+l.n);if(s=r.pop(),l.n!=s.n&&!p(l.n,s.n,i))throw new Error("Nesting error: "+s.n+" vs. "+l.n);return s.end=l.i,a}"\n"==l.tag&&(l.last=0==t.length||"\n"==t[0].tag)}a.push(l)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return a}function h(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].o==e.n)return e.tag="#",!0}function p(e,t,n){for(var r=0,i=n.length;r<i;r++)if(n[r].c==e&&n[r].o==t)return!0}function g(e){var t=[];for(var n in e.partials)t.push('"'+y(n)+'":{name:"'+y(e.partials[n].name)+'", '+g(e.partials[n])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var n in e)t.push('"'+y(n)+'": function(c,p,t,i) {'+e[n]+"}");return"{ "+t.join(",")+" }"}(e.subs)}e.stringify=function(t,n,r){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+g(t)+"}"};var m=0;function y(e){return e.replace(o,"\\\\").replace(n,'\\"').replace(r,"\\n").replace(i,"\\r").replace(a,"\\u2028").replace(s,"\\u2029")}function v(e){return~e.indexOf(".")?"d":"f"}function A(e,t){var n="<"+(t.prefix||"")+e.n+m++;return t.partials[n]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+y(n)+'",c,p,"'+(e.indent||"")+'"));',n}function b(e,t){t.code+="t.b(t.t(t."+v(e.n)+'("'+y(e.n)+'",c,p,0)));'}function w(e){return"t.b("+e+");"}e.generate=function(t,n,r){m=0;var i={code:"",subs:{},partials:{}};return e.walk(t,i),r.asString?this.stringify(i,n,r):this.makeTemplate(i,n,r)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,n){var r=this.makePartials(e);return r.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(r,t,this,n)},e.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},e.codegen={"#":function(t,n){n.code+="if(t.s(t."+v(t.n)+'("'+y(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,n),n.code+="});c.pop();}"},"^":function(t,n){n.code+="if(!t.s(t."+v(t.n)+'("'+y(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,n),n.code+="};"},">":A,"<":function(t,n){var r={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,r);var i=n.partials[A(t,n)];i.subs=r.subs,i.partials=r.partials},$:function(t,n){var r={subs:{},code:"",partials:n.partials,prefix:t.n};e.walk(t.nodes,r),n.subs[t.n]=r.code,n.inPartial||(n.code+='t.sub("'+y(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+v(e.n)+'("'+y(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=w('"'+y(e.text)+'"')},"{":b,"&":b},e.walk=function(t,n){for(var r,i=0,o=t.length;i<o;i++)(r=e.codegen[t[i].tag])&&r(t[i],n);return n},e.parse=function(e,t,n){return d(e,0,[],(n=n||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,n){n=n||{};var r=e.cacheKey(t,n),i=this.cache[r];if(i){var o=i.partials;for(var a in o)delete o[a].instance;return i}return i=this.generate(this.parse(this.scan(t,n.delimiters),t,n),t,n),this.cache[r]=i}}(e)}(qf);var Of={};!function(e){!function(e){function t(e,t,n){var r;return t&&"object"==typeof t&&(void 0!==t[e]?r=t[e]:n&&t.get&&"function"==typeof t.get&&(r=t.get(e))),r}e.Template=function(e,t,n,r){e=e||{},this.r=e.code||this.r,this.c=n,this.options=r||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=l(e),s.test(e)?e.replace(n,"&").replace(r,"<").replace(i,">").replace(o,"'").replace(a,"""):e},t:l,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],r=t[n.name];if(n.instance&&n.base==r)return n.instance;if("string"==typeof r){if(!this.c)throw new Error("No compiler available.");r=this.c.compile(r,this.options)}if(!r)return null;if(this.partials[e].base=r,n.subs){for(key in t.stackText||(t.stackText={}),n.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);r=function(e,t,n,r,i,o){function a(){}function s(){}var l;a.prototype=e,s.prototype=e.subs;var c=new a;for(l in c.subs=new s,c.subsText={},c.buf="",r=r||{},c.stackSubs=r,c.subsText=o,t)r[l]||(r[l]=t[l]);for(l in r)c.subs[l]=r[l];for(l in i=i||{},c.stackPartials=i,n)i[l]||(i[l]=n[l]);for(l in i)c.partials[l]=i[l];return c}(r,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=r,r},rp:function(e,t,n,r){var i=this.ep(e,n);return i?i.ri(t,n,r):""},rs:function(e,t,n){var r=e[e.length-1];if(c(r))for(var i=0;i<r.length;i++)e.push(r[i]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,r,i,o,a){var s;return(!c(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,n,r,i,o,a)),s=!!e,!r&&s&&t&&t.push("object"==typeof e?e:t[t.length-1]),s)},d:function(e,n,r,i){var o,a=e.split("."),s=this.f(a[0],n,r,i),l=this.options.modelGet,u=null;if("."===e&&c(n[n.length-2]))s=n[n.length-1];else for(var f=1;f<a.length;f++)void 0!==(o=t(a[f],s,l))?(u=s,s=o):s="";return!(i&&!s)&&(i||"function"!=typeof s||(n.push(u),s=this.mv(s,n,r),n.pop()),s)},f:function(e,n,r,i){for(var o=!1,a=!1,s=this.options.modelGet,l=n.length-1;l>=0;l--)if(void 0!==(o=t(e,n[l],s))){a=!0;break}return a?(i||"function"!=typeof o||(o=this.mv(o,n,r)),o):!i&&""},ls:function(e,t,n,r,i,o){var a=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(l(e.call(t,i,n)),t,r)),this.options.delimiters=a,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,r,i,o,a){var s,l=t[t.length-1],c=e.call(l);return"function"==typeof c?!!r||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,l,t,n,s.substring(i,o),a)):c},mv:function(e,t,n){var r=t[t.length-1],i=e.call(r);return"function"==typeof i?this.ct(l(i.call(r)),r,n):i},sub:function(e,t,n,r){var i=this.subs[e];i&&(this.activeSub=e,i(t,n,this,r),this.activeSub=!1)}};var n=/&/g,r=/</g,i=/>/g,o=/\'/g,a=/\"/g,s=/[&<>\"\']/;function l(e){return String(null==e?"":e)}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(e)}(Of);var Pf=qf;Pf.Template=Of.Template,Pf.template=Pf.Template;var $f=Pf;const zf={};zf["file-summary-line"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<li class="d2h-file-list-line">'),r.b("\n"+n),r.b(' <span class="d2h-file-name-wrapper">'),r.b("\n"+n),r.b(r.rp("<fileIcon0",e,t," ")),r.b(' <a href="#'),r.b(r.v(r.f("fileHtmlId",e,t,0))),r.b('" class="d2h-file-name">'),r.b(r.v(r.f("fileName",e,t,0))),r.b("</a>"),r.b("\n"+n),r.b(' <span class="d2h-file-stats">'),r.b("\n"+n),r.b(' <span class="d2h-lines-added">'),r.b(r.v(r.f("addedLines",e,t,0))),r.b("</span>"),r.b("\n"+n),r.b(' <span class="d2h-lines-deleted">'),r.b(r.v(r.f("deletedLines",e,t,0))),r.b("</span>"),r.b("\n"+n),r.b(" </span>"),r.b("\n"+n),r.b(" </span>"),r.b("\n"+n),r.b("</li>"),r.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}}),zf["file-summary-wrapper"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div class="d2h-file-list-wrapper '),r.b(r.v(r.f("colorScheme",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="d2h-file-list-header">'),r.b("\n"+n),r.b(' <span class="d2h-file-list-title">Files changed ('),r.b(r.v(r.f("filesNumber",e,t,0))),r.b(")</span>"),r.b("\n"+n),r.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),r.b("\n"+n),r.b(' <a class="d2h-file-switch d2h-show">show</a>'),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(' <ol class="d2h-file-list">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("files",e,t,0))),r.b("\n"+n),r.b(" </ol>"),r.b("\n"+n),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["generic-block-header"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b("<tr>"),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.f("lineClass",e,t,0))),r.b(" "),r.b(r.v(r.d("CSSLineClass.INFO",e,t,0))),r.b('"></td>'),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.d("CSSLineClass.INFO",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="'),r.b(r.v(r.f("contentClass",e,t,0))),r.b('">'),r.s(r.f("blockHeader",e,t,1),e,t,0,156,173,"{{ }}")&&(r.rs(e,t,function(e,t,n){n.b(n.t(n.f("blockHeader",e,t,0)))}),e.pop()),r.s(r.f("blockHeader",e,t,1),e,t,1,0,0,"")||r.b(" "),r.b("</div>"),r.b("\n"+n),r.b(" </td>"),r.b("\n"+n),r.b("</tr>"),r.fl()},partials:{},subs:{}}),zf["generic-empty-diff"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b("<tr>"),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.d("CSSLineClass.INFO",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="'),r.b(r.v(r.f("contentClass",e,t,0))),r.b('">'),r.b("\n"+n),r.b(" File without changes"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </td>"),r.b("\n"+n),r.b("</tr>"),r.fl()},partials:{},subs:{}}),zf["generic-file-path"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-file-name-wrapper">'),r.b("\n"+n),r.b(r.rp("<fileIcon0",e,t," ")),r.b(' <span class="d2h-file-name">'),r.b(r.v(r.f("fileDiffName",e,t,0))),r.b("</span>"),r.b("\n"+n),r.b(r.rp("<fileTag1",e,t," ")),r.b("</span>"),r.b("\n"+n),r.b('<label class="d2h-file-collapse">'),r.b("\n"+n),r.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),r.b("\n"+n),r.b(" Viewed"),r.b("\n"+n),r.b("</label>"),r.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}}),zf["generic-line"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b("<tr>"),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.f("lineClass",e,t,0))),r.b(" "),r.b(r.v(r.f("type",e,t,0))),r.b('">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("lineNumber",e,t,0))),r.b("\n"+n),r.b(" </td>"),r.b("\n"+n),r.b(' <td class="'),r.b(r.v(r.f("type",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="'),r.b(r.v(r.f("contentClass",e,t,0))),r.b('">'),r.b("\n"+n),r.s(r.f("prefix",e,t,1),e,t,0,162,238,"{{ }}")&&(r.rs(e,t,function(e,t,r){r.b(' <span class="d2h-code-line-prefix">'),r.b(r.t(r.f("prefix",e,t,0))),r.b("</span>"),r.b("\n"+n)}),e.pop()),r.s(r.f("prefix",e,t,1),e,t,1,0,0,"")||(r.b(' <span class="d2h-code-line-prefix"> </span>'),r.b("\n"+n)),r.s(r.f("content",e,t,1),e,t,0,371,445,"{{ }}")&&(r.rs(e,t,function(e,t,r){r.b(' <span class="d2h-code-line-ctn">'),r.b(r.t(r.f("content",e,t,0))),r.b("</span>"),r.b("\n"+n)}),e.pop()),r.s(r.f("content",e,t,1),e,t,1,0,0,"")||(r.b(' <span class="d2h-code-line-ctn"><br></span>'),r.b("\n"+n)),r.b(" </div>"),r.b("\n"+n),r.b(" </td>"),r.b("\n"+n),r.b("</tr>"),r.fl()},partials:{},subs:{}}),zf["generic-wrapper"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div class="d2h-wrapper '),r.b(r.v(r.f("colorScheme",e,t,0))),r.b('">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("content",e,t,0))),r.b("\n"+n),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["icon-file-added"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),r.b("\n"+n),r.b(' width="14">'),r.b("\n"+n),r.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["icon-file-changed"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),r.b("\n"+n),r.b(' viewBox="0 0 14 16" width="14">'),r.b("\n"+n),r.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["icon-file-deleted"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),r.b("\n"+n),r.b(' viewBox="0 0 14 16" width="14">'),r.b("\n"+n),r.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["icon-file-renamed"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),r.b("\n"+n),r.b(' viewBox="0 0 14 16" width="14">'),r.b("\n"+n),r.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["icon-file"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),r.b("\n"+n),r.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),r.b("\n"+n),r.b("</svg>"),r.fl()},partials:{},subs:{}}),zf["line-by-line-file-diff"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div id="'),r.b(r.v(r.f("fileHtmlId",e,t,0))),r.b('" class="d2h-file-wrapper" data-lang="'),r.b(r.v(r.d("file.language",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="d2h-file-header">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("filePath",e,t,0))),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(' <div class="d2h-file-diff">'),r.b("\n"+n),r.b(' <div class="d2h-code-wrapper">'),r.b("\n"+n),r.b(' <table class="d2h-diff-table">'),r.b("\n"+n),r.b(' <tbody class="d2h-diff-tbody">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("diffs",e,t,0))),r.b("\n"+n),r.b(" </tbody>"),r.b("\n"+n),r.b(" </table>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["line-by-line-numbers"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div class="line-num1">'),r.b(r.v(r.f("oldNumber",e,t,0))),r.b("</div>"),r.b("\n"+n),r.b('<div class="line-num2">'),r.b(r.v(r.f("newNumber",e,t,0))),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["side-by-side-file-diff"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<div id="'),r.b(r.v(r.f("fileHtmlId",e,t,0))),r.b('" class="d2h-file-wrapper" data-lang="'),r.b(r.v(r.d("file.language",e,t,0))),r.b('">'),r.b("\n"+n),r.b(' <div class="d2h-file-header">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.f("filePath",e,t,0))),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(' <div class="d2h-files-diff">'),r.b("\n"+n),r.b(' <div class="d2h-file-side-diff">'),r.b("\n"+n),r.b(' <div class="d2h-code-wrapper">'),r.b("\n"+n),r.b(' <table class="d2h-diff-table">'),r.b("\n"+n),r.b(' <tbody class="d2h-diff-tbody">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.d("diffs.left",e,t,0))),r.b("\n"+n),r.b(" </tbody>"),r.b("\n"+n),r.b(" </table>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(' <div class="d2h-file-side-diff">'),r.b("\n"+n),r.b(' <div class="d2h-code-wrapper">'),r.b("\n"+n),r.b(' <table class="d2h-diff-table">'),r.b("\n"+n),r.b(' <tbody class="d2h-diff-tbody">'),r.b("\n"+n),r.b(" "),r.b(r.t(r.d("diffs.right",e,t,0))),r.b("\n"+n),r.b(" </tbody>"),r.b("\n"+n),r.b(" </table>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b(" </div>"),r.b("\n"+n),r.b("</div>"),r.fl()},partials:{},subs:{}}),zf["tag-file-added"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),r.fl()},partials:{},subs:{}}),zf["tag-file-changed"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),r.fl()},partials:{},subs:{}}),zf["tag-file-deleted"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),r.fl()},partials:{},subs:{}}),zf["tag-file-renamed"]=new $f.Template({code:function(e,t,n){var r=this;return r.b(n=n||""),r.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),r.fl()},partials:{},subs:{}});class jf{constructor({compiledTemplates:e={},rawTemplates:t={}}){const n=Object.entries(t).reduce((e,[t,n])=>{const r=$f.compile(n,{asString:!1});return Object.assign(Object.assign({},e),{[t]:r})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},zf),e),n)}static compile(e){return $f.compile(e,{asString:!1})}render(e,t,n,r,i){const o=this.templateKey(e,t);try{return this.preCompiledTemplates[o].render(n,r,i)}catch(e){throw new Error(`Could not find template to render '${o}'`)}}template(e,t){return this.preCompiledTemplates[this.templateKey(e,t)]}templateKey(e,t){return`${e}-${t}`}}const Vf=Object.assign(Object.assign(Object.assign({},Mf),Rf),{outputFormat:"line-by-line",drawFileList:!0});var Yf=Object.freeze({__proto__:null,defaultDiff2HtmlConfig:Vf,html:function(e,t={}){const n=Object.assign(Object.assign({},Vf),t),r="string"==typeof e?sf(e,n):e,i=new jf(n),{colorScheme:o}=n,a={colorScheme:o};return(n.drawFileList?new Nf(i,a).render(r):"")+("side-by-side"===n.outputFormat?new Hf(i,n).render(r):new Lf(i,n).render(r))},parse:function(e,t={}){return sf(e,Object.assign(Object.assign({},Vf),t))}});function Wf(e=Yf){let t="html";if(Oi(be(e,t)))return e;if(Oi(be(e,["default",t])))return e.default;let n=nc(),r=be(n,"Diff2Html.default",null),i=be(n,"Diff2Html",null);if(Oi(be(r,t)))return r;if(Oi(be(i,t)))return i;throw console.log("Diff2Html",e,"g.Diff2Html",be(n,"Diff2Html")),new Error("invalid Diff2Html, g.Diff2Html, g.Diff2Html.default, use script for import")}var Gf=Object.defineProperty,Jf=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},_f=(e,t)=>{for(var n in t)Gf(e,n,{get:t[n],enumerable:!0})};var Xf,Kf,Zf=Jf(()=>{Xf=class extends Map{constructor(e=100,...t){super(...t),this._maxSize=e}set(e,t){if(this.size>=this._maxSize&&!this.has(e)){let e=this.keys().next().value;void 0!==e&&this.delete(e)}return super.set(e,t)}},Kf={image:new Xf(100),background:new Xf(100),resource:new Xf(150),defaultStyle:new Xf(30),baseStyle:new Xf(50),compress:new Xf(50),computedStyle:new WeakMap,measureHints:new WeakMap,burstAdvice:new WeakMap,warnedReconcile:!1,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}});function ed(e){let t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)return null;let n=t[2].trim();return n.startsWith("#")?null:n}function td(e,t=1){let n=e.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let e of n[1].split(",")){let t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)continue;let n=e.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(n&&!rd.test(n[1].trim()))continue;let i=e.match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)/i),o=1;if(i){let e=parseFloat(i[1]);o=/dpi/i.test(i[2])?e/96:e}r.push({url:t[2].trim(),dppx:o})}return r.length?(r.sort((e,t)=>e.dppx-t.dppx),(r.find(e=>e.dppx>=t)||r[r.length-1]).url):null}function nd(e){if(/%[0-9A-Fa-f]{2}/.test(e))return e;try{return encodeURI(e)}catch{return e}}var rd,id=Jf(()=>{rd=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i});function od(e,t){if(!t||function(e){return/^data:|^blob:|^about:blank$/i.test(e)}(e)||function(e,t){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=t.includes("{url}")?t.split("{url}")[0]:t,i=new URL(r||".",n),o=new URL(e,n);if(o.origin===i.origin)return!0;let a=o.searchParams;if(a&&(a.has("url")||a.has("target")))return!0}catch{}return!1}(e,t))return!1;try{let t=typeof location<"u"&&location.href?location.href:"http://localhost/",n=new URL(e,t);return!(typeof location<"u")||n.origin!==location.origin}catch{return!!t}}function ad(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(e)})}async function sd(e,t={}){let n=t.as??"blob",r=t.timeout??3e3,i=t.useProxy||"",o=t.errorTTL??8e3,a=t.headers||{},s=!!t.silent;if(/^data:/i.test(e))try{if("text"===n)return{ok:!0,data:String(e),status:200,url:e,fromCache:!1};if("dataURL"===n)return{ok:!0,data:String(e),status:200,url:e,fromCache:!1,mime:String(e).slice(5).split(";")[0]||""};let[,t="",r=""]=String(e).match(/^data:([^,]*),(.*)$/)||[],i=/;base64/i.test(t)?atob(r):decodeURIComponent(r),o=new Uint8Array([...i].map(e=>e.charCodeAt(0))),a=new Blob([o],{type:(t||"").split(";")[0]||""});return{ok:!0,data:a,status:200,url:e,fromCache:!1,mime:a.type||""}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(e))try{let t=await fetch(e);if(!t.ok)return{ok:!1,data:null,status:t.status,url:e,fromCache:!1,reason:"http_error"};let r=await t.blob(),i=r.type||t.headers.get("content-type")||"";return"dataURL"===n?{ok:!0,data:await ad(r),status:t.status,url:e,fromCache:!1,mime:i}:"text"===n?{ok:!0,data:await r.text(),status:t.status,url:e,fromCache:!1,mime:i}:{ok:!0,data:r,status:t.status,url:e,fromCache:!1,mime:i}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(e))return"dataURL"===n?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:e,fromCache:!1,mime:"image/png"}:{ok:!0,data:"text"===n?"":new Blob([]),status:200,url:e,fromCache:!1};let l=function(e,t){return[t.as||"blob",t.timeout??3e3,t.useProxy||"",t.errorTTL??8e3,e].join("|")}(e,{as:n,timeout:r,useProxy:i,errorTTL:o}),c=ud.get(l);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&ud.delete(l);let u=cd.get(l);if(u)return u;let f=od(e,i)?function(e,t){if(!t)return e;if(t.includes("{url}"))return t.replace("{urlRaw}",nd(e)).replace("{url}",encodeURIComponent(e));if(/[?&]url=?$/.test(t))return`${t}${encodeURIComponent(e)}`;if(t.endsWith("?"))return`${t}url=${encodeURIComponent(e)}`;if(t.endsWith("/"))return`${t}${nd(e)}`;let n=t.includes("?")?"&":"?";return`${t}${n}url=${encodeURIComponent(e)}`}(e,i):e,d=t.credentials;if(!d)try{let t=typeof location<"u"&&location.href?location.href:"http://localhost/",n=new URL(e,t);d=typeof location<"u"&&n.origin===location.origin?"include":"omit"}catch{d="omit"}let h=new AbortController,p=setTimeout(()=>h.abort("timeout"),r),g=(async()=>{try{let r=await fetch(f,{signal:h.signal,credentials:d,headers:a});if(!r.ok){let i={ok:!1,data:null,status:r.status,url:f,fromCache:!1,reason:"http_error"};if(o>0&&ud.set(l,{until:Date.now()+o,result:i}),!s){let t=`${r.status} ${r.statusText||""}`.trim();ld.warnOnce(`http:${r.status}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,`HTTP error ${t} while fetching ${n} ${e}`)}return t.onError&&t.onError(i),i}if("text"===n)return{ok:!0,data:await r.text(),status:r.status,url:f,fromCache:!1};let i=await r.blob(),c=i.type||r.headers.get("content-type")||"";return"dataURL"===n?{ok:!0,data:await ad(i),status:r.status,url:f,fromCache:!1,mime:c}:{ok:!0,data:i,status:r.status,url:f,fromCache:!1,mime:c}}catch(i){let a=i&&"object"==typeof i&&"name"in i&&"AbortError"===i.name?String(i.message||"").includes("timeout")?"timeout":"abort":"network",c={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:a};if(!/^blob:/i.test(e)&&o>0&&ud.set(l,{until:Date.now()+o,result:c}),!s){let t=`${a}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,i="timeout"===a?`Timeout after ${r}ms. Consider increasing timeout or using a proxy for ${e}`:"abort"===a?`Request aborted while fetching ${n} ${e}`:`Network/CORS issue while fetching ${n} ${e}. A proxy may be required`;ld.errorOnce(t,i)}return t.onError&&t.onError(c),c}finally{clearTimeout(p),cd.delete(l)}})();return cd.set(l,g),g}var ld,cd,ud,fd=Jf(()=>{id(),ld=function(e="[snapDOM]",{ttlMs:t=3e5,maxEntries:n=12}={}){let r=new Map,i=0;function o(o,a,s){if(i>=n)return;let l=Date.now();(r.get(a)||0)>l||(r.set(a,l+t),i++,"warn"===o&&console&&console.warn?console.warn(`${e} ${s}`):console&&console.error&&console.error(`${e} ${s}`))}return{warnOnce(e,t){o("warn",e,t)},errorOnce(e,t){o("error",e,t)},reset(){r.clear(),i=0}}}("[snapDOM]",{ttlMs:18e4,maxEntries:10}),cd=new Map,ud=new Map});async function dd(e,t={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(e)||"none"===e.trim())return e;let n=td(e,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??ed(e);if(!n)return e;let r=function(e,t){if(!e||/^(data|blob|about|#)/i.test(e.trim()))return e;try{let n=t||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(e,n).href}catch{return e}}(n),i=nd(r),o=(t.useProxy||"")+"|"+i;if(Kf.background.has(o)){let e=Kf.background.get(o);return e?`url("${e}")`:"none"}try{let e=await sd(i,{as:"dataURL",useProxy:t.useProxy});return e.ok?(Kf.background.set(o,e.data),`url("${e.data}")`):(Kf.background.set(o,null),"none")}catch{return Kf.background.set(o,null),"none"}}var hd=Jf(()=>{Zf(),id(),fd()});function pd(e){if(e=String(e).toLowerCase(),Id.has(e)){let t={};return Kf.defaultStyle.set(e,t),t}if(Kf.defaultStyle.has(e))return Kf.defaultStyle.get(e);let t=document.getElementById("snapdom-sandbox");t||(t=document.createElement("div"),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t));let n=document.createElement(e);n.style.all="initial",t.appendChild(n);let r=getComputedStyle(n),i={};for(let e of r){if(gd(e))continue;let t=r.getPropertyValue(e);i[e]=t}return t.removeChild(n),Kf.defaultStyle.set(e,i),i}function gd(e){let t=Ed.get(e);if(void 0===t){let n=String(e).toLowerCase();t=Bd.has(n)||Cd.test(n)||xd.test(n),Ed.set(e,t)}return t}function md(e,t){return!Fd.has(e)&&("inline"===t||Sd.has(e)||kd.has(e))}function yd(e,t,n=!0,r=!1){if(t=String(t||"").toLowerCase(),Id.has(t))return"";let i=[],o=pd(t),a=(e.display||"").toLowerCase(),s="inline"===a,l=md(t,a),c=e["text-wrap-mode"]||e["white-space"]||"",u="nowrap"===c||"pre"===c,f=l&&n&&!(l&&n&&!s&&u),d=!1;for(let t in e){if(gd(t))continue;let n=e[t];if(f){if(Dd.has(t))continue;if(Nd.has(t)){n&&n!==o[t]&&(i.push(`${t}:${n}`),"auto"!==n&&(d=!0));continue}}if(n&&n!==o[t]){if(!u&&("width"===t||"inline-size"===t)&&n.endsWith("px")&&n.includes(".")){let e=parseFloat(n);if(Number.isFinite(e)){i.push(`${t}:${(e+Md).toFixed(3)}px`);continue}}i.push(`${t}:${n}`)}}if(f&&!s&&!r&&!d){let t=e.width;t&&"auto"!==t&&t!==o.width&&i.push(`min-width:${t}`)}return i.sort(),i.join(";")}function vd(e,t=null){let n=()=>{let e={length:0,getPropertyValue:()=>"",item:()=>""};return e[Symbol.iterator]=function*(){},e};if(1!==e?.nodeType){let r=typeof window<"u"?window:null;if(r&&"function"==typeof r.getComputedStyle)try{return r.getComputedStyle(e,t)||n()}catch{return n()}return n()}let r=Kf.computedStyle.get(e);r||(r=new Map,Kf.computedStyle.set(e,r));let i=r.get(t);if(!i){let o=function(e){try{let t=e?.ownerDocument;if(!t)return typeof window<"u"?window:null;let n=t.defaultView;if(n&&"function"==typeof n.getComputedStyle)return n;if(typeof window<"u"&&window.frames)for(let e=0;e<window.frames.length;e++)try{if(window.frames[e]?.document===t)return window.frames[e]}catch{}}catch{}return typeof window<"u"?window:null}(e),a=null;try{a=o&&"function"==typeof o.getComputedStyle?o.getComputedStyle(e,t):null}catch{}if(!a&&typeof window<"u"&&"function"==typeof window.getComputedStyle)try{e.ownerDocument===document&&(a=window.getComputedStyle(e,t))}catch{}i=a||n(),r.set(t,i)}return i}function Ad(e){let t={};for(let n of e)t[n]=e.getPropertyValue(n);for(let e of Qd){let n=t[`border-${e}-style`],r=t[`border-${e}-width`];("none"===n||"hidden"===n||"0px"===r)&&(delete t[`border-${e}-style`],delete t[`border-${e}-width`],delete t[`border-${e}-color`])}return t}function bd(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o&&n++,")"===o&&n--,","===o&&0===n&&(t.push(e.slice(r,i).trim()),r=i+1)}return t.push(e.slice(r).trim()),t}var wd,Id,xd,Cd,Bd,Ed,Sd,kd,Fd,Dd,Nd,Md,Td,Qd,Ld=Jf(()=>{Zf(),wd=new Set(["meta","script","noscript","title","link","template"]),Id=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),xd=/(?:^|-)(animation|transition)(?:-|$)/i,Cd=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Bd=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),Ed=new Map,Sd=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),kd=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Fd=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Dd=new Set(["width","max-width","inline-size","max-inline-size"]),Nd=new Set(["min-width","min-inline-size"]),Md=.001,Td=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]),Qd=["top","right","bottom","left"]});function Rd(e,{fast:t=!1}={}){if(t)return e();"requestIdleCallback"in window?requestIdleCallback(e,{timeout:50}):setTimeout(e,1)}function Ud(e=1e3){return"function"!=typeof requestAnimationFrame||typeof document<"u"&&"hidden"===document.visibilityState?Promise.resolve():new Promise(t=>{let n=!1,r=()=>{n||(n=!0,t())};try{requestAnimationFrame(r)}catch{return void r()}setTimeout(r,e)})}function Hd(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||"",t=e.toLowerCase(),n=t.includes("safari")&&!t.includes("chrome")&&!t.includes("crios")&&!t.includes("fxios")&&!t.includes("android"),r=/applewebkit/i.test(e),i=/mobile/i.test(e),o=!/safari/i.test(e),a=r&&i&&o,s=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(e),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(t),c=/ipad|iphone|ipod/.test(t)&&r;return n||a||s||l||c}var qd=Jf(()=>{});function Od(e,t,n){let r=e&&"object"==typeof e&&(e.options||e);r&&r.debug&&(void 0!==n?console.warn("[snapdom]",t,n):console.warn("[snapdom]",t))}var Pd=Jf(()=>{}),$d=Jf(()=>{hd(),Ld(),qd(),id(),Pd()}),zd={};function jd(e){return"string"==typeof e&&/^data:image\/svg\+xml/i.test(e)}function Vd(e){let t=e.indexOf(",");return t>=0?decodeURIComponent(e.slice(t+1)):""}function Yd(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}function Wd(e){let t=[],n="",r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o&&r++,")"===o&&(r=Math.max(0,r-1)),";"===o&&0===r?(t.push(n),n=""):n+=o}return n.trim()&&t.push(n),t.map(e=>e.trim()).filter(Boolean)}function Gd(e){let t=Wd(e),n=null,r=null,i=null,o=[];for(let e of t){let t=e.indexOf(":");if(t<0)continue;let a=e.slice(0,t).trim().toLowerCase(),s=e.slice(t+1).trim();"box-shadow"===a?i=s:"filter"===a?n=s:"-webkit-filter"===a?r=s:o.push([a,s])}if(i){let e=function(e){let t=[],n="",r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o&&r++,")"===o&&(r=Math.max(0,r-1)),","===o&&0===r?(t.push(n.trim()),n=""):n+=o}n.trim()&&t.push(n.trim());let i=[];for(let e of t){if(/\binset\b/i.test(e))continue;let t=e.match(/-?\d+(?:\.\d+)?px/gi)||[],[n="0px",r="0px",o="0px"]=t;o=parseFloat(o)/2+"px";let a=e.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/gi,"").trim().replace(/\s{2,}/g," "),s=!!a&&","!==a;i.push(`drop-shadow(${n} ${r} ${o}${s?` ${a}`:""})`)}return i.join(" ")}(i);e&&(n=n?`${n} ${e}`:e,r=r?`${r} ${e}`:e)}let a=[...o];return n&&a.push(["filter",n]),r&&a.push(["-webkit-filter",r]),a.map(([e,t])=>`${e}:${t}`).join(";")}function Jd(e){return e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,t)=>e.replace(t,function(e){return e.replace(/([^{}]+)\{([^}]*)\}/g,(e,t,n)=>`${t}{${Gd(n)}}`)}(t))),e=e.replace(/style=(['"])([\s\S]*?)\1/gi,(e,t,n)=>`style=${t}${Gd(n)}${t}`)}function _d(e,t){let n=e=>Wd(e).map(e=>{let n=e.indexOf(":");if(n<0)return e;let r=e.slice(0,n).trim().toLowerCase();return"text-shadow"===r||t&&"box-shadow"===r?`${r}:${function(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o?n++:")"===o?n=Math.max(0,n-1):","===o&&0===n&&(t.push(e.slice(r,i)),r=i+1)}return t.push(e.slice(r)),t.map(e=>{let t=0,n=0,r="",i=0;for(;i<e.length;){let o=e[i];if("("===o?t++:")"===o&&(t=Math.max(0,t-1)),0===t&&(0===i||" "===e[i-1])){let t=/^-?\d*\.?\d+px/.exec(e.slice(i));if(t){n++,r+=2===n?-parseFloat(t[0])+"px":t[0],i+=t[0].length;continue}}r+=o,i++}return r}).join(",")}(e.slice(n+1))}`:e}).join(";");return e=(e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,t)=>e.replace(t,t.replace(/([^{}]+)\{([^}]*)\}/g,(e,t,r)=>`${t}{${n(r)}}`)))).replace(/style=(['"])([\s\S]*?)\1/gi,(e,t,r)=>`style=${t}${n(r)}${t}`)}async function Xd(e){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(e))return{svg:e,naturalOnly:!1};let{native:t,flippedY:n}=await(th||(th=(async()=>{try{let e='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',t=new Image;t.decoding="sync",t.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,await t.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let r=n.getContext("2d",{willReadFrequently:!0});r.drawImage(t,0,0);let i=r.getImageData(2,18,1,1).data[3]>128,o=r.getImageData(2,2,1,1).data[3]>128;return{native:i||o,flippedY:o&&!i}}catch{return{native:!1,flippedY:!1}}})(),th));try{let r=e;return t||(r=Jd(r)),n&&(r=_d(r,t)),{svg:r,naturalOnly:!0}}catch{return{svg:e,naturalOnly:!0}}}async function Kd(e,t){let{width:n,height:r,scale:i=1,dpr:o=1,meta:a={},backgroundColor:s,crop:l=null}=t,c=e,u=!1,f=!1;if(l&&!jd(e))throw new RangeError("[snapdom] canvas crop requires an SVG capture payload");if(jd(e)){let t=(function(e){let t=e.indexOf(",");if(t<0)return"";let n=e.slice(t+1,t+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}(e).match(/<svg\b[^>]*>/i)||[])[0]||"",n=parseFloat((t.match(/\bwidth="([\d.]+)/i)||[])[1]),r=parseFloat((t.match(/\bheight="([\d.]+)/i)||[])[1]),i=Number.isFinite(n)&&Number.isFinite(r)&&n>0&&r>0&&Math.min(1,Zd/n,Zd/r,Math.sqrt(eh/(n*r)))<1;if(l||i||Hd())try{let t=Vd(e);if(l&&(t=function(e,t){let n=["x","y","width","height"].map(e=>Number(t?.[e]));if(!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new RangeError("[snapdom] canvas crop requires finite x/y and positive width/height");let r=e.match(/<svg\b[^>]*>/i);if(!r)throw new Error("[snapdom] cannot crop a non-SVG capture");let i=r[0],o=(i.match(/\bviewBox="([^"]+)"/i)||[])[1],a=String(o||"").trim().split(/[\s,]+/).map(Number);if(4!==a.length||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("[snapdom] cannot crop an SVG without a finite viewBox");let[s,l,c,u]=a,f=Math.max(s,n[0]),d=Math.max(l,n[1]),h=Math.min(s+c,n[0]+n[2]),p=Math.min(l+u,n[1]+n[3]);if(!(h>f&&p>d))throw new RangeError("[snapdom] canvas crop does not intersect the SVG viewBox");let g=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),m=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(g)&&g>0?g/c:1,v=Number.isFinite(m)&&m>0?m/u:1,A=Math.max(1,(h-f)*y),b=Math.max(1,(p-d)*v),w=i.replace(/(\bwidth=")[^"]*/i,`$1${A}`).replace(/(\bheight=")[^"]*/i,`$1${b}`).replace(/(\bviewBox=")[^"]*/i,`$1${f} ${d} ${h-f} ${p-d}`);return e.replace(i,w)}(t,l)),Hd()){let e=await Xd(t);t=e.svg,u=e.naturalOnly,f=/@font-face|data:image\//i.test(t)}(i||l)&&(t=function(e){try{let t=e.match(/<svg\b[^>]*>/i);if(!t)return e;let n=t[0],r=parseFloat((n.match(/\bwidth="([\d.]+)/i)||[])[1]),i=parseFloat((n.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(i)||r<=0||i<=0)return e;let o=Math.min(1,Zd/r,Zd/i,Math.sqrt(eh/(r*i)));if(o>=1)return e;let a=Math.max(1,Math.floor(r*o)),s=Math.max(1,Math.floor(i*o));return console.warn(`[snapDOM] Capture ${Math.round(r)}×${Math.round(i)}px exceeds the browser image-decode limit (${Zd}px/side); downscaling to ${a}×${s}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`),e.replace(n,n.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${s}`))}catch{return e}}(t)),c=Yd(t)}catch(t){if(l)throw t;c=e}}let d=new Image;d.loading="eager",d.decoding="sync",d.crossOrigin="anonymous",d.src=c,await d.decode(),Hd()&&await async function(e,t){e.setAttribute("data-snapdom-internal",""),e.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(e);try{let n=document.createElement("canvas");n.width=16,n.height=16;let r=()=>new Promise(e=>{requestAnimationFrame(e),setTimeout(e,50)}),i=n.getContext("2d",{willReadFrequently:!0});if(!i)return await r(),void await r();let o=performance.now()+(t?600:150);for(;;){i.clearRect(0,0,16,16);try{i.drawImage(e,0,0,16,16)}catch{return}let t=i.getImageData(0,0,16,16).data,n=!1;for(let e=3;e<t.length;e+=4)if(t[e]>0){n=!0;break}if(n||performance.now()>o)return;await r()}}finally{try{e.remove()}catch{}}}(d,f);let h,p,g=d.naturalWidth,m=d.naturalHeight,y=l?g:Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:g,v=l?m:Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:m,A=Number.isFinite(n),b=Number.isFinite(r);if(A&&b)h=Math.max(1,n),p=Math.max(1,r);else if(A){h=n,p=v*(n/Math.max(1,y))}else if(b){p=r,h=y*(r/Math.max(1,v))}else h=g,p=m;h*=i,p*=i;let w=h*o,I=p*o,x=Math.max(w/Zd,I/Zd,Math.sqrt(w*I/eh));x>1&&(console.warn(`[snapDOM] Output ${Math.round(w)}×${Math.round(I)}px exceeds the browser canvas limit (${Zd}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),h/=x,p/=x);let C=document.createElement("canvas");C.width=h*o,C.height=p*o,C.style.width=`${h}px`,C.style.height=`${p}px`;let B=C.getContext("2d");if(1!==o&&B.scale(o,o),s&&(B.save(),B.fillStyle=s,B.fillRect(0,0,h,p),B.restore()),!u||Math.round(h*o)===g&&Math.round(p*o)===m)B.drawImage(d,0,0,h,p);else{let e=document.createElement("canvas");e.width=g,e.height=m,e.getContext("2d").drawImage(d,0,0),B.drawImage(e,0,0,h,p)}return C}_f(zd,{decodeSvgFromDataURL:()=>Vd,encodeSvgToDataURL:()=>Yd,fixSafariShadows:()=>Xd,toCanvas:()=>Kd});var Zd,eh,th,nh=Jf(()=>{qd(),Zd=16384,eh=268435456,th=null}),rh={};async function ih(e,t){let n=await Kd(e,t),r=await new Promise(e=>{let r=()=>e(n.toDataURL(`image/${t.format}`,t.quality));try{n.toBlob(t=>{if(!t)return r();let n=new FileReader;n.onload=()=>e(String(n.result||"")),n.onerror=r,n.readAsDataURL(t)},`image/${t.format}`,t.quality)}catch{r()}}),i=new Image;return i.src=r,await i.decode(),i.style.width=n.width/t.dpr+"px",i.style.height=n.height/t.dpr+"px",i}_f(rh,{rasterize:()=>ih});var oh=Jf(()=>{nh()}),ah={};async function sh(e,t){let{scale:n=1,width:r,height:i,meta:o={}}=t,a=Number.isFinite(r),s=Number.isFinite(i),l=Number.isFinite(n)&&1!==n||a||s;if(Hd()&&l)try{let{svg:t}=await Xd(Vd(e)),l=(t.match(/<svg\b[^>]*>/i)||[])[0]||"",c=parseFloat((l.match(/\bwidth="([\d.]+)/i)||[])[1]),u=parseFloat((l.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(c)||!Number.isFinite(u))throw new Error("svg without dimensions");let f,d,h=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:c,p=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u;a&&s?(f=r,d=i):a?(f=r,d=Math.round(p*(r/Math.max(1,h)))):s?(d=i,f=Math.round(h*(i/Math.max(1,p)))):(f=Math.round(c*n),d=Math.round(u*n));let g=t.replace(/width="[^"]*"/,`width="${f}"`).replace(/height="[^"]*"/,`height="${d}"`),m=new Image;return m.decoding="sync",m.loading="eager",m.src=Yd(g),await m.decode(),m.style.width=`${f}px`,m.style.height=`${d}px`,m}catch(n){return Od(t,"safari vector toImg failed, falling back to PNG",n),ih(e,{...t,format:"png",quality:1,meta:o})}let c=new Image;if(c.decoding="sync",c.loading="eager",c.src=e,await c.decode(),a&&s)c.style.width=`${r}px`,c.style.height=`${i}px`;else if(a){let e=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:c.naturalWidth,t=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:c.naturalHeight,n=r/Math.max(1,e);c.style.width=`${r}px`,c.style.height=`${Math.round(t*n)}px`}else if(s){let e=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:c.naturalWidth,t=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:c.naturalHeight,n=i/Math.max(1,t);c.style.height=`${i}px`,c.style.width=`${Math.round(e*n)}px`}else{let r=Math.round(c.naturalWidth*n),i=Math.round(c.naturalHeight*n);if(c.style.width=`${r}px`,c.style.height=`${i}px`,"string"==typeof e&&e.startsWith("data:image/svg+xml"))try{let t=decodeURIComponent(e.split(",")[1]).replace(/width="[^"]*"/,`width="${r}"`).replace(/height="[^"]*"/,`height="${i}"`);e=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,c.src=e}catch(e){Od(t,"SVG width/height patch in toImg failed",e)}}return c}_f(ah,{toImg:()=>sh,toSvg:()=>sh});var lh=Jf(()=>{$d(),oh(),nh()}),ch={};async function uh(e,t){let n=t.type;if("svg"===n){let t=decodeURIComponent(e.split(",")[1]);return new Blob([t],{type:"image/svg+xml"})}let r=await Kd(e,t);return new Promise(e=>r.toBlob(t=>e(t),`image/${n}`,t.quality))}_f(ch,{toBlob:()=>uh});var fh=Jf(()=>{nh()}),dh={};async function hh(e,t){let n=new File([e],t,{type:e.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:t})}catch(e){if("AbortError"!==e.name)return!1}return!0}async function ph(e,t){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(t?.type||"").toLowerCase(),i=n.has(r)?r:"",o=(t?.format||i||"").toLowerCase(),a="jpg"===o?"jpeg":o||"png",s=t?.filename||`snapdom.${a}`,l={...t||{},format:a,type:a};l.dpr=1;let c=function(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return"iOS"===navigator.userAgentData.platform;let e=navigator.userAgent||"",t=/iPhone|iPad|iPod/.test(e),n=navigator.maxTouchPoints>2&&/Macintosh/.test(e);return t||n}();if("svg"===a){let t=await uh(e,{...l,type:"svg"});if(c&&await hh(t,s))return;let n=URL.createObjectURL(t),r=document.createElement("a");return r.href=n,r.download=s,document.body.appendChild(r),r.click(),URL.revokeObjectURL(n),void r.remove()}let u=await Kd(e,l);if(c){let e=`image/${a}`,n=await new Promise(n=>u.toBlob(n,e,t?.quality));if(n&&await hh(n,s))return}let f=document.createElement("a");f.href=u.toDataURL(`image/${a}`,t?.quality),f.download=s,document.body.appendChild(f),f.click(),f.remove()}_f(dh,{download:()=>ph});var gh=Jf(()=>{fh(),nh(),qd()});$d(),$d(),Zf();var mh=new WeakMap,yh=new Map,vh=0;function Ah(){vh++,yh.size>2e3&&yh.clear()}function bh(e){let t=e&&(1===e.nodeType?e:e.parentElement);return!!(t&&t.closest&&t.closest("[data-snapdom-sandbox],[data-snapdom-internal],[data-snapdom]"))}function wh(e){for(let t of e)if(!bh(t.target)){if("childList"===t.type){let e=!0;for(let n of t.addedNodes)if(!bh(n)){e=!1;break}if(e)for(let n of t.removedNodes)if(!bh(n)){e=!1;break}if(e)continue}return!0}return!1}var Ih=!1;var xh=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function Ch(e){let t=mh.get(e);if(t&&t.epoch===vh){let e=t.snapshot&&t.snapshot.__needsBgInline;if(void 0!==e)return e}return!0}function Bh(e,t,n){try{if("function"==typeof e.computedStyleMap){let t=e.computedStyleMap().get("width");if(null!=t)return!Sh(String(t).trim().toLowerCase())}}catch{}let r=e.style&&(e.style.width||e.style.inlineSize);return!(!r||Sh(String(r).trim().toLowerCase()))||!!function(e,t){let n=e.getBoundingClientRect().width-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0)-(parseFloat(t.borderLeftWidth)||0)-(parseFloat(t.borderRightWidth)||0);if(!(n>0))return!1;let r=1/0,i=-1/0,o=null;for(let t=e.firstChild;t;t=t.nextSibling){let e;if(3===t.nodeType){if(!/\S/.test(t.nodeValue||"")||(o=o||document.createRange(),o.selectNode(t),e=o.getBoundingClientRect(),!e.width&&!e.height))continue}else{if(1!==t.nodeType)continue;{let n=vd(t);if("none"===n.display||"absolute"===n.position||"fixed"===n.position)continue;e=t.getBoundingClientRect()}}e.left<r&&(r=e.left),e.right>i&&(i=e.right)}return i!==-1/0&&i-r<n-.5}(e,t)&&(n||function(e,t){let n=e.parentElement;if(!n)return!1;let r=vd(n),i=n.getBoundingClientRect().width-(parseFloat(r.paddingLeft)||0)-(parseFloat(r.paddingRight)||0)-(parseFloat(r.borderLeftWidth)||0)-(parseFloat(r.borderRightWidth)||0)-(parseFloat(t.marginLeft)||0)-(parseFloat(t.marginRight)||0);return i>0&&Math.abs(e.getBoundingClientRect().width-i)>.5}(e,t))}var Eh=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function Sh(e){return Eh.has(e)||e.startsWith("fit-content")}var kh=new WeakMap;function Fh(e,t=null,n={}){let r=mh.get(e),i=!(!n||!n.embedFonts),o=n&&n.excludeStyleProps||null;if(r&&r.epoch===vh&&r.embedFonts===i&&r.excludeStyleProps===o)return r.snapshot;let a=t||getComputedStyle(e),s=function(e,t={}){let n={},r=t.excludeStyleProps;for(let t=0;t<e.length;t++){let i=e[t];if(gd(i)||r&&(r instanceof RegExp&&r.test(i)||"function"==typeof r&&r(i)))continue;let o=e.getPropertyValue(i);("background-image"===i||"content"===i)&&o.includes("url(")&&!o.includes("data:")&&(o="none"),n[i]=o}let i=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let t of i)if(!n[t])try{let r=e.getPropertyValue(t);r&&(n[t]=r)}catch{}let o=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let t of o)if(!n[t])try{let r=e.getPropertyValue(t);r&&(n[t]=r)}catch{}if(t.embedFonts){let t=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let r of t)if(!n[r])try{let t=e.getPropertyValue(r);t&&(n[r]=t)}catch{}}try{"hidden"===(n["content-visibility"]||e.getPropertyValue("content-visibility"))&&(n["content-visibility"]="hidden")}catch{}let a=!1;{let t=e.getPropertyValue("background-image");if(t&&"none"!==t&&(a=!0),!a){let t=e.getPropertyValue("background-color");t&&"rgba(0, 0, 0, 0)"!==t&&"transparent"!==t&&(a=!0)}if(!a)for(let t of xh){let n=e.getPropertyValue(t);if(n&&"none"!==n){a=!0;break}}if(!a){let t=e.getPropertyValue("background");t&&/url\s*\(/i.test(t)&&(a=!0)}}Object.defineProperty(n,"__needsBgInline",{value:a,enumerable:!1});let s=parseFloat(e.getPropertyValue("border-top-width")||0)||0,l=parseFloat(e.getPropertyValue("border-right-width")||0)||0,c=parseFloat(e.getPropertyValue("border-bottom-width")||0)||0,u=parseFloat(e.getPropertyValue("border-left-width")||0)||0;if(0===s&&0===l&&0===c&&0===u){let t=(e.getPropertyValue("border-image-source")||"").trim(),r=t&&"none"!==t,i=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color"];for(let e of i)delete n[e];r||(n.border="none")}return n}(a,n);return function(e,t,n){if(e instanceof HTMLElement&&e.style&&e.style.height)return;let r=e.tagName&&e.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r)||t.aspectRatio&&"none"!==t.aspectRatio&&"auto"!==t.aspectRatio)return;let i=t.display||"";if(i.includes("flex")||i.includes("grid"))return;let o=t.position;if("absolute"===o||"fixed"===o||"sticky"===o||"none"!==t.transform||function(e){return!!(e.backgroundImage&&"none"!==e.backgroundImage||e.backgroundColor&&"rgba(0, 0, 0, 0)"!==e.backgroundColor&&"transparent"!==e.backgroundColor||(parseFloat(e.borderTopWidth)||0)>0||(parseFloat(e.borderBottomWidth)||0)>0||(parseFloat(e.paddingTop)||0)>0||(parseFloat(e.paddingBottom)||0)>0)||"visible"!==(e.overflowBlock||e.overflowY||"visible")}(t)||Nh(e))return;let a=t.overflowX||t.overflow||"visible",s=t.overflowY||t.overflow||"visible";if("visible"!==a||"visible"!==s)return;let l=t.clip;if(l&&"auto"!==l&&"rect(auto, auto, auto, auto)"!==l||"hidden"===t.visibility||"0"===t.opacity||!function(e){for(let t=e.firstChild;t;t=t.nextSibling)if(3===t.nodeType&&/\S/.test(t.nodeValue))return!0;let t=e.firstElementChild,n=e.lastElementChild;if(t&&"BR"===t.tagName||n&&"BR"===n.tagName)return!0;for(let t=e.firstElementChild;t;t=t.nextElementSibling){let e=vd(t);if("none"===e.display)continue;let n=e.position;if("absolute"!==n&&"fixed"!==n)return!0}return!1}(e))return;let c=parseFloat(t.height),u=function(e){let t=e.getBoundingClientRect().top,n=-1/0,r=null;for(let t=e.firstChild;t;t=t.nextSibling){if(3===t.nodeType){if(!/\S/.test(t.nodeValue||""))continue;r=r||document.createRange(),r.selectNode(t);let e=r.getBoundingClientRect();(e.width||e.height)&&(n=Math.max(n,e.bottom));continue}if(1!==t.nodeType)continue;let e=vd(t);if("none"===e.display)continue;let i=e.position;"absolute"===i||"fixed"===i||e.float&&"none"!==e.float||(n=Math.max(n,t.getBoundingClientRect().bottom))}return n===-1/0?NaN:n-t}(e);Number.isFinite(c)&&Number.isFinite(u)&&Math.abs(c-u)>2||(delete n.height,delete n["block-size"])}(e,a,s),mh.set(e,{epoch:vh,snapshot:s,embedFonts:i,excludeStyleProps:o}),s}async function Dh(e,t,n,r){if("STYLE"===e.tagName)return;let i=function(e,t){return e&&e.session&&e.persist?e:e&&(e.styleMap||e.styleCache||e.nodeMap)?{session:e,persist:{snapshotKeyCache:yh,defaultStyle:Kf.defaultStyle,baseStyle:Kf.baseStyle,image:Kf.image,resource:Kf.resource,background:Kf.background,font:Kf.font},options:t||{}}:{session:Kf.session,persist:{snapshotKeyCache:yh,defaultStyle:Kf.defaultStyle,baseStyle:Kf.baseStyle,image:Kf.image,resource:Kf.resource,background:Kf.background,font:Kf.font},options:e||t||{}}}(n,r),o=i.options&&i.options.cache||"auto";"disabled"!==o&&function(e=document.documentElement){if(Ih)return;Ih=!0;let t=e=>{wh(e)&&Ah()};try{new MutationObserver(t).observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(t).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let e=document.fonts;e&&(e.addEventListener?.("loadingdone",Ah),e.ready?.then(()=>Ah()).catch(()=>{}))}catch{}}(document.documentElement),"disabled"===o&&!i.session.__bumpedForDisabled&&(Ah(),yh.clear(),i.session.__bumpedForDisabled=!0);let{session:a,persist:s}=i;if(!a.styleCache.has(e)){let t=null;try{t=getComputedStyle(e)}catch{}a.styleCache.set(e,t||getComputedStyle(document.documentElement))}let l=a.styleCache.get(e);e.getAttribute?.("style")&&function(e,t,n){if(e.style&&0!==e.style.length)for(let r=0;r<e.style.length;r++){let i=e.style[r],o=n.getPropertyValue(i);o&&t.style.setProperty(i,o)}}(e,t,l);let c=l.getPropertyValue("animation-name");t&&t.style&&c&&"none"!==c&&t.style.setProperty("animation","none","important");let u=Fh(e,l,i.options),f=Nh(e);if(f){let e=l.getPropertyValue("min-width");(!e||"auto"===e||"0px"===e)&&(u["min-width"]="0px")}let d=e.tagName?.toLowerCase()||"div",h=function(e){let t=kh.get(e);return t||(t=Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0).map(([e,t])=>`${e}:${t}`).join(";"),kh.set(e,t),t)}(u),p=!0;if(md(d,(u.display||"").toLowerCase())){p=function(e){for(let t=e.firstChild;t;t=t.nextSibling){if(3===t.nodeType&&/\S/.test(t.nodeValue||""))return!0;if(1===t.nodeType){let e=vd(t).position;if("absolute"!==e&&"fixed"!==e)return!0}}return!1}(e),p&&function(e,t,n){let r=(t.display||"").toLowerCase();if("inline"===r||kd.has(e))return!1;if(n)return!0;if("none"!==(t.float||"none").toLowerCase())return!1;let i=(t.position||"static").toLowerCase();return"absolute"!==i&&"fixed"!==i&&!Td.has(r)}(d,u,f)&&Bh(e,l,f)&&(p=!1),h=`${h}|${d}${p?"|c":""}${f?"|f":""}`;let t=u["text-wrap-mode"]||u["white-space"]||"";p&&"nowrap"!==t&&"pre"!==t&&(a.reconcileRisk=(a.reconcileRisk||0)+1)}let g=s.snapshotKeyCache.get(h);void 0===g&&(g=yd(u,d,p,f),s.snapshotKeyCache.set(h,g)),a.styleMap.set(t,g)}function Nh(e){let t=e.parentElement;if(!t)return!1;let n=vd(t).display||"";return n.includes("flex")||n.includes("grid")}Ld();var Mh=["fill","stroke","color","background-color","stop-color"],Th=new Set(["symbol","defs","pattern","marker","linearGradient","radialGradient","filter"]);function Qh(e){let t=e;for(;t&&1===t.nodeType;){if("http://www.w3.org/2000/svg"===t.namespaceURI){if("mask"===t.localName||"clipPath"===t.localName)return!1;if(Th.has(t.localName))return!0}t=t.parentNode}return!1}var Lh=new Map;function Rh(e,t){if(1!==e?.nodeType||1!==t?.nodeType||Qh(e))return;let n=e.getAttribute?.("style"),r=!(!n||!n.includes("var("));if(!r&&e.attributes?.length){let t=e.attributes;for(let e=0;e<t.length;e++){let n=t[e];if(n&&"string"==typeof n.value&&n.value.includes("var(")){r=!0;break}}}let i=null;if(r)try{i=getComputedStyle(e)}catch{}if(r){let n=e.style;if(n&&n.length){let e=new Set;for(let r=0;r<n.length;r++){let o=n[r];if(e.has(o))continue;e.add(o);let a=n.getPropertyValue(o);if(!a||!a.includes("var("))continue;let s=i&&i.getPropertyValue(o);if(s)try{t.style.setProperty(o,s.trim(),n.getPropertyPriority(o))}catch{}}}}if(r&&e.attributes?.length){let n=e.attributes;for(let e=0;e<n.length;e++){let r=n[e];if(!r||"string"!=typeof r.value||!r.value.includes("var("))continue;let o=r.name,a=i&&i.getPropertyValue(o);if(a)try{t.style.setProperty(o,a.trim())}catch{}}}if(!r){if(!i)try{i=getComputedStyle(e)}catch{i=null}if(!i)return;let n=e.namespaceURI||"html",r=function(e,t){let n=t+"::"+e.toLowerCase(),r=Lh.get(n);if(r)return r;let i=document,o="http://www.w3.org/2000/svg"===t?i.createElementNS(t,e):i.createElement(e),a=i.createElement("div");a.setAttribute("data-snapdom-internal",""),a.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",a.appendChild(o),i.documentElement.appendChild(a);let s=getComputedStyle(o),l={};for(let e of Mh)l[e]=s.getPropertyValue(e)||"";return a.remove(),Lh.set(n,l),l}(e.tagName,n);for(let e of Mh){let n=i.getPropertyValue(e)||"",o=r[e]||"";if(n&&n!==o)try{t.style.setProperty(e,n.trim())}catch{}}}}function Uh(e){return!!(!e||e.startsWith("data:")||e.startsWith("blob:")||/^data:image\/(gif|png|svg)/.test(e)&&e.length<200)}$d(),$d(),Zf(),fd(),fd();var Hh="img[data-src], img[data-lazy-src], img[data-original], img[data-hi-res-src], img[data-srcset], img[data-lazy-srcset]";var qh=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i;function Oh(e,t){if(!e)return null;let n=0;try{n=t?t.getBoundingClientRect().width||t.width:0}catch{}n||(n=window.innerWidth||1e3);let r=[];for(let t of e.split(",")){let e=t.trim().split(/\s+/);if(!e[0])continue;let i=e[1]||"",o=1;/^\d*\.?\d+x$/i.test(i)?o=parseFloat(i):/^\d+w$/i.test(i)&&(o=parseInt(i,10)/n),r.push({url:e[0],d:o})}if(!r.length)return null;r.sort((e,t)=>e.d-t.d);let i=window.devicePixelRatio||1;return(r.find(e=>e.d>=i)||r[r.length-1]).url}function Ph(e,t){let n=e.currentSrc||"";if(n&&!Uh(n))return n;let r=t.querySelectorAll("source[srcset]"),i=null;for(let t of r){let n=t.getAttribute("srcset");if(!n||Uh(n))continue;let r=t.getAttribute("type");if(r&&!qh.test(r.trim()))continue;let o=t.getAttribute("media");if(o)try{if(window.matchMedia(o).matches)return Oh(n,e)}catch{}i||(i=Oh(n,e))}return i}function $h(e){let t=[e.getAttribute("data-src"),e.getAttribute("data-lazy-src"),e.getAttribute("data-original"),e.getAttribute("data-hi-res-src")];for(let e of t)if(e&&!Uh(e))return e;let n=e.getAttribute("data-srcset")||e.getAttribute("data-lazy-srcset");if(n){let e=n.split(",")[0].trim().split(/\s+/)[0];if(e&&!Uh(e))return e}return null}async function zh(e,t={}){if(!e||1!==e?.nodeType||!1===t.resolvePicturePlaceholders)return null;let{timeout:n,concurrency:r,resolveLazySrc:i,silent:o,useProxy:a}=function(e={}){let t=e.pictureResolver&&"object"==typeof e.pictureResolver?e.pictureResolver:{};return{timeout:t.timeout??5e3,concurrency:t.concurrency??4,resolveLazySrc:!1!==t.resolveLazySrc,silent:t.silent??!1,useProxy:"string"==typeof e.useProxy?e.useProxy:""}}(t);if(!function(e,t){return!!(e&&1===e?.nodeType&&(e.matches?.("picture")||e.querySelector("picture")||t&&(e.matches?.(Hh)||e.querySelector(Hh))))}(e,i))return null;let s=[],l=[];async function c(e){let t=await sd(e,{as:"dataURL",timeout:n,useProxy:a,silent:!0});return t.ok?t.data:null}let u=Array.from(e.querySelectorAll("picture"));e.matches?.("picture")&&u.unshift(e);for(let e of u){let t=e.querySelector("img");if(!t)continue;if(!Uh(t.getAttribute("src")||""))continue;let n=Ph(t,e);n&&l.push(async()=>{let r=await c(n);if(!r)return void(o||console.warn(`[snapdom:picture-resolver] Failed to fetch: ${n.slice(0,60)}`));let i=t.getAttribute("src"),a=t.getAttribute("srcset"),l=t.getAttribute("sizes"),u=[];t.src=r,t.setAttribute("src",r),t.removeAttribute("srcset"),t.removeAttribute("sizes");let f=e.querySelectorAll("source");for(let e of f)u.push({el:e,parent:e.parentElement,next:e.nextSibling}),e.remove();s.push(()=>{null!==i?t.setAttribute("src",i):t.removeAttribute("src"),null!==a&&t.setAttribute("srcset",a),null!==l&&t.setAttribute("sizes",l);for(let{el:e,parent:t,next:n}of u)t&&t.insertBefore(e,n)})})}if(i){let t=Array.from(e.querySelectorAll("img"));"img"===e.localName&&t.unshift(e);for(let e of t){if(e.closest("picture")&&Uh(e.getAttribute("src")||""))continue;let t=e.getAttribute("src")||"",n=$h(e);n&&Uh(t)&&l.push(async()=>{let t=await c(n);if(!t)return;let r=e.getAttribute("src");e.src=t,e.setAttribute("src",t),e.removeAttribute("srcset"),e.removeAttribute("sizes"),s.push(()=>{null!==r?e.setAttribute("src",r):e.removeAttribute("src")})})}}return 0===l.length?null:(await async function(e){for(let t=0;t<e.length;t+=r){let n=e.slice(t,t+r);await Promise.allSettled(n.map(e=>e()))}}(l),async function(){for(let e of s)try{e()}catch{}})}function jh(e,t,n){return n?Promise.all(e.map(e=>new Promise(n=>t(e,n)))):Promise.all(e.map(e=>new Promise(r=>{!function i(){Rd(n=>{!n||"function"!=typeof n.timeRemaining||n.timeRemaining()>0?t(e,r):i()},{fast:n})}()})))}function Vh(e,t,n){return e?(e=(e=(e=(e=(e=e.replace(/:host\(([^)]+)\)/g,(e,n)=>`:where(${t}:is(${n.trim()}))`)).replace(/:host\b/g,`:where(${t})`)).replace(/:host-context\(([^)]+)\)/g,(e,n)=>`:where(:where(${n.trim()}) ${t})`)).replace(/::slotted\(([^)]+)\)/g,(e,n)=>`:where(${t} ${n.trim()})`)).replace(/(^|})(\s*)([^@}{]+){/g,(e,r,i,o)=>{let a=function(e,t,n=!0,r){return e.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{if(e.startsWith(":where(")||e.startsWith("@"))return e;let i=n?function(e,t){if(!(e=e.trim()))return e;let n=t?`[data-sd-slotted~="${t}"]`:"[data-sd-slotted]";return e.endsWith(":not([data-sd-slotted])")||e.endsWith(`:not(${n})`)?e:`${e}:not(${n})`}(e,r):e;return`:where(${t} ${i})`}).join(", ")}(o,t,!0,n);return`${r}${i}${a}{`}),e):""}function Yh(e,t){try{let n=getComputedStyle(e).getPropertyValue(t).trim();if(n)return n}catch{}try{let e=getComputedStyle(document.documentElement).getPropertyValue(t).trim();if(e)return e}catch{}return""}function Wh(e){let t=0,n=0;if(e.offsetWidth>0&&(t=e.offsetWidth),e.offsetHeight>0&&(n=e.offsetHeight),0===t||0===n)try{let r=getComputedStyle(e);if(0===t){let e=parseFloat(r.width);!isNaN(e)&&e>0&&(t=e)}if(0===n){let e=parseFloat(r.height);!isNaN(e)&&e>0&&(n=e)}}catch{}if(0===t||0===n)try{if(0===t){let n=parseFloat(e.getAttribute("width"));!isNaN(n)&&n>0&&(t=n)}if(0===n){let t=parseFloat(e.getAttribute("height"));!isNaN(t)&&t>0&&(n=t)}}catch{}if((0===t||0===n)&&(e.naturalWidth||e.naturalHeight))try{0===t&&e.naturalWidth>0&&(t=e.naturalWidth),0===n&&e.naturalHeight>0&&(n=e.naturalHeight)}catch{}return{width:t,height:n}}async function Gh(e,t,n){let r=await async function(e,t=3){let n=()=>{try{return e.contentDocument||e.contentWindow?.document||null}catch{return null}},r=n(),i=0;for(;i<t&&(!r||!r.body&&!r.documentElement);)await new Promise(e=>setTimeout(e,0)),r=n(),i++;return r&&(r.body||r.documentElement)?r:null}(e,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:i,contentHeight:o,rect:a}=function(e){let t=e.getBoundingClientRect(),n=0,r=0,i=0,o=0;try{let t=getComputedStyle(e);n=parseFloat(t.borderLeftWidth)||0,r=parseFloat(t.borderRightWidth)||0,i=parseFloat(t.borderTopWidth)||0,o=parseFloat(t.borderBottomWidth)||0}catch{}return{contentWidth:Math.max(0,Math.round(t.width-(n+r))),contentHeight:Math.max(0,Math.round(t.height-(i+o))),rect:t}}(e),s=n?.snap;if(!s&&typeof window<"u"&&window.snapdom&&(s=window.snapdom),!s||"function"!=typeof s.toPng)throw new Error("[snapdom] iframe capture requires snapdom.toPng. Use snapdom(el) or pass options.snap. With ESM, assign window.snapdom = snapdom after import if using iframes.");let l,c={...n,scale:1,clip:null},u=function(e,t,n){let r=e.defaultView,i=r?r.scrollX:0,o=r?r.scrollY:0,a=e.body?e.body.scrollLeft:0,s=e.body?e.body.scrollTop:0,l=e.documentElement?e.documentElement.scrollLeft:0,c=e.documentElement?e.documentElement.scrollTop:0,u=0,f=0,d=0,h=0;try{let t=r&&e.body?r.getComputedStyle(e.body):null;t&&(u=(parseFloat(t.marginTop)||0)+(parseFloat(t.paddingTop)||0),f=(parseFloat(t.marginRight)||0)+(parseFloat(t.paddingRight)||0),d=(parseFloat(t.marginBottom)||0)+(parseFloat(t.paddingBottom)||0),h=(parseFloat(t.marginLeft)||0)+(parseFloat(t.paddingLeft)||0))}catch{}try{e.documentElement.setAttribute("data-sd-pinned","")}catch{}let p=e.createElement("style");return p.setAttribute("data-sd-iframe-pin",""),p.textContent=`html {margin: 0 !important;padding: 0 !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${u}px ${f}px ${d}px ${h}px !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(e.head||e.documentElement).appendChild(p),()=>{try{p.remove()}catch{}try{e.documentElement.removeAttribute("data-sd-pinned")}catch{}try{r&&"function"==typeof r.scrollTo&&r.scrollTo(i,o),e.body&&(e.body.scrollLeft=a,e.body.scrollTop=s),e.documentElement&&(e.documentElement.scrollLeft=l,e.documentElement.scrollTop=c)}catch{}}}(r,i,o),f=Kf.session.nodeMap,d=Kf.session.styleMap,h=Kf.session.styleCache;try{l=await s.toPng(r.documentElement,c)}finally{u(),Kf.session.nodeMap=f,Kf.session.styleMap=d,Kf.session.styleCache=h}l.style.display="block",l.style.width=`${i}px`,l.style.height=`${o}px`;let p=document.createElement("div");return t.nodeMap.set(p,e),Dh(e,p,t,n),p.style.overflow="hidden",p.style.display="block",p.style.width||(p.style.width=`${Math.round(a.width)}px`),p.style.height||(p.style.height=`${Math.round(a.height)}px`),p.appendChild(l),p}var Jh=new Xf(80);async function _h(e){if(Kf.resource?.has(e))return Kf.resource.get(e);if(Jh.has(e))return Jh.get(e);let t=(async()=>{let t=await sd(e,{as:"dataURL",silent:!0});if(!t.ok||"string"!=typeof t.data)throw new Error(`[snapDOM] Failed to read blob URL: ${e}`);return Kf.resource?.set(e,t.data),t.data})();Jh.set(e,t);try{let n=await t;return Jh.set(e,n),n}catch(t){throw Jh.delete(e),t}}var Xh=/\bblob:[^)"'\s]+/g;async function Kh(e){if(!e||-1===e.indexOf("blob:"))return e;let t=Array.from(new Set(e.match(Xh)||[]));if(0===t.length)return e;let n=e;for(let e of t)try{let t=await _h(e);n=n.split(e).join(t)}catch{}return n}function Zh(e){return"string"==typeof e&&e.startsWith("blob:")}function ep(e){return(e||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let t=e.match(/^(\S+)(\s+.+)?$/);return t?{url:t[1],desc:t[2]||""}:null}).filter(Boolean)}function tp(e){return e.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function np(e,t){let n=e.querySelectorAll?Array.from(e.querySelectorAll(t)):[];return e.matches?.(t)&&n.unshift(e),n}qd();var rp=new Map,ip=new Set(["IFRAME"]);function op(e,t){rp.set(String(e).toUpperCase(),t)}function ap(e){let{width:t,height:n}=Wh(e),r=t,i=n;if(!r||!i){let t=e.getBoundingClientRect();r=r||t.width||0,i=i||t.height||0}let o=document.createElement("div");return o.style.cssText=`display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`,o}var sp=200,lp=new Set(["img","canvas","video","iframe","object","embed"]);function cp(e,t){return e.right>=t.left-sp&&e.left<=t.right+sp&&e.bottom>=t.top-sp&&e.top<=t.bottom+sp}async function up(e,t,n){if(!e)throw new Error("Invalid node");let r,i=new Set,o=null,a=null;if(e.nodeType===Node.ELEMENT_NODE){let n=(e.localName||e.tagName||"").toLowerCase();if("snapdom-sandbox"===e.id||e.hasAttribute("data-snapdom-sandbox")||wd.has(n))return null;if("foreignobject"===n&&e.parentElement?.closest?.("foreignObject"))return Od(t,"Nested <foreignObject> skipped (SVG spec limitation — not rendered by browsers)"),null;if("source"===n&&"picture"===e.parentElement?.localName)return null}if(e.nodeType===Node.TEXT_NODE||e.nodeType!==Node.ELEMENT_NODE)return e.cloneNode(!0);if("exclude"===e.getAttribute("data-capture")){if("hide"===n.excludeMode)return ap(e);if("remove"===n.excludeMode)return null}if(n.exclude&&Array.isArray(n.exclude))for(let t of n.exclude)try{if(e.matches?.(t)){if("hide"===n.excludeMode)return ap(e);if("remove"===n.excludeMode)return null}}catch(e){console.warn(`Invalid selector in exclude option: ${t}`,e)}if("function"==typeof n.filter)try{if(!n.filter(e)){if("hide"===n.filterMode)return ap(e);if("remove"===n.filterMode)return null}}catch(e){console.warn("Error in filter function:",e)}if(t.clip&&function(e,t){if(e===t.root)return!1;let n;try{n=e.getBoundingClientRect()}catch{return!1}if(0===n.width&&0===n.height)return!1;let r=vd(e);if("inline"===r.display&&!lp.has((e.localName||"").toLowerCase()))return!1;let i=t.rect,o=e.scrollWidth||0,a=e.scrollHeight||0,s={left:"rtl"===r.direction?Math.min(n.left,n.right-o):n.left,top:n.top,right:Math.max(n.right,n.left+o),bottom:Math.max(n.bottom,n.top+a)},l=r.writingMode||"";if((l.startsWith("vertical")||l.startsWith("sideways"))&&(s.top=Math.min(n.top,n.bottom-a),s.left=Math.min(s.left,n.right-o)),cp(s,i))return!1;let c=(e.ownerDocument||document).createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;c.nextNode();){let e=c.currentNode.getBoundingClientRect();if((e.width>0||e.height>0)&&cp(e,i))return!1}return!0}(e,t.clip))return function(e,t,n){let r=e.cloneNode(!1);"IMG"===e.tagName&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),Dh(e,r,t,n);let{width:i,height:o}=Wh(e);return i>0&&(r.style.width=`${i}px`,r.style.minWidth=`${i}px`,r.style.maxWidth=`${i}px`),o>0&&(r.style.height=`${o}px`,r.style.minHeight=`${o}px`,r.style.maxHeight=`${o}px`),r.style.visibility="hidden",r.style.overflow="hidden",r.style.boxSizing="border-box",r}(e,t,n);if(n.__resolveNodeHooks)for(let r of n.__resolveNodeHooks){let i;try{i=await r(e,n)}catch(e){Od(t,"resolveNode plugin hook failed",e)}if(null===i)return null;if(i instanceof Node)return i.nodeType===Node.ELEMENT_NODE&&(t.nodeMap.set(i,e),Dh(e,i,t,n)),i}{let r=ip.has(e.tagName)&&rp.get(e.tagName);if(r){let i=await r(e,t,n);if(void 0!==i)return i}}if("placeholder"===e.getAttribute("data-capture")){let r=e.cloneNode(!1);t.nodeMap.set(r,e),Dh(e,r,t,n);let i=document.createElement("div");return i.textContent=e.getAttribute("data-placeholder-text")||"",i.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",r.appendChild(i),r}{let r=!ip.has(e.tagName)&&rp.get(e.tagName);if(r){let i=await r(e,t,n);if(void 0!==i)return i}}try{if(r=e.cloneNode(!1),r.attributes?.length)try{for(let e of r.attributes)/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(e.value)&&r.setAttribute(e.name,e.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,""))}catch{}if(Rh(e,r),t.nodeMap.set(r,e),"IMG"===e.tagName){!function(e,t){try{let n=null,r=vd(e).content;if(r&&r.includes("url(")){let e=r.match(/url\(["']?([^"')]+)["']?\)/);e&&(n=e[1])}let i=e.closest?.("picture"),o=n||(i?Ph(e,i):e.currentSrc)||e.src||Oh(e.getAttribute("srcset"),e)||"";if(!o)return;t.setAttribute("src",o),t.removeAttribute("srcset"),t.removeAttribute("sizes"),t.loading="eager",t.decoding="sync"}catch{}}(e,r);try{let{width:t,height:n}=Wh(e),i=Math.round(t||0),o=Math.round(n||0);i&&(r.dataset.snapdomWidth=String(i)),o&&(r.dataset.snapdomHeight=String(o))}catch(e){Od(t,"getUnscaledDimensions for IMG failed",e)}try{let t=e.getAttribute("style")||"",n=window.getComputedStyle(e),i=e=>{let r=t.match(new RegExp(`${e}\\s*:\\s*([^;]+)`,"i")),i=r?r[1].trim():n.getPropertyValue(e);return/%|auto/i.test(String(i||""))},o=parseInt(r.dataset.snapdomWidth||"0",10),a=parseInt(r.dataset.snapdomHeight||"0",10),s=i("width")||!o,l=i("height")||!a;s&&o&&(r.style.width=`${o}px`),l&&a&&(r.style.height=`${a}px`);let c=n.getPropertyValue("object-fit"),u=n.getPropertyValue("object-position");c&&"fill"!==c?(r.style.objectFit=c,u&&(r.style.objectPosition=u)):(o&&(r.style.minWidth=`${o}px`),a&&(r.style.minHeight=`${a}px`))}catch(e){Od(t,"IMG dimension freeze failed",e)}}}catch(t){throw console.error("[Snapdom] Failed to clone node:",e,t),t}let s=null;if(e instanceof HTMLTextAreaElement){let{width:t,height:n}=Wh(e),i=t||e.getBoundingClientRect().width||0,o=n||e.getBoundingClientRect().height||0;i&&(r.style.width=`${i}px`),o&&(r.style.height=`${o}px`)}if(e instanceof HTMLInputElement){let n=(e.type||"text").toLowerCase();if("checkbox"!==n&&"radio"!==n||!function(){if(typeof navigator>"u")return!1;let e=(navigator.userAgent||"").toLowerCase();return e.includes("firefox")||e.includes("fxios")}())r.value=e.value,r.setAttribute("value",e.value),void 0!==e.checked&&(r.checked=e.checked,e.checked&&r.setAttribute("checked",""),e.indeterminate&&(r.indeterminate=e.indeterminate));else{let{el:n,applyVisual:i}=function(e){let t,{width:n,height:r}=Wh(e),i=e.getBoundingClientRect();try{t=window.getComputedStyle(e)}catch{}let o=t?parseFloat(t.width):NaN,a=t?parseFloat(t.height):NaN,s=Math.round(n||i.width||0),l=Math.round(r||i.height||0),c=Number.isFinite(o)&&o>0?Math.round(o):Math.max(12,s||16),u=Number.isFinite(a)&&a>0?Math.round(a):Math.max(12,l||16),f="checkbox"===(e.type||"text").toLowerCase(),d=!!e.checked,h=!!e.indeterminate,p=Math.max(Math.min(c,u),12),g="middle";try{t&&t.verticalAlign&&(g=t.verticalAlign)}catch{}let m=document.createElement("div");m.setAttribute("data-snapdom-input-replacement",e.type||"checkbox"),m.style.cssText=`display:inline-block;width:${p}px;height:${p}px;vertical-align:${g};flex-shrink:0;line-height:0;`;let y=document.createElementNS("http://www.w3.org/2000/svg","svg");function v(){let e="#0a6ed1";try{t&&(e=t.accentColor||t.color||e)}catch{}let n=p-2;if(y.innerHTML="",f){let t=document.createElementNS("http://www.w3.org/2000/svg","rect");if(t.setAttribute("x",String(1)),t.setAttribute("y",String(1)),t.setAttribute("width",String(n)),t.setAttribute("height",String(n)),t.setAttribute("rx","2"),t.setAttribute("ry","2"),t.setAttribute("fill",d?e:"none"),t.setAttribute("stroke",e),t.setAttribute("stroke-width",String(2)),y.appendChild(t),d){let e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",`M 3 ${p/2} L ${p/2-1} ${p-1-2} L ${p-1-2} 3`),e.setAttribute("stroke","white"),e.setAttribute("stroke-width",String(Math.max(1.5,2))),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),y.appendChild(e)}else if(h){let t=document.createElementNS("http://www.w3.org/2000/svg","rect"),r=Math.max(6,n-4);t.setAttribute("x",String((p-r)/2)),t.setAttribute("y",String((p-2)/2)),t.setAttribute("width",String(r)),t.setAttribute("height",String(2)),t.setAttribute("fill",e),t.setAttribute("rx","1"),y.appendChild(t)}}else{let t=document.createElementNS("http://www.w3.org/2000/svg","circle");if(t.setAttribute("cx",String(p/2)),t.setAttribute("cy",String(p/2)),t.setAttribute("r",String((p-2)/2)),t.setAttribute("fill",d?e:"none"),t.setAttribute("stroke",e),t.setAttribute("stroke-width",String(2)),y.appendChild(t),d){let e=document.createElementNS("http://www.w3.org/2000/svg","circle"),t=Math.max(2,.35*(p-4));e.setAttribute("cx",String(p/2)),e.setAttribute("cy",String(p/2)),e.setAttribute("r",String(t)),e.setAttribute("fill","white"),y.appendChild(e)}}m.style.setProperty("width",`${p}px`,"important"),m.style.setProperty("height",`${p}px`,"important"),m.style.setProperty("min-width",`${p}px`,"important"),m.style.setProperty("min-height",`${p}px`,"important")}return y.setAttribute("width",String(p)),y.setAttribute("height",String(p)),y.setAttribute("viewBox",`0 0 ${p} ${p}`),m.appendChild(y),v(),{el:m,applyVisual:v}}(e);t.nodeMap.set(n,e),s=i,r=n}}if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&!e.value&&e.placeholder)try{let t=window.getComputedStyle(e,"::placeholder"),n=t&&t.color;if(n&&"rgba(0, 0, 0, 0)"!==n){let e="snapdom-ph-"+(1e6*Math.random()|0);r.classList.add(e);let i=document.createElement("style");i.textContent=`.${e}::placeholder{color:${n}!important;opacity:${t.opacity||"1"}!important;-webkit-text-fill-color:${n}!important;}`,r.prepend(i)}}catch{}if(e instanceof HTMLSelectElement&&(o=e.value),e instanceof HTMLTextAreaElement&&(a=e.value),e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){e.disabled&&r.setAttribute("disabled",""),e.required&&r.setAttribute("required",""),e.readOnly&&r.setAttribute("readonly","");let t=e;void 0!==t.min&&""!==t.min&&r.setAttribute("min",t.min),void 0!==t.max&&""!==t.max&&r.setAttribute("max",t.max),void 0!==t.pattern&&""!==t.pattern&&r.setAttribute("pattern",t.pattern);let n=e.getAttribute("aria-invalid");null!==n&&r.setAttribute("aria-invalid",n)}if(Qh(e)||Dh(e,r,t,n),s&&s(),e instanceof SVGElement&&!Qh(e)){let t=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display"];try{let n=window.getComputedStyle(e);for(let e of t){let t=n.getPropertyValue(e);t&&r.style.setProperty(e,t)}}catch{}}if(e.shadowRoot){try{let t=e.shadowRoot.querySelectorAll("slot");for(let e of t){let t=e.assignedNodes?.()||[];for(let e of t)i.add(e)}}catch{}let o=function(e){return e.shadowScopeSeq=(e.shadowScopeSeq||0)+1,`s${e.shadowScopeSeq}`}(t),a=`[data-sd="${o}"]`;t.shadowScopes||=new WeakMap,t.shadowScopes.set(e.shadowRoot,o);try{r.setAttribute("data-sd",o)}catch{}let s=function(e){let t="";try{e.querySelectorAll("style").forEach(e=>{t+=(e.textContent||"")+"\n"});let n=e.adoptedStyleSheets||[];for(let e of n)try{if(e&&e.cssRules)for(let n of e.cssRules)t+=n.cssText+"\n"}catch{}}catch{}return t}(e.shadowRoot),l=Vh(s,a,o),c=function(e){let t=new Set;if(!e)return t;let n,r=/var\(\s*(--[A-Za-z0-9_-]+)\b/g;for(;n=r.exec(e);)t.add(n[1]);return t}(s),u=function(e,t,n){let r=[];for(let n of t){let t=Yh(e,n);t&&r.push(`${n}: ${t};`)}return r.length?`${n}{${r.join("")}}\n`:""}(e,c,a);!function(e,t,n){if(!t)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=t,e.insertBefore(r,e.firstChild||null)}(r,u+l,o);let f=document.createDocumentFragment(),d=(e,r)=>{if(e.nodeType===Node.ELEMENT_NODE&&"STYLE"===e.tagName)return r(null);up(e,t,n).then(e=>{r(e||null)}).catch(()=>{r(null)})},h=await jh(Array.from(e.shadowRoot.childNodes),d,n.fast);f.append(...h.filter(e=>!!e)),r.appendChild(f)}if("SLOT"===e.tagName){let r=t.shadowScopes?.get(e.getRootNode()),i=e.assignedNodes?.()||[],o=i.length?e.assignedNodes?.({flatten:!0})||i:[],a=o.length?o:Array.from(e.childNodes),s=document.createDocumentFragment(),l=(e,o)=>{up(e,t,n).then(e=>{e&&i.length&&function(e,t){if(!e)return;let n=e=>{let n=e.getAttribute("data-sd-slotted")||"";t?` ${n} `.includes(` ${t} `)||e.setAttribute("data-sd-slotted",n?`${n} ${t}`:t):e.setAttribute("data-sd-slotted",n)};e.nodeType===Node.ELEMENT_NODE&&n(e),e.querySelectorAll?.("*").forEach(n)}(e,r),o(e||null)}).catch(()=>{o(null)})},c=await jh(Array.from(a),l,n.fast);return s.append(...c.filter(e=>!!e)),s}let l=await jh(Array.from(e.childNodes),function(r,o){if(i.has(r)||e.shadowRoot&&!r.assignedSlot)return o(null);up(r,t,n).then(e=>{o(e||null)}).catch(()=>{o(null)})},n.fast);if(r.append(...l.filter(e=>!!e)),null!==o&&r instanceof HTMLSelectElement){r.value=o;for(let e of r.options)e.value===o?e.setAttribute("selected",""):e.removeAttribute("selected")}return null!==a&&r instanceof HTMLTextAreaElement&&(r.textContent=a),r}op("IFRAME",async function(e,t,n){let r=!1;try{r=!(!e.contentDocument&&!e.contentWindow?.document)}catch(e){Od(t,"iframe same-origin probe failed",e)}if(r)try{return await Gh(e,t,n)}catch(e){console.warn("[SnapDOM] iframe rasterization failed, fallback:",e)}if(r||console.warn("[snapdom] cross-origin <iframe> skipped (its document cannot be read). Captured as a placeholder that keeps the frame's box; pass { placeholders: false } for an invisible spacer.",e),n.placeholders){let{width:r,height:i}=Wh(e),o=document.createElement("div");return o.style.cssText=`width:${r}px;height:${i}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,Dh(e,o,t,n),o}{let{width:r,height:i}=Wh(e),o=document.createElement("div");return o.style.cssText=`display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`,Dh(e,o,t,n),o}}),op("CANVAS",async function(e,t,n){let r="";try{let t=e.getContext("2d",{willReadFrequently:!0});try{t&&t.getImageData(0,0,1,1)}catch{}if((Hd()||!t)&&await Ud(),r=e.toDataURL("image/png"),!r||"data:,"===r){try{t&&t.getImageData(0,0,1,1)}catch{}if(await Ud(),r=e.toDataURL("image/png"),!r||"data:,"===r){let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n&&(n.drawImage(e,0,0),r=t.toDataURL("image/png"))}}}catch(e){Od(t,"Canvas toDataURL failed, using empty/fallback",e)}n&&n.debug&&r&&function(e){try{let t=Math.max(1,Math.min(32,e.width)),n=Math.max(1,Math.min(32,e.height)),r=document.createElement("canvas");r.width=t,r.height=n;let i=r.getContext("2d",{willReadFrequently:!0});if(!i)return!1;i.drawImage(e,0,0,t,n);let o=i.getImageData(0,0,t,n).data;for(let e=3;e<o.length;e+=4)if(0!==o[e])return!1;return!0}catch{return!1}}(e)&&Od(t,"canvas is empty at capture time — capture it after its first frame is drawn",e);let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch(e){Od(t,"img decoding/loading hints failed",e)}r&&(i.src=r),i.width=e.width,i.height=e.height;let{width:o,height:a}=Wh(e);return o>0&&(i.style.width=`${o}px`),a>0&&(i.style.height=`${a}px`),t.nodeMap.set(i,e),Dh(e,i,t,n),i}),op("VIDEO",async function(e,t,n){let r="";try{let t=document.createElement("canvas");t.width=e.videoWidth||e.offsetWidth||320,t.height=e.videoHeight||e.offsetHeight||240;let n=t.getContext("2d");n&&(n.drawImage(e,0,0,t.width,t.height),r=t.toDataURL("image/png"),(!r||"data:,"===r)&&(r=""))}catch(e){Od(t,"Video frame capture failed, using poster fallback",e)}let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch{}r?i.src=r:e.poster&&(i.src=e.poster),i.width=e.videoWidth||e.offsetWidth||0,i.height=e.videoHeight||e.offsetHeight||0;let{width:o,height:a}=Wh(e);return o>0&&(i.style.width=`${o}px`),a>0&&(i.style.height=`${a}px`),i.style.objectFit="contain",t.nodeMap.set(i,e),Dh(e,i,t,n),i}),op("AUDIO",async function(e,t,n){if(!e.controls)return;let{width:r,height:i}=Wh(e),o=Math.round(r||e.offsetWidth||300),a=Math.round(i||e.offsetHeight||54),s=a/2,l=Math.max(4,.16*a),c=.34*a,u=o-.34*a,f=c+l+.55*a,d=Math.max(0,u-.7*a-f),h=Math.max(9,Math.round(.24*a)),p=`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${a}" viewBox="0 0 ${o} ${a}"><rect width="${o}" height="${a}" rx="${Math.min(a/2,10)}" fill="#f1f3f4"/><path d="M ${c} ${s-l} L ${c+l} ${s} L ${c} ${s+l} Z" fill="#5f6368"/><rect x="${f}" y="${s-1.5}" width="${d}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${f}" cy="${s}" r="${Math.max(3,.09*a)}" fill="#5f6368"/><text x="${u}" y="${s}" fill="#5f6368" font-family="sans-serif" font-size="${h}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,g=document.createElement("img");try{g.decoding="sync",g.loading="eager"}catch{}return g.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,g.width=o,g.height=a,g.style.width=`${o}px`,g.style.height=`${a}px`,t.nodeMap.set(g,e),Dh(e,g,t,n),g}),$d(),id(),Ld(),Zf(),Zf();var fp=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],dp=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{}),hp=[],pp=new Set;function gp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mp(e){let t="string"==typeof e?e:"",n=[...fp,...hp];for(let e of n)if(e instanceof RegExp&&e.test(t))return!0;return!!(/icon/i.test(t)||/glyph/i.test(t)||/symbols/i.test(t)||/feather/i.test(t)||/fontawesome/i.test(t))}function yp(e=""){let t=String(e).toLowerCase();return/\bmaterial\s*icons\b/.test(t)||/\bmaterial\s*symbols\b/.test(t)}var vp=new Map;function Ap(e){let t=e.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(t)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(t);if(t&&!n&&"currentcolor"!==t.toLowerCase())return t;let r=e.color?.trim();return r&&"inherit"!==r?r:"#000"}async function bp(e,{family:t="Material Icons",weight:n="normal",fontSize:r=32,color:i="#000",variation:o="",className:a=""}={}){let s=String(t||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,c=function(e=""){let t,n=Object.create(null),r=String(e||""),i=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g;for(;t=i.exec(r);)n[t[1].toUpperCase()]=Number(t[2]);return n}(o),{familyForMeasure:u,familyForCanvas:f}=await async function(e,t,n){let r=String(e||""),i=r.toLowerCase(),o=String(t||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(i)&&!/\bsymbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),s="outlined";/\brounded\b/.test(o)||/\bround\b/.test(o)?s="rounded":/\bsharp\b/.test(o)?s="sharp":/\boutlined\b/.test(o)&&(s="outlined");let l=null;if(1===a&&("outlined"===s&&dp.materialIconsFilled?l={url:dp.materialIconsFilled,alias:"snapdom-mi-filled"}:"rounded"===s&&dp.materialIconsRound?l={url:dp.materialIconsRound,alias:"snapdom-mi-round"}:"sharp"===s&&dp.materialIconsSharp&&(l={url:dp.materialIconsSharp,alias:"snapdom-mi-sharp"})),!l)return{familyForMeasure:r,familyForCanvas:r};if(!vp.has(l.alias))try{let e=new FontFace(l.alias,`url(${l.url})`,{style:"normal",weight:"400"});document.fonts.add(e),await e.load(),vp.set(l.alias,!0)}catch{return{familyForMeasure:r,familyForCanvas:r}}let c=`"${l.alias}"`;return{familyForMeasure:c,familyForCanvas:c}}(s,a,c);await async function(e="Material Icons",t=24){try{await Promise.all([document.fonts.load(`400 ${t}px "${String(e).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}(f.replace(/^["']+|["']+$/g,""),r);let d=document.createElement("span");d.setAttribute("data-snapdom-internal",""),d.textContent=e,d.style.position="absolute",d.style.visibility="hidden",d.style.left="-99999px",d.style.whiteSpace="nowrap",d.style.fontFamily=u,d.style.fontWeight=String(n||"normal"),d.style.fontSize=`${r}px`,d.style.lineHeight="1",d.style.margin="0",d.style.padding="0",d.style.fontFeatureSettings="'liga' 1",d.style.fontVariantLigatures="normal",d.style.color=i,document.body.appendChild(d);let h=d.getBoundingClientRect(),p=Math.max(1,Math.ceil(h.width)),g=Math.max(1,Math.ceil(h.height));document.body.removeChild(d);let m=document.createElement("canvas");m.width=p*l,m.height=g*l;let y=m.getContext("2d");y.scale(l,l),y.font=`${n?`${n} `:""}${r}px ${f}`,y.textAlign="left",y.textBaseline="top",y.fillStyle=i;try{y.fontKerning="normal"}catch{}return y.fillText(e,0,0),{dataUrl:m.toDataURL(),width:p,height:g}}async function wp(e,t,n,r=32,i="#000"){t=t.replace(/^['"]+|['"]+$/g,"");let o=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");a.setAttribute("data-snapdom-internal",""),a.textContent=e,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${t}"`,a.style.fontWeight=n||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let s=a.getBoundingClientRect(),l=Math.ceil(s.width),c=Math.ceil(s.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,l*o),u.height=Math.max(1,c*o);let f=u.getContext("2d");return f.scale(o,o),f.font=n?`${n} ${r}px "${t}"`:`${r}px "${t}"`,f.textAlign="left",f.textBaseline="top",f.fillStyle=i,f.fillText(e,0,0),{dataUrl:u.toDataURL(),width:l,height:c}}fd(),qd();var Ip=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),xp=["katex","mathjax","mathml"];function Cp(e){if(!e)return"";for(let t of e.split(",")){let e=t.trim().replace(/^['"]+|['"]+$/g,"");if(e&&!Ip.has(e.toLowerCase()))return e}return""}function Bp(e){let t=String(e??"400").trim().toLowerCase();if("normal"===t)return 400;if("bold"===t)return 700;let n=parseInt(t,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function Ep(e){let t=String(e??"normal").trim().toLowerCase();return t.startsWith("italic")?"italic":t.startsWith("oblique")?"oblique":"normal"}function Sp(e){let t=String(e??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return t?Math.max(50,Math.min(200,parseFloat(t[1]))):100}function kp(e){return e&&"string"==typeof e?e.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-"):""}function Fp(e,t,n=[]){if(!e)return!1;try{let r=new URL(e,location.href);if(r.origin===location.origin)return!0;let i=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(e=>i.endsWith(e))||n.some(e=>i===e.toLowerCase()||i.endsWith("."+e.toLowerCase())))return!0;let o=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(o)||/\.woff2?(\b|$)/.test(o)||xp.some(e=>o.includes(e)))return!0;for(let e of t){let t=e.toLowerCase().replace(/\s+/g,"+"),n=e.toLowerCase().replace(/\s+/g,"-"),r=kp(e);if(o.includes(t)||o.includes(n)||r&&o.includes(r))return!0}return!1}catch{return!1}}function Dp(e,t){return e&&e.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(e,n,r)=>{let i=(r||"").trim();if(!i||/^data:|^blob:|^https?:|^file:|^about:/i.test(i))return e;let o=i;try{o=new URL(i,t||location.href).href}catch{}return`url("${o}")`})}var Np=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g;async function Mp(e,t,n){if(!e)return e;let r=new Set;function i(e,t){try{return new URL(e,t||location.href).href}catch{return e}}let o=Dp(e,t||location.href);return o=await async function e(t,o,a=0){if(a>4)return console.warn(`[snapDOM] @import depth exceeded (4) at ${o}`),t;let s,l="",c=0;for(;s=Np.exec(t);){l+=t.slice(c,s.index),c=Np.lastIndex;let u=i((s[2]||s[4]||"").trim(),o);if(r.has(u)){console.warn(`[snapDOM] Skipping circular @import: ${u}`);continue}r.add(u);let f="";try{let e=await sd(u,{as:"text",useProxy:n,silent:!0});e.ok&&"string"==typeof e.data&&(f=e.data)}catch{}f?(f=Dp(f,u),f=await e(f,u,a+1),l+=`\n/* inlined: ${u} */\n${f}\n`):l+=s[0]}return l+=t.slice(c),l}(o,t||location.href,0),o}var Tp=/url\((["']?)([^"')]+)\1\)/g,Qp=/@font-face[^{}]*\{[^}]*\}/g;function Lp(e,t,n=""){return(e.match(new RegExp(`${t}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function Rp(e){if(!e)return[];let t=[],n=e.split(",").map(e=>e.trim()).filter(Boolean);for(let e of n){let n=e.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!n)continue;let r=n[1],i=n[2],o=e=>{if(!e.includes("?"))return parseInt(e,16);return[parseInt(e.replace(/\?/g,"0"),16),parseInt(e.replace(/\?/g,"F"),16)]};if(i){let e=o(r),n=o(i),a=Array.isArray(e)?e[0]:e,s=Array.isArray(n)?n[1]:n;t.push([Math.min(a,s),Math.max(a,s)])}else{let e=o(r);Array.isArray(e)?t.push([e[0],e[1]]):t.push([e,e])}}return t}function Up(e,t){if(!t.length||!e||0===e.size)return!0;for(let n of e)for(let[e,r]of t)if(n>=e&&n<=r)return!0;return!1}function Hp(e,t){let n=[];if(!e)return n;for(let r of e.matchAll(Tp)){let e=(r[2]||"").trim();if(e&&!e.startsWith("data:")){if(!/^https?:/i.test(e))try{e=new URL(e,t||location.href).href}catch{}n.push(e)}}return n}async function qp(e,t,n=""){let r=e;for(let i of e.matchAll(Tp)){let e=ed(i[0]);if(!e)continue;let o=e;if(!o.startsWith("http")&&!o.startsWith("data:"))try{o=new URL(o,t||location.href).href}catch{}if(!mp(o)){if(Kf.resource?.has(o)){Kf.font?.add(o),r=r.replace(i[0],`url(${Kf.resource.get(o)})`);continue}try{let e=await sd(o,{as:"dataURL",useProxy:n,silent:!0});if(e.ok&&"string"==typeof e.data){let t=e.data;Kf.resource?.set(o,t),Kf.font?.add(o),r=r.replace(i[0],`url(${t})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",o)}}}return r}function Op(e={}){let t=new Set((e.families||[]).map(e=>String(e).toLowerCase())),n=new Set((e.domains||[]).map(e=>String(e).toLowerCase())),r=new Set((e.subsets||[]).map(e=>String(e).toLowerCase()));return(e,i)=>{if(t.size&&t.has(e.family.toLowerCase()))return!0;if(n.size)for(let t of e.srcUrls)try{if(n.has(new URL(t).host.toLowerCase()))return!0}catch{}if(r.size){let e=function(e){if(!e.length)return null;let t=(t,n)=>e.some(([e,r])=>!(r<t||e>n)),n=t(0,255)||t(305,305),r=t(256,591)||t(7680,7935),i=t(880,1023),o=t(1024,1279);return t(7840,7929)||t(258,259)||t(416,417)||t(431,432)?"vietnamese":o?"cyrillic":i?"greek":r?"latin-ext":n?"latin":null}(i);if(e&&r.has(e))return!0}return!1}}var Pp=new WeakMap,$p=0;function zp(e,t,n,r,i,o){let a=Array.from(e||[]).sort().join("|"),s=t?JSON.stringify({families:(t.families||[]).map(e=>String(e).toLowerCase()).sort(),domains:(t.domains||[]).map(e=>String(e).toLowerCase()).sort(),subsets:(t.subsets||[]).map(e=>String(e).toLowerCase()).sort()}):"",l=(n||[]).map(e=>`${(e.family||"").toLowerCase()}::${e.weight||"normal"}::${e.style||"normal"}::${e.src||""}`).sort().join("|"),c=r||"",u=(i||[]).map(e=>String(e).toLowerCase()).sort().join("|"),f=function(e){let t=Pp.get(e);return void 0===t&&(t=$p++,Pp.set(e,t)),t}(o||document);return`fonts-embed-css::req=${a}::ex=${s}::lf=${l}::px=${c}::fd=${u}::doc=${f}`}async function jp(e,t,n,r){let i;try{i=e.cssRules||[]}catch{return}let o=(e,t)=>{try{return new URL(e,t||location.href).href}catch{return e}};for(let e of i){if(e.type===CSSRule.IMPORT_RULE&&e.styleSheet){let i=e.href?o(e.href,t):t;if(r.depth>=4){console.warn(`[snapDOM] CSSOM import depth exceeded (4) at ${i}`);continue}if(i&&r.visitedSheets.has(i)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${i}`);continue}i&&r.visitedSheets.add(i);let a={...r,depth:(r.depth||0)+1};await jp(e.styleSheet,i,n,a);continue}if(e.type===CSSRule.FONT_FACE_RULE){let i=Cp((e.style.getPropertyValue("font-family")||"").trim());if(!i||mp(i))continue;let o=(e.style.getPropertyValue("font-weight")||"").trim(),a=(e.style.getPropertyValue("font-style")||"").trim(),s=(e.style.getPropertyValue("font-stretch")||"").trim(),l=(e.style.getPropertyValue("font-variation-settings")||"").trim(),c=(e.style.getPropertyValue("src")||"").trim(),u=(e.style.getPropertyValue("unicode-range")||"").trim(),f=o||"400",d=a||"normal",h=s||"100%",p=(a?`font-style:${a};`:"")+(o?`font-weight:${o};`:"")+(s?`font-stretch:${s};`:"")+(l?`font-variation-settings:${l};`:"")+(u?`unicode-range:${u};`:""),g=r.faceMatchesRequired(i,d,f,h);if(!g&&!r.requiredIndex.has(i.toLowerCase()))continue;let m=Rp(u);if(!Up(r.usedCodepoints,m))continue;let y={family:i,weightSpec:f,styleSpec:d,stretchSpec:h,unicodeRange:u,srcRaw:c,srcUrls:Hp(c,t||location.href),href:t||location.href};if(r.simpleExcluder&&r.simpleExcluder(y,m))continue;if(!g){r.provisionalFaces.push({family:i.toLowerCase(),block:`@font-face{font-family:${i};src:${c};${p}}`,srcRaw:c,baseHref:t||location.href});continue}if(r.coveredFamilies.add(i.toLowerCase()),/url\(/i.test(c)){let e=await qp(c,t||location.href,r.useProxy);await n(`@font-face{font-family:${i};src:${e};${p}}`)}else await n(`@font-face{font-family:${i};src:${c};${p}}`)}}}async function Vp({required:e,usedCodepoints:t,exclude:n,localFonts:r=[],useProxy:i="",fontStylesheetDomains:o=[],doc:a=document}={}){e instanceof Set||(e=new Set),t instanceof Set||(t=new Set);let s=new Map;for(let t of e){let[e,n,r,i]=String(t).split("__");if(!e)continue;let o=e.toLowerCase(),a=s.get(o)||[];a.push({w:parseInt(n,10),s:r,st:parseInt(i,10)}),s.set(o,a)}function l(e,t,n,r){let i=String(e).toLowerCase();if(!s.has(i))return!1;let o=s.get(i),a=function(e){let t=String(e||"400").trim(),n=t.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let e=Bp(n[1]),t=Bp(n[2]);return{min:Math.min(e,t),max:Math.max(e,t)}}let r=Bp(t);return{min:r,max:r}}(n),l=function(e){let t=String(e||"normal").trim().toLowerCase();return"italic"===t?{kind:"italic"}:t.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}(t),c=function(e){let t=String(e||"100%").trim(),n=t.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let e=parseFloat(n[1]),t=parseFloat(n[2]);return{min:Math.min(e,t),max:Math.max(e,t)}}let r=t.match(/(\d+(?:\.\d+)?)\s*%/),i=r?parseFloat(r[1]):100;return{min:i,max:i}}(r),u=a.min!==a.max,f=a.min,d=e=>"normal"===l.kind&&"normal"===e||"normal"!==l.kind&&("italic"===e||"oblique"===e),h=!1;for(let e of o){let t=u?e.w>=a.min&&e.w<=a.max:e.w===f,n=d(Ep(e.s)),r=e.st>=c.min&&e.st<=c.max;if(t&&n&&r){h=!0;break}}if(h)return!0;if(!u)for(let e of o){let t=d(Ep(e.s)),n=e.st>=c.min&&e.st<=c.max;if(Math.abs(f-e.w)<=300&&t&&n)return!0}if(!u&&"normal"===l.kind&&o.some(e=>"normal"!==Ep(e.s)))for(let e of o){let t=Math.abs(f-e.w)<=300,n=e.st>=c.min&&e.st<=c.max;if(t&&n)return!0}return!1}let c=Op(n),u=zp(e,n,r,i,o,a);if(Kf.resource?.has(u))return Kf.resource.get(u);let f=function(e){let t=new Set;for(let n of e||[]){let e=String(n).split("__")[0]?.trim();e&&t.add(e)}return t}(e),d=[],h=Np;for(let e of a.querySelectorAll("style")){let t=e.textContent||"";for(let e of t.matchAll(h)){let t=(e[2]||e[4]||"").trim();t&&!mp(t)&&(a.querySelector(`link[rel="stylesheet"][href="${t}"]`)||d.push(t))}}let p=[];d.length&&await Promise.all(d.map(e=>new Promise(t=>{if(a.querySelector(`link[rel="stylesheet"][href="${e}"]`))return t(null);let n=a.createElement("link");n.rel="stylesheet",n.href=e,n.setAttribute("data-snapdom","injected-import"),n.onload=()=>t(n),n.onerror=()=>t(null),a.head.appendChild(n),p.push(n)})));let g="",m=new Set,y=[],v=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(e=>!!e.href);for(let e of p)try{e.remove()}catch{}for(let e of v)try{if(mp(e.href))continue;let r="",u=!1;try{u=new URL(e.href,location.href).origin===location.origin}catch{}if(!u){let t=Array.isArray(o)?o:[];if(!Fp(e.href,f,t))continue}if(u){let t=Array.from(a.styleSheets).find(t=>t.href===e.href);if(t)try{let e=t.cssRules||[];r=Array.from(e).map(e=>e.cssText).join("")}catch{}}if(!r){let t=await sd(e.href,{as:"text",useProxy:i});if(t?.ok&&"string"==typeof t.data&&(r=t.data),mp(e.href))continue}r=await Mp(r,e.href,i);let d="";for(let o of r.match(Qp)||[]){let r=Cp(Lp(o,"font-family"));if(!r||mp(r))continue;let a=Lp(o,"font-weight","400"),u=Lp(o,"font-style","normal"),f=Lp(o,"font-stretch","100%"),h=Lp(o,"unicode-range"),p=Lp(o,"src"),g=Hp(p,e.href),v=l(r,u,a,f);if(!v&&!s.has(r.toLowerCase()))continue;let A=Rp(h);if(!Up(t,A))continue;let b={family:r,weightSpec:a,styleSpec:u,stretchSpec:f,unicodeRange:h,srcRaw:p,srcUrls:g,href:e.href};n&&c(b,A)||(v?(m.add(r.toLowerCase()),d+=/url\(/i.test(p)?await qp(o,e.href,i):o):y.push({family:r.toLowerCase(),block:o,srcRaw:p,baseHref:e.href}))}d.trim()&&(g+=d)}catch{console.warn("[snapDOM] Failed to process stylesheet:",e.href)}let A={requiredIndex:s,usedCodepoints:t,faceMatchesRequired:l,coveredFamilies:m,provisionalFaces:y,simpleExcluder:n?Op(n):null,useProxy:i,visitedSheets:new Set,depth:0};for(let e of a.styleSheets)if(!e.href||!v.some(t=>t.href===e.href))try{let t=e.href||location.origin+"/";t&&A.visitedSheets.add(t),await jp(e,t,async e=>{g+=e},A)}catch{}for(let e of y)m.has(e.family)||(g+=/url\(/i.test(e.srcRaw)?await qp(e.block,e.baseHref,i):e.block);try{for(let e of a.fonts||[]){if(!e||!e.family||"loaded"!==e.status||!e._snapdomSrc)continue;let t=String(e.family).replace(/^['"]+|['"]+$/g,"");if(mp(t)||!s.has(t.toLowerCase())||n?.families&&n.families.some(e=>String(e).toLowerCase()===t.toLowerCase()))continue;let r=e._snapdomSrc;if(!String(r).startsWith("data:"))if(Kf.resource?.has(e._snapdomSrc))r=Kf.resource.get(e._snapdomSrc),Kf.font?.add(e._snapdomSrc);else if(!Kf.font?.has(e._snapdomSrc))try{let t=await sd(e._snapdomSrc,{as:"dataURL",useProxy:i,silent:!0});if(!t.ok||"string"!=typeof t.data)continue;r=t.data,Kf.resource?.set(e._snapdomSrc,r),Kf.font?.add(e._snapdomSrc)}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",e._snapdomSrc);continue}g+=`@font-face{font-family:'${t}';src:url(${r});font-style:${e.style||"normal"};font-weight:${e.weight||"normal"};}`}}catch{}for(let e of r){if(!e||"object"!=typeof e)continue;let t=String(e.family||"").replace(/^['"]+|['"]+$/g,"");if(!t||mp(t)||!s.has(t.toLowerCase())||n?.families&&n.families.some(e=>String(e).toLowerCase()===t.toLowerCase()))continue;let r=null!=e.weight?String(e.weight):"normal",o=null!=e.style?String(e.style):"normal",a=null!=e.stretchPct?`${e.stretchPct}%`:"100%",l=String(e.src||""),c=l;if(!c.startsWith("data:"))if(Kf.resource?.has(l))c=Kf.resource.get(l),Kf.font?.add(l);else if(!Kf.font?.has(l))try{let e=await sd(l,{as:"dataURL",useProxy:i,silent:!0});if(!e.ok||"string"!=typeof e.data)continue;c=e.data,Kf.resource?.set(l,c),Kf.font?.add(l)}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",l);continue}g+=`@font-face{font-family:'${t}';src:url(${c});font-style:${o};font-weight:${r};font-stretch:${a};}`}return g&&(g=function(e){if(!e)return e;let t=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let i of e.match(t)||[]){let e=Cp(Lp(i,"font-family")),t=Lp(i,"font-weight","400"),o=Lp(i,"font-style","normal"),a=Lp(i,"font-stretch","100%"),s=Lp(i,"unicode-range"),l=Lp(i,"src"),c=Hp(l,location.href),u=c.length?c.map(e=>String(e).toLowerCase()).sort().join("|"):l.toLowerCase(),f=[String(e||"").toLowerCase(),t,o,a,s.toLowerCase(),u].join("|");n.has(f)||(n.add(f),r.push(i))}if(0===r.length)return e;let i=0;return e.replace(t,()=>r[i++]||"")}(g),Kf.resource?.set(u,g)),g}function Yp(e,t){let n=new Set,r=new Set;if(!e)return{required:n,usedCodepoints:r};let i=e=>{if(e)for(let t of e)r.add(t.codePointAt(0))},o=e=>{let t=function(e){if(!e)return[];let t=[];for(let n of e.split(",")){let e=n.trim().replace(/^['"]+|['"]+$/g,"");e&&(Ip.has(e.toLowerCase())||t.push(e))}return t}(e.fontFamily);if(t.length)for(let r of t)n.add(`${r}__${Bp(e.fontWeight)}__${Ep(e.fontStyle)}__${Sp(e.fontStretch)}`)},a=e=>{o(vd(e));for(let t of["::before","::after"]){let n=vd(e,t),a=n&&n.content;if(a&&"none"!==a&&"normal"!==a)if(o(n),/^["']/.test(a))i(a.slice(1,-1));else{let e=a.match(/\\[0-9A-Fa-f]{1,6}/g);if(e)for(let t of e)try{r.add(parseInt(t.slice(1),16))}catch{}}}};a(e);let s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;s.nextNode();){let e=s.currentNode;if(e.nodeType===Node.TEXT_NODE){if(t&&e.parentElement&&!t(e.parentElement))continue;i(e.nodeValue||"")}else{if(t&&!t(e))continue;a(e)}}return{required:n,usedCodepoints:r}}async function Wp(e,t=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(e||[]).filter(Boolean);if(0===r.length)return;let i=()=>{let e=n.createElement("div");e.setAttribute("data-snapdom-internal",""),e.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let t of r){let r=n.createElement("span");r.textContent="AaBbGg1234ÁÉÍÓÚçñ—∞",r.style.fontFamily=`"${t}"`,r.style.fontWeight="700",r.style.fontStyle="italic",r.style.fontSize="32px",r.style.lineHeight="1",r.style.whiteSpace="nowrap",r.style.margin="0",r.style.padding="0",e.appendChild(r)}n.body.appendChild(e),e.offsetWidth,n.body.removeChild(e)};for(let e=0;e<Math.max(1,t);e++)i(),await Ud(),await Ud()}function Gp(e,t=!1){let n="",r=Math.max(1,e);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return t?n.toUpperCase():n}function Jp(e,t=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,e)),i="";for(let[e,t]of n)for(;r>=e;)i+=t,r-=e;return t?i:i.toLowerCase()}function _p(e,t){switch((t||"decimal").toLowerCase()){case"decimal":default:return String(e);case"decimal-leading-zero":{let t=Math.abs(e);return(e<0?"-":"")+(t<10?"0":"")+String(t)}case"lower-alpha":return Gp(e,!1);case"upper-alpha":return Gp(e,!0);case"lower-roman":return Jp(e,!1);case"upper-roman":return Jp(e,!0)}}function Xp(e){let t=new WeakMap,n=e instanceof Document?e.documentElement:e,r=e=>{let t=0,n=e?.parentElement;if(!n)return 0;for(let r of n.children){if(r===e)break;"LI"===r.tagName&&t++}return t},i=(e,t,n)=>{let i,o,a,s=(e=>{let t=new Map;for(let[n,r]of e)t.set(n,r.slice());return t})(e);try{i=n.style?.counterReset||getComputedStyle(n).counterReset}catch{}if(i&&"none"!==i)for(let e of i.split(",")){let n=e.trim().split(/\s+/),r=n[0],i=Number.isFinite(Number(n[1]))?Number(n[1]):0;if(!r)continue;let o=t.get(r);if(o&&o.length){let e=o.slice();e.push(i),s.set(r,e)}else s.set(r,[i])}try{o=n.style?.counterSet||getComputedStyle(n).counterSet}catch{}if(o&&"none"!==o)for(let e of o.split(",")){let t=e.trim().split(/\s+/),n=t[0],r=Number.isFinite(Number(t[1]))?Number(t[1]):0;if(!n)continue;let i=s.get(n)||[];0===i.length&&i.push(0),i[i.length-1]=r,s.set(n,i)}try{a=n.style?.counterIncrement||getComputedStyle(n).counterIncrement}catch{}if(a&&"none"!==a)for(let e of a.split(",")){let t=e.trim().split(/\s+/),n=t[0],r=Number.isFinite(Number(t[1]))?Number(t[1]):1;if(!n)continue;let i=s.get(n)||[];0===i.length&&i.push(0),i[i.length-1]+=r,s.set(n,i)}try{if("list-item"===getComputedStyle(n).display&&(e=>e&&"LI"===e.tagName)(n)){let e=n.parentElement,t=1;if(e&&"OL"===e.tagName){let i=e.getAttribute("start"),o=Number.isFinite(Number(i))?Number(i):1,a=r(n),s=n.getAttribute("value");t=Number.isFinite(Number(s))?Number(s):o+a}else t=1+r(n);let i=s.get("list-item")||[];0===i.length&&i.push(0),i[i.length-1]=t,s.set("list-item",i)}}catch{}return s},o=(e,n,r)=>{let a=i(r,n,e);t.set(e,a);let s=a;for(let t of e.children)s=o(t,a,s);let l=new Map;for(let[e,t]of r){let n=t.length,r=s.get(e);l.set(e,r&&r.length?r.slice(0,n):t.slice())}for(let[e,t]of s)!l.has(e)&&t.length&&!n.has(e)&&l.set(e,t.slice(0,1));return l},a=new Map;return o(n,a,a),{get(e,n){let r=t.get(e)?.get(n);return r&&r.length?r[r.length-1]:0},getStack(e,n){let r=t.get(e)?.get(n);return r?r.slice():[]}}}fd();var Kp=new WeakMap;function Zp(e){try{return e&&e.cssRules?e.cssRules:null}catch{return null}}function eg(e){let t=e.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${t.length}|`,r=0;for(let e=0;e<t.length;e++){let i=t[e];if("STYLE"===i.tagName){n+=`S${i.textContent?i.textContent.length:0}|`;let e=i.sheet,t=e?Zp(e):null;t&&(r+=t.length)}else{n+=`L${i.getAttribute("href")||""}|m:${i.getAttribute("media")||"all"}|`;let e=i.sheet,t=e?Zp(e):null;t&&(r+=t.length)}}let i=e.adoptedStyleSheets;return n+=`ass:${Array.isArray(i)?i.length:0}|tr:${r}`,n}function tg(e,t,n){let r=Zp(e);if(!r)return!1;for(let e=0;e<r.length;e++){if(n.budget<=0)return!1;let i=r[e],o=i&&i.cssText?i.cssText:"";n.budget--;for(let e of t)if(o.includes(e))return!0;if(i&&i.cssRules&&i.cssRules.length)for(let e=0;e<i.cssRules.length&&n.budget>0;e++){let r=i.cssRules[e],o=r&&r.cssText?r.cssText:"";n.budget--;for(let e of t)if(o.includes(e))return!0}if(n.budget<=0)return!1}return!1}function ng(e=document,t=eg(e)){let n=Kp.get(e);if(n&&n.fingerprint===t)return n.result;let r=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],i=e.querySelectorAll("style");for(let n=0;n<i.length;n++){let o=i[n].textContent||"";for(let n of r)if(o.includes(n))return Kp.set(e,{fingerprint:t,result:!0}),!0}let o=e.adoptedStyleSheets;if(Array.isArray(o)&&o.length){let n={budget:1e3};try{for(let i of o)if(tg(i,r,n))return Kp.set(e,{fingerprint:t,result:!0}),!0}catch{}}{let n=e.querySelectorAll('style,link[rel~="stylesheet"]'),i={budget:1e3};for(let o=0;o<n.length&&i.budget>0;o++){let a=n[o],s=null;if(a.tagName,s=a.sheet||null,s&&tg(s,r,i))return Kp.set(e,{fingerprint:t,result:!0}),!0}}return e.querySelector('[style*="counter("], [style*="counters("]')?(Kp.set(e,{fingerprint:t,result:!0}),!0):(Kp.set(e,{fingerprint:t,result:!1}),!1)}function rg(e){for(let t of["Top","Right","Bottom","Left"]){let n=parseFloat(e[`border${t}Width`])||0,r=e[`border${t}Style`];if(n>0&&r&&"none"!==r&&"hidden"!==r)return!0}return!1}function ig(e){if(!e)return"";let t,n=[],r=/"([^"]*)"/g,i=0;for(;t=r.exec(e);){let o=e.slice(i,t.index).trim();o&&n.push(o),n.push(t[1]),i=r.lastIndex}let o=e.slice(i).trim();return o&&n.push(o),n.join("")}function og(e,t,n){let r=e.parentElement,i=r&&n?n.get(r):null;return i?{get(e,n){let r=t.get(e,n),o=i.get(n);return"number"==typeof o?Math.max(r,o):r},getStack(e,n){let r=t.getStack(e,n);if(!r.length)return r;let o=i.get(n);if("number"==typeof o){let e=r.slice();return e[e.length-1]=Math.max(e[e.length-1],o),e}return r}}:t}function ag(e,t,n){let r=new Map;function i(e){let t=[];if(!e||"none"===e)return t;for(let n of String(e).split(",")){let e=n.trim().split(/\s+/),r=e[0],i=Number.isFinite(Number(e[1]))?Number(e[1]):void 0;r&&t.push({name:r,num:i})}return t}let o=i(t?.counterReset),a=i(t?.counterSet),s=i(t?.counterIncrement);function l(t){if(r.has(t))return r.get(t).slice();let i=n.getStack(e,t);i=i.length?i.slice():[];let l=o.find(e=>e.name===t);if(l){let e=Number.isFinite(l.num)?l.num:0;i=i.length?[...i,e]:[e]}let c=a.find(e=>e.name===t);if(c){let e=Number.isFinite(c.num)?c.num:0;0===i.length&&(i=[0]),i[i.length-1]=e}let u=s.find(e=>e.name===t);if(u){let e=Number.isFinite(u.num)?u.num:1;0===i.length&&(i=[0]),i[i.length-1]+=e}return r.set(t,i.slice()),i}return{get(e,t){let n=l(t);return n.length?n[n.length-1]:0},getStack:(e,t)=>l(t),__incs:s}}function sg(e,t,n,r){let i;try{i=vd(e,t)}catch{}let o=i?.content;if(!o||"none"===o||"normal"===o)return{text:"",incs:[]};o=function(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if('"'===r)t=!t;else if("/"===r&&!t)return e.slice(0,n).trim()}return e}(o);let a=ag(e,i,og(e,n,r)),s=function(e){return/\bcounter\s*\(|\bcounters\s*\(/.test(e||"")}(o)?function(e,t,n){if(!e||"none"===e)return e;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return e.replace(r,(e,r,i)=>{let o=String(i).split(",").map(e=>e.trim());if("counter"===r){let e=o[0]?.replace(/^["']|["']$/g,""),r=(o[1]||"decimal").toLowerCase();return _p(n.get(t,e),r)}{let e=o[0]?.replace(/^["']|["']$/g,""),r=o[1]?.replace(/^["']|["']$/g,"")??"",i=(o[2]||"decimal").toLowerCase(),a=n.getStack(t,e);return a.length?a.map(e=>_p(e,i)).join(r):""}})}catch{return"- "}}(o,e,a):o;return{text:ig(s),incs:a.__incs||[]}}async function lg(e,t,n,r){if(1!==e?.nodeType||1!==t?.nodeType||"TEXTAREA"===e.tagName)return;if(!function(e,t){let n=eg(e);return t?(t.__pseudoPreflightFp!==n&&(t.__pseudoPreflight=ng(e,n),t.__pseudoPreflightFp=n),!!t.__pseudoPreflight):ng(e,n)}(e.ownerDocument||document,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=function(e,t){let n=null,r=()=>{if(!n)try{n=Xp(e)}catch(e){Od(t,"buildCounterContext failed",e),n={get:()=>0,getStack:()=>[]}}return n};return{get:(e,t)=>r().get(e,t),getStack:(e,t)=>r().getStack(e,t)}}(e.ownerDocument||document,n));let i=n.__counterCtx;for(let o of["::before","::after","::first-letter"])try{let a=vd(e,o);if(!a||"none"===a.content&&"none"===a.backgroundImage&&"transparent"===a.backgroundColor&&!rg(a)&&(!a.transform||"none"===a.transform)&&"inline"===a.display)continue;if("::first-letter"===o){let r=vd(e),i=(r?.display||"").toLowerCase();if(i.includes("flex")||i.includes("grid"))continue;let o=e=>a[e]!==r[e]&&0!==(parseFloat(a[e])||0);if(!(a.color!==r.color||a.fontSize!==r.fontSize||a.fontWeight!==r.fontWeight||a.fontFamily!==r.fontFamily||a.fontStyle!==r.fontStyle||a.textTransform!==r.textTransform||a.float!==r.float&&"none"!==a.float||o("paddingTop")||o("paddingRight")||o("paddingBottom")||o("paddingLeft")||o("marginTop")||o("marginRight")||o("marginBottom")||o("marginLeft")))continue;let s=Array.from(t.childNodes).find(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim().length>0);if(!s)continue;let l=s.textContent,c=l.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],u=l.slice(c?.length||0);if(!c||/[\uD800-\uDFFF]/.test(c))continue;let f=document.createElement("span");f.textContent=c,f.dataset.snapdomPseudo="::first-letter";let d=yd(Ad(a),"span");n.styleMap.set(f,d);let h=document.createTextNode(u);t.replaceChild(h,s),t.insertBefore(f,h);continue}let s=a.content??"",l=""===s||"none"===s||"normal"===s,{text:c,incs:u}=sg(e,o,i,n.__siblingCounters),f=a.backgroundImage,d=a.backgroundColor,h=a.fontFamily,p=parseInt(a.fontSize)||32,g=parseInt(a.fontWeight)||!1,m=a.color||"#000",y=a.transform,v=mp(h),A=!l&&""!==c,b=f&&"none"!==f,w=d&&"transparent"!==d&&"rgba(0, 0, 0, 0)"!==d,I=rg(a),x=y&&"none"!==y,C="none"!==s&&"normal"!==s,B=C&&((parseFloat(a.width)||0)>0||(parseFloat(a.height)||0)>0),E=C&&a.boxShadow&&"none"!==a.boxShadow,S=C&&a.outlineStyle&&"none"!==a.outlineStyle&&(parseFloat(a.outlineWidth)||0)>0;if(!(A||b||w||I||x||B||E||S)){if(u&&u.length&&e.parentElement){let t=n.__siblingCounters.get(e.parentElement)||new Map;for(let{name:r}of u){if(!r)continue;let a=og(e,i,n.__siblingCounters),s=ag(e,vd(e,o),a).get(e,r);t.set(r,s)}n.__siblingCounters.set(e.parentElement,t)}continue}let k=c.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(c),F=!1;if(A&&!v&&c.length>1&&!k){let n=vd(e),r=parseFloat(n.fontSize)||16,i=parseFloat(n.lineHeight);Number.isFinite(i)||(i=1.5*r),e.getBoundingClientRect().height<1.6*i&&(t.style.whiteSpace="nowrap",F=!0)}let D=document.createElement("span");D.dataset.snapdomPseudo=o,D.style.pointerEvents="none",F&&(D.style.whiteSpace="nowrap");let N=Ad(a),M=(vd(e).display||"").toLowerCase(),T=M.includes("flex")||M.includes("grid");if(T){let e=N["min-width"];(!e||"auto"===e||"0px"===e)&&(N["min-width"]="0px")}let Q=yd(N,"span",A,T);if(n.styleMap.set(D,Q),v&&c&&1===c.length){let{dataUrl:e,width:n,height:r}=await wp(c,h,g,p,m),i=document.createElement("img");i.src=e,i.style=`height:${p}px;width:${n/r*p}px;object-fit:contain;`,D.appendChild(i),t.dataset.snapdomHasIcon="true"}else if(c&&k){let t=td(c,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??ed(c);if(t?.trim())try{let e=await sd(nd(t),{as:"dataURL",useProxy:r.useProxy});if(e?.ok&&"string"==typeof e.data){let t=document.createElement("img");t.src=e.data,t.style=`width:${p}px;height:auto;object-fit:contain;`,D.appendChild(t)}}catch(t){console.error(`[snapdom] Error in pseudo ${o} for`,e,t)}}else!v&&A&&(D.textContent=c);D.style.backgroundImage="none","maskImage"in D.style&&(D.style.maskImage="none"),"webkitMaskImage"in D.style&&(D.style.webkitMaskImage="none");try{D.style.backgroundRepeat=a.backgroundRepeat,D.style.backgroundSize=a.backgroundSize,a.backgroundPositionX&&a.backgroundPositionY?(D.style.backgroundPositionX=a.backgroundPositionX,D.style.backgroundPositionY=a.backgroundPositionY):D.style.backgroundPosition=a.backgroundPosition,D.style.backgroundOrigin=a.backgroundOrigin,D.style.backgroundClip=a.backgroundClip,D.style.backgroundAttachment=a.backgroundAttachment,D.style.backgroundBlendMode=a.backgroundBlendMode}catch{}if(b)try{let e=bd(f),t=await Promise.all(e.map(dd));D.style.backgroundImage=t.join(", ")}catch(e){console.warn(`[snapdom] Failed to inline background-image for ${o}`,e)}w&&(D.style.backgroundColor=d);let L=D.childNodes.length>0||""!==D.textContent?.trim()||b||w||I||x||B||E||S;if(u&&u.length&&e.parentElement){let t=n.__siblingCounters.get(e.parentElement)||new Map,r=og(e,i,n.__siblingCounters),a=ag(e,vd(e,o),r);for(let{name:n}of u){if(!n)continue;let r=a.get(e,n);t.set(n,r)}n.__siblingCounters.set(e.parentElement,t)}if(!L)continue;"::before"===o?(t.dataset.snapdomHasBefore="1",t.insertBefore(D,t.firstChild)):(t.dataset.snapdomHasAfter="1",t.appendChild(D))}catch(t){console.warn(`[snapdom] Failed to capture ${o} for`,e,t)}let o=Array.from(t.children).filter(e=>!e.dataset.snapdomPseudo);if(n.nodeMap)for(let e of o){let t=n.nodeMap.get(e);1===t?.nodeType&&await lg(t,e,n,r)}else{let t=Array.from(e.children);for(let e=0;e<Math.min(t.length,o.length);e++)await lg(t[e],o[e],n,r)}}function cg(e,t){if(!e||1!==e?.nodeType)return;let n=e.ownerDocument||document,r=t||n,i=e instanceof SVGSVGElement?[e]:Array.from(e.querySelectorAll("svg"));if(0===i.length)return;let o=/url\(\s*#([^)]+)\)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],s=e=>{if(!e||!e.getAttribute)return null;let t=e.getAttribute("href")||e.getAttribute("xlink:href")||("function"==typeof e.getAttributeNS?e.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(t)return t;let n=e.attributes;if(!n)return null;for(let e=0;e<n.length;e++){let t=n[e];if(!t||!t.name)continue;if("href"===t.name)return t.value;let r=t.name.indexOf(":");if(-1!==r&&"href"===t.name.slice(r+1))return t.value}return null},l=new Set(Array.from(e.querySelectorAll("[id]")).map(e=>e.id)),c=new Set,u=!1,f=(e,t=null)=>{if(!e)return;let n;for(o.lastIndex=0;n=o.exec(e);){u=!0;let e=(n[1]||"").trim();e&&(l.has(e)||(c.add(e),t&&!t.has(e)&&t.add(e)))}},d=e=>{let t=e.querySelectorAll("use");for(let e of t){let t=s(e);if(!t||!t.startsWith("#"))continue;u=!0;let n=t.slice(1).trim();n&&!l.has(n)&&c.add(n)}f(e.getAttribute("style")||"");for(let t of a)f(e.getAttribute(t));let n=e.querySelectorAll('*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]');for(let e of n){f(e.getAttribute("style")||"");for(let t of a)f(e.getAttribute(t))}};for(let e of i)d(e);if(!u)return;let h=e.querySelector("svg.inline-defs-container");h||(h=n.createElementNS("http://www.w3.org/2000/svg","svg"),h.classList.add("inline-defs-container"),h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),e.insertBefore(h,e.firstChild||null));let p=h.querySelector("defs")||null,g=t=>{if(!t||l.has(t))return null;let n=(e=>window.CSS&&CSS.escape?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,"\\$&"))(t),i=t=>{let n=r.querySelector(t);return n&&!e.contains(n)?n:null};return i(`svg defs > *#${n}`)||i(`svg > symbol#${n}`)||i(`*#${n}`)};if(!c.size)return;let m=new Set(c),y=new Set;for(;m.size;){let e=m.values().next().value;if(m.delete(e),!e||l.has(e)||y.has(e))continue;let t=g(e);if(!t){y.add(e);continue}p||(p=n.createElementNS("http://www.w3.org/2000/svg","defs"),h.appendChild(p));let r=t.cloneNode(!0);r.id||r.setAttribute("id",e),p.appendChild(r),y.add(e),l.add(e);let i=[r,...r.querySelectorAll("*")];for(let e of i){let t=s(e);if(t&&t.startsWith("#")){let e=t.slice(1).trim();e&&!l.has(e)&&!y.has(e)&&m.add(e)}let n=e.getAttribute?.("style")||"";n&&f(n,m);for(let t of a){let n=e.getAttribute?.(t);n&&f(n,m)}}}}function ug(e){if(!e||"none"===e)return{top:0,right:0,bottom:0,left:0};let t=[],n="",r=0;for(let i=0;i<e.length;i++){let o=e[i];"("===o?r++:")"===o&&(r=Math.max(0,r-1)),","===o&&0===r?(t.push(n),n=""):n+=o}n.trim()&&t.push(n);let i=0,o=0,a=0,s=0;for(let e of t){if(/\binset\b/i.test(e))continue;let t=e.match(/-?\d+(\.\d+)?px/g)?.map(e=>parseFloat(e))||[];if(t.length<2)continue;let[n,r,l=0,c=0]=t,u=Math.abs(n)+l+c,f=Math.abs(r)+l+c;o=Math.max(o,u+Math.max(n,0)),s=Math.max(s,u+Math.max(-n,0)),a=Math.max(a,f+Math.max(r,0)),i=Math.max(i,f+Math.max(-r,0))}return{top:Math.ceil(i),right:Math.ceil(o),bottom:Math.ceil(a),left:Math.ceil(s)}}function fg(e,t,n,r,i){let o=n.a,a=n.b,s=n.c,l=n.d,c=n.e||0,u=n.f||0;function f(e,t){let n=e-r,f=t-i,d=o*n+s*f,h=a*n+l*f;return d+=r+c,h+=i+u,[d,h]}let d=[f(0,0),f(e,0),f(0,t),f(e,t)],h=1/0,p=1/0,g=-1/0,m=-1/0;for(let[e,t]of d)e<h&&(h=e),t<p&&(p=t),e>g&&(g=e),t>m&&(m=t);return{minX:h,minY:p,maxX:g,maxY:m,width:g-h,height:m-p}}function dg(e,t,n){let r=(e.transformOrigin||"0 0").trim().split(/\s+/),[i,o]=[r[0]||"0",r[1]||"0"],a=(e,t)=>{let n=e.toLowerCase();return"left"===n||"top"===n?0:"center"===n?t/2:"right"===n||"bottom"===n?t:n.endsWith("px")?parseFloat(n)||0:n.endsWith("%")?(parseFloat(n)||0)*t/100:/^-?\d+(\.\d+)?$/.test(n)&&parseFloat(n)||0};return{ox:a(i,t),oy:a(o,n)}}function hg(e){let t={rotate:"0deg",scale:null,translate:null},n="function"==typeof e.computedStyleMap?e.computedStyleMap():null;if(n){let r=e=>{try{return"function"==typeof n.has&&!n.has(e)||"function"!=typeof n.get?null:n.get(e)}catch{return null}},i=r("rotate");if(i)if(i.angle){let e=i.angle;t.rotate="rad"===e.unit?180*e.value/Math.PI+"deg":e.value+e.unit}else i.unit?t.rotate="rad"===i.unit?180*i.value/Math.PI+"deg":i.value+i.unit:t.rotate=String(i);else{let n=getComputedStyle(e);t.rotate=n.rotate&&"none"!==n.rotate?n.rotate:"0deg"}let o=r("scale");if(o){let e="x"in o&&null!=o.x?.value?o.x.value:Array.isArray(o)?o[0]?.value:Number(o)||1,n="y"in o&&null!=o.y?.value?o.y.value:Array.isArray(o)?o[1]?.value:e;t.scale=`${e} ${n}`}else{let n=getComputedStyle(e);t.scale=n.scale&&"none"!==n.scale?n.scale:null}let a=r("translate");if(a){let e="x"in a&&"value"in a.x?a.x.value:Array.isArray(a)?a[0]?.value:0,n="y"in a&&"value"in a.y?a.y.value:Array.isArray(a)?a[1]?.value:0,r="x"in a&&a.x?.unit?a.x.unit:"px",i="y"in a&&a.y?.unit?a.y.unit:"px";t.translate=`${e}${r} ${n}${i}`}else{let n=getComputedStyle(e);t.translate=n.translate&&"none"!==n.translate?n.translate:null}return t}let r=getComputedStyle(e);return t.rotate=r.rotate&&"none"!==r.rotate?r.rotate:"0deg",t.scale=r.scale&&"none"!==r.scale?r.scale:null,t.translate=r.translate&&"none"!==r.translate?r.translate:null,t}Zf(),$d(),Ld();var pg=null;function gg(e){let t=function(){if(pg)return pg;let e=document.createElement("div");return e.id="snapdom-measure-slot",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(e),pg=e,e}(),n=document.createElement("div");n.style.transformOrigin="0 0",e.baseTransform&&(n.style.transform=e.baseTransform),e.rotate&&(n.style.rotate=e.rotate),e.scale&&(n.style.scale=e.scale),e.translate&&(n.style.translate=e.translate),t.appendChild(n);let r=function(e){let t=getComputedStyle(e).transform;if(!t||"none"===t)return new DOMMatrix;try{return new DOMMatrix(t)}catch{return new WebKitCSSMatrix(t)}}(n);return t.removeChild(n),r}var mg="http://www.w3.org/1999/xhtml",yg=new WeakSet;function vg(e,t){if(!t)return null;let n,r,i,o,a=e.ownerDocument||document,s=a.defaultView||window;if("viewport"===t)n=0,r=0,i=a.documentElement?.clientWidth||s.innerWidth,o=a.documentElement?.clientHeight||s.innerHeight;else{if("object"!=typeof t)return null;n=(Number(t.x)||0)-(s.scrollX||0),r=(Number(t.y)||0)-(s.scrollY||0),i=Number(t.width),o=Number(t.height)}return i>0&&o>0?{left:n,top:r,width:i,height:o,right:n+i,bottom:r+o}:null}function Ag(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode&&e.getRootNode();return t instanceof ShadowRoot?t.host:null}function bg(e,t){for(let n=t;n;n=Ag(n))if(n===e)return!0;return!1}function wg(e,t){for(let n=Ag(e);n&&n!==t&&1===n?.nodeType;n=Ag(n)){let e=vd(n);if("static"!==e.position||e.transform&&"none"!==e.transform||e.filter&&"none"!==e.filter||e.backdropFilter&&"none"!==e.backdropFilter||e.perspective&&"none"!==e.perspective||/transform|perspective|filter/.test(e.willChange||"")||/layout|paint|strict|content/.test(e.contain||""))return n}return null}function Ig(e,t){try{let n=new DOMMatrix;if(t&&t.rotate&&"0deg"!==t.rotate&&(n=n.multiply(new DOMMatrix(`rotate(${t.rotate})`))),t&&t.scale){let e=String(t.scale).trim().split(/\s+/).filter(Boolean);e.length&&e.every(e=>Number.isFinite(Number(e)))&&(n=n.multiply(new DOMMatrix(`scale(${e.join(",")})`)))}return e&&(n=n.multiply(new DOMMatrix(e))),n}catch{return null}}function xg(e){let t=e.display||"";if(t.includes("flex")||t.includes("grid")||t.startsWith("table")||"inline-block"===t||"flow-root"===t||"absolute"===e.position||"fixed"===e.position||e.float&&"none"!==e.float)return!0;let n=e.overflowX||e.overflow||"visible",r=e.overflowY||e.overflow||"visible";return!!("visible"!==n||"visible"!==r||e.contain&&/\b(layout|content|paint|strict)\b/.test(e.contain))}function Cg(e,t){let n=Array.from(e.childNodes),r="top"===t?n:n.reverse();for(let e of r){if(e.nodeType===Node.TEXT_NODE){if(/\S/.test(e.textContent||""))return null;continue}if(e.nodeType!==Node.ELEMENT_NODE)continue;let t=getComputedStyle(e),n=String(t.display||"");if("none"!==n&&"contents"!==n&&"absolute"!==t.position&&"fixed"!==t.position)return t.float&&"none"!==t.float||n.startsWith("inline")?null:e}return null}var Bg=/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g;function Eg(e,t={}){e&&(function(e,t={}){let{stripFrameworkDirectives:n=!0}=t,r=new Set(["xml","xlink"]),i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;i.nextNode();){let e=i.currentNode;for(let t of Array.from(e.attributes)){let i=t.name;if(i.startsWith("*"))e.removeAttribute(i);else if(i.includes("@"))e.removeAttribute(i);else{if(i.includes(":")){let t=i.split(":",1)[0];if(!r.has(t)){e.removeAttribute(i);continue}}n&&(i.startsWith("x-")||i.startsWith("v-")||i.startsWith(":")||i.startsWith("on:")||i.startsWith("bind:")||i.startsWith("let:")||i.startsWith("class:"))&&e.removeAttribute(i)}}}}(e,t),function(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),n=[];for(;t.nextNode();)n.push(t.currentNode);for(let e of n)e.remove()}(e),function(e){if(!e)return;let t=e=>{if(e.nodeType===Node.ELEMENT_NODE){if(e.attributes)for(let t of Array.from(e.attributes)){let n=t.value.replace(Bg,"");if(n!==t.value)try{e.setAttribute(t.name,n)}catch{}}}else if(e.nodeType===Node.TEXT_NODE||e.nodeType===Node.CDATA_SECTION_NODE){let t=e.data.replace(Bg,"");t!==e.data&&(e.data=t)}};t(e);let n,r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);for(;n=r.nextNode();)t(n)}(e))}function Sg(e,t){if(1!==e?.nodeType||function(e){try{let t=e.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(t)}catch{return!1}}(e)||function(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLIFrameElement||e instanceof SVGElement||e instanceof HTMLObjectElement||e instanceof HTMLEmbedElement}(e))return!1;let n=t.position;if("absolute"===n||"fixed"===n||"sticky"===n)return!1;let r=t.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||t.transform&&"none"!==t.transform)}function kg(e){let t=getComputedStyle(e);return!("none"===t.display||"absolute"===t.position||"fixed"===t.position)}function Fg(e,t){if(1!==e?.nodeType)return!1;if("exclude"===e.getAttribute("data-capture")&&"remove"===t?.excludeMode)return!0;if(Array.isArray(t?.exclude))for(let n of t.exclude)try{if(e.matches(n))return"remove"===t.excludeMode}catch(e){Od(t,"exclude selector match failed",e)}if("function"==typeof t?.filter&&"remove"===t.filterMode)try{if(!t.filter(e))return!0}catch(e){Od(t,"filter function failed",e)}return!1}var Dg=(e,t=3)=>Number.isFinite(e)?Math.round(e*10**t)/10**t:e,Ng=.75;var Mg=/::-webkit-scrollbar(-[a-z]+)?\b/i;function Tg(e,t=new Set){let n="";if(!e)return n;for(let r=0;r<e.length;r++){let i=e[r];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){n+=Tg(i.styleSheet.cssRules,t);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let e=Tg(i.cssRules,t);e&&(n+=`@media ${i.conditionText}{${e}}`);continue}if(i.type===CSSRule.STYLE_RULE){let e=i.selectorText||"";if(Mg.test(e)){let e=i.cssText;e&&!t.has(e)&&(t.add(e),n+=e)}}}catch{}}return n}var Qg=new WeakMap;qd();var Lg=new Set;async function Rg(e,t={}){let n=t.__session||Kf.session,r={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:t},i=null;if(t.clip){let n=vg(e,t.clip);if(n){r.clip={rect:n,root:e};let t=e.getBoundingClientRect();i={x:n.left-t.left,y:n.top-t.top,width:n.width,height:n.height}}}let o,a="",s="";if(Lg.size){let t=(e,t)=>{for(let n=t;n;n=n.assignedSlot||n.parentElement||n.getRootNode()?.host)if(n===e)return!0;return!1};for(;;){let n=[...Lg].filter(({root:n})=>t(n,e)||t(e,n)).map(({promise:e})=>e.catch(()=>{}));if(!n.length)break;await Promise.all(n)}}if(!r.clip&&e.isConnected&&"hidden"!==e.ownerDocument?.visibilityState)try{let t=e.getBoundingClientRect(),n=e.ownerDocument?.defaultView||window,r=t.right<=0||t.bottom<=0||t.left>=n.innerWidth||t.top>=n.innerHeight,i=[];if(r&&(()=>{let t=[];e.shadowRoot&&t.push(e.shadowRoot);for(let n of e.querySelectorAll("*"))n.shadowRoot&&t.push(n.shadowRoot);for(;t.length;){let e=t.pop(),n="calcite-icon"===e.host?.localName;for(let r of e.querySelectorAll("*")){if(r.shadowRoot&&t.push(r.shadowRoot),!n||"svg"!==r.localName)continue;let e=r.querySelectorAll("path");if(!e.length||[...e].some(e=>e.getAttribute("d")?.trim()))continue;let o=r.getBoundingClientRect();o.width&&o.height&&i.push(r)}}})(),i.length){let t=(async()=>{let t=e.style,r=e.hasAttribute("style"),o=new Map,a=(e,n)=>{o.has(e)||o.set(e,{value:t.getPropertyValue(e),priority:t.getPropertyPriority(e)}),t.setProperty(e,n,"important");let r=o.get(e);r.forcedValue=t.getPropertyValue(e),r.forcedPriority=t.getPropertyPriority(e)};try{a("left","0"),a("top","0"),a("right","auto"),a("bottom","auto"),a("margin-top","0"),a("margin-right","0"),a("margin-bottom","0"),a("margin-left","0"),a("transform","none"),a("translate","none"),a("opacity","0"),a("pointer-events","none");let t=e.getBoundingClientRect();if(t.right<=0||t.bottom<=0||t.left>=n.innerWidth||t.top>=n.innerHeight){let t=e.parentElement?.getBoundingClientRect(),r=t&&t.right>0&&t.left<n.innerWidth?Math.max(0,t.left):0,i=t&&t.bottom>0&&t.top<n.innerHeight?Math.max(0,t.top):0;a("position","fixed"),a("left",`${r}px`),a("top",`${i}px`)}await Ud(100);let r=Date.now()+1500,o=()=>i.some(e=>{if([...e.querySelectorAll("path")].some(e=>e.getAttribute("d")?.trim()))return!1;let t=e.getBoundingClientRect();return t.width&&t.height&&t.right>0&&t.bottom>0&&t.left<n.innerWidth&&t.top<n.innerHeight});for(;Date.now()<r&&o();)await new Promise(e=>setTimeout(e,25));await Ud(100)}finally{for(let[e,n]of o)t.getPropertyValue(e)!==n.forcedValue||t.getPropertyPriority(e)!==n.forcedPriority||(n.value?t.setProperty(e,n.value,n.priority):t.removeProperty(e));!r&&!t.length&&e.removeAttribute("style"),await Ud(100)}})(),r={root:e,promise:t};Lg.add(r);try{await t}finally{Lg.delete(r)}}}catch{}let l=function(e){let t=getComputedStyle(e),n=t.outlineStyle,r=t.outlineWidth,i=t.borderStyle,o=t.borderWidth,a="none"!==n&&parseFloat(r)>0,s="none"===i||0===parseFloat(o);if(a&&s){let t=e.style.border;return e.style.border=`${r} solid transparent`,()=>{e.style.border=t}}return()=>{}}(e),c=r.clip?()=>{}:function(e){let t=[];try{let n=e.querySelectorAll("*");for(let e of n){if(!(e instanceof HTMLElement))continue;let n=e.style.contentVisibility||"",r=getComputedStyle(e);"auto"===(r.contentVisibility||r.getPropertyValue("content-visibility")||"")&&(t.push({el:e,original:n}),e.style.contentVisibility="visible")}if(e instanceof HTMLElement){let n=getComputedStyle(e);"auto"===(n.contentVisibility||n.getPropertyValue("content-visibility")||"")&&(t.push({el:e,original:e.style.contentVisibility||""}),e.style.contentVisibility="visible")}}catch{}return()=>{for(let{el:e,original:n}of t)try{e.style.contentVisibility=n}catch{}}}(e);try{o=await up(e,r,t)}catch(e){throw console.warn("deepClone failed:",e),e}finally{c(),l()}try{cg(o)}catch(e){console.warn("inlineExternal defs or symbol failed:",e)}try{await lg(e,o,r,t)}catch(e){console.warn("inlinePseudoElements failed:",e)}await async function(e,t=null){if(!e)return;let n=t,r=np(e,"img");for(let e of r)try{let t=e.getAttribute("src")||e.currentSrc||"";if(Zh(t)){let n=await _h(t);e.setAttribute("src",n)}let r=e.getAttribute("srcset");if(r&&r.includes("blob:")){let t=ep(r),i=!1;for(let e of t)if(Zh(e.url))try{e.url=await _h(e.url),i=!0}catch(e){Od(n,"blobUrlToDataUrl for srcset item failed",e)}i&&e.setAttribute("srcset",tp(t))}}catch(e){Od(n,"resolveBlobUrls for img failed",e)}let i=np(e,"image");for(let e of i)try{let t="http://www.w3.org/1999/xlink",n=e.getAttribute("href")||e.getAttributeNS?.(t,"href");if(Zh(n)){let r=await _h(n);e.setAttribute("href",r),e.removeAttributeNS?.(t,"href")}}catch(e){Od(n,"resolveBlobUrls for SVG image href failed",e)}let o=np(e,"[style*='blob:']");for(let e of o)try{let t=e.getAttribute("style");if(t&&t.includes("blob:")){let n=await Kh(t);e.setAttribute("style",n)}}catch(e){Od(n,"replaceBlobUrls in inline style failed",e)}let a=e.querySelectorAll?e.querySelectorAll("style"):[];for(let e of a)try{let t=e.textContent||"";t.includes("blob:")&&(e.textContent=await Kh(t))}catch(e){Od(n,"replaceBlobUrls in style tag failed",e)}let s=["poster"];for(let t of s){let r=np(e,`[${t}^='blob:']`);for(let e of r)try{let n=e.getAttribute(t);Zh(n)&&e.setAttribute(t,await _h(n))}catch(e){Od(n,`resolveBlobUrls for ${t} failed`,e)}}}(o,r);try{let e=o.querySelectorAll("style[data-sd]");for(let t of e)s+=t.textContent||"",t.remove()}catch(e){Od(r,"Failed to extract shadow CSS from style[data-sd]",e)}let u=function(e){let t=Array.from(new Set(e.values())).filter(Boolean).sort(),n=new Map,r=1;for(let e of t)n.set(e,"c"+r++);return n}(r.styleMap);a=Array.from(u.entries()).map(([e,t])=>`.${t}{${e}}`).join(""),a=s+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+a;for(let[e,t]of r.styleMap.entries()){if("STYLE"===e.tagName)continue;if(e.getRootNode&&e.getRootNode()instanceof ShadowRoot){e.setAttribute("style",t.replace(/;/g,"; "));continue}let n=u.get(t);n&&e.classList.add(n);let r=e.style?.backgroundImage,i=e.dataset?.snapdomHasIcon;r&&"none"!==r&&(e.style.backgroundImage=r),i&&(e.style.verticalAlign="middle",e.style.display="inline")}if((r.clip||e.scrollTop||e.scrollLeft)&&1===o?.nodeType)try{let t=r.clip&&i?{x:i.x,y:i.y}:{x:0,y:0};!function(e,t,n,r,i){let o=e.getBoundingClientRect();1===t?.nodeType&&t.namespaceURI===mg&&"static"===vd(e).position&&(t.style.position="relative");let a=[];for(let[t,s]of n){if(1!==t?.nodeType||t.namespaceURI!==mg||1!==s?.nodeType||s===e||!bg(e,s))continue;let n=r.get(s)||vd(s),l=n.position;if("fixed"!==l&&"sticky"!==l&&"-webkit-sticky"!==l||"absolute"===t.style.position)continue;let c=s.getBoundingClientRect();if(!(c.width>0&&c.height>0))continue;yg.add(t);let u=n.transform&&"none"!==n.transform?n.transform:"",f=hg(s),d=!!(u||"0deg"!==f.rotate||f.scale||f.translate),h=d?Ig(u,f):null,p=!h||!h.is2D||1===h.a&&0===h.b&&0===h.c&&1===h.d,g=c.width,m=c.height;p||(g=s.offsetWidth||c.width,m=s.offsetHeight||c.height);let y=s.getRootNode&&s.getRootNode()instanceof ShadowRoot,v=o,A=e.clientLeft||0,b=e.clientTop||0;if(y){let t=wg(s,e);t&&(v=t.getBoundingClientRect(),A=t.clientLeft||0,b=t.clientTop||0)}let w=c.left-v.left-A,I=c.top-v.top-b;if(d)if(t.style.translate="none",t.style.rotate="none",t.style.scale="none",p)t.style.transform="none";else{t.style.transform=`matrix(${h.a},${h.b},${h.c},${h.d},0,0)`;let{ox:e,oy:r}=dg(n,g,m),i=fg(g,m,{a:h.a,b:h.b,c:h.c,d:h.d,e:0,f:0},e,r);w-=i.minX,I-=i.minY}if("fixed"!==l){let e=t.cloneNode(!1);e.setAttribute("data-snap-ph","1"),e.style.position="static",e.style.visibility="hidden",e.style.width=`${g}px`,e.style.height=`${m}px`,e.style.boxSizing="border-box",t.parentElement?.insertBefore(e,t)}let x=g+2,C=m;i&&(Math.abs(I-i.y)<.5&&(I-=1,C+=1),Math.abs(w-i.x)<.5&&(w-=1,x+=1)),t.style.position="absolute",t.style.left=`${w}px`,t.style.top=`${I}px`,t.style.right="auto",t.style.bottom="auto",t.style.margin="0",t.style.width=`${x}px`,t.style.height=`${C}px`,t.style.boxSizing="border-box",y||a.push(t)}for(let e of a)t.appendChild(e)}(e,o,r.nodeMap,r.styleCache,t)}catch(e){Od(r,"freezeViewportPositioned failed",e)}for(let[t,n]of r.nodeMap.entries()){if(r.clip&&n===e)continue;let i=n.scrollLeft,o=n.scrollTop;if((i||o)&&1===t?.nodeType&&"http://www.w3.org/1999/xhtml"===t.namespaceURI){t.style.overflow="hidden",t.style.scrollbarWidth="none",t.style.msOverflowStyle="none";try{let e=t.querySelectorAll("*");for(let t of e){if(1!==t.nodeType||"http://www.w3.org/1999/xhtml"!==t.namespaceURI)continue;let e=t.style.position;if("fixed"===e||"absolute"===e){let n=parseFloat(t.style.top)||0,r=parseFloat(t.style.left)||0;t.style.top=`${n+o}px`,t.style.left=`${r+i}px`,"fixed"===e&&(t.style.position="absolute")}}}catch{}let e=document.createElement("div");for(e.style.all="unset",e.style.transform=`translate(${-i}px, ${-o}px)`,e.style.willChange="transform",e.style.display="inline-block",e.style.width="100%";t.firstChild;)e.appendChild(t.firstChild);t.appendChild(e)}}if(e===r.nodeMap.get(o)){let t=r.styleCache.get(e)||vd(e);r.styleCache.set(e,t);let n=function(e){if(!e||"none"===e)return"";let t=e.replace(/translate[XY]?\([^)]*\)/g,"");return t=t.replace(/matrix\(([^)]+)\)/g,(e,t)=>{let n=t.split(",").map(e=>e.trim());return 6!==n.length?`matrix(${t})`:(n[4]="0",n[5]="0",`matrix(${n.join(", ")})`)}),t=t.replace(/matrix3d\(([^)]+)\)/g,(e,t)=>{let n=t.split(",").map(e=>e.trim());return 16!==n.length?`matrix3d(${t})`:(n[12]="0",n[13]="0",`matrix3d(${n.join(", ")})`)}),t.trim().replace(/\s{2,}/g," ")}(t.transform);o.style.margin="0",o.style.top="auto",o.style.left="auto",o.style.right="auto",o.style.bottom="auto",o.style.animation="none",o.style.transition="none",o.style.willChange="auto",o.style.float="none",o.style.clear="none",o.style.transform=n||""}for(let[e,t]of r.nodeMap.entries())"PRE"===t.tagName&&(e.style.marginTop="0",e.style.marginBlockStart="0");return{clone:o,classCSS:a,styleCache:r.styleCache,nodeMap:r.nodeMap,reconcileRisk:r.reconcileRisk||0,clipWindow:i}}fd(),Zf();var Ug="http://www.w3.org/1999/xlink";async function Hg(e,t={}){let n=Array.from(e.querySelectorAll("img"));"IMG"===e.tagName&&n.unshift(e);let r=async e=>{if(!e.getAttribute("src")){let t=e.currentSrc||e.src||Oh(e.getAttribute("srcset"),e)||"";t&&e.setAttribute("src",t)}e.removeAttribute("srcset"),e.removeAttribute("sizes");let n=e.src||"";if(!n)return;let r=Kf.image?.get(n);if(r)return e.src=r,e.width||(e.width=e.naturalWidth||100),void(e.height||(e.height=e.naturalHeight||100));let i=await sd(n,{as:"dataURL",useProxy:t.useProxy});if(i.ok&&"string"==typeof i.data&&i.data.startsWith("data:"))return Kf.image?.set(n,i.data),e.src=i.data,e.width||(e.width=e.naturalWidth||100),void(e.height||(e.height=e.naturalHeight||100));let{width:o,height:a}=function(e){let t=parseInt(e.dataset?.snapdomWidth||"",10)||0,n=parseInt(e.dataset?.snapdomHeight||"",10)||0,r=parseInt(e.getAttribute("width")||"",10)||0,i=parseInt(e.getAttribute("height")||"",10)||0,o=parseFloat(e.style?.width||"")||0,a=parseFloat(e.style?.height||"")||0;return{width:t||o||r||e.width||e.naturalWidth||100,height:n||a||i||e.height||e.naturalHeight||100}}(e),{fallbackURL:s}=t||{};if(s)try{let r="function"==typeof s?await s({width:o,height:a,src:n,element:e}):s;if(r){let n=await sd(r,{as:"dataURL",useProxy:t.useProxy});if(n?.ok&&"string"==typeof n.data)return e.src=n.data,e.width||(e.width=o),void(e.height||(e.height=a))}}catch{}if(!1!==t.placeholders){let t=document.createElement("div");t.style.cssText=[`width:${o}px`,`height:${a}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${a}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),t.textContent="img",e.replaceWith(t)}else{let t=document.createElement("div");t.style.cssText=`display:inline-block;width:${o}px;height:${a}px;visibility:hidden;`,e.replaceWith(t)}};for(let e=0;e<n.length;e+=6){let t=n.slice(e,e+6).map(r);await Promise.allSettled(t)}let i=Array.from(e.querySelectorAll("image"));"image"===e.localName&&i.unshift(e);let o=async e=>{let n=function(e){return e.getAttribute("href")||e.getAttribute("xlink:href")||("function"==typeof e.getAttributeNS?e.getAttributeNS(Ug,"href"):null)}(e);if(!n||n.startsWith("data:")||n.startsWith("blob:"))return;let r=await sd(n,{as:"dataURL",useProxy:t.useProxy});r.ok&&"string"==typeof r.data&&r.data.startsWith("data:")&&(e.setAttribute("href",r.data),e.removeAttribute("xlink:href"),"function"==typeof e.removeAttributeNS&&e.removeAttributeNS(Ug,"href"))};for(let e=0;e<i.length;e+=6){let t=i.slice(e,e+6).map(o);await Promise.allSettled(t)}}$d(),Zf();var qg=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],Og=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],Pg=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],$g=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function zg(e,t,n,r){let i=n.get(e)||vd(e);n.has(e)||n.set(e,i);let o=i.getPropertyValue("border-image"),a=i.getPropertyValue("border-image-source"),s=o&&"none"!==o||a&&"none"!==a,l=i.getPropertyValue("background-image"),c=i.getPropertyValue("background-color");if(l&&"none"!==l||c&&"rgba(0, 0, 0, 0)"!==c&&"transparent"!==c||/url\s*\(|gradient\s*\(/i.test(i.getPropertyValue("background")||""))for(let e of Pg){let n=i.getPropertyValue(e);n&&t.style.setProperty(e,n)}for(let e of qg){let n=i.getPropertyValue(e);if("background-image"===e&&(!n||"none"===n)){let e=i.getPropertyValue("background");e&&/url\s*\(/.test(e)&&(n=bd(e).filter(e=>/url\s*\(/.test(e)).join(", ")||n)}if(!n||"none"===n)continue;let o=bd(n),a=await Promise.all(o.map(e=>dd(e,r)));a.some(e=>e&&"none"!==e&&!/^url\(undefined/.test(e))&&t.style.setProperty(e,a.join(", "))}for(let e of Og){let n=i.getPropertyValue(e);!n||"initial"===n||t.style.setProperty(e,n)}if(s)for(let e of $g){let n=i.getPropertyValue(e);!n||"initial"===n||t.style.setProperty(e,n)}}function jg(e,t,n=Kf.session.nodeMap){let r=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(let e=i.currentNode;e;e=i.nextNode()){let i=n.get(e);if(1!==i?.nodeType)continue;let o=vd(i),a=o.getPropertyValue("backdrop-filter")||o.getPropertyValue("-webkit-backdrop-filter");a&&"none"!==a&&e!==t&&r.push({cloneEl:e,orig:i,bf:a,path:Wg(t,e)})}if(!r.length)return;let o=e.getBoundingClientRect(),a=r.map((e,i)=>{let o=t.cloneNode(!0);(function(e,t,n,r){let i=[[e,t]];for(;i.length;){let[e,t]=i.pop(),o=r.get(t);if(1===o?.nodeType){let t=o.getBoundingClientRect();(t.left>n.right+Yg||t.right<n.left-Yg||t.top>n.bottom+Yg||t.bottom<n.top-Yg)&&("IMG"===e.tagName&&e.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),e.style&&(e.style.backgroundImage="none"))}let a=e.children,s=t.children;for(let e=0;e<a.length;e++)i.push([a[e],s[e]])}})(o,t,e.orig.getBoundingClientRect(),n),function(e){if(e)for(let t=e;t&&t.parentNode;){let n=t.parentNode;for(;t.nextSibling;)t.nextSibling.remove();t===e&&t.remove(),t=n}}(Gg(o,e.path));for(let e=0;e<i;e++){let t=Gg(o,r[e].path);t&&(t.style.setProperty("backdrop-filter","none","important"),t.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...e,copy:o}});for(let{cloneEl:e,orig:t,bf:n,copy:r}of a)Vg(e,t,n,r,o)}function Vg(e,t,n,r,i){let o=t.getBoundingClientRect();if(!o.width||!o.height)return;let a=vd(t),s=t.offsetWidth?o.width/t.offsetWidth:1,l=Math.abs(s-1)>.001?1/s:1;r.style.position="absolute",r.style.left=(i.left-o.left)*l+"px",r.style.top=(i.top-o.top)*l+"px",r.style.width=`${i.width}px`,r.style.height=`${i.height}px`,r.style.margin="0",r.style.filter=n,1!==l&&(r.style.transform=`scale(${l})`,r.style.transformOrigin="top left");let c=document.createElement("div");c.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",c.appendChild(r);let u=document.createElement("div");u.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",u.style.backgroundColor=a.backgroundColor,u.style.backgroundImage=e.style.backgroundImage||a.backgroundImage;for(let e of["background-size","background-position","background-repeat","background-origin","background-clip"])u.style.setProperty(e,a.getPropertyValue(e));e.style.setProperty("background-color","transparent","important"),e.style.setProperty("background-image","none","important"),e.style.setProperty("backdrop-filter","none","important"),e.style.setProperty("-webkit-backdrop-filter","none","important"),"static"===a.position&&(e.style.position="relative"),e.style.isolation="isolate",e.prepend(u),e.prepend(c)}Zf(),$d();var Yg=128;function Wg(e,t){let n=[];for(let r=t;r!==e;r=r.parentElement){if(!r?.parentElement)return null;n.push([...r.parentElement.children].indexOf(r))}return n.reverse()}function Gg(e,t){if(!t)return null;let n=e;for(let e of t)if(n=n.children[e],!n)return null;return n}function Jg(e,t){if(!e)return()=>{};let n=[],r=200;return function e(i){if(t){let e=i.getBoundingClientRect();if(e.width>0||e.height>0){let n=Math.max(e.right,e.left+(i.scrollWidth||0)),o=Math.max(e.bottom,e.top+(i.scrollHeight||0));if(n<t.left-r||e.left>t.right+r||o<t.top-r||e.top>t.bottom+r)return}}let o=getComputedStyle(i),a=function(e,t){if(!e)return()=>{};t=t||getComputedStyle(e);let n=function(e){let t=e.getPropertyValue("-webkit-line-clamp")||e.getPropertyValue("line-clamp");t=(t||"").trim();let n=parseInt(t,10);return Number.isFinite(n)&&n>0?n:0}(t);if(n<=0)return()=>{};if(!Xg(e))return()=>{};let r=_g(e),i=r.text,o=function(e){return(parseFloat(e.paddingTop)||0)+(parseFloat(e.paddingBottom)||0)}(t);r.write("X");let a=e.scrollHeight-o;r.restore();let s=a>0?a:function(e){let t=(e.lineHeight||"").trim(),n=parseFloat(e.fontSize)||16;return t&&"normal"!==t?t.endsWith("px")?parseFloat(t):/^\d+(\.\d+)?$/.test(t)?Math.round(parseFloat(t)*n):t.endsWith("%")?Math.round(parseFloat(t)/100*n):Math.round(1.2*n):Math.round(1.2*n)}(t),l=Math.round(s*n+o);if(e.scrollHeight<=l+.5)return()=>{};let c=0,u=i.length,f=-1;for(;c<=u;){let t=c+u>>1;r.write(i.slice(0,t)+"…"),e.scrollHeight<=l+.5?(f=t,c=t+1):u=t-1}return r.write((f>=0?i.slice(0,f):"")+"…"),()=>{r.restore()}}(i,o);a&&n.push(a);let s=function(e,t){if(!e)return()=>{};if(t=t||getComputedStyle(e),"ellipsis"!==t.textOverflow)return()=>{};if("nowrap"!==t.whiteSpace&&"pre"!==t.whiteSpace)return()=>{};if("hidden"!==t.overflowX&&"clip"!==t.overflowX)return()=>{};if(!Xg(e))return()=>{};if(e.scrollWidth<=e.clientWidth+.5)return()=>{};let n=_g(e),r=n.text,i=0,o=r.length,a=-1;for(;i<=o;){let t=i+o>>1;n.write(r.slice(0,t)+"…"),e.scrollWidth<=e.clientWidth+.5?(a=t,i=t+1):o=t-1}return n.write((a>=0?r.slice(0,a):"")+"…"),()=>{n.restore()}}(i,o);s&&n.push(s);for(let t of i.children||[])e(t)}(e),()=>n.forEach(e=>e())}function _g(e){let t=[];for(let n=e.firstChild;n;n=n.nextSibling)n.nodeType===Node.TEXT_NODE&&t.push(n);let n=t.map(e=>e.data);return{text:n.join(""),write(e){t[0].data=e;for(let e=1;e<t.length;e++)t[e].data=""},restore(){for(let e=0;e<t.length;e++)t[e].data=n[e]}}}function Xg(e){return!(e.childElementCount>0)&&Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}$d(),Zf();var Kg=[];function Zg(e){if(!e)return null;if(Array.isArray(e)){let[t,n]=e;return"function"==typeof t?t(n):t}if("object"==typeof e&&"plugin"in e){let{plugin:t,options:n}=e;return"function"==typeof t?t(n):t}return"function"==typeof e?e():e}function em(e){return e&&Array.isArray(e.plugins)?e.plugins:Kg}async function tm(e,t,n){let r=n,i=em(t);for(let n of i){let i=n&&"function"==typeof n[e]?n[e]:null;if(!i)continue;let o=await i(t,r);typeof o<"u"&&(r=o)}return r}function nm(e,t,n=!1){return!e||e.plugins&&!n||(e.plugins=function(e){let t=[];if(Array.isArray(e))for(let n of e){let e=Zg(n);if(!e||!e.name)continue;let r=t.findIndex(t=>t&&t.name===e.name);r>=0&&t.splice(r,1),t.push(e)}for(let e of Kg)e&&e.name&&!t.some(t=>t.name===e.name)&&t.push(e);return Object.freeze(t)}(t)),e}function rm(){return Kg.slice()}Zf();async function im(e,t,n){if("string"!=typeof e||!e.startsWith("data:image")||e.startsWith("data:image/svg"))return null;let r=e.length+":"+e.slice(0,64)+e.slice(-64)+":"+Math.round(t)+"x"+Math.round(n);if(Kf.compress.has(r))return Kf.compress.get(r);let i=await(async()=>{let r;try{r=await async function(e){let t=new Image;if(t.decoding="sync",t.src=e,"function"==typeof t.decode)try{return await t.decode(),t}catch{}return await new Promise((e,n)=>{t.onload=()=>e(),t.onerror=n}),t}(e)}catch{return null}let i=r.naturalWidth||r.width,o=r.naturalHeight||r.height;if(!i||!o)return null;let a=Math.min(1,Math.max(t/i,n/o));if(!(a>0)||a>=.95)return null;let s=.95*a,l=Math.max(1,Math.round(i*s)),c=Math.max(1,Math.round(o*s)),u=document.createElement("canvas");u.width=l,u.height=c;let f=u.getContext("2d");if(!f)return null;f.imageSmoothingEnabled=!0,f.imageSmoothingQuality="high",f.drawImage(r,0,0,l,c);let d=function(e){let t=/^data:([^;,]+)/.exec(e);return t?t[1]:""}(e),h="image/jpeg"===d?"image/jpeg":"image/webp"===d?"image/webp":"image/png";try{let t=u.toDataURL(h,.92);if("string"==typeof t&&t.startsWith("data:image")&&t.length<e.length)return t}catch{}return null})();return Kf.compress.set(r,i),i}async function om(e,t,n){t.compress&&(await async function(e,t){if(!t.compress)return{count:0,before:0,after:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("img"));"IMG"===e.tagName&&r.unshift(e);let i=0,o=0,a=0,s=async e=>{let t=e.getAttribute("src")||"";if(!t.startsWith("data:image")||t.startsWith("data:image/svg"))return;let r=parseFloat(e.dataset.snapdomWidth)||parseFloat(e.style.width)||e.width||0,s=parseFloat(e.dataset.snapdomHeight)||parseFloat(e.style.height)||e.height||0;if(!r||!s)return;let l=await im(t,r*n,s*n);l&&(i++,o+=t.length,a+=l.length,e.setAttribute("src",l))};for(let e=0;e<r.length;e+=6)await Promise.allSettled(r.slice(e,e+6).map(s));return{count:i,before:o,after:a}}(e,t),await async function(e,t,n=Kf.session.nodeMap){if(!t.compress)return{count:0};let r=(t.scale||1)*(t.dpr||1),i=[],o=[e,...e.querySelectorAll("*")];for(let e of o){let t=e.style&&e.style.backgroundImage;t&&t.includes("data:image")&&i.push(e)}let a=0,s=async e=>{let t,i=n.get(e);if(!i||!i.isConnected)return;try{t=getComputedStyle(i)}catch{return}if((t.backgroundRepeat||"repeat").toLowerCase().split(",").some(e=>"no-repeat"!==e.trim()))return;let{w:o,h:s}=function(e){return{w:e.offsetWidth||e.getBoundingClientRect().width||0,h:e.offsetHeight||e.getBoundingClientRect().height||0}}(i);if(!o||!s)return;let l=o*r,c=s*r,u=e.style.backgroundImage,f=[...u.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],d=u;for(let e of f){let t=e[2];if(t.startsWith("data:image/svg"))continue;let n=await im(t,l,c);n&&(d=d.split(t).join(n),a++)}d!==u&&(e.style.backgroundImage=d)};for(let e=0;e<i.length;e+=6)await Promise.allSettled(i.slice(e,e+6).map(s));return{count:a}}(e,t,n),await async function(e,t){if(!t.compress)return{count:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("image"));"image"===e.localName&&r.unshift(e);let i=0,o=async e=>{let t=e.getAttribute("href")||("function"==typeof e.getAttributeNS?e.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!t||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return;let r=parseFloat(e.getAttribute("width"))||0,o=parseFloat(e.getAttribute("height"))||0;if(!r||!o)return;let a=await im(t,r*n,o*n);a&&(e.setAttribute("href",a),e.hasAttribute("xlink:href")&&e.setAttribute("xlink:href",a),i++)};for(let e=0;e<r.length;e+=6)await Promise.allSettled(r.slice(e,e+6).map(o));return{count:i}}(e,t))}async function am(e,t){if(!e)throw new Error("Element cannot be null or undefined");(function(e="soft"){switch(e){case"auto":return Kf.session.styleMap=new Map,void(Kf.session.nodeMap=new Map);case"soft":default:return Kf.session.styleMap=new Map,Kf.session.nodeMap=new Map,void(Kf.session.styleCache=new WeakMap);case"full":return;case"disabled":Kf.session.styleMap=new Map,Kf.session.nodeMap=new Map,Kf.session.styleCache=new WeakMap,Kf.computedStyle=new WeakMap,Kf.measureHints=new WeakMap,Kf.baseStyle=new Xf(50),Kf.defaultStyle=new Xf(30),Kf.image=new Xf(100),Kf.background=new Xf(100),Kf.resource=new Xf(150),Kf.compress=new Xf(50),Kf.font=new Set}})(t.cache),t.__session={styleMap:Kf.session.styleMap,styleCache:Kf.session.styleCache,nodeMap:Kf.session.nodeMap},t.burst||function(e){let t=Date.now(),n=Kf.burstAdvice.get(e);!n||t-n.firstTs>2e3?Kf.burstAdvice.set(e,{count:1,firstTs:t,warned:!1}):(n.count++,n.count>=3&&!n.warned&&(n.warned=!0,console.warn("[snapdom] Captured this element multiple times. Pass { burst: true } to increase the speed.")))}(e),t.__resolveNodeHooks=function(e){let t=Array.isArray(e.plugins)?e.plugins:rm(),n=[];for(let e of t){let t=Zg(e);t&&"function"==typeof t.resolveNode&&n.push(t.resolveNode.bind(t))}return n.length?n:null}(t);let n,r,i,o,a,s,l,c,u=t.fast,f=!1!==t.outerTransforms,d=!!t.outerShadows,h=t.clip?vg(e,t.clip):null,p={element:e,options:t,plugins:t.plugins},g="",m="",y=null;await tm("beforeSnap",p);let v=null;!1!==t.resolvePicturePlaceholders&&!function(e){if(Array.isArray(e.plugins))for(let t of e.plugins)if("picture-resolver"===Zg(t)?.name)return!0;return rm().some(e=>"picture-resolver"===e?.name)}(t)&&(v=await zh(p.element,p.options)),await tm("beforeClone",p);let A=Jg(p.element,h);try{({clone:n,classCSS:r,styleCache:i,nodeMap:o,reconcileRisk:a,clipWindow:s}=await Rg(p.element,p.options)),a>0&&!t.reconcile&&!Kf.warnedReconcile&&(Kf.warnedReconcile=!0,console.warn("[snapdom] Text in inline/table-cell elements kept its natural width and may re-wrap under font-fallback rasterization. Pass { reconcile: true } for pixel-exact layout (roughly doubles capture time).")),!f&&n&&(y=function(e,t){if(!e||!t||!t.style)return null;let n=getComputedStyle(e);try{t.style.transformOrigin="0 0"}catch{}try{"translate"in t.style&&(t.style.translate="none"),"rotate"in t.style&&(t.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||"none"===r){let n=null;try{n=hg(e).scale}catch{}try{t.style.transform="none"}catch{}if(!n)return{a:1,b:0,c:0,d:1};let r=n.trim().split(/\s+/).map(parseFloat),i=Number.isFinite(r[0])?r[0]:1;return{a:i,b:0,c:0,d:Number.isFinite(r[1])?r[1]:i}}function i(e,t,n,r){let i=Math.sqrt(e*e+t*t)||0,o=0,a=0;if(i>0){let s=e/i,l=t/i;o=s*n+l*r;let c=n-s*o,u=r-l*o;a=Math.sqrt(c*c+u*u)||0,a>0?o/=a:o=0}return{a:i,b:0,c:o*a,d:a}}let o=r.match(/^matrix\(\s*([^)]+)\)$/i);if(o){let e=o[1].split(",").map(e=>parseFloat(e.trim()));if(6===e.length&&e.every(Number.isFinite)){let[n,r,o,a]=e,s=i(n,r,o,a);try{t.style.transform=`matrix(${s.a}, ${s.b}, ${s.c}, ${s.d}, 0, 0)`}catch{}return s}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let e=a[1].split(",").map(e=>parseFloat(e.trim()));if(16===e.length&&e.every(Number.isFinite)){let n=i(e[0],e[1],e[4],e[5]);try{t.style.transform=`matrix(${n.a}, ${n.b}, ${n.c}, ${n.d}, 0, 0)`}catch{}return n}}try{let e=new DOMMatrix(r),n=i(e.a,e.b,e.c,e.d);try{t.style.transform=`matrix(${n.a}, ${n.b}, ${n.c}, ${n.d}, 0, 0)`}catch{}return n}catch{return null}}(p.element,n)),!d&&n&&function(e,t,n={}){if(!e||!t||!t.style)return;let r=getComputedStyle(e);try{t.style.boxShadow="none"}catch(e){Od(n,"stripRootShadows boxShadow",e)}try{t.style.textShadow="none"}catch(e){Od(n,"stripRootShadows textShadow",e)}try{t.style.outline="none"}catch(e){Od(n,"stripRootShadows outline",e)}let i=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{t.style.filter=i.length?i:"none"}catch(e){Od(n,"stripRootShadows filter",e)}}(p.element,n,p.options),n&&(function(e,t,n){if(!e||!t||!t.style)return;let r=getComputedStyle(e);if(!xg(r))for(let i of["top","bottom"]){let o="top"===i?"Top":"Bottom";if((parseFloat(r[`border${o}Width`])||0)>0||(parseFloat(r[`padding${o}`])||0)>0)continue;let a=e,s=t;for(;a&&s;){let e=Cg(a,i);if(!e)break;let t=n?Array.from(s.children).find(t=>n.get(t)===e)||null:s.children[Array.from(a.children).indexOf(e)]||null,r=getComputedStyle(e),l=parseFloat(r[`margin${o}`])||0;if(t&&t.style&&l>0&&(t.style[`margin${o}`]="0px"),xg(r)||(parseFloat(r[`border${o}Width`])||0)>0||(parseFloat(r[`padding${o}`])||0)>0)break;a=e,s=t}}}(p.element,n,o),function(e,t){if(!e||!t||!t.style)return;let n=1;try{n=parseFloat(getComputedStyle(e).zoom)}catch{return}if(t.style.getPropertyValue("zoom")||Number.isFinite(n)&&1!==n)try{t.style.setProperty("zoom","1","important")}catch{}}(p.element,n))}finally{A()}if(p={clone:n,classCSS:r,styleCache:i,nodeMap:o,...p},await tm("afterClone",p),v&&await v(),Eg(p.clone),"remove"===p.options?.excludeMode||"remove"===p.options?.filterMode)try{!function(e,t,n=new Map){!function e(t,r){if(1!==t?.nodeType||1!==r?.nodeType)return;let i=t.childElementCount>r.childElementCount,o=n.get(t)||getComputedStyle(t);if(n.has(t)||n.set(t,o),i&&Sg(t,o)){r.style.height||(r.style.height="auto"),r.style.width||(r.style.width="auto"),r.style.removeProperty("block-size"),r.style.removeProperty("inline-size"),r.style.minHeight||(r.style.minHeight="0"),r.style.minWidth||(r.style.minWidth="0"),r.style.maxHeight||(r.style.maxHeight="none"),r.style.maxWidth||(r.style.maxWidth="none");let e=o.overflowY||o.overflowBlock||"visible",t=o.overflowX||o.overflowInline||"visible";("visible"!==e||"visible"!==t)&&(r.style.overflow="visible")}let a=Array.from(t.children),s=Array.from(r.children);for(let t=0;t<Math.min(a.length,s.length);t++)e(a[t],s[t])}(e,t)}(p.element,p.clone,p.styleCache)}catch(e){console.warn("[snapdom] shrink pass failed:",e)}try{await async function(e,t,n=Kf.session.nodeMap){if(1!==e?.nodeType)return 0;let r='.material-icons, [class*="material-symbols"]',i=Array.from(e.querySelectorAll(r)).filter(e=>e&&e.textContent&&e.textContent.trim());if(e.matches?.(r)&&e.textContent&&e.textContent.trim()&&i.unshift(e),0===i.length)return 0;let o=1===t?.nodeType?Array.from(t.querySelectorAll(r)).filter(e=>e&&e.textContent&&e.textContent.trim()):[];1===t?.nodeType&&t.matches?.(r)&&t.textContent&&t.textContent.trim()&&o.unshift(t);let a=0;for(let e=0;e<i.length;e++){let t=i[e],r=n&&n.get(t)||o[e]||null;try{let e=getComputedStyle(r||t),n=e.fontFamily||"Material Icons";if(!yp(n))continue;let i=(r||t).textContent.trim();if(!i)continue;let o=parseInt(e.fontSize,10)||24,s=e.fontWeight&&"normal"!==e.fontWeight?e.fontWeight:"normal",l=Ap(e),c=e.fontVariationSettings&&"normal"!==e.fontVariationSettings?e.fontVariationSettings:"",u=(r||t).className||"",{dataUrl:f,width:d,height:h}=await bp(i,{family:n,weight:s,fontSize:o,color:l,variation:c,className:u});t.textContent="";let p=t.ownerDocument.createElement("img");p.src=f,p.alt=i,p.style.height=`${o}px`,p.style.width=`${Math.max(1,Math.round(d/h*o))}px`,p.style.objectFit="contain",p.style.verticalAlign=getComputedStyle(t).verticalAlign||"baseline",t.appendChild(p),a++}catch{}}return a}(p.clone,p.element,p.nodeMap)}catch{}let b=e=>new Promise((t,n)=>{Rd(()=>{Promise.resolve().then(e).then(t,n)},{fast:u})}),w=(async()=>{await Promise.all([b(()=>Hg(p.clone,p.options)),b(()=>async function(e,t,n,r={},i=Kf.session.nodeMap){if(!t)return;let o=[];e&&Ch(e)&&o.push([e,t]);let a=[t];for(;a.length;){let e=a.pop();if(e.children)for(let t of e.children){if("STYLE"===t.tagName)continue;let e=i.get(t);e&&Ch(e)&&o.push([e,t]),a.push(t)}}for(let e=0;e<o.length;e+=6)await Promise.allSettled(o.slice(e,e+6).map(([e,t])=>zg(e,t,n,r)))}(p.element,p.clone,p.styleCache,p.options,p.nodeMap))]);try{jg(p.element,p.clone,p.nodeMap)}catch(e){console.warn("[snapdom] backdrop-filter emulation failed:",e)}t.compress&&await b(()=>om(p.clone,p.options,p.nodeMap))})(),I=Promise.resolve();t.embedFonts&&(I=b(async()=>{let e=p.element.ownerDocument||document,t=h?e=>{try{let t=e.getBoundingClientRect();return t.right>=h.left-200&&t.left<=h.right+200&&t.bottom>=h.top-200&&t.top<=h.bottom+200}catch{return!0}}:null,{required:n,usedCodepoints:r}=Yp(p.element,t);if(Hd()){let t=new Set(Array.from(n).map(e=>String(e).split("__")[0]).filter(Boolean));await Wp(t,1,e)}g=await Vp({required:n,usedCodepoints:r,preCached:!1,exclude:p.options.excludeFonts,localFonts:p.options.localFonts,useProxy:p.options.useProxy,fontStylesheetDomains:p.options.fontStylesheetDomains,doc:e})})),await Promise.all([w,I]);let x=function(e){let t=new Set;return e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(e.tagName&&t.add(e.tagName.toLowerCase()),"function"==typeof e.querySelectorAll&&e.querySelectorAll("*").forEach(e=>t.add(e.tagName.toLowerCase())),Array.from(t))}(p.clone).sort(),C=x.join(",");Kf.baseStyle.has(C)?m=Kf.baseStyle.get(C):await new Promise(e=>{Rd(()=>{m=function(e){let t=new Map;for(let n of e){let e=pd(n);if(!e)continue;let r=Object.entries(e).map(([e,t])=>`${e}:${t};`).sort().join("");r&&(t.has(r)||t.set(r,[]),t.get(r).push(n))}let n="";for(let[e,r]of t.entries())n+=`${r.join(",")} { ${e} }\n`;return n}(x),Kf.baseStyle.set(C,m),e()},{fast:u})});let B=function(e){if(!e||!e.styleSheets)return"";let t=function(e){let t="";for(let n of e.styleSheets){let e=-1;try{e=n.cssRules?n.cssRules.length:-1}catch{}t+=(n.href||"inline")+":"+e+"|"}return t}(e),n=Qg.get(e);if(n&&n.fp===t)return n.css;let r=new Set,i="";for(let t of Array.from(e.styleSheets))try{let e=t.cssRules;e&&(i+=Tg(e,r))}catch{}return Qg.set(e,{fp:t,css:i}),i}(p.element?.ownerDocument||document);p={fontsCSS:g,baseCSS:m,scrollbarCSS:B,...p},await tm("beforeRender",p),await new Promise(e=>{Rd(()=>{let n=vd(p.element),r=p.element.getBoundingClientRect(),i=Math.max(1,Dg(p.element.offsetWidth||parseFloat(n.width)||r.width||1)),o=Math.max(1,Dg(p.element.offsetHeight||parseFloat(n.height)||r.height||1)),a=p.element.ownerDocument||document;if(!(s||p.element!==a.body&&p.element!==a.documentElement||a.documentElement.hasAttribute("data-sd-pinned"))){let e=Math.max(p.element.scrollHeight||0,a.documentElement?.scrollHeight||0,a.body?.scrollHeight||0),t=Math.max(p.element.scrollWidth||0,a.documentElement?.scrollWidth||0,a.body?.scrollWidth||0);e>0&&(o=Math.max(o,Dg(e))),t>0&&(i=Math.max(i,Dg(t)));try{let e=(p.scrollbarCSS||"").length+(p.baseCSS||"").length+(p.fontsCSS||"").length+(p.classCSS||"").length,t=Kf.measureHints.get(p.element);if(t&&t.cssLen===e&&t.w0===i)t.csh>0&&(o=Math.max(o,Dg(t.csh))),t.csw>0&&(i=Math.max(i,Dg(t.csw)));else{let t=a.createElement("div");t.setAttribute("data-snapdom-internal",""),t.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let n=t.attachShadow({mode:"open"}),r=a.createElement("style");r.textContent=(p.scrollbarCSS||"")+p.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+p.classCSS,n.appendChild(r),n.appendChild(p.clone.cloneNode(!0)),a.body.appendChild(t);let s=t.scrollHeight,l=t.scrollWidth;a.body.removeChild(t),Kf.measureHints.set(p.element,{cssLen:e,w0:i,csh:s,csw:l}),s>0&&(o=Math.max(o,Dg(s))),l>0&&(i=Math.max(i,Dg(l)))}}catch{}}if("remove"===p.options?.excludeMode||"remove"===p.options?.filterMode){let e=function(e,t){let n=getComputedStyle(e),r=e.getBoundingClientRect(),i=1/0,o=-1/0,a=!1,s=Array.from(e.children);for(let e of s){if(Fg(e,t)||!kg(e))continue;let n=e.getBoundingClientRect(),s=n.top-r.top,l=n.bottom-r.top;l<=s||(s<i&&(i=s),l>o&&(o=l),a=!0)}let l=a?Math.max(0,o-i):0;return(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0)+(parseFloat(n.paddingTop)||0)+(parseFloat(n.paddingBottom)||0)+l}(p.element,p.options);Number.isFinite(e)&&e>0&&(o=Math.max(1,Math.min(o,Dg(e+1))))}if(p.options?.reconcile)try{let e=(p.scrollbarCSS||"")+p.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+p.classCSS;!function(e,t,n,r,i,o){let a=e.ownerDocument||document,s=e.getBoundingClientRect(),l=i>0&&s.width>0?s.width/i:1,c=o>0&&s.height>0?s.height/o:1;if(Math.abs(l-c)>.02)return 0;let u=a.createElement("div");u.setAttribute("data-snapdom-internal",""),u.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let f=u.attachShadow({mode:"open"}),d=a.createElement("style");d.textContent=n,f.appendChild(d);let h=t.cloneNode(!0);f.appendChild(h),a.body.appendChild(u);let p=0,g=(e,t,n)=>{let r=vd(e),i="border-box"===r.boxSizing,o=(e,t,...n)=>{let r=parseFloat(e);if(!Number.isFinite(r))return t;let o=r+(i?0:n.reduce((e,t)=>e+(parseFloat(t)||0),0));return Math.abs(o-t)<=.51?o:t};return{width:o(r.width,t,r.paddingLeft,r.paddingRight,r.borderLeftWidth,r.borderRightWidth),height:o(r.height,n,r.paddingTop,r.paddingBottom,r.borderTopWidth,r.borderBottomWidth)}};try{let e=h.getBoundingClientRect(),n=h.offsetWidth||i,a=h.offsetHeight||o,s=n>0&&e.width>0?e.width/n:1,u=a>0&&e.height>0?e.height/a:1,f=(e,t,n=!1)=>{let i=e.children,o=t.children,a=Math.min(i.length,o.length);for(let e=0;e<a;e++){let t=i[e],a=o[e],d=r.get(t),h=n||yg.has(t);if(1===d?.nodeType&&t?.namespaceURI===mg&&t.style&&d.isConnected){let e=d.getBoundingClientRect();if(e.width>0&&e.height>0){let n=a.getBoundingClientRect(),r=e.width/l,i=e.height/c,o=n.width,f=n.height,m=d.offsetWidth||r,y=d.offsetHeight||i,v=a.offsetWidth||o,A=a.offsetHeight||f,b=Math.abs(r-m)>Ng||Math.abs(i-y)>Ng||Math.abs(o-v)>Ng||Math.abs(f-A)>Ng;if(h){let e=g(a,v,A);r=o>0?r*s*e.width/o:r,i=f>0?i*u*e.height/f:i,o=e.width,f=e.height}else if(b){let e=g(d,m,y),t=g(a,v,A);r=e.width,i=e.height,o=t.width,f=t.height}let w=o-r,I=f-i;(Math.abs(w)>Ng||Math.abs(I)>Ng)&&(t.style.boxSizing="border-box",t.style.width=`${Dg(r)}px`,t.style.height=`${Dg(i)}px`,p++)}}f(t,a,h)}};f(t,h)}finally{u.remove()}}(p.element,p.clone,e,p.nodeMap,i,o)}catch(e){console.warn("[snapdom] reconcile pass failed:",e)}let u=(e,t=NaN)=>{let n="string"==typeof e?parseFloat(e):e;return Number.isFinite(n)?n:t},h=u(p.options.width),g=u(p.options.height),m=s?Dg(s.width):i,v=s?Dg(s.height):o,A=m,b=v,w=Number.isFinite(h),I=Number.isFinite(g),x=v>0?m/v:1;w&&I?(A=Math.max(1,Dg(h)),b=Math.max(1,Dg(g))):w?(A=Math.max(1,Dg(h)),b=Math.max(1,Dg(A/(x||1)))):I&&(b=Math.max(1,Dg(g)),A=Math.max(1,Dg(b*(x||1))));let C=0,B=0,E=i,S=o;if(s){let e=0,t=0;if(sm(p.element)){let r=null;if(!f&&y&&Number.isFinite(y.a))r={a:y.a,b:y.b||0,c:y.c||0,d:y.d||1,e:0,f:0};else{let e=hg(p.element),t=Ig(n.transform&&"none"!==n.transform?n.transform:"",e);t&&t.is2D&&(r={a:t.a,b:t.b,c:t.c,d:t.d,e:0,f:0})}if(r&&(1!==r.a||0!==r.b||0!==r.c||1!==r.d)){let{ox:a,oy:s}=dg(n,i,o),l=fg(i,o,r,a,s);e=l.minX,t=l.minY}}C=Dg(s.x+e),B=Dg(s.y+t),E=Dg(C+s.width),S=Dg(B+s.height)}else if(!f&&y&&Number.isFinite(y.a)){let e=fg(i,o,{a:y.a,b:y.b||0,c:y.c||0,d:y.d||1,e:0,f:0},0,0);C=Dg(e.minX),B=Dg(e.minY),E=Dg(e.maxX),S=Dg(e.maxY)}else if(f&&sm(p.element)){let e=n.transform&&"none"!==n.transform?n.transform:"",t=hg(p.element),r=gg({baseTransform:e,rotate:t.rotate||"0deg",scale:t.scale,translate:t.translate}),{ox:a,oy:s}=dg(n,i,o),l=r.is2D?r:new DOMMatrix(r.toString()),c=fg(i,o,{a:l.a,b:l.b,c:l.c,d:l.d,e:0,f:0},a,s);C=Dg(c.minX),B=Dg(c.minY),E=Dg(c.maxX),S=Dg(c.maxY)}let k=function(e){return ug(e.boxShadow)}(n),F=function(e){return ug(e.textShadow)}(n),D=function(e){let t,n=e.filter&&"none"!==e.filter?e.filter:e.webkitFilter||"",r=/blur\(\s*([0-9.]+)px\s*\)/gi,i=0;for(;t=r.exec(n);)i+=parseFloat(t[1])||0;let o=Math.ceil(i);return{top:o,right:o,bottom:o,left:o}}(n),N=function(e){if("none"===(e.outlineStyle||"none"))return{top:0,right:0,bottom:0,left:0};let t=Math.ceil(parseFloat(e.outlineWidth||"0")||0),n=parseFloat(e.outlineOffset||"0")||0,r=t+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}(n),M=function(e){let t=`${e.filter||""} ${e.webkitFilter||""}`.trim();if(!t||"none"===t)return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=t.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,i=0,o=0,a=0,s=!1;for(let e of n){s=!0;let t=e.match(/-?\d+(?:\.\d+)?px/gi)?.map(e=>parseFloat(e))||[],[n=0,l=0,c=0]=t,u=Math.abs(n)+c,f=Math.abs(l)+c;i=Math.max(i,u+Math.max(n,0)),a=Math.max(a,u+Math.max(-n,0)),o=Math.max(o,f+Math.max(l,0)),r=Math.max(r,f+Math.max(-l,0))}return{bleed:{top:Dg(r),right:Dg(i),bottom:Dg(o),left:Dg(a)},has:s}}(n),T=s?{top:0,right:0,bottom:0,left:0}:d?{top:Dg(Math.max(k.top,F.top)+D.top+N.top+M.bleed.top),right:Dg(Math.max(k.right,F.right)+D.right+N.right+M.bleed.right),bottom:Dg(Math.max(k.bottom,F.bottom)+D.bottom+N.bottom+M.bleed.bottom),left:Dg(Math.max(k.left,F.left)+D.left+N.left+M.bleed.left)}:{top:D.top,right:D.right,bottom:D.bottom,left:D.left};C=Dg(C-T.left),B=Dg(B-T.top),E=Dg(E+T.right),S=Dg(S+T.bottom);let Q=Math.max(1,Dg(E-C)),L=Math.max(1,Dg(S-B)),R=w||I?Dg(A/m):1,U=I||w?Dg(b/v):1,H=Math.max(1,Dg(Q*R)),q=Math.max(1,Dg(L*U)),O="http://www.w3.org/2000/svg",P=sm(p.element)?2:0,$=Dg(P+(f?0:1)),z=Math.ceil(Q+2*$),j=Math.ceil(L+2*$),V=Dg(-(Dg(C)-$)),Y=Dg(-(Dg(B)-$)),W=Math.max(0,V),G=Math.max(0,Y),J=Dg(z-Math.min(0,V)),_=Dg(j-Math.min(0,Y)),X=document.createElementNS(O,"foreignObject");X.setAttribute("x",String(Math.min(0,V))),X.setAttribute("y",String(Math.min(0,Y))),X.setAttribute("width",String(J)),X.setAttribute("height",String(_)),X.style.overflow="visible";let K=document.createElement("style");K.textContent=(p.scrollbarCSS||"")+p.baseCSS+p.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}"+p.classCSS,X.appendChild(K);let Z=document.createElement("div");Z.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Z.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${J}px;height:${_}px`+(0!==W||0!==G?`;padding:${G}px 0 0 ${W}px !important`:""),Z.appendChild(p.clone),X.appendChild(Z);let ee=(new XMLSerializer).serializeToString(X),te=w||I,ne=Object.freeze({w0:m,h0:v,vbW:z,vbH:j,targetW:A,targetH:b,contentX:Dg(V+(s?C:0)),contentY:Dg(Y+(s?B:0)),clip:s?Object.freeze({x:Dg(C),y:Dg(B),width:m,height:v}):null});Object.defineProperty(t,"meta",{value:ne,enumerable:!0,writable:!1,configurable:!0});let re=!te||Hd()?z:Dg(H+2*$),ie=!te||Hd()?j:Dg(q+2*$),oe=parseFloat(vd(a.documentElement)?.fontSize)||16;c=`<svg xmlns="${O}" width="${re}" height="${ie}" viewBox="0 0 ${z} ${j}" font-size="${oe}px">`+ee+"</svg>",l=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(c)}`,p={svgString:c,dataURL:l,...p},e()},{fast:u})}),await tm("afterRender",p);let E=document.getElementById("snapdom-sandbox");return E&&"absolute"===E.style.position&&E.remove(),p.dataURL}function sm(e){return function(e){let t=vd(e),n=t.transform||"none";if("none"!==n&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let r=t.rotate&&"none"!==t.rotate&&"0deg"!==t.rotate,i=t.scale&&"none"!==t.scale&&"1"!==t.scale,o=t.translate&&"none"!==t.translate&&"0px 0px"!==t.translate;return!!(r||i||o)}(e)}Zf(),qd(),Pd();var lm=new WeakMap;function cm(e,t,n){let r=new Set;if(e instanceof HTMLVideoElement&&r.add(e),e.querySelectorAll)for(let t of e.querySelectorAll("video"))r.add(t);for(let e of t.trackedVideos)r.has(e)||(e.removeEventListener("timeupdate",n),e.removeEventListener("seeked",n),t.trackedVideos.delete(e));for(let e of r)t.trackedVideos.has(e)||(e.addEventListener("timeupdate",n),e.addEventListener("seeked",n),t.trackedVideos.add(e))}function um(e){let{burst:t,invalidate:n,...r}=e||{};try{return JSON.stringify(r,Object.keys(r).sort())}catch{return null}}function fm(e,t,n,r){let i=lm.get(e);i||(i=function(e){let t={dirty:!0,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedVideos:new Set},n=e=>{t.capturing||wh(e)&&(t.dirty=!0)},r=()=>{t.capturing||(t.dirty=!0)},i=e.ownerDocument||document;try{let r=new MutationObserver(n);r.observe(e,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),t.observers.push(r)}catch{}try{if(i.head){let e=new MutationObserver(n);e.observe(i.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),t.observers.push(e)}}catch{}return t.markDirty=n,t.onMediaDirty=r,cm(e,t,r),t}(e),i.baselineSignature=um(t),lm.set(e,i));let o=um(t),a=null===o||o!==i.baselineSignature,s=async()=>{for(let e of i.observers)i.markDirty(e.takeRecords());if(n.invalidate&&(i.dirty=!0),!a&&!i.dirty&&i.last)return i.last;i.capturing=!0,a||(i.dirty=!1);try{let e=await r();return a||(i.last=e),e}finally{for(let e of i.observers)e.takeRecords();i.capturing=!1,cm(e,i,i.onMediaDirty)}},l=i.inflight.then(s,s);return i.inflight=l.catch(()=>{}),l}$d(),fd(),Zf();var dm=Object.assign(async function(e,t){if(!e)throw new Error("Element cannot be null or undefined");let n=function(e={}){let t=e.format??"png";"jpg"===t&&(t="jpeg");let n=function(e){if(!0===e)return"soft";if(!1===e)return"disabled";if("string"==typeof e){let t=e.toLowerCase().trim();if("auto"===t)return"auto";if("full"===t)return"full";if("soft"===t||"disabled"===t)return t}return"soft"}(e.cache);return{debug:e.debug??!1,fast:e.fast??!0,scale:e.scale??1,exclude:e.exclude??[],excludeMode:e.excludeMode??"hide",filter:e.filter??null,filterMode:e.filterMode??"hide",placeholders:!1!==e.placeholders,embedFonts:e.embedFonts??!1,iconFonts:Array.isArray(e.iconFonts)?e.iconFonts:e.iconFonts?[e.iconFonts]:[],localFonts:Array.isArray(e.localFonts)?e.localFonts:[],excludeFonts:e.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(e.fontStylesheetDomains)?e.fontStylesheetDomains:[],fallbackURL:e.fallbackURL??void 0,cache:n,useProxy:"string"==typeof e.useProxy?e.useProxy:"",width:e.width??null,height:e.height??null,format:t,type:e.type??"svg",quality:e.quality??.92,dpr:e.dpr??(window.devicePixelRatio||1),backgroundColor:e.backgroundColor??(["jpeg","webp"].includes(t)?"#ffffff":null),filename:e.filename??"snapDOM",outerTransforms:e.outerTransforms??!0,outerShadows:e.outerShadows??!1,reconcile:e.reconcile??!1,burst:e.burst??!1,invalidate:e.invalidate??!1,clip:e.clip??null,compress:!1!==e.compress,excludeStyleProps:e.excludeStyleProps??null,resolvePicturePlaceholders:!1!==e.resolvePicturePlaceholders,pictureResolver:e.pictureResolver&&"object"==typeof e.pictureResolver?e.pictureResolver:{}}}(t);if(nm(n,t&&t.plugins),Hd()){if(!0===n.embedFonts)try{let t=function(e,t){return Yp(e,t).required}(e),n=new Set([...t].map(e=>String(e).split("__")[0]).filter(Boolean));await Wp(n,1)}catch{}let r=Array.from(e.querySelectorAll("canvas"));"CANVAS"===e.tagName&&r.unshift(e);for(let e of r)try{let t=e.getContext("2d",{willReadFrequently:!0});t&&t.getImageData(0,0,1,1)}catch(e){Od(t,"safari canvas poke failed",e)}}return n.iconFonts&&n.iconFonts.length>0&&function(e){let t=Array.isArray(e)?e:[e];for(let e of t){let t;if(e instanceof RegExp)t=e;else{if("string"!=typeof e){console.warn("[snapdom] Ignored invalid iconFont value:",e);continue}t=new RegExp(gp(e),"i")}let n=`${t.source}/${t.flags}`;pp.has(n)||(pp.add(n),hp.push(t))}}(n.iconFonts),n.snap||(n.snap={toPng:(e,t)=>dm.toPng(e,t),toSvg:(e,t)=>dm.toSvg(e,t)}),n.burst?fm(e,t,n,()=>dm.capture(e,n,hm)):dm.capture(e,n,hm)},{plugins:function(...e){return function(...e){let t=e.flat();for(let e of t){let t=Zg(e);t&&(Kg.some(e=>e&&e.name&&t.name&&e.name===t.name)||Kg.push(t))}}(...e),dm}}),hm=Symbol("snapdom.internal"),pm=Symbol("snapdom.internal.silent");function gm(e){return document.querySelectorAll(e)}function mm(e){function t(e){e.parentNode.removeChild(e)}if(ku(e)){return void t(e)}if(!Fe(e))return;An(gm(e),function(e){t(e)})}function ym(e,t){if(!ku(e))return"invalid eleParent";if(ke(t))e.insertAdjacentHTML("afterbegin",t);else{if(!ku(t))return"invalid itemChild";e.insertBefore(t,e.firstChild)}}async function vm(e,t={}){if(!ku(e))return Promise.reject("invalid ele");let n=be(t,"scale",null);if(Me(n)||(n=1),n=xr(n),n<1)return Promise.reject("opt.scale can not less then 1");let r=be(t,"picType",null);"image/jpg"!==r&&"image/jpeg"!==r&&"image/png"!==r&&"svg"!==r&&(r="image/png");let i=be(t,"toBase64",null);Ie(i)||(i=!0);let o=e.cloneNode(!0),a=document.createElement("div");a.style.position="absolute",a.style.top=0,a.style.left=0,a.style.zIndex=-1,a.appendChild(o);let s=document.createElement("div");s.style.opacity=0,s.style.position="relative",s.appendChild(a),ym(document.querySelector("body"),s);let l,c={scale:n,quality:1,cache:"disabled"};return"image/jpg"===r||"image/jpeg"===r?l=await dm.toJpg(a,c):"image/png"===r?l=await dm.toPng(a,c):"svg"===r&&(l=await dm.toSvg(a,c)),i&&(l=be(l,"src","")),mm(s),l}dm.capture=async(e,t,n)=>{if(n!==hm)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");t.element=e;let r=await am(e,t),i={img:async(e,t)=>{let{toImg:n}=await Promise.resolve().then(()=>(lh(),ah));return n(r,{...e,...t||{}})},svg:async(e,t)=>{let{toSvg:n}=await Promise.resolve().then(()=>(lh(),ah));return n(r,{...e,...t||{}})},canvas:async(e,t)=>{let{toCanvas:n}=await Promise.resolve().then(()=>(nh(),zd));return n(r,{...e,...t||{}})},blob:async(e,t)=>{let{toBlob:n}=await Promise.resolve().then(()=>(fh(),ch));return n(r,{...e,...t||{}})},png:async(e,t)=>{let{rasterize:n}=await Promise.resolve().then(()=>(oh(),rh));return n(r,{...e,...t||{},format:"png"})},jpeg:async(e,t)=>{let{rasterize:n}=await Promise.resolve().then(()=>(oh(),rh));return n(r,{...e,...t||{},format:"jpeg"})},webp:async(e,t)=>{let{rasterize:n}=await Promise.resolve().then(()=>(oh(),rh));return n(r,{...e,...t||{},format:"webp"})},download:async(e,t)=>{let{download:n}=await Promise.resolve().then(()=>(gh(),dh));return n(r,{...e,...t||{}})}},o={};for(let e of["img","svg","canvas","blob","png","jpeg","webp"])o[e]=async n=>i[e](t,{...n||{},[pm]:!0});o.jpg=o.jpeg;let a={...t,export:{url:r},exports:o},s=await async function(e,t,n){let r=[],i=em(t);for(let o of i){let i=o&&"function"==typeof o[e]?o[e]:null;if(!i)continue;let a=await i(t,n);typeof a<"u"&&r.push(a)}return r}("defineExports",a),l=Object.assign({},...s.filter(e=>e&&"object"==typeof e).reverse()),c={...i,...l};c.jpeg&&!c.jpg&&(c.jpg=(e,t)=>c.jpeg(e,t));let u=!1,f=Promise.resolve();async function d(e,n){let i=Object.freeze(n&&"object"==typeof n?{...n}:{}),o=f.then(async()=>{let n=c[e];if(!n)throw new Error(`[snapdom] Unknown export type: ${e}`);let o=function(e,n){let r={...t,...n||{}};return[e,r.format,r.type].map(e=>"string"==typeof e?e.toLowerCase():"").find(e=>"jpeg"===e||"jpg"===e||"webp"===e)&&(null==r.backgroundColor||"transparent"===r.backgroundColor)&&(r.backgroundColor="#ffffff"),r}(e,i),a={...t,export:{type:e,options:o,requestedOptions:i,url:r}};await tm("beforeExport",a,{format:e,options:o});let s=await n(a,o);return await tm("afterExport",a,{format:e,options:o,result:s}),u||(u=!0,await tm("afterSnap",t)),s});return f=o.catch(()=>{}),o}let h={url:r,toRaw:()=>r,to:(e,t)=>d(e,t),toImg:e=>d("img",e),toSvg:e=>d("svg",e),toCanvas:e=>d("canvas",e),toBlob:e=>d("blob",e),toPng:e=>d("png",e),toJpg:e=>d("jpg",e),toWebp:e=>d("webp",e),download:e=>d("download",e)};Object.defineProperty(h,"meta",{value:t.meta,enumerable:!0,writable:!1,configurable:!1});for(let e of Object.keys(c)){let t="to"+e.charAt(0).toUpperCase()+e.slice(1);h[t]||(h[t]=t=>d(e,t))}return h},dm.toRaw=(e,t)=>dm(e,t).then(e=>e.toRaw()),dm.toImg=(e,t)=>dm(e,t).then(e=>e.toImg()),dm.toSvg=(e,t)=>dm(e,t).then(e=>e.toSvg()),dm.toCanvas=(e,t)=>dm(e,t).then(e=>e.toCanvas()),dm.toBlob=(e,t)=>dm(e,t).then(e=>e.toBlob()),dm.toPng=(e,t)=>dm(e,{...t,format:"png"}).then(e=>e.toPng()),dm.toJpg=(e,t)=>dm(e,{...t,format:"jpeg"}).then(e=>e.toJpg()),dm.toWebp=(e,t)=>dm(e,{...t,format:"webp"}).then(e=>e.toWebp()),dm.download=(e,t)=>dm(e,t).then(e=>e.download());var Am=Da(ba);function bm(e){let t=function(e,n){return null===e.parentNode?n:t(e.parentNode,n.concat([e]))};return e instanceof HTMLElement||e instanceof SVGElement?t(e.parentNode,[]):[]}function wm(e){let t=be(e,"clientX",null),n=be(e,"clientY",null),r=be(e,"pageX",null),i=be(e,"pageY",null);if(null!==t&&null!==n&&null!==r&&null!==i)return{clientX:t,clientY:n,pageX:r,pageY:i};let o=be(e,"changedTouches",[]);if(1!==ar(o))return null;let a=o[0];return{clientX:be(a,"clientX",null),clientY:be(a,"clientY",null),pageX:be(a,"pageX",null),pageY:be(a,"pageY",null)}}function Im(e,t){let n=[];try{n=document.elementsFromPoint(e,t)}catch(e){console.log(e)}return n}function xm(e,t){if(!ku(e))return null;if(!Fe(t))return null;try{return e.getAttribute(t)}catch(e){}return null}function Cm(e){if(!ku(e))return null;try{return e.getBoundingClientRect()}catch(e){}return null}function Bm(e,t){if(!Se(e))return null;if(!fa(e.clientX)||!fa(e.clientY))return null;if(!ku(t))return null;let n=Cm(t);return n?{x:e.clientX-n.left,y:e.clientY-n.top,w:t.offsetWidth,h:t.offsetHeight}:null}function Em(e={}){let t="dragpreviewid",n=null,r=null,i=null,o=null,a=null,s=!1,l=be(e,"attIdentify",null);Fe(l)||(l="dragprevid");let c=be(e,"containerOpacity",null);fa(c)||(c=.4);let u=be(e,"containerBackground",null);Fe(u)||(u="white");let f=be(e,"containerBorderWidth",null);fa(f)||(f=1);let d=be(e,"containerBorderColor",null);Fe(d)||(d="#f26");let h=`c${Hu(8)}`;function p(e,t,n){r&&i&&o&&a&&!s&&(a.style.top=t-r.tShiftY+"px",a.style.left=e-r.tShiftX+"px")}function g(){mm(`[${t}='${h}']`),r=null,i=null,o=null,a=null}let m=function(e){p(e.clientX,e.clientY)};window.addEventListener("mousemove",m);let y=function(e){let t=wm(e);t&&p(t.clientX,t.clientY)};return window.addEventListener("touchmove",y),{createPreview:function(e,s,m){try{!function(){let g=function(e,t,r){let i=Cm(e);if(!i)return null;n=e;let o=e.cloneNode(!0);return o.tShiftX=t-i.left,o.tShiftY=r-i.top,o.tWidth=e.offsetWidth,o.tHeight=e.offsetHeight,o.tParent=e.parentNode,o.setAttribute(l,""),o}(e,s,m);if(null===g)return;let y=document.createElement("div");y.style.position="absolute",y.style.zIndex=1,y.style.top=0,y.style.left=0,y.style.width="100%",y.style.height="100%",y.appendChild(g);let v=document.createElement("div");v.style.position="relative",v.appendChild(y);let A=document.createElement("div");A.setAttribute(t,h),A.style.position="fixed",A.style.zIndex=1e5,A.style.width=`${g.tWidth+2*f}px`,A.style.height=`${g.tHeight+2*f}px`,A.style.opacity=c,A.style.background=u,A.style.border=`${f}px solid ${d}`,A.style.pointerEvents="none",A.appendChild(v),document.querySelector("body").appendChild(A),r=g,i=y,o=v,a=A,p(s,m)}()}catch(e){}let y=setInterval(()=>{let e=xm(n,l);document.querySelector(`[${l}='${e}']`)||(clearInterval(y),g())},500)},updateDragPreview:p,pauseDragPreview:function(e){s=e},removeDragPreview:g,setNodeStyle:function(e){try{An(e,(e,t)=>{r.style[t]=e})}catch(e){}},setCoverStyle:function(e){try{An(e,(e,t)=>{i.style[t]=e})}catch(e){}},setSellStyle:function(e){try{An(e,(e,t)=>{o.style[t]=e})}catch(e){}},setContainerStyle:function(e){try{An(e,(e,t)=>{a.style[t]=e})}catch(e){}},clear:function(){window.removeEventListener("mousemove",m),window.removeEventListener("touchmove",y)}}}let Sm={};function km(e,t,{attIdentify:n,previewOpacity:r,previewBackground:i,previewBorderWidth:o,previewBorderColor:a}){if(!Te(Sm,e)){let t=qi(),s=function(e){let t=[];function n(){let n;n="mousemove";let r=function(t){e.dragMove({e:t,name:"mousemove"})};window.addEventListener(n,r),t.push({ele:window,name:n,f:r}),n="mouseup";let i=function(t){e.dragDrop({e:t,name:"mouseup"})};window.addEventListener(n,i),t.push({ele:window,name:n,f:i}),n="touchmove";let o=function(t){e.dragMove({e:t,name:"touchmove"})};window.addEventListener(n,o),t.push({ele:window,name:n,f:o}),n="touchend";let a=function(t){e.dragDrop({e:t,name:"touchend"})};window.addEventListener(n,a),t.push({ele:window,name:n,f:a})}function r(){An(t,({ele:e,name:t,f:n})=>{e.removeEventListener(t,n)})}return{bind:n,unbind:r}}({dragMove:n=>{t.emit(e+"-dragMove",n)},dragDrop:n=>{t.emit(e+"-dragDrop",n)}});s.bind();let l=Em({attIdentify:n,containerOpacity:r,containerBackground:i,containerBorderWidth:o,containerBorderColor:a});Sm[e]={eleIds:[],evg:t,oevg:s,pv:l,isInit:!1,isActive:!0}}return Sm[e].eleIds.push(t),Sm[e].evg}function Fm(e,t){let n=xm(e,t);return n=Yi(n),n}function Dm({gid:e,attGroup:t,attIndex:n,attIdentify:r,timeDragStartDelay:i,previewOpacity:o,previewDisabledOpacity:a}){let s=null,l=null,c=null,u=null;if(Sm[e].isInit)return Sm[e].evg;Sm[e].isInit=!0;let f=Sm[e].evg;f.on(e+"-dragStart",function({e:t,ele:o,from:c}){if(!Sm[e].isActive)return;let u=Fm(o,n);if(null===u)return;s=u,l=o;let h={event:t,startInd:s,startEle:l,tarInd:s,tarEid:xm(l,r)};f.emit(e+"-change",{mode:"start",...h}),f.emit(e+"-start",h);let p=wm(t);if(!p)return;setTimeout(()=>{null!==s&&(d.createPreview(l,p.clientX,p.clientY),d.setContainerStyle({opacity:a}))},i)}),f.on(e+"-dragMove",function({e:i,name:h,from:p}){if(!Sm[e].isActive)return;let g=function(e,t,n){let r=null;return An(bm(e.target),e=>{if(xm(e,t)===n)return r=e,!1}),r}(i,t,e);if(null===s)return;let m=wm(i);if(!m)return;function y(){let t={event:i,startInd:s,startEle:l,endInd:c,endEle:u,tarInd:c,tarEid:xm(u,r)};f.emit(e+"-change",{mode:"leave",...t}),f.emit(e+"-leave",t),c=null,u=null,d.setContainerStyle({opacity:a})}if(!g)return void(null!==c&&y());let v=Fm(g,n);if(null===v)return;if(v===s)return void(null!==c&&y());if(v!==c)null!==c&&y(),function(t,n){c=t,u=n;let a={event:i,startInd:s,startEle:l,endInd:c,endEle:u,tarInd:c,tarEid:xm(u,r)};f.emit(e+"-change",{mode:"enter",...a}),f.emit(e+"-enter",a),d.setContainerStyle({opacity:o})}(v,g);else{let t=Bm(m,g),n=0;t.w>0&&(n=t.x/t.w);let a=0;t.h>0&&(a=t.y/t.h),n>=0&&n<=1&&a>=0&&a<=1&&function(t,n,a){let h={event:i,startInd:s,startEle:l,endInd:c,endEle:u,tarInd:c,tarEid:xm(u,r),...t,rx:n,ry:a};f.emit(e+"-change",{mode:"move",...h}),f.emit(e+"-move",h),d.setContainerStyle({opacity:o})}(t,n,a)}}),f.on(e+"-dragDrop",function({e:i,name:o,from:a}){if(d.removeDragPreview(),!Sm[e].isActive)return;if(null===s)return;let h=function(e,t,n){let r=null,i=wm(e);return i?(An(Im(i.clientX,i.clientY),e=>{if(xm(e,t)===n)return r=e,!1}),r):r}(i,t,e);if(!h)return s=null,l=null,c=null,void(u=null);let p=Fm(h,n);if(null===p)return;(function(t,n){c=t,u=n;let o={event:i,startInd:s,startEle:l,endInd:c,endEle:u,tarInd:c,tarEid:xm(u,r)};f.emit(e+"-change",{mode:"drop",...o}),f.emit(e+"-drop",o)})(p,h),s=null,l=null,c=null,u=null});let d=Sm[e].pv}async function Nm(e){let t=[],n=_a();return await async function e(n){let r=null;if(n.isFile&&(r=await function(e){let t=_a();try{e.file(t.resolve,t.reject)}catch(e){t.reject(e)}return t}(n)),t.push({type:n.isDirectory?"folder":n.isFile?"file":"unknow",path:n.fullPath,name:n.name,entry:n,file:r}),n.isDirectory){let t=n.createReader(),r=await function(e){let t=_a();try{e.readEntries(t.resolve,t.reject)}catch(e){t.reject(e)}return t}(t);await ic(r,async t=>{await e(t)})}}(e),n.resolve(t),n}async function Mm(e){let t=[];An(e,e=>{let n=e.webkitGetAsEntry();n&&t.push(n)});let n=await async function(e){let t=[];return await ic(e,async e=>{An(await Nm(e),e=>{t.push(e)})}),t}(t);return n}async function Tm(e){let t=[],n=[];try{t=await async function(e){let t=[];return An(e,e=>{e.type&&t.push({type:"file",name:e.name,file:e})}),t}(be(e,"files",[])),Ju()||(n=await Mm(be(e,"items",[])).catch(e=>{console.log(e)}))}catch(e){return Promise.reject(e)}return{files:t,entries:n}}function Qm(e){return document.querySelector(e)}function Lm(e){return!Mn(e)}var Rm=Math.max;var Um,Hm=(Um=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ir(n);return i<0&&(i=Rm(r+i,0)),Qn(e,pn(t),i)},function(e,t,n){var r=Object(e);if(!ht(e)){var i=pn(t);e=pt(e),t=function(e){return i(r[e],e,r)}}var o=Um(e,t,n);return o>-1?r[i?e[o]:o]:void 0});let qm=[{name:"pic",group:"image",acp:"image/*",exec:"imageviwer"},{name:"xml",group:"data",acp:"text/xml",exec:"textviwer"},{name:"htm",group:"docums",acp:"text/html",exec:"browser"},{name:"html",group:"docums",acp:"text/html",exec:"browser"},{name:"json",group:"data",acp:"application/json",exec:"textviwer"},{name:"geojson",group:"data",acp:"application/geo+json",exec:"textviwer"},{name:"txt",group:"data",acp:"text/plain",exec:"textviwer"},{name:"csv",group:"data",acp:"text/csv",exec:"excel"},{name:"dat",group:"data",acp:"application/octet-stream",exec:"binaryviwer"},{name:"7z",group:"compress",acp:"application/x-7z-compressed",exec:"compressor"},{name:"bzip",group:"compress",acp:"application/x-bzip",exec:"7z"},{name:"bzip2",group:"compress",acp:"application/x-bzip2",exec:"compressor"},{name:"bz2",group:"compress",acp:"application/x-bzip2",exec:"compressor"},{name:"ace",group:"compress",acp:"application/x-ace-compressed",exec:"compressor"},{name:"Z",group:"compress",acp:"application/x-compress",exec:"compressor"},{name:"lzh",group:"compress",acp:"application/x-lzh-compressed",exec:"compressor"},{name:"lz",group:"compress",acp:"application/x-lzip",exec:"compressor"},{name:"rar",group:"compress",acp:"application/x-rar-compressed",exec:"compressor"},{name:"tar",group:"compress",acp:"application/x-tar",exec:"compressor"},{name:"ar",group:"compress",acp:"application/x-unix-archive",exec:"compressor"},{name:"zip",group:"compress",acp:"application/zip",exec:"compressor"},{name:"gz",group:"compress",acp:"application/gzip",exec:"compressor"},{name:"avro",group:"",acp:"application/avro",exec:""},{name:"dcm",group:"",acp:"application/dicom",exec:""},{name:"eps",group:"",acp:"application/eps",exec:""},{name:"epub",group:"",acp:"application/epub+zip",exec:""},{name:"class",group:"",acp:"application/java-vm",exec:""},{name:"mxf",group:"",acp:"application/mxf",exec:""},{name:"ogx",group:"",acp:"application/ogg",exec:""},{name:"pdf",group:"docums",acp:"application/pdf",exec:"acrobat"},{name:"pgp",group:"",acp:"application/pgp-encrypted",exec:""},{name:"ps",group:"",acp:"application/postscript",exec:""},{name:"ai",group:"",acp:"application/postscript",exec:""},{name:"rtf",group:"docums",acp:"application/rtf",exec:"word"},{name:"icc",group:"",acp:"application/vnd.iccprofile",exec:""},{name:"asf",group:"",acp:"application/vnd.ms-asf",exec:"",msg:"asf的acp可能為application/vnd.ms-asf或audio/x-ms-asf或video/x-ms-asf"},{name:"cab",group:"",acp:"application/vnd.ms-cab-compressed",exec:""},{name:"eot",group:"",acp:"application/vnd.ms-fontobject",exec:""},{name:"chm",group:"",acp:"application/vnd.ms-htmlhelp",exec:""},{name:"pst",group:"",acp:"application/vnd.ms-outlook",exec:""},{name:"odp",group:"docums",acp:"application/vnd.oasis.opendocument.presentation",exec:"powerpoint"},{name:"ods",group:"docums",acp:"application/vnd.oasis.opendocument.spreadsheet",exec:"excel"},{name:"odt",group:"docums",acp:"application/vnd.oasis.opendocument.text",exec:"word"},{name:"ppt",group:"docums",acp:"application/vnd.ms-powerpoint",exec:"powerpoint"},{name:"pptx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.presentationml.presentation",exec:"powerpoint"},{name:"xls",group:"docums",acp:"application/vnd.ms-excel",exec:"excel"},{name:"xlsx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",exec:"excel"},{name:"doc",group:"docums",acp:"application/msword",exec:"word"},{name:"docx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",exec:"word"},{name:"skp",group:"",acp:"application/vnd.sketchup.skp",exec:""},{name:"pcap",group:"",acp:"application/vnd.tcpdump.pcap",exec:""},{name:"wasm",group:"",acp:"application/wasm",exec:""},{name:"arrow",group:"",acp:"application/x-apache-arrow",exec:""},{name:"dmg",group:"",acp:"application/x-apple-diskimage",exec:""},{name:"arj",group:"",acp:"application/x-arj",exec:""},{name:"asar",group:"",acp:"application/x-asar",exec:""},{name:"blend",group:"",acp:"application/x-blender",exec:"blender"},{name:"cfb",group:"",acp:"application/x-cfb",exec:""},{name:"cpio",group:"",acp:"application/x-cpio",exec:""},{name:"deb",group:"",acp:"application/x-deb",exec:""},{name:"elf",group:"",acp:"application/x-elf",exec:""},{name:"shp",group:"",acp:"application/x-esri-shape",exec:""},{name:"crx",group:"",acp:"application/x-google-chrome-extension",exec:""},{name:"indd",group:"",acp:"application/x-indesign",exec:""},{name:"macho",group:"",acp:"application/x-mach-binary",exec:""},{name:"mie",group:"",acp:"application/x-mie",exec:""},{name:"mobi",group:"",acp:"application/x-mobipocket-ebook",exec:""},{name:"exe",group:"",acp:"application/x-msdownload",exec:""},{name:"nes",group:"",acp:"application/x-nintendo-nes-rom",exec:""},{name:"parquet",group:"",acp:"application/x-parquet",exec:""},{name:"rpm",group:"",acp:"application/x-rpm",exec:""},{name:"swf",group:"",acp:"application/x-shockwave-flash",exec:""},{name:"sqlite",group:"",acp:"application/x-sqlite3",exec:""},{name:"xpi",group:"",acp:"application/x-xpinstall",exec:""},{name:"xz",group:"",acp:"application/x-xz",exec:""},{name:"alias",group:"",acp:"application/x.apple.alias",exec:""},{name:"fbx",group:"",acp:"application/x.autodesk.fbx",exec:""},{name:"lnk",group:"",acp:"application/x.ms.shortcut",exec:""},{name:"zst",group:"",acp:"application/zstd",exec:""},{name:"aac",group:"audio",acp:"audio/aac",exec:"audioplayer"},{name:"aif",group:"audio",acp:"audio/aiff",exec:"audioplayer"},{name:"amr",group:"audio",acp:"audio/amr",exec:"audioplayer"},{name:"ape",group:"audio",acp:"audio/ape",exec:"audioplayer"},{name:"mid",group:"audio",acp:"audio/midi",exec:"audioplayer"},{name:"m4b",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"f4a",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"f4b",group:"audio",acp:"audio/mp4",exec:"audioplayer"},{name:"mp3",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"mp2",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"mp1",group:"audio",acp:"audio/mpeg",exec:"audioplayer"},{name:"oga",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"spx",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"ogg",group:"audio",acp:"audio/ogg",exec:"audioplayer"},{name:"opus",group:"audio",acp:"audio/opus",exec:"audioplayer"},{name:"qcp",group:"audio",acp:"audio/qcelp",exec:"audioplayer"},{name:"ac3",group:"audio",acp:"audio/vnd.dolby.dd-raw",exec:"audioplayer"},{name:"wav",group:"audio",acp:"audio/wav",exec:"audioplayer"},{name:"wv",group:"audio",acp:"audio/wavpack",exec:"audioplayer"},{name:"dsf",group:"audio",acp:"audio/x-dsf",exec:"audioplayer"},{name:"flac",group:"audio",acp:"audio/x-flac",exec:"audioplayer"},{name:"it",group:"audio",acp:"audio/x-it",exec:"audioplayer"},{name:"m4a",group:"audio",acp:"audio/x-m4a",exec:"audioplayer"},{name:"mpc",group:"audio",acp:"audio/x-musepack",exec:"audioplayer"},{name:"s3m",group:"audio",acp:"audio/x-s3m",exec:"audioplayer"},{name:"voc",group:"audio",acp:"audio/x-voc",exec:"audioplayer"},{name:"xm",group:"audio",acp:"audio/x-xm",exec:"audioplayer"},{name:"otf",group:"",acp:"font/otf",exec:""},{name:"ttf",group:"",acp:"font/ttf",exec:""},{name:"woff",group:"",acp:"font/woff",exec:""},{name:"woff2",group:"",acp:"font/woff2",exec:""},{name:"apng",group:"image",acp:"image/apng",exec:"imageviwer"},{name:"avif",group:"image",acp:"image/avif",exec:"imageviwer"},{name:"bmp",group:"image",acp:"image/bmp",exec:"imageviwer"},{name:"bpg",group:"image",acp:"image/bpg",exec:"imageviwer"},{name:"flif",group:"image",acp:"image/flif",exec:"imageviwer"},{name:"gif",group:"image",acp:"image/gif",exec:"imageviwer"},{name:"heic",group:"image",acp:"image/heif",exec:"imageviwer"},{name:"icns",group:"image",acp:"image/icns",exec:"imageviwer"},{name:"j2c",group:"image",acp:"image/j2c",exec:"imageviwer"},{name:"jls",group:"image",acp:"image/jls",exec:"imageviwer"},{name:"jp2",group:"image",acp:"image/jp2",exec:"imageviwer"},{name:"jpg",group:"image",acp:"image/jpeg",exec:"imageviwer"},{name:"jpm",group:"image",acp:"image/jpm",exec:"imageviwer"},{name:"jpx",group:"image",acp:"image/jpx",exec:"imageviwer"},{name:"jxl",group:"image",acp:"image/jxl",exec:"imageviwer"},{name:"ktx",group:"image",acp:"image/ktx",exec:"imageviwer"},{name:"mj2",group:"image",acp:"image/mj2",exec:"imageviwer"},{name:"png",group:"image",acp:"image/png",exec:"imageviwer"},{name:"tif",group:"image",acp:"image/tiff",exec:"imageviwer"},{name:"psd",group:"image",acp:"image/vnd.adobe.photoshop",exec:"imageviwer"},{name:"dwg",group:"image",acp:"image/vnd.dwg",exec:"imageviwer"},{name:"jxr",group:"image",acp:"image/vnd.ms-photo",exec:"imageviwer"},{name:"webp",group:"image",acp:"image/webp",exec:"imageviwer"},{name:"dng",group:"image",acp:"image/x-adobe-dng",exec:"imageviwer"},{name:"cr2",group:"image",acp:"image/x-canon-cr2",exec:"imageviwer"},{name:"cr3",group:"image",acp:"image/x-canon-cr3",exec:"imageviwer"},{name:"raf",group:"image",acp:"image/x-fujifilm-raf",exec:"imageviwer"},{name:"ico",group:"image",acp:"image/x-icon",exec:"imageviwer"},{name:"cur",group:"image",acp:"image/x-icon",exec:"imageviwer"},{name:"nef",group:"image",acp:"image/x-nikon-nef",exec:"imageviwer"},{name:"orf",group:"image",acp:"image/x-olympus-orf",exec:"imageviwer"},{name:"rw2",group:"image",acp:"image/x-panasonic-rw2",exec:"imageviwer"},{name:"arw",group:"image",acp:"image/x-sony-arw",exec:"imageviwer"},{name:"xcf",group:"image",acp:"image/x-xcf",exec:"imageviwer"},{name:"3mf",group:"",acp:"model/3mf",exec:""},{name:"glb",group:"",acp:"model/gltf-binary",exec:""},{name:"stl",group:"",acp:"model/stl",exec:""},{name:"vtp",group:"",acp:"model/vtp",exec:""},{name:"vtk",group:"",acp:"model/vtk",exec:""},{name:"vtu",group:"",acp:"model/vtu",exec:""},{name:"vti",group:"",acp:"model/vti",exec:""},{name:"vts",group:"",acp:"model/vts",exec:""},{name:"vtr",group:"",acp:"model/vtr",exec:""},{name:"ics",group:"",acp:"text/calendar",exec:""},{name:"vcf",group:"",acp:"text/vcard",exec:""},{name:"3gp",group:"video",acp:"video/3gpp",exec:"videoplayer"},{name:"3g2",group:"video",acp:"video/3gpp2",exec:"videoplayer"},{name:"m2p",group:"video",acp:"video/MP2P",exec:"videoplayer"},{name:"vob",group:"video",acp:"video/MP2P",exec:"videoplayer"},{name:"sub",group:"video",acp:"video/MP2P",exec:"videoplayer",msg:"與字幕檔衝突"},{name:"mts",group:"video",acp:"video/mp2t",exec:"videoplayer"},{name:"m4p",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"f4v",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"f4p",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"mp4",group:"video",acp:"video/mp4",exec:"videoplayer"},{name:"mpg",group:"video",acp:"video/mpeg",exec:"videoplayer",msg:"mpg可能為mpeg或video/MP1S或video/MP2S"},{name:"ogv",group:"video",acp:"video/ogg",exec:"videoplayer"},{name:"ogm",group:"video",acp:"video/ogg",exec:"videoplayer"},{name:"mov",group:"video",acp:"video/quicktime",exec:"videoplayer"},{name:"avi",group:"video",acp:"video/vnd.avi",exec:"videoplayer"},{name:"webm",group:"video",acp:"video/webm",exec:"videoplayer"},{name:"flv",group:"video",acp:"video/x-flv",exec:"videoplayer"},{name:"m4v",group:"video",acp:"video/x-m4v",exec:"videoplayer"},{name:"mkv",group:"video",acp:"video/x-matroska",exec:"videoplayer"}];function Om(e=""){let t=null;return Fe(e)?(t=Hm(qm,{name:e}),Se(t)||(t=null)):t=qm,t}function Pm(e=""){if(""!==e&&"name"!==e&&"group"!==e&&"acp"!==e&&"exec"!==e)return[];let t=Om();if(""===e)return t;let n={};return An(t,function(t){let r=t[e];Te(n,r)||(n[r]=[]),n[r].push(t)}),n}function $m(e="*"){if("*"===e)return e;if(!ke(e)&&!Tn(e))return"*";"common"===e&&(e=["docums","compress","image","data"]);let t=Pm();function n(e){return $n(wn(e,"acp"))}ke(e)&&(e=[e]);let r="";if(Tn(e)){let i=wn(e,function(e){return function(e){return n(sa(t,{group:e}))}(e)}),o=En(i,wn(e,function(e){return n(sa(t,{name:e}))}));o=sa(o,Lm),r=Ao(o,",")}return r}function zm(e,t=1e3){(t=xr(t))<=0&&(t=1e3);let n={},r=[];return An(be(e,"files",[]),function(e,i){let o=e.size/1024/1024;o>t&&(n[i]=`file size[${o}]mb > ${t}mb`),r.push(e)}),{files:r,errs:n}}function jm(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(void 0===s?a==a&&!N(a):n(a,s)))var s=a,l=o}return l}function Vm(e,t){return e<t}function Ym(e){return e&&e.length?jm(e,fn,Vm):void 0}function Wm(){return!function(){try{return"IntersectionObserver"in window}catch(e){return!1}}()||!function(){try{return"IntersectionObserverEntry"in window}catch(e){return!1}}()||!(function(){try{return"intersectionRatio"in window.IntersectionObserverEntry.prototype}catch(e){return!1}}()||Oi(window.IntersectionObserverEntry))}function Gm(e,t,n={}){if(!ku(e))return Promise.reject("invalid ele");let r=nc().markmap,{Transformer:i,Markmap:o,loadCSS:a,loadJS:s}=r,l=e=>{let t=new i,{root:n,features:r}=t.transform(e),{styles:o,scripts:a}=t.getUsedAssets(r);return{root:n,features:r,styles:o,scripts:a}},{root:c,styles:u,scripts:f}=l(t);u&&a(u),f&&s(f,{getMarkmap:()=>r}),e.innerHTML="";let d=o.create(e,null,c);return d.transMarkdown=l,d}const Jm=e=>void 0===e||"auto"===e||"instant"===e||"smooth"===e;function _m(e,t){this.scrollLeft=e,this.scrollTop=t}const Xm=(e,t,n="cannot convert to dictionary.")=>`Failed to execute '${e}' on '${t}': ${n}`,Km=(e,t,n)=>Xm(e,t,`The provided value '${n}' is not a valid enum value of type ScrollBehavior.`),Zm=(e,t,n)=>{var r;const i=`__SEAMLESS.BACKUP$${t}`;return e[i]||!e[t]||(null===(r=e[t])||void 0===r?void 0:r.__isPolyfill)||(e[i]=e[t]),e[i]||n},ey=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},ty=e=>"scrollBehavior"in window.document.documentElement.style&&!0!==(null==e?void 0:e.forcePolyfill),ny=e=>{Object.defineProperty(e,"__isPolyfill",{value:!0})},ry=(e,t)=>{ny(t),[HTMLElement.prototype,SVGElement.prototype,Element.prototype].forEach(n=>{Zm(n,e),n[e]=t})},iy=e=>e.ownerDocument.scrollingElement||e.ownerDocument.documentElement;const oy=e=>.5*(1-Math.cos(Math.PI*e));function ay(){var e;let t;return t=(null===(e=window.performance)||void 0===e?void 0:e.now)?()=>window.performance.now():()=>window.Date.now(),ay=t,t()}const sy=e=>{const t=(ay()-e.timeStamp)/(e.duration||500);if(t>1)return e.method(e.targetX,e.targetY),void e.callback();const n=(e.timingFunc||oy)(t),r=e.startX+(e.targetX-e.startX)*n,i=e.startY+(e.targetY-e.startY)*n;e.method(r,i),e.rafId=window.requestAnimationFrame(()=>{sy(e)})},ly=e=>isFinite(e)?Number(e):0,cy=(e,t,n)=>{var r,i;if(!(e=>{var t;return null!==(t=e.isConnected)&&void 0!==t?t:!(e.ownerDocument&&1&e.ownerDocument.compareDocumentPosition(e))})(e))return;const o=e.scrollLeft,a=e.scrollTop,s=ly(null!==(r=t.left)&&void 0!==r?r:o),l=ly(null!==(i=t.top)&&void 0!==i?i:a);if(s===o&&l===a)return;const c=Zm(HTMLElement.prototype,"scroll",_m),u=Zm(Object.getPrototypeOf(e),"scroll",c).bind(e);if("smooth"!==t.behavior)return void u(s,l);const f=()=>{window.removeEventListener("wheel",h),window.removeEventListener("touchmove",h)},d=Object.assign(Object.assign({},n),{timeStamp:ay(),startX:o,startY:a,targetX:s,targetY:l,rafId:0,method:u,callback:()=>{f();const t=9===e.nodeType;e.dispatchEvent(function(e){if("function"==typeof Event)return new Event("scrollend",{bubbles:e,cancelable:!1});const t=document.createEvent("Event");return t.initEvent("scrollend",e,!1),t}(t))}}),h=()=>{window.cancelAnimationFrame(d.rafId),f()};window.addEventListener("wheel",h,{passive:!0,once:!0}),window.addEventListener("touchmove",h,{passive:!0,once:!0}),sy(d)},uy=e=>(t,n,r)=>{const[i,o]=(a=t).window===a?[iy(t.document.documentElement),"Window"]:[t,"Element"];var a;const s=null!=n?n:{};if(!ey(s))throw new TypeError(Xm(e,o));if(!Jm(s.behavior))throw new TypeError(Km(e,o,s.behavior));"scrollBy"===e&&(s.left=ly(s.left)+i.scrollLeft,s.top=ly(s.top)+i.scrollTop),cy(i,s,r)},fy=uy("scroll"),dy=uy("scrollTo"),hy=uy("scrollBy"),py=fy,gy=e=>{switch(e){case"horizontal-tb":case"lr":case"lr-tb":case"rl":case"rl-tb":return 0;case"vertical-rl":case"tb":case"tb-rl":return 1;case"vertical-lr":case"tb-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4}return 0},my=(e,t,n,r)=>{let i=0;switch(t||(i^=2),e){case 0:i=i>>1|(1&i)<<1,[n,r]=[r,n];break;case 1:case 3:i^=1;break;case 4:i^=2}return[i,n,r]},yy=e=>!(1&~my(gy(e.writingMode),"rtl"!==e.direction,void 0,void 0)[0]),vy=(e,t,n,r,i,o,a)=>0!==e?e:i<t&&o>n||i>t&&o<n?null:i<=t&&a<=r||o>=n&&a>=r?2:o>n&&a<r||i<t&&a>r?3:null,Ay=e=>"visible"!==e&&"clip"!==e,by=(e,t)=>(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth)&&(Ay(t.overflowY)||Ay(t.overflowX)||e===iy(e)),wy=e=>{const t=e.parentNode,n=e.parentElement;if(null===n&&null!==t){if(11===t.nodeType)return t.host;if(9===t.nodeType)return(e=>{var t;try{return(null===(t=e.ownerDocument.defaultView)||void 0===t?void 0:t.frameElement)||null}catch(e){return null}})(e)}return n},Iy=(e,t,n)=>e<t?t:e>n?n:e,xy=(e,t,n)=>{switch(e){case 1:return(t+n)/2;case 3:return n;case 2:case 0:return t}},Cy=(e,t)=>{var n,r,i;const o=null===(n=e.ownerDocument.defaultView)||void 0===n?void 0:n.visualViewport,[a,s,l,c]=e===iy(e)?[0,0,null!==(r=null==o?void 0:o.width)&&void 0!==r?r:e.clientWidth,null!==(i=null==o?void 0:o.height)&&void 0!==i?i:e.clientHeight]:[t.left,t.top,e.clientWidth,e.clientHeight],u=a+e.clientLeft,f=s+e.clientTop;return[f,u+l,f+c,u]},By=(e,t)=>{const n=[];let r=e.ownerDocument,i=r.defaultView;if(!i)return n;const o=window.getComputedStyle(e),a="rtl"!==o.direction,s=gy(o.writingMode||o.getPropertyValue("-webkit-writing-mode")||o.getPropertyValue("-ms-writing-mode")),[l,c]=((e,t,n)=>{const[r,i,o]=my(t,n,e.block||"start",e.inline||"nearest");return[i,o].map((e,t)=>{switch(e){case"center":return 1;case"nearest":return 0;default:return"start"===e==!(r>>t&1)?2:3}})})(t,s,a);let[u,f,d,h]=((e,t,n)=>{const{top:r,right:i,bottom:o,left:a}=t,s=(l=e.ownerDocument,["scroll-margin","scroll-snap-margin"].filter(e=>e in l.documentElement.style)[0]);var l;if(!s)return[r,i,o,a];const c=e=>{const t=n.getPropertyValue(`${s}-${e}`);return parseInt(t,10)||0};return[r-c("top"),i+c("right"),o+c("bottom"),a-c("left")]})(e,e.getBoundingClientRect(),o);for(let o=wy(e);null!==o;o=wy(o)){if(r!==o.ownerDocument){if(r=o.ownerDocument,i=r.defaultView,!i)break;const{left:e,top:t}=o.getBoundingClientRect();u+=t,f+=e,d+=t,h+=e}const e=i.getComputedStyle(o);if("fixed"===e.position)break;if(!by(o,e))continue;const a=o.getBoundingClientRect(),[s,p,g,m]=Cy(o,a),y=vy(l,m,p,o.clientWidth,h,f,f-h),v=vy(c,s,g,o.clientHeight,u,d,d-u),A=null===y?0:xy(y,h,f)-xy(y,m,p),b=null===v?0:xy(v,u,d)-xy(v,s,g),w=yy(e)?Iy(A,-o.scrollWidth+o.clientWidth-o.scrollLeft,-o.scrollLeft):Iy(A,-o.scrollLeft,o.scrollWidth-o.clientWidth-o.scrollLeft),I=Iy(b,-o.scrollTop,o.scrollHeight-o.clientHeight-o.scrollTop);n.push([o,{left:o.scrollLeft+w,top:o.scrollTop+I,behavior:t.behavior}]),u=Math.max(u-I,s),f=Math.min(f-w,p),d=Math.min(d-I,g),h=Math.max(h-w,m)}return n},Ey=(e,t,n)=>{const r=t||{};if(!Jm(r.behavior))throw new TypeError(Km("scrollIntoView","Element",r.behavior));By(e,r).forEach(([e,t])=>{py(e,t,n)})},Sy=(e,t)=>n=>{if(ty(n))return;const r={scroll:fy,scrollTo:dy,scrollBy:hy}[e];t(e,function(){const e=arguments;if(1===arguments.length)return void r(this,e[0],n);r(this,{left:e[0],top:e[1]})})},ky=Sy("scroll",ry),Fy=Sy("scrollTo",ry),Dy=Sy("scrollBy",ry),Ny=(e,t)=>{ny(t),Zm(window,e),window[e]=t},My=Sy("scroll",Ny),Ty=Sy("scrollTo",Ny),Qy=Sy("scrollBy",Ny);function Ly(e){Ey(this,{block:null==e||e?"start":"end",inline:"nearest"})}const Ry=e=>{if(ty(e))return;const t=Zm(window.HTMLElement.prototype,"scrollIntoView",Ly);ry("scrollIntoView",function(){const n=arguments,r=n[0];1===n.length&&ey(r)?Ey(this,r,e):t.apply(this,n)})},Uy=e=>{ty(e)||(ky(e),Fy(e),Dy(e),Ry(e),My(e),Ty(e),Qy(e))};var Hy={exports:{}};
|
|
16
16
|
/*!
|
|
17
17
|
* Viewer.js v1.12.0
|
|
18
18
|
* https://fengyuanchen.github.io/viewerjs
|