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EAAA,KAEbC,EAES,qBAFA,MAA6DA,EAAA,gBAAA8B,GAAA,yBAAAH,EAAA,gBAClE,QAAA5B,EAAA,KAAkBA,KAALgC,GAAA,CAAAJ,EAAA,oBAAA5B,EAAA,MAAAA,EAAA,gCAIrB,QACIC,EAAA,MAAAqvF,GAAA,CACc1tF,EAAA,mBAAa,OAAvB,GAAA9B,EAAA,EAAAC,EAAA,UAA4D6vF,GAxFpF,CAAAhuF,EAAA,eAAA9B,EAAA,EAAAC,EAAA,KAAAwvF,GAAA,oCAAAzvF,EAAA,EAAAC,EAAA,KAAAyvF,GAAA,2BA4FoB,GAAAntF,GAAA,QAAAvC,EACU,EAAO,EAAAC,EAAAoD,GAAA,KAAAC,GAAAxB,EAAA,mBAAAlgB,IACNoe,EAAA,EAAQuD,GAAAzB,EAAA,uBACd,IAAAlgB,EAAA,GACA,OAAckgB,EAAA,OACd,cAAYlgB,EAAA,aAAAkgB,EAAA,0FAKf,CAAA0uF,GAAA1uF,EAAU,cAAMA,EAAA,sBAtGtCA,EAAA,oBAAA9B,EAAA,EAAAC,EAAA,KAAAu3F,GAAA,2CAAAj1F,GAgCuB,GAAS,EAAI","names":["getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","_a","now","ApiProxy","plugin","hook","defaultSettings","id","item","localSettingsSaveId","currentSettings","raw","data","value","pluginId","_target","prop","args","resolve","target","setupDevtoolsPlugin","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","isBrowser","isRouteComponent","component","isESModule","obj","assign","applyToParams","fn","params","newParams","key","isArray","noop","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","text","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","TRAILING_SLASH_RE","removeTrailingSlash","path","parseURL","parseQuery","location","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery","stripBase","pathname","base","isSameRouteLocation","a","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","i","to","from","fromSegments","toSegments","lastToSegment","position","toPosition","segment","START_LOCATION_NORMALIZED","NavigationType","NavigationDirection","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","state","fromState","listener","pauseListeners","listen","callback","teardown","index","beforeUnloadListener","history","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","url","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","route","isRouteName","name","NavigationFailureSymbol","NavigationFailureType","createRouterError","type","isNavigationFailure","error","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","options","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re","subPattern","parse","match","stringify","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","message","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","record","parent","parser","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","isAliasRecord","removeRoute","isMatchable","insertMatcher","children","matcherRef","getRoutes","findInsertionIndex","paramsFromLocation","k","m","matched","parentMatcher","mergeMetaFields","clearRoutes","normalized","normalizeRecordProps","propsObject","props","meta","defaults","partialOptions","lower","upper","mid","insertionAncestor","getInsertionAncestor","ancestor","searchParams","searchParam","eqPos","currentValue","v","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","runWithContext","enterCallbackArray","reject","next","valid","guardReturn","guardCall","extractComponentsGuards","guardType","guards","rawComponent","componentPromise","resolved","resolvedComponent","useLink","router","inject","currentRoute","computed","unref","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","p","instance","getCurrentInstance","linkContextDevtools","watchEffect","preferSingleVNode","vnodes","RouterLinkImpl","defineComponent","slots","link","reactive","elClass","getLinkClass","h","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","ref","watch","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","vnode","info","r","slot","slotContent","RouterView","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","display","routerId","addDevtools","app","api","payload","ctx","node","componentInstance","PINK_500","devtoolsData","label","backgroundColor","ORANGE_400","textColor","RED_100","RED_700","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","child","decodedPath","ret","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","href","matcherLocation","targetParams","fullPath","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","force","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorListeners","ready","list","isReady","scrollBehavior","nextTick","started","reactiveRoute","shallowReactive","unmountApp","promise","len","recordFrom","recordTo","useRouter","useRoute","_name","_sfc_main","_hoisted_1","_openBlock","_createElementBlock","_cache","_createElementVNode","appSettingsLoader","__vitePreload","__vite_default__","DocumentAssociation","init","DOC_ASSOCIATION","emits","__emit","isExpanded","__props","getAccordionClassName","className","isOpen","newValue","oldValue","toggle","afterEnter","afterLeave","toggleOverride","toggleOne","toggleOneWithCallback","__expose","_hoisted_2","_sfc_render","_ctx","$props","$setup","$data","$options","_normalizeClass","$event","_renderSlot","_createVNode","_Transition","_withCtx","_createCommentVNode","selectedAccordion","lastSelectedAccordion","accordions","control","accordionRef","useTemplateRef","onMounted","handleOpened","handleClosed","updateSelectedAccordion","closeAll","accordion","openAll","_Fragment","_renderList","_createBlock","PlaidCustomerInfo","t","PlaidAssetReportToken","PlaidUserToken","PlaidAccessToken","PlaidToken","product","PlaidUserInfo","ENUMS","fimenuCustomer","dob","userData","customerApplication","preFilledData","personalInfo","moment","PlaidLinkConfig","#transferIntentId","linkTokenResponse","customerId","storeCode","user","response","plaidCustomerInfo","plaidItemId","accessToken","at","validProducts","linkOptions","plaidProduct","s","ap","SandboxRUXTestCase","util","__assign","n","qrcodegen","QrCode","version","errorCorrectionLevel","dataCodewords","msk","row","allCodewords","minPenalty","penalty","assert","ecl","segs","seg","minVersion","maxVersion","mask","boostEcl","dataUsedBits","dataCapacityBits_1","usedBits","QrSegment","_i","newEcl","bb","_b","segs_1","appendBits","_c","_d","dataCapacityBits","padByte","x","y","alignPatPos","numAlign","j","rem","bits","getBit","color","dy","dx","dist","xx","yy","isDark","ver","numBlocks","blockEccLen","rawCodewords","numShortBlocks","shortBlockLen","blocks","rsDiv","dat","ecc","result","_loop_1","block","right","vert","upward","invert","runColor","runX","runHistory","runY","dark","sum","total","step","pos","degree","root","divisor","_","_loop_2","factor","coef","data_1","z","core","currentRunColor","currentRunLength","val","cond","mode","numChars","bitData","data_2","digits","temp","assignVal","segs_2","ccbits","str","Ecc","ordinal","formatBits","Mode","modeBits","numBitsCharCount","QR","defaultErrorCorrectLevel","ErrorCorrectLevelMap","SUPPORTS_PATH2D","validErrorCorrectLevel","level","generatePath","modules","margin","ops","start","cell","getImageSettings","cells","size","imageSettings","width","height","imageX","imageY","numCells","defaultSize","scale","w","excavation","floorX","floorY","ceilW","ceilH","excavateModules","QRCodeProps","l","QRCodeVueProps","as","QrcodeSvg","fgPath","imageProps","generate","_level","_margin","renderGradient","gradientProps","onUpdated","QrcodeCanvas","canvasEl","imageRef","background","foreground","gradient","gradientType","gradientStartColor","gradientEndColor","canvas","image","showImage","devicePixelRatio","grad","rdx","cdx","style","Fragment","QrcodeVue","renderAs","__webpack_modules__","module","__unused_webpack_exports","__webpack_require__","isCallable","tryToString","$TypeError","argument","isPossiblePrototype","$String","has","it","isPrototypeOf","Prototype","isObject","globalThis","uncurryThisAccessor","classof","ArrayBuffer","TypeError","O","uncurryThis","arrayBufferByteLength","ArrayBufferPrototype","slice","isDetached","toIndex","notDetached","detachTransferable","PROPER_STRUCTURED_CLONE_TRANSFER","structuredClone","DataView","min","DataViewPrototype","isResizable","maxByteLength","getInt8","setInt8","arrayBuffer","newLength","preserveResizability","byteLength","newByteLength","fixedLength","newBuffer","copyLength","NATIVE_ARRAY_BUFFER","DESCRIPTORS","hasOwn","createNonEnumerableProperty","defineBuiltIn","defineBuiltInAccessor","getPrototypeOf","setPrototypeOf","wellKnownSymbol","uid","InternalStateModule","enforceInternalState","getInternalState","Int8Array","Int8ArrayPrototype","Uint8ClampedArray","Uint8ClampedArrayPrototype","TypedArray","TypedArrayPrototype","ObjectPrototype","TO_STRING_TAG","TYPED_ARRAY_TAG","TYPED_ARRAY_CONSTRUCTOR","NATIVE_ARRAY_BUFFER_VIEWS","TYPED_ARRAY_TAG_REQUIRED","NAME","Constructor","TypedArrayConstructorsList","BigIntArrayConstructorsList","isView","klass","getTypedArrayConstructor","proto","isTypedArray","aTypedArray","aTypedArrayConstructor","C","exportTypedArrayMethod","KEY","property","forced","ARRAY","TypedArrayConstructor","exportTypedArrayStaticMethod","lengthOfArrayLike","$length","toIndexedObject","toAbsoluteIndex","createMethod","IS_INCLUDES","$this","fromIndex","getOwnPropertyDescriptor","SILENT_ON_NON_WRITABLE_LENGTH_SET","A","toIntegerOrInfinity","$RangeError","relativeIndex","actualIndex","anObject","iteratorClose","iterator","ENTRIES","toString","stringSlice","TO_STRING_TAG_SUPPORT","classofRaw","$Object","CORRECT_ARGUMENTS","tryGet","tag","ownKeys","getOwnPropertyDescriptorModule","definePropertyModule","source","exceptions","defineProperty","fails","F","done","createPropertyDescriptor","object","bitmap","makeBuiltIn","defineGlobalProperty","simple","src","getBuiltInNodeModule","$ArrayBuffer","$MessageChannel","detach","WorkerThreads","channel","$detach","transferable","document","EXISTS","MAX_SAFE_INTEGER","ENVIRONMENT","navigator","userAgent","process","Deno","versions","v8","userAgentStartsWith","string","$Error","TEST","arg","V8_OR_CHAKRA_STACK_ENTRY","IS_V8_OR_CHAKRA_STACK","stack","dropEntries","copyConstructorProperties","isForced","TARGET","GLOBAL","STATIC","FORCED","targetProperty","sourceProperty","exec","aCallable","NATIVE_BIND","bind","that","test","call","FunctionPrototype","getDescriptor","PROPER","CONFIGURABLE","method","uncurryThisWithBind","IS_NODE","aFunction","namespace","getIteratorDirect","getIteratorMethod","stringHandling","getMethod","isNullOrUndefined","Iterators","ITERATOR","usingIterator","iteratorMethod","V","P","func","INVALID_SIZE","max","SetRecord","set","intSize","numSize","check","toObject","hasOwnProperty","getBuiltIn","createElement","split","dummy","Wrapper","NewTarget","NewTargetPrototype","store","functionToString","NATIVE_WEAK_MAP","shared","sharedKey","hiddenKeys","OBJECT_ALREADY_INITIALIZED","WeakMap","get","enforce","getterFor","TYPE","metadata","STATE","ArrayPrototype","documentAll","replacement","feature","detection","normalize","POLYFILL","NATIVE","USE_SYMBOL_AS_UID","$Symbol","ITERATOR_INSTEAD_OF_RECORD","isArrayIteratorMethod","getIterator","Result","stopped","ResultPrototype","iterable","unboundFunction","AS_ENTRIES","IS_RECORD","IS_ITERATOR","INTERRUPTED","iterFn","stop","condition","callFn","kind","innerResult","innerError","create","defineBuiltIns","IteratorPrototype","createIterResultObject","ITERATOR_HELPER","WRAP_FOR_VALID_ITERATOR","setInternalState","createIteratorProxyPrototype","returnMethod","WrapForValidIteratorPrototype","IteratorHelperPrototype","nextHandler","IteratorProxy","createIteratorProxy","callWithSafeIterationClosing","mapper","IS_PURE","BUGGY_SAFARI_ITERATORS","PrototypeOfArrayIteratorPrototype","arrayIterator","NEW_ITERATOR_PROTOTYPE","toLength","CONFIGURABLE_FUNCTION_NAME","inspectSource","join","CONFIGURABLE_LENGTH","TEMPLATE","ceil","floor","PromiseCapability","$$resolve","$$reject","$default","definePropertiesModule","enumBugKeys","html","documentCreateElement","GT","LT","PROTOTYPE","SCRIPT","IE_PROTO","EmptyConstructor","scriptTag","content","NullProtoObjectViaActiveX","activeXDocument","NullProtoObjectViaIFrame","iframe","JS","iframeDocument","NullProtoObject","Properties","__unused_webpack_module","exports","V8_PROTOTYPE_DEFINE_BUG","objectKeys","IE8_DOM_DEFINE","toPropertyKey","$defineProperty","$getOwnPropertyDescriptor","ENUMERABLE","WRITABLE","Attributes","propertyIsEnumerableModule","internalObjectKeys","CORRECT_PROTOTYPE_GETTER","constructor","indexOf","names","$propertyIsEnumerable","NASHORN_BUG","requireObjectCoercible","aPossiblePrototype","CORRECT_SETTER","setter","input","pref","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","concat","getOwnPropertySymbols","$SyntaxError","$parseInt","fromCharCode","codePoints","IS_4_HEX_DIGITS","IS_C0_CONTROL_CODE","unterminated","chr","twoChars","fourHexDigits","SetHelpers","iterate","Set","aSet","clone","getSetRecord","iterateSet","iterateSimple","remove","other","otherRec","SetPrototype","forEach","interruptible","createSetLike","keysIter","SHARED","V8","V8_VERSION","symbol","integer","toPrimitive","prim","number","IndexedObject","trunc","isSymbol","ordinaryToPrimitive","TO_PRIMITIVE","exoticToPrim","postfix","NATIVE_SYMBOL","passed","required","Symbol","WellKnownSymbolsStore","createWellKnownSymbol","$","$transfer","setArrayLength","doesNotExceedSafeInteger","INCORRECT_TO_LENGTH","properErrorOnNonWritableLength","argCount","newPromiseCapabilityModule","promiseCapability","difference","setMethodAcceptSetLike","intersection","INCORRECT","isDisjointFrom","isSubsetOf","isSupersetOf","symmetricDifference","union","arrayToReversed","ArrayBufferViewCore","arrayFromConstructorAndList","sort","compareFn","arrayWith","isBigIntArray","toBigInt","PROPER_ORDER","actualValue","anInstance","createProperty","CONSTRUCTOR","NativeIterator","IteratorConstructor","defineIteratorPrototypeAccessor","notANaN","toPositiveInteger","limit","remaining","predicate","counter","getIteratorFlattenable","map","parseJSONString","JSON","Number","SyntaxError","nativeParse","enumerableOwnProperties","IS_DIGIT","IS_NON_ZERO_DIGIT","IS_NUMBER_START","IS_WHITESPACE","PRIMITIVE","OBJECT","$parse","reviver","context","Context","endIndex","internalize","holder","unmodified","elementRecordsLen","nodeIsArray","nodes","internalizeProperty","Node","end","nextIndex","fork","expectKeypair","expectElement","array","parsed","startIndex","exponentStartIndex","keyword","regex","NO_SOURCE_SUPPORT","unsafeInt","PROPER_BASE_PARSE","inheritIfRequired","normalizeStringArgument","DOMExceptionConstants","clearErrorStack","DOM_EXCEPTION","Error","NativeDOMException","$DOMException","DOMExceptionPrototype","argumentsLength","ERROR_HAS_STACK","DOM_EXCEPTION_HAS_STACK","BUGGY_DESCRIPTOR","FORCED_CONSTRUCTOR","PolyfilledDOMException","PolyfilledDOMExceptionPrototype","constant","constantName","validateArgumentsLength","$URLSearchParams","URLSearchParamsPrototype","append","$delete","$value","entries","dindex","entriesLength","entry","getAll","$has","values","count","__webpack_module_cache__","moduleId","cachedModule","definition","__webpack_exports__","AbortException","AnnotationEditorLayer","AnnotationEditorParamsType","AnnotationEditorType","AnnotationEditorUIManager","AnnotationLayer","AnnotationMode","CMapCompressionType","ColorPicker","DOMSVGFactory","DrawLayer","util_FeatureTest","GlobalWorkerOptions","util_ImageKind","InvalidPDFException","MissingPDFException","OPS","OutputScale","PDFDataRangeTransport","PDFDateString","PDFWorker","PasswordResponses","PermissionFlag","PixelsPerInch","RenderingCancelledException","TextLayer","UnexpectedResponseException","Util","VerbosityLevel","XfaLayer","build","createValidAbsoluteUrl","fetchData","getDocument","getFilenameFromUrl","getPdfFilenameFromUrl","getXfaPageViewport","isDataScheme","isPdfFile","noContextMenu","normalizeUnicode","setLayerDimensions","shadow","isNodeJS","IDENTITY_MATRIX","FONT_IDENTITY_MATRIX","MAX_IMAGE_SIZE_TO_CACHE","LINE_FACTOR","RenderingIntentFlag","AnnotationEditorPrefix","TextRenderingMode","AnnotationType","AnnotationBorderStyleType","verbosity","setVerbosityLevel","getVerbosityLevel","msg","warn","unreachable","_isValidProtocol","baseUrl","stringToUTF8String","absoluteUrl","nonSerializable","BaseException","PasswordException","code","UnknownErrorException","details","status","FormatError","bytesToString","bytes","MAX_ARGUMENT_COUNT","strBuf","chunkEnd","chunk","stringToBytes","string32","objectFromMap","isLittleEndian","buffer8","isEvalSupported","hexNumbers","g","transform","minMax","m1","m2","xt","yt","d","p1","p2","p3","p4","transpose","c","first","second","sx","sy","rect","rect1","rect2","xLow","xHigh","yLow","yHigh","#getExtremumOnCurve","x0","x1","x2","x3","y0","y1","y2","y3","mt","tt","ttt","#getExtremum","sqrtDelta","a2","NormalizeRegex","NormalizationMap","getUuid","buf","AnnotationPrefix","FontRenderOps","BaseFilterFactory","maps","fgColor","bgColor","filterName","newFgColor","newBgColor","keepHCM","BaseCanvasFactory","#enableHWA","enableHWA","canvasAndContext","BaseCMapReaderFactory","isCompressed","compressionType","reason","BaseStandardFontDataFactory","filename","BaseSVGFactory","skipDimensions","svg","SVG_NS","DOMFilterFactory","#baseUrl","#_cache","#_defs","#docId","#document","#_hcmCache","#id","docId","ownerDocument","#cache","#hcmCache","#defs","div","#createTables","mapR","table","mapG","mapB","bufferR","bufferG","bufferB","#createUrl","tableR","tableG","tableB","#createFilter","#addTransferMapConversion","fgRGB","#getRGB","bgRGB","#addGrayConversion","getSteps","arr","tableA","#addTransferMapAlphaConversion","#addLuminosityConversion","fgGray","bgGray","newFgRGB","newBgRGB","fg","bg","newStart","newStep","prev","feColorMatrix","#appendFeFunc","feComponentTransfer","feFunc","rTable","gTable","bTable","aTable","getRGB","DOMCanvasFactory","isValidFetchUrl","request","DOMCMapReaderFactory","DOMStandardFontDataFactory","PageViewport","viewBox","rotation","offsetX","offsetY","dontFlip","centerX","centerY","rotateA","rotateB","rotateC","rotateD","offsetCanvasX","offsetCanvasY","topLeft","bottomRight","extraDelay","ii","defaultFilename","reURI","reFilename","splitURI","suggestedFilename","StatTimer","outBuf","longest","protocol","deprecated","pdfDateStringRegex","matches","year","month","day","hour","minute","universalTimeRelation","offsetHour","offsetMinute","xfaPage","colorRGB","getColorValues","colors","span","computedColor","getCurrentTransform","f","getCurrentTransformInverse","viewport","mustFlip","mustRotate","pageWidth","pageHeight","useRound","widthStr","heightStr","pixelRatio","EditorToolbar","#toolbar","#colorPicker","#editor","#buttons","#altText","#l10nRemove","editor","editToolbar","signal","#pointerDown","buttons","#addDeleteButton","#focusIn","#focusOut","#addListenersToElement","element","editorType","_uiManager","button","#divider","divider","altText","colorPicker","HighlightToolbar","#uiManager","uiManager","#render","#addHighlightButton","#getLastPoint","boxes","isLTR","lastY","lastX","box","bindEvents","opacityToHex","opacity","IdManager","ImageManager","#baseId","#get","rawData","mustRemoveAspectRatioPromise","fileReader","imageElement","imagePromise","file","lastModified","blobPromise","blob","offscreen","CommandManager","#commands","#locked","#maxSize","#position","maxSize","cmd","undo","post","mustExec","overwriteIfSameType","keepUndo","save","KeyboardManager","callbacks","isMac","isMacKey","#serialize","event","self","bubbles","checker","ColorManager","rgb","RGB","#abortController","#activeEditor","#allEditors","#allLayers","#altTextManager","#annotationStorage","#changedExistingAnnotations","#commandManager","#copyPasteAC","#currentPageIndex","#deletedAnnotationsElementIds","#draggingEditors","#editorTypes","#editorsToRescale","#enableHighlightFloatingButton","#enableUpdatedAddImage","#enableNewAltTextWhenAddingImage","#filterFactory","#focusMainContainerTimeoutId","#focusManagerAC","#highlightColors","#highlightWhenShiftUp","#highlightToolbar","#idManager","#isEnabled","#isWaiting","#keyboardManagerAC","#lastActiveElement","#mainHighlightColorPicker","#mlManager","#mode","#selectedEditors","#selectedTextNode","#pageColors","#showAllStates","#previousStates","#translation","#translationTimeoutId","#container","#viewer","#updateModeCapability","arrowChecker","textInputChecker","_self","small","big","container","viewer","altTextManager","eventBus","pdfDocument","pageColors","highlightColors","enableHighlightFloatingButton","enableUpdatedAddImage","enableNewAltTextWhenAddingImage","mlManager","evt","#addSelectionListener","#addDragAndDropListeners","#addKeyboardManager","layer","ac","pair","firstTime","pageNumber","layerX","layerY","pagesRotation","#getAnchorElementForSelection","anchorNode","#getLayerForTextLayer","textLayer","currentLayer","methodOfCreation","selection","anchorOffset","focusNode","focusOffset","isNoneMode","#displayHighlightToolbar","#selectionChange","#dispatchUpdateStates","activeLayer","pointerup","#onSelectEnd","#addFocusManager","#removeFocusManager","activeElement","lastEditor","lastActiveElement","#removeKeyboardManager","#addCopyPasteListeners","#removeCopyPasteListeners","editors","serialized","clipboardData","ex","newEditors","deserializedEditor","#addEditorToLayer","#selectEditors","#dispatchUpdateUI","isEditing","#isEmpty","types","pageIndex","editId","isFromKeyboard","#disableAll","#enableAll","visible","updateButton","mustWait","promises","annotationElementId","#lastSelectedEditor","ed","noCommit","totalX","totalY","TIME_TO_WAIT","mustBeAddedInUndoStack","move","newX","newY","newPageIndex","savedX","savedY","savedPageIndex","tx","ty","parentWidth","parentHeight","rotator","range","annotation","editorId","AltText","#altTextDecorative","#altTextButton","#altTextTooltip","#altTextTooltipTimeout","#altTextWasFromKeyBoard","#badge","#guessedText","#textWithDisclaimer","#useNewAltTextFlow","#l10nNewButton","l10nPromise","onClick","#label","#setState","guessedText","visibility","badge","isForCopying","decorative","textWithDisclaimer","cancel","enabled","DELAY_TO_SHOW_TOOLTIP","AnnotationEditor","#accessibilityData","#allResizerDivs","#disabled","#keepAspectRatio","#resizersDiv","#savedDimensions","#focusAC","#focusedResizerName","#hasBeenClicked","#initialPosition","#isEditing","#isInEditMode","#isResizerEnabledForKeyboard","#moveInDOMTimeout","#prevDragX","#prevDragY","#telemetryTimeouts","#isDraggable","#zIndex","resize","parameters","pageX","pageY","fakeEditor","FakeEditor","l10n","_type","_value","mime","#stopResizing","#translate","bx","by","_borderLineWidth","#rotatePoint","angle","#getRotationMatrix","parentScale","widthPercent","heightPercent","#createResizers","classes","#resizerPointerdown","savedDraggable","#resizerPointermove","savedWidth","savedHeight","savedParentCursor","savedCursor","pointerUpCallback","#addResizeToUndoStack","newWidth","newHeight","minWidth","minHeight","round","rotationMatrix","transf","invRotationMatrix","invTransf","getPoint","getOpposite","isDiagonal","isHorizontal","point","oppositePoint","transfOppositePoint","oppositeX","oppositeY","ratioX","ratioY","deltaX","deltaY","oldDiag","editToolbarDiv","#addFocusListeners","#setUpDragSession","#selectOnPointerEvent","isSelected","pointerMoveCallback","shiftX","shiftY","_angle","timeout","boundResizerKeydown","#resizerKeydown","boundResizerBlur","#resizerBlur","#resizerFocus","firstPosition","nextFirstPosition","#setResizerTabIndex","aspectRatio","action","firstChild","SEED","MASK_HIGH","MASK_LOW","MurmurHash3_64","seed","blockCounts","tailLength","dataUint32","k1","k2","h1","h2","C1","C2","C1_LOW","C2_LOW","SerializableEmpty","AnnotationStorage","#modified","#modifiedIds","#storage","defaultValue","modified","#setModified","PrintAnnotationStorage","transfer","hasBitmap","stats","typeToEditor","editorStats","counters","ids","#serializable","FontLoader","#systemFonts","styleElement","nativeFontFace","rule","styleSheet","_inspectFont","loadedName","fontFace","font","hasFonts","completeRequest","loadingRequests","otherRequest","testFont","int32","spliceString","insert","chunk1","chunk2","called","isFontReady","loadTestFontId","CFF_CHECKSUM_OFFSET","XXXX_VALUE","checksum","FontFaceObject","translatedData","disableFontFace","inspectFont","css","objs","character","cmds","commands","packageCapability","packageMap","fs","http","https","path2d","DOMMatrix","CanvasRenderingContext2D","applyPath2DToCanvasRenderingContext","Path2D","NodePackages","node_utils_fetchData","NodeFilterFactory","NodeCanvasFactory","NodeCMapReaderFactory","NodeStandardFontDataFactory","PathType","applyBoundingBox","bbox","region","BaseShadingPattern","RadialAxialShadingPattern","IR","colorStop","owner","inverse","pathType","ownerBBox","tmpCanvas","tmpCtx","domMatrix","drawTriangle","c1","c2","c3","coords","rowSize","tmp","c1r","c1g","c1b","c2r","c2g","c2b","c3r","c3g","c3b","minY","maxY","xa","car","cag","cab","xb","cbr","cbg","cbb","x1_","x2_","drawFigure","figure","ps","cs","verticesPerRow","rows","cols","q","MeshShadingPattern","combinedScale","cachedCanvases","boundsWidth","boundsHeight","scaleX","scaleY","paddedWidth","paddedHeight","matrixScale","temporaryPatternCanvas","DummyShadingPattern","getShadingPattern","PaintType","TilingPattern","canvasGraphicsFactory","baseTransform","operatorList","paintType","tilingType","xstep","ystep","curMatrixScale","combinedScaleX","combinedScaleY","canvasWidth","canvasHeight","redrawHorizontally","redrawVertically","xScaledStep","yScaledStep","xScaledWidth","yScaledHeight","dimx","dimy","graphics","dimx2","dimy2","xSize","ySize","tmpCanvas2","tmpCtx2","jj","realOutputSize","bboxWidth","bboxHeight","cssColor","matrix","convertBlackAndWhiteToRGBA","srcPos","dest","nonBlackColor","inverseDecode","black","zeroMapping","oneMapping","widthInSource","widthRemainder","srcLength","destPos","elem","MIN_FONT_SIZE","MAX_FONT_SIZE","EXECUTION_TIME","EXECUTION_STEPS","MAX_SIZE_TO_COMPILE","FULL_CHUNK_HEIGHT","mirrorContextOperations","destCtx","cp1x","cp1y","cp2x","cp2y","CachedCanvases","canvasFactory","canvasEntry","drawImageAtIntegerCoords","srcImg","srcX","srcY","srcW","srcH","destX","destY","destW","destH","tlX","rTlX","tlY","rTlY","brX","rWidth","brY","rHeight","compileType3Glyph","imgData","POINT_TO_PROCESS_LIMIT","POINT_TYPES","width1","points","j0","lineSize","steps","p0","pp","CanvasExtraState","xStrokePad","yStrokePad","intersect","putBinaryImageData","partialChunkHeight","fullChunks","totalChunks","chunkImgData","thisChunkHeight","elemsInThisChunk","dest32","dest32DataLength","fullSrcDiff","white","srcDiff","kEnd","kEndUnrolled","srcByte","putBinaryImageMask","copyCtxState","sourceCtx","properties","resetCtxToDefault","getImageSmoothingEnabled","interpolate","actualScale","LINE_CAP_STYLES","LINE_JOIN_STYLES","NORMAL_CLIP","EO_CLIP","CanvasGraphics","canvasCtx","commonObjs","filterFactory","optionalContentConfig","markedContentStack","annotationCanvasMap","fallback","transparency","savedFillStyle","transparentCanvas","executionStartIdx","continueCallback","stepper","argsArray","fnArray","argsArrayLen","chunkOperations","endTime","fnId","depObjId","objsPool","#restoreInitialState","cache","#drawFilter","hcmFilterId","savedFilter","img","inverseTransform","widthScale","heightScale","paintWidth","paintHeight","tmpCanvasId","fillColor","isPatternFill","currentTransform","cacheKey","scaled","maskCanvas","mainKey","cachedImage","maskToCanvas","minX","maxX","drawnWidth","drawnHeight","fillCanvas","fillCtx","dashArray","dashPhase","intent","flatness","states","inSMaskMode","cacheId","scratchCanvas","dirtyBox","smask","suspendedCtx","layerCtx","layerBox","layerOffsetX","layerOffsetY","layerWidth","layerHeight","maskCtx","subtype","backdrop","transferMap","maskOffsetX","maskOffsetY","maskX","maskY","clip","old","startX","startY","isScalingMatrix","minMaxForBezier","xw","yh","consumePath","strokeColor","needRestore","paths","spacing","leading","fontRefName","fontObj","typeface","bold","italic","browserFontSize","rise","patternTransform","textRenderingMode","fontSize","fillStrokeMode","isAddToPathSet","patternFill","addToPath","glyphs","fontSizeScale","charSpacing","wordSpacing","fontDirection","textHScale","glyphsLength","vertical","spacingDir","defaultVMetrics","widthAdvanceScale","simpleFillText","lineWidth","chars","glyph","restoreNeeded","accent","scaledX","scaledY","vmetric","vx","vy","measuredWidth","characterScaleX","scaledAccentX","scaledAccentY","charWidth","fontMatrix","isTextInvisible","spacingLength","xWidth","yWidth","llx","lly","urx","ury","objId","inv","group","currentCtx","bounds","canvasBounds","groupCtx","currentMtx","hasOwnCanvas","viewportScale","skewX","skewY","positions","trans","images","imgToPaint","clipBox","isEmpty","absDet","normX","normY","scaledLineWidth","scaledXLineWidth","scaledYLineWidth","baseArea","saveRestore","dashes","op","#port","#src","CallbackKind","StreamKind","wrapReason","MessageHandler","sourceName","targetName","comObj","#processStreamMessage","callbackId","capability","cbSourceName","cbTargetName","#createStreamSink","actionName","ah","transfers","queueingStrategy","streamId","controller","startCapability","pullCapability","cancelCapability","streamSink","lastDesiredSize","streamController","#deleteStreamController","Metadata","#metadataMap","#data","parsedData","INTERNAL","OptionalContentGroup","#isDisplay","#isPrint","#userSet","#visible","renderingIntent","usage","print","view","internal","userSet","OptionalContentConfig","#cachedGetHash","#groups","#initialHash","#order","on","off","#evaluateVisibilityExpression","operator","preserveRB","PDFDataTransportStream","pdfDataRangeTransport","disableRange","disableStream","initialData","progressiveDone","contentDispositionFilename","begin","loaded","rangeReader","reader","queuedChunks","PDFDataTransportStreamReader","PDFDataTransportStreamRangeReader","stream","requestCapability","getFilenameFromContentDispositionHeader","contentDisposition","needsEncodingFixup","toParamRegExp","rfc2616unquote","rfc5987decode","rfc2047decode","fixupEncoding","rfc2231getparam","attributePattern","flags","textdecode","encoding","decoder","contentDispositionStr","iter","quot","part","parts","quotindex","extvalue","encodingend","charset","hex","createHeaders","isHttp","httpHeaders","headers","validateRangeRequestCapabilities","responseHeaders","rangeChunkSize","returnValues","extractFilenameFromHeader","createResponseStatusError","validateResponseStatus","createFetchOptions","withCredentials","abortController","getArrayBuffer","PDFFetchStream","PDFFetchStreamReader","PDFFetchStreamRangeReader","allowRangeRequests","suggestedLength","OK_RESPONSE","PARTIAL_CONTENT_RESPONSE","network_getArrayBuffer","xhr","NetworkManager","xhrId","pendingRequest","xhrStatus","rangeHeader","PDFNetworkStream","PDFNetworkStreamFullRequestReader","PDFNetworkStreamRangeRequestReader","manager","fullRequestXhrId","fullRequestXhr","urlRegex","parseUrlOrPath","sourceUrl","createRequest","PDFNodeStream","PDFNodeStreamFsFullReader","PDFNodeStreamFullReader","PDFNodeStreamFsRangeReader","PDFNodeStreamRangeReader","BaseFullReader","readableStream","BaseRangeReader","handleResponse","stat","MAX_TEXT_DIVS_TO_RENDER","DEFAULT_FONT_SIZE","DEFAULT_FONT_ASCENT","#capability","#disableProcessItems","#fontInspectorEnabled","#lang","#layoutTextParams","#pageHeight","#pageWidth","#reader","#rootContainer","#rotation","#scale","#styleCache","#textContentItemsStr","#textContentSource","#textDivs","#textDivProperties","#transform","#ascentCache","#canvasContexts","#canvasCtxFonts","#minFontSize","#pendingTextLayers","textContentSource","#ensureMinFontSizeComputed","isWindows","isFirefox","pump","#processItems","onBefore","#getCtx","#layout","abortEx","items","textDivs","textContentItemsStr","#appendText","geom","textDiv","textDivProperties","fontFamily","fontHeight","fontAscent","#getAscent","left","top","scaleFactorStr","divStyle","shouldScaleText","absScaleX","absScaleY","br","#ensureCtxFont","lang","family","cached","cachedAscent","metrics","ascent","descent","ratio","pixels","XfaText","xfa","output","walk","DEFAULT_RANGE_CHUNK_SIZE","RENDERING_CANCELLED_TIMEOUT","DELAYED_CLEANUP_TIMEOUT","DefaultCanvasFactory","DefaultCMapReaderFactory","DefaultFilterFactory","DefaultStandardFontDataFactory","task","PDFDocumentLoadingTask","getUrlProp","getDataProp","password","rangeTransport","worker","docBaseUrl","cMapUrl","cMapPacked","CMapReaderFactory","standardFontDataUrl","StandardFontDataFactory","ignoreErrors","maxImageSize","isOffscreenCanvasSupported","canvasMaxAreaInBytes","fontExtraProperties","enableXfa","disableAutoFetch","pdfBug","CanvasFactory","FilterFactory","useSystemFonts","useWorkerFetch","transportFactory","workerParams","docParams","transportParams","workerIdPromise","networkStream","NetworkStream","workerId","messageHandler","transport","WorkerTransport","isRefProxy","PDFDocumentProxy","pdfInfo","keepLoadedFonts","PDFPageProxy","#delayedCleanupTimeout","#pendingCleanup","pageInfo","PDFObjects","canvasContext","annotationMode","optionalContentConfigPromise","printAnnotationStorage","intentArgs","#abortDelayedCleanup","intentState","intentPrint","complete","internalRenderTask","#tryCleanup","InternalRenderTask","renderTask","operatorListChanged","opListTask","includeMarkedContent","disableNormalization","textContent","waitOn","resetStats","success","delayed","renderTasks","operatorListChunk","annotationStorageSerializable","modifiedIds","delay","curCacheKey","curIntentState","LoopbackPort","#listeners","#deferred","#fakeWorkerId","#isWorkerDisabled","#workerPorts","otherUrl","wrapper","port","#resolve","#mainThreadWorkerMessageHandler","workerSrc","terminateEarly","sendTest","testObj","WorkerMessageHandler","workerHandler","cachedPort","#methodPromises","#pageCache","#pagePromises","#pageRefCache","#passwordCapability","loadingTask","factory","#cacheSimpleMethod","cachedPromise","isOpList","annotationStorage","modifiedIdsHash","cacheKeyBuf","page","terminated","sink","readyReason","headersCapability","fullReader","exception","updatePassword","exportedData","exportedError","pageProxy","imageData","results","refStr","INITIAL_DATA","#objs","#ensureObj","RenderTask","#internalRenderTask","separateAnnots","#rAF","#canvasInUse","useRequestAnimationFrame","makeColorComp","scaleAndClamp","ColorConverters","G","components","storage","storedData","option","linkService","attributes","isHTMLAnchorElement","rootHtml","isNotForRichText","rootDiv","childHtml","DEFAULT_TAB_INDEX","annotation_layer_DEFAULT_FONT_SIZE","GetElementsByNameSet","getRectDims","AnnotationElementFactory","LinkAnnotationElement","TextAnnotationElement","TextWidgetAnnotationElement","RadioButtonWidgetAnnotationElement","CheckboxWidgetAnnotationElement","PushButtonWidgetAnnotationElement","ChoiceWidgetAnnotationElement","SignatureWidgetAnnotationElement","WidgetAnnotationElement","PopupAnnotationElement","FreeTextAnnotationElement","LineAnnotationElement","SquareAnnotationElement","CircleAnnotationElement","PolylineAnnotationElement","CaretAnnotationElement","InkAnnotationElement","PolygonAnnotationElement","HighlightAnnotationElement","UnderlineAnnotationElement","SquigglyAnnotationElement","StrikeOutAnnotationElement","StampAnnotationElement","FileAttachmentAnnotationElement","AnnotationElement","#updates","#hasBorder","#popupElement","isRenderable","ignoreBorder","createQuadrilaterals","titleObj","contentsObj","richText","#setRectEdited","currentRect","horizontalRadius","verticalRadius","radius","borderColor","elementWidth","elementHeight","setColor","jsName","styleName","colorType","colorArray","hidden","actions","jsEvent","commonActions","detail","eventProxy","quadPoints","rectBlX","rectBlY","rectTrX","rectTrY","trX","trY","blX","blY","svgBuffer","borderWidth","svgFactory","defs","clipPath","rectWidth","rectHeight","popup","skipId","fieldObj","exportValues","exportValue","domElement","triggers","isBound","#bindAttachment","#bindSetOCGState","#setInternalLink","destination","attachment","resetForm","otherClickAction","resetFormFields","resetFormRefs","include","allFields","fieldIds","fieldName","field","allIds","elementData","baseName","eventName","valueGetter","getter","TEXT_ALIGNMENT","fontColor","computedFontSize","BORDER_SIZE","roundToOneDecimal","numberOfLines","lineHeight","isRequired","keyInStorage","maxLen","fieldFormattedValues","blurListener","formattedValue","charLimit","commitKey","_blurListener","selectionStart","selectionEnd","selStart","selEnd","combWidth","checked","checkbox","curChecked","radio","pdfButtonValue","linkElement","selectElement","addAnEmptyEntry","optionElement","removeEmptyEntry","noneOptionElement","getValue","isExport","multiple","selectedValues","getItems","displayValue","selectChild","indices","change","elements","PopupElement","elementIds","#boundKeyDown","#keyDown","#boundHide","#hide","#boundShow","#show","#boundToggle","#toggle","#color","#contentsObj","#dateObj","#elements","#parent","#parentRect","#pinned","#popup","#rect","#richText","#titleObj","#wasVisible","modificationDate","parentRect","open","baseColor","header","title","#html","contents","#fontSize","#fontColor","#makePopupContent","popupLines","popupContent","lineAttributes","line","dir","lines","#setPosition","useParentRect","normalizedRect","popupLeft","popupTop","lineSpan","#line","#square","square","#circle","circle","#polyline","vertices","borderStyle","popupRef","polyline","#polylines","inkLists","inkList","#trigger","trigger","#download","#accessibilityManager","#annotationCanvasMap","#editableAnnotations","#structTreeLayer","accessibilityManager","annotationEditorUIManager","structTreeLayer","#appendElement","contentElement","annotationId","ariaAttributes","annotations","popupToElements","elementParams","isPopupAnnotation","rendered","#setAnnotationCanvasMap","EOL_PATTERN","FreeTextEditor","#content","#editorDivId","#editModeAC","#updateFontSize","#updateColor","setFontsize","#setEditorDimensions","savedFontsize","col","savedColor","#extractText","prevChild","#getNodeContent","savedDisplay","savedVisibility","savedText","newText","setText","#setContent","baseX","baseY","posX","posY","paste","#deserializeContent","startContainer","startOffset","bufferBefore","bufferAfter","newRange","beforeLength","acc","#serializeContent","textPosition","padding","#hasElementChanged","Outliner","#box","#verticalEdges","#intervals","innerMargin","EPSILON","shiftedMinX","shiftedMinY","lastEdge","lastPoint","edge","outlineVerticalEdges","#breakEdge","#insert","#remove","#getOutlines","edges","allEdges","edge1","edge2","outlines","outline","lastPointX","lastPointY","HighlightOutline","#binarySearch","middle","y4","Outline","_bbox","_rotation","FreeHighlightOutline","#outlines","polygon","prevX","prevY","FreeOutliner","#bottom","#innerMargin","#isLTR","#top","#last","#lastX","#lastY","#min","#min_dist","#scaleFactor","#thickness","#points","#MIN_DIST","#MIN_DIFF","#MIN","scaleFactor","thickness","#getLastCoords","lastTop","lastBottom","diffX","diffY","diffD","K","nX","nY","thX","thY","bottom","lastTopX","lastTopY","lastBottomX","lastBottomY","N","#bbox","#outline","#computeMinMax","#rescale","#rescaleAndSwap","ltrCallback","outliner","#boundPointerDown","#button","#buttonSwatch","#defaultColor","#dropdown","#dropdownWasFromKeyboard","#isMainColorPicker","#eventBus","#type","#l10nColor","#openDropdown","swatch","dropdown","#getDropdownRoot","#colorSelect","#isDropdownVisible","HighlightEditor","#anchorNode","#anchorOffset","#boxes","#clipPathId","#focusOutlines","#focusNode","#focusOffset","#highlightDiv","#highlightOutlines","#isFreeHighlight","#lastPoint","#opacity","#outlineId","#text","#methodOfCreation","#createFreeOutlines","#addToDrawLayer","#createOutlines","outlinerForOutline","highlightOutlines","highlightId","clipPathId","extraThickness","#rotateBbox","#updateThickness","setColorAndOpacity","opa","savedOpacity","savedThickness","setThickness","th","#changeThickness","toolbar","#getRotation","#cleanDrawLayer","mustBeSelected","drawLayer","#keydown","highlightDiv","direction","#setCaret","#serializeBoxes","#serializeOutlines","pointerDown","#endHighlight","#highlightMove","InkEditor","#baseHeight","#baseWidth","#canvasContextMenuTimeoutId","#currentPath2D","#disableEditing","#drawingAC","#hasSomethingToDraw","#isCanvasInitialized","#observer","#pointerdownAC","#realWidth","#realHeight","#requestFrameCallback","#updateOpacity","#fitToContent","#redraw","setOpacity","#createCanvas","#createObserver","#setCanvasDims","#addPointerdownListener","#removePointerdownListener","#getInitialBBox","parentRotation","#setStroke","#startDrawing","#drawPoints","#draw","currentPath","path2D","#makeBezierCurve","#endPath","#stopDrawing","bezier","#generateBezierPoints","xy","lastPoints","bezierPoints","control1","control2","#updateTransform","#endDrawing","roundedWidth","roundedHeight","#setScaleFactor","#getPadding","scaleFactorW","scaleFactorH","#buildPath2D","#toPDFCoordinates","#fromPDFCoordinates","#serializePaths","p10","p11","p20","p21","p30","p31","p40","p41","#getBbox","xMin","xMax","yMin","yMax","prevTranslationX","prevTranslationY","unscaledPadding","StampEditor","#bitmap","#bitmapId","#bitmapPromise","#bitmapUrl","#bitmapFile","#bitmapFileName","#canvas","#resizeTimeoutId","#isSvg","#hasBeenAddedInUndoStack","hasAltTextStats","#getBitmapFetched","fromId","#getBitmapDone","updateAltTextData","#getBitmap","MAX_RATIO","#drawBitmap","maxDataDimension","maxPreviewDimension","createImageData","bitmapWidth","bitmapHeight","outputScale","scaledWidth","scaledHeight","#scaleBitmap","boxDim","boxDimWidth","boxDimHeight","patternCtx","dataWidth","dataHeight","offscreenCtx","#setDimensions","prevWidth","prevHeight","#serializeBitmap","toUrl","structParent","bitmapUrl","bitmapId","isSvg","accessibilityData","changes","area","prevData","isSameRect","isSamePageIndex","isSameAltText","#allowClick","#annotationLayer","#clickAC","#editorFocusTimeoutId","#editors","#hadPointerDown","#isCleaningUp","#isDisabling","#textLayer","#textSelectionAC","annotationLayer","editorTypes","#cleanup","classList","isCommitting","annotationElementIds","editables","editable","changedAnnotations","resetAnnotations","#textLayerPointerDown","#currentEditorType","#createNewEditor","#getCenterPoint","isCentered","oldRotation","#mapping","#toUpdate","#setBox","#createSVG","#createClipPath","pathId","clipPathUse","isPathUpdatable","use","maskId","use1","use2","__webpack_exports__GlobalWorkerOptions","__webpack_exports__getDocument","_sfc_main$d","renderFunction","isLoaded","canvasAttrs","class","pdfStyle","created","getViewport","mounted","drawPage","methods","myCanvas","renderContext","getContext","render","then","$emit","$refs","pageContainer","appendChild","catch","destroyRenderTask","destroyPage","_destroy","oldPage","beforeUnmount","_normalizeStyle","EnumHelper","toListItems","language","listItem","toListItem","getToListItemDisplay","getToListItemValue","BitFlagHelper","baseFlag","valueToAdd","valueToRemove","valueToCheck","comparisonFlag","missing","enumType","flagA","flagB","maxValue","flagValue","flagValues","flag","vNum","SaturnPermissions","SettingsChecklistItem","newType","isDocAction","isPlaidAction","FIMenuSection","checklistType","keyName","DealChecklistType","DealChecklistItem","verification","doc","userPermissions","isManuallyVerified","personType","plaidData","plaidInteraction","newDealChecklistItem","currStatus","newStatus","_hoisted_3","_hoisted_4","_createTextVNode","folder","_component_DisplayFolderStructure","_toDisplayString","files","fileSystem","pathObject","fileIsImage","fileHandle","folderHandle","nextPath","fileType","acceptedTypes","DisplayFolderStructure","_hoisted_8","_hoisted_9","_hoisted_11","_hoisted_12","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_10","fileInputButtons","fileData","documentForm","docInfo","LoaderComponent","InputFile","_component_LoaderComponent","_withDirectives","_component_InputFile","_vShow","PlaidStatementsConfig","ConvertPlaidErrorToCamelCase","snakeObj","convertedError","convertedCause","emit","EMBEDDED_LINK_CONTAINER_ID","newVal","isBusy","showFailureScreen","isExternalScriptLoaded","isLinkSuccessful","isIdvSuccessful","linkToken","linkTokenForUpdate","plaidItemIdForUpdate","linkHandler","anyBanksToShow","hasIdentityVerification","isPayrollIncome","connectedAccounts","needToLaunchLink","launchLinkText","hasTransfer","accountList","PLAID_PRODUCTS","showLaunchLinkButton","showRejectLinkButton","onBeforeMount","loadExternalPlaidScripts","initPlaidCustomerInfo","createCallbackOnScriptLoad","tryLaunchFromExternalToken","getStoredLinkToken","launchLink","preInitPlaidProducts","createEmbeddedLink","errorFromServer","onBeforeUnmount","scriptLink","scriptElem","callbackFunction","tokenItem","customerAssociation","getExistingCustomer","createUserToken","customerIdType","userTokenResponse","checkForResponseError","getTransferIntentId","transferResponse","prepopulateIdentityVerification","prepopulateResponse","PLAID_VERIFICATION_STATUS","retryResponse","createLinkToken","createTokenResponse","linkInfo","tokenInfo","linkOnSuccess","linkOnLoad","linkOnExit","linkOnEvent","embedContainer","public_token","linkSession","responseStatus","itemInfo","exchangePublicToken","publicToken","doItemsMatch","deleteItem","$modal","modalInfo","item1","item2","a1","doesPlaidItemNeedUpdate","plaidItem","responsePayload","plaidError","isWarning","_withModifiers","selectedAccounts","availableBankAccounts","accessTokens","productsToInclude","anyAcceptedProducts","validAccounts","selectedAccountSingleSelect","getBankById","getAccountById","accountId","bank","getSelectedBank","getSelectedAccount","getAccountNameByBank","selectedAccount","getNumSelectedByBank","currItem","isBankSelected","isAccountSelected","selectAccount","removeSelectedAccount","addSelectedAccount","selectBank","selectAllInBank","isAddAll","headerItem","bodyItem","account","_hoisted_13","errorMessage","plaidConfig","daysRequested","oneMonthAgo","startDate","endDate","linkSuccess","errCode","errMessage","apiSuccess","plaidItemIds","PlaidLink","PlaidAccountSelect","_component_PlaidAccountSelect","_component_PlaidLink","DocumentPreview","defineAsyncComponent","DocumentPreview$1","isDownloading","timestampFormatted","$grid","_sfc_main$4","settings","pageCount","captionText","foundType","pxIndex","newDoc","modalTitle","modalDocumentPreview","loadSuccess","pdfjs.GlobalWorkerOptions","dataSrc","auth","loadedPdf","markRaw","pdfjs.getDocument","pagePromises","num","pages","PDFPage","_resolveComponent","_component_PDFPage","uploadDate","timeDiff","anyErrors","updatedItem","_component_DocumentPreview","customerPage","_component_qrcode_vue","checklistMainRef","mainHeaderRef","dealId","storeName","customerName","dealRole","isLoading","onRefreshChecklist","haveEnoughDataToRelaunch","plaidReceivedRedirectUrl","onUpdateItem","headerResizeObserver","onHeaderResize","showError","onError","checklist","currentItemId","checklistOrganized","showToDoItems","itemToUpdate","sortChecklist","getSortValue","aVeri","bVeri","dealResponse","theme","ApplicationsSettingsLoader","themeColors","themeKeys","colorObj","kebab","ofs","resizeCount","onHeaderResizeDebounced","headerElem","mainElem","showListView","listViewTimeout","transitionAnimation","toggleListScreen","showScreen","showDocUpload","showPlaidLink","showVisitLink","showItemView","uploadComplete","itemId","submitSuccess"],"ignoreList":[0,1,2,3,4,5,14,15],"sources":["../../../node_modules/@vue/devtools-api/lib/esm/env.js","../../../node_modules/@vue/devtools-api/lib/esm/const.js","../../../node_modules/@vue/devtools-api/lib/esm/time.js","../../../node_modules/@vue/devtools-api/lib/esm/proxy.js","../../../node_modules/@vue/devtools-api/lib/esm/index.js","../../../node_modules/vue-router/dist/vue-router.mjs","../../../vue-core/components/LoaderComponent.vue","../../../vue-core/classes/Applications/ApplicationsSettingsLoader.js","../../../vue-core/classes/DocumentAssociation.js","../../../vue-core/components/Accordion.vue","../../../vue-core/components/AccordionList.vue","../../../vue-core/classes/Plaid/PlaidCustomerInfo.ts","../../../vue-core/classes/Plaid/PlaidUserInfo.ts","../../../vue-core/classes/Plaid/PlaidLinkConfig.ts","../../../node_modules/qrcode.vue/dist/qrcode.vue.esm.js","../../../node_modules/pdfjs-dist/legacy/build/pdf.mjs","../../../vue-core/components/PDFPage.vue","../../../vue-core/helpers/enum-helper.ts","../../../vue-core/classes/AccessEmployeeClass.ts","../../../vue-core/classes/Checklist/SettingsChecklistItem.ts","../../../vue-core/classes/Checklist/DealChecklistItem.ts","../../../vue-core/components/DisplayFolderStructure.vue","../../../vue-core/components/InputFile.vue","../../../customer-app/src/components/customerChecklist/CustomerChecklistDocUpload.vue","../../../customer-app/src/components/customerChecklist/CustomerChecklistItem.vue","../../../vue-core/classes/Plaid/PlaidStatements.ts","../../../vue-core/classes/Plaid/PlaidError.ts","../../../vue-core/components/PlaidLink.vue","../../../vue-core/components/PlaidAccountSelect.vue","../../../customer-app/src/components/customerChecklist/CustomerChecklistPlaidLink.vue","../../../vue-core/modals/modalDocumentPreview.vue","../../../vue-core/components/DocumentPreview.vue","../../../customer-app/src/components/customerChecklist/CustomerChecklistViewItem.vue","../../../customer-app/src/components/customerChecklist/CustomerChecklistVisitLink.vue","../../../customer-app/src/components/ErrorBanner.vue","../../../customer-app/src/views/CustomerChecklist.vue"],"sourcesContent":["export function getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nexport function getTarget() {\n // @ts-expect-error navigator and windows are not available in all environments\n return (typeof navigator !== 'undefined' && typeof window !== 'undefined')\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : {};\n}\nexport const isProxyAvailable = typeof Proxy === 'function';\n","export const HOOK_SETUP = 'devtools-plugin:setup';\nexport const HOOK_PLUGIN_SETTINGS_SET = 'plugin:settings:set';\n","let supported;\nlet perf;\nexport function isPerformanceSupported() {\n var _a;\n if (supported !== undefined) {\n return supported;\n }\n if (typeof window !== 'undefined' && window.performance) {\n supported = true;\n perf = window.performance;\n }\n else if (typeof globalThis !== 'undefined' && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = globalThis.perf_hooks.performance;\n }\n else {\n supported = false;\n }\n return supported;\n}\nexport function now() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\n","import { HOOK_PLUGIN_SETTINGS_SET } from './const.js';\nimport { now } from './time.js';\nexport class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n }\n catch (e) {\n // noop\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n }\n catch (e) {\n // noop\n }\n currentSettings = value;\n },\n now() {\n return now();\n },\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n }\n else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args,\n });\n };\n }\n },\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n }\n else if (prop === 'on') {\n return this.proxiedOn;\n }\n else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => { },\n });\n return this.fallbacks[prop](...args);\n };\n }\n else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve,\n });\n });\n };\n }\n },\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\n","import { getDevtoolsGlobalHook, getTarget, isProxyAvailable } from './env.js';\nimport { HOOK_SETUP } from './const.js';\nimport { ApiProxy } from './proxy.js';\nexport * from './api/index.js';\nexport * from './plugin.js';\nexport * from './time.js';\nexport function setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n }\n else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy,\n });\n if (proxy) {\n setupFn(proxy.proxiedTarget);\n }\n }\n}\n","/*!\n * vue-router v4.5.0\n * (c) 2024 Eduardo San Martin Morote\n * @license MIT\n */\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, shallowReactive, nextTick } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst isBrowser = typeof document !== 'undefined';\n\n/**\n * Allows differentiating lazy components from functional components and vue-class-component\n * @internal\n *\n * @param component\n */\nfunction isRouteComponent(component) {\n return (typeof component === 'object' ||\n 'displayName' in component ||\n 'props' in component ||\n '__vccOpts' in component);\n}\nfunction isESModule(obj) {\n return (obj.__esModule ||\n obj[Symbol.toStringTag] === 'Module' ||\n // support CF with dynamic imports that do not\n // add the Module string tag\n (obj.default && isRouteComponent(obj.default)));\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value)\n ? value.map(fn)\n : fn(value);\n }\n return newParams;\n}\nconst noop = () => { };\n/**\n * Typesafe alternative to Array.isArray\n * https://github.com/microsoft/TypeScript/pull/48228\n */\nconst isArray = Array.isArray;\n\nfunction warn(msg) {\n // avoid using ...args as it breaks in older Edge builds\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\n}\n\n/**\n * Encoding Rules (␣ = Space)\n * - Path: ␣ \" < > # ? { }\n * - Query: ␣ \" < > # & =\n * - Hash: ␣ \" < > `\n *\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n * defines some extra characters to be encoded. Most browsers do not encode them\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n * also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n * plus `-._~`. This extra safety should be applied to query by patching the\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\n * encoded everywhere because some browsers like FF encode it when directly\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n */\n// const EXTRA_RESERVED_RE = /[!'()*]/g\n// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\nconst HASH_RE = /#/g; // %23\nconst AMPERSAND_RE = /&/g; // %26\nconst SLASH_RE = /\\//g; // %2F\nconst EQUAL_RE = /=/g; // %3D\nconst IM_RE = /\\?/g; // %3F\nconst PLUS_RE = /\\+/g; // %2B\n/**\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\n * seems to be less flexible than not doing so and I can't find out the legacy\n * systems requiring this for regular requests like text/html. In the standard,\n * the encoding of the plus character is only mentioned for\n * application/x-www-form-urlencoded\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n * leave the plus character as is in queries. To be more flexible, we allow the\n * plus character on the query, but it can also be manually encoded by the user.\n *\n * Resources:\n * - https://url.spec.whatwg.org/#urlencoded-parsing\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n */\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\nconst ENC_CARET_RE = /%5E/g; // ^\nconst ENC_BACKTICK_RE = /%60/g; // `\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\nconst ENC_PIPE_RE = /%7C/g; // |\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\nconst ENC_SPACE_RE = /%20/g; // }\n/**\n * Encode characters that need to be encoded on the path, search and hash\n * sections of the URL.\n *\n * @internal\n * @param text - string to encode\n * @returns encoded string\n */\nfunction commonEncode(text) {\n return encodeURI('' + text)\n .replace(ENC_PIPE_RE, '|')\n .replace(ENC_BRACKET_OPEN_RE, '[')\n .replace(ENC_BRACKET_CLOSE_RE, ']');\n}\n/**\n * Encode characters that need to be encoded on the hash section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeHash(text) {\n return commonEncode(text)\n .replace(ENC_CURLY_OPEN_RE, '{')\n .replace(ENC_CURLY_CLOSE_RE, '}')\n .replace(ENC_CARET_RE, '^');\n}\n/**\n * Encode characters that need to be encoded query values on the query\n * section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeQueryValue(text) {\n return (commonEncode(text)\n // Encode the space as +, encode the + to differentiate it from the space\n .replace(PLUS_RE, '%2B')\n .replace(ENC_SPACE_RE, '+')\n .replace(HASH_RE, '%23')\n .replace(AMPERSAND_RE, '%26')\n .replace(ENC_BACKTICK_RE, '`')\n .replace(ENC_CURLY_OPEN_RE, '{')\n .replace(ENC_CURLY_CLOSE_RE, '}')\n .replace(ENC_CARET_RE, '^'));\n}\n/**\n * Like `encodeQueryValue` but also encodes the `=` character.\n *\n * @param text - string to encode\n */\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL as a\n * param. This function encodes everything {@link encodePath} does plus the\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n * string instead.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeParam(text) {\n return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\n}\n/**\n * Decode text using `decodeURIComponent`. Returns the original text if it\n * fails.\n *\n * @param text - string to decode\n * @returns decoded string\n */\nfunction decode(text) {\n try {\n return decodeURIComponent('' + text);\n }\n catch (err) {\n (process.env.NODE_ENV !== 'production') && warn(`Error decoding \"${text}\". Using original value`);\n }\n return '' + text;\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\n/**\n * Transforms a URI into a normalized history location\n *\n * @param parseQuery\n * @param location - URI to normalize\n * @param currentLocation - current absolute location. Allows resolving relative\n * paths. Must start with `/`. Defaults to `/`\n * @returns a normalized history location\n */\nfunction parseURL(parseQuery, location, currentLocation = '/') {\n let path, query = {}, searchString = '', hash = '';\n // Could use URL and URLSearchParams but IE 11 doesn't support it\n // TODO: move to new URL()\n const hashPos = location.indexOf('#');\n let searchPos = location.indexOf('?');\n // the hash appears before the search, so it's not part of the search string\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location.slice(0, searchPos);\n searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\n query = parseQuery(searchString);\n }\n if (hashPos > -1) {\n path = path || location.slice(0, hashPos);\n // keep the # character\n hash = location.slice(hashPos, location.length);\n }\n // no search and no query\n path = resolveRelativePath(path != null ? path : location, currentLocation);\n // empty path means a relative query or hash `?foo=f`, `#thing`\n return {\n fullPath: path + (searchString && '?') + searchString + hash,\n path,\n query,\n hash: decode(hash),\n };\n}\n/**\n * Stringifies a URL object\n *\n * @param stringifyQuery\n * @param location\n */\nfunction stringifyURL(stringifyQuery, location) {\n const query = location.query ? stringifyQuery(location.query) : '';\n return location.path + (query && '?') + query + (location.hash || '');\n}\n/**\n * Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n *\n * @param pathname - location.pathname\n * @param base - base to strip off\n */\nfunction stripBase(pathname, base) {\n // no base or base is not found at the beginning\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || '/';\n}\n/**\n * Checks if two RouteLocation are equal. This means that both locations are\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\n * parameters and `hash` are the same\n *\n * @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n * @param a - first {@link RouteLocation}\n * @param b - second {@link RouteLocation}\n */\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return (aLastIndex > -1 &&\n aLastIndex === bLastIndex &&\n isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\n isSameRouteLocationParams(a.params, b.params) &&\n stringifyQuery(a.query) === stringifyQuery(b.query) &&\n a.hash === b.hash);\n}\n/**\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\n * considered equal to the `RouteRecord` they are aliasing.\n *\n * @param a - first {@link RouteRecord}\n * @param b - second {@link RouteRecord}\n */\nfunction isSameRouteRecord(a, b) {\n // since the original record has an undefined value for aliasOf\n // but all aliases point to the original record, this will always compare\n // the original record\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a)\n ? isEquivalentArray(a, b)\n : isArray(b)\n ? isEquivalentArray(b, a)\n : a === b;\n}\n/**\n * Check if two arrays are the same or if an array with one single entry is the\n * same as another primitive value. Used to check query and parameters\n *\n * @param a - array of values\n * @param b - array of values or a single value\n */\nfunction isEquivalentArray(a, b) {\n return isArray(b)\n ? a.length === b.length && a.every((value, i) => value === b[i])\n : a.length === 1 && a[0] === b;\n}\n/**\n * Resolves a relative path that starts with `.`.\n *\n * @param to - path location we are resolving\n * @param from - currentLocation.path, should start with `/`\n */\nfunction resolveRelativePath(to, from) {\n if (to.startsWith('/'))\n return to;\n if ((process.env.NODE_ENV !== 'production') && !from.startsWith('/')) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split('/');\n const toSegments = to.split('/');\n const lastToSegment = toSegments[toSegments.length - 1];\n // make . and ./ the same (../ === .., ../../ === ../..)\n // this is the same behavior as new URL()\n if (lastToSegment === '..' || lastToSegment === '.') {\n toSegments.push('');\n }\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n // we stay on the same position\n if (segment === '.')\n continue;\n // go up in the from array\n if (segment === '..') {\n // we can't go below zero, but we still need to increment toPosition\n if (position > 1)\n position--;\n // continue\n }\n // we reached a non-relative path, we stop here\n else\n break;\n }\n return (fromSegments.slice(0, position).join('/') +\n '/' +\n toSegments.slice(toPosition).join('/'));\n}\n/**\n * Initial route location where the router is. Can be used in navigation guards\n * to differentiate the initial navigation.\n *\n * @example\n * ```js\n * import { START_LOCATION } from 'vue-router'\n *\n * router.beforeEach((to, from) => {\n * if (from === START_LOCATION) {\n * // initial navigation\n * }\n * })\n * ```\n */\nconst START_LOCATION_NORMALIZED = {\n path: '/',\n // TODO: could we use a symbol in the future?\n name: undefined,\n params: {},\n query: {},\n hash: '',\n fullPath: '/',\n matched: [],\n meta: {},\n redirectedFrom: undefined,\n};\n\nvar NavigationType;\n(function (NavigationType) {\n NavigationType[\"pop\"] = \"pop\";\n NavigationType[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function (NavigationDirection) {\n NavigationDirection[\"back\"] = \"back\";\n NavigationDirection[\"forward\"] = \"forward\";\n NavigationDirection[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\n/**\n * Starting location for Histories\n */\nconst START = '';\n// Generic utils\n/**\n * Normalizes a base by removing any trailing slash and reading the base tag if\n * present.\n *\n * @param base - base to normalize\n */\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n // respect tag\n const baseEl = document.querySelector('base');\n base = (baseEl && baseEl.getAttribute('href')) || '/';\n // strip full URL origin\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\n }\n else {\n base = '/';\n }\n }\n // ensure leading slash when it was removed by the regex above avoid leading\n // slash with hash because the file could be read from the disk like file://\n // and the leading slash would cause problems\n if (base[0] !== '/' && base[0] !== '#')\n base = '/' + base;\n // remove the trailing slash so all other method can just do `base + fullPath`\n // to build an href\n return removeTrailingSlash(base);\n}\n// remove any character before the hash\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n return base.replace(BEFORE_HASH_RE, '#') + location;\n}\n\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0),\n };\n}\nconst computeScrollPosition = () => ({\n left: window.scrollX,\n top: window.scrollY,\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if ('el' in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\n /**\n * `id`s can accept pretty much any characters, including CSS combinators\n * like `>` or `~`. It's still possible to retrieve elements using\n * `document.getElementById('~')` but it needs to be escaped when using\n * `document.querySelector('#\\\\~')` for it to be valid. The only\n * requirements for `id`s are them to be unique on the page and to not be\n * empty (`id=\"\"`). Because of that, when passing an id selector, it should\n * be properly escaped for it to work with `querySelector`. We could check\n * for the id selector to be simple (no CSS combinators `+ >~`) but that\n * would make things inconsistent since they are valid characters for an\n * `id` but would need to be escaped when using `querySelector`, breaking\n * their usage and ending up in no selector returned. Selectors need to be\n * escaped:\n *\n * - `#1-thing` becomes `#\\31 -thing`\n * - `#with~symbols` becomes `#with\\\\~symbols`\n *\n * - More information about the topic can be found at\n * https://mathiasbynens.be/notes/html5-id-class.\n * - Practical example: https://mathiasbynens.be/demo/html5-id\n */\n if ((process.env.NODE_ENV !== 'production') && typeof position.el === 'string') {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n // return to avoid other warnings\n return;\n }\n }\n catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n // return to avoid other warnings\n return;\n }\n }\n }\n const el = typeof positionEl === 'string'\n ? isIdSelector\n ? document.getElementById(positionEl.slice(1))\n : document.querySelector(positionEl)\n : positionEl;\n if (!el) {\n (process.env.NODE_ENV !== 'production') &&\n warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n }\n else {\n scrollToOptions = position;\n }\n if ('scrollBehavior' in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n // consume it so it's not used again\n scrollPositions.delete(key);\n return scroll;\n}\n// TODO: RFC about how to save scroll position\n/**\n * ScrollBehavior instance used by the router to compute and restore the scroll\n * position when navigating.\n */\n// export interface ScrollHandler {\n// // returns a scroll position that can be saved in history\n// compute(): ScrollPositionEntry\n// // can take an extended ScrollPositionEntry\n// scroll(position: ScrollPosition): void\n// }\n// export const scrollHandler: ScrollHandler = {\n// compute: computeScroll,\n// scroll: scrollToPosition,\n// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\n/**\n * Creates a normalized history location from a window.location object\n * @param base - The base path\n * @param location - The window.location object\n */\nfunction createCurrentLocation(base, location) {\n const { pathname, search, hash } = location;\n // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\n const hashPos = base.indexOf('#');\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos))\n ? base.slice(hashPos).length\n : 1;\n let pathFromHash = hash.slice(slicePos);\n // prepend the starting slash to hash so the url starts with /#\n if (pathFromHash[0] !== '/')\n pathFromHash = '/' + pathFromHash;\n return stripBase(pathFromHash, '');\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n // TODO: should it be a stack? a Dict. Check if the popstate listener\n // can trigger twice\n let pauseState = null;\n const popStateHandler = ({ state, }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n // ignore the popstate and reset the pauseState\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n }\n else {\n replace(to);\n }\n // Here we could also revert the navigation by calling history.go(-delta)\n // this listener will have to be adapted to not trigger again and to wait for the url\n // to be updated before triggering the listeners. Some kind of validation function would also\n // need to be passed to the listeners so the navigation can be accepted\n // call all listeners\n listeners.forEach(listener => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta\n ? delta > 0\n ? NavigationDirection.forward\n : NavigationDirection.back\n : NavigationDirection.unknown,\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n // set up the listener and prepare teardown callbacks\n listeners.push(callback);\n const teardown = () => {\n const index = listeners.indexOf(callback);\n if (index > -1)\n listeners.splice(index, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history } = window;\n if (!history.state)\n return;\n history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener('popstate', popStateHandler);\n window.removeEventListener('beforeunload', beforeUnloadListener);\n }\n // set up the listeners and prepare teardown callbacks\n window.addEventListener('popstate', popStateHandler);\n // TODO: could we use 'pagehide' or 'visibilitychange' instead?\n // https://developer.chrome.com/blog/page-lifecycle-api/\n window.addEventListener('beforeunload', beforeUnloadListener, {\n passive: true,\n });\n return {\n pauseListeners,\n listen,\n destroy,\n };\n}\n/**\n * Creates a state object\n */\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null,\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history, location } = window;\n // private variables\n const currentLocation = {\n value: createCurrentLocation(base, location),\n };\n const historyState = { value: history.state };\n // build current history entry as this is a fresh navigation\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null,\n }, true);\n }\n function changeLocation(to, state, replace) {\n /**\n * if a base tag is provided, and we are on a normal domain, we have to\n * respect the provided `base` attribute because pushState() will use it and\n * potentially erase anything before the `#` like at\n * https://github.com/vuejs/router/issues/685 where a base of\n * `/folder/#` but a base of `/` would erase the `/folder/` section. If\n * there is no host, the `` tag makes no sense and if there isn't a\n * base tag we can just use everything after the `#`.\n */\n const hashIndex = base.indexOf('#');\n const url = hashIndex > -1\n ? (location.host && document.querySelector('base')\n ? base\n : base.slice(hashIndex)) + to\n : createBaseLocation() + base + to;\n try {\n // BROWSER QUIRK\n // NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\n history[replace ? 'replaceState' : 'pushState'](state, '', url);\n historyState.value = state;\n }\n catch (err) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('Error with push/replace State', err);\n }\n else {\n console.error(err);\n }\n // Force the navigation, this also resets the call count\n location[replace ? 'replace' : 'assign'](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history.state, buildState(historyState.value.back, \n // keep back and forward entries but override current position\n to, historyState.value.forward, true), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n // Add to current entry the information of where we are going\n // as well as saving the current position\n const currentState = assign({}, \n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value, history.state, {\n forward: to,\n scroll: computeScrollPosition(),\n });\n if ((process.env.NODE_ENV !== 'production') && !history.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\n `history.replaceState(history.state, '', url)\\n\\n` +\n `You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace,\n };\n}\n/**\n * Creates an HTML5 history. Most common history for single page applications.\n *\n * @param base -\n */\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: '',\n base,\n go,\n createHref: createHref.bind(null, base),\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, 'location', {\n enumerable: true,\n get: () => historyNavigation.location.value,\n });\n Object.defineProperty(routerHistory, 'state', {\n enumerable: true,\n get: () => historyNavigation.state.value,\n });\n return routerHistory;\n}\n\n/**\n * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n *\n * @param base - Base applied to all urls, defaults to '/'\n * @returns a history object that can be passed to the router constructor\n */\nfunction createMemoryHistory(base = '') {\n let listeners = [];\n let queue = [START];\n let position = 0;\n base = normalizeBase(base);\n function setLocation(location) {\n position++;\n if (position !== queue.length) {\n // we are in the middle, we remove everything from here in the queue\n queue.splice(position);\n }\n queue.push(location);\n }\n function triggerListeners(to, from, { direction, delta }) {\n const info = {\n direction,\n delta,\n type: NavigationType.pop,\n };\n for (const callback of listeners) {\n callback(to, from, info);\n }\n }\n const routerHistory = {\n // rewritten by Object.defineProperty\n location: START,\n // TODO: should be kept in queue\n state: {},\n base,\n createHref: createHref.bind(null, base),\n replace(to) {\n // remove current entry and decrement position\n queue.splice(position--, 1);\n setLocation(to);\n },\n push(to, data) {\n setLocation(to);\n },\n listen(callback) {\n listeners.push(callback);\n return () => {\n const index = listeners.indexOf(callback);\n if (index > -1)\n listeners.splice(index, 1);\n };\n },\n destroy() {\n listeners = [];\n queue = [START];\n position = 0;\n },\n go(delta, shouldTrigger = true) {\n const from = this.location;\n const direction = \n // we are considering delta === 0 going forward, but in abstract mode\n // using 0 for the delta doesn't make sense like it does in html5 where\n // it reloads the page\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\n if (shouldTrigger) {\n triggerListeners(this.location, from, {\n direction,\n delta,\n });\n }\n },\n };\n Object.defineProperty(routerHistory, 'location', {\n enumerable: true,\n get: () => queue[position],\n });\n return routerHistory;\n}\n\n/**\n * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n * handle any URL is not possible.\n *\n * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `` tag\n * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n * calls**, meaning that if you use a `` tag, it's `href` value **has to match this parameter** (ignoring anything\n * after the `#`).\n *\n * @example\n * ```js\n * // at https://example.com/folder\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n * // you should avoid doing this because it changes the original url and breaks copying urls\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n *\n * // at file:///usr/etc/folder/index.html\n * // for locations with no `host`, the base is ignored\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n * ```\n */\nfunction createWebHashHistory(base) {\n // Make sure this implementation is fine in terms of encoding, specially for IE11\n // for `file://`, directly use the pathname and ignore the base\n // location.pathname contains an initial `/` even at the root: `https://example.com`\n base = location.host ? base || location.pathname + location.search : '';\n // allow the user to provide a `#` in the middle: `/base/#/app`\n if (!base.includes('#'))\n base += '#';\n if ((process.env.NODE_ENV !== 'production') && !base.endsWith('#/') && !base.endsWith('#')) {\n warn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\n }\n return createWebHistory(base);\n}\n\nfunction isRouteLocation(route) {\n return typeof route === 'string' || (route && typeof route === 'object');\n}\nfunction isRouteName(name) {\n return typeof name === 'string' || typeof name === 'symbol';\n}\n\nconst NavigationFailureSymbol = Symbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : '');\n/**\n * Enumeration with all possible types for navigation failures. Can be passed to\n * {@link isNavigationFailure} to check for specific failures.\n */\nvar NavigationFailureType;\n(function (NavigationFailureType) {\n /**\n * An aborted navigation is a navigation that failed because a navigation\n * guard returned `false` or called `next(false)`\n */\n NavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n /**\n * A cancelled navigation is a navigation that failed because a more recent\n * navigation finished started (not necessarily finished).\n */\n NavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n /**\n * A duplicated navigation is a navigation that failed because it was\n * initiated while already being at the exact same location.\n */\n NavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\n// DEV only debug messages\nconst ErrorTypeMessages = {\n [1 /* ErrorTypes.MATCHER_NOT_FOUND */]({ location, currentLocation }) {\n return `No match for\\n ${JSON.stringify(location)}${currentLocation\n ? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\n : ''}`;\n },\n [2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [16 /* ErrorTypes.NAVIGATION_DUPLICATED */]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n },\n};\n/**\n * Creates a typed NavigationFailure object.\n * @internal\n * @param type - NavigationFailureType\n * @param params - { from, to }\n */\nfunction createRouterError(type, params) {\n // keep full error messages in cjs versions\n if ((process.env.NODE_ENV !== 'production') || !true) {\n return assign(new Error(ErrorTypeMessages[type](params)), {\n type,\n [NavigationFailureSymbol]: true,\n }, params);\n }\n else {\n return assign(new Error(), {\n type,\n [NavigationFailureSymbol]: true,\n }, params);\n }\n}\nfunction isNavigationFailure(error, type) {\n return (error instanceof Error &&\n NavigationFailureSymbol in error &&\n (type == null || !!(error.type & type)));\n}\nconst propertiesToLog = ['params', 'query', 'hash'];\nfunction stringifyRoute(to) {\n if (typeof to === 'string')\n return to;\n if (to.path != null)\n return to.path;\n const location = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location[key] = to[key];\n }\n return JSON.stringify(location, null, 2);\n}\n\n// default pattern for a param: non-greedy everything but /\nconst BASE_PARAM_PATTERN = '[^/]+?';\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true,\n};\n// Special Regex characters that must be escaped in static tokens\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\n *\n * @param segments - array of segments returned by tokenizePath\n * @param extraOptions - optional options for the regexp\n * @returns a PathParser\n */\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n // the amount of scores is the same as the length of segments except for the root segment \"/\"\n const score = [];\n // the regexp as a string\n let pattern = options.start ? '^' : '';\n // extracted keys\n const keys = [];\n for (const segment of segments) {\n // the root segment needs special treatment\n const segmentScores = segment.length ? [] : [90 /* PathScore.Root */];\n // allow trailing slash\n if (options.strict && !segment.length)\n pattern += '/';\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n // resets the score if we are inside a sub-segment /:a-other-:b\n let subSegmentScore = 40 /* PathScore.Segment */ +\n (options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);\n if (token.type === 0 /* TokenType.Static */) {\n // prepend the slash if we are starting a new segment\n if (!tokenIndex)\n pattern += '/';\n pattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\n subSegmentScore += 40 /* PathScore.Static */;\n }\n else if (token.type === 1 /* TokenType.Param */) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional,\n });\n const re = regexp ? regexp : BASE_PARAM_PATTERN;\n // the user provided a custom regexp /:id(\\\\d+)\n if (re !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10 /* PathScore.BonusCustomRegExp */;\n // make sure the regexp is valid before using it\n try {\n new RegExp(`(${re})`);\n }\n catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\n err.message);\n }\n }\n // when we repeat we must take care of the repeating leading slash\n let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n // prepend the slash if we are starting a new segment\n if (!tokenIndex)\n subPattern =\n // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2\n ? `(?:/${subPattern})`\n : '/' + subPattern;\n if (optional)\n subPattern += '?';\n pattern += subPattern;\n subSegmentScore += 20 /* PathScore.Dynamic */;\n if (optional)\n subSegmentScore += -8 /* PathScore.BonusOptional */;\n if (repeatable)\n subSegmentScore += -20 /* PathScore.BonusRepeatable */;\n if (re === '.*')\n subSegmentScore += -50 /* PathScore.BonusWildcard */;\n }\n segmentScores.push(subSegmentScore);\n }\n // an empty array like /home/ -> [[{home}], []]\n // if (!segment.length) pattern += '/'\n score.push(segmentScores);\n }\n // only apply the strict bonus to the last score\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001 /* PathScore.BonusStrict */;\n }\n // TODO: dev only warn double trailing slash\n if (!options.strict)\n pattern += '/?';\n if (options.end)\n pattern += '$';\n // allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\n else if (options.strict && !pattern.endsWith('/'))\n pattern += '(?:/|$)';\n const re = new RegExp(pattern, options.sensitive ? '' : 'i');\n function parse(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || '';\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split('/') : value;\n }\n return params;\n }\n function stringify(params) {\n let path = '';\n // for optional parameters to allow to be empty\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith('/'))\n path += '/';\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0 /* TokenType.Static */) {\n path += token.value;\n }\n else if (token.type === 1 /* TokenType.Param */) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : '';\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param)\n ? param.join('/')\n : param;\n if (!text) {\n if (optional) {\n // if we have more than one optional param like /:a?-static we don't need to care about the optional param\n if (segment.length < 2) {\n // remove the last slash as we could be at the end\n if (path.endsWith('/'))\n path = path.slice(0, -1);\n // do not append a slash on the next iteration\n else\n avoidDuplicatedSlash = true;\n }\n }\n else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n // avoid empty path when we have multiple optional params\n return path || '/';\n }\n return {\n re,\n score,\n keys,\n parse,\n stringify,\n };\n}\n/**\n * Compares an array of numbers as used in PathParser.score and returns a\n * number. This function can be used to `sort` an array\n *\n * @param a - first array of numbers\n * @param b - second array of numbers\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n * should be sorted first\n */\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n // only keep going if diff === 0\n if (diff)\n return diff;\n i++;\n }\n // if the last subsegment was Static, the shorter segments should be sorted first\n // otherwise sort the longest segment first\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n ? -1\n : 1;\n }\n else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n ? 1\n : -1;\n }\n return 0;\n}\n/**\n * Compare function that can be used with `sort` to sort an array of PathParser\n *\n * @param a - first PathParser\n * @param b - second PathParser\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n */\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n // do not return if both are equal\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n // if a and b share the same score entries but b has more, sort b first\n return bScore.length - aScore.length;\n // this is the ternary version\n // return aScore.length < bScore.length\n // ? 1\n // : aScore.length > bScore.length\n // ? -1\n // : 0\n}\n/**\n * This allows detecting splats at the end of a path: /home/:id(.*)*\n *\n * @param score - score to check\n * @returns true if the last entry is negative\n */\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\n\nconst ROOT_TOKEN = {\n type: 0 /* TokenType.Static */,\n value: '',\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\n// After some profiling, the cache seems to be unnecessary because tokenizePath\n// (the slowest part of adding a route) is very fast\n// const tokenCache = new Map()\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === '/')\n return [[ROOT_TOKEN]];\n if (!path.startsWith('/')) {\n throw new Error((process.env.NODE_ENV !== 'production')\n ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\n : `Invalid path \"${path}\"`);\n }\n // if (tokenCache.has(path)) return tokenCache.get(path)!\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0 /* TokenizerState.Static */;\n let previousState = state;\n const tokens = [];\n // the segment will always be valid because we get into the initial state\n // with the leading /\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n // index on the path\n let i = 0;\n // char at index\n let char;\n // buffer of the value read\n let buffer = '';\n // custom regexp for a param\n let customRe = '';\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0 /* TokenizerState.Static */) {\n segment.push({\n type: 0 /* TokenType.Static */,\n value: buffer,\n });\n }\n else if (state === 1 /* TokenizerState.Param */ ||\n state === 2 /* TokenizerState.ParamRegExp */ ||\n state === 3 /* TokenizerState.ParamRegExpEnd */) {\n if (segment.length > 1 && (char === '*' || char === '+'))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1 /* TokenType.Param */,\n value: buffer,\n regexp: customRe,\n repeatable: char === '*' || char === '+',\n optional: char === '*' || char === '?',\n });\n }\n else {\n crash('Invalid state to consume buffer');\n }\n buffer = '';\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === '\\\\' && state !== 2 /* TokenizerState.ParamRegExp */) {\n previousState = state;\n state = 4 /* TokenizerState.EscapeNext */;\n continue;\n }\n switch (state) {\n case 0 /* TokenizerState.Static */:\n if (char === '/') {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n }\n else if (char === ':') {\n consumeBuffer();\n state = 1 /* TokenizerState.Param */;\n }\n else {\n addCharToBuffer();\n }\n break;\n case 4 /* TokenizerState.EscapeNext */:\n addCharToBuffer();\n state = previousState;\n break;\n case 1 /* TokenizerState.Param */:\n if (char === '(') {\n state = 2 /* TokenizerState.ParamRegExp */;\n }\n else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n }\n else {\n consumeBuffer();\n state = 0 /* TokenizerState.Static */;\n // go back one character if we were not modifying\n if (char !== '*' && char !== '?' && char !== '+')\n i--;\n }\n break;\n case 2 /* TokenizerState.ParamRegExp */:\n // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\n // it already works by escaping the closing )\n // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\n // is this really something people need since you can also write\n // /prefix_:p()_suffix\n if (char === ')') {\n // handle the escaped )\n if (customRe[customRe.length - 1] == '\\\\')\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3 /* TokenizerState.ParamRegExpEnd */;\n }\n else {\n customRe += char;\n }\n break;\n case 3 /* TokenizerState.ParamRegExpEnd */:\n // same as finalizing a param\n consumeBuffer();\n state = 0 /* TokenizerState.Static */;\n // go back one character if we were not modifying\n if (char !== '*' && char !== '?' && char !== '+')\n i--;\n customRe = '';\n break;\n default:\n crash('Unknown state');\n break;\n }\n }\n if (state === 2 /* TokenizerState.ParamRegExp */)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n // tokenCache.set(path, tokens)\n return tokens;\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n // warn against params with the same name\n if ((process.env.NODE_ENV !== 'production')) {\n const existingKeys = new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: [],\n });\n if (parent) {\n // both are aliases or both are not aliases\n // we don't want to mix them because the order is used when\n // passing originalRecord in Matcher.addRoute\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\n\n/**\n * Creates a Router Matcher.\n *\n * @internal\n * @param routes - array of initial routes\n * @param globalOptions - global route options\n */\nfunction createRouterMatcher(routes, globalOptions) {\n // normalized ordered array of matchers\n const matchers = [];\n const matcherMap = new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n // used later on to remove by name\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if ((process.env.NODE_ENV !== 'production')) {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n // we might be the child of an alias\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n // generate an array of records to correctly handle aliases\n const normalizedRecords = [mainNormalizedRecord];\n if ('alias' in record) {\n const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(\n // we need to normalize again to ensure the `mods` property\n // being non enumerable\n normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord\n ? originalRecord.record.components\n : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord\n ? originalRecord.record\n : mainNormalizedRecord,\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n })));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n // Build up the path for nested routes if the child isn't an absolute\n // route. Only add the / delimiter if the child path isn't empty and if the\n // parent path doesn't have a trailing slash\n if (parent && path[0] !== '/') {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\n normalizedRecord.path =\n parent.record.path + (path && connectingSlash + path);\n }\n if ((process.env.NODE_ENV !== 'production') && normalizedRecord.path === '*') {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\n 'See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.');\n }\n // create the object beforehand, so it can be passed to children\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')\n checkMissingParamsInAbsolutePath(matcher, parent);\n // if we are an alias we must tell the original record that we exist,\n // so we can be removed\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if ((process.env.NODE_ENV !== 'production')) {\n checkSameParams(originalRecord, matcher);\n }\n }\n else {\n // otherwise, the first record is the original and others are aliases\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n // remove the route if named and only for the top record (avoid in nested calls)\n // this works because the original record is the first one\n if (isRootAdd && record.name && !isAliasRecord(matcher)) {\n if ((process.env.NODE_ENV !== 'production')) {\n checkSameNameAsAncestor(record, parent);\n }\n removeRoute(record.name);\n }\n }\n // Avoid adding a record that doesn't display anything. This allows passing through records without a component to\n // not be reached and pass through the catch all route\n if (isMatchable(matcher)) {\n insertMatcher(matcher);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n // if there was no original record, then the first one was not an alias and all\n // other aliases (if any) need to reference this record when adding children\n originalRecord = originalRecord || matcher;\n // TODO: add normalized records for more flexibility\n // if (parent && isAliasRecord(originalRecord)) {\n // parent.children.push(originalRecord)\n // }\n }\n return originalMatcher\n ? () => {\n // since other matchers are aliases, they should be removed by the original matcher\n removeRoute(originalMatcher);\n }\n : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n }\n else {\n const index = matchers.indexOf(matcherRef);\n if (index > -1) {\n matchers.splice(index, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n const index = findInsertionIndex(matcher, matchers);\n matchers.splice(index, 0, matcher);\n // only add the original record to the name map\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if ('name' in location && location.name) {\n matcher = matcherMap.get(location.name);\n if (!matcher)\n throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n location,\n });\n // warn if the user is passing invalid params so they can debug it better when they get removed\n if ((process.env.NODE_ENV !== 'production')) {\n const invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(currentLocation.params, \n // only keep params that exist in the resolved location\n // only keep optional params coming from a parent record\n matcher.keys\n .filter(k => !k.optional)\n .concat(matcher.parent ? matcher.parent.keys.filter(k => k.optional) : [])\n .map(k => k.name)), \n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location.params &&\n paramsFromLocation(location.params, matcher.keys.map(k => k.name)));\n // throws if cannot be stringified\n path = matcher.stringify(params);\n }\n else if (location.path != null) {\n // no need to resolve the path with the matcher as it was provided\n // this also allows the user to control the encoding\n path = location.path;\n if ((process.env.NODE_ENV !== 'production') && !path.startsWith('/')) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n }\n matcher = matchers.find(m => m.re.test(path));\n // matcher should have a value after the loop\n if (matcher) {\n // we know the matcher works because we tested the regexp\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n // location is a relative path\n }\n else {\n // match by name or path of current route\n matcher = currentLocation.name\n ? matcherMap.get(currentLocation.name)\n : matchers.find(m => m.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n location,\n currentLocation,\n });\n name = matcher.record.name;\n // since we are navigating to the same location, we don't need to pick the\n // params like when `name` is provided\n params = assign({}, currentLocation.params, location.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n // reversed order so parents are at the beginning\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched),\n };\n }\n // add initial routes\n routes.forEach(route => addRoute(route));\n function clearRoutes() {\n matchers.length = 0;\n matcherMap.clear();\n }\n return {\n addRoute,\n resolve,\n removeRoute,\n clearRoutes,\n getRoutes,\n getRecordMatcher,\n };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\n/**\n * Normalizes a RouteRecordRaw. Creates a copy\n *\n * @param record\n * @returns the normalized version\n */\nfunction normalizeRouteRecord(record) {\n const normalized = {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: record.aliasOf,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: new Set(),\n updateGuards: new Set(),\n enterCallbacks: {},\n // must be declared afterwards\n // mods: {},\n components: 'components' in record\n ? record.components || null\n : record.component && { default: record.component },\n };\n // mods contain modules and shouldn't be copied,\n // logged or anything. It's just used for internal\n // advanced use cases like data loaders\n Object.defineProperty(normalized, 'mods', {\n value: {},\n });\n return normalized;\n}\n/**\n * Normalize the optional `props` in a record to always be an object similar to\n * components. Also accept a boolean for components.\n * @param record\n */\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n // props does not exist on redirect records, but we can set false directly\n const props = record.props || false;\n if ('component' in record) {\n propsObject.default = props;\n }\n else {\n // NOTE: we could also allow a function to be applied to every component.\n // Would need user feedback for use cases\n for (const name in record.components)\n propsObject[name] = typeof props === 'object' ? props[name] : props;\n }\n return propsObject;\n}\n/**\n * Checks if a record or any of its parent is an alias\n * @param record\n */\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\n/**\n * Merge meta fields of an array of records\n *\n * @param matched - array of matched records\n */\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return (a.name === b.name &&\n a.optional === b.optional &&\n a.repeatable === b.repeatable);\n}\n/**\n * Check if a path and its alias have the same required params\n *\n * @param a - original record\n * @param b - alias record\n */\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\n/**\n * A route with a name and a child with an empty path without a name should warn when adding the route\n *\n * @param mainNormalizedRecord - RouteRecordNormalized\n * @param parent - RouteRecordMatcher\n */\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent &&\n parent.record.name &&\n !mainNormalizedRecord.name &&\n !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkSameNameAsAncestor(record, parent) {\n for (let ancestor = parent; ancestor; ancestor = ancestor.parent) {\n if (ancestor.record.name === record.name) {\n throw new Error(`A route named \"${String(record.name)}\" has been added as a ${parent === ancestor ? 'child' : 'descendant'} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);\n }\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\n/**\n * Performs a binary search to find the correct insertion index for a new matcher.\n *\n * Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n * with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n *\n * @param matcher - new matcher to be inserted\n * @param matchers - existing matchers\n */\nfunction findInsertionIndex(matcher, matchers) {\n // First phase: binary search based on score\n let lower = 0;\n let upper = matchers.length;\n while (lower !== upper) {\n const mid = (lower + upper) >> 1;\n const sortOrder = comparePathParserScore(matcher, matchers[mid]);\n if (sortOrder < 0) {\n upper = mid;\n }\n else {\n lower = mid + 1;\n }\n }\n // Second phase: check for an ancestor with the same score\n const insertionAncestor = getInsertionAncestor(matcher);\n if (insertionAncestor) {\n upper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n if ((process.env.NODE_ENV !== 'production') && upper < 0) {\n // This should never happen\n warn(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n }\n }\n return upper;\n}\nfunction getInsertionAncestor(matcher) {\n let ancestor = matcher;\n while ((ancestor = ancestor.parent)) {\n if (isMatchable(ancestor) &&\n comparePathParserScore(matcher, ancestor) === 0) {\n return ancestor;\n }\n }\n return;\n}\n/**\n * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n * a component, or name, or redirect, are just used to group other routes.\n * @param matcher\n * @param matcher.record record of the matcher\n * @returns\n */\nfunction isMatchable({ record }) {\n return !!(record.name ||\n (record.components && Object.keys(record.components).length) ||\n record.redirect);\n}\n\n/**\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n * version with the leading `?` and without Should work as URLSearchParams\n\n * @internal\n *\n * @param search - search string to parse\n * @returns a query object\n */\nfunction parseQuery(search) {\n const query = {};\n // avoid creating an object with an empty key and empty value\n // because of split('&')\n if (search === '' || search === '?')\n return query;\n const hasLeadingIM = search[0] === '?';\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\n for (let i = 0; i < searchParams.length; ++i) {\n // pre decode the + into space\n const searchParam = searchParams[i].replace(PLUS_RE, ' ');\n // allow the = character\n const eqPos = searchParam.indexOf('=');\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n // an extra variable for ts types\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n }\n else {\n query[key] = value;\n }\n }\n return query;\n}\n/**\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n * doesn't prepend a `?`\n *\n * @internal\n *\n * @param query - query object to stringify\n * @returns string version of the query without the leading `?`\n */\nfunction stringifyQuery(query) {\n let search = '';\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n // only null adds the value\n if (value !== undefined) {\n search += (search.length ? '&' : '') + key;\n }\n continue;\n }\n // keep null values\n const values = isArray(value)\n ? value.map(v => v && encodeQueryValue(v))\n : [value && encodeQueryValue(value)];\n values.forEach(value => {\n // skip undefined values in arrays as if they were not present\n // smaller code than using filter\n if (value !== undefined) {\n // only append & with non-empty search\n search += (search.length ? '&' : '') + key;\n if (value != null)\n search += '=' + value;\n }\n });\n }\n return search;\n}\n/**\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n * numbers into strings, removing keys with an undefined value and replacing\n * undefined with null in arrays\n *\n * @param query - query object to normalize\n * @returns a normalized query object\n */\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== undefined) {\n normalizedQuery[key] = isArray(value)\n ? value.map(v => (v == null ? null : '' + v))\n : value == null\n ? value\n : '' + value;\n }\n }\n return normalizedQuery;\n}\n\n/**\n * RouteRecord being rendered by the closest ancestor Router View. Used for\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n * Location Matched\n *\n * @internal\n */\nconst matchedRouteKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : '');\n/**\n * Allows overriding the router view depth to control which component in\n * `matched` is rendered. rvd stands for Router View Depth\n *\n * @internal\n */\nconst viewDepthKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : '');\n/**\n * Allows overriding the router instance returned by `useRouter` in tests. r\n * stands for router\n *\n * @internal\n */\nconst routerKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router' : '');\n/**\n * Allows overriding the current route returned by `useRoute` in tests. rl\n * stands for route location\n *\n * @internal\n */\nconst routeLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'route location' : '');\n/**\n * Allows overriding the current route used by router-view. Internally this is\n * used when the `route` prop is passed.\n *\n * @internal\n */\nconst routerViewLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location' : '');\n\n/**\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n */\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers.slice(),\n reset,\n };\n}\n\nfunction registerGuard(record, name, guard) {\n const removeFromList = () => {\n record[name].delete(guard);\n };\n onUnmounted(removeFromList);\n onDeactivated(removeFromList);\n onActivated(() => {\n record[name].add(guard);\n });\n record[name].add(guard);\n}\n/**\n * Add a navigation guard that triggers whenever the component for the current\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\n * used in any component. The guard is removed when the component is unmounted.\n *\n * @param leaveGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteLeave(leaveGuard) {\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\n return;\n }\n const activeRecord = inject(matchedRouteKey, \n // to avoid warning\n {}).value;\n if (!activeRecord) {\n (process.env.NODE_ENV !== 'production') &&\n warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of . Maybe you called it inside of App.vue?');\n return;\n }\n registerGuard(activeRecord, 'leaveGuards', leaveGuard);\n}\n/**\n * Add a navigation guard that triggers whenever the current location is about\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n * component. The guard is removed when the component is unmounted.\n *\n * @param updateGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteUpdate(updateGuard) {\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\n return;\n }\n const activeRecord = inject(matchedRouteKey, \n // to avoid warning\n {}).value;\n if (!activeRecord) {\n (process.env.NODE_ENV !== 'production') &&\n warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of . Maybe you called it inside of App.vue?');\n return;\n }\n registerGuard(activeRecord, 'updateGuards', updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = fn => fn()) {\n // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\n const enterCallbackArray = record &&\n // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4 /* ErrorTypes.NAVIGATION_ABORTED */, {\n from,\n to,\n }));\n }\n else if (valid instanceof Error) {\n reject(valid);\n }\n else if (isRouteLocation(valid)) {\n reject(createRouterError(2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */, {\n from: to,\n to: valid,\n }));\n }\n else {\n if (enterCallbackArray &&\n // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray &&\n typeof valid === 'function') {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n // wrapping with Promise.resolve allows it to work with both async and sync guards\n const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, (process.env.NODE_ENV !== 'production') ? canOnlyBeCalledOnce(next, to, from) : next));\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if ((process.env.NODE_ENV !== 'production') && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === 'object' && 'then' in guardReturn) {\n guardCall = guardCall.then(resolvedValue => {\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error('Invalid navigation guard'));\n }\n return resolvedValue;\n });\n }\n else if (guardReturn !== undefined) {\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n if (!next._called) {\n warn(message);\n reject(new Error('Invalid navigation guard'));\n return;\n }\n }\n }\n guardCall.catch(err => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function () {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n // @ts-expect-error: we put it in the original one because it's easier to check\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = fn => fn()) {\n const guards = [];\n for (const record of matched) {\n if ((process.env.NODE_ENV !== 'production') && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\"` +\n ` or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if ((process.env.NODE_ENV !== 'production')) {\n if (!rawComponent ||\n (typeof rawComponent !== 'object' &&\n typeof rawComponent !== 'function')) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\n ` a valid component. Received \"${String(rawComponent)}\".`);\n // throw to ensure we stop here but warn to ensure the message isn't\n // missed by the user\n throw new Error('Invalid route component');\n }\n else if ('then' in rawComponent) {\n // warn if user wrote import('/component.vue') instead of () =>\n // import('./component.vue')\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\n `Promise instead of a function that returns a Promise. Did you ` +\n `write \"import('./MyPage.vue')\" instead of ` +\n `\"() => import('./MyPage.vue')\" ? This will break in ` +\n `production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n }\n else if (rawComponent.__asyncLoader &&\n // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\n `using \"defineAsyncComponent()\". ` +\n `Write \"() => import('./MyPage.vue')\" instead of ` +\n `\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n // skip update and leave guards if the route component is not mounted\n if (guardType !== 'beforeRouteEnter' && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n // __vccOpts is added by vue-class-component and contain the regular options\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard &&\n guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n }\n else {\n // start requesting the chunk already\n let componentPromise = rawComponent();\n if ((process.env.NODE_ENV !== 'production') && !('catch' in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then(resolved => {\n if (!resolved)\n throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n const resolvedComponent = isESModule(resolved)\n ? resolved.default\n : resolved;\n // keep the resolved module for plugins like data loaders\n record.mods[name] = resolved;\n // replace the function with the resolved component\n // cannot be null or undefined because we went into the for loop\n record.components[name] = resolvedComponent;\n // __vccOpts is added by vue-class-component and contain the regular options\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return (guard &&\n guardToPromiseFn(guard, to, from, record, name, runWithContext)());\n }));\n }\n }\n }\n return guards;\n}\n/**\n * Ensures a route is loaded, so it can be passed as o prop to ``.\n *\n * @param route - resolved route to load\n */\nfunction loadRouteLocation(route) {\n return route.matched.every(record => record.redirect)\n ? Promise.reject(new Error('Cannot load a route that redirects.'))\n : Promise.all(route.matched.map(record => record.components &&\n Promise.all(Object.keys(record.components).reduce((promises, name) => {\n const rawComponent = record.components[name];\n if (typeof rawComponent === 'function' &&\n !('displayName' in rawComponent)) {\n promises.push(rawComponent().then(resolved => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n const resolvedComponent = isESModule(resolved)\n ? resolved.default\n : resolved;\n // keep the resolved module for plugins like data loaders\n record.mods[name] = resolved;\n // replace the function with the resolved component\n // cannot be null or undefined because we went into the for loop\n record.components[name] = resolvedComponent;\n return;\n }));\n }\n return promises;\n }, [])))).then(() => route);\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\n// `isExactActive` behavior should go through an RFC\n/**\n * Returns the internal behavior of a {@link RouterLink} without the rendering part.\n *\n * @param props - a `to` location and an optional `replace` flag\n */\nfunction useLink(props) {\n const router = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n let hasPrevious = false;\n let previousTo = null;\n const route = computed(() => {\n const to = unref(props.to);\n if ((process.env.NODE_ENV !== 'production') && (!hasPrevious || to !== previousTo)) {\n if (!isRouteLocation(to)) {\n if (hasPrevious) {\n warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n }\n else {\n warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n }\n }\n previousTo = to;\n hasPrevious = true;\n }\n return router.resolve(to);\n });\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index > -1)\n return index;\n // possible parent record\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 &&\n // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath &&\n // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath\n ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\n : index);\n });\n const isActive = computed(() => activeRecordIndex.value > -1 &&\n includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 &&\n activeRecordIndex.value === currentRoute.matched.length - 1 &&\n isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n const p = router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n if (props.viewTransition &&\n typeof document !== 'undefined' &&\n 'startViewTransition' in document) {\n document.startViewTransition(() => p);\n }\n return p;\n }\n return Promise.resolve();\n }\n // devtools only\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value,\n error: null,\n };\n // @ts-expect-error: this is internal\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n // @ts-expect-error: this is internal\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n linkContextDevtools.error = isRouteLocation(unref(props.to))\n ? null\n : 'Invalid \"to\" value';\n }, { flush: 'post' });\n }\n }\n /**\n * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n */\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate,\n };\n}\nfunction preferSingleVNode(vnodes) {\n return vnodes.length === 1 ? vnodes[0] : vnodes;\n}\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\n name: 'RouterLink',\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true,\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: 'page',\n },\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\n }));\n return () => {\n const children = slots.default && preferSingleVNode(slots.default(link));\n return props.custom\n ? children\n : h('a', {\n 'aria-current': link.isExactActive\n ? props.ariaCurrentValue\n : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value,\n }, children);\n };\n },\n});\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to render a link that triggers a navigation on click.\n */\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n // don't redirect when preventDefault called\n if (e.defaultPrevented)\n return;\n // don't redirect on right click\n if (e.button !== undefined && e.button !== 0)\n return;\n // don't redirect if `target=\"_blank\"`\n // @ts-expect-error getAttribute does exist\n if (e.currentTarget && e.currentTarget.getAttribute) {\n // @ts-expect-error getAttribute exists\n const target = e.currentTarget.getAttribute('target');\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n // this may be a Weex event which doesn't have this method\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === 'string') {\n if (innerValue !== outerValue)\n return false;\n }\n else {\n if (!isArray(outerValue) ||\n outerValue.length !== innerValue.length ||\n innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\n/**\n * Get the original path value of a record by following its aliasOf\n * @param record\n */\nfunction getOriginalPath(record) {\n return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\n}\n/**\n * Utility class to get the active class based on defaults.\n * @param propClass\n * @param globalClass\n * @param defaultClass\n */\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\n ? propClass\n : globalClass != null\n ? globalClass\n : defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\n name: 'RouterView',\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: 'default',\n },\n route: Object,\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n (process.env.NODE_ENV !== 'production') && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n // The depth changes based on empty components option, which allows passthrough routes e.g. routes with children\n // that are used to reuse the `path` property\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) &&\n !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n // watch at the same time the component instance, the route record we are\n // rendering, and the name\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n // copy reused instances\n if (to) {\n // this will update the instance for new instances as well as reused\n // instances when navigating to a new route\n to.instances[name] = instance;\n // the component instance is reused for a different route or name, so\n // we copy any saved update or leave guards. With async setup, the\n // mounting component will mount before the matchedRoute changes,\n // making instance === oldInstance, so we check if guards have been\n // added before. This works because we remove guards when\n // unmounting/deactivating components\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n // trigger beforeRouteEnter next callbacks\n if (instance &&\n to &&\n // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach(callback => callback(instance));\n }\n }, { flush: 'post' });\n return () => {\n const route = routeToDisplay.value;\n // we need the value at the time we render because when we unmount, we\n // navigated to a different location so the value is different\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n // props from route configuration\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption\n ? routePropsOption === true\n ? route.params\n : typeof routePropsOption === 'function'\n ? routePropsOption(route)\n : routePropsOption\n : null;\n const onVnodeUnmounted = vnode => {\n // remove the instance reference to prevent leak\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef,\n }));\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n isBrowser &&\n component.ref) {\n // TODO: can display if it's an alias, its props\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta,\n };\n const internalInstances = isArray(component.ref)\n ? component.ref.map(r => r.i)\n : [component.ref.i];\n internalInstances.forEach(instance => {\n // @ts-expect-error\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) ||\n component);\n };\n },\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to display the current route the user is at.\n */\nconst RouterView = RouterViewImpl;\n// warn against deprecated usage with & \n// due to functional component being no longer eager in Vue 3\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n if (parentName &&\n (parentName === 'KeepAlive' || parentName.includes('Transition')) &&\n typeof parentSubTreeType === 'object' &&\n parentSubTreeType.name === 'RouterView') {\n const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\n warn(` can no longer be used directly inside or .\\n` +\n `Use slot props instead:\\n\\n` +\n `\\n` +\n ` <${comp}>\\n` +\n ` \\n` +\n ` \\n` +\n ``);\n }\n}\n\n/**\n * Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n *\n * @param routeLocation - routeLocation to format\n * @param tooltip - optional tooltip\n * @returns a copy of the routeLocation\n */\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy,\n },\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display,\n },\n };\n}\n// to support multiple router instances\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n // Take over router.beforeEach and afterEach\n // make sure we are not registering the devtool twice\n if (router.__hasDevtools)\n return;\n router.__hasDevtools = true;\n // increment to support multiple router instances\n const id = routerId++;\n setupDevtoolsPlugin({\n id: 'org.vuejs.router' + (id ? '.' + id : ''),\n label: 'Vue Router',\n packageName: 'vue-router',\n homepage: 'https://router.vuejs.org',\n logo: 'https://router.vuejs.org/logo.png',\n componentStateTypes: ['Routing'],\n app,\n }, api => {\n if (typeof api.now !== 'function') {\n console.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n }\n // display state added by the router\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: 'Routing',\n key: '$route',\n editable: false,\n value: formatRouteLocation(router.currentRoute.value, 'Current Route'),\n });\n }\n });\n // mark router-link as active and display tags on router views\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : '') + info.path,\n textColor: 0,\n tooltip: 'This component is rendered by <router-view>',\n backgroundColor: PINK_500,\n });\n }\n // if multiple useLink are used\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach(devtoolsData => {\n let label = devtoolsData.route.path;\n let backgroundColor = ORANGE_400;\n let tooltip = '';\n let textColor = 0;\n if (devtoolsData.error) {\n label = devtoolsData.error;\n backgroundColor = RED_100;\n textColor = RED_700;\n }\n else if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = 'This is exactly active';\n }\n else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = 'This link is active';\n }\n node.tags.push({\n label,\n textColor,\n tooltip,\n backgroundColor,\n });\n });\n }\n });\n watch(router.currentRoute, () => {\n // refresh active state\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = 'router:navigations:' + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? ' ' + id : ''} Navigations`,\n color: 0x40a8c4,\n });\n // const errorsLayerId = 'router:errors'\n // api.addTimelineLayer({\n // id: errorsLayerId,\n // label: 'Router Errors',\n // color: 0xea5455,\n // })\n router.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: 'Error during Navigation',\n subtitle: to.fullPath,\n logType: 'error',\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId,\n },\n });\n });\n // attached to `meta` and used to group events\n let navigationId = 0;\n router.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay('beforeEach'),\n from: formatRouteLocation(from, 'Current Location during this navigation'),\n to: formatRouteLocation(to, 'Target location'),\n };\n // Used to group navigations together, hide from devtools\n Object.defineProperty(to.meta, '__navigationId', {\n value: navigationId++,\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: 'Start of navigation',\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId,\n },\n });\n });\n router.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay('afterEach'),\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : '',\n tooltip: 'Navigation Failure',\n value: failure,\n },\n };\n data.status = formatDisplay('❌');\n }\n else {\n data.status = formatDisplay('✅');\n }\n // we set here to have the right order\n data.from = formatRouteLocation(from, 'Current Location during this navigation');\n data.to = formatRouteLocation(to, 'Target location');\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: 'End of navigation',\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? 'warning' : 'default',\n groupId: to.meta.__navigationId,\n },\n });\n });\n /**\n * Inspector of Existing routes\n */\n const routerInspectorId = 'router-inspector:' + id;\n api.addInspector({\n id: routerInspectorId,\n label: 'Routes' + (id ? ' ' + id : ''),\n icon: 'book',\n treeFilterPlaceholder: 'Search routes',\n });\n function refreshRoutesView() {\n // the routes view isn't active\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n // children routes will appear as nested\n let routes = matcher.getRoutes().filter(route => !route.parent ||\n // these routes have a parent with no component which will not appear in the view\n // therefore we still need to include them\n !route.parent.record.components);\n // reset match state to false\n routes.forEach(resetMatchStateOnRouteRecord);\n // apply a match state if there is a payload\n if (payload.filter) {\n routes = routes.filter(route => \n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase()));\n }\n // mark active routes\n routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree(payload => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n /**\n * Display information about the currently selected route record\n */\n api.on.getInspectorState(payload => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find(route => route.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route),\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? '*' : '?';\n }\n else {\n return key.repeatable ? '+' : '';\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: 'path', value: record.path },\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: 'name',\n value: record.name,\n });\n }\n fields.push({ editable: false, key: 'regexp', value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: 'keys',\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys\n .map(key => `${key.name}${modifierForKey(key)}`)\n .join(' '),\n tooltip: 'Param keys',\n value: route.keys,\n },\n },\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: 'redirect',\n value: record.redirect,\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: 'aliases',\n value: route.alias.map(alias => alias.record.path),\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: 'meta',\n value: route.record.meta,\n });\n }\n fields.push({\n key: 'score',\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map(score => score.join(', ')).join(' | '),\n tooltip: 'Score used to sort routes',\n value: route.score,\n },\n },\n });\n return fields;\n}\n/**\n * Extracted from tailwind palette\n */\nconst PINK_500 = 0xec4899;\nconst BLUE_600 = 0x2563eb;\nconst LIME_500 = 0x84cc16;\nconst CYAN_400 = 0x22d3ee;\nconst ORANGE_400 = 0xfb923c;\n// const GRAY_100 = 0xf4f4f5\nconst DARK = 0x666666;\nconst RED_100 = 0xfee2e2;\nconst RED_700 = 0xb91c1c;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400,\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: 'alias',\n textColor: 0,\n backgroundColor: ORANGE_400,\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: 'matches',\n textColor: 0,\n backgroundColor: PINK_500,\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: 'exact',\n textColor: 0,\n backgroundColor: LIME_500,\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: 'active',\n textColor: 0,\n backgroundColor: BLUE_600,\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === 'string'\n ? `redirect: ${record.redirect}`\n : 'redirects',\n textColor: 0xffffff,\n backgroundColor: DARK,\n });\n }\n // add an id to be able to select it. Using the `path` is not possible because\n // empty path children would collide with their parents\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector),\n };\n}\n// incremental id for route records and inspector state\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n // no route will be active if matched is empty\n // reset the matching state\n const isExactActive = currentRoute.matched.length &&\n isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\n }\n route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n // use a regexp without $ at the end to match nested routes better\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\n if (nonEndingRE.test(filter)) {\n // mark children as matches\n route.children.forEach(child => isRouteMatching(child, filter));\n // exception case: `/`\n if (route.record.path !== '/' || filter === '/') {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n // hide the / route\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n // also allow partial matching on the path\n if (!filter.startsWith('/') &&\n (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some(child => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n // @ts-expect-error\n ret[key] = obj[key];\n }\n }\n return ret;\n}\n\n/**\n * Creates a Router instance that can be used by a Vue app.\n *\n * @param options - {@link RouterOptions}\n */\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if ((process.env.NODE_ENV !== 'production') && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\":' +\n ' https://router.vuejs.org/api/interfaces/RouterOptions.html#history');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n // leave the scrollRestoration if no scrollBehavior is provided\n if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\n history.scrollRestoration = 'manual';\n }\n const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = \n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode);\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n if ((process.env.NODE_ENV !== 'production') && !parent) {\n warn(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n }\n record = route;\n }\n else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n }\n else if ((process.env.NODE_ENV !== 'production')) {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map(routeMatcher => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n // const resolve: Router['resolve'] = (rawLocation: RouteLocationRaw, currentLocation) => {\n // const objectLocation = routerLocationAsObject(rawLocation)\n // we create a copy to modify it later\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === 'string') {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href = routerHistory.createHref(locationNormalized.fullPath);\n if ((process.env.NODE_ENV !== 'production')) {\n if (href.startsWith('//'))\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n // locationNormalized is always a new object\n return assign(locationNormalized, matchedRoute, {\n params: decodeParams(matchedRoute.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: undefined,\n href,\n });\n }\n if ((process.env.NODE_ENV !== 'production') && !isRouteLocation(rawLocation)) {\n warn(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n return resolve({});\n }\n let matcherLocation;\n // path could be relative in object as well\n if (rawLocation.path != null) {\n if ((process.env.NODE_ENV !== 'production') &&\n 'params' in rawLocation &&\n !('name' in rawLocation) &&\n // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\n });\n }\n else {\n // remove any nullish param\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n // pass encoded values to the matcher, so it can produce encoded path and fullPath\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(targetParams),\n });\n // current location params are decoded, we need to encode them in case the\n // matcher merges the params\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || '';\n if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n // the matcher might have merged current location params, so\n // we need to run the decoding again\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path,\n }));\n const href = routerHistory.createHref(fullPath);\n if ((process.env.NODE_ENV !== 'production')) {\n if (href.startsWith('//')) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n }\n else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: \n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery\n ? normalizeQuery(rawLocation.query)\n : (rawLocation.query || {}),\n }, matchedRoute, {\n redirectedFrom: undefined,\n href,\n });\n }\n function locationAsObject(to) {\n return typeof to === 'string'\n ? parseURL(parseQuery$1, to, currentRoute.value.path)\n : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {\n from,\n to,\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\n if (typeof newTargetLocation === 'string') {\n newTargetLocation =\n newTargetLocation.includes('?') || newTargetLocation.includes('#')\n ? (newTargetLocation = locationAsObject(newTargetLocation))\n : // force empty params\n { path: newTargetLocation };\n // @ts-expect-error: force empty params when a string is passed to let\n // the router parse them again\n newTargetLocation.params = {};\n }\n if ((process.env.NODE_ENV !== 'production') &&\n newTargetLocation.path == null &&\n !('name' in newTargetLocation)) {\n warn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error('Invalid redirect');\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: newTargetLocation.path != null ? {} : to.params,\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = (pendingLocation = resolve(to));\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n // to could be a string where `replace` is a function\n const replace = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === 'object'\n ? assign({}, data, shouldRedirect.state)\n : data,\n force,\n replace,\n }), \n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation);\n // if it was a redirect we already called `pushWithRedirect` above\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16 /* ErrorTypes.NAVIGATION_DUPLICATED */, { to: toLocation, from });\n // trigger scroll to allow scrolling to the same anchor\n handleScroll(from, from, \n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true, \n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false);\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from))\n .catch((error) => isNavigationFailure(error)\n ? // navigation redirects still mark the router as ready\n isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)\n ? error\n : markAsReady(error) // also returns the error\n : // reject any unknown error\n triggerError(error, toLocation, from))\n .then((failure) => {\n if (failure) {\n if (isNavigationFailure(failure, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n if ((process.env.NODE_ENV !== 'production') &&\n // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\n // and we have done it a couple of times\n redirectedFrom &&\n // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count\n ? // @ts-expect-error\n redirectedFrom._count + 1\n : 1) > 30) {\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n return Promise.reject(new Error('Infinite redirect in navigation guard'));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace,\n }, locationAsObject(failure.to), {\n state: typeof failure.to === 'object'\n ? assign({}, data, failure.to.state)\n : data,\n force,\n }), \n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation);\n }\n }\n else {\n // if we fail we don't finalize the navigation\n failure = finalizeNavigation(toLocation, from, true, replace, data);\n }\n triggerAfterEach(toLocation, from, failure);\n return failure;\n });\n }\n /**\n * Helper to reject and skip all navigation guards if a new navigation happened\n * @param to\n * @param from\n */\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function runWithContext(fn) {\n const app = installedApps.values().next().value;\n // support Vue < 3.3\n return app && typeof app.runWithContext === 'function'\n ? app.runWithContext(fn)\n : fn();\n }\n // TODO: refactor the whole before guards by internally using router.beforeEach\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n // all components here have been resolved once because we are leaving\n guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\n // leavingRecords is already reversed\n for (const record of leavingRecords) {\n record.leaveGuards.forEach(guard => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeRouteLeave guards\n return (runGuardQueue(guards)\n .then(() => {\n // check global guards beforeEach\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n })\n .then(() => {\n // check in components beforeRouteUpdate\n guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach(guard => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeEnter guards\n return runGuardQueue(guards);\n })\n .then(() => {\n // check the route beforeEnter\n guards = [];\n for (const record of enteringRecords) {\n // do not trigger beforeEnter on reused views\n if (record.beforeEnter) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n }\n else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeEnter guards\n return runGuardQueue(guards);\n })\n .then(() => {\n // NOTE: at this point to.matched is normalized and does not contain any () => Promise\n // clear existing enterCallbacks, these are added by extractComponentsGuards\n to.matched.forEach(record => (record.enterCallbacks = {}));\n // check in-component beforeRouteEnter\n guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from, runWithContext);\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeEnter guards\n return runGuardQueue(guards);\n })\n .then(() => {\n // check global guards beforeResolve\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n })\n // catch any navigation canceled\n .catch(err => isNavigationFailure(err, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)\n ? err\n : Promise.reject(err)));\n }\n function triggerAfterEach(to, from, failure) {\n // navigation is confirmed, call afterGuards\n // TODO: wrap with error handlers\n afterGuards\n .list()\n .forEach(guard => runWithContext(() => guard(to, from, failure)));\n }\n /**\n * - Cleans up any navigation guards\n * - Changes the url if necessary\n * - Calls the scrollBehavior\n */\n function finalizeNavigation(toLocation, from, isPush, replace, data) {\n // a more recent navigation took place\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n // only consider as push if it's not the first navigation\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n // change URL only if the user did a push/replace and if it's not the initial navigation because\n // it's just reflecting the url\n if (isPush) {\n // on the initial navigation, we want to reuse the scroll position from\n // history state if it exists\n if (replace || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll,\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n // accept current navigation\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n // attach listener to history to trigger navigations\n function setupListeners() {\n // avoid setting up listeners twice due to an invalid first navigation\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router.listening)\n return;\n // cannot be a redirect route because it was in history\n const toLocation = resolve(to);\n // due to dynamic routing, and to hash history with manual navigation\n // (manually changing the url or calling history.hash = '#/somewhere'),\n // there could be a redirect record in history\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true, force: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n // TODO: should be moved to web history?\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from)\n .catch((error) => {\n if (isNavigationFailure(error, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n return error;\n }\n if (isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n // Here we could call if (info.delta) routerHistory.go(-info.delta,\n // false) but this is bug prone as we have no way to wait the\n // navigation to be finished before calling pushWithRedirect. Using\n // a setTimeout of 16ms seems to work but there is no guarantee for\n // it to work on every browser. So instead we do not restore the\n // history entry and trigger a new navigation as requested by the\n // navigation guard.\n // the error is already handled by router.push we just want to avoid\n // logging the error\n pushWithRedirect(assign(locationAsObject(error.to), {\n force: true,\n }), toLocation\n // avoid an uncaught rejection, let push call triggerError\n )\n .then(failure => {\n // manual change in hash history #916 ending up in the URL not\n // changing, but it was changed by the manual url change, so we\n // need to manually change it ourselves\n if (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |\n 16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&\n !info.delta &&\n info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n })\n .catch(noop);\n // avoid the then branch\n return Promise.reject();\n }\n // do not restore history on unknown direction\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n // unrecognized error, transfer to the global handler\n return triggerError(error, toLocation, from);\n })\n .then((failure) => {\n failure =\n failure ||\n finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation, from, false);\n // revert the navigation\n if (failure) {\n if (info.delta &&\n // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n routerHistory.go(-info.delta, false);\n }\n else if (info.type === NavigationType.pop &&\n isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.NAVIGATION_DUPLICATED */)) {\n // manual change in hash history #916\n // it's like a push but lacks the information of the direction\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n })\n // avoid warnings in the console about uncaught rejections, they are logged by triggerErrors\n .catch(noop);\n });\n }\n // Initialization and Errors\n let readyHandlers = useCallbacks();\n let errorListeners = useCallbacks();\n let ready;\n /**\n * Trigger errorListeners added via onError and throws the error as well\n *\n * @param error - error to throw\n * @param to - location we were navigating to when the error happened\n * @param from - location we were navigating from when the error happened\n * @returns the error as a rejected promise\n */\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorListeners.list();\n if (list.length) {\n list.forEach(handler => handler(error, to, from));\n }\n else {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('uncaught error during route navigation:');\n }\n console.error(error);\n }\n // reject the error no matter there were error listeners or not\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve, reject) => {\n readyHandlers.add([resolve, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n // still not ready if an error happened\n ready = !err;\n setupListeners();\n readyHandlers\n .list()\n .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\n readyHandlers.reset();\n }\n return err;\n }\n // Scroll behavior\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\n ((isFirstNavigation || !isPush) &&\n history.state &&\n history.state.scroll) ||\n null;\n return nextTick()\n .then(() => scrollBehavior(to, from, scrollPosition))\n .then(position => position && scrollToPosition(position))\n .catch(err => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = new Set();\n const router = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n clearRoutes: matcher.clearRoutes,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorListeners.add,\n isReady,\n install(app) {\n const router = this;\n app.component('RouterLink', RouterLink);\n app.component('RouterView', RouterView);\n app.config.globalProperties.$router = router;\n Object.defineProperty(app.config.globalProperties, '$route', {\n enumerable: true,\n get: () => unref(currentRoute),\n });\n // this initial navigation is only necessary on client, on server it doesn't\n // make sense because it will create an extra unnecessary navigation and could\n // lead to problems\n if (isBrowser &&\n // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started &&\n currentRoute.value === START_LOCATION_NORMALIZED) {\n // see above\n started = true;\n push(routerHistory.location).catch(err => {\n if ((process.env.NODE_ENV !== 'production'))\n warn('Unexpected error when starting the router:', err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n Object.defineProperty(reactiveRoute, key, {\n get: () => currentRoute.value[key],\n enumerable: true,\n });\n }\n app.provide(routerKey, router);\n app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function () {\n installedApps.delete(app);\n // the router is not attached to an app anymore\n if (installedApps.size < 1) {\n // invalidate the current navigation\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n // TODO: this probably needs to be updated so it can be used by vue-termui\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n addDevtools(app, router, matcher);\n }\n },\n };\n // TODO: type this as NavigationGuardReturn or similar instead of any\n function runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n }\n return router;\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n // the type doesn't matter because we are comparing per reference\n if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\n\n/**\n * Returns the router instance. Equivalent to using `$router` inside\n * templates.\n */\nfunction useRouter() {\n return inject(routerKey);\n}\n/**\n * Returns the current route location. Equivalent to using `$route` inside\n * templates.\n */\nfunction useRoute(_name) {\n return inject(routeLocationKey);\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","\r\n\r\n\r\n\r\n\r\n","\r\nconst appSettingsLoader = {\r\n ApplicationSettings: null,\r\n init: async () => await appSettingsLoader.loadApplicationSettings(),\r\n beforeEnter: (to, from, next) => {\r\n appSettingsLoader.loadApplicationSettings().then(() => {\r\n next();\r\n }).catch(error => {\r\n next(false);\r\n });\r\n },\r\n loadApplicationSettings: async () => {\r\n if (!appSettingsLoader.ApplicationSettings)\r\n appSettingsLoader.ApplicationSettings = (await import(\"@core/classes/Applications/ApplicationsSettings\")).default\r\n return appSettingsLoader.ApplicationSettings;\r\n }\r\n};\r\n\r\n\r\n\r\nexport default appSettingsLoader;","import { DOC_ASSOCIATION } from \"@core/classes/Enums\";\r\n\r\nexport default class DocumentAssociation {\r\n constructor(init) {\r\n this.type = DOC_ASSOCIATION.Customer;\r\n this.id = '';\r\n\r\n if (init) {\r\n this.type = init.type; // Use DOC_ASSOCIATION enum\r\n this.id = init.id; // Unique GUID that identifies the associated object\r\n }\r\n }\r\n}","\r\n\r\n\r\n\r\n\r\n","\r\n\r\n\r\n","import DocumentAssociation from '@core/classes/DocumentAssociation';\r\nimport { PlaidBankAccount } from '@core/classes/Plaid/PlaidBankAccount';\r\n\r\n/** Contains all Plaid tokens that are associated with a customer. */\r\nexport class PlaidCustomerInfo {\r\n /** The ElasticSearch ID of this record. */\r\n id: string = null;\r\n\r\n /** The Saturn ID of this customer. */\r\n customerId: string = null;\r\n\r\n /** Uses ENUMS.DOC_ASSOCIATION. The type of customer record the customerID refers to. Will almost always be a Customer record. */\r\n customerIdType?: number = null;\r\n\r\n /** A list of Asset Report tokens associated with this customer. */\r\n assetReportTokens: PlaidAssetReportToken[] = [];\r\n\r\n /** The User Token associated with the customer. */\r\n userToken?: PlaidUserToken = null;\r\n\r\n /** A list of Access Tokens associated with this customer. */\r\n accessTokens: PlaidAccessToken[] = [];\r\n\r\n /** The date this record was initially created. */\r\n dateCreated?: Date = null;\r\n\r\n constructor(init?: Partial) {\r\n this.id = init?.id;\r\n this.customerId = init?.customerId;\r\n this.customerIdType = init?.customerIdType;\r\n this.assetReportTokens = init?.assetReportTokens?.map(t => new PlaidAssetReportToken(t)) ?? [];\r\n this.userToken = init?.userToken ? new PlaidUserToken(init.userToken) : null;\r\n this.accessTokens = init?.accessTokens?.map(t => new PlaidAccessToken(t)) ?? [];\r\n this.dateCreated = init?.dateCreated;\r\n }\r\n}\r\n\r\n// =============\r\n// TOKEN CLASSES\r\n// =============\r\n\r\nexport class PlaidToken {\r\n /** The date this token was initially created. */\r\n dateCreated: Date = null;\r\n\r\n /** The Plaid environment this token was created in. Tokens made in one environment cannot be used in another. */\r\n plaidEnvironment?: 'SANDBOX' | 'PRODUCTION' = null;\r\n\r\n /** The code of the store that originally created this token. */\r\n storeCode?: string = null;\r\n\r\n constructor(init?: Partial) {\r\n this.dateCreated = init?.dateCreated;\r\n this.plaidEnvironment = init?.plaidEnvironment;\r\n this.storeCode = init?.storeCode;\r\n }\r\n}\r\n\r\n/** Used to make Plaid API requests related to a specific Asset Report. */\r\nexport class PlaidAssetReportToken extends PlaidToken {\r\n /** Plaid's internal ID for the Asset Report */\r\n assetReportId: string = null;\r\n\r\n /** The maximum number of days of history included in the Asset Report. */\r\n daysRequested: number = 0;\r\n\r\n /** The current status (ex. active, revoked, expired) of the Access Token. Uses ENUMS.TOKEN_STATUS */\r\n status?: number = null;\r\n\r\n /** A list of Access Tokens the Asset Report is associated with. */\r\n associatedAccessTokens: DocumentAssociation[] = [];\r\n\r\n constructor(init?: Partial) {\r\n super(init);\r\n this.assetReportId = init?.assetReportId;\r\n this.daysRequested = init?.daysRequested ?? 0;\r\n this.status = init?.status;\r\n this.associatedAccessTokens = init?.associatedAccessTokens ?? [];\r\n }\r\n}\r\n\r\n/** Used when working with Plaid's Income or Employement APIs. \r\n * Used to associate income data from multiple sources with a single user. Non-expiring. \r\n * */\r\nexport class PlaidUserToken extends PlaidToken {\r\n /** Plaid's internal ID for this User Token. */\r\n userId: string = null;\r\n\r\n /** A list of Access Tokens this token is associated with. */\r\n associatedAccessTokens: DocumentAssociation[] = [];\r\n\r\n constructor(init?: Partial) {\r\n super(init);\r\n this.userId = init?.userId;\r\n this.associatedAccessTokens = init?.associatedAccessTokens ?? [];\r\n }\r\n}\r\n\r\n/** Used to make Plaid API requests related to a specific Item (a bank account). Also contains metadata about the Item. */\r\nexport class PlaidAccessToken extends PlaidToken {\r\n /** Plaid's internal ID that identifies a Plaid Item. */\r\n plaidItemId: string = null;\r\n\r\n /** The current status (ex. active, revoked, expired) of the Access Token. Uses ENUMS.TOKEN_STATUS */\r\n status?: number = null;\r\n\r\n /** A list of Plaid products currently enabled on this Access Token. Uses ENUMS.PLAID_PRODUCTS */\r\n activeProducts: string[] = [];\r\n\r\n /** A list of Plaid products currently being billed for on this Access Token. Uses ENUMS.PLAID_PRODUCTS */\r\n billedProducts: string[] = [];\r\n\r\n /** The institution this Access Token is associated with */\r\n institution?: PlaidInstitution = null;\r\n\r\n /** A list of accounts this Access Token has access to.*/\r\n accounts: PlaidBankAccount[] = [];\r\n\r\n /** The date this token was last updated */\r\n dateLastUpdated: Date = null;\r\n\r\n constructor(init?: Partial) {\r\n super(init);\r\n this.plaidItemId = init?.plaidItemId;\r\n this.status = init?.status;\r\n this.activeProducts = init?.activeProducts ?? [];\r\n this.billedProducts = init?.billedProducts ?? [];\r\n this.institution = init?.institution;\r\n this.accounts = init?.accounts;\r\n this.dateLastUpdated = init?.dateLastUpdated;\r\n }\r\n\r\n\r\n /**\r\n * Returns whether the given product is active on this access token.\r\n * @param {string} product Use ENUMS.PLAID_PRODUCTS\r\n * @return {*} {boolean}\r\n * @memberof PlaidAccessToken\r\n */\r\n hasProduct(product: string): boolean {\r\n return this.activeProducts.includes(product);\r\n }\r\n\r\n /**\r\n * Returns whether the given product is being billed on this access token\r\n * @param {string} product Use ENUMS.PLAID_PRODUCTS\r\n * @return {*} {boolean}\r\n * @memberof PlaidAccessToken\r\n */\r\n isProductBilled(product: string): boolean {\r\n return this.billedProducts.includes(product);\r\n }\r\n}\r\n\r\nexport class PlaidInstitution {\r\n /** The user-friendly name of the institution */\r\n name: string = null;\r\n\r\n /** Plaid's internal ID for this institution */\r\n id: string = null;\r\n\r\n constructor(init?: PlaidInstitution) {\r\n this.name = init?.name;\r\n this.id = init?.id;\r\n }\r\n}","import ENUMS from \"@core/classes/Enums\";\r\nimport moment from 'moment';\r\nimport FIMenuCustomer from '../FIMenuCustomer';\r\nimport Application from '../Applications/Application';\r\n\r\nexport class PlaidUserInfo {\r\n emailAddress?: string;\r\n\r\n /** Format: E.164 (ex. +11234567890) */\r\n phoneNumber?: string;\r\n\r\n /** Format: YYYY-MM-DD */\r\n dateOfBirth?: string;\r\n\r\n name?: {\r\n givenName: string,\r\n familyName: string\r\n };\r\n\r\n address?: PlaidAddress;\r\n\r\n idNumber?: {\r\n value: string,\r\n /** Use ENUMS.PLAID_ID_TYPES */\r\n type: string\r\n }\r\n\r\n isIdEncrypted: boolean = false;\r\n\r\n constructor(init?: Partial) {\r\n this.emailAddress = init?.emailAddress;\r\n this.phoneNumber = init?.phoneNumber;\r\n this.dateOfBirth = init?.dateOfBirth;\r\n this.name = init?.name;\r\n this.address = init?.address;\r\n this.idNumber = init?.idNumber;\r\n this.isIdEncrypted = init?.isIdEncrypted ?? false;\r\n }\r\n\r\n isPracticallyEmpty(): boolean {\r\n return !this.emailAddress && !this.phoneNumber && !this.name?.givenName && !this.dateOfBirth && !this.address?.street;\r\n }\r\n\r\n static getDefault(): PlaidUserInfo {\r\n return new PlaidUserInfo({\r\n name: { givenName: null, familyName: null },\r\n emailAddress: null,\r\n phoneNumber: null,\r\n dateOfBirth: null,\r\n idNumber: { value: null, type: null },\r\n address: { street: null, street2: null, city: null, region: null, postalCode: null, country: null }\r\n });\r\n }\r\n\r\n static getSandboxUser(): PlaidUserInfo {\r\n return new PlaidUserInfo({\r\n emailAddress: 'leslies@mail.com',\r\n phoneNumber: '+12345678909',\r\n name: { givenName: 'Leslie', familyName: 'Knope' },\r\n dateOfBirth: '1975-01-18',\r\n address: { street: '123 Main St.', city: 'Pawnee', region: 'IN', postalCode: '46001', country: 'US' },\r\n idNumber: { value: '123456789', type: ENUMS.PLAID_ID_TYPES.UnitedStatesSSN },\r\n isIdEncrypted: false\r\n });\r\n }\r\n\r\n static getUserFromFIMenuCustomer(fimenuCustomer: FIMenuCustomer) {\r\n if (fimenuCustomer.isEntity)\r\n throw new Error('Cannot create a Plaid User from a business entity.');\r\n\r\n let dob = new Date(Date.parse(fimenuCustomer.dob)).toISOString();\r\n dob = dob.substring(0, dob.indexOf('T'));\r\n\r\n const userData = new PlaidUserInfo({\r\n emailAddress: fimenuCustomer.email?.trim(),\r\n phoneNumber: `+1${fimenuCustomer.cell}`,\r\n dateOfBirth: dob,\r\n name: {\r\n givenName: fimenuCustomer.firstName?.trim(),\r\n familyName: fimenuCustomer.lastName?.trim()\r\n },\r\n address: {\r\n street: fimenuCustomer.address?.trim(),\r\n street2: fimenuCustomer.addressExtra?.trim(),\r\n city: fimenuCustomer.city?.trim(),\r\n region: fimenuCustomer.state?.trim(),\r\n postalCode: fimenuCustomer.zip?.trim(),\r\n country: 'US'\r\n },\r\n });\r\n\r\n if (fimenuCustomer.ssnHashed) {\r\n userData.idNumber = { value: fimenuCustomer.ssnHashed, type: ENUMS.PLAID_ID_TYPES.UnitedStatesSSN };\r\n userData.isIdEncrypted = true;\r\n }\r\n\r\n return userData;\r\n }\r\n\r\n static getUserFromCustomerApplication(customerApplication: Application) {\r\n const preFilledData = customerApplication.preFilledData;\r\n const personalInfo = customerApplication.quoteAppData.applicationsDataAnswered.personalInfo;\r\n\r\n const userData = new PlaidUserInfo({\r\n emailAddress: preFilledData.emailAddress,\r\n phoneNumber: `+1${preFilledData.phoneNumber}`,\r\n dateOfBirth: moment(personalInfo.dateOfBirth, \"YYYY-MM-DDTHH:mm:ss.SSSSSSS[Z]\").format('YYYY-MM-DD'),\r\n name: {\r\n givenName: personalInfo.firstName,\r\n familyName: personalInfo.lastName,\r\n },\r\n address: {\r\n street: personalInfo.currentResidence.addressLine1,\r\n street2: personalInfo.currentResidence.addressLine2,\r\n city: personalInfo.currentResidence.city,\r\n region: personalInfo.currentResidence.state,\r\n postalCode: personalInfo.currentResidence.zipCode,\r\n country: personalInfo.currentResidence.country,\r\n },\r\n idNumber: null,\r\n isIdEncrypted: false,\r\n });\r\n\r\n if (personalInfo.ssnHashed) {\r\n userData.idNumber = { value: personalInfo.ssnHashed, type: ENUMS.PLAID_ID_TYPES.UnitedStatesSSN };\r\n userData.isIdEncrypted = true;\r\n }\r\n\r\n return userData;\r\n }\r\n}\r\n\r\n/** PlaidUserInfo objects from the backend include the clientUserId */\r\nexport class PlaidUserInfoRequest extends PlaidUserInfo {\r\n clientUserId?: string;\r\n\r\n constructor(customerId?: string, init?: Partial) {\r\n super(init);\r\n this.clientUserId = customerId;\r\n }\r\n}\r\n\r\nexport class PlaidAddress {\r\n street: string;\r\n\r\n street2?: string;\r\n\r\n city?: string;\r\n\r\n /** ISO 3166-2 subdivision code (ex. state, province, prefecture, zone, etc.) */\r\n region?: string;\r\n\r\n postalCode?: string;\r\n\r\n /** Format: ISO 3166-1 alpha-2 two-letter code */\r\n country?: string;\r\n\r\n constructor(init?: Partial) {\r\n this.street = init?.street;\r\n this.street2 = init?.street2;\r\n this.city = init?.city;\r\n this.region = init?.region;\r\n this.postalCode = init?.postalCode;\r\n this.country = init?.country;\r\n }\r\n}\r\n\r\nexport interface PlaidAccountOwner {\r\n /** A list of names associated with the account by the financial institution. In the case of a joint account, Plaid will make a best effort to \r\n * report the names of all account holders. If an Item contains multiple accounts with different owner names, some institutions will report all \r\n * names associated with the Item in each account's `names` array*/\r\n names: string[];\r\n\r\n /** A list of phone numbers associated with the account by the financial institution */\r\n phoneNumbers: {\r\n /** The phone number */\r\n data: string,\r\n\r\n /** When `true`, identifies the phone number as the primary number on the account */\r\n primary: boolean,\r\n\r\n /** The type of phone number */\r\n type: string\r\n }[];\r\n\r\n /** A list of email addresses associated with the account by the financial institution */\r\n emails: {\r\n /** The email address */\r\n data: string,\r\n\r\n /** When `true`, identifies the email address as the primary email on an account */\r\n primary: boolean,\r\n\r\n /** The type of email account as described by the financial institution */\r\n type: string\r\n }[];\r\n\r\n /** Data about the various addresses associated with the account by the financial institution */\r\n addresses: {\r\n /** Data about the components comprising an address */\r\n data: PlaidAddress,\r\n\r\n /** When `true`, identifies the address as the primary address on an account */\r\n primary: boolean\r\n }[];\r\n\r\n /** The ID of the document that this identity belongs to */\r\n documentId?: string;\r\n}","import api from '@core/services/api';\r\nimport util from '@core/services/util';\r\nimport ENUMS from '@core/classes/Enums';\r\nimport DocumentAssociation from '@core/classes/DocumentAssociation';\r\nimport PlaidTransferIntent from '@core/classes/Plaid/PlaidTransferIntent';\r\nimport { PlaidIncomeVerificationConfig } from '@core/classes/Plaid/PlaidIncomeVerification';\r\nimport { PlaidStatementsConfig } from '@core/classes/Plaid/PlaidStatements';\r\nimport { PlaidUserInfo, PlaidUserInfoRequest } from '@core/classes/Plaid/PlaidUserInfo';\r\nimport { PlaidAccessToken, PlaidCustomerInfo } from '@core/classes/Plaid/PlaidCustomerInfo';\r\nimport PlaidLinkTokenMetadataResponse from '@core/classes/Plaid/PlaidLinkTokenMetadataResponse';\r\n\r\n// Configure and Initialize a Plaid Link Session\r\n// Plaid API Docs: https://plaid.com/docs/api/tokens/#linktokencreate\r\n\r\nexport default class PlaidLinkConfig {\r\n #transferIntentId?: string = null;\r\n\r\n /** REQUIRED (with at least one customer-type association) */\r\n associations: DocumentAssociation[];\r\n\r\n /** \r\n * REQUIRED. Array of [ENUMS.PLAID_PRODUCTS]. \r\n * These products will be billed once the Item is created.\r\n * Institutions that don't support these products will be filtered out from the bank selection screen.\r\n * */\r\n productsToInit: string[];\r\n\r\n /** \r\n * Array of [ENUMS.PLAID_PRODUCTS]. \r\n * Cannot overlap with any other products list.\r\n * If available, will added to Item and billed on Item creation (does not filter institution list).\r\n * [Plaid Docs](https://plaid.com/docs/link/initializing-products/#required-if-supported-products)\r\n */\r\n productsRequiredIfSupported?: string[] = [];\r\n\r\n /**\r\n * Array of [ENUMS.PLAID_PRODUCTS]\r\n * Cannot overlap with any other products list\r\n * Plaid makes a \"best-effort\" to add the product; product will not be billed until their relative endpoints are called\r\n * [Plaid Docs](https://plaid.com/docs/link/initializing-products/#optional-products)\r\n */\r\n productsOptional?: string[] = [];\r\n\r\n /** Name Link will use to refer to your app */\r\n name?: string = 'Sample App';\r\n\r\n /** ENUMS.PLAID_LANGUAGES; The language that Link should be displayed in; Ignored if initing with Identity Verification. Defaults to English if nothing is provided. */\r\n linkLanguage?: string = ENUMS.PLAID_LANGUAGES.English;\r\n\r\n /**\r\n * Array of [ENUMS.PLAID_COUNTRIES]. If using IDV, should use the country where your company is based. Otherwise, represents the country of your user's financial institution.\r\n * Defaults to United States if nothing is provided.\r\n * For a list of supported countries, refer to the [Plaid Docs](https://plaid.com/global/).\r\n */\r\n countries?: string[] = [ENUMS.PLAID_COUNTRIES.UnitedStates];\r\n\r\n /** Name of Link Customization; Language / country need to match customization if using */\r\n linkCustomization?: string;\r\n\r\n /** Optional, only for **IDENTITY VERIFICATION**; Defaults to APPSETTINGS template ID if none passed in */\r\n templateId?: string;\r\n\r\n /** Required only for **TRANSFER** product */\r\n transferIntent?: PlaidTransferIntent;\r\n\r\n /** Required only for **INCOME VERIFICATION** product */\r\n incomeVerification?: PlaidIncomeVerificationConfig;\r\n\r\n /** Required only for **STATEMENTS** product */\r\n statements?: PlaidStatementsConfig;\r\n\r\n /** Any info collected about the user before Link; In IDV, can be used to skip Lightning Verification */\r\n userData?: PlaidUserInfo;\r\n\r\n /** The ID of the IDV session that gets created if prepopulateIdentityVerification gets called*/\r\n idvSessionId?: string;\r\n\r\n /** When true, enables linking multiple Items in the same flow. Not available for non-banking products. */\r\n enableMultiItemLink?: boolean;\r\n\r\n /** \r\n * Used only when using Plaid Sandbox. Allows you to test various Returning User Experience scenarios. When provided, will also override the link customization name\r\n * to \"REMEMBER_ME_SANDBOX\".\r\n */\r\n enableSandboxRUX?: SandboxRUXTestCase;\r\n\r\n constructor(init?: Partial) {\r\n this.associations = init?.associations ?? [];\r\n this.productsToInit = init?.productsToInit ?? [];\r\n this.productsRequiredIfSupported = init?.productsRequiredIfSupported ?? [];\r\n this.productsOptional = init?.productsOptional ?? [];\r\n this.name = init?.name ?? 'Sample App';\r\n this.linkLanguage = init?.linkLanguage ?? ENUMS.PLAID_LANGUAGES.English;\r\n this.countries = init?.countries ?? [ENUMS.PLAID_COUNTRIES.UnitedStates];\r\n this.linkCustomization = init?.linkCustomization;\r\n this.templateId = init?.templateId;\r\n this.transferIntent = init?.transferIntent;\r\n this.incomeVerification = init?.incomeVerification;\r\n this.statements = init?.statements;\r\n this.userData = init?.userData;\r\n this.idvSessionId = init?.idvSessionId;\r\n this.enableMultiItemLink = init?.enableMultiItemLink;\r\n this.enableSandboxRUX = init?.enableSandboxRUX;\r\n }\r\n\r\n populateWithLinkTokenMetadata(linkTokenResponse: PlaidLinkTokenMetadataResponse) {\r\n this.productsToInit = linkTokenResponse.initialProducts;\r\n this.countries = linkTokenResponse.countryCodes;\r\n this.linkLanguage = linkTokenResponse.language;\r\n this.name = linkTokenResponse.clientName;\r\n }\r\n\r\n // ====================\r\n // PLAID API FUNCTIONS\r\n // ====================\r\n\r\n /**\r\n * Makes the necessary API calls to Plaid that need to be called *before* creating the Link Token. \r\n * Only applicable when using IDV or Transfer products. \r\n * @param plaidCustomerInfo Only required for IDV.\r\n * @param storeCode Only required for IDV.\r\n */\r\n async preInitTasks(customerId: string, storeCode?: string): Promise {\r\n if (this.canPrepopulateIDV()) {\r\n if (!customerId) throw new Error('Cannot prepopulate IDV. Missing Customer ID.');\r\n if (!storeCode) throw new Error('Cannot prepopulate IDV. Store code is missing.');\r\n\r\n await this.prepopulateIdentityVerification(customerId, storeCode);\r\n }\r\n\r\n if (this.hasTransfer() && this.transferIntent)\r\n await this.getTransferIntentId();\r\n }\r\n\r\n async prepopulateIdentityVerification(customerId: string, storeCode: string): Promise {\r\n if (this.userData.isPracticallyEmpty()) return null;\r\n\r\n const user = { ...this.userData, clientUserId: customerId };\r\n const response = await api.plaid.createIdentityVerification(this.templateId, user, storeCode, this.associations);\r\n\r\n if (response?.data) {\r\n this.templateId = response.data.template?.id; // Backend may have changed the templateID depending on certain parameters\r\n this.idvSessionId = response.data.id;\r\n }\r\n\r\n return response;\r\n }\r\n\r\n async getTransferIntentId(): Promise {\r\n const response = await api.plaid.createTransferIntent(this.transferIntent);\r\n\r\n if (response?.data)\r\n this.#transferIntentId = response.data.transferIntent.id;\r\n\r\n return response;\r\n }\r\n\r\n /**\r\n * \r\n * @param plaidCustomerInfo If only doing IDV, the only think that is required is the `customerID`. More things may be required when using banking products.\r\n * @param storeCode\r\n * @param plaidItemId Optional. Pass in to initialize Link in update mode.\r\n * @returns\r\n */\r\n async createLinkToken(plaidCustomerInfo: Partial, plaidItemId: string = null): Promise {\r\n const accessToken = (plaidItemId)\r\n ? plaidCustomerInfo.accessTokens?.find(at => at.plaidItemId === plaidItemId)\r\n : null;\r\n\r\n const validProducts = (plaidItemId && accessToken)\r\n ? this.getValidUpdateProducts(accessToken)\r\n : this.productsToInit;\r\n\r\n const linkOptions: PlaidLinkTokenOptions = {\r\n userTokenId: (plaidCustomerInfo?.userToken && validProducts.length > 0) ? plaidCustomerInfo.userToken.userId : null,\r\n plaidItemId: plaidItemId,\r\n clientName: this.name,\r\n clientUserId: plaidCustomerInfo.customerId,\r\n products: (plaidItemId && !this.canUpdateWithProducts()) ? [] : validProducts,\r\n requiredIfSupportedProducts: (!plaidItemId) ? this.productsRequiredIfSupported : null,\r\n optionalProducts: (!plaidItemId) ? this.productsOptional : null,\r\n language: this.linkLanguage,\r\n countryCodes: this.countries,\r\n linkCustomizationName: this.linkCustomization,\r\n statementsOptions: (!plaidItemId) ? this.statements : null,\r\n enableMultiItemLink: this.enableMultiItemLink\r\n };\r\n\r\n if (this.incomeVerification && validProducts.length > 0) {\r\n linkOptions.incomeVerificationOptions = {\r\n plaidItemIds: plaidCustomerInfo.accessTokens?.map(i => i.plaidItemId) ?? null,\r\n ...this.incomeVerification\r\n };\r\n }\r\n\r\n if (!plaidItemId && this.hasIdentityVerification())\r\n linkOptions.identityVerificationOptions = { templateId: this.templateId };\r\n\r\n if (!plaidItemId && this.hasTransfer() && this.#transferIntentId)\r\n linkOptions.transferOptions = { intentId: this.#transferIntentId };\r\n\r\n if (this.userData)\r\n linkOptions.user = this.userData;\r\n\r\n if (this.enableSandboxRUX && !this.hasIdentityVerification()) {\r\n linkOptions.user ??= new PlaidUserInfo();\r\n linkOptions.user.phoneNumber = this.getRUXPhoneNumber();\r\n linkOptions.linkCustomizationName = 'REMEMBER_ME_SANDBOX';\r\n }\r\n\r\n return await api.plaid.createLinkToken(linkOptions);\r\n }\r\n\r\n // ======================\r\n // BOOL CONDITION CHECKS\r\n // ======================\r\n\r\n hasPlaidProduct(plaidProduct: string) {\r\n return this.productsToInit.some(p => p === plaidProduct)\r\n || this.productsRequiredIfSupported.some(p => p === plaidProduct)\r\n || this.productsOptional.some(p => p === plaidProduct);\r\n }\r\n\r\n hasIncomeVerification(): boolean {\r\n return this.hasPlaidProduct(ENUMS.PLAID_PRODUCTS.IncomeVerification);\r\n }\r\n\r\n hasIdentityVerification(): boolean {\r\n return this.hasPlaidProduct(ENUMS.PLAID_PRODUCTS.IdentityVerification);\r\n }\r\n\r\n hasTransfer(): boolean {\r\n return this.hasPlaidProduct(ENUMS.PLAID_PRODUCTS.Transfer);\r\n }\r\n\r\n hasStatements(): boolean {\r\n return this.hasPlaidProduct(ENUMS.PLAID_PRODUCTS.Statements);\r\n }\r\n\r\n canPrepopulateIDV(): boolean {\r\n return !!this.userData && this.hasIdentityVerification();\r\n }\r\n\r\n isPayrollIncome(): boolean {\r\n return !!this.incomeVerification && this.incomeVerification.incomeSourceTypes.some(s => s === 'payroll');\r\n }\r\n\r\n canUpdateWithProducts(): boolean {\r\n return this.productsToInit.some(p => p === ENUMS.PLAID_PRODUCTS.Assets || p === ENUMS.PLAID_PRODUCTS.IncomeVerification);\r\n }\r\n\r\n // =======================\r\n // OTHER HELPER FUNCTIONS\r\n // =======================\r\n\r\n /**\r\n * Returns a list of products that don't already exist on an access token.\r\n */\r\n getValidUpdateProducts(accessToken?: PlaidAccessToken): string[] {\r\n if (!accessToken) return [];\r\n\r\n const validProducts: string[] = [];\r\n this.productsToInit.forEach(p => {\r\n if (accessToken.activeProducts.every(ap => ap !== p))\r\n validProducts.push(p);\r\n });\r\n\r\n return validProducts;\r\n }\r\n\r\n /** When testing in Sandbox, returns the pre-seeded phone number for the selected text scenario */\r\n getRUXPhoneNumber(): string {\r\n switch (this.enableSandboxRUX) {\r\n case SandboxRUXTestCase.NewUser:\r\n return '+14155550010';\r\n case SandboxRUXTestCase.VerifiedUser:\r\n return '+14155550011';\r\n case SandboxRUXTestCase.VerifiedNewAccount:\r\n return '+14155550012';\r\n case SandboxRUXTestCase.VerifiedOAuth:\r\n return '+14155550013';\r\n case SandboxRUXTestCase.VerifiedNewDevice:\r\n return '+14155550014';\r\n case SandboxRUXTestCase.VerifiedAccountPreSelected:\r\n return '+14155550015';\r\n default:\r\n return this?.userData?.phoneNumber;\r\n }\r\n }\r\n\r\n static getRUXTypeList(): { display: string, value: string }[] {\r\n return Object.values(SandboxRUXTestCase).map(value => {\r\n return { display: util.formatSnakeCase(value), value: value };\r\n });\r\n }\r\n}\r\n\r\nenum SandboxRUXTestCase {\r\n NewUser = 'new_user',\r\n VerifiedUser = 'verified_user',\r\n VerifiedNewAccount = 'verified_newAccount',\r\n VerifiedOAuth = 'verified_OAuth',\r\n VerifiedNewDevice = 'verified_newDevice',\r\n VerifiedAccountPreSelected = 'verified_accountPreSelected'\r\n}\r\n\r\n/** Internal interface used when sending requests to `api.plaid.createLinkToken()`. Matches backend class with same name. */\r\ninterface PlaidLinkTokenOptions {\r\n /** The name of your application, as it should be displayed in the Link session. Max length of 30 characters. */\r\n clientName: string;\r\n\r\n /** OUR customer ID (or whatever ID we used to represent the individual going through the Link session) */\r\n clientUserId: string;\r\n\r\n /** The Item ID of a user's access token. Used when sending an access token through Update Mode. */\r\n plaidItemId?: string;\r\n\r\n /** The User ID associated with a customer's User Token. When provided, will associate any Items created in the session to the user. \r\n * Can be found in the customer's PlaidCustomerInfo record. */\r\n userTokenId?: string;\r\n\r\n /** ENUMS.PLAID_PRODUCTS. List of products you wish to use. When launching Link in update mode, should be omitted (unless adding Income or Assets to an Item) */\r\n products: string[];\r\n\r\n /** ENUMS.PLAID_PRODUCTS. List of products you wish to use only if the institution and accounts selected by the use support the product. */\r\n requiredIfSupportedProducts?: string[];\r\n\r\n /** ENUMS.PLAID_PRODUCTS. List of products you would *like* to have, but your app can function without. */\r\n optionalProducts?: string[];\r\n\r\n /** ENUMS.PLAID_LANGUAGES. The language that Link should be displayed in. */\r\n language: string;\r\n\r\n /** ENUMS.PLAID_COUNTRIES. List of countries that represents where the user's financial institutions are located. */\r\n countryCodes: string[];\r\n\r\n /** Name of the link customization to use. */\r\n linkCustomizationName?: string;\r\n\r\n /** Any information collected about the user in question. May be used to pre-fill some data in the Link session. */\r\n user?: PlaidUserInfoRequest;\r\n\r\n /** Options used to configure the income verificatio session. */\r\n incomeVerificationOptions?: PlaidIncomeVerificationOptions;\r\n\r\n /** Options used to configure the identity verification session. */\r\n identityVerificationOptions?: { templateId?: string, gaveConsent?: boolean };\r\n\r\n /** Options used to configure the transfer session. */\r\n transferOptions?: { intentId?: string, authorizationId?: string };\r\n\r\n /** Options used to configure the statements session. */\r\n statementsOptions?: PlaidStatementsConfig;\r\n\r\n /** When true, allows connecting multiple Items in a single Link session. */\r\n enableMultiItemLink?: boolean;\r\n}\r\n\r\ninterface PlaidIncomeVerificationOptions extends PlaidIncomeVerificationConfig {\r\n assetReportId?: string;\r\n plaidItemIds?: string[];\r\n}","/*!\n * qrcode.vue v3.6.0\n * A Vue.js component to generate QRCode. Both support Vue 2 and Vue 3\n * © 2017-PRESENT @scopewu(https://github.com/scopewu)\n * MIT License.\n */\nimport { defineComponent, ref, onUpdated, h, onMounted, Fragment } from 'vue';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\n/*\n * QR Code generator library (TypeScript)\n *\n * Copyright (c) Project Nayuki. (MIT License)\n * https://www.nayuki.io/page/qr-code-generator-library\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n * - The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * - The Software is provided \"as is\", without warranty of any kind, express or\n * implied, including but not limited to the warranties of merchantability,\n * fitness for a particular purpose and noninfringement. In no event shall the\n * authors or copyright holders be liable for any claim, damages or other\n * liability, whether in an action of contract, tort or otherwise, arising from,\n * out of or in connection with the Software or the use or other dealings in the\n * Software.\n */\nvar qrcodegen;\n(function (qrcodegen) {\n /*---- QR Code symbol class ----*/\n /*\n * A QR Code symbol, which is a type of two-dimension barcode.\n * Invented by Denso Wave and described in the ISO/IEC 18004 standard.\n * Instances of this class represent an immutable square grid of dark and light cells.\n * The class provides static factory functions to create a QR Code from text or binary data.\n * The class covers the QR Code Model 2 specification, supporting all versions (sizes)\n * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.\n *\n * Ways to create a QR Code object:\n * - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().\n * - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().\n * - Low level: Custom-make the array of data codeword bytes (including\n * segment headers and final padding, excluding error correction codewords),\n * supply the appropriate version number, and call the QrCode() constructor.\n * (Note that all ways require supplying the desired error correction level.)\n */\n var QrCode = /** @class */ (function () {\n /*-- Constructor (low level) and fields --*/\n // Creates a new QR Code with the given version number,\n // error correction level, data codeword bytes, and mask number.\n // This is a low-level API that most users should not use directly.\n // A mid-level API is the encodeSegments() function.\n function QrCode(\n // The version number of this QR Code, which is between 1 and 40 (inclusive).\n // This determines the size of this barcode.\n version, \n // The error correction level used in this QR Code.\n errorCorrectionLevel, dataCodewords, msk) {\n this.version = version;\n this.errorCorrectionLevel = errorCorrectionLevel;\n // The modules of this QR Code (false = light, true = dark).\n // Immutable after constructor finishes. Accessed through getModule().\n this.modules = [];\n // Indicates function modules that are not subjected to masking. Discarded when constructor finishes.\n this.isFunction = [];\n // Check scalar arguments\n if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION)\n throw new RangeError(\"Version value out of range\");\n if (msk < -1 || msk > 7)\n throw new RangeError(\"Mask value out of range\");\n this.size = version * 4 + 17;\n // Initialize both grids to be size*size arrays of Boolean false\n var row = [];\n for (var i = 0; i < this.size; i++)\n row.push(false);\n for (var i = 0; i < this.size; i++) {\n this.modules.push(row.slice()); // Initially all light\n this.isFunction.push(row.slice());\n }\n // Compute ECC, draw modules\n this.drawFunctionPatterns();\n var allCodewords = this.addEccAndInterleave(dataCodewords);\n this.drawCodewords(allCodewords);\n // Do masking\n if (msk == -1) { // Automatically choose best mask\n var minPenalty = 1000000000;\n for (var i = 0; i < 8; i++) {\n this.applyMask(i);\n this.drawFormatBits(i);\n var penalty = this.getPenaltyScore();\n if (penalty < minPenalty) {\n msk = i;\n minPenalty = penalty;\n }\n this.applyMask(i); // Undoes the mask due to XOR\n }\n }\n assert(0 <= msk && msk <= 7);\n this.mask = msk;\n this.applyMask(msk); // Apply the final choice of mask\n this.drawFormatBits(msk); // Overwrite old format bits\n this.isFunction = [];\n }\n /*-- Static factory functions (high level) --*/\n // Returns a QR Code representing the given Unicode text string at the given error correction level.\n // As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer\n // Unicode code points (not UTF-16 code units) if the low error correction level is used. The smallest possible\n // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the\n // ecl argument if it can be done without increasing the version.\n QrCode.encodeText = function (text, ecl) {\n var segs = qrcodegen.QrSegment.makeSegments(text);\n return QrCode.encodeSegments(segs, ecl);\n };\n // Returns a QR Code representing the given binary data at the given error correction level.\n // This function always encodes using the binary segment mode, not any text mode. The maximum number of\n // bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.\n // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.\n QrCode.encodeBinary = function (data, ecl) {\n var seg = qrcodegen.QrSegment.makeBytes(data);\n return QrCode.encodeSegments([seg], ecl);\n };\n /*-- Static factory functions (mid level) --*/\n // Returns a QR Code representing the given segments with the given encoding parameters.\n // The smallest possible QR Code version within the given range is automatically\n // chosen for the output. Iff boostEcl is true, then the ECC level of the result\n // may be higher than the ecl argument if it can be done without increasing the\n // version. The mask number is either between 0 to 7 (inclusive) to force that\n // mask, or -1 to automatically choose an appropriate mask (which may be slow).\n // This function allows the user to create a custom sequence of segments that switches\n // between modes (such as alphanumeric and byte) to encode text in less space.\n // This is a mid-level API; the high-level API is encodeText() and encodeBinary().\n QrCode.encodeSegments = function (segs, ecl, minVersion, maxVersion, mask, boostEcl) {\n if (minVersion === void 0) { minVersion = 1; }\n if (maxVersion === void 0) { maxVersion = 40; }\n if (mask === void 0) { mask = -1; }\n if (boostEcl === void 0) { boostEcl = true; }\n if (!(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION)\n || mask < -1 || mask > 7)\n throw new RangeError(\"Invalid value\");\n // Find the minimal version number to use\n var version;\n var dataUsedBits;\n for (version = minVersion;; version++) {\n var dataCapacityBits_1 = QrCode.getNumDataCodewords(version, ecl) * 8; // Number of data bits available\n var usedBits = QrSegment.getTotalBits(segs, version);\n if (usedBits <= dataCapacityBits_1) {\n dataUsedBits = usedBits;\n break; // This version number is found to be suitable\n }\n if (version >= maxVersion) // All versions in the range could not fit the given data\n throw new RangeError(\"Data too long\");\n }\n // Increase the error correction level while the data still fits in the current version number\n for (var _i = 0, _a = [QrCode.Ecc.MEDIUM, QrCode.Ecc.QUARTILE, QrCode.Ecc.HIGH]; _i < _a.length; _i++) { // From low to high\n var newEcl = _a[_i];\n if (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8)\n ecl = newEcl;\n }\n // Concatenate all segments to create the data bit string\n var bb = [];\n for (var _b = 0, segs_1 = segs; _b < segs_1.length; _b++) {\n var seg = segs_1[_b];\n appendBits(seg.mode.modeBits, 4, bb);\n appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);\n for (var _c = 0, _d = seg.getData(); _c < _d.length; _c++) {\n var b = _d[_c];\n bb.push(b);\n }\n }\n assert(bb.length == dataUsedBits);\n // Add terminator and pad up to a byte if applicable\n var dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8;\n assert(bb.length <= dataCapacityBits);\n appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb);\n appendBits(0, (8 - bb.length % 8) % 8, bb);\n assert(bb.length % 8 == 0);\n // Pad with alternating bytes until data capacity is reached\n for (var padByte = 0xEC; bb.length < dataCapacityBits; padByte ^= 0xEC ^ 0x11)\n appendBits(padByte, 8, bb);\n // Pack bits into bytes in big endian\n var dataCodewords = [];\n while (dataCodewords.length * 8 < bb.length)\n dataCodewords.push(0);\n bb.forEach(function (b, i) {\n return dataCodewords[i >>> 3] |= b << (7 - (i & 7));\n });\n // Create the QR Code object\n return new QrCode(version, ecl, dataCodewords, mask);\n };\n /*-- Accessor methods --*/\n // Returns the color of the module (pixel) at the given coordinates, which is false\n // for light or true for dark. The top left corner has the coordinates (x=0, y=0).\n // If the given coordinates are out of bounds, then false (light) is returned.\n QrCode.prototype.getModule = function (x, y) {\n return 0 <= x && x < this.size && 0 <= y && y < this.size && this.modules[y][x];\n };\n QrCode.prototype.getModules = function () {\n return this.modules;\n };\n /*-- Private helper methods for constructor: Drawing function modules --*/\n // Reads this object's version field, and draws and marks all function modules.\n QrCode.prototype.drawFunctionPatterns = function () {\n // Draw horizontal and vertical timing patterns\n for (var i = 0; i < this.size; i++) {\n this.setFunctionModule(6, i, i % 2 == 0);\n this.setFunctionModule(i, 6, i % 2 == 0);\n }\n // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)\n this.drawFinderPattern(3, 3);\n this.drawFinderPattern(this.size - 4, 3);\n this.drawFinderPattern(3, this.size - 4);\n // Draw numerous alignment patterns\n var alignPatPos = this.getAlignmentPatternPositions();\n var numAlign = alignPatPos.length;\n for (var i = 0; i < numAlign; i++) {\n for (var j = 0; j < numAlign; j++) {\n // Don't draw on the three finder corners\n if (!(i == 0 && j == 0 || i == 0 && j == numAlign - 1 || i == numAlign - 1 && j == 0))\n this.drawAlignmentPattern(alignPatPos[i], alignPatPos[j]);\n }\n }\n // Draw configuration data\n this.drawFormatBits(0); // Dummy mask value; overwritten later in the constructor\n this.drawVersion();\n };\n // Draws two copies of the format bits (with its own error correction code)\n // based on the given mask and this object's error correction level field.\n QrCode.prototype.drawFormatBits = function (mask) {\n // Calculate error correction code and pack bits\n var data = this.errorCorrectionLevel.formatBits << 3 | mask; // errCorrLvl is uint2, mask is uint3\n var rem = data;\n for (var i = 0; i < 10; i++)\n rem = (rem << 1) ^ ((rem >>> 9) * 0x537);\n var bits = (data << 10 | rem) ^ 0x5412; // uint15\n assert(bits >>> 15 == 0);\n // Draw first copy\n for (var i = 0; i <= 5; i++)\n this.setFunctionModule(8, i, getBit(bits, i));\n this.setFunctionModule(8, 7, getBit(bits, 6));\n this.setFunctionModule(8, 8, getBit(bits, 7));\n this.setFunctionModule(7, 8, getBit(bits, 8));\n for (var i = 9; i < 15; i++)\n this.setFunctionModule(14 - i, 8, getBit(bits, i));\n // Draw second copy\n for (var i = 0; i < 8; i++)\n this.setFunctionModule(this.size - 1 - i, 8, getBit(bits, i));\n for (var i = 8; i < 15; i++)\n this.setFunctionModule(8, this.size - 15 + i, getBit(bits, i));\n this.setFunctionModule(8, this.size - 8, true); // Always dark\n };\n // Draws two copies of the version bits (with its own error correction code),\n // based on this object's version field, iff 7 <= version <= 40.\n QrCode.prototype.drawVersion = function () {\n if (this.version < 7)\n return;\n // Calculate error correction code and pack bits\n var rem = this.version; // version is uint6, in the range [7, 40]\n for (var i = 0; i < 12; i++)\n rem = (rem << 1) ^ ((rem >>> 11) * 0x1F25);\n var bits = this.version << 12 | rem; // uint18\n assert(bits >>> 18 == 0);\n // Draw two copies\n for (var i = 0; i < 18; i++) {\n var color = getBit(bits, i);\n var a = this.size - 11 + i % 3;\n var b = Math.floor(i / 3);\n this.setFunctionModule(a, b, color);\n this.setFunctionModule(b, a, color);\n }\n };\n // Draws a 9*9 finder pattern including the border separator,\n // with the center module at (x, y). Modules can be out of bounds.\n QrCode.prototype.drawFinderPattern = function (x, y) {\n for (var dy = -4; dy <= 4; dy++) {\n for (var dx = -4; dx <= 4; dx++) {\n var dist = Math.max(Math.abs(dx), Math.abs(dy)); // Chebyshev/infinity norm\n var xx = x + dx;\n var yy = y + dy;\n if (0 <= xx && xx < this.size && 0 <= yy && yy < this.size)\n this.setFunctionModule(xx, yy, dist != 2 && dist != 4);\n }\n }\n };\n // Draws a 5*5 alignment pattern, with the center module\n // at (x, y). All modules must be in bounds.\n QrCode.prototype.drawAlignmentPattern = function (x, y) {\n for (var dy = -2; dy <= 2; dy++) {\n for (var dx = -2; dx <= 2; dx++)\n this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1);\n }\n };\n // Sets the color of a module and marks it as a function module.\n // Only used by the constructor. Coordinates must be in bounds.\n QrCode.prototype.setFunctionModule = function (x, y, isDark) {\n this.modules[y][x] = isDark;\n this.isFunction[y][x] = true;\n };\n /*-- Private helper methods for constructor: Codewords and masking --*/\n // Returns a new byte string representing the given data with the appropriate error correction\n // codewords appended to it, based on this object's version and error correction level.\n QrCode.prototype.addEccAndInterleave = function (data) {\n var ver = this.version;\n var ecl = this.errorCorrectionLevel;\n if (data.length != QrCode.getNumDataCodewords(ver, ecl))\n throw new RangeError(\"Invalid argument\");\n // Calculate parameter numbers\n var numBlocks = QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];\n var blockEccLen = QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver];\n var rawCodewords = Math.floor(QrCode.getNumRawDataModules(ver) / 8);\n var numShortBlocks = numBlocks - rawCodewords % numBlocks;\n var shortBlockLen = Math.floor(rawCodewords / numBlocks);\n // Split data into blocks and append ECC to each block\n var blocks = [];\n var rsDiv = QrCode.reedSolomonComputeDivisor(blockEccLen);\n for (var i = 0, k = 0; i < numBlocks; i++) {\n var dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));\n k += dat.length;\n var ecc = QrCode.reedSolomonComputeRemainder(dat, rsDiv);\n if (i < numShortBlocks)\n dat.push(0);\n blocks.push(dat.concat(ecc));\n }\n // Interleave (not concatenate) the bytes from every block into a single sequence\n var result = [];\n var _loop_1 = function (i) {\n blocks.forEach(function (block, j) {\n // Skip the padding byte in short blocks\n if (i != shortBlockLen - blockEccLen || j >= numShortBlocks)\n result.push(block[i]);\n });\n };\n for (var i = 0; i < blocks[0].length; i++) {\n _loop_1(i);\n }\n assert(result.length == rawCodewords);\n return result;\n };\n // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire\n // data area of this QR Code. Function modules need to be marked off before this is called.\n QrCode.prototype.drawCodewords = function (data) {\n if (data.length != Math.floor(QrCode.getNumRawDataModules(this.version) / 8))\n throw new RangeError(\"Invalid argument\");\n var i = 0; // Bit index into the data\n // Do the funny zigzag scan\n for (var right = this.size - 1; right >= 1; right -= 2) { // Index of right column in each column pair\n if (right == 6)\n right = 5;\n for (var vert = 0; vert < this.size; vert++) { // Vertical counter\n for (var j = 0; j < 2; j++) {\n var x = right - j; // Actual x coordinate\n var upward = ((right + 1) & 2) == 0;\n var y = upward ? this.size - 1 - vert : vert; // Actual y coordinate\n if (!this.isFunction[y][x] && i < data.length * 8) {\n this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));\n i++;\n }\n // If this QR Code has any remainder bits (0 to 7), they were assigned as\n // 0/false/light by the constructor and are left unchanged by this method\n }\n }\n }\n assert(i == data.length * 8);\n };\n // XORs the codeword modules in this QR Code with the given mask pattern.\n // The function modules must be marked and the codeword bits must be drawn\n // before masking. Due to the arithmetic of XOR, calling applyMask() with\n // the same mask value a second time will undo the mask. A final well-formed\n // QR Code needs exactly one (not zero, two, etc.) mask applied.\n QrCode.prototype.applyMask = function (mask) {\n if (mask < 0 || mask > 7)\n throw new RangeError(\"Mask value out of range\");\n for (var y = 0; y < this.size; y++) {\n for (var x = 0; x < this.size; x++) {\n var invert = void 0;\n switch (mask) {\n case 0:\n invert = (x + y) % 2 == 0;\n break;\n case 1:\n invert = y % 2 == 0;\n break;\n case 2:\n invert = x % 3 == 0;\n break;\n case 3:\n invert = (x + y) % 3 == 0;\n break;\n case 4:\n invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0;\n break;\n case 5:\n invert = x * y % 2 + x * y % 3 == 0;\n break;\n case 6:\n invert = (x * y % 2 + x * y % 3) % 2 == 0;\n break;\n case 7:\n invert = ((x + y) % 2 + x * y % 3) % 2 == 0;\n break;\n default: throw new Error(\"Unreachable\");\n }\n if (!this.isFunction[y][x] && invert)\n this.modules[y][x] = !this.modules[y][x];\n }\n }\n };\n // Calculates and returns the penalty score based on state of this QR Code's current modules.\n // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.\n QrCode.prototype.getPenaltyScore = function () {\n var result = 0;\n // Adjacent modules in row having same color, and finder-like patterns\n for (var y = 0; y < this.size; y++) {\n var runColor = false;\n var runX = 0;\n var runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (var x = 0; x < this.size; x++) {\n if (this.modules[y][x] == runColor) {\n runX++;\n if (runX == 5)\n result += QrCode.PENALTY_N1;\n else if (runX > 5)\n result++;\n }\n else {\n this.finderPenaltyAddHistory(runX, runHistory);\n if (!runColor)\n result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;\n runColor = this.modules[y][x];\n runX = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * QrCode.PENALTY_N3;\n }\n // Adjacent modules in column having same color, and finder-like patterns\n for (var x = 0; x < this.size; x++) {\n var runColor = false;\n var runY = 0;\n var runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (var y = 0; y < this.size; y++) {\n if (this.modules[y][x] == runColor) {\n runY++;\n if (runY == 5)\n result += QrCode.PENALTY_N1;\n else if (runY > 5)\n result++;\n }\n else {\n this.finderPenaltyAddHistory(runY, runHistory);\n if (!runColor)\n result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;\n runColor = this.modules[y][x];\n runY = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(runColor, runY, runHistory) * QrCode.PENALTY_N3;\n }\n // 2*2 blocks of modules having same color\n for (var y = 0; y < this.size - 1; y++) {\n for (var x = 0; x < this.size - 1; x++) {\n var color = this.modules[y][x];\n if (color == this.modules[y][x + 1] &&\n color == this.modules[y + 1][x] &&\n color == this.modules[y + 1][x + 1])\n result += QrCode.PENALTY_N2;\n }\n }\n // Balance of dark and light modules\n var dark = 0;\n for (var _i = 0, _a = this.modules; _i < _a.length; _i++) {\n var row = _a[_i];\n dark = row.reduce(function (sum, color) { return sum + (color ? 1 : 0); }, dark);\n }\n var total = this.size * this.size; // Note that size is odd, so dark/total != 1/2\n // Compute the smallest integer k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%\n var k = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1;\n assert(0 <= k && k <= 9);\n result += k * QrCode.PENALTY_N4;\n assert(0 <= result && result <= 2568888); // Non-tight upper bound based on default values of PENALTY_N1, ..., N4\n return result;\n };\n /*-- Private helper functions --*/\n // Returns an ascending list of positions of alignment patterns for this version number.\n // Each position is in the range [0,177), and are used on both the x and y axes.\n // This could be implemented as lookup table of 40 variable-length lists of integers.\n QrCode.prototype.getAlignmentPatternPositions = function () {\n if (this.version == 1)\n return [];\n else {\n var numAlign = Math.floor(this.version / 7) + 2;\n var step = Math.floor((this.version * 8 + numAlign * 3 + 5) / (numAlign * 4 - 4)) * 2;\n var result = [6];\n for (var pos = this.size - 7; result.length < numAlign; pos -= step)\n result.splice(1, 0, pos);\n return result;\n }\n };\n // Returns the number of data bits that can be stored in a QR Code of the given version number, after\n // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.\n // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.\n QrCode.getNumRawDataModules = function (ver) {\n if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION)\n throw new RangeError(\"Version number out of range\");\n var result = (16 * ver + 128) * ver + 64;\n if (ver >= 2) {\n var numAlign = Math.floor(ver / 7) + 2;\n result -= (25 * numAlign - 10) * numAlign - 55;\n if (ver >= 7)\n result -= 36;\n }\n assert(208 <= result && result <= 29648);\n return result;\n };\n // Returns the number of 8-bit data (i.e. not error correction) codewords contained in any\n // QR Code of the given version number and error correction level, with remainder bits discarded.\n // This stateless pure function could be implemented as a (40*4)-cell lookup table.\n QrCode.getNumDataCodewords = function (ver, ecl) {\n return Math.floor(QrCode.getNumRawDataModules(ver) / 8) -\n QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] *\n QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];\n };\n // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be\n // implemented as a lookup table over all possible parameter values, instead of as an algorithm.\n QrCode.reedSolomonComputeDivisor = function (degree) {\n if (degree < 1 || degree > 255)\n throw new RangeError(\"Degree out of range\");\n // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.\n // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93].\n var result = [];\n for (var i = 0; i < degree - 1; i++)\n result.push(0);\n result.push(1); // Start off with the monomial x^0\n // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),\n // and drop the highest monomial term which is always 1x^degree.\n // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).\n var root = 1;\n for (var i = 0; i < degree; i++) {\n // Multiply the current product by (x - r^i)\n for (var j = 0; j < result.length; j++) {\n result[j] = QrCode.reedSolomonMultiply(result[j], root);\n if (j + 1 < result.length)\n result[j] ^= result[j + 1];\n }\n root = QrCode.reedSolomonMultiply(root, 0x02);\n }\n return result;\n };\n // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.\n QrCode.reedSolomonComputeRemainder = function (data, divisor) {\n var result = divisor.map(function (_) { return 0; });\n var _loop_2 = function (b) {\n var factor = b ^ result.shift();\n result.push(0);\n divisor.forEach(function (coef, i) {\n return result[i] ^= QrCode.reedSolomonMultiply(coef, factor);\n });\n };\n for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {\n var b = data_1[_i];\n _loop_2(b);\n }\n return result;\n };\n // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result\n // are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8.\n QrCode.reedSolomonMultiply = function (x, y) {\n if (x >>> 8 != 0 || y >>> 8 != 0)\n throw new RangeError(\"Byte out of range\");\n // Russian peasant multiplication\n var z = 0;\n for (var i = 7; i >= 0; i--) {\n z = (z << 1) ^ ((z >>> 7) * 0x11D);\n z ^= ((y >>> i) & 1) * x;\n }\n assert(z >>> 8 == 0);\n return z;\n };\n // Can only be called immediately after a light run is added, and\n // returns either 0, 1, or 2. A helper function for getPenaltyScore().\n QrCode.prototype.finderPenaltyCountPatterns = function (runHistory) {\n var n = runHistory[1];\n assert(n <= this.size * 3);\n var core = n > 0 && runHistory[2] == n && runHistory[3] == n * 3 && runHistory[4] == n && runHistory[5] == n;\n return (core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0)\n + (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0);\n };\n // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().\n QrCode.prototype.finderPenaltyTerminateAndCount = function (currentRunColor, currentRunLength, runHistory) {\n if (currentRunColor) { // Terminate dark run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n currentRunLength = 0;\n }\n currentRunLength += this.size; // Add light border to final run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n return this.finderPenaltyCountPatterns(runHistory);\n };\n // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().\n QrCode.prototype.finderPenaltyAddHistory = function (currentRunLength, runHistory) {\n if (runHistory[0] == 0)\n currentRunLength += this.size; // Add light border to initial run\n runHistory.pop();\n runHistory.unshift(currentRunLength);\n };\n /*-- Constants and tables --*/\n // The minimum version number supported in the QR Code Model 2 standard.\n QrCode.MIN_VERSION = 1;\n // The maximum version number supported in the QR Code Model 2 standard.\n QrCode.MAX_VERSION = 40;\n // For use in getPenaltyScore(), when evaluating which mask is best.\n QrCode.PENALTY_N1 = 3;\n QrCode.PENALTY_N2 = 3;\n QrCode.PENALTY_N3 = 40;\n QrCode.PENALTY_N4 = 10;\n QrCode.ECC_CODEWORDS_PER_BLOCK = [\n // Version: (note that index 0 is for padding, and is set to an illegal value)\n //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n [-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], // Low\n [-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28], // Medium\n [-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], // Quartile\n [-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], // High\n ];\n QrCode.NUM_ERROR_CORRECTION_BLOCKS = [\n // Version: (note that index 0 is for padding, and is set to an illegal value)\n //0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n [-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25], // Low\n [-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49], // Medium\n [-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68], // Quartile\n [-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81], // High\n ];\n return QrCode;\n }());\n qrcodegen.QrCode = QrCode;\n // Appends the given number of low-order bits of the given value\n // to the given buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.\n function appendBits(val, len, bb) {\n if (len < 0 || len > 31 || val >>> len != 0)\n throw new RangeError(\"Value out of range\");\n for (var i = len - 1; i >= 0; i--) // Append bit by bit\n bb.push((val >>> i) & 1);\n }\n // Returns true iff the i'th bit of x is set to 1.\n function getBit(x, i) {\n return ((x >>> i) & 1) != 0;\n }\n // Throws an exception if the given condition is false.\n function assert(cond) {\n if (!cond)\n throw new Error(\"Assertion error\");\n }\n /*---- Data segment class ----*/\n /*\n * A segment of character/binary/control data in a QR Code symbol.\n * Instances of this class are immutable.\n * The mid-level way to create a segment is to take the payload data\n * and call a static factory function such as QrSegment.makeNumeric().\n * The low-level way to create a segment is to custom-make the bit buffer\n * and call the QrSegment() constructor with appropriate values.\n * This segment class imposes no length restrictions, but QR Codes have restrictions.\n * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.\n * Any segment longer than this is meaningless for the purpose of generating QR Codes.\n */\n var QrSegment = /** @class */ (function () {\n /*-- Constructor (low level) and fields --*/\n // Creates a new QR Code segment with the given attributes and data.\n // The character count (numChars) must agree with the mode and the bit buffer length,\n // but the constraint isn't checked. The given bit buffer is cloned and stored.\n function QrSegment(\n // The mode indicator of this segment.\n mode, \n // The length of this segment's unencoded data. Measured in characters for\n // numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.\n // Always zero or positive. Not the same as the data's bit length.\n numChars, \n // The data bits of this segment. Accessed through getData().\n bitData) {\n this.mode = mode;\n this.numChars = numChars;\n this.bitData = bitData;\n if (numChars < 0)\n throw new RangeError(\"Invalid argument\");\n this.bitData = bitData.slice(); // Make defensive copy\n }\n /*-- Static factory functions (mid level) --*/\n // Returns a segment representing the given binary data encoded in\n // byte mode. All input byte arrays are acceptable. Any text string\n // can be converted to UTF-8 bytes and encoded as a byte mode segment.\n QrSegment.makeBytes = function (data) {\n var bb = [];\n for (var _i = 0, data_2 = data; _i < data_2.length; _i++) {\n var b = data_2[_i];\n appendBits(b, 8, bb);\n }\n return new QrSegment(QrSegment.Mode.BYTE, data.length, bb);\n };\n // Returns a segment representing the given string of decimal digits encoded in numeric mode.\n QrSegment.makeNumeric = function (digits) {\n if (!QrSegment.isNumeric(digits))\n throw new RangeError(\"String contains non-numeric characters\");\n var bb = [];\n for (var i = 0; i < digits.length;) { // Consume up to 3 digits per iteration\n var n = Math.min(digits.length - i, 3);\n appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb);\n i += n;\n }\n return new QrSegment(QrSegment.Mode.NUMERIC, digits.length, bb);\n };\n // Returns a segment representing the given text string encoded in alphanumeric mode.\n // The characters allowed are: 0 to 9, A to Z (uppercase only), space,\n // dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n QrSegment.makeAlphanumeric = function (text) {\n if (!QrSegment.isAlphanumeric(text))\n throw new RangeError(\"String contains unencodable characters in alphanumeric mode\");\n var bb = [];\n var i;\n for (i = 0; i + 2 <= text.length; i += 2) { // Process groups of 2\n var temp = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;\n temp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));\n appendBits(temp, 11, bb);\n }\n if (i < text.length) // 1 character remaining\n appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb);\n return new QrSegment(QrSegment.Mode.ALPHANUMERIC, text.length, bb);\n };\n // Returns a new mutable list of zero or more segments to represent the given Unicode text string.\n // The result may use various segment modes and switch modes to optimize the length of the bit stream.\n QrSegment.makeSegments = function (text) {\n // Select the most efficient segment encoding automatically\n if (text == \"\")\n return [];\n else if (QrSegment.isNumeric(text))\n return [QrSegment.makeNumeric(text)];\n else if (QrSegment.isAlphanumeric(text))\n return [QrSegment.makeAlphanumeric(text)];\n else\n return [QrSegment.makeBytes(QrSegment.toUtf8ByteArray(text))];\n };\n // Returns a segment representing an Extended Channel Interpretation\n // (ECI) designator with the given assignment value.\n QrSegment.makeEci = function (assignVal) {\n var bb = [];\n if (assignVal < 0)\n throw new RangeError(\"ECI assignment value out of range\");\n else if (assignVal < (1 << 7))\n appendBits(assignVal, 8, bb);\n else if (assignVal < (1 << 14)) {\n appendBits(2, 2, bb);\n appendBits(assignVal, 14, bb);\n }\n else if (assignVal < 1000000) {\n appendBits(6, 3, bb);\n appendBits(assignVal, 21, bb);\n }\n else\n throw new RangeError(\"ECI assignment value out of range\");\n return new QrSegment(QrSegment.Mode.ECI, 0, bb);\n };\n // Tests whether the given string can be encoded as a segment in numeric mode.\n // A string is encodable iff each character is in the range 0 to 9.\n QrSegment.isNumeric = function (text) {\n return QrSegment.NUMERIC_REGEX.test(text);\n };\n // Tests whether the given string can be encoded as a segment in alphanumeric mode.\n // A string is encodable iff each character is in the following set: 0 to 9, A to Z\n // (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n QrSegment.isAlphanumeric = function (text) {\n return QrSegment.ALPHANUMERIC_REGEX.test(text);\n };\n /*-- Methods --*/\n // Returns a new copy of the data bits of this segment.\n QrSegment.prototype.getData = function () {\n return this.bitData.slice(); // Make defensive copy\n };\n // (Package-private) Calculates and returns the number of bits needed to encode the given segments at\n // the given version. The result is infinity if a segment has too many characters to fit its length field.\n QrSegment.getTotalBits = function (segs, version) {\n var result = 0;\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n var ccbits = seg.mode.numCharCountBits(version);\n if (seg.numChars >= (1 << ccbits))\n return Infinity; // The segment's length doesn't fit the field's bit width\n result += 4 + ccbits + seg.bitData.length;\n }\n return result;\n };\n // Returns a new array of bytes representing the given string encoded in UTF-8.\n QrSegment.toUtf8ByteArray = function (str) {\n str = encodeURI(str);\n var result = [];\n for (var i = 0; i < str.length; i++) {\n if (str.charAt(i) != \"%\")\n result.push(str.charCodeAt(i));\n else {\n result.push(parseInt(str.substring(i + 1, i + 3), 16));\n i += 2;\n }\n }\n return result;\n };\n /*-- Constants --*/\n // Describes precisely all strings that are encodable in numeric mode.\n QrSegment.NUMERIC_REGEX = /^[0-9]*$/;\n // Describes precisely all strings that are encodable in alphanumeric mode.\n QrSegment.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\\/:-]*$/;\n // The set of all legal characters in alphanumeric mode,\n // where each character value maps to the index in the string.\n QrSegment.ALPHANUMERIC_CHARSET = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:\";\n return QrSegment;\n }());\n qrcodegen.QrSegment = QrSegment;\n})(qrcodegen || (qrcodegen = {}));\n/*---- Public helper enumeration ----*/\n(function (qrcodegen) {\n (function (QrCode) {\n /*\n * The error correction level in a QR Code symbol. Immutable.\n */\n var Ecc = /** @class */ (function () {\n /*-- Constructor and fields --*/\n function Ecc(\n // In the range 0 to 3 (unsigned 2-bit integer).\n ordinal, \n // (Package-private) In the range 0 to 3 (unsigned 2-bit integer).\n formatBits) {\n this.ordinal = ordinal;\n this.formatBits = formatBits;\n }\n /*-- Constants --*/\n Ecc.LOW = new Ecc(0, 1); // The QR Code can tolerate about 7% erroneous codewords\n Ecc.MEDIUM = new Ecc(1, 0); // The QR Code can tolerate about 15% erroneous codewords\n Ecc.QUARTILE = new Ecc(2, 3); // The QR Code can tolerate about 25% erroneous codewords\n Ecc.HIGH = new Ecc(3, 2); // The QR Code can tolerate about 30% erroneous codewords\n return Ecc;\n }());\n QrCode.Ecc = Ecc;\n })(qrcodegen.QrCode || (qrcodegen.QrCode = {}));\n})(qrcodegen || (qrcodegen = {}));\n/*---- Public helper enumeration ----*/\n(function (qrcodegen) {\n (function (QrSegment) {\n /*\n * Describes how a segment's data bits are interpreted. Immutable.\n */\n var Mode = /** @class */ (function () {\n /*-- Constructor and fields --*/\n function Mode(\n // The mode indicator bits, which is a uint4 value (range 0 to 15).\n modeBits, \n // Number of character count bits for three different version ranges.\n numBitsCharCount) {\n this.modeBits = modeBits;\n this.numBitsCharCount = numBitsCharCount;\n }\n /*-- Method --*/\n // (Package-private) Returns the bit width of the character count field for a segment in\n // this mode in a QR Code at the given version number. The result is in the range [0, 16].\n Mode.prototype.numCharCountBits = function (ver) {\n return this.numBitsCharCount[Math.floor((ver + 7) / 17)];\n };\n /*-- Constants --*/\n Mode.NUMERIC = new Mode(0x1, [10, 12, 14]);\n Mode.ALPHANUMERIC = new Mode(0x2, [9, 11, 13]);\n Mode.BYTE = new Mode(0x4, [8, 16, 16]);\n Mode.KANJI = new Mode(0x8, [8, 10, 12]);\n Mode.ECI = new Mode(0x7, [0, 0, 0]);\n return Mode;\n }());\n QrSegment.Mode = Mode;\n })(qrcodegen.QrSegment || (qrcodegen.QrSegment = {}));\n})(qrcodegen || (qrcodegen = {}));\nvar QR = qrcodegen;\n\nvar defaultErrorCorrectLevel = 'L';\nvar ErrorCorrectLevelMap = {\n L: QR.QrCode.Ecc.LOW,\n M: QR.QrCode.Ecc.MEDIUM,\n Q: QR.QrCode.Ecc.QUARTILE,\n H: QR.QrCode.Ecc.HIGH,\n};\n// Thanks the `qrcode.react`\nvar SUPPORTS_PATH2D = (function () {\n try {\n new Path2D().addPath(new Path2D());\n }\n catch (e) {\n return false;\n }\n return true;\n})();\nfunction validErrorCorrectLevel(level) {\n return level in ErrorCorrectLevelMap;\n}\nfunction generatePath(modules, margin) {\n if (margin === void 0) { margin = 0; }\n var ops = [];\n modules.forEach(function (row, y) {\n var start = null;\n row.forEach(function (cell, x) {\n if (!cell && start !== null) {\n // M0 0h7v1H0z injects the space with the move and drops the comma,\n // saving a char per operation\n ops.push(\"M\".concat(start + margin, \" \").concat(y + margin, \"h\").concat(x - start, \"v1H\").concat(start + margin, \"z\"));\n start = null;\n return;\n }\n // end of row, clean up or skip\n if (x === row.length - 1) {\n if (!cell) {\n // We would have closed the op above already so this can only mean\n // 2+ light modules in a row.\n return;\n }\n if (start === null) {\n // Just a single dark module.\n ops.push(\"M\".concat(x + margin, \",\").concat(y + margin, \" h1v1H\").concat(x + margin, \"z\"));\n }\n else {\n // Otherwise finish the current line.\n ops.push(\"M\".concat(start + margin, \",\").concat(y + margin, \" h\").concat(x + 1 - start, \"v1H\").concat(start + margin, \"z\"));\n }\n return;\n }\n if (cell && start === null) {\n start = x;\n }\n });\n });\n return ops.join('');\n}\nfunction getImageSettings(cells, size, margin, imageSettings) {\n var width = imageSettings.width, height = imageSettings.height, imageX = imageSettings.x, imageY = imageSettings.y;\n var numCells = cells.length + margin * 2;\n var defaultSize = Math.floor(size * 0.1);\n var scale = numCells / size;\n var w = (width || defaultSize) * scale;\n var h = (height || defaultSize) * scale;\n var x = imageX == null ? cells.length / 2 - w / 2 : imageX * scale;\n var y = imageY == null ? cells.length / 2 - h / 2 : imageY * scale;\n var excavation = null;\n if (imageSettings.excavate) {\n var floorX = Math.floor(x);\n var floorY = Math.floor(y);\n var ceilW = Math.ceil(w + x - floorX);\n var ceilH = Math.ceil(h + y - floorY);\n excavation = { x: floorX, y: floorY, w: ceilW, h: ceilH };\n }\n return { x: x, y: y, h: h, w: w, excavation: excavation };\n}\nfunction excavateModules(modules, excavation) {\n return modules.slice().map(function (row, y) {\n if (y < excavation.y || y >= excavation.y + excavation.h) {\n return row;\n }\n return row.map(function (cell, x) {\n if (x < excavation.x || x >= excavation.x + excavation.w) {\n return cell;\n }\n return false;\n });\n });\n}\nvar QRCodeProps = {\n value: {\n type: String,\n required: true,\n default: '',\n },\n size: {\n type: Number,\n default: 100,\n },\n level: {\n type: String,\n default: defaultErrorCorrectLevel,\n validator: function (l) { return validErrorCorrectLevel(l); },\n },\n background: {\n type: String,\n default: '#fff',\n },\n foreground: {\n type: String,\n default: '#000',\n },\n margin: {\n type: Number,\n required: false,\n default: 0,\n },\n imageSettings: {\n type: Object,\n required: false,\n default: function () { return ({}); },\n },\n gradient: {\n type: Boolean,\n required: false,\n default: false,\n },\n gradientType: {\n type: String,\n required: false,\n default: 'linear',\n validator: function (t) { return ['linear', 'radial'].indexOf(t) > -1; },\n },\n gradientStartColor: {\n type: String,\n required: false,\n default: '#000',\n },\n gradientEndColor: {\n type: String,\n required: false,\n default: '#fff',\n },\n};\nvar QRCodeVueProps = __assign(__assign({}, QRCodeProps), { renderAs: {\n type: String,\n required: false,\n default: 'canvas',\n validator: function (as) { return ['canvas', 'svg'].indexOf(as) > -1; },\n } });\nvar QrcodeSvg = defineComponent({\n name: 'QRCodeSvg',\n props: QRCodeProps,\n setup: function (props) {\n var numCells = ref(0);\n var fgPath = ref('');\n var imageProps;\n var generate = function () {\n var value = props.value, _level = props.level, _margin = props.margin;\n var margin = _margin >>> 0;\n var level = validErrorCorrectLevel(_level) ? _level : defaultErrorCorrectLevel;\n var cells = QR.QrCode.encodeText(value, ErrorCorrectLevelMap[level]).getModules();\n numCells.value = cells.length + margin * 2;\n if (props.imageSettings.src) {\n var imageSettings = getImageSettings(cells, props.size, margin, props.imageSettings);\n imageProps = {\n x: imageSettings.x + margin,\n y: imageSettings.y + margin,\n width: imageSettings.w,\n height: imageSettings.h,\n };\n if (imageSettings.excavation) {\n cells = excavateModules(cells, imageSettings.excavation);\n }\n }\n // Drawing strategy: instead of a rect per module, we're going to create a\n // single path for the dark modules and layer that on top of a light rect,\n // for a total of 2 DOM nodes. We pay a bit more in string concat but that's\n // way faster than DOM ops.\n // For level 1, 441 nodes -> 2\n // For level 40, 31329 -> 2\n fgPath.value = generatePath(cells, margin);\n };\n var renderGradient = function () {\n if (!props.gradient)\n return null;\n var gradientProps = props.gradientType === 'linear'\n ? {\n x1: '0%',\n y1: '0%',\n x2: '100%',\n y2: '100%',\n }\n : {\n cx: '50%',\n cy: '50%',\n r: '50%',\n fx: '50%',\n fy: '50%',\n };\n return h(props.gradientType === 'linear' ? 'linearGradient' : 'radialGradient', __assign({ id: 'qr-gradient' }, gradientProps), [\n h('stop', {\n offset: '0%',\n style: { stopColor: props.gradientStartColor },\n }),\n h('stop', {\n offset: '100%',\n style: { stopColor: props.gradientEndColor },\n }),\n ]);\n };\n generate();\n onUpdated(generate);\n return function () { return h('svg', {\n width: props.size,\n height: props.size,\n 'shape-rendering': \"crispEdges\",\n xmlns: 'http://www.w3.org/2000/svg',\n viewBox: \"0 0 \".concat(numCells.value, \" \").concat(numCells.value),\n }, [\n h('defs', {}, [renderGradient()]),\n h('rect', {\n width: '100%',\n height: '100%',\n fill: props.background,\n }),\n h('path', {\n fill: props.gradient ? 'url(#qr-gradient)' : props.foreground,\n d: fgPath.value,\n }),\n props.imageSettings.src && h('image', __assign({ href: props.imageSettings.src }, imageProps)),\n ]); };\n },\n});\nvar QrcodeCanvas = defineComponent({\n name: 'QRCodeCanvas',\n props: QRCodeProps,\n setup: function (props, ctx) {\n var canvasEl = ref(null);\n var imageRef = ref(null);\n var generate = function () {\n var value = props.value, _level = props.level, size = props.size, _margin = props.margin, background = props.background, foreground = props.foreground, gradient = props.gradient, gradientType = props.gradientType, gradientStartColor = props.gradientStartColor, gradientEndColor = props.gradientEndColor;\n var margin = _margin >>> 0;\n var level = validErrorCorrectLevel(_level) ? _level : defaultErrorCorrectLevel;\n var canvas = canvasEl.value;\n if (!canvas) {\n return;\n }\n var ctx = canvas.getContext('2d');\n if (!ctx) {\n return;\n }\n var cells = QR.QrCode.encodeText(value, ErrorCorrectLevelMap[level]).getModules();\n var numCells = cells.length + margin * 2;\n var image = imageRef.value;\n var imageProps = { x: 0, y: 0, width: 0, height: 0 };\n var showImage = props.imageSettings.src && image != null && image.naturalWidth !== 0 && image.naturalHeight !== 0;\n if (showImage) {\n var imageSettings = getImageSettings(cells, props.size, margin, props.imageSettings);\n imageProps = {\n x: imageSettings.x + margin,\n y: imageSettings.y + margin,\n width: imageSettings.w,\n height: imageSettings.h,\n };\n if (imageSettings.excavation) {\n cells = excavateModules(cells, imageSettings.excavation);\n }\n }\n var devicePixelRatio = window.devicePixelRatio || 1;\n var scale = (size / numCells) * devicePixelRatio;\n canvas.height = canvas.width = size * devicePixelRatio;\n ctx.scale(scale, scale);\n ctx.fillStyle = background;\n ctx.fillRect(0, 0, numCells, numCells);\n if (gradient) {\n var grad = void 0;\n if (gradientType === 'linear') {\n grad = ctx.createLinearGradient(0, 0, numCells, numCells);\n }\n else {\n grad = ctx.createRadialGradient(numCells / 2, numCells / 2, 0, numCells / 2, numCells / 2, numCells / 2);\n }\n grad.addColorStop(0, gradientStartColor);\n grad.addColorStop(1, gradientEndColor);\n ctx.fillStyle = grad;\n }\n else {\n ctx.fillStyle = foreground;\n }\n if (SUPPORTS_PATH2D) {\n ctx.fill(new Path2D(generatePath(cells, margin)));\n }\n else {\n cells.forEach(function (row, rdx) {\n row.forEach(function (cell, cdx) {\n if (cell) {\n ctx.fillRect(cdx + margin, rdx + margin, 1, 1);\n }\n });\n });\n }\n if (showImage) {\n ctx.drawImage(image, imageProps.x, imageProps.y, imageProps.width, imageProps.height);\n }\n };\n onMounted(generate);\n onUpdated(generate);\n var style = ctx.attrs.style;\n return function () { return h(Fragment, [\n h('canvas', __assign(__assign({}, ctx.attrs), { ref: canvasEl, style: __assign(__assign({}, style), { width: \"\".concat(props.size, \"px\"), height: \"\".concat(props.size, \"px\") }) })),\n props.imageSettings.src && h('img', {\n ref: imageRef,\n src: props.imageSettings.src,\n style: { display: 'none' },\n onLoad: generate,\n })\n ]); };\n },\n});\nvar QrcodeVue = defineComponent({\n name: 'Qrcode',\n render: function () {\n var _a = this.$props, renderAs = _a.renderAs, value = _a.value, size = _a.size, margin = _a.margin, level = _a.level, background = _a.background, foreground = _a.foreground, imageSettings = _a.imageSettings, gradient = _a.gradient, gradientType = _a.gradientType, gradientStartColor = _a.gradientStartColor, gradientEndColor = _a.gradientEndColor;\n return h(renderAs === 'svg' ? QrcodeSvg : QrcodeCanvas, {\n value: value,\n size: size,\n margin: margin,\n level: level,\n background: background,\n foreground: foreground,\n imageSettings: imageSettings,\n gradient: gradient,\n gradientType: gradientType,\n gradientStartColor: gradientStartColor,\n gradientEndColor: gradientEndColor,\n });\n },\n props: QRCodeVueProps,\n});\n\nexport { QrcodeCanvas, QrcodeSvg, QrcodeVue as default };\n","/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2024 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @licend The above is the entire license notice for the\n * JavaScript code in this page\n */\n\n/******/ var __webpack_modules__ = ({\n\n/***/ 9306:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isCallable = __webpack_require__(4901);\nvar tryToString = __webpack_require__(6823);\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw new $TypeError(tryToString(argument) + ' is not a function');\n};\n\n\n/***/ }),\n\n/***/ 3506:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isPossiblePrototype = __webpack_require__(3925);\n\nvar $String = String;\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument) {\n if (isPossiblePrototype(argument)) return argument;\n throw new $TypeError(\"Can't set \" + $String(argument) + ' as a prototype');\n};\n\n\n/***/ }),\n\n/***/ 7080:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar has = (__webpack_require__(4402).has);\n\n// Perform ? RequireInternalSlot(M, [[SetData]])\nmodule.exports = function (it) {\n has(it);\n return it;\n};\n\n\n/***/ }),\n\n/***/ 679:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isPrototypeOf = __webpack_require__(1625);\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it, Prototype) {\n if (isPrototypeOf(Prototype, it)) return it;\n throw new $TypeError('Incorrect invocation');\n};\n\n\n/***/ }),\n\n/***/ 8551:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isObject = __webpack_require__(34);\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw new $TypeError($String(argument) + ' is not an object');\n};\n\n\n/***/ }),\n\n/***/ 7811:\n/***/ ((module) => {\n\n\n// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';\n\n\n/***/ }),\n\n/***/ 7394:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar uncurryThisAccessor = __webpack_require__(6706);\nvar classof = __webpack_require__(2195);\n\nvar ArrayBuffer = globalThis.ArrayBuffer;\nvar TypeError = globalThis.TypeError;\n\n// Includes\n// - Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).\n// - If IsSharedArrayBuffer(O) is true, throw a TypeError exception.\nmodule.exports = ArrayBuffer && uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) {\n if (classof(O) !== 'ArrayBuffer') throw new TypeError('ArrayBuffer expected');\n return O.byteLength;\n};\n\n\n/***/ }),\n\n/***/ 3238:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar uncurryThis = __webpack_require__(7476);\nvar arrayBufferByteLength = __webpack_require__(7394);\n\nvar ArrayBuffer = globalThis.ArrayBuffer;\nvar ArrayBufferPrototype = ArrayBuffer && ArrayBuffer.prototype;\nvar slice = ArrayBufferPrototype && uncurryThis(ArrayBufferPrototype.slice);\n\nmodule.exports = function (O) {\n if (arrayBufferByteLength(O) !== 0) return false;\n if (!slice) return false;\n try {\n slice(O, 0, 0);\n return false;\n } catch (error) {\n return true;\n }\n};\n\n\n/***/ }),\n\n/***/ 5169:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isDetached = __webpack_require__(3238);\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it) {\n if (isDetached(it)) throw new $TypeError('ArrayBuffer is detached');\n return it;\n};\n\n\n/***/ }),\n\n/***/ 5636:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar uncurryThis = __webpack_require__(9504);\nvar uncurryThisAccessor = __webpack_require__(6706);\nvar toIndex = __webpack_require__(7696);\nvar notDetached = __webpack_require__(5169);\nvar arrayBufferByteLength = __webpack_require__(7394);\nvar detachTransferable = __webpack_require__(4483);\nvar PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(1548);\n\nvar structuredClone = globalThis.structuredClone;\nvar ArrayBuffer = globalThis.ArrayBuffer;\nvar DataView = globalThis.DataView;\nvar min = Math.min;\nvar ArrayBufferPrototype = ArrayBuffer.prototype;\nvar DataViewPrototype = DataView.prototype;\nvar slice = uncurryThis(ArrayBufferPrototype.slice);\nvar isResizable = uncurryThisAccessor(ArrayBufferPrototype, 'resizable', 'get');\nvar maxByteLength = uncurryThisAccessor(ArrayBufferPrototype, 'maxByteLength', 'get');\nvar getInt8 = uncurryThis(DataViewPrototype.getInt8);\nvar setInt8 = uncurryThis(DataViewPrototype.setInt8);\n\nmodule.exports = (PROPER_STRUCTURED_CLONE_TRANSFER || detachTransferable) && function (arrayBuffer, newLength, preserveResizability) {\n var byteLength = arrayBufferByteLength(arrayBuffer);\n var newByteLength = newLength === undefined ? byteLength : toIndex(newLength);\n var fixedLength = !isResizable || !isResizable(arrayBuffer);\n var newBuffer;\n notDetached(arrayBuffer);\n if (PROPER_STRUCTURED_CLONE_TRANSFER) {\n arrayBuffer = structuredClone(arrayBuffer, { transfer: [arrayBuffer] });\n if (byteLength === newByteLength && (preserveResizability || fixedLength)) return arrayBuffer;\n }\n if (byteLength >= newByteLength && (!preserveResizability || fixedLength)) {\n newBuffer = slice(arrayBuffer, 0, newByteLength);\n } else {\n var options = preserveResizability && !fixedLength && maxByteLength ? { maxByteLength: maxByteLength(arrayBuffer) } : undefined;\n newBuffer = new ArrayBuffer(newByteLength, options);\n var a = new DataView(arrayBuffer);\n var b = new DataView(newBuffer);\n var copyLength = min(newByteLength, byteLength);\n for (var i = 0; i < copyLength; i++) setInt8(b, i, getInt8(a, i));\n }\n if (!PROPER_STRUCTURED_CLONE_TRANSFER) detachTransferable(arrayBuffer);\n return newBuffer;\n};\n\n\n/***/ }),\n\n/***/ 4644:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar NATIVE_ARRAY_BUFFER = __webpack_require__(7811);\nvar DESCRIPTORS = __webpack_require__(3724);\nvar globalThis = __webpack_require__(4576);\nvar isCallable = __webpack_require__(4901);\nvar isObject = __webpack_require__(34);\nvar hasOwn = __webpack_require__(9297);\nvar classof = __webpack_require__(6955);\nvar tryToString = __webpack_require__(6823);\nvar createNonEnumerableProperty = __webpack_require__(6699);\nvar defineBuiltIn = __webpack_require__(6840);\nvar defineBuiltInAccessor = __webpack_require__(2106);\nvar isPrototypeOf = __webpack_require__(1625);\nvar getPrototypeOf = __webpack_require__(2787);\nvar setPrototypeOf = __webpack_require__(2967);\nvar wellKnownSymbol = __webpack_require__(8227);\nvar uid = __webpack_require__(3392);\nvar InternalStateModule = __webpack_require__(1181);\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar Int8Array = globalThis.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = globalThis.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar TypeError = globalThis.TypeError;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(globalThis.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQUIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar getTypedArrayConstructor = function (it) {\n var proto = getPrototypeOf(it);\n if (!isObject(proto)) return;\n var state = getInternalState(proto);\n return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw new TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;\n throw new TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced, options) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = globalThis[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) {\n // old WebKit bug - some methods are non-configurable\n try {\n TypedArrayConstructor.prototype[KEY] = property;\n } catch (error2) { /* empty */ }\n }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n defineBuiltIn(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = globalThis[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = globalThis[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n defineBuiltIn(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n Constructor = globalThis[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n Constructor = globalThis[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw new TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (globalThis[NAME]) setPrototypeOf(globalThis[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (globalThis[NAME]) setPrototypeOf(globalThis[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQUIRED = true;\n defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, {\n configurable: true,\n get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n }\n });\n for (NAME in TypedArrayConstructorsList) if (globalThis[NAME]) {\n createNonEnumerableProperty(globalThis[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n getTypedArrayConstructor: getTypedArrayConstructor,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n\n\n/***/ }),\n\n/***/ 5370:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar lengthOfArrayLike = __webpack_require__(6198);\n\nmodule.exports = function (Constructor, list, $length) {\n var index = 0;\n var length = arguments.length > 2 ? $length : lengthOfArrayLike(list);\n var result = new Constructor(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\n\n/***/ }),\n\n/***/ 9617:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar toIndexedObject = __webpack_require__(5397);\nvar toAbsoluteIndex = __webpack_require__(5610);\nvar lengthOfArrayLike = __webpack_require__(6198);\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n if (length === 0) return !IS_INCLUDES && -1;\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el !== el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value !== value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n\n\n/***/ }),\n\n/***/ 4527:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar isArray = __webpack_require__(4376);\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Safari < 13 does not throw an error in this case\nvar SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {\n // makes no sense without proper strict mode support\n if (this !== undefined) return true;\n try {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty([], 'length', { writable: false }).length = 1;\n } catch (error) {\n return error instanceof TypeError;\n }\n}();\n\nmodule.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {\n if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {\n throw new $TypeError('Cannot set read only .length');\n } return O.length = length;\n} : function (O, length) {\n return O.length = length;\n};\n\n\n/***/ }),\n\n/***/ 7628:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar lengthOfArrayLike = __webpack_require__(6198);\n\n// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toReversed\n// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed\nmodule.exports = function (O, C) {\n var len = lengthOfArrayLike(O);\n var A = new C(len);\n var k = 0;\n for (; k < len; k++) A[k] = O[len - k - 1];\n return A;\n};\n\n\n/***/ }),\n\n/***/ 9928:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar lengthOfArrayLike = __webpack_require__(6198);\nvar toIntegerOrInfinity = __webpack_require__(1291);\n\nvar $RangeError = RangeError;\n\n// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.with\n// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with\nmodule.exports = function (O, C, index, value) {\n var len = lengthOfArrayLike(O);\n var relativeIndex = toIntegerOrInfinity(index);\n var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;\n if (actualIndex >= len || actualIndex < 0) throw new $RangeError('Incorrect index');\n var A = new C(len);\n var k = 0;\n for (; k < len; k++) A[k] = k === actualIndex ? value : O[k];\n return A;\n};\n\n\n/***/ }),\n\n/***/ 6319:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar anObject = __webpack_require__(8551);\nvar iteratorClose = __webpack_require__(9539);\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n};\n\n\n/***/ }),\n\n/***/ 2195:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n\n\n/***/ }),\n\n/***/ 6955:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar TO_STRING_TAG_SUPPORT = __webpack_require__(2140);\nvar isCallable = __webpack_require__(4901);\nvar classofRaw = __webpack_require__(2195);\nvar wellKnownSymbol = __webpack_require__(8227);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n\n\n/***/ }),\n\n/***/ 7740:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar hasOwn = __webpack_require__(9297);\nvar ownKeys = __webpack_require__(5031);\nvar getOwnPropertyDescriptorModule = __webpack_require__(7347);\nvar definePropertyModule = __webpack_require__(4913);\n\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n\n\n/***/ }),\n\n/***/ 2211:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar fails = __webpack_require__(9039);\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n\n\n/***/ }),\n\n/***/ 2529:\n/***/ ((module) => {\n\n\n// `CreateIterResultObject` abstract operation\n// https://tc39.es/ecma262/#sec-createiterresultobject\nmodule.exports = function (value, done) {\n return { value: value, done: done };\n};\n\n\n/***/ }),\n\n/***/ 6699:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar definePropertyModule = __webpack_require__(4913);\nvar createPropertyDescriptor = __webpack_require__(6980);\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n/***/ }),\n\n/***/ 6980:\n/***/ ((module) => {\n\n\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n/***/ }),\n\n/***/ 4659:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar definePropertyModule = __webpack_require__(4913);\nvar createPropertyDescriptor = __webpack_require__(6980);\n\nmodule.exports = function (object, key, value) {\n if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));\n else object[key] = value;\n};\n\n\n/***/ }),\n\n/***/ 2106:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar makeBuiltIn = __webpack_require__(283);\nvar defineProperty = __webpack_require__(4913);\n\nmodule.exports = function (target, name, descriptor) {\n if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });\n if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });\n return defineProperty.f(target, name, descriptor);\n};\n\n\n/***/ }),\n\n/***/ 6840:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isCallable = __webpack_require__(4901);\nvar definePropertyModule = __webpack_require__(4913);\nvar makeBuiltIn = __webpack_require__(283);\nvar defineGlobalProperty = __webpack_require__(9433);\n\nmodule.exports = function (O, key, value, options) {\n if (!options) options = {};\n var simple = options.enumerable;\n var name = options.name !== undefined ? options.name : key;\n if (isCallable(value)) makeBuiltIn(value, name, options);\n if (options.global) {\n if (simple) O[key] = value;\n else defineGlobalProperty(key, value);\n } else {\n try {\n if (!options.unsafe) delete O[key];\n else if (O[key]) simple = true;\n } catch (error) { /* empty */ }\n if (simple) O[key] = value;\n else definePropertyModule.f(O, key, {\n value: value,\n enumerable: false,\n configurable: !options.nonConfigurable,\n writable: !options.nonWritable\n });\n } return O;\n};\n\n\n/***/ }),\n\n/***/ 6279:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar defineBuiltIn = __webpack_require__(6840);\n\nmodule.exports = function (target, src, options) {\n for (var key in src) defineBuiltIn(target, key, src[key], options);\n return target;\n};\n\n\n/***/ }),\n\n/***/ 9433:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(globalThis, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n globalThis[key] = value;\n } return value;\n};\n\n\n/***/ }),\n\n/***/ 3724:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar fails = __webpack_require__(9039);\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;\n});\n\n\n/***/ }),\n\n/***/ 4483:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar getBuiltInNodeModule = __webpack_require__(9429);\nvar PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(1548);\n\nvar structuredClone = globalThis.structuredClone;\nvar $ArrayBuffer = globalThis.ArrayBuffer;\nvar $MessageChannel = globalThis.MessageChannel;\nvar detach = false;\nvar WorkerThreads, channel, buffer, $detach;\n\nif (PROPER_STRUCTURED_CLONE_TRANSFER) {\n detach = function (transferable) {\n structuredClone(transferable, { transfer: [transferable] });\n };\n} else if ($ArrayBuffer) try {\n if (!$MessageChannel) {\n WorkerThreads = getBuiltInNodeModule('worker_threads');\n if (WorkerThreads) $MessageChannel = WorkerThreads.MessageChannel;\n }\n\n if ($MessageChannel) {\n channel = new $MessageChannel();\n buffer = new $ArrayBuffer(2);\n\n $detach = function (transferable) {\n channel.port1.postMessage(null, [transferable]);\n };\n\n if (buffer.byteLength === 2) {\n $detach(buffer);\n if (buffer.byteLength === 0) detach = $detach;\n }\n }\n} catch (error) { /* empty */ }\n\nmodule.exports = detach;\n\n\n/***/ }),\n\n/***/ 4055:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar isObject = __webpack_require__(34);\n\nvar document = globalThis.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n\n\n/***/ }),\n\n/***/ 6837:\n/***/ ((module) => {\n\n\nvar $TypeError = TypeError;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991\n\nmodule.exports = function (it) {\n if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');\n return it;\n};\n\n\n/***/ }),\n\n/***/ 5002:\n/***/ ((module) => {\n\n\nmodule.exports = {\n IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },\n DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },\n HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },\n WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },\n InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },\n NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },\n NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },\n NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },\n NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },\n InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },\n InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },\n SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },\n InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },\n NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },\n InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },\n ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },\n TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },\n SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },\n NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },\n AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },\n URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },\n QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },\n TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },\n InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },\n DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }\n};\n\n\n/***/ }),\n\n/***/ 8727:\n/***/ ((module) => {\n\n\n// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n\n\n/***/ }),\n\n/***/ 6193:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar ENVIRONMENT = __webpack_require__(4215);\n\nmodule.exports = ENVIRONMENT === 'NODE';\n\n\n/***/ }),\n\n/***/ 2839:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\n\nvar navigator = globalThis.navigator;\nvar userAgent = navigator && navigator.userAgent;\n\nmodule.exports = userAgent ? String(userAgent) : '';\n\n\n/***/ }),\n\n/***/ 9519:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar userAgent = __webpack_require__(2839);\n\nvar process = globalThis.process;\nvar Deno = globalThis.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\n\nmodule.exports = version;\n\n\n/***/ }),\n\n/***/ 4215:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n/* global Bun, Deno -- detection */\nvar globalThis = __webpack_require__(4576);\nvar userAgent = __webpack_require__(2839);\nvar classof = __webpack_require__(2195);\n\nvar userAgentStartsWith = function (string) {\n return userAgent.slice(0, string.length) === string;\n};\n\nmodule.exports = (function () {\n if (userAgentStartsWith('Bun/')) return 'BUN';\n if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';\n if (userAgentStartsWith('Deno/')) return 'DENO';\n if (userAgentStartsWith('Node.js/')) return 'NODE';\n if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';\n if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';\n if (classof(globalThis.process) === 'process') return 'NODE';\n if (globalThis.window && globalThis.document) return 'BROWSER';\n return 'REST';\n})();\n\n\n/***/ }),\n\n/***/ 8574:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\n\nvar $Error = Error;\nvar replace = uncurryThis(''.replace);\n\nvar TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');\n// eslint-disable-next-line redos/no-vulnerable -- safe\nvar V8_OR_CHAKRA_STACK_ENTRY = /\\n\\s*at [^:]*:[^\\n]*/;\nvar IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);\n\nmodule.exports = function (stack, dropEntries) {\n if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {\n while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');\n } return stack;\n};\n\n\n/***/ }),\n\n/***/ 6518:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar getOwnPropertyDescriptor = (__webpack_require__(7347).f);\nvar createNonEnumerableProperty = __webpack_require__(6699);\nvar defineBuiltIn = __webpack_require__(6840);\nvar defineGlobalProperty = __webpack_require__(9433);\nvar copyConstructorProperties = __webpack_require__(7740);\nvar isForced = __webpack_require__(2796);\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = globalThis;\n } else if (STATIC) {\n target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});\n } else {\n target = globalThis[TARGET] && globalThis[TARGET].prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n defineBuiltIn(target, key, sourceProperty, options);\n }\n};\n\n\n/***/ }),\n\n/***/ 9039:\n/***/ ((module) => {\n\n\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n\n\n/***/ }),\n\n/***/ 6080:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(7476);\nvar aCallable = __webpack_require__(9306);\nvar NATIVE_BIND = __webpack_require__(616);\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n/***/ }),\n\n/***/ 616:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar fails = __webpack_require__(9039);\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n\n\n/***/ }),\n\n/***/ 9565:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar NATIVE_BIND = __webpack_require__(616);\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n\n\n/***/ }),\n\n/***/ 350:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar hasOwn = __webpack_require__(9297);\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n\n\n/***/ }),\n\n/***/ 6706:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\nvar aCallable = __webpack_require__(9306);\n\nmodule.exports = function (object, key, method) {\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));\n } catch (error) { /* empty */ }\n};\n\n\n/***/ }),\n\n/***/ 7476:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar classofRaw = __webpack_require__(2195);\nvar uncurryThis = __webpack_require__(9504);\n\nmodule.exports = function (fn) {\n // Nashorn bug:\n // https://github.com/zloirock/core-js/issues/1128\n // https://github.com/zloirock/core-js/issues/1130\n if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n};\n\n\n/***/ }),\n\n/***/ 9504:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar NATIVE_BIND = __webpack_require__(616);\n\nvar FunctionPrototype = Function.prototype;\nvar call = FunctionPrototype.call;\nvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n return function () {\n return call.apply(fn, arguments);\n };\n};\n\n\n/***/ }),\n\n/***/ 9429:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar IS_NODE = __webpack_require__(6193);\n\nmodule.exports = function (name) {\n if (IS_NODE) {\n try {\n return globalThis.process.getBuiltinModule(name);\n } catch (error) { /* empty */ }\n try {\n // eslint-disable-next-line no-new-func -- safe\n return Function('return require(\"' + name + '\")')();\n } catch (error) { /* empty */ }\n }\n};\n\n\n/***/ }),\n\n/***/ 7751:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar isCallable = __webpack_require__(4901);\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];\n};\n\n\n/***/ }),\n\n/***/ 1767:\n/***/ ((module) => {\n\n\n// `GetIteratorDirect(obj)` abstract operation\n// https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect\nmodule.exports = function (obj) {\n return {\n iterator: obj,\n next: obj.next,\n done: false\n };\n};\n\n\n/***/ }),\n\n/***/ 8646:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar call = __webpack_require__(9565);\nvar anObject = __webpack_require__(8551);\nvar getIteratorDirect = __webpack_require__(1767);\nvar getIteratorMethod = __webpack_require__(851);\n\nmodule.exports = function (obj, stringHandling) {\n if (!stringHandling || typeof obj !== 'string') anObject(obj);\n var method = getIteratorMethod(obj);\n return getIteratorDirect(anObject(method !== undefined ? call(method, obj) : obj));\n};\n\n\n/***/ }),\n\n/***/ 851:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar classof = __webpack_require__(6955);\nvar getMethod = __webpack_require__(5966);\nvar isNullOrUndefined = __webpack_require__(4117);\nvar Iterators = __webpack_require__(6269);\nvar wellKnownSymbol = __webpack_require__(8227);\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)\n || getMethod(it, '@@iterator')\n || Iterators[classof(it)];\n};\n\n\n/***/ }),\n\n/***/ 81:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar call = __webpack_require__(9565);\nvar aCallable = __webpack_require__(9306);\nvar anObject = __webpack_require__(8551);\nvar tryToString = __webpack_require__(6823);\nvar getIteratorMethod = __webpack_require__(851);\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));\n throw new $TypeError(tryToString(argument) + ' is not iterable');\n};\n\n\n/***/ }),\n\n/***/ 5966:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aCallable = __webpack_require__(9306);\nvar isNullOrUndefined = __webpack_require__(4117);\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return isNullOrUndefined(func) ? undefined : aCallable(func);\n};\n\n\n/***/ }),\n\n/***/ 3789:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aCallable = __webpack_require__(9306);\nvar anObject = __webpack_require__(8551);\nvar call = __webpack_require__(9565);\nvar toIntegerOrInfinity = __webpack_require__(1291);\nvar getIteratorDirect = __webpack_require__(1767);\n\nvar INVALID_SIZE = 'Invalid size';\nvar $RangeError = RangeError;\nvar $TypeError = TypeError;\nvar max = Math.max;\n\nvar SetRecord = function (set, intSize) {\n this.set = set;\n this.size = max(intSize, 0);\n this.has = aCallable(set.has);\n this.keys = aCallable(set.keys);\n};\n\nSetRecord.prototype = {\n getIterator: function () {\n return getIteratorDirect(anObject(call(this.keys, this.set)));\n },\n includes: function (it) {\n return call(this.has, this.set, it);\n }\n};\n\n// `GetSetRecord` abstract operation\n// https://tc39.es/proposal-set-methods/#sec-getsetrecord\nmodule.exports = function (obj) {\n anObject(obj);\n var numSize = +obj.size;\n // NOTE: If size is undefined, then numSize will be NaN\n // eslint-disable-next-line no-self-compare -- NaN check\n if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);\n var intSize = toIntegerOrInfinity(numSize);\n if (intSize < 0) throw new $RangeError(INVALID_SIZE);\n return new SetRecord(obj, intSize);\n};\n\n\n/***/ }),\n\n/***/ 4576:\n/***/ (function(module) {\n\n\nvar check = function (it) {\n return it && it.Math === Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n check(typeof this == 'object' && this) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n\n\n/***/ }),\n\n/***/ 9297:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\nvar toObject = __webpack_require__(8981);\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n\n\n/***/ }),\n\n/***/ 421:\n/***/ ((module) => {\n\n\nmodule.exports = {};\n\n\n/***/ }),\n\n/***/ 397:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar getBuiltIn = __webpack_require__(7751);\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n\n\n/***/ }),\n\n/***/ 5917:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar fails = __webpack_require__(9039);\nvar createElement = __webpack_require__(4055);\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a !== 7;\n});\n\n\n/***/ }),\n\n/***/ 7055:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\nvar fails = __webpack_require__(9039);\nvar classof = __webpack_require__(2195);\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) === 'String' ? split(it, '') : $Object(it);\n} : $Object;\n\n\n/***/ }),\n\n/***/ 3167:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isCallable = __webpack_require__(4901);\nvar isObject = __webpack_require__(34);\nvar setPrototypeOf = __webpack_require__(2967);\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n isCallable(NewTarget = dummy.constructor) &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n\n\n/***/ }),\n\n/***/ 3706:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\nvar isCallable = __webpack_require__(4901);\nvar store = __webpack_require__(7629);\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n\n\n/***/ }),\n\n/***/ 1181:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar NATIVE_WEAK_MAP = __webpack_require__(8622);\nvar globalThis = __webpack_require__(4576);\nvar isObject = __webpack_require__(34);\nvar createNonEnumerableProperty = __webpack_require__(6699);\nvar hasOwn = __webpack_require__(9297);\nvar shared = __webpack_require__(7629);\nvar sharedKey = __webpack_require__(6119);\nvar hiddenKeys = __webpack_require__(421);\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = globalThis.TypeError;\nvar WeakMap = globalThis.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw new TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n /* eslint-disable no-self-assign -- prototype methods protection */\n store.get = store.get;\n store.has = store.has;\n store.set = store.set;\n /* eslint-enable no-self-assign -- prototype methods protection */\n set = function (it, metadata) {\n if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n store.set(it, metadata);\n return metadata;\n };\n get = function (it) {\n return store.get(it) || {};\n };\n has = function (it) {\n return store.has(it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n\n\n/***/ }),\n\n/***/ 4209:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar wellKnownSymbol = __webpack_require__(8227);\nvar Iterators = __webpack_require__(6269);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n\n\n/***/ }),\n\n/***/ 4376:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar classof = __webpack_require__(2195);\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n return classof(argument) === 'Array';\n};\n\n\n/***/ }),\n\n/***/ 1108:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar classof = __webpack_require__(6955);\n\nmodule.exports = function (it) {\n var klass = classof(it);\n return klass === 'BigInt64Array' || klass === 'BigUint64Array';\n};\n\n\n/***/ }),\n\n/***/ 4901:\n/***/ ((module) => {\n\n\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\nvar documentAll = typeof document == 'object' && document.all;\n\n// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\n// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\nmodule.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {\n return typeof argument == 'function' || argument === documentAll;\n} : function (argument) {\n return typeof argument == 'function';\n};\n\n\n/***/ }),\n\n/***/ 2796:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar fails = __webpack_require__(9039);\nvar isCallable = __webpack_require__(4901);\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value === POLYFILL ? true\n : value === NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n\n\n/***/ }),\n\n/***/ 4117:\n/***/ ((module) => {\n\n\n// we can't use just `it == null` since of `document.all` special case\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec\nmodule.exports = function (it) {\n return it === null || it === undefined;\n};\n\n\n/***/ }),\n\n/***/ 34:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isCallable = __webpack_require__(4901);\n\nmodule.exports = function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n\n\n/***/ }),\n\n/***/ 3925:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isObject = __webpack_require__(34);\n\nmodule.exports = function (argument) {\n return isObject(argument) || argument === null;\n};\n\n\n/***/ }),\n\n/***/ 6395:\n/***/ ((module) => {\n\n\nmodule.exports = false;\n\n\n/***/ }),\n\n/***/ 757:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar getBuiltIn = __webpack_require__(7751);\nvar isCallable = __webpack_require__(4901);\nvar isPrototypeOf = __webpack_require__(1625);\nvar USE_SYMBOL_AS_UID = __webpack_require__(7040);\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n\n\n/***/ }),\n\n/***/ 507:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar call = __webpack_require__(9565);\n\nmodule.exports = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {\n var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;\n var next = record.next;\n var step, result;\n while (!(step = call(next, iterator)).done) {\n result = fn(step.value);\n if (result !== undefined) return result;\n }\n};\n\n\n/***/ }),\n\n/***/ 2652:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar bind = __webpack_require__(6080);\nvar call = __webpack_require__(9565);\nvar anObject = __webpack_require__(8551);\nvar tryToString = __webpack_require__(6823);\nvar isArrayIteratorMethod = __webpack_require__(4209);\nvar lengthOfArrayLike = __webpack_require__(6198);\nvar isPrototypeOf = __webpack_require__(1625);\nvar getIterator = __webpack_require__(81);\nvar getIteratorMethod = __webpack_require__(851);\nvar iteratorClose = __webpack_require__(9539);\n\nvar $TypeError = TypeError;\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar ResultPrototype = Result.prototype;\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_RECORD = !!(options && options.IS_RECORD);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_RECORD) {\n iterator = iterable.iterator;\n } else if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = IS_RECORD ? iterable.next : iterator.next;\n while (!(step = call(next, iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n};\n\n\n/***/ }),\n\n/***/ 9539:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar call = __webpack_require__(9565);\nvar anObject = __webpack_require__(8551);\nvar getMethod = __webpack_require__(5966);\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = call(innerResult, iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n\n\n/***/ }),\n\n/***/ 9462:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar call = __webpack_require__(9565);\nvar create = __webpack_require__(2360);\nvar createNonEnumerableProperty = __webpack_require__(6699);\nvar defineBuiltIns = __webpack_require__(6279);\nvar wellKnownSymbol = __webpack_require__(8227);\nvar InternalStateModule = __webpack_require__(1181);\nvar getMethod = __webpack_require__(5966);\nvar IteratorPrototype = (__webpack_require__(7657).IteratorPrototype);\nvar createIterResultObject = __webpack_require__(2529);\nvar iteratorClose = __webpack_require__(9539);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ITERATOR_HELPER = 'IteratorHelper';\nvar WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';\nvar setInternalState = InternalStateModule.set;\n\nvar createIteratorProxyPrototype = function (IS_ITERATOR) {\n var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);\n\n return defineBuiltIns(create(IteratorPrototype), {\n next: function next() {\n var state = getInternalState(this);\n // for simplification:\n // for `%WrapForValidIteratorPrototype%.next` our `nextHandler` returns `IterResultObject`\n // for `%IteratorHelperPrototype%.next` - just a value\n if (IS_ITERATOR) return state.nextHandler();\n try {\n var result = state.done ? undefined : state.nextHandler();\n return createIterResultObject(result, state.done);\n } catch (error) {\n state.done = true;\n throw error;\n }\n },\n 'return': function () {\n var state = getInternalState(this);\n var iterator = state.iterator;\n state.done = true;\n if (IS_ITERATOR) {\n var returnMethod = getMethod(iterator, 'return');\n return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true);\n }\n if (state.inner) try {\n iteratorClose(state.inner.iterator, 'normal');\n } catch (error) {\n return iteratorClose(iterator, 'throw', error);\n }\n iteratorClose(iterator, 'normal');\n return createIterResultObject(undefined, true);\n }\n });\n};\n\nvar WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);\nvar IteratorHelperPrototype = createIteratorProxyPrototype(false);\n\ncreateNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');\n\nmodule.exports = function (nextHandler, IS_ITERATOR) {\n var IteratorProxy = function Iterator(record, state) {\n if (state) {\n state.iterator = record.iterator;\n state.next = record.next;\n } else state = record;\n state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;\n state.nextHandler = nextHandler;\n state.counter = 0;\n state.done = false;\n setInternalState(this, state);\n };\n\n IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;\n\n return IteratorProxy;\n};\n\n\n/***/ }),\n\n/***/ 713:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar call = __webpack_require__(9565);\nvar aCallable = __webpack_require__(9306);\nvar anObject = __webpack_require__(8551);\nvar getIteratorDirect = __webpack_require__(1767);\nvar createIteratorProxy = __webpack_require__(9462);\nvar callWithSafeIterationClosing = __webpack_require__(6319);\n\nvar IteratorProxy = createIteratorProxy(function () {\n var iterator = this.iterator;\n var result = anObject(call(this.next, iterator));\n var done = this.done = !!result.done;\n if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);\n});\n\n// `Iterator.prototype.map` method\n// https://github.com/tc39/proposal-iterator-helpers\nmodule.exports = function map(mapper) {\n anObject(this);\n aCallable(mapper);\n return new IteratorProxy(getIteratorDirect(this), {\n mapper: mapper\n });\n};\n\n\n/***/ }),\n\n/***/ 7657:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar fails = __webpack_require__(9039);\nvar isCallable = __webpack_require__(4901);\nvar isObject = __webpack_require__(34);\nvar create = __webpack_require__(2360);\nvar getPrototypeOf = __webpack_require__(2787);\nvar defineBuiltIn = __webpack_require__(6840);\nvar wellKnownSymbol = __webpack_require__(8227);\nvar IS_PURE = __webpack_require__(6395);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n\n\n/***/ }),\n\n/***/ 6269:\n/***/ ((module) => {\n\n\nmodule.exports = {};\n\n\n/***/ }),\n\n/***/ 6198:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar toLength = __webpack_require__(8014);\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n\n\n/***/ }),\n\n/***/ 283:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\nvar fails = __webpack_require__(9039);\nvar isCallable = __webpack_require__(4901);\nvar hasOwn = __webpack_require__(9297);\nvar DESCRIPTORS = __webpack_require__(3724);\nvar CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(350).CONFIGURABLE);\nvar inspectSource = __webpack_require__(3706);\nvar InternalStateModule = __webpack_require__(1181);\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar $String = String;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\nvar stringSlice = uncurryThis(''.slice);\nvar replace = uncurryThis(''.replace);\nvar join = uncurryThis([].join);\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (stringSlice($String(name), 0, 7) === 'Symbol(') {\n name = '[' + replace($String(name), /^Symbol\\(([^)]*)\\).*$/, '$1') + ']';\n }\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n else value.name = name;\n }\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', { value: options.arity });\n }\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) { /* empty */ }\n var state = enforceInternalState(value);\n if (!hasOwn(state, 'source')) {\n state.source = join(TEMPLATE, typeof name == 'string' ? name : '');\n } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n\n\n/***/ }),\n\n/***/ 741:\n/***/ ((module) => {\n\n\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n\n\n/***/ }),\n\n/***/ 6043:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aCallable = __webpack_require__(9306);\n\nvar $TypeError = TypeError;\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n\n\n/***/ }),\n\n/***/ 2603:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar toString = __webpack_require__(655);\n\nmodule.exports = function (argument, $default) {\n return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);\n};\n\n\n/***/ }),\n\n/***/ 4149:\n/***/ ((module) => {\n\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it) {\n // eslint-disable-next-line no-self-compare -- NaN check\n if (it === it) return it;\n throw new $RangeError('NaN is not allowed');\n};\n\n\n/***/ }),\n\n/***/ 2360:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n/* global ActiveXObject -- old IE, WSH */\nvar anObject = __webpack_require__(8551);\nvar definePropertiesModule = __webpack_require__(6801);\nvar enumBugKeys = __webpack_require__(8727);\nvar hiddenKeys = __webpack_require__(421);\nvar html = __webpack_require__(397);\nvar documentCreateElement = __webpack_require__(4055);\nvar sharedKey = __webpack_require__(6119);\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n // eslint-disable-next-line no-useless-assignment -- avoid memory leak\n activeXDocument = null;\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n\n\n/***/ }),\n\n/***/ 6801:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(8686);\nvar definePropertyModule = __webpack_require__(4913);\nvar anObject = __webpack_require__(8551);\nvar toIndexedObject = __webpack_require__(5397);\nvar objectKeys = __webpack_require__(1072);\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n\n\n/***/ }),\n\n/***/ 4913:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar IE8_DOM_DEFINE = __webpack_require__(5917);\nvar V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(8686);\nvar anObject = __webpack_require__(8551);\nvar toPropertyKey = __webpack_require__(6969);\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n/***/ }),\n\n/***/ 7347:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar call = __webpack_require__(9565);\nvar propertyIsEnumerableModule = __webpack_require__(8773);\nvar createPropertyDescriptor = __webpack_require__(6980);\nvar toIndexedObject = __webpack_require__(5397);\nvar toPropertyKey = __webpack_require__(6969);\nvar hasOwn = __webpack_require__(9297);\nvar IE8_DOM_DEFINE = __webpack_require__(5917);\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n\n\n/***/ }),\n\n/***/ 8480:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\nvar internalObjectKeys = __webpack_require__(1828);\nvar enumBugKeys = __webpack_require__(8727);\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n\n\n/***/ }),\n\n/***/ 3717:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n\n\n/***/ }),\n\n/***/ 2787:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar hasOwn = __webpack_require__(9297);\nvar isCallable = __webpack_require__(4901);\nvar toObject = __webpack_require__(8981);\nvar sharedKey = __webpack_require__(6119);\nvar CORRECT_PROTOTYPE_GETTER = __webpack_require__(2211);\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof $Object ? ObjectPrototype : null;\n};\n\n\n/***/ }),\n\n/***/ 1625:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n\n\n/***/ }),\n\n/***/ 1828:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\nvar hasOwn = __webpack_require__(9297);\nvar toIndexedObject = __webpack_require__(5397);\nvar indexOf = (__webpack_require__(9617).indexOf);\nvar hiddenKeys = __webpack_require__(421);\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n\n\n/***/ }),\n\n/***/ 1072:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar internalObjectKeys = __webpack_require__(1828);\nvar enumBugKeys = __webpack_require__(8727);\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n\n\n/***/ }),\n\n/***/ 8773:\n/***/ ((__unused_webpack_module, exports) => {\n\n\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n\n\n/***/ }),\n\n/***/ 2967:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n/* eslint-disable no-proto -- safe */\nvar uncurryThisAccessor = __webpack_require__(6706);\nvar isObject = __webpack_require__(34);\nvar requireObjectCoercible = __webpack_require__(7750);\nvar aPossiblePrototype = __webpack_require__(3506);\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n requireObjectCoercible(O);\n aPossiblePrototype(proto);\n if (!isObject(O)) return O;\n if (CORRECT_SETTER) setter(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n\n\n/***/ }),\n\n/***/ 4270:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar call = __webpack_require__(9565);\nvar isCallable = __webpack_require__(4901);\nvar isObject = __webpack_require__(34);\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw new $TypeError(\"Can't convert object to primitive value\");\n};\n\n\n/***/ }),\n\n/***/ 5031:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar getBuiltIn = __webpack_require__(7751);\nvar uncurryThis = __webpack_require__(9504);\nvar getOwnPropertyNamesModule = __webpack_require__(8480);\nvar getOwnPropertySymbolsModule = __webpack_require__(3717);\nvar anObject = __webpack_require__(8551);\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n\n\n/***/ }),\n\n/***/ 8235:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\nvar hasOwn = __webpack_require__(9297);\n\nvar $SyntaxError = SyntaxError;\nvar $parseInt = parseInt;\nvar fromCharCode = String.fromCharCode;\nvar at = uncurryThis(''.charAt);\nvar slice = uncurryThis(''.slice);\nvar exec = uncurryThis(/./.exec);\n\nvar codePoints = {\n '\\\\\"': '\"',\n '\\\\\\\\': '\\\\',\n '\\\\/': '/',\n '\\\\b': '\\b',\n '\\\\f': '\\f',\n '\\\\n': '\\n',\n '\\\\r': '\\r',\n '\\\\t': '\\t'\n};\n\nvar IS_4_HEX_DIGITS = /^[\\da-f]{4}$/i;\n// eslint-disable-next-line regexp/no-control-character -- safe\nvar IS_C0_CONTROL_CODE = /^[\\u0000-\\u001F]$/;\n\nmodule.exports = function (source, i) {\n var unterminated = true;\n var value = '';\n while (i < source.length) {\n var chr = at(source, i);\n if (chr === '\\\\') {\n var twoChars = slice(source, i, i + 2);\n if (hasOwn(codePoints, twoChars)) {\n value += codePoints[twoChars];\n i += 2;\n } else if (twoChars === '\\\\u') {\n i += 2;\n var fourHexDigits = slice(source, i, i + 4);\n if (!exec(IS_4_HEX_DIGITS, fourHexDigits)) throw new $SyntaxError('Bad Unicode escape at: ' + i);\n value += fromCharCode($parseInt(fourHexDigits, 16));\n i += 4;\n } else throw new $SyntaxError('Unknown escape sequence: \"' + twoChars + '\"');\n } else if (chr === '\"') {\n unterminated = false;\n i++;\n break;\n } else {\n if (exec(IS_C0_CONTROL_CODE, chr)) throw new $SyntaxError('Bad control character in string literal at: ' + i);\n value += chr;\n i++;\n }\n }\n if (unterminated) throw new $SyntaxError('Unterminated string at: ' + i);\n return { value: value, end: i };\n};\n\n\n/***/ }),\n\n/***/ 7750:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar isNullOrUndefined = __webpack_require__(4117);\n\nvar $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (isNullOrUndefined(it)) throw new $TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/***/ }),\n\n/***/ 9286:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar SetHelpers = __webpack_require__(4402);\nvar iterate = __webpack_require__(8469);\n\nvar Set = SetHelpers.Set;\nvar add = SetHelpers.add;\n\nmodule.exports = function (set) {\n var result = new Set();\n iterate(set, function (it) {\n add(result, it);\n });\n return result;\n};\n\n\n/***/ }),\n\n/***/ 3440:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aSet = __webpack_require__(7080);\nvar SetHelpers = __webpack_require__(4402);\nvar clone = __webpack_require__(9286);\nvar size = __webpack_require__(5170);\nvar getSetRecord = __webpack_require__(3789);\nvar iterateSet = __webpack_require__(8469);\nvar iterateSimple = __webpack_require__(507);\n\nvar has = SetHelpers.has;\nvar remove = SetHelpers.remove;\n\n// `Set.prototype.difference` method\n// https://github.com/tc39/proposal-set-methods\nmodule.exports = function difference(other) {\n var O = aSet(this);\n var otherRec = getSetRecord(other);\n var result = clone(O);\n if (size(O) <= otherRec.size) iterateSet(O, function (e) {\n if (otherRec.includes(e)) remove(result, e);\n });\n else iterateSimple(otherRec.getIterator(), function (e) {\n if (has(O, e)) remove(result, e);\n });\n return result;\n};\n\n\n/***/ }),\n\n/***/ 4402:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\n\n// eslint-disable-next-line es/no-set -- safe\nvar SetPrototype = Set.prototype;\n\nmodule.exports = {\n // eslint-disable-next-line es/no-set -- safe\n Set: Set,\n add: uncurryThis(SetPrototype.add),\n has: uncurryThis(SetPrototype.has),\n remove: uncurryThis(SetPrototype['delete']),\n proto: SetPrototype\n};\n\n\n/***/ }),\n\n/***/ 8750:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aSet = __webpack_require__(7080);\nvar SetHelpers = __webpack_require__(4402);\nvar size = __webpack_require__(5170);\nvar getSetRecord = __webpack_require__(3789);\nvar iterateSet = __webpack_require__(8469);\nvar iterateSimple = __webpack_require__(507);\n\nvar Set = SetHelpers.Set;\nvar add = SetHelpers.add;\nvar has = SetHelpers.has;\n\n// `Set.prototype.intersection` method\n// https://github.com/tc39/proposal-set-methods\nmodule.exports = function intersection(other) {\n var O = aSet(this);\n var otherRec = getSetRecord(other);\n var result = new Set();\n\n if (size(O) > otherRec.size) {\n iterateSimple(otherRec.getIterator(), function (e) {\n if (has(O, e)) add(result, e);\n });\n } else {\n iterateSet(O, function (e) {\n if (otherRec.includes(e)) add(result, e);\n });\n }\n\n return result;\n};\n\n\n/***/ }),\n\n/***/ 4449:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aSet = __webpack_require__(7080);\nvar has = (__webpack_require__(4402).has);\nvar size = __webpack_require__(5170);\nvar getSetRecord = __webpack_require__(3789);\nvar iterateSet = __webpack_require__(8469);\nvar iterateSimple = __webpack_require__(507);\nvar iteratorClose = __webpack_require__(9539);\n\n// `Set.prototype.isDisjointFrom` method\n// https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom\nmodule.exports = function isDisjointFrom(other) {\n var O = aSet(this);\n var otherRec = getSetRecord(other);\n if (size(O) <= otherRec.size) return iterateSet(O, function (e) {\n if (otherRec.includes(e)) return false;\n }, true) !== false;\n var iterator = otherRec.getIterator();\n return iterateSimple(iterator, function (e) {\n if (has(O, e)) return iteratorClose(iterator, 'normal', false);\n }) !== false;\n};\n\n\n/***/ }),\n\n/***/ 3838:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aSet = __webpack_require__(7080);\nvar size = __webpack_require__(5170);\nvar iterate = __webpack_require__(8469);\nvar getSetRecord = __webpack_require__(3789);\n\n// `Set.prototype.isSubsetOf` method\n// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf\nmodule.exports = function isSubsetOf(other) {\n var O = aSet(this);\n var otherRec = getSetRecord(other);\n if (size(O) > otherRec.size) return false;\n return iterate(O, function (e) {\n if (!otherRec.includes(e)) return false;\n }, true) !== false;\n};\n\n\n/***/ }),\n\n/***/ 8527:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aSet = __webpack_require__(7080);\nvar has = (__webpack_require__(4402).has);\nvar size = __webpack_require__(5170);\nvar getSetRecord = __webpack_require__(3789);\nvar iterateSimple = __webpack_require__(507);\nvar iteratorClose = __webpack_require__(9539);\n\n// `Set.prototype.isSupersetOf` method\n// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf\nmodule.exports = function isSupersetOf(other) {\n var O = aSet(this);\n var otherRec = getSetRecord(other);\n if (size(O) < otherRec.size) return false;\n var iterator = otherRec.getIterator();\n return iterateSimple(iterator, function (e) {\n if (!has(O, e)) return iteratorClose(iterator, 'normal', false);\n }) !== false;\n};\n\n\n/***/ }),\n\n/***/ 8469:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\nvar iterateSimple = __webpack_require__(507);\nvar SetHelpers = __webpack_require__(4402);\n\nvar Set = SetHelpers.Set;\nvar SetPrototype = SetHelpers.proto;\nvar forEach = uncurryThis(SetPrototype.forEach);\nvar keys = uncurryThis(SetPrototype.keys);\nvar next = keys(new Set()).next;\n\nmodule.exports = function (set, fn, interruptible) {\n return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn);\n};\n\n\n/***/ }),\n\n/***/ 4916:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar getBuiltIn = __webpack_require__(7751);\n\nvar createSetLike = function (size) {\n return {\n size: size,\n has: function () {\n return false;\n },\n keys: function () {\n return {\n next: function () {\n return { done: true };\n }\n };\n }\n };\n};\n\nmodule.exports = function (name) {\n var Set = getBuiltIn('Set');\n try {\n new Set()[name](createSetLike(0));\n try {\n // late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it\n // https://github.com/tc39/proposal-set-methods/pull/88\n new Set()[name](createSetLike(-1));\n return false;\n } catch (error2) {\n return true;\n }\n } catch (error) {\n return false;\n }\n};\n\n\n/***/ }),\n\n/***/ 5170:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThisAccessor = __webpack_require__(6706);\nvar SetHelpers = __webpack_require__(4402);\n\nmodule.exports = uncurryThisAccessor(SetHelpers.proto, 'size', 'get') || function (set) {\n return set.size;\n};\n\n\n/***/ }),\n\n/***/ 3650:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aSet = __webpack_require__(7080);\nvar SetHelpers = __webpack_require__(4402);\nvar clone = __webpack_require__(9286);\nvar getSetRecord = __webpack_require__(3789);\nvar iterateSimple = __webpack_require__(507);\n\nvar add = SetHelpers.add;\nvar has = SetHelpers.has;\nvar remove = SetHelpers.remove;\n\n// `Set.prototype.symmetricDifference` method\n// https://github.com/tc39/proposal-set-methods\nmodule.exports = function symmetricDifference(other) {\n var O = aSet(this);\n var keysIter = getSetRecord(other).getIterator();\n var result = clone(O);\n iterateSimple(keysIter, function (e) {\n if (has(O, e)) remove(result, e);\n else add(result, e);\n });\n return result;\n};\n\n\n/***/ }),\n\n/***/ 4204:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar aSet = __webpack_require__(7080);\nvar add = (__webpack_require__(4402).add);\nvar clone = __webpack_require__(9286);\nvar getSetRecord = __webpack_require__(3789);\nvar iterateSimple = __webpack_require__(507);\n\n// `Set.prototype.union` method\n// https://github.com/tc39/proposal-set-methods\nmodule.exports = function union(other) {\n var O = aSet(this);\n var keysIter = getSetRecord(other).getIterator();\n var result = clone(O);\n iterateSimple(keysIter, function (it) {\n add(result, it);\n });\n return result;\n};\n\n\n/***/ }),\n\n/***/ 6119:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar shared = __webpack_require__(5745);\nvar uid = __webpack_require__(3392);\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n\n\n/***/ }),\n\n/***/ 7629:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar IS_PURE = __webpack_require__(6395);\nvar globalThis = __webpack_require__(4576);\nvar defineGlobalProperty = __webpack_require__(9433);\n\nvar SHARED = '__core-js_shared__';\nvar store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});\n\n(store.versions || (store.versions = [])).push({\n version: '3.38.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n\n\n/***/ }),\n\n/***/ 5745:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar store = __webpack_require__(7629);\n\nmodule.exports = function (key, value) {\n return store[key] || (store[key] = value || {});\n};\n\n\n/***/ }),\n\n/***/ 1548:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar fails = __webpack_require__(9039);\nvar V8 = __webpack_require__(9519);\nvar ENVIRONMENT = __webpack_require__(4215);\n\nvar structuredClone = globalThis.structuredClone;\n\nmodule.exports = !!structuredClone && !fails(function () {\n // prevent V8 ArrayBufferDetaching protector cell invalidation and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if ((ENVIRONMENT === 'DENO' && V8 > 92) || (ENVIRONMENT === 'NODE' && V8 > 94) || (ENVIRONMENT === 'BROWSER' && V8 > 97)) return false;\n var buffer = new ArrayBuffer(8);\n var clone = structuredClone(buffer, { transfer: [buffer] });\n return buffer.byteLength !== 0 || clone.byteLength !== 8;\n});\n\n\n/***/ }),\n\n/***/ 4495:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = __webpack_require__(9519);\nvar fails = __webpack_require__(9039);\nvar globalThis = __webpack_require__(4576);\n\nvar $String = globalThis.String;\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol('symbol detection');\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n // of course, fail.\n return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n\n\n/***/ }),\n\n/***/ 5610:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar toIntegerOrInfinity = __webpack_require__(1291);\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n\n\n/***/ }),\n\n/***/ 5854:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar toPrimitive = __webpack_require__(2777);\n\nvar $TypeError = TypeError;\n\n// `ToBigInt` abstract operation\n// https://tc39.es/ecma262/#sec-tobigint\nmodule.exports = function (argument) {\n var prim = toPrimitive(argument, 'number');\n if (typeof prim == 'number') throw new $TypeError(\"Can't convert number to bigint\");\n // eslint-disable-next-line es/no-bigint -- safe\n return BigInt(prim);\n};\n\n\n/***/ }),\n\n/***/ 7696:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar toIntegerOrInfinity = __webpack_require__(1291);\nvar toLength = __webpack_require__(8014);\n\nvar $RangeError = RangeError;\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toIntegerOrInfinity(it);\n var length = toLength(number);\n if (number !== length) throw new $RangeError('Wrong length or index');\n return length;\n};\n\n\n/***/ }),\n\n/***/ 5397:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = __webpack_require__(7055);\nvar requireObjectCoercible = __webpack_require__(7750);\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n\n\n/***/ }),\n\n/***/ 1291:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar trunc = __webpack_require__(741);\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- NaN check\n return number !== number || number === 0 ? 0 : trunc(number);\n};\n\n\n/***/ }),\n\n/***/ 8014:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar toIntegerOrInfinity = __webpack_require__(1291);\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n var len = toIntegerOrInfinity(argument);\n return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n\n\n/***/ }),\n\n/***/ 8981:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar requireObjectCoercible = __webpack_require__(7750);\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};\n\n\n/***/ }),\n\n/***/ 9590:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar toIntegerOrInfinity = __webpack_require__(1291);\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it) {\n var result = toIntegerOrInfinity(it);\n if (result < 0) throw new $RangeError(\"The argument can't be less than 0\");\n return result;\n};\n\n\n/***/ }),\n\n/***/ 2777:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar call = __webpack_require__(9565);\nvar isObject = __webpack_require__(34);\nvar isSymbol = __webpack_require__(757);\nvar getMethod = __webpack_require__(5966);\nvar ordinaryToPrimitive = __webpack_require__(4270);\nvar wellKnownSymbol = __webpack_require__(8227);\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw new $TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n\n\n/***/ }),\n\n/***/ 6969:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar toPrimitive = __webpack_require__(2777);\nvar isSymbol = __webpack_require__(757);\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n\n\n/***/ }),\n\n/***/ 2140:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar wellKnownSymbol = __webpack_require__(8227);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n\n\n/***/ }),\n\n/***/ 655:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar classof = __webpack_require__(6955);\n\nvar $String = String;\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');\n return $String(argument);\n};\n\n\n/***/ }),\n\n/***/ 6823:\n/***/ ((module) => {\n\n\nvar $String = String;\n\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n\n\n/***/ }),\n\n/***/ 3392:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar uncurryThis = __webpack_require__(9504);\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\n\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n\n\n/***/ }),\n\n/***/ 7040:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = __webpack_require__(4495);\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n\n\n/***/ }),\n\n/***/ 8686:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar fails = __webpack_require__(9039);\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype !== 42;\n});\n\n\n/***/ }),\n\n/***/ 2812:\n/***/ ((module) => {\n\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (passed, required) {\n if (passed < required) throw new $TypeError('Not enough arguments');\n return passed;\n};\n\n\n/***/ }),\n\n/***/ 8622:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar isCallable = __webpack_require__(4901);\n\nvar WeakMap = globalThis.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));\n\n\n/***/ }),\n\n/***/ 8227:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar globalThis = __webpack_require__(4576);\nvar shared = __webpack_require__(5745);\nvar hasOwn = __webpack_require__(9297);\nvar uid = __webpack_require__(3392);\nvar NATIVE_SYMBOL = __webpack_require__(4495);\nvar USE_SYMBOL_AS_UID = __webpack_require__(7040);\n\nvar Symbol = globalThis.Symbol;\nvar WellKnownSymbolsStore = shared('wks');\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name)) {\n WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)\n ? Symbol[name]\n : createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n\n\n/***/ }),\n\n/***/ 6573:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar defineBuiltInAccessor = __webpack_require__(2106);\nvar isDetached = __webpack_require__(3238);\n\nvar ArrayBufferPrototype = ArrayBuffer.prototype;\n\nif (DESCRIPTORS && !('detached' in ArrayBufferPrototype)) {\n defineBuiltInAccessor(ArrayBufferPrototype, 'detached', {\n configurable: true,\n get: function detached() {\n return isDetached(this);\n }\n });\n}\n\n\n/***/ }),\n\n/***/ 7936:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar $transfer = __webpack_require__(5636);\n\n// `ArrayBuffer.prototype.transferToFixedLength` method\n// https://tc39.es/proposal-arraybuffer-transfer/#sec-arraybuffer.prototype.transfertofixedlength\nif ($transfer) $({ target: 'ArrayBuffer', proto: true }, {\n transferToFixedLength: function transferToFixedLength() {\n return $transfer(this, arguments.length ? arguments[0] : undefined, false);\n }\n});\n\n\n/***/ }),\n\n/***/ 8100:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar $transfer = __webpack_require__(5636);\n\n// `ArrayBuffer.prototype.transfer` method\n// https://tc39.es/proposal-arraybuffer-transfer/#sec-arraybuffer.prototype.transfer\nif ($transfer) $({ target: 'ArrayBuffer', proto: true }, {\n transfer: function transfer() {\n return $transfer(this, arguments.length ? arguments[0] : undefined, true);\n }\n});\n\n\n/***/ }),\n\n/***/ 4114:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar toObject = __webpack_require__(8981);\nvar lengthOfArrayLike = __webpack_require__(6198);\nvar setArrayLength = __webpack_require__(4527);\nvar doesNotExceedSafeInteger = __webpack_require__(6837);\nvar fails = __webpack_require__(9039);\n\nvar INCORRECT_TO_LENGTH = fails(function () {\n return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;\n});\n\n// V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError\n// https://bugs.chromium.org/p/v8/issues/detail?id=12681\nvar properErrorOnNonWritableLength = function () {\n try {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty([], 'length', { writable: false }).push();\n } catch (error) {\n return error instanceof TypeError;\n }\n};\n\nvar FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();\n\n// `Array.prototype.push` method\n// https://tc39.es/ecma262/#sec-array.prototype.push\n$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n push: function push(item) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var argCount = arguments.length;\n doesNotExceedSafeInteger(len + argCount);\n for (var i = 0; i < argCount; i++) {\n O[len] = arguments[i];\n len++;\n }\n setArrayLength(O, len);\n return len;\n }\n});\n\n\n/***/ }),\n\n/***/ 4628:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar newPromiseCapabilityModule = __webpack_require__(6043);\n\n// `Promise.withResolvers` method\n// https://github.com/tc39/proposal-promise-with-resolvers\n$({ target: 'Promise', stat: true }, {\n withResolvers: function withResolvers() {\n var promiseCapability = newPromiseCapabilityModule.f(this);\n return {\n promise: promiseCapability.promise,\n resolve: promiseCapability.resolve,\n reject: promiseCapability.reject\n };\n }\n});\n\n\n/***/ }),\n\n/***/ 7642:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar difference = __webpack_require__(3440);\nvar setMethodAcceptSetLike = __webpack_require__(4916);\n\n// `Set.prototype.difference` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('difference') }, {\n difference: difference\n});\n\n\n/***/ }),\n\n/***/ 8004:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar fails = __webpack_require__(9039);\nvar intersection = __webpack_require__(8750);\nvar setMethodAcceptSetLike = __webpack_require__(4916);\n\nvar INCORRECT = !setMethodAcceptSetLike('intersection') || fails(function () {\n // eslint-disable-next-line es/no-array-from, es/no-set -- testing\n return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';\n});\n\n// `Set.prototype.intersection` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {\n intersection: intersection\n});\n\n\n/***/ }),\n\n/***/ 3853:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar isDisjointFrom = __webpack_require__(4449);\nvar setMethodAcceptSetLike = __webpack_require__(4916);\n\n// `Set.prototype.isDisjointFrom` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isDisjointFrom') }, {\n isDisjointFrom: isDisjointFrom\n});\n\n\n/***/ }),\n\n/***/ 5876:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar isSubsetOf = __webpack_require__(3838);\nvar setMethodAcceptSetLike = __webpack_require__(4916);\n\n// `Set.prototype.isSubsetOf` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSubsetOf') }, {\n isSubsetOf: isSubsetOf\n});\n\n\n/***/ }),\n\n/***/ 2475:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar isSupersetOf = __webpack_require__(8527);\nvar setMethodAcceptSetLike = __webpack_require__(4916);\n\n// `Set.prototype.isSupersetOf` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSupersetOf') }, {\n isSupersetOf: isSupersetOf\n});\n\n\n/***/ }),\n\n/***/ 5024:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar symmetricDifference = __webpack_require__(3650);\nvar setMethodAcceptSetLike = __webpack_require__(4916);\n\n// `Set.prototype.symmetricDifference` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('symmetricDifference') }, {\n symmetricDifference: symmetricDifference\n});\n\n\n/***/ }),\n\n/***/ 1698:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar union = __webpack_require__(4204);\nvar setMethodAcceptSetLike = __webpack_require__(4916);\n\n// `Set.prototype.union` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {\n union: union\n});\n\n\n/***/ }),\n\n/***/ 7467:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar arrayToReversed = __webpack_require__(7628);\nvar ArrayBufferViewCore = __webpack_require__(4644);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\n\n// `%TypedArray%.prototype.toReversed` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.toreversed\nexportTypedArrayMethod('toReversed', function toReversed() {\n return arrayToReversed(aTypedArray(this), getTypedArrayConstructor(this));\n});\n\n\n/***/ }),\n\n/***/ 4732:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar ArrayBufferViewCore = __webpack_require__(4644);\nvar uncurryThis = __webpack_require__(9504);\nvar aCallable = __webpack_require__(9306);\nvar arrayFromConstructorAndList = __webpack_require__(5370);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar sort = uncurryThis(ArrayBufferViewCore.TypedArrayPrototype.sort);\n\n// `%TypedArray%.prototype.toSorted` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tosorted\nexportTypedArrayMethod('toSorted', function toSorted(compareFn) {\n if (compareFn !== undefined) aCallable(compareFn);\n var O = aTypedArray(this);\n var A = arrayFromConstructorAndList(getTypedArrayConstructor(O), O);\n return sort(A, compareFn);\n});\n\n\n/***/ }),\n\n/***/ 9577:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar arrayWith = __webpack_require__(9928);\nvar ArrayBufferViewCore = __webpack_require__(4644);\nvar isBigIntArray = __webpack_require__(1108);\nvar toIntegerOrInfinity = __webpack_require__(1291);\nvar toBigInt = __webpack_require__(5854);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar PROPER_ORDER = !!function () {\n try {\n // eslint-disable-next-line no-throw-literal, es/no-typed-arrays, es/no-array-prototype-with -- required for testing\n new Int8Array(1)['with'](2, { valueOf: function () { throw 8; } });\n } catch (error) {\n // some early implementations, like WebKit, does not follow the final semantic\n // https://github.com/tc39/proposal-change-array-by-copy/pull/86\n return error === 8;\n }\n}();\n\n// `%TypedArray%.prototype.with` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.with\nexportTypedArrayMethod('with', { 'with': function (index, value) {\n var O = aTypedArray(this);\n var relativeIndex = toIntegerOrInfinity(index);\n var actualValue = isBigIntArray(O) ? toBigInt(value) : +value;\n return arrayWith(O, getTypedArrayConstructor(O), relativeIndex, actualValue);\n} }['with'], !PROPER_ORDER);\n\n\n/***/ }),\n\n/***/ 8992:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar globalThis = __webpack_require__(4576);\nvar anInstance = __webpack_require__(679);\nvar anObject = __webpack_require__(8551);\nvar isCallable = __webpack_require__(4901);\nvar getPrototypeOf = __webpack_require__(2787);\nvar defineBuiltInAccessor = __webpack_require__(2106);\nvar createProperty = __webpack_require__(4659);\nvar fails = __webpack_require__(9039);\nvar hasOwn = __webpack_require__(9297);\nvar wellKnownSymbol = __webpack_require__(8227);\nvar IteratorPrototype = (__webpack_require__(7657).IteratorPrototype);\nvar DESCRIPTORS = __webpack_require__(3724);\nvar IS_PURE = __webpack_require__(6395);\n\nvar CONSTRUCTOR = 'constructor';\nvar ITERATOR = 'Iterator';\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nvar $TypeError = TypeError;\nvar NativeIterator = globalThis[ITERATOR];\n\n// FF56- have non-standard global helper `Iterator`\nvar FORCED = IS_PURE\n || !isCallable(NativeIterator)\n || NativeIterator.prototype !== IteratorPrototype\n // FF44- non-standard `Iterator` passes previous tests\n || !fails(function () { NativeIterator({}); });\n\nvar IteratorConstructor = function Iterator() {\n anInstance(this, IteratorPrototype);\n if (getPrototypeOf(this) === IteratorPrototype) throw new $TypeError('Abstract class Iterator not directly constructable');\n};\n\nvar defineIteratorPrototypeAccessor = function (key, value) {\n if (DESCRIPTORS) {\n defineBuiltInAccessor(IteratorPrototype, key, {\n configurable: true,\n get: function () {\n return value;\n },\n set: function (replacement) {\n anObject(this);\n if (this === IteratorPrototype) throw new $TypeError(\"You can't redefine this property\");\n if (hasOwn(this, key)) this[key] = replacement;\n else createProperty(this, key, replacement);\n }\n });\n } else IteratorPrototype[key] = value;\n};\n\nif (!hasOwn(IteratorPrototype, TO_STRING_TAG)) defineIteratorPrototypeAccessor(TO_STRING_TAG, ITERATOR);\n\nif (FORCED || !hasOwn(IteratorPrototype, CONSTRUCTOR) || IteratorPrototype[CONSTRUCTOR] === Object) {\n defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);\n}\n\nIteratorConstructor.prototype = IteratorPrototype;\n\n// `Iterator` constructor\n// https://github.com/tc39/proposal-iterator-helpers\n$({ global: true, constructor: true, forced: FORCED }, {\n Iterator: IteratorConstructor\n});\n\n\n/***/ }),\n\n/***/ 4743:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar call = __webpack_require__(9565);\nvar anObject = __webpack_require__(8551);\nvar getIteratorDirect = __webpack_require__(1767);\nvar notANaN = __webpack_require__(4149);\nvar toPositiveInteger = __webpack_require__(9590);\nvar createIteratorProxy = __webpack_require__(9462);\nvar IS_PURE = __webpack_require__(6395);\n\nvar IteratorProxy = createIteratorProxy(function () {\n var iterator = this.iterator;\n var next = this.next;\n var result, done;\n while (this.remaining) {\n this.remaining--;\n result = anObject(call(next, iterator));\n done = this.done = !!result.done;\n if (done) return;\n }\n result = anObject(call(next, iterator));\n done = this.done = !!result.done;\n if (!done) return result.value;\n});\n\n// `Iterator.prototype.drop` method\n// https://github.com/tc39/proposal-iterator-helpers\n$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {\n drop: function drop(limit) {\n anObject(this);\n var remaining = toPositiveInteger(notANaN(+limit));\n return new IteratorProxy(getIteratorDirect(this), {\n remaining: remaining\n });\n }\n});\n\n\n/***/ }),\n\n/***/ 3215:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar iterate = __webpack_require__(2652);\nvar aCallable = __webpack_require__(9306);\nvar anObject = __webpack_require__(8551);\nvar getIteratorDirect = __webpack_require__(1767);\n\n// `Iterator.prototype.every` method\n// https://github.com/tc39/proposal-iterator-helpers\n$({ target: 'Iterator', proto: true, real: true }, {\n every: function every(predicate) {\n anObject(this);\n aCallable(predicate);\n var record = getIteratorDirect(this);\n var counter = 0;\n return !iterate(record, function (value, stop) {\n if (!predicate(value, counter++)) return stop();\n }, { IS_RECORD: true, INTERRUPTED: true }).stopped;\n }\n});\n\n\n/***/ }),\n\n/***/ 4520:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar call = __webpack_require__(9565);\nvar aCallable = __webpack_require__(9306);\nvar anObject = __webpack_require__(8551);\nvar getIteratorDirect = __webpack_require__(1767);\nvar createIteratorProxy = __webpack_require__(9462);\nvar callWithSafeIterationClosing = __webpack_require__(6319);\nvar IS_PURE = __webpack_require__(6395);\n\nvar IteratorProxy = createIteratorProxy(function () {\n var iterator = this.iterator;\n var predicate = this.predicate;\n var next = this.next;\n var result, done, value;\n while (true) {\n result = anObject(call(next, iterator));\n done = this.done = !!result.done;\n if (done) return;\n value = result.value;\n if (callWithSafeIterationClosing(iterator, predicate, [value, this.counter++], true)) return value;\n }\n});\n\n// `Iterator.prototype.filter` method\n// https://github.com/tc39/proposal-iterator-helpers\n$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {\n filter: function filter(predicate) {\n anObject(this);\n aCallable(predicate);\n return new IteratorProxy(getIteratorDirect(this), {\n predicate: predicate\n });\n }\n});\n\n\n/***/ }),\n\n/***/ 670:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar call = __webpack_require__(9565);\nvar aCallable = __webpack_require__(9306);\nvar anObject = __webpack_require__(8551);\nvar getIteratorDirect = __webpack_require__(1767);\nvar getIteratorFlattenable = __webpack_require__(8646);\nvar createIteratorProxy = __webpack_require__(9462);\nvar iteratorClose = __webpack_require__(9539);\nvar IS_PURE = __webpack_require__(6395);\n\nvar IteratorProxy = createIteratorProxy(function () {\n var iterator = this.iterator;\n var mapper = this.mapper;\n var result, inner;\n\n while (true) {\n if (inner = this.inner) try {\n result = anObject(call(inner.next, inner.iterator));\n if (!result.done) return result.value;\n this.inner = null;\n } catch (error) { iteratorClose(iterator, 'throw', error); }\n\n result = anObject(call(this.next, iterator));\n\n if (this.done = !!result.done) return;\n\n try {\n this.inner = getIteratorFlattenable(mapper(result.value, this.counter++), false);\n } catch (error) { iteratorClose(iterator, 'throw', error); }\n }\n});\n\n// `Iterator.prototype.flatMap` method\n// https://github.com/tc39/proposal-iterator-helpers\n$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {\n flatMap: function flatMap(mapper) {\n anObject(this);\n aCallable(mapper);\n return new IteratorProxy(getIteratorDirect(this), {\n mapper: mapper,\n inner: null\n });\n }\n});\n\n\n/***/ }),\n\n/***/ 1454:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar map = __webpack_require__(713);\nvar IS_PURE = __webpack_require__(6395);\n\n// `Iterator.prototype.map` method\n// https://github.com/tc39/proposal-iterator-helpers\n$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {\n map: map\n});\n\n\n/***/ }),\n\n/***/ 7550:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar iterate = __webpack_require__(2652);\nvar aCallable = __webpack_require__(9306);\nvar anObject = __webpack_require__(8551);\nvar getIteratorDirect = __webpack_require__(1767);\n\n// `Iterator.prototype.some` method\n// https://github.com/tc39/proposal-iterator-helpers\n$({ target: 'Iterator', proto: true, real: true }, {\n some: function some(predicate) {\n anObject(this);\n aCallable(predicate);\n var record = getIteratorDirect(this);\n var counter = 0;\n return iterate(record, function (value, stop) {\n if (predicate(value, counter++)) return stop();\n }, { IS_RECORD: true, INTERRUPTED: true }).stopped;\n }\n});\n\n\n/***/ }),\n\n/***/ 8335:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar DESCRIPTORS = __webpack_require__(3724);\nvar globalThis = __webpack_require__(4576);\nvar getBuiltIn = __webpack_require__(7751);\nvar uncurryThis = __webpack_require__(9504);\nvar call = __webpack_require__(9565);\nvar isCallable = __webpack_require__(4901);\nvar isObject = __webpack_require__(34);\nvar isArray = __webpack_require__(4376);\nvar hasOwn = __webpack_require__(9297);\nvar toString = __webpack_require__(655);\nvar lengthOfArrayLike = __webpack_require__(6198);\nvar createProperty = __webpack_require__(4659);\nvar fails = __webpack_require__(9039);\nvar parseJSONString = __webpack_require__(8235);\nvar NATIVE_SYMBOL = __webpack_require__(4495);\n\nvar JSON = globalThis.JSON;\nvar Number = globalThis.Number;\nvar SyntaxError = globalThis.SyntaxError;\nvar nativeParse = JSON && JSON.parse;\nvar enumerableOwnProperties = getBuiltIn('Object', 'keys');\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar at = uncurryThis(''.charAt);\nvar slice = uncurryThis(''.slice);\nvar exec = uncurryThis(/./.exec);\nvar push = uncurryThis([].push);\n\nvar IS_DIGIT = /^\\d$/;\nvar IS_NON_ZERO_DIGIT = /^[1-9]$/;\nvar IS_NUMBER_START = /^[\\d-]$/;\nvar IS_WHITESPACE = /^[\\t\\n\\r ]$/;\n\nvar PRIMITIVE = 0;\nvar OBJECT = 1;\n\nvar $parse = function (source, reviver) {\n source = toString(source);\n var context = new Context(source, 0, '');\n var root = context.parse();\n var value = root.value;\n var endIndex = context.skip(IS_WHITESPACE, root.end);\n if (endIndex < source.length) {\n throw new SyntaxError('Unexpected extra character: \"' + at(source, endIndex) + '\" after the parsed data at: ' + endIndex);\n }\n return isCallable(reviver) ? internalize({ '': value }, '', reviver, root) : value;\n};\n\nvar internalize = function (holder, name, reviver, node) {\n var val = holder[name];\n var unmodified = node && val === node.value;\n var context = unmodified && typeof node.source == 'string' ? { source: node.source } : {};\n var elementRecordsLen, keys, len, i, P;\n if (isObject(val)) {\n var nodeIsArray = isArray(val);\n var nodes = unmodified ? node.nodes : nodeIsArray ? [] : {};\n if (nodeIsArray) {\n elementRecordsLen = nodes.length;\n len = lengthOfArrayLike(val);\n for (i = 0; i < len; i++) {\n internalizeProperty(val, i, internalize(val, '' + i, reviver, i < elementRecordsLen ? nodes[i] : undefined));\n }\n } else {\n keys = enumerableOwnProperties(val);\n len = lengthOfArrayLike(keys);\n for (i = 0; i < len; i++) {\n P = keys[i];\n internalizeProperty(val, P, internalize(val, P, reviver, hasOwn(nodes, P) ? nodes[P] : undefined));\n }\n }\n }\n return call(reviver, holder, name, val, context);\n};\n\nvar internalizeProperty = function (object, key, value) {\n if (DESCRIPTORS) {\n var descriptor = getOwnPropertyDescriptor(object, key);\n if (descriptor && !descriptor.configurable) return;\n }\n if (value === undefined) delete object[key];\n else createProperty(object, key, value);\n};\n\nvar Node = function (value, end, source, nodes) {\n this.value = value;\n this.end = end;\n this.source = source;\n this.nodes = nodes;\n};\n\nvar Context = function (source, index) {\n this.source = source;\n this.index = index;\n};\n\n// https://www.json.org/json-en.html\nContext.prototype = {\n fork: function (nextIndex) {\n return new Context(this.source, nextIndex);\n },\n parse: function () {\n var source = this.source;\n var i = this.skip(IS_WHITESPACE, this.index);\n var fork = this.fork(i);\n var chr = at(source, i);\n if (exec(IS_NUMBER_START, chr)) return fork.number();\n switch (chr) {\n case '{':\n return fork.object();\n case '[':\n return fork.array();\n case '\"':\n return fork.string();\n case 't':\n return fork.keyword(true);\n case 'f':\n return fork.keyword(false);\n case 'n':\n return fork.keyword(null);\n } throw new SyntaxError('Unexpected character: \"' + chr + '\" at: ' + i);\n },\n node: function (type, value, start, end, nodes) {\n return new Node(value, end, type ? null : slice(this.source, start, end), nodes);\n },\n object: function () {\n var source = this.source;\n var i = this.index + 1;\n var expectKeypair = false;\n var object = {};\n var nodes = {};\n while (i < source.length) {\n i = this.until(['\"', '}'], i);\n if (at(source, i) === '}' && !expectKeypair) {\n i++;\n break;\n }\n // Parsing the key\n var result = this.fork(i).string();\n var key = result.value;\n i = result.end;\n i = this.until([':'], i) + 1;\n // Parsing value\n i = this.skip(IS_WHITESPACE, i);\n result = this.fork(i).parse();\n createProperty(nodes, key, result);\n createProperty(object, key, result.value);\n i = this.until([',', '}'], result.end);\n var chr = at(source, i);\n if (chr === ',') {\n expectKeypair = true;\n i++;\n } else if (chr === '}') {\n i++;\n break;\n }\n }\n return this.node(OBJECT, object, this.index, i, nodes);\n },\n array: function () {\n var source = this.source;\n var i = this.index + 1;\n var expectElement = false;\n var array = [];\n var nodes = [];\n while (i < source.length) {\n i = this.skip(IS_WHITESPACE, i);\n if (at(source, i) === ']' && !expectElement) {\n i++;\n break;\n }\n var result = this.fork(i).parse();\n push(nodes, result);\n push(array, result.value);\n i = this.until([',', ']'], result.end);\n if (at(source, i) === ',') {\n expectElement = true;\n i++;\n } else if (at(source, i) === ']') {\n i++;\n break;\n }\n }\n return this.node(OBJECT, array, this.index, i, nodes);\n },\n string: function () {\n var index = this.index;\n var parsed = parseJSONString(this.source, this.index + 1);\n return this.node(PRIMITIVE, parsed.value, index, parsed.end);\n },\n number: function () {\n var source = this.source;\n var startIndex = this.index;\n var i = startIndex;\n if (at(source, i) === '-') i++;\n if (at(source, i) === '0') i++;\n else if (exec(IS_NON_ZERO_DIGIT, at(source, i))) i = this.skip(IS_DIGIT, i + 1);\n else throw new SyntaxError('Failed to parse number at: ' + i);\n if (at(source, i) === '.') i = this.skip(IS_DIGIT, i + 1);\n if (at(source, i) === 'e' || at(source, i) === 'E') {\n i++;\n if (at(source, i) === '+' || at(source, i) === '-') i++;\n var exponentStartIndex = i;\n i = this.skip(IS_DIGIT, i);\n if (exponentStartIndex === i) throw new SyntaxError(\"Failed to parse number's exponent value at: \" + i);\n }\n return this.node(PRIMITIVE, Number(slice(source, startIndex, i)), startIndex, i);\n },\n keyword: function (value) {\n var keyword = '' + value;\n var index = this.index;\n var endIndex = index + keyword.length;\n if (slice(this.source, index, endIndex) !== keyword) throw new SyntaxError('Failed to parse value at: ' + index);\n return this.node(PRIMITIVE, value, index, endIndex);\n },\n skip: function (regex, i) {\n var source = this.source;\n for (; i < source.length; i++) if (!exec(regex, at(source, i))) break;\n return i;\n },\n until: function (array, i) {\n i = this.skip(IS_WHITESPACE, i);\n var chr = at(this.source, i);\n for (var j = 0; j < array.length; j++) if (array[j] === chr) return i;\n throw new SyntaxError('Unexpected character: \"' + chr + '\" at: ' + i);\n }\n};\n\nvar NO_SOURCE_SUPPORT = fails(function () {\n var unsafeInt = '9007199254740993';\n var source;\n nativeParse(unsafeInt, function (key, value, context) {\n source = context.source;\n });\n return source !== unsafeInt;\n});\n\nvar PROPER_BASE_PARSE = NATIVE_SYMBOL && !fails(function () {\n // Safari 9 bug\n return 1 / nativeParse('-0 \\t') !== -Infinity;\n});\n\n// `JSON.parse` method\n// https://tc39.es/ecma262/#sec-json.parse\n// https://github.com/tc39/proposal-json-parse-with-source\n$({ target: 'JSON', stat: true, forced: NO_SOURCE_SUPPORT }, {\n parse: function parse(text, reviver) {\n return PROPER_BASE_PARSE && !isCallable(reviver) ? nativeParse(text) : $parse(text, reviver);\n }\n});\n\n\n/***/ }),\n\n/***/ 4979:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar $ = __webpack_require__(6518);\nvar globalThis = __webpack_require__(4576);\nvar getBuiltIn = __webpack_require__(7751);\nvar createPropertyDescriptor = __webpack_require__(6980);\nvar defineProperty = (__webpack_require__(4913).f);\nvar hasOwn = __webpack_require__(9297);\nvar anInstance = __webpack_require__(679);\nvar inheritIfRequired = __webpack_require__(3167);\nvar normalizeStringArgument = __webpack_require__(2603);\nvar DOMExceptionConstants = __webpack_require__(5002);\nvar clearErrorStack = __webpack_require__(8574);\nvar DESCRIPTORS = __webpack_require__(3724);\nvar IS_PURE = __webpack_require__(6395);\n\nvar DOM_EXCEPTION = 'DOMException';\nvar Error = getBuiltIn('Error');\nvar NativeDOMException = getBuiltIn(DOM_EXCEPTION);\n\nvar $DOMException = function DOMException() {\n anInstance(this, DOMExceptionPrototype);\n var argumentsLength = arguments.length;\n var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);\n var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');\n var that = new NativeDOMException(message, name);\n var error = new Error(message);\n error.name = DOM_EXCEPTION;\n defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));\n inheritIfRequired(that, this, $DOMException);\n return that;\n};\n\nvar DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;\n\nvar ERROR_HAS_STACK = 'stack' in new Error(DOM_EXCEPTION);\nvar DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(globalThis, DOM_EXCEPTION);\n\n// Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it\n// https://github.com/Jarred-Sumner/bun/issues/399\nvar BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);\n\nvar FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;\n\n// `DOMException` constructor patch for `.stack` where it's required\n// https://webidl.spec.whatwg.org/#es-DOMException-specialness\n$({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic\n DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException\n});\n\nvar PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);\nvar PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;\n\nif (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {\n if (!IS_PURE) {\n defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));\n }\n\n for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {\n var constant = DOMExceptionConstants[key];\n var constantName = constant.s;\n if (!hasOwn(PolyfilledDOMException, constantName)) {\n defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));\n }\n }\n}\n\n\n/***/ }),\n\n/***/ 4603:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar defineBuiltIn = __webpack_require__(6840);\nvar uncurryThis = __webpack_require__(9504);\nvar toString = __webpack_require__(655);\nvar validateArgumentsLength = __webpack_require__(2812);\n\nvar $URLSearchParams = URLSearchParams;\nvar URLSearchParamsPrototype = $URLSearchParams.prototype;\nvar append = uncurryThis(URLSearchParamsPrototype.append);\nvar $delete = uncurryThis(URLSearchParamsPrototype['delete']);\nvar forEach = uncurryThis(URLSearchParamsPrototype.forEach);\nvar push = uncurryThis([].push);\nvar params = new $URLSearchParams('a=1&a=2&b=3');\n\nparams['delete']('a', 1);\n// `undefined` case is a Chromium 117 bug\n// https://bugs.chromium.org/p/v8/issues/detail?id=14222\nparams['delete']('b', undefined);\n\nif (params + '' !== 'a=2') {\n defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) {\n var length = arguments.length;\n var $value = length < 2 ? undefined : arguments[1];\n if (length && $value === undefined) return $delete(this, name);\n var entries = [];\n forEach(this, function (v, k) { // also validates `this`\n push(entries, { key: k, value: v });\n });\n validateArgumentsLength(length, 1);\n var key = toString(name);\n var value = toString($value);\n var index = 0;\n var dindex = 0;\n var found = false;\n var entriesLength = entries.length;\n var entry;\n while (index < entriesLength) {\n entry = entries[index++];\n if (found || entry.key === key) {\n found = true;\n $delete(this, entry.key);\n } else dindex++;\n }\n while (dindex < entriesLength) {\n entry = entries[dindex++];\n if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);\n }\n }, { enumerable: true, unsafe: true });\n}\n\n\n/***/ }),\n\n/***/ 7566:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar defineBuiltIn = __webpack_require__(6840);\nvar uncurryThis = __webpack_require__(9504);\nvar toString = __webpack_require__(655);\nvar validateArgumentsLength = __webpack_require__(2812);\n\nvar $URLSearchParams = URLSearchParams;\nvar URLSearchParamsPrototype = $URLSearchParams.prototype;\nvar getAll = uncurryThis(URLSearchParamsPrototype.getAll);\nvar $has = uncurryThis(URLSearchParamsPrototype.has);\nvar params = new $URLSearchParams('a=1');\n\n// `undefined` case is a Chromium 117 bug\n// https://bugs.chromium.org/p/v8/issues/detail?id=14222\nif (params.has('a', 2) || !params.has('a', undefined)) {\n defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) {\n var length = arguments.length;\n var $value = length < 2 ? undefined : arguments[1];\n if (length && $value === undefined) return $has(this, name);\n var values = getAll(this, name); // also validates `this`\n validateArgumentsLength(length, 1);\n var value = toString($value);\n var index = 0;\n while (index < values.length) {\n if (values[index++] === value) return true;\n } return false;\n }, { enumerable: true, unsafe: true });\n}\n\n\n/***/ }),\n\n/***/ 8721:\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {\n\n\nvar DESCRIPTORS = __webpack_require__(3724);\nvar uncurryThis = __webpack_require__(9504);\nvar defineBuiltInAccessor = __webpack_require__(2106);\n\nvar URLSearchParamsPrototype = URLSearchParams.prototype;\nvar forEach = uncurryThis(URLSearchParamsPrototype.forEach);\n\n// `URLSearchParams.prototype.size` getter\n// https://github.com/whatwg/url/pull/734\nif (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {\n defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {\n get: function size() {\n var count = 0;\n forEach(this, function () { count++; });\n return count;\n },\n configurable: true,\n enumerable: true\n });\n}\n\n\n/***/ })\n\n/******/ });\n/************************************************************************/\n/******/ // The module cache\n/******/ var __webpack_module_cache__ = {};\n/******/ \n/******/ // The require function\n/******/ function __webpack_require__(moduleId) {\n/******/ \t// Check if module is in cache\n/******/ \tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \tif (cachedModule !== undefined) {\n/******/ \t\treturn cachedModule.exports;\n/******/ \t}\n/******/ \t// Create a new module (and put it into the cache)\n/******/ \tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t// no module.id needed\n/******/ \t\t// no module.loaded needed\n/******/ \t\texports: {}\n/******/ \t};\n/******/ \n/******/ \t// Execute the module function\n/******/ \t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/ \n/******/ \t// Return the exports of the module\n/******/ \treturn module.exports;\n/******/ }\n/******/ \n/************************************************************************/\n/******/ /* webpack/runtime/define property getters */\n/******/ (() => {\n/******/ \t// define getter functions for harmony exports\n/******/ \t__webpack_require__.d = (exports, definition) => {\n/******/ \t\tfor(var key in definition) {\n/******/ \t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t};\n/******/ })();\n/******/ \n/******/ /* webpack/runtime/hasOwnProperty shorthand */\n/******/ (() => {\n/******/ \t__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\n/******/ })();\n/******/ \n/************************************************************************/\nvar __webpack_exports__ = globalThis.pdfjsLib = {};\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n AbortException: () => (/* reexport */ AbortException),\n AnnotationEditorLayer: () => (/* reexport */ AnnotationEditorLayer),\n AnnotationEditorParamsType: () => (/* reexport */ AnnotationEditorParamsType),\n AnnotationEditorType: () => (/* reexport */ AnnotationEditorType),\n AnnotationEditorUIManager: () => (/* reexport */ AnnotationEditorUIManager),\n AnnotationLayer: () => (/* reexport */ AnnotationLayer),\n AnnotationMode: () => (/* reexport */ AnnotationMode),\n CMapCompressionType: () => (/* reexport */ CMapCompressionType),\n ColorPicker: () => (/* reexport */ ColorPicker),\n DOMSVGFactory: () => (/* reexport */ DOMSVGFactory),\n DrawLayer: () => (/* reexport */ DrawLayer),\n FeatureTest: () => (/* reexport */ util_FeatureTest),\n GlobalWorkerOptions: () => (/* reexport */ GlobalWorkerOptions),\n ImageKind: () => (/* reexport */ util_ImageKind),\n InvalidPDFException: () => (/* reexport */ InvalidPDFException),\n MissingPDFException: () => (/* reexport */ MissingPDFException),\n OPS: () => (/* reexport */ OPS),\n OutputScale: () => (/* reexport */ OutputScale),\n PDFDataRangeTransport: () => (/* reexport */ PDFDataRangeTransport),\n PDFDateString: () => (/* reexport */ PDFDateString),\n PDFWorker: () => (/* reexport */ PDFWorker),\n PasswordResponses: () => (/* reexport */ PasswordResponses),\n PermissionFlag: () => (/* reexport */ PermissionFlag),\n PixelsPerInch: () => (/* reexport */ PixelsPerInch),\n RenderingCancelledException: () => (/* reexport */ RenderingCancelledException),\n TextLayer: () => (/* reexport */ TextLayer),\n UnexpectedResponseException: () => (/* reexport */ UnexpectedResponseException),\n Util: () => (/* reexport */ Util),\n VerbosityLevel: () => (/* reexport */ VerbosityLevel),\n XfaLayer: () => (/* reexport */ XfaLayer),\n build: () => (/* reexport */ build),\n createValidAbsoluteUrl: () => (/* reexport */ createValidAbsoluteUrl),\n fetchData: () => (/* reexport */ fetchData),\n getDocument: () => (/* reexport */ getDocument),\n getFilenameFromUrl: () => (/* reexport */ getFilenameFromUrl),\n getPdfFilenameFromUrl: () => (/* reexport */ getPdfFilenameFromUrl),\n getXfaPageViewport: () => (/* reexport */ getXfaPageViewport),\n isDataScheme: () => (/* reexport */ isDataScheme),\n isPdfFile: () => (/* reexport */ isPdfFile),\n noContextMenu: () => (/* reexport */ noContextMenu),\n normalizeUnicode: () => (/* reexport */ normalizeUnicode),\n setLayerDimensions: () => (/* reexport */ setLayerDimensions),\n shadow: () => (/* reexport */ shadow),\n version: () => (/* reexport */ version)\n});\n\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js\nvar es_array_push = __webpack_require__(4114);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.detached.js\nvar es_array_buffer_detached = __webpack_require__(6573);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.transfer.js\nvar es_array_buffer_transfer = __webpack_require__(8100);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.transfer-to-fixed-length.js\nvar es_array_buffer_transfer_to_fixed_length = __webpack_require__(7936);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-reversed.js\nvar es_typed_array_to_reversed = __webpack_require__(7467);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-sorted.js\nvar es_typed_array_to_sorted = __webpack_require__(4732);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.with.js\nvar es_typed_array_with = __webpack_require__(9577);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.delete.js\nvar web_url_search_params_delete = __webpack_require__(4603);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.has.js\nvar web_url_search_params_has = __webpack_require__(7566);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js\nvar web_url_search_params_size = __webpack_require__(8721);\n;// ./src/shared/util.js\n\n\n\n\n\n\n\n\n\n\nconst isNodeJS = typeof process === \"object\" && process + \"\" === \"[object process]\" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== \"browser\");\nconst IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];\nconst FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];\nconst MAX_IMAGE_SIZE_TO_CACHE = 10e6;\nconst LINE_FACTOR = 1.35;\nconst LINE_DESCENT_FACTOR = 0.35;\nconst BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR;\nconst RenderingIntentFlag = {\n ANY: 0x01,\n DISPLAY: 0x02,\n PRINT: 0x04,\n SAVE: 0x08,\n ANNOTATIONS_FORMS: 0x10,\n ANNOTATIONS_STORAGE: 0x20,\n ANNOTATIONS_DISABLE: 0x40,\n IS_EDITING: 0x80,\n OPLIST: 0x100\n};\nconst AnnotationMode = {\n DISABLE: 0,\n ENABLE: 1,\n ENABLE_FORMS: 2,\n ENABLE_STORAGE: 3\n};\nconst AnnotationEditorPrefix = \"pdfjs_internal_editor_\";\nconst AnnotationEditorType = {\n DISABLE: -1,\n NONE: 0,\n FREETEXT: 3,\n HIGHLIGHT: 9,\n STAMP: 13,\n INK: 15\n};\nconst AnnotationEditorParamsType = {\n RESIZE: 1,\n CREATE: 2,\n FREETEXT_SIZE: 11,\n FREETEXT_COLOR: 12,\n FREETEXT_OPACITY: 13,\n INK_COLOR: 21,\n INK_THICKNESS: 22,\n INK_OPACITY: 23,\n HIGHLIGHT_COLOR: 31,\n HIGHLIGHT_DEFAULT_COLOR: 32,\n HIGHLIGHT_THICKNESS: 33,\n HIGHLIGHT_FREE: 34,\n HIGHLIGHT_SHOW_ALL: 35\n};\nconst PermissionFlag = {\n PRINT: 0x04,\n MODIFY_CONTENTS: 0x08,\n COPY: 0x10,\n MODIFY_ANNOTATIONS: 0x20,\n FILL_INTERACTIVE_FORMS: 0x100,\n COPY_FOR_ACCESSIBILITY: 0x200,\n ASSEMBLE: 0x400,\n PRINT_HIGH_QUALITY: 0x800\n};\nconst TextRenderingMode = {\n FILL: 0,\n STROKE: 1,\n FILL_STROKE: 2,\n INVISIBLE: 3,\n FILL_ADD_TO_PATH: 4,\n STROKE_ADD_TO_PATH: 5,\n FILL_STROKE_ADD_TO_PATH: 6,\n ADD_TO_PATH: 7,\n FILL_STROKE_MASK: 3,\n ADD_TO_PATH_FLAG: 4\n};\nconst util_ImageKind = {\n GRAYSCALE_1BPP: 1,\n RGB_24BPP: 2,\n RGBA_32BPP: 3\n};\nconst AnnotationType = {\n TEXT: 1,\n LINK: 2,\n FREETEXT: 3,\n LINE: 4,\n SQUARE: 5,\n CIRCLE: 6,\n POLYGON: 7,\n POLYLINE: 8,\n HIGHLIGHT: 9,\n UNDERLINE: 10,\n SQUIGGLY: 11,\n STRIKEOUT: 12,\n STAMP: 13,\n CARET: 14,\n INK: 15,\n POPUP: 16,\n FILEATTACHMENT: 17,\n SOUND: 18,\n MOVIE: 19,\n WIDGET: 20,\n SCREEN: 21,\n PRINTERMARK: 22,\n TRAPNET: 23,\n WATERMARK: 24,\n THREED: 25,\n REDACT: 26\n};\nconst AnnotationReplyType = {\n GROUP: \"Group\",\n REPLY: \"R\"\n};\nconst AnnotationFlag = {\n INVISIBLE: 0x01,\n HIDDEN: 0x02,\n PRINT: 0x04,\n NOZOOM: 0x08,\n NOROTATE: 0x10,\n NOVIEW: 0x20,\n READONLY: 0x40,\n LOCKED: 0x80,\n TOGGLENOVIEW: 0x100,\n LOCKEDCONTENTS: 0x200\n};\nconst AnnotationFieldFlag = {\n READONLY: 0x0000001,\n REQUIRED: 0x0000002,\n NOEXPORT: 0x0000004,\n MULTILINE: 0x0001000,\n PASSWORD: 0x0002000,\n NOTOGGLETOOFF: 0x0004000,\n RADIO: 0x0008000,\n PUSHBUTTON: 0x0010000,\n COMBO: 0x0020000,\n EDIT: 0x0040000,\n SORT: 0x0080000,\n FILESELECT: 0x0100000,\n MULTISELECT: 0x0200000,\n DONOTSPELLCHECK: 0x0400000,\n DONOTSCROLL: 0x0800000,\n COMB: 0x1000000,\n RICHTEXT: 0x2000000,\n RADIOSINUNISON: 0x2000000,\n COMMITONSELCHANGE: 0x4000000\n};\nconst AnnotationBorderStyleType = {\n SOLID: 1,\n DASHED: 2,\n BEVELED: 3,\n INSET: 4,\n UNDERLINE: 5\n};\nconst AnnotationActionEventType = {\n E: \"Mouse Enter\",\n X: \"Mouse Exit\",\n D: \"Mouse Down\",\n U: \"Mouse Up\",\n Fo: \"Focus\",\n Bl: \"Blur\",\n PO: \"PageOpen\",\n PC: \"PageClose\",\n PV: \"PageVisible\",\n PI: \"PageInvisible\",\n K: \"Keystroke\",\n F: \"Format\",\n V: \"Validate\",\n C: \"Calculate\"\n};\nconst DocumentActionEventType = {\n WC: \"WillClose\",\n WS: \"WillSave\",\n DS: \"DidSave\",\n WP: \"WillPrint\",\n DP: \"DidPrint\"\n};\nconst PageActionEventType = {\n O: \"PageOpen\",\n C: \"PageClose\"\n};\nconst VerbosityLevel = {\n ERRORS: 0,\n WARNINGS: 1,\n INFOS: 5\n};\nconst CMapCompressionType = {\n NONE: 0,\n BINARY: 1\n};\nconst OPS = {\n dependency: 1,\n setLineWidth: 2,\n setLineCap: 3,\n setLineJoin: 4,\n setMiterLimit: 5,\n setDash: 6,\n setRenderingIntent: 7,\n setFlatness: 8,\n setGState: 9,\n save: 10,\n restore: 11,\n transform: 12,\n moveTo: 13,\n lineTo: 14,\n curveTo: 15,\n curveTo2: 16,\n curveTo3: 17,\n closePath: 18,\n rectangle: 19,\n stroke: 20,\n closeStroke: 21,\n fill: 22,\n eoFill: 23,\n fillStroke: 24,\n eoFillStroke: 25,\n closeFillStroke: 26,\n closeEOFillStroke: 27,\n endPath: 28,\n clip: 29,\n eoClip: 30,\n beginText: 31,\n endText: 32,\n setCharSpacing: 33,\n setWordSpacing: 34,\n setHScale: 35,\n setLeading: 36,\n setFont: 37,\n setTextRenderingMode: 38,\n setTextRise: 39,\n moveText: 40,\n setLeadingMoveText: 41,\n setTextMatrix: 42,\n nextLine: 43,\n showText: 44,\n showSpacedText: 45,\n nextLineShowText: 46,\n nextLineSetSpacingShowText: 47,\n setCharWidth: 48,\n setCharWidthAndBounds: 49,\n setStrokeColorSpace: 50,\n setFillColorSpace: 51,\n setStrokeColor: 52,\n setStrokeColorN: 53,\n setFillColor: 54,\n setFillColorN: 55,\n setStrokeGray: 56,\n setFillGray: 57,\n setStrokeRGBColor: 58,\n setFillRGBColor: 59,\n setStrokeCMYKColor: 60,\n setFillCMYKColor: 61,\n shadingFill: 62,\n beginInlineImage: 63,\n beginImageData: 64,\n endInlineImage: 65,\n paintXObject: 66,\n markPoint: 67,\n markPointProps: 68,\n beginMarkedContent: 69,\n beginMarkedContentProps: 70,\n endMarkedContent: 71,\n beginCompat: 72,\n endCompat: 73,\n paintFormXObjectBegin: 74,\n paintFormXObjectEnd: 75,\n beginGroup: 76,\n endGroup: 77,\n beginAnnotation: 80,\n endAnnotation: 81,\n paintImageMaskXObject: 83,\n paintImageMaskXObjectGroup: 84,\n paintImageXObject: 85,\n paintInlineImageXObject: 86,\n paintInlineImageXObjectGroup: 87,\n paintImageXObjectRepeat: 88,\n paintImageMaskXObjectRepeat: 89,\n paintSolidColorImageMask: 90,\n constructPath: 91,\n setStrokeTransparent: 92,\n setFillTransparent: 93\n};\nconst PasswordResponses = {\n NEED_PASSWORD: 1,\n INCORRECT_PASSWORD: 2\n};\nlet verbosity = VerbosityLevel.WARNINGS;\nfunction setVerbosityLevel(level) {\n if (Number.isInteger(level)) {\n verbosity = level;\n }\n}\nfunction getVerbosityLevel() {\n return verbosity;\n}\nfunction info(msg) {\n if (verbosity >= VerbosityLevel.INFOS) {\n console.log(`Info: ${msg}`);\n }\n}\nfunction warn(msg) {\n if (verbosity >= VerbosityLevel.WARNINGS) {\n console.log(`Warning: ${msg}`);\n }\n}\nfunction unreachable(msg) {\n throw new Error(msg);\n}\nfunction assert(cond, msg) {\n if (!cond) {\n unreachable(msg);\n }\n}\nfunction _isValidProtocol(url) {\n switch (url?.protocol) {\n case \"http:\":\n case \"https:\":\n case \"ftp:\":\n case \"mailto:\":\n case \"tel:\":\n return true;\n default:\n return false;\n }\n}\nfunction createValidAbsoluteUrl(url, baseUrl = null, options = null) {\n if (!url) {\n return null;\n }\n try {\n if (options && typeof url === \"string\") {\n if (options.addDefaultProtocol && url.startsWith(\"www.\")) {\n const dots = url.match(/\\./g);\n if (dots?.length >= 2) {\n url = `http://${url}`;\n }\n }\n if (options.tryConvertEncoding) {\n try {\n url = stringToUTF8String(url);\n } catch {}\n }\n }\n const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);\n if (_isValidProtocol(absoluteUrl)) {\n return absoluteUrl;\n }\n } catch {}\n return null;\n}\nfunction shadow(obj, prop, value, nonSerializable = false) {\n Object.defineProperty(obj, prop, {\n value,\n enumerable: !nonSerializable,\n configurable: true,\n writable: false\n });\n return value;\n}\nconst BaseException = function BaseExceptionClosure() {\n function BaseException(message, name) {\n this.message = message;\n this.name = name;\n }\n BaseException.prototype = new Error();\n BaseException.constructor = BaseException;\n return BaseException;\n}();\nclass PasswordException extends BaseException {\n constructor(msg, code) {\n super(msg, \"PasswordException\");\n this.code = code;\n }\n}\nclass UnknownErrorException extends BaseException {\n constructor(msg, details) {\n super(msg, \"UnknownErrorException\");\n this.details = details;\n }\n}\nclass InvalidPDFException extends BaseException {\n constructor(msg) {\n super(msg, \"InvalidPDFException\");\n }\n}\nclass MissingPDFException extends BaseException {\n constructor(msg) {\n super(msg, \"MissingPDFException\");\n }\n}\nclass UnexpectedResponseException extends BaseException {\n constructor(msg, status) {\n super(msg, \"UnexpectedResponseException\");\n this.status = status;\n }\n}\nclass FormatError extends BaseException {\n constructor(msg) {\n super(msg, \"FormatError\");\n }\n}\nclass AbortException extends BaseException {\n constructor(msg) {\n super(msg, \"AbortException\");\n }\n}\nfunction bytesToString(bytes) {\n if (typeof bytes !== \"object\" || bytes?.length === undefined) {\n unreachable(\"Invalid argument for bytesToString\");\n }\n const length = bytes.length;\n const MAX_ARGUMENT_COUNT = 8192;\n if (length < MAX_ARGUMENT_COUNT) {\n return String.fromCharCode.apply(null, bytes);\n }\n const strBuf = [];\n for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) {\n const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);\n const chunk = bytes.subarray(i, chunkEnd);\n strBuf.push(String.fromCharCode.apply(null, chunk));\n }\n return strBuf.join(\"\");\n}\nfunction stringToBytes(str) {\n if (typeof str !== \"string\") {\n unreachable(\"Invalid argument for stringToBytes\");\n }\n const length = str.length;\n const bytes = new Uint8Array(length);\n for (let i = 0; i < length; ++i) {\n bytes[i] = str.charCodeAt(i) & 0xff;\n }\n return bytes;\n}\nfunction string32(value) {\n return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff);\n}\nfunction objectSize(obj) {\n return Object.keys(obj).length;\n}\nfunction objectFromMap(map) {\n const obj = Object.create(null);\n for (const [key, value] of map) {\n obj[key] = value;\n }\n return obj;\n}\nfunction isLittleEndian() {\n const buffer8 = new Uint8Array(4);\n buffer8[0] = 1;\n const view32 = new Uint32Array(buffer8.buffer, 0, 1);\n return view32[0] === 1;\n}\nfunction isEvalSupported() {\n try {\n new Function(\"\");\n return true;\n } catch {\n return false;\n }\n}\nclass util_FeatureTest {\n static get isLittleEndian() {\n return shadow(this, \"isLittleEndian\", isLittleEndian());\n }\n static get isEvalSupported() {\n return shadow(this, \"isEvalSupported\", isEvalSupported());\n }\n static get isOffscreenCanvasSupported() {\n return shadow(this, \"isOffscreenCanvasSupported\", typeof OffscreenCanvas !== \"undefined\");\n }\n static get platform() {\n if (typeof navigator !== \"undefined\" && typeof navigator?.platform === \"string\") {\n return shadow(this, \"platform\", {\n isMac: navigator.platform.includes(\"Mac\"),\n isWindows: navigator.platform.includes(\"Win\"),\n isFirefox: typeof navigator?.userAgent === \"string\" && navigator.userAgent.includes(\"Firefox\")\n });\n }\n return shadow(this, \"platform\", {\n isMac: false,\n isWindows: false,\n isFirefox: false\n });\n }\n static get isCSSRoundSupported() {\n return shadow(this, \"isCSSRoundSupported\", globalThis.CSS?.supports?.(\"width: round(1.5px, 1px)\"));\n }\n}\nconst hexNumbers = Array.from(Array(256).keys(), n => n.toString(16).padStart(2, \"0\"));\nclass Util {\n static makeHexColor(r, g, b) {\n return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`;\n }\n static scaleMinMax(transform, minMax) {\n let temp;\n if (transform[0]) {\n if (transform[0] < 0) {\n temp = minMax[0];\n minMax[0] = minMax[2];\n minMax[2] = temp;\n }\n minMax[0] *= transform[0];\n minMax[2] *= transform[0];\n if (transform[3] < 0) {\n temp = minMax[1];\n minMax[1] = minMax[3];\n minMax[3] = temp;\n }\n minMax[1] *= transform[3];\n minMax[3] *= transform[3];\n } else {\n temp = minMax[0];\n minMax[0] = minMax[1];\n minMax[1] = temp;\n temp = minMax[2];\n minMax[2] = minMax[3];\n minMax[3] = temp;\n if (transform[1] < 0) {\n temp = minMax[1];\n minMax[1] = minMax[3];\n minMax[3] = temp;\n }\n minMax[1] *= transform[1];\n minMax[3] *= transform[1];\n if (transform[2] < 0) {\n temp = minMax[0];\n minMax[0] = minMax[2];\n minMax[2] = temp;\n }\n minMax[0] *= transform[2];\n minMax[2] *= transform[2];\n }\n minMax[0] += transform[4];\n minMax[1] += transform[5];\n minMax[2] += transform[4];\n minMax[3] += transform[5];\n }\n static transform(m1, m2) {\n return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];\n }\n static applyTransform(p, m) {\n const xt = p[0] * m[0] + p[1] * m[2] + m[4];\n const yt = p[0] * m[1] + p[1] * m[3] + m[5];\n return [xt, yt];\n }\n static applyInverseTransform(p, m) {\n const d = m[0] * m[3] - m[1] * m[2];\n const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;\n const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;\n return [xt, yt];\n }\n static getAxialAlignedBoundingBox(r, m) {\n const p1 = this.applyTransform(r, m);\n const p2 = this.applyTransform(r.slice(2, 4), m);\n const p3 = this.applyTransform([r[0], r[3]], m);\n const p4 = this.applyTransform([r[2], r[1]], m);\n return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])];\n }\n static inverseTransform(m) {\n const d = m[0] * m[3] - m[1] * m[2];\n return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];\n }\n static singularValueDecompose2dScale(m) {\n const transpose = [m[0], m[2], m[1], m[3]];\n const a = m[0] * transpose[0] + m[1] * transpose[2];\n const b = m[0] * transpose[1] + m[1] * transpose[3];\n const c = m[2] * transpose[0] + m[3] * transpose[2];\n const d = m[2] * transpose[1] + m[3] * transpose[3];\n const first = (a + d) / 2;\n const second = Math.sqrt((a + d) ** 2 - 4 * (a * d - c * b)) / 2;\n const sx = first + second || 1;\n const sy = first - second || 1;\n return [Math.sqrt(sx), Math.sqrt(sy)];\n }\n static normalizeRect(rect) {\n const r = rect.slice(0);\n if (rect[0] > rect[2]) {\n r[0] = rect[2];\n r[2] = rect[0];\n }\n if (rect[1] > rect[3]) {\n r[1] = rect[3];\n r[3] = rect[1];\n }\n return r;\n }\n static intersect(rect1, rect2) {\n const xLow = Math.max(Math.min(rect1[0], rect1[2]), Math.min(rect2[0], rect2[2]));\n const xHigh = Math.min(Math.max(rect1[0], rect1[2]), Math.max(rect2[0], rect2[2]));\n if (xLow > xHigh) {\n return null;\n }\n const yLow = Math.max(Math.min(rect1[1], rect1[3]), Math.min(rect2[1], rect2[3]));\n const yHigh = Math.min(Math.max(rect1[1], rect1[3]), Math.max(rect2[1], rect2[3]));\n if (yLow > yHigh) {\n return null;\n }\n return [xLow, yLow, xHigh, yHigh];\n }\n static #getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, t, minMax) {\n if (t <= 0 || t >= 1) {\n return;\n }\n const mt = 1 - t;\n const tt = t * t;\n const ttt = tt * t;\n const x = mt * (mt * (mt * x0 + 3 * t * x1) + 3 * tt * x2) + ttt * x3;\n const y = mt * (mt * (mt * y0 + 3 * t * y1) + 3 * tt * y2) + ttt * y3;\n minMax[0] = Math.min(minMax[0], x);\n minMax[1] = Math.min(minMax[1], y);\n minMax[2] = Math.max(minMax[2], x);\n minMax[3] = Math.max(minMax[3], y);\n }\n static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a, b, c, minMax) {\n if (Math.abs(a) < 1e-12) {\n if (Math.abs(b) >= 1e-12) {\n this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, -c / b, minMax);\n }\n return;\n }\n const delta = b ** 2 - 4 * c * a;\n if (delta < 0) {\n return;\n }\n const sqrtDelta = Math.sqrt(delta);\n const a2 = 2 * a;\n this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b + sqrtDelta) / a2, minMax);\n this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b - sqrtDelta) / a2, minMax);\n }\n static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) {\n if (minMax) {\n minMax[0] = Math.min(minMax[0], x0, x3);\n minMax[1] = Math.min(minMax[1], y0, y3);\n minMax[2] = Math.max(minMax[2], x0, x3);\n minMax[3] = Math.max(minMax[3], y0, y3);\n } else {\n minMax = [Math.min(x0, x3), Math.min(y0, y3), Math.max(x0, x3), Math.max(y0, y3)];\n }\n this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-x0 + 3 * (x1 - x2) + x3), 6 * (x0 - 2 * x1 + x2), 3 * (x1 - x0), minMax);\n this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-y0 + 3 * (y1 - y2) + y3), 6 * (y0 - 2 * y1 + y2), 3 * (y1 - y0), minMax);\n return minMax;\n }\n}\nconst PDFStringTranslateTable = (/* unused pure expression or super */ null && ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2d8, 0x2c7, 0x2c6, 0x2d9, 0x2dd, 0x2db, 0x2da, 0x2dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018, 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x141, 0x152, 0x160, 0x178, 0x17d, 0x131, 0x142, 0x153, 0x161, 0x17e, 0, 0x20ac]));\nfunction stringToPDFString(str) {\n if (str[0] >= \"\\xEF\") {\n let encoding;\n if (str[0] === \"\\xFE\" && str[1] === \"\\xFF\") {\n encoding = \"utf-16be\";\n if (str.length % 2 === 1) {\n str = str.slice(0, -1);\n }\n } else if (str[0] === \"\\xFF\" && str[1] === \"\\xFE\") {\n encoding = \"utf-16le\";\n if (str.length % 2 === 1) {\n str = str.slice(0, -1);\n }\n } else if (str[0] === \"\\xEF\" && str[1] === \"\\xBB\" && str[2] === \"\\xBF\") {\n encoding = \"utf-8\";\n }\n if (encoding) {\n try {\n const decoder = new TextDecoder(encoding, {\n fatal: true\n });\n const buffer = stringToBytes(str);\n const decoded = decoder.decode(buffer);\n if (!decoded.includes(\"\\x1b\")) {\n return decoded;\n }\n return decoded.replaceAll(/\\x1b[^\\x1b]*(?:\\x1b|$)/g, \"\");\n } catch (ex) {\n warn(`stringToPDFString: \"${ex}\".`);\n }\n }\n }\n const strBuf = [];\n for (let i = 0, ii = str.length; i < ii; i++) {\n const charCode = str.charCodeAt(i);\n if (charCode === 0x1b) {\n while (++i < ii && str.charCodeAt(i) !== 0x1b) {}\n continue;\n }\n const code = PDFStringTranslateTable[charCode];\n strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));\n }\n return strBuf.join(\"\");\n}\nfunction stringToUTF8String(str) {\n return decodeURIComponent(escape(str));\n}\nfunction utf8StringToString(str) {\n return unescape(encodeURIComponent(str));\n}\nfunction isArrayEqual(arr1, arr2) {\n if (arr1.length !== arr2.length) {\n return false;\n }\n for (let i = 0, ii = arr1.length; i < ii; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\nfunction getModificationDate(date = new Date()) {\n const buffer = [date.getUTCFullYear().toString(), (date.getUTCMonth() + 1).toString().padStart(2, \"0\"), date.getUTCDate().toString().padStart(2, \"0\"), date.getUTCHours().toString().padStart(2, \"0\"), date.getUTCMinutes().toString().padStart(2, \"0\"), date.getUTCSeconds().toString().padStart(2, \"0\")];\n return buffer.join(\"\");\n}\nlet NormalizeRegex = null;\nlet NormalizationMap = null;\nfunction normalizeUnicode(str) {\n if (!NormalizeRegex) {\n NormalizeRegex = /([\\u00a0\\u00b5\\u037e\\u0eb3\\u2000-\\u200a\\u202f\\u2126\\ufb00-\\ufb04\\ufb06\\ufb20-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\\ufb43-\\ufb44\\ufb46-\\ufba1\\ufba4-\\ufba9\\ufbae-\\ufbb1\\ufbd3-\\ufbdc\\ufbde-\\ufbe7\\ufbea-\\ufbf8\\ufbfc-\\ufbfd\\ufc00-\\ufc5d\\ufc64-\\ufcf1\\ufcf5-\\ufd3d\\ufd88\\ufdf4\\ufdfa-\\ufdfb\\ufe71\\ufe77\\ufe79\\ufe7b\\ufe7d]+)|(\\ufb05+)/gu;\n NormalizationMap = new Map([[\"ſt\", \"ſt\"]]);\n }\n return str.replaceAll(NormalizeRegex, (_, p1, p2) => p1 ? p1.normalize(\"NFKC\") : NormalizationMap.get(p2));\n}\nfunction getUuid() {\n if (typeof crypto !== \"undefined\" && typeof crypto?.randomUUID === \"function\") {\n return crypto.randomUUID();\n }\n const buf = new Uint8Array(32);\n if (typeof crypto !== \"undefined\" && typeof crypto?.getRandomValues === \"function\") {\n crypto.getRandomValues(buf);\n } else {\n for (let i = 0; i < 32; i++) {\n buf[i] = Math.floor(Math.random() * 255);\n }\n }\n return bytesToString(buf);\n}\nconst AnnotationPrefix = \"pdfjs_internal_id_\";\nconst FontRenderOps = {\n BEZIER_CURVE_TO: 0,\n MOVE_TO: 1,\n LINE_TO: 2,\n QUADRATIC_CURVE_TO: 3,\n RESTORE: 4,\n SAVE: 5,\n SCALE: 6,\n TRANSFORM: 7,\n TRANSLATE: 8\n};\n\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.with-resolvers.js\nvar es_promise_with_resolvers = __webpack_require__(4628);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.difference.v2.js\nvar es_set_difference_v2 = __webpack_require__(7642);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.intersection.v2.js\nvar es_set_intersection_v2 = __webpack_require__(8004);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-disjoint-from.v2.js\nvar es_set_is_disjoint_from_v2 = __webpack_require__(3853);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-subset-of.v2.js\nvar es_set_is_subset_of_v2 = __webpack_require__(5876);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-superset-of.v2.js\nvar es_set_is_superset_of_v2 = __webpack_require__(2475);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.symmetric-difference.v2.js\nvar es_set_symmetric_difference_v2 = __webpack_require__(5024);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.union.v2.js\nvar es_set_union_v2 = __webpack_require__(1698);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.map.js\nvar esnext_iterator_map = __webpack_require__(1454);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-exception.stack.js\nvar web_dom_exception_stack = __webpack_require__(4979);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.constructor.js\nvar esnext_iterator_constructor = __webpack_require__(8992);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.drop.js\nvar esnext_iterator_drop = __webpack_require__(4743);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.every.js\nvar esnext_iterator_every = __webpack_require__(3215);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.some.js\nvar esnext_iterator_some = __webpack_require__(7550);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.json.parse.js\nvar esnext_json_parse = __webpack_require__(8335);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.filter.js\nvar esnext_iterator_filter = __webpack_require__(4520);\n;// ./src/display/base_factory.js\n\nclass BaseFilterFactory {\n addFilter(maps) {\n return \"none\";\n }\n addHCMFilter(fgColor, bgColor) {\n return \"none\";\n }\n addAlphaFilter(map) {\n return \"none\";\n }\n addLuminosityFilter(map) {\n return \"none\";\n }\n addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgColor) {\n return \"none\";\n }\n destroy(keepHCM = false) {}\n}\nclass BaseCanvasFactory {\n #enableHWA = false;\n constructor({\n enableHWA = false\n }) {\n this.#enableHWA = enableHWA;\n }\n create(width, height) {\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid canvas size\");\n }\n const canvas = this._createCanvas(width, height);\n return {\n canvas,\n context: canvas.getContext(\"2d\", {\n willReadFrequently: !this.#enableHWA\n })\n };\n }\n reset(canvasAndContext, width, height) {\n if (!canvasAndContext.canvas) {\n throw new Error(\"Canvas is not specified\");\n }\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid canvas size\");\n }\n canvasAndContext.canvas.width = width;\n canvasAndContext.canvas.height = height;\n }\n destroy(canvasAndContext) {\n if (!canvasAndContext.canvas) {\n throw new Error(\"Canvas is not specified\");\n }\n canvasAndContext.canvas.width = 0;\n canvasAndContext.canvas.height = 0;\n canvasAndContext.canvas = null;\n canvasAndContext.context = null;\n }\n _createCanvas(width, height) {\n unreachable(\"Abstract method `_createCanvas` called.\");\n }\n}\nclass BaseCMapReaderFactory {\n constructor({\n baseUrl = null,\n isCompressed = true\n }) {\n this.baseUrl = baseUrl;\n this.isCompressed = isCompressed;\n }\n async fetch({\n name\n }) {\n if (!this.baseUrl) {\n throw new Error(\"Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.\");\n }\n if (!name) {\n throw new Error(\"CMap name must be specified.\");\n }\n const url = this.baseUrl + name + (this.isCompressed ? \".bcmap\" : \"\");\n const compressionType = this.isCompressed ? CMapCompressionType.BINARY : CMapCompressionType.NONE;\n return this._fetchData(url, compressionType).catch(reason => {\n throw new Error(`Unable to load ${this.isCompressed ? \"binary \" : \"\"}CMap at: ${url}`);\n });\n }\n _fetchData(url, compressionType) {\n unreachable(\"Abstract method `_fetchData` called.\");\n }\n}\nclass BaseStandardFontDataFactory {\n constructor({\n baseUrl = null\n }) {\n this.baseUrl = baseUrl;\n }\n async fetch({\n filename\n }) {\n if (!this.baseUrl) {\n throw new Error(\"Ensure that the `standardFontDataUrl` API parameter is provided.\");\n }\n if (!filename) {\n throw new Error(\"Font filename must be specified.\");\n }\n const url = `${this.baseUrl}${filename}`;\n return this._fetchData(url).catch(reason => {\n throw new Error(`Unable to load font data at: ${url}`);\n });\n }\n _fetchData(url) {\n unreachable(\"Abstract method `_fetchData` called.\");\n }\n}\nclass BaseSVGFactory {\n create(width, height, skipDimensions = false) {\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid SVG dimensions\");\n }\n const svg = this._createSVG(\"svg:svg\");\n svg.setAttribute(\"version\", \"1.1\");\n if (!skipDimensions) {\n svg.setAttribute(\"width\", `${width}px`);\n svg.setAttribute(\"height\", `${height}px`);\n }\n svg.setAttribute(\"preserveAspectRatio\", \"none\");\n svg.setAttribute(\"viewBox\", `0 0 ${width} ${height}`);\n return svg;\n }\n createElement(type) {\n if (typeof type !== \"string\") {\n throw new Error(\"Invalid SVG element type\");\n }\n return this._createSVG(type);\n }\n _createSVG(type) {\n unreachable(\"Abstract method `_createSVG` called.\");\n }\n}\n\n;// ./src/display/display_utils.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\nclass PixelsPerInch {\n static CSS = 96.0;\n static PDF = 72.0;\n static PDF_TO_CSS_UNITS = this.CSS / this.PDF;\n}\nclass DOMFilterFactory extends BaseFilterFactory {\n #baseUrl;\n #_cache;\n #_defs;\n #docId;\n #document;\n #_hcmCache;\n #id = 0;\n constructor({\n docId,\n ownerDocument = globalThis.document\n }) {\n super();\n this.#docId = docId;\n this.#document = ownerDocument;\n }\n get #cache() {\n return this.#_cache ||= new Map();\n }\n get #hcmCache() {\n return this.#_hcmCache ||= new Map();\n }\n get #defs() {\n if (!this.#_defs) {\n const div = this.#document.createElement(\"div\");\n const {\n style\n } = div;\n style.visibility = \"hidden\";\n style.contain = \"strict\";\n style.width = style.height = 0;\n style.position = \"absolute\";\n style.top = style.left = 0;\n style.zIndex = -1;\n const svg = this.#document.createElementNS(SVG_NS, \"svg\");\n svg.setAttribute(\"width\", 0);\n svg.setAttribute(\"height\", 0);\n this.#_defs = this.#document.createElementNS(SVG_NS, \"defs\");\n div.append(svg);\n svg.append(this.#_defs);\n this.#document.body.append(div);\n }\n return this.#_defs;\n }\n #createTables(maps) {\n if (maps.length === 1) {\n const mapR = maps[0];\n const buffer = new Array(256);\n for (let i = 0; i < 256; i++) {\n buffer[i] = mapR[i] / 255;\n }\n const table = buffer.join(\",\");\n return [table, table, table];\n }\n const [mapR, mapG, mapB] = maps;\n const bufferR = new Array(256);\n const bufferG = new Array(256);\n const bufferB = new Array(256);\n for (let i = 0; i < 256; i++) {\n bufferR[i] = mapR[i] / 255;\n bufferG[i] = mapG[i] / 255;\n bufferB[i] = mapB[i] / 255;\n }\n return [bufferR.join(\",\"), bufferG.join(\",\"), bufferB.join(\",\")];\n }\n #createUrl(id) {\n if (this.#baseUrl === undefined) {\n this.#baseUrl = \"\";\n const url = this.#document.URL;\n if (url !== this.#document.baseURI) {\n if (isDataScheme(url)) {\n warn('#createUrl: ignore \"data:\"-URL for performance reasons.');\n } else {\n this.#baseUrl = url.split(\"#\", 1)[0];\n }\n }\n }\n return `url(${this.#baseUrl}#${id})`;\n }\n addFilter(maps) {\n if (!maps) {\n return \"none\";\n }\n let value = this.#cache.get(maps);\n if (value) {\n return value;\n }\n const [tableR, tableG, tableB] = this.#createTables(maps);\n const key = maps.length === 1 ? tableR : `${tableR}${tableG}${tableB}`;\n value = this.#cache.get(key);\n if (value) {\n this.#cache.set(maps, value);\n return value;\n }\n const id = `g_${this.#docId}_transfer_map_${this.#id++}`;\n const url = this.#createUrl(id);\n this.#cache.set(maps, url);\n this.#cache.set(key, url);\n const filter = this.#createFilter(id);\n this.#addTransferMapConversion(tableR, tableG, tableB, filter);\n return url;\n }\n addHCMFilter(fgColor, bgColor) {\n const key = `${fgColor}-${bgColor}`;\n const filterName = \"base\";\n let info = this.#hcmCache.get(filterName);\n if (info?.key === key) {\n return info.url;\n }\n if (info) {\n info.filter?.remove();\n info.key = key;\n info.url = \"none\";\n info.filter = null;\n } else {\n info = {\n key,\n url: \"none\",\n filter: null\n };\n this.#hcmCache.set(filterName, info);\n }\n if (!fgColor || !bgColor) {\n return info.url;\n }\n const fgRGB = this.#getRGB(fgColor);\n fgColor = Util.makeHexColor(...fgRGB);\n const bgRGB = this.#getRGB(bgColor);\n bgColor = Util.makeHexColor(...bgRGB);\n this.#defs.style.color = \"\";\n if (fgColor === \"#000000\" && bgColor === \"#ffffff\" || fgColor === bgColor) {\n return info.url;\n }\n const map = new Array(256);\n for (let i = 0; i <= 255; i++) {\n const x = i / 255;\n map[i] = x <= 0.03928 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4;\n }\n const table = map.join(\",\");\n const id = `g_${this.#docId}_hcm_filter`;\n const filter = info.filter = this.#createFilter(id);\n this.#addTransferMapConversion(table, table, table, filter);\n this.#addGrayConversion(filter);\n const getSteps = (c, n) => {\n const start = fgRGB[c] / 255;\n const end = bgRGB[c] / 255;\n const arr = new Array(n + 1);\n for (let i = 0; i <= n; i++) {\n arr[i] = start + i / n * (end - start);\n }\n return arr.join(\",\");\n };\n this.#addTransferMapConversion(getSteps(0, 5), getSteps(1, 5), getSteps(2, 5), filter);\n info.url = this.#createUrl(id);\n return info.url;\n }\n addAlphaFilter(map) {\n let value = this.#cache.get(map);\n if (value) {\n return value;\n }\n const [tableA] = this.#createTables([map]);\n const key = `alpha_${tableA}`;\n value = this.#cache.get(key);\n if (value) {\n this.#cache.set(map, value);\n return value;\n }\n const id = `g_${this.#docId}_alpha_map_${this.#id++}`;\n const url = this.#createUrl(id);\n this.#cache.set(map, url);\n this.#cache.set(key, url);\n const filter = this.#createFilter(id);\n this.#addTransferMapAlphaConversion(tableA, filter);\n return url;\n }\n addLuminosityFilter(map) {\n let value = this.#cache.get(map || \"luminosity\");\n if (value) {\n return value;\n }\n let tableA, key;\n if (map) {\n [tableA] = this.#createTables([map]);\n key = `luminosity_${tableA}`;\n } else {\n key = \"luminosity\";\n }\n value = this.#cache.get(key);\n if (value) {\n this.#cache.set(map, value);\n return value;\n }\n const id = `g_${this.#docId}_luminosity_map_${this.#id++}`;\n const url = this.#createUrl(id);\n this.#cache.set(map, url);\n this.#cache.set(key, url);\n const filter = this.#createFilter(id);\n this.#addLuminosityConversion(filter);\n if (map) {\n this.#addTransferMapAlphaConversion(tableA, filter);\n }\n return url;\n }\n addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgColor) {\n const key = `${fgColor}-${bgColor}-${newFgColor}-${newBgColor}`;\n let info = this.#hcmCache.get(filterName);\n if (info?.key === key) {\n return info.url;\n }\n if (info) {\n info.filter?.remove();\n info.key = key;\n info.url = \"none\";\n info.filter = null;\n } else {\n info = {\n key,\n url: \"none\",\n filter: null\n };\n this.#hcmCache.set(filterName, info);\n }\n if (!fgColor || !bgColor) {\n return info.url;\n }\n const [fgRGB, bgRGB] = [fgColor, bgColor].map(this.#getRGB.bind(this));\n let fgGray = Math.round(0.2126 * fgRGB[0] + 0.7152 * fgRGB[1] + 0.0722 * fgRGB[2]);\n let bgGray = Math.round(0.2126 * bgRGB[0] + 0.7152 * bgRGB[1] + 0.0722 * bgRGB[2]);\n let [newFgRGB, newBgRGB] = [newFgColor, newBgColor].map(this.#getRGB.bind(this));\n if (bgGray < fgGray) {\n [fgGray, bgGray, newFgRGB, newBgRGB] = [bgGray, fgGray, newBgRGB, newFgRGB];\n }\n this.#defs.style.color = \"\";\n const getSteps = (fg, bg, n) => {\n const arr = new Array(256);\n const step = (bgGray - fgGray) / n;\n const newStart = fg / 255;\n const newStep = (bg - fg) / (255 * n);\n let prev = 0;\n for (let i = 0; i <= n; i++) {\n const k = Math.round(fgGray + i * step);\n const value = newStart + i * newStep;\n for (let j = prev; j <= k; j++) {\n arr[j] = value;\n }\n prev = k + 1;\n }\n for (let i = prev; i < 256; i++) {\n arr[i] = arr[prev - 1];\n }\n return arr.join(\",\");\n };\n const id = `g_${this.#docId}_hcm_${filterName}_filter`;\n const filter = info.filter = this.#createFilter(id);\n this.#addGrayConversion(filter);\n this.#addTransferMapConversion(getSteps(newFgRGB[0], newBgRGB[0], 5), getSteps(newFgRGB[1], newBgRGB[1], 5), getSteps(newFgRGB[2], newBgRGB[2], 5), filter);\n info.url = this.#createUrl(id);\n return info.url;\n }\n destroy(keepHCM = false) {\n if (keepHCM && this.#hcmCache.size !== 0) {\n return;\n }\n if (this.#_defs) {\n this.#_defs.parentNode.parentNode.remove();\n this.#_defs = null;\n }\n if (this.#_cache) {\n this.#_cache.clear();\n this.#_cache = null;\n }\n this.#id = 0;\n }\n #addLuminosityConversion(filter) {\n const feColorMatrix = this.#document.createElementNS(SVG_NS, \"feColorMatrix\");\n feColorMatrix.setAttribute(\"type\", \"matrix\");\n feColorMatrix.setAttribute(\"values\", \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0\");\n filter.append(feColorMatrix);\n }\n #addGrayConversion(filter) {\n const feColorMatrix = this.#document.createElementNS(SVG_NS, \"feColorMatrix\");\n feColorMatrix.setAttribute(\"type\", \"matrix\");\n feColorMatrix.setAttribute(\"values\", \"0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0\");\n filter.append(feColorMatrix);\n }\n #createFilter(id) {\n const filter = this.#document.createElementNS(SVG_NS, \"filter\");\n filter.setAttribute(\"color-interpolation-filters\", \"sRGB\");\n filter.setAttribute(\"id\", id);\n this.#defs.append(filter);\n return filter;\n }\n #appendFeFunc(feComponentTransfer, func, table) {\n const feFunc = this.#document.createElementNS(SVG_NS, func);\n feFunc.setAttribute(\"type\", \"discrete\");\n feFunc.setAttribute(\"tableValues\", table);\n feComponentTransfer.append(feFunc);\n }\n #addTransferMapConversion(rTable, gTable, bTable, filter) {\n const feComponentTransfer = this.#document.createElementNS(SVG_NS, \"feComponentTransfer\");\n filter.append(feComponentTransfer);\n this.#appendFeFunc(feComponentTransfer, \"feFuncR\", rTable);\n this.#appendFeFunc(feComponentTransfer, \"feFuncG\", gTable);\n this.#appendFeFunc(feComponentTransfer, \"feFuncB\", bTable);\n }\n #addTransferMapAlphaConversion(aTable, filter) {\n const feComponentTransfer = this.#document.createElementNS(SVG_NS, \"feComponentTransfer\");\n filter.append(feComponentTransfer);\n this.#appendFeFunc(feComponentTransfer, \"feFuncA\", aTable);\n }\n #getRGB(color) {\n this.#defs.style.color = color;\n return getRGB(getComputedStyle(this.#defs).getPropertyValue(\"color\"));\n }\n}\nclass DOMCanvasFactory extends BaseCanvasFactory {\n constructor({\n ownerDocument = globalThis.document,\n enableHWA = false\n }) {\n super({\n enableHWA\n });\n this._document = ownerDocument;\n }\n _createCanvas(width, height) {\n const canvas = this._document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n}\nasync function fetchData(url, type = \"text\") {\n if (isValidFetchUrl(url, document.baseURI)) {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n switch (type) {\n case \"arraybuffer\":\n return response.arrayBuffer();\n case \"blob\":\n return response.blob();\n case \"json\":\n return response.json();\n }\n return response.text();\n }\n return new Promise((resolve, reject) => {\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = type;\n request.onreadystatechange = () => {\n if (request.readyState !== XMLHttpRequest.DONE) {\n return;\n }\n if (request.status === 200 || request.status === 0) {\n switch (type) {\n case \"arraybuffer\":\n case \"blob\":\n case \"json\":\n resolve(request.response);\n return;\n }\n resolve(request.responseText);\n return;\n }\n reject(new Error(request.statusText));\n };\n request.send(null);\n });\n}\nclass DOMCMapReaderFactory extends BaseCMapReaderFactory {\n _fetchData(url, compressionType) {\n return fetchData(url, this.isCompressed ? \"arraybuffer\" : \"text\").then(data => ({\n cMapData: data instanceof ArrayBuffer ? new Uint8Array(data) : stringToBytes(data),\n compressionType\n }));\n }\n}\nclass DOMStandardFontDataFactory extends BaseStandardFontDataFactory {\n _fetchData(url) {\n return fetchData(url, \"arraybuffer\").then(data => new Uint8Array(data));\n }\n}\nclass DOMSVGFactory extends BaseSVGFactory {\n _createSVG(type) {\n return document.createElementNS(SVG_NS, type);\n }\n}\nclass PageViewport {\n constructor({\n viewBox,\n scale,\n rotation,\n offsetX = 0,\n offsetY = 0,\n dontFlip = false\n }) {\n this.viewBox = viewBox;\n this.scale = scale;\n this.rotation = rotation;\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n const centerX = (viewBox[2] + viewBox[0]) / 2;\n const centerY = (viewBox[3] + viewBox[1]) / 2;\n let rotateA, rotateB, rotateC, rotateD;\n rotation %= 360;\n if (rotation < 0) {\n rotation += 360;\n }\n switch (rotation) {\n case 180:\n rotateA = -1;\n rotateB = 0;\n rotateC = 0;\n rotateD = 1;\n break;\n case 90:\n rotateA = 0;\n rotateB = 1;\n rotateC = 1;\n rotateD = 0;\n break;\n case 270:\n rotateA = 0;\n rotateB = -1;\n rotateC = -1;\n rotateD = 0;\n break;\n case 0:\n rotateA = 1;\n rotateB = 0;\n rotateC = 0;\n rotateD = -1;\n break;\n default:\n throw new Error(\"PageViewport: Invalid rotation, must be a multiple of 90 degrees.\");\n }\n if (dontFlip) {\n rotateC = -rotateC;\n rotateD = -rotateD;\n }\n let offsetCanvasX, offsetCanvasY;\n let width, height;\n if (rotateA === 0) {\n offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;\n width = (viewBox[3] - viewBox[1]) * scale;\n height = (viewBox[2] - viewBox[0]) * scale;\n } else {\n offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;\n width = (viewBox[2] - viewBox[0]) * scale;\n height = (viewBox[3] - viewBox[1]) * scale;\n }\n this.transform = [rotateA * scale, rotateB * scale, rotateC * scale, rotateD * scale, offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY];\n this.width = width;\n this.height = height;\n }\n get rawDims() {\n const {\n viewBox\n } = this;\n return shadow(this, \"rawDims\", {\n pageWidth: viewBox[2] - viewBox[0],\n pageHeight: viewBox[3] - viewBox[1],\n pageX: viewBox[0],\n pageY: viewBox[1]\n });\n }\n clone({\n scale = this.scale,\n rotation = this.rotation,\n offsetX = this.offsetX,\n offsetY = this.offsetY,\n dontFlip = false\n } = {}) {\n return new PageViewport({\n viewBox: this.viewBox.slice(),\n scale,\n rotation,\n offsetX,\n offsetY,\n dontFlip\n });\n }\n convertToViewportPoint(x, y) {\n return Util.applyTransform([x, y], this.transform);\n }\n convertToViewportRectangle(rect) {\n const topLeft = Util.applyTransform([rect[0], rect[1]], this.transform);\n const bottomRight = Util.applyTransform([rect[2], rect[3]], this.transform);\n return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]];\n }\n convertToPdfPoint(x, y) {\n return Util.applyInverseTransform([x, y], this.transform);\n }\n}\nclass RenderingCancelledException extends BaseException {\n constructor(msg, extraDelay = 0) {\n super(msg, \"RenderingCancelledException\");\n this.extraDelay = extraDelay;\n }\n}\nfunction isDataScheme(url) {\n const ii = url.length;\n let i = 0;\n while (i < ii && url[i].trim() === \"\") {\n i++;\n }\n return url.substring(i, i + 5).toLowerCase() === \"data:\";\n}\nfunction isPdfFile(filename) {\n return typeof filename === \"string\" && /\\.pdf$/i.test(filename);\n}\nfunction getFilenameFromUrl(url) {\n [url] = url.split(/[#?]/, 1);\n return url.substring(url.lastIndexOf(\"/\") + 1);\n}\nfunction getPdfFilenameFromUrl(url, defaultFilename = \"document.pdf\") {\n if (typeof url !== \"string\") {\n return defaultFilename;\n }\n if (isDataScheme(url)) {\n warn('getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons.');\n return defaultFilename;\n }\n const reURI = /^(?:(?:[^:]+:)?\\/\\/[^/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/;\n const reFilename = /[^/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i;\n const splitURI = reURI.exec(url);\n let suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]);\n if (suggestedFilename) {\n suggestedFilename = suggestedFilename[0];\n if (suggestedFilename.includes(\"%\")) {\n try {\n suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0];\n } catch {}\n }\n }\n return suggestedFilename || defaultFilename;\n}\nclass StatTimer {\n started = Object.create(null);\n times = [];\n time(name) {\n if (name in this.started) {\n warn(`Timer is already running for ${name}`);\n }\n this.started[name] = Date.now();\n }\n timeEnd(name) {\n if (!(name in this.started)) {\n warn(`Timer has not been started for ${name}`);\n }\n this.times.push({\n name,\n start: this.started[name],\n end: Date.now()\n });\n delete this.started[name];\n }\n toString() {\n const outBuf = [];\n let longest = 0;\n for (const {\n name\n } of this.times) {\n longest = Math.max(name.length, longest);\n }\n for (const {\n name,\n start,\n end\n } of this.times) {\n outBuf.push(`${name.padEnd(longest)} ${end - start}ms\\n`);\n }\n return outBuf.join(\"\");\n }\n}\nfunction isValidFetchUrl(url, baseUrl) {\n try {\n const {\n protocol\n } = baseUrl ? new URL(url, baseUrl) : new URL(url);\n return protocol === \"http:\" || protocol === \"https:\";\n } catch {\n return false;\n }\n}\nfunction noContextMenu(e) {\n e.preventDefault();\n}\nfunction deprecated(details) {\n console.log(\"Deprecated API usage: \" + details);\n}\nlet pdfDateStringRegex;\nclass PDFDateString {\n static toDateObject(input) {\n if (!input || typeof input !== \"string\") {\n return null;\n }\n pdfDateStringRegex ||= new RegExp(\"^D:\" + \"(\\\\d{4})\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"([Z|+|-])?\" + \"(\\\\d{2})?\" + \"'?\" + \"(\\\\d{2})?\" + \"'?\");\n const matches = pdfDateStringRegex.exec(input);\n if (!matches) {\n return null;\n }\n const year = parseInt(matches[1], 10);\n let month = parseInt(matches[2], 10);\n month = month >= 1 && month <= 12 ? month - 1 : 0;\n let day = parseInt(matches[3], 10);\n day = day >= 1 && day <= 31 ? day : 1;\n let hour = parseInt(matches[4], 10);\n hour = hour >= 0 && hour <= 23 ? hour : 0;\n let minute = parseInt(matches[5], 10);\n minute = minute >= 0 && minute <= 59 ? minute : 0;\n let second = parseInt(matches[6], 10);\n second = second >= 0 && second <= 59 ? second : 0;\n const universalTimeRelation = matches[7] || \"Z\";\n let offsetHour = parseInt(matches[8], 10);\n offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0;\n let offsetMinute = parseInt(matches[9], 10) || 0;\n offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0;\n if (universalTimeRelation === \"-\") {\n hour += offsetHour;\n minute += offsetMinute;\n } else if (universalTimeRelation === \"+\") {\n hour -= offsetHour;\n minute -= offsetMinute;\n }\n return new Date(Date.UTC(year, month, day, hour, minute, second));\n }\n}\nfunction getXfaPageViewport(xfaPage, {\n scale = 1,\n rotation = 0\n}) {\n const {\n width,\n height\n } = xfaPage.attributes.style;\n const viewBox = [0, 0, parseInt(width), parseInt(height)];\n return new PageViewport({\n viewBox,\n scale,\n rotation\n });\n}\nfunction getRGB(color) {\n if (color.startsWith(\"#\")) {\n const colorRGB = parseInt(color.slice(1), 16);\n return [(colorRGB & 0xff0000) >> 16, (colorRGB & 0x00ff00) >> 8, colorRGB & 0x0000ff];\n }\n if (color.startsWith(\"rgb(\")) {\n return color.slice(4, -1).split(\",\").map(x => parseInt(x));\n }\n if (color.startsWith(\"rgba(\")) {\n return color.slice(5, -1).split(\",\").map(x => parseInt(x)).slice(0, 3);\n }\n warn(`Not a valid color format: \"${color}\"`);\n return [0, 0, 0];\n}\nfunction getColorValues(colors) {\n const span = document.createElement(\"span\");\n span.style.visibility = \"hidden\";\n document.body.append(span);\n for (const name of colors.keys()) {\n span.style.color = name;\n const computedColor = window.getComputedStyle(span).color;\n colors.set(name, getRGB(computedColor));\n }\n span.remove();\n}\nfunction getCurrentTransform(ctx) {\n const {\n a,\n b,\n c,\n d,\n e,\n f\n } = ctx.getTransform();\n return [a, b, c, d, e, f];\n}\nfunction getCurrentTransformInverse(ctx) {\n const {\n a,\n b,\n c,\n d,\n e,\n f\n } = ctx.getTransform().invertSelf();\n return [a, b, c, d, e, f];\n}\nfunction setLayerDimensions(div, viewport, mustFlip = false, mustRotate = true) {\n if (viewport instanceof PageViewport) {\n const {\n pageWidth,\n pageHeight\n } = viewport.rawDims;\n const {\n style\n } = div;\n const useRound = util_FeatureTest.isCSSRoundSupported;\n const w = `var(--scale-factor) * ${pageWidth}px`,\n h = `var(--scale-factor) * ${pageHeight}px`;\n const widthStr = useRound ? `round(down, ${w}, var(--scale-round-x, 1px))` : `calc(${w})`,\n heightStr = useRound ? `round(down, ${h}, var(--scale-round-y, 1px))` : `calc(${h})`;\n if (!mustFlip || viewport.rotation % 180 === 0) {\n style.width = widthStr;\n style.height = heightStr;\n } else {\n style.width = heightStr;\n style.height = widthStr;\n }\n }\n if (mustRotate) {\n div.setAttribute(\"data-main-rotation\", viewport.rotation);\n }\n}\nclass OutputScale {\n constructor() {\n const pixelRatio = window.devicePixelRatio || 1;\n this.sx = pixelRatio;\n this.sy = pixelRatio;\n }\n get scaled() {\n return this.sx !== 1 || this.sy !== 1;\n }\n get symmetric() {\n return this.sx === this.sy;\n }\n}\n\n;// ./src/display/editor/toolbar.js\n\nclass EditorToolbar {\n #toolbar = null;\n #colorPicker = null;\n #editor;\n #buttons = null;\n #altText = null;\n static #l10nRemove = null;\n constructor(editor) {\n this.#editor = editor;\n EditorToolbar.#l10nRemove ||= Object.freeze({\n freetext: \"pdfjs-editor-remove-freetext-button\",\n highlight: \"pdfjs-editor-remove-highlight-button\",\n ink: \"pdfjs-editor-remove-ink-button\",\n stamp: \"pdfjs-editor-remove-stamp-button\"\n });\n }\n render() {\n const editToolbar = this.#toolbar = document.createElement(\"div\");\n editToolbar.classList.add(\"editToolbar\", \"hidden\");\n editToolbar.setAttribute(\"role\", \"toolbar\");\n const signal = this.#editor._uiManager._signal;\n editToolbar.addEventListener(\"contextmenu\", noContextMenu, {\n signal\n });\n editToolbar.addEventListener(\"pointerdown\", EditorToolbar.#pointerDown, {\n signal\n });\n const buttons = this.#buttons = document.createElement(\"div\");\n buttons.className = \"buttons\";\n editToolbar.append(buttons);\n const position = this.#editor.toolbarPosition;\n if (position) {\n const {\n style\n } = editToolbar;\n const x = this.#editor._uiManager.direction === \"ltr\" ? 1 - position[0] : position[0];\n style.insetInlineEnd = `${100 * x}%`;\n style.top = `calc(${100 * position[1]}% + var(--editor-toolbar-vert-offset))`;\n }\n this.#addDeleteButton();\n return editToolbar;\n }\n get div() {\n return this.#toolbar;\n }\n static #pointerDown(e) {\n e.stopPropagation();\n }\n #focusIn(e) {\n this.#editor._focusEventsAllowed = false;\n e.preventDefault();\n e.stopPropagation();\n }\n #focusOut(e) {\n this.#editor._focusEventsAllowed = true;\n e.preventDefault();\n e.stopPropagation();\n }\n #addListenersToElement(element) {\n const signal = this.#editor._uiManager._signal;\n element.addEventListener(\"focusin\", this.#focusIn.bind(this), {\n capture: true,\n signal\n });\n element.addEventListener(\"focusout\", this.#focusOut.bind(this), {\n capture: true,\n signal\n });\n element.addEventListener(\"contextmenu\", noContextMenu, {\n signal\n });\n }\n hide() {\n this.#toolbar.classList.add(\"hidden\");\n this.#colorPicker?.hideDropdown();\n }\n show() {\n this.#toolbar.classList.remove(\"hidden\");\n this.#altText?.shown();\n }\n #addDeleteButton() {\n const {\n editorType,\n _uiManager\n } = this.#editor;\n const button = document.createElement(\"button\");\n button.className = \"delete\";\n button.tabIndex = 0;\n button.setAttribute(\"data-l10n-id\", EditorToolbar.#l10nRemove[editorType]);\n this.#addListenersToElement(button);\n button.addEventListener(\"click\", e => {\n _uiManager.delete();\n }, {\n signal: _uiManager._signal\n });\n this.#buttons.append(button);\n }\n get #divider() {\n const divider = document.createElement(\"div\");\n divider.className = \"divider\";\n return divider;\n }\n async addAltText(altText) {\n const button = await altText.render();\n this.#addListenersToElement(button);\n this.#buttons.prepend(button, this.#divider);\n this.#altText = altText;\n }\n addColorPicker(colorPicker) {\n this.#colorPicker = colorPicker;\n const button = colorPicker.renderButton();\n this.#addListenersToElement(button);\n this.#buttons.prepend(button, this.#divider);\n }\n remove() {\n this.#toolbar.remove();\n this.#colorPicker?.destroy();\n this.#colorPicker = null;\n }\n}\nclass HighlightToolbar {\n #buttons = null;\n #toolbar = null;\n #uiManager;\n constructor(uiManager) {\n this.#uiManager = uiManager;\n }\n #render() {\n const editToolbar = this.#toolbar = document.createElement(\"div\");\n editToolbar.className = \"editToolbar\";\n editToolbar.setAttribute(\"role\", \"toolbar\");\n editToolbar.addEventListener(\"contextmenu\", noContextMenu, {\n signal: this.#uiManager._signal\n });\n const buttons = this.#buttons = document.createElement(\"div\");\n buttons.className = \"buttons\";\n editToolbar.append(buttons);\n this.#addHighlightButton();\n return editToolbar;\n }\n #getLastPoint(boxes, isLTR) {\n let lastY = 0;\n let lastX = 0;\n for (const box of boxes) {\n const y = box.y + box.height;\n if (y < lastY) {\n continue;\n }\n const x = box.x + (isLTR ? box.width : 0);\n if (y > lastY) {\n lastX = x;\n lastY = y;\n continue;\n }\n if (isLTR) {\n if (x > lastX) {\n lastX = x;\n }\n } else if (x < lastX) {\n lastX = x;\n }\n }\n return [isLTR ? 1 - lastX : lastX, lastY];\n }\n show(parent, boxes, isLTR) {\n const [x, y] = this.#getLastPoint(boxes, isLTR);\n const {\n style\n } = this.#toolbar ||= this.#render();\n parent.append(this.#toolbar);\n style.insetInlineEnd = `${100 * x}%`;\n style.top = `calc(${100 * y}% + var(--editor-toolbar-vert-offset))`;\n }\n hide() {\n this.#toolbar.remove();\n }\n #addHighlightButton() {\n const button = document.createElement(\"button\");\n button.className = \"highlightButton\";\n button.tabIndex = 0;\n button.setAttribute(\"data-l10n-id\", `pdfjs-highlight-floating-button1`);\n const span = document.createElement(\"span\");\n button.append(span);\n span.className = \"visuallyHidden\";\n span.setAttribute(\"data-l10n-id\", \"pdfjs-highlight-floating-button-label\");\n const signal = this.#uiManager._signal;\n button.addEventListener(\"contextmenu\", noContextMenu, {\n signal\n });\n button.addEventListener(\"click\", () => {\n this.#uiManager.highlightSelection(\"floating_button\");\n }, {\n signal\n });\n this.#buttons.append(button);\n }\n}\n\n;// ./src/display/editor/tools.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction bindEvents(obj, element, names) {\n for (const name of names) {\n element.addEventListener(name, obj[name].bind(obj));\n }\n}\nfunction opacityToHex(opacity) {\n return Math.round(Math.min(255, Math.max(1, 255 * opacity))).toString(16).padStart(2, \"0\");\n}\nclass IdManager {\n #id = 0;\n get id() {\n return `${AnnotationEditorPrefix}${this.#id++}`;\n }\n}\nclass ImageManager {\n #baseId = getUuid();\n #id = 0;\n #cache = null;\n static get _isSVGFittingCanvas() {\n const svg = `data:image/svg+xml;charset=UTF-8,`;\n const canvas = new OffscreenCanvas(1, 3);\n const ctx = canvas.getContext(\"2d\", {\n willReadFrequently: true\n });\n const image = new Image();\n image.src = svg;\n const promise = image.decode().then(() => {\n ctx.drawImage(image, 0, 0, 1, 1, 0, 0, 1, 3);\n return new Uint32Array(ctx.getImageData(0, 0, 1, 1).data.buffer)[0] === 0;\n });\n return shadow(this, \"_isSVGFittingCanvas\", promise);\n }\n async #get(key, rawData) {\n this.#cache ||= new Map();\n let data = this.#cache.get(key);\n if (data === null) {\n return null;\n }\n if (data?.bitmap) {\n data.refCounter += 1;\n return data;\n }\n try {\n data ||= {\n bitmap: null,\n id: `image_${this.#baseId}_${this.#id++}`,\n refCounter: 0,\n isSvg: false\n };\n let image;\n if (typeof rawData === \"string\") {\n data.url = rawData;\n image = await fetchData(rawData, \"blob\");\n } else if (rawData instanceof File) {\n image = data.file = rawData;\n } else if (rawData instanceof Blob) {\n image = rawData;\n }\n if (image.type === \"image/svg+xml\") {\n const mustRemoveAspectRatioPromise = ImageManager._isSVGFittingCanvas;\n const fileReader = new FileReader();\n const imageElement = new Image();\n const imagePromise = new Promise((resolve, reject) => {\n imageElement.onload = () => {\n data.bitmap = imageElement;\n data.isSvg = true;\n resolve();\n };\n fileReader.onload = async () => {\n const url = data.svgUrl = fileReader.result;\n imageElement.src = (await mustRemoveAspectRatioPromise) ? `${url}#svgView(preserveAspectRatio(none))` : url;\n };\n imageElement.onerror = fileReader.onerror = reject;\n });\n fileReader.readAsDataURL(image);\n await imagePromise;\n } else {\n data.bitmap = await createImageBitmap(image);\n }\n data.refCounter = 1;\n } catch (e) {\n console.error(e);\n data = null;\n }\n this.#cache.set(key, data);\n if (data) {\n this.#cache.set(data.id, data);\n }\n return data;\n }\n async getFromFile(file) {\n const {\n lastModified,\n name,\n size,\n type\n } = file;\n return this.#get(`${lastModified}_${name}_${size}_${type}`, file);\n }\n async getFromUrl(url) {\n return this.#get(url, url);\n }\n async getFromBlob(id, blobPromise) {\n const blob = await blobPromise;\n return this.#get(id, blob);\n }\n async getFromId(id) {\n this.#cache ||= new Map();\n const data = this.#cache.get(id);\n if (!data) {\n return null;\n }\n if (data.bitmap) {\n data.refCounter += 1;\n return data;\n }\n if (data.file) {\n return this.getFromFile(data.file);\n }\n if (data.blobPromise) {\n const {\n blobPromise\n } = data;\n delete data.blobPromise;\n return this.getFromBlob(data.id, blobPromise);\n }\n return this.getFromUrl(data.url);\n }\n getFromCanvas(id, canvas) {\n this.#cache ||= new Map();\n let data = this.#cache.get(id);\n if (data?.bitmap) {\n data.refCounter += 1;\n return data;\n }\n const offscreen = new OffscreenCanvas(canvas.width, canvas.height);\n const ctx = offscreen.getContext(\"2d\");\n ctx.drawImage(canvas, 0, 0);\n data = {\n bitmap: offscreen.transferToImageBitmap(),\n id: `image_${this.#baseId}_${this.#id++}`,\n refCounter: 1,\n isSvg: false\n };\n this.#cache.set(id, data);\n this.#cache.set(data.id, data);\n return data;\n }\n getSvgUrl(id) {\n const data = this.#cache.get(id);\n if (!data?.isSvg) {\n return null;\n }\n return data.svgUrl;\n }\n deleteId(id) {\n this.#cache ||= new Map();\n const data = this.#cache.get(id);\n if (!data) {\n return;\n }\n data.refCounter -= 1;\n if (data.refCounter !== 0) {\n return;\n }\n const {\n bitmap\n } = data;\n if (!data.url && !data.file) {\n const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);\n const ctx = canvas.getContext(\"bitmaprenderer\");\n ctx.transferFromImageBitmap(bitmap);\n data.blobPromise = canvas.convertToBlob();\n }\n bitmap.close?.();\n data.bitmap = null;\n }\n isValidId(id) {\n return id.startsWith(`image_${this.#baseId}_`);\n }\n}\nclass CommandManager {\n #commands = [];\n #locked = false;\n #maxSize;\n #position = -1;\n constructor(maxSize = 128) {\n this.#maxSize = maxSize;\n }\n add({\n cmd,\n undo,\n post,\n mustExec,\n type = NaN,\n overwriteIfSameType = false,\n keepUndo = false\n }) {\n if (mustExec) {\n cmd();\n }\n if (this.#locked) {\n return;\n }\n const save = {\n cmd,\n undo,\n post,\n type\n };\n if (this.#position === -1) {\n if (this.#commands.length > 0) {\n this.#commands.length = 0;\n }\n this.#position = 0;\n this.#commands.push(save);\n return;\n }\n if (overwriteIfSameType && this.#commands[this.#position].type === type) {\n if (keepUndo) {\n save.undo = this.#commands[this.#position].undo;\n }\n this.#commands[this.#position] = save;\n return;\n }\n const next = this.#position + 1;\n if (next === this.#maxSize) {\n this.#commands.splice(0, 1);\n } else {\n this.#position = next;\n if (next < this.#commands.length) {\n this.#commands.splice(next);\n }\n }\n this.#commands.push(save);\n }\n undo() {\n if (this.#position === -1) {\n return;\n }\n this.#locked = true;\n const {\n undo,\n post\n } = this.#commands[this.#position];\n undo();\n post?.();\n this.#locked = false;\n this.#position -= 1;\n }\n redo() {\n if (this.#position < this.#commands.length - 1) {\n this.#position += 1;\n this.#locked = true;\n const {\n cmd,\n post\n } = this.#commands[this.#position];\n cmd();\n post?.();\n this.#locked = false;\n }\n }\n hasSomethingToUndo() {\n return this.#position !== -1;\n }\n hasSomethingToRedo() {\n return this.#position < this.#commands.length - 1;\n }\n destroy() {\n this.#commands = null;\n }\n}\nclass KeyboardManager {\n constructor(callbacks) {\n this.buffer = [];\n this.callbacks = new Map();\n this.allKeys = new Set();\n const {\n isMac\n } = util_FeatureTest.platform;\n for (const [keys, callback, options = {}] of callbacks) {\n for (const key of keys) {\n const isMacKey = key.startsWith(\"mac+\");\n if (isMac && isMacKey) {\n this.callbacks.set(key.slice(4), {\n callback,\n options\n });\n this.allKeys.add(key.split(\"+\").at(-1));\n } else if (!isMac && !isMacKey) {\n this.callbacks.set(key, {\n callback,\n options\n });\n this.allKeys.add(key.split(\"+\").at(-1));\n }\n }\n }\n }\n #serialize(event) {\n if (event.altKey) {\n this.buffer.push(\"alt\");\n }\n if (event.ctrlKey) {\n this.buffer.push(\"ctrl\");\n }\n if (event.metaKey) {\n this.buffer.push(\"meta\");\n }\n if (event.shiftKey) {\n this.buffer.push(\"shift\");\n }\n this.buffer.push(event.key);\n const str = this.buffer.join(\"+\");\n this.buffer.length = 0;\n return str;\n }\n exec(self, event) {\n if (!this.allKeys.has(event.key)) {\n return;\n }\n const info = this.callbacks.get(this.#serialize(event));\n if (!info) {\n return;\n }\n const {\n callback,\n options: {\n bubbles = false,\n args = [],\n checker = null\n }\n } = info;\n if (checker && !checker(self, event)) {\n return;\n }\n callback.bind(self, ...args, event)();\n if (!bubbles) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n}\nclass ColorManager {\n static _colorsMapping = new Map([[\"CanvasText\", [0, 0, 0]], [\"Canvas\", [255, 255, 255]]]);\n get _colors() {\n const colors = new Map([[\"CanvasText\", null], [\"Canvas\", null]]);\n getColorValues(colors);\n return shadow(this, \"_colors\", colors);\n }\n convert(color) {\n const rgb = getRGB(color);\n if (!window.matchMedia(\"(forced-colors: active)\").matches) {\n return rgb;\n }\n for (const [name, RGB] of this._colors) {\n if (RGB.every((x, i) => x === rgb[i])) {\n return ColorManager._colorsMapping.get(name);\n }\n }\n return rgb;\n }\n getHexCode(name) {\n const rgb = this._colors.get(name);\n if (!rgb) {\n return name;\n }\n return Util.makeHexColor(...rgb);\n }\n}\nclass AnnotationEditorUIManager {\n #abortController = new AbortController();\n #activeEditor = null;\n #allEditors = new Map();\n #allLayers = new Map();\n #altTextManager = null;\n #annotationStorage = null;\n #changedExistingAnnotations = null;\n #commandManager = new CommandManager();\n #copyPasteAC = null;\n #currentPageIndex = 0;\n #deletedAnnotationsElementIds = new Set();\n #draggingEditors = null;\n #editorTypes = null;\n #editorsToRescale = new Set();\n #enableHighlightFloatingButton = false;\n #enableUpdatedAddImage = false;\n #enableNewAltTextWhenAddingImage = false;\n #filterFactory = null;\n #focusMainContainerTimeoutId = null;\n #focusManagerAC = null;\n #highlightColors = null;\n #highlightWhenShiftUp = false;\n #highlightToolbar = null;\n #idManager = new IdManager();\n #isEnabled = false;\n #isWaiting = false;\n #keyboardManagerAC = null;\n #lastActiveElement = null;\n #mainHighlightColorPicker = null;\n #mlManager = null;\n #mode = AnnotationEditorType.NONE;\n #selectedEditors = new Set();\n #selectedTextNode = null;\n #pageColors = null;\n #showAllStates = null;\n #previousStates = {\n isEditing: false,\n isEmpty: true,\n hasSomethingToUndo: false,\n hasSomethingToRedo: false,\n hasSelectedEditor: false,\n hasSelectedText: false\n };\n #translation = [0, 0];\n #translationTimeoutId = null;\n #container = null;\n #viewer = null;\n #updateModeCapability = null;\n static TRANSLATE_SMALL = 1;\n static TRANSLATE_BIG = 10;\n static get _keyboardManager() {\n const proto = AnnotationEditorUIManager.prototype;\n const arrowChecker = self => self.#container.contains(document.activeElement) && document.activeElement.tagName !== \"BUTTON\" && self.hasSomethingToControl();\n const textInputChecker = (_self, {\n target: el\n }) => {\n if (el instanceof HTMLInputElement) {\n const {\n type\n } = el;\n return type !== \"text\" && type !== \"number\";\n }\n return true;\n };\n const small = this.TRANSLATE_SMALL;\n const big = this.TRANSLATE_BIG;\n return shadow(this, \"_keyboardManager\", new KeyboardManager([[[\"ctrl+a\", \"mac+meta+a\"], proto.selectAll, {\n checker: textInputChecker\n }], [[\"ctrl+z\", \"mac+meta+z\"], proto.undo, {\n checker: textInputChecker\n }], [[\"ctrl+y\", \"ctrl+shift+z\", \"mac+meta+shift+z\", \"ctrl+shift+Z\", \"mac+meta+shift+Z\"], proto.redo, {\n checker: textInputChecker\n }], [[\"Backspace\", \"alt+Backspace\", \"ctrl+Backspace\", \"shift+Backspace\", \"mac+Backspace\", \"mac+alt+Backspace\", \"mac+ctrl+Backspace\", \"Delete\", \"ctrl+Delete\", \"shift+Delete\", \"mac+Delete\"], proto.delete, {\n checker: textInputChecker\n }], [[\"Enter\", \"mac+Enter\"], proto.addNewEditorFromKeyboard, {\n checker: (self, {\n target: el\n }) => !(el instanceof HTMLButtonElement) && self.#container.contains(el) && !self.isEnterHandled\n }], [[\" \", \"mac+ \"], proto.addNewEditorFromKeyboard, {\n checker: (self, {\n target: el\n }) => !(el instanceof HTMLButtonElement) && self.#container.contains(document.activeElement)\n }], [[\"Escape\", \"mac+Escape\"], proto.unselectAll], [[\"ArrowLeft\", \"mac+ArrowLeft\"], proto.translateSelectedEditors, {\n args: [-small, 0],\n checker: arrowChecker\n }], [[\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"], proto.translateSelectedEditors, {\n args: [-big, 0],\n checker: arrowChecker\n }], [[\"ArrowRight\", \"mac+ArrowRight\"], proto.translateSelectedEditors, {\n args: [small, 0],\n checker: arrowChecker\n }], [[\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"], proto.translateSelectedEditors, {\n args: [big, 0],\n checker: arrowChecker\n }], [[\"ArrowUp\", \"mac+ArrowUp\"], proto.translateSelectedEditors, {\n args: [0, -small],\n checker: arrowChecker\n }], [[\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"], proto.translateSelectedEditors, {\n args: [0, -big],\n checker: arrowChecker\n }], [[\"ArrowDown\", \"mac+ArrowDown\"], proto.translateSelectedEditors, {\n args: [0, small],\n checker: arrowChecker\n }], [[\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"], proto.translateSelectedEditors, {\n args: [0, big],\n checker: arrowChecker\n }]]));\n }\n constructor(container, viewer, altTextManager, eventBus, pdfDocument, pageColors, highlightColors, enableHighlightFloatingButton, enableUpdatedAddImage, enableNewAltTextWhenAddingImage, mlManager) {\n const signal = this._signal = this.#abortController.signal;\n this.#container = container;\n this.#viewer = viewer;\n this.#altTextManager = altTextManager;\n this._eventBus = eventBus;\n eventBus._on(\"editingaction\", this.onEditingAction.bind(this), {\n signal\n });\n eventBus._on(\"pagechanging\", this.onPageChanging.bind(this), {\n signal\n });\n eventBus._on(\"scalechanging\", this.onScaleChanging.bind(this), {\n signal\n });\n eventBus._on(\"rotationchanging\", this.onRotationChanging.bind(this), {\n signal\n });\n eventBus._on(\"setpreference\", this.onSetPreference.bind(this), {\n signal\n });\n eventBus._on(\"switchannotationeditorparams\", evt => this.updateParams(evt.type, evt.value), {\n signal\n });\n this.#addSelectionListener();\n this.#addDragAndDropListeners();\n this.#addKeyboardManager();\n this.#annotationStorage = pdfDocument.annotationStorage;\n this.#filterFactory = pdfDocument.filterFactory;\n this.#pageColors = pageColors;\n this.#highlightColors = highlightColors || null;\n this.#enableHighlightFloatingButton = enableHighlightFloatingButton;\n this.#enableUpdatedAddImage = enableUpdatedAddImage;\n this.#enableNewAltTextWhenAddingImage = enableNewAltTextWhenAddingImage;\n this.#mlManager = mlManager || null;\n this.viewParameters = {\n realScale: PixelsPerInch.PDF_TO_CSS_UNITS,\n rotation: 0\n };\n this.isShiftKeyDown = false;\n }\n destroy() {\n this.#updateModeCapability?.resolve();\n this.#updateModeCapability = null;\n this.#abortController?.abort();\n this.#abortController = null;\n this._signal = null;\n for (const layer of this.#allLayers.values()) {\n layer.destroy();\n }\n this.#allLayers.clear();\n this.#allEditors.clear();\n this.#editorsToRescale.clear();\n this.#activeEditor = null;\n this.#selectedEditors.clear();\n this.#commandManager.destroy();\n this.#altTextManager?.destroy();\n this.#highlightToolbar?.hide();\n this.#highlightToolbar = null;\n if (this.#focusMainContainerTimeoutId) {\n clearTimeout(this.#focusMainContainerTimeoutId);\n this.#focusMainContainerTimeoutId = null;\n }\n if (this.#translationTimeoutId) {\n clearTimeout(this.#translationTimeoutId);\n this.#translationTimeoutId = null;\n }\n }\n combinedSignal(ac) {\n return AbortSignal.any([this._signal, ac.signal]);\n }\n get mlManager() {\n return this.#mlManager;\n }\n get useNewAltTextFlow() {\n return this.#enableUpdatedAddImage;\n }\n get useNewAltTextWhenAddingImage() {\n return this.#enableNewAltTextWhenAddingImage;\n }\n get hcmFilter() {\n return shadow(this, \"hcmFilter\", this.#pageColors ? this.#filterFactory.addHCMFilter(this.#pageColors.foreground, this.#pageColors.background) : \"none\");\n }\n get direction() {\n return shadow(this, \"direction\", getComputedStyle(this.#container).direction);\n }\n get highlightColors() {\n return shadow(this, \"highlightColors\", this.#highlightColors ? new Map(this.#highlightColors.split(\",\").map(pair => pair.split(\"=\").map(x => x.trim()))) : null);\n }\n get highlightColorNames() {\n return shadow(this, \"highlightColorNames\", this.highlightColors ? new Map(Array.from(this.highlightColors, e => e.reverse())) : null);\n }\n setMainHighlightColorPicker(colorPicker) {\n this.#mainHighlightColorPicker = colorPicker;\n }\n editAltText(editor, firstTime = false) {\n this.#altTextManager?.editAltText(this, editor, firstTime);\n }\n switchToMode(mode, callback) {\n this._eventBus.on(\"annotationeditormodechanged\", callback, {\n once: true,\n signal: this._signal\n });\n this._eventBus.dispatch(\"showannotationeditorui\", {\n source: this,\n mode\n });\n }\n setPreference(name, value) {\n this._eventBus.dispatch(\"setpreference\", {\n source: this,\n name,\n value\n });\n }\n onSetPreference({\n name,\n value\n }) {\n switch (name) {\n case \"enableNewAltTextWhenAddingImage\":\n this.#enableNewAltTextWhenAddingImage = value;\n break;\n }\n }\n onPageChanging({\n pageNumber\n }) {\n this.#currentPageIndex = pageNumber - 1;\n }\n focusMainContainer() {\n this.#container.focus();\n }\n findParent(x, y) {\n for (const layer of this.#allLayers.values()) {\n const {\n x: layerX,\n y: layerY,\n width,\n height\n } = layer.div.getBoundingClientRect();\n if (x >= layerX && x <= layerX + width && y >= layerY && y <= layerY + height) {\n return layer;\n }\n }\n return null;\n }\n disableUserSelect(value = false) {\n this.#viewer.classList.toggle(\"noUserSelect\", value);\n }\n addShouldRescale(editor) {\n this.#editorsToRescale.add(editor);\n }\n removeShouldRescale(editor) {\n this.#editorsToRescale.delete(editor);\n }\n onScaleChanging({\n scale\n }) {\n this.commitOrRemove();\n this.viewParameters.realScale = scale * PixelsPerInch.PDF_TO_CSS_UNITS;\n for (const editor of this.#editorsToRescale) {\n editor.onScaleChanging();\n }\n }\n onRotationChanging({\n pagesRotation\n }) {\n this.commitOrRemove();\n this.viewParameters.rotation = pagesRotation;\n }\n #getAnchorElementForSelection({\n anchorNode\n }) {\n return anchorNode.nodeType === Node.TEXT_NODE ? anchorNode.parentElement : anchorNode;\n }\n #getLayerForTextLayer(textLayer) {\n const {\n currentLayer\n } = this;\n if (currentLayer.hasTextLayer(textLayer)) {\n return currentLayer;\n }\n for (const layer of this.#allLayers.values()) {\n if (layer.hasTextLayer(textLayer)) {\n return layer;\n }\n }\n return null;\n }\n highlightSelection(methodOfCreation = \"\") {\n const selection = document.getSelection();\n if (!selection || selection.isCollapsed) {\n return;\n }\n const {\n anchorNode,\n anchorOffset,\n focusNode,\n focusOffset\n } = selection;\n const text = selection.toString();\n const anchorElement = this.#getAnchorElementForSelection(selection);\n const textLayer = anchorElement.closest(\".textLayer\");\n const boxes = this.getSelectionBoxes(textLayer);\n if (!boxes) {\n return;\n }\n selection.empty();\n const layer = this.#getLayerForTextLayer(textLayer);\n const isNoneMode = this.#mode === AnnotationEditorType.NONE;\n const callback = () => {\n layer?.createAndAddNewEditor({\n x: 0,\n y: 0\n }, false, {\n methodOfCreation,\n boxes,\n anchorNode,\n anchorOffset,\n focusNode,\n focusOffset,\n text\n });\n if (isNoneMode) {\n this.showAllEditors(\"highlight\", true, true);\n }\n };\n if (isNoneMode) {\n this.switchToMode(AnnotationEditorType.HIGHLIGHT, callback);\n return;\n }\n callback();\n }\n #displayHighlightToolbar() {\n const selection = document.getSelection();\n if (!selection || selection.isCollapsed) {\n return;\n }\n const anchorElement = this.#getAnchorElementForSelection(selection);\n const textLayer = anchorElement.closest(\".textLayer\");\n const boxes = this.getSelectionBoxes(textLayer);\n if (!boxes) {\n return;\n }\n this.#highlightToolbar ||= new HighlightToolbar(this);\n this.#highlightToolbar.show(textLayer, boxes, this.direction === \"ltr\");\n }\n addToAnnotationStorage(editor) {\n if (!editor.isEmpty() && this.#annotationStorage && !this.#annotationStorage.has(editor.id)) {\n this.#annotationStorage.setValue(editor.id, editor);\n }\n }\n #selectionChange() {\n const selection = document.getSelection();\n if (!selection || selection.isCollapsed) {\n if (this.#selectedTextNode) {\n this.#highlightToolbar?.hide();\n this.#selectedTextNode = null;\n this.#dispatchUpdateStates({\n hasSelectedText: false\n });\n }\n return;\n }\n const {\n anchorNode\n } = selection;\n if (anchorNode === this.#selectedTextNode) {\n return;\n }\n const anchorElement = this.#getAnchorElementForSelection(selection);\n const textLayer = anchorElement.closest(\".textLayer\");\n if (!textLayer) {\n if (this.#selectedTextNode) {\n this.#highlightToolbar?.hide();\n this.#selectedTextNode = null;\n this.#dispatchUpdateStates({\n hasSelectedText: false\n });\n }\n return;\n }\n this.#highlightToolbar?.hide();\n this.#selectedTextNode = anchorNode;\n this.#dispatchUpdateStates({\n hasSelectedText: true\n });\n if (this.#mode !== AnnotationEditorType.HIGHLIGHT && this.#mode !== AnnotationEditorType.NONE) {\n return;\n }\n if (this.#mode === AnnotationEditorType.HIGHLIGHT) {\n this.showAllEditors(\"highlight\", true, true);\n }\n this.#highlightWhenShiftUp = this.isShiftKeyDown;\n if (!this.isShiftKeyDown) {\n const activeLayer = this.#mode === AnnotationEditorType.HIGHLIGHT ? this.#getLayerForTextLayer(textLayer) : null;\n activeLayer?.toggleDrawing();\n const ac = new AbortController();\n const signal = this.combinedSignal(ac);\n const pointerup = e => {\n if (e.type === \"pointerup\" && e.button !== 0) {\n return;\n }\n ac.abort();\n activeLayer?.toggleDrawing(true);\n if (e.type === \"pointerup\") {\n this.#onSelectEnd(\"main_toolbar\");\n }\n };\n window.addEventListener(\"pointerup\", pointerup, {\n signal\n });\n window.addEventListener(\"blur\", pointerup, {\n signal\n });\n }\n }\n #onSelectEnd(methodOfCreation = \"\") {\n if (this.#mode === AnnotationEditorType.HIGHLIGHT) {\n this.highlightSelection(methodOfCreation);\n } else if (this.#enableHighlightFloatingButton) {\n this.#displayHighlightToolbar();\n }\n }\n #addSelectionListener() {\n document.addEventListener(\"selectionchange\", this.#selectionChange.bind(this), {\n signal: this._signal\n });\n }\n #addFocusManager() {\n if (this.#focusManagerAC) {\n return;\n }\n this.#focusManagerAC = new AbortController();\n const signal = this.combinedSignal(this.#focusManagerAC);\n window.addEventListener(\"focus\", this.focus.bind(this), {\n signal\n });\n window.addEventListener(\"blur\", this.blur.bind(this), {\n signal\n });\n }\n #removeFocusManager() {\n this.#focusManagerAC?.abort();\n this.#focusManagerAC = null;\n }\n blur() {\n this.isShiftKeyDown = false;\n if (this.#highlightWhenShiftUp) {\n this.#highlightWhenShiftUp = false;\n this.#onSelectEnd(\"main_toolbar\");\n }\n if (!this.hasSelection) {\n return;\n }\n const {\n activeElement\n } = document;\n for (const editor of this.#selectedEditors) {\n if (editor.div.contains(activeElement)) {\n this.#lastActiveElement = [editor, activeElement];\n editor._focusEventsAllowed = false;\n break;\n }\n }\n }\n focus() {\n if (!this.#lastActiveElement) {\n return;\n }\n const [lastEditor, lastActiveElement] = this.#lastActiveElement;\n this.#lastActiveElement = null;\n lastActiveElement.addEventListener(\"focusin\", () => {\n lastEditor._focusEventsAllowed = true;\n }, {\n once: true,\n signal: this._signal\n });\n lastActiveElement.focus();\n }\n #addKeyboardManager() {\n if (this.#keyboardManagerAC) {\n return;\n }\n this.#keyboardManagerAC = new AbortController();\n const signal = this.combinedSignal(this.#keyboardManagerAC);\n window.addEventListener(\"keydown\", this.keydown.bind(this), {\n signal\n });\n window.addEventListener(\"keyup\", this.keyup.bind(this), {\n signal\n });\n }\n #removeKeyboardManager() {\n this.#keyboardManagerAC?.abort();\n this.#keyboardManagerAC = null;\n }\n #addCopyPasteListeners() {\n if (this.#copyPasteAC) {\n return;\n }\n this.#copyPasteAC = new AbortController();\n const signal = this.combinedSignal(this.#copyPasteAC);\n document.addEventListener(\"copy\", this.copy.bind(this), {\n signal\n });\n document.addEventListener(\"cut\", this.cut.bind(this), {\n signal\n });\n document.addEventListener(\"paste\", this.paste.bind(this), {\n signal\n });\n }\n #removeCopyPasteListeners() {\n this.#copyPasteAC?.abort();\n this.#copyPasteAC = null;\n }\n #addDragAndDropListeners() {\n const signal = this._signal;\n document.addEventListener(\"dragover\", this.dragOver.bind(this), {\n signal\n });\n document.addEventListener(\"drop\", this.drop.bind(this), {\n signal\n });\n }\n addEditListeners() {\n this.#addKeyboardManager();\n this.#addCopyPasteListeners();\n }\n removeEditListeners() {\n this.#removeKeyboardManager();\n this.#removeCopyPasteListeners();\n }\n dragOver(event) {\n for (const {\n type\n } of event.dataTransfer.items) {\n for (const editorType of this.#editorTypes) {\n if (editorType.isHandlingMimeForPasting(type)) {\n event.dataTransfer.dropEffect = \"copy\";\n event.preventDefault();\n return;\n }\n }\n }\n }\n drop(event) {\n for (const item of event.dataTransfer.items) {\n for (const editorType of this.#editorTypes) {\n if (editorType.isHandlingMimeForPasting(item.type)) {\n editorType.paste(item, this.currentLayer);\n event.preventDefault();\n return;\n }\n }\n }\n }\n copy(event) {\n event.preventDefault();\n this.#activeEditor?.commitOrRemove();\n if (!this.hasSelection) {\n return;\n }\n const editors = [];\n for (const editor of this.#selectedEditors) {\n const serialized = editor.serialize(true);\n if (serialized) {\n editors.push(serialized);\n }\n }\n if (editors.length === 0) {\n return;\n }\n event.clipboardData.setData(\"application/pdfjs\", JSON.stringify(editors));\n }\n cut(event) {\n this.copy(event);\n this.delete();\n }\n async paste(event) {\n event.preventDefault();\n const {\n clipboardData\n } = event;\n for (const item of clipboardData.items) {\n for (const editorType of this.#editorTypes) {\n if (editorType.isHandlingMimeForPasting(item.type)) {\n editorType.paste(item, this.currentLayer);\n return;\n }\n }\n }\n let data = clipboardData.getData(\"application/pdfjs\");\n if (!data) {\n return;\n }\n try {\n data = JSON.parse(data);\n } catch (ex) {\n warn(`paste: \"${ex.message}\".`);\n return;\n }\n if (!Array.isArray(data)) {\n return;\n }\n this.unselectAll();\n const layer = this.currentLayer;\n try {\n const newEditors = [];\n for (const editor of data) {\n const deserializedEditor = await layer.deserialize(editor);\n if (!deserializedEditor) {\n return;\n }\n newEditors.push(deserializedEditor);\n }\n const cmd = () => {\n for (const editor of newEditors) {\n this.#addEditorToLayer(editor);\n }\n this.#selectEditors(newEditors);\n };\n const undo = () => {\n for (const editor of newEditors) {\n editor.remove();\n }\n };\n this.addCommands({\n cmd,\n undo,\n mustExec: true\n });\n } catch (ex) {\n warn(`paste: \"${ex.message}\".`);\n }\n }\n keydown(event) {\n if (!this.isShiftKeyDown && event.key === \"Shift\") {\n this.isShiftKeyDown = true;\n }\n if (this.#mode !== AnnotationEditorType.NONE && !this.isEditorHandlingKeyboard) {\n AnnotationEditorUIManager._keyboardManager.exec(this, event);\n }\n }\n keyup(event) {\n if (this.isShiftKeyDown && event.key === \"Shift\") {\n this.isShiftKeyDown = false;\n if (this.#highlightWhenShiftUp) {\n this.#highlightWhenShiftUp = false;\n this.#onSelectEnd(\"main_toolbar\");\n }\n }\n }\n onEditingAction({\n name\n }) {\n switch (name) {\n case \"undo\":\n case \"redo\":\n case \"delete\":\n case \"selectAll\":\n this[name]();\n break;\n case \"highlightSelection\":\n this.highlightSelection(\"context_menu\");\n break;\n }\n }\n #dispatchUpdateStates(details) {\n const hasChanged = Object.entries(details).some(([key, value]) => this.#previousStates[key] !== value);\n if (hasChanged) {\n this._eventBus.dispatch(\"annotationeditorstateschanged\", {\n source: this,\n details: Object.assign(this.#previousStates, details)\n });\n if (this.#mode === AnnotationEditorType.HIGHLIGHT && details.hasSelectedEditor === false) {\n this.#dispatchUpdateUI([[AnnotationEditorParamsType.HIGHLIGHT_FREE, true]]);\n }\n }\n }\n #dispatchUpdateUI(details) {\n this._eventBus.dispatch(\"annotationeditorparamschanged\", {\n source: this,\n details\n });\n }\n setEditingState(isEditing) {\n if (isEditing) {\n this.#addFocusManager();\n this.#addCopyPasteListeners();\n this.#dispatchUpdateStates({\n isEditing: this.#mode !== AnnotationEditorType.NONE,\n isEmpty: this.#isEmpty(),\n hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n hasSelectedEditor: false\n });\n } else {\n this.#removeFocusManager();\n this.#removeCopyPasteListeners();\n this.#dispatchUpdateStates({\n isEditing: false\n });\n this.disableUserSelect(false);\n }\n }\n registerEditorTypes(types) {\n if (this.#editorTypes) {\n return;\n }\n this.#editorTypes = types;\n for (const editorType of this.#editorTypes) {\n this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate);\n }\n }\n getId() {\n return this.#idManager.id;\n }\n get currentLayer() {\n return this.#allLayers.get(this.#currentPageIndex);\n }\n getLayer(pageIndex) {\n return this.#allLayers.get(pageIndex);\n }\n get currentPageIndex() {\n return this.#currentPageIndex;\n }\n addLayer(layer) {\n this.#allLayers.set(layer.pageIndex, layer);\n if (this.#isEnabled) {\n layer.enable();\n } else {\n layer.disable();\n }\n }\n removeLayer(layer) {\n this.#allLayers.delete(layer.pageIndex);\n }\n async updateMode(mode, editId = null, isFromKeyboard = false) {\n if (this.#mode === mode) {\n return;\n }\n if (this.#updateModeCapability) {\n await this.#updateModeCapability.promise;\n if (!this.#updateModeCapability) {\n return;\n }\n }\n this.#updateModeCapability = Promise.withResolvers();\n this.#mode = mode;\n if (mode === AnnotationEditorType.NONE) {\n this.setEditingState(false);\n this.#disableAll();\n this.#updateModeCapability.resolve();\n return;\n }\n this.setEditingState(true);\n await this.#enableAll();\n this.unselectAll();\n for (const layer of this.#allLayers.values()) {\n layer.updateMode(mode);\n }\n if (!editId) {\n if (isFromKeyboard) {\n this.addNewEditorFromKeyboard();\n }\n this.#updateModeCapability.resolve();\n return;\n }\n for (const editor of this.#allEditors.values()) {\n if (editor.annotationElementId === editId) {\n this.setSelected(editor);\n editor.enterInEditMode();\n } else {\n editor.unselect();\n }\n }\n this.#updateModeCapability.resolve();\n }\n addNewEditorFromKeyboard() {\n if (this.currentLayer.canCreateNewEmptyEditor()) {\n this.currentLayer.addNewEditor();\n }\n }\n updateToolbar(mode) {\n if (mode === this.#mode) {\n return;\n }\n this._eventBus.dispatch(\"switchannotationeditormode\", {\n source: this,\n mode\n });\n }\n updateParams(type, value) {\n if (!this.#editorTypes) {\n return;\n }\n switch (type) {\n case AnnotationEditorParamsType.CREATE:\n this.currentLayer.addNewEditor();\n return;\n case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:\n this.#mainHighlightColorPicker?.updateColor(value);\n break;\n case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:\n this._eventBus.dispatch(\"reporttelemetry\", {\n source: this,\n details: {\n type: \"editing\",\n data: {\n type: \"highlight\",\n action: \"toggle_visibility\"\n }\n }\n });\n (this.#showAllStates ||= new Map()).set(type, value);\n this.showAllEditors(\"highlight\", value);\n break;\n }\n for (const editor of this.#selectedEditors) {\n editor.updateParams(type, value);\n }\n for (const editorType of this.#editorTypes) {\n editorType.updateDefaultParams(type, value);\n }\n }\n showAllEditors(type, visible, updateButton = false) {\n for (const editor of this.#allEditors.values()) {\n if (editor.editorType === type) {\n editor.show(visible);\n }\n }\n const state = this.#showAllStates?.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL) ?? true;\n if (state !== visible) {\n this.#dispatchUpdateUI([[AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL, visible]]);\n }\n }\n enableWaiting(mustWait = false) {\n if (this.#isWaiting === mustWait) {\n return;\n }\n this.#isWaiting = mustWait;\n for (const layer of this.#allLayers.values()) {\n if (mustWait) {\n layer.disableClick();\n } else {\n layer.enableClick();\n }\n layer.div.classList.toggle(\"waiting\", mustWait);\n }\n }\n async #enableAll() {\n if (!this.#isEnabled) {\n this.#isEnabled = true;\n const promises = [];\n for (const layer of this.#allLayers.values()) {\n promises.push(layer.enable());\n }\n await Promise.all(promises);\n for (const editor of this.#allEditors.values()) {\n editor.enable();\n }\n }\n }\n #disableAll() {\n this.unselectAll();\n if (this.#isEnabled) {\n this.#isEnabled = false;\n for (const layer of this.#allLayers.values()) {\n layer.disable();\n }\n for (const editor of this.#allEditors.values()) {\n editor.disable();\n }\n }\n }\n getEditors(pageIndex) {\n const editors = [];\n for (const editor of this.#allEditors.values()) {\n if (editor.pageIndex === pageIndex) {\n editors.push(editor);\n }\n }\n return editors;\n }\n getEditor(id) {\n return this.#allEditors.get(id);\n }\n addEditor(editor) {\n this.#allEditors.set(editor.id, editor);\n }\n removeEditor(editor) {\n if (editor.div.contains(document.activeElement)) {\n if (this.#focusMainContainerTimeoutId) {\n clearTimeout(this.#focusMainContainerTimeoutId);\n }\n this.#focusMainContainerTimeoutId = setTimeout(() => {\n this.focusMainContainer();\n this.#focusMainContainerTimeoutId = null;\n }, 0);\n }\n this.#allEditors.delete(editor.id);\n this.unselect(editor);\n if (!editor.annotationElementId || !this.#deletedAnnotationsElementIds.has(editor.annotationElementId)) {\n this.#annotationStorage?.remove(editor.id);\n }\n }\n addDeletedAnnotationElement(editor) {\n this.#deletedAnnotationsElementIds.add(editor.annotationElementId);\n this.addChangedExistingAnnotation(editor);\n editor.deleted = true;\n }\n isDeletedAnnotationElement(annotationElementId) {\n return this.#deletedAnnotationsElementIds.has(annotationElementId);\n }\n removeDeletedAnnotationElement(editor) {\n this.#deletedAnnotationsElementIds.delete(editor.annotationElementId);\n this.removeChangedExistingAnnotation(editor);\n editor.deleted = false;\n }\n #addEditorToLayer(editor) {\n const layer = this.#allLayers.get(editor.pageIndex);\n if (layer) {\n layer.addOrRebuild(editor);\n } else {\n this.addEditor(editor);\n this.addToAnnotationStorage(editor);\n }\n }\n setActiveEditor(editor) {\n if (this.#activeEditor === editor) {\n return;\n }\n this.#activeEditor = editor;\n if (editor) {\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n }\n }\n get #lastSelectedEditor() {\n let ed = null;\n for (ed of this.#selectedEditors) {}\n return ed;\n }\n updateUI(editor) {\n if (this.#lastSelectedEditor === editor) {\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n }\n }\n toggleSelected(editor) {\n if (this.#selectedEditors.has(editor)) {\n this.#selectedEditors.delete(editor);\n editor.unselect();\n this.#dispatchUpdateStates({\n hasSelectedEditor: this.hasSelection\n });\n return;\n }\n this.#selectedEditors.add(editor);\n editor.select();\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n this.#dispatchUpdateStates({\n hasSelectedEditor: true\n });\n }\n setSelected(editor) {\n for (const ed of this.#selectedEditors) {\n if (ed !== editor) {\n ed.unselect();\n }\n }\n this.#selectedEditors.clear();\n this.#selectedEditors.add(editor);\n editor.select();\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n this.#dispatchUpdateStates({\n hasSelectedEditor: true\n });\n }\n isSelected(editor) {\n return this.#selectedEditors.has(editor);\n }\n get firstSelectedEditor() {\n return this.#selectedEditors.values().next().value;\n }\n unselect(editor) {\n editor.unselect();\n this.#selectedEditors.delete(editor);\n this.#dispatchUpdateStates({\n hasSelectedEditor: this.hasSelection\n });\n }\n get hasSelection() {\n return this.#selectedEditors.size !== 0;\n }\n get isEnterHandled() {\n return this.#selectedEditors.size === 1 && this.firstSelectedEditor.isEnterHandled;\n }\n undo() {\n this.#commandManager.undo();\n this.#dispatchUpdateStates({\n hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n hasSomethingToRedo: true,\n isEmpty: this.#isEmpty()\n });\n }\n redo() {\n this.#commandManager.redo();\n this.#dispatchUpdateStates({\n hasSomethingToUndo: true,\n hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n isEmpty: this.#isEmpty()\n });\n }\n addCommands(params) {\n this.#commandManager.add(params);\n this.#dispatchUpdateStates({\n hasSomethingToUndo: true,\n hasSomethingToRedo: false,\n isEmpty: this.#isEmpty()\n });\n }\n #isEmpty() {\n if (this.#allEditors.size === 0) {\n return true;\n }\n if (this.#allEditors.size === 1) {\n for (const editor of this.#allEditors.values()) {\n return editor.isEmpty();\n }\n }\n return false;\n }\n delete() {\n this.commitOrRemove();\n if (!this.hasSelection) {\n return;\n }\n const editors = [...this.#selectedEditors];\n const cmd = () => {\n for (const editor of editors) {\n editor.remove();\n }\n };\n const undo = () => {\n for (const editor of editors) {\n this.#addEditorToLayer(editor);\n }\n };\n this.addCommands({\n cmd,\n undo,\n mustExec: true\n });\n }\n commitOrRemove() {\n this.#activeEditor?.commitOrRemove();\n }\n hasSomethingToControl() {\n return this.#activeEditor || this.hasSelection;\n }\n #selectEditors(editors) {\n for (const editor of this.#selectedEditors) {\n editor.unselect();\n }\n this.#selectedEditors.clear();\n for (const editor of editors) {\n if (editor.isEmpty()) {\n continue;\n }\n this.#selectedEditors.add(editor);\n editor.select();\n }\n this.#dispatchUpdateStates({\n hasSelectedEditor: this.hasSelection\n });\n }\n selectAll() {\n for (const editor of this.#selectedEditors) {\n editor.commit();\n }\n this.#selectEditors(this.#allEditors.values());\n }\n unselectAll() {\n if (this.#activeEditor) {\n this.#activeEditor.commitOrRemove();\n if (this.#mode !== AnnotationEditorType.NONE) {\n return;\n }\n }\n if (!this.hasSelection) {\n return;\n }\n for (const editor of this.#selectedEditors) {\n editor.unselect();\n }\n this.#selectedEditors.clear();\n this.#dispatchUpdateStates({\n hasSelectedEditor: false\n });\n }\n translateSelectedEditors(x, y, noCommit = false) {\n if (!noCommit) {\n this.commitOrRemove();\n }\n if (!this.hasSelection) {\n return;\n }\n this.#translation[0] += x;\n this.#translation[1] += y;\n const [totalX, totalY] = this.#translation;\n const editors = [...this.#selectedEditors];\n const TIME_TO_WAIT = 1000;\n if (this.#translationTimeoutId) {\n clearTimeout(this.#translationTimeoutId);\n }\n this.#translationTimeoutId = setTimeout(() => {\n this.#translationTimeoutId = null;\n this.#translation[0] = this.#translation[1] = 0;\n this.addCommands({\n cmd: () => {\n for (const editor of editors) {\n if (this.#allEditors.has(editor.id)) {\n editor.translateInPage(totalX, totalY);\n }\n }\n },\n undo: () => {\n for (const editor of editors) {\n if (this.#allEditors.has(editor.id)) {\n editor.translateInPage(-totalX, -totalY);\n }\n }\n },\n mustExec: false\n });\n }, TIME_TO_WAIT);\n for (const editor of editors) {\n editor.translateInPage(x, y);\n }\n }\n setUpDragSession() {\n if (!this.hasSelection) {\n return;\n }\n this.disableUserSelect(true);\n this.#draggingEditors = new Map();\n for (const editor of this.#selectedEditors) {\n this.#draggingEditors.set(editor, {\n savedX: editor.x,\n savedY: editor.y,\n savedPageIndex: editor.pageIndex,\n newX: 0,\n newY: 0,\n newPageIndex: -1\n });\n }\n }\n endDragSession() {\n if (!this.#draggingEditors) {\n return false;\n }\n this.disableUserSelect(false);\n const map = this.#draggingEditors;\n this.#draggingEditors = null;\n let mustBeAddedInUndoStack = false;\n for (const [{\n x,\n y,\n pageIndex\n }, value] of map) {\n value.newX = x;\n value.newY = y;\n value.newPageIndex = pageIndex;\n mustBeAddedInUndoStack ||= x !== value.savedX || y !== value.savedY || pageIndex !== value.savedPageIndex;\n }\n if (!mustBeAddedInUndoStack) {\n return false;\n }\n const move = (editor, x, y, pageIndex) => {\n if (this.#allEditors.has(editor.id)) {\n const parent = this.#allLayers.get(pageIndex);\n if (parent) {\n editor._setParentAndPosition(parent, x, y);\n } else {\n editor.pageIndex = pageIndex;\n editor.x = x;\n editor.y = y;\n }\n }\n };\n this.addCommands({\n cmd: () => {\n for (const [editor, {\n newX,\n newY,\n newPageIndex\n }] of map) {\n move(editor, newX, newY, newPageIndex);\n }\n },\n undo: () => {\n for (const [editor, {\n savedX,\n savedY,\n savedPageIndex\n }] of map) {\n move(editor, savedX, savedY, savedPageIndex);\n }\n },\n mustExec: true\n });\n return true;\n }\n dragSelectedEditors(tx, ty) {\n if (!this.#draggingEditors) {\n return;\n }\n for (const editor of this.#draggingEditors.keys()) {\n editor.drag(tx, ty);\n }\n }\n rebuild(editor) {\n if (editor.parent === null) {\n const parent = this.getLayer(editor.pageIndex);\n if (parent) {\n parent.changeParent(editor);\n parent.addOrRebuild(editor);\n } else {\n this.addEditor(editor);\n this.addToAnnotationStorage(editor);\n editor.rebuild();\n }\n } else {\n editor.parent.addOrRebuild(editor);\n }\n }\n get isEditorHandlingKeyboard() {\n return this.getActive()?.shouldGetKeyboardEvents() || this.#selectedEditors.size === 1 && this.firstSelectedEditor.shouldGetKeyboardEvents();\n }\n isActive(editor) {\n return this.#activeEditor === editor;\n }\n getActive() {\n return this.#activeEditor;\n }\n getMode() {\n return this.#mode;\n }\n get imageManager() {\n return shadow(this, \"imageManager\", new ImageManager());\n }\n getSelectionBoxes(textLayer) {\n if (!textLayer) {\n return null;\n }\n const selection = document.getSelection();\n for (let i = 0, ii = selection.rangeCount; i < ii; i++) {\n if (!textLayer.contains(selection.getRangeAt(i).commonAncestorContainer)) {\n return null;\n }\n }\n const {\n x: layerX,\n y: layerY,\n width: parentWidth,\n height: parentHeight\n } = textLayer.getBoundingClientRect();\n let rotator;\n switch (textLayer.getAttribute(\"data-main-rotation\")) {\n case \"90\":\n rotator = (x, y, w, h) => ({\n x: (y - layerY) / parentHeight,\n y: 1 - (x + w - layerX) / parentWidth,\n width: h / parentHeight,\n height: w / parentWidth\n });\n break;\n case \"180\":\n rotator = (x, y, w, h) => ({\n x: 1 - (x + w - layerX) / parentWidth,\n y: 1 - (y + h - layerY) / parentHeight,\n width: w / parentWidth,\n height: h / parentHeight\n });\n break;\n case \"270\":\n rotator = (x, y, w, h) => ({\n x: 1 - (y + h - layerY) / parentHeight,\n y: (x - layerX) / parentWidth,\n width: h / parentHeight,\n height: w / parentWidth\n });\n break;\n default:\n rotator = (x, y, w, h) => ({\n x: (x - layerX) / parentWidth,\n y: (y - layerY) / parentHeight,\n width: w / parentWidth,\n height: h / parentHeight\n });\n break;\n }\n const boxes = [];\n for (let i = 0, ii = selection.rangeCount; i < ii; i++) {\n const range = selection.getRangeAt(i);\n if (range.collapsed) {\n continue;\n }\n for (const {\n x,\n y,\n width,\n height\n } of range.getClientRects()) {\n if (width === 0 || height === 0) {\n continue;\n }\n boxes.push(rotator(x, y, width, height));\n }\n }\n return boxes.length === 0 ? null : boxes;\n }\n addChangedExistingAnnotation({\n annotationElementId,\n id\n }) {\n (this.#changedExistingAnnotations ||= new Map()).set(annotationElementId, id);\n }\n removeChangedExistingAnnotation({\n annotationElementId\n }) {\n this.#changedExistingAnnotations?.delete(annotationElementId);\n }\n renderAnnotationElement(annotation) {\n const editorId = this.#changedExistingAnnotations?.get(annotation.data.id);\n if (!editorId) {\n return;\n }\n const editor = this.#annotationStorage.getRawValue(editorId);\n if (!editor) {\n return;\n }\n if (this.#mode === AnnotationEditorType.NONE && !editor.hasBeenModified) {\n return;\n }\n editor.renderAnnotationElement(annotation);\n }\n}\n\n;// ./src/display/editor/alt_text.js\n\nclass AltText {\n #altText = null;\n #altTextDecorative = false;\n #altTextButton = null;\n #altTextTooltip = null;\n #altTextTooltipTimeout = null;\n #altTextWasFromKeyBoard = false;\n #badge = null;\n #editor = null;\n #guessedText = null;\n #textWithDisclaimer = null;\n #useNewAltTextFlow = false;\n static #l10nNewButton = null;\n static _l10nPromise = null;\n constructor(editor) {\n this.#editor = editor;\n this.#useNewAltTextFlow = editor._uiManager.useNewAltTextFlow;\n AltText.#l10nNewButton ||= Object.freeze({\n added: \"pdfjs-editor-new-alt-text-added-button-label\",\n missing: \"pdfjs-editor-new-alt-text-missing-button-label\",\n review: \"pdfjs-editor-new-alt-text-to-review-button-label\"\n });\n }\n static initialize(l10nPromise) {\n AltText._l10nPromise ||= l10nPromise;\n }\n async render() {\n const altText = this.#altTextButton = document.createElement(\"button\");\n altText.className = \"altText\";\n let msg;\n if (this.#useNewAltTextFlow) {\n altText.classList.add(\"new\");\n msg = await AltText._l10nPromise.get(AltText.#l10nNewButton.missing);\n } else {\n msg = await AltText._l10nPromise.get(\"pdfjs-editor-alt-text-button-label\");\n }\n altText.textContent = msg;\n altText.setAttribute(\"aria-label\", msg);\n altText.tabIndex = \"0\";\n const signal = this.#editor._uiManager._signal;\n altText.addEventListener(\"contextmenu\", noContextMenu, {\n signal\n });\n altText.addEventListener(\"pointerdown\", event => event.stopPropagation(), {\n signal\n });\n const onClick = event => {\n event.preventDefault();\n this.#editor._uiManager.editAltText(this.#editor);\n if (this.#useNewAltTextFlow) {\n this.#editor._reportTelemetry({\n action: \"pdfjs.image.alt_text.image_status_label_clicked\",\n data: {\n label: this.#label\n }\n });\n }\n };\n altText.addEventListener(\"click\", onClick, {\n capture: true,\n signal\n });\n altText.addEventListener(\"keydown\", event => {\n if (event.target === altText && event.key === \"Enter\") {\n this.#altTextWasFromKeyBoard = true;\n onClick(event);\n }\n }, {\n signal\n });\n await this.#setState();\n return altText;\n }\n get #label() {\n return this.#altText && \"added\" || this.#altText === null && this.guessedText && \"review\" || \"missing\";\n }\n finish() {\n if (!this.#altTextButton) {\n return;\n }\n this.#altTextButton.focus({\n focusVisible: this.#altTextWasFromKeyBoard\n });\n this.#altTextWasFromKeyBoard = false;\n }\n isEmpty() {\n if (this.#useNewAltTextFlow) {\n return this.#altText === null;\n }\n return !this.#altText && !this.#altTextDecorative;\n }\n hasData() {\n if (this.#useNewAltTextFlow) {\n return this.#altText !== null || !!this.#guessedText;\n }\n return this.isEmpty();\n }\n get guessedText() {\n return this.#guessedText;\n }\n async setGuessedText(guessedText) {\n if (this.#altText !== null) {\n return;\n }\n this.#guessedText = guessedText;\n this.#textWithDisclaimer = await AltText._l10nPromise.get(\"pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer\")({\n generatedAltText: guessedText\n });\n this.#setState();\n }\n toggleAltTextBadge(visibility = false) {\n if (!this.#useNewAltTextFlow || this.#altText) {\n this.#badge?.remove();\n this.#badge = null;\n return;\n }\n if (!this.#badge) {\n const badge = this.#badge = document.createElement(\"div\");\n badge.className = \"noAltTextBadge\";\n this.#editor.div.append(badge);\n }\n this.#badge.classList.toggle(\"hidden\", !visibility);\n }\n serialize(isForCopying) {\n let altText = this.#altText;\n if (!isForCopying && this.#guessedText === altText) {\n altText = this.#textWithDisclaimer;\n }\n return {\n altText,\n decorative: this.#altTextDecorative,\n guessedText: this.#guessedText,\n textWithDisclaimer: this.#textWithDisclaimer\n };\n }\n get data() {\n return {\n altText: this.#altText,\n decorative: this.#altTextDecorative\n };\n }\n set data({\n altText,\n decorative,\n guessedText,\n textWithDisclaimer,\n cancel = false\n }) {\n if (guessedText) {\n this.#guessedText = guessedText;\n this.#textWithDisclaimer = textWithDisclaimer;\n }\n if (this.#altText === altText && this.#altTextDecorative === decorative) {\n return;\n }\n if (!cancel) {\n this.#altText = altText;\n this.#altTextDecorative = decorative;\n }\n this.#setState();\n }\n toggle(enabled = false) {\n if (!this.#altTextButton) {\n return;\n }\n if (!enabled && this.#altTextTooltipTimeout) {\n clearTimeout(this.#altTextTooltipTimeout);\n this.#altTextTooltipTimeout = null;\n }\n this.#altTextButton.disabled = !enabled;\n }\n shown() {\n this.#editor._reportTelemetry({\n action: \"pdfjs.image.alt_text.image_status_label_displayed\",\n data: {\n label: this.#label\n }\n });\n }\n destroy() {\n this.#altTextButton?.remove();\n this.#altTextButton = null;\n this.#altTextTooltip = null;\n this.#badge?.remove();\n this.#badge = null;\n }\n async #setState() {\n const button = this.#altTextButton;\n if (!button) {\n return;\n }\n if (this.#useNewAltTextFlow) {\n button.classList.toggle(\"done\", !!this.#altText);\n AltText._l10nPromise.get(AltText.#l10nNewButton[this.#label]).then(msg => {\n button.setAttribute(\"aria-label\", msg);\n for (const child of button.childNodes) {\n if (child.nodeType === Node.TEXT_NODE) {\n child.textContent = msg;\n break;\n }\n }\n });\n if (!this.#altText) {\n this.#altTextTooltip?.remove();\n return;\n }\n } else {\n if (!this.#altText && !this.#altTextDecorative) {\n button.classList.remove(\"done\");\n this.#altTextTooltip?.remove();\n return;\n }\n button.classList.add(\"done\");\n AltText._l10nPromise.get(\"pdfjs-editor-alt-text-edit-button-label\").then(msg => {\n button.setAttribute(\"aria-label\", msg);\n });\n }\n let tooltip = this.#altTextTooltip;\n if (!tooltip) {\n this.#altTextTooltip = tooltip = document.createElement(\"span\");\n tooltip.className = \"tooltip\";\n tooltip.setAttribute(\"role\", \"tooltip\");\n tooltip.id = `alt-text-tooltip-${this.#editor.id}`;\n const DELAY_TO_SHOW_TOOLTIP = 100;\n const signal = this.#editor._uiManager._signal;\n signal.addEventListener(\"abort\", () => {\n clearTimeout(this.#altTextTooltipTimeout);\n this.#altTextTooltipTimeout = null;\n }, {\n once: true\n });\n button.addEventListener(\"mouseenter\", () => {\n this.#altTextTooltipTimeout = setTimeout(() => {\n this.#altTextTooltipTimeout = null;\n this.#altTextTooltip.classList.add(\"show\");\n this.#editor._reportTelemetry({\n action: \"alt_text_tooltip\"\n });\n }, DELAY_TO_SHOW_TOOLTIP);\n }, {\n signal\n });\n button.addEventListener(\"mouseleave\", () => {\n if (this.#altTextTooltipTimeout) {\n clearTimeout(this.#altTextTooltipTimeout);\n this.#altTextTooltipTimeout = null;\n }\n this.#altTextTooltip?.classList.remove(\"show\");\n }, {\n signal\n });\n }\n tooltip.innerText = this.#altTextDecorative ? await AltText._l10nPromise.get(\"pdfjs-editor-alt-text-decorative-tooltip\") : this.#altText;\n if (!tooltip.parentNode) {\n button.append(tooltip);\n }\n const element = this.#editor.getImageForAltText();\n element?.setAttribute(\"aria-describedby\", tooltip.id);\n }\n}\n\n;// ./src/display/editor/editor.js\n\n\n\n\n\nclass AnnotationEditor {\n #accessibilityData = null;\n #allResizerDivs = null;\n #altText = null;\n #disabled = false;\n #keepAspectRatio = false;\n #resizersDiv = null;\n #savedDimensions = null;\n #focusAC = null;\n #focusedResizerName = \"\";\n #hasBeenClicked = false;\n #initialPosition = null;\n #isEditing = false;\n #isInEditMode = false;\n #isResizerEnabledForKeyboard = false;\n #moveInDOMTimeout = null;\n #prevDragX = 0;\n #prevDragY = 0;\n #telemetryTimeouts = null;\n _editToolbar = null;\n _initialOptions = Object.create(null);\n _initialData = null;\n _isVisible = true;\n _uiManager = null;\n _focusEventsAllowed = true;\n static _l10nPromise = null;\n static _l10nResizer = null;\n #isDraggable = false;\n #zIndex = AnnotationEditor._zIndex++;\n static _borderLineWidth = -1;\n static _colorManager = new ColorManager();\n static _zIndex = 1;\n static _telemetryTimeout = 1000;\n static get _resizerKeyboardManager() {\n const resize = AnnotationEditor.prototype._resizeWithKeyboard;\n const small = AnnotationEditorUIManager.TRANSLATE_SMALL;\n const big = AnnotationEditorUIManager.TRANSLATE_BIG;\n return shadow(this, \"_resizerKeyboardManager\", new KeyboardManager([[[\"ArrowLeft\", \"mac+ArrowLeft\"], resize, {\n args: [-small, 0]\n }], [[\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"], resize, {\n args: [-big, 0]\n }], [[\"ArrowRight\", \"mac+ArrowRight\"], resize, {\n args: [small, 0]\n }], [[\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"], resize, {\n args: [big, 0]\n }], [[\"ArrowUp\", \"mac+ArrowUp\"], resize, {\n args: [0, -small]\n }], [[\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"], resize, {\n args: [0, -big]\n }], [[\"ArrowDown\", \"mac+ArrowDown\"], resize, {\n args: [0, small]\n }], [[\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"], resize, {\n args: [0, big]\n }], [[\"Escape\", \"mac+Escape\"], AnnotationEditor.prototype._stopResizingWithKeyboard]]));\n }\n constructor(parameters) {\n this.parent = parameters.parent;\n this.id = parameters.id;\n this.width = this.height = null;\n this.pageIndex = parameters.parent.pageIndex;\n this.name = parameters.name;\n this.div = null;\n this._uiManager = parameters.uiManager;\n this.annotationElementId = null;\n this._willKeepAspectRatio = false;\n this._initialOptions.isCentered = parameters.isCentered;\n this._structTreeParentId = null;\n const {\n rotation,\n rawDims: {\n pageWidth,\n pageHeight,\n pageX,\n pageY\n }\n } = this.parent.viewport;\n this.rotation = rotation;\n this.pageRotation = (360 + rotation - this._uiManager.viewParameters.rotation) % 360;\n this.pageDimensions = [pageWidth, pageHeight];\n this.pageTranslation = [pageX, pageY];\n const [width, height] = this.parentDimensions;\n this.x = parameters.x / width;\n this.y = parameters.y / height;\n this.isAttachedToDOM = false;\n this.deleted = false;\n }\n get editorType() {\n return Object.getPrototypeOf(this).constructor._type;\n }\n static get _defaultLineColor() {\n return shadow(this, \"_defaultLineColor\", this._colorManager.getHexCode(\"CanvasText\"));\n }\n static deleteAnnotationElement(editor) {\n const fakeEditor = new FakeEditor({\n id: editor.parent.getNextId(),\n parent: editor.parent,\n uiManager: editor._uiManager\n });\n fakeEditor.annotationElementId = editor.annotationElementId;\n fakeEditor.deleted = true;\n fakeEditor._uiManager.addToAnnotationStorage(fakeEditor);\n }\n static initialize(l10n, _uiManager, options) {\n AnnotationEditor._l10nResizer ||= Object.freeze({\n topLeft: \"pdfjs-editor-resizer-top-left\",\n topMiddle: \"pdfjs-editor-resizer-top-middle\",\n topRight: \"pdfjs-editor-resizer-top-right\",\n middleRight: \"pdfjs-editor-resizer-middle-right\",\n bottomRight: \"pdfjs-editor-resizer-bottom-right\",\n bottomMiddle: \"pdfjs-editor-resizer-bottom-middle\",\n bottomLeft: \"pdfjs-editor-resizer-bottom-left\",\n middleLeft: \"pdfjs-editor-resizer-middle-left\"\n });\n AnnotationEditor._l10nPromise ||= new Map([...[\"pdfjs-editor-alt-text-button-label\", \"pdfjs-editor-alt-text-edit-button-label\", \"pdfjs-editor-alt-text-decorative-tooltip\", \"pdfjs-editor-new-alt-text-added-button-label\", \"pdfjs-editor-new-alt-text-missing-button-label\", \"pdfjs-editor-new-alt-text-to-review-button-label\"].map(str => [str, l10n.get(str)]), ...[\"pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer\"].map(str => [str, l10n.get.bind(l10n, str)])]);\n if (options?.strings) {\n for (const str of options.strings) {\n AnnotationEditor._l10nPromise.set(str, l10n.get(str));\n }\n }\n if (AnnotationEditor._borderLineWidth !== -1) {\n return;\n }\n const style = getComputedStyle(document.documentElement);\n AnnotationEditor._borderLineWidth = parseFloat(style.getPropertyValue(\"--outline-width\")) || 0;\n }\n static updateDefaultParams(_type, _value) {}\n static get defaultPropertiesToUpdate() {\n return [];\n }\n static isHandlingMimeForPasting(mime) {\n return false;\n }\n static paste(item, parent) {\n unreachable(\"Not implemented\");\n }\n get propertiesToUpdate() {\n return [];\n }\n get _isDraggable() {\n return this.#isDraggable;\n }\n set _isDraggable(value) {\n this.#isDraggable = value;\n this.div?.classList.toggle(\"draggable\", value);\n }\n get isEnterHandled() {\n return true;\n }\n center() {\n const [pageWidth, pageHeight] = this.pageDimensions;\n switch (this.parentRotation) {\n case 90:\n this.x -= this.height * pageHeight / (pageWidth * 2);\n this.y += this.width * pageWidth / (pageHeight * 2);\n break;\n case 180:\n this.x += this.width / 2;\n this.y += this.height / 2;\n break;\n case 270:\n this.x += this.height * pageHeight / (pageWidth * 2);\n this.y -= this.width * pageWidth / (pageHeight * 2);\n break;\n default:\n this.x -= this.width / 2;\n this.y -= this.height / 2;\n break;\n }\n this.fixAndSetPosition();\n }\n addCommands(params) {\n this._uiManager.addCommands(params);\n }\n get currentLayer() {\n return this._uiManager.currentLayer;\n }\n setInBackground() {\n this.div.style.zIndex = 0;\n }\n setInForeground() {\n this.div.style.zIndex = this.#zIndex;\n }\n setParent(parent) {\n if (parent !== null) {\n this.pageIndex = parent.pageIndex;\n this.pageDimensions = parent.pageDimensions;\n } else {\n this.#stopResizing();\n }\n this.parent = parent;\n }\n focusin(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n if (!this.#hasBeenClicked) {\n this.parent.setSelected(this);\n } else {\n this.#hasBeenClicked = false;\n }\n }\n focusout(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n if (!this.isAttachedToDOM) {\n return;\n }\n const target = event.relatedTarget;\n if (target?.closest(`#${this.id}`)) {\n return;\n }\n event.preventDefault();\n if (!this.parent?.isMultipleSelection) {\n this.commitOrRemove();\n }\n }\n commitOrRemove() {\n if (this.isEmpty()) {\n this.remove();\n } else {\n this.commit();\n }\n }\n commit() {\n this.addToAnnotationStorage();\n }\n addToAnnotationStorage() {\n this._uiManager.addToAnnotationStorage(this);\n }\n setAt(x, y, tx, ty) {\n const [width, height] = this.parentDimensions;\n [tx, ty] = this.screenToPageTranslation(tx, ty);\n this.x = (x + tx) / width;\n this.y = (y + ty) / height;\n this.fixAndSetPosition();\n }\n #translate([width, height], x, y) {\n [x, y] = this.screenToPageTranslation(x, y);\n this.x += x / width;\n this.y += y / height;\n this.fixAndSetPosition();\n }\n translate(x, y) {\n this.#translate(this.parentDimensions, x, y);\n }\n translateInPage(x, y) {\n this.#initialPosition ||= [this.x, this.y];\n this.#translate(this.pageDimensions, x, y);\n this.div.scrollIntoView({\n block: \"nearest\"\n });\n }\n drag(tx, ty) {\n this.#initialPosition ||= [this.x, this.y];\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.x += tx / parentWidth;\n this.y += ty / parentHeight;\n if (this.parent && (this.x < 0 || this.x > 1 || this.y < 0 || this.y > 1)) {\n const {\n x,\n y\n } = this.div.getBoundingClientRect();\n if (this.parent.findNewParent(this, x, y)) {\n this.x -= Math.floor(this.x);\n this.y -= Math.floor(this.y);\n }\n }\n let {\n x,\n y\n } = this;\n const [bx, by] = this.getBaseTranslation();\n x += bx;\n y += by;\n this.div.style.left = `${(100 * x).toFixed(2)}%`;\n this.div.style.top = `${(100 * y).toFixed(2)}%`;\n this.div.scrollIntoView({\n block: \"nearest\"\n });\n }\n get _hasBeenMoved() {\n return !!this.#initialPosition && (this.#initialPosition[0] !== this.x || this.#initialPosition[1] !== this.y);\n }\n getBaseTranslation() {\n const [parentWidth, parentHeight] = this.parentDimensions;\n const {\n _borderLineWidth\n } = AnnotationEditor;\n const x = _borderLineWidth / parentWidth;\n const y = _borderLineWidth / parentHeight;\n switch (this.rotation) {\n case 90:\n return [-x, y];\n case 180:\n return [x, y];\n case 270:\n return [x, -y];\n default:\n return [-x, -y];\n }\n }\n get _mustFixPosition() {\n return true;\n }\n fixAndSetPosition(rotation = this.rotation) {\n const [pageWidth, pageHeight] = this.pageDimensions;\n let {\n x,\n y,\n width,\n height\n } = this;\n width *= pageWidth;\n height *= pageHeight;\n x *= pageWidth;\n y *= pageHeight;\n if (this._mustFixPosition) {\n switch (rotation) {\n case 0:\n x = Math.max(0, Math.min(pageWidth - width, x));\n y = Math.max(0, Math.min(pageHeight - height, y));\n break;\n case 90:\n x = Math.max(0, Math.min(pageWidth - height, x));\n y = Math.min(pageHeight, Math.max(width, y));\n break;\n case 180:\n x = Math.min(pageWidth, Math.max(width, x));\n y = Math.min(pageHeight, Math.max(height, y));\n break;\n case 270:\n x = Math.min(pageWidth, Math.max(height, x));\n y = Math.max(0, Math.min(pageHeight - width, y));\n break;\n }\n }\n this.x = x /= pageWidth;\n this.y = y /= pageHeight;\n const [bx, by] = this.getBaseTranslation();\n x += bx;\n y += by;\n const {\n style\n } = this.div;\n style.left = `${(100 * x).toFixed(2)}%`;\n style.top = `${(100 * y).toFixed(2)}%`;\n this.moveInDOM();\n }\n static #rotatePoint(x, y, angle) {\n switch (angle) {\n case 90:\n return [y, -x];\n case 180:\n return [-x, -y];\n case 270:\n return [-y, x];\n default:\n return [x, y];\n }\n }\n screenToPageTranslation(x, y) {\n return AnnotationEditor.#rotatePoint(x, y, this.parentRotation);\n }\n pageTranslationToScreen(x, y) {\n return AnnotationEditor.#rotatePoint(x, y, 360 - this.parentRotation);\n }\n #getRotationMatrix(rotation) {\n switch (rotation) {\n case 90:\n {\n const [pageWidth, pageHeight] = this.pageDimensions;\n return [0, -pageWidth / pageHeight, pageHeight / pageWidth, 0];\n }\n case 180:\n return [-1, 0, 0, -1];\n case 270:\n {\n const [pageWidth, pageHeight] = this.pageDimensions;\n return [0, pageWidth / pageHeight, -pageHeight / pageWidth, 0];\n }\n default:\n return [1, 0, 0, 1];\n }\n }\n get parentScale() {\n return this._uiManager.viewParameters.realScale;\n }\n get parentRotation() {\n return (this._uiManager.viewParameters.rotation + this.pageRotation) % 360;\n }\n get parentDimensions() {\n const {\n parentScale,\n pageDimensions: [pageWidth, pageHeight]\n } = this;\n return [pageWidth * parentScale, pageHeight * parentScale];\n }\n setDims(width, height) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.div.style.width = `${(100 * width / parentWidth).toFixed(2)}%`;\n if (!this.#keepAspectRatio) {\n this.div.style.height = `${(100 * height / parentHeight).toFixed(2)}%`;\n }\n }\n fixDims() {\n const {\n style\n } = this.div;\n const {\n height,\n width\n } = style;\n const widthPercent = width.endsWith(\"%\");\n const heightPercent = !this.#keepAspectRatio && height.endsWith(\"%\");\n if (widthPercent && heightPercent) {\n return;\n }\n const [parentWidth, parentHeight] = this.parentDimensions;\n if (!widthPercent) {\n style.width = `${(100 * parseFloat(width) / parentWidth).toFixed(2)}%`;\n }\n if (!this.#keepAspectRatio && !heightPercent) {\n style.height = `${(100 * parseFloat(height) / parentHeight).toFixed(2)}%`;\n }\n }\n getInitialTranslation() {\n return [0, 0];\n }\n #createResizers() {\n if (this.#resizersDiv) {\n return;\n }\n this.#resizersDiv = document.createElement(\"div\");\n this.#resizersDiv.classList.add(\"resizers\");\n const classes = this._willKeepAspectRatio ? [\"topLeft\", \"topRight\", \"bottomRight\", \"bottomLeft\"] : [\"topLeft\", \"topMiddle\", \"topRight\", \"middleRight\", \"bottomRight\", \"bottomMiddle\", \"bottomLeft\", \"middleLeft\"];\n const signal = this._uiManager._signal;\n for (const name of classes) {\n const div = document.createElement(\"div\");\n this.#resizersDiv.append(div);\n div.classList.add(\"resizer\", name);\n div.setAttribute(\"data-resizer-name\", name);\n div.addEventListener(\"pointerdown\", this.#resizerPointerdown.bind(this, name), {\n signal\n });\n div.addEventListener(\"contextmenu\", noContextMenu, {\n signal\n });\n div.tabIndex = -1;\n }\n this.div.prepend(this.#resizersDiv);\n }\n #resizerPointerdown(name, event) {\n event.preventDefault();\n const {\n isMac\n } = util_FeatureTest.platform;\n if (event.button !== 0 || event.ctrlKey && isMac) {\n return;\n }\n this.#altText?.toggle(false);\n const savedDraggable = this._isDraggable;\n this._isDraggable = false;\n const ac = new AbortController();\n const signal = this._uiManager.combinedSignal(ac);\n this.parent.togglePointerEvents(false);\n window.addEventListener(\"pointermove\", this.#resizerPointermove.bind(this, name), {\n passive: true,\n capture: true,\n signal\n });\n window.addEventListener(\"contextmenu\", noContextMenu, {\n signal\n });\n const savedX = this.x;\n const savedY = this.y;\n const savedWidth = this.width;\n const savedHeight = this.height;\n const savedParentCursor = this.parent.div.style.cursor;\n const savedCursor = this.div.style.cursor;\n this.div.style.cursor = this.parent.div.style.cursor = window.getComputedStyle(event.target).cursor;\n const pointerUpCallback = () => {\n ac.abort();\n this.parent.togglePointerEvents(true);\n this.#altText?.toggle(true);\n this._isDraggable = savedDraggable;\n this.parent.div.style.cursor = savedParentCursor;\n this.div.style.cursor = savedCursor;\n this.#addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight);\n };\n window.addEventListener(\"pointerup\", pointerUpCallback, {\n signal\n });\n window.addEventListener(\"blur\", pointerUpCallback, {\n signal\n });\n }\n #addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight) {\n const newX = this.x;\n const newY = this.y;\n const newWidth = this.width;\n const newHeight = this.height;\n if (newX === savedX && newY === savedY && newWidth === savedWidth && newHeight === savedHeight) {\n return;\n }\n this.addCommands({\n cmd: () => {\n this.width = newWidth;\n this.height = newHeight;\n this.x = newX;\n this.y = newY;\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n this.fixAndSetPosition();\n },\n undo: () => {\n this.width = savedWidth;\n this.height = savedHeight;\n this.x = savedX;\n this.y = savedY;\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(parentWidth * savedWidth, parentHeight * savedHeight);\n this.fixAndSetPosition();\n },\n mustExec: true\n });\n }\n #resizerPointermove(name, event) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n const savedX = this.x;\n const savedY = this.y;\n const savedWidth = this.width;\n const savedHeight = this.height;\n const minWidth = AnnotationEditor.MIN_SIZE / parentWidth;\n const minHeight = AnnotationEditor.MIN_SIZE / parentHeight;\n const round = x => Math.round(x * 10000) / 10000;\n const rotationMatrix = this.#getRotationMatrix(this.rotation);\n const transf = (x, y) => [rotationMatrix[0] * x + rotationMatrix[2] * y, rotationMatrix[1] * x + rotationMatrix[3] * y];\n const invRotationMatrix = this.#getRotationMatrix(360 - this.rotation);\n const invTransf = (x, y) => [invRotationMatrix[0] * x + invRotationMatrix[2] * y, invRotationMatrix[1] * x + invRotationMatrix[3] * y];\n let getPoint;\n let getOpposite;\n let isDiagonal = false;\n let isHorizontal = false;\n switch (name) {\n case \"topLeft\":\n isDiagonal = true;\n getPoint = (w, h) => [0, 0];\n getOpposite = (w, h) => [w, h];\n break;\n case \"topMiddle\":\n getPoint = (w, h) => [w / 2, 0];\n getOpposite = (w, h) => [w / 2, h];\n break;\n case \"topRight\":\n isDiagonal = true;\n getPoint = (w, h) => [w, 0];\n getOpposite = (w, h) => [0, h];\n break;\n case \"middleRight\":\n isHorizontal = true;\n getPoint = (w, h) => [w, h / 2];\n getOpposite = (w, h) => [0, h / 2];\n break;\n case \"bottomRight\":\n isDiagonal = true;\n getPoint = (w, h) => [w, h];\n getOpposite = (w, h) => [0, 0];\n break;\n case \"bottomMiddle\":\n getPoint = (w, h) => [w / 2, h];\n getOpposite = (w, h) => [w / 2, 0];\n break;\n case \"bottomLeft\":\n isDiagonal = true;\n getPoint = (w, h) => [0, h];\n getOpposite = (w, h) => [w, 0];\n break;\n case \"middleLeft\":\n isHorizontal = true;\n getPoint = (w, h) => [0, h / 2];\n getOpposite = (w, h) => [w, h / 2];\n break;\n }\n const point = getPoint(savedWidth, savedHeight);\n const oppositePoint = getOpposite(savedWidth, savedHeight);\n let transfOppositePoint = transf(...oppositePoint);\n const oppositeX = round(savedX + transfOppositePoint[0]);\n const oppositeY = round(savedY + transfOppositePoint[1]);\n let ratioX = 1;\n let ratioY = 1;\n let [deltaX, deltaY] = this.screenToPageTranslation(event.movementX, event.movementY);\n [deltaX, deltaY] = invTransf(deltaX / parentWidth, deltaY / parentHeight);\n if (isDiagonal) {\n const oldDiag = Math.hypot(savedWidth, savedHeight);\n ratioX = ratioY = Math.max(Math.min(Math.hypot(oppositePoint[0] - point[0] - deltaX, oppositePoint[1] - point[1] - deltaY) / oldDiag, 1 / savedWidth, 1 / savedHeight), minWidth / savedWidth, minHeight / savedHeight);\n } else if (isHorizontal) {\n ratioX = Math.max(minWidth, Math.min(1, Math.abs(oppositePoint[0] - point[0] - deltaX))) / savedWidth;\n } else {\n ratioY = Math.max(minHeight, Math.min(1, Math.abs(oppositePoint[1] - point[1] - deltaY))) / savedHeight;\n }\n const newWidth = round(savedWidth * ratioX);\n const newHeight = round(savedHeight * ratioY);\n transfOppositePoint = transf(...getOpposite(newWidth, newHeight));\n const newX = oppositeX - transfOppositePoint[0];\n const newY = oppositeY - transfOppositePoint[1];\n this.width = newWidth;\n this.height = newHeight;\n this.x = newX;\n this.y = newY;\n this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n this.fixAndSetPosition();\n }\n altTextFinish() {\n this.#altText?.finish();\n }\n async addEditToolbar() {\n if (this._editToolbar || this.#isInEditMode) {\n return this._editToolbar;\n }\n this._editToolbar = new EditorToolbar(this);\n this.div.append(this._editToolbar.render());\n if (this.#altText) {\n await this._editToolbar.addAltText(this.#altText);\n }\n return this._editToolbar;\n }\n removeEditToolbar() {\n if (!this._editToolbar) {\n return;\n }\n this._editToolbar.remove();\n this._editToolbar = null;\n this.#altText?.destroy();\n }\n addContainer(container) {\n const editToolbarDiv = this._editToolbar?.div;\n if (editToolbarDiv) {\n editToolbarDiv.before(container);\n } else {\n this.div.append(container);\n }\n }\n getClientDimensions() {\n return this.div.getBoundingClientRect();\n }\n async addAltTextButton() {\n if (this.#altText) {\n return;\n }\n AltText.initialize(AnnotationEditor._l10nPromise);\n this.#altText = new AltText(this);\n if (this.#accessibilityData) {\n this.#altText.data = this.#accessibilityData;\n this.#accessibilityData = null;\n }\n await this.addEditToolbar();\n }\n get altTextData() {\n return this.#altText?.data;\n }\n set altTextData(data) {\n if (!this.#altText) {\n return;\n }\n this.#altText.data = data;\n }\n get guessedAltText() {\n return this.#altText?.guessedText;\n }\n async setGuessedAltText(text) {\n await this.#altText?.setGuessedText(text);\n }\n serializeAltText(isForCopying) {\n return this.#altText?.serialize(isForCopying);\n }\n hasAltText() {\n return !!this.#altText && !this.#altText.isEmpty();\n }\n hasAltTextData() {\n return this.#altText?.hasData() ?? false;\n }\n render() {\n this.div = document.createElement(\"div\");\n this.div.setAttribute(\"data-editor-rotation\", (360 - this.rotation) % 360);\n this.div.className = this.name;\n this.div.setAttribute(\"id\", this.id);\n this.div.tabIndex = this.#disabled ? -1 : 0;\n if (!this._isVisible) {\n this.div.classList.add(\"hidden\");\n }\n this.setInForeground();\n this.#addFocusListeners();\n const [parentWidth, parentHeight] = this.parentDimensions;\n if (this.parentRotation % 180 !== 0) {\n this.div.style.maxWidth = `${(100 * parentHeight / parentWidth).toFixed(2)}%`;\n this.div.style.maxHeight = `${(100 * parentWidth / parentHeight).toFixed(2)}%`;\n }\n const [tx, ty] = this.getInitialTranslation();\n this.translate(tx, ty);\n bindEvents(this, this.div, [\"pointerdown\"]);\n return this.div;\n }\n pointerdown(event) {\n const {\n isMac\n } = util_FeatureTest.platform;\n if (event.button !== 0 || event.ctrlKey && isMac) {\n event.preventDefault();\n return;\n }\n this.#hasBeenClicked = true;\n if (this._isDraggable) {\n this.#setUpDragSession(event);\n return;\n }\n this.#selectOnPointerEvent(event);\n }\n #selectOnPointerEvent(event) {\n const {\n isMac\n } = util_FeatureTest.platform;\n if (event.ctrlKey && !isMac || event.shiftKey || event.metaKey && isMac) {\n this.parent.toggleSelected(this);\n } else {\n this.parent.setSelected(this);\n }\n }\n #setUpDragSession(event) {\n const isSelected = this._uiManager.isSelected(this);\n this._uiManager.setUpDragSession();\n const ac = new AbortController();\n const signal = this._uiManager.combinedSignal(ac);\n if (isSelected) {\n this.div.classList.add(\"moving\");\n this.#prevDragX = event.clientX;\n this.#prevDragY = event.clientY;\n const pointerMoveCallback = e => {\n const {\n clientX: x,\n clientY: y\n } = e;\n const [tx, ty] = this.screenToPageTranslation(x - this.#prevDragX, y - this.#prevDragY);\n this.#prevDragX = x;\n this.#prevDragY = y;\n this._uiManager.dragSelectedEditors(tx, ty);\n };\n window.addEventListener(\"pointermove\", pointerMoveCallback, {\n passive: true,\n capture: true,\n signal\n });\n }\n const pointerUpCallback = () => {\n ac.abort();\n if (isSelected) {\n this.div.classList.remove(\"moving\");\n }\n this.#hasBeenClicked = false;\n if (!this._uiManager.endDragSession()) {\n this.#selectOnPointerEvent(event);\n }\n };\n window.addEventListener(\"pointerup\", pointerUpCallback, {\n signal\n });\n window.addEventListener(\"blur\", pointerUpCallback, {\n signal\n });\n }\n moveInDOM() {\n if (this.#moveInDOMTimeout) {\n clearTimeout(this.#moveInDOMTimeout);\n }\n this.#moveInDOMTimeout = setTimeout(() => {\n this.#moveInDOMTimeout = null;\n this.parent?.moveEditorInDOM(this);\n }, 0);\n }\n _setParentAndPosition(parent, x, y) {\n parent.changeParent(this);\n this.x = x;\n this.y = y;\n this.fixAndSetPosition();\n }\n getRect(tx, ty, rotation = this.rotation) {\n const scale = this.parentScale;\n const [pageWidth, pageHeight] = this.pageDimensions;\n const [pageX, pageY] = this.pageTranslation;\n const shiftX = tx / scale;\n const shiftY = ty / scale;\n const x = this.x * pageWidth;\n const y = this.y * pageHeight;\n const width = this.width * pageWidth;\n const height = this.height * pageHeight;\n switch (rotation) {\n case 0:\n return [x + shiftX + pageX, pageHeight - y - shiftY - height + pageY, x + shiftX + width + pageX, pageHeight - y - shiftY + pageY];\n case 90:\n return [x + shiftY + pageX, pageHeight - y + shiftX + pageY, x + shiftY + height + pageX, pageHeight - y + shiftX + width + pageY];\n case 180:\n return [x - shiftX - width + pageX, pageHeight - y + shiftY + pageY, x - shiftX + pageX, pageHeight - y + shiftY + height + pageY];\n case 270:\n return [x - shiftY - height + pageX, pageHeight - y - shiftX - width + pageY, x - shiftY + pageX, pageHeight - y - shiftX + pageY];\n default:\n throw new Error(\"Invalid rotation\");\n }\n }\n getRectInCurrentCoords(rect, pageHeight) {\n const [x1, y1, x2, y2] = rect;\n const width = x2 - x1;\n const height = y2 - y1;\n switch (this.rotation) {\n case 0:\n return [x1, pageHeight - y2, width, height];\n case 90:\n return [x1, pageHeight - y1, height, width];\n case 180:\n return [x2, pageHeight - y1, width, height];\n case 270:\n return [x2, pageHeight - y2, height, width];\n default:\n throw new Error(\"Invalid rotation\");\n }\n }\n onceAdded() {}\n isEmpty() {\n return false;\n }\n enableEditMode() {\n this.#isInEditMode = true;\n }\n disableEditMode() {\n this.#isInEditMode = false;\n }\n isInEditMode() {\n return this.#isInEditMode;\n }\n shouldGetKeyboardEvents() {\n return this.#isResizerEnabledForKeyboard;\n }\n needsToBeRebuilt() {\n return this.div && !this.isAttachedToDOM;\n }\n #addFocusListeners() {\n if (this.#focusAC || !this.div) {\n return;\n }\n this.#focusAC = new AbortController();\n const signal = this._uiManager.combinedSignal(this.#focusAC);\n this.div.addEventListener(\"focusin\", this.focusin.bind(this), {\n signal\n });\n this.div.addEventListener(\"focusout\", this.focusout.bind(this), {\n signal\n });\n }\n rebuild() {\n this.#addFocusListeners();\n }\n rotate(_angle) {}\n serializeDeleted() {\n return {\n id: this.annotationElementId,\n deleted: true,\n pageIndex: this.pageIndex,\n popupRef: this._initialData?.popupRef || \"\"\n };\n }\n serialize(isForCopying = false, context = null) {\n unreachable(\"An editor must be serializable\");\n }\n static async deserialize(data, parent, uiManager) {\n const editor = new this.prototype.constructor({\n parent,\n id: parent.getNextId(),\n uiManager\n });\n editor.rotation = data.rotation;\n editor.#accessibilityData = data.accessibilityData;\n const [pageWidth, pageHeight] = editor.pageDimensions;\n const [x, y, width, height] = editor.getRectInCurrentCoords(data.rect, pageHeight);\n editor.x = x / pageWidth;\n editor.y = y / pageHeight;\n editor.width = width / pageWidth;\n editor.height = height / pageHeight;\n return editor;\n }\n get hasBeenModified() {\n return !!this.annotationElementId && (this.deleted || this.serialize() !== null);\n }\n remove() {\n this.#focusAC?.abort();\n this.#focusAC = null;\n if (!this.isEmpty()) {\n this.commit();\n }\n if (this.parent) {\n this.parent.remove(this);\n } else {\n this._uiManager.removeEditor(this);\n }\n if (this.#moveInDOMTimeout) {\n clearTimeout(this.#moveInDOMTimeout);\n this.#moveInDOMTimeout = null;\n }\n this.#stopResizing();\n this.removeEditToolbar();\n if (this.#telemetryTimeouts) {\n for (const timeout of this.#telemetryTimeouts.values()) {\n clearTimeout(timeout);\n }\n this.#telemetryTimeouts = null;\n }\n this.parent = null;\n }\n get isResizable() {\n return false;\n }\n makeResizable() {\n if (this.isResizable) {\n this.#createResizers();\n this.#resizersDiv.classList.remove(\"hidden\");\n bindEvents(this, this.div, [\"keydown\"]);\n }\n }\n get toolbarPosition() {\n return null;\n }\n keydown(event) {\n if (!this.isResizable || event.target !== this.div || event.key !== \"Enter\") {\n return;\n }\n this._uiManager.setSelected(this);\n this.#savedDimensions = {\n savedX: this.x,\n savedY: this.y,\n savedWidth: this.width,\n savedHeight: this.height\n };\n const children = this.#resizersDiv.children;\n if (!this.#allResizerDivs) {\n this.#allResizerDivs = Array.from(children);\n const boundResizerKeydown = this.#resizerKeydown.bind(this);\n const boundResizerBlur = this.#resizerBlur.bind(this);\n const signal = this._uiManager._signal;\n for (const div of this.#allResizerDivs) {\n const name = div.getAttribute(\"data-resizer-name\");\n div.setAttribute(\"role\", \"spinbutton\");\n div.addEventListener(\"keydown\", boundResizerKeydown, {\n signal\n });\n div.addEventListener(\"blur\", boundResizerBlur, {\n signal\n });\n div.addEventListener(\"focus\", this.#resizerFocus.bind(this, name), {\n signal\n });\n div.setAttribute(\"data-l10n-id\", AnnotationEditor._l10nResizer[name]);\n }\n }\n const first = this.#allResizerDivs[0];\n let firstPosition = 0;\n for (const div of children) {\n if (div === first) {\n break;\n }\n firstPosition++;\n }\n const nextFirstPosition = (360 - this.rotation + this.parentRotation) % 360 / 90 * (this.#allResizerDivs.length / 4);\n if (nextFirstPosition !== firstPosition) {\n if (nextFirstPosition < firstPosition) {\n for (let i = 0; i < firstPosition - nextFirstPosition; i++) {\n this.#resizersDiv.append(this.#resizersDiv.firstChild);\n }\n } else if (nextFirstPosition > firstPosition) {\n for (let i = 0; i < nextFirstPosition - firstPosition; i++) {\n this.#resizersDiv.firstChild.before(this.#resizersDiv.lastChild);\n }\n }\n let i = 0;\n for (const child of children) {\n const div = this.#allResizerDivs[i++];\n const name = div.getAttribute(\"data-resizer-name\");\n child.setAttribute(\"data-l10n-id\", AnnotationEditor._l10nResizer[name]);\n }\n }\n this.#setResizerTabIndex(0);\n this.#isResizerEnabledForKeyboard = true;\n this.#resizersDiv.firstChild.focus({\n focusVisible: true\n });\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n #resizerKeydown(event) {\n AnnotationEditor._resizerKeyboardManager.exec(this, event);\n }\n #resizerBlur(event) {\n if (this.#isResizerEnabledForKeyboard && event.relatedTarget?.parentNode !== this.#resizersDiv) {\n this.#stopResizing();\n }\n }\n #resizerFocus(name) {\n this.#focusedResizerName = this.#isResizerEnabledForKeyboard ? name : \"\";\n }\n #setResizerTabIndex(value) {\n if (!this.#allResizerDivs) {\n return;\n }\n for (const div of this.#allResizerDivs) {\n div.tabIndex = value;\n }\n }\n _resizeWithKeyboard(x, y) {\n if (!this.#isResizerEnabledForKeyboard) {\n return;\n }\n this.#resizerPointermove(this.#focusedResizerName, {\n movementX: x,\n movementY: y\n });\n }\n #stopResizing() {\n this.#isResizerEnabledForKeyboard = false;\n this.#setResizerTabIndex(-1);\n if (this.#savedDimensions) {\n const {\n savedX,\n savedY,\n savedWidth,\n savedHeight\n } = this.#savedDimensions;\n this.#addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight);\n this.#savedDimensions = null;\n }\n }\n _stopResizingWithKeyboard() {\n this.#stopResizing();\n this.div.focus();\n }\n select() {\n this.makeResizable();\n this.div?.classList.add(\"selectedEditor\");\n if (!this._editToolbar) {\n this.addEditToolbar().then(() => {\n if (this.div?.classList.contains(\"selectedEditor\")) {\n this._editToolbar?.show();\n }\n });\n return;\n }\n this._editToolbar?.show();\n this.#altText?.toggleAltTextBadge(false);\n }\n unselect() {\n this.#resizersDiv?.classList.add(\"hidden\");\n this.div?.classList.remove(\"selectedEditor\");\n if (this.div?.contains(document.activeElement)) {\n this._uiManager.currentLayer.div.focus({\n preventScroll: true\n });\n }\n this._editToolbar?.hide();\n this.#altText?.toggleAltTextBadge(true);\n }\n updateParams(type, value) {}\n disableEditing() {}\n enableEditing() {}\n enterInEditMode() {}\n getImageForAltText() {\n return null;\n }\n get contentDiv() {\n return this.div;\n }\n get isEditing() {\n return this.#isEditing;\n }\n set isEditing(value) {\n this.#isEditing = value;\n if (!this.parent) {\n return;\n }\n if (value) {\n this.parent.setSelected(this);\n this.parent.setActiveEditor(this);\n } else {\n this.parent.setActiveEditor(null);\n }\n }\n setAspectRatio(width, height) {\n this.#keepAspectRatio = true;\n const aspectRatio = width / height;\n const {\n style\n } = this.div;\n style.aspectRatio = aspectRatio;\n style.height = \"auto\";\n }\n static get MIN_SIZE() {\n return 16;\n }\n static canCreateNewEmptyEditor() {\n return true;\n }\n get telemetryInitialData() {\n return {\n action: \"added\"\n };\n }\n get telemetryFinalData() {\n return null;\n }\n _reportTelemetry(data, mustWait = false) {\n if (mustWait) {\n this.#telemetryTimeouts ||= new Map();\n const {\n action\n } = data;\n let timeout = this.#telemetryTimeouts.get(action);\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(() => {\n this._reportTelemetry(data);\n this.#telemetryTimeouts.delete(action);\n if (this.#telemetryTimeouts.size === 0) {\n this.#telemetryTimeouts = null;\n }\n }, AnnotationEditor._telemetryTimeout);\n this.#telemetryTimeouts.set(action, timeout);\n return;\n }\n data.type ||= this.editorType;\n this._uiManager._eventBus.dispatch(\"reporttelemetry\", {\n source: this,\n details: {\n type: \"editing\",\n data\n }\n });\n }\n show(visible = this._isVisible) {\n this.div.classList.toggle(\"hidden\", !visible);\n this._isVisible = visible;\n }\n enable() {\n if (this.div) {\n this.div.tabIndex = 0;\n }\n this.#disabled = false;\n }\n disable() {\n if (this.div) {\n this.div.tabIndex = -1;\n }\n this.#disabled = true;\n }\n renderAnnotationElement(annotation) {\n let content = annotation.container.querySelector(\".annotationContent\");\n if (!content) {\n content = document.createElement(\"div\");\n content.classList.add(\"annotationContent\", this.editorType);\n annotation.container.prepend(content);\n } else if (content.nodeName === \"CANVAS\") {\n const canvas = content;\n content = document.createElement(\"div\");\n content.classList.add(\"annotationContent\", this.editorType);\n canvas.before(content);\n }\n return content;\n }\n resetAnnotationElement(annotation) {\n const {\n firstChild\n } = annotation.container;\n if (firstChild?.nodeName === \"DIV\" && firstChild.classList.contains(\"annotationContent\")) {\n firstChild.remove();\n }\n }\n}\nclass FakeEditor extends AnnotationEditor {\n constructor(params) {\n super(params);\n this.annotationElementId = params.annotationElementId;\n this.deleted = true;\n }\n serialize() {\n return this.serializeDeleted();\n }\n}\n\n;// ./src/shared/murmurhash3.js\n\n\n\n\n\n\nconst SEED = 0xc3d2e1f0;\nconst MASK_HIGH = 0xffff0000;\nconst MASK_LOW = 0xffff;\nclass MurmurHash3_64 {\n constructor(seed) {\n this.h1 = seed ? seed & 0xffffffff : SEED;\n this.h2 = seed ? seed & 0xffffffff : SEED;\n }\n update(input) {\n let data, length;\n if (typeof input === \"string\") {\n data = new Uint8Array(input.length * 2);\n length = 0;\n for (let i = 0, ii = input.length; i < ii; i++) {\n const code = input.charCodeAt(i);\n if (code <= 0xff) {\n data[length++] = code;\n } else {\n data[length++] = code >>> 8;\n data[length++] = code & 0xff;\n }\n }\n } else if (ArrayBuffer.isView(input)) {\n data = input.slice();\n length = data.byteLength;\n } else {\n throw new Error(\"Invalid data format, must be a string or TypedArray.\");\n }\n const blockCounts = length >> 2;\n const tailLength = length - blockCounts * 4;\n const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts);\n let k1 = 0,\n k2 = 0;\n let h1 = this.h1,\n h2 = this.h2;\n const C1 = 0xcc9e2d51,\n C2 = 0x1b873593;\n const C1_LOW = C1 & MASK_LOW,\n C2_LOW = C2 & MASK_LOW;\n for (let i = 0; i < blockCounts; i++) {\n if (i & 1) {\n k1 = dataUint32[i];\n k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;\n k1 = k1 << 15 | k1 >>> 17;\n k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;\n h1 ^= k1;\n h1 = h1 << 13 | h1 >>> 19;\n h1 = h1 * 5 + 0xe6546b64;\n } else {\n k2 = dataUint32[i];\n k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW;\n k2 = k2 << 15 | k2 >>> 17;\n k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW;\n h2 ^= k2;\n h2 = h2 << 13 | h2 >>> 19;\n h2 = h2 * 5 + 0xe6546b64;\n }\n }\n k1 = 0;\n switch (tailLength) {\n case 3:\n k1 ^= data[blockCounts * 4 + 2] << 16;\n case 2:\n k1 ^= data[blockCounts * 4 + 1] << 8;\n case 1:\n k1 ^= data[blockCounts * 4];\n k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;\n k1 = k1 << 15 | k1 >>> 17;\n k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;\n if (blockCounts & 1) {\n h1 ^= k1;\n } else {\n h2 ^= k1;\n }\n }\n this.h1 = h1;\n this.h2 = h2;\n }\n hexdigest() {\n let h1 = this.h1,\n h2 = this.h2;\n h1 ^= h2 >>> 1;\n h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW;\n h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16;\n h1 ^= h2 >>> 1;\n h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW;\n h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16;\n h1 ^= h2 >>> 1;\n return (h1 >>> 0).toString(16).padStart(8, \"0\") + (h2 >>> 0).toString(16).padStart(8, \"0\");\n }\n}\n\n;// ./src/display/annotation_storage.js\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst SerializableEmpty = Object.freeze({\n map: null,\n hash: \"\",\n transfer: undefined\n});\nclass AnnotationStorage {\n #modified = false;\n #modifiedIds = null;\n #storage = new Map();\n constructor() {\n this.onSetModified = null;\n this.onResetModified = null;\n this.onAnnotationEditor = null;\n }\n getValue(key, defaultValue) {\n const value = this.#storage.get(key);\n if (value === undefined) {\n return defaultValue;\n }\n return Object.assign(defaultValue, value);\n }\n getRawValue(key) {\n return this.#storage.get(key);\n }\n remove(key) {\n this.#storage.delete(key);\n if (this.#storage.size === 0) {\n this.resetModified();\n }\n if (typeof this.onAnnotationEditor === \"function\") {\n for (const value of this.#storage.values()) {\n if (value instanceof AnnotationEditor) {\n return;\n }\n }\n this.onAnnotationEditor(null);\n }\n }\n setValue(key, value) {\n const obj = this.#storage.get(key);\n let modified = false;\n if (obj !== undefined) {\n for (const [entry, val] of Object.entries(value)) {\n if (obj[entry] !== val) {\n modified = true;\n obj[entry] = val;\n }\n }\n } else {\n modified = true;\n this.#storage.set(key, value);\n }\n if (modified) {\n this.#setModified();\n }\n if (value instanceof AnnotationEditor && typeof this.onAnnotationEditor === \"function\") {\n this.onAnnotationEditor(value.constructor._type);\n }\n }\n has(key) {\n return this.#storage.has(key);\n }\n getAll() {\n return this.#storage.size > 0 ? objectFromMap(this.#storage) : null;\n }\n setAll(obj) {\n for (const [key, val] of Object.entries(obj)) {\n this.setValue(key, val);\n }\n }\n get size() {\n return this.#storage.size;\n }\n #setModified() {\n if (!this.#modified) {\n this.#modified = true;\n if (typeof this.onSetModified === \"function\") {\n this.onSetModified();\n }\n }\n }\n resetModified() {\n if (this.#modified) {\n this.#modified = false;\n if (typeof this.onResetModified === \"function\") {\n this.onResetModified();\n }\n }\n }\n get print() {\n return new PrintAnnotationStorage(this);\n }\n get serializable() {\n if (this.#storage.size === 0) {\n return SerializableEmpty;\n }\n const map = new Map(),\n hash = new MurmurHash3_64(),\n transfer = [];\n const context = Object.create(null);\n let hasBitmap = false;\n for (const [key, val] of this.#storage) {\n const serialized = val instanceof AnnotationEditor ? val.serialize(false, context) : val;\n if (serialized) {\n map.set(key, serialized);\n hash.update(`${key}:${JSON.stringify(serialized)}`);\n hasBitmap ||= !!serialized.bitmap;\n }\n }\n if (hasBitmap) {\n for (const value of map.values()) {\n if (value.bitmap) {\n transfer.push(value.bitmap);\n }\n }\n }\n return map.size > 0 ? {\n map,\n hash: hash.hexdigest(),\n transfer\n } : SerializableEmpty;\n }\n get editorStats() {\n let stats = null;\n const typeToEditor = new Map();\n for (const value of this.#storage.values()) {\n if (!(value instanceof AnnotationEditor)) {\n continue;\n }\n const editorStats = value.telemetryFinalData;\n if (!editorStats) {\n continue;\n }\n const {\n type\n } = editorStats;\n if (!typeToEditor.has(type)) {\n typeToEditor.set(type, Object.getPrototypeOf(value).constructor);\n }\n stats ||= Object.create(null);\n const map = stats[type] ||= new Map();\n for (const [key, val] of Object.entries(editorStats)) {\n if (key === \"type\") {\n continue;\n }\n let counters = map.get(key);\n if (!counters) {\n counters = new Map();\n map.set(key, counters);\n }\n const count = counters.get(val) ?? 0;\n counters.set(val, count + 1);\n }\n }\n for (const [type, editor] of typeToEditor) {\n stats[type] = editor.computeTelemetryFinalData(stats[type]);\n }\n return stats;\n }\n resetModifiedIds() {\n this.#modifiedIds = null;\n }\n get modifiedIds() {\n if (this.#modifiedIds) {\n return this.#modifiedIds;\n }\n const ids = [];\n for (const value of this.#storage.values()) {\n if (!(value instanceof AnnotationEditor) || !value.annotationElementId || !value.serialize()) {\n continue;\n }\n ids.push(value.annotationElementId);\n }\n return this.#modifiedIds = {\n ids: new Set(ids),\n hash: ids.join(\",\")\n };\n }\n}\nclass PrintAnnotationStorage extends AnnotationStorage {\n #serializable;\n constructor(parent) {\n super();\n const {\n map,\n hash,\n transfer\n } = parent.serializable;\n const clone = structuredClone(map, transfer ? {\n transfer\n } : null);\n this.#serializable = {\n map: clone,\n hash,\n transfer\n };\n }\n get print() {\n unreachable(\"Should not call PrintAnnotationStorage.print\");\n }\n get serializable() {\n return this.#serializable;\n }\n get modifiedIds() {\n return shadow(this, \"modifiedIds\", {\n ids: new Set(),\n hash: \"\"\n });\n }\n}\n\n;// ./src/display/font_loader.js\n\n\n\n\n\n\n\n\n\n\nclass FontLoader {\n #systemFonts = new Set();\n constructor({\n ownerDocument = globalThis.document,\n styleElement = null\n }) {\n this._document = ownerDocument;\n this.nativeFontFaces = new Set();\n this.styleElement = null;\n this.loadingRequests = [];\n this.loadTestFontId = 0;\n }\n addNativeFontFace(nativeFontFace) {\n this.nativeFontFaces.add(nativeFontFace);\n this._document.fonts.add(nativeFontFace);\n }\n removeNativeFontFace(nativeFontFace) {\n this.nativeFontFaces.delete(nativeFontFace);\n this._document.fonts.delete(nativeFontFace);\n }\n insertRule(rule) {\n if (!this.styleElement) {\n this.styleElement = this._document.createElement(\"style\");\n this._document.documentElement.getElementsByTagName(\"head\")[0].append(this.styleElement);\n }\n const styleSheet = this.styleElement.sheet;\n styleSheet.insertRule(rule, styleSheet.cssRules.length);\n }\n clear() {\n for (const nativeFontFace of this.nativeFontFaces) {\n this._document.fonts.delete(nativeFontFace);\n }\n this.nativeFontFaces.clear();\n this.#systemFonts.clear();\n if (this.styleElement) {\n this.styleElement.remove();\n this.styleElement = null;\n }\n }\n async loadSystemFont({\n systemFontInfo: info,\n _inspectFont\n }) {\n if (!info || this.#systemFonts.has(info.loadedName)) {\n return;\n }\n assert(!this.disableFontFace, \"loadSystemFont shouldn't be called when `disableFontFace` is set.\");\n if (this.isFontLoadingAPISupported) {\n const {\n loadedName,\n src,\n style\n } = info;\n const fontFace = new FontFace(loadedName, src, style);\n this.addNativeFontFace(fontFace);\n try {\n await fontFace.load();\n this.#systemFonts.add(loadedName);\n _inspectFont?.(info);\n } catch {\n warn(`Cannot load system font: ${info.baseFontName}, installing it could help to improve PDF rendering.`);\n this.removeNativeFontFace(fontFace);\n }\n return;\n }\n unreachable(\"Not implemented: loadSystemFont without the Font Loading API.\");\n }\n async bind(font) {\n if (font.attached || font.missingFile && !font.systemFontInfo) {\n return;\n }\n font.attached = true;\n if (font.systemFontInfo) {\n await this.loadSystemFont(font);\n return;\n }\n if (this.isFontLoadingAPISupported) {\n const nativeFontFace = font.createNativeFontFace();\n if (nativeFontFace) {\n this.addNativeFontFace(nativeFontFace);\n try {\n await nativeFontFace.loaded;\n } catch (ex) {\n warn(`Failed to load font '${nativeFontFace.family}': '${ex}'.`);\n font.disableFontFace = true;\n throw ex;\n }\n }\n return;\n }\n const rule = font.createFontFaceRule();\n if (rule) {\n this.insertRule(rule);\n if (this.isSyncFontLoadingSupported) {\n return;\n }\n await new Promise(resolve => {\n const request = this._queueLoadingCallback(resolve);\n this._prepareFontLoadEvent(font, request);\n });\n }\n }\n get isFontLoadingAPISupported() {\n const hasFonts = !!this._document?.fonts;\n return shadow(this, \"isFontLoadingAPISupported\", hasFonts);\n }\n get isSyncFontLoadingSupported() {\n let supported = false;\n if (isNodeJS) {\n supported = true;\n } else if (typeof navigator !== \"undefined\" && typeof navigator?.userAgent === \"string\" && /Mozilla\\/5.0.*?rv:\\d+.*? Gecko/.test(navigator.userAgent)) {\n supported = true;\n }\n return shadow(this, \"isSyncFontLoadingSupported\", supported);\n }\n _queueLoadingCallback(callback) {\n function completeRequest() {\n assert(!request.done, \"completeRequest() cannot be called twice.\");\n request.done = true;\n while (loadingRequests.length > 0 && loadingRequests[0].done) {\n const otherRequest = loadingRequests.shift();\n setTimeout(otherRequest.callback, 0);\n }\n }\n const {\n loadingRequests\n } = this;\n const request = {\n done: false,\n complete: completeRequest,\n callback\n };\n loadingRequests.push(request);\n return request;\n }\n get _loadTestFont() {\n const testFont = atob(\"T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA\" + \"FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA\" + \"ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA\" + \"AAAGbmFtZVjmdH4AAAGAAAAAsX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AAAAAAAAA\" + \"AAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQAC\" + \"AQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3\" + \"Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj\" + \"FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==\");\n return shadow(this, \"_loadTestFont\", testFont);\n }\n _prepareFontLoadEvent(font, request) {\n function int32(data, offset) {\n return data.charCodeAt(offset) << 24 | data.charCodeAt(offset + 1) << 16 | data.charCodeAt(offset + 2) << 8 | data.charCodeAt(offset + 3) & 0xff;\n }\n function spliceString(s, offset, remove, insert) {\n const chunk1 = s.substring(0, offset);\n const chunk2 = s.substring(offset + remove);\n return chunk1 + insert + chunk2;\n }\n let i, ii;\n const canvas = this._document.createElement(\"canvas\");\n canvas.width = 1;\n canvas.height = 1;\n const ctx = canvas.getContext(\"2d\");\n let called = 0;\n function isFontReady(name, callback) {\n if (++called > 30) {\n warn(\"Load test font never loaded.\");\n callback();\n return;\n }\n ctx.font = \"30px \" + name;\n ctx.fillText(\".\", 0, 20);\n const imageData = ctx.getImageData(0, 0, 1, 1);\n if (imageData.data[3] > 0) {\n callback();\n return;\n }\n setTimeout(isFontReady.bind(null, name, callback));\n }\n const loadTestFontId = `lt${Date.now()}${this.loadTestFontId++}`;\n let data = this._loadTestFont;\n const COMMENT_OFFSET = 976;\n data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length, loadTestFontId);\n const CFF_CHECKSUM_OFFSET = 16;\n const XXXX_VALUE = 0x58585858;\n let checksum = int32(data, CFF_CHECKSUM_OFFSET);\n for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {\n checksum = checksum - XXXX_VALUE + int32(loadTestFontId, i) | 0;\n }\n if (i < loadTestFontId.length) {\n checksum = checksum - XXXX_VALUE + int32(loadTestFontId + \"XXX\", i) | 0;\n }\n data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum));\n const url = `url(data:font/opentype;base64,${btoa(data)});`;\n const rule = `@font-face {font-family:\"${loadTestFontId}\";src:${url}}`;\n this.insertRule(rule);\n const div = this._document.createElement(\"div\");\n div.style.visibility = \"hidden\";\n div.style.width = div.style.height = \"10px\";\n div.style.position = \"absolute\";\n div.style.top = div.style.left = \"0px\";\n for (const name of [font.loadedName, loadTestFontId]) {\n const span = this._document.createElement(\"span\");\n span.textContent = \"Hi\";\n span.style.fontFamily = name;\n div.append(span);\n }\n this._document.body.append(div);\n isFontReady(loadTestFontId, () => {\n div.remove();\n request.complete();\n });\n }\n}\nclass FontFaceObject {\n constructor(translatedData, {\n disableFontFace = false,\n inspectFont = null\n }) {\n this.compiledGlyphs = Object.create(null);\n for (const i in translatedData) {\n this[i] = translatedData[i];\n }\n this.disableFontFace = disableFontFace === true;\n this._inspectFont = inspectFont;\n }\n createNativeFontFace() {\n if (!this.data || this.disableFontFace) {\n return null;\n }\n let nativeFontFace;\n if (!this.cssFontInfo) {\n nativeFontFace = new FontFace(this.loadedName, this.data, {});\n } else {\n const css = {\n weight: this.cssFontInfo.fontWeight\n };\n if (this.cssFontInfo.italicAngle) {\n css.style = `oblique ${this.cssFontInfo.italicAngle}deg`;\n }\n nativeFontFace = new FontFace(this.cssFontInfo.fontFamily, this.data, css);\n }\n this._inspectFont?.(this);\n return nativeFontFace;\n }\n createFontFaceRule() {\n if (!this.data || this.disableFontFace) {\n return null;\n }\n const data = bytesToString(this.data);\n const url = `url(data:${this.mimetype};base64,${btoa(data)});`;\n let rule;\n if (!this.cssFontInfo) {\n rule = `@font-face {font-family:\"${this.loadedName}\";src:${url}}`;\n } else {\n let css = `font-weight: ${this.cssFontInfo.fontWeight};`;\n if (this.cssFontInfo.italicAngle) {\n css += `font-style: oblique ${this.cssFontInfo.italicAngle}deg;`;\n }\n rule = `@font-face {font-family:\"${this.cssFontInfo.fontFamily}\";${css}src:${url}}`;\n }\n this._inspectFont?.(this, url);\n return rule;\n }\n getPathGenerator(objs, character) {\n if (this.compiledGlyphs[character] !== undefined) {\n return this.compiledGlyphs[character];\n }\n let cmds;\n try {\n cmds = objs.get(this.loadedName + \"_path_\" + character);\n } catch (ex) {\n warn(`getPathGenerator - ignoring character: \"${ex}\".`);\n }\n if (!Array.isArray(cmds) || cmds.length === 0) {\n return this.compiledGlyphs[character] = function (c, size) {};\n }\n const commands = [];\n for (let i = 0, ii = cmds.length; i < ii;) {\n switch (cmds[i++]) {\n case FontRenderOps.BEZIER_CURVE_TO:\n {\n const [a, b, c, d, e, f] = cmds.slice(i, i + 6);\n commands.push(ctx => ctx.bezierCurveTo(a, b, c, d, e, f));\n i += 6;\n }\n break;\n case FontRenderOps.MOVE_TO:\n {\n const [a, b] = cmds.slice(i, i + 2);\n commands.push(ctx => ctx.moveTo(a, b));\n i += 2;\n }\n break;\n case FontRenderOps.LINE_TO:\n {\n const [a, b] = cmds.slice(i, i + 2);\n commands.push(ctx => ctx.lineTo(a, b));\n i += 2;\n }\n break;\n case FontRenderOps.QUADRATIC_CURVE_TO:\n {\n const [a, b, c, d] = cmds.slice(i, i + 4);\n commands.push(ctx => ctx.quadraticCurveTo(a, b, c, d));\n i += 4;\n }\n break;\n case FontRenderOps.RESTORE:\n commands.push(ctx => ctx.restore());\n break;\n case FontRenderOps.SAVE:\n commands.push(ctx => ctx.save());\n break;\n case FontRenderOps.SCALE:\n assert(commands.length === 2, \"Scale command is only valid at the third position.\");\n break;\n case FontRenderOps.TRANSFORM:\n {\n const [a, b, c, d, e, f] = cmds.slice(i, i + 6);\n commands.push(ctx => ctx.transform(a, b, c, d, e, f));\n i += 6;\n }\n break;\n case FontRenderOps.TRANSLATE:\n {\n const [a, b] = cmds.slice(i, i + 2);\n commands.push(ctx => ctx.translate(a, b));\n i += 2;\n }\n break;\n }\n }\n return this.compiledGlyphs[character] = function glyphDrawer(ctx, size) {\n commands[0](ctx);\n commands[1](ctx);\n ctx.scale(size, -size);\n for (let i = 2, ii = commands.length; i < ii; i++) {\n commands[i](ctx);\n }\n };\n }\n}\n\n;// ./src/display/node_utils.js\n\n\n\n\n\n\n\n\n\nif (isNodeJS) {\n var packageCapability = Promise.withResolvers();\n var packageMap = null;\n const loadPackages = async () => {\n const fs = await import(/*webpackIgnore: true*/\"fs\"),\n http = await import(/*webpackIgnore: true*/\"http\"),\n https = await import(/*webpackIgnore: true*/\"https\"),\n url = await import(/*webpackIgnore: true*/\"url\");\n let canvas, path2d;\n try {\n canvas = await import(/*webpackIgnore: true*/\"canvas\");\n } catch {}\n try {\n path2d = await import(/*webpackIgnore: true*/\"path2d\");\n } catch {}\n return new Map(Object.entries({\n fs,\n http,\n https,\n url,\n canvas,\n path2d\n }));\n };\n loadPackages().then(map => {\n packageMap = map;\n packageCapability.resolve();\n if (!globalThis.DOMMatrix) {\n const DOMMatrix = map.get(\"canvas\")?.DOMMatrix;\n if (DOMMatrix) {\n globalThis.DOMMatrix = DOMMatrix;\n } else {\n warn(\"Cannot polyfill `DOMMatrix`, rendering may be broken.\");\n }\n }\n if (!globalThis.Path2D) {\n const CanvasRenderingContext2D = map.get(\"canvas\")?.CanvasRenderingContext2D;\n const applyPath2DToCanvasRenderingContext = map.get(\"path2d\")?.applyPath2DToCanvasRenderingContext;\n const Path2D = map.get(\"path2d\")?.Path2D;\n if (CanvasRenderingContext2D && applyPath2DToCanvasRenderingContext && Path2D) {\n applyPath2DToCanvasRenderingContext(CanvasRenderingContext2D);\n globalThis.Path2D = Path2D;\n } else {\n warn(\"Cannot polyfill `Path2D`, rendering may be broken.\");\n }\n }\n }, reason => {\n warn(`loadPackages: ${reason}`);\n packageMap = new Map();\n packageCapability.resolve();\n });\n}\nclass NodePackages {\n static get promise() {\n return packageCapability.promise;\n }\n static get(name) {\n return packageMap?.get(name);\n }\n}\nconst node_utils_fetchData = function (url) {\n const fs = NodePackages.get(\"fs\");\n return fs.promises.readFile(url).then(data => new Uint8Array(data));\n};\nclass NodeFilterFactory extends BaseFilterFactory {}\nclass NodeCanvasFactory extends BaseCanvasFactory {\n _createCanvas(width, height) {\n const canvas = NodePackages.get(\"canvas\");\n return canvas.createCanvas(width, height);\n }\n}\nclass NodeCMapReaderFactory extends BaseCMapReaderFactory {\n _fetchData(url, compressionType) {\n return node_utils_fetchData(url).then(data => ({\n cMapData: data,\n compressionType\n }));\n }\n}\nclass NodeStandardFontDataFactory extends BaseStandardFontDataFactory {\n _fetchData(url) {\n return node_utils_fetchData(url);\n }\n}\n\n;// ./src/display/pattern_helper.js\n\n\nconst PathType = {\n FILL: \"Fill\",\n STROKE: \"Stroke\",\n SHADING: \"Shading\"\n};\nfunction applyBoundingBox(ctx, bbox) {\n if (!bbox) {\n return;\n }\n const width = bbox[2] - bbox[0];\n const height = bbox[3] - bbox[1];\n const region = new Path2D();\n region.rect(bbox[0], bbox[1], width, height);\n ctx.clip(region);\n}\nclass BaseShadingPattern {\n getPattern() {\n unreachable(\"Abstract method `getPattern` called.\");\n }\n}\nclass RadialAxialShadingPattern extends BaseShadingPattern {\n constructor(IR) {\n super();\n this._type = IR[1];\n this._bbox = IR[2];\n this._colorStops = IR[3];\n this._p0 = IR[4];\n this._p1 = IR[5];\n this._r0 = IR[6];\n this._r1 = IR[7];\n this.matrix = null;\n }\n _createGradient(ctx) {\n let grad;\n if (this._type === \"axial\") {\n grad = ctx.createLinearGradient(this._p0[0], this._p0[1], this._p1[0], this._p1[1]);\n } else if (this._type === \"radial\") {\n grad = ctx.createRadialGradient(this._p0[0], this._p0[1], this._r0, this._p1[0], this._p1[1], this._r1);\n }\n for (const colorStop of this._colorStops) {\n grad.addColorStop(colorStop[0], colorStop[1]);\n }\n return grad;\n }\n getPattern(ctx, owner, inverse, pathType) {\n let pattern;\n if (pathType === PathType.STROKE || pathType === PathType.FILL) {\n const ownerBBox = owner.current.getClippedPathBoundingBox(pathType, getCurrentTransform(ctx)) || [0, 0, 0, 0];\n const width = Math.ceil(ownerBBox[2] - ownerBBox[0]) || 1;\n const height = Math.ceil(ownerBBox[3] - ownerBBox[1]) || 1;\n const tmpCanvas = owner.cachedCanvases.getCanvas(\"pattern\", width, height);\n const tmpCtx = tmpCanvas.context;\n tmpCtx.clearRect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n tmpCtx.beginPath();\n tmpCtx.rect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n tmpCtx.translate(-ownerBBox[0], -ownerBBox[1]);\n inverse = Util.transform(inverse, [1, 0, 0, 1, ownerBBox[0], ownerBBox[1]]);\n tmpCtx.transform(...owner.baseTransform);\n if (this.matrix) {\n tmpCtx.transform(...this.matrix);\n }\n applyBoundingBox(tmpCtx, this._bbox);\n tmpCtx.fillStyle = this._createGradient(tmpCtx);\n tmpCtx.fill();\n pattern = ctx.createPattern(tmpCanvas.canvas, \"no-repeat\");\n const domMatrix = new DOMMatrix(inverse);\n pattern.setTransform(domMatrix);\n } else {\n applyBoundingBox(ctx, this._bbox);\n pattern = this._createGradient(ctx);\n }\n return pattern;\n }\n}\nfunction drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {\n const coords = context.coords,\n colors = context.colors;\n const bytes = data.data,\n rowSize = data.width * 4;\n let tmp;\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1;\n p1 = p2;\n p2 = tmp;\n tmp = c1;\n c1 = c2;\n c2 = tmp;\n }\n if (coords[p2 + 1] > coords[p3 + 1]) {\n tmp = p2;\n p2 = p3;\n p3 = tmp;\n tmp = c2;\n c2 = c3;\n c3 = tmp;\n }\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1;\n p1 = p2;\n p2 = tmp;\n tmp = c1;\n c1 = c2;\n c2 = tmp;\n }\n const x1 = (coords[p1] + context.offsetX) * context.scaleX;\n const y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;\n const x2 = (coords[p2] + context.offsetX) * context.scaleX;\n const y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;\n const x3 = (coords[p3] + context.offsetX) * context.scaleX;\n const y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;\n if (y1 >= y3) {\n return;\n }\n const c1r = colors[c1],\n c1g = colors[c1 + 1],\n c1b = colors[c1 + 2];\n const c2r = colors[c2],\n c2g = colors[c2 + 1],\n c2b = colors[c2 + 2];\n const c3r = colors[c3],\n c3g = colors[c3 + 1],\n c3b = colors[c3 + 2];\n const minY = Math.round(y1),\n maxY = Math.round(y3);\n let xa, car, cag, cab;\n let xb, cbr, cbg, cbb;\n for (let y = minY; y <= maxY; y++) {\n if (y < y2) {\n const k = y < y1 ? 0 : (y1 - y) / (y1 - y2);\n xa = x1 - (x1 - x2) * k;\n car = c1r - (c1r - c2r) * k;\n cag = c1g - (c1g - c2g) * k;\n cab = c1b - (c1b - c2b) * k;\n } else {\n let k;\n if (y > y3) {\n k = 1;\n } else if (y2 === y3) {\n k = 0;\n } else {\n k = (y2 - y) / (y2 - y3);\n }\n xa = x2 - (x2 - x3) * k;\n car = c2r - (c2r - c3r) * k;\n cag = c2g - (c2g - c3g) * k;\n cab = c2b - (c2b - c3b) * k;\n }\n let k;\n if (y < y1) {\n k = 0;\n } else if (y > y3) {\n k = 1;\n } else {\n k = (y1 - y) / (y1 - y3);\n }\n xb = x1 - (x1 - x3) * k;\n cbr = c1r - (c1r - c3r) * k;\n cbg = c1g - (c1g - c3g) * k;\n cbb = c1b - (c1b - c3b) * k;\n const x1_ = Math.round(Math.min(xa, xb));\n const x2_ = Math.round(Math.max(xa, xb));\n let j = rowSize * y + x1_ * 4;\n for (let x = x1_; x <= x2_; x++) {\n k = (xa - x) / (xa - xb);\n if (k < 0) {\n k = 0;\n } else if (k > 1) {\n k = 1;\n }\n bytes[j++] = car - (car - cbr) * k | 0;\n bytes[j++] = cag - (cag - cbg) * k | 0;\n bytes[j++] = cab - (cab - cbb) * k | 0;\n bytes[j++] = 255;\n }\n }\n}\nfunction drawFigure(data, figure, context) {\n const ps = figure.coords;\n const cs = figure.colors;\n let i, ii;\n switch (figure.type) {\n case \"lattice\":\n const verticesPerRow = figure.verticesPerRow;\n const rows = Math.floor(ps.length / verticesPerRow) - 1;\n const cols = verticesPerRow - 1;\n for (i = 0; i < rows; i++) {\n let q = i * verticesPerRow;\n for (let j = 0; j < cols; j++, q++) {\n drawTriangle(data, context, ps[q], ps[q + 1], ps[q + verticesPerRow], cs[q], cs[q + 1], cs[q + verticesPerRow]);\n drawTriangle(data, context, ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow], cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]);\n }\n }\n break;\n case \"triangles\":\n for (i = 0, ii = ps.length; i < ii; i += 3) {\n drawTriangle(data, context, ps[i], ps[i + 1], ps[i + 2], cs[i], cs[i + 1], cs[i + 2]);\n }\n break;\n default:\n throw new Error(\"illegal figure\");\n }\n}\nclass MeshShadingPattern extends BaseShadingPattern {\n constructor(IR) {\n super();\n this._coords = IR[2];\n this._colors = IR[3];\n this._figures = IR[4];\n this._bounds = IR[5];\n this._bbox = IR[7];\n this._background = IR[8];\n this.matrix = null;\n }\n _createMeshCanvas(combinedScale, backgroundColor, cachedCanvases) {\n const EXPECTED_SCALE = 1.1;\n const MAX_PATTERN_SIZE = 3000;\n const BORDER_SIZE = 2;\n const offsetX = Math.floor(this._bounds[0]);\n const offsetY = Math.floor(this._bounds[1]);\n const boundsWidth = Math.ceil(this._bounds[2]) - offsetX;\n const boundsHeight = Math.ceil(this._bounds[3]) - offsetY;\n const width = Math.min(Math.ceil(Math.abs(boundsWidth * combinedScale[0] * EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n const height = Math.min(Math.ceil(Math.abs(boundsHeight * combinedScale[1] * EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n const scaleX = boundsWidth / width;\n const scaleY = boundsHeight / height;\n const context = {\n coords: this._coords,\n colors: this._colors,\n offsetX: -offsetX,\n offsetY: -offsetY,\n scaleX: 1 / scaleX,\n scaleY: 1 / scaleY\n };\n const paddedWidth = width + BORDER_SIZE * 2;\n const paddedHeight = height + BORDER_SIZE * 2;\n const tmpCanvas = cachedCanvases.getCanvas(\"mesh\", paddedWidth, paddedHeight);\n const tmpCtx = tmpCanvas.context;\n const data = tmpCtx.createImageData(width, height);\n if (backgroundColor) {\n const bytes = data.data;\n for (let i = 0, ii = bytes.length; i < ii; i += 4) {\n bytes[i] = backgroundColor[0];\n bytes[i + 1] = backgroundColor[1];\n bytes[i + 2] = backgroundColor[2];\n bytes[i + 3] = 255;\n }\n }\n for (const figure of this._figures) {\n drawFigure(data, figure, context);\n }\n tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE);\n const canvas = tmpCanvas.canvas;\n return {\n canvas,\n offsetX: offsetX - BORDER_SIZE * scaleX,\n offsetY: offsetY - BORDER_SIZE * scaleY,\n scaleX,\n scaleY\n };\n }\n getPattern(ctx, owner, inverse, pathType) {\n applyBoundingBox(ctx, this._bbox);\n let scale;\n if (pathType === PathType.SHADING) {\n scale = Util.singularValueDecompose2dScale(getCurrentTransform(ctx));\n } else {\n scale = Util.singularValueDecompose2dScale(owner.baseTransform);\n if (this.matrix) {\n const matrixScale = Util.singularValueDecompose2dScale(this.matrix);\n scale = [scale[0] * matrixScale[0], scale[1] * matrixScale[1]];\n }\n }\n const temporaryPatternCanvas = this._createMeshCanvas(scale, pathType === PathType.SHADING ? null : this._background, owner.cachedCanvases);\n if (pathType !== PathType.SHADING) {\n ctx.setTransform(...owner.baseTransform);\n if (this.matrix) {\n ctx.transform(...this.matrix);\n }\n }\n ctx.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY);\n ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY);\n return ctx.createPattern(temporaryPatternCanvas.canvas, \"no-repeat\");\n }\n}\nclass DummyShadingPattern extends BaseShadingPattern {\n getPattern() {\n return \"hotpink\";\n }\n}\nfunction getShadingPattern(IR) {\n switch (IR[0]) {\n case \"RadialAxial\":\n return new RadialAxialShadingPattern(IR);\n case \"Mesh\":\n return new MeshShadingPattern(IR);\n case \"Dummy\":\n return new DummyShadingPattern();\n }\n throw new Error(`Unknown IR type: ${IR[0]}`);\n}\nconst PaintType = {\n COLORED: 1,\n UNCOLORED: 2\n};\nclass TilingPattern {\n static MAX_PATTERN_SIZE = 3000;\n constructor(IR, color, ctx, canvasGraphicsFactory, baseTransform) {\n this.operatorList = IR[2];\n this.matrix = IR[3];\n this.bbox = IR[4];\n this.xstep = IR[5];\n this.ystep = IR[6];\n this.paintType = IR[7];\n this.tilingType = IR[8];\n this.color = color;\n this.ctx = ctx;\n this.canvasGraphicsFactory = canvasGraphicsFactory;\n this.baseTransform = baseTransform;\n }\n createPatternCanvas(owner) {\n const {\n bbox,\n operatorList,\n paintType,\n tilingType,\n color,\n canvasGraphicsFactory\n } = this;\n let {\n xstep,\n ystep\n } = this;\n xstep = Math.abs(xstep);\n ystep = Math.abs(ystep);\n info(\"TilingType: \" + tilingType);\n const x0 = bbox[0],\n y0 = bbox[1],\n x1 = bbox[2],\n y1 = bbox[3];\n const width = x1 - x0;\n const height = y1 - y0;\n const matrixScale = Util.singularValueDecompose2dScale(this.matrix);\n const curMatrixScale = Util.singularValueDecompose2dScale(this.baseTransform);\n const combinedScaleX = matrixScale[0] * curMatrixScale[0];\n const combinedScaleY = matrixScale[1] * curMatrixScale[1];\n let canvasWidth = width,\n canvasHeight = height,\n redrawHorizontally = false,\n redrawVertically = false;\n const xScaledStep = Math.ceil(xstep * combinedScaleX);\n const yScaledStep = Math.ceil(ystep * combinedScaleY);\n const xScaledWidth = Math.ceil(width * combinedScaleX);\n const yScaledHeight = Math.ceil(height * combinedScaleY);\n if (xScaledStep >= xScaledWidth) {\n canvasWidth = xstep;\n } else {\n redrawHorizontally = true;\n }\n if (yScaledStep >= yScaledHeight) {\n canvasHeight = ystep;\n } else {\n redrawVertically = true;\n }\n const dimx = this.getSizeAndScale(canvasWidth, this.ctx.canvas.width, combinedScaleX);\n const dimy = this.getSizeAndScale(canvasHeight, this.ctx.canvas.height, combinedScaleY);\n const tmpCanvas = owner.cachedCanvases.getCanvas(\"pattern\", dimx.size, dimy.size);\n const tmpCtx = tmpCanvas.context;\n const graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx);\n graphics.groupLevel = owner.groupLevel;\n this.setFillAndStrokeStyleToContext(graphics, paintType, color);\n tmpCtx.translate(-dimx.scale * x0, -dimy.scale * y0);\n graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0);\n tmpCtx.save();\n this.clipBbox(graphics, x0, y0, x1, y1);\n graphics.baseTransform = getCurrentTransform(graphics.ctx);\n graphics.executeOperatorList(operatorList);\n graphics.endDrawing();\n tmpCtx.restore();\n if (redrawHorizontally || redrawVertically) {\n const image = tmpCanvas.canvas;\n if (redrawHorizontally) {\n canvasWidth = xstep;\n }\n if (redrawVertically) {\n canvasHeight = ystep;\n }\n const dimx2 = this.getSizeAndScale(canvasWidth, this.ctx.canvas.width, combinedScaleX);\n const dimy2 = this.getSizeAndScale(canvasHeight, this.ctx.canvas.height, combinedScaleY);\n const xSize = dimx2.size;\n const ySize = dimy2.size;\n const tmpCanvas2 = owner.cachedCanvases.getCanvas(\"pattern-workaround\", xSize, ySize);\n const tmpCtx2 = tmpCanvas2.context;\n const ii = redrawHorizontally ? Math.floor(width / xstep) : 0;\n const jj = redrawVertically ? Math.floor(height / ystep) : 0;\n for (let i = 0; i <= ii; i++) {\n for (let j = 0; j <= jj; j++) {\n tmpCtx2.drawImage(image, xSize * i, ySize * j, xSize, ySize, 0, 0, xSize, ySize);\n }\n }\n return {\n canvas: tmpCanvas2.canvas,\n scaleX: dimx2.scale,\n scaleY: dimy2.scale,\n offsetX: x0,\n offsetY: y0\n };\n }\n return {\n canvas: tmpCanvas.canvas,\n scaleX: dimx.scale,\n scaleY: dimy.scale,\n offsetX: x0,\n offsetY: y0\n };\n }\n getSizeAndScale(step, realOutputSize, scale) {\n const maxSize = Math.max(TilingPattern.MAX_PATTERN_SIZE, realOutputSize);\n let size = Math.ceil(step * scale);\n if (size >= maxSize) {\n size = maxSize;\n } else {\n scale = size / step;\n }\n return {\n scale,\n size\n };\n }\n clipBbox(graphics, x0, y0, x1, y1) {\n const bboxWidth = x1 - x0;\n const bboxHeight = y1 - y0;\n graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);\n graphics.current.updateRectMinMax(getCurrentTransform(graphics.ctx), [x0, y0, x1, y1]);\n graphics.clip();\n graphics.endPath();\n }\n setFillAndStrokeStyleToContext(graphics, paintType, color) {\n const context = graphics.ctx,\n current = graphics.current;\n switch (paintType) {\n case PaintType.COLORED:\n const ctx = this.ctx;\n context.fillStyle = ctx.fillStyle;\n context.strokeStyle = ctx.strokeStyle;\n current.fillColor = ctx.fillStyle;\n current.strokeColor = ctx.strokeStyle;\n break;\n case PaintType.UNCOLORED:\n const cssColor = Util.makeHexColor(color[0], color[1], color[2]);\n context.fillStyle = cssColor;\n context.strokeStyle = cssColor;\n current.fillColor = cssColor;\n current.strokeColor = cssColor;\n break;\n default:\n throw new FormatError(`Unsupported paint type: ${paintType}`);\n }\n }\n getPattern(ctx, owner, inverse, pathType) {\n let matrix = inverse;\n if (pathType !== PathType.SHADING) {\n matrix = Util.transform(matrix, owner.baseTransform);\n if (this.matrix) {\n matrix = Util.transform(matrix, this.matrix);\n }\n }\n const temporaryPatternCanvas = this.createPatternCanvas(owner);\n let domMatrix = new DOMMatrix(matrix);\n domMatrix = domMatrix.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY);\n domMatrix = domMatrix.scale(1 / temporaryPatternCanvas.scaleX, 1 / temporaryPatternCanvas.scaleY);\n const pattern = ctx.createPattern(temporaryPatternCanvas.canvas, \"repeat\");\n pattern.setTransform(domMatrix);\n return pattern;\n }\n}\n\n;// ./src/shared/image_utils.js\n\n\n\n\n\n\n\nfunction convertToRGBA(params) {\n switch (params.kind) {\n case ImageKind.GRAYSCALE_1BPP:\n return convertBlackAndWhiteToRGBA(params);\n case ImageKind.RGB_24BPP:\n return convertRGBToRGBA(params);\n }\n return null;\n}\nfunction convertBlackAndWhiteToRGBA({\n src,\n srcPos = 0,\n dest,\n width,\n height,\n nonBlackColor = 0xffffffff,\n inverseDecode = false\n}) {\n const black = util_FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n const [zeroMapping, oneMapping] = inverseDecode ? [nonBlackColor, black] : [black, nonBlackColor];\n const widthInSource = width >> 3;\n const widthRemainder = width & 7;\n const srcLength = src.length;\n dest = new Uint32Array(dest.buffer);\n let destPos = 0;\n for (let i = 0; i < height; i++) {\n for (const max = srcPos + widthInSource; srcPos < max; srcPos++) {\n const elem = srcPos < srcLength ? src[srcPos] : 255;\n dest[destPos++] = elem & 0b10000000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b1000000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b100000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b10000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b1000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b100 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b10 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b1 ? oneMapping : zeroMapping;\n }\n if (widthRemainder === 0) {\n continue;\n }\n const elem = srcPos < srcLength ? src[srcPos++] : 255;\n for (let j = 0; j < widthRemainder; j++) {\n dest[destPos++] = elem & 1 << 7 - j ? oneMapping : zeroMapping;\n }\n }\n return {\n srcPos,\n destPos\n };\n}\nfunction convertRGBToRGBA({\n src,\n srcPos = 0,\n dest,\n destPos = 0,\n width,\n height\n}) {\n let i = 0;\n const len32 = src.length >> 2;\n const src32 = new Uint32Array(src.buffer, srcPos, len32);\n if (FeatureTest.isLittleEndian) {\n for (; i < len32 - 2; i += 3, destPos += 4) {\n const s1 = src32[i];\n const s2 = src32[i + 1];\n const s3 = src32[i + 2];\n dest[destPos] = s1 | 0xff000000;\n dest[destPos + 1] = s1 >>> 24 | s2 << 8 | 0xff000000;\n dest[destPos + 2] = s2 >>> 16 | s3 << 16 | 0xff000000;\n dest[destPos + 3] = s3 >>> 8 | 0xff000000;\n }\n for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n dest[destPos++] = src[j] | src[j + 1] << 8 | src[j + 2] << 16 | 0xff000000;\n }\n } else {\n for (; i < len32 - 2; i += 3, destPos += 4) {\n const s1 = src32[i];\n const s2 = src32[i + 1];\n const s3 = src32[i + 2];\n dest[destPos] = s1 | 0xff;\n dest[destPos + 1] = s1 << 24 | s2 >>> 8 | 0xff;\n dest[destPos + 2] = s2 << 16 | s3 >>> 16 | 0xff;\n dest[destPos + 3] = s3 << 8 | 0xff;\n }\n for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n dest[destPos++] = src[j] << 24 | src[j + 1] << 16 | src[j + 2] << 8 | 0xff;\n }\n }\n return {\n srcPos,\n destPos\n };\n}\nfunction grayToRGBA(src, dest) {\n if (FeatureTest.isLittleEndian) {\n for (let i = 0, ii = src.length; i < ii; i++) {\n dest[i] = src[i] * 0x10101 | 0xff000000;\n }\n } else {\n for (let i = 0, ii = src.length; i < ii; i++) {\n dest[i] = src[i] * 0x1010100 | 0x000000ff;\n }\n }\n}\n\n;// ./src/display/canvas.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst MIN_FONT_SIZE = 16;\nconst MAX_FONT_SIZE = 100;\nconst EXECUTION_TIME = 15;\nconst EXECUTION_STEPS = 10;\nconst MAX_SIZE_TO_COMPILE = 1000;\nconst FULL_CHUNK_HEIGHT = 16;\nfunction mirrorContextOperations(ctx, destCtx) {\n if (ctx._removeMirroring) {\n throw new Error(\"Context is already forwarding operations.\");\n }\n ctx.__originalSave = ctx.save;\n ctx.__originalRestore = ctx.restore;\n ctx.__originalRotate = ctx.rotate;\n ctx.__originalScale = ctx.scale;\n ctx.__originalTranslate = ctx.translate;\n ctx.__originalTransform = ctx.transform;\n ctx.__originalSetTransform = ctx.setTransform;\n ctx.__originalResetTransform = ctx.resetTransform;\n ctx.__originalClip = ctx.clip;\n ctx.__originalMoveTo = ctx.moveTo;\n ctx.__originalLineTo = ctx.lineTo;\n ctx.__originalBezierCurveTo = ctx.bezierCurveTo;\n ctx.__originalRect = ctx.rect;\n ctx.__originalClosePath = ctx.closePath;\n ctx.__originalBeginPath = ctx.beginPath;\n ctx._removeMirroring = () => {\n ctx.save = ctx.__originalSave;\n ctx.restore = ctx.__originalRestore;\n ctx.rotate = ctx.__originalRotate;\n ctx.scale = ctx.__originalScale;\n ctx.translate = ctx.__originalTranslate;\n ctx.transform = ctx.__originalTransform;\n ctx.setTransform = ctx.__originalSetTransform;\n ctx.resetTransform = ctx.__originalResetTransform;\n ctx.clip = ctx.__originalClip;\n ctx.moveTo = ctx.__originalMoveTo;\n ctx.lineTo = ctx.__originalLineTo;\n ctx.bezierCurveTo = ctx.__originalBezierCurveTo;\n ctx.rect = ctx.__originalRect;\n ctx.closePath = ctx.__originalClosePath;\n ctx.beginPath = ctx.__originalBeginPath;\n delete ctx._removeMirroring;\n };\n ctx.save = function ctxSave() {\n destCtx.save();\n this.__originalSave();\n };\n ctx.restore = function ctxRestore() {\n destCtx.restore();\n this.__originalRestore();\n };\n ctx.translate = function ctxTranslate(x, y) {\n destCtx.translate(x, y);\n this.__originalTranslate(x, y);\n };\n ctx.scale = function ctxScale(x, y) {\n destCtx.scale(x, y);\n this.__originalScale(x, y);\n };\n ctx.transform = function ctxTransform(a, b, c, d, e, f) {\n destCtx.transform(a, b, c, d, e, f);\n this.__originalTransform(a, b, c, d, e, f);\n };\n ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {\n destCtx.setTransform(a, b, c, d, e, f);\n this.__originalSetTransform(a, b, c, d, e, f);\n };\n ctx.resetTransform = function ctxResetTransform() {\n destCtx.resetTransform();\n this.__originalResetTransform();\n };\n ctx.rotate = function ctxRotate(angle) {\n destCtx.rotate(angle);\n this.__originalRotate(angle);\n };\n ctx.clip = function ctxRotate(rule) {\n destCtx.clip(rule);\n this.__originalClip(rule);\n };\n ctx.moveTo = function (x, y) {\n destCtx.moveTo(x, y);\n this.__originalMoveTo(x, y);\n };\n ctx.lineTo = function (x, y) {\n destCtx.lineTo(x, y);\n this.__originalLineTo(x, y);\n };\n ctx.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) {\n destCtx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n this.__originalBezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n };\n ctx.rect = function (x, y, width, height) {\n destCtx.rect(x, y, width, height);\n this.__originalRect(x, y, width, height);\n };\n ctx.closePath = function () {\n destCtx.closePath();\n this.__originalClosePath();\n };\n ctx.beginPath = function () {\n destCtx.beginPath();\n this.__originalBeginPath();\n };\n}\nclass CachedCanvases {\n constructor(canvasFactory) {\n this.canvasFactory = canvasFactory;\n this.cache = Object.create(null);\n }\n getCanvas(id, width, height) {\n let canvasEntry;\n if (this.cache[id] !== undefined) {\n canvasEntry = this.cache[id];\n this.canvasFactory.reset(canvasEntry, width, height);\n } else {\n canvasEntry = this.canvasFactory.create(width, height);\n this.cache[id] = canvasEntry;\n }\n return canvasEntry;\n }\n delete(id) {\n delete this.cache[id];\n }\n clear() {\n for (const id in this.cache) {\n const canvasEntry = this.cache[id];\n this.canvasFactory.destroy(canvasEntry);\n delete this.cache[id];\n }\n }\n}\nfunction drawImageAtIntegerCoords(ctx, srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH) {\n const [a, b, c, d, tx, ty] = getCurrentTransform(ctx);\n if (b === 0 && c === 0) {\n const tlX = destX * a + tx;\n const rTlX = Math.round(tlX);\n const tlY = destY * d + ty;\n const rTlY = Math.round(tlY);\n const brX = (destX + destW) * a + tx;\n const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n const brY = (destY + destH) * d + ty;\n const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n ctx.setTransform(Math.sign(a), 0, 0, Math.sign(d), rTlX, rTlY);\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rWidth, rHeight);\n ctx.setTransform(a, b, c, d, tx, ty);\n return [rWidth, rHeight];\n }\n if (a === 0 && d === 0) {\n const tlX = destY * c + tx;\n const rTlX = Math.round(tlX);\n const tlY = destX * b + ty;\n const rTlY = Math.round(tlY);\n const brX = (destY + destH) * c + tx;\n const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n const brY = (destX + destW) * b + ty;\n const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n ctx.setTransform(0, Math.sign(b), Math.sign(c), 0, rTlX, rTlY);\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rHeight, rWidth);\n ctx.setTransform(a, b, c, d, tx, ty);\n return [rHeight, rWidth];\n }\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH);\n const scaleX = Math.hypot(a, b);\n const scaleY = Math.hypot(c, d);\n return [scaleX * destW, scaleY * destH];\n}\nfunction compileType3Glyph(imgData) {\n const {\n width,\n height\n } = imgData;\n if (width > MAX_SIZE_TO_COMPILE || height > MAX_SIZE_TO_COMPILE) {\n return null;\n }\n const POINT_TO_PROCESS_LIMIT = 1000;\n const POINT_TYPES = new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);\n const width1 = width + 1;\n let points = new Uint8Array(width1 * (height + 1));\n let i, j, j0;\n const lineSize = width + 7 & ~7;\n let data = new Uint8Array(lineSize * height),\n pos = 0;\n for (const elem of imgData.data) {\n let mask = 128;\n while (mask > 0) {\n data[pos++] = elem & mask ? 0 : 255;\n mask >>= 1;\n }\n }\n let count = 0;\n pos = 0;\n if (data[pos] !== 0) {\n points[0] = 1;\n ++count;\n }\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j] = data[pos] ? 2 : 1;\n ++count;\n }\n pos++;\n }\n if (data[pos] !== 0) {\n points[j] = 2;\n ++count;\n }\n for (i = 1; i < height; i++) {\n pos = i * lineSize;\n j0 = i * width1;\n if (data[pos - lineSize] !== data[pos]) {\n points[j0] = data[pos] ? 1 : 8;\n ++count;\n }\n let sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);\n for (j = 1; j < width; j++) {\n sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) + (data[pos - lineSize + 1] ? 8 : 0);\n if (POINT_TYPES[sum]) {\n points[j0 + j] = POINT_TYPES[sum];\n ++count;\n }\n pos++;\n }\n if (data[pos - lineSize] !== data[pos]) {\n points[j0 + j] = data[pos] ? 2 : 4;\n ++count;\n }\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n }\n pos = lineSize * (height - 1);\n j0 = i * width1;\n if (data[pos] !== 0) {\n points[j0] = 8;\n ++count;\n }\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j0 + j] = data[pos] ? 4 : 8;\n ++count;\n }\n pos++;\n }\n if (data[pos] !== 0) {\n points[j0 + j] = 4;\n ++count;\n }\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n const steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);\n const path = new Path2D();\n for (i = 0; count && i <= height; i++) {\n let p = i * width1;\n const end = p + width;\n while (p < end && !points[p]) {\n p++;\n }\n if (p === end) {\n continue;\n }\n path.moveTo(p % width1, i);\n const p0 = p;\n let type = points[p];\n do {\n const step = steps[type];\n do {\n p += step;\n } while (!points[p]);\n const pp = points[p];\n if (pp !== 5 && pp !== 10) {\n type = pp;\n points[p] = 0;\n } else {\n type = pp & 0x33 * type >> 4;\n points[p] &= type >> 2 | type << 2;\n }\n path.lineTo(p % width1, p / width1 | 0);\n if (!points[p]) {\n --count;\n }\n } while (p0 !== p);\n --i;\n }\n data = null;\n points = null;\n const drawOutline = function (c) {\n c.save();\n c.scale(1 / width, -1 / height);\n c.translate(0, -height);\n c.fill(path);\n c.beginPath();\n c.restore();\n };\n return drawOutline;\n}\nclass CanvasExtraState {\n constructor(width, height) {\n this.alphaIsShape = false;\n this.fontSize = 0;\n this.fontSizeScale = 1;\n this.textMatrix = IDENTITY_MATRIX;\n this.textMatrixScale = 1;\n this.fontMatrix = FONT_IDENTITY_MATRIX;\n this.leading = 0;\n this.x = 0;\n this.y = 0;\n this.lineX = 0;\n this.lineY = 0;\n this.charSpacing = 0;\n this.wordSpacing = 0;\n this.textHScale = 1;\n this.textRenderingMode = TextRenderingMode.FILL;\n this.textRise = 0;\n this.fillColor = \"#000000\";\n this.strokeColor = \"#000000\";\n this.patternFill = false;\n this.fillAlpha = 1;\n this.strokeAlpha = 1;\n this.lineWidth = 1;\n this.activeSMask = null;\n this.transferMaps = \"none\";\n this.startNewPathAndClipBox([0, 0, width, height]);\n }\n clone() {\n const clone = Object.create(this);\n clone.clipBox = this.clipBox.slice();\n return clone;\n }\n setCurrentPoint(x, y) {\n this.x = x;\n this.y = y;\n }\n updatePathMinMax(transform, x, y) {\n [x, y] = Util.applyTransform([x, y], transform);\n this.minX = Math.min(this.minX, x);\n this.minY = Math.min(this.minY, y);\n this.maxX = Math.max(this.maxX, x);\n this.maxY = Math.max(this.maxY, y);\n }\n updateRectMinMax(transform, rect) {\n const p1 = Util.applyTransform(rect, transform);\n const p2 = Util.applyTransform(rect.slice(2), transform);\n const p3 = Util.applyTransform([rect[0], rect[3]], transform);\n const p4 = Util.applyTransform([rect[2], rect[1]], transform);\n this.minX = Math.min(this.minX, p1[0], p2[0], p3[0], p4[0]);\n this.minY = Math.min(this.minY, p1[1], p2[1], p3[1], p4[1]);\n this.maxX = Math.max(this.maxX, p1[0], p2[0], p3[0], p4[0]);\n this.maxY = Math.max(this.maxY, p1[1], p2[1], p3[1], p4[1]);\n }\n updateScalingPathMinMax(transform, minMax) {\n Util.scaleMinMax(transform, minMax);\n this.minX = Math.min(this.minX, minMax[0]);\n this.minY = Math.min(this.minY, minMax[1]);\n this.maxX = Math.max(this.maxX, minMax[2]);\n this.maxY = Math.max(this.maxY, minMax[3]);\n }\n updateCurvePathMinMax(transform, x0, y0, x1, y1, x2, y2, x3, y3, minMax) {\n const box = Util.bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax);\n if (minMax) {\n return;\n }\n this.updateRectMinMax(transform, box);\n }\n getPathBoundingBox(pathType = PathType.FILL, transform = null) {\n const box = [this.minX, this.minY, this.maxX, this.maxY];\n if (pathType === PathType.STROKE) {\n if (!transform) {\n unreachable(\"Stroke bounding box must include transform.\");\n }\n const scale = Util.singularValueDecompose2dScale(transform);\n const xStrokePad = scale[0] * this.lineWidth / 2;\n const yStrokePad = scale[1] * this.lineWidth / 2;\n box[0] -= xStrokePad;\n box[1] -= yStrokePad;\n box[2] += xStrokePad;\n box[3] += yStrokePad;\n }\n return box;\n }\n updateClipFromPath() {\n const intersect = Util.intersect(this.clipBox, this.getPathBoundingBox());\n this.startNewPathAndClipBox(intersect || [0, 0, 0, 0]);\n }\n isEmptyClip() {\n return this.minX === Infinity;\n }\n startNewPathAndClipBox(box) {\n this.clipBox = box;\n this.minX = Infinity;\n this.minY = Infinity;\n this.maxX = 0;\n this.maxY = 0;\n }\n getClippedPathBoundingBox(pathType = PathType.FILL, transform = null) {\n return Util.intersect(this.clipBox, this.getPathBoundingBox(pathType, transform));\n }\n}\nfunction putBinaryImageData(ctx, imgData) {\n if (typeof ImageData !== \"undefined\" && imgData instanceof ImageData) {\n ctx.putImageData(imgData, 0, 0);\n return;\n }\n const height = imgData.height,\n width = imgData.width;\n const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n let srcPos = 0,\n destPos;\n const src = imgData.data;\n const dest = chunkImgData.data;\n let i, j, thisChunkHeight, elemsInThisChunk;\n if (imgData.kind === util_ImageKind.GRAYSCALE_1BPP) {\n const srcLength = src.byteLength;\n const dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2);\n const dest32DataLength = dest32.length;\n const fullSrcDiff = width + 7 >> 3;\n const white = 0xffffffff;\n const black = util_FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n for (i = 0; i < totalChunks; i++) {\n thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n destPos = 0;\n for (j = 0; j < thisChunkHeight; j++) {\n const srcDiff = srcLength - srcPos;\n let k = 0;\n const kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7;\n const kEndUnrolled = kEnd & ~7;\n let mask = 0;\n let srcByte = 0;\n for (; k < kEndUnrolled; k += 8) {\n srcByte = src[srcPos++];\n dest32[destPos++] = srcByte & 128 ? white : black;\n dest32[destPos++] = srcByte & 64 ? white : black;\n dest32[destPos++] = srcByte & 32 ? white : black;\n dest32[destPos++] = srcByte & 16 ? white : black;\n dest32[destPos++] = srcByte & 8 ? white : black;\n dest32[destPos++] = srcByte & 4 ? white : black;\n dest32[destPos++] = srcByte & 2 ? white : black;\n dest32[destPos++] = srcByte & 1 ? white : black;\n }\n for (; k < kEnd; k++) {\n if (mask === 0) {\n srcByte = src[srcPos++];\n mask = 128;\n }\n dest32[destPos++] = srcByte & mask ? white : black;\n mask >>= 1;\n }\n }\n while (destPos < dest32DataLength) {\n dest32[destPos++] = 0;\n }\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else if (imgData.kind === util_ImageKind.RGBA_32BPP) {\n j = 0;\n elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4;\n for (i = 0; i < fullChunks; i++) {\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n srcPos += elemsInThisChunk;\n ctx.putImageData(chunkImgData, 0, j);\n j += FULL_CHUNK_HEIGHT;\n }\n if (i < totalChunks) {\n elemsInThisChunk = width * partialChunkHeight * 4;\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n ctx.putImageData(chunkImgData, 0, j);\n }\n } else if (imgData.kind === util_ImageKind.RGB_24BPP) {\n thisChunkHeight = FULL_CHUNK_HEIGHT;\n elemsInThisChunk = width * thisChunkHeight;\n for (i = 0; i < totalChunks; i++) {\n if (i >= fullChunks) {\n thisChunkHeight = partialChunkHeight;\n elemsInThisChunk = width * thisChunkHeight;\n }\n destPos = 0;\n for (j = elemsInThisChunk; j--;) {\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = 255;\n }\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else {\n throw new Error(`bad image kind: ${imgData.kind}`);\n }\n}\nfunction putBinaryImageMask(ctx, imgData) {\n if (imgData.bitmap) {\n ctx.drawImage(imgData.bitmap, 0, 0);\n return;\n }\n const height = imgData.height,\n width = imgData.width;\n const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n let srcPos = 0;\n const src = imgData.data;\n const dest = chunkImgData.data;\n for (let i = 0; i < totalChunks; i++) {\n const thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n ({\n srcPos\n } = convertBlackAndWhiteToRGBA({\n src,\n srcPos,\n dest,\n width,\n height: thisChunkHeight,\n nonBlackColor: 0\n }));\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n}\nfunction copyCtxState(sourceCtx, destCtx) {\n const properties = [\"strokeStyle\", \"fillStyle\", \"fillRule\", \"globalAlpha\", \"lineWidth\", \"lineCap\", \"lineJoin\", \"miterLimit\", \"globalCompositeOperation\", \"font\", \"filter\"];\n for (const property of properties) {\n if (sourceCtx[property] !== undefined) {\n destCtx[property] = sourceCtx[property];\n }\n }\n if (sourceCtx.setLineDash !== undefined) {\n destCtx.setLineDash(sourceCtx.getLineDash());\n destCtx.lineDashOffset = sourceCtx.lineDashOffset;\n }\n}\nfunction resetCtxToDefault(ctx) {\n ctx.strokeStyle = ctx.fillStyle = \"#000000\";\n ctx.fillRule = \"nonzero\";\n ctx.globalAlpha = 1;\n ctx.lineWidth = 1;\n ctx.lineCap = \"butt\";\n ctx.lineJoin = \"miter\";\n ctx.miterLimit = 10;\n ctx.globalCompositeOperation = \"source-over\";\n ctx.font = \"10px sans-serif\";\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n ctx.lineDashOffset = 0;\n }\n if (!isNodeJS) {\n const {\n filter\n } = ctx;\n if (filter !== \"none\" && filter !== \"\") {\n ctx.filter = \"none\";\n }\n }\n}\nfunction getImageSmoothingEnabled(transform, interpolate) {\n if (interpolate) {\n return true;\n }\n const scale = Util.singularValueDecompose2dScale(transform);\n scale[0] = Math.fround(scale[0]);\n scale[1] = Math.fround(scale[1]);\n const actualScale = Math.fround((globalThis.devicePixelRatio || 1) * PixelsPerInch.PDF_TO_CSS_UNITS);\n return scale[0] <= actualScale && scale[1] <= actualScale;\n}\nconst LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\nconst LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\nconst NORMAL_CLIP = {};\nconst EO_CLIP = {};\nclass CanvasGraphics {\n constructor(canvasCtx, commonObjs, objs, canvasFactory, filterFactory, {\n optionalContentConfig,\n markedContentStack = null\n }, annotationCanvasMap, pageColors) {\n this.ctx = canvasCtx;\n this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height);\n this.stateStack = [];\n this.pendingClip = null;\n this.pendingEOFill = false;\n this.res = null;\n this.xobjs = null;\n this.commonObjs = commonObjs;\n this.objs = objs;\n this.canvasFactory = canvasFactory;\n this.filterFactory = filterFactory;\n this.groupStack = [];\n this.processingType3 = null;\n this.baseTransform = null;\n this.baseTransformStack = [];\n this.groupLevel = 0;\n this.smaskStack = [];\n this.smaskCounter = 0;\n this.tempSMask = null;\n this.suspendedCtx = null;\n this.contentVisible = true;\n this.markedContentStack = markedContentStack || [];\n this.optionalContentConfig = optionalContentConfig;\n this.cachedCanvases = new CachedCanvases(this.canvasFactory);\n this.cachedPatterns = new Map();\n this.annotationCanvasMap = annotationCanvasMap;\n this.viewportScale = 1;\n this.outputScaleX = 1;\n this.outputScaleY = 1;\n this.pageColors = pageColors;\n this._cachedScaleForStroking = [-1, 0];\n this._cachedGetSinglePixelWidth = null;\n this._cachedBitmapsMap = new Map();\n }\n getObject(data, fallback = null) {\n if (typeof data === \"string\") {\n return data.startsWith(\"g_\") ? this.commonObjs.get(data) : this.objs.get(data);\n }\n return fallback;\n }\n beginDrawing({\n transform,\n viewport,\n transparency = false,\n background = null\n }) {\n const width = this.ctx.canvas.width;\n const height = this.ctx.canvas.height;\n const savedFillStyle = this.ctx.fillStyle;\n this.ctx.fillStyle = background || \"#ffffff\";\n this.ctx.fillRect(0, 0, width, height);\n this.ctx.fillStyle = savedFillStyle;\n if (transparency) {\n const transparentCanvas = this.cachedCanvases.getCanvas(\"transparent\", width, height);\n this.compositeCtx = this.ctx;\n this.transparentCanvas = transparentCanvas.canvas;\n this.ctx = transparentCanvas.context;\n this.ctx.save();\n this.ctx.transform(...getCurrentTransform(this.compositeCtx));\n }\n this.ctx.save();\n resetCtxToDefault(this.ctx);\n if (transform) {\n this.ctx.transform(...transform);\n this.outputScaleX = transform[0];\n this.outputScaleY = transform[0];\n }\n this.ctx.transform(...viewport.transform);\n this.viewportScale = viewport.scale;\n this.baseTransform = getCurrentTransform(this.ctx);\n }\n executeOperatorList(operatorList, executionStartIdx, continueCallback, stepper) {\n const argsArray = operatorList.argsArray;\n const fnArray = operatorList.fnArray;\n let i = executionStartIdx || 0;\n const argsArrayLen = argsArray.length;\n if (argsArrayLen === i) {\n return i;\n }\n const chunkOperations = argsArrayLen - i > EXECUTION_STEPS && typeof continueCallback === \"function\";\n const endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0;\n let steps = 0;\n const commonObjs = this.commonObjs;\n const objs = this.objs;\n let fnId;\n while (true) {\n if (stepper !== undefined && i === stepper.nextBreakPoint) {\n stepper.breakIt(i, continueCallback);\n return i;\n }\n fnId = fnArray[i];\n if (fnId !== OPS.dependency) {\n this[fnId].apply(this, argsArray[i]);\n } else {\n for (const depObjId of argsArray[i]) {\n const objsPool = depObjId.startsWith(\"g_\") ? commonObjs : objs;\n if (!objsPool.has(depObjId)) {\n objsPool.get(depObjId, continueCallback);\n return i;\n }\n }\n }\n i++;\n if (i === argsArrayLen) {\n return i;\n }\n if (chunkOperations && ++steps > EXECUTION_STEPS) {\n if (Date.now() > endTime) {\n continueCallback();\n return i;\n }\n steps = 0;\n }\n }\n }\n #restoreInitialState() {\n while (this.stateStack.length || this.inSMaskMode) {\n this.restore();\n }\n this.current.activeSMask = null;\n this.ctx.restore();\n if (this.transparentCanvas) {\n this.ctx = this.compositeCtx;\n this.ctx.save();\n this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n this.ctx.drawImage(this.transparentCanvas, 0, 0);\n this.ctx.restore();\n this.transparentCanvas = null;\n }\n }\n endDrawing() {\n this.#restoreInitialState();\n this.cachedCanvases.clear();\n this.cachedPatterns.clear();\n for (const cache of this._cachedBitmapsMap.values()) {\n for (const canvas of cache.values()) {\n if (typeof HTMLCanvasElement !== \"undefined\" && canvas instanceof HTMLCanvasElement) {\n canvas.width = canvas.height = 0;\n }\n }\n cache.clear();\n }\n this._cachedBitmapsMap.clear();\n this.#drawFilter();\n }\n #drawFilter() {\n if (this.pageColors) {\n const hcmFilterId = this.filterFactory.addHCMFilter(this.pageColors.foreground, this.pageColors.background);\n if (hcmFilterId !== \"none\") {\n const savedFilter = this.ctx.filter;\n this.ctx.filter = hcmFilterId;\n this.ctx.drawImage(this.ctx.canvas, 0, 0);\n this.ctx.filter = savedFilter;\n }\n }\n }\n _scaleImage(img, inverseTransform) {\n const width = img.width;\n const height = img.height;\n let widthScale = Math.max(Math.hypot(inverseTransform[0], inverseTransform[1]), 1);\n let heightScale = Math.max(Math.hypot(inverseTransform[2], inverseTransform[3]), 1);\n let paintWidth = width,\n paintHeight = height;\n let tmpCanvasId = \"prescale1\";\n let tmpCanvas, tmpCtx;\n while (widthScale > 2 && paintWidth > 1 || heightScale > 2 && paintHeight > 1) {\n let newWidth = paintWidth,\n newHeight = paintHeight;\n if (widthScale > 2 && paintWidth > 1) {\n newWidth = paintWidth >= 16384 ? Math.floor(paintWidth / 2) - 1 || 1 : Math.ceil(paintWidth / 2);\n widthScale /= paintWidth / newWidth;\n }\n if (heightScale > 2 && paintHeight > 1) {\n newHeight = paintHeight >= 16384 ? Math.floor(paintHeight / 2) - 1 || 1 : Math.ceil(paintHeight) / 2;\n heightScale /= paintHeight / newHeight;\n }\n tmpCanvas = this.cachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight);\n tmpCtx = tmpCanvas.context;\n tmpCtx.clearRect(0, 0, newWidth, newHeight);\n tmpCtx.drawImage(img, 0, 0, paintWidth, paintHeight, 0, 0, newWidth, newHeight);\n img = tmpCanvas.canvas;\n paintWidth = newWidth;\n paintHeight = newHeight;\n tmpCanvasId = tmpCanvasId === \"prescale1\" ? \"prescale2\" : \"prescale1\";\n }\n return {\n img,\n paintWidth,\n paintHeight\n };\n }\n _createMaskCanvas(img) {\n const ctx = this.ctx;\n const {\n width,\n height\n } = img;\n const fillColor = this.current.fillColor;\n const isPatternFill = this.current.patternFill;\n const currentTransform = getCurrentTransform(ctx);\n let cache, cacheKey, scaled, maskCanvas;\n if ((img.bitmap || img.data) && img.count > 1) {\n const mainKey = img.bitmap || img.data.buffer;\n cacheKey = JSON.stringify(isPatternFill ? currentTransform : [currentTransform.slice(0, 4), fillColor]);\n cache = this._cachedBitmapsMap.get(mainKey);\n if (!cache) {\n cache = new Map();\n this._cachedBitmapsMap.set(mainKey, cache);\n }\n const cachedImage = cache.get(cacheKey);\n if (cachedImage && !isPatternFill) {\n const offsetX = Math.round(Math.min(currentTransform[0], currentTransform[2]) + currentTransform[4]);\n const offsetY = Math.round(Math.min(currentTransform[1], currentTransform[3]) + currentTransform[5]);\n return {\n canvas: cachedImage,\n offsetX,\n offsetY\n };\n }\n scaled = cachedImage;\n }\n if (!scaled) {\n maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height);\n putBinaryImageMask(maskCanvas.context, img);\n }\n let maskToCanvas = Util.transform(currentTransform, [1 / width, 0, 0, -1 / height, 0, 0]);\n maskToCanvas = Util.transform(maskToCanvas, [1, 0, 0, 1, 0, -height]);\n const [minX, minY, maxX, maxY] = Util.getAxialAlignedBoundingBox([0, 0, width, height], maskToCanvas);\n const drawnWidth = Math.round(maxX - minX) || 1;\n const drawnHeight = Math.round(maxY - minY) || 1;\n const fillCanvas = this.cachedCanvases.getCanvas(\"fillCanvas\", drawnWidth, drawnHeight);\n const fillCtx = fillCanvas.context;\n const offsetX = minX;\n const offsetY = minY;\n fillCtx.translate(-offsetX, -offsetY);\n fillCtx.transform(...maskToCanvas);\n if (!scaled) {\n scaled = this._scaleImage(maskCanvas.canvas, getCurrentTransformInverse(fillCtx));\n scaled = scaled.img;\n if (cache && isPatternFill) {\n cache.set(cacheKey, scaled);\n }\n }\n fillCtx.imageSmoothingEnabled = getImageSmoothingEnabled(getCurrentTransform(fillCtx), img.interpolate);\n drawImageAtIntegerCoords(fillCtx, scaled, 0, 0, scaled.width, scaled.height, 0, 0, width, height);\n fillCtx.globalCompositeOperation = \"source-in\";\n const inverse = Util.transform(getCurrentTransformInverse(fillCtx), [1, 0, 0, 1, -offsetX, -offsetY]);\n fillCtx.fillStyle = isPatternFill ? fillColor.getPattern(ctx, this, inverse, PathType.FILL) : fillColor;\n fillCtx.fillRect(0, 0, width, height);\n if (cache && !isPatternFill) {\n this.cachedCanvases.delete(\"fillCanvas\");\n cache.set(cacheKey, fillCanvas.canvas);\n }\n return {\n canvas: fillCanvas.canvas,\n offsetX: Math.round(offsetX),\n offsetY: Math.round(offsetY)\n };\n }\n setLineWidth(width) {\n if (width !== this.current.lineWidth) {\n this._cachedScaleForStroking[0] = -1;\n }\n this.current.lineWidth = width;\n this.ctx.lineWidth = width;\n }\n setLineCap(style) {\n this.ctx.lineCap = LINE_CAP_STYLES[style];\n }\n setLineJoin(style) {\n this.ctx.lineJoin = LINE_JOIN_STYLES[style];\n }\n setMiterLimit(limit) {\n this.ctx.miterLimit = limit;\n }\n setDash(dashArray, dashPhase) {\n const ctx = this.ctx;\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash(dashArray);\n ctx.lineDashOffset = dashPhase;\n }\n }\n setRenderingIntent(intent) {}\n setFlatness(flatness) {}\n setGState(states) {\n for (const [key, value] of states) {\n switch (key) {\n case \"LW\":\n this.setLineWidth(value);\n break;\n case \"LC\":\n this.setLineCap(value);\n break;\n case \"LJ\":\n this.setLineJoin(value);\n break;\n case \"ML\":\n this.setMiterLimit(value);\n break;\n case \"D\":\n this.setDash(value[0], value[1]);\n break;\n case \"RI\":\n this.setRenderingIntent(value);\n break;\n case \"FL\":\n this.setFlatness(value);\n break;\n case \"Font\":\n this.setFont(value[0], value[1]);\n break;\n case \"CA\":\n this.current.strokeAlpha = value;\n break;\n case \"ca\":\n this.current.fillAlpha = value;\n this.ctx.globalAlpha = value;\n break;\n case \"BM\":\n this.ctx.globalCompositeOperation = value;\n break;\n case \"SMask\":\n this.current.activeSMask = value ? this.tempSMask : null;\n this.tempSMask = null;\n this.checkSMaskState();\n break;\n case \"TR\":\n this.ctx.filter = this.current.transferMaps = this.filterFactory.addFilter(value);\n break;\n }\n }\n }\n get inSMaskMode() {\n return !!this.suspendedCtx;\n }\n checkSMaskState() {\n const inSMaskMode = this.inSMaskMode;\n if (this.current.activeSMask && !inSMaskMode) {\n this.beginSMaskMode();\n } else if (!this.current.activeSMask && inSMaskMode) {\n this.endSMaskMode();\n }\n }\n beginSMaskMode() {\n if (this.inSMaskMode) {\n throw new Error(\"beginSMaskMode called while already in smask mode\");\n }\n const drawnWidth = this.ctx.canvas.width;\n const drawnHeight = this.ctx.canvas.height;\n const cacheId = \"smaskGroupAt\" + this.groupLevel;\n const scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight);\n this.suspendedCtx = this.ctx;\n this.ctx = scratchCanvas.context;\n const ctx = this.ctx;\n ctx.setTransform(...getCurrentTransform(this.suspendedCtx));\n copyCtxState(this.suspendedCtx, ctx);\n mirrorContextOperations(ctx, this.suspendedCtx);\n this.setGState([[\"BM\", \"source-over\"], [\"ca\", 1], [\"CA\", 1]]);\n }\n endSMaskMode() {\n if (!this.inSMaskMode) {\n throw new Error(\"endSMaskMode called while not in smask mode\");\n }\n this.ctx._removeMirroring();\n copyCtxState(this.ctx, this.suspendedCtx);\n this.ctx = this.suspendedCtx;\n this.suspendedCtx = null;\n }\n compose(dirtyBox) {\n if (!this.current.activeSMask) {\n return;\n }\n if (!dirtyBox) {\n dirtyBox = [0, 0, this.ctx.canvas.width, this.ctx.canvas.height];\n } else {\n dirtyBox[0] = Math.floor(dirtyBox[0]);\n dirtyBox[1] = Math.floor(dirtyBox[1]);\n dirtyBox[2] = Math.ceil(dirtyBox[2]);\n dirtyBox[3] = Math.ceil(dirtyBox[3]);\n }\n const smask = this.current.activeSMask;\n const suspendedCtx = this.suspendedCtx;\n this.composeSMask(suspendedCtx, smask, this.ctx, dirtyBox);\n this.ctx.save();\n this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n this.ctx.restore();\n }\n composeSMask(ctx, smask, layerCtx, layerBox) {\n const layerOffsetX = layerBox[0];\n const layerOffsetY = layerBox[1];\n const layerWidth = layerBox[2] - layerOffsetX;\n const layerHeight = layerBox[3] - layerOffsetY;\n if (layerWidth === 0 || layerHeight === 0) {\n return;\n }\n this.genericComposeSMask(smask.context, layerCtx, layerWidth, layerHeight, smask.subtype, smask.backdrop, smask.transferMap, layerOffsetX, layerOffsetY, smask.offsetX, smask.offsetY);\n ctx.save();\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = \"source-over\";\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(layerCtx.canvas, 0, 0);\n ctx.restore();\n }\n genericComposeSMask(maskCtx, layerCtx, width, height, subtype, backdrop, transferMap, layerOffsetX, layerOffsetY, maskOffsetX, maskOffsetY) {\n let maskCanvas = maskCtx.canvas;\n let maskX = layerOffsetX - maskOffsetX;\n let maskY = layerOffsetY - maskOffsetY;\n if (backdrop) {\n if (maskX < 0 || maskY < 0 || maskX + width > maskCanvas.width || maskY + height > maskCanvas.height) {\n const canvas = this.cachedCanvases.getCanvas(\"maskExtension\", width, height);\n const ctx = canvas.context;\n ctx.drawImage(maskCanvas, -maskX, -maskY);\n if (backdrop.some(c => c !== 0)) {\n ctx.globalCompositeOperation = \"destination-atop\";\n ctx.fillStyle = Util.makeHexColor(...backdrop);\n ctx.fillRect(0, 0, width, height);\n ctx.globalCompositeOperation = \"source-over\";\n }\n maskCanvas = canvas.canvas;\n maskX = maskY = 0;\n } else if (backdrop.some(c => c !== 0)) {\n maskCtx.save();\n maskCtx.globalAlpha = 1;\n maskCtx.setTransform(1, 0, 0, 1, 0, 0);\n const clip = new Path2D();\n clip.rect(maskX, maskY, width, height);\n maskCtx.clip(clip);\n maskCtx.globalCompositeOperation = \"destination-atop\";\n maskCtx.fillStyle = Util.makeHexColor(...backdrop);\n maskCtx.fillRect(maskX, maskY, width, height);\n maskCtx.restore();\n }\n }\n layerCtx.save();\n layerCtx.globalAlpha = 1;\n layerCtx.setTransform(1, 0, 0, 1, 0, 0);\n if (subtype === \"Alpha\" && transferMap) {\n layerCtx.filter = this.filterFactory.addAlphaFilter(transferMap);\n } else if (subtype === \"Luminosity\") {\n layerCtx.filter = this.filterFactory.addLuminosityFilter(transferMap);\n }\n const clip = new Path2D();\n clip.rect(layerOffsetX, layerOffsetY, width, height);\n layerCtx.clip(clip);\n layerCtx.globalCompositeOperation = \"destination-in\";\n layerCtx.drawImage(maskCanvas, maskX, maskY, width, height, layerOffsetX, layerOffsetY, width, height);\n layerCtx.restore();\n }\n save() {\n if (this.inSMaskMode) {\n copyCtxState(this.ctx, this.suspendedCtx);\n this.suspendedCtx.save();\n } else {\n this.ctx.save();\n }\n const old = this.current;\n this.stateStack.push(old);\n this.current = old.clone();\n }\n restore() {\n if (this.stateStack.length === 0 && this.inSMaskMode) {\n this.endSMaskMode();\n }\n if (this.stateStack.length !== 0) {\n this.current = this.stateStack.pop();\n if (this.inSMaskMode) {\n this.suspendedCtx.restore();\n copyCtxState(this.suspendedCtx, this.ctx);\n } else {\n this.ctx.restore();\n }\n this.checkSMaskState();\n this.pendingClip = null;\n this._cachedScaleForStroking[0] = -1;\n this._cachedGetSinglePixelWidth = null;\n }\n }\n transform(a, b, c, d, e, f) {\n this.ctx.transform(a, b, c, d, e, f);\n this._cachedScaleForStroking[0] = -1;\n this._cachedGetSinglePixelWidth = null;\n }\n constructPath(ops, args, minMax) {\n const ctx = this.ctx;\n const current = this.current;\n let x = current.x,\n y = current.y;\n let startX, startY;\n const currentTransform = getCurrentTransform(ctx);\n const isScalingMatrix = currentTransform[0] === 0 && currentTransform[3] === 0 || currentTransform[1] === 0 && currentTransform[2] === 0;\n const minMaxForBezier = isScalingMatrix ? minMax.slice(0) : null;\n for (let i = 0, j = 0, ii = ops.length; i < ii; i++) {\n switch (ops[i] | 0) {\n case OPS.rectangle:\n x = args[j++];\n y = args[j++];\n const width = args[j++];\n const height = args[j++];\n const xw = x + width;\n const yh = y + height;\n ctx.moveTo(x, y);\n if (width === 0 || height === 0) {\n ctx.lineTo(xw, yh);\n } else {\n ctx.lineTo(xw, y);\n ctx.lineTo(xw, yh);\n ctx.lineTo(x, yh);\n }\n if (!isScalingMatrix) {\n current.updateRectMinMax(currentTransform, [x, y, xw, yh]);\n }\n ctx.closePath();\n break;\n case OPS.moveTo:\n x = args[j++];\n y = args[j++];\n ctx.moveTo(x, y);\n if (!isScalingMatrix) {\n current.updatePathMinMax(currentTransform, x, y);\n }\n break;\n case OPS.lineTo:\n x = args[j++];\n y = args[j++];\n ctx.lineTo(x, y);\n if (!isScalingMatrix) {\n current.updatePathMinMax(currentTransform, x, y);\n }\n break;\n case OPS.curveTo:\n startX = x;\n startY = y;\n x = args[j + 4];\n y = args[j + 5];\n ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3], x, y);\n current.updateCurvePathMinMax(currentTransform, startX, startY, args[j], args[j + 1], args[j + 2], args[j + 3], x, y, minMaxForBezier);\n j += 6;\n break;\n case OPS.curveTo2:\n startX = x;\n startY = y;\n ctx.bezierCurveTo(x, y, args[j], args[j + 1], args[j + 2], args[j + 3]);\n current.updateCurvePathMinMax(currentTransform, startX, startY, x, y, args[j], args[j + 1], args[j + 2], args[j + 3], minMaxForBezier);\n x = args[j + 2];\n y = args[j + 3];\n j += 4;\n break;\n case OPS.curveTo3:\n startX = x;\n startY = y;\n x = args[j + 2];\n y = args[j + 3];\n ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);\n current.updateCurvePathMinMax(currentTransform, startX, startY, args[j], args[j + 1], x, y, x, y, minMaxForBezier);\n j += 4;\n break;\n case OPS.closePath:\n ctx.closePath();\n break;\n }\n }\n if (isScalingMatrix) {\n current.updateScalingPathMinMax(currentTransform, minMaxForBezier);\n }\n current.setCurrentPoint(x, y);\n }\n closePath() {\n this.ctx.closePath();\n }\n stroke(consumePath = true) {\n const ctx = this.ctx;\n const strokeColor = this.current.strokeColor;\n ctx.globalAlpha = this.current.strokeAlpha;\n if (this.contentVisible) {\n if (typeof strokeColor === \"object\" && strokeColor?.getPattern) {\n ctx.save();\n ctx.strokeStyle = strokeColor.getPattern(ctx, this, getCurrentTransformInverse(ctx), PathType.STROKE);\n this.rescaleAndStroke(false);\n ctx.restore();\n } else {\n this.rescaleAndStroke(true);\n }\n }\n if (consumePath) {\n this.consumePath(this.current.getClippedPathBoundingBox());\n }\n ctx.globalAlpha = this.current.fillAlpha;\n }\n closeStroke() {\n this.closePath();\n this.stroke();\n }\n fill(consumePath = true) {\n const ctx = this.ctx;\n const fillColor = this.current.fillColor;\n const isPatternFill = this.current.patternFill;\n let needRestore = false;\n if (isPatternFill) {\n ctx.save();\n ctx.fillStyle = fillColor.getPattern(ctx, this, getCurrentTransformInverse(ctx), PathType.FILL);\n needRestore = true;\n }\n const intersect = this.current.getClippedPathBoundingBox();\n if (this.contentVisible && intersect !== null) {\n if (this.pendingEOFill) {\n ctx.fill(\"evenodd\");\n this.pendingEOFill = false;\n } else {\n ctx.fill();\n }\n }\n if (needRestore) {\n ctx.restore();\n }\n if (consumePath) {\n this.consumePath(intersect);\n }\n }\n eoFill() {\n this.pendingEOFill = true;\n this.fill();\n }\n fillStroke() {\n this.fill(false);\n this.stroke(false);\n this.consumePath();\n }\n eoFillStroke() {\n this.pendingEOFill = true;\n this.fillStroke();\n }\n closeFillStroke() {\n this.closePath();\n this.fillStroke();\n }\n closeEOFillStroke() {\n this.pendingEOFill = true;\n this.closePath();\n this.fillStroke();\n }\n endPath() {\n this.consumePath();\n }\n clip() {\n this.pendingClip = NORMAL_CLIP;\n }\n eoClip() {\n this.pendingClip = EO_CLIP;\n }\n beginText() {\n this.current.textMatrix = IDENTITY_MATRIX;\n this.current.textMatrixScale = 1;\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n }\n endText() {\n const paths = this.pendingTextPaths;\n const ctx = this.ctx;\n if (paths === undefined) {\n ctx.beginPath();\n return;\n }\n ctx.save();\n ctx.beginPath();\n for (const path of paths) {\n ctx.setTransform(...path.transform);\n ctx.translate(path.x, path.y);\n path.addToPath(ctx, path.fontSize);\n }\n ctx.restore();\n ctx.clip();\n ctx.beginPath();\n delete this.pendingTextPaths;\n }\n setCharSpacing(spacing) {\n this.current.charSpacing = spacing;\n }\n setWordSpacing(spacing) {\n this.current.wordSpacing = spacing;\n }\n setHScale(scale) {\n this.current.textHScale = scale / 100;\n }\n setLeading(leading) {\n this.current.leading = -leading;\n }\n setFont(fontRefName, size) {\n const fontObj = this.commonObjs.get(fontRefName);\n const current = this.current;\n if (!fontObj) {\n throw new Error(`Can't find font for ${fontRefName}`);\n }\n current.fontMatrix = fontObj.fontMatrix || FONT_IDENTITY_MATRIX;\n if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) {\n warn(\"Invalid font matrix for font \" + fontRefName);\n }\n if (size < 0) {\n size = -size;\n current.fontDirection = -1;\n } else {\n current.fontDirection = 1;\n }\n this.current.font = fontObj;\n this.current.fontSize = size;\n if (fontObj.isType3Font) {\n return;\n }\n const name = fontObj.loadedName || \"sans-serif\";\n const typeface = fontObj.systemFontInfo?.css || `\"${name}\", ${fontObj.fallbackName}`;\n let bold = \"normal\";\n if (fontObj.black) {\n bold = \"900\";\n } else if (fontObj.bold) {\n bold = \"bold\";\n }\n const italic = fontObj.italic ? \"italic\" : \"normal\";\n let browserFontSize = size;\n if (size < MIN_FONT_SIZE) {\n browserFontSize = MIN_FONT_SIZE;\n } else if (size > MAX_FONT_SIZE) {\n browserFontSize = MAX_FONT_SIZE;\n }\n this.current.fontSizeScale = size / browserFontSize;\n this.ctx.font = `${italic} ${bold} ${browserFontSize}px ${typeface}`;\n }\n setTextRenderingMode(mode) {\n this.current.textRenderingMode = mode;\n }\n setTextRise(rise) {\n this.current.textRise = rise;\n }\n moveText(x, y) {\n this.current.x = this.current.lineX += x;\n this.current.y = this.current.lineY += y;\n }\n setLeadingMoveText(x, y) {\n this.setLeading(-y);\n this.moveText(x, y);\n }\n setTextMatrix(a, b, c, d, e, f) {\n this.current.textMatrix = [a, b, c, d, e, f];\n this.current.textMatrixScale = Math.hypot(a, b);\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n }\n nextLine() {\n this.moveText(0, this.current.leading);\n }\n paintChar(character, x, y, patternTransform) {\n const ctx = this.ctx;\n const current = this.current;\n const font = current.font;\n const textRenderingMode = current.textRenderingMode;\n const fontSize = current.fontSize / current.fontSizeScale;\n const fillStrokeMode = textRenderingMode & TextRenderingMode.FILL_STROKE_MASK;\n const isAddToPathSet = !!(textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG);\n const patternFill = current.patternFill && !font.missingFile;\n let addToPath;\n if (font.disableFontFace || isAddToPathSet || patternFill) {\n addToPath = font.getPathGenerator(this.commonObjs, character);\n }\n if (font.disableFontFace || patternFill) {\n ctx.save();\n ctx.translate(x, y);\n ctx.beginPath();\n addToPath(ctx, fontSize);\n if (patternTransform) {\n ctx.setTransform(...patternTransform);\n }\n if (fillStrokeMode === TextRenderingMode.FILL || fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n ctx.fill();\n }\n if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n ctx.stroke();\n }\n ctx.restore();\n } else {\n if (fillStrokeMode === TextRenderingMode.FILL || fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n ctx.fillText(character, x, y);\n }\n if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n ctx.strokeText(character, x, y);\n }\n }\n if (isAddToPathSet) {\n const paths = this.pendingTextPaths ||= [];\n paths.push({\n transform: getCurrentTransform(ctx),\n x,\n y,\n fontSize,\n addToPath\n });\n }\n }\n get isFontSubpixelAAEnabled() {\n const {\n context: ctx\n } = this.cachedCanvases.getCanvas(\"isFontSubpixelAAEnabled\", 10, 10);\n ctx.scale(1.5, 1);\n ctx.fillText(\"I\", 0, 10);\n const data = ctx.getImageData(0, 0, 10, 10).data;\n let enabled = false;\n for (let i = 3; i < data.length; i += 4) {\n if (data[i] > 0 && data[i] < 255) {\n enabled = true;\n break;\n }\n }\n return shadow(this, \"isFontSubpixelAAEnabled\", enabled);\n }\n showText(glyphs) {\n const current = this.current;\n const font = current.font;\n if (font.isType3Font) {\n return this.showType3Text(glyphs);\n }\n const fontSize = current.fontSize;\n if (fontSize === 0) {\n return undefined;\n }\n const ctx = this.ctx;\n const fontSizeScale = current.fontSizeScale;\n const charSpacing = current.charSpacing;\n const wordSpacing = current.wordSpacing;\n const fontDirection = current.fontDirection;\n const textHScale = current.textHScale * fontDirection;\n const glyphsLength = glyphs.length;\n const vertical = font.vertical;\n const spacingDir = vertical ? 1 : -1;\n const defaultVMetrics = font.defaultVMetrics;\n const widthAdvanceScale = fontSize * current.fontMatrix[0];\n const simpleFillText = current.textRenderingMode === TextRenderingMode.FILL && !font.disableFontFace && !current.patternFill;\n ctx.save();\n ctx.transform(...current.textMatrix);\n ctx.translate(current.x, current.y + current.textRise);\n if (fontDirection > 0) {\n ctx.scale(textHScale, -1);\n } else {\n ctx.scale(textHScale, 1);\n }\n let patternTransform;\n if (current.patternFill) {\n ctx.save();\n const pattern = current.fillColor.getPattern(ctx, this, getCurrentTransformInverse(ctx), PathType.FILL);\n patternTransform = getCurrentTransform(ctx);\n ctx.restore();\n ctx.fillStyle = pattern;\n }\n let lineWidth = current.lineWidth;\n const scale = current.textMatrixScale;\n if (scale === 0 || lineWidth === 0) {\n const fillStrokeMode = current.textRenderingMode & TextRenderingMode.FILL_STROKE_MASK;\n if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) {\n lineWidth = this.getSinglePixelWidth();\n }\n } else {\n lineWidth /= scale;\n }\n if (fontSizeScale !== 1.0) {\n ctx.scale(fontSizeScale, fontSizeScale);\n lineWidth /= fontSizeScale;\n }\n ctx.lineWidth = lineWidth;\n if (font.isInvalidPDFjsFont) {\n const chars = [];\n let width = 0;\n for (const glyph of glyphs) {\n chars.push(glyph.unicode);\n width += glyph.width;\n }\n ctx.fillText(chars.join(\"\"), 0, 0);\n current.x += width * widthAdvanceScale * textHScale;\n ctx.restore();\n this.compose();\n return undefined;\n }\n let x = 0,\n i;\n for (i = 0; i < glyphsLength; ++i) {\n const glyph = glyphs[i];\n if (typeof glyph === \"number\") {\n x += spacingDir * glyph * fontSize / 1000;\n continue;\n }\n let restoreNeeded = false;\n const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n const character = glyph.fontChar;\n const accent = glyph.accent;\n let scaledX, scaledY;\n let width = glyph.width;\n if (vertical) {\n const vmetric = glyph.vmetric || defaultVMetrics;\n const vx = -(glyph.vmetric ? vmetric[1] : width * 0.5) * widthAdvanceScale;\n const vy = vmetric[2] * widthAdvanceScale;\n width = vmetric ? -vmetric[0] : width;\n scaledX = vx / fontSizeScale;\n scaledY = (x + vy) / fontSizeScale;\n } else {\n scaledX = x / fontSizeScale;\n scaledY = 0;\n }\n if (font.remeasure && width > 0) {\n const measuredWidth = ctx.measureText(character).width * 1000 / fontSize * fontSizeScale;\n if (width < measuredWidth && this.isFontSubpixelAAEnabled) {\n const characterScaleX = width / measuredWidth;\n restoreNeeded = true;\n ctx.save();\n ctx.scale(characterScaleX, 1);\n scaledX /= characterScaleX;\n } else if (width !== measuredWidth) {\n scaledX += (width - measuredWidth) / 2000 * fontSize / fontSizeScale;\n }\n }\n if (this.contentVisible && (glyph.isInFont || font.missingFile)) {\n if (simpleFillText && !accent) {\n ctx.fillText(character, scaledX, scaledY);\n } else {\n this.paintChar(character, scaledX, scaledY, patternTransform);\n if (accent) {\n const scaledAccentX = scaledX + fontSize * accent.offset.x / fontSizeScale;\n const scaledAccentY = scaledY - fontSize * accent.offset.y / fontSizeScale;\n this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY, patternTransform);\n }\n }\n }\n const charWidth = vertical ? width * widthAdvanceScale - spacing * fontDirection : width * widthAdvanceScale + spacing * fontDirection;\n x += charWidth;\n if (restoreNeeded) {\n ctx.restore();\n }\n }\n if (vertical) {\n current.y -= x;\n } else {\n current.x += x * textHScale;\n }\n ctx.restore();\n this.compose();\n return undefined;\n }\n showType3Text(glyphs) {\n const ctx = this.ctx;\n const current = this.current;\n const font = current.font;\n const fontSize = current.fontSize;\n const fontDirection = current.fontDirection;\n const spacingDir = font.vertical ? 1 : -1;\n const charSpacing = current.charSpacing;\n const wordSpacing = current.wordSpacing;\n const textHScale = current.textHScale * fontDirection;\n const fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX;\n const glyphsLength = glyphs.length;\n const isTextInvisible = current.textRenderingMode === TextRenderingMode.INVISIBLE;\n let i, glyph, width, spacingLength;\n if (isTextInvisible || fontSize === 0) {\n return;\n }\n this._cachedScaleForStroking[0] = -1;\n this._cachedGetSinglePixelWidth = null;\n ctx.save();\n ctx.transform(...current.textMatrix);\n ctx.translate(current.x, current.y);\n ctx.scale(textHScale, fontDirection);\n for (i = 0; i < glyphsLength; ++i) {\n glyph = glyphs[i];\n if (typeof glyph === \"number\") {\n spacingLength = spacingDir * glyph * fontSize / 1000;\n this.ctx.translate(spacingLength, 0);\n current.x += spacingLength * textHScale;\n continue;\n }\n const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n const operatorList = font.charProcOperatorList[glyph.operatorListId];\n if (!operatorList) {\n warn(`Type3 character \"${glyph.operatorListId}\" is not available.`);\n continue;\n }\n if (this.contentVisible) {\n this.processingType3 = glyph;\n this.save();\n ctx.scale(fontSize, fontSize);\n ctx.transform(...fontMatrix);\n this.executeOperatorList(operatorList);\n this.restore();\n }\n const transformed = Util.applyTransform([glyph.width, 0], fontMatrix);\n width = transformed[0] * fontSize + spacing;\n ctx.translate(width, 0);\n current.x += width * textHScale;\n }\n ctx.restore();\n this.processingType3 = null;\n }\n setCharWidth(xWidth, yWidth) {}\n setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) {\n this.ctx.rect(llx, lly, urx - llx, ury - lly);\n this.ctx.clip();\n this.endPath();\n }\n getColorN_Pattern(IR) {\n let pattern;\n if (IR[0] === \"TilingPattern\") {\n const color = IR[1];\n const baseTransform = this.baseTransform || getCurrentTransform(this.ctx);\n const canvasGraphicsFactory = {\n createCanvasGraphics: ctx => new CanvasGraphics(ctx, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {\n optionalContentConfig: this.optionalContentConfig,\n markedContentStack: this.markedContentStack\n })\n };\n pattern = new TilingPattern(IR, color, this.ctx, canvasGraphicsFactory, baseTransform);\n } else {\n pattern = this._getPattern(IR[1], IR[2]);\n }\n return pattern;\n }\n setStrokeColorN() {\n this.current.strokeColor = this.getColorN_Pattern(arguments);\n }\n setFillColorN() {\n this.current.fillColor = this.getColorN_Pattern(arguments);\n this.current.patternFill = true;\n }\n setStrokeRGBColor(r, g, b) {\n this.ctx.strokeStyle = this.current.strokeColor = Util.makeHexColor(r, g, b);\n }\n setStrokeTransparent() {\n this.ctx.strokeStyle = this.current.strokeColor = \"transparent\";\n }\n setFillRGBColor(r, g, b) {\n this.ctx.fillStyle = this.current.fillColor = Util.makeHexColor(r, g, b);\n this.current.patternFill = false;\n }\n setFillTransparent() {\n this.ctx.fillStyle = this.current.fillColor = \"transparent\";\n this.current.patternFill = false;\n }\n _getPattern(objId, matrix = null) {\n let pattern;\n if (this.cachedPatterns.has(objId)) {\n pattern = this.cachedPatterns.get(objId);\n } else {\n pattern = getShadingPattern(this.getObject(objId));\n this.cachedPatterns.set(objId, pattern);\n }\n if (matrix) {\n pattern.matrix = matrix;\n }\n return pattern;\n }\n shadingFill(objId) {\n if (!this.contentVisible) {\n return;\n }\n const ctx = this.ctx;\n this.save();\n const pattern = this._getPattern(objId);\n ctx.fillStyle = pattern.getPattern(ctx, this, getCurrentTransformInverse(ctx), PathType.SHADING);\n const inv = getCurrentTransformInverse(ctx);\n if (inv) {\n const {\n width,\n height\n } = ctx.canvas;\n const [x0, y0, x1, y1] = Util.getAxialAlignedBoundingBox([0, 0, width, height], inv);\n this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);\n } else {\n this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);\n }\n this.compose(this.current.getClippedPathBoundingBox());\n this.restore();\n }\n beginInlineImage() {\n unreachable(\"Should not call beginInlineImage\");\n }\n beginImageData() {\n unreachable(\"Should not call beginImageData\");\n }\n paintFormXObjectBegin(matrix, bbox) {\n if (!this.contentVisible) {\n return;\n }\n this.save();\n this.baseTransformStack.push(this.baseTransform);\n if (matrix) {\n this.transform(...matrix);\n }\n this.baseTransform = getCurrentTransform(this.ctx);\n if (bbox) {\n const width = bbox[2] - bbox[0];\n const height = bbox[3] - bbox[1];\n this.ctx.rect(bbox[0], bbox[1], width, height);\n this.current.updateRectMinMax(getCurrentTransform(this.ctx), bbox);\n this.clip();\n this.endPath();\n }\n }\n paintFormXObjectEnd() {\n if (!this.contentVisible) {\n return;\n }\n this.restore();\n this.baseTransform = this.baseTransformStack.pop();\n }\n beginGroup(group) {\n if (!this.contentVisible) {\n return;\n }\n this.save();\n if (this.inSMaskMode) {\n this.endSMaskMode();\n this.current.activeSMask = null;\n }\n const currentCtx = this.ctx;\n if (!group.isolated) {\n info(\"TODO: Support non-isolated groups.\");\n }\n if (group.knockout) {\n warn(\"Knockout groups not supported.\");\n }\n const currentTransform = getCurrentTransform(currentCtx);\n if (group.matrix) {\n currentCtx.transform(...group.matrix);\n }\n if (!group.bbox) {\n throw new Error(\"Bounding box is required.\");\n }\n let bounds = Util.getAxialAlignedBoundingBox(group.bbox, getCurrentTransform(currentCtx));\n const canvasBounds = [0, 0, currentCtx.canvas.width, currentCtx.canvas.height];\n bounds = Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];\n const offsetX = Math.floor(bounds[0]);\n const offsetY = Math.floor(bounds[1]);\n const drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);\n const drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);\n this.current.startNewPathAndClipBox([0, 0, drawnWidth, drawnHeight]);\n let cacheId = \"groupAt\" + this.groupLevel;\n if (group.smask) {\n cacheId += \"_smask_\" + this.smaskCounter++ % 2;\n }\n const scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight);\n const groupCtx = scratchCanvas.context;\n groupCtx.translate(-offsetX, -offsetY);\n groupCtx.transform(...currentTransform);\n if (group.smask) {\n this.smaskStack.push({\n canvas: scratchCanvas.canvas,\n context: groupCtx,\n offsetX,\n offsetY,\n subtype: group.smask.subtype,\n backdrop: group.smask.backdrop,\n transferMap: group.smask.transferMap || null,\n startTransformInverse: null\n });\n } else {\n currentCtx.setTransform(1, 0, 0, 1, 0, 0);\n currentCtx.translate(offsetX, offsetY);\n currentCtx.save();\n }\n copyCtxState(currentCtx, groupCtx);\n this.ctx = groupCtx;\n this.setGState([[\"BM\", \"source-over\"], [\"ca\", 1], [\"CA\", 1]]);\n this.groupStack.push(currentCtx);\n this.groupLevel++;\n }\n endGroup(group) {\n if (!this.contentVisible) {\n return;\n }\n this.groupLevel--;\n const groupCtx = this.ctx;\n const ctx = this.groupStack.pop();\n this.ctx = ctx;\n this.ctx.imageSmoothingEnabled = false;\n if (group.smask) {\n this.tempSMask = this.smaskStack.pop();\n this.restore();\n } else {\n this.ctx.restore();\n const currentMtx = getCurrentTransform(this.ctx);\n this.restore();\n this.ctx.save();\n this.ctx.setTransform(...currentMtx);\n const dirtyBox = Util.getAxialAlignedBoundingBox([0, 0, groupCtx.canvas.width, groupCtx.canvas.height], currentMtx);\n this.ctx.drawImage(groupCtx.canvas, 0, 0);\n this.ctx.restore();\n this.compose(dirtyBox);\n }\n }\n beginAnnotation(id, rect, transform, matrix, hasOwnCanvas) {\n this.#restoreInitialState();\n resetCtxToDefault(this.ctx);\n this.ctx.save();\n this.save();\n if (this.baseTransform) {\n this.ctx.setTransform(...this.baseTransform);\n }\n if (rect) {\n const width = rect[2] - rect[0];\n const height = rect[3] - rect[1];\n if (hasOwnCanvas && this.annotationCanvasMap) {\n transform = transform.slice();\n transform[4] -= rect[0];\n transform[5] -= rect[1];\n rect = rect.slice();\n rect[0] = rect[1] = 0;\n rect[2] = width;\n rect[3] = height;\n const [scaleX, scaleY] = Util.singularValueDecompose2dScale(getCurrentTransform(this.ctx));\n const {\n viewportScale\n } = this;\n const canvasWidth = Math.ceil(width * this.outputScaleX * viewportScale);\n const canvasHeight = Math.ceil(height * this.outputScaleY * viewportScale);\n this.annotationCanvas = this.canvasFactory.create(canvasWidth, canvasHeight);\n const {\n canvas,\n context\n } = this.annotationCanvas;\n this.annotationCanvasMap.set(id, canvas);\n this.annotationCanvas.savedCtx = this.ctx;\n this.ctx = context;\n this.ctx.save();\n this.ctx.setTransform(scaleX, 0, 0, -scaleY, 0, height * scaleY);\n resetCtxToDefault(this.ctx);\n } else {\n resetCtxToDefault(this.ctx);\n this.endPath();\n this.ctx.rect(rect[0], rect[1], width, height);\n this.ctx.clip();\n this.ctx.beginPath();\n }\n }\n this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height);\n this.transform(...transform);\n this.transform(...matrix);\n }\n endAnnotation() {\n if (this.annotationCanvas) {\n this.ctx.restore();\n this.#drawFilter();\n this.ctx = this.annotationCanvas.savedCtx;\n delete this.annotationCanvas.savedCtx;\n delete this.annotationCanvas;\n }\n }\n paintImageMaskXObject(img) {\n if (!this.contentVisible) {\n return;\n }\n const count = img.count;\n img = this.getObject(img.data, img);\n img.count = count;\n const ctx = this.ctx;\n const glyph = this.processingType3;\n if (glyph) {\n if (glyph.compiled === undefined) {\n glyph.compiled = compileType3Glyph(img);\n }\n if (glyph.compiled) {\n glyph.compiled(ctx);\n return;\n }\n }\n const mask = this._createMaskCanvas(img);\n const maskCanvas = mask.canvas;\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(maskCanvas, mask.offsetX, mask.offsetY);\n ctx.restore();\n this.compose();\n }\n paintImageMaskXObjectRepeat(img, scaleX, skewX = 0, skewY = 0, scaleY, positions) {\n if (!this.contentVisible) {\n return;\n }\n img = this.getObject(img.data, img);\n const ctx = this.ctx;\n ctx.save();\n const currentTransform = getCurrentTransform(ctx);\n ctx.transform(scaleX, skewX, skewY, scaleY, 0, 0);\n const mask = this._createMaskCanvas(img);\n ctx.setTransform(1, 0, 0, 1, mask.offsetX - currentTransform[4], mask.offsetY - currentTransform[5]);\n for (let i = 0, ii = positions.length; i < ii; i += 2) {\n const trans = Util.transform(currentTransform, [scaleX, skewX, skewY, scaleY, positions[i], positions[i + 1]]);\n const [x, y] = Util.applyTransform([0, 0], trans);\n ctx.drawImage(mask.canvas, x, y);\n }\n ctx.restore();\n this.compose();\n }\n paintImageMaskXObjectGroup(images) {\n if (!this.contentVisible) {\n return;\n }\n const ctx = this.ctx;\n const fillColor = this.current.fillColor;\n const isPatternFill = this.current.patternFill;\n for (const image of images) {\n const {\n data,\n width,\n height,\n transform\n } = image;\n const maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height);\n const maskCtx = maskCanvas.context;\n maskCtx.save();\n const img = this.getObject(data, image);\n putBinaryImageMask(maskCtx, img);\n maskCtx.globalCompositeOperation = \"source-in\";\n maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this, getCurrentTransformInverse(ctx), PathType.FILL) : fillColor;\n maskCtx.fillRect(0, 0, width, height);\n maskCtx.restore();\n ctx.save();\n ctx.transform(...transform);\n ctx.scale(1, -1);\n drawImageAtIntegerCoords(ctx, maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1);\n ctx.restore();\n }\n this.compose();\n }\n paintImageXObject(objId) {\n if (!this.contentVisible) {\n return;\n }\n const imgData = this.getObject(objId);\n if (!imgData) {\n warn(\"Dependent image isn't ready yet\");\n return;\n }\n this.paintInlineImageXObject(imgData);\n }\n paintImageXObjectRepeat(objId, scaleX, scaleY, positions) {\n if (!this.contentVisible) {\n return;\n }\n const imgData = this.getObject(objId);\n if (!imgData) {\n warn(\"Dependent image isn't ready yet\");\n return;\n }\n const width = imgData.width;\n const height = imgData.height;\n const map = [];\n for (let i = 0, ii = positions.length; i < ii; i += 2) {\n map.push({\n transform: [scaleX, 0, 0, scaleY, positions[i], positions[i + 1]],\n x: 0,\n y: 0,\n w: width,\n h: height\n });\n }\n this.paintInlineImageXObjectGroup(imgData, map);\n }\n applyTransferMapsToCanvas(ctx) {\n if (this.current.transferMaps !== \"none\") {\n ctx.filter = this.current.transferMaps;\n ctx.drawImage(ctx.canvas, 0, 0);\n ctx.filter = \"none\";\n }\n return ctx.canvas;\n }\n applyTransferMapsToBitmap(imgData) {\n if (this.current.transferMaps === \"none\") {\n return imgData.bitmap;\n }\n const {\n bitmap,\n width,\n height\n } = imgData;\n const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", width, height);\n const tmpCtx = tmpCanvas.context;\n tmpCtx.filter = this.current.transferMaps;\n tmpCtx.drawImage(bitmap, 0, 0);\n tmpCtx.filter = \"none\";\n return tmpCanvas.canvas;\n }\n paintInlineImageXObject(imgData) {\n if (!this.contentVisible) {\n return;\n }\n const width = imgData.width;\n const height = imgData.height;\n const ctx = this.ctx;\n this.save();\n if (!isNodeJS) {\n const {\n filter\n } = ctx;\n if (filter !== \"none\" && filter !== \"\") {\n ctx.filter = \"none\";\n }\n }\n ctx.scale(1 / width, -1 / height);\n let imgToPaint;\n if (imgData.bitmap) {\n imgToPaint = this.applyTransferMapsToBitmap(imgData);\n } else if (typeof HTMLElement === \"function\" && imgData instanceof HTMLElement || !imgData.data) {\n imgToPaint = imgData;\n } else {\n const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", width, height);\n const tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData);\n imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n }\n const scaled = this._scaleImage(imgToPaint, getCurrentTransformInverse(ctx));\n ctx.imageSmoothingEnabled = getImageSmoothingEnabled(getCurrentTransform(ctx), imgData.interpolate);\n drawImageAtIntegerCoords(ctx, scaled.img, 0, 0, scaled.paintWidth, scaled.paintHeight, 0, -height, width, height);\n this.compose();\n this.restore();\n }\n paintInlineImageXObjectGroup(imgData, map) {\n if (!this.contentVisible) {\n return;\n }\n const ctx = this.ctx;\n let imgToPaint;\n if (imgData.bitmap) {\n imgToPaint = imgData.bitmap;\n } else {\n const w = imgData.width;\n const h = imgData.height;\n const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", w, h);\n const tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData);\n imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n }\n for (const entry of map) {\n ctx.save();\n ctx.transform(...entry.transform);\n ctx.scale(1, -1);\n drawImageAtIntegerCoords(ctx, imgToPaint, entry.x, entry.y, entry.w, entry.h, 0, -1, 1, 1);\n ctx.restore();\n }\n this.compose();\n }\n paintSolidColorImageMask() {\n if (!this.contentVisible) {\n return;\n }\n this.ctx.fillRect(0, 0, 1, 1);\n this.compose();\n }\n markPoint(tag) {}\n markPointProps(tag, properties) {}\n beginMarkedContent(tag) {\n this.markedContentStack.push({\n visible: true\n });\n }\n beginMarkedContentProps(tag, properties) {\n if (tag === \"OC\") {\n this.markedContentStack.push({\n visible: this.optionalContentConfig.isVisible(properties)\n });\n } else {\n this.markedContentStack.push({\n visible: true\n });\n }\n this.contentVisible = this.isContentVisible();\n }\n endMarkedContent() {\n this.markedContentStack.pop();\n this.contentVisible = this.isContentVisible();\n }\n beginCompat() {}\n endCompat() {}\n consumePath(clipBox) {\n const isEmpty = this.current.isEmptyClip();\n if (this.pendingClip) {\n this.current.updateClipFromPath();\n }\n if (!this.pendingClip) {\n this.compose(clipBox);\n }\n const ctx = this.ctx;\n if (this.pendingClip) {\n if (!isEmpty) {\n if (this.pendingClip === EO_CLIP) {\n ctx.clip(\"evenodd\");\n } else {\n ctx.clip();\n }\n }\n this.pendingClip = null;\n }\n this.current.startNewPathAndClipBox(this.current.clipBox);\n ctx.beginPath();\n }\n getSinglePixelWidth() {\n if (!this._cachedGetSinglePixelWidth) {\n const m = getCurrentTransform(this.ctx);\n if (m[1] === 0 && m[2] === 0) {\n this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(m[0]), Math.abs(m[3]));\n } else {\n const absDet = Math.abs(m[0] * m[3] - m[2] * m[1]);\n const normX = Math.hypot(m[0], m[2]);\n const normY = Math.hypot(m[1], m[3]);\n this._cachedGetSinglePixelWidth = Math.max(normX, normY) / absDet;\n }\n }\n return this._cachedGetSinglePixelWidth;\n }\n getScaleForStroking() {\n if (this._cachedScaleForStroking[0] === -1) {\n const {\n lineWidth\n } = this.current;\n const {\n a,\n b,\n c,\n d\n } = this.ctx.getTransform();\n let scaleX, scaleY;\n if (b === 0 && c === 0) {\n const normX = Math.abs(a);\n const normY = Math.abs(d);\n if (normX === normY) {\n if (lineWidth === 0) {\n scaleX = scaleY = 1 / normX;\n } else {\n const scaledLineWidth = normX * lineWidth;\n scaleX = scaleY = scaledLineWidth < 1 ? 1 / scaledLineWidth : 1;\n }\n } else if (lineWidth === 0) {\n scaleX = 1 / normX;\n scaleY = 1 / normY;\n } else {\n const scaledXLineWidth = normX * lineWidth;\n const scaledYLineWidth = normY * lineWidth;\n scaleX = scaledXLineWidth < 1 ? 1 / scaledXLineWidth : 1;\n scaleY = scaledYLineWidth < 1 ? 1 / scaledYLineWidth : 1;\n }\n } else {\n const absDet = Math.abs(a * d - b * c);\n const normX = Math.hypot(a, b);\n const normY = Math.hypot(c, d);\n if (lineWidth === 0) {\n scaleX = normY / absDet;\n scaleY = normX / absDet;\n } else {\n const baseArea = lineWidth * absDet;\n scaleX = normY > baseArea ? normY / baseArea : 1;\n scaleY = normX > baseArea ? normX / baseArea : 1;\n }\n }\n this._cachedScaleForStroking[0] = scaleX;\n this._cachedScaleForStroking[1] = scaleY;\n }\n return this._cachedScaleForStroking;\n }\n rescaleAndStroke(saveRestore) {\n const {\n ctx\n } = this;\n const {\n lineWidth\n } = this.current;\n const [scaleX, scaleY] = this.getScaleForStroking();\n ctx.lineWidth = lineWidth || 1;\n if (scaleX === 1 && scaleY === 1) {\n ctx.stroke();\n return;\n }\n const dashes = ctx.getLineDash();\n if (saveRestore) {\n ctx.save();\n }\n ctx.scale(scaleX, scaleY);\n if (dashes.length > 0) {\n const scale = Math.max(scaleX, scaleY);\n ctx.setLineDash(dashes.map(x => x / scale));\n ctx.lineDashOffset /= scale;\n }\n ctx.stroke();\n if (saveRestore) {\n ctx.restore();\n }\n }\n isContentVisible() {\n for (let i = this.markedContentStack.length - 1; i >= 0; i--) {\n if (!this.markedContentStack[i].visible) {\n return false;\n }\n }\n return true;\n }\n}\nfor (const op in OPS) {\n if (CanvasGraphics.prototype[op] !== undefined) {\n CanvasGraphics.prototype[OPS[op]] = CanvasGraphics.prototype[op];\n }\n}\n\n;// ./src/display/worker_options.js\nclass GlobalWorkerOptions {\n static #port = null;\n static #src = \"\";\n static get workerPort() {\n return this.#port;\n }\n static set workerPort(val) {\n if (!(typeof Worker !== \"undefined\" && val instanceof Worker) && val !== null) {\n throw new Error(\"Invalid `workerPort` type.\");\n }\n this.#port = val;\n }\n static get workerSrc() {\n return this.#src;\n }\n static set workerSrc(val) {\n if (typeof val !== \"string\") {\n throw new Error(\"Invalid `workerSrc` type.\");\n }\n this.#src = val;\n }\n}\n\n;// ./src/shared/message_handler.js\n\n\nconst CallbackKind = {\n UNKNOWN: 0,\n DATA: 1,\n ERROR: 2\n};\nconst StreamKind = {\n UNKNOWN: 0,\n CANCEL: 1,\n CANCEL_COMPLETE: 2,\n CLOSE: 3,\n ENQUEUE: 4,\n ERROR: 5,\n PULL: 6,\n PULL_COMPLETE: 7,\n START_COMPLETE: 8\n};\nfunction wrapReason(reason) {\n if (!(reason instanceof Error || typeof reason === \"object\" && reason !== null)) {\n unreachable('wrapReason: Expected \"reason\" to be a (possibly cloned) Error.');\n }\n switch (reason.name) {\n case \"AbortException\":\n return new AbortException(reason.message);\n case \"MissingPDFException\":\n return new MissingPDFException(reason.message);\n case \"PasswordException\":\n return new PasswordException(reason.message, reason.code);\n case \"UnexpectedResponseException\":\n return new UnexpectedResponseException(reason.message, reason.status);\n case \"UnknownErrorException\":\n return new UnknownErrorException(reason.message, reason.details);\n default:\n return new UnknownErrorException(reason.message, reason.toString());\n }\n}\nclass MessageHandler {\n constructor(sourceName, targetName, comObj) {\n this.sourceName = sourceName;\n this.targetName = targetName;\n this.comObj = comObj;\n this.callbackId = 1;\n this.streamId = 1;\n this.streamSinks = Object.create(null);\n this.streamControllers = Object.create(null);\n this.callbackCapabilities = Object.create(null);\n this.actionHandler = Object.create(null);\n this._onComObjOnMessage = event => {\n const data = event.data;\n if (data.targetName !== this.sourceName) {\n return;\n }\n if (data.stream) {\n this.#processStreamMessage(data);\n return;\n }\n if (data.callback) {\n const callbackId = data.callbackId;\n const capability = this.callbackCapabilities[callbackId];\n if (!capability) {\n throw new Error(`Cannot resolve callback ${callbackId}`);\n }\n delete this.callbackCapabilities[callbackId];\n if (data.callback === CallbackKind.DATA) {\n capability.resolve(data.data);\n } else if (data.callback === CallbackKind.ERROR) {\n capability.reject(wrapReason(data.reason));\n } else {\n throw new Error(\"Unexpected callback case\");\n }\n return;\n }\n const action = this.actionHandler[data.action];\n if (!action) {\n throw new Error(`Unknown action from worker: ${data.action}`);\n }\n if (data.callbackId) {\n const cbSourceName = this.sourceName;\n const cbTargetName = data.sourceName;\n new Promise(function (resolve) {\n resolve(action(data.data));\n }).then(function (result) {\n comObj.postMessage({\n sourceName: cbSourceName,\n targetName: cbTargetName,\n callback: CallbackKind.DATA,\n callbackId: data.callbackId,\n data: result\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName: cbSourceName,\n targetName: cbTargetName,\n callback: CallbackKind.ERROR,\n callbackId: data.callbackId,\n reason: wrapReason(reason)\n });\n });\n return;\n }\n if (data.streamId) {\n this.#createStreamSink(data);\n return;\n }\n action(data.data);\n };\n comObj.addEventListener(\"message\", this._onComObjOnMessage);\n }\n on(actionName, handler) {\n const ah = this.actionHandler;\n if (ah[actionName]) {\n throw new Error(`There is already an actionName called \"${actionName}\"`);\n }\n ah[actionName] = handler;\n }\n send(actionName, data, transfers) {\n this.comObj.postMessage({\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n data\n }, transfers);\n }\n sendWithPromise(actionName, data, transfers) {\n const callbackId = this.callbackId++;\n const capability = Promise.withResolvers();\n this.callbackCapabilities[callbackId] = capability;\n try {\n this.comObj.postMessage({\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n callbackId,\n data\n }, transfers);\n } catch (ex) {\n capability.reject(ex);\n }\n return capability.promise;\n }\n sendWithStream(actionName, data, queueingStrategy, transfers) {\n const streamId = this.streamId++,\n sourceName = this.sourceName,\n targetName = this.targetName,\n comObj = this.comObj;\n return new ReadableStream({\n start: controller => {\n const startCapability = Promise.withResolvers();\n this.streamControllers[streamId] = {\n controller,\n startCall: startCapability,\n pullCall: null,\n cancelCall: null,\n isClosed: false\n };\n comObj.postMessage({\n sourceName,\n targetName,\n action: actionName,\n streamId,\n data,\n desiredSize: controller.desiredSize\n }, transfers);\n return startCapability.promise;\n },\n pull: controller => {\n const pullCapability = Promise.withResolvers();\n this.streamControllers[streamId].pullCall = pullCapability;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL,\n streamId,\n desiredSize: controller.desiredSize\n });\n return pullCapability.promise;\n },\n cancel: reason => {\n assert(reason instanceof Error, \"cancel must have a valid reason\");\n const cancelCapability = Promise.withResolvers();\n this.streamControllers[streamId].cancelCall = cancelCapability;\n this.streamControllers[streamId].isClosed = true;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CANCEL,\n streamId,\n reason: wrapReason(reason)\n });\n return cancelCapability.promise;\n }\n }, queueingStrategy);\n }\n #createStreamSink(data) {\n const streamId = data.streamId,\n sourceName = this.sourceName,\n targetName = data.sourceName,\n comObj = this.comObj;\n const self = this,\n action = this.actionHandler[data.action];\n const streamSink = {\n enqueue(chunk, size = 1, transfers) {\n if (this.isCancelled) {\n return;\n }\n const lastDesiredSize = this.desiredSize;\n this.desiredSize -= size;\n if (lastDesiredSize > 0 && this.desiredSize <= 0) {\n this.sinkCapability = Promise.withResolvers();\n this.ready = this.sinkCapability.promise;\n }\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.ENQUEUE,\n streamId,\n chunk\n }, transfers);\n },\n close() {\n if (this.isCancelled) {\n return;\n }\n this.isCancelled = true;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CLOSE,\n streamId\n });\n delete self.streamSinks[streamId];\n },\n error(reason) {\n assert(reason instanceof Error, \"error must have a valid reason\");\n if (this.isCancelled) {\n return;\n }\n this.isCancelled = true;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.ERROR,\n streamId,\n reason: wrapReason(reason)\n });\n },\n sinkCapability: Promise.withResolvers(),\n onPull: null,\n onCancel: null,\n isCancelled: false,\n desiredSize: data.desiredSize,\n ready: null\n };\n streamSink.sinkCapability.resolve();\n streamSink.ready = streamSink.sinkCapability.promise;\n this.streamSinks[streamId] = streamSink;\n new Promise(function (resolve) {\n resolve(action(data.data, streamSink));\n }).then(function () {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.START_COMPLETE,\n streamId,\n success: true\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.START_COMPLETE,\n streamId,\n reason: wrapReason(reason)\n });\n });\n }\n #processStreamMessage(data) {\n const streamId = data.streamId,\n sourceName = this.sourceName,\n targetName = data.sourceName,\n comObj = this.comObj;\n const streamController = this.streamControllers[streamId],\n streamSink = this.streamSinks[streamId];\n switch (data.stream) {\n case StreamKind.START_COMPLETE:\n if (data.success) {\n streamController.startCall.resolve();\n } else {\n streamController.startCall.reject(wrapReason(data.reason));\n }\n break;\n case StreamKind.PULL_COMPLETE:\n if (data.success) {\n streamController.pullCall.resolve();\n } else {\n streamController.pullCall.reject(wrapReason(data.reason));\n }\n break;\n case StreamKind.PULL:\n if (!streamSink) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId,\n success: true\n });\n break;\n }\n if (streamSink.desiredSize <= 0 && data.desiredSize > 0) {\n streamSink.sinkCapability.resolve();\n }\n streamSink.desiredSize = data.desiredSize;\n new Promise(function (resolve) {\n resolve(streamSink.onPull?.());\n }).then(function () {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId,\n success: true\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId,\n reason: wrapReason(reason)\n });\n });\n break;\n case StreamKind.ENQUEUE:\n assert(streamController, \"enqueue should have stream controller\");\n if (streamController.isClosed) {\n break;\n }\n streamController.controller.enqueue(data.chunk);\n break;\n case StreamKind.CLOSE:\n assert(streamController, \"close should have stream controller\");\n if (streamController.isClosed) {\n break;\n }\n streamController.isClosed = true;\n streamController.controller.close();\n this.#deleteStreamController(streamController, streamId);\n break;\n case StreamKind.ERROR:\n assert(streamController, \"error should have stream controller\");\n streamController.controller.error(wrapReason(data.reason));\n this.#deleteStreamController(streamController, streamId);\n break;\n case StreamKind.CANCEL_COMPLETE:\n if (data.success) {\n streamController.cancelCall.resolve();\n } else {\n streamController.cancelCall.reject(wrapReason(data.reason));\n }\n this.#deleteStreamController(streamController, streamId);\n break;\n case StreamKind.CANCEL:\n if (!streamSink) {\n break;\n }\n new Promise(function (resolve) {\n resolve(streamSink.onCancel?.(wrapReason(data.reason)));\n }).then(function () {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CANCEL_COMPLETE,\n streamId,\n success: true\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CANCEL_COMPLETE,\n streamId,\n reason: wrapReason(reason)\n });\n });\n streamSink.sinkCapability.reject(wrapReason(data.reason));\n streamSink.isCancelled = true;\n delete this.streamSinks[streamId];\n break;\n default:\n throw new Error(\"Unexpected stream case\");\n }\n }\n async #deleteStreamController(streamController, streamId) {\n await Promise.allSettled([streamController.startCall?.promise, streamController.pullCall?.promise, streamController.cancelCall?.promise]);\n delete this.streamControllers[streamId];\n }\n destroy() {\n this.comObj.removeEventListener(\"message\", this._onComObjOnMessage);\n }\n}\n\n;// ./src/display/metadata.js\n\nclass Metadata {\n #metadataMap;\n #data;\n constructor({\n parsedData,\n rawData\n }) {\n this.#metadataMap = parsedData;\n this.#data = rawData;\n }\n getRaw() {\n return this.#data;\n }\n get(name) {\n return this.#metadataMap.get(name) ?? null;\n }\n getAll() {\n return objectFromMap(this.#metadataMap);\n }\n has(name) {\n return this.#metadataMap.has(name);\n }\n}\n\n;// ./src/display/optional_content_config.js\n\n\nconst INTERNAL = Symbol(\"INTERNAL\");\nclass OptionalContentGroup {\n #isDisplay = false;\n #isPrint = false;\n #userSet = false;\n #visible = true;\n constructor(renderingIntent, {\n name,\n intent,\n usage\n }) {\n this.#isDisplay = !!(renderingIntent & RenderingIntentFlag.DISPLAY);\n this.#isPrint = !!(renderingIntent & RenderingIntentFlag.PRINT);\n this.name = name;\n this.intent = intent;\n this.usage = usage;\n }\n get visible() {\n if (this.#userSet) {\n return this.#visible;\n }\n if (!this.#visible) {\n return false;\n }\n const {\n print,\n view\n } = this.usage;\n if (this.#isDisplay) {\n return view?.viewState !== \"OFF\";\n } else if (this.#isPrint) {\n return print?.printState !== \"OFF\";\n }\n return true;\n }\n _setVisible(internal, visible, userSet = false) {\n if (internal !== INTERNAL) {\n unreachable(\"Internal method `_setVisible` called.\");\n }\n this.#userSet = userSet;\n this.#visible = visible;\n }\n}\nclass OptionalContentConfig {\n #cachedGetHash = null;\n #groups = new Map();\n #initialHash = null;\n #order = null;\n constructor(data, renderingIntent = RenderingIntentFlag.DISPLAY) {\n this.renderingIntent = renderingIntent;\n this.name = null;\n this.creator = null;\n if (data === null) {\n return;\n }\n this.name = data.name;\n this.creator = data.creator;\n this.#order = data.order;\n for (const group of data.groups) {\n this.#groups.set(group.id, new OptionalContentGroup(renderingIntent, group));\n }\n if (data.baseState === \"OFF\") {\n for (const group of this.#groups.values()) {\n group._setVisible(INTERNAL, false);\n }\n }\n for (const on of data.on) {\n this.#groups.get(on)._setVisible(INTERNAL, true);\n }\n for (const off of data.off) {\n this.#groups.get(off)._setVisible(INTERNAL, false);\n }\n this.#initialHash = this.getHash();\n }\n #evaluateVisibilityExpression(array) {\n const length = array.length;\n if (length < 2) {\n return true;\n }\n const operator = array[0];\n for (let i = 1; i < length; i++) {\n const element = array[i];\n let state;\n if (Array.isArray(element)) {\n state = this.#evaluateVisibilityExpression(element);\n } else if (this.#groups.has(element)) {\n state = this.#groups.get(element).visible;\n } else {\n warn(`Optional content group not found: ${element}`);\n return true;\n }\n switch (operator) {\n case \"And\":\n if (!state) {\n return false;\n }\n break;\n case \"Or\":\n if (state) {\n return true;\n }\n break;\n case \"Not\":\n return !state;\n default:\n return true;\n }\n }\n return operator === \"And\";\n }\n isVisible(group) {\n if (this.#groups.size === 0) {\n return true;\n }\n if (!group) {\n info(\"Optional content group not defined.\");\n return true;\n }\n if (group.type === \"OCG\") {\n if (!this.#groups.has(group.id)) {\n warn(`Optional content group not found: ${group.id}`);\n return true;\n }\n return this.#groups.get(group.id).visible;\n } else if (group.type === \"OCMD\") {\n if (group.expression) {\n return this.#evaluateVisibilityExpression(group.expression);\n }\n if (!group.policy || group.policy === \"AnyOn\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n warn(`Optional content group not found: ${id}`);\n return true;\n }\n if (this.#groups.get(id).visible) {\n return true;\n }\n }\n return false;\n } else if (group.policy === \"AllOn\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n warn(`Optional content group not found: ${id}`);\n return true;\n }\n if (!this.#groups.get(id).visible) {\n return false;\n }\n }\n return true;\n } else if (group.policy === \"AnyOff\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n warn(`Optional content group not found: ${id}`);\n return true;\n }\n if (!this.#groups.get(id).visible) {\n return true;\n }\n }\n return false;\n } else if (group.policy === \"AllOff\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n warn(`Optional content group not found: ${id}`);\n return true;\n }\n if (this.#groups.get(id).visible) {\n return false;\n }\n }\n return true;\n }\n warn(`Unknown optional content policy ${group.policy}.`);\n return true;\n }\n warn(`Unknown group type ${group.type}.`);\n return true;\n }\n setVisibility(id, visible = true) {\n const group = this.#groups.get(id);\n if (!group) {\n warn(`Optional content group not found: ${id}`);\n return;\n }\n group._setVisible(INTERNAL, !!visible, true);\n this.#cachedGetHash = null;\n }\n setOCGState({\n state,\n preserveRB\n }) {\n let operator;\n for (const elem of state) {\n switch (elem) {\n case \"ON\":\n case \"OFF\":\n case \"Toggle\":\n operator = elem;\n continue;\n }\n const group = this.#groups.get(elem);\n if (!group) {\n continue;\n }\n switch (operator) {\n case \"ON\":\n group._setVisible(INTERNAL, true);\n break;\n case \"OFF\":\n group._setVisible(INTERNAL, false);\n break;\n case \"Toggle\":\n group._setVisible(INTERNAL, !group.visible);\n break;\n }\n }\n this.#cachedGetHash = null;\n }\n get hasInitialVisibility() {\n return this.#initialHash === null || this.getHash() === this.#initialHash;\n }\n getOrder() {\n if (!this.#groups.size) {\n return null;\n }\n if (this.#order) {\n return this.#order.slice();\n }\n return [...this.#groups.keys()];\n }\n getGroups() {\n return this.#groups.size > 0 ? objectFromMap(this.#groups) : null;\n }\n getGroup(id) {\n return this.#groups.get(id) || null;\n }\n getHash() {\n if (this.#cachedGetHash !== null) {\n return this.#cachedGetHash;\n }\n const hash = new MurmurHash3_64();\n for (const [id, group] of this.#groups) {\n hash.update(`${id}:${group.visible}`);\n }\n return this.#cachedGetHash = hash.hexdigest();\n }\n}\n\n;// ./src/display/transport_stream.js\n\n\n\n\n\n\n\n\n\n\n\n\nclass PDFDataTransportStream {\n constructor(pdfDataRangeTransport, {\n disableRange = false,\n disableStream = false\n }) {\n assert(pdfDataRangeTransport, 'PDFDataTransportStream - missing required \"pdfDataRangeTransport\" argument.');\n const {\n length,\n initialData,\n progressiveDone,\n contentDispositionFilename\n } = pdfDataRangeTransport;\n this._queuedChunks = [];\n this._progressiveDone = progressiveDone;\n this._contentDispositionFilename = contentDispositionFilename;\n if (initialData?.length > 0) {\n const buffer = initialData instanceof Uint8Array && initialData.byteLength === initialData.buffer.byteLength ? initialData.buffer : new Uint8Array(initialData).buffer;\n this._queuedChunks.push(buffer);\n }\n this._pdfDataRangeTransport = pdfDataRangeTransport;\n this._isStreamingSupported = !disableStream;\n this._isRangeSupported = !disableRange;\n this._contentLength = length;\n this._fullRequestReader = null;\n this._rangeReaders = [];\n pdfDataRangeTransport.addRangeListener((begin, chunk) => {\n this._onReceiveData({\n begin,\n chunk\n });\n });\n pdfDataRangeTransport.addProgressListener((loaded, total) => {\n this._onProgress({\n loaded,\n total\n });\n });\n pdfDataRangeTransport.addProgressiveReadListener(chunk => {\n this._onReceiveData({\n chunk\n });\n });\n pdfDataRangeTransport.addProgressiveDoneListener(() => {\n this._onProgressiveDone();\n });\n pdfDataRangeTransport.transportReady();\n }\n _onReceiveData({\n begin,\n chunk\n }) {\n const buffer = chunk instanceof Uint8Array && chunk.byteLength === chunk.buffer.byteLength ? chunk.buffer : new Uint8Array(chunk).buffer;\n if (begin === undefined) {\n if (this._fullRequestReader) {\n this._fullRequestReader._enqueue(buffer);\n } else {\n this._queuedChunks.push(buffer);\n }\n } else {\n const found = this._rangeReaders.some(function (rangeReader) {\n if (rangeReader._begin !== begin) {\n return false;\n }\n rangeReader._enqueue(buffer);\n return true;\n });\n assert(found, \"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.\");\n }\n }\n get _progressiveDataLength() {\n return this._fullRequestReader?._loaded ?? 0;\n }\n _onProgress(evt) {\n if (evt.total === undefined) {\n this._rangeReaders[0]?.onProgress?.({\n loaded: evt.loaded\n });\n } else {\n this._fullRequestReader?.onProgress?.({\n loaded: evt.loaded,\n total: evt.total\n });\n }\n }\n _onProgressiveDone() {\n this._fullRequestReader?.progressiveDone();\n this._progressiveDone = true;\n }\n _removeRangeReader(reader) {\n const i = this._rangeReaders.indexOf(reader);\n if (i >= 0) {\n this._rangeReaders.splice(i, 1);\n }\n }\n getFullReader() {\n assert(!this._fullRequestReader, \"PDFDataTransportStream.getFullReader can only be called once.\");\n const queuedChunks = this._queuedChunks;\n this._queuedChunks = null;\n return new PDFDataTransportStreamReader(this, queuedChunks, this._progressiveDone, this._contentDispositionFilename);\n }\n getRangeReader(begin, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n const reader = new PDFDataTransportStreamRangeReader(this, begin, end);\n this._pdfDataRangeTransport.requestDataRange(begin, end);\n this._rangeReaders.push(reader);\n return reader;\n }\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n for (const reader of this._rangeReaders.slice(0)) {\n reader.cancel(reason);\n }\n this._pdfDataRangeTransport.abort();\n }\n}\nclass PDFDataTransportStreamReader {\n constructor(stream, queuedChunks, progressiveDone = false, contentDispositionFilename = null) {\n this._stream = stream;\n this._done = progressiveDone || false;\n this._filename = isPdfFile(contentDispositionFilename) ? contentDispositionFilename : null;\n this._queuedChunks = queuedChunks || [];\n this._loaded = 0;\n for (const chunk of this._queuedChunks) {\n this._loaded += chunk.byteLength;\n }\n this._requests = [];\n this._headersReady = Promise.resolve();\n stream._fullRequestReader = this;\n this.onProgress = null;\n }\n _enqueue(chunk) {\n if (this._done) {\n return;\n }\n if (this._requests.length > 0) {\n const requestCapability = this._requests.shift();\n requestCapability.resolve({\n value: chunk,\n done: false\n });\n } else {\n this._queuedChunks.push(chunk);\n }\n this._loaded += chunk.byteLength;\n }\n get headersReady() {\n return this._headersReady;\n }\n get filename() {\n return this._filename;\n }\n get isRangeSupported() {\n return this._stream._isRangeSupported;\n }\n get isStreamingSupported() {\n return this._stream._isStreamingSupported;\n }\n get contentLength() {\n return this._stream._contentLength;\n }\n async read() {\n if (this._queuedChunks.length > 0) {\n const chunk = this._queuedChunks.shift();\n return {\n value: chunk,\n done: false\n };\n }\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n const requestCapability = Promise.withResolvers();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n cancel(reason) {\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n }\n progressiveDone() {\n if (this._done) {\n return;\n }\n this._done = true;\n }\n}\nclass PDFDataTransportStreamRangeReader {\n constructor(stream, begin, end) {\n this._stream = stream;\n this._begin = begin;\n this._end = end;\n this._queuedChunk = null;\n this._requests = [];\n this._done = false;\n this.onProgress = null;\n }\n _enqueue(chunk) {\n if (this._done) {\n return;\n }\n if (this._requests.length === 0) {\n this._queuedChunk = chunk;\n } else {\n const requestsCapability = this._requests.shift();\n requestsCapability.resolve({\n value: chunk,\n done: false\n });\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n }\n this._done = true;\n this._stream._removeRangeReader(this);\n }\n get isStreamingSupported() {\n return false;\n }\n async read() {\n if (this._queuedChunk) {\n const chunk = this._queuedChunk;\n this._queuedChunk = null;\n return {\n value: chunk,\n done: false\n };\n }\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n const requestCapability = Promise.withResolvers();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n cancel(reason) {\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n this._stream._removeRangeReader(this);\n }\n}\n\n;// ./src/display/content_disposition.js\n\n\n\nfunction getFilenameFromContentDispositionHeader(contentDisposition) {\n let needsEncodingFixup = true;\n let tmp = toParamRegExp(\"filename\\\\*\", \"i\").exec(contentDisposition);\n if (tmp) {\n tmp = tmp[1];\n let filename = rfc2616unquote(tmp);\n filename = unescape(filename);\n filename = rfc5987decode(filename);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n tmp = rfc2231getparam(contentDisposition);\n if (tmp) {\n const filename = rfc2047decode(tmp);\n return fixupEncoding(filename);\n }\n tmp = toParamRegExp(\"filename\", \"i\").exec(contentDisposition);\n if (tmp) {\n tmp = tmp[1];\n let filename = rfc2616unquote(tmp);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n function toParamRegExp(attributePattern, flags) {\n return new RegExp(\"(?:^|;)\\\\s*\" + attributePattern + \"\\\\s*=\\\\s*\" + \"(\" + '[^\";\\\\s][^;\\\\s]*' + \"|\" + '\"(?:[^\"\\\\\\\\]|\\\\\\\\\"?)+\"?' + \")\", flags);\n }\n function textdecode(encoding, value) {\n if (encoding) {\n if (!/^[\\x00-\\xFF]+$/.test(value)) {\n return value;\n }\n try {\n const decoder = new TextDecoder(encoding, {\n fatal: true\n });\n const buffer = stringToBytes(value);\n value = decoder.decode(buffer);\n needsEncodingFixup = false;\n } catch {}\n }\n return value;\n }\n function fixupEncoding(value) {\n if (needsEncodingFixup && /[\\x80-\\xff]/.test(value)) {\n value = textdecode(\"utf-8\", value);\n if (needsEncodingFixup) {\n value = textdecode(\"iso-8859-1\", value);\n }\n }\n return value;\n }\n function rfc2231getparam(contentDispositionStr) {\n const matches = [];\n let match;\n const iter = toParamRegExp(\"filename\\\\*((?!0\\\\d)\\\\d+)(\\\\*?)\", \"ig\");\n while ((match = iter.exec(contentDispositionStr)) !== null) {\n let [, n, quot, part] = match;\n n = parseInt(n, 10);\n if (n in matches) {\n if (n === 0) {\n break;\n }\n continue;\n }\n matches[n] = [quot, part];\n }\n const parts = [];\n for (let n = 0; n < matches.length; ++n) {\n if (!(n in matches)) {\n break;\n }\n let [quot, part] = matches[n];\n part = rfc2616unquote(part);\n if (quot) {\n part = unescape(part);\n if (n === 0) {\n part = rfc5987decode(part);\n }\n }\n parts.push(part);\n }\n return parts.join(\"\");\n }\n function rfc2616unquote(value) {\n if (value.startsWith('\"')) {\n const parts = value.slice(1).split('\\\\\"');\n for (let i = 0; i < parts.length; ++i) {\n const quotindex = parts[i].indexOf('\"');\n if (quotindex !== -1) {\n parts[i] = parts[i].slice(0, quotindex);\n parts.length = i + 1;\n }\n parts[i] = parts[i].replaceAll(/\\\\(.)/g, \"$1\");\n }\n value = parts.join('\"');\n }\n return value;\n }\n function rfc5987decode(extvalue) {\n const encodingend = extvalue.indexOf(\"'\");\n if (encodingend === -1) {\n return extvalue;\n }\n const encoding = extvalue.slice(0, encodingend);\n const langvalue = extvalue.slice(encodingend + 1);\n const value = langvalue.replace(/^[^']*'/, \"\");\n return textdecode(encoding, value);\n }\n function rfc2047decode(value) {\n if (!value.startsWith(\"=?\") || /[\\x00-\\x19\\x80-\\xff]/.test(value)) {\n return value;\n }\n return value.replaceAll(/=\\?([\\w-]*)\\?([QqBb])\\?((?:[^?]|\\?(?!=))*)\\?=/g, function (matches, charset, encoding, text) {\n if (encoding === \"q\" || encoding === \"Q\") {\n text = text.replaceAll(\"_\", \" \");\n text = text.replaceAll(/=([0-9a-fA-F]{2})/g, function (match, hex) {\n return String.fromCharCode(parseInt(hex, 16));\n });\n return textdecode(charset, text);\n }\n try {\n text = atob(text);\n } catch {}\n return textdecode(charset, text);\n });\n }\n return \"\";\n}\n\n;// ./src/display/network_utils.js\n\n\n\nfunction createHeaders(isHttp, httpHeaders) {\n const headers = new Headers();\n if (!isHttp || !httpHeaders || typeof httpHeaders !== \"object\") {\n return headers;\n }\n for (const key in httpHeaders) {\n const val = httpHeaders[key];\n if (val !== undefined) {\n headers.append(key, val);\n }\n }\n return headers;\n}\nfunction validateRangeRequestCapabilities({\n responseHeaders,\n isHttp,\n rangeChunkSize,\n disableRange\n}) {\n const returnValues = {\n allowRangeRequests: false,\n suggestedLength: undefined\n };\n const length = parseInt(responseHeaders.get(\"Content-Length\"), 10);\n if (!Number.isInteger(length)) {\n return returnValues;\n }\n returnValues.suggestedLength = length;\n if (length <= 2 * rangeChunkSize) {\n return returnValues;\n }\n if (disableRange || !isHttp) {\n return returnValues;\n }\n if (responseHeaders.get(\"Accept-Ranges\") !== \"bytes\") {\n return returnValues;\n }\n const contentEncoding = responseHeaders.get(\"Content-Encoding\") || \"identity\";\n if (contentEncoding !== \"identity\") {\n return returnValues;\n }\n returnValues.allowRangeRequests = true;\n return returnValues;\n}\nfunction extractFilenameFromHeader(responseHeaders) {\n const contentDisposition = responseHeaders.get(\"Content-Disposition\");\n if (contentDisposition) {\n let filename = getFilenameFromContentDispositionHeader(contentDisposition);\n if (filename.includes(\"%\")) {\n try {\n filename = decodeURIComponent(filename);\n } catch {}\n }\n if (isPdfFile(filename)) {\n return filename;\n }\n }\n return null;\n}\nfunction createResponseStatusError(status, url) {\n if (status === 404 || status === 0 && url.startsWith(\"file:\")) {\n return new MissingPDFException('Missing PDF \"' + url + '\".');\n }\n return new UnexpectedResponseException(`Unexpected server response (${status}) while retrieving PDF \"${url}\".`, status);\n}\nfunction validateResponseStatus(status) {\n return status === 200 || status === 206;\n}\n\n;// ./src/display/fetch_stream.js\n\n\n\n\n\n\n\n\n\n\nfunction createFetchOptions(headers, withCredentials, abortController) {\n return {\n method: \"GET\",\n headers,\n signal: abortController.signal,\n mode: \"cors\",\n credentials: withCredentials ? \"include\" : \"same-origin\",\n redirect: \"follow\"\n };\n}\nfunction getArrayBuffer(val) {\n if (val instanceof Uint8Array) {\n return val.buffer;\n }\n if (val instanceof ArrayBuffer) {\n return val;\n }\n warn(`getArrayBuffer - unexpected data format: ${val}`);\n return new Uint8Array(val).buffer;\n}\nclass PDFFetchStream {\n constructor(source) {\n this.source = source;\n this.isHttp = /^https?:/i.test(source.url);\n this.headers = createHeaders(this.isHttp, source.httpHeaders);\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n get _progressiveDataLength() {\n return this._fullRequestReader?._loaded ?? 0;\n }\n getFullReader() {\n assert(!this._fullRequestReader, \"PDFFetchStream.getFullReader can only be called once.\");\n this._fullRequestReader = new PDFFetchStreamReader(this);\n return this._fullRequestReader;\n }\n getRangeReader(begin, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n const reader = new PDFFetchStreamRangeReader(this, begin, end);\n this._rangeRequestReaders.push(reader);\n return reader;\n }\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n for (const reader of this._rangeRequestReaders.slice(0)) {\n reader.cancel(reason);\n }\n }\n}\nclass PDFFetchStreamReader {\n constructor(stream) {\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n this._filename = null;\n const source = stream.source;\n this._withCredentials = source.withCredentials || false;\n this._contentLength = source.length;\n this._headersCapability = Promise.withResolvers();\n this._disableRange = source.disableRange || false;\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n this._abortController = new AbortController();\n this._isStreamingSupported = !source.disableStream;\n this._isRangeSupported = !source.disableRange;\n const headers = new Headers(stream.headers);\n const url = source.url;\n fetch(url, createFetchOptions(headers, this._withCredentials, this._abortController)).then(response => {\n if (!validateResponseStatus(response.status)) {\n throw createResponseStatusError(response.status, url);\n }\n this._reader = response.body.getReader();\n this._headersCapability.resolve();\n const responseHeaders = response.headers;\n const {\n allowRangeRequests,\n suggestedLength\n } = validateRangeRequestCapabilities({\n responseHeaders,\n isHttp: stream.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange\n });\n this._isRangeSupported = allowRangeRequests;\n this._contentLength = suggestedLength || this._contentLength;\n this._filename = extractFilenameFromHeader(responseHeaders);\n if (!this._isStreamingSupported && this._isRangeSupported) {\n this.cancel(new AbortException(\"Streaming is disabled.\"));\n }\n }).catch(this._headersCapability.reject);\n this.onProgress = null;\n }\n get headersReady() {\n return this._headersCapability.promise;\n }\n get filename() {\n return this._filename;\n }\n get contentLength() {\n return this._contentLength;\n }\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n async read() {\n await this._headersCapability.promise;\n const {\n value,\n done\n } = await this._reader.read();\n if (done) {\n return {\n value,\n done\n };\n }\n this._loaded += value.byteLength;\n this.onProgress?.({\n loaded: this._loaded,\n total: this._contentLength\n });\n return {\n value: getArrayBuffer(value),\n done: false\n };\n }\n cancel(reason) {\n this._reader?.cancel(reason);\n this._abortController.abort();\n }\n}\nclass PDFFetchStreamRangeReader {\n constructor(stream, begin, end) {\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n const source = stream.source;\n this._withCredentials = source.withCredentials || false;\n this._readCapability = Promise.withResolvers();\n this._isStreamingSupported = !source.disableStream;\n this._abortController = new AbortController();\n const headers = new Headers(stream.headers);\n headers.append(\"Range\", `bytes=${begin}-${end - 1}`);\n const url = source.url;\n fetch(url, createFetchOptions(headers, this._withCredentials, this._abortController)).then(response => {\n if (!validateResponseStatus(response.status)) {\n throw createResponseStatusError(response.status, url);\n }\n this._readCapability.resolve();\n this._reader = response.body.getReader();\n }).catch(this._readCapability.reject);\n this.onProgress = null;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n async read() {\n await this._readCapability.promise;\n const {\n value,\n done\n } = await this._reader.read();\n if (done) {\n return {\n value,\n done\n };\n }\n this._loaded += value.byteLength;\n this.onProgress?.({\n loaded: this._loaded\n });\n return {\n value: getArrayBuffer(value),\n done: false\n };\n }\n cancel(reason) {\n this._reader?.cancel(reason);\n this._abortController.abort();\n }\n}\n\n;// ./src/display/network.js\n\n\n\n\n\nconst OK_RESPONSE = 200;\nconst PARTIAL_CONTENT_RESPONSE = 206;\nfunction network_getArrayBuffer(xhr) {\n const data = xhr.response;\n if (typeof data !== \"string\") {\n return data;\n }\n return stringToBytes(data).buffer;\n}\nclass NetworkManager {\n constructor({\n url,\n httpHeaders,\n withCredentials\n }) {\n this.url = url;\n this.isHttp = /^https?:/i.test(url);\n this.headers = createHeaders(this.isHttp, httpHeaders);\n this.withCredentials = withCredentials || false;\n this.currXhrId = 0;\n this.pendingRequests = Object.create(null);\n }\n requestRange(begin, end, listeners) {\n const args = {\n begin,\n end\n };\n for (const prop in listeners) {\n args[prop] = listeners[prop];\n }\n return this.request(args);\n }\n requestFull(listeners) {\n return this.request(listeners);\n }\n request(args) {\n const xhr = new XMLHttpRequest();\n const xhrId = this.currXhrId++;\n const pendingRequest = this.pendingRequests[xhrId] = {\n xhr\n };\n xhr.open(\"GET\", this.url);\n xhr.withCredentials = this.withCredentials;\n for (const [key, val] of this.headers) {\n xhr.setRequestHeader(key, val);\n }\n if (this.isHttp && \"begin\" in args && \"end\" in args) {\n xhr.setRequestHeader(\"Range\", `bytes=${args.begin}-${args.end - 1}`);\n pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE;\n } else {\n pendingRequest.expectedStatus = OK_RESPONSE;\n }\n xhr.responseType = \"arraybuffer\";\n if (args.onError) {\n xhr.onerror = function (evt) {\n args.onError(xhr.status);\n };\n }\n xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);\n xhr.onprogress = this.onProgress.bind(this, xhrId);\n pendingRequest.onHeadersReceived = args.onHeadersReceived;\n pendingRequest.onDone = args.onDone;\n pendingRequest.onError = args.onError;\n pendingRequest.onProgress = args.onProgress;\n xhr.send(null);\n return xhrId;\n }\n onProgress(xhrId, evt) {\n const pendingRequest = this.pendingRequests[xhrId];\n if (!pendingRequest) {\n return;\n }\n pendingRequest.onProgress?.(evt);\n }\n onStateChange(xhrId, evt) {\n const pendingRequest = this.pendingRequests[xhrId];\n if (!pendingRequest) {\n return;\n }\n const xhr = pendingRequest.xhr;\n if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {\n pendingRequest.onHeadersReceived();\n delete pendingRequest.onHeadersReceived;\n }\n if (xhr.readyState !== 4) {\n return;\n }\n if (!(xhrId in this.pendingRequests)) {\n return;\n }\n delete this.pendingRequests[xhrId];\n if (xhr.status === 0 && this.isHttp) {\n pendingRequest.onError?.(xhr.status);\n return;\n }\n const xhrStatus = xhr.status || OK_RESPONSE;\n const ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;\n if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) {\n pendingRequest.onError?.(xhr.status);\n return;\n }\n const chunk = network_getArrayBuffer(xhr);\n if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {\n const rangeHeader = xhr.getResponseHeader(\"Content-Range\");\n const matches = /bytes (\\d+)-(\\d+)\\/(\\d+)/.exec(rangeHeader);\n pendingRequest.onDone({\n begin: parseInt(matches[1], 10),\n chunk\n });\n } else if (chunk) {\n pendingRequest.onDone({\n begin: 0,\n chunk\n });\n } else {\n pendingRequest.onError?.(xhr.status);\n }\n }\n getRequestXhr(xhrId) {\n return this.pendingRequests[xhrId].xhr;\n }\n isPendingRequest(xhrId) {\n return xhrId in this.pendingRequests;\n }\n abortRequest(xhrId) {\n const xhr = this.pendingRequests[xhrId].xhr;\n delete this.pendingRequests[xhrId];\n xhr.abort();\n }\n}\nclass PDFNetworkStream {\n constructor(source) {\n this._source = source;\n this._manager = new NetworkManager(source);\n this._rangeChunkSize = source.rangeChunkSize;\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n _onRangeRequestReaderClosed(reader) {\n const i = this._rangeRequestReaders.indexOf(reader);\n if (i >= 0) {\n this._rangeRequestReaders.splice(i, 1);\n }\n }\n getFullReader() {\n assert(!this._fullRequestReader, \"PDFNetworkStream.getFullReader can only be called once.\");\n this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._source);\n return this._fullRequestReader;\n }\n getRangeReader(begin, end) {\n const reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end);\n reader.onClosed = this._onRangeRequestReaderClosed.bind(this);\n this._rangeRequestReaders.push(reader);\n return reader;\n }\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n for (const reader of this._rangeRequestReaders.slice(0)) {\n reader.cancel(reason);\n }\n }\n}\nclass PDFNetworkStreamFullRequestReader {\n constructor(manager, source) {\n this._manager = manager;\n const args = {\n onHeadersReceived: this._onHeadersReceived.bind(this),\n onDone: this._onDone.bind(this),\n onError: this._onError.bind(this),\n onProgress: this._onProgress.bind(this)\n };\n this._url = source.url;\n this._fullRequestId = manager.requestFull(args);\n this._headersCapability = Promise.withResolvers();\n this._disableRange = source.disableRange || false;\n this._contentLength = source.length;\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n this._isStreamingSupported = false;\n this._isRangeSupported = false;\n this._cachedChunks = [];\n this._requests = [];\n this._done = false;\n this._storedError = undefined;\n this._filename = null;\n this.onProgress = null;\n }\n _onHeadersReceived() {\n const fullRequestXhrId = this._fullRequestId;\n const fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId);\n const responseHeaders = new Headers(fullRequestXhr.getAllResponseHeaders().trim().split(/[\\r\\n]+/).map(x => {\n const [key, ...val] = x.split(\": \");\n return [key, val.join(\": \")];\n }));\n const {\n allowRangeRequests,\n suggestedLength\n } = validateRangeRequestCapabilities({\n responseHeaders,\n isHttp: this._manager.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange\n });\n if (allowRangeRequests) {\n this._isRangeSupported = true;\n }\n this._contentLength = suggestedLength || this._contentLength;\n this._filename = extractFilenameFromHeader(responseHeaders);\n if (this._isRangeSupported) {\n this._manager.abortRequest(fullRequestXhrId);\n }\n this._headersCapability.resolve();\n }\n _onDone(data) {\n if (data) {\n if (this._requests.length > 0) {\n const requestCapability = this._requests.shift();\n requestCapability.resolve({\n value: data.chunk,\n done: false\n });\n } else {\n this._cachedChunks.push(data.chunk);\n }\n }\n this._done = true;\n if (this._cachedChunks.length > 0) {\n return;\n }\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n }\n _onError(status) {\n this._storedError = createResponseStatusError(status, this._url);\n this._headersCapability.reject(this._storedError);\n for (const requestCapability of this._requests) {\n requestCapability.reject(this._storedError);\n }\n this._requests.length = 0;\n this._cachedChunks.length = 0;\n }\n _onProgress(evt) {\n this.onProgress?.({\n loaded: evt.loaded,\n total: evt.lengthComputable ? evt.total : this._contentLength\n });\n }\n get filename() {\n return this._filename;\n }\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n get contentLength() {\n return this._contentLength;\n }\n get headersReady() {\n return this._headersCapability.promise;\n }\n async read() {\n if (this._storedError) {\n throw this._storedError;\n }\n if (this._cachedChunks.length > 0) {\n const chunk = this._cachedChunks.shift();\n return {\n value: chunk,\n done: false\n };\n }\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n const requestCapability = Promise.withResolvers();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n cancel(reason) {\n this._done = true;\n this._headersCapability.reject(reason);\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n if (this._manager.isPendingRequest(this._fullRequestId)) {\n this._manager.abortRequest(this._fullRequestId);\n }\n this._fullRequestReader = null;\n }\n}\nclass PDFNetworkStreamRangeRequestReader {\n constructor(manager, begin, end) {\n this._manager = manager;\n const args = {\n onDone: this._onDone.bind(this),\n onError: this._onError.bind(this),\n onProgress: this._onProgress.bind(this)\n };\n this._url = manager.url;\n this._requestId = manager.requestRange(begin, end, args);\n this._requests = [];\n this._queuedChunk = null;\n this._done = false;\n this._storedError = undefined;\n this.onProgress = null;\n this.onClosed = null;\n }\n _close() {\n this.onClosed?.(this);\n }\n _onDone(data) {\n const chunk = data.chunk;\n if (this._requests.length > 0) {\n const requestCapability = this._requests.shift();\n requestCapability.resolve({\n value: chunk,\n done: false\n });\n } else {\n this._queuedChunk = chunk;\n }\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n this._close();\n }\n _onError(status) {\n this._storedError = createResponseStatusError(status, this._url);\n for (const requestCapability of this._requests) {\n requestCapability.reject(this._storedError);\n }\n this._requests.length = 0;\n this._queuedChunk = null;\n }\n _onProgress(evt) {\n if (!this.isStreamingSupported) {\n this.onProgress?.({\n loaded: evt.loaded\n });\n }\n }\n get isStreamingSupported() {\n return false;\n }\n async read() {\n if (this._storedError) {\n throw this._storedError;\n }\n if (this._queuedChunk !== null) {\n const chunk = this._queuedChunk;\n this._queuedChunk = null;\n return {\n value: chunk,\n done: false\n };\n }\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n const requestCapability = Promise.withResolvers();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n cancel(reason) {\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n if (this._manager.isPendingRequest(this._requestId)) {\n this._manager.abortRequest(this._requestId);\n }\n this._close();\n }\n}\n\n;// ./src/display/node_stream.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst urlRegex = /^[a-z][a-z0-9\\-+.]+:/i;\nfunction parseUrlOrPath(sourceUrl) {\n if (urlRegex.test(sourceUrl)) {\n return new URL(sourceUrl);\n }\n const url = NodePackages.get(\"url\");\n return new URL(url.pathToFileURL(sourceUrl));\n}\nfunction createRequest(url, headers, callback) {\n if (url.protocol === \"http:\") {\n const http = NodePackages.get(\"http\");\n return http.request(url, {\n headers\n }, callback);\n }\n const https = NodePackages.get(\"https\");\n return https.request(url, {\n headers\n }, callback);\n}\nclass PDFNodeStream {\n constructor(source) {\n this.source = source;\n this.url = parseUrlOrPath(source.url);\n this.isHttp = this.url.protocol === \"http:\" || this.url.protocol === \"https:\";\n this.isFsUrl = this.url.protocol === \"file:\";\n this.headers = createHeaders(this.isHttp, source.httpHeaders);\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n get _progressiveDataLength() {\n return this._fullRequestReader?._loaded ?? 0;\n }\n getFullReader() {\n assert(!this._fullRequestReader, \"PDFNodeStream.getFullReader can only be called once.\");\n this._fullRequestReader = this.isFsUrl ? new PDFNodeStreamFsFullReader(this) : new PDFNodeStreamFullReader(this);\n return this._fullRequestReader;\n }\n getRangeReader(start, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n const rangeReader = this.isFsUrl ? new PDFNodeStreamFsRangeReader(this, start, end) : new PDFNodeStreamRangeReader(this, start, end);\n this._rangeRequestReaders.push(rangeReader);\n return rangeReader;\n }\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n for (const reader of this._rangeRequestReaders.slice(0)) {\n reader.cancel(reason);\n }\n }\n}\nclass BaseFullReader {\n constructor(stream) {\n this._url = stream.url;\n this._done = false;\n this._storedError = null;\n this.onProgress = null;\n const source = stream.source;\n this._contentLength = source.length;\n this._loaded = 0;\n this._filename = null;\n this._disableRange = source.disableRange || false;\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n this._isStreamingSupported = !source.disableStream;\n this._isRangeSupported = !source.disableRange;\n this._readableStream = null;\n this._readCapability = Promise.withResolvers();\n this._headersCapability = Promise.withResolvers();\n }\n get headersReady() {\n return this._headersCapability.promise;\n }\n get filename() {\n return this._filename;\n }\n get contentLength() {\n return this._contentLength;\n }\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n async read() {\n await this._readCapability.promise;\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n if (this._storedError) {\n throw this._storedError;\n }\n const chunk = this._readableStream.read();\n if (chunk === null) {\n this._readCapability = Promise.withResolvers();\n return this.read();\n }\n this._loaded += chunk.length;\n this.onProgress?.({\n loaded: this._loaded,\n total: this._contentLength\n });\n const buffer = new Uint8Array(chunk).buffer;\n return {\n value: buffer,\n done: false\n };\n }\n cancel(reason) {\n if (!this._readableStream) {\n this._error(reason);\n return;\n }\n this._readableStream.destroy(reason);\n }\n _error(reason) {\n this._storedError = reason;\n this._readCapability.resolve();\n }\n _setReadableStream(readableStream) {\n this._readableStream = readableStream;\n readableStream.on(\"readable\", () => {\n this._readCapability.resolve();\n });\n readableStream.on(\"end\", () => {\n readableStream.destroy();\n this._done = true;\n this._readCapability.resolve();\n });\n readableStream.on(\"error\", reason => {\n this._error(reason);\n });\n if (!this._isStreamingSupported && this._isRangeSupported) {\n this._error(new AbortException(\"streaming is disabled\"));\n }\n if (this._storedError) {\n this._readableStream.destroy(this._storedError);\n }\n }\n}\nclass BaseRangeReader {\n constructor(stream) {\n this._url = stream.url;\n this._done = false;\n this._storedError = null;\n this.onProgress = null;\n this._loaded = 0;\n this._readableStream = null;\n this._readCapability = Promise.withResolvers();\n const source = stream.source;\n this._isStreamingSupported = !source.disableStream;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n async read() {\n await this._readCapability.promise;\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n if (this._storedError) {\n throw this._storedError;\n }\n const chunk = this._readableStream.read();\n if (chunk === null) {\n this._readCapability = Promise.withResolvers();\n return this.read();\n }\n this._loaded += chunk.length;\n this.onProgress?.({\n loaded: this._loaded\n });\n const buffer = new Uint8Array(chunk).buffer;\n return {\n value: buffer,\n done: false\n };\n }\n cancel(reason) {\n if (!this._readableStream) {\n this._error(reason);\n return;\n }\n this._readableStream.destroy(reason);\n }\n _error(reason) {\n this._storedError = reason;\n this._readCapability.resolve();\n }\n _setReadableStream(readableStream) {\n this._readableStream = readableStream;\n readableStream.on(\"readable\", () => {\n this._readCapability.resolve();\n });\n readableStream.on(\"end\", () => {\n readableStream.destroy();\n this._done = true;\n this._readCapability.resolve();\n });\n readableStream.on(\"error\", reason => {\n this._error(reason);\n });\n if (this._storedError) {\n this._readableStream.destroy(this._storedError);\n }\n }\n}\nclass PDFNodeStreamFullReader extends BaseFullReader {\n constructor(stream) {\n super(stream);\n const headers = Object.fromEntries(stream.headers);\n const handleResponse = response => {\n if (response.statusCode === 404) {\n const error = new MissingPDFException(`Missing PDF \"${this._url}\".`);\n this._storedError = error;\n this._headersCapability.reject(error);\n return;\n }\n this._headersCapability.resolve();\n this._setReadableStream(response);\n const responseHeaders = new Headers(this._readableStream.headers);\n const {\n allowRangeRequests,\n suggestedLength\n } = validateRangeRequestCapabilities({\n responseHeaders,\n isHttp: stream.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange\n });\n this._isRangeSupported = allowRangeRequests;\n this._contentLength = suggestedLength || this._contentLength;\n this._filename = extractFilenameFromHeader(responseHeaders);\n };\n this._request = createRequest(this._url, headers, handleResponse);\n this._request.on(\"error\", reason => {\n this._storedError = reason;\n this._headersCapability.reject(reason);\n });\n this._request.end();\n }\n}\nclass PDFNodeStreamRangeReader extends BaseRangeReader {\n constructor(stream, start, end) {\n super(stream);\n const headers = Object.fromEntries(stream.headers);\n headers.Range = `bytes=${start}-${end - 1}`;\n const handleResponse = response => {\n if (response.statusCode === 404) {\n const error = new MissingPDFException(`Missing PDF \"${this._url}\".`);\n this._storedError = error;\n return;\n }\n this._setReadableStream(response);\n };\n this._request = createRequest(this._url, headers, handleResponse);\n this._request.on(\"error\", reason => {\n this._storedError = reason;\n });\n this._request.end();\n }\n}\nclass PDFNodeStreamFsFullReader extends BaseFullReader {\n constructor(stream) {\n super(stream);\n const fs = NodePackages.get(\"fs\");\n fs.promises.lstat(this._url).then(stat => {\n this._contentLength = stat.size;\n this._setReadableStream(fs.createReadStream(this._url));\n this._headersCapability.resolve();\n }, error => {\n if (error.code === \"ENOENT\") {\n error = new MissingPDFException(`Missing PDF \"${this._url}\".`);\n }\n this._storedError = error;\n this._headersCapability.reject(error);\n });\n }\n}\nclass PDFNodeStreamFsRangeReader extends BaseRangeReader {\n constructor(stream, start, end) {\n super(stream);\n const fs = NodePackages.get(\"fs\");\n this._setReadableStream(fs.createReadStream(this._url, {\n start,\n end: end - 1\n }));\n }\n}\n\n;// ./src/display/text_layer.js\n\n\n\n\n\n\n\n\n\n\n\nconst MAX_TEXT_DIVS_TO_RENDER = 100000;\nconst DEFAULT_FONT_SIZE = 30;\nconst DEFAULT_FONT_ASCENT = 0.8;\nclass TextLayer {\n #capability = Promise.withResolvers();\n #container = null;\n #disableProcessItems = false;\n #fontInspectorEnabled = !!globalThis.FontInspector?.enabled;\n #lang = null;\n #layoutTextParams = null;\n #pageHeight = 0;\n #pageWidth = 0;\n #reader = null;\n #rootContainer = null;\n #rotation = 0;\n #scale = 0;\n #styleCache = Object.create(null);\n #textContentItemsStr = [];\n #textContentSource = null;\n #textDivs = [];\n #textDivProperties = new WeakMap();\n #transform = null;\n static #ascentCache = new Map();\n static #canvasContexts = new Map();\n static #canvasCtxFonts = new WeakMap();\n static #minFontSize = null;\n static #pendingTextLayers = new Set();\n constructor({\n textContentSource,\n container,\n viewport\n }) {\n if (textContentSource instanceof ReadableStream) {\n this.#textContentSource = textContentSource;\n } else if (typeof textContentSource === \"object\") {\n this.#textContentSource = new ReadableStream({\n start(controller) {\n controller.enqueue(textContentSource);\n controller.close();\n }\n });\n } else {\n throw new Error('No \"textContentSource\" parameter specified.');\n }\n this.#container = this.#rootContainer = container;\n this.#scale = viewport.scale * (globalThis.devicePixelRatio || 1);\n this.#rotation = viewport.rotation;\n this.#layoutTextParams = {\n div: null,\n properties: null,\n ctx: null\n };\n const {\n pageWidth,\n pageHeight,\n pageX,\n pageY\n } = viewport.rawDims;\n this.#transform = [1, 0, 0, -1, -pageX, pageY + pageHeight];\n this.#pageWidth = pageWidth;\n this.#pageHeight = pageHeight;\n TextLayer.#ensureMinFontSizeComputed();\n setLayerDimensions(container, viewport);\n this.#capability.promise.finally(() => {\n TextLayer.#pendingTextLayers.delete(this);\n this.#layoutTextParams = null;\n this.#styleCache = null;\n }).catch(() => {});\n }\n static get fontFamilyMap() {\n const {\n isWindows,\n isFirefox\n } = util_FeatureTest.platform;\n return shadow(this, \"fontFamilyMap\", new Map([[\"sans-serif\", `${isWindows && isFirefox ? \"Calibri, \" : \"\"}sans-serif`], [\"monospace\", `${isWindows && isFirefox ? \"Lucida Console, \" : \"\"}monospace`]]));\n }\n render() {\n const pump = () => {\n this.#reader.read().then(({\n value,\n done\n }) => {\n if (done) {\n this.#capability.resolve();\n return;\n }\n this.#lang ??= value.lang;\n Object.assign(this.#styleCache, value.styles);\n this.#processItems(value.items);\n pump();\n }, this.#capability.reject);\n };\n this.#reader = this.#textContentSource.getReader();\n TextLayer.#pendingTextLayers.add(this);\n pump();\n return this.#capability.promise;\n }\n update({\n viewport,\n onBefore = null\n }) {\n const scale = viewport.scale * (globalThis.devicePixelRatio || 1);\n const rotation = viewport.rotation;\n if (rotation !== this.#rotation) {\n onBefore?.();\n this.#rotation = rotation;\n setLayerDimensions(this.#rootContainer, {\n rotation\n });\n }\n if (scale !== this.#scale) {\n onBefore?.();\n this.#scale = scale;\n const params = {\n div: null,\n properties: null,\n ctx: TextLayer.#getCtx(this.#lang)\n };\n for (const div of this.#textDivs) {\n params.properties = this.#textDivProperties.get(div);\n params.div = div;\n this.#layout(params);\n }\n }\n }\n cancel() {\n const abortEx = new AbortException(\"TextLayer task cancelled.\");\n this.#reader?.cancel(abortEx).catch(() => {});\n this.#reader = null;\n this.#capability.reject(abortEx);\n }\n get textDivs() {\n return this.#textDivs;\n }\n get textContentItemsStr() {\n return this.#textContentItemsStr;\n }\n #processItems(items) {\n if (this.#disableProcessItems) {\n return;\n }\n this.#layoutTextParams.ctx ??= TextLayer.#getCtx(this.#lang);\n const textDivs = this.#textDivs,\n textContentItemsStr = this.#textContentItemsStr;\n for (const item of items) {\n if (textDivs.length > MAX_TEXT_DIVS_TO_RENDER) {\n warn(\"Ignoring additional textDivs for performance reasons.\");\n this.#disableProcessItems = true;\n return;\n }\n if (item.str === undefined) {\n if (item.type === \"beginMarkedContentProps\" || item.type === \"beginMarkedContent\") {\n const parent = this.#container;\n this.#container = document.createElement(\"span\");\n this.#container.classList.add(\"markedContent\");\n if (item.id !== null) {\n this.#container.setAttribute(\"id\", `${item.id}`);\n }\n parent.append(this.#container);\n } else if (item.type === \"endMarkedContent\") {\n this.#container = this.#container.parentNode;\n }\n continue;\n }\n textContentItemsStr.push(item.str);\n this.#appendText(item);\n }\n }\n #appendText(geom) {\n const textDiv = document.createElement(\"span\");\n const textDivProperties = {\n angle: 0,\n canvasWidth: 0,\n hasText: geom.str !== \"\",\n hasEOL: geom.hasEOL,\n fontSize: 0\n };\n this.#textDivs.push(textDiv);\n const tx = Util.transform(this.#transform, geom.transform);\n let angle = Math.atan2(tx[1], tx[0]);\n const style = this.#styleCache[geom.fontName];\n if (style.vertical) {\n angle += Math.PI / 2;\n }\n let fontFamily = this.#fontInspectorEnabled && style.fontSubstitution || style.fontFamily;\n fontFamily = TextLayer.fontFamilyMap.get(fontFamily) || fontFamily;\n const fontHeight = Math.hypot(tx[2], tx[3]);\n const fontAscent = fontHeight * TextLayer.#getAscent(fontFamily, this.#lang);\n let left, top;\n if (angle === 0) {\n left = tx[4];\n top = tx[5] - fontAscent;\n } else {\n left = tx[4] + fontAscent * Math.sin(angle);\n top = tx[5] - fontAscent * Math.cos(angle);\n }\n const scaleFactorStr = \"calc(var(--scale-factor)*\";\n const divStyle = textDiv.style;\n if (this.#container === this.#rootContainer) {\n divStyle.left = `${(100 * left / this.#pageWidth).toFixed(2)}%`;\n divStyle.top = `${(100 * top / this.#pageHeight).toFixed(2)}%`;\n } else {\n divStyle.left = `${scaleFactorStr}${left.toFixed(2)}px)`;\n divStyle.top = `${scaleFactorStr}${top.toFixed(2)}px)`;\n }\n divStyle.fontSize = `${scaleFactorStr}${(TextLayer.#minFontSize * fontHeight).toFixed(2)}px)`;\n divStyle.fontFamily = fontFamily;\n textDivProperties.fontSize = fontHeight;\n textDiv.setAttribute(\"role\", \"presentation\");\n textDiv.textContent = geom.str;\n textDiv.dir = geom.dir;\n if (this.#fontInspectorEnabled) {\n textDiv.dataset.fontName = style.fontSubstitutionLoadedName || geom.fontName;\n }\n if (angle !== 0) {\n textDivProperties.angle = angle * (180 / Math.PI);\n }\n let shouldScaleText = false;\n if (geom.str.length > 1) {\n shouldScaleText = true;\n } else if (geom.str !== \" \" && geom.transform[0] !== geom.transform[3]) {\n const absScaleX = Math.abs(geom.transform[0]),\n absScaleY = Math.abs(geom.transform[3]);\n if (absScaleX !== absScaleY && Math.max(absScaleX, absScaleY) / Math.min(absScaleX, absScaleY) > 1.5) {\n shouldScaleText = true;\n }\n }\n if (shouldScaleText) {\n textDivProperties.canvasWidth = style.vertical ? geom.height : geom.width;\n }\n this.#textDivProperties.set(textDiv, textDivProperties);\n this.#layoutTextParams.div = textDiv;\n this.#layoutTextParams.properties = textDivProperties;\n this.#layout(this.#layoutTextParams);\n if (textDivProperties.hasText) {\n this.#container.append(textDiv);\n }\n if (textDivProperties.hasEOL) {\n const br = document.createElement(\"br\");\n br.setAttribute(\"role\", \"presentation\");\n this.#container.append(br);\n }\n }\n #layout(params) {\n const {\n div,\n properties,\n ctx\n } = params;\n const {\n style\n } = div;\n let transform = \"\";\n if (TextLayer.#minFontSize > 1) {\n transform = `scale(${1 / TextLayer.#minFontSize})`;\n }\n if (properties.canvasWidth !== 0 && properties.hasText) {\n const {\n fontFamily\n } = style;\n const {\n canvasWidth,\n fontSize\n } = properties;\n TextLayer.#ensureCtxFont(ctx, fontSize * this.#scale, fontFamily);\n const {\n width\n } = ctx.measureText(div.textContent);\n if (width > 0) {\n transform = `scaleX(${canvasWidth * this.#scale / width}) ${transform}`;\n }\n }\n if (properties.angle !== 0) {\n transform = `rotate(${properties.angle}deg) ${transform}`;\n }\n if (transform.length > 0) {\n style.transform = transform;\n }\n }\n static cleanup() {\n if (this.#pendingTextLayers.size > 0) {\n return;\n }\n this.#ascentCache.clear();\n for (const {\n canvas\n } of this.#canvasContexts.values()) {\n canvas.remove();\n }\n this.#canvasContexts.clear();\n }\n static #getCtx(lang = null) {\n let ctx = this.#canvasContexts.get(lang ||= \"\");\n if (!ctx) {\n const canvas = document.createElement(\"canvas\");\n canvas.className = \"hiddenCanvasElement\";\n canvas.lang = lang;\n document.body.append(canvas);\n ctx = canvas.getContext(\"2d\", {\n alpha: false,\n willReadFrequently: true\n });\n this.#canvasContexts.set(lang, ctx);\n this.#canvasCtxFonts.set(ctx, {\n size: 0,\n family: \"\"\n });\n }\n return ctx;\n }\n static #ensureCtxFont(ctx, size, family) {\n const cached = this.#canvasCtxFonts.get(ctx);\n if (size === cached.size && family === cached.family) {\n return;\n }\n ctx.font = `${size}px ${family}`;\n cached.size = size;\n cached.family = family;\n }\n static #ensureMinFontSizeComputed() {\n if (this.#minFontSize !== null) {\n return;\n }\n const div = document.createElement(\"div\");\n div.style.opacity = 0;\n div.style.lineHeight = 1;\n div.style.fontSize = \"1px\";\n div.style.position = \"absolute\";\n div.textContent = \"X\";\n document.body.append(div);\n this.#minFontSize = div.getBoundingClientRect().height;\n div.remove();\n }\n static #getAscent(fontFamily, lang) {\n const cachedAscent = this.#ascentCache.get(fontFamily);\n if (cachedAscent) {\n return cachedAscent;\n }\n const ctx = this.#getCtx(lang);\n ctx.canvas.width = ctx.canvas.height = DEFAULT_FONT_SIZE;\n this.#ensureCtxFont(ctx, DEFAULT_FONT_SIZE, fontFamily);\n const metrics = ctx.measureText(\"\");\n let ascent = metrics.fontBoundingBoxAscent;\n let descent = Math.abs(metrics.fontBoundingBoxDescent);\n if (ascent) {\n const ratio = ascent / (ascent + descent);\n this.#ascentCache.set(fontFamily, ratio);\n ctx.canvas.width = ctx.canvas.height = 0;\n return ratio;\n }\n ctx.strokeStyle = \"red\";\n ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n ctx.strokeText(\"g\", 0, 0);\n let pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n descent = 0;\n for (let i = pixels.length - 1 - 3; i >= 0; i -= 4) {\n if (pixels[i] > 0) {\n descent = Math.ceil(i / 4 / DEFAULT_FONT_SIZE);\n break;\n }\n }\n ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n ctx.strokeText(\"A\", 0, DEFAULT_FONT_SIZE);\n pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n ascent = 0;\n for (let i = 0, ii = pixels.length; i < ii; i += 4) {\n if (pixels[i] > 0) {\n ascent = DEFAULT_FONT_SIZE - Math.floor(i / 4 / DEFAULT_FONT_SIZE);\n break;\n }\n }\n ctx.canvas.width = ctx.canvas.height = 0;\n const ratio = ascent ? ascent / (ascent + descent) : DEFAULT_FONT_ASCENT;\n this.#ascentCache.set(fontFamily, ratio);\n return ratio;\n }\n}\n\n;// ./src/display/xfa_text.js\n\nclass XfaText {\n static textContent(xfa) {\n const items = [];\n const output = {\n items,\n styles: Object.create(null)\n };\n function walk(node) {\n if (!node) {\n return;\n }\n let str = null;\n const name = node.name;\n if (name === \"#text\") {\n str = node.value;\n } else if (!XfaText.shouldBuildText(name)) {\n return;\n } else if (node?.attributes?.textContent) {\n str = node.attributes.textContent;\n } else if (node.value) {\n str = node.value;\n }\n if (str !== null) {\n items.push({\n str\n });\n }\n if (!node.children) {\n return;\n }\n for (const child of node.children) {\n walk(child);\n }\n }\n walk(xfa);\n return output;\n }\n static shouldBuildText(name) {\n return !(name === \"textarea\" || name === \"input\" || name === \"option\" || name === \"select\");\n }\n}\n\n;// ./src/display/api.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst DEFAULT_RANGE_CHUNK_SIZE = 65536;\nconst RENDERING_CANCELLED_TIMEOUT = 100;\nconst DELAYED_CLEANUP_TIMEOUT = 5000;\nconst DefaultCanvasFactory = isNodeJS ? NodeCanvasFactory : DOMCanvasFactory;\nconst DefaultCMapReaderFactory = isNodeJS ? NodeCMapReaderFactory : DOMCMapReaderFactory;\nconst DefaultFilterFactory = isNodeJS ? NodeFilterFactory : DOMFilterFactory;\nconst DefaultStandardFontDataFactory = isNodeJS ? NodeStandardFontDataFactory : DOMStandardFontDataFactory;\nfunction getDocument(src = {}) {\n if (typeof src === \"string\" || src instanceof URL) {\n src = {\n url: src\n };\n } else if (src instanceof ArrayBuffer || ArrayBuffer.isView(src)) {\n src = {\n data: src\n };\n }\n const task = new PDFDocumentLoadingTask();\n const {\n docId\n } = task;\n const url = src.url ? getUrlProp(src.url) : null;\n const data = src.data ? getDataProp(src.data) : null;\n const httpHeaders = src.httpHeaders || null;\n const withCredentials = src.withCredentials === true;\n const password = src.password ?? null;\n const rangeTransport = src.range instanceof PDFDataRangeTransport ? src.range : null;\n const rangeChunkSize = Number.isInteger(src.rangeChunkSize) && src.rangeChunkSize > 0 ? src.rangeChunkSize : DEFAULT_RANGE_CHUNK_SIZE;\n let worker = src.worker instanceof PDFWorker ? src.worker : null;\n const verbosity = src.verbosity;\n const docBaseUrl = typeof src.docBaseUrl === \"string\" && !isDataScheme(src.docBaseUrl) ? src.docBaseUrl : null;\n const cMapUrl = typeof src.cMapUrl === \"string\" ? src.cMapUrl : null;\n const cMapPacked = src.cMapPacked !== false;\n const CMapReaderFactory = src.CMapReaderFactory || DefaultCMapReaderFactory;\n const standardFontDataUrl = typeof src.standardFontDataUrl === \"string\" ? src.standardFontDataUrl : null;\n const StandardFontDataFactory = src.StandardFontDataFactory || DefaultStandardFontDataFactory;\n const ignoreErrors = src.stopAtErrors !== true;\n const maxImageSize = Number.isInteger(src.maxImageSize) && src.maxImageSize > -1 ? src.maxImageSize : -1;\n const isEvalSupported = src.isEvalSupported !== false;\n const isOffscreenCanvasSupported = typeof src.isOffscreenCanvasSupported === \"boolean\" ? src.isOffscreenCanvasSupported : !isNodeJS;\n const canvasMaxAreaInBytes = Number.isInteger(src.canvasMaxAreaInBytes) ? src.canvasMaxAreaInBytes : -1;\n const disableFontFace = typeof src.disableFontFace === \"boolean\" ? src.disableFontFace : isNodeJS;\n const fontExtraProperties = src.fontExtraProperties === true;\n const enableXfa = src.enableXfa === true;\n const ownerDocument = src.ownerDocument || globalThis.document;\n const disableRange = src.disableRange === true;\n const disableStream = src.disableStream === true;\n const disableAutoFetch = src.disableAutoFetch === true;\n const pdfBug = src.pdfBug === true;\n const CanvasFactory = src.CanvasFactory || DefaultCanvasFactory;\n const FilterFactory = src.FilterFactory || DefaultFilterFactory;\n const enableHWA = src.enableHWA === true;\n const length = rangeTransport ? rangeTransport.length : src.length ?? NaN;\n const useSystemFonts = typeof src.useSystemFonts === \"boolean\" ? src.useSystemFonts : !isNodeJS && !disableFontFace;\n const useWorkerFetch = typeof src.useWorkerFetch === \"boolean\" ? src.useWorkerFetch : CMapReaderFactory === DOMCMapReaderFactory && StandardFontDataFactory === DOMStandardFontDataFactory && cMapUrl && standardFontDataUrl && isValidFetchUrl(cMapUrl, document.baseURI) && isValidFetchUrl(standardFontDataUrl, document.baseURI);\n if (src.canvasFactory) {\n deprecated(\"`canvasFactory`-instance option, please use `CanvasFactory` instead.\");\n }\n if (src.filterFactory) {\n deprecated(\"`filterFactory`-instance option, please use `FilterFactory` instead.\");\n }\n const styleElement = null;\n setVerbosityLevel(verbosity);\n const transportFactory = {\n canvasFactory: new CanvasFactory({\n ownerDocument,\n enableHWA\n }),\n filterFactory: new FilterFactory({\n docId,\n ownerDocument\n }),\n cMapReaderFactory: useWorkerFetch ? null : new CMapReaderFactory({\n baseUrl: cMapUrl,\n isCompressed: cMapPacked\n }),\n standardFontDataFactory: useWorkerFetch ? null : new StandardFontDataFactory({\n baseUrl: standardFontDataUrl\n })\n };\n if (!worker) {\n const workerParams = {\n verbosity,\n port: GlobalWorkerOptions.workerPort\n };\n worker = workerParams.port ? PDFWorker.fromPort(workerParams) : new PDFWorker(workerParams);\n task._worker = worker;\n }\n const docParams = {\n docId,\n apiVersion: \"4.7.76\",\n data,\n password,\n disableAutoFetch,\n rangeChunkSize,\n length,\n docBaseUrl,\n enableXfa,\n evaluatorOptions: {\n maxImageSize,\n disableFontFace,\n ignoreErrors,\n isEvalSupported,\n isOffscreenCanvasSupported,\n canvasMaxAreaInBytes,\n fontExtraProperties,\n useSystemFonts,\n cMapUrl: useWorkerFetch ? cMapUrl : null,\n standardFontDataUrl: useWorkerFetch ? standardFontDataUrl : null\n }\n };\n const transportParams = {\n disableFontFace,\n fontExtraProperties,\n ownerDocument,\n pdfBug,\n styleElement,\n loadingParams: {\n disableAutoFetch,\n enableXfa\n }\n };\n worker.promise.then(function () {\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n if (worker.destroyed) {\n throw new Error(\"Worker was destroyed\");\n }\n const workerIdPromise = worker.messageHandler.sendWithPromise(\"GetDocRequest\", docParams, data ? [data.buffer] : null);\n let networkStream;\n if (rangeTransport) {\n networkStream = new PDFDataTransportStream(rangeTransport, {\n disableRange,\n disableStream\n });\n } else if (!data) {\n if (!url) {\n throw new Error(\"getDocument - no `url` parameter provided.\");\n }\n let NetworkStream;\n if (isNodeJS) {\n const isFetchSupported = typeof fetch !== \"undefined\" && typeof Response !== \"undefined\" && \"body\" in Response.prototype;\n NetworkStream = isFetchSupported && isValidFetchUrl(url) ? PDFFetchStream : PDFNodeStream;\n } else {\n NetworkStream = isValidFetchUrl(url) ? PDFFetchStream : PDFNetworkStream;\n }\n networkStream = new NetworkStream({\n url,\n length,\n httpHeaders,\n withCredentials,\n rangeChunkSize,\n disableRange,\n disableStream\n });\n }\n return workerIdPromise.then(workerId => {\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n if (worker.destroyed) {\n throw new Error(\"Worker was destroyed\");\n }\n const messageHandler = new MessageHandler(docId, workerId, worker.port);\n const transport = new WorkerTransport(messageHandler, task, networkStream, transportParams, transportFactory);\n task._transport = transport;\n messageHandler.send(\"Ready\", null);\n });\n }).catch(task._capability.reject);\n return task;\n}\nfunction getUrlProp(val) {\n if (val instanceof URL) {\n return val.href;\n }\n try {\n return new URL(val, window.location).href;\n } catch {\n if (isNodeJS && typeof val === \"string\") {\n return val;\n }\n }\n throw new Error(\"Invalid PDF url data: \" + \"either string or URL-object is expected in the url property.\");\n}\nfunction getDataProp(val) {\n if (isNodeJS && typeof Buffer !== \"undefined\" && val instanceof Buffer) {\n throw new Error(\"Please provide binary data as `Uint8Array`, rather than `Buffer`.\");\n }\n if (val instanceof Uint8Array && val.byteLength === val.buffer.byteLength) {\n return val;\n }\n if (typeof val === \"string\") {\n return stringToBytes(val);\n }\n if (val instanceof ArrayBuffer || ArrayBuffer.isView(val) || typeof val === \"object\" && !isNaN(val?.length)) {\n return new Uint8Array(val);\n }\n throw new Error(\"Invalid PDF binary data: either TypedArray, \" + \"string, or array-like object is expected in the data property.\");\n}\nfunction isRefProxy(ref) {\n return typeof ref === \"object\" && Number.isInteger(ref?.num) && ref.num >= 0 && Number.isInteger(ref?.gen) && ref.gen >= 0;\n}\nclass PDFDocumentLoadingTask {\n static #docId = 0;\n constructor() {\n this._capability = Promise.withResolvers();\n this._transport = null;\n this._worker = null;\n this.docId = `d${PDFDocumentLoadingTask.#docId++}`;\n this.destroyed = false;\n this.onPassword = null;\n this.onProgress = null;\n }\n get promise() {\n return this._capability.promise;\n }\n async destroy() {\n this.destroyed = true;\n try {\n if (this._worker?.port) {\n this._worker._pendingDestroy = true;\n }\n await this._transport?.destroy();\n } catch (ex) {\n if (this._worker?.port) {\n delete this._worker._pendingDestroy;\n }\n throw ex;\n }\n this._transport = null;\n if (this._worker) {\n this._worker.destroy();\n this._worker = null;\n }\n }\n}\nclass PDFDataRangeTransport {\n constructor(length, initialData, progressiveDone = false, contentDispositionFilename = null) {\n this.length = length;\n this.initialData = initialData;\n this.progressiveDone = progressiveDone;\n this.contentDispositionFilename = contentDispositionFilename;\n this._rangeListeners = [];\n this._progressListeners = [];\n this._progressiveReadListeners = [];\n this._progressiveDoneListeners = [];\n this._readyCapability = Promise.withResolvers();\n }\n addRangeListener(listener) {\n this._rangeListeners.push(listener);\n }\n addProgressListener(listener) {\n this._progressListeners.push(listener);\n }\n addProgressiveReadListener(listener) {\n this._progressiveReadListeners.push(listener);\n }\n addProgressiveDoneListener(listener) {\n this._progressiveDoneListeners.push(listener);\n }\n onDataRange(begin, chunk) {\n for (const listener of this._rangeListeners) {\n listener(begin, chunk);\n }\n }\n onDataProgress(loaded, total) {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressListeners) {\n listener(loaded, total);\n }\n });\n }\n onDataProgressiveRead(chunk) {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressiveReadListeners) {\n listener(chunk);\n }\n });\n }\n onDataProgressiveDone() {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressiveDoneListeners) {\n listener();\n }\n });\n }\n transportReady() {\n this._readyCapability.resolve();\n }\n requestDataRange(begin, end) {\n unreachable(\"Abstract method PDFDataRangeTransport.requestDataRange\");\n }\n abort() {}\n}\nclass PDFDocumentProxy {\n constructor(pdfInfo, transport) {\n this._pdfInfo = pdfInfo;\n this._transport = transport;\n }\n get annotationStorage() {\n return this._transport.annotationStorage;\n }\n get canvasFactory() {\n return this._transport.canvasFactory;\n }\n get filterFactory() {\n return this._transport.filterFactory;\n }\n get numPages() {\n return this._pdfInfo.numPages;\n }\n get fingerprints() {\n return this._pdfInfo.fingerprints;\n }\n get isPureXfa() {\n return shadow(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n }\n get allXfaHtml() {\n return this._transport._htmlForXfa;\n }\n getPage(pageNumber) {\n return this._transport.getPage(pageNumber);\n }\n getPageIndex(ref) {\n return this._transport.getPageIndex(ref);\n }\n getDestinations() {\n return this._transport.getDestinations();\n }\n getDestination(id) {\n return this._transport.getDestination(id);\n }\n getPageLabels() {\n return this._transport.getPageLabels();\n }\n getPageLayout() {\n return this._transport.getPageLayout();\n }\n getPageMode() {\n return this._transport.getPageMode();\n }\n getViewerPreferences() {\n return this._transport.getViewerPreferences();\n }\n getOpenAction() {\n return this._transport.getOpenAction();\n }\n getAttachments() {\n return this._transport.getAttachments();\n }\n getJSActions() {\n return this._transport.getDocJSActions();\n }\n getOutline() {\n return this._transport.getOutline();\n }\n getOptionalContentConfig({\n intent = \"display\"\n } = {}) {\n const {\n renderingIntent\n } = this._transport.getRenderingIntent(intent);\n return this._transport.getOptionalContentConfig(renderingIntent);\n }\n getPermissions() {\n return this._transport.getPermissions();\n }\n getMetadata() {\n return this._transport.getMetadata();\n }\n getMarkInfo() {\n return this._transport.getMarkInfo();\n }\n getData() {\n return this._transport.getData();\n }\n saveDocument() {\n return this._transport.saveDocument();\n }\n getDownloadInfo() {\n return this._transport.downloadInfoCapability.promise;\n }\n cleanup(keepLoadedFonts = false) {\n return this._transport.startCleanup(keepLoadedFonts || this.isPureXfa);\n }\n destroy() {\n return this.loadingTask.destroy();\n }\n cachedPageNumber(ref) {\n return this._transport.cachedPageNumber(ref);\n }\n get loadingParams() {\n return this._transport.loadingParams;\n }\n get loadingTask() {\n return this._transport.loadingTask;\n }\n getFieldObjects() {\n return this._transport.getFieldObjects();\n }\n hasJSActions() {\n return this._transport.hasJSActions();\n }\n getCalculationOrderIds() {\n return this._transport.getCalculationOrderIds();\n }\n}\nclass PDFPageProxy {\n #delayedCleanupTimeout = null;\n #pendingCleanup = false;\n constructor(pageIndex, pageInfo, transport, pdfBug = false) {\n this._pageIndex = pageIndex;\n this._pageInfo = pageInfo;\n this._transport = transport;\n this._stats = pdfBug ? new StatTimer() : null;\n this._pdfBug = pdfBug;\n this.commonObjs = transport.commonObjs;\n this.objs = new PDFObjects();\n this._maybeCleanupAfterRender = false;\n this._intentStates = new Map();\n this.destroyed = false;\n }\n get pageNumber() {\n return this._pageIndex + 1;\n }\n get rotate() {\n return this._pageInfo.rotate;\n }\n get ref() {\n return this._pageInfo.ref;\n }\n get userUnit() {\n return this._pageInfo.userUnit;\n }\n get view() {\n return this._pageInfo.view;\n }\n getViewport({\n scale,\n rotation = this.rotate,\n offsetX = 0,\n offsetY = 0,\n dontFlip = false\n } = {}) {\n return new PageViewport({\n viewBox: this.view,\n scale,\n rotation,\n offsetX,\n offsetY,\n dontFlip\n });\n }\n getAnnotations({\n intent = \"display\"\n } = {}) {\n const {\n renderingIntent\n } = this._transport.getRenderingIntent(intent);\n return this._transport.getAnnotations(this._pageIndex, renderingIntent);\n }\n getJSActions() {\n return this._transport.getPageJSActions(this._pageIndex);\n }\n get filterFactory() {\n return this._transport.filterFactory;\n }\n get isPureXfa() {\n return shadow(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n }\n async getXfa() {\n return this._transport._htmlForXfa?.children[this._pageIndex] || null;\n }\n render({\n canvasContext,\n viewport,\n intent = \"display\",\n annotationMode = AnnotationMode.ENABLE,\n transform = null,\n background = null,\n optionalContentConfigPromise = null,\n annotationCanvasMap = null,\n pageColors = null,\n printAnnotationStorage = null,\n isEditing = false\n }) {\n this._stats?.time(\"Overall\");\n const intentArgs = this._transport.getRenderingIntent(intent, annotationMode, printAnnotationStorage, isEditing);\n const {\n renderingIntent,\n cacheKey\n } = intentArgs;\n this.#pendingCleanup = false;\n this.#abortDelayedCleanup();\n optionalContentConfigPromise ||= this._transport.getOptionalContentConfig(renderingIntent);\n let intentState = this._intentStates.get(cacheKey);\n if (!intentState) {\n intentState = Object.create(null);\n this._intentStates.set(cacheKey, intentState);\n }\n if (intentState.streamReaderCancelTimeout) {\n clearTimeout(intentState.streamReaderCancelTimeout);\n intentState.streamReaderCancelTimeout = null;\n }\n const intentPrint = !!(renderingIntent & RenderingIntentFlag.PRINT);\n if (!intentState.displayReadyCapability) {\n intentState.displayReadyCapability = Promise.withResolvers();\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n separateAnnots: null\n };\n this._stats?.time(\"Page Request\");\n this._pumpOperatorList(intentArgs);\n }\n const complete = error => {\n intentState.renderTasks.delete(internalRenderTask);\n if (this._maybeCleanupAfterRender || intentPrint) {\n this.#pendingCleanup = true;\n }\n this.#tryCleanup(!intentPrint);\n if (error) {\n internalRenderTask.capability.reject(error);\n this._abortOperatorList({\n intentState,\n reason: error instanceof Error ? error : new Error(error)\n });\n } else {\n internalRenderTask.capability.resolve();\n }\n if (this._stats) {\n this._stats.timeEnd(\"Rendering\");\n this._stats.timeEnd(\"Overall\");\n if (globalThis.Stats?.enabled) {\n globalThis.Stats.add(this.pageNumber, this._stats);\n }\n }\n };\n const internalRenderTask = new InternalRenderTask({\n callback: complete,\n params: {\n canvasContext,\n viewport,\n transform,\n background\n },\n objs: this.objs,\n commonObjs: this.commonObjs,\n annotationCanvasMap,\n operatorList: intentState.operatorList,\n pageIndex: this._pageIndex,\n canvasFactory: this._transport.canvasFactory,\n filterFactory: this._transport.filterFactory,\n useRequestAnimationFrame: !intentPrint,\n pdfBug: this._pdfBug,\n pageColors\n });\n (intentState.renderTasks ||= new Set()).add(internalRenderTask);\n const renderTask = internalRenderTask.task;\n Promise.all([intentState.displayReadyCapability.promise, optionalContentConfigPromise]).then(([transparency, optionalContentConfig]) => {\n if (this.destroyed) {\n complete();\n return;\n }\n this._stats?.time(\"Rendering\");\n if (!(optionalContentConfig.renderingIntent & renderingIntent)) {\n throw new Error(\"Must use the same `intent`-argument when calling the `PDFPageProxy.render` \" + \"and `PDFDocumentProxy.getOptionalContentConfig` methods.\");\n }\n internalRenderTask.initializeGraphics({\n transparency,\n optionalContentConfig\n });\n internalRenderTask.operatorListChanged();\n }).catch(complete);\n return renderTask;\n }\n getOperatorList({\n intent = \"display\",\n annotationMode = AnnotationMode.ENABLE,\n printAnnotationStorage = null,\n isEditing = false\n } = {}) {\n function operatorListChanged() {\n if (intentState.operatorList.lastChunk) {\n intentState.opListReadCapability.resolve(intentState.operatorList);\n intentState.renderTasks.delete(opListTask);\n }\n }\n const intentArgs = this._transport.getRenderingIntent(intent, annotationMode, printAnnotationStorage, isEditing, true);\n let intentState = this._intentStates.get(intentArgs.cacheKey);\n if (!intentState) {\n intentState = Object.create(null);\n this._intentStates.set(intentArgs.cacheKey, intentState);\n }\n let opListTask;\n if (!intentState.opListReadCapability) {\n opListTask = Object.create(null);\n opListTask.operatorListChanged = operatorListChanged;\n intentState.opListReadCapability = Promise.withResolvers();\n (intentState.renderTasks ||= new Set()).add(opListTask);\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n separateAnnots: null\n };\n this._stats?.time(\"Page Request\");\n this._pumpOperatorList(intentArgs);\n }\n return intentState.opListReadCapability.promise;\n }\n streamTextContent({\n includeMarkedContent = false,\n disableNormalization = false\n } = {}) {\n const TEXT_CONTENT_CHUNK_SIZE = 100;\n return this._transport.messageHandler.sendWithStream(\"GetTextContent\", {\n pageIndex: this._pageIndex,\n includeMarkedContent: includeMarkedContent === true,\n disableNormalization: disableNormalization === true\n }, {\n highWaterMark: TEXT_CONTENT_CHUNK_SIZE,\n size(textContent) {\n return textContent.items.length;\n }\n });\n }\n getTextContent(params = {}) {\n if (this._transport._htmlForXfa) {\n return this.getXfa().then(xfa => XfaText.textContent(xfa));\n }\n const readableStream = this.streamTextContent(params);\n return new Promise(function (resolve, reject) {\n function pump() {\n reader.read().then(function ({\n value,\n done\n }) {\n if (done) {\n resolve(textContent);\n return;\n }\n textContent.lang ??= value.lang;\n Object.assign(textContent.styles, value.styles);\n textContent.items.push(...value.items);\n pump();\n }, reject);\n }\n const reader = readableStream.getReader();\n const textContent = {\n items: [],\n styles: Object.create(null),\n lang: null\n };\n pump();\n });\n }\n getStructTree() {\n return this._transport.getStructTree(this._pageIndex);\n }\n _destroy() {\n this.destroyed = true;\n const waitOn = [];\n for (const intentState of this._intentStates.values()) {\n this._abortOperatorList({\n intentState,\n reason: new Error(\"Page was destroyed.\"),\n force: true\n });\n if (intentState.opListReadCapability) {\n continue;\n }\n for (const internalRenderTask of intentState.renderTasks) {\n waitOn.push(internalRenderTask.completed);\n internalRenderTask.cancel();\n }\n }\n this.objs.clear();\n this.#pendingCleanup = false;\n this.#abortDelayedCleanup();\n return Promise.all(waitOn);\n }\n cleanup(resetStats = false) {\n this.#pendingCleanup = true;\n const success = this.#tryCleanup(false);\n if (resetStats && success) {\n this._stats &&= new StatTimer();\n }\n return success;\n }\n #tryCleanup(delayed = false) {\n this.#abortDelayedCleanup();\n if (!this.#pendingCleanup || this.destroyed) {\n return false;\n }\n if (delayed) {\n this.#delayedCleanupTimeout = setTimeout(() => {\n this.#delayedCleanupTimeout = null;\n this.#tryCleanup(false);\n }, DELAYED_CLEANUP_TIMEOUT);\n return false;\n }\n for (const {\n renderTasks,\n operatorList\n } of this._intentStates.values()) {\n if (renderTasks.size > 0 || !operatorList.lastChunk) {\n return false;\n }\n }\n this._intentStates.clear();\n this.objs.clear();\n this.#pendingCleanup = false;\n return true;\n }\n #abortDelayedCleanup() {\n if (this.#delayedCleanupTimeout) {\n clearTimeout(this.#delayedCleanupTimeout);\n this.#delayedCleanupTimeout = null;\n }\n }\n _startRenderPage(transparency, cacheKey) {\n const intentState = this._intentStates.get(cacheKey);\n if (!intentState) {\n return;\n }\n this._stats?.timeEnd(\"Page Request\");\n intentState.displayReadyCapability?.resolve(transparency);\n }\n _renderPageChunk(operatorListChunk, intentState) {\n for (let i = 0, ii = operatorListChunk.length; i < ii; i++) {\n intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);\n intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]);\n }\n intentState.operatorList.lastChunk = operatorListChunk.lastChunk;\n intentState.operatorList.separateAnnots = operatorListChunk.separateAnnots;\n for (const internalRenderTask of intentState.renderTasks) {\n internalRenderTask.operatorListChanged();\n }\n if (operatorListChunk.lastChunk) {\n this.#tryCleanup(true);\n }\n }\n _pumpOperatorList({\n renderingIntent,\n cacheKey,\n annotationStorageSerializable,\n modifiedIds\n }) {\n const {\n map,\n transfer\n } = annotationStorageSerializable;\n const readableStream = this._transport.messageHandler.sendWithStream(\"GetOperatorList\", {\n pageIndex: this._pageIndex,\n intent: renderingIntent,\n cacheKey,\n annotationStorage: map,\n modifiedIds\n }, transfer);\n const reader = readableStream.getReader();\n const intentState = this._intentStates.get(cacheKey);\n intentState.streamReader = reader;\n const pump = () => {\n reader.read().then(({\n value,\n done\n }) => {\n if (done) {\n intentState.streamReader = null;\n return;\n }\n if (this._transport.destroyed) {\n return;\n }\n this._renderPageChunk(value, intentState);\n pump();\n }, reason => {\n intentState.streamReader = null;\n if (this._transport.destroyed) {\n return;\n }\n if (intentState.operatorList) {\n intentState.operatorList.lastChunk = true;\n for (const internalRenderTask of intentState.renderTasks) {\n internalRenderTask.operatorListChanged();\n }\n this.#tryCleanup(true);\n }\n if (intentState.displayReadyCapability) {\n intentState.displayReadyCapability.reject(reason);\n } else if (intentState.opListReadCapability) {\n intentState.opListReadCapability.reject(reason);\n } else {\n throw reason;\n }\n });\n };\n pump();\n }\n _abortOperatorList({\n intentState,\n reason,\n force = false\n }) {\n if (!intentState.streamReader) {\n return;\n }\n if (intentState.streamReaderCancelTimeout) {\n clearTimeout(intentState.streamReaderCancelTimeout);\n intentState.streamReaderCancelTimeout = null;\n }\n if (!force) {\n if (intentState.renderTasks.size > 0) {\n return;\n }\n if (reason instanceof RenderingCancelledException) {\n let delay = RENDERING_CANCELLED_TIMEOUT;\n if (reason.extraDelay > 0 && reason.extraDelay < 1000) {\n delay += reason.extraDelay;\n }\n intentState.streamReaderCancelTimeout = setTimeout(() => {\n intentState.streamReaderCancelTimeout = null;\n this._abortOperatorList({\n intentState,\n reason,\n force: true\n });\n }, delay);\n return;\n }\n }\n intentState.streamReader.cancel(new AbortException(reason.message)).catch(() => {});\n intentState.streamReader = null;\n if (this._transport.destroyed) {\n return;\n }\n for (const [curCacheKey, curIntentState] of this._intentStates) {\n if (curIntentState === intentState) {\n this._intentStates.delete(curCacheKey);\n break;\n }\n }\n this.cleanup();\n }\n get stats() {\n return this._stats;\n }\n}\nclass LoopbackPort {\n #listeners = new Set();\n #deferred = Promise.resolve();\n postMessage(obj, transfer) {\n const event = {\n data: structuredClone(obj, transfer ? {\n transfer\n } : null)\n };\n this.#deferred.then(() => {\n for (const listener of this.#listeners) {\n listener.call(this, event);\n }\n });\n }\n addEventListener(name, listener) {\n this.#listeners.add(listener);\n }\n removeEventListener(name, listener) {\n this.#listeners.delete(listener);\n }\n terminate() {\n this.#listeners.clear();\n }\n}\nclass PDFWorker {\n static #fakeWorkerId = 0;\n static #isWorkerDisabled = false;\n static #workerPorts;\n static {\n if (isNodeJS) {\n this.#isWorkerDisabled = true;\n GlobalWorkerOptions.workerSrc ||= \"./pdf.worker.mjs\";\n }\n this._isSameOrigin = (baseUrl, otherUrl) => {\n let base;\n try {\n base = new URL(baseUrl);\n if (!base.origin || base.origin === \"null\") {\n return false;\n }\n } catch {\n return false;\n }\n const other = new URL(otherUrl, base);\n return base.origin === other.origin;\n };\n this._createCDNWrapper = url => {\n const wrapper = `await import(\"${url}\");`;\n return URL.createObjectURL(new Blob([wrapper], {\n type: \"text/javascript\"\n }));\n };\n }\n constructor({\n name = null,\n port = null,\n verbosity = getVerbosityLevel()\n } = {}) {\n this.name = name;\n this.destroyed = false;\n this.verbosity = verbosity;\n this._readyCapability = Promise.withResolvers();\n this._port = null;\n this._webWorker = null;\n this._messageHandler = null;\n if (port) {\n if (PDFWorker.#workerPorts?.has(port)) {\n throw new Error(\"Cannot use more than one PDFWorker per port.\");\n }\n (PDFWorker.#workerPorts ||= new WeakMap()).set(port, this);\n this._initializeFromPort(port);\n return;\n }\n this._initialize();\n }\n get promise() {\n if (isNodeJS) {\n return Promise.all([NodePackages.promise, this._readyCapability.promise]);\n }\n return this._readyCapability.promise;\n }\n #resolve() {\n this._readyCapability.resolve();\n this._messageHandler.send(\"configure\", {\n verbosity: this.verbosity\n });\n }\n get port() {\n return this._port;\n }\n get messageHandler() {\n return this._messageHandler;\n }\n _initializeFromPort(port) {\n this._port = port;\n this._messageHandler = new MessageHandler(\"main\", \"worker\", port);\n this._messageHandler.on(\"ready\", function () {});\n this.#resolve();\n }\n _initialize() {\n if (PDFWorker.#isWorkerDisabled || PDFWorker.#mainThreadWorkerMessageHandler) {\n this._setupFakeWorker();\n return;\n }\n let {\n workerSrc\n } = PDFWorker;\n try {\n if (!PDFWorker._isSameOrigin(window.location.href, workerSrc)) {\n workerSrc = PDFWorker._createCDNWrapper(new URL(workerSrc, window.location).href);\n }\n const worker = new Worker(workerSrc, {\n type: \"module\"\n });\n const messageHandler = new MessageHandler(\"main\", \"worker\", worker);\n const terminateEarly = () => {\n ac.abort();\n messageHandler.destroy();\n worker.terminate();\n if (this.destroyed) {\n this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n } else {\n this._setupFakeWorker();\n }\n };\n const ac = new AbortController();\n worker.addEventListener(\"error\", () => {\n if (!this._webWorker) {\n terminateEarly();\n }\n }, {\n signal: ac.signal\n });\n messageHandler.on(\"test\", data => {\n ac.abort();\n if (this.destroyed || !data) {\n terminateEarly();\n return;\n }\n this._messageHandler = messageHandler;\n this._port = worker;\n this._webWorker = worker;\n this.#resolve();\n });\n messageHandler.on(\"ready\", data => {\n ac.abort();\n if (this.destroyed) {\n terminateEarly();\n return;\n }\n try {\n sendTest();\n } catch {\n this._setupFakeWorker();\n }\n });\n const sendTest = () => {\n const testObj = new Uint8Array();\n messageHandler.send(\"test\", testObj, [testObj.buffer]);\n };\n sendTest();\n return;\n } catch {\n info(\"The worker has been disabled.\");\n }\n this._setupFakeWorker();\n }\n _setupFakeWorker() {\n if (!PDFWorker.#isWorkerDisabled) {\n warn(\"Setting up fake worker.\");\n PDFWorker.#isWorkerDisabled = true;\n }\n PDFWorker._setupFakeWorkerGlobal.then(WorkerMessageHandler => {\n if (this.destroyed) {\n this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n return;\n }\n const port = new LoopbackPort();\n this._port = port;\n const id = `fake${PDFWorker.#fakeWorkerId++}`;\n const workerHandler = new MessageHandler(id + \"_worker\", id, port);\n WorkerMessageHandler.setup(workerHandler, port);\n this._messageHandler = new MessageHandler(id, id + \"_worker\", port);\n this.#resolve();\n }).catch(reason => {\n this._readyCapability.reject(new Error(`Setting up fake worker failed: \"${reason.message}\".`));\n });\n }\n destroy() {\n this.destroyed = true;\n if (this._webWorker) {\n this._webWorker.terminate();\n this._webWorker = null;\n }\n PDFWorker.#workerPorts?.delete(this._port);\n this._port = null;\n if (this._messageHandler) {\n this._messageHandler.destroy();\n this._messageHandler = null;\n }\n }\n static fromPort(params) {\n if (!params?.port) {\n throw new Error(\"PDFWorker.fromPort - invalid method signature.\");\n }\n const cachedPort = this.#workerPorts?.get(params.port);\n if (cachedPort) {\n if (cachedPort._pendingDestroy) {\n throw new Error(\"PDFWorker.fromPort - the worker is being destroyed.\\n\" + \"Please remember to await `PDFDocumentLoadingTask.destroy()`-calls.\");\n }\n return cachedPort;\n }\n return new PDFWorker(params);\n }\n static get workerSrc() {\n if (GlobalWorkerOptions.workerSrc) {\n return GlobalWorkerOptions.workerSrc;\n }\n throw new Error('No \"GlobalWorkerOptions.workerSrc\" specified.');\n }\n static get #mainThreadWorkerMessageHandler() {\n try {\n return globalThis.pdfjsWorker?.WorkerMessageHandler || null;\n } catch {\n return null;\n }\n }\n static get _setupFakeWorkerGlobal() {\n const loader = async () => {\n if (this.#mainThreadWorkerMessageHandler) {\n return this.#mainThreadWorkerMessageHandler;\n }\n const worker = await import(/*webpackIgnore: true*/this.workerSrc);\n return worker.WorkerMessageHandler;\n };\n return shadow(this, \"_setupFakeWorkerGlobal\", loader());\n }\n}\nclass WorkerTransport {\n #methodPromises = new Map();\n #pageCache = new Map();\n #pagePromises = new Map();\n #pageRefCache = new Map();\n #passwordCapability = null;\n constructor(messageHandler, loadingTask, networkStream, params, factory) {\n this.messageHandler = messageHandler;\n this.loadingTask = loadingTask;\n this.commonObjs = new PDFObjects();\n this.fontLoader = new FontLoader({\n ownerDocument: params.ownerDocument,\n styleElement: params.styleElement\n });\n this.loadingParams = params.loadingParams;\n this._params = params;\n this.canvasFactory = factory.canvasFactory;\n this.filterFactory = factory.filterFactory;\n this.cMapReaderFactory = factory.cMapReaderFactory;\n this.standardFontDataFactory = factory.standardFontDataFactory;\n this.destroyed = false;\n this.destroyCapability = null;\n this._networkStream = networkStream;\n this._fullReader = null;\n this._lastProgress = null;\n this.downloadInfoCapability = Promise.withResolvers();\n this.setupMessageHandler();\n }\n #cacheSimpleMethod(name, data = null) {\n const cachedPromise = this.#methodPromises.get(name);\n if (cachedPromise) {\n return cachedPromise;\n }\n const promise = this.messageHandler.sendWithPromise(name, data);\n this.#methodPromises.set(name, promise);\n return promise;\n }\n get annotationStorage() {\n return shadow(this, \"annotationStorage\", new AnnotationStorage());\n }\n getRenderingIntent(intent, annotationMode = AnnotationMode.ENABLE, printAnnotationStorage = null, isEditing = false, isOpList = false) {\n let renderingIntent = RenderingIntentFlag.DISPLAY;\n let annotationStorageSerializable = SerializableEmpty;\n switch (intent) {\n case \"any\":\n renderingIntent = RenderingIntentFlag.ANY;\n break;\n case \"display\":\n break;\n case \"print\":\n renderingIntent = RenderingIntentFlag.PRINT;\n break;\n default:\n warn(`getRenderingIntent - invalid intent: ${intent}`);\n }\n const annotationStorage = renderingIntent & RenderingIntentFlag.PRINT && printAnnotationStorage instanceof PrintAnnotationStorage ? printAnnotationStorage : this.annotationStorage;\n switch (annotationMode) {\n case AnnotationMode.DISABLE:\n renderingIntent += RenderingIntentFlag.ANNOTATIONS_DISABLE;\n break;\n case AnnotationMode.ENABLE:\n break;\n case AnnotationMode.ENABLE_FORMS:\n renderingIntent += RenderingIntentFlag.ANNOTATIONS_FORMS;\n break;\n case AnnotationMode.ENABLE_STORAGE:\n renderingIntent += RenderingIntentFlag.ANNOTATIONS_STORAGE;\n annotationStorageSerializable = annotationStorage.serializable;\n break;\n default:\n warn(`getRenderingIntent - invalid annotationMode: ${annotationMode}`);\n }\n if (isEditing) {\n renderingIntent += RenderingIntentFlag.IS_EDITING;\n }\n if (isOpList) {\n renderingIntent += RenderingIntentFlag.OPLIST;\n }\n const {\n ids: modifiedIds,\n hash: modifiedIdsHash\n } = annotationStorage.modifiedIds;\n const cacheKeyBuf = [renderingIntent, annotationStorageSerializable.hash, modifiedIdsHash];\n return {\n renderingIntent,\n cacheKey: cacheKeyBuf.join(\"_\"),\n annotationStorageSerializable,\n modifiedIds\n };\n }\n destroy() {\n if (this.destroyCapability) {\n return this.destroyCapability.promise;\n }\n this.destroyed = true;\n this.destroyCapability = Promise.withResolvers();\n this.#passwordCapability?.reject(new Error(\"Worker was destroyed during onPassword callback\"));\n const waitOn = [];\n for (const page of this.#pageCache.values()) {\n waitOn.push(page._destroy());\n }\n this.#pageCache.clear();\n this.#pagePromises.clear();\n this.#pageRefCache.clear();\n if (this.hasOwnProperty(\"annotationStorage\")) {\n this.annotationStorage.resetModified();\n }\n const terminated = this.messageHandler.sendWithPromise(\"Terminate\", null);\n waitOn.push(terminated);\n Promise.all(waitOn).then(() => {\n this.commonObjs.clear();\n this.fontLoader.clear();\n this.#methodPromises.clear();\n this.filterFactory.destroy();\n TextLayer.cleanup();\n this._networkStream?.cancelAllRequests(new AbortException(\"Worker was terminated.\"));\n if (this.messageHandler) {\n this.messageHandler.destroy();\n this.messageHandler = null;\n }\n this.destroyCapability.resolve();\n }, this.destroyCapability.reject);\n return this.destroyCapability.promise;\n }\n setupMessageHandler() {\n const {\n messageHandler,\n loadingTask\n } = this;\n messageHandler.on(\"GetReader\", (data, sink) => {\n assert(this._networkStream, \"GetReader - no `IPDFStream` instance available.\");\n this._fullReader = this._networkStream.getFullReader();\n this._fullReader.onProgress = evt => {\n this._lastProgress = {\n loaded: evt.loaded,\n total: evt.total\n };\n };\n sink.onPull = () => {\n this._fullReader.read().then(function ({\n value,\n done\n }) {\n if (done) {\n sink.close();\n return;\n }\n assert(value instanceof ArrayBuffer, \"GetReader - expected an ArrayBuffer.\");\n sink.enqueue(new Uint8Array(value), 1, [value]);\n }).catch(reason => {\n sink.error(reason);\n });\n };\n sink.onCancel = reason => {\n this._fullReader.cancel(reason);\n sink.ready.catch(readyReason => {\n if (this.destroyed) {\n return;\n }\n throw readyReason;\n });\n };\n });\n messageHandler.on(\"ReaderHeadersReady\", data => {\n const headersCapability = Promise.withResolvers();\n const fullReader = this._fullReader;\n fullReader.headersReady.then(() => {\n if (!fullReader.isStreamingSupported || !fullReader.isRangeSupported) {\n if (this._lastProgress) {\n loadingTask.onProgress?.(this._lastProgress);\n }\n fullReader.onProgress = evt => {\n loadingTask.onProgress?.({\n loaded: evt.loaded,\n total: evt.total\n });\n };\n }\n headersCapability.resolve({\n isStreamingSupported: fullReader.isStreamingSupported,\n isRangeSupported: fullReader.isRangeSupported,\n contentLength: fullReader.contentLength\n });\n }, headersCapability.reject);\n return headersCapability.promise;\n });\n messageHandler.on(\"GetRangeReader\", (data, sink) => {\n assert(this._networkStream, \"GetRangeReader - no `IPDFStream` instance available.\");\n const rangeReader = this._networkStream.getRangeReader(data.begin, data.end);\n if (!rangeReader) {\n sink.close();\n return;\n }\n sink.onPull = () => {\n rangeReader.read().then(function ({\n value,\n done\n }) {\n if (done) {\n sink.close();\n return;\n }\n assert(value instanceof ArrayBuffer, \"GetRangeReader - expected an ArrayBuffer.\");\n sink.enqueue(new Uint8Array(value), 1, [value]);\n }).catch(reason => {\n sink.error(reason);\n });\n };\n sink.onCancel = reason => {\n rangeReader.cancel(reason);\n sink.ready.catch(readyReason => {\n if (this.destroyed) {\n return;\n }\n throw readyReason;\n });\n };\n });\n messageHandler.on(\"GetDoc\", ({\n pdfInfo\n }) => {\n this._numPages = pdfInfo.numPages;\n this._htmlForXfa = pdfInfo.htmlForXfa;\n delete pdfInfo.htmlForXfa;\n loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, this));\n });\n messageHandler.on(\"DocException\", function (ex) {\n let reason;\n switch (ex.name) {\n case \"PasswordException\":\n reason = new PasswordException(ex.message, ex.code);\n break;\n case \"InvalidPDFException\":\n reason = new InvalidPDFException(ex.message);\n break;\n case \"MissingPDFException\":\n reason = new MissingPDFException(ex.message);\n break;\n case \"UnexpectedResponseException\":\n reason = new UnexpectedResponseException(ex.message, ex.status);\n break;\n case \"UnknownErrorException\":\n reason = new UnknownErrorException(ex.message, ex.details);\n break;\n default:\n unreachable(\"DocException - expected a valid Error.\");\n }\n loadingTask._capability.reject(reason);\n });\n messageHandler.on(\"PasswordRequest\", exception => {\n this.#passwordCapability = Promise.withResolvers();\n if (loadingTask.onPassword) {\n const updatePassword = password => {\n if (password instanceof Error) {\n this.#passwordCapability.reject(password);\n } else {\n this.#passwordCapability.resolve({\n password\n });\n }\n };\n try {\n loadingTask.onPassword(updatePassword, exception.code);\n } catch (ex) {\n this.#passwordCapability.reject(ex);\n }\n } else {\n this.#passwordCapability.reject(new PasswordException(exception.message, exception.code));\n }\n return this.#passwordCapability.promise;\n });\n messageHandler.on(\"DataLoaded\", data => {\n loadingTask.onProgress?.({\n loaded: data.length,\n total: data.length\n });\n this.downloadInfoCapability.resolve(data);\n });\n messageHandler.on(\"StartRenderPage\", data => {\n if (this.destroyed) {\n return;\n }\n const page = this.#pageCache.get(data.pageIndex);\n page._startRenderPage(data.transparency, data.cacheKey);\n });\n messageHandler.on(\"commonobj\", ([id, type, exportedData]) => {\n if (this.destroyed) {\n return null;\n }\n if (this.commonObjs.has(id)) {\n return null;\n }\n switch (type) {\n case \"Font\":\n const {\n disableFontFace,\n fontExtraProperties,\n pdfBug\n } = this._params;\n if (\"error\" in exportedData) {\n const exportedError = exportedData.error;\n warn(`Error during font loading: ${exportedError}`);\n this.commonObjs.resolve(id, exportedError);\n break;\n }\n const inspectFont = pdfBug && globalThis.FontInspector?.enabled ? (font, url) => globalThis.FontInspector.fontAdded(font, url) : null;\n const font = new FontFaceObject(exportedData, {\n disableFontFace,\n inspectFont\n });\n this.fontLoader.bind(font).catch(() => messageHandler.sendWithPromise(\"FontFallback\", {\n id\n })).finally(() => {\n if (!fontExtraProperties && font.data) {\n font.data = null;\n }\n this.commonObjs.resolve(id, font);\n });\n break;\n case \"CopyLocalImage\":\n const {\n imageRef\n } = exportedData;\n assert(imageRef, \"The imageRef must be defined.\");\n for (const pageProxy of this.#pageCache.values()) {\n for (const [, data] of pageProxy.objs) {\n if (data?.ref !== imageRef) {\n continue;\n }\n if (!data.dataLen) {\n return null;\n }\n this.commonObjs.resolve(id, structuredClone(data));\n return data.dataLen;\n }\n }\n break;\n case \"FontPath\":\n case \"Image\":\n case \"Pattern\":\n this.commonObjs.resolve(id, exportedData);\n break;\n default:\n throw new Error(`Got unknown common object type ${type}`);\n }\n return null;\n });\n messageHandler.on(\"obj\", ([id, pageIndex, type, imageData]) => {\n if (this.destroyed) {\n return;\n }\n const pageProxy = this.#pageCache.get(pageIndex);\n if (pageProxy.objs.has(id)) {\n return;\n }\n if (pageProxy._intentStates.size === 0) {\n imageData?.bitmap?.close();\n return;\n }\n switch (type) {\n case \"Image\":\n pageProxy.objs.resolve(id, imageData);\n if (imageData?.dataLen > MAX_IMAGE_SIZE_TO_CACHE) {\n pageProxy._maybeCleanupAfterRender = true;\n }\n break;\n case \"Pattern\":\n pageProxy.objs.resolve(id, imageData);\n break;\n default:\n throw new Error(`Got unknown object type ${type}`);\n }\n });\n messageHandler.on(\"DocProgress\", data => {\n if (this.destroyed) {\n return;\n }\n loadingTask.onProgress?.({\n loaded: data.loaded,\n total: data.total\n });\n });\n messageHandler.on(\"FetchBuiltInCMap\", data => {\n if (this.destroyed) {\n return Promise.reject(new Error(\"Worker was destroyed.\"));\n }\n if (!this.cMapReaderFactory) {\n return Promise.reject(new Error(\"CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.\"));\n }\n return this.cMapReaderFactory.fetch(data);\n });\n messageHandler.on(\"FetchStandardFontData\", data => {\n if (this.destroyed) {\n return Promise.reject(new Error(\"Worker was destroyed.\"));\n }\n if (!this.standardFontDataFactory) {\n return Promise.reject(new Error(\"StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.\"));\n }\n return this.standardFontDataFactory.fetch(data);\n });\n }\n getData() {\n return this.messageHandler.sendWithPromise(\"GetData\", null);\n }\n saveDocument() {\n if (this.annotationStorage.size <= 0) {\n warn(\"saveDocument called while `annotationStorage` is empty, \" + \"please use the getData-method instead.\");\n }\n const {\n map,\n transfer\n } = this.annotationStorage.serializable;\n return this.messageHandler.sendWithPromise(\"SaveDocument\", {\n isPureXfa: !!this._htmlForXfa,\n numPages: this._numPages,\n annotationStorage: map,\n filename: this._fullReader?.filename ?? null\n }, transfer).finally(() => {\n this.annotationStorage.resetModified();\n });\n }\n getPage(pageNumber) {\n if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this._numPages) {\n return Promise.reject(new Error(\"Invalid page request.\"));\n }\n const pageIndex = pageNumber - 1,\n cachedPromise = this.#pagePromises.get(pageIndex);\n if (cachedPromise) {\n return cachedPromise;\n }\n const promise = this.messageHandler.sendWithPromise(\"GetPage\", {\n pageIndex\n }).then(pageInfo => {\n if (this.destroyed) {\n throw new Error(\"Transport destroyed\");\n }\n if (pageInfo.refStr) {\n this.#pageRefCache.set(pageInfo.refStr, pageNumber);\n }\n const page = new PDFPageProxy(pageIndex, pageInfo, this, this._params.pdfBug);\n this.#pageCache.set(pageIndex, page);\n return page;\n });\n this.#pagePromises.set(pageIndex, promise);\n return promise;\n }\n getPageIndex(ref) {\n if (!isRefProxy(ref)) {\n return Promise.reject(new Error(\"Invalid pageIndex request.\"));\n }\n return this.messageHandler.sendWithPromise(\"GetPageIndex\", {\n num: ref.num,\n gen: ref.gen\n });\n }\n getAnnotations(pageIndex, intent) {\n return this.messageHandler.sendWithPromise(\"GetAnnotations\", {\n pageIndex,\n intent\n });\n }\n getFieldObjects() {\n return this.#cacheSimpleMethod(\"GetFieldObjects\");\n }\n hasJSActions() {\n return this.#cacheSimpleMethod(\"HasJSActions\");\n }\n getCalculationOrderIds() {\n return this.messageHandler.sendWithPromise(\"GetCalculationOrderIds\", null);\n }\n getDestinations() {\n return this.messageHandler.sendWithPromise(\"GetDestinations\", null);\n }\n getDestination(id) {\n if (typeof id !== \"string\") {\n return Promise.reject(new Error(\"Invalid destination request.\"));\n }\n return this.messageHandler.sendWithPromise(\"GetDestination\", {\n id\n });\n }\n getPageLabels() {\n return this.messageHandler.sendWithPromise(\"GetPageLabels\", null);\n }\n getPageLayout() {\n return this.messageHandler.sendWithPromise(\"GetPageLayout\", null);\n }\n getPageMode() {\n return this.messageHandler.sendWithPromise(\"GetPageMode\", null);\n }\n getViewerPreferences() {\n return this.messageHandler.sendWithPromise(\"GetViewerPreferences\", null);\n }\n getOpenAction() {\n return this.messageHandler.sendWithPromise(\"GetOpenAction\", null);\n }\n getAttachments() {\n return this.messageHandler.sendWithPromise(\"GetAttachments\", null);\n }\n getDocJSActions() {\n return this.#cacheSimpleMethod(\"GetDocJSActions\");\n }\n getPageJSActions(pageIndex) {\n return this.messageHandler.sendWithPromise(\"GetPageJSActions\", {\n pageIndex\n });\n }\n getStructTree(pageIndex) {\n return this.messageHandler.sendWithPromise(\"GetStructTree\", {\n pageIndex\n });\n }\n getOutline() {\n return this.messageHandler.sendWithPromise(\"GetOutline\", null);\n }\n getOptionalContentConfig(renderingIntent) {\n return this.#cacheSimpleMethod(\"GetOptionalContentConfig\").then(data => new OptionalContentConfig(data, renderingIntent));\n }\n getPermissions() {\n return this.messageHandler.sendWithPromise(\"GetPermissions\", null);\n }\n getMetadata() {\n const name = \"GetMetadata\",\n cachedPromise = this.#methodPromises.get(name);\n if (cachedPromise) {\n return cachedPromise;\n }\n const promise = this.messageHandler.sendWithPromise(name, null).then(results => ({\n info: results[0],\n metadata: results[1] ? new Metadata(results[1]) : null,\n contentDispositionFilename: this._fullReader?.filename ?? null,\n contentLength: this._fullReader?.contentLength ?? null\n }));\n this.#methodPromises.set(name, promise);\n return promise;\n }\n getMarkInfo() {\n return this.messageHandler.sendWithPromise(\"GetMarkInfo\", null);\n }\n async startCleanup(keepLoadedFonts = false) {\n if (this.destroyed) {\n return;\n }\n await this.messageHandler.sendWithPromise(\"Cleanup\", null);\n for (const page of this.#pageCache.values()) {\n const cleanupSuccessful = page.cleanup();\n if (!cleanupSuccessful) {\n throw new Error(`startCleanup: Page ${page.pageNumber} is currently rendering.`);\n }\n }\n this.commonObjs.clear();\n if (!keepLoadedFonts) {\n this.fontLoader.clear();\n }\n this.#methodPromises.clear();\n this.filterFactory.destroy(true);\n TextLayer.cleanup();\n }\n cachedPageNumber(ref) {\n if (!isRefProxy(ref)) {\n return null;\n }\n const refStr = ref.gen === 0 ? `${ref.num}R` : `${ref.num}R${ref.gen}`;\n return this.#pageRefCache.get(refStr) ?? null;\n }\n}\nconst INITIAL_DATA = Symbol(\"INITIAL_DATA\");\nclass PDFObjects {\n #objs = Object.create(null);\n #ensureObj(objId) {\n return this.#objs[objId] ||= {\n ...Promise.withResolvers(),\n data: INITIAL_DATA\n };\n }\n get(objId, callback = null) {\n if (callback) {\n const obj = this.#ensureObj(objId);\n obj.promise.then(() => callback(obj.data));\n return null;\n }\n const obj = this.#objs[objId];\n if (!obj || obj.data === INITIAL_DATA) {\n throw new Error(`Requesting object that isn't resolved yet ${objId}.`);\n }\n return obj.data;\n }\n has(objId) {\n const obj = this.#objs[objId];\n return !!obj && obj.data !== INITIAL_DATA;\n }\n resolve(objId, data = null) {\n const obj = this.#ensureObj(objId);\n obj.data = data;\n obj.resolve();\n }\n clear() {\n for (const objId in this.#objs) {\n const {\n data\n } = this.#objs[objId];\n data?.bitmap?.close();\n }\n this.#objs = Object.create(null);\n }\n *[Symbol.iterator]() {\n for (const objId in this.#objs) {\n const {\n data\n } = this.#objs[objId];\n if (data === INITIAL_DATA) {\n continue;\n }\n yield [objId, data];\n }\n }\n}\nclass RenderTask {\n #internalRenderTask = null;\n constructor(internalRenderTask) {\n this.#internalRenderTask = internalRenderTask;\n this.onContinue = null;\n }\n get promise() {\n return this.#internalRenderTask.capability.promise;\n }\n cancel(extraDelay = 0) {\n this.#internalRenderTask.cancel(null, extraDelay);\n }\n get separateAnnots() {\n const {\n separateAnnots\n } = this.#internalRenderTask.operatorList;\n if (!separateAnnots) {\n return false;\n }\n const {\n annotationCanvasMap\n } = this.#internalRenderTask;\n return separateAnnots.form || separateAnnots.canvas && annotationCanvasMap?.size > 0;\n }\n}\nclass InternalRenderTask {\n #rAF = null;\n static #canvasInUse = new WeakSet();\n constructor({\n callback,\n params,\n objs,\n commonObjs,\n annotationCanvasMap,\n operatorList,\n pageIndex,\n canvasFactory,\n filterFactory,\n useRequestAnimationFrame = false,\n pdfBug = false,\n pageColors = null\n }) {\n this.callback = callback;\n this.params = params;\n this.objs = objs;\n this.commonObjs = commonObjs;\n this.annotationCanvasMap = annotationCanvasMap;\n this.operatorListIdx = null;\n this.operatorList = operatorList;\n this._pageIndex = pageIndex;\n this.canvasFactory = canvasFactory;\n this.filterFactory = filterFactory;\n this._pdfBug = pdfBug;\n this.pageColors = pageColors;\n this.running = false;\n this.graphicsReadyCallback = null;\n this.graphicsReady = false;\n this._useRequestAnimationFrame = useRequestAnimationFrame === true && typeof window !== \"undefined\";\n this.cancelled = false;\n this.capability = Promise.withResolvers();\n this.task = new RenderTask(this);\n this._cancelBound = this.cancel.bind(this);\n this._continueBound = this._continue.bind(this);\n this._scheduleNextBound = this._scheduleNext.bind(this);\n this._nextBound = this._next.bind(this);\n this._canvas = params.canvasContext.canvas;\n }\n get completed() {\n return this.capability.promise.catch(function () {});\n }\n initializeGraphics({\n transparency = false,\n optionalContentConfig\n }) {\n if (this.cancelled) {\n return;\n }\n if (this._canvas) {\n if (InternalRenderTask.#canvasInUse.has(this._canvas)) {\n throw new Error(\"Cannot use the same canvas during multiple render() operations. \" + \"Use different canvas or ensure previous operations were \" + \"cancelled or completed.\");\n }\n InternalRenderTask.#canvasInUse.add(this._canvas);\n }\n if (this._pdfBug && globalThis.StepperManager?.enabled) {\n this.stepper = globalThis.StepperManager.create(this._pageIndex);\n this.stepper.init(this.operatorList);\n this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();\n }\n const {\n canvasContext,\n viewport,\n transform,\n background\n } = this.params;\n this.gfx = new CanvasGraphics(canvasContext, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {\n optionalContentConfig\n }, this.annotationCanvasMap, this.pageColors);\n this.gfx.beginDrawing({\n transform,\n viewport,\n transparency,\n background\n });\n this.operatorListIdx = 0;\n this.graphicsReady = true;\n this.graphicsReadyCallback?.();\n }\n cancel(error = null, extraDelay = 0) {\n this.running = false;\n this.cancelled = true;\n this.gfx?.endDrawing();\n if (this.#rAF) {\n window.cancelAnimationFrame(this.#rAF);\n this.#rAF = null;\n }\n InternalRenderTask.#canvasInUse.delete(this._canvas);\n this.callback(error || new RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex + 1}`, extraDelay));\n }\n operatorListChanged() {\n if (!this.graphicsReady) {\n this.graphicsReadyCallback ||= this._continueBound;\n return;\n }\n this.stepper?.updateOperatorList(this.operatorList);\n if (this.running) {\n return;\n }\n this._continue();\n }\n _continue() {\n this.running = true;\n if (this.cancelled) {\n return;\n }\n if (this.task.onContinue) {\n this.task.onContinue(this._scheduleNextBound);\n } else {\n this._scheduleNext();\n }\n }\n _scheduleNext() {\n if (this._useRequestAnimationFrame) {\n this.#rAF = window.requestAnimationFrame(() => {\n this.#rAF = null;\n this._nextBound().catch(this._cancelBound);\n });\n } else {\n Promise.resolve().then(this._nextBound).catch(this._cancelBound);\n }\n }\n async _next() {\n if (this.cancelled) {\n return;\n }\n this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper);\n if (this.operatorListIdx === this.operatorList.argsArray.length) {\n this.running = false;\n if (this.operatorList.lastChunk) {\n this.gfx.endDrawing();\n InternalRenderTask.#canvasInUse.delete(this._canvas);\n this.callback();\n }\n }\n }\n}\nconst version = \"4.7.76\";\nconst build = \"8b73b828b\";\n\n// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.flat-map.js\nvar esnext_iterator_flat_map = __webpack_require__(670);\n;// ./src/shared/scripting_utils.js\n\nfunction makeColorComp(n) {\n return Math.floor(Math.max(0, Math.min(1, n)) * 255).toString(16).padStart(2, \"0\");\n}\nfunction scaleAndClamp(x) {\n return Math.max(0, Math.min(255, 255 * x));\n}\nclass ColorConverters {\n static CMYK_G([c, y, m, k]) {\n return [\"G\", 1 - Math.min(1, 0.3 * c + 0.59 * m + 0.11 * y + k)];\n }\n static G_CMYK([g]) {\n return [\"CMYK\", 0, 0, 0, 1 - g];\n }\n static G_RGB([g]) {\n return [\"RGB\", g, g, g];\n }\n static G_rgb([g]) {\n g = scaleAndClamp(g);\n return [g, g, g];\n }\n static G_HTML([g]) {\n const G = makeColorComp(g);\n return `#${G}${G}${G}`;\n }\n static RGB_G([r, g, b]) {\n return [\"G\", 0.3 * r + 0.59 * g + 0.11 * b];\n }\n static RGB_rgb(color) {\n return color.map(scaleAndClamp);\n }\n static RGB_HTML(color) {\n return `#${color.map(makeColorComp).join(\"\")}`;\n }\n static T_HTML() {\n return \"#00000000\";\n }\n static T_rgb() {\n return [null];\n }\n static CMYK_RGB([c, y, m, k]) {\n return [\"RGB\", 1 - Math.min(1, c + k), 1 - Math.min(1, m + k), 1 - Math.min(1, y + k)];\n }\n static CMYK_rgb([c, y, m, k]) {\n return [scaleAndClamp(1 - Math.min(1, c + k)), scaleAndClamp(1 - Math.min(1, m + k)), scaleAndClamp(1 - Math.min(1, y + k))];\n }\n static CMYK_HTML(components) {\n const rgb = this.CMYK_RGB(components).slice(1);\n return this.RGB_HTML(rgb);\n }\n static RGB_CMYK([r, g, b]) {\n const c = 1 - r;\n const m = 1 - g;\n const y = 1 - b;\n const k = Math.min(c, m, y);\n return [\"CMYK\", c, m, y, k];\n }\n}\n\n;// ./src/display/xfa_layer.js\n\n\nclass XfaLayer {\n static setupStorage(html, id, element, storage, intent) {\n const storedData = storage.getValue(id, {\n value: null\n });\n switch (element.name) {\n case \"textarea\":\n if (storedData.value !== null) {\n html.textContent = storedData.value;\n }\n if (intent === \"print\") {\n break;\n }\n html.addEventListener(\"input\", event => {\n storage.setValue(id, {\n value: event.target.value\n });\n });\n break;\n case \"input\":\n if (element.attributes.type === \"radio\" || element.attributes.type === \"checkbox\") {\n if (storedData.value === element.attributes.xfaOn) {\n html.setAttribute(\"checked\", true);\n } else if (storedData.value === element.attributes.xfaOff) {\n html.removeAttribute(\"checked\");\n }\n if (intent === \"print\") {\n break;\n }\n html.addEventListener(\"change\", event => {\n storage.setValue(id, {\n value: event.target.checked ? event.target.getAttribute(\"xfaOn\") : event.target.getAttribute(\"xfaOff\")\n });\n });\n } else {\n if (storedData.value !== null) {\n html.setAttribute(\"value\", storedData.value);\n }\n if (intent === \"print\") {\n break;\n }\n html.addEventListener(\"input\", event => {\n storage.setValue(id, {\n value: event.target.value\n });\n });\n }\n break;\n case \"select\":\n if (storedData.value !== null) {\n html.setAttribute(\"value\", storedData.value);\n for (const option of element.children) {\n if (option.attributes.value === storedData.value) {\n option.attributes.selected = true;\n } else if (option.attributes.hasOwnProperty(\"selected\")) {\n delete option.attributes.selected;\n }\n }\n }\n html.addEventListener(\"input\", event => {\n const options = event.target.options;\n const value = options.selectedIndex === -1 ? \"\" : options[options.selectedIndex].value;\n storage.setValue(id, {\n value\n });\n });\n break;\n }\n }\n static setAttributes({\n html,\n element,\n storage = null,\n intent,\n linkService\n }) {\n const {\n attributes\n } = element;\n const isHTMLAnchorElement = html instanceof HTMLAnchorElement;\n if (attributes.type === \"radio\") {\n attributes.name = `${attributes.name}-${intent}`;\n }\n for (const [key, value] of Object.entries(attributes)) {\n if (value === null || value === undefined) {\n continue;\n }\n switch (key) {\n case \"class\":\n if (value.length) {\n html.setAttribute(key, value.join(\" \"));\n }\n break;\n case \"dataId\":\n break;\n case \"id\":\n html.setAttribute(\"data-element-id\", value);\n break;\n case \"style\":\n Object.assign(html.style, value);\n break;\n case \"textContent\":\n html.textContent = value;\n break;\n default:\n if (!isHTMLAnchorElement || key !== \"href\" && key !== \"newWindow\") {\n html.setAttribute(key, value);\n }\n }\n }\n if (isHTMLAnchorElement) {\n linkService.addLinkAttributes(html, attributes.href, attributes.newWindow);\n }\n if (storage && attributes.dataId) {\n this.setupStorage(html, attributes.dataId, element, storage);\n }\n }\n static render(parameters) {\n const storage = parameters.annotationStorage;\n const linkService = parameters.linkService;\n const root = parameters.xfaHtml;\n const intent = parameters.intent || \"display\";\n const rootHtml = document.createElement(root.name);\n if (root.attributes) {\n this.setAttributes({\n html: rootHtml,\n element: root,\n intent,\n linkService\n });\n }\n const isNotForRichText = intent !== \"richText\";\n const rootDiv = parameters.div;\n rootDiv.append(rootHtml);\n if (parameters.viewport) {\n const transform = `matrix(${parameters.viewport.transform.join(\",\")})`;\n rootDiv.style.transform = transform;\n }\n if (isNotForRichText) {\n rootDiv.setAttribute(\"class\", \"xfaLayer xfaFont\");\n }\n const textDivs = [];\n if (root.children.length === 0) {\n if (root.value) {\n const node = document.createTextNode(root.value);\n rootHtml.append(node);\n if (isNotForRichText && XfaText.shouldBuildText(root.name)) {\n textDivs.push(node);\n }\n }\n return {\n textDivs\n };\n }\n const stack = [[root, -1, rootHtml]];\n while (stack.length > 0) {\n const [parent, i, html] = stack.at(-1);\n if (i + 1 === parent.children.length) {\n stack.pop();\n continue;\n }\n const child = parent.children[++stack.at(-1)[1]];\n if (child === null) {\n continue;\n }\n const {\n name\n } = child;\n if (name === \"#text\") {\n const node = document.createTextNode(child.value);\n textDivs.push(node);\n html.append(node);\n continue;\n }\n const childHtml = child?.attributes?.xmlns ? document.createElementNS(child.attributes.xmlns, name) : document.createElement(name);\n html.append(childHtml);\n if (child.attributes) {\n this.setAttributes({\n html: childHtml,\n element: child,\n storage,\n intent,\n linkService\n });\n }\n if (child.children?.length > 0) {\n stack.push([child, -1, childHtml]);\n } else if (child.value) {\n const node = document.createTextNode(child.value);\n if (isNotForRichText && XfaText.shouldBuildText(name)) {\n textDivs.push(node);\n }\n childHtml.append(node);\n }\n }\n for (const el of rootDiv.querySelectorAll(\".xfaNonInteractive input, .xfaNonInteractive textarea\")) {\n el.setAttribute(\"readOnly\", true);\n }\n return {\n textDivs\n };\n }\n static update(parameters) {\n const transform = `matrix(${parameters.viewport.transform.join(\",\")})`;\n parameters.div.style.transform = transform;\n parameters.div.hidden = false;\n }\n}\n\n;// ./src/display/annotation_layer.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst DEFAULT_TAB_INDEX = 1000;\nconst annotation_layer_DEFAULT_FONT_SIZE = 9;\nconst GetElementsByNameSet = new WeakSet();\nfunction getRectDims(rect) {\n return {\n width: rect[2] - rect[0],\n height: rect[3] - rect[1]\n };\n}\nclass AnnotationElementFactory {\n static create(parameters) {\n const subtype = parameters.data.annotationType;\n switch (subtype) {\n case AnnotationType.LINK:\n return new LinkAnnotationElement(parameters);\n case AnnotationType.TEXT:\n return new TextAnnotationElement(parameters);\n case AnnotationType.WIDGET:\n const fieldType = parameters.data.fieldType;\n switch (fieldType) {\n case \"Tx\":\n return new TextWidgetAnnotationElement(parameters);\n case \"Btn\":\n if (parameters.data.radioButton) {\n return new RadioButtonWidgetAnnotationElement(parameters);\n } else if (parameters.data.checkBox) {\n return new CheckboxWidgetAnnotationElement(parameters);\n }\n return new PushButtonWidgetAnnotationElement(parameters);\n case \"Ch\":\n return new ChoiceWidgetAnnotationElement(parameters);\n case \"Sig\":\n return new SignatureWidgetAnnotationElement(parameters);\n }\n return new WidgetAnnotationElement(parameters);\n case AnnotationType.POPUP:\n return new PopupAnnotationElement(parameters);\n case AnnotationType.FREETEXT:\n return new FreeTextAnnotationElement(parameters);\n case AnnotationType.LINE:\n return new LineAnnotationElement(parameters);\n case AnnotationType.SQUARE:\n return new SquareAnnotationElement(parameters);\n case AnnotationType.CIRCLE:\n return new CircleAnnotationElement(parameters);\n case AnnotationType.POLYLINE:\n return new PolylineAnnotationElement(parameters);\n case AnnotationType.CARET:\n return new CaretAnnotationElement(parameters);\n case AnnotationType.INK:\n return new InkAnnotationElement(parameters);\n case AnnotationType.POLYGON:\n return new PolygonAnnotationElement(parameters);\n case AnnotationType.HIGHLIGHT:\n return new HighlightAnnotationElement(parameters);\n case AnnotationType.UNDERLINE:\n return new UnderlineAnnotationElement(parameters);\n case AnnotationType.SQUIGGLY:\n return new SquigglyAnnotationElement(parameters);\n case AnnotationType.STRIKEOUT:\n return new StrikeOutAnnotationElement(parameters);\n case AnnotationType.STAMP:\n return new StampAnnotationElement(parameters);\n case AnnotationType.FILEATTACHMENT:\n return new FileAttachmentAnnotationElement(parameters);\n default:\n return new AnnotationElement(parameters);\n }\n }\n}\nclass AnnotationElement {\n #updates = null;\n #hasBorder = false;\n #popupElement = null;\n constructor(parameters, {\n isRenderable = false,\n ignoreBorder = false,\n createQuadrilaterals = false\n } = {}) {\n this.isRenderable = isRenderable;\n this.data = parameters.data;\n this.layer = parameters.layer;\n this.linkService = parameters.linkService;\n this.downloadManager = parameters.downloadManager;\n this.imageResourcesPath = parameters.imageResourcesPath;\n this.renderForms = parameters.renderForms;\n this.svgFactory = parameters.svgFactory;\n this.annotationStorage = parameters.annotationStorage;\n this.enableScripting = parameters.enableScripting;\n this.hasJSActions = parameters.hasJSActions;\n this._fieldObjects = parameters.fieldObjects;\n this.parent = parameters.parent;\n if (isRenderable) {\n this.container = this._createContainer(ignoreBorder);\n }\n if (createQuadrilaterals) {\n this._createQuadrilaterals();\n }\n }\n static _hasPopupData({\n titleObj,\n contentsObj,\n richText\n }) {\n return !!(titleObj?.str || contentsObj?.str || richText?.str);\n }\n get _isEditable() {\n return this.data.isEditable;\n }\n get hasPopupData() {\n return AnnotationElement._hasPopupData(this.data);\n }\n updateEdited(params) {\n if (!this.container) {\n return;\n }\n this.#updates ||= {\n rect: this.data.rect.slice(0)\n };\n const {\n rect\n } = params;\n if (rect) {\n this.#setRectEdited(rect);\n }\n this.#popupElement?.popup.updateEdited(params);\n }\n resetEdited() {\n if (!this.#updates) {\n return;\n }\n this.#setRectEdited(this.#updates.rect);\n this.#popupElement?.popup.resetEdited();\n this.#updates = null;\n }\n #setRectEdited(rect) {\n const {\n container: {\n style\n },\n data: {\n rect: currentRect,\n rotation\n },\n parent: {\n viewport: {\n rawDims: {\n pageWidth,\n pageHeight,\n pageX,\n pageY\n }\n }\n }\n } = this;\n currentRect?.splice(0, 4, ...rect);\n const {\n width,\n height\n } = getRectDims(rect);\n style.left = `${100 * (rect[0] - pageX) / pageWidth}%`;\n style.top = `${100 * (pageHeight - rect[3] + pageY) / pageHeight}%`;\n if (rotation === 0) {\n style.width = `${100 * width / pageWidth}%`;\n style.height = `${100 * height / pageHeight}%`;\n } else {\n this.setRotation(rotation);\n }\n }\n _createContainer(ignoreBorder) {\n const {\n data,\n parent: {\n page,\n viewport\n }\n } = this;\n const container = document.createElement(\"section\");\n container.setAttribute(\"data-annotation-id\", data.id);\n if (!(this instanceof WidgetAnnotationElement)) {\n container.tabIndex = DEFAULT_TAB_INDEX;\n }\n const {\n style\n } = container;\n style.zIndex = this.parent.zIndex++;\n if (data.popupRef) {\n container.setAttribute(\"aria-haspopup\", \"dialog\");\n }\n if (data.alternativeText) {\n container.title = data.alternativeText;\n }\n if (data.noRotate) {\n container.classList.add(\"norotate\");\n }\n if (!data.rect || this instanceof PopupAnnotationElement) {\n const {\n rotation\n } = data;\n if (!data.hasOwnCanvas && rotation !== 0) {\n this.setRotation(rotation, container);\n }\n return container;\n }\n const {\n width,\n height\n } = getRectDims(data.rect);\n if (!ignoreBorder && data.borderStyle.width > 0) {\n style.borderWidth = `${data.borderStyle.width}px`;\n const horizontalRadius = data.borderStyle.horizontalCornerRadius;\n const verticalRadius = data.borderStyle.verticalCornerRadius;\n if (horizontalRadius > 0 || verticalRadius > 0) {\n const radius = `calc(${horizontalRadius}px * var(--scale-factor)) / calc(${verticalRadius}px * var(--scale-factor))`;\n style.borderRadius = radius;\n } else if (this instanceof RadioButtonWidgetAnnotationElement) {\n const radius = `calc(${width}px * var(--scale-factor)) / calc(${height}px * var(--scale-factor))`;\n style.borderRadius = radius;\n }\n switch (data.borderStyle.style) {\n case AnnotationBorderStyleType.SOLID:\n style.borderStyle = \"solid\";\n break;\n case AnnotationBorderStyleType.DASHED:\n style.borderStyle = \"dashed\";\n break;\n case AnnotationBorderStyleType.BEVELED:\n warn(\"Unimplemented border style: beveled\");\n break;\n case AnnotationBorderStyleType.INSET:\n warn(\"Unimplemented border style: inset\");\n break;\n case AnnotationBorderStyleType.UNDERLINE:\n style.borderBottomStyle = \"solid\";\n break;\n default:\n break;\n }\n const borderColor = data.borderColor || null;\n if (borderColor) {\n this.#hasBorder = true;\n style.borderColor = Util.makeHexColor(borderColor[0] | 0, borderColor[1] | 0, borderColor[2] | 0);\n } else {\n style.borderWidth = 0;\n }\n }\n const rect = Util.normalizeRect([data.rect[0], page.view[3] - data.rect[1] + page.view[1], data.rect[2], page.view[3] - data.rect[3] + page.view[1]]);\n const {\n pageWidth,\n pageHeight,\n pageX,\n pageY\n } = viewport.rawDims;\n style.left = `${100 * (rect[0] - pageX) / pageWidth}%`;\n style.top = `${100 * (rect[1] - pageY) / pageHeight}%`;\n const {\n rotation\n } = data;\n if (data.hasOwnCanvas || rotation === 0) {\n style.width = `${100 * width / pageWidth}%`;\n style.height = `${100 * height / pageHeight}%`;\n } else {\n this.setRotation(rotation, container);\n }\n return container;\n }\n setRotation(angle, container = this.container) {\n if (!this.data.rect) {\n return;\n }\n const {\n pageWidth,\n pageHeight\n } = this.parent.viewport.rawDims;\n const {\n width,\n height\n } = getRectDims(this.data.rect);\n let elementWidth, elementHeight;\n if (angle % 180 === 0) {\n elementWidth = 100 * width / pageWidth;\n elementHeight = 100 * height / pageHeight;\n } else {\n elementWidth = 100 * height / pageWidth;\n elementHeight = 100 * width / pageHeight;\n }\n container.style.width = `${elementWidth}%`;\n container.style.height = `${elementHeight}%`;\n container.setAttribute(\"data-main-rotation\", (360 - angle) % 360);\n }\n get _commonActions() {\n const setColor = (jsName, styleName, event) => {\n const color = event.detail[jsName];\n const colorType = color[0];\n const colorArray = color.slice(1);\n event.target.style[styleName] = ColorConverters[`${colorType}_HTML`](colorArray);\n this.annotationStorage.setValue(this.data.id, {\n [styleName]: ColorConverters[`${colorType}_rgb`](colorArray)\n });\n };\n return shadow(this, \"_commonActions\", {\n display: event => {\n const {\n display\n } = event.detail;\n const hidden = display % 2 === 1;\n this.container.style.visibility = hidden ? \"hidden\" : \"visible\";\n this.annotationStorage.setValue(this.data.id, {\n noView: hidden,\n noPrint: display === 1 || display === 2\n });\n },\n print: event => {\n this.annotationStorage.setValue(this.data.id, {\n noPrint: !event.detail.print\n });\n },\n hidden: event => {\n const {\n hidden\n } = event.detail;\n this.container.style.visibility = hidden ? \"hidden\" : \"visible\";\n this.annotationStorage.setValue(this.data.id, {\n noPrint: hidden,\n noView: hidden\n });\n },\n focus: event => {\n setTimeout(() => event.target.focus({\n preventScroll: false\n }), 0);\n },\n userName: event => {\n event.target.title = event.detail.userName;\n },\n readonly: event => {\n event.target.disabled = event.detail.readonly;\n },\n required: event => {\n this._setRequired(event.target, event.detail.required);\n },\n bgColor: event => {\n setColor(\"bgColor\", \"backgroundColor\", event);\n },\n fillColor: event => {\n setColor(\"fillColor\", \"backgroundColor\", event);\n },\n fgColor: event => {\n setColor(\"fgColor\", \"color\", event);\n },\n textColor: event => {\n setColor(\"textColor\", \"color\", event);\n },\n borderColor: event => {\n setColor(\"borderColor\", \"borderColor\", event);\n },\n strokeColor: event => {\n setColor(\"strokeColor\", \"borderColor\", event);\n },\n rotation: event => {\n const angle = event.detail.rotation;\n this.setRotation(angle);\n this.annotationStorage.setValue(this.data.id, {\n rotation: angle\n });\n }\n });\n }\n _dispatchEventFromSandbox(actions, jsEvent) {\n const commonActions = this._commonActions;\n for (const name of Object.keys(jsEvent.detail)) {\n const action = actions[name] || commonActions[name];\n action?.(jsEvent);\n }\n }\n _setDefaultPropertiesFromJS(element) {\n if (!this.enableScripting) {\n return;\n }\n const storedData = this.annotationStorage.getRawValue(this.data.id);\n if (!storedData) {\n return;\n }\n const commonActions = this._commonActions;\n for (const [actionName, detail] of Object.entries(storedData)) {\n const action = commonActions[actionName];\n if (action) {\n const eventProxy = {\n detail: {\n [actionName]: detail\n },\n target: element\n };\n action(eventProxy);\n delete storedData[actionName];\n }\n }\n }\n _createQuadrilaterals() {\n if (!this.container) {\n return;\n }\n const {\n quadPoints\n } = this.data;\n if (!quadPoints) {\n return;\n }\n const [rectBlX, rectBlY, rectTrX, rectTrY] = this.data.rect.map(x => Math.fround(x));\n if (quadPoints.length === 8) {\n const [trX, trY, blX, blY] = quadPoints.subarray(2, 6);\n if (rectTrX === trX && rectTrY === trY && rectBlX === blX && rectBlY === blY) {\n return;\n }\n }\n const {\n style\n } = this.container;\n let svgBuffer;\n if (this.#hasBorder) {\n const {\n borderColor,\n borderWidth\n } = style;\n style.borderWidth = 0;\n svgBuffer = [\"url('data:image/svg+xml;utf8,\", ``, ``];\n this.container.classList.add(\"hasBorder\");\n }\n const width = rectTrX - rectBlX;\n const height = rectTrY - rectBlY;\n const {\n svgFactory\n } = this;\n const svg = svgFactory.createElement(\"svg\");\n svg.classList.add(\"quadrilateralsContainer\");\n svg.setAttribute(\"width\", 0);\n svg.setAttribute(\"height\", 0);\n const defs = svgFactory.createElement(\"defs\");\n svg.append(defs);\n const clipPath = svgFactory.createElement(\"clipPath\");\n const id = `clippath_${this.data.id}`;\n clipPath.setAttribute(\"id\", id);\n clipPath.setAttribute(\"clipPathUnits\", \"objectBoundingBox\");\n defs.append(clipPath);\n for (let i = 2, ii = quadPoints.length; i < ii; i += 8) {\n const trX = quadPoints[i];\n const trY = quadPoints[i + 1];\n const blX = quadPoints[i + 2];\n const blY = quadPoints[i + 3];\n const rect = svgFactory.createElement(\"rect\");\n const x = (blX - rectBlX) / width;\n const y = (rectTrY - trY) / height;\n const rectWidth = (trX - blX) / width;\n const rectHeight = (trY - blY) / height;\n rect.setAttribute(\"x\", x);\n rect.setAttribute(\"y\", y);\n rect.setAttribute(\"width\", rectWidth);\n rect.setAttribute(\"height\", rectHeight);\n clipPath.append(rect);\n svgBuffer?.push(``);\n }\n if (this.#hasBorder) {\n svgBuffer.push(`')`);\n style.backgroundImage = svgBuffer.join(\"\");\n }\n this.container.append(svg);\n this.container.style.clipPath = `url(#${id})`;\n }\n _createPopup() {\n const {\n container,\n data\n } = this;\n container.setAttribute(\"aria-haspopup\", \"dialog\");\n const popup = this.#popupElement = new PopupAnnotationElement({\n data: {\n color: data.color,\n titleObj: data.titleObj,\n modificationDate: data.modificationDate,\n contentsObj: data.contentsObj,\n richText: data.richText,\n parentRect: data.rect,\n borderStyle: 0,\n id: `popup_${data.id}`,\n rotation: data.rotation\n },\n parent: this.parent,\n elements: [this]\n });\n this.parent.div.append(popup.render());\n }\n render() {\n unreachable(\"Abstract method `AnnotationElement.render` called\");\n }\n _getElementsByName(name, skipId = null) {\n const fields = [];\n if (this._fieldObjects) {\n const fieldObj = this._fieldObjects[name];\n if (fieldObj) {\n for (const {\n page,\n id,\n exportValues\n } of fieldObj) {\n if (page === -1) {\n continue;\n }\n if (id === skipId) {\n continue;\n }\n const exportValue = typeof exportValues === \"string\" ? exportValues : null;\n const domElement = document.querySelector(`[data-element-id=\"${id}\"]`);\n if (domElement && !GetElementsByNameSet.has(domElement)) {\n warn(`_getElementsByName - element not allowed: ${id}`);\n continue;\n }\n fields.push({\n id,\n exportValue,\n domElement\n });\n }\n }\n return fields;\n }\n for (const domElement of document.getElementsByName(name)) {\n const {\n exportValue\n } = domElement;\n const id = domElement.getAttribute(\"data-element-id\");\n if (id === skipId) {\n continue;\n }\n if (!GetElementsByNameSet.has(domElement)) {\n continue;\n }\n fields.push({\n id,\n exportValue,\n domElement\n });\n }\n return fields;\n }\n show() {\n if (this.container) {\n this.container.hidden = false;\n }\n this.popup?.maybeShow();\n }\n hide() {\n if (this.container) {\n this.container.hidden = true;\n }\n this.popup?.forceHide();\n }\n getElementsToTriggerPopup() {\n return this.container;\n }\n addHighlightArea() {\n const triggers = this.getElementsToTriggerPopup();\n if (Array.isArray(triggers)) {\n for (const element of triggers) {\n element.classList.add(\"highlightArea\");\n }\n } else {\n triggers.classList.add(\"highlightArea\");\n }\n }\n _editOnDoubleClick() {\n if (!this._isEditable) {\n return;\n }\n const {\n annotationEditorType: mode,\n data: {\n id: editId\n }\n } = this;\n this.container.addEventListener(\"dblclick\", () => {\n this.linkService.eventBus?.dispatch(\"switchannotationeditormode\", {\n source: this,\n mode,\n editId\n });\n });\n }\n}\nclass LinkAnnotationElement extends AnnotationElement {\n constructor(parameters, options = null) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: !!options?.ignoreBorder,\n createQuadrilaterals: true\n });\n this.isTooltipOnly = parameters.data.isTooltipOnly;\n }\n render() {\n const {\n data,\n linkService\n } = this;\n const link = document.createElement(\"a\");\n link.setAttribute(\"data-element-id\", data.id);\n let isBound = false;\n if (data.url) {\n linkService.addLinkAttributes(link, data.url, data.newWindow);\n isBound = true;\n } else if (data.action) {\n this._bindNamedAction(link, data.action);\n isBound = true;\n } else if (data.attachment) {\n this.#bindAttachment(link, data.attachment, data.attachmentDest);\n isBound = true;\n } else if (data.setOCGState) {\n this.#bindSetOCGState(link, data.setOCGState);\n isBound = true;\n } else if (data.dest) {\n this._bindLink(link, data.dest);\n isBound = true;\n } else {\n if (data.actions && (data.actions.Action || data.actions[\"Mouse Up\"] || data.actions[\"Mouse Down\"]) && this.enableScripting && this.hasJSActions) {\n this._bindJSAction(link, data);\n isBound = true;\n }\n if (data.resetForm) {\n this._bindResetFormAction(link, data.resetForm);\n isBound = true;\n } else if (this.isTooltipOnly && !isBound) {\n this._bindLink(link, \"\");\n isBound = true;\n }\n }\n this.container.classList.add(\"linkAnnotation\");\n if (isBound) {\n this.container.append(link);\n }\n return this.container;\n }\n #setInternalLink() {\n this.container.setAttribute(\"data-internal-link\", \"\");\n }\n _bindLink(link, destination) {\n link.href = this.linkService.getDestinationHash(destination);\n link.onclick = () => {\n if (destination) {\n this.linkService.goToDestination(destination);\n }\n return false;\n };\n if (destination || destination === \"\") {\n this.#setInternalLink();\n }\n }\n _bindNamedAction(link, action) {\n link.href = this.linkService.getAnchorUrl(\"\");\n link.onclick = () => {\n this.linkService.executeNamedAction(action);\n return false;\n };\n this.#setInternalLink();\n }\n #bindAttachment(link, attachment, dest = null) {\n link.href = this.linkService.getAnchorUrl(\"\");\n if (attachment.description) {\n link.title = attachment.description;\n }\n link.onclick = () => {\n this.downloadManager?.openOrDownloadData(attachment.content, attachment.filename, dest);\n return false;\n };\n this.#setInternalLink();\n }\n #bindSetOCGState(link, action) {\n link.href = this.linkService.getAnchorUrl(\"\");\n link.onclick = () => {\n this.linkService.executeSetOCGState(action);\n return false;\n };\n this.#setInternalLink();\n }\n _bindJSAction(link, data) {\n link.href = this.linkService.getAnchorUrl(\"\");\n const map = new Map([[\"Action\", \"onclick\"], [\"Mouse Up\", \"onmouseup\"], [\"Mouse Down\", \"onmousedown\"]]);\n for (const name of Object.keys(data.actions)) {\n const jsName = map.get(name);\n if (!jsName) {\n continue;\n }\n link[jsName] = () => {\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id: data.id,\n name\n }\n });\n return false;\n };\n }\n if (!link.onclick) {\n link.onclick = () => false;\n }\n this.#setInternalLink();\n }\n _bindResetFormAction(link, resetForm) {\n const otherClickAction = link.onclick;\n if (!otherClickAction) {\n link.href = this.linkService.getAnchorUrl(\"\");\n }\n this.#setInternalLink();\n if (!this._fieldObjects) {\n warn(`_bindResetFormAction - \"resetForm\" action not supported, ` + \"ensure that the `fieldObjects` parameter is provided.\");\n if (!otherClickAction) {\n link.onclick = () => false;\n }\n return;\n }\n link.onclick = () => {\n otherClickAction?.();\n const {\n fields: resetFormFields,\n refs: resetFormRefs,\n include\n } = resetForm;\n const allFields = [];\n if (resetFormFields.length !== 0 || resetFormRefs.length !== 0) {\n const fieldIds = new Set(resetFormRefs);\n for (const fieldName of resetFormFields) {\n const fields = this._fieldObjects[fieldName] || [];\n for (const {\n id\n } of fields) {\n fieldIds.add(id);\n }\n }\n for (const fields of Object.values(this._fieldObjects)) {\n for (const field of fields) {\n if (fieldIds.has(field.id) === include) {\n allFields.push(field);\n }\n }\n }\n } else {\n for (const fields of Object.values(this._fieldObjects)) {\n allFields.push(...fields);\n }\n }\n const storage = this.annotationStorage;\n const allIds = [];\n for (const field of allFields) {\n const {\n id\n } = field;\n allIds.push(id);\n switch (field.type) {\n case \"text\":\n {\n const value = field.defaultValue || \"\";\n storage.setValue(id, {\n value\n });\n break;\n }\n case \"checkbox\":\n case \"radiobutton\":\n {\n const value = field.defaultValue === field.exportValues;\n storage.setValue(id, {\n value\n });\n break;\n }\n case \"combobox\":\n case \"listbox\":\n {\n const value = field.defaultValue || \"\";\n storage.setValue(id, {\n value\n });\n break;\n }\n default:\n continue;\n }\n const domElement = document.querySelector(`[data-element-id=\"${id}\"]`);\n if (!domElement) {\n continue;\n } else if (!GetElementsByNameSet.has(domElement)) {\n warn(`_bindResetFormAction - element not allowed: ${id}`);\n continue;\n }\n domElement.dispatchEvent(new Event(\"resetform\"));\n }\n if (this.enableScripting) {\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id: \"app\",\n ids: allIds,\n name: \"ResetForm\"\n }\n });\n }\n return false;\n };\n }\n}\nclass TextAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true\n });\n }\n render() {\n this.container.classList.add(\"textAnnotation\");\n const image = document.createElement(\"img\");\n image.src = this.imageResourcesPath + \"annotation-\" + this.data.name.toLowerCase() + \".svg\";\n image.setAttribute(\"data-l10n-id\", \"pdfjs-text-annotation-type\");\n image.setAttribute(\"data-l10n-args\", JSON.stringify({\n type: this.data.name\n }));\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.append(image);\n return this.container;\n }\n}\nclass WidgetAnnotationElement extends AnnotationElement {\n render() {\n return this.container;\n }\n showElementAndHideCanvas(element) {\n if (this.data.hasOwnCanvas) {\n if (element.previousSibling?.nodeName === \"CANVAS\") {\n element.previousSibling.hidden = true;\n }\n element.hidden = false;\n }\n }\n _getKeyModifier(event) {\n return util_FeatureTest.platform.isMac ? event.metaKey : event.ctrlKey;\n }\n _setEventListener(element, elementData, baseName, eventName, valueGetter) {\n if (baseName.includes(\"mouse\")) {\n element.addEventListener(baseName, event => {\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id: this.data.id,\n name: eventName,\n value: valueGetter(event),\n shift: event.shiftKey,\n modifier: this._getKeyModifier(event)\n }\n });\n });\n } else {\n element.addEventListener(baseName, event => {\n if (baseName === \"blur\") {\n if (!elementData.focused || !event.relatedTarget) {\n return;\n }\n elementData.focused = false;\n } else if (baseName === \"focus\") {\n if (elementData.focused) {\n return;\n }\n elementData.focused = true;\n }\n if (!valueGetter) {\n return;\n }\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id: this.data.id,\n name: eventName,\n value: valueGetter(event)\n }\n });\n });\n }\n }\n _setEventListeners(element, elementData, names, getter) {\n for (const [baseName, eventName] of names) {\n if (eventName === \"Action\" || this.data.actions?.[eventName]) {\n if (eventName === \"Focus\" || eventName === \"Blur\") {\n elementData ||= {\n focused: false\n };\n }\n this._setEventListener(element, elementData, baseName, eventName, getter);\n if (eventName === \"Focus\" && !this.data.actions?.Blur) {\n this._setEventListener(element, elementData, \"blur\", \"Blur\", null);\n } else if (eventName === \"Blur\" && !this.data.actions?.Focus) {\n this._setEventListener(element, elementData, \"focus\", \"Focus\", null);\n }\n }\n }\n }\n _setBackgroundColor(element) {\n const color = this.data.backgroundColor || null;\n element.style.backgroundColor = color === null ? \"transparent\" : Util.makeHexColor(color[0], color[1], color[2]);\n }\n _setTextStyle(element) {\n const TEXT_ALIGNMENT = [\"left\", \"center\", \"right\"];\n const {\n fontColor\n } = this.data.defaultAppearanceData;\n const fontSize = this.data.defaultAppearanceData.fontSize || annotation_layer_DEFAULT_FONT_SIZE;\n const style = element.style;\n let computedFontSize;\n const BORDER_SIZE = 2;\n const roundToOneDecimal = x => Math.round(10 * x) / 10;\n if (this.data.multiLine) {\n const height = Math.abs(this.data.rect[3] - this.data.rect[1] - BORDER_SIZE);\n const numberOfLines = Math.round(height / (LINE_FACTOR * fontSize)) || 1;\n const lineHeight = height / numberOfLines;\n computedFontSize = Math.min(fontSize, roundToOneDecimal(lineHeight / LINE_FACTOR));\n } else {\n const height = Math.abs(this.data.rect[3] - this.data.rect[1] - BORDER_SIZE);\n computedFontSize = Math.min(fontSize, roundToOneDecimal(height / LINE_FACTOR));\n }\n style.fontSize = `calc(${computedFontSize}px * var(--scale-factor))`;\n style.color = Util.makeHexColor(fontColor[0], fontColor[1], fontColor[2]);\n if (this.data.textAlignment !== null) {\n style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment];\n }\n }\n _setRequired(element, isRequired) {\n if (isRequired) {\n element.setAttribute(\"required\", true);\n } else {\n element.removeAttribute(\"required\");\n }\n element.setAttribute(\"aria-required\", isRequired);\n }\n}\nclass TextWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n const isRenderable = parameters.renderForms || parameters.data.hasOwnCanvas || !parameters.data.hasAppearance && !!parameters.data.fieldValue;\n super(parameters, {\n isRenderable\n });\n }\n setPropertyOnSiblings(base, key, value, keyInStorage) {\n const storage = this.annotationStorage;\n for (const element of this._getElementsByName(base.name, base.id)) {\n if (element.domElement) {\n element.domElement[key] = value;\n }\n storage.setValue(element.id, {\n [keyInStorage]: value\n });\n }\n }\n render() {\n const storage = this.annotationStorage;\n const id = this.data.id;\n this.container.classList.add(\"textWidgetAnnotation\");\n let element = null;\n if (this.renderForms) {\n const storedData = storage.getValue(id, {\n value: this.data.fieldValue\n });\n let textContent = storedData.value || \"\";\n const maxLen = storage.getValue(id, {\n charLimit: this.data.maxLen\n }).charLimit;\n if (maxLen && textContent.length > maxLen) {\n textContent = textContent.slice(0, maxLen);\n }\n let fieldFormattedValues = storedData.formattedValue || this.data.textContent?.join(\"\\n\") || null;\n if (fieldFormattedValues && this.data.comb) {\n fieldFormattedValues = fieldFormattedValues.replaceAll(/\\s+/g, \"\");\n }\n const elementData = {\n userValue: textContent,\n formattedValue: fieldFormattedValues,\n lastCommittedValue: null,\n commitKey: 1,\n focused: false\n };\n if (this.data.multiLine) {\n element = document.createElement(\"textarea\");\n element.textContent = fieldFormattedValues ?? textContent;\n if (this.data.doNotScroll) {\n element.style.overflowY = \"hidden\";\n }\n } else {\n element = document.createElement(\"input\");\n element.type = \"text\";\n element.setAttribute(\"value\", fieldFormattedValues ?? textContent);\n if (this.data.doNotScroll) {\n element.style.overflowX = \"hidden\";\n }\n }\n if (this.data.hasOwnCanvas) {\n element.hidden = true;\n }\n GetElementsByNameSet.add(element);\n element.setAttribute(\"data-element-id\", id);\n element.disabled = this.data.readOnly;\n element.name = this.data.fieldName;\n element.tabIndex = DEFAULT_TAB_INDEX;\n this._setRequired(element, this.data.required);\n if (maxLen) {\n element.maxLength = maxLen;\n }\n element.addEventListener(\"input\", event => {\n storage.setValue(id, {\n value: event.target.value\n });\n this.setPropertyOnSiblings(element, \"value\", event.target.value, \"value\");\n elementData.formattedValue = null;\n });\n element.addEventListener(\"resetform\", event => {\n const defaultValue = this.data.defaultFieldValue ?? \"\";\n element.value = elementData.userValue = defaultValue;\n elementData.formattedValue = null;\n });\n let blurListener = event => {\n const {\n formattedValue\n } = elementData;\n if (formattedValue !== null && formattedValue !== undefined) {\n event.target.value = formattedValue;\n }\n event.target.scrollLeft = 0;\n };\n if (this.enableScripting && this.hasJSActions) {\n element.addEventListener(\"focus\", event => {\n if (elementData.focused) {\n return;\n }\n const {\n target\n } = event;\n if (elementData.userValue) {\n target.value = elementData.userValue;\n }\n elementData.lastCommittedValue = target.value;\n elementData.commitKey = 1;\n if (!this.data.actions?.Focus) {\n elementData.focused = true;\n }\n });\n element.addEventListener(\"updatefromsandbox\", jsEvent => {\n this.showElementAndHideCanvas(jsEvent.target);\n const actions = {\n value(event) {\n elementData.userValue = event.detail.value ?? \"\";\n storage.setValue(id, {\n value: elementData.userValue.toString()\n });\n event.target.value = elementData.userValue;\n },\n formattedValue(event) {\n const {\n formattedValue\n } = event.detail;\n elementData.formattedValue = formattedValue;\n if (formattedValue !== null && formattedValue !== undefined && event.target !== document.activeElement) {\n event.target.value = formattedValue;\n }\n storage.setValue(id, {\n formattedValue\n });\n },\n selRange(event) {\n event.target.setSelectionRange(...event.detail.selRange);\n },\n charLimit: event => {\n const {\n charLimit\n } = event.detail;\n const {\n target\n } = event;\n if (charLimit === 0) {\n target.removeAttribute(\"maxLength\");\n return;\n }\n target.setAttribute(\"maxLength\", charLimit);\n let value = elementData.userValue;\n if (!value || value.length <= charLimit) {\n return;\n }\n value = value.slice(0, charLimit);\n target.value = elementData.userValue = value;\n storage.setValue(id, {\n value\n });\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value,\n willCommit: true,\n commitKey: 1,\n selStart: target.selectionStart,\n selEnd: target.selectionEnd\n }\n });\n }\n };\n this._dispatchEventFromSandbox(actions, jsEvent);\n });\n element.addEventListener(\"keydown\", event => {\n elementData.commitKey = 1;\n let commitKey = -1;\n if (event.key === \"Escape\") {\n commitKey = 0;\n } else if (event.key === \"Enter\" && !this.data.multiLine) {\n commitKey = 2;\n } else if (event.key === \"Tab\") {\n elementData.commitKey = 3;\n }\n if (commitKey === -1) {\n return;\n }\n const {\n value\n } = event.target;\n if (elementData.lastCommittedValue === value) {\n return;\n }\n elementData.lastCommittedValue = value;\n elementData.userValue = value;\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value,\n willCommit: true,\n commitKey,\n selStart: event.target.selectionStart,\n selEnd: event.target.selectionEnd\n }\n });\n });\n const _blurListener = blurListener;\n blurListener = null;\n element.addEventListener(\"blur\", event => {\n if (!elementData.focused || !event.relatedTarget) {\n return;\n }\n if (!this.data.actions?.Blur) {\n elementData.focused = false;\n }\n const {\n value\n } = event.target;\n elementData.userValue = value;\n if (elementData.lastCommittedValue !== value) {\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value,\n willCommit: true,\n commitKey: elementData.commitKey,\n selStart: event.target.selectionStart,\n selEnd: event.target.selectionEnd\n }\n });\n }\n _blurListener(event);\n });\n if (this.data.actions?.Keystroke) {\n element.addEventListener(\"beforeinput\", event => {\n elementData.lastCommittedValue = null;\n const {\n data,\n target\n } = event;\n const {\n value,\n selectionStart,\n selectionEnd\n } = target;\n let selStart = selectionStart,\n selEnd = selectionEnd;\n switch (event.inputType) {\n case \"deleteWordBackward\":\n {\n const match = value.substring(0, selectionStart).match(/\\w*[^\\w]*$/);\n if (match) {\n selStart -= match[0].length;\n }\n break;\n }\n case \"deleteWordForward\":\n {\n const match = value.substring(selectionStart).match(/^[^\\w]*\\w*/);\n if (match) {\n selEnd += match[0].length;\n }\n break;\n }\n case \"deleteContentBackward\":\n if (selectionStart === selectionEnd) {\n selStart -= 1;\n }\n break;\n case \"deleteContentForward\":\n if (selectionStart === selectionEnd) {\n selEnd += 1;\n }\n break;\n }\n event.preventDefault();\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value,\n change: data || \"\",\n willCommit: false,\n selStart,\n selEnd\n }\n });\n });\n }\n this._setEventListeners(element, elementData, [[\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], event => event.target.value);\n }\n if (blurListener) {\n element.addEventListener(\"blur\", blurListener);\n }\n if (this.data.comb) {\n const fieldWidth = this.data.rect[2] - this.data.rect[0];\n const combWidth = fieldWidth / maxLen;\n element.classList.add(\"comb\");\n element.style.letterSpacing = `calc(${combWidth}px * var(--scale-factor) - 1ch)`;\n }\n } else {\n element = document.createElement(\"div\");\n element.textContent = this.data.fieldValue;\n element.style.verticalAlign = \"middle\";\n element.style.display = \"table-cell\";\n if (this.data.hasOwnCanvas) {\n element.hidden = true;\n }\n }\n this._setTextStyle(element);\n this._setBackgroundColor(element);\n this._setDefaultPropertiesFromJS(element);\n this.container.append(element);\n return this.container;\n }\n}\nclass SignatureWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: !!parameters.data.hasOwnCanvas\n });\n }\n}\nclass CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: parameters.renderForms\n });\n }\n render() {\n const storage = this.annotationStorage;\n const data = this.data;\n const id = data.id;\n let value = storage.getValue(id, {\n value: data.exportValue === data.fieldValue\n }).value;\n if (typeof value === \"string\") {\n value = value !== \"Off\";\n storage.setValue(id, {\n value\n });\n }\n this.container.classList.add(\"buttonWidgetAnnotation\", \"checkBox\");\n const element = document.createElement(\"input\");\n GetElementsByNameSet.add(element);\n element.setAttribute(\"data-element-id\", id);\n element.disabled = data.readOnly;\n this._setRequired(element, this.data.required);\n element.type = \"checkbox\";\n element.name = data.fieldName;\n if (value) {\n element.setAttribute(\"checked\", true);\n }\n element.setAttribute(\"exportValue\", data.exportValue);\n element.tabIndex = DEFAULT_TAB_INDEX;\n element.addEventListener(\"change\", event => {\n const {\n name,\n checked\n } = event.target;\n for (const checkbox of this._getElementsByName(name, id)) {\n const curChecked = checked && checkbox.exportValue === data.exportValue;\n if (checkbox.domElement) {\n checkbox.domElement.checked = curChecked;\n }\n storage.setValue(checkbox.id, {\n value: curChecked\n });\n }\n storage.setValue(id, {\n value: checked\n });\n });\n element.addEventListener(\"resetform\", event => {\n const defaultValue = data.defaultFieldValue || \"Off\";\n event.target.checked = defaultValue === data.exportValue;\n });\n if (this.enableScripting && this.hasJSActions) {\n element.addEventListener(\"updatefromsandbox\", jsEvent => {\n const actions = {\n value(event) {\n event.target.checked = event.detail.value !== \"Off\";\n storage.setValue(id, {\n value: event.target.checked\n });\n }\n };\n this._dispatchEventFromSandbox(actions, jsEvent);\n });\n this._setEventListeners(element, null, [[\"change\", \"Validate\"], [\"change\", \"Action\"], [\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], event => event.target.checked);\n }\n this._setBackgroundColor(element);\n this._setDefaultPropertiesFromJS(element);\n this.container.append(element);\n return this.container;\n }\n}\nclass RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: parameters.renderForms\n });\n }\n render() {\n this.container.classList.add(\"buttonWidgetAnnotation\", \"radioButton\");\n const storage = this.annotationStorage;\n const data = this.data;\n const id = data.id;\n let value = storage.getValue(id, {\n value: data.fieldValue === data.buttonValue\n }).value;\n if (typeof value === \"string\") {\n value = value !== data.buttonValue;\n storage.setValue(id, {\n value\n });\n }\n if (value) {\n for (const radio of this._getElementsByName(data.fieldName, id)) {\n storage.setValue(radio.id, {\n value: false\n });\n }\n }\n const element = document.createElement(\"input\");\n GetElementsByNameSet.add(element);\n element.setAttribute(\"data-element-id\", id);\n element.disabled = data.readOnly;\n this._setRequired(element, this.data.required);\n element.type = \"radio\";\n element.name = data.fieldName;\n if (value) {\n element.setAttribute(\"checked\", true);\n }\n element.tabIndex = DEFAULT_TAB_INDEX;\n element.addEventListener(\"change\", event => {\n const {\n name,\n checked\n } = event.target;\n for (const radio of this._getElementsByName(name, id)) {\n storage.setValue(radio.id, {\n value: false\n });\n }\n storage.setValue(id, {\n value: checked\n });\n });\n element.addEventListener(\"resetform\", event => {\n const defaultValue = data.defaultFieldValue;\n event.target.checked = defaultValue !== null && defaultValue !== undefined && defaultValue === data.buttonValue;\n });\n if (this.enableScripting && this.hasJSActions) {\n const pdfButtonValue = data.buttonValue;\n element.addEventListener(\"updatefromsandbox\", jsEvent => {\n const actions = {\n value: event => {\n const checked = pdfButtonValue === event.detail.value;\n for (const radio of this._getElementsByName(event.target.name)) {\n const curChecked = checked && radio.id === id;\n if (radio.domElement) {\n radio.domElement.checked = curChecked;\n }\n storage.setValue(radio.id, {\n value: curChecked\n });\n }\n }\n };\n this._dispatchEventFromSandbox(actions, jsEvent);\n });\n this._setEventListeners(element, null, [[\"change\", \"Validate\"], [\"change\", \"Action\"], [\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], event => event.target.checked);\n }\n this._setBackgroundColor(element);\n this._setDefaultPropertiesFromJS(element);\n this.container.append(element);\n return this.container;\n }\n}\nclass PushButtonWidgetAnnotationElement extends LinkAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n ignoreBorder: parameters.data.hasAppearance\n });\n }\n render() {\n const container = super.render();\n container.classList.add(\"buttonWidgetAnnotation\", \"pushButton\");\n const linkElement = container.lastChild;\n if (this.enableScripting && this.hasJSActions && linkElement) {\n this._setDefaultPropertiesFromJS(linkElement);\n linkElement.addEventListener(\"updatefromsandbox\", jsEvent => {\n this._dispatchEventFromSandbox({}, jsEvent);\n });\n }\n return container;\n }\n}\nclass ChoiceWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: parameters.renderForms\n });\n }\n render() {\n this.container.classList.add(\"choiceWidgetAnnotation\");\n const storage = this.annotationStorage;\n const id = this.data.id;\n const storedData = storage.getValue(id, {\n value: this.data.fieldValue\n });\n const selectElement = document.createElement(\"select\");\n GetElementsByNameSet.add(selectElement);\n selectElement.setAttribute(\"data-element-id\", id);\n selectElement.disabled = this.data.readOnly;\n this._setRequired(selectElement, this.data.required);\n selectElement.name = this.data.fieldName;\n selectElement.tabIndex = DEFAULT_TAB_INDEX;\n let addAnEmptyEntry = this.data.combo && this.data.options.length > 0;\n if (!this.data.combo) {\n selectElement.size = this.data.options.length;\n if (this.data.multiSelect) {\n selectElement.multiple = true;\n }\n }\n selectElement.addEventListener(\"resetform\", event => {\n const defaultValue = this.data.defaultFieldValue;\n for (const option of selectElement.options) {\n option.selected = option.value === defaultValue;\n }\n });\n for (const option of this.data.options) {\n const optionElement = document.createElement(\"option\");\n optionElement.textContent = option.displayValue;\n optionElement.value = option.exportValue;\n if (storedData.value.includes(option.exportValue)) {\n optionElement.setAttribute(\"selected\", true);\n addAnEmptyEntry = false;\n }\n selectElement.append(optionElement);\n }\n let removeEmptyEntry = null;\n if (addAnEmptyEntry) {\n const noneOptionElement = document.createElement(\"option\");\n noneOptionElement.value = \" \";\n noneOptionElement.setAttribute(\"hidden\", true);\n noneOptionElement.setAttribute(\"selected\", true);\n selectElement.prepend(noneOptionElement);\n removeEmptyEntry = () => {\n noneOptionElement.remove();\n selectElement.removeEventListener(\"input\", removeEmptyEntry);\n removeEmptyEntry = null;\n };\n selectElement.addEventListener(\"input\", removeEmptyEntry);\n }\n const getValue = isExport => {\n const name = isExport ? \"value\" : \"textContent\";\n const {\n options,\n multiple\n } = selectElement;\n if (!multiple) {\n return options.selectedIndex === -1 ? null : options[options.selectedIndex][name];\n }\n return Array.prototype.filter.call(options, option => option.selected).map(option => option[name]);\n };\n let selectedValues = getValue(false);\n const getItems = event => {\n const options = event.target.options;\n return Array.prototype.map.call(options, option => ({\n displayValue: option.textContent,\n exportValue: option.value\n }));\n };\n if (this.enableScripting && this.hasJSActions) {\n selectElement.addEventListener(\"updatefromsandbox\", jsEvent => {\n const actions = {\n value(event) {\n removeEmptyEntry?.();\n const value = event.detail.value;\n const values = new Set(Array.isArray(value) ? value : [value]);\n for (const option of selectElement.options) {\n option.selected = values.has(option.value);\n }\n storage.setValue(id, {\n value: getValue(true)\n });\n selectedValues = getValue(false);\n },\n multipleSelection(event) {\n selectElement.multiple = true;\n },\n remove(event) {\n const options = selectElement.options;\n const index = event.detail.remove;\n options[index].selected = false;\n selectElement.remove(index);\n if (options.length > 0) {\n const i = Array.prototype.findIndex.call(options, option => option.selected);\n if (i === -1) {\n options[0].selected = true;\n }\n }\n storage.setValue(id, {\n value: getValue(true),\n items: getItems(event)\n });\n selectedValues = getValue(false);\n },\n clear(event) {\n while (selectElement.length !== 0) {\n selectElement.remove(0);\n }\n storage.setValue(id, {\n value: null,\n items: []\n });\n selectedValues = getValue(false);\n },\n insert(event) {\n const {\n index,\n displayValue,\n exportValue\n } = event.detail.insert;\n const selectChild = selectElement.children[index];\n const optionElement = document.createElement(\"option\");\n optionElement.textContent = displayValue;\n optionElement.value = exportValue;\n if (selectChild) {\n selectChild.before(optionElement);\n } else {\n selectElement.append(optionElement);\n }\n storage.setValue(id, {\n value: getValue(true),\n items: getItems(event)\n });\n selectedValues = getValue(false);\n },\n items(event) {\n const {\n items\n } = event.detail;\n while (selectElement.length !== 0) {\n selectElement.remove(0);\n }\n for (const item of items) {\n const {\n displayValue,\n exportValue\n } = item;\n const optionElement = document.createElement(\"option\");\n optionElement.textContent = displayValue;\n optionElement.value = exportValue;\n selectElement.append(optionElement);\n }\n if (selectElement.options.length > 0) {\n selectElement.options[0].selected = true;\n }\n storage.setValue(id, {\n value: getValue(true),\n items: getItems(event)\n });\n selectedValues = getValue(false);\n },\n indices(event) {\n const indices = new Set(event.detail.indices);\n for (const option of event.target.options) {\n option.selected = indices.has(option.index);\n }\n storage.setValue(id, {\n value: getValue(true)\n });\n selectedValues = getValue(false);\n },\n editable(event) {\n event.target.disabled = !event.detail.editable;\n }\n };\n this._dispatchEventFromSandbox(actions, jsEvent);\n });\n selectElement.addEventListener(\"input\", event => {\n const exportValue = getValue(true);\n const change = getValue(false);\n storage.setValue(id, {\n value: exportValue\n });\n event.preventDefault();\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value: selectedValues,\n change,\n changeEx: exportValue,\n willCommit: false,\n commitKey: 1,\n keyDown: false\n }\n });\n });\n this._setEventListeners(selectElement, null, [[\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"], [\"input\", \"Action\"], [\"input\", \"Validate\"]], event => event.target.value);\n } else {\n selectElement.addEventListener(\"input\", function (event) {\n storage.setValue(id, {\n value: getValue(true)\n });\n });\n }\n if (this.data.combo) {\n this._setTextStyle(selectElement);\n } else {}\n this._setBackgroundColor(selectElement);\n this._setDefaultPropertiesFromJS(selectElement);\n this.container.append(selectElement);\n return this.container;\n }\n}\nclass PopupAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n const {\n data,\n elements\n } = parameters;\n super(parameters, {\n isRenderable: AnnotationElement._hasPopupData(data)\n });\n this.elements = elements;\n this.popup = null;\n }\n render() {\n this.container.classList.add(\"popupAnnotation\");\n const popup = this.popup = new PopupElement({\n container: this.container,\n color: this.data.color,\n titleObj: this.data.titleObj,\n modificationDate: this.data.modificationDate,\n contentsObj: this.data.contentsObj,\n richText: this.data.richText,\n rect: this.data.rect,\n parentRect: this.data.parentRect || null,\n parent: this.parent,\n elements: this.elements,\n open: this.data.open\n });\n const elementIds = [];\n for (const element of this.elements) {\n element.popup = popup;\n elementIds.push(element.data.id);\n element.addHighlightArea();\n }\n this.container.setAttribute(\"aria-controls\", elementIds.map(id => `${AnnotationPrefix}${id}`).join(\",\"));\n return this.container;\n }\n}\nclass PopupElement {\n #boundKeyDown = this.#keyDown.bind(this);\n #boundHide = this.#hide.bind(this);\n #boundShow = this.#show.bind(this);\n #boundToggle = this.#toggle.bind(this);\n #color = null;\n #container = null;\n #contentsObj = null;\n #dateObj = null;\n #elements = null;\n #parent = null;\n #parentRect = null;\n #pinned = false;\n #popup = null;\n #position = null;\n #rect = null;\n #richText = null;\n #titleObj = null;\n #updates = null;\n #wasVisible = false;\n constructor({\n container,\n color,\n elements,\n titleObj,\n modificationDate,\n contentsObj,\n richText,\n parent,\n rect,\n parentRect,\n open\n }) {\n this.#container = container;\n this.#titleObj = titleObj;\n this.#contentsObj = contentsObj;\n this.#richText = richText;\n this.#parent = parent;\n this.#color = color;\n this.#rect = rect;\n this.#parentRect = parentRect;\n this.#elements = elements;\n this.#dateObj = PDFDateString.toDateObject(modificationDate);\n this.trigger = elements.flatMap(e => e.getElementsToTriggerPopup());\n for (const element of this.trigger) {\n element.addEventListener(\"click\", this.#boundToggle);\n element.addEventListener(\"mouseenter\", this.#boundShow);\n element.addEventListener(\"mouseleave\", this.#boundHide);\n element.classList.add(\"popupTriggerArea\");\n }\n for (const element of elements) {\n element.container?.addEventListener(\"keydown\", this.#boundKeyDown);\n }\n this.#container.hidden = true;\n if (open) {\n this.#toggle();\n }\n }\n render() {\n if (this.#popup) {\n return;\n }\n const popup = this.#popup = document.createElement(\"div\");\n popup.className = \"popup\";\n if (this.#color) {\n const baseColor = popup.style.outlineColor = Util.makeHexColor(...this.#color);\n if (CSS.supports(\"background-color\", \"color-mix(in srgb, red 30%, white)\")) {\n popup.style.backgroundColor = `color-mix(in srgb, ${baseColor} 30%, white)`;\n } else {\n const BACKGROUND_ENLIGHT = 0.7;\n popup.style.backgroundColor = Util.makeHexColor(...this.#color.map(c => Math.floor(BACKGROUND_ENLIGHT * (255 - c) + c)));\n }\n }\n const header = document.createElement(\"span\");\n header.className = \"header\";\n const title = document.createElement(\"h1\");\n header.append(title);\n ({\n dir: title.dir,\n str: title.textContent\n } = this.#titleObj);\n popup.append(header);\n if (this.#dateObj) {\n const modificationDate = document.createElement(\"span\");\n modificationDate.classList.add(\"popupDate\");\n modificationDate.setAttribute(\"data-l10n-id\", \"pdfjs-annotation-date-time-string\");\n modificationDate.setAttribute(\"data-l10n-args\", JSON.stringify({\n dateObj: this.#dateObj.valueOf()\n }));\n header.append(modificationDate);\n }\n const html = this.#html;\n if (html) {\n XfaLayer.render({\n xfaHtml: html,\n intent: \"richText\",\n div: popup\n });\n popup.lastChild.classList.add(\"richText\", \"popupContent\");\n } else {\n const contents = this._formatContents(this.#contentsObj);\n popup.append(contents);\n }\n this.#container.append(popup);\n }\n get #html() {\n const richText = this.#richText;\n const contentsObj = this.#contentsObj;\n if (richText?.str && (!contentsObj?.str || contentsObj.str === richText.str)) {\n return this.#richText.html || null;\n }\n return null;\n }\n get #fontSize() {\n return this.#html?.attributes?.style?.fontSize || 0;\n }\n get #fontColor() {\n return this.#html?.attributes?.style?.color || null;\n }\n #makePopupContent(text) {\n const popupLines = [];\n const popupContent = {\n str: text,\n html: {\n name: \"div\",\n attributes: {\n dir: \"auto\"\n },\n children: [{\n name: \"p\",\n children: popupLines\n }]\n }\n };\n const lineAttributes = {\n style: {\n color: this.#fontColor,\n fontSize: this.#fontSize ? `calc(${this.#fontSize}px * var(--scale-factor))` : \"\"\n }\n };\n for (const line of text.split(\"\\n\")) {\n popupLines.push({\n name: \"span\",\n value: line,\n attributes: lineAttributes\n });\n }\n return popupContent;\n }\n _formatContents({\n str,\n dir\n }) {\n const p = document.createElement(\"p\");\n p.classList.add(\"popupContent\");\n p.dir = dir;\n const lines = str.split(/(?:\\r\\n?|\\n)/);\n for (let i = 0, ii = lines.length; i < ii; ++i) {\n const line = lines[i];\n p.append(document.createTextNode(line));\n if (i < ii - 1) {\n p.append(document.createElement(\"br\"));\n }\n }\n return p;\n }\n #keyDown(event) {\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n if (event.key === \"Enter\" || event.key === \"Escape\" && this.#pinned) {\n this.#toggle();\n }\n }\n updateEdited({\n rect,\n popupContent\n }) {\n this.#updates ||= {\n contentsObj: this.#contentsObj,\n richText: this.#richText\n };\n if (rect) {\n this.#position = null;\n }\n if (popupContent) {\n this.#richText = this.#makePopupContent(popupContent);\n this.#contentsObj = null;\n }\n this.#popup?.remove();\n this.#popup = null;\n }\n resetEdited() {\n if (!this.#updates) {\n return;\n }\n ({\n contentsObj: this.#contentsObj,\n richText: this.#richText\n } = this.#updates);\n this.#updates = null;\n this.#popup?.remove();\n this.#popup = null;\n this.#position = null;\n }\n #setPosition() {\n if (this.#position !== null) {\n return;\n }\n const {\n page: {\n view\n },\n viewport: {\n rawDims: {\n pageWidth,\n pageHeight,\n pageX,\n pageY\n }\n }\n } = this.#parent;\n let useParentRect = !!this.#parentRect;\n let rect = useParentRect ? this.#parentRect : this.#rect;\n for (const element of this.#elements) {\n if (!rect || Util.intersect(element.data.rect, rect) !== null) {\n rect = element.data.rect;\n useParentRect = true;\n break;\n }\n }\n const normalizedRect = Util.normalizeRect([rect[0], view[3] - rect[1] + view[1], rect[2], view[3] - rect[3] + view[1]]);\n const HORIZONTAL_SPACE_AFTER_ANNOTATION = 5;\n const parentWidth = useParentRect ? rect[2] - rect[0] + HORIZONTAL_SPACE_AFTER_ANNOTATION : 0;\n const popupLeft = normalizedRect[0] + parentWidth;\n const popupTop = normalizedRect[1];\n this.#position = [100 * (popupLeft - pageX) / pageWidth, 100 * (popupTop - pageY) / pageHeight];\n const {\n style\n } = this.#container;\n style.left = `${this.#position[0]}%`;\n style.top = `${this.#position[1]}%`;\n }\n #toggle() {\n this.#pinned = !this.#pinned;\n if (this.#pinned) {\n this.#show();\n this.#container.addEventListener(\"click\", this.#boundToggle);\n this.#container.addEventListener(\"keydown\", this.#boundKeyDown);\n } else {\n this.#hide();\n this.#container.removeEventListener(\"click\", this.#boundToggle);\n this.#container.removeEventListener(\"keydown\", this.#boundKeyDown);\n }\n }\n #show() {\n if (!this.#popup) {\n this.render();\n }\n if (!this.isVisible) {\n this.#setPosition();\n this.#container.hidden = false;\n this.#container.style.zIndex = parseInt(this.#container.style.zIndex) + 1000;\n } else if (this.#pinned) {\n this.#container.classList.add(\"focused\");\n }\n }\n #hide() {\n this.#container.classList.remove(\"focused\");\n if (this.#pinned || !this.isVisible) {\n return;\n }\n this.#container.hidden = true;\n this.#container.style.zIndex = parseInt(this.#container.style.zIndex) - 1000;\n }\n forceHide() {\n this.#wasVisible = this.isVisible;\n if (!this.#wasVisible) {\n return;\n }\n this.#container.hidden = true;\n }\n maybeShow() {\n if (!this.#wasVisible) {\n return;\n }\n if (!this.#popup) {\n this.#show();\n }\n this.#wasVisible = false;\n this.#container.hidden = false;\n }\n get isVisible() {\n return this.#container.hidden === false;\n }\n}\nclass FreeTextAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n this.textContent = parameters.data.textContent;\n this.textPosition = parameters.data.textPosition;\n this.annotationEditorType = AnnotationEditorType.FREETEXT;\n }\n render() {\n this.container.classList.add(\"freeTextAnnotation\");\n if (this.textContent) {\n const content = document.createElement(\"div\");\n content.classList.add(\"annotationTextContent\");\n content.setAttribute(\"role\", \"comment\");\n for (const line of this.textContent) {\n const lineSpan = document.createElement(\"span\");\n lineSpan.textContent = line;\n content.append(lineSpan);\n }\n this.container.append(content);\n }\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this._editOnDoubleClick();\n return this.container;\n }\n}\nclass LineAnnotationElement extends AnnotationElement {\n #line = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n }\n render() {\n this.container.classList.add(\"lineAnnotation\");\n const data = this.data;\n const {\n width,\n height\n } = getRectDims(data.rect);\n const svg = this.svgFactory.create(width, height, true);\n const line = this.#line = this.svgFactory.createElement(\"svg:line\");\n line.setAttribute(\"x1\", data.rect[2] - data.lineCoordinates[0]);\n line.setAttribute(\"y1\", data.rect[3] - data.lineCoordinates[1]);\n line.setAttribute(\"x2\", data.rect[2] - data.lineCoordinates[2]);\n line.setAttribute(\"y2\", data.rect[3] - data.lineCoordinates[3]);\n line.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n line.setAttribute(\"stroke\", \"transparent\");\n line.setAttribute(\"fill\", \"transparent\");\n svg.append(line);\n this.container.append(svg);\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#line;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nclass SquareAnnotationElement extends AnnotationElement {\n #square = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n }\n render() {\n this.container.classList.add(\"squareAnnotation\");\n const data = this.data;\n const {\n width,\n height\n } = getRectDims(data.rect);\n const svg = this.svgFactory.create(width, height, true);\n const borderWidth = data.borderStyle.width;\n const square = this.#square = this.svgFactory.createElement(\"svg:rect\");\n square.setAttribute(\"x\", borderWidth / 2);\n square.setAttribute(\"y\", borderWidth / 2);\n square.setAttribute(\"width\", width - borderWidth);\n square.setAttribute(\"height\", height - borderWidth);\n square.setAttribute(\"stroke-width\", borderWidth || 1);\n square.setAttribute(\"stroke\", \"transparent\");\n square.setAttribute(\"fill\", \"transparent\");\n svg.append(square);\n this.container.append(svg);\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#square;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nclass CircleAnnotationElement extends AnnotationElement {\n #circle = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n }\n render() {\n this.container.classList.add(\"circleAnnotation\");\n const data = this.data;\n const {\n width,\n height\n } = getRectDims(data.rect);\n const svg = this.svgFactory.create(width, height, true);\n const borderWidth = data.borderStyle.width;\n const circle = this.#circle = this.svgFactory.createElement(\"svg:ellipse\");\n circle.setAttribute(\"cx\", width / 2);\n circle.setAttribute(\"cy\", height / 2);\n circle.setAttribute(\"rx\", width / 2 - borderWidth / 2);\n circle.setAttribute(\"ry\", height / 2 - borderWidth / 2);\n circle.setAttribute(\"stroke-width\", borderWidth || 1);\n circle.setAttribute(\"stroke\", \"transparent\");\n circle.setAttribute(\"fill\", \"transparent\");\n svg.append(circle);\n this.container.append(svg);\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#circle;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nclass PolylineAnnotationElement extends AnnotationElement {\n #polyline = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n this.containerClassName = \"polylineAnnotation\";\n this.svgElementName = \"svg:polyline\";\n }\n render() {\n this.container.classList.add(this.containerClassName);\n const {\n data: {\n rect,\n vertices,\n borderStyle,\n popupRef\n }\n } = this;\n if (!vertices) {\n return this.container;\n }\n const {\n width,\n height\n } = getRectDims(rect);\n const svg = this.svgFactory.create(width, height, true);\n let points = [];\n for (let i = 0, ii = vertices.length; i < ii; i += 2) {\n const x = vertices[i] - rect[0];\n const y = rect[3] - vertices[i + 1];\n points.push(`${x},${y}`);\n }\n points = points.join(\" \");\n const polyline = this.#polyline = this.svgFactory.createElement(this.svgElementName);\n polyline.setAttribute(\"points\", points);\n polyline.setAttribute(\"stroke-width\", borderStyle.width || 1);\n polyline.setAttribute(\"stroke\", \"transparent\");\n polyline.setAttribute(\"fill\", \"transparent\");\n svg.append(polyline);\n this.container.append(svg);\n if (!popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#polyline;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nclass PolygonAnnotationElement extends PolylineAnnotationElement {\n constructor(parameters) {\n super(parameters);\n this.containerClassName = \"polygonAnnotation\";\n this.svgElementName = \"svg:polygon\";\n }\n}\nclass CaretAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n }\n render() {\n this.container.classList.add(\"caretAnnotation\");\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n}\nclass InkAnnotationElement extends AnnotationElement {\n #polylines = [];\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n this.containerClassName = \"inkAnnotation\";\n this.svgElementName = \"svg:polyline\";\n this.annotationEditorType = this.data.it === \"InkHighlight\" ? AnnotationEditorType.HIGHLIGHT : AnnotationEditorType.INK;\n }\n render() {\n this.container.classList.add(this.containerClassName);\n const {\n data: {\n rect,\n inkLists,\n borderStyle,\n popupRef\n }\n } = this;\n const {\n width,\n height\n } = getRectDims(rect);\n const svg = this.svgFactory.create(width, height, true);\n for (const inkList of inkLists) {\n let points = [];\n for (let i = 0, ii = inkList.length; i < ii; i += 2) {\n const x = inkList[i] - rect[0];\n const y = rect[3] - inkList[i + 1];\n points.push(`${x},${y}`);\n }\n points = points.join(\" \");\n const polyline = this.svgFactory.createElement(this.svgElementName);\n this.#polylines.push(polyline);\n polyline.setAttribute(\"points\", points);\n polyline.setAttribute(\"stroke-width\", borderStyle.width || 1);\n polyline.setAttribute(\"stroke\", \"transparent\");\n polyline.setAttribute(\"fill\", \"transparent\");\n if (!popupRef && this.hasPopupData) {\n this._createPopup();\n }\n svg.append(polyline);\n }\n this.container.append(svg);\n this._editOnDoubleClick();\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#polylines;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nclass HighlightAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n this.annotationEditorType = AnnotationEditorType.HIGHLIGHT;\n }\n render() {\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.classList.add(\"highlightAnnotation\");\n this._editOnDoubleClick();\n return this.container;\n }\n}\nclass UnderlineAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n render() {\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.classList.add(\"underlineAnnotation\");\n return this.container;\n }\n}\nclass SquigglyAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n render() {\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.classList.add(\"squigglyAnnotation\");\n return this.container;\n }\n}\nclass StrikeOutAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n render() {\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.classList.add(\"strikeoutAnnotation\");\n return this.container;\n }\n}\nclass StampAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n this.annotationEditorType = AnnotationEditorType.STAMP;\n }\n render() {\n this.container.classList.add(\"stampAnnotation\");\n this.container.setAttribute(\"role\", \"img\");\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this._editOnDoubleClick();\n return this.container;\n }\n}\nclass FileAttachmentAnnotationElement extends AnnotationElement {\n #trigger = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true\n });\n const {\n file\n } = this.data;\n this.filename = file.filename;\n this.content = file.content;\n this.linkService.eventBus?.dispatch(\"fileattachmentannotation\", {\n source: this,\n ...file\n });\n }\n render() {\n this.container.classList.add(\"fileAttachmentAnnotation\");\n const {\n container,\n data\n } = this;\n let trigger;\n if (data.hasAppearance || data.fillAlpha === 0) {\n trigger = document.createElement(\"div\");\n } else {\n trigger = document.createElement(\"img\");\n trigger.src = `${this.imageResourcesPath}annotation-${/paperclip/i.test(data.name) ? \"paperclip\" : \"pushpin\"}.svg`;\n if (data.fillAlpha && data.fillAlpha < 1) {\n trigger.style = `filter: opacity(${Math.round(data.fillAlpha * 100)}%);`;\n }\n }\n trigger.addEventListener(\"dblclick\", this.#download.bind(this));\n this.#trigger = trigger;\n const {\n isMac\n } = util_FeatureTest.platform;\n container.addEventListener(\"keydown\", evt => {\n if (evt.key === \"Enter\" && (isMac ? evt.metaKey : evt.ctrlKey)) {\n this.#download();\n }\n });\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n } else {\n trigger.classList.add(\"popupTriggerArea\");\n }\n container.append(trigger);\n return container;\n }\n getElementsToTriggerPopup() {\n return this.#trigger;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n #download() {\n this.downloadManager?.openOrDownloadData(this.content, this.filename);\n }\n}\nclass AnnotationLayer {\n #accessibilityManager = null;\n #annotationCanvasMap = null;\n #editableAnnotations = new Map();\n #structTreeLayer = null;\n constructor({\n div,\n accessibilityManager,\n annotationCanvasMap,\n annotationEditorUIManager,\n page,\n viewport,\n structTreeLayer\n }) {\n this.div = div;\n this.#accessibilityManager = accessibilityManager;\n this.#annotationCanvasMap = annotationCanvasMap;\n this.#structTreeLayer = structTreeLayer || null;\n this.page = page;\n this.viewport = viewport;\n this.zIndex = 0;\n this._annotationEditorUIManager = annotationEditorUIManager;\n }\n hasEditableAnnotations() {\n return this.#editableAnnotations.size > 0;\n }\n async #appendElement(element, id) {\n const contentElement = element.firstChild || element;\n const annotationId = contentElement.id = `${AnnotationPrefix}${id}`;\n const ariaAttributes = await this.#structTreeLayer?.getAriaAttributes(annotationId);\n if (ariaAttributes) {\n for (const [key, value] of ariaAttributes) {\n contentElement.setAttribute(key, value);\n }\n }\n this.div.append(element);\n this.#accessibilityManager?.moveElementInDOM(this.div, element, contentElement, false);\n }\n async render(params) {\n const {\n annotations\n } = params;\n const layer = this.div;\n setLayerDimensions(layer, this.viewport);\n const popupToElements = new Map();\n const elementParams = {\n data: null,\n layer,\n linkService: params.linkService,\n downloadManager: params.downloadManager,\n imageResourcesPath: params.imageResourcesPath || \"\",\n renderForms: params.renderForms !== false,\n svgFactory: new DOMSVGFactory(),\n annotationStorage: params.annotationStorage || new AnnotationStorage(),\n enableScripting: params.enableScripting === true,\n hasJSActions: params.hasJSActions,\n fieldObjects: params.fieldObjects,\n parent: this,\n elements: null\n };\n for (const data of annotations) {\n if (data.noHTML) {\n continue;\n }\n const isPopupAnnotation = data.annotationType === AnnotationType.POPUP;\n if (!isPopupAnnotation) {\n const {\n width,\n height\n } = getRectDims(data.rect);\n if (width <= 0 || height <= 0) {\n continue;\n }\n } else {\n const elements = popupToElements.get(data.id);\n if (!elements) {\n continue;\n }\n elementParams.elements = elements;\n }\n elementParams.data = data;\n const element = AnnotationElementFactory.create(elementParams);\n if (!element.isRenderable) {\n continue;\n }\n if (!isPopupAnnotation && data.popupRef) {\n const elements = popupToElements.get(data.popupRef);\n if (!elements) {\n popupToElements.set(data.popupRef, [element]);\n } else {\n elements.push(element);\n }\n }\n const rendered = element.render();\n if (data.hidden) {\n rendered.style.visibility = \"hidden\";\n }\n await this.#appendElement(rendered, data.id);\n if (element._isEditable) {\n this.#editableAnnotations.set(element.data.id, element);\n this._annotationEditorUIManager?.renderAnnotationElement(element);\n }\n }\n this.#setAnnotationCanvasMap();\n }\n update({\n viewport\n }) {\n const layer = this.div;\n this.viewport = viewport;\n setLayerDimensions(layer, {\n rotation: viewport.rotation\n });\n this.#setAnnotationCanvasMap();\n layer.hidden = false;\n }\n #setAnnotationCanvasMap() {\n if (!this.#annotationCanvasMap) {\n return;\n }\n const layer = this.div;\n for (const [id, canvas] of this.#annotationCanvasMap) {\n const element = layer.querySelector(`[data-annotation-id=\"${id}\"]`);\n if (!element) {\n continue;\n }\n canvas.className = \"annotationContent\";\n const {\n firstChild\n } = element;\n if (!firstChild) {\n element.append(canvas);\n } else if (firstChild.nodeName === \"CANVAS\") {\n firstChild.replaceWith(canvas);\n } else if (!firstChild.classList.contains(\"annotationContent\")) {\n firstChild.before(canvas);\n } else {\n firstChild.after(canvas);\n }\n }\n this.#annotationCanvasMap.clear();\n }\n getEditableAnnotations() {\n return Array.from(this.#editableAnnotations.values());\n }\n getEditableAnnotation(id) {\n return this.#editableAnnotations.get(id);\n }\n}\n\n;// ./src/display/editor/freetext.js\n\n\n\n\n\n\n\nconst EOL_PATTERN = /\\r\\n?|\\n/g;\nclass FreeTextEditor extends AnnotationEditor {\n #color;\n #content = \"\";\n #editorDivId = `${this.id}-editor`;\n #editModeAC = null;\n #fontSize;\n static _freeTextDefaultContent = \"\";\n static _internalPadding = 0;\n static _defaultColor = null;\n static _defaultFontSize = 10;\n static get _keyboardManager() {\n const proto = FreeTextEditor.prototype;\n const arrowChecker = self => self.isEmpty();\n const small = AnnotationEditorUIManager.TRANSLATE_SMALL;\n const big = AnnotationEditorUIManager.TRANSLATE_BIG;\n return shadow(this, \"_keyboardManager\", new KeyboardManager([[[\"ctrl+s\", \"mac+meta+s\", \"ctrl+p\", \"mac+meta+p\"], proto.commitOrRemove, {\n bubbles: true\n }], [[\"ctrl+Enter\", \"mac+meta+Enter\", \"Escape\", \"mac+Escape\"], proto.commitOrRemove], [[\"ArrowLeft\", \"mac+ArrowLeft\"], proto._translateEmpty, {\n args: [-small, 0],\n checker: arrowChecker\n }], [[\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"], proto._translateEmpty, {\n args: [-big, 0],\n checker: arrowChecker\n }], [[\"ArrowRight\", \"mac+ArrowRight\"], proto._translateEmpty, {\n args: [small, 0],\n checker: arrowChecker\n }], [[\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"], proto._translateEmpty, {\n args: [big, 0],\n checker: arrowChecker\n }], [[\"ArrowUp\", \"mac+ArrowUp\"], proto._translateEmpty, {\n args: [0, -small],\n checker: arrowChecker\n }], [[\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"], proto._translateEmpty, {\n args: [0, -big],\n checker: arrowChecker\n }], [[\"ArrowDown\", \"mac+ArrowDown\"], proto._translateEmpty, {\n args: [0, small],\n checker: arrowChecker\n }], [[\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"], proto._translateEmpty, {\n args: [0, big],\n checker: arrowChecker\n }]]));\n }\n static _type = \"freetext\";\n static _editorType = AnnotationEditorType.FREETEXT;\n constructor(params) {\n super({\n ...params,\n name: \"freeTextEditor\"\n });\n this.#color = params.color || FreeTextEditor._defaultColor || AnnotationEditor._defaultLineColor;\n this.#fontSize = params.fontSize || FreeTextEditor._defaultFontSize;\n }\n static initialize(l10n, uiManager) {\n AnnotationEditor.initialize(l10n, uiManager, {\n strings: [\"pdfjs-free-text-default-content\"]\n });\n const style = getComputedStyle(document.documentElement);\n this._internalPadding = parseFloat(style.getPropertyValue(\"--freetext-padding\"));\n }\n static updateDefaultParams(type, value) {\n switch (type) {\n case AnnotationEditorParamsType.FREETEXT_SIZE:\n FreeTextEditor._defaultFontSize = value;\n break;\n case AnnotationEditorParamsType.FREETEXT_COLOR:\n FreeTextEditor._defaultColor = value;\n break;\n }\n }\n updateParams(type, value) {\n switch (type) {\n case AnnotationEditorParamsType.FREETEXT_SIZE:\n this.#updateFontSize(value);\n break;\n case AnnotationEditorParamsType.FREETEXT_COLOR:\n this.#updateColor(value);\n break;\n }\n }\n static get defaultPropertiesToUpdate() {\n return [[AnnotationEditorParamsType.FREETEXT_SIZE, FreeTextEditor._defaultFontSize], [AnnotationEditorParamsType.FREETEXT_COLOR, FreeTextEditor._defaultColor || AnnotationEditor._defaultLineColor]];\n }\n get propertiesToUpdate() {\n return [[AnnotationEditorParamsType.FREETEXT_SIZE, this.#fontSize], [AnnotationEditorParamsType.FREETEXT_COLOR, this.#color]];\n }\n #updateFontSize(fontSize) {\n const setFontsize = size => {\n this.editorDiv.style.fontSize = `calc(${size}px * var(--scale-factor))`;\n this.translate(0, -(size - this.#fontSize) * this.parentScale);\n this.#fontSize = size;\n this.#setEditorDimensions();\n };\n const savedFontsize = this.#fontSize;\n this.addCommands({\n cmd: setFontsize.bind(this, fontSize),\n undo: setFontsize.bind(this, savedFontsize),\n post: this._uiManager.updateUI.bind(this._uiManager, this),\n mustExec: true,\n type: AnnotationEditorParamsType.FREETEXT_SIZE,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n #updateColor(color) {\n const setColor = col => {\n this.#color = this.editorDiv.style.color = col;\n };\n const savedColor = this.#color;\n this.addCommands({\n cmd: setColor.bind(this, color),\n undo: setColor.bind(this, savedColor),\n post: this._uiManager.updateUI.bind(this._uiManager, this),\n mustExec: true,\n type: AnnotationEditorParamsType.FREETEXT_COLOR,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n _translateEmpty(x, y) {\n this._uiManager.translateSelectedEditors(x, y, true);\n }\n getInitialTranslation() {\n const scale = this.parentScale;\n return [-FreeTextEditor._internalPadding * scale, -(FreeTextEditor._internalPadding + this.#fontSize) * scale];\n }\n rebuild() {\n if (!this.parent) {\n return;\n }\n super.rebuild();\n if (this.div === null) {\n return;\n }\n if (!this.isAttachedToDOM) {\n this.parent.add(this);\n }\n }\n enableEditMode() {\n if (this.isInEditMode()) {\n return;\n }\n this.parent.setEditingState(false);\n this.parent.updateToolbar(AnnotationEditorType.FREETEXT);\n super.enableEditMode();\n this.overlayDiv.classList.remove(\"enabled\");\n this.editorDiv.contentEditable = true;\n this._isDraggable = false;\n this.div.removeAttribute(\"aria-activedescendant\");\n this.#editModeAC = new AbortController();\n const signal = this._uiManager.combinedSignal(this.#editModeAC);\n this.editorDiv.addEventListener(\"keydown\", this.editorDivKeydown.bind(this), {\n signal\n });\n this.editorDiv.addEventListener(\"focus\", this.editorDivFocus.bind(this), {\n signal\n });\n this.editorDiv.addEventListener(\"blur\", this.editorDivBlur.bind(this), {\n signal\n });\n this.editorDiv.addEventListener(\"input\", this.editorDivInput.bind(this), {\n signal\n });\n this.editorDiv.addEventListener(\"paste\", this.editorDivPaste.bind(this), {\n signal\n });\n }\n disableEditMode() {\n if (!this.isInEditMode()) {\n return;\n }\n this.parent.setEditingState(true);\n super.disableEditMode();\n this.overlayDiv.classList.add(\"enabled\");\n this.editorDiv.contentEditable = false;\n this.div.setAttribute(\"aria-activedescendant\", this.#editorDivId);\n this._isDraggable = true;\n this.#editModeAC?.abort();\n this.#editModeAC = null;\n this.div.focus({\n preventScroll: true\n });\n this.isEditing = false;\n this.parent.div.classList.add(\"freetextEditing\");\n }\n focusin(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n super.focusin(event);\n if (event.target !== this.editorDiv) {\n this.editorDiv.focus();\n }\n }\n onceAdded() {\n if (this.width) {\n return;\n }\n this.enableEditMode();\n this.editorDiv.focus();\n if (this._initialOptions?.isCentered) {\n this.center();\n }\n this._initialOptions = null;\n }\n isEmpty() {\n return !this.editorDiv || this.editorDiv.innerText.trim() === \"\";\n }\n remove() {\n this.isEditing = false;\n if (this.parent) {\n this.parent.setEditingState(true);\n this.parent.div.classList.add(\"freetextEditing\");\n }\n super.remove();\n }\n #extractText() {\n const buffer = [];\n this.editorDiv.normalize();\n let prevChild = null;\n for (const child of this.editorDiv.childNodes) {\n if (prevChild?.nodeType === Node.TEXT_NODE && child.nodeName === \"BR\") {\n continue;\n }\n buffer.push(FreeTextEditor.#getNodeContent(child));\n prevChild = child;\n }\n return buffer.join(\"\\n\");\n }\n #setEditorDimensions() {\n const [parentWidth, parentHeight] = this.parentDimensions;\n let rect;\n if (this.isAttachedToDOM) {\n rect = this.div.getBoundingClientRect();\n } else {\n const {\n currentLayer,\n div\n } = this;\n const savedDisplay = div.style.display;\n const savedVisibility = div.classList.contains(\"hidden\");\n div.classList.remove(\"hidden\");\n div.style.display = \"hidden\";\n currentLayer.div.append(this.div);\n rect = div.getBoundingClientRect();\n div.remove();\n div.style.display = savedDisplay;\n div.classList.toggle(\"hidden\", savedVisibility);\n }\n if (this.rotation % 180 === this.parentRotation % 180) {\n this.width = rect.width / parentWidth;\n this.height = rect.height / parentHeight;\n } else {\n this.width = rect.height / parentWidth;\n this.height = rect.width / parentHeight;\n }\n this.fixAndSetPosition();\n }\n commit() {\n if (!this.isInEditMode()) {\n return;\n }\n super.commit();\n this.disableEditMode();\n const savedText = this.#content;\n const newText = this.#content = this.#extractText().trimEnd();\n if (savedText === newText) {\n return;\n }\n const setText = text => {\n this.#content = text;\n if (!text) {\n this.remove();\n return;\n }\n this.#setContent();\n this._uiManager.rebuild(this);\n this.#setEditorDimensions();\n };\n this.addCommands({\n cmd: () => {\n setText(newText);\n },\n undo: () => {\n setText(savedText);\n },\n mustExec: false\n });\n this.#setEditorDimensions();\n }\n shouldGetKeyboardEvents() {\n return this.isInEditMode();\n }\n enterInEditMode() {\n this.enableEditMode();\n this.editorDiv.focus();\n }\n dblclick(event) {\n this.enterInEditMode();\n }\n keydown(event) {\n if (event.target === this.div && event.key === \"Enter\") {\n this.enterInEditMode();\n event.preventDefault();\n }\n }\n editorDivKeydown(event) {\n FreeTextEditor._keyboardManager.exec(this, event);\n }\n editorDivFocus(event) {\n this.isEditing = true;\n }\n editorDivBlur(event) {\n this.isEditing = false;\n }\n editorDivInput(event) {\n this.parent.div.classList.toggle(\"freetextEditing\", this.isEmpty());\n }\n disableEditing() {\n this.editorDiv.setAttribute(\"role\", \"comment\");\n this.editorDiv.removeAttribute(\"aria-multiline\");\n }\n enableEditing() {\n this.editorDiv.setAttribute(\"role\", \"textbox\");\n this.editorDiv.setAttribute(\"aria-multiline\", true);\n }\n render() {\n if (this.div) {\n return this.div;\n }\n let baseX, baseY;\n if (this.width) {\n baseX = this.x;\n baseY = this.y;\n }\n super.render();\n this.editorDiv = document.createElement(\"div\");\n this.editorDiv.className = \"internal\";\n this.editorDiv.setAttribute(\"id\", this.#editorDivId);\n this.editorDiv.setAttribute(\"data-l10n-id\", \"pdfjs-free-text\");\n this.enableEditing();\n AnnotationEditor._l10nPromise.get(\"pdfjs-free-text-default-content\").then(msg => this.editorDiv?.setAttribute(\"default-content\", msg));\n this.editorDiv.contentEditable = true;\n const {\n style\n } = this.editorDiv;\n style.fontSize = `calc(${this.#fontSize}px * var(--scale-factor))`;\n style.color = this.#color;\n this.div.append(this.editorDiv);\n this.overlayDiv = document.createElement(\"div\");\n this.overlayDiv.classList.add(\"overlay\", \"enabled\");\n this.div.append(this.overlayDiv);\n bindEvents(this, this.div, [\"dblclick\", \"keydown\"]);\n if (this.width) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n if (this.annotationElementId) {\n const {\n position\n } = this._initialData;\n let [tx, ty] = this.getInitialTranslation();\n [tx, ty] = this.pageTranslationToScreen(tx, ty);\n const [pageWidth, pageHeight] = this.pageDimensions;\n const [pageX, pageY] = this.pageTranslation;\n let posX, posY;\n switch (this.rotation) {\n case 0:\n posX = baseX + (position[0] - pageX) / pageWidth;\n posY = baseY + this.height - (position[1] - pageY) / pageHeight;\n break;\n case 90:\n posX = baseX + (position[0] - pageX) / pageWidth;\n posY = baseY - (position[1] - pageY) / pageHeight;\n [tx, ty] = [ty, -tx];\n break;\n case 180:\n posX = baseX - this.width + (position[0] - pageX) / pageWidth;\n posY = baseY - (position[1] - pageY) / pageHeight;\n [tx, ty] = [-tx, -ty];\n break;\n case 270:\n posX = baseX + (position[0] - pageX - this.height * pageHeight) / pageWidth;\n posY = baseY + (position[1] - pageY - this.width * pageWidth) / pageHeight;\n [tx, ty] = [-ty, tx];\n break;\n }\n this.setAt(posX * parentWidth, posY * parentHeight, tx, ty);\n } else {\n this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight);\n }\n this.#setContent();\n this._isDraggable = true;\n this.editorDiv.contentEditable = false;\n } else {\n this._isDraggable = false;\n this.editorDiv.contentEditable = true;\n }\n return this.div;\n }\n static #getNodeContent(node) {\n return (node.nodeType === Node.TEXT_NODE ? node.nodeValue : node.innerText).replaceAll(EOL_PATTERN, \"\");\n }\n editorDivPaste(event) {\n const clipboardData = event.clipboardData || window.clipboardData;\n const {\n types\n } = clipboardData;\n if (types.length === 1 && types[0] === \"text/plain\") {\n return;\n }\n event.preventDefault();\n const paste = FreeTextEditor.#deserializeContent(clipboardData.getData(\"text\") || \"\").replaceAll(EOL_PATTERN, \"\\n\");\n if (!paste) {\n return;\n }\n const selection = window.getSelection();\n if (!selection.rangeCount) {\n return;\n }\n this.editorDiv.normalize();\n selection.deleteFromDocument();\n const range = selection.getRangeAt(0);\n if (!paste.includes(\"\\n\")) {\n range.insertNode(document.createTextNode(paste));\n this.editorDiv.normalize();\n selection.collapseToStart();\n return;\n }\n const {\n startContainer,\n startOffset\n } = range;\n const bufferBefore = [];\n const bufferAfter = [];\n if (startContainer.nodeType === Node.TEXT_NODE) {\n const parent = startContainer.parentElement;\n bufferAfter.push(startContainer.nodeValue.slice(startOffset).replaceAll(EOL_PATTERN, \"\"));\n if (parent !== this.editorDiv) {\n let buffer = bufferBefore;\n for (const child of this.editorDiv.childNodes) {\n if (child === parent) {\n buffer = bufferAfter;\n continue;\n }\n buffer.push(FreeTextEditor.#getNodeContent(child));\n }\n }\n bufferBefore.push(startContainer.nodeValue.slice(0, startOffset).replaceAll(EOL_PATTERN, \"\"));\n } else if (startContainer === this.editorDiv) {\n let buffer = bufferBefore;\n let i = 0;\n for (const child of this.editorDiv.childNodes) {\n if (i++ === startOffset) {\n buffer = bufferAfter;\n }\n buffer.push(FreeTextEditor.#getNodeContent(child));\n }\n }\n this.#content = `${bufferBefore.join(\"\\n\")}${paste}${bufferAfter.join(\"\\n\")}`;\n this.#setContent();\n const newRange = new Range();\n let beforeLength = bufferBefore.reduce((acc, line) => acc + line.length, 0);\n for (const {\n firstChild\n } of this.editorDiv.childNodes) {\n if (firstChild.nodeType === Node.TEXT_NODE) {\n const length = firstChild.nodeValue.length;\n if (beforeLength <= length) {\n newRange.setStart(firstChild, beforeLength);\n newRange.setEnd(firstChild, beforeLength);\n break;\n }\n beforeLength -= length;\n }\n }\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n #setContent() {\n this.editorDiv.replaceChildren();\n if (!this.#content) {\n return;\n }\n for (const line of this.#content.split(\"\\n\")) {\n const div = document.createElement(\"div\");\n div.append(line ? document.createTextNode(line) : document.createElement(\"br\"));\n this.editorDiv.append(div);\n }\n }\n #serializeContent() {\n return this.#content.replaceAll(\"\\xa0\", \" \");\n }\n static #deserializeContent(content) {\n return content.replaceAll(\" \", \"\\xa0\");\n }\n get contentDiv() {\n return this.editorDiv;\n }\n static async deserialize(data, parent, uiManager) {\n let initialData = null;\n if (data instanceof FreeTextAnnotationElement) {\n const {\n data: {\n defaultAppearanceData: {\n fontSize,\n fontColor\n },\n rect,\n rotation,\n id,\n popupRef\n },\n textContent,\n textPosition,\n parent: {\n page: {\n pageNumber\n }\n }\n } = data;\n if (!textContent || textContent.length === 0) {\n return null;\n }\n initialData = data = {\n annotationType: AnnotationEditorType.FREETEXT,\n color: Array.from(fontColor),\n fontSize,\n value: textContent.join(\"\\n\"),\n position: textPosition,\n pageIndex: pageNumber - 1,\n rect: rect.slice(0),\n rotation,\n id,\n deleted: false,\n popupRef\n };\n }\n const editor = await super.deserialize(data, parent, uiManager);\n editor.#fontSize = data.fontSize;\n editor.#color = Util.makeHexColor(...data.color);\n editor.#content = FreeTextEditor.#deserializeContent(data.value);\n editor.annotationElementId = data.id || null;\n editor._initialData = initialData;\n return editor;\n }\n serialize(isForCopying = false) {\n if (this.isEmpty()) {\n return null;\n }\n if (this.deleted) {\n return this.serializeDeleted();\n }\n const padding = FreeTextEditor._internalPadding * this.parentScale;\n const rect = this.getRect(padding, padding);\n const color = AnnotationEditor._colorManager.convert(this.isAttachedToDOM ? getComputedStyle(this.editorDiv).color : this.#color);\n const serialized = {\n annotationType: AnnotationEditorType.FREETEXT,\n color,\n fontSize: this.#fontSize,\n value: this.#serializeContent(),\n pageIndex: this.pageIndex,\n rect,\n rotation: this.rotation,\n structTreeParentId: this._structTreeParentId\n };\n if (isForCopying) {\n return serialized;\n }\n if (this.annotationElementId && !this.#hasElementChanged(serialized)) {\n return null;\n }\n serialized.id = this.annotationElementId;\n return serialized;\n }\n #hasElementChanged(serialized) {\n const {\n value,\n fontSize,\n color,\n pageIndex\n } = this._initialData;\n return this._hasBeenMoved || serialized.value !== value || serialized.fontSize !== fontSize || serialized.color.some((c, i) => c !== color[i]) || serialized.pageIndex !== pageIndex;\n }\n renderAnnotationElement(annotation) {\n const content = super.renderAnnotationElement(annotation);\n if (this.deleted) {\n return content;\n }\n const {\n style\n } = content;\n style.fontSize = `calc(${this.#fontSize}px * var(--scale-factor))`;\n style.color = this.#color;\n content.replaceChildren();\n for (const line of this.#content.split(\"\\n\")) {\n const div = document.createElement(\"div\");\n div.append(line ? document.createTextNode(line) : document.createElement(\"br\"));\n content.append(div);\n }\n const padding = FreeTextEditor._internalPadding * this.parentScale;\n annotation.updateEdited({\n rect: this.getRect(padding, padding),\n popupContent: this.#content\n });\n return content;\n }\n resetAnnotationElement(annotation) {\n super.resetAnnotationElement(annotation);\n annotation.resetEdited();\n }\n}\n\n;// ./src/display/editor/outliner.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Outliner {\n #box;\n #verticalEdges = [];\n #intervals = [];\n constructor(boxes, borderWidth = 0, innerMargin = 0, isLTR = true) {\n let minX = Infinity;\n let maxX = -Infinity;\n let minY = Infinity;\n let maxY = -Infinity;\n const NUMBER_OF_DIGITS = 4;\n const EPSILON = 10 ** -NUMBER_OF_DIGITS;\n for (const {\n x,\n y,\n width,\n height\n } of boxes) {\n const x1 = Math.floor((x - borderWidth) / EPSILON) * EPSILON;\n const x2 = Math.ceil((x + width + borderWidth) / EPSILON) * EPSILON;\n const y1 = Math.floor((y - borderWidth) / EPSILON) * EPSILON;\n const y2 = Math.ceil((y + height + borderWidth) / EPSILON) * EPSILON;\n const left = [x1, y1, y2, true];\n const right = [x2, y1, y2, false];\n this.#verticalEdges.push(left, right);\n minX = Math.min(minX, x1);\n maxX = Math.max(maxX, x2);\n minY = Math.min(minY, y1);\n maxY = Math.max(maxY, y2);\n }\n const bboxWidth = maxX - minX + 2 * innerMargin;\n const bboxHeight = maxY - minY + 2 * innerMargin;\n const shiftedMinX = minX - innerMargin;\n const shiftedMinY = minY - innerMargin;\n const lastEdge = this.#verticalEdges.at(isLTR ? -1 : -2);\n const lastPoint = [lastEdge[0], lastEdge[2]];\n for (const edge of this.#verticalEdges) {\n const [x, y1, y2] = edge;\n edge[0] = (x - shiftedMinX) / bboxWidth;\n edge[1] = (y1 - shiftedMinY) / bboxHeight;\n edge[2] = (y2 - shiftedMinY) / bboxHeight;\n }\n this.#box = {\n x: shiftedMinX,\n y: shiftedMinY,\n width: bboxWidth,\n height: bboxHeight,\n lastPoint\n };\n }\n getOutlines() {\n this.#verticalEdges.sort((a, b) => a[0] - b[0] || a[1] - b[1] || a[2] - b[2]);\n const outlineVerticalEdges = [];\n for (const edge of this.#verticalEdges) {\n if (edge[3]) {\n outlineVerticalEdges.push(...this.#breakEdge(edge));\n this.#insert(edge);\n } else {\n this.#remove(edge);\n outlineVerticalEdges.push(...this.#breakEdge(edge));\n }\n }\n return this.#getOutlines(outlineVerticalEdges);\n }\n #getOutlines(outlineVerticalEdges) {\n const edges = [];\n const allEdges = new Set();\n for (const edge of outlineVerticalEdges) {\n const [x, y1, y2] = edge;\n edges.push([x, y1, edge], [x, y2, edge]);\n }\n edges.sort((a, b) => a[1] - b[1] || a[0] - b[0]);\n for (let i = 0, ii = edges.length; i < ii; i += 2) {\n const edge1 = edges[i][2];\n const edge2 = edges[i + 1][2];\n edge1.push(edge2);\n edge2.push(edge1);\n allEdges.add(edge1);\n allEdges.add(edge2);\n }\n const outlines = [];\n let outline;\n while (allEdges.size > 0) {\n const edge = allEdges.values().next().value;\n let [x, y1, y2, edge1, edge2] = edge;\n allEdges.delete(edge);\n let lastPointX = x;\n let lastPointY = y1;\n outline = [x, y2];\n outlines.push(outline);\n while (true) {\n let e;\n if (allEdges.has(edge1)) {\n e = edge1;\n } else if (allEdges.has(edge2)) {\n e = edge2;\n } else {\n break;\n }\n allEdges.delete(e);\n [x, y1, y2, edge1, edge2] = e;\n if (lastPointX !== x) {\n outline.push(lastPointX, lastPointY, x, lastPointY === y1 ? y1 : y2);\n lastPointX = x;\n }\n lastPointY = lastPointY === y1 ? y2 : y1;\n }\n outline.push(lastPointX, lastPointY);\n }\n return new HighlightOutline(outlines, this.#box);\n }\n #binarySearch(y) {\n const array = this.#intervals;\n let start = 0;\n let end = array.length - 1;\n while (start <= end) {\n const middle = start + end >> 1;\n const y1 = array[middle][0];\n if (y1 === y) {\n return middle;\n }\n if (y1 < y) {\n start = middle + 1;\n } else {\n end = middle - 1;\n }\n }\n return end + 1;\n }\n #insert([, y1, y2]) {\n const index = this.#binarySearch(y1);\n this.#intervals.splice(index, 0, [y1, y2]);\n }\n #remove([, y1, y2]) {\n const index = this.#binarySearch(y1);\n for (let i = index; i < this.#intervals.length; i++) {\n const [start, end] = this.#intervals[i];\n if (start !== y1) {\n break;\n }\n if (start === y1 && end === y2) {\n this.#intervals.splice(i, 1);\n return;\n }\n }\n for (let i = index - 1; i >= 0; i--) {\n const [start, end] = this.#intervals[i];\n if (start !== y1) {\n break;\n }\n if (start === y1 && end === y2) {\n this.#intervals.splice(i, 1);\n return;\n }\n }\n }\n #breakEdge(edge) {\n const [x, y1, y2] = edge;\n const results = [[x, y1, y2]];\n const index = this.#binarySearch(y2);\n for (let i = 0; i < index; i++) {\n const [start, end] = this.#intervals[i];\n for (let j = 0, jj = results.length; j < jj; j++) {\n const [, y3, y4] = results[j];\n if (end <= y3 || y4 <= start) {\n continue;\n }\n if (y3 >= start) {\n if (y4 > end) {\n results[j][1] = end;\n } else {\n if (jj === 1) {\n return [];\n }\n results.splice(j, 1);\n j--;\n jj--;\n }\n continue;\n }\n results[j][2] = start;\n if (y4 > end) {\n results.push([x, end, y4]);\n }\n }\n }\n return results;\n }\n}\nclass Outline {\n toSVGPath() {\n throw new Error(\"Abstract method `toSVGPath` must be implemented.\");\n }\n get box() {\n throw new Error(\"Abstract getter `box` must be implemented.\");\n }\n serialize(_bbox, _rotation) {\n throw new Error(\"Abstract method `serialize` must be implemented.\");\n }\n get free() {\n return this instanceof FreeHighlightOutline;\n }\n}\nclass HighlightOutline extends Outline {\n #box;\n #outlines;\n constructor(outlines, box) {\n super();\n this.#outlines = outlines;\n this.#box = box;\n }\n toSVGPath() {\n const buffer = [];\n for (const polygon of this.#outlines) {\n let [prevX, prevY] = polygon;\n buffer.push(`M${prevX} ${prevY}`);\n for (let i = 2; i < polygon.length; i += 2) {\n const x = polygon[i];\n const y = polygon[i + 1];\n if (x === prevX) {\n buffer.push(`V${y}`);\n prevY = y;\n } else if (y === prevY) {\n buffer.push(`H${x}`);\n prevX = x;\n }\n }\n buffer.push(\"Z\");\n }\n return buffer.join(\" \");\n }\n serialize([blX, blY, trX, trY], _rotation) {\n const outlines = [];\n const width = trX - blX;\n const height = trY - blY;\n for (const outline of this.#outlines) {\n const points = new Array(outline.length);\n for (let i = 0; i < outline.length; i += 2) {\n points[i] = blX + outline[i] * width;\n points[i + 1] = trY - outline[i + 1] * height;\n }\n outlines.push(points);\n }\n return outlines;\n }\n get box() {\n return this.#box;\n }\n}\nclass FreeOutliner {\n #box;\n #bottom = [];\n #innerMargin;\n #isLTR;\n #top = [];\n #last = new Float64Array(18);\n #lastX;\n #lastY;\n #min;\n #min_dist;\n #scaleFactor;\n #thickness;\n #points = [];\n static #MIN_DIST = 8;\n static #MIN_DIFF = 2;\n static #MIN = FreeOutliner.#MIN_DIST + FreeOutliner.#MIN_DIFF;\n constructor({\n x,\n y\n }, box, scaleFactor, thickness, isLTR, innerMargin = 0) {\n this.#box = box;\n this.#thickness = thickness * scaleFactor;\n this.#isLTR = isLTR;\n this.#last.set([NaN, NaN, NaN, NaN, x, y], 6);\n this.#innerMargin = innerMargin;\n this.#min_dist = FreeOutliner.#MIN_DIST * scaleFactor;\n this.#min = FreeOutliner.#MIN * scaleFactor;\n this.#scaleFactor = scaleFactor;\n this.#points.push(x, y);\n }\n get free() {\n return true;\n }\n isEmpty() {\n return isNaN(this.#last[8]);\n }\n #getLastCoords() {\n const lastTop = this.#last.subarray(4, 6);\n const lastBottom = this.#last.subarray(16, 18);\n const [x, y, width, height] = this.#box;\n return [(this.#lastX + (lastTop[0] - lastBottom[0]) / 2 - x) / width, (this.#lastY + (lastTop[1] - lastBottom[1]) / 2 - y) / height, (this.#lastX + (lastBottom[0] - lastTop[0]) / 2 - x) / width, (this.#lastY + (lastBottom[1] - lastTop[1]) / 2 - y) / height];\n }\n add({\n x,\n y\n }) {\n this.#lastX = x;\n this.#lastY = y;\n const [layerX, layerY, layerWidth, layerHeight] = this.#box;\n let [x1, y1, x2, y2] = this.#last.subarray(8, 12);\n const diffX = x - x2;\n const diffY = y - y2;\n const d = Math.hypot(diffX, diffY);\n if (d < this.#min) {\n return false;\n }\n const diffD = d - this.#min_dist;\n const K = diffD / d;\n const shiftX = K * diffX;\n const shiftY = K * diffY;\n let x0 = x1;\n let y0 = y1;\n x1 = x2;\n y1 = y2;\n x2 += shiftX;\n y2 += shiftY;\n this.#points?.push(x, y);\n const nX = -shiftY / diffD;\n const nY = shiftX / diffD;\n const thX = nX * this.#thickness;\n const thY = nY * this.#thickness;\n this.#last.set(this.#last.subarray(2, 8), 0);\n this.#last.set([x2 + thX, y2 + thY], 4);\n this.#last.set(this.#last.subarray(14, 18), 12);\n this.#last.set([x2 - thX, y2 - thY], 16);\n if (isNaN(this.#last[6])) {\n if (this.#top.length === 0) {\n this.#last.set([x1 + thX, y1 + thY], 2);\n this.#top.push(NaN, NaN, NaN, NaN, (x1 + thX - layerX) / layerWidth, (y1 + thY - layerY) / layerHeight);\n this.#last.set([x1 - thX, y1 - thY], 14);\n this.#bottom.push(NaN, NaN, NaN, NaN, (x1 - thX - layerX) / layerWidth, (y1 - thY - layerY) / layerHeight);\n }\n this.#last.set([x0, y0, x1, y1, x2, y2], 6);\n return !this.isEmpty();\n }\n this.#last.set([x0, y0, x1, y1, x2, y2], 6);\n const angle = Math.abs(Math.atan2(y0 - y1, x0 - x1) - Math.atan2(shiftY, shiftX));\n if (angle < Math.PI / 2) {\n [x1, y1, x2, y2] = this.#last.subarray(2, 6);\n this.#top.push(NaN, NaN, NaN, NaN, ((x1 + x2) / 2 - layerX) / layerWidth, ((y1 + y2) / 2 - layerY) / layerHeight);\n [x1, y1, x0, y0] = this.#last.subarray(14, 18);\n this.#bottom.push(NaN, NaN, NaN, NaN, ((x0 + x1) / 2 - layerX) / layerWidth, ((y0 + y1) / 2 - layerY) / layerHeight);\n return true;\n }\n [x0, y0, x1, y1, x2, y2] = this.#last.subarray(0, 6);\n this.#top.push(((x0 + 5 * x1) / 6 - layerX) / layerWidth, ((y0 + 5 * y1) / 6 - layerY) / layerHeight, ((5 * x1 + x2) / 6 - layerX) / layerWidth, ((5 * y1 + y2) / 6 - layerY) / layerHeight, ((x1 + x2) / 2 - layerX) / layerWidth, ((y1 + y2) / 2 - layerY) / layerHeight);\n [x2, y2, x1, y1, x0, y0] = this.#last.subarray(12, 18);\n this.#bottom.push(((x0 + 5 * x1) / 6 - layerX) / layerWidth, ((y0 + 5 * y1) / 6 - layerY) / layerHeight, ((5 * x1 + x2) / 6 - layerX) / layerWidth, ((5 * y1 + y2) / 6 - layerY) / layerHeight, ((x1 + x2) / 2 - layerX) / layerWidth, ((y1 + y2) / 2 - layerY) / layerHeight);\n return true;\n }\n toSVGPath() {\n if (this.isEmpty()) {\n return \"\";\n }\n const top = this.#top;\n const bottom = this.#bottom;\n const lastTop = this.#last.subarray(4, 6);\n const lastBottom = this.#last.subarray(16, 18);\n const [x, y, width, height] = this.#box;\n const [lastTopX, lastTopY, lastBottomX, lastBottomY] = this.#getLastCoords();\n if (isNaN(this.#last[6]) && !this.isEmpty()) {\n return `M${(this.#last[2] - x) / width} ${(this.#last[3] - y) / height} L${(this.#last[4] - x) / width} ${(this.#last[5] - y) / height} L${lastTopX} ${lastTopY} L${lastBottomX} ${lastBottomY} L${(this.#last[16] - x) / width} ${(this.#last[17] - y) / height} L${(this.#last[14] - x) / width} ${(this.#last[15] - y) / height} Z`;\n }\n const buffer = [];\n buffer.push(`M${top[4]} ${top[5]}`);\n for (let i = 6; i < top.length; i += 6) {\n if (isNaN(top[i])) {\n buffer.push(`L${top[i + 4]} ${top[i + 5]}`);\n } else {\n buffer.push(`C${top[i]} ${top[i + 1]} ${top[i + 2]} ${top[i + 3]} ${top[i + 4]} ${top[i + 5]}`);\n }\n }\n buffer.push(`L${(lastTop[0] - x) / width} ${(lastTop[1] - y) / height} L${lastTopX} ${lastTopY} L${lastBottomX} ${lastBottomY} L${(lastBottom[0] - x) / width} ${(lastBottom[1] - y) / height}`);\n for (let i = bottom.length - 6; i >= 6; i -= 6) {\n if (isNaN(bottom[i])) {\n buffer.push(`L${bottom[i + 4]} ${bottom[i + 5]}`);\n } else {\n buffer.push(`C${bottom[i]} ${bottom[i + 1]} ${bottom[i + 2]} ${bottom[i + 3]} ${bottom[i + 4]} ${bottom[i + 5]}`);\n }\n }\n buffer.push(`L${bottom[4]} ${bottom[5]} Z`);\n return buffer.join(\" \");\n }\n getOutlines() {\n const top = this.#top;\n const bottom = this.#bottom;\n const last = this.#last;\n const lastTop = last.subarray(4, 6);\n const lastBottom = last.subarray(16, 18);\n const [layerX, layerY, layerWidth, layerHeight] = this.#box;\n const points = new Float64Array((this.#points?.length ?? 0) + 2);\n for (let i = 0, ii = points.length - 2; i < ii; i += 2) {\n points[i] = (this.#points[i] - layerX) / layerWidth;\n points[i + 1] = (this.#points[i + 1] - layerY) / layerHeight;\n }\n points[points.length - 2] = (this.#lastX - layerX) / layerWidth;\n points[points.length - 1] = (this.#lastY - layerY) / layerHeight;\n const [lastTopX, lastTopY, lastBottomX, lastBottomY] = this.#getLastCoords();\n if (isNaN(last[6]) && !this.isEmpty()) {\n const outline = new Float64Array(36);\n outline.set([NaN, NaN, NaN, NaN, (last[2] - layerX) / layerWidth, (last[3] - layerY) / layerHeight, NaN, NaN, NaN, NaN, (last[4] - layerX) / layerWidth, (last[5] - layerY) / layerHeight, NaN, NaN, NaN, NaN, lastTopX, lastTopY, NaN, NaN, NaN, NaN, lastBottomX, lastBottomY, NaN, NaN, NaN, NaN, (last[16] - layerX) / layerWidth, (last[17] - layerY) / layerHeight, NaN, NaN, NaN, NaN, (last[14] - layerX) / layerWidth, (last[15] - layerY) / layerHeight], 0);\n return new FreeHighlightOutline(outline, points, this.#box, this.#scaleFactor, this.#innerMargin, this.#isLTR);\n }\n const outline = new Float64Array(this.#top.length + 24 + this.#bottom.length);\n let N = top.length;\n for (let i = 0; i < N; i += 2) {\n if (isNaN(top[i])) {\n outline[i] = outline[i + 1] = NaN;\n continue;\n }\n outline[i] = top[i];\n outline[i + 1] = top[i + 1];\n }\n outline.set([NaN, NaN, NaN, NaN, (lastTop[0] - layerX) / layerWidth, (lastTop[1] - layerY) / layerHeight, NaN, NaN, NaN, NaN, lastTopX, lastTopY, NaN, NaN, NaN, NaN, lastBottomX, lastBottomY, NaN, NaN, NaN, NaN, (lastBottom[0] - layerX) / layerWidth, (lastBottom[1] - layerY) / layerHeight], N);\n N += 24;\n for (let i = bottom.length - 6; i >= 6; i -= 6) {\n for (let j = 0; j < 6; j += 2) {\n if (isNaN(bottom[i + j])) {\n outline[N] = outline[N + 1] = NaN;\n N += 2;\n continue;\n }\n outline[N] = bottom[i + j];\n outline[N + 1] = bottom[i + j + 1];\n N += 2;\n }\n }\n outline.set([NaN, NaN, NaN, NaN, bottom[4], bottom[5]], N);\n return new FreeHighlightOutline(outline, points, this.#box, this.#scaleFactor, this.#innerMargin, this.#isLTR);\n }\n}\nclass FreeHighlightOutline extends Outline {\n #box;\n #bbox = null;\n #innerMargin;\n #isLTR;\n #points;\n #scaleFactor;\n #outline;\n constructor(outline, points, box, scaleFactor, innerMargin, isLTR) {\n super();\n this.#outline = outline;\n this.#points = points;\n this.#box = box;\n this.#scaleFactor = scaleFactor;\n this.#innerMargin = innerMargin;\n this.#isLTR = isLTR;\n this.#computeMinMax(isLTR);\n const {\n x,\n y,\n width,\n height\n } = this.#bbox;\n for (let i = 0, ii = outline.length; i < ii; i += 2) {\n outline[i] = (outline[i] - x) / width;\n outline[i + 1] = (outline[i + 1] - y) / height;\n }\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n points[i] = (points[i] - x) / width;\n points[i + 1] = (points[i + 1] - y) / height;\n }\n }\n toSVGPath() {\n const buffer = [`M${this.#outline[4]} ${this.#outline[5]}`];\n for (let i = 6, ii = this.#outline.length; i < ii; i += 6) {\n if (isNaN(this.#outline[i])) {\n buffer.push(`L${this.#outline[i + 4]} ${this.#outline[i + 5]}`);\n continue;\n }\n buffer.push(`C${this.#outline[i]} ${this.#outline[i + 1]} ${this.#outline[i + 2]} ${this.#outline[i + 3]} ${this.#outline[i + 4]} ${this.#outline[i + 5]}`);\n }\n buffer.push(\"Z\");\n return buffer.join(\" \");\n }\n serialize([blX, blY, trX, trY], rotation) {\n const width = trX - blX;\n const height = trY - blY;\n let outline;\n let points;\n switch (rotation) {\n case 0:\n outline = this.#rescale(this.#outline, blX, trY, width, -height);\n points = this.#rescale(this.#points, blX, trY, width, -height);\n break;\n case 90:\n outline = this.#rescaleAndSwap(this.#outline, blX, blY, width, height);\n points = this.#rescaleAndSwap(this.#points, blX, blY, width, height);\n break;\n case 180:\n outline = this.#rescale(this.#outline, trX, blY, -width, height);\n points = this.#rescale(this.#points, trX, blY, -width, height);\n break;\n case 270:\n outline = this.#rescaleAndSwap(this.#outline, trX, trY, -width, -height);\n points = this.#rescaleAndSwap(this.#points, trX, trY, -width, -height);\n break;\n }\n return {\n outline: Array.from(outline),\n points: [Array.from(points)]\n };\n }\n #rescale(src, tx, ty, sx, sy) {\n const dest = new Float64Array(src.length);\n for (let i = 0, ii = src.length; i < ii; i += 2) {\n dest[i] = tx + src[i] * sx;\n dest[i + 1] = ty + src[i + 1] * sy;\n }\n return dest;\n }\n #rescaleAndSwap(src, tx, ty, sx, sy) {\n const dest = new Float64Array(src.length);\n for (let i = 0, ii = src.length; i < ii; i += 2) {\n dest[i] = tx + src[i + 1] * sx;\n dest[i + 1] = ty + src[i] * sy;\n }\n return dest;\n }\n #computeMinMax(isLTR) {\n const outline = this.#outline;\n let lastX = outline[4];\n let lastY = outline[5];\n let minX = lastX;\n let minY = lastY;\n let maxX = lastX;\n let maxY = lastY;\n let lastPointX = lastX;\n let lastPointY = lastY;\n const ltrCallback = isLTR ? Math.max : Math.min;\n for (let i = 6, ii = outline.length; i < ii; i += 6) {\n if (isNaN(outline[i])) {\n minX = Math.min(minX, outline[i + 4]);\n minY = Math.min(minY, outline[i + 5]);\n maxX = Math.max(maxX, outline[i + 4]);\n maxY = Math.max(maxY, outline[i + 5]);\n if (lastPointY < outline[i + 5]) {\n lastPointX = outline[i + 4];\n lastPointY = outline[i + 5];\n } else if (lastPointY === outline[i + 5]) {\n lastPointX = ltrCallback(lastPointX, outline[i + 4]);\n }\n } else {\n const bbox = Util.bezierBoundingBox(lastX, lastY, ...outline.slice(i, i + 6));\n minX = Math.min(minX, bbox[0]);\n minY = Math.min(minY, bbox[1]);\n maxX = Math.max(maxX, bbox[2]);\n maxY = Math.max(maxY, bbox[3]);\n if (lastPointY < bbox[3]) {\n lastPointX = bbox[2];\n lastPointY = bbox[3];\n } else if (lastPointY === bbox[3]) {\n lastPointX = ltrCallback(lastPointX, bbox[2]);\n }\n }\n lastX = outline[i + 4];\n lastY = outline[i + 5];\n }\n const x = minX - this.#innerMargin,\n y = minY - this.#innerMargin,\n width = maxX - minX + 2 * this.#innerMargin,\n height = maxY - minY + 2 * this.#innerMargin;\n this.#bbox = {\n x,\n y,\n width,\n height,\n lastPoint: [lastPointX, lastPointY]\n };\n }\n get box() {\n return this.#bbox;\n }\n getNewOutline(thickness, innerMargin) {\n const {\n x,\n y,\n width,\n height\n } = this.#bbox;\n const [layerX, layerY, layerWidth, layerHeight] = this.#box;\n const sx = width * layerWidth;\n const sy = height * layerHeight;\n const tx = x * layerWidth + layerX;\n const ty = y * layerHeight + layerY;\n const outliner = new FreeOutliner({\n x: this.#points[0] * sx + tx,\n y: this.#points[1] * sy + ty\n }, this.#box, this.#scaleFactor, thickness, this.#isLTR, innerMargin ?? this.#innerMargin);\n for (let i = 2; i < this.#points.length; i += 2) {\n outliner.add({\n x: this.#points[i] * sx + tx,\n y: this.#points[i + 1] * sy + ty\n });\n }\n return outliner.getOutlines();\n }\n}\n\n;// ./src/display/editor/color_picker.js\n\n\n\nclass ColorPicker {\n #boundKeyDown = this.#keyDown.bind(this);\n #boundPointerDown = this.#pointerDown.bind(this);\n #button = null;\n #buttonSwatch = null;\n #defaultColor;\n #dropdown = null;\n #dropdownWasFromKeyboard = false;\n #isMainColorPicker = false;\n #editor = null;\n #eventBus;\n #uiManager = null;\n #type;\n static #l10nColor = null;\n static get _keyboardManager() {\n return shadow(this, \"_keyboardManager\", new KeyboardManager([[[\"Escape\", \"mac+Escape\"], ColorPicker.prototype._hideDropdownFromKeyboard], [[\" \", \"mac+ \"], ColorPicker.prototype._colorSelectFromKeyboard], [[\"ArrowDown\", \"ArrowRight\", \"mac+ArrowDown\", \"mac+ArrowRight\"], ColorPicker.prototype._moveToNext], [[\"ArrowUp\", \"ArrowLeft\", \"mac+ArrowUp\", \"mac+ArrowLeft\"], ColorPicker.prototype._moveToPrevious], [[\"Home\", \"mac+Home\"], ColorPicker.prototype._moveToBeginning], [[\"End\", \"mac+End\"], ColorPicker.prototype._moveToEnd]]));\n }\n constructor({\n editor = null,\n uiManager = null\n }) {\n if (editor) {\n this.#isMainColorPicker = false;\n this.#type = AnnotationEditorParamsType.HIGHLIGHT_COLOR;\n this.#editor = editor;\n } else {\n this.#isMainColorPicker = true;\n this.#type = AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR;\n }\n this.#uiManager = editor?._uiManager || uiManager;\n this.#eventBus = this.#uiManager._eventBus;\n this.#defaultColor = editor?.color || this.#uiManager?.highlightColors.values().next().value || \"#FFFF98\";\n ColorPicker.#l10nColor ||= Object.freeze({\n blue: \"pdfjs-editor-colorpicker-blue\",\n green: \"pdfjs-editor-colorpicker-green\",\n pink: \"pdfjs-editor-colorpicker-pink\",\n red: \"pdfjs-editor-colorpicker-red\",\n yellow: \"pdfjs-editor-colorpicker-yellow\"\n });\n }\n renderButton() {\n const button = this.#button = document.createElement(\"button\");\n button.className = \"colorPicker\";\n button.tabIndex = \"0\";\n button.setAttribute(\"data-l10n-id\", \"pdfjs-editor-colorpicker-button\");\n button.setAttribute(\"aria-haspopup\", true);\n const signal = this.#uiManager._signal;\n button.addEventListener(\"click\", this.#openDropdown.bind(this), {\n signal\n });\n button.addEventListener(\"keydown\", this.#boundKeyDown, {\n signal\n });\n const swatch = this.#buttonSwatch = document.createElement(\"span\");\n swatch.className = \"swatch\";\n swatch.setAttribute(\"aria-hidden\", true);\n swatch.style.backgroundColor = this.#defaultColor;\n button.append(swatch);\n return button;\n }\n renderMainDropdown() {\n const dropdown = this.#dropdown = this.#getDropdownRoot();\n dropdown.setAttribute(\"aria-orientation\", \"horizontal\");\n dropdown.setAttribute(\"aria-labelledby\", \"highlightColorPickerLabel\");\n return dropdown;\n }\n #getDropdownRoot() {\n const div = document.createElement(\"div\");\n const signal = this.#uiManager._signal;\n div.addEventListener(\"contextmenu\", noContextMenu, {\n signal\n });\n div.className = \"dropdown\";\n div.role = \"listbox\";\n div.setAttribute(\"aria-multiselectable\", false);\n div.setAttribute(\"aria-orientation\", \"vertical\");\n div.setAttribute(\"data-l10n-id\", \"pdfjs-editor-colorpicker-dropdown\");\n for (const [name, color] of this.#uiManager.highlightColors) {\n const button = document.createElement(\"button\");\n button.tabIndex = \"0\";\n button.role = \"option\";\n button.setAttribute(\"data-color\", color);\n button.title = name;\n button.setAttribute(\"data-l10n-id\", ColorPicker.#l10nColor[name]);\n const swatch = document.createElement(\"span\");\n button.append(swatch);\n swatch.className = \"swatch\";\n swatch.style.backgroundColor = color;\n button.setAttribute(\"aria-selected\", color === this.#defaultColor);\n button.addEventListener(\"click\", this.#colorSelect.bind(this, color), {\n signal\n });\n div.append(button);\n }\n div.addEventListener(\"keydown\", this.#boundKeyDown, {\n signal\n });\n return div;\n }\n #colorSelect(color, event) {\n event.stopPropagation();\n this.#eventBus.dispatch(\"switchannotationeditorparams\", {\n source: this,\n type: this.#type,\n value: color\n });\n }\n _colorSelectFromKeyboard(event) {\n if (event.target === this.#button) {\n this.#openDropdown(event);\n return;\n }\n const color = event.target.getAttribute(\"data-color\");\n if (!color) {\n return;\n }\n this.#colorSelect(color, event);\n }\n _moveToNext(event) {\n if (!this.#isDropdownVisible) {\n this.#openDropdown(event);\n return;\n }\n if (event.target === this.#button) {\n this.#dropdown.firstChild?.focus();\n return;\n }\n event.target.nextSibling?.focus();\n }\n _moveToPrevious(event) {\n if (event.target === this.#dropdown?.firstChild || event.target === this.#button) {\n if (this.#isDropdownVisible) {\n this._hideDropdownFromKeyboard();\n }\n return;\n }\n if (!this.#isDropdownVisible) {\n this.#openDropdown(event);\n }\n event.target.previousSibling?.focus();\n }\n _moveToBeginning(event) {\n if (!this.#isDropdownVisible) {\n this.#openDropdown(event);\n return;\n }\n this.#dropdown.firstChild?.focus();\n }\n _moveToEnd(event) {\n if (!this.#isDropdownVisible) {\n this.#openDropdown(event);\n return;\n }\n this.#dropdown.lastChild?.focus();\n }\n #keyDown(event) {\n ColorPicker._keyboardManager.exec(this, event);\n }\n #openDropdown(event) {\n if (this.#isDropdownVisible) {\n this.hideDropdown();\n return;\n }\n this.#dropdownWasFromKeyboard = event.detail === 0;\n window.addEventListener(\"pointerdown\", this.#boundPointerDown, {\n signal: this.#uiManager._signal\n });\n if (this.#dropdown) {\n this.#dropdown.classList.remove(\"hidden\");\n return;\n }\n const root = this.#dropdown = this.#getDropdownRoot();\n this.#button.append(root);\n }\n #pointerDown(event) {\n if (this.#dropdown?.contains(event.target)) {\n return;\n }\n this.hideDropdown();\n }\n hideDropdown() {\n this.#dropdown?.classList.add(\"hidden\");\n window.removeEventListener(\"pointerdown\", this.#boundPointerDown);\n }\n get #isDropdownVisible() {\n return this.#dropdown && !this.#dropdown.classList.contains(\"hidden\");\n }\n _hideDropdownFromKeyboard() {\n if (this.#isMainColorPicker) {\n return;\n }\n if (!this.#isDropdownVisible) {\n this.#editor?.unselect();\n return;\n }\n this.hideDropdown();\n this.#button.focus({\n preventScroll: true,\n focusVisible: this.#dropdownWasFromKeyboard\n });\n }\n updateColor(color) {\n if (this.#buttonSwatch) {\n this.#buttonSwatch.style.backgroundColor = color;\n }\n if (!this.#dropdown) {\n return;\n }\n const i = this.#uiManager.highlightColors.values();\n for (const child of this.#dropdown.children) {\n child.setAttribute(\"aria-selected\", i.next().value === color);\n }\n }\n destroy() {\n this.#button?.remove();\n this.#button = null;\n this.#buttonSwatch = null;\n this.#dropdown?.remove();\n this.#dropdown = null;\n }\n}\n\n;// ./src/display/editor/highlight.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass HighlightEditor extends AnnotationEditor {\n #anchorNode = null;\n #anchorOffset = 0;\n #boxes;\n #clipPathId = null;\n #colorPicker = null;\n #focusOutlines = null;\n #focusNode = null;\n #focusOffset = 0;\n #highlightDiv = null;\n #highlightOutlines = null;\n #id = null;\n #isFreeHighlight = false;\n #lastPoint = null;\n #opacity;\n #outlineId = null;\n #text = \"\";\n #thickness;\n #methodOfCreation = \"\";\n static _defaultColor = null;\n static _defaultOpacity = 1;\n static _defaultThickness = 12;\n static _type = \"highlight\";\n static _editorType = AnnotationEditorType.HIGHLIGHT;\n static _freeHighlightId = -1;\n static _freeHighlight = null;\n static _freeHighlightClipId = \"\";\n static get _keyboardManager() {\n const proto = HighlightEditor.prototype;\n return shadow(this, \"_keyboardManager\", new KeyboardManager([[[\"ArrowLeft\", \"mac+ArrowLeft\"], proto._moveCaret, {\n args: [0]\n }], [[\"ArrowRight\", \"mac+ArrowRight\"], proto._moveCaret, {\n args: [1]\n }], [[\"ArrowUp\", \"mac+ArrowUp\"], proto._moveCaret, {\n args: [2]\n }], [[\"ArrowDown\", \"mac+ArrowDown\"], proto._moveCaret, {\n args: [3]\n }]]));\n }\n constructor(params) {\n super({\n ...params,\n name: \"highlightEditor\"\n });\n this.color = params.color || HighlightEditor._defaultColor;\n this.#thickness = params.thickness || HighlightEditor._defaultThickness;\n this.#opacity = params.opacity || HighlightEditor._defaultOpacity;\n this.#boxes = params.boxes || null;\n this.#methodOfCreation = params.methodOfCreation || \"\";\n this.#text = params.text || \"\";\n this._isDraggable = false;\n if (params.highlightId > -1) {\n this.#isFreeHighlight = true;\n this.#createFreeOutlines(params);\n this.#addToDrawLayer();\n } else if (this.#boxes) {\n this.#anchorNode = params.anchorNode;\n this.#anchorOffset = params.anchorOffset;\n this.#focusNode = params.focusNode;\n this.#focusOffset = params.focusOffset;\n this.#createOutlines();\n this.#addToDrawLayer();\n this.rotate(this.rotation);\n }\n }\n get telemetryInitialData() {\n return {\n action: \"added\",\n type: this.#isFreeHighlight ? \"free_highlight\" : \"highlight\",\n color: this._uiManager.highlightColorNames.get(this.color),\n thickness: this.#thickness,\n methodOfCreation: this.#methodOfCreation\n };\n }\n get telemetryFinalData() {\n return {\n type: \"highlight\",\n color: this._uiManager.highlightColorNames.get(this.color)\n };\n }\n static computeTelemetryFinalData(data) {\n return {\n numberOfColors: data.get(\"color\").size\n };\n }\n #createOutlines() {\n const outliner = new Outliner(this.#boxes, 0.001);\n this.#highlightOutlines = outliner.getOutlines();\n ({\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height\n } = this.#highlightOutlines.box);\n const outlinerForOutline = new Outliner(this.#boxes, 0.0025, 0.001, this._uiManager.direction === \"ltr\");\n this.#focusOutlines = outlinerForOutline.getOutlines();\n const {\n lastPoint\n } = this.#focusOutlines.box;\n this.#lastPoint = [(lastPoint[0] - this.x) / this.width, (lastPoint[1] - this.y) / this.height];\n }\n #createFreeOutlines({\n highlightOutlines,\n highlightId,\n clipPathId\n }) {\n this.#highlightOutlines = highlightOutlines;\n const extraThickness = 1.5;\n this.#focusOutlines = highlightOutlines.getNewOutline(this.#thickness / 2 + extraThickness, 0.0025);\n if (highlightId >= 0) {\n this.#id = highlightId;\n this.#clipPathId = clipPathId;\n this.parent.drawLayer.finalizeLine(highlightId, highlightOutlines);\n this.#outlineId = this.parent.drawLayer.highlightOutline(this.#focusOutlines);\n } else if (this.parent) {\n const angle = this.parent.viewport.rotation;\n this.parent.drawLayer.updateLine(this.#id, highlightOutlines);\n this.parent.drawLayer.updateBox(this.#id, HighlightEditor.#rotateBbox(this.#highlightOutlines.box, (angle - this.rotation + 360) % 360));\n this.parent.drawLayer.updateLine(this.#outlineId, this.#focusOutlines);\n this.parent.drawLayer.updateBox(this.#outlineId, HighlightEditor.#rotateBbox(this.#focusOutlines.box, angle));\n }\n const {\n x,\n y,\n width,\n height\n } = highlightOutlines.box;\n switch (this.rotation) {\n case 0:\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n break;\n case 90:\n {\n const [pageWidth, pageHeight] = this.parentDimensions;\n this.x = y;\n this.y = 1 - x;\n this.width = width * pageHeight / pageWidth;\n this.height = height * pageWidth / pageHeight;\n break;\n }\n case 180:\n this.x = 1 - x;\n this.y = 1 - y;\n this.width = width;\n this.height = height;\n break;\n case 270:\n {\n const [pageWidth, pageHeight] = this.parentDimensions;\n this.x = 1 - y;\n this.y = x;\n this.width = width * pageHeight / pageWidth;\n this.height = height * pageWidth / pageHeight;\n break;\n }\n }\n const {\n lastPoint\n } = this.#focusOutlines.box;\n this.#lastPoint = [(lastPoint[0] - x) / width, (lastPoint[1] - y) / height];\n }\n static initialize(l10n, uiManager) {\n AnnotationEditor.initialize(l10n, uiManager);\n HighlightEditor._defaultColor ||= uiManager.highlightColors?.values().next().value || \"#fff066\";\n }\n static updateDefaultParams(type, value) {\n switch (type) {\n case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:\n HighlightEditor._defaultColor = value;\n break;\n case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:\n HighlightEditor._defaultThickness = value;\n break;\n }\n }\n translateInPage(x, y) {}\n get toolbarPosition() {\n return this.#lastPoint;\n }\n updateParams(type, value) {\n switch (type) {\n case AnnotationEditorParamsType.HIGHLIGHT_COLOR:\n this.#updateColor(value);\n break;\n case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:\n this.#updateThickness(value);\n break;\n }\n }\n static get defaultPropertiesToUpdate() {\n return [[AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR, HighlightEditor._defaultColor], [AnnotationEditorParamsType.HIGHLIGHT_THICKNESS, HighlightEditor._defaultThickness]];\n }\n get propertiesToUpdate() {\n return [[AnnotationEditorParamsType.HIGHLIGHT_COLOR, this.color || HighlightEditor._defaultColor], [AnnotationEditorParamsType.HIGHLIGHT_THICKNESS, this.#thickness || HighlightEditor._defaultThickness], [AnnotationEditorParamsType.HIGHLIGHT_FREE, this.#isFreeHighlight]];\n }\n #updateColor(color) {\n const setColorAndOpacity = (col, opa) => {\n this.color = col;\n this.parent?.drawLayer.changeColor(this.#id, col);\n this.#colorPicker?.updateColor(col);\n this.#opacity = opa;\n this.parent?.drawLayer.changeOpacity(this.#id, opa);\n };\n const savedColor = this.color;\n const savedOpacity = this.#opacity;\n this.addCommands({\n cmd: setColorAndOpacity.bind(this, color, HighlightEditor._defaultOpacity),\n undo: setColorAndOpacity.bind(this, savedColor, savedOpacity),\n post: this._uiManager.updateUI.bind(this._uiManager, this),\n mustExec: true,\n type: AnnotationEditorParamsType.HIGHLIGHT_COLOR,\n overwriteIfSameType: true,\n keepUndo: true\n });\n this._reportTelemetry({\n action: \"color_changed\",\n color: this._uiManager.highlightColorNames.get(color)\n }, true);\n }\n #updateThickness(thickness) {\n const savedThickness = this.#thickness;\n const setThickness = th => {\n this.#thickness = th;\n this.#changeThickness(th);\n };\n this.addCommands({\n cmd: setThickness.bind(this, thickness),\n undo: setThickness.bind(this, savedThickness),\n post: this._uiManager.updateUI.bind(this._uiManager, this),\n mustExec: true,\n type: AnnotationEditorParamsType.INK_THICKNESS,\n overwriteIfSameType: true,\n keepUndo: true\n });\n this._reportTelemetry({\n action: \"thickness_changed\",\n thickness\n }, true);\n }\n async addEditToolbar() {\n const toolbar = await super.addEditToolbar();\n if (!toolbar) {\n return null;\n }\n if (this._uiManager.highlightColors) {\n this.#colorPicker = new ColorPicker({\n editor: this\n });\n toolbar.addColorPicker(this.#colorPicker);\n }\n return toolbar;\n }\n disableEditing() {\n super.disableEditing();\n this.div.classList.toggle(\"disabled\", true);\n }\n enableEditing() {\n super.enableEditing();\n this.div.classList.toggle(\"disabled\", false);\n }\n fixAndSetPosition() {\n return super.fixAndSetPosition(this.#getRotation());\n }\n getBaseTranslation() {\n return [0, 0];\n }\n getRect(tx, ty) {\n return super.getRect(tx, ty, this.#getRotation());\n }\n onceAdded() {\n if (!this.annotationElementId) {\n this.parent.addUndoableEditor(this);\n }\n this.div.focus();\n }\n remove() {\n this.#cleanDrawLayer();\n this._reportTelemetry({\n action: \"deleted\"\n });\n super.remove();\n }\n rebuild() {\n if (!this.parent) {\n return;\n }\n super.rebuild();\n if (this.div === null) {\n return;\n }\n this.#addToDrawLayer();\n if (!this.isAttachedToDOM) {\n this.parent.add(this);\n }\n }\n setParent(parent) {\n let mustBeSelected = false;\n if (this.parent && !parent) {\n this.#cleanDrawLayer();\n } else if (parent) {\n this.#addToDrawLayer(parent);\n mustBeSelected = !this.parent && this.div?.classList.contains(\"selectedEditor\");\n }\n super.setParent(parent);\n this.show(this._isVisible);\n if (mustBeSelected) {\n this.select();\n }\n }\n #changeThickness(thickness) {\n if (!this.#isFreeHighlight) {\n return;\n }\n this.#createFreeOutlines({\n highlightOutlines: this.#highlightOutlines.getNewOutline(thickness / 2)\n });\n this.fixAndSetPosition();\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(this.width * parentWidth, this.height * parentHeight);\n }\n #cleanDrawLayer() {\n if (this.#id === null || !this.parent) {\n return;\n }\n this.parent.drawLayer.remove(this.#id);\n this.#id = null;\n this.parent.drawLayer.remove(this.#outlineId);\n this.#outlineId = null;\n }\n #addToDrawLayer(parent = this.parent) {\n if (this.#id !== null) {\n return;\n }\n ({\n id: this.#id,\n clipPathId: this.#clipPathId\n } = parent.drawLayer.highlight(this.#highlightOutlines, this.color, this.#opacity));\n this.#outlineId = parent.drawLayer.highlightOutline(this.#focusOutlines);\n if (this.#highlightDiv) {\n this.#highlightDiv.style.clipPath = this.#clipPathId;\n }\n }\n static #rotateBbox({\n x,\n y,\n width,\n height\n }, angle) {\n switch (angle) {\n case 90:\n return {\n x: 1 - y - height,\n y: x,\n width: height,\n height: width\n };\n case 180:\n return {\n x: 1 - x - width,\n y: 1 - y - height,\n width,\n height\n };\n case 270:\n return {\n x: y,\n y: 1 - x - width,\n width: height,\n height: width\n };\n }\n return {\n x,\n y,\n width,\n height\n };\n }\n rotate(angle) {\n const {\n drawLayer\n } = this.parent;\n let box;\n if (this.#isFreeHighlight) {\n angle = (angle - this.rotation + 360) % 360;\n box = HighlightEditor.#rotateBbox(this.#highlightOutlines.box, angle);\n } else {\n box = HighlightEditor.#rotateBbox(this, angle);\n }\n drawLayer.rotate(this.#id, angle);\n drawLayer.rotate(this.#outlineId, angle);\n drawLayer.updateBox(this.#id, box);\n drawLayer.updateBox(this.#outlineId, HighlightEditor.#rotateBbox(this.#focusOutlines.box, angle));\n }\n render() {\n if (this.div) {\n return this.div;\n }\n const div = super.render();\n if (this.#text) {\n div.setAttribute(\"aria-label\", this.#text);\n div.setAttribute(\"role\", \"mark\");\n }\n if (this.#isFreeHighlight) {\n div.classList.add(\"free\");\n } else {\n this.div.addEventListener(\"keydown\", this.#keydown.bind(this), {\n signal: this._uiManager._signal\n });\n }\n const highlightDiv = this.#highlightDiv = document.createElement(\"div\");\n div.append(highlightDiv);\n highlightDiv.setAttribute(\"aria-hidden\", \"true\");\n highlightDiv.className = \"internal\";\n highlightDiv.style.clipPath = this.#clipPathId;\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(this.width * parentWidth, this.height * parentHeight);\n bindEvents(this, this.#highlightDiv, [\"pointerover\", \"pointerleave\"]);\n this.enableEditing();\n return div;\n }\n pointerover() {\n this.parent.drawLayer.addClass(this.#outlineId, \"hovered\");\n }\n pointerleave() {\n this.parent.drawLayer.removeClass(this.#outlineId, \"hovered\");\n }\n #keydown(event) {\n HighlightEditor._keyboardManager.exec(this, event);\n }\n _moveCaret(direction) {\n this.parent.unselect(this);\n switch (direction) {\n case 0:\n case 2:\n this.#setCaret(true);\n break;\n case 1:\n case 3:\n this.#setCaret(false);\n break;\n }\n }\n #setCaret(start) {\n if (!this.#anchorNode) {\n return;\n }\n const selection = window.getSelection();\n if (start) {\n selection.setPosition(this.#anchorNode, this.#anchorOffset);\n } else {\n selection.setPosition(this.#focusNode, this.#focusOffset);\n }\n }\n select() {\n super.select();\n if (!this.#outlineId) {\n return;\n }\n this.parent?.drawLayer.removeClass(this.#outlineId, \"hovered\");\n this.parent?.drawLayer.addClass(this.#outlineId, \"selected\");\n }\n unselect() {\n super.unselect();\n if (!this.#outlineId) {\n return;\n }\n this.parent?.drawLayer.removeClass(this.#outlineId, \"selected\");\n if (!this.#isFreeHighlight) {\n this.#setCaret(false);\n }\n }\n get _mustFixPosition() {\n return !this.#isFreeHighlight;\n }\n show(visible = this._isVisible) {\n super.show(visible);\n if (this.parent) {\n this.parent.drawLayer.show(this.#id, visible);\n this.parent.drawLayer.show(this.#outlineId, visible);\n }\n }\n #getRotation() {\n return this.#isFreeHighlight ? this.rotation : 0;\n }\n #serializeBoxes() {\n if (this.#isFreeHighlight) {\n return null;\n }\n const [pageWidth, pageHeight] = this.pageDimensions;\n const [pageX, pageY] = this.pageTranslation;\n const boxes = this.#boxes;\n const quadPoints = new Float32Array(boxes.length * 8);\n let i = 0;\n for (const {\n x,\n y,\n width,\n height\n } of boxes) {\n const sx = x * pageWidth + pageX;\n const sy = (1 - y - height) * pageHeight + pageY;\n quadPoints[i] = quadPoints[i + 4] = sx;\n quadPoints[i + 1] = quadPoints[i + 3] = sy;\n quadPoints[i + 2] = quadPoints[i + 6] = sx + width * pageWidth;\n quadPoints[i + 5] = quadPoints[i + 7] = sy + height * pageHeight;\n i += 8;\n }\n return quadPoints;\n }\n #serializeOutlines(rect) {\n return this.#highlightOutlines.serialize(rect, this.#getRotation());\n }\n static startHighlighting(parent, isLTR, {\n target: textLayer,\n x,\n y\n }) {\n const {\n x: layerX,\n y: layerY,\n width: parentWidth,\n height: parentHeight\n } = textLayer.getBoundingClientRect();\n const ac = new AbortController();\n const signal = parent.combinedSignal(ac);\n const pointerDown = e => {\n e.preventDefault();\n e.stopPropagation();\n };\n const pointerUpCallback = e => {\n ac.abort();\n this.#endHighlight(parent, e);\n };\n window.addEventListener(\"blur\", pointerUpCallback, {\n signal\n });\n window.addEventListener(\"pointerup\", pointerUpCallback, {\n signal\n });\n window.addEventListener(\"pointerdown\", pointerDown, {\n capture: true,\n passive: false,\n signal\n });\n window.addEventListener(\"contextmenu\", noContextMenu, {\n signal\n });\n textLayer.addEventListener(\"pointermove\", this.#highlightMove.bind(this, parent), {\n signal\n });\n this._freeHighlight = new FreeOutliner({\n x,\n y\n }, [layerX, layerY, parentWidth, parentHeight], parent.scale, this._defaultThickness / 2, isLTR, 0.001);\n ({\n id: this._freeHighlightId,\n clipPathId: this._freeHighlightClipId\n } = parent.drawLayer.highlight(this._freeHighlight, this._defaultColor, this._defaultOpacity, true));\n }\n static #highlightMove(parent, event) {\n if (this._freeHighlight.add(event)) {\n parent.drawLayer.updatePath(this._freeHighlightId, this._freeHighlight);\n }\n }\n static #endHighlight(parent, event) {\n if (!this._freeHighlight.isEmpty()) {\n parent.createAndAddNewEditor(event, false, {\n highlightId: this._freeHighlightId,\n highlightOutlines: this._freeHighlight.getOutlines(),\n clipPathId: this._freeHighlightClipId,\n methodOfCreation: \"main_toolbar\"\n });\n } else {\n parent.drawLayer.removeFreeHighlight(this._freeHighlightId);\n }\n this._freeHighlightId = -1;\n this._freeHighlight = null;\n this._freeHighlightClipId = \"\";\n }\n static async deserialize(data, parent, uiManager) {\n let initialData = null;\n if (data instanceof HighlightAnnotationElement) {\n const {\n data: {\n quadPoints,\n rect,\n rotation,\n id,\n color,\n opacity,\n popupRef\n },\n parent: {\n page: {\n pageNumber\n }\n }\n } = data;\n initialData = data = {\n annotationType: AnnotationEditorType.HIGHLIGHT,\n color: Array.from(color),\n opacity,\n quadPoints,\n boxes: null,\n pageIndex: pageNumber - 1,\n rect: rect.slice(0),\n rotation,\n id,\n deleted: false,\n popupRef\n };\n } else if (data instanceof InkAnnotationElement) {\n const {\n data: {\n inkLists,\n rect,\n rotation,\n id,\n color,\n borderStyle: {\n rawWidth: thickness\n },\n popupRef\n },\n parent: {\n page: {\n pageNumber\n }\n }\n } = data;\n initialData = data = {\n annotationType: AnnotationEditorType.HIGHLIGHT,\n color: Array.from(color),\n thickness,\n inkLists,\n boxes: null,\n pageIndex: pageNumber - 1,\n rect: rect.slice(0),\n rotation,\n id,\n deleted: false,\n popupRef\n };\n }\n const {\n color,\n quadPoints,\n inkLists,\n opacity\n } = data;\n const editor = await super.deserialize(data, parent, uiManager);\n editor.color = Util.makeHexColor(...color);\n editor.#opacity = opacity || 1;\n if (inkLists) {\n editor.#thickness = data.thickness;\n }\n editor.annotationElementId = data.id || null;\n editor._initialData = initialData;\n const [pageWidth, pageHeight] = editor.pageDimensions;\n const [pageX, pageY] = editor.pageTranslation;\n if (quadPoints) {\n const boxes = editor.#boxes = [];\n for (let i = 0; i < quadPoints.length; i += 8) {\n boxes.push({\n x: (quadPoints[i] - pageX) / pageWidth,\n y: 1 - (quadPoints[i + 1] - pageY) / pageHeight,\n width: (quadPoints[i + 2] - quadPoints[i]) / pageWidth,\n height: (quadPoints[i + 1] - quadPoints[i + 5]) / pageHeight\n });\n }\n editor.#createOutlines();\n editor.#addToDrawLayer();\n editor.rotate(editor.rotation);\n } else if (inkLists) {\n editor.#isFreeHighlight = true;\n const points = inkLists[0];\n const point = {\n x: points[0] - pageX,\n y: pageHeight - (points[1] - pageY)\n };\n const outliner = new FreeOutliner(point, [0, 0, pageWidth, pageHeight], 1, editor.#thickness / 2, true, 0.001);\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n point.x = points[i] - pageX;\n point.y = pageHeight - (points[i + 1] - pageY);\n outliner.add(point);\n }\n const {\n id,\n clipPathId\n } = parent.drawLayer.highlight(outliner, editor.color, editor._defaultOpacity, true);\n editor.#createFreeOutlines({\n highlightOutlines: outliner.getOutlines(),\n highlightId: id,\n clipPathId\n });\n editor.#addToDrawLayer();\n }\n return editor;\n }\n serialize(isForCopying = false) {\n if (this.isEmpty() || isForCopying) {\n return null;\n }\n if (this.deleted) {\n return this.serializeDeleted();\n }\n const rect = this.getRect(0, 0);\n const color = AnnotationEditor._colorManager.convert(this.color);\n const serialized = {\n annotationType: AnnotationEditorType.HIGHLIGHT,\n color,\n opacity: this.#opacity,\n thickness: this.#thickness,\n quadPoints: this.#serializeBoxes(),\n outlines: this.#serializeOutlines(rect),\n pageIndex: this.pageIndex,\n rect,\n rotation: this.#getRotation(),\n structTreeParentId: this._structTreeParentId\n };\n if (this.annotationElementId && !this.#hasElementChanged(serialized)) {\n return null;\n }\n serialized.id = this.annotationElementId;\n return serialized;\n }\n #hasElementChanged(serialized) {\n const {\n color\n } = this._initialData;\n return serialized.color.some((c, i) => c !== color[i]);\n }\n renderAnnotationElement(annotation) {\n annotation.updateEdited({\n rect: this.getRect(0, 0)\n });\n return null;\n }\n static canCreateNewEmptyEditor() {\n return false;\n }\n}\n\n;// ./src/display/editor/ink.js\n\n\n\n\n\n\n\nclass InkEditor extends AnnotationEditor {\n #baseHeight = 0;\n #baseWidth = 0;\n #canvasContextMenuTimeoutId = null;\n #currentPath2D = new Path2D();\n #disableEditing = false;\n #drawingAC = null;\n #hasSomethingToDraw = false;\n #isCanvasInitialized = false;\n #observer = null;\n #pointerdownAC = null;\n #realWidth = 0;\n #realHeight = 0;\n #requestFrameCallback = null;\n static _defaultColor = null;\n static _defaultOpacity = 1;\n static _defaultThickness = 1;\n static _type = \"ink\";\n static _editorType = AnnotationEditorType.INK;\n constructor(params) {\n super({\n ...params,\n name: \"inkEditor\"\n });\n this.color = params.color || null;\n this.thickness = params.thickness || null;\n this.opacity = params.opacity || null;\n this.paths = [];\n this.bezierPath2D = [];\n this.allRawPaths = [];\n this.currentPath = [];\n this.scaleFactor = 1;\n this.translationX = this.translationY = 0;\n this.x = 0;\n this.y = 0;\n this._willKeepAspectRatio = true;\n }\n static initialize(l10n, uiManager) {\n AnnotationEditor.initialize(l10n, uiManager);\n }\n static updateDefaultParams(type, value) {\n switch (type) {\n case AnnotationEditorParamsType.INK_THICKNESS:\n InkEditor._defaultThickness = value;\n break;\n case AnnotationEditorParamsType.INK_COLOR:\n InkEditor._defaultColor = value;\n break;\n case AnnotationEditorParamsType.INK_OPACITY:\n InkEditor._defaultOpacity = value / 100;\n break;\n }\n }\n updateParams(type, value) {\n switch (type) {\n case AnnotationEditorParamsType.INK_THICKNESS:\n this.#updateThickness(value);\n break;\n case AnnotationEditorParamsType.INK_COLOR:\n this.#updateColor(value);\n break;\n case AnnotationEditorParamsType.INK_OPACITY:\n this.#updateOpacity(value);\n break;\n }\n }\n static get defaultPropertiesToUpdate() {\n return [[AnnotationEditorParamsType.INK_THICKNESS, InkEditor._defaultThickness], [AnnotationEditorParamsType.INK_COLOR, InkEditor._defaultColor || AnnotationEditor._defaultLineColor], [AnnotationEditorParamsType.INK_OPACITY, Math.round(InkEditor._defaultOpacity * 100)]];\n }\n get propertiesToUpdate() {\n return [[AnnotationEditorParamsType.INK_THICKNESS, this.thickness || InkEditor._defaultThickness], [AnnotationEditorParamsType.INK_COLOR, this.color || InkEditor._defaultColor || AnnotationEditor._defaultLineColor], [AnnotationEditorParamsType.INK_OPACITY, Math.round(100 * (this.opacity ?? InkEditor._defaultOpacity))]];\n }\n #updateThickness(thickness) {\n const setThickness = th => {\n this.thickness = th;\n this.#fitToContent();\n };\n const savedThickness = this.thickness;\n this.addCommands({\n cmd: setThickness.bind(this, thickness),\n undo: setThickness.bind(this, savedThickness),\n post: this._uiManager.updateUI.bind(this._uiManager, this),\n mustExec: true,\n type: AnnotationEditorParamsType.INK_THICKNESS,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n #updateColor(color) {\n const setColor = col => {\n this.color = col;\n this.#redraw();\n };\n const savedColor = this.color;\n this.addCommands({\n cmd: setColor.bind(this, color),\n undo: setColor.bind(this, savedColor),\n post: this._uiManager.updateUI.bind(this._uiManager, this),\n mustExec: true,\n type: AnnotationEditorParamsType.INK_COLOR,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n #updateOpacity(opacity) {\n const setOpacity = op => {\n this.opacity = op;\n this.#redraw();\n };\n opacity /= 100;\n const savedOpacity = this.opacity;\n this.addCommands({\n cmd: setOpacity.bind(this, opacity),\n undo: setOpacity.bind(this, savedOpacity),\n post: this._uiManager.updateUI.bind(this._uiManager, this),\n mustExec: true,\n type: AnnotationEditorParamsType.INK_OPACITY,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n rebuild() {\n if (!this.parent) {\n return;\n }\n super.rebuild();\n if (this.div === null) {\n return;\n }\n if (!this.canvas) {\n this.#createCanvas();\n this.#createObserver();\n }\n if (!this.isAttachedToDOM) {\n this.parent.add(this);\n this.#setCanvasDims();\n }\n this.#fitToContent();\n }\n remove() {\n if (this.canvas === null) {\n return;\n }\n if (!this.isEmpty()) {\n this.commit();\n }\n this.canvas.width = this.canvas.height = 0;\n this.canvas.remove();\n this.canvas = null;\n if (this.#canvasContextMenuTimeoutId) {\n clearTimeout(this.#canvasContextMenuTimeoutId);\n this.#canvasContextMenuTimeoutId = null;\n }\n this.#observer?.disconnect();\n this.#observer = null;\n super.remove();\n }\n setParent(parent) {\n if (!this.parent && parent) {\n this._uiManager.removeShouldRescale(this);\n } else if (this.parent && parent === null) {\n this._uiManager.addShouldRescale(this);\n }\n super.setParent(parent);\n }\n onScaleChanging() {\n const [parentWidth, parentHeight] = this.parentDimensions;\n const width = this.width * parentWidth;\n const height = this.height * parentHeight;\n this.setDimensions(width, height);\n }\n enableEditMode() {\n if (this.#disableEditing || this.canvas === null) {\n return;\n }\n super.enableEditMode();\n this._isDraggable = false;\n this.#addPointerdownListener();\n }\n disableEditMode() {\n if (!this.isInEditMode() || this.canvas === null) {\n return;\n }\n super.disableEditMode();\n this._isDraggable = !this.isEmpty();\n this.div.classList.remove(\"editing\");\n this.#removePointerdownListener();\n }\n onceAdded() {\n this._isDraggable = !this.isEmpty();\n }\n isEmpty() {\n return this.paths.length === 0 || this.paths.length === 1 && this.paths[0].length === 0;\n }\n #getInitialBBox() {\n const {\n parentRotation,\n parentDimensions: [width, height]\n } = this;\n switch (parentRotation) {\n case 90:\n return [0, height, height, width];\n case 180:\n return [width, height, width, height];\n case 270:\n return [width, 0, height, width];\n default:\n return [0, 0, width, height];\n }\n }\n #setStroke() {\n const {\n ctx,\n color,\n opacity,\n thickness,\n parentScale,\n scaleFactor\n } = this;\n ctx.lineWidth = thickness * parentScale / scaleFactor;\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n ctx.miterLimit = 10;\n ctx.strokeStyle = `${color}${opacityToHex(opacity)}`;\n }\n #startDrawing(x, y) {\n this.canvas.addEventListener(\"contextmenu\", noContextMenu, {\n signal: this._uiManager._signal\n });\n this.#removePointerdownListener();\n this.#drawingAC = new AbortController();\n const signal = this._uiManager.combinedSignal(this.#drawingAC);\n this.canvas.addEventListener(\"pointerleave\", this.canvasPointerleave.bind(this), {\n signal\n });\n this.canvas.addEventListener(\"pointermove\", this.canvasPointermove.bind(this), {\n signal\n });\n this.canvas.addEventListener(\"pointerup\", this.canvasPointerup.bind(this), {\n signal\n });\n this.isEditing = true;\n if (!this.#isCanvasInitialized) {\n this.#isCanvasInitialized = true;\n this.#setCanvasDims();\n this.thickness ||= InkEditor._defaultThickness;\n this.color ||= InkEditor._defaultColor || AnnotationEditor._defaultLineColor;\n this.opacity ??= InkEditor._defaultOpacity;\n }\n this.currentPath.push([x, y]);\n this.#hasSomethingToDraw = false;\n this.#setStroke();\n this.#requestFrameCallback = () => {\n this.#drawPoints();\n if (this.#requestFrameCallback) {\n window.requestAnimationFrame(this.#requestFrameCallback);\n }\n };\n window.requestAnimationFrame(this.#requestFrameCallback);\n }\n #draw(x, y) {\n const [lastX, lastY] = this.currentPath.at(-1);\n if (this.currentPath.length > 1 && x === lastX && y === lastY) {\n return;\n }\n const currentPath = this.currentPath;\n let path2D = this.#currentPath2D;\n currentPath.push([x, y]);\n this.#hasSomethingToDraw = true;\n if (currentPath.length <= 2) {\n path2D.moveTo(...currentPath[0]);\n path2D.lineTo(x, y);\n return;\n }\n if (currentPath.length === 3) {\n this.#currentPath2D = path2D = new Path2D();\n path2D.moveTo(...currentPath[0]);\n }\n this.#makeBezierCurve(path2D, ...currentPath.at(-3), ...currentPath.at(-2), x, y);\n }\n #endPath() {\n if (this.currentPath.length === 0) {\n return;\n }\n const lastPoint = this.currentPath.at(-1);\n this.#currentPath2D.lineTo(...lastPoint);\n }\n #stopDrawing(x, y) {\n this.#requestFrameCallback = null;\n x = Math.min(Math.max(x, 0), this.canvas.width);\n y = Math.min(Math.max(y, 0), this.canvas.height);\n this.#draw(x, y);\n this.#endPath();\n let bezier;\n if (this.currentPath.length !== 1) {\n bezier = this.#generateBezierPoints();\n } else {\n const xy = [x, y];\n bezier = [[xy, xy.slice(), xy.slice(), xy]];\n }\n const path2D = this.#currentPath2D;\n const currentPath = this.currentPath;\n this.currentPath = [];\n this.#currentPath2D = new Path2D();\n const cmd = () => {\n this.allRawPaths.push(currentPath);\n this.paths.push(bezier);\n this.bezierPath2D.push(path2D);\n this._uiManager.rebuild(this);\n };\n const undo = () => {\n this.allRawPaths.pop();\n this.paths.pop();\n this.bezierPath2D.pop();\n if (this.paths.length === 0) {\n this.remove();\n } else {\n if (!this.canvas) {\n this.#createCanvas();\n this.#createObserver();\n }\n this.#fitToContent();\n }\n };\n this.addCommands({\n cmd,\n undo,\n mustExec: true\n });\n }\n #drawPoints() {\n if (!this.#hasSomethingToDraw) {\n return;\n }\n this.#hasSomethingToDraw = false;\n const thickness = Math.ceil(this.thickness * this.parentScale);\n const lastPoints = this.currentPath.slice(-3);\n const x = lastPoints.map(xy => xy[0]);\n const y = lastPoints.map(xy => xy[1]);\n const xMin = Math.min(...x) - thickness;\n const xMax = Math.max(...x) + thickness;\n const yMin = Math.min(...y) - thickness;\n const yMax = Math.max(...y) + thickness;\n const {\n ctx\n } = this;\n ctx.save();\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n for (const path of this.bezierPath2D) {\n ctx.stroke(path);\n }\n ctx.stroke(this.#currentPath2D);\n ctx.restore();\n }\n #makeBezierCurve(path2D, x0, y0, x1, y1, x2, y2) {\n const prevX = (x0 + x1) / 2;\n const prevY = (y0 + y1) / 2;\n const x3 = (x1 + x2) / 2;\n const y3 = (y1 + y2) / 2;\n path2D.bezierCurveTo(prevX + 2 * (x1 - prevX) / 3, prevY + 2 * (y1 - prevY) / 3, x3 + 2 * (x1 - x3) / 3, y3 + 2 * (y1 - y3) / 3, x3, y3);\n }\n #generateBezierPoints() {\n const path = this.currentPath;\n if (path.length <= 2) {\n return [[path[0], path[0], path.at(-1), path.at(-1)]];\n }\n const bezierPoints = [];\n let i;\n let [x0, y0] = path[0];\n for (i = 1; i < path.length - 2; i++) {\n const [x1, y1] = path[i];\n const [x2, y2] = path[i + 1];\n const x3 = (x1 + x2) / 2;\n const y3 = (y1 + y2) / 2;\n const control1 = [x0 + 2 * (x1 - x0) / 3, y0 + 2 * (y1 - y0) / 3];\n const control2 = [x3 + 2 * (x1 - x3) / 3, y3 + 2 * (y1 - y3) / 3];\n bezierPoints.push([[x0, y0], control1, control2, [x3, y3]]);\n [x0, y0] = [x3, y3];\n }\n const [x1, y1] = path[i];\n const [x2, y2] = path[i + 1];\n const control1 = [x0 + 2 * (x1 - x0) / 3, y0 + 2 * (y1 - y0) / 3];\n const control2 = [x2 + 2 * (x1 - x2) / 3, y2 + 2 * (y1 - y2) / 3];\n bezierPoints.push([[x0, y0], control1, control2, [x2, y2]]);\n return bezierPoints;\n }\n #redraw() {\n if (this.isEmpty()) {\n this.#updateTransform();\n return;\n }\n this.#setStroke();\n const {\n canvas,\n ctx\n } = this;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n this.#updateTransform();\n for (const path of this.bezierPath2D) {\n ctx.stroke(path);\n }\n }\n commit() {\n if (this.#disableEditing) {\n return;\n }\n super.commit();\n this.isEditing = false;\n this.disableEditMode();\n this.setInForeground();\n this.#disableEditing = true;\n this.div.classList.add(\"disabled\");\n this.#fitToContent(true);\n this.select();\n this.parent.addInkEditorIfNeeded(true);\n this.moveInDOM();\n this.div.focus({\n preventScroll: true\n });\n }\n focusin(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n super.focusin(event);\n this.enableEditMode();\n }\n #addPointerdownListener() {\n if (this.#pointerdownAC) {\n return;\n }\n this.#pointerdownAC = new AbortController();\n const signal = this._uiManager.combinedSignal(this.#pointerdownAC);\n this.canvas.addEventListener(\"pointerdown\", this.canvasPointerdown.bind(this), {\n signal\n });\n }\n #removePointerdownListener() {\n this.pointerdownAC?.abort();\n this.pointerdownAC = null;\n }\n canvasPointerdown(event) {\n if (event.button !== 0 || !this.isInEditMode() || this.#disableEditing) {\n return;\n }\n this.setInForeground();\n event.preventDefault();\n if (!this.div.contains(document.activeElement)) {\n this.div.focus({\n preventScroll: true\n });\n }\n this.#startDrawing(event.offsetX, event.offsetY);\n }\n canvasPointermove(event) {\n event.preventDefault();\n this.#draw(event.offsetX, event.offsetY);\n }\n canvasPointerup(event) {\n event.preventDefault();\n this.#endDrawing(event);\n }\n canvasPointerleave(event) {\n this.#endDrawing(event);\n }\n #endDrawing(event) {\n this.#drawingAC?.abort();\n this.#drawingAC = null;\n this.#addPointerdownListener();\n if (this.#canvasContextMenuTimeoutId) {\n clearTimeout(this.#canvasContextMenuTimeoutId);\n }\n this.#canvasContextMenuTimeoutId = setTimeout(() => {\n this.#canvasContextMenuTimeoutId = null;\n this.canvas.removeEventListener(\"contextmenu\", noContextMenu);\n }, 10);\n this.#stopDrawing(event.offsetX, event.offsetY);\n this.addToAnnotationStorage();\n this.setInBackground();\n }\n #createCanvas() {\n this.canvas = document.createElement(\"canvas\");\n this.canvas.width = this.canvas.height = 0;\n this.canvas.className = \"inkEditorCanvas\";\n this.canvas.setAttribute(\"data-l10n-id\", \"pdfjs-ink-canvas\");\n this.div.append(this.canvas);\n this.ctx = this.canvas.getContext(\"2d\");\n }\n #createObserver() {\n this.#observer = new ResizeObserver(entries => {\n const rect = entries[0].contentRect;\n if (rect.width && rect.height) {\n this.setDimensions(rect.width, rect.height);\n }\n });\n this.#observer.observe(this.div);\n this._uiManager._signal.addEventListener(\"abort\", () => {\n this.#observer?.disconnect();\n this.#observer = null;\n }, {\n once: true\n });\n }\n get isResizable() {\n return !this.isEmpty() && this.#disableEditing;\n }\n render() {\n if (this.div) {\n return this.div;\n }\n let baseX, baseY;\n if (this.width) {\n baseX = this.x;\n baseY = this.y;\n }\n super.render();\n this.div.setAttribute(\"data-l10n-id\", \"pdfjs-ink\");\n const [x, y, w, h] = this.#getInitialBBox();\n this.setAt(x, y, 0, 0);\n this.setDims(w, h);\n this.#createCanvas();\n if (this.width) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setAspectRatio(this.width * parentWidth, this.height * parentHeight);\n this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight);\n this.#isCanvasInitialized = true;\n this.#setCanvasDims();\n this.setDims(this.width * parentWidth, this.height * parentHeight);\n this.#redraw();\n this.div.classList.add(\"disabled\");\n } else {\n this.div.classList.add(\"editing\");\n this.enableEditMode();\n }\n this.#createObserver();\n return this.div;\n }\n #setCanvasDims() {\n if (!this.#isCanvasInitialized) {\n return;\n }\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.canvas.width = Math.ceil(this.width * parentWidth);\n this.canvas.height = Math.ceil(this.height * parentHeight);\n this.#updateTransform();\n }\n setDimensions(width, height) {\n const roundedWidth = Math.round(width);\n const roundedHeight = Math.round(height);\n if (this.#realWidth === roundedWidth && this.#realHeight === roundedHeight) {\n return;\n }\n this.#realWidth = roundedWidth;\n this.#realHeight = roundedHeight;\n this.canvas.style.visibility = \"hidden\";\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.width = width / parentWidth;\n this.height = height / parentHeight;\n this.fixAndSetPosition();\n if (this.#disableEditing) {\n this.#setScaleFactor(width, height);\n }\n this.#setCanvasDims();\n this.#redraw();\n this.canvas.style.visibility = \"visible\";\n this.fixDims();\n }\n #setScaleFactor(width, height) {\n const padding = this.#getPadding();\n const scaleFactorW = (width - padding) / this.#baseWidth;\n const scaleFactorH = (height - padding) / this.#baseHeight;\n this.scaleFactor = Math.min(scaleFactorW, scaleFactorH);\n }\n #updateTransform() {\n const padding = this.#getPadding() / 2;\n this.ctx.setTransform(this.scaleFactor, 0, 0, this.scaleFactor, this.translationX * this.scaleFactor + padding, this.translationY * this.scaleFactor + padding);\n }\n static #buildPath2D(bezier) {\n const path2D = new Path2D();\n for (let i = 0, ii = bezier.length; i < ii; i++) {\n const [first, control1, control2, second] = bezier[i];\n if (i === 0) {\n path2D.moveTo(...first);\n }\n path2D.bezierCurveTo(control1[0], control1[1], control2[0], control2[1], second[0], second[1]);\n }\n return path2D;\n }\n static #toPDFCoordinates(points, rect, rotation) {\n const [blX, blY, trX, trY] = rect;\n switch (rotation) {\n case 0:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n points[i] += blX;\n points[i + 1] = trY - points[i + 1];\n }\n break;\n case 90:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n const x = points[i];\n points[i] = points[i + 1] + blX;\n points[i + 1] = x + blY;\n }\n break;\n case 180:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n points[i] = trX - points[i];\n points[i + 1] += blY;\n }\n break;\n case 270:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n const x = points[i];\n points[i] = trX - points[i + 1];\n points[i + 1] = trY - x;\n }\n break;\n default:\n throw new Error(\"Invalid rotation\");\n }\n return points;\n }\n static #fromPDFCoordinates(points, rect, rotation) {\n const [blX, blY, trX, trY] = rect;\n switch (rotation) {\n case 0:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n points[i] -= blX;\n points[i + 1] = trY - points[i + 1];\n }\n break;\n case 90:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n const x = points[i];\n points[i] = points[i + 1] - blY;\n points[i + 1] = x - blX;\n }\n break;\n case 180:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n points[i] = trX - points[i];\n points[i + 1] -= blY;\n }\n break;\n case 270:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n const x = points[i];\n points[i] = trY - points[i + 1];\n points[i + 1] = trX - x;\n }\n break;\n default:\n throw new Error(\"Invalid rotation\");\n }\n return points;\n }\n #serializePaths(s, tx, ty, rect) {\n const paths = [];\n const padding = this.thickness / 2;\n const shiftX = s * tx + padding;\n const shiftY = s * ty + padding;\n for (const bezier of this.paths) {\n const buffer = [];\n const points = [];\n for (let j = 0, jj = bezier.length; j < jj; j++) {\n const [first, control1, control2, second] = bezier[j];\n if (first[0] === second[0] && first[1] === second[1] && jj === 1) {\n const p0 = s * first[0] + shiftX;\n const p1 = s * first[1] + shiftY;\n buffer.push(p0, p1);\n points.push(p0, p1);\n break;\n }\n const p10 = s * first[0] + shiftX;\n const p11 = s * first[1] + shiftY;\n const p20 = s * control1[0] + shiftX;\n const p21 = s * control1[1] + shiftY;\n const p30 = s * control2[0] + shiftX;\n const p31 = s * control2[1] + shiftY;\n const p40 = s * second[0] + shiftX;\n const p41 = s * second[1] + shiftY;\n if (j === 0) {\n buffer.push(p10, p11);\n points.push(p10, p11);\n }\n buffer.push(p20, p21, p30, p31, p40, p41);\n points.push(p20, p21);\n if (j === jj - 1) {\n points.push(p40, p41);\n }\n }\n paths.push({\n bezier: InkEditor.#toPDFCoordinates(buffer, rect, this.rotation),\n points: InkEditor.#toPDFCoordinates(points, rect, this.rotation)\n });\n }\n return paths;\n }\n #getBbox() {\n let xMin = Infinity;\n let xMax = -Infinity;\n let yMin = Infinity;\n let yMax = -Infinity;\n for (const path of this.paths) {\n for (const [first, control1, control2, second] of path) {\n const bbox = Util.bezierBoundingBox(...first, ...control1, ...control2, ...second);\n xMin = Math.min(xMin, bbox[0]);\n yMin = Math.min(yMin, bbox[1]);\n xMax = Math.max(xMax, bbox[2]);\n yMax = Math.max(yMax, bbox[3]);\n }\n }\n return [xMin, yMin, xMax, yMax];\n }\n #getPadding() {\n return this.#disableEditing ? Math.ceil(this.thickness * this.parentScale) : 0;\n }\n #fitToContent(firstTime = false) {\n if (this.isEmpty()) {\n return;\n }\n if (!this.#disableEditing) {\n this.#redraw();\n return;\n }\n const bbox = this.#getBbox();\n const padding = this.#getPadding();\n this.#baseWidth = Math.max(AnnotationEditor.MIN_SIZE, bbox[2] - bbox[0]);\n this.#baseHeight = Math.max(AnnotationEditor.MIN_SIZE, bbox[3] - bbox[1]);\n const width = Math.ceil(padding + this.#baseWidth * this.scaleFactor);\n const height = Math.ceil(padding + this.#baseHeight * this.scaleFactor);\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.width = width / parentWidth;\n this.height = height / parentHeight;\n this.setAspectRatio(width, height);\n const prevTranslationX = this.translationX;\n const prevTranslationY = this.translationY;\n this.translationX = -bbox[0];\n this.translationY = -bbox[1];\n this.#setCanvasDims();\n this.#redraw();\n this.#realWidth = width;\n this.#realHeight = height;\n this.setDims(width, height);\n const unscaledPadding = firstTime ? padding / this.scaleFactor / 2 : 0;\n this.translate(prevTranslationX - this.translationX - unscaledPadding, prevTranslationY - this.translationY - unscaledPadding);\n }\n static async deserialize(data, parent, uiManager) {\n if (data instanceof InkAnnotationElement) {\n return null;\n }\n const editor = await super.deserialize(data, parent, uiManager);\n editor.thickness = data.thickness;\n editor.color = Util.makeHexColor(...data.color);\n editor.opacity = data.opacity;\n const [pageWidth, pageHeight] = editor.pageDimensions;\n const width = editor.width * pageWidth;\n const height = editor.height * pageHeight;\n const scaleFactor = editor.parentScale;\n const padding = data.thickness / 2;\n editor.#disableEditing = true;\n editor.#realWidth = Math.round(width);\n editor.#realHeight = Math.round(height);\n const {\n paths,\n rect,\n rotation\n } = data;\n for (let {\n bezier\n } of paths) {\n bezier = InkEditor.#fromPDFCoordinates(bezier, rect, rotation);\n const path = [];\n editor.paths.push(path);\n let p0 = scaleFactor * (bezier[0] - padding);\n let p1 = scaleFactor * (bezier[1] - padding);\n for (let i = 2, ii = bezier.length; i < ii; i += 6) {\n const p10 = scaleFactor * (bezier[i] - padding);\n const p11 = scaleFactor * (bezier[i + 1] - padding);\n const p20 = scaleFactor * (bezier[i + 2] - padding);\n const p21 = scaleFactor * (bezier[i + 3] - padding);\n const p30 = scaleFactor * (bezier[i + 4] - padding);\n const p31 = scaleFactor * (bezier[i + 5] - padding);\n path.push([[p0, p1], [p10, p11], [p20, p21], [p30, p31]]);\n p0 = p30;\n p1 = p31;\n }\n const path2D = this.#buildPath2D(path);\n editor.bezierPath2D.push(path2D);\n }\n const bbox = editor.#getBbox();\n editor.#baseWidth = Math.max(AnnotationEditor.MIN_SIZE, bbox[2] - bbox[0]);\n editor.#baseHeight = Math.max(AnnotationEditor.MIN_SIZE, bbox[3] - bbox[1]);\n editor.#setScaleFactor(width, height);\n return editor;\n }\n serialize() {\n if (this.isEmpty()) {\n return null;\n }\n const rect = this.getRect(0, 0);\n const color = AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);\n return {\n annotationType: AnnotationEditorType.INK,\n color,\n thickness: this.thickness,\n opacity: this.opacity,\n paths: this.#serializePaths(this.scaleFactor / this.parentScale, this.translationX, this.translationY, rect),\n pageIndex: this.pageIndex,\n rect,\n rotation: this.rotation,\n structTreeParentId: this._structTreeParentId\n };\n }\n}\n\n;// ./src/display/editor/stamp.js\n\n\n\n\n\n\n\n\nclass StampEditor extends AnnotationEditor {\n #bitmap = null;\n #bitmapId = null;\n #bitmapPromise = null;\n #bitmapUrl = null;\n #bitmapFile = null;\n #bitmapFileName = \"\";\n #canvas = null;\n #observer = null;\n #resizeTimeoutId = null;\n #isSvg = false;\n #hasBeenAddedInUndoStack = false;\n static _type = \"stamp\";\n static _editorType = AnnotationEditorType.STAMP;\n constructor(params) {\n super({\n ...params,\n name: \"stampEditor\"\n });\n this.#bitmapUrl = params.bitmapUrl;\n this.#bitmapFile = params.bitmapFile;\n }\n static initialize(l10n, uiManager) {\n AnnotationEditor.initialize(l10n, uiManager);\n }\n static get supportedTypes() {\n const types = [\"apng\", \"avif\", \"bmp\", \"gif\", \"jpeg\", \"png\", \"svg+xml\", \"webp\", \"x-icon\"];\n return shadow(this, \"supportedTypes\", types.map(type => `image/${type}`));\n }\n static get supportedTypesStr() {\n return shadow(this, \"supportedTypesStr\", this.supportedTypes.join(\",\"));\n }\n static isHandlingMimeForPasting(mime) {\n return this.supportedTypes.includes(mime);\n }\n static paste(item, parent) {\n parent.pasteEditor(AnnotationEditorType.STAMP, {\n bitmapFile: item.getAsFile()\n });\n }\n altTextFinish() {\n if (this._uiManager.useNewAltTextFlow) {\n this.div.hidden = false;\n }\n super.altTextFinish();\n }\n get telemetryFinalData() {\n return {\n type: \"stamp\",\n hasAltText: !!this.altTextData?.altText\n };\n }\n static computeTelemetryFinalData(data) {\n const hasAltTextStats = data.get(\"hasAltText\");\n return {\n hasAltText: hasAltTextStats.get(true) ?? 0,\n hasNoAltText: hasAltTextStats.get(false) ?? 0\n };\n }\n #getBitmapFetched(data, fromId = false) {\n if (!data) {\n this.remove();\n return;\n }\n this.#bitmap = data.bitmap;\n if (!fromId) {\n this.#bitmapId = data.id;\n this.#isSvg = data.isSvg;\n }\n if (data.file) {\n this.#bitmapFileName = data.file.name;\n }\n this.#createCanvas();\n }\n #getBitmapDone() {\n this.#bitmapPromise = null;\n this._uiManager.enableWaiting(false);\n if (!this.#canvas) {\n return;\n }\n if (this._uiManager.useNewAltTextWhenAddingImage && this._uiManager.useNewAltTextFlow && this.#bitmap) {\n this._editToolbar.hide();\n this._uiManager.editAltText(this, true);\n return;\n }\n if (!this._uiManager.useNewAltTextWhenAddingImage && this._uiManager.useNewAltTextFlow && this.#bitmap) {\n this._reportTelemetry({\n action: \"pdfjs.image.image_added\",\n data: {\n alt_text_modal: false,\n alt_text_type: \"empty\"\n }\n });\n try {\n this.mlGuessAltText();\n } catch {}\n }\n this.div.focus();\n }\n async mlGuessAltText(imageData = null, updateAltTextData = true) {\n if (this.hasAltTextData()) {\n return null;\n }\n const {\n mlManager\n } = this._uiManager;\n if (!mlManager) {\n throw new Error(\"No ML.\");\n }\n if (!(await mlManager.isEnabledFor(\"altText\"))) {\n throw new Error(\"ML isn't enabled for alt text.\");\n }\n const {\n data,\n width,\n height\n } = imageData || this.copyCanvas(null, null, true).imageData;\n const response = await mlManager.guess({\n name: \"altText\",\n request: {\n data,\n width,\n height,\n channels: data.length / (width * height)\n }\n });\n if (!response) {\n throw new Error(\"No response from the AI service.\");\n }\n if (response.error) {\n throw new Error(\"Error from the AI service.\");\n }\n if (response.cancel) {\n return null;\n }\n if (!response.output) {\n throw new Error(\"No valid response from the AI service.\");\n }\n const altText = response.output;\n await this.setGuessedAltText(altText);\n if (updateAltTextData && !this.hasAltTextData()) {\n this.altTextData = {\n alt: altText,\n decorative: false\n };\n }\n return altText;\n }\n #getBitmap() {\n if (this.#bitmapId) {\n this._uiManager.enableWaiting(true);\n this._uiManager.imageManager.getFromId(this.#bitmapId).then(data => this.#getBitmapFetched(data, true)).finally(() => this.#getBitmapDone());\n return;\n }\n if (this.#bitmapUrl) {\n const url = this.#bitmapUrl;\n this.#bitmapUrl = null;\n this._uiManager.enableWaiting(true);\n this.#bitmapPromise = this._uiManager.imageManager.getFromUrl(url).then(data => this.#getBitmapFetched(data)).finally(() => this.#getBitmapDone());\n return;\n }\n if (this.#bitmapFile) {\n const file = this.#bitmapFile;\n this.#bitmapFile = null;\n this._uiManager.enableWaiting(true);\n this.#bitmapPromise = this._uiManager.imageManager.getFromFile(file).then(data => this.#getBitmapFetched(data)).finally(() => this.#getBitmapDone());\n return;\n }\n const input = document.createElement(\"input\");\n input.type = \"file\";\n input.accept = StampEditor.supportedTypesStr;\n const signal = this._uiManager._signal;\n this.#bitmapPromise = new Promise(resolve => {\n input.addEventListener(\"change\", async () => {\n if (!input.files || input.files.length === 0) {\n this.remove();\n } else {\n this._uiManager.enableWaiting(true);\n const data = await this._uiManager.imageManager.getFromFile(input.files[0]);\n this._reportTelemetry({\n action: \"pdfjs.image.image_selected\",\n data: {\n alt_text_modal: this._uiManager.useNewAltTextFlow\n }\n });\n this.#getBitmapFetched(data);\n }\n resolve();\n }, {\n signal\n });\n input.addEventListener(\"cancel\", () => {\n this.remove();\n resolve();\n }, {\n signal\n });\n }).finally(() => this.#getBitmapDone());\n input.click();\n }\n remove() {\n if (this.#bitmapId) {\n this.#bitmap = null;\n this._uiManager.imageManager.deleteId(this.#bitmapId);\n this.#canvas?.remove();\n this.#canvas = null;\n this.#observer?.disconnect();\n this.#observer = null;\n if (this.#resizeTimeoutId) {\n clearTimeout(this.#resizeTimeoutId);\n this.#resizeTimeoutId = null;\n }\n }\n super.remove();\n }\n rebuild() {\n if (!this.parent) {\n if (this.#bitmapId) {\n this.#getBitmap();\n }\n return;\n }\n super.rebuild();\n if (this.div === null) {\n return;\n }\n if (this.#bitmapId && this.#canvas === null) {\n this.#getBitmap();\n }\n if (!this.isAttachedToDOM) {\n this.parent.add(this);\n }\n }\n onceAdded() {\n this._isDraggable = true;\n this.div.focus();\n }\n isEmpty() {\n return !(this.#bitmapPromise || this.#bitmap || this.#bitmapUrl || this.#bitmapFile || this.#bitmapId);\n }\n get isResizable() {\n return true;\n }\n render() {\n if (this.div) {\n return this.div;\n }\n let baseX, baseY;\n if (this.width) {\n baseX = this.x;\n baseY = this.y;\n }\n super.render();\n this.div.hidden = true;\n this.div.setAttribute(\"role\", \"figure\");\n this.addAltTextButton();\n if (this.#bitmap) {\n this.#createCanvas();\n } else {\n this.#getBitmap();\n }\n if (this.width && !this.annotationElementId) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight);\n }\n return this.div;\n }\n #createCanvas() {\n const {\n div\n } = this;\n let {\n width,\n height\n } = this.#bitmap;\n const [pageWidth, pageHeight] = this.pageDimensions;\n const MAX_RATIO = 0.75;\n if (this.width) {\n width = this.width * pageWidth;\n height = this.height * pageHeight;\n } else if (width > MAX_RATIO * pageWidth || height > MAX_RATIO * pageHeight) {\n const factor = Math.min(MAX_RATIO * pageWidth / width, MAX_RATIO * pageHeight / height);\n width *= factor;\n height *= factor;\n }\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(width * parentWidth / pageWidth, height * parentHeight / pageHeight);\n this._uiManager.enableWaiting(false);\n const canvas = this.#canvas = document.createElement(\"canvas\");\n canvas.setAttribute(\"role\", \"img\");\n this.addContainer(canvas);\n if (!this._uiManager.useNewAltTextWhenAddingImage || !this._uiManager.useNewAltTextFlow || this.annotationElementId) {\n div.hidden = false;\n }\n this.#drawBitmap(width, height);\n this.#createObserver();\n if (!this.#hasBeenAddedInUndoStack) {\n this.parent.addUndoableEditor(this);\n this.#hasBeenAddedInUndoStack = true;\n }\n this._reportTelemetry({\n action: \"inserted_image\"\n });\n if (this.#bitmapFileName) {\n canvas.setAttribute(\"aria-label\", this.#bitmapFileName);\n }\n }\n copyCanvas(maxDataDimension, maxPreviewDimension, createImageData = false) {\n if (!maxDataDimension) {\n maxDataDimension = 224;\n }\n const {\n width: bitmapWidth,\n height: bitmapHeight\n } = this.#bitmap;\n const outputScale = new OutputScale();\n let bitmap = this.#bitmap;\n let width = bitmapWidth,\n height = bitmapHeight;\n let canvas = null;\n if (maxPreviewDimension) {\n if (bitmapWidth > maxPreviewDimension || bitmapHeight > maxPreviewDimension) {\n const ratio = Math.min(maxPreviewDimension / bitmapWidth, maxPreviewDimension / bitmapHeight);\n width = Math.floor(bitmapWidth * ratio);\n height = Math.floor(bitmapHeight * ratio);\n }\n canvas = document.createElement(\"canvas\");\n const scaledWidth = canvas.width = Math.ceil(width * outputScale.sx);\n const scaledHeight = canvas.height = Math.ceil(height * outputScale.sy);\n if (!this.#isSvg) {\n bitmap = this.#scaleBitmap(scaledWidth, scaledHeight);\n }\n const ctx = canvas.getContext(\"2d\");\n ctx.filter = this._uiManager.hcmFilter;\n let white = \"white\",\n black = \"#cfcfd8\";\n if (this._uiManager.hcmFilter !== \"none\") {\n black = \"black\";\n } else if (window.matchMedia?.(\"(prefers-color-scheme: dark)\").matches) {\n white = \"#8f8f9d\";\n black = \"#42414d\";\n }\n const boxDim = 15;\n const boxDimWidth = boxDim * outputScale.sx;\n const boxDimHeight = boxDim * outputScale.sy;\n const pattern = new OffscreenCanvas(boxDimWidth * 2, boxDimHeight * 2);\n const patternCtx = pattern.getContext(\"2d\");\n patternCtx.fillStyle = white;\n patternCtx.fillRect(0, 0, boxDimWidth * 2, boxDimHeight * 2);\n patternCtx.fillStyle = black;\n patternCtx.fillRect(0, 0, boxDimWidth, boxDimHeight);\n patternCtx.fillRect(boxDimWidth, boxDimHeight, boxDimWidth, boxDimHeight);\n ctx.fillStyle = ctx.createPattern(pattern, \"repeat\");\n ctx.fillRect(0, 0, scaledWidth, scaledHeight);\n ctx.drawImage(bitmap, 0, 0, bitmap.width, bitmap.height, 0, 0, scaledWidth, scaledHeight);\n }\n let imageData = null;\n if (createImageData) {\n let dataWidth, dataHeight;\n if (outputScale.symmetric && bitmap.width < maxDataDimension && bitmap.height < maxDataDimension) {\n dataWidth = bitmap.width;\n dataHeight = bitmap.height;\n } else {\n bitmap = this.#bitmap;\n if (bitmapWidth > maxDataDimension || bitmapHeight > maxDataDimension) {\n const ratio = Math.min(maxDataDimension / bitmapWidth, maxDataDimension / bitmapHeight);\n dataWidth = Math.floor(bitmapWidth * ratio);\n dataHeight = Math.floor(bitmapHeight * ratio);\n if (!this.#isSvg) {\n bitmap = this.#scaleBitmap(dataWidth, dataHeight);\n }\n }\n }\n const offscreen = new OffscreenCanvas(dataWidth, dataHeight);\n const offscreenCtx = offscreen.getContext(\"2d\", {\n willReadFrequently: true\n });\n offscreenCtx.drawImage(bitmap, 0, 0, bitmap.width, bitmap.height, 0, 0, dataWidth, dataHeight);\n imageData = {\n width: dataWidth,\n height: dataHeight,\n data: offscreenCtx.getImageData(0, 0, dataWidth, dataHeight).data\n };\n }\n return {\n canvas,\n width,\n height,\n imageData\n };\n }\n #setDimensions(width, height) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.width = width / parentWidth;\n this.height = height / parentHeight;\n if (this._initialOptions?.isCentered) {\n this.center();\n } else {\n this.fixAndSetPosition();\n }\n this._initialOptions = null;\n if (this.#resizeTimeoutId !== null) {\n clearTimeout(this.#resizeTimeoutId);\n }\n const TIME_TO_WAIT = 200;\n this.#resizeTimeoutId = setTimeout(() => {\n this.#resizeTimeoutId = null;\n this.#drawBitmap(width, height);\n }, TIME_TO_WAIT);\n }\n #scaleBitmap(width, height) {\n const {\n width: bitmapWidth,\n height: bitmapHeight\n } = this.#bitmap;\n let newWidth = bitmapWidth;\n let newHeight = bitmapHeight;\n let bitmap = this.#bitmap;\n while (newWidth > 2 * width || newHeight > 2 * height) {\n const prevWidth = newWidth;\n const prevHeight = newHeight;\n if (newWidth > 2 * width) {\n newWidth = newWidth >= 16384 ? Math.floor(newWidth / 2) - 1 : Math.ceil(newWidth / 2);\n }\n if (newHeight > 2 * height) {\n newHeight = newHeight >= 16384 ? Math.floor(newHeight / 2) - 1 : Math.ceil(newHeight / 2);\n }\n const offscreen = new OffscreenCanvas(newWidth, newHeight);\n const ctx = offscreen.getContext(\"2d\");\n ctx.drawImage(bitmap, 0, 0, prevWidth, prevHeight, 0, 0, newWidth, newHeight);\n bitmap = offscreen.transferToImageBitmap();\n }\n return bitmap;\n }\n #drawBitmap(width, height) {\n const outputScale = new OutputScale();\n const scaledWidth = Math.ceil(width * outputScale.sx);\n const scaledHeight = Math.ceil(height * outputScale.sy);\n const canvas = this.#canvas;\n if (!canvas || canvas.width === scaledWidth && canvas.height === scaledHeight) {\n return;\n }\n canvas.width = scaledWidth;\n canvas.height = scaledHeight;\n const bitmap = this.#isSvg ? this.#bitmap : this.#scaleBitmap(scaledWidth, scaledHeight);\n const ctx = canvas.getContext(\"2d\");\n ctx.filter = this._uiManager.hcmFilter;\n ctx.drawImage(bitmap, 0, 0, bitmap.width, bitmap.height, 0, 0, scaledWidth, scaledHeight);\n }\n getImageForAltText() {\n return this.#canvas;\n }\n #serializeBitmap(toUrl) {\n if (toUrl) {\n if (this.#isSvg) {\n const url = this._uiManager.imageManager.getSvgUrl(this.#bitmapId);\n if (url) {\n return url;\n }\n }\n const canvas = document.createElement(\"canvas\");\n ({\n width: canvas.width,\n height: canvas.height\n } = this.#bitmap);\n const ctx = canvas.getContext(\"2d\");\n ctx.drawImage(this.#bitmap, 0, 0);\n return canvas.toDataURL();\n }\n if (this.#isSvg) {\n const [pageWidth, pageHeight] = this.pageDimensions;\n const width = Math.round(this.width * pageWidth * PixelsPerInch.PDF_TO_CSS_UNITS);\n const height = Math.round(this.height * pageHeight * PixelsPerInch.PDF_TO_CSS_UNITS);\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext(\"2d\");\n ctx.drawImage(this.#bitmap, 0, 0, this.#bitmap.width, this.#bitmap.height, 0, 0, width, height);\n return offscreen.transferToImageBitmap();\n }\n return structuredClone(this.#bitmap);\n }\n #createObserver() {\n if (!this._uiManager._signal) {\n return;\n }\n this.#observer = new ResizeObserver(entries => {\n const rect = entries[0].contentRect;\n if (rect.width && rect.height) {\n this.#setDimensions(rect.width, rect.height);\n }\n });\n this.#observer.observe(this.div);\n this._uiManager._signal.addEventListener(\"abort\", () => {\n this.#observer?.disconnect();\n this.#observer = null;\n }, {\n once: true\n });\n }\n static async deserialize(data, parent, uiManager) {\n let initialData = null;\n if (data instanceof StampAnnotationElement) {\n const {\n data: {\n rect,\n rotation,\n id,\n structParent,\n popupRef\n },\n container,\n parent: {\n page: {\n pageNumber\n }\n }\n } = data;\n const canvas = container.querySelector(\"canvas\");\n const imageData = uiManager.imageManager.getFromCanvas(container.id, canvas);\n canvas.remove();\n const altText = (await parent._structTree.getAriaAttributes(`${AnnotationPrefix}${id}`))?.get(\"aria-label\") || \"\";\n initialData = data = {\n annotationType: AnnotationEditorType.STAMP,\n bitmapId: imageData.id,\n bitmap: imageData.bitmap,\n pageIndex: pageNumber - 1,\n rect: rect.slice(0),\n rotation,\n id,\n deleted: false,\n accessibilityData: {\n decorative: false,\n altText\n },\n isSvg: false,\n structParent,\n popupRef\n };\n }\n const editor = await super.deserialize(data, parent, uiManager);\n const {\n rect,\n bitmap,\n bitmapUrl,\n bitmapId,\n isSvg,\n accessibilityData\n } = data;\n if (bitmapId && uiManager.imageManager.isValidId(bitmapId)) {\n editor.#bitmapId = bitmapId;\n if (bitmap) {\n editor.#bitmap = bitmap;\n }\n } else {\n editor.#bitmapUrl = bitmapUrl;\n }\n editor.#isSvg = isSvg;\n const [parentWidth, parentHeight] = editor.pageDimensions;\n editor.width = (rect[2] - rect[0]) / parentWidth;\n editor.height = (rect[3] - rect[1]) / parentHeight;\n editor.annotationElementId = data.id || null;\n if (accessibilityData) {\n editor.altTextData = accessibilityData;\n }\n editor._initialData = initialData;\n editor.#hasBeenAddedInUndoStack = !!initialData;\n return editor;\n }\n serialize(isForCopying = false, context = null) {\n if (this.isEmpty()) {\n return null;\n }\n if (this.deleted) {\n return this.serializeDeleted();\n }\n const serialized = {\n annotationType: AnnotationEditorType.STAMP,\n bitmapId: this.#bitmapId,\n pageIndex: this.pageIndex,\n rect: this.getRect(0, 0),\n rotation: this.rotation,\n isSvg: this.#isSvg,\n structTreeParentId: this._structTreeParentId\n };\n if (isForCopying) {\n serialized.bitmapUrl = this.#serializeBitmap(true);\n serialized.accessibilityData = this.serializeAltText(true);\n return serialized;\n }\n const {\n decorative,\n altText\n } = this.serializeAltText(false);\n if (!decorative && altText) {\n serialized.accessibilityData = {\n type: \"Figure\",\n alt: altText\n };\n }\n if (this.annotationElementId) {\n const changes = this.#hasElementChanged(serialized);\n if (changes.isSame) {\n return null;\n }\n if (changes.isSameAltText) {\n delete serialized.accessibilityData;\n } else {\n serialized.accessibilityData.structParent = this._initialData.structParent ?? -1;\n }\n }\n serialized.id = this.annotationElementId;\n if (context === null) {\n return serialized;\n }\n context.stamps ||= new Map();\n const area = this.#isSvg ? (serialized.rect[2] - serialized.rect[0]) * (serialized.rect[3] - serialized.rect[1]) : null;\n if (!context.stamps.has(this.#bitmapId)) {\n context.stamps.set(this.#bitmapId, {\n area,\n serialized\n });\n serialized.bitmap = this.#serializeBitmap(false);\n } else if (this.#isSvg) {\n const prevData = context.stamps.get(this.#bitmapId);\n if (area > prevData.area) {\n prevData.area = area;\n prevData.serialized.bitmap.close();\n prevData.serialized.bitmap = this.#serializeBitmap(false);\n }\n }\n return serialized;\n }\n #hasElementChanged(serialized) {\n const {\n rect,\n pageIndex,\n accessibilityData: {\n altText\n }\n } = this._initialData;\n const isSameRect = serialized.rect.every((x, i) => Math.abs(x - rect[i]) < 1);\n const isSamePageIndex = serialized.pageIndex === pageIndex;\n const isSameAltText = (serialized.accessibilityData?.alt || \"\") === altText;\n return {\n isSame: isSameRect && isSamePageIndex && isSameAltText,\n isSameAltText\n };\n }\n renderAnnotationElement(annotation) {\n annotation.updateEdited({\n rect: this.getRect(0, 0)\n });\n return null;\n }\n}\n\n;// ./src/display/editor/annotation_editor_layer.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass AnnotationEditorLayer {\n #accessibilityManager;\n #allowClick = false;\n #annotationLayer = null;\n #clickAC = null;\n #editorFocusTimeoutId = null;\n #editors = new Map();\n #hadPointerDown = false;\n #isCleaningUp = false;\n #isDisabling = false;\n #textLayer = null;\n #textSelectionAC = null;\n #uiManager;\n static _initialized = false;\n static #editorTypes = new Map([FreeTextEditor, InkEditor, StampEditor, HighlightEditor].map(type => [type._editorType, type]));\n constructor({\n uiManager,\n pageIndex,\n div,\n structTreeLayer,\n accessibilityManager,\n annotationLayer,\n drawLayer,\n textLayer,\n viewport,\n l10n\n }) {\n const editorTypes = [...AnnotationEditorLayer.#editorTypes.values()];\n if (!AnnotationEditorLayer._initialized) {\n AnnotationEditorLayer._initialized = true;\n for (const editorType of editorTypes) {\n editorType.initialize(l10n, uiManager);\n }\n }\n uiManager.registerEditorTypes(editorTypes);\n this.#uiManager = uiManager;\n this.pageIndex = pageIndex;\n this.div = div;\n this.#accessibilityManager = accessibilityManager;\n this.#annotationLayer = annotationLayer;\n this.viewport = viewport;\n this.#textLayer = textLayer;\n this.drawLayer = drawLayer;\n this._structTree = structTreeLayer;\n this.#uiManager.addLayer(this);\n }\n get isEmpty() {\n return this.#editors.size === 0;\n }\n get isInvisible() {\n return this.isEmpty && this.#uiManager.getMode() === AnnotationEditorType.NONE;\n }\n updateToolbar(mode) {\n this.#uiManager.updateToolbar(mode);\n }\n updateMode(mode = this.#uiManager.getMode()) {\n this.#cleanup();\n switch (mode) {\n case AnnotationEditorType.NONE:\n this.disableTextSelection();\n this.togglePointerEvents(false);\n this.toggleAnnotationLayerPointerEvents(true);\n this.disableClick();\n return;\n case AnnotationEditorType.INK:\n this.addInkEditorIfNeeded(false);\n this.disableTextSelection();\n this.togglePointerEvents(true);\n this.disableClick();\n break;\n case AnnotationEditorType.HIGHLIGHT:\n this.enableTextSelection();\n this.togglePointerEvents(false);\n this.disableClick();\n break;\n default:\n this.disableTextSelection();\n this.togglePointerEvents(true);\n this.enableClick();\n }\n this.toggleAnnotationLayerPointerEvents(false);\n const {\n classList\n } = this.div;\n for (const editorType of AnnotationEditorLayer.#editorTypes.values()) {\n classList.toggle(`${editorType._type}Editing`, mode === editorType._editorType);\n }\n this.div.hidden = false;\n }\n hasTextLayer(textLayer) {\n return textLayer === this.#textLayer?.div;\n }\n addInkEditorIfNeeded(isCommitting) {\n if (this.#uiManager.getMode() !== AnnotationEditorType.INK) {\n return;\n }\n if (!isCommitting) {\n for (const editor of this.#editors.values()) {\n if (editor.isEmpty()) {\n editor.setInBackground();\n return;\n }\n }\n }\n const editor = this.createAndAddNewEditor({\n offsetX: 0,\n offsetY: 0\n }, false);\n editor.setInBackground();\n }\n setEditingState(isEditing) {\n this.#uiManager.setEditingState(isEditing);\n }\n addCommands(params) {\n this.#uiManager.addCommands(params);\n }\n toggleDrawing(enabled = false) {\n this.div.classList.toggle(\"drawing\", !enabled);\n }\n togglePointerEvents(enabled = false) {\n this.div.classList.toggle(\"disabled\", !enabled);\n }\n toggleAnnotationLayerPointerEvents(enabled = false) {\n this.#annotationLayer?.div.classList.toggle(\"disabled\", !enabled);\n }\n async enable() {\n this.div.tabIndex = 0;\n this.togglePointerEvents(true);\n const annotationElementIds = new Set();\n for (const editor of this.#editors.values()) {\n editor.enableEditing();\n editor.show(true);\n if (editor.annotationElementId) {\n this.#uiManager.removeChangedExistingAnnotation(editor);\n annotationElementIds.add(editor.annotationElementId);\n }\n }\n if (!this.#annotationLayer) {\n return;\n }\n const editables = this.#annotationLayer.getEditableAnnotations();\n for (const editable of editables) {\n editable.hide();\n if (this.#uiManager.isDeletedAnnotationElement(editable.data.id)) {\n continue;\n }\n if (annotationElementIds.has(editable.data.id)) {\n continue;\n }\n const editor = await this.deserialize(editable);\n if (!editor) {\n continue;\n }\n this.addOrRebuild(editor);\n editor.enableEditing();\n }\n }\n disable() {\n this.#isDisabling = true;\n this.div.tabIndex = -1;\n this.togglePointerEvents(false);\n const changedAnnotations = new Map();\n const resetAnnotations = new Map();\n for (const editor of this.#editors.values()) {\n editor.disableEditing();\n if (!editor.annotationElementId) {\n continue;\n }\n if (editor.serialize() !== null) {\n changedAnnotations.set(editor.annotationElementId, editor);\n continue;\n } else {\n resetAnnotations.set(editor.annotationElementId, editor);\n }\n this.getEditableAnnotation(editor.annotationElementId)?.show();\n editor.remove();\n }\n if (this.#annotationLayer) {\n const editables = this.#annotationLayer.getEditableAnnotations();\n for (const editable of editables) {\n const {\n id\n } = editable.data;\n if (this.#uiManager.isDeletedAnnotationElement(id)) {\n continue;\n }\n let editor = resetAnnotations.get(id);\n if (editor) {\n editor.resetAnnotationElement(editable);\n editor.show(false);\n editable.show();\n continue;\n }\n editor = changedAnnotations.get(id);\n if (editor) {\n this.#uiManager.addChangedExistingAnnotation(editor);\n if (editor.renderAnnotationElement(editable)) {\n editor.show(false);\n }\n }\n editable.show();\n }\n }\n this.#cleanup();\n if (this.isEmpty) {\n this.div.hidden = true;\n }\n const {\n classList\n } = this.div;\n for (const editorType of AnnotationEditorLayer.#editorTypes.values()) {\n classList.remove(`${editorType._type}Editing`);\n }\n this.disableTextSelection();\n this.toggleAnnotationLayerPointerEvents(true);\n this.#isDisabling = false;\n }\n getEditableAnnotation(id) {\n return this.#annotationLayer?.getEditableAnnotation(id) || null;\n }\n setActiveEditor(editor) {\n const currentActive = this.#uiManager.getActive();\n if (currentActive === editor) {\n return;\n }\n this.#uiManager.setActiveEditor(editor);\n }\n enableTextSelection() {\n this.div.tabIndex = -1;\n if (this.#textLayer?.div && !this.#textSelectionAC) {\n this.#textSelectionAC = new AbortController();\n const signal = this.#uiManager.combinedSignal(this.#textSelectionAC);\n this.#textLayer.div.addEventListener(\"pointerdown\", this.#textLayerPointerDown.bind(this), {\n signal\n });\n this.#textLayer.div.classList.add(\"highlighting\");\n }\n }\n disableTextSelection() {\n this.div.tabIndex = 0;\n if (this.#textLayer?.div && this.#textSelectionAC) {\n this.#textSelectionAC.abort();\n this.#textSelectionAC = null;\n this.#textLayer.div.classList.remove(\"highlighting\");\n }\n }\n #textLayerPointerDown(event) {\n this.#uiManager.unselectAll();\n const {\n target\n } = event;\n if (target === this.#textLayer.div || (target.getAttribute(\"role\") === \"img\" || target.classList.contains(\"endOfContent\")) && this.#textLayer.div.contains(target)) {\n const {\n isMac\n } = util_FeatureTest.platform;\n if (event.button !== 0 || event.ctrlKey && isMac) {\n return;\n }\n this.#uiManager.showAllEditors(\"highlight\", true, true);\n this.#textLayer.div.classList.add(\"free\");\n this.toggleDrawing();\n HighlightEditor.startHighlighting(this, this.#uiManager.direction === \"ltr\", {\n target: this.#textLayer.div,\n x: event.x,\n y: event.y\n });\n this.#textLayer.div.addEventListener(\"pointerup\", () => {\n this.#textLayer.div.classList.remove(\"free\");\n this.toggleDrawing(true);\n }, {\n once: true,\n signal: this.#uiManager._signal\n });\n event.preventDefault();\n }\n }\n enableClick() {\n if (this.#clickAC) {\n return;\n }\n this.#clickAC = new AbortController();\n const signal = this.#uiManager.combinedSignal(this.#clickAC);\n this.div.addEventListener(\"pointerdown\", this.pointerdown.bind(this), {\n signal\n });\n this.div.addEventListener(\"pointerup\", this.pointerup.bind(this), {\n signal\n });\n }\n disableClick() {\n this.#clickAC?.abort();\n this.#clickAC = null;\n }\n attach(editor) {\n this.#editors.set(editor.id, editor);\n const {\n annotationElementId\n } = editor;\n if (annotationElementId && this.#uiManager.isDeletedAnnotationElement(annotationElementId)) {\n this.#uiManager.removeDeletedAnnotationElement(editor);\n }\n }\n detach(editor) {\n this.#editors.delete(editor.id);\n this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);\n if (!this.#isDisabling && editor.annotationElementId) {\n this.#uiManager.addDeletedAnnotationElement(editor);\n }\n }\n remove(editor) {\n this.detach(editor);\n this.#uiManager.removeEditor(editor);\n editor.div.remove();\n editor.isAttachedToDOM = false;\n if (!this.#isCleaningUp) {\n this.addInkEditorIfNeeded(false);\n }\n }\n changeParent(editor) {\n if (editor.parent === this) {\n return;\n }\n if (editor.parent && editor.annotationElementId) {\n this.#uiManager.addDeletedAnnotationElement(editor.annotationElementId);\n AnnotationEditor.deleteAnnotationElement(editor);\n editor.annotationElementId = null;\n }\n this.attach(editor);\n editor.parent?.detach(editor);\n editor.setParent(this);\n if (editor.div && editor.isAttachedToDOM) {\n editor.div.remove();\n this.div.append(editor.div);\n }\n }\n add(editor) {\n if (editor.parent === this && editor.isAttachedToDOM) {\n return;\n }\n this.changeParent(editor);\n this.#uiManager.addEditor(editor);\n this.attach(editor);\n if (!editor.isAttachedToDOM) {\n const div = editor.render();\n this.div.append(div);\n editor.isAttachedToDOM = true;\n }\n editor.fixAndSetPosition();\n editor.onceAdded();\n this.#uiManager.addToAnnotationStorage(editor);\n editor._reportTelemetry(editor.telemetryInitialData);\n }\n moveEditorInDOM(editor) {\n if (!editor.isAttachedToDOM) {\n return;\n }\n const {\n activeElement\n } = document;\n if (editor.div.contains(activeElement) && !this.#editorFocusTimeoutId) {\n editor._focusEventsAllowed = false;\n this.#editorFocusTimeoutId = setTimeout(() => {\n this.#editorFocusTimeoutId = null;\n if (!editor.div.contains(document.activeElement)) {\n editor.div.addEventListener(\"focusin\", () => {\n editor._focusEventsAllowed = true;\n }, {\n once: true,\n signal: this.#uiManager._signal\n });\n activeElement.focus();\n } else {\n editor._focusEventsAllowed = true;\n }\n }, 0);\n }\n editor._structTreeParentId = this.#accessibilityManager?.moveElementInDOM(this.div, editor.div, editor.contentDiv, true);\n }\n addOrRebuild(editor) {\n if (editor.needsToBeRebuilt()) {\n editor.parent ||= this;\n editor.rebuild();\n editor.show();\n } else {\n this.add(editor);\n }\n }\n addUndoableEditor(editor) {\n const cmd = () => editor._uiManager.rebuild(editor);\n const undo = () => {\n editor.remove();\n };\n this.addCommands({\n cmd,\n undo,\n mustExec: false\n });\n }\n getNextId() {\n return this.#uiManager.getId();\n }\n get #currentEditorType() {\n return AnnotationEditorLayer.#editorTypes.get(this.#uiManager.getMode());\n }\n combinedSignal(ac) {\n return this.#uiManager.combinedSignal(ac);\n }\n #createNewEditor(params) {\n const editorType = this.#currentEditorType;\n return editorType ? new editorType.prototype.constructor(params) : null;\n }\n canCreateNewEmptyEditor() {\n return this.#currentEditorType?.canCreateNewEmptyEditor();\n }\n pasteEditor(mode, params) {\n this.#uiManager.updateToolbar(mode);\n this.#uiManager.updateMode(mode);\n const {\n offsetX,\n offsetY\n } = this.#getCenterPoint();\n const id = this.getNextId();\n const editor = this.#createNewEditor({\n parent: this,\n id,\n x: offsetX,\n y: offsetY,\n uiManager: this.#uiManager,\n isCentered: true,\n ...params\n });\n if (editor) {\n this.add(editor);\n }\n }\n async deserialize(data) {\n return (await AnnotationEditorLayer.#editorTypes.get(data.annotationType ?? data.annotationEditorType)?.deserialize(data, this, this.#uiManager)) || null;\n }\n createAndAddNewEditor(event, isCentered, data = {}) {\n const id = this.getNextId();\n const editor = this.#createNewEditor({\n parent: this,\n id,\n x: event.offsetX,\n y: event.offsetY,\n uiManager: this.#uiManager,\n isCentered,\n ...data\n });\n if (editor) {\n this.add(editor);\n }\n return editor;\n }\n #getCenterPoint() {\n const {\n x,\n y,\n width,\n height\n } = this.div.getBoundingClientRect();\n const tlX = Math.max(0, x);\n const tlY = Math.max(0, y);\n const brX = Math.min(window.innerWidth, x + width);\n const brY = Math.min(window.innerHeight, y + height);\n const centerX = (tlX + brX) / 2 - x;\n const centerY = (tlY + brY) / 2 - y;\n const [offsetX, offsetY] = this.viewport.rotation % 180 === 0 ? [centerX, centerY] : [centerY, centerX];\n return {\n offsetX,\n offsetY\n };\n }\n addNewEditor() {\n this.createAndAddNewEditor(this.#getCenterPoint(), true);\n }\n setSelected(editor) {\n this.#uiManager.setSelected(editor);\n }\n toggleSelected(editor) {\n this.#uiManager.toggleSelected(editor);\n }\n isSelected(editor) {\n return this.#uiManager.isSelected(editor);\n }\n unselect(editor) {\n this.#uiManager.unselect(editor);\n }\n pointerup(event) {\n const {\n isMac\n } = util_FeatureTest.platform;\n if (event.button !== 0 || event.ctrlKey && isMac) {\n return;\n }\n if (event.target !== this.div) {\n return;\n }\n if (!this.#hadPointerDown) {\n return;\n }\n this.#hadPointerDown = false;\n if (!this.#allowClick) {\n this.#allowClick = true;\n return;\n }\n if (this.#uiManager.getMode() === AnnotationEditorType.STAMP) {\n this.#uiManager.unselectAll();\n return;\n }\n this.createAndAddNewEditor(event, false);\n }\n pointerdown(event) {\n if (this.#uiManager.getMode() === AnnotationEditorType.HIGHLIGHT) {\n this.enableTextSelection();\n }\n if (this.#hadPointerDown) {\n this.#hadPointerDown = false;\n return;\n }\n const {\n isMac\n } = util_FeatureTest.platform;\n if (event.button !== 0 || event.ctrlKey && isMac) {\n return;\n }\n if (event.target !== this.div) {\n return;\n }\n this.#hadPointerDown = true;\n const editor = this.#uiManager.getActive();\n this.#allowClick = !editor || editor.isEmpty();\n }\n findNewParent(editor, x, y) {\n const layer = this.#uiManager.findParent(x, y);\n if (layer === null || layer === this) {\n return false;\n }\n layer.changeParent(editor);\n return true;\n }\n destroy() {\n if (this.#uiManager.getActive()?.parent === this) {\n this.#uiManager.commitOrRemove();\n this.#uiManager.setActiveEditor(null);\n }\n if (this.#editorFocusTimeoutId) {\n clearTimeout(this.#editorFocusTimeoutId);\n this.#editorFocusTimeoutId = null;\n }\n for (const editor of this.#editors.values()) {\n this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);\n editor.setParent(null);\n editor.isAttachedToDOM = false;\n editor.div.remove();\n }\n this.div = null;\n this.#editors.clear();\n this.#uiManager.removeLayer(this);\n }\n #cleanup() {\n this.#isCleaningUp = true;\n for (const editor of this.#editors.values()) {\n if (editor.isEmpty()) {\n editor.remove();\n }\n }\n this.#isCleaningUp = false;\n }\n render({\n viewport\n }) {\n this.viewport = viewport;\n setLayerDimensions(this.div, viewport);\n for (const editor of this.#uiManager.getEditors(this.pageIndex)) {\n this.add(editor);\n editor.rebuild();\n }\n this.updateMode();\n }\n update({\n viewport\n }) {\n this.#uiManager.commitOrRemove();\n this.#cleanup();\n const oldRotation = this.viewport.rotation;\n const rotation = viewport.rotation;\n this.viewport = viewport;\n setLayerDimensions(this.div, {\n rotation\n });\n if (oldRotation !== rotation) {\n for (const editor of this.#editors.values()) {\n editor.rotate(rotation);\n }\n }\n this.addInkEditorIfNeeded(false);\n }\n get pageDimensions() {\n const {\n pageWidth,\n pageHeight\n } = this.viewport.rawDims;\n return [pageWidth, pageHeight];\n }\n get scale() {\n return this.#uiManager.viewParameters.realScale;\n }\n}\n\n;// ./src/display/draw_layer.js\n\n\nclass DrawLayer {\n #parent = null;\n #id = 0;\n #mapping = new Map();\n #toUpdate = new Map();\n constructor({\n pageIndex\n }) {\n this.pageIndex = pageIndex;\n }\n setParent(parent) {\n if (!this.#parent) {\n this.#parent = parent;\n return;\n }\n if (this.#parent !== parent) {\n if (this.#mapping.size > 0) {\n for (const root of this.#mapping.values()) {\n root.remove();\n parent.append(root);\n }\n }\n this.#parent = parent;\n }\n }\n static get _svgFactory() {\n return shadow(this, \"_svgFactory\", new DOMSVGFactory());\n }\n static #setBox(element, {\n x = 0,\n y = 0,\n width = 1,\n height = 1\n } = {}) {\n const {\n style\n } = element;\n style.top = `${100 * y}%`;\n style.left = `${100 * x}%`;\n style.width = `${100 * width}%`;\n style.height = `${100 * height}%`;\n }\n #createSVG(box) {\n const svg = DrawLayer._svgFactory.create(1, 1, true);\n this.#parent.append(svg);\n svg.setAttribute(\"aria-hidden\", true);\n DrawLayer.#setBox(svg, box);\n return svg;\n }\n #createClipPath(defs, pathId) {\n const clipPath = DrawLayer._svgFactory.createElement(\"clipPath\");\n defs.append(clipPath);\n const clipPathId = `clip_${pathId}`;\n clipPath.setAttribute(\"id\", clipPathId);\n clipPath.setAttribute(\"clipPathUnits\", \"objectBoundingBox\");\n const clipPathUse = DrawLayer._svgFactory.createElement(\"use\");\n clipPath.append(clipPathUse);\n clipPathUse.setAttribute(\"href\", `#${pathId}`);\n clipPathUse.classList.add(\"clip\");\n return clipPathId;\n }\n highlight(outlines, color, opacity, isPathUpdatable = false) {\n const id = this.#id++;\n const root = this.#createSVG(outlines.box);\n root.classList.add(\"highlight\");\n if (outlines.free) {\n root.classList.add(\"free\");\n }\n const defs = DrawLayer._svgFactory.createElement(\"defs\");\n root.append(defs);\n const path = DrawLayer._svgFactory.createElement(\"path\");\n defs.append(path);\n const pathId = `path_p${this.pageIndex}_${id}`;\n path.setAttribute(\"id\", pathId);\n path.setAttribute(\"d\", outlines.toSVGPath());\n if (isPathUpdatable) {\n this.#toUpdate.set(id, path);\n }\n const clipPathId = this.#createClipPath(defs, pathId);\n const use = DrawLayer._svgFactory.createElement(\"use\");\n root.append(use);\n root.setAttribute(\"fill\", color);\n root.setAttribute(\"fill-opacity\", opacity);\n use.setAttribute(\"href\", `#${pathId}`);\n this.#mapping.set(id, root);\n return {\n id,\n clipPathId: `url(#${clipPathId})`\n };\n }\n highlightOutline(outlines) {\n const id = this.#id++;\n const root = this.#createSVG(outlines.box);\n root.classList.add(\"highlightOutline\");\n const defs = DrawLayer._svgFactory.createElement(\"defs\");\n root.append(defs);\n const path = DrawLayer._svgFactory.createElement(\"path\");\n defs.append(path);\n const pathId = `path_p${this.pageIndex}_${id}`;\n path.setAttribute(\"id\", pathId);\n path.setAttribute(\"d\", outlines.toSVGPath());\n path.setAttribute(\"vector-effect\", \"non-scaling-stroke\");\n let maskId;\n if (outlines.free) {\n root.classList.add(\"free\");\n const mask = DrawLayer._svgFactory.createElement(\"mask\");\n defs.append(mask);\n maskId = `mask_p${this.pageIndex}_${id}`;\n mask.setAttribute(\"id\", maskId);\n mask.setAttribute(\"maskUnits\", \"objectBoundingBox\");\n const rect = DrawLayer._svgFactory.createElement(\"rect\");\n mask.append(rect);\n rect.setAttribute(\"width\", \"1\");\n rect.setAttribute(\"height\", \"1\");\n rect.setAttribute(\"fill\", \"white\");\n const use = DrawLayer._svgFactory.createElement(\"use\");\n mask.append(use);\n use.setAttribute(\"href\", `#${pathId}`);\n use.setAttribute(\"stroke\", \"none\");\n use.setAttribute(\"fill\", \"black\");\n use.setAttribute(\"fill-rule\", \"nonzero\");\n use.classList.add(\"mask\");\n }\n const use1 = DrawLayer._svgFactory.createElement(\"use\");\n root.append(use1);\n use1.setAttribute(\"href\", `#${pathId}`);\n if (maskId) {\n use1.setAttribute(\"mask\", `url(#${maskId})`);\n }\n const use2 = use1.cloneNode();\n root.append(use2);\n use1.classList.add(\"mainOutline\");\n use2.classList.add(\"secondaryOutline\");\n this.#mapping.set(id, root);\n return id;\n }\n finalizeLine(id, line) {\n const path = this.#toUpdate.get(id);\n this.#toUpdate.delete(id);\n this.updateBox(id, line.box);\n path.setAttribute(\"d\", line.toSVGPath());\n }\n updateLine(id, line) {\n const root = this.#mapping.get(id);\n const defs = root.firstChild;\n const path = defs.firstChild;\n path.setAttribute(\"d\", line.toSVGPath());\n }\n removeFreeHighlight(id) {\n this.remove(id);\n this.#toUpdate.delete(id);\n }\n updatePath(id, line) {\n this.#toUpdate.get(id).setAttribute(\"d\", line.toSVGPath());\n }\n updateBox(id, box) {\n DrawLayer.#setBox(this.#mapping.get(id), box);\n }\n show(id, visible) {\n this.#mapping.get(id).classList.toggle(\"hidden\", !visible);\n }\n rotate(id, angle) {\n this.#mapping.get(id).setAttribute(\"data-main-rotation\", angle);\n }\n changeColor(id, color) {\n this.#mapping.get(id).setAttribute(\"fill\", color);\n }\n changeOpacity(id, opacity) {\n this.#mapping.get(id).setAttribute(\"fill-opacity\", opacity);\n }\n addClass(id, className) {\n this.#mapping.get(id).classList.add(className);\n }\n removeClass(id, className) {\n this.#mapping.get(id).classList.remove(className);\n }\n getSVGRoot(id) {\n return this.#mapping.get(id);\n }\n remove(id) {\n if (this.#parent === null) {\n return;\n }\n this.#mapping.get(id).remove();\n this.#mapping.delete(id);\n }\n destroy() {\n this.#parent = null;\n for (const root of this.#mapping.values()) {\n root.remove();\n }\n this.#mapping.clear();\n }\n}\n\n;// ./src/pdf.js\n\n\n\n\n\n\n\n\n\n\n\n\nconst pdfjsVersion = \"4.7.76\";\nconst pdfjsBuild = \"8b73b828b\";\n\nvar __webpack_exports__AbortException = __webpack_exports__.AbortException;\nvar __webpack_exports__AnnotationEditorLayer = __webpack_exports__.AnnotationEditorLayer;\nvar __webpack_exports__AnnotationEditorParamsType = __webpack_exports__.AnnotationEditorParamsType;\nvar __webpack_exports__AnnotationEditorType = __webpack_exports__.AnnotationEditorType;\nvar __webpack_exports__AnnotationEditorUIManager = __webpack_exports__.AnnotationEditorUIManager;\nvar __webpack_exports__AnnotationLayer = __webpack_exports__.AnnotationLayer;\nvar __webpack_exports__AnnotationMode = __webpack_exports__.AnnotationMode;\nvar __webpack_exports__CMapCompressionType = __webpack_exports__.CMapCompressionType;\nvar __webpack_exports__ColorPicker = __webpack_exports__.ColorPicker;\nvar __webpack_exports__DOMSVGFactory = __webpack_exports__.DOMSVGFactory;\nvar __webpack_exports__DrawLayer = __webpack_exports__.DrawLayer;\nvar __webpack_exports__FeatureTest = __webpack_exports__.FeatureTest;\nvar __webpack_exports__GlobalWorkerOptions = __webpack_exports__.GlobalWorkerOptions;\nvar __webpack_exports__ImageKind = __webpack_exports__.ImageKind;\nvar __webpack_exports__InvalidPDFException = __webpack_exports__.InvalidPDFException;\nvar __webpack_exports__MissingPDFException = __webpack_exports__.MissingPDFException;\nvar __webpack_exports__OPS = __webpack_exports__.OPS;\nvar __webpack_exports__OutputScale = __webpack_exports__.OutputScale;\nvar __webpack_exports__PDFDataRangeTransport = __webpack_exports__.PDFDataRangeTransport;\nvar __webpack_exports__PDFDateString = __webpack_exports__.PDFDateString;\nvar __webpack_exports__PDFWorker = __webpack_exports__.PDFWorker;\nvar __webpack_exports__PasswordResponses = __webpack_exports__.PasswordResponses;\nvar __webpack_exports__PermissionFlag = __webpack_exports__.PermissionFlag;\nvar __webpack_exports__PixelsPerInch = __webpack_exports__.PixelsPerInch;\nvar __webpack_exports__RenderingCancelledException = __webpack_exports__.RenderingCancelledException;\nvar __webpack_exports__TextLayer = __webpack_exports__.TextLayer;\nvar __webpack_exports__UnexpectedResponseException = __webpack_exports__.UnexpectedResponseException;\nvar __webpack_exports__Util = __webpack_exports__.Util;\nvar __webpack_exports__VerbosityLevel = __webpack_exports__.VerbosityLevel;\nvar __webpack_exports__XfaLayer = __webpack_exports__.XfaLayer;\nvar __webpack_exports__build = __webpack_exports__.build;\nvar __webpack_exports__createValidAbsoluteUrl = __webpack_exports__.createValidAbsoluteUrl;\nvar __webpack_exports__fetchData = __webpack_exports__.fetchData;\nvar __webpack_exports__getDocument = __webpack_exports__.getDocument;\nvar __webpack_exports__getFilenameFromUrl = __webpack_exports__.getFilenameFromUrl;\nvar __webpack_exports__getPdfFilenameFromUrl = __webpack_exports__.getPdfFilenameFromUrl;\nvar __webpack_exports__getXfaPageViewport = __webpack_exports__.getXfaPageViewport;\nvar __webpack_exports__isDataScheme = __webpack_exports__.isDataScheme;\nvar __webpack_exports__isPdfFile = __webpack_exports__.isPdfFile;\nvar __webpack_exports__noContextMenu = __webpack_exports__.noContextMenu;\nvar __webpack_exports__normalizeUnicode = __webpack_exports__.normalizeUnicode;\nvar __webpack_exports__setLayerDimensions = __webpack_exports__.setLayerDimensions;\nvar __webpack_exports__shadow = __webpack_exports__.shadow;\nvar __webpack_exports__version = __webpack_exports__.version;\nexport { __webpack_exports__AbortException as AbortException, __webpack_exports__AnnotationEditorLayer as AnnotationEditorLayer, __webpack_exports__AnnotationEditorParamsType as AnnotationEditorParamsType, __webpack_exports__AnnotationEditorType as AnnotationEditorType, __webpack_exports__AnnotationEditorUIManager as AnnotationEditorUIManager, __webpack_exports__AnnotationLayer as AnnotationLayer, __webpack_exports__AnnotationMode as AnnotationMode, __webpack_exports__CMapCompressionType as CMapCompressionType, __webpack_exports__ColorPicker as ColorPicker, __webpack_exports__DOMSVGFactory as DOMSVGFactory, __webpack_exports__DrawLayer as DrawLayer, __webpack_exports__FeatureTest as FeatureTest, __webpack_exports__GlobalWorkerOptions as GlobalWorkerOptions, __webpack_exports__ImageKind as ImageKind, __webpack_exports__InvalidPDFException as InvalidPDFException, __webpack_exports__MissingPDFException as MissingPDFException, __webpack_exports__OPS as OPS, __webpack_exports__OutputScale as OutputScale, __webpack_exports__PDFDataRangeTransport as PDFDataRangeTransport, __webpack_exports__PDFDateString as PDFDateString, __webpack_exports__PDFWorker as PDFWorker, __webpack_exports__PasswordResponses as PasswordResponses, __webpack_exports__PermissionFlag as PermissionFlag, __webpack_exports__PixelsPerInch as PixelsPerInch, __webpack_exports__RenderingCancelledException as RenderingCancelledException, __webpack_exports__TextLayer as TextLayer, __webpack_exports__UnexpectedResponseException as UnexpectedResponseException, __webpack_exports__Util as Util, __webpack_exports__VerbosityLevel as VerbosityLevel, __webpack_exports__XfaLayer as XfaLayer, __webpack_exports__build as build, __webpack_exports__createValidAbsoluteUrl as createValidAbsoluteUrl, __webpack_exports__fetchData as fetchData, __webpack_exports__getDocument as getDocument, __webpack_exports__getFilenameFromUrl as getFilenameFromUrl, __webpack_exports__getPdfFilenameFromUrl as getPdfFilenameFromUrl, __webpack_exports__getXfaPageViewport as getXfaPageViewport, __webpack_exports__isDataScheme as isDataScheme, __webpack_exports__isPdfFile as isPdfFile, __webpack_exports__noContextMenu as noContextMenu, __webpack_exports__normalizeUnicode as normalizeUnicode, __webpack_exports__setLayerDimensions as setLayerDimensions, __webpack_exports__shadow as shadow, __webpack_exports__version as version };\n\n//# sourceMappingURL=pdf.mjs.map","\r\n\r\n\r\n","import { SupportedLanguages } from '@core/classes/Customer/CustomerPersonalInfo';\r\n\r\nexport default class EnumHelper {\r\n public enumList: ToListItems[];\r\n\r\n constructor(toListItems: ToListItems[]) {\r\n this.enumList = toListItems;\r\n }\r\n\r\n public getDisplay = (item: T, language: SupportedLanguages = 'English'): string => {\r\n const listItem = this.enumList.find(f => f.value === item) as ToListItems | undefined;\r\n return listItem?.localizedDisplay?.[language] ?? listItem?.display ?? '';\r\n };\r\n\r\n public getToListItemDisplay = (toListItem: ToListItems, language: SupportedLanguages = 'English'): string => getToListItemDisplay(toListItem, language);\r\n\r\n public getToListItemValue = (toListItem: ToListItems) => getToListItemValue(toListItem);\r\n}\r\n\r\nexport interface ToListItems {\r\n display: string;\r\n value: T;\r\n [key: string]: any;\r\n localizedDisplay?: { [key in SupportedLanguages]?: string };\r\n}\r\n\r\nexport function getToListItemDisplay(toListItem: ToListItems, language: SupportedLanguages = 'English'): string {\r\n return toListItem.localizedDisplay?.[language] ?? toListItem.display ?? '';\r\n}\r\n\r\nexport function getToListItemValue(toListItem: ToListItems): T {\r\n return toListItem.value;\r\n}\r\n\r\n/** Contains helper methods for performing basic operations on bit flags */\r\nexport abstract class BitFlagHelper {\r\n static addFlag(baseFlag: number, valueToAdd: number): number {\r\n return baseFlag | valueToAdd;\r\n }\r\n\r\n static removeFlag(baseFlag: number, valueToRemove: number): number {\r\n return baseFlag & (~valueToRemove);\r\n }\r\n\r\n /** Returns true if all flags enabled in the `valueToCheck` are enabled in the `baseFlag`. */\r\n static contains(baseFlag: number, valueToCheck: number): boolean {\r\n return (baseFlag & valueToCheck) === valueToCheck;\r\n }\r\n\r\n /** Returns true if any of the flags enabled in the `valueToCheck` are enabled in the `baseFlag` */\r\n static containsSome(baseFlag: number, valueToCheck: number): boolean {\r\n return (baseFlag & valueToCheck) > 0;\r\n }\r\n\r\n /** Returns flags that are enabled in the `baseFlag` that are not enabled in the `comparisonFlag`. */\r\n static getMissingFlags(baseFlag: number, comparisonFlag: number): number {\r\n let missing = 0;\r\n for (let i = 1; i <= baseFlag; i = i << 1) {\r\n if ((baseFlag & i) !== 0 && (comparisonFlag & i) === 0)\r\n missing += i;\r\n }\r\n\r\n return missing;\r\n }\r\n\r\n /** Given two flag values, returns values that are enabled in both flags. */\r\n static getIntersection(enumType: E, flagA: E[keyof E], flagB: E[keyof E]): number {\r\n if (typeof(flagA) !== 'number' || typeof(flagB) !== 'number')\r\n throw new Error('Unable to process the given flag values.');\r\n\r\n const maxValue = this._getMaxEnumValue(enumType);\r\n\r\n let intersection = 0;\r\n for (let i = 1; i <= maxValue; i = i << 1) {\r\n if((flagA & i) !== 0 && (flagB & i) !== 0)\r\n intersection += i;\r\n }\r\n\r\n return intersection;\r\n }\r\n\r\n /** Returns true if the two flag values share any values in common. */\r\n static hasIntersection(enumType: E, flagA: E[keyof E], flagB: E[keyof E]): boolean {\r\n return this.getIntersection(enumType, flagA, flagB) !== 0;\r\n }\r\n\r\n /** Takes a flag value and splits it into a list of all enabled flag enum values. */\r\n static toArray(enumType: E, flagValue: E[keyof E]): number[] {\r\n if (typeof(flagValue) !== 'number')\r\n throw new Error('Unable to convert this flag value.');\r\n\r\n const maxValue = this._getMaxEnumValue(enumType);\r\n\r\n const array = [];\r\n for (let i = 1; i <= maxValue; i = i << 1) {\r\n if ((flagValue & i) !== 0)\r\n array.push(i);\r\n }\r\n\r\n return array;\r\n }\r\n\r\n /** Similar to the `toArray()` method, but returns a list of the flag's string keys instead of its values. */\r\n static toKeyArray(enumType: E, flagValue: E[keyof E]): string[] {\r\n const valueList = this.toArray(enumType, flagValue);\r\n return valueList.map(v => enumType[v].toString());\r\n }\r\n\r\n /** Takes a list of individual enum flag values and combines them together in a bitwise OR operation. */\r\n static toFlag(flagValues: number[]): number {\r\n let flag = 0;\r\n flagValues.forEach(f => flag |= f);\r\n return flag;\r\n }\r\n\r\n private static _getMaxEnumValue(enumType: E): number {\r\n let maxValue = 0;\r\n Object.values(enumType).forEach(v => {\r\n const vNum = Number(v);\r\n if (!Number.isNaN(vNum) && vNum > maxValue)\r\n maxValue = vNum;\r\n });\r\n\r\n return maxValue;\r\n }\r\n}","import { CamelKeysToPascalDeep } from '@core/classes/UtilClasses';\r\nimport { UserProvideMappingType } from './SharedEnums';\r\nimport UserProviderMappings from '@core/classes/UserProviderMappings';\r\nimport util from '@core/services/util';\r\n\r\n// Mirrors AccessEmployeeClass.cs\r\nexport class AccessEmployeeClass {\r\n id: string;\r\n employeeUser?: string;\r\n employeeCode?: string;\r\n employeeLogin?: string;\r\n employeePassword?: string;\r\n employeeFirstName?: string; \r\n employeeLastName?: string; \r\n employeeEmail?: string; \r\n employeeSignature?: string; \r\n employeeInitials?: string; \r\n employeePhoneNumber?: string; \r\n employeeWorkNumber?: string; \r\n employeeTheme?: string; \r\n employeeDMSNumber: string;\r\n position?: string; \r\n hasAccess: boolean; \r\n allowDealActivation: boolean; \r\n disableRecording: boolean; \r\n passwordExpireDate?: string; \r\n allowBrowser: boolean; \r\n allowRemoteDealMeetings: boolean; \r\n employeeAccess: EmployeeAccessClass; \r\n employeeDefaults: EmployeeDefaultsClass; \r\n addedDateTime?: string; \r\n addedByUser?: string; \r\n raffleTickets: number; \r\n verified: IVerifiedUserDevice[];\r\n failedLoginsAttempted: number; \r\n lastLoginAttempt?: string; \r\n locked: boolean; \r\n isArchived: boolean; \r\n providerMappings: UserProviderMappings[]; \r\n\r\n get employeeName(): string {\r\n const useComma = this.employeeLastName && this.employeeFirstName;\r\n return `${this.employeeLastName ?? ''}${(useComma ? ', ' : '')}${this.employeeFirstName ?? ''}`.trim();\r\n }\r\n\r\n constructor(init?: Partial) {\r\n this.id = init?.id ?? util.getDefaultGuid();\r\n this.employeeUser = init?.employeeUser ?? null;\r\n this.employeeCode = init?.employeeCode ?? null;\r\n this.employeeDMSNumber = init?.employeeDMSNumber ?? null;\r\n this.employeeLogin = init?.employeeLogin ?? null;\r\n this.employeePassword = init?.employeePassword ?? null;\r\n this.employeeFirstName = init?.employeeFirstName ?? null;\r\n this.employeeLastName = init?.employeeLastName ?? null;\r\n this.employeeEmail = init?.employeeEmail ?? null;\r\n this.employeeSignature = init?.employeeSignature ?? null;\r\n this.employeeInitials = init?.employeeInitials ?? null;\r\n this.employeePhoneNumber = init?.employeePhoneNumber ?? null;\r\n this.employeeWorkNumber = init?.employeeWorkNumber ?? null;\r\n this.employeeTheme = init?.employeeTheme ?? null;\r\n this.position = init?.position ?? null;\r\n this.hasAccess = init?.hasAccess ?? false;\r\n this.allowDealActivation = init?.allowDealActivation ?? false;\r\n this.disableRecording = init?.disableRecording ?? false;\r\n this.passwordExpireDate = init?.passwordExpireDate ?? null;\r\n this.allowBrowser = init?.allowBrowser ?? false;\r\n this.allowRemoteDealMeetings = init?.allowRemoteDealMeetings ?? false;\r\n this.employeeAccess = new EmployeeAccessClass(init?.employeeAccess);\r\n this.employeeDefaults = new EmployeeDefaultsClass(init?.employeeDefaults);\r\n this.addedDateTime = init?.addedDateTime ?? null;\r\n this.addedByUser = init?.addedByUser ?? null;\r\n this.raffleTickets = init?.raffleTickets ?? 0;\r\n this.verified = init?.verified ?? [];\r\n this.failedLoginsAttempted = init?.failedLoginsAttempted ?? 0;\r\n this.lastLoginAttempt = init?.lastLoginAttempt ?? null;\r\n this.locked = init?.locked ?? false;\r\n this.isArchived = init?.isArchived ?? false;\r\n this.providerMappings = init?.providerMappings?.map(x => new UserProviderMappings(x)) ?? [];\r\n }\r\n\r\n hasDDIAccess(): boolean {\r\n return this.providerMappings.some(x => x.type == UserProvideMappingType.DDIPassword)\r\n && this.providerMappings.some(x => x.type == UserProvideMappingType.DDIUsername);\r\n }\r\n}\r\n\r\n/** A bit flag representing all the permission claims a user has. */\r\nexport enum SaturnPermissions {\r\n // IMPORTANT: When updating this enum, make sure you match the naming conventions in EmployeePermissions.\r\n None = 0,\r\n\r\n SalesManager = 1 << 0,\r\n\r\n SalesPerson = 1 << 1,\r\n\r\n FIManager = 1 << 2,\r\n\r\n FIAdmin = 1 << 3,\r\n\r\n GeneralManager = 1 << 4,\r\n\r\n ServiceManager = 1 << 5,\r\n\r\n TitleClerk = 1 << 6,\r\n\r\n Director = 1 << 7,\r\n\r\n Accounting = 1 << 8,\r\n\r\n Admin = 1 << 9,\r\n\r\n UserManager = 1 << 10,\r\n\r\n ExceptionManager = 1 << 11,\r\n}\r\n\r\nexport class EmployeePermissions\r\n{\r\n // IMPORTANT: When a property is changed or added here, make sure to update the Saturn Permissions enum. \r\n isSalesManager: boolean;\r\n isSalesPerson: boolean;\r\n isFIManager: boolean;\r\n isFIAdmin: boolean;\r\n isGeneralManager: boolean;\r\n isServiceManager: boolean;\r\n isDirector: boolean;\r\n isAccounting: boolean;\r\n isAdmin: boolean;\r\n isUserManager: boolean;\r\n isExceptionManager: boolean;\r\n isTitleClerk: boolean;\r\n\r\n constructor(init?: Partial) {\r\n this.isSalesManager = init?.isSalesManager ?? false;\r\n this.isSalesPerson = init?.isSalesPerson ?? false;\r\n this.isFIManager = init?.isFIManager ?? false;\r\n this.isFIAdmin = init?.isFIAdmin ?? false;\r\n this.isGeneralManager = init?.isGeneralManager ?? false;\r\n this.isServiceManager = init?.isServiceManager ?? false;\r\n this.isDirector = init?.isDirector ?? false;\r\n this.isAccounting = init?.isAccounting ?? false;\r\n this.isAdmin = init?.isAdmin ?? false;\r\n this.isUserManager = init?.isUserManager ?? false;\r\n this.isExceptionManager = init?.isExceptionManager ?? false;\r\n this.isTitleClerk = init?.isTitleClerk ?? false; \r\n }\r\n\r\n static createFromPascalKeys(init?: Partial>): EmployeePermissions {\r\n const newPermissions = new EmployeePermissions();\r\n\r\n newPermissions.isSalesManager = init?.IsSalesManager ?? false;\r\n newPermissions.isSalesPerson = init?.IsSalesPerson ?? false;\r\n newPermissions.isFIManager = init?.IsFIManager ?? false;\r\n newPermissions.isFIAdmin = init?.IsFIAdmin ?? false;\r\n newPermissions.isGeneralManager = init?.IsGeneralManager ?? false;\r\n newPermissions.isServiceManager = init?.IsServiceManager ?? false;\r\n newPermissions.isDirector = init?.IsDirector ?? false;\r\n newPermissions.isAccounting = init?.IsAccounting ?? false;\r\n newPermissions.isAdmin = init?.IsAdmin ?? false;\r\n newPermissions.isUserManager = init?.IsUserManager ?? false;\r\n newPermissions.isExceptionManager = init?.IsExceptionManager ?? false;\r\n newPermissions.isTitleClerk = init?.IsTitleClerk ?? false;\r\n\r\n return newPermissions;\r\n }\r\n\r\n toFlags(): SaturnPermissions {\r\n let flag = SaturnPermissions.None;\r\n\r\n for (const key in this) {\r\n if (typeof(this[key]) !== 'boolean' || !this[key]) continue;\r\n\r\n const enumKey = key.replace('is', '') as keyof typeof SaturnPermissions;\r\n flag |= SaturnPermissions[enumKey];\r\n }\r\n\r\n return flag;\r\n }\r\n}\r\n\r\nexport class EmployeeAccessClass extends EmployeePermissions {\r\n storeCodes: string[];\r\n\r\n constructor(init?: Partial) {\r\n super(init);\r\n this.storeCodes = init?.storeCodes ? [...init.storeCodes] : [];\r\n }\r\n}\r\n\r\nexport class EmployeeDefaultsClass {\r\n constructor(init?: Partial) { }\r\n }\r\n\r\nexport interface IVerifiedUserDevice {\r\n ipAddress: string;\r\n otp: string;\r\n timeOfCreation: string;\r\n timeOfConfirmation: string;\r\n}\r\n\r\n/*\r\nEXAMPLE OF USER WITH FULL ACCESS:\r\n{\r\n \"employeeCode\": \"ADMIN\",\r\n \"employeeLogin\": \"ADMIN\",\r\n \"employeePassword\": \"--encrypted password--\",\r\n \"employeeFirstName\": \"\",\r\n \"employeeLastName\": \"Administrator\",\r\n \"employeeName\": \"Administrator\",\r\n \"employeeEmail\": \"\",\r\n \"position\": \"Administrator\",\r\n \"hasAccess\": true,\r\n \"employeeAccess\": {\r\n \"storeCodes\": [\r\n \"MLCV\", \"MLCJ\", \"MLM\", \"MLK\", \"KCJ\", \"UD\", \"UM\", \"HCJ\", \"DM\", \"ACJ\", \"CCJ\", \"NEC\", \"JSM\"\r\n ],\r\n \"isSalesManager\": false,\r\n \"isFIManager\": false,\r\n \"isGeneralManager\": false,\r\n \"isDirector\": false,\r\n \"isAccounting\": false,\r\n \"isAdmin\": true\r\n },\r\n \"employeeDefaults\": {},\r\n \"addedDateTime\": \"2020-03-23T16:01:19.9704703Z\",\r\n \"addedByUser\": null\r\n}\r\n\r\nEXAMPLE OF BASIC USER:\r\n{\r\n \"employeeCode\": \"J1198\",\r\n \"employeeLogin\": null,\r\n \"employeePassword\": null,\r\n \"employeeFirstName\": \"RUEL\",\r\n \"employeeLastName\": \"FORBES\",\r\n \"employeeName\": \"FORBES, RUEL\",\r\n \"employeeEmail\": null,\r\n \"position\": \"SALES PERSON\",\r\n \"hasAccess\": false,\r\n \"employeeAccess\": {\r\n \"storeCodes\": [\"HCJ\"],\r\n \"isSalesManager\": false,\r\n \"isFIManager\": false,\r\n \"isGeneralManager\": false,\r\n \"isDirector\": false,\r\n \"isAccounting\": false,\r\n \"isAdmin\": false\r\n },\r\n \"employeeDefaults\": {},\r\n \"addedDateTime\": \"2020-03-24T23:46:47.3370614Z\",\r\n \"addedByUser\": null\r\n}\r\n*/","import { DealChecklistType, FIMenuSection } from '@core/classes/SharedEnums';\r\nimport { IChecklistFieldToMatch } from \"@core/classes/Checklist/ChecklistMetadata\";\r\nimport { SaturnPermissions } from '@core/classes/AccessEmployeeClass';\r\nimport util from '@core/services/util';\r\n\r\nexport default class SettingsChecklistItem {\r\n /** ElasticSearch ID of this checklist config item */\r\n id: string;\r\n\r\n /** When true, indicates that this checklist item was created for a specific deal by an FI Manager */\r\n isCustomItem: boolean;\r\n\r\n /** \r\n * List of ENUMS.DOC_ASSOCIATION. Any data this checklist item produces (ex. document upload, Plaid verification) will get associated to\r\n * all DOC_ASSOCIATIONS in this list.\r\n */\r\n associations: number[];\r\n\r\n /** A display name for this checklist item, shown to FI Managers */\r\n name: string;\r\n\r\n /** A brief description for this checklist item, shown to FI Managers */\r\n description: string;\r\n\r\n /** A display name for this checklist item, shown to customers. Only applicable if the `sendTo` list includes any customers. */\r\n customerItemName?: string;\r\n\r\n /** A description for this checklist item, shown to customers. Only applicable if the `sendTo` list includes any customers */\r\n customerItemDescription?: string;\r\n\r\n /**\r\n * List of ENUMS.PERSON_TYPES. The type of deal participants who should receive this checklist item. If empty, it's assumed that\r\n * the FI Manager is responsible for completing this checklist item.\r\n */\r\n sendTo: number[];\r\n\r\n /**\r\n * List of employee permissions that need to submit a manual verification for this checklist type. If empty,\r\n * then no manual verification is needed.\r\n */\r\n needsVerifyBy: SaturnPermissions;\r\n\r\n /** Private version of the `type` property. */\r\n private _type: DealChecklistType;\r\n \r\n /** The type of checklist item this is. This will determine pre-defined behavior for how this checklist item can be resolved. */\r\n get type() {\r\n return this._type;\r\n }\r\n\r\n set type(newType: DealChecklistType) {\r\n this._type = newType;\r\n\r\n // Making sure all relevant fields get reset\r\n const isDocAction = this.isDocumentAction();\r\n const isPlaidAction = this.isPlaidAction();\r\n\r\n if (isDocAction)\r\n this.subtype = null;\r\n else \r\n this.resetVerifyPermissions();\r\n\r\n if (!isDocAction && !isPlaidAction) {\r\n this.associations = [];\r\n }\r\n }\r\n\r\n /** An optional subtype that may further describe this checklist item. This is specific to the `type`, and not all checklist types have available subtypes. */\r\n subtype?: string;\r\n\r\n /** ENUMS.FIMENU_SECTION. Setting a section dependency will prevent a deal from progressing past this section until this checklist item has been successfully completed. */\r\n sectionDependency: number;\r\n\r\n /** C# code to be run to determine whether or not this checklist item is required. Should be the body of a method that returns a boolean value. */\r\n isRequiredExpression: string;\r\n\r\n /** C# code to be run to determine whether or not this checklist item has been successfully cleared. Should be the body of a method that returns a \r\n * `ChecklistVerification` object (see `ChecklistItem.cs`). Some checklist types have auto-verification available and may not need a custom\r\n * `isVerified` expression. \r\n */\r\n isVerifiedExpression?: string;\r\n\r\n /** Only applicable if this checklist item requires manual verification. When manually verifying the results of a checklist item, will pull data fields from FIMenu to \r\n * display alongside the checklist results, allowing for easier comparison.\r\n */\r\n fieldsToMatch?: IChecklistFieldToMatch[];\r\n\r\n /** Some checklist types require pre-defined additional fields. Refer to `ChecklistMetadata.cs` for a full list of all metadata objects. */\r\n metadata?: { [key: string]: unknown };\r\n\r\n constructor(init?: Partial) {\r\n Object.assign(\r\n this, \r\n {\r\n id: crypto.randomUUID(),\r\n isCustomItem: false,\r\n associations: [],\r\n sendTo: [],\r\n sectionDependency: FIMenuSection.Unknown,\r\n needsVerifyBy: SaturnPermissions.None,\r\n isRequiredExpression: SettingsChecklistItem.getDefaultIsRequired(),\r\n isVerifiedExpression: SettingsChecklistItem.getDefaultIsVerified(),\r\n fieldsToMatch: [],\r\n },\r\n init\r\n );\r\n }\r\n\r\n /** Will reset all relevant fields to their default values. These default values can be overwritten by passing in an `init` object. */\r\n resetItem(init?: Partial) {\r\n this.id = init?.id ?? crypto.randomUUID();\r\n this.name = init?.name ?? null;\r\n this.description = init?.description ?? null;\r\n this.customerItemName = init?.customerItemName ?? null;\r\n this.customerItemDescription = init?.customerItemDescription ?? null;\r\n this._type = init?.type ?? null;\r\n this.subtype = init?.subtype ?? null;\r\n this.isCustomItem = init?.isCustomItem ?? false;\r\n this.associations = init?.associations ?? [];\r\n this.sendTo = init?.sendTo ?? [];\r\n this.sectionDependency = init?.sectionDependency ?? FIMenuSection.Unknown;\r\n this.isRequiredExpression = init?.isRequiredExpression ?? null;\r\n this.isVerifiedExpression = init?.isVerifiedExpression ?? null;\r\n this.fieldsToMatch = init?.fieldsToMatch ?? [];\r\n this.metadata = init?.metadata ?? undefined;\r\n this.needsVerifyBy = init?.needsVerifyBy ?? SaturnPermissions.None;\r\n }\r\n\r\n resetVerifyPermissions() {\r\n this.needsVerifyBy = SaturnPermissions.None;\r\n }\r\n\r\n requiresManualVerification(): boolean {\r\n return this.needsVerifyBy !== SaturnPermissions.None;\r\n }\r\n\r\n isPlaidAction(): boolean {\r\n return SettingsChecklistItem.isPlaidAction(this.type);\r\n }\r\n\r\n isDocumentAction(): boolean {\r\n return SettingsChecklistItem.isDocumentAction(this.type);\r\n }\r\n\r\n static getDefaultIsVerified(): string {\r\n return '/* When are conditions for this item fulfilled? */ \\n/* What items were used to check verification? */ \\nreturn new ChecklistVerification();';\r\n }\r\n\r\n static getDefaultIsRequired(): string {\r\n return '/* When is this item needed? */ \\nreturn false;';\r\n }\r\n\r\n /** Expects ENUMS.DealChecklistType. Returns true if this item's `type` involves launching a Plaid Link session. */\r\n static isPlaidAction(checklistType: DealChecklistType): boolean {\r\n if (checklistType == null) return false;\r\n\r\n const keyName = util.getKeyFromValue(DealChecklistType, checklistType) as (keyof typeof DealChecklistType);\r\n return keyName && keyName.startsWith('LaunchPlaid');\r\n }\r\n\r\n /** Expects ENUMS.DealChecklistType. Returns true if this item's `type` involves some kind of document upload. */\r\n static isDocumentAction(checklistType: DealChecklistType): boolean {\r\n if (checklistType == null) return false;\r\n\r\n const keyName = util.getKeyFromValue(DealChecklistType, checklistType) as (keyof typeof DealChecklistType);\r\n return keyName && keyName.startsWith('Upload');\r\n }\r\n}","import { BitFlagHelper } from '@core/helpers/enum-helper';\r\n\r\nimport { DealChecklistType, FIMenuSection } from '@core/classes/SharedEnums';\r\nimport { IDocumentVerification, IUploadedDocument } from '@core/classes/UploadedDocument';\r\nimport DocumentAssociation from \"@core/classes/DocumentAssociation\";\r\nimport ENUMS from \"@core/classes/Enums\";\r\nimport { PlaidCustomerData } from \"@core/classes/Plaid/PlaidCustomerData\";\r\nimport { SaturnPermissions } from '@core/classes/AccessEmployeeClass';\r\nimport SettingsChecklistItem from '@core/classes/Checklist/SettingsChecklistItem';\r\n\r\nenum ChecklistStatus {\r\n Pending = 'PENDING',\r\n Rejected = 'REJECTED',\r\n Approved = 'APPROVED',\r\n Unverified = 'UNVERIFIED'\r\n}\r\n\r\n/** \r\n * JS version of the C# class DealChecklistItem (in FIMenuDealChecklist.cs)\r\n * \r\n * Represents the current state of a Checklist Item \r\n */\r\nexport default class DealChecklistItem {\r\n /** GUID | ElasticSearch ID of the related SettingsChecklistItem (for custom items, GUID is randomly generated) */\r\n id: string;\r\n\r\n /** When true, indicates that this is a custom item made on FI Menu by FI Manager */\r\n isCustomItem: boolean;\r\n\r\n /** Array of items associated with this checklist item */\r\n associations: DocumentAssociation[];\r\n\r\n /** Display name of this checklist item */\r\n name: string;\r\n\r\n /** Description of this checklist item */\r\n description: string;\r\n\r\n /** Array of [ENUMS.PERSON_TYPES] | If empty, assume that the FI Manager is responsible for completing the item */\r\n sendTo: number[];\r\n\r\n /** The type of action that is needed in order to fulfill this checklist item. */\r\n type: DealChecklistType;\r\n\r\n /** Some checklist types have specific subtypes (ex. for file uploads, the subtype is the document type) */\r\n subtype?: string;\r\n\r\n /** ENUMS.FIMENU_SECTION | If set, prevents FI Menu from proceeding to the next section until this checklist item is fulfilled */\r\n sectionDependency: number;\r\n\r\n /** Used for specific Checklist types that require extra config fields */\r\n metadata: { key: string, value: unknown }[];\r\n\r\n /** Contains information about how this item was verified */\r\n status: {\r\n /** Whether or not this checklist item has been fulfilled */\r\n isVerified: boolean, \r\n\r\n /** Whether or not isVerifiedExpression returned true */\r\n autoVerified: boolean,\r\n\r\n /** List of employees who have submitted a manual verification for this checklist item. */\r\n manuallyVerifiedBy: SaturnPermissions;\r\n\r\n /** When true, means that a reviewer has manually rejected the results of this item. Signals that this item needs to be retried. */\r\n isManuallyRejected: boolean,\r\n\r\n /** The UploadedDocument returned by isVerifiedExpression. May not be available for all checklist types. */\r\n document: IUploadedDocument,\r\n\r\n /** The PlaidCustomerData returned by isVerifiedExpression. May not be available for all checklist types. */\r\n plaidData: PlaidCustomerData,\r\n }\r\n\r\n /** Bit flag of employees that are required to give a manual verification of this item. */\r\n needsVerifyBy: SaturnPermissions;\r\n\r\n /** Used in manual verification of documents */\r\n fieldsToMatch?: {\r\n /** A unique ID used to identify this field. */\r\n id: string,\r\n\r\n /** The name of this field, used for display purposes. */\r\n name: string,\r\n\r\n /** The value returned by `getFieldExpression`. Should always be cast as a string. */\r\n fieldValue: string,\r\n\r\n /** A C# string expression that returns the value of this field */\r\n getFieldExpression: string\r\n }[];\r\n\r\n\r\n constructor(init?: Partial) {\r\n this.id = init?.id ?? null;\r\n this.isCustomItem = init?.isCustomItem ?? false;\r\n this.associations = init?.associations ?? [];\r\n this.name = init?.name ?? null;\r\n this.description = init?.description ?? null;\r\n this.sendTo = init?.sendTo ?? [];\r\n this.type = init?.type ?? 0;\r\n this.subtype = init?.subtype ?? null;\r\n this.sectionDependency = init?.sectionDependency ?? FIMenuSection.Unknown;\r\n this.metadata = init?.metadata ?? [];\r\n\r\n this.status = init?.status ?? {\r\n isVerified: false,\r\n autoVerified: false,\r\n manuallyVerifiedBy: SaturnPermissions.None,\r\n isManuallyRejected: false,\r\n document: null,\r\n plaidData: null\r\n };\r\n\r\n this.needsVerifyBy = init?.needsVerifyBy ?? SaturnPermissions.None;\r\n this.fieldsToMatch = init?.fieldsToMatch ?? [];\r\n }\r\n\r\n /** Takes the data in this class and generates a `SettingsChecklistItem` object. Will only populate properties the two classes have in common. */\r\n toSettingsChecklistItem(): SettingsChecklistItem {\r\n return new SettingsChecklistItem({\r\n id: this.id,\r\n name: this.name,\r\n description: this.description,\r\n isCustomItem: this.isCustomItem,\r\n sendTo: this.sendTo,\r\n associations: this.associations.map(a => a.type),\r\n type: this.type,\r\n subtype: this.subtype,\r\n sectionDependency: this.sectionDependency,\r\n });\r\n }\r\n\r\n /** Appends a new manual verification to this checklist item, updating all other relevant properties. */\r\n addManualVerification(verification: IDocumentVerification) {\r\n if (!this.requiresManualVerification())\r\n throw new Error('This checklist item does not require manual verifications.');\r\n if (this.status.isManuallyRejected)\r\n throw new Error('This checklist item has been manually rejected. Please redo this checklist item before adding a manual verification.');\r\n\r\n this.status.manuallyVerifiedBy = (verification.isVerified) \r\n ? BitFlagHelper.addFlag(this.status.manuallyVerifiedBy, verification.verifierPermissions)\r\n : BitFlagHelper.removeFlag(this.status.manuallyVerifiedBy, verification.verifierPermissions);\r\n\r\n this.status.isVerified = this.hasAllRequiredManualVerifications();\r\n this.status.isManuallyRejected = !verification.isVerified;\r\n\r\n const doc = this.getDocument();\r\n if (this.isTypeUpload() && doc) \r\n doc.docInfo.manualVerifications.push(verification);\r\n\r\n // TODO: In the future, may need to add extra handling for other checklist types that allow manual verification\r\n }\r\n\r\n // #region Getter Helpers\r\n /** Gets the document stored in the status object (if any) */\r\n getDocument(): IUploadedDocument {\r\n return this.status.document;\r\n }\r\n\r\n /** Gets the Plaid data stored in the status object (if any) */\r\n getPlaidData(): PlaidCustomerData {\r\n return this.status.plaidData;\r\n }\r\n\r\n /** If applicable, will try to return the timestamp stored in the status object. Not all checklist items will have a timestamp. */\r\n getTimestamp(): string {\r\n if (this.isTypePlaid() && this.status.plaidData)\r\n return this.status.plaidData.timestamp;\r\n if (this.isTypeUpload() && this.status.document)\r\n return this.status.document.docInfo.timestamp;\r\n return null;\r\n }\r\n\r\n /** If there's any metadata available, will return the value of the metadata item that matches the given key. */\r\n getMetadataValue(keyName: string): unknown {\r\n if (!this.metadata || this.metadata.length < 1) return null;\r\n return this.metadata.find(m => m.key === keyName)?.value ?? null;\r\n }\r\n\r\n /** Returns the set of permissions that are required for manual verifications but haven't yet submitted a verification. */\r\n getMissingVerifications(): SaturnPermissions {\r\n if (this.needsVerifyBy === SaturnPermissions.None) return SaturnPermissions.None;\r\n if (this.status.manuallyVerifiedBy === SaturnPermissions.None) return this.needsVerifyBy;\r\n\r\n return BitFlagHelper.getMissingFlags(this.needsVerifyBy, this.status.manuallyVerifiedBy);\r\n }\r\n\r\n /** Returns simplified status information for this checklist item. Reflects the item's overall status and is not specific to the user. */\r\n getOverallStatus(): ChecklistStatus {\r\n if (this.requiresManualVerification() && this.status.isManuallyRejected)\r\n return ChecklistStatus.Rejected;\r\n\r\n if (this.isPendingVerification() || this.isPlaidPending())\r\n return ChecklistStatus.Pending;\r\n\r\n if (this.status.isVerified)\r\n return ChecklistStatus.Approved;\r\n\r\n return ChecklistStatus.Unverified;\r\n }\r\n\r\n /** \r\n * Returns a status description for this checklist item, for display purposes. When `userPermissions` are null, you will get an overall status description. \r\n * Otherwise, you'll get a status description that reflects whether this user still needs to take any specific actions to clear this checklist item.\r\n */\r\n getStatusText(userPermissions?: SaturnPermissions): string {\r\n if (this.isTypeUpload()) {\r\n if (!this.getDocument())\r\n return 'NO DOCUMENT FOUND';\r\n else if (!this.status.autoVerified)\r\n return 'INVALID DOCUMENT';\r\n }\r\n\r\n // If this is an item eligible for manual verifications or the user is allowed to verify\r\n const canManuallyVerify = this.requiresManualVerification() || (userPermissions != null && this.canUserVerify(userPermissions));\r\n if (canManuallyVerify) {\r\n const isManuallyVerified = this.hasAllRequiredManualVerifications() || (userPermissions != null && this.didUserVerify(userPermissions));\r\n\r\n if (this.status.isManuallyRejected)\r\n return 'MANUALLY REJECTED';\r\n else if (!this.hasAnyManualVerifications())\r\n return 'SUBMITTED - UNVERIFIED';\r\n else if (isManuallyVerified)\r\n return 'MANUALLY VERIFIED';\r\n else \r\n return 'PARTIALLY VERIFIED';\r\n }\r\n\r\n // Plaid-specific status text\r\n if (this.isTypePlaid()) {\r\n if (!this.getPlaidData())\r\n return 'NOT STARTED';\r\n else if (this.isPlaidPending())\r\n return 'PENDING';\r\n else if (!this.status.autoVerified)\r\n return 'INVALID SESSION';\r\n else\r\n return 'VERIFIED BY PLAID';\r\n }\r\n\r\n // Default status text\r\n const isVerified = (userPermissions != null) ? this.isTaskCompleteForUser(userPermissions) : this.isVerified();\r\n return isVerified ? 'VERIFIED' : 'NOT VERIFIED';\r\n }\r\n\r\n /** Returns a status description that can be shown to the customer, excluding any information that is irrelevant for customers to see. */\r\n getCustomerStatusText(): string {\r\n if (!this.isTypeUpload())\r\n return this.getStatusText();\r\n else if (!this.getDocument())\r\n return 'NO DOCUMENT FOUND';\r\n else if (!this.status.autoVerified)\r\n return 'INVALID DOCUMENT';\r\n else if (this.status.isManuallyRejected)\r\n return 'MANUALLY REJECTED';\r\n else\r\n return 'SUBMITTED';\r\n }\r\n // #endregion\r\n\r\n // #region Bool Condition Helpers\r\n /** Returns true if this item is fully verified. */\r\n isVerified(): boolean {\r\n return this.status.isVerified;\r\n }\r\n \r\n /** Pass in ENUMS.PERSON_TYPES value. Returns true if the person type is in this item's `sendTo` list. */\r\n canSendTo(personType: number): boolean {\r\n return this.sendTo.some(p => p === personType)\r\n }\r\n\r\n /** Returns true if this item's `type` involves some kind of document upload. */\r\n isTypeUpload(): boolean {\r\n return SettingsChecklistItem.isDocumentAction(this.type);\r\n }\r\n\r\n /** Returns true if this item's `type` involves launching a Plaid Link session. */\r\n isTypePlaid(): boolean {\r\n return SettingsChecklistItem.isPlaidAction(this.type);\r\n }\r\n\r\n /** If this item has a document in it's `status` object, returns true if that document's file type is some kind of image file. */\r\n isDocTypeImage(): boolean {\r\n const doc = this.getDocument();\r\n\r\n if (!doc) return false;\r\n return doc.docInfo.fileType.toLowerCase().indexOf('image') !== -1;\r\n }\r\n\r\n /** Returns true if a new document should be uploaded for this checklist item. */\r\n canUploadNewDocument(): boolean {\r\n if (!this.isTypeUpload()) return false;\r\n\r\n // Can upload if no document available or need to re-upload manually rejected document\r\n return !this.getDocument() || this.status.isManuallyRejected;\r\n }\r\n\r\n /** If the item's `status` object has Plaid data, returns whether Plaid has finished processing and retrieving that data. */\r\n isPlaidPending(): boolean {\r\n const plaidData = this.getPlaidData();\r\n if (!plaidData) return false;\r\n\r\n //The only products that would be pending are Payroll Income or Assets\r\n const plaidInteraction = plaidData.interactionType;\r\n if (plaidInteraction !== ENUMS.PLAID_INTERACTION.GetAssetReport && plaidInteraction !== ENUMS.PLAID_INTERACTION.GetPayrollIncome)\r\n return false;\r\n\r\n const error = (plaidInteraction === ENUMS.PLAID_INTERACTION.GetPayrollIncome)\r\n ? plaidData.payrollIncome.response.error\r\n : plaidData.assetReport.response.error;\r\n\r\n return error && error.errorCode === 'PRODUCT_NOT_READY';\r\n }\r\n\r\n /** Returns true if the item's `status` is in a state in which it's safe to reset the IDV session. Currently, we only allow resets if the IDV session has failed. */\r\n canResetPlaidIDV(): boolean {\r\n // Only allowing to reset IDV if auto verification fails\r\n if (this.type !== ENUMS.DealChecklistType.LaunchPlaid_IDV || !this.status.plaidData) return false;\r\n return !this.status.autoVerified;\r\n }\r\n\r\n /** Tells you whether this item still needs action to be taken before it can be considered \"completed\". */\r\n isTaskCompleteForUser(userPermissions: SaturnPermissions): boolean {\r\n // Currently, the only thing a user can act on is a pending manual verification\r\n return !this.isPendingVerification(userPermissions);\r\n }\r\n\r\n /** Returns true if there's nothing left for the customer to act on for this item. When false, indicates that the customer should redo this item. */\r\n isTaskCompleteForCustomer(): boolean {\r\n return (!this.requiresManualVerification())\r\n ? this.status.autoVerified\r\n : this.status.autoVerified && !this.status.isManuallyRejected;\r\n }\r\n\r\n /**\r\n * Returns true if this item is awaiting manual verification. When you pass in `userPermission`, will check whether this specific user still needs \r\n * to submit a manual verification.\r\n */\r\n isPendingVerification(userPermissions?: SaturnPermissions): boolean {\r\n // When an item is not auto verified, indicates that it is not ready for manual verification until the item is retried\r\n if (!this.requiresManualVerification() || !this.status.autoVerified) return false;\r\n\r\n // If no permissions are passed in, return whether this item is missing ANY of its required approvals\r\n if (userPermissions == null)\r\n return !this.hasAllRequiredManualVerifications();\r\n\r\n // If we're in the required approvals list, return whether this item is missing OUR approval\r\n if (this.canUserVerify(userPermissions)) \r\n return !this.didUserVerify(userPermissions);\r\n\r\n return false;\r\n }\r\n\r\n /** Returns true if this item has manual verifications enabled. */\r\n requiresManualVerification(): boolean {\r\n return this.needsVerifyBy !== SaturnPermissions.None;\r\n }\r\n\r\n /** Returns true if the item has all the manual verifications that it requires. */\r\n hasAllRequiredManualVerifications(): boolean {\r\n if (!this.requiresManualVerification()) return true; \r\n return BitFlagHelper.contains(this.status.manuallyVerifiedBy, this.needsVerifyBy);\r\n }\r\n\r\n /** Returns true if this specific user can submit a manual verification on this item. */\r\n canUserVerify(userPermissions: SaturnPermissions): boolean {\r\n if (!this.requiresManualVerification()) return false;\r\n return BitFlagHelper.hasIntersection(SaturnPermissions, this.needsVerifyBy, userPermissions);\r\n }\r\n\r\n /** Returns true if someone with this user's credentials has already submitted a manual verification on this item. */\r\n didUserVerify(userPermissions: SaturnPermissions): boolean {\r\n if (userPermissions === SaturnPermissions.None) return false;\r\n return BitFlagHelper.contains(this.status.manuallyVerifiedBy, userPermissions);\r\n }\r\n\r\n /** Returns true if any manual verifications have been submitted on this item. */\r\n hasAnyManualVerifications(): boolean {\r\n return this.status.manuallyVerifiedBy !== SaturnPermissions.None;\r\n }\r\n\r\n /** Compares the `status` object of this item with another item and returns true if there are any differences between the two statuses. */\r\n anyStatusChanges(newDealChecklistItem: DealChecklistItem): boolean {\r\n // Only runs check if the passed in DealChecklistItem has the same ID as this.id\r\n if (this.id !== newDealChecklistItem.id)\r\n return false;\r\n\r\n const currStatus = JSON.stringify(this.status);\r\n const newStatus = JSON.stringify(newDealChecklistItem.status);\r\n\r\n return currStatus !== newStatus;\r\n }\r\n // #endregion\r\n}","\r\n\r\n\r\n","\r\n\r\n\r\n","\r\n\r\n\r\n","\r\n\r\n\r\n","export class PlaidStatementsConfig {\r\n /** The start date for statements; If no value provided, defaults to 3 months prior to the current date */\r\n startDate?: Date;\r\n\r\n /** The end date for statements; If no value provided, defaults to the current date */\r\n endDate?: Date;\r\n\r\n constructor(init?: PlaidStatementsConfig) {\r\n this.startDate = init?.startDate;\r\n this.endDate = init?.endDate;\r\n }\r\n}\r\n\r\nexport interface PlaidBankStatements {\r\n accounts: PlaidBankStatementsAccount[];\r\n\r\n /** The Plaid Institution ID associated with the Item */\r\n institutionId: string;\r\n\r\n /** The name of the institution associated with the Item */\r\n institutionName: string;\r\n\r\n /** The Plaid Item ID, always unique. */\r\n itemId: string;\r\n}\r\n\r\nexport interface PlaidBankStatementsAccount {\r\n /** Plaid's unique identifier for the account */\r\n accountId: string;\r\n\r\n /** The last 2-4 alphanumeric characters of an account's official account number. */\r\n accountMask: string;\r\n\r\n /** The name of the account, either assigned by the user or by the financial institution itself */\r\n accountName: string;\r\n\r\n /** The official name of the account as given by the financial institution */\r\n accountOfficialName: string;\r\n\r\n /** The subtype of the account */\r\n accountSubtype: string;\r\n\r\n /** The type of account */\r\n accountType: string;\r\n\r\n /** The list of statements' metadata associated with this account */\r\n statements: PlaidBankStatementMetadata[];\r\n}\r\n\r\nexport interface PlaidBankStatementMetadata {\r\n /** A statement's metadata associated with an account */\r\n statementId: string;\r\n\r\n /** Month of the year, a number 1-12 (January through December) */\r\n month: number;\r\n\r\n /** The year of the statement */\r\n year: number;\r\n}","import { CamelKeysToSnakeDeep } from \"@core/classes/UtilClasses\";\r\n\r\n/** The exception that is thrown when a response from the Plaid API contains an error */\r\nexport interface PlaidError {\r\n /** A broad categorization of the error. */\r\n errorType: string;\r\n\r\n /** The particular error code. Safe for programmatic use. */\r\n errorCode: string;\r\n\r\n /** A developer-friendly representation of the error code. This may change over time and is not safe for programmatic use */\r\n errorMessage: string;\r\n\r\n /** A user-friendly representation of the error code. `null` if the error is not related to user action. This may change over time and is not safe for programmatic use. */\r\n displayMessage?: string;\r\n\r\n /** A unique string identifying the request, to be used for troubleshooting purposes. */\r\n requestId?: string;\r\n\r\n /** In the Assets product, a request can pertain to more than one Item. \r\n * If an error is returned for such a request, causes will return an array of errors containing a breakdown of these errors on the individual Item level, if any can be identified. \r\n */\r\n causes?: PlaidErrorCause[];\r\n\r\n /** The URL of a Plaid documentation page with more information about the error */\r\n documentationUrl?: string;\r\n\r\n /** Suggested steps for resolving the error */\r\n suggestedAction?: string;\r\n}\r\n\r\nexport interface PlaidErrorCause extends PlaidError {\r\n /** The `itemId` of the Item associated with this webhook, warning, or error */\r\n itemId: string;\r\n}\r\n\r\nexport function ConvertPlaidErrorToCamelCase(snakeObj: CamelKeysToSnakeDeep): PlaidError {\r\n if (snakeObj == null) return null;\r\n\r\n const convertedError: PlaidError = {\r\n errorType: snakeObj.error_type,\r\n errorCode: snakeObj.error_code,\r\n errorMessage: snakeObj.error_message,\r\n displayMessage: snakeObj.display_message,\r\n requestId: snakeObj.request_id, \r\n causes: [],\r\n documentationUrl: snakeObj.documentation_url,\r\n suggestedAction: snakeObj.suggested_action\r\n };\r\n\r\n snakeObj?.causes?.forEach(c => {\r\n const convertedCause = ConvertPlaidErrorToCamelCase(c) as PlaidErrorCause;\r\n convertedCause.itemId = c.item_id;\r\n convertedError.causes.push(convertedCause);\r\n });\r\n\r\n return convertedError;\r\n}","\r\n\r\n\r\n","\r\n\r\n","\r\n\r\n\r\n","\r\n\r\n\r\n\r\n","\r\n\r\n\r\n","\r\n\r\n\r\n","\r\n\r\n","\r\n\r\n\r\n","\r\n\r\n"],"file":"js/checklist.js"}