@tenancy.nz/chat-ui 0.1.31 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -14,7 +14,7 @@ var wn = (n, t, e, i) => ({
14
14
  }
15
15
  });
16
16
  import * as Ut from "react";
17
- import kt, { useState as ye, useCallback as Bn, isValidElement as Wy, cloneElement as Fm, useEffect as vi, useMemo as Ac, useRef as Ve } from "react";
17
+ import kt, { useState as fe, useCallback as Bn, isValidElement as Wy, cloneElement as Fm, useEffect as si, useMemo as ja, useRef as Ve } from "react";
18
18
  import * as Mf from "react-dom";
19
19
  import Jh, { createPortal as jx } from "react-dom";
20
20
  const WO = ':root{--bg: #f7f9fc;--panel: #ffffff;--text: #0b1324;--muted: #64748b;--accent: #1a73e8;--accent-2: #1a73e8;--danger: #e11d48;--border: #e5e7eb;--pdf-citations-width: 260px;--brand-blue: #0445B7;--brand-pink: #DB2C73;--brand-green: #0CC1A3}*{box-sizing:border-box}html,body{font-family:Montserrat,Inter,ui-sans-serif,system-ui;overflow-x:hidden;width:100%;margin:0}.app{display:grid;grid-template-rows:auto 1fr auto;min-height:100%}.app,.chat-container{overflow-x:hidden}.app-header{padding:16px 20px;border-bottom:1px solid var(--border);background:var(--panel);position:sticky;top:0}.app-header h1{margin:0;font-size:18px;letter-spacing:.2px;color:#111827}.app-header .subtitle{margin:4px 0 0;color:var(--muted);font-size:12px}.app-main{display:grid;grid-template-columns:1fr;padding:0}.app-footer{padding:10px 16px;color:var(--muted);border-top:1px solid var(--border);font-size:12px;background:var(--panel)}.chat-container{width:100%;max-width:none;background:var(--panel);border-top:1px solid var(--border);border-bottom:1px solid var(--border);border-radius:0;overflow:hidden;box-shadow:none}.chat-layout{display:grid;grid-template-columns:300px 1fr;height:calc(100vh - 65px);min-height:calc(100vh - 65px)}.sidebar{border-right:1px solid var(--border);background:#fff;padding:10px;display:flex;flex-direction:column;gap:10px}.sidebar-header{display:flex;align-items:center;justify-content:space-between;font-weight:600;color:#0f172a;padding:8px 20px 8px 12px;border-radius:12px;border:1px solid transparent;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(180deg,#0445b7,#0cc1a3) border-box;margin-top:6px;margin-right:6px}.sidebar-new{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:linear-gradient(180deg,#0445b7,#0cc1a3);border:0;color:#fff;width:32px;height:32px;display:inline-grid;place-items:center;border-radius:9999px;cursor:pointer;font-size:18px;font-weight:700;box-shadow:0 0 #0445b738,0 6px 14px #0445b747;transition:transform .12s ease,box-shadow .12s ease,filter .12s ease}.sidebar-new:hover{transform:translateY(-1px);box-shadow:0 0 0 6px #0445b71f,0 8px 16px #0445b757;filter:saturate(110%)}.sidebar-new:active{transform:translateY(0);box-shadow:0 4px 10px #0445b738}.sidebar-new:focus-visible{outline:2px solid #7fb3ff;outline-offset:2px}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.thread-list{overflow-y:auto;overflow-x:hidden;display:grid;gap:6px;padding:6px 20px 26px 8px;box-sizing:border-box;scrollbar-gutter:stable both-edges;max-height:100vh}.thread-group{display:grid;gap:6px}.thread-group-title{color:#94a3b8;font-size:11px;padding:8px 6px 0;text-transform:uppercase;letter-spacing:.04em}.thread-empty{color:var(--muted);font-size:12px;padding:12px 8px}.sidebar-loading{padding:8px 6px;display:grid;gap:8px}.sidebar-error{padding:8px;border:1px solid #fecaca;background:#fff1f2;color:#7f1d1d;border-radius:8px;display:grid;gap:8px}.sidebar-error .sidebar-error-text{font-size:12px}.thread-item{display:flex;align-items:center;gap:12px;padding:12px 18px 12px 12px;border:none;background:none;color:var(--text);text-align:left;cursor:pointer;border-radius:12px;width:calc(100% - 6px);transition:all .2s ease;margin-right:6px;overflow:hidden}.thread-item:hover{background:#f1f5f9}.thread-item.active{background:#e0f2fe}.thread-icon{flex-shrink:0}.thread-text{flex:1;min-width:0;overflow:hidden;width:100%}.thread-title{display:block;font-size:14px;font-weight:600;color:var(--text);margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.thread-date{font-size:12px;color:var(--accent);font-weight:500}.messages-main{display:flex;flex-direction:column;overflow:auto;position:relative;height:100vh;min-height:100vh}.messages{overflow:auto;padding:28px 40px 100px;display:flex;flex-direction:column;gap:20px;background:#fff;position:relative;margin:0 auto;overflow:visible;width:100%;max-width:1280px;min-height:100vh}.messages-loading{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#fffc;-webkit-backdrop-filter:blur(2px) saturate(110%);backdrop-filter:blur(2px) saturate(110%);z-index:5;min-height:100vh}.messages-loading .loading-inner{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border-radius:999px;border:1px solid rgba(0,0,0,.06);background:#fff;box-shadow:0 8px 18px #00000014;color:#374151;font-size:13px}.messages-error{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;background:#ffffffd9;-webkit-backdrop-filter:blur(2px) saturate(110%);backdrop-filter:blur(2px) saturate(110%);z-index:6}.messages-error .messages-error-card{display:grid;gap:10px;max-width:520px;width:calc(100% - 40px);padding:14px 16px;border-radius:12px;border:1px solid #fee2e2;background:#fff1f2;color:#7f1d1d;box-shadow:0 10px 24px #00000014;text-align:center}.messages-error .messages-error-text{font-size:14px}.messages-error .messages-error-actions{display:inline-flex;gap:8px;justify-content:center}.message{display:flex;gap:12px;align-items:flex-start;animation:messageSlideIn .3s ease-out;flex-wrap:wrap}.messages>:last-child{padding-bottom:200px}.message.user{flex-direction:row-reverse}.message.assistant{flex-direction:row}.message .msg-subdivider,.message .sources-copy,.message .sources-hud{flex-basis:100%}.message.assistant .msg-subdivider,.message.assistant .sources-copy,.message.assistant .sources-hud{flex:0 0 auto;align-self:flex-start;margin-left:40px;width:100%;max-width:min(72ch,calc(100% - 40px))}@keyframes messageSlideIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media (max-width: 1100px) and (min-width: 641px){.message.assistant>.ai-avatar{flex:0 0 36px}.message.assistant>.bubble-plain{flex:1 1 0;min-width:0;max-width:calc(100% - 48px);overflow-wrap:anywhere;word-break:break-word}.message.user>.user-avatar,.message.user>.user-avatar-img{flex:0 0 36px}.message.user>.bubble{flex:1 1 auto;min-width:0;max-width:calc(100% - 48px)}}@media (max-width: 640px){.messages{height:calc(100dvh - 96px);padding:16px 12px 160px;scrollbar-gutter:stable both-edges;overscroll-behavior:contain}.message{gap:8px}.message.assistant>.ai-avatar{flex:0 0 36px}.message.assistant>.bubble-plain{flex:1 1 0;min-width:0;max-width:calc(100% - 44px);overflow-wrap:anywhere;word-break:break-word}.message.user>.user-avatar,.message.user>.user-avatar-img{flex:0 0 36px}.message.user>.bubble{flex:1 1 auto;min-width:0;max-width:calc(100% - 44px)!important}.message.assistant .msg-subdivider,.message.assistant .sources-copy,.message.assistant .sources-hud{margin-left:0;max-width:100%}.sources-hud{margin-top:8px}}.ai-avatar{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(135deg,#0445b7,#0cc1a3);border:1px solid rgba(255,255,255,.2);box-shadow:0 2px 8px #0445b726}.user-avatar,.user-avatar-img{flex-shrink:0;width:36px;height:36px;border-radius:50%;background:#fff;border:1px solid #e5e7eb;box-shadow:0 1px 3px #0000000f}.user-avatar{display:grid;place-items:center;color:#0b1324;font-weight:600;font-size:13px;background:transparent}.user-avatar-img{object-fit:cover}.bubble{max-width:80%;padding:12px 14px;border-radius:12px;line-height:1.6;white-space:normal;word-wrap:break-word;font-size:14px;color:#1f2937;font-family:Montserrat,Inter,ui-sans-serif,system-ui}.message.user .bubble{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(180deg,#0445b7,#0cc1a3) border-box;color:#0b1324;border:1px solid transparent;border-bottom-right-radius:4px}.message.assistant .bubble{background:#fff;border:1px solid #e5e7eb;color:#0b1324;border-bottom-left-radius:4px}.message.assistant .bubble-plain{background:transparent;border:0;padding:0;max-width:72ch;font-size:14px;color:#0b1324;font-family:Montserrat,Inter,ui-sans-serif,system-ui;line-height:1.55;overflow-wrap:anywhere;word-break:break-word;min-width:0}.message.assistant .bubble-plain h1,.message.assistant .bubble-plain h2,.message.assistant .bubble-plain h3,.message.assistant .bubble-plain h4,.message.assistant .bubble-plain h5,.message.assistant .bubble-plain h6{color:#0b1324;font-weight:600}.message.assistant .bubble-plain p{color:#0b1324}.message.assistant .bubble-plain p,.bubble p{margin:0 0 8px}.bubble>*:first-child{margin-top:0}.bubble>*:last-child{margin-bottom:0}.bubble p{margin:0 0 8px}.bubble ul,.bubble ol{margin:8px 0 8px 18px;padding:0}.bubble li{margin:4px 0}.bubble h1,.bubble h2,.bubble h3,.bubble h4,.bubble h5,.bubble h6{margin:10px 0 6px;line-height:1.3}.bubble pre{margin:8px 0;padding:10px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:8px;overflow:auto}.bubble code:not(pre code){background:#f3f4f6;padding:1px 4px;border-radius:4px}.bubble table{border-collapse:collapse;margin:8px 0}.bubble th,.bubble td{border:1px solid #e5e7eb;padding:6px 8px}.message.assistant .bubble-plain a{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.message.assistant .bubble-plain{line-height:1.65}.message.assistant .bubble-plain p{margin:0 0 12px}.message.assistant .bubble-plain ul,.message.assistant .bubble-plain ol{margin:0 0 12px 20px;padding:0}.message.assistant .bubble-plain li+li{margin-top:4px}.message.assistant .bubble-plain blockquote{margin:12px 0;padding:10px 12px;border-left:4px solid #dbeafe;background:#f8fafc;color:#0b1324;border-radius:6px}.message.assistant .bubble-plain h1{font-size:20px;margin:0 0 16px}.message.assistant .bubble-plain h2{font-size:18px;margin:0 0 16px}.message.assistant .bubble-plain h3{font-size:16px;margin:14px 0 6px}.message.assistant .bubble-plain h4,.message.assistant .bubble-plain h5,.message.assistant .bubble-plain h6{font-size:14px;margin:0 0 16px}.message.assistant .bubble-plain pre{margin:12px 0;padding:12px;background:#0b132405;border:1px solid #e5e7eb;border-radius:8px;overflow:auto;-webkit-overflow-scrolling:touch}.message.assistant .bubble-plain code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12.5px}.message.assistant .bubble-plain table{width:100%;border-collapse:collapse;margin:12px 0}.message.assistant .bubble-plain th{background:#f3f4f6;font-weight:600}.message.assistant .bubble-plain th,.message.assistant .bubble-plain td{border:1px solid #e5e7eb;padding:6px 8px}.message.assistant .bubble-plain tr:nth-child(2n) td{background:#fafafa}.message.assistant .bubble-plain img{max-width:100%;height:auto;border-radius:6px}.message.assistant .bubble-plain hr{border:0;border-top:1px solid #e5e7eb;margin:14px 0}.avatar{width:28px;height:28px;border-radius:9999px;background:transparent;border:0;display:grid;place-items:center;color:var(--accent);font-size:14px;margin-top:3px}.avatar-star{transform:rotate(12deg)}.bubble-pending{opacity:.8;font-style:italic}.msg-toolbar{display:flex;align-items:center;gap:12px;margin-left:40px}.msg-divider{height:1px;background:#e5e7eb;flex:1}.btn-copy{background:transparent;border:1px solid var(--border);color:var(--muted);border-radius:8px;padding:4px 8px;font-size:12px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}.btn-copy:hover{color:#111827;border-color:#cfd8e3}.sources-hud{margin-top:0;border:1px solid #dbe7ff;background:#f8fafc;padding:6px 6px 8px;border-radius:8px;width:100%}.sources-copy{display:flex;align-items:center;gap:6px;margin:0 0 6px}.msg-subdivider{height:1px;background:#f3f3f3;margin:10px 0 6px}.sources-header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:6px}.sources-title{font-size:10px;color:#6b7280;margin:0;text-transform:uppercase;letter-spacing:.04em}.sources-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:6px}.source-item{display:flex;align-items:center;gap:4px}.source-link{display:inline-flex;align-items:center;gap:6px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;padding:6px 8px;font-size:11px;cursor:pointer;min-width:160px;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.source-link:hover{border-color:#d1d5db;background:#f9fafb}.source-rank{font-weight:600;color:var(--accent)}.source-name{font-weight:500;color:#0b1324;overflow:hidden;text-overflow:ellipsis}.source-page{color:#6b7280}.source-score{margin-left:auto;font-variant-numeric:tabular-nums;color:#6b7280}.source-open{text-decoration:none;font-size:10px}.btn-copy-inline{border:0;background:transparent;padding:0;color:#1a73e8;display:inline-flex;align-items:center;gap:6px;font-size:12px}.btn-copy-inline:hover{text-decoration:underline}.message-divider{height:1px;background:#f3f3f3;margin:10px 0 2px 40px}.message.user{align-items:center;gap:8px}.user-bubble{background:#e8f0fe;border:1px solid #dbe7ff;color:#0b1324;box-shadow:0 1px 2px #0000000a,0 3px 10px #0445b71a}.user-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(#e2e8f0,#e2e8f0) padding-box,linear-gradient(180deg,#0445b7,#0cc1a3) border-box;color:#274a9a;display:grid;place-items:center;font-size:13px;font-weight:600;font-family:Montserrat,Inter,ui-sans-serif,system-ui;border:1px solid transparent;flex-shrink:0}.user-avatar-img{width:36px;height:36px;border-radius:50%;object-fit:cover;display:inline-block;flex-shrink:0}.modal{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;padding:2vh 2vw;z-index:1000;visibility:hidden;opacity:0;pointer-events:none;background:#ffffff8c;-webkit-backdrop-filter:blur(8px) saturate(120%);backdrop-filter:blur(8px) saturate(120%);transition:opacity .12s ease-in-out,visibility .12s ease-in-out}.modal.open{visibility:visible;opacity:1;pointer-events:auto}.modal-content{background:#fff;width:min(92vw,800px);max-width:min(92vw,800px);max-height:680px;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 8px 24px #0000001f;overflow:hidden;display:flex;flex-direction:column}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid rgba(0,0,0,.06)}.modal-title{font-weight:600;color:#111827}.modal-close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;color:#6b7280;border:0;font-size:20px;line-height:1;width:28px;height:28px;display:inline-grid;place-items:center;border-radius:6px;cursor:pointer}.modal-body{height:680px;overflow:hidden;position:relative;padding:0}.modal-body.panning{cursor:grabbing}.pdf-stage canvas{display:block}.pdf-viewer{position:relative;min-height:320px}.pdf-blocker{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#fff;z-index:5}.pdf-loading{display:flex;align-items:center;justify-content:center;height:320px}.spinner{width:28px;height:28px;border:3px solid #e5e7eb;border-top-color:var(--accent);border-radius:50%;animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.composer{padding:0;background:transparent;position:fixed;width:calc(100% - 540px);bottom:30px}.composer-field{position:relative;display:flex;align-items:stretch;gap:0;max-width:1280px;margin:0 auto;padding:0 40px}.composer-field textarea{flex:1;padding:14px 18px;border:1px solid var(--border);border-radius:12px 0 0 12px;border-right:0;background:var(--bg);color:var(--text);font-size:15px;line-height:1.4;resize:none;outline:none;font-family:inherit;max-height:80px;min-height:48px;transition:all .2s ease}.composer-field textarea:focus{border-color:var(--accent)}.composer-field:focus-within textarea{border-color:var(--accent)}.composer-field:focus-within .composer-send{border-color:var(--accent)}.composer-send:hover{border-color:var(--accent)}.composer-field textarea::placeholder{color:var(--muted)}.composer-send{padding:0 14px;border:1px solid var(--border);border-left:0;border-radius:0 12px 12px 0;background:#0e0044;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;min-width:48px;height:auto;align-self:stretch}.composer .composer-send{background:#0e0044!important;color:#fff!important;-webkit-appearance:none;-moz-appearance:none;appearance:none}.composer-send:hover:not(:disabled){background:#160060;transform:translateY(-1px);box-shadow:0 4px 12px #0e004459}.composer-send:disabled{background:#0e0044;opacity:.6;cursor:not-allowed;transform:none;box-shadow:none}.empty-hero{display:grid;place-items:center;margin-top:0;min-height:calc(100% - 56px);width:100%;overflow-x:visible;max-width:100vw}.empty-hero-inner{text-align:center;max-width:min(900px,100%);width:100%;margin:0 auto;animation:heroIn .6s cubic-bezier(.22,.61,.36,1) both;overflow:visible;max-width:100vw}.empty-hero-logo{position:relative;display:flex;justify-content:center;align-items:center;margin-bottom:16px;overflow:visible;z-index:0}.empty-hero-logo svg{width:clamp(112px,17.6vw,176px);height:auto;overflow:visible;filter:drop-shadow(0 10px 24px rgba(4,69,183,.18))}.empty-hero-logo>svg,.empty-hero-logo svg{position:relative;z-index:0}.empty-hero h1,.empty-hero p,.empty-hero .chip-row{position:relative;z-index:2}.empty-hero-logo svg>g{transform-box:view-box;transform-origin:center;transform:rotate(var(--g, 0deg));will-change:transform}.empty-hero h1{margin:0;font-family:Montserrat,Inter,ui-sans-serif;font-weight:800;color:#0b1324;font-size:36px;letter-spacing:.2px}.empty-hero h1.typewriter{display:block;max-width:100%;width:100%;overflow:visible;contain:layout paint}.empty-hero h1.typewriter span{display:inline-block;white-space:nowrap;overflow:hidden;width:0ch;position:relative;padding-right:0;--caret-opacity: 1;--chars: 23;box-shadow:none;animation:typing 2.6s steps(var(--chars),end) forwards,caretBlink 2.6s step-end 1 both,postType 1ms linear 2.6s forwards,shineSlide 8s ease-in-out infinite;background:linear-gradient(90deg,var(--brand-pink) 0%,var(--brand-blue) 100%);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;background-size:300% 100%}.empty-hero h1.typewriter span:after{content:"";position:absolute;right:0;top:0;bottom:0;width:2px;background:var(--text);opacity:var(--caret-opacity);z-index:1}.empty-hero p{margin:0 0 24px;color:#64748b;font-size:16px}@keyframes typing{0%{width:0ch}to{width:calc(var(--chars) * 1ch)}}@keyframes caretBlink{0%,to{--caret-opacity: 1}50%{--caret-opacity: 0}}@keyframes postType{to{white-space:normal;width:auto;max-width:100%;overflow:visible;--caret-opacity: 0}}@keyframes shineSlide{0%{background-position:200% 0}to{background-position:-100% 0}}@keyframes heroIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion: reduce){.empty-hero h1.typewriter span{animation:none;width:auto;border-right:0}.empty-hero-inner{animation:none}}@media (max-width: 640px){.empty-hero h1.typewriter{overflow:visible}.empty-hero h1.typewriter span{animation:shineSlide 8s ease-in-out infinite;width:auto;max-width:100%;white-space:normal;padding-right:0}.empty-hero h1.typewriter span:after{display:none}}.chip-row{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:800px;margin:0 auto}.chip{transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}.chip:hover{transform:translateY(-1px);box-shadow:0 10px 24px #0445b724;filter:saturate(108%)}.chip:active{transform:translateY(0);box-shadow:0 6px 14px #0445b71f}.chip{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:#0b1324;border-radius:9999px;padding:8px 14px;font-size:13px;cursor:pointer;border:1px solid transparent;box-shadow:0 1px 2px #00000005;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(180deg,#0445b7,#0cc1a3) border-box;font-family:Montserrat,Inter,ui-sans-serif,system-ui;transition:transform .15s ease,box-shadow .15s ease;animation:chipIn .5s ease-out both}.chip:hover{transform:translateY(-1px);box-shadow:0 3px 8px #0000000f}.chip:active{transform:translateY(0);box-shadow:0 1px 2px #00000008}@keyframes chipIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.chip-row .chip:nth-child(1){animation-delay:.02s}.chip-row .chip:nth-child(2){animation-delay:.06s}.chip-row .chip:nth-child(3){animation-delay:.1s}.chip-row .chip:nth-child(4){animation-delay:.14s}.chip-row .chip:nth-child(5){animation-delay:.18s}.chip:hover{background:linear-gradient(#f8fbff,#f8fbff) padding-box,linear-gradient(180deg,#0445b7,#0cc1a3) border-box}.skeleton{position:relative;overflow:hidden;background:#f3f4f6}.skeleton:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background:linear-gradient(90deg,#fff0,#fff9,#fff0);animation:shimmer 1.2s infinite}@keyframes shimmer{to{transform:translate(100%)}}.skeleton-line{height:12px;border-radius:6px;margin:8px 0}.skeleton-line.sm{height:10px}.skeleton-line.lg{height:14px}.w40{width:40%}.w60{width:60%}.w80{width:80%}.w100{width:100%}.pdf-thumbs{width:130px;min-width:110px;max-width:160px;border-left:1px solid #eef2f7;background:#fbfbfb;overflow:auto}.pdf-thumbs-list{list-style:none;margin:0;padding:8px;display:grid;gap:8px}.pdf-thumb{display:grid;gap:6px;width:100%;border:1px solid #e5e7eb;background:#fff;border-radius:8px;padding:6px;cursor:pointer}.pdf-thumb.active{outline:2px solid #1a73e8;outline-offset:0}.pdf-thumb img{display:block;width:100%;height:auto;border-radius:4px}.thumb-label{font-size:11px;color:#6b7280;justify-self:center}.thumb-skeleton{background:#f3f4f6;border-radius:6px;position:relative;overflow:hidden}.thumb-skeleton:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background:linear-gradient(90deg,#fff0,#fff9,#fff0);animation:shimmer 1.2s infinite}.pdf-citations{flex:0 0 var(--pdf-citations-width);width:var(--pdf-citations-width);border-right:1px solid #eef2f7;background:#fbfbfb;overflow-y:auto;overflow-x:hidden;padding:8px 12px 12px 8px;box-sizing:border-box}.pdf-citations *{max-width:100%;word-break:break-word}.pdf-container{display:flex;width:100%;height:100%;gap:0}.pdf-content{flex:1;min-width:0;overflow:hidden;padding:0 16px}.pdf-toolbar{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-top:1px solid rgba(0,0,0,.06);box-shadow:0 -4px 8px #00000008;padding:8px 12px}.pdf-toolbar-left{display:flex;gap:8px}.pdf-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:linear-gradient(180deg,#fff,#f7f7f7);border:1px solid rgba(0,0,0,.12);color:#111827;width:34px;height:34px;display:inline-grid;place-items:center;border-radius:8px;cursor:pointer}.pdf-btn:disabled{opacity:.5;cursor:not-allowed}.pdf-page-label{font-size:13px;color:#374151}.typing-hud{display:flex;justify-content:flex-start;align-items:flex-start;margin:16px 0;animation:typingSlideIn .3s ease-out}.typing-hud-inner{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;border:1px solid rgba(0,0,0,.06);background:#fff;box-shadow:0 8px 18px #00000014;color:#374151;font-size:13px}.typing-dot{width:10px;height:10px;border-radius:50%;background:linear-gradient(180deg,#5446e6,#1a73e8);box-shadow:0 0 0 2px #1a73e81f;animation:pulseDot 1.4s ease-in-out infinite}.typing-text{opacity:.9}@keyframes typingSlideIn{0%{opacity:0;transform:translate(-50%) translateY(10px) scale(.95)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}@keyframes pulseDot{0%,80%,to{transform:scale(.8);opacity:.5}40%{transform:scale(1.2);opacity:1}}.pdf-sources{width:100%}.pdf-sources-title{padding:10px 10px 6px;font-size:12px;font-weight:600;color:#374151}.pdf-sources-list{list-style:none;margin:0;padding:0 12px 12px 8px;display:flex;flex-direction:column;gap:8px;box-sizing:border-box}.pdf-source-item{display:flex;width:100%;text-align:left;gap:8px;padding:10px 12px;border-radius:8px;border:1px solid rgba(0,0,0,.08);background:transparent;color:#111827;cursor:pointer}.pdf-source-item.active{background:#1976d214}.pdf-source-rank{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:linear-gradient(180deg,#fff,#f7f7f7);border:1px solid rgba(0,0,0,.12);font-size:12px;color:#374151}.pdf-source-text{display:inline-block;overflow:hidden}.pdf-source-filename{display:block;font-size:12px;font-weight:600;color:#111827}.pdf-source-page{display:block;font-size:11px;color:#6b7280}.pdf-source-snippet{display:block;font-size:11px;color:#6b7280;margin-top:2px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media (max-width: 1280px){.modal-content{width:95vw}}@media (max-width: 1024px){.pdf-thumbs,.pdf-citations{display:none}.modal-content{width:96vw;height:92vh}}@media (max-width: 640px){.modal-content{width:98vw;height:92vh;border-radius:10px}}@media (max-width: 900px){.chat-layout{grid-template-columns:1fr;position:relative}.sidebar{position:fixed;top:0;bottom:0;left:0;width:min(86vw,320px);max-width:92vw;transform:translate(-100%);transition:transform .2s ease-in-out;z-index:1000;box-shadow:0 10px 30px #0000002e}.chat-container.drawer-open .sidebar{transform:translate(0)}.drawer-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000005c;-webkit-backdrop-filter:saturate(120%) blur(2px);backdrop-filter:saturate(120%) blur(2px);z-index:900}.mobile-bar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--border);background:#fff;position:sticky;top:0;z-index:10}.sidebar-toggle{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;color:#111827;border:1px solid #e5e7eb;border-radius:8px;width:36px;height:36px;display:inline-grid;place-items:center;cursor:pointer}}@media (min-width: 901px){.mobile-bar{display:none}}.older-messages{display:flex;justify-content:center;margin:8px 0}.toasts{position:fixed;top:16px;right:16px;display:grid;gap:8px;z-index:2000}.toast{background:#111827;color:#fff;border-radius:8px;padding:10px 12px;font-size:13px;box-shadow:0 10px 20px #0003}.toast.error{background:#b91c1c}.toast.success{background:#065f46}';
@@ -22,7 +22,7 @@ var Wc = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
22
22
  function Aa(n) {
23
23
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
24
24
  }
25
- var dp = { exports: {} }, cc = {};
25
+ var dp = { exports: {} }, uc = {};
26
26
  /**
27
27
  * @license React
28
28
  * react-jsx-runtime.production.min.js
@@ -34,7 +34,7 @@ var dp = { exports: {} }, cc = {};
34
34
  */
35
35
  var jm;
36
36
  function zx() {
37
- if (jm) return cc;
37
+ if (jm) return uc;
38
38
  jm = 1;
39
39
  var n = kt, t = Symbol.for("react.element"), e = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, r = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
40
40
  function o(a, l, u) {
@@ -44,9 +44,9 @@ function zx() {
44
44
  if (a && a.defaultProps) for (h in l = a.defaultProps, l) d[h] === void 0 && (d[h] = l[h]);
45
45
  return { $$typeof: t, type: a, key: f, ref: p, props: d, _owner: r.current };
46
46
  }
47
- return cc.Fragment = e, cc.jsx = o, cc.jsxs = o, cc;
47
+ return uc.Fragment = e, uc.jsx = o, uc.jsxs = o, uc;
48
48
  }
49
- var uc = {};
49
+ var hc = {};
50
50
  /**
51
51
  * @license React
52
52
  * react-jsx-runtime.development.js
@@ -286,9 +286,9 @@ function Bx() {
286
286
  if (Re !== 1 || Le !== 1)
287
287
  do
288
288
  if (Re--, Le--, Le < 0 || Lt[Re] !== vn[Le]) {
289
- var ci = `
289
+ var ui = `
290
290
  ` + Lt[Re].replace(" at new ", " at ");
291
- return P.displayName && ci.includes("<anonymous>") && (ci = ci.replace("<anonymous>", P.displayName)), typeof P == "function" && bt.set(P, ci), ci;
291
+ return P.displayName && ui.includes("<anonymous>") && (ui = ui.replace("<anonymous>", P.displayName)), typeof P == "function" && bt.set(P, ui), ui;
292
292
  }
293
293
  while (Re >= 1 && Le >= 0);
294
294
  break;
@@ -336,7 +336,7 @@ function Bx() {
336
336
  }
337
337
  return "";
338
338
  }
339
- var pe = Object.prototype.hasOwnProperty, li = {}, Ei = b.ReactDebugCurrentFrame;
339
+ var ge = Object.prototype.hasOwnProperty, ci = {}, Ei = b.ReactDebugCurrentFrame;
340
340
  function oe(P) {
341
341
  if (P) {
342
342
  var V = P._owner, it = ze(P.type, P._source, V ? V.type : null);
@@ -346,7 +346,7 @@ function Bx() {
346
346
  }
347
347
  function Ee(P, V, it, At, Xt) {
348
348
  {
349
- var Jt = Function.call.bind(pe);
349
+ var Jt = Function.call.bind(ge);
350
350
  for (var Bt in P)
351
351
  if (Jt(P, Bt)) {
352
352
  var Lt = void 0;
@@ -359,7 +359,7 @@ function Bx() {
359
359
  } catch (Re) {
360
360
  Lt = Re;
361
361
  }
362
- Lt && !(Lt instanceof Error) && (oe(Xt), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", At || "React class", it, Bt, typeof Lt), oe(null)), Lt instanceof Error && !(Lt.message in li) && (li[Lt.message] = !0, oe(Xt), w("Failed %s type: %s", it, Lt.message), oe(null));
362
+ Lt && !(Lt instanceof Error) && (oe(Xt), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", At || "React class", it, Bt, typeof Lt), oe(null)), Lt instanceof Error && !(Lt.message in ci) && (ci[Lt.message] = !0, oe(Xt), w("Failed %s type: %s", it, Lt.message), oe(null));
363
363
  }
364
364
  }
365
365
  }
@@ -367,13 +367,13 @@ function Bx() {
367
367
  function Yi(P) {
368
368
  return hs(P);
369
369
  }
370
- function sc(P) {
370
+ function oc(P) {
371
371
  {
372
372
  var V = typeof Symbol == "function" && Symbol.toStringTag, it = V && P[Symbol.toStringTag] || P.constructor.name || "Object";
373
373
  return it;
374
374
  }
375
375
  }
376
- function oc(P) {
376
+ function ac(P) {
377
377
  try {
378
378
  return Xi(P), !1;
379
379
  } catch {
@@ -384,8 +384,8 @@ function Bx() {
384
384
  return "" + P;
385
385
  }
386
386
  function j(P) {
387
- if (oc(P))
388
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", sc(P)), Xi(P);
387
+ if (ac(P))
388
+ return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", oc(P)), Xi(P);
389
389
  }
390
390
  var X = b.ReactCurrentOwner, wt = {
391
391
  key: !0,
@@ -394,7 +394,7 @@ function Bx() {
394
394
  __source: !0
395
395
  }, It, Vt;
396
396
  function q(P) {
397
- if (pe.call(P, "ref")) {
397
+ if (ge.call(P, "ref")) {
398
398
  var V = Object.getOwnPropertyDescriptor(P, "ref").get;
399
399
  if (V && V.isReactWarning)
400
400
  return !1;
@@ -402,7 +402,7 @@ function Bx() {
402
402
  return P.ref !== void 0;
403
403
  }
404
404
  function mt(P) {
405
- if (pe.call(P, "key")) {
405
+ if (ge.call(P, "key")) {
406
406
  var V = Object.getOwnPropertyDescriptor(P, "key").get;
407
407
  if (V && V.isReactWarning)
408
408
  return !1;
@@ -468,7 +468,7 @@ function Bx() {
468
468
  var Jt, Bt = {}, Lt = null, vn = null;
469
469
  it !== void 0 && (j(it), Lt = "" + it), mt(V) && (j(V.key), Lt = "" + V.key), q(V) && (vn = V.ref, Ot(V, Xt));
470
470
  for (Jt in V)
471
- pe.call(V, Jt) && !wt.hasOwnProperty(Jt) && (Bt[Jt] = V[Jt]);
471
+ ge.call(V, Jt) && !wt.hasOwnProperty(Jt) && (Bt[Jt] = V[Jt]);
472
472
  if (P && P.defaultProps) {
473
473
  var Re = P.defaultProps;
474
474
  for (Jt in Re)
@@ -506,7 +506,7 @@ Check the render method of \`` + P + "`.";
506
506
  return "";
507
507
  }
508
508
  }
509
- function ge(P) {
509
+ function me(P) {
510
510
  return "";
511
511
  }
512
512
  var Un = {};
@@ -522,7 +522,7 @@ Check the top-level render call using <` + it + ">.");
522
522
  return V;
523
523
  }
524
524
  }
525
- function me(P, V) {
525
+ function be(P, V) {
526
526
  {
527
527
  if (!P._store || P._store.validated || P.key != null)
528
528
  return;
@@ -542,7 +542,7 @@ Check the top-level render call using <` + it + ">.");
542
542
  if (Yi(P))
543
543
  for (var it = 0; it < P.length; it++) {
544
544
  var At = P[it];
545
- Ji(At) && me(At, V);
545
+ Ji(At) && be(At, V);
546
546
  }
547
547
  else if (Ji(P))
548
548
  P._store && (P._store.validated = !0);
@@ -550,7 +550,7 @@ Check the top-level render call using <` + it + ">.");
550
550
  var Xt = v(P);
551
551
  if (typeof Xt == "function" && Xt !== P.entries)
552
552
  for (var Jt = Xt.call(P), Bt; !(Bt = Jt.next()).done; )
553
- Ji(Bt.value) && me(Bt.value, V);
553
+ Ji(Bt.value) && be(Bt.value, V);
554
554
  }
555
555
  }
556
556
  }
@@ -592,13 +592,13 @@ Check the top-level render call using <` + it + ">.");
592
592
  }
593
593
  }
594
594
  var _a = {};
595
- function ac(P, V, it, At, Xt, Jt) {
595
+ function lc(P, V, it, At, Xt, Jt) {
596
596
  {
597
597
  var Bt = R(P);
598
598
  if (!Bt) {
599
599
  var Lt = "";
600
600
  (P === void 0 || typeof P == "object" && P !== null && Object.keys(P).length === 0) && (Lt += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
601
- var vn = ge();
601
+ var vn = me();
602
602
  vn ? Lt += vn : Lt += zt();
603
603
  var Re;
604
604
  P === null ? Re = "null" : Yi(P) ? Re = "array" : P !== void 0 && P.$$typeof === t ? (Re = "<" + (N(P.type) || "Unknown") + " />", Lt = " Did you accidentally export a JSX literal instead of a component?") : Re = typeof P, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Re, Lt);
@@ -607,19 +607,19 @@ Check the top-level render call using <` + it + ">.");
607
607
  if (Le == null)
608
608
  return Le;
609
609
  if (Bt) {
610
- var ci = V.children;
611
- if (ci !== void 0)
610
+ var ui = V.children;
611
+ if (ui !== void 0)
612
612
  if (At)
613
- if (Yi(ci)) {
614
- for (var Ca = 0; Ca < ci.length; Ca++)
615
- Ge(ci[Ca], P);
616
- Object.freeze && Object.freeze(ci);
613
+ if (Yi(ui)) {
614
+ for (var Ca = 0; Ca < ui.length; Ca++)
615
+ Ge(ui[Ca], P);
616
+ Object.freeze && Object.freeze(ui);
617
617
  } else
618
618
  w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
619
619
  else
620
- Ge(ci, P);
620
+ Ge(ui, P);
621
621
  }
622
- if (pe.call(V, "key")) {
622
+ if (ge.call(V, "key")) {
623
623
  var no = N(P), In = Object.keys(V).filter(function(Dx) {
624
624
  return Dx !== "key";
625
625
  }), If = In.length > 0 ? "{key: someKey, " + In.join(": ..., ") + ": ...}" : "{key: someKey}";
@@ -637,14 +637,14 @@ React keys must be passed directly to JSX without using spread:
637
637
  }
638
638
  }
639
639
  function eo(P, V, it) {
640
- return ac(P, V, it, !0);
640
+ return lc(P, V, it, !0);
641
641
  }
642
- function lc(P, V, it) {
643
- return ac(P, V, it, !1);
642
+ function cc(P, V, it) {
643
+ return lc(P, V, it, !1);
644
644
  }
645
- var Rf = lc, zh = eo;
646
- uc.Fragment = i, uc.jsx = Rf, uc.jsxs = zh;
647
- }()), uc;
645
+ var Rf = cc, zh = eo;
646
+ hc.Fragment = i, hc.jsx = Rf, hc.jsxs = zh;
647
+ }()), hc;
648
648
  }
649
649
  process.env.NODE_ENV === "production" ? dp.exports = zx() : dp.exports = Bx();
650
650
  var I = dp.exports;
@@ -865,7 +865,7 @@ function Ux(n) {
865
865
  }
866
866
  const Wx = () => Math.random().toString(36).slice(2) + Date.now().toString(36);
867
867
  function Vx(n = 3500) {
868
- const [t, e] = ye([]), i = Bn((o) => {
868
+ const [t, e] = fe([]), i = Bn((o) => {
869
869
  e((a) => a.filter((l) => l.id !== o));
870
870
  }, []), r = Bn((o, a = "info") => {
871
871
  const l = Wx();
@@ -996,7 +996,7 @@ function qi(n) {
996
996
  function n1(n) {
997
997
  return t1.includes(n);
998
998
  }
999
- function tc(n) {
999
+ function ec(n) {
1000
1000
  return (t) => typeof t === n;
1001
1001
  }
1002
1002
  function i1(n) {
@@ -1037,14 +1037,14 @@ st.array = Array.isArray;
1037
1037
  st.arrayOf = (n, t) => !st.array(n) && !st.function(t) ? !1 : n.every((e) => t(e));
1038
1038
  st.asyncGeneratorFunction = (n) => pf(n) === "AsyncGeneratorFunction";
1039
1039
  st.asyncFunction = qi("AsyncFunction");
1040
- st.bigint = tc("bigint");
1040
+ st.bigint = ec("bigint");
1041
1041
  st.boolean = (n) => n === !0 || n === !1;
1042
1042
  st.date = qi("Date");
1043
1043
  st.defined = (n) => !st.undefined(n);
1044
1044
  st.domElement = (n) => st.object(n) && !st.plainObject(n) && n.nodeType === 1 && st.string(n.nodeName) && r1.every((t) => t in n);
1045
1045
  st.empty = (n) => st.string(n) && n.length === 0 || st.array(n) && n.length === 0 || st.object(n) && !st.map(n) && !st.set(n) && Object.keys(n).length === 0 || st.set(n) && n.size === 0 || st.map(n) && n.size === 0;
1046
1046
  st.error = qi("Error");
1047
- st.function = tc("function");
1047
+ st.function = ec("function");
1048
1048
  st.generator = (n) => st.iterable(n) && st.function(n.next) && st.function(n.throw);
1049
1049
  st.generatorFunction = qi("GeneratorFunction");
1050
1050
  st.instanceOf = (n, t) => !n || !t ? !1 : Object.getPrototypeOf(n) === t.prototype;
@@ -1053,7 +1053,7 @@ st.map = qi("Map");
1053
1053
  st.nan = (n) => Number.isNaN(n);
1054
1054
  st.null = (n) => n === null;
1055
1055
  st.nullOrUndefined = (n) => st.null(n) || st.undefined(n);
1056
- st.number = (n) => tc("number")(n) && !st.nan(n);
1056
+ st.number = (n) => ec("number")(n) && !st.nan(n);
1057
1057
  st.numericString = (n) => st.string(n) && n.length > 0 && !Number.isNaN(Number(n));
1058
1058
  st.object = (n) => !st.nullOrUndefined(n) && (st.function(n) || typeof n == "object");
1059
1059
  st.oneOf = (n, t) => st.array(n) ? n.indexOf(t) > -1 : !1;
@@ -1074,9 +1074,9 @@ st.propertyOf = (n, t, e) => {
1074
1074
  };
1075
1075
  st.regexp = qi("RegExp");
1076
1076
  st.set = qi("Set");
1077
- st.string = tc("string");
1078
- st.symbol = tc("symbol");
1079
- st.undefined = tc("undefined");
1077
+ st.string = ec("string");
1078
+ st.symbol = ec("symbol");
1079
+ st.undefined = ec("undefined");
1080
1080
  st.weakMap = qi("WeakMap");
1081
1081
  st.weakSet = qi("WeakSet");
1082
1082
  var lt = st;
@@ -1120,7 +1120,7 @@ function a1(n, t) {
1120
1120
  function qm(n) {
1121
1121
  return (t) => lt.array(n) ? n.some((e) => Cn(e, t) || lt.array(t) && qg(t)(e)) : Cn(n, t);
1122
1122
  }
1123
- function hc(n, t) {
1123
+ function dc(n, t) {
1124
1124
  return lt.array(n) ? n.some((e) => Cn(e, t)) : Cn(n, t);
1125
1125
  }
1126
1126
  function qg(n) {
@@ -1147,7 +1147,7 @@ function Od(n, t) {
1147
1147
  try {
1148
1148
  const p = xr(n, h), g = xr(t, h), m = lt.defined(d), v = lt.defined(f);
1149
1149
  if (m || v) {
1150
- const b = v ? hc(f, p) : !hc(d, p), w = hc(d, g);
1150
+ const b = v ? dc(f, p) : !dc(d, p), w = dc(d, g);
1151
1151
  return b && w;
1152
1152
  }
1153
1153
  return [p, g].every(lt.array) || [p, g].every(lt.plainObject) ? !Cn(p, g) : p !== g;
@@ -1159,7 +1159,7 @@ function Od(n, t) {
1159
1159
  return !1;
1160
1160
  try {
1161
1161
  const p = xr(n, h), g = xr(t, h), m = lt.defined(f);
1162
- return hc(d, p) && (m ? hc(f, g) : !m);
1162
+ return dc(d, p) && (m ? dc(f, g) : !m);
1163
1163
  } catch {
1164
1164
  return !1;
1165
1165
  }
@@ -1280,7 +1280,7 @@ function k1(n) {
1280
1280
  return Array.isArray(n) ? [] : {};
1281
1281
  }
1282
1282
  function qc(n, t) {
1283
- return t.clone !== !1 && t.isMergeableObject(n) ? Yl(k1(n), n, t) : n;
1283
+ return t.clone !== !1 && t.isMergeableObject(n) ? Xl(k1(n), n, t) : n;
1284
1284
  }
1285
1285
  function _1(n, t, e) {
1286
1286
  return n.concat(t).map(function(i) {
@@ -1289,9 +1289,9 @@ function _1(n, t, e) {
1289
1289
  }
1290
1290
  function C1(n, t) {
1291
1291
  if (!t.customMerge)
1292
- return Yl;
1292
+ return Xl;
1293
1293
  var e = t.customMerge(n);
1294
- return typeof e == "function" ? e : Yl;
1294
+ return typeof e == "function" ? e : Xl;
1295
1295
  }
1296
1296
  function T1(n) {
1297
1297
  return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(n).filter(function(t) {
@@ -1319,19 +1319,19 @@ function R1(n, t, e) {
1319
1319
  P1(n, r) || (Xy(n, r) && e.isMergeableObject(t[r]) ? i[r] = C1(r, e)(n[r], t[r], e) : i[r] = qc(t[r], e));
1320
1320
  }), i;
1321
1321
  }
1322
- function Yl(n, t, e) {
1322
+ function Xl(n, t, e) {
1323
1323
  e = e || {}, e.arrayMerge = e.arrayMerge || _1, e.isMergeableObject = e.isMergeableObject || v1, e.cloneUnlessOtherwiseSpecified = qc;
1324
1324
  var i = Array.isArray(t), r = Array.isArray(n), s = i === r;
1325
1325
  return s ? i ? e.arrayMerge(n, t, e) : R1(n, t, e) : qc(t, e);
1326
1326
  }
1327
- Yl.all = function(t, e) {
1327
+ Xl.all = function(t, e) {
1328
1328
  if (!Array.isArray(t))
1329
1329
  throw new Error("first argument should be an array");
1330
1330
  return t.reduce(function(i, r) {
1331
- return Yl(i, r, e);
1331
+ return Xl(i, r, e);
1332
1332
  }, {});
1333
1333
  };
1334
- var I1 = Yl, O1 = I1;
1334
+ var I1 = Xl, O1 = I1;
1335
1335
  const $i = /* @__PURE__ */ Aa(O1);
1336
1336
  var fp = { exports: {} }, Bh = { exports: {} }, Qt = {};
1337
1337
  /** @license React v16.13.1
@@ -2068,20 +2068,20 @@ function Zy(n) {
2068
2068
  return n && n.referenceNode ? n.referenceNode : n;
2069
2069
  }
2070
2070
  var ob = kh && !!(window.MSInputMethodContext && document.documentMode), ab = kh && /MSIE 10/.test(navigator.userAgent);
2071
- function ec(n) {
2071
+ function nc(n) {
2072
2072
  return n === 11 ? ob : n === 10 ? ab : ob || ab;
2073
2073
  }
2074
- function Xl(n) {
2074
+ function Kl(n) {
2075
2075
  if (!n)
2076
2076
  return document.documentElement;
2077
- for (var t = ec(10) ? document.body : null, e = n.offsetParent || null; e === t && n.nextElementSibling; )
2077
+ for (var t = nc(10) ? document.body : null, e = n.offsetParent || null; e === t && n.nextElementSibling; )
2078
2078
  e = (n = n.nextElementSibling).offsetParent;
2079
2079
  var i = e && e.nodeName;
2080
- return !i || i === "BODY" || i === "HTML" ? n ? n.ownerDocument.documentElement : document.documentElement : ["TH", "TD", "TABLE"].indexOf(e.nodeName) !== -1 && Sa(e, "position") === "static" ? Xl(e) : e;
2080
+ return !i || i === "BODY" || i === "HTML" ? n ? n.ownerDocument.documentElement : document.documentElement : ["TH", "TD", "TABLE"].indexOf(e.nodeName) !== -1 && Sa(e, "position") === "static" ? Kl(e) : e;
2081
2081
  }
2082
2082
  function G1(n) {
2083
2083
  var t = n.nodeName;
2084
- return t === "BODY" ? !1 : t === "HTML" || Xl(n.firstElementChild) === n;
2084
+ return t === "BODY" ? !1 : t === "HTML" || Kl(n.firstElementChild) === n;
2085
2085
  }
2086
2086
  function pp(n) {
2087
2087
  return n.parentNode !== null ? pp(n.parentNode) : n;
@@ -2093,11 +2093,11 @@ function Md(n, t) {
2093
2093
  s.setStart(i, 0), s.setEnd(r, 0);
2094
2094
  var o = s.commonAncestorContainer;
2095
2095
  if (n !== o && t !== o || i.contains(r))
2096
- return G1(o) ? o : Xl(o);
2096
+ return G1(o) ? o : Kl(o);
2097
2097
  var a = pp(n);
2098
2098
  return a.host ? Md(a.host, t) : Md(n, pp(t).host);
2099
2099
  }
2100
- function Kl(n) {
2100
+ function Jl(n) {
2101
2101
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "top", e = t === "top" ? "scrollTop" : "scrollLeft", i = n.nodeName;
2102
2102
  if (i === "BODY" || i === "HTML") {
2103
2103
  var r = n.ownerDocument.documentElement, s = n.ownerDocument.scrollingElement || r;
@@ -2106,7 +2106,7 @@ function Kl(n) {
2106
2106
  return n[e];
2107
2107
  }
2108
2108
  function Y1(n, t) {
2109
- var e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, i = Kl(t, "top"), r = Kl(t, "left"), s = e ? -1 : 1;
2109
+ var e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, i = Jl(t, "top"), r = Jl(t, "left"), s = e ? -1 : 1;
2110
2110
  return n.top += i * s, n.bottom += i * s, n.left += r * s, n.right += r * s, n;
2111
2111
  }
2112
2112
  function lb(n, t) {
@@ -2114,10 +2114,10 @@ function lb(n, t) {
2114
2114
  return parseFloat(n["border" + e + "Width"]) + parseFloat(n["border" + i + "Width"]);
2115
2115
  }
2116
2116
  function cb(n, t, e, i) {
2117
- return Math.max(t["offset" + n], t["scroll" + n], e["client" + n], e["offset" + n], e["scroll" + n], ec(10) ? parseInt(e["offset" + n]) + parseInt(i["margin" + (n === "Height" ? "Top" : "Left")]) + parseInt(i["margin" + (n === "Height" ? "Bottom" : "Right")]) : 0);
2117
+ return Math.max(t["offset" + n], t["scroll" + n], e["client" + n], e["offset" + n], e["scroll" + n], nc(10) ? parseInt(e["offset" + n]) + parseInt(i["margin" + (n === "Height" ? "Top" : "Left")]) + parseInt(i["margin" + (n === "Height" ? "Bottom" : "Right")]) : 0);
2118
2118
  }
2119
2119
  function t0(n) {
2120
- var t = n.body, e = n.documentElement, i = ec(10) && getComputedStyle(e);
2120
+ var t = n.body, e = n.documentElement, i = nc(10) && getComputedStyle(e);
2121
2121
  return {
2122
2122
  height: cb("Height", t, e, i),
2123
2123
  width: cb("Width", t, e, i)
@@ -2136,7 +2136,7 @@ var X1 = function(n, t) {
2136
2136
  return function(t, e, i) {
2137
2137
  return e && n(t.prototype, e), i && n(t, i), t;
2138
2138
  };
2139
- }(), Jl = function(n, t, e) {
2139
+ }(), Ql = function(n, t, e) {
2140
2140
  return t in n ? Object.defineProperty(n, t, {
2141
2141
  value: e,
2142
2142
  enumerable: !0,
@@ -2160,9 +2160,9 @@ function Ys(n) {
2160
2160
  function gp(n) {
2161
2161
  var t = {};
2162
2162
  try {
2163
- if (ec(10)) {
2163
+ if (nc(10)) {
2164
2164
  t = n.getBoundingClientRect();
2165
- var e = Kl(n, "top"), i = Kl(n, "left");
2165
+ var e = Jl(n, "top"), i = Jl(n, "left");
2166
2166
  t.top += e, t.left += i, t.bottom += e, t.right += i;
2167
2167
  } else
2168
2168
  t = n.getBoundingClientRect();
@@ -2181,7 +2181,7 @@ function gp(n) {
2181
2181
  return Ys(r);
2182
2182
  }
2183
2183
  function Xg(n, t) {
2184
- var e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, i = ec(10), r = t.nodeName === "HTML", s = gp(n), o = gp(t), a = _h(n), l = Sa(t), u = parseFloat(l.borderTopWidth), h = parseFloat(l.borderLeftWidth);
2184
+ var e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, i = nc(10), r = t.nodeName === "HTML", s = gp(n), o = gp(t), a = _h(n), l = Sa(t), u = parseFloat(l.borderTopWidth), h = parseFloat(l.borderLeftWidth);
2185
2185
  e && r && (o.top = Math.max(o.top, 0), o.left = Math.max(o.left, 0));
2186
2186
  var d = Ys({
2187
2187
  top: s.top - o.top - u,
@@ -2196,7 +2196,7 @@ function Xg(n, t) {
2196
2196
  return (i && !e ? t.contains(a) : t === a && a.nodeName !== "BODY") && (d = Y1(d, t)), d;
2197
2197
  }
2198
2198
  function J1(n) {
2199
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, e = n.ownerDocument.documentElement, i = Xg(n, e), r = Math.max(e.clientWidth, window.innerWidth || 0), s = Math.max(e.clientHeight, window.innerHeight || 0), o = t ? 0 : Kl(e), a = t ? 0 : Kl(e, "left"), l = {
2199
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, e = n.ownerDocument.documentElement, i = Xg(n, e), r = Math.max(e.clientWidth, window.innerWidth || 0), s = Math.max(e.clientHeight, window.innerHeight || 0), o = t ? 0 : Jl(e), a = t ? 0 : Jl(e, "left"), l = {
2200
2200
  top: o - i.top + i.marginTop,
2201
2201
  left: a - i.left + i.marginLeft,
2202
2202
  width: r,
@@ -2214,7 +2214,7 @@ function e0(n) {
2214
2214
  return e ? e0(e) : !1;
2215
2215
  }
2216
2216
  function n0(n) {
2217
- if (!n || !n.parentElement || ec())
2217
+ if (!n || !n.parentElement || nc())
2218
2218
  return document.documentElement;
2219
2219
  for (var t = n.parentElement; t && Sa(t, "transform") === "none"; )
2220
2220
  t = t.parentElement;
@@ -2416,7 +2416,7 @@ function hA(n, t) {
2416
2416
  return E.name === "applyStyle";
2417
2417
  }).gpuAcceleration;
2418
2418
  s !== void 0 && console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");
2419
- var o = s !== void 0 ? s : t.gpuAcceleration, a = Xl(n.instance.popper), l = gp(a), u = {
2419
+ var o = s !== void 0 ? s : t.gpuAcceleration, a = Kl(n.instance.popper), l = gp(a), u = {
2420
2420
  position: r.position
2421
2421
  }, h = cA(n, window.devicePixelRatio < 2 || !uA), d = e === "bottom" ? "top" : "bottom", f = i === "right" ? "left" : "right", p = Jg("transform"), g = void 0, m = void 0;
2422
2422
  if (d === "bottom" ? a.nodeName === "HTML" ? m = -a.clientHeight + h.bottom : m = -l.height + h.bottom : m = h.top, f === "right" ? a.nodeName === "HTML" ? g = -a.clientWidth + h.right : g = -l.width + h.right : g = h.left, o && p)
@@ -2456,7 +2456,7 @@ function dA(n, t) {
2456
2456
  var r = n.placement.split("-")[0], s = n.offsets, o = s.popper, a = s.reference, l = ["left", "right"].indexOf(r) !== -1, u = l ? "height" : "width", h = l ? "Top" : "Left", d = h.toLowerCase(), f = l ? "left" : "top", p = l ? "bottom" : "right", g = s0(i)[u];
2457
2457
  a[p] - g < o[d] && (n.offsets.popper[d] -= o[d] - (a[p] - g)), a[d] + g > o[p] && (n.offsets.popper[d] += a[d] + g - o[p]), n.offsets.popper = Ys(n.offsets.popper);
2458
2458
  var m = a[d] + a[u] / 2 - g / 2, v = Sa(n.instance.popper), b = parseFloat(v["margin" + h]), w = parseFloat(v["border" + h + "Width"]), E = m - n.offsets.popper[d] - b - w;
2459
- return E = Math.max(Math.min(o[u] - g, E), 0), n.arrowElement = i, n.offsets.arrow = (e = {}, Jl(e, d, Math.round(E)), Jl(e, f, ""), e), n;
2459
+ return E = Math.max(Math.min(o[u] - g, E), 0), n.arrowElement = i, n.offsets.arrow = (e = {}, Ql(e, d, Math.round(E)), Ql(e, f, ""), e), n;
2460
2460
  }
2461
2461
  function fA(n) {
2462
2462
  return n === "end" ? "start" : n === "start" ? "end" : n;
@@ -2549,8 +2549,8 @@ function yA(n, t) {
2549
2549
  return Qg(+e) ? l = [+e, 0] : l = bA(e, s, o, a), a === "left" ? (s.top += l[0], s.left -= l[1]) : a === "right" ? (s.top += l[0], s.left += l[1]) : a === "top" ? (s.left += l[0], s.top -= l[1]) : a === "bottom" && (s.left += l[0], s.top += l[1]), n.popper = s, n;
2550
2550
  }
2551
2551
  function vA(n, t) {
2552
- var e = t.boundariesElement || Xl(n.instance.popper);
2553
- n.instance.reference === e && (e = Xl(e));
2552
+ var e = t.boundariesElement || Kl(n.instance.popper);
2553
+ n.instance.reference === e && (e = Kl(e));
2554
2554
  var i = Jg("transform"), r = n.instance.popper.style, s = r.top, o = r.left, a = r[i];
2555
2555
  r.top = "", r.left = "", r[i] = "";
2556
2556
  var l = Kg(n.instance.popper, n.instance.reference, t.padding, e, n.positionFixed);
@@ -2558,11 +2558,11 @@ function vA(n, t) {
2558
2558
  var u = t.priority, h = n.offsets.popper, d = {
2559
2559
  primary: function(p) {
2560
2560
  var g = h[p];
2561
- return h[p] < l[p] && !t.escapeWithReference && (g = Math.max(h[p], l[p])), Jl({}, p, g);
2561
+ return h[p] < l[p] && !t.escapeWithReference && (g = Math.max(h[p], l[p])), Ql({}, p, g);
2562
2562
  },
2563
2563
  secondary: function(p) {
2564
2564
  var g = p === "right" ? "left" : "top", m = h[g];
2565
- return h[p] > l[p] && !t.escapeWithReference && (m = Math.min(h[g], l[p] - (p === "right" ? h.width : h.height))), Jl({}, g, m);
2565
+ return h[p] > l[p] && !t.escapeWithReference && (m = Math.min(h[g], l[p] - (p === "right" ? h.width : h.height))), Ql({}, g, m);
2566
2566
  }
2567
2567
  };
2568
2568
  return u.forEach(function(f) {
@@ -2574,8 +2574,8 @@ function wA(n) {
2574
2574
  var t = n.placement, e = t.split("-")[0], i = t.split("-")[1];
2575
2575
  if (i) {
2576
2576
  var r = n.offsets, s = r.reference, o = r.popper, a = ["bottom", "top"].indexOf(e) !== -1, l = a ? "left" : "top", u = a ? "width" : "height", h = {
2577
- start: Jl({}, l, s[l]),
2578
- end: Jl({}, l, s[l] + s[u] - o[u])
2577
+ start: Ql({}, l, s[l]),
2578
+ end: Ql({}, l, s[l] + s[u] - o[u])
2579
2579
  };
2580
2580
  n.offsets.popper = Ai({}, o, h[i]);
2581
2581
  }
@@ -3074,7 +3074,7 @@ function Gi(n) {
3074
3074
  function TA(n) {
3075
3075
  return _A.includes(n);
3076
3076
  }
3077
- function nc(n) {
3077
+ function ic(n) {
3078
3078
  return function(t) {
3079
3079
  return typeof t === n;
3080
3080
  };
@@ -3116,7 +3116,7 @@ F.asyncGeneratorFunction = function(n) {
3116
3116
  return gf(n) === "AsyncGeneratorFunction";
3117
3117
  };
3118
3118
  F.asyncFunction = Gi("AsyncFunction");
3119
- F.bigint = nc("bigint");
3119
+ F.bigint = ic("bigint");
3120
3120
  F.boolean = function(n) {
3121
3121
  return n === !0 || n === !1;
3122
3122
  };
@@ -3133,7 +3133,7 @@ F.empty = function(n) {
3133
3133
  return F.string(n) && n.length === 0 || F.array(n) && n.length === 0 || F.object(n) && !F.map(n) && !F.set(n) && Object.keys(n).length === 0 || F.set(n) && n.size === 0 || F.map(n) && n.size === 0;
3134
3134
  };
3135
3135
  F.error = Gi("Error");
3136
- F.function = nc("function");
3136
+ F.function = ic("function");
3137
3137
  F.generator = function(n) {
3138
3138
  return F.iterable(n) && F.function(n.next) && F.function(n.throw);
3139
3139
  };
@@ -3155,7 +3155,7 @@ F.nullOrUndefined = function(n) {
3155
3155
  return F.null(n) || F.undefined(n);
3156
3156
  };
3157
3157
  F.number = function(n) {
3158
- return nc("number")(n) && !F.nan(n);
3158
+ return ic("number")(n) && !F.nan(n);
3159
3159
  };
3160
3160
  F.numericString = function(n) {
3161
3161
  return F.string(n) && n.length > 0 && !Number.isNaN(Number(n));
@@ -3185,9 +3185,9 @@ F.propertyOf = function(n, t, e) {
3185
3185
  };
3186
3186
  F.regexp = Gi("RegExp");
3187
3187
  F.set = Gi("Set");
3188
- F.string = nc("string");
3189
- F.symbol = nc("symbol");
3190
- F.undefined = nc("undefined");
3188
+ F.string = ic("string");
3189
+ F.symbol = ic("symbol");
3190
+ F.undefined = ic("undefined");
3191
3191
  F.weakMap = Gi("WeakMap");
3192
3192
  F.weakSet = Gi("WeakSet");
3193
3193
  function f0(n) {
@@ -3376,7 +3376,7 @@ function bb(n) {
3376
3376
  }) : $n(n, t);
3377
3377
  };
3378
3378
  }
3379
- function dc(n, t) {
3379
+ function fc(n, t) {
3380
3380
  return F.array(n) ? n.some(function(e) {
3381
3381
  return $n(e, t);
3382
3382
  }) : $n(n, t);
@@ -3422,7 +3422,7 @@ function BA(n, t) {
3422
3422
  try {
3423
3423
  var g = Ar(n, d), m = Ar(t, d), v = F.defined(f), b = F.defined(p);
3424
3424
  if (v || b) {
3425
- var w = b ? dc(p, g) : !dc(f, g), E = dc(f, m);
3425
+ var w = b ? fc(p, g) : !fc(f, g), E = fc(f, m);
3426
3426
  return w && E;
3427
3427
  }
3428
3428
  return [g, m].every(F.array) || [g, m].every(F.plainObject) ? !$n(g, m) : g !== m;
@@ -3434,7 +3434,7 @@ function BA(n, t) {
3434
3434
  return !1;
3435
3435
  try {
3436
3436
  var g = Ar(n, d), m = Ar(t, d), v = F.defined(p);
3437
- return dc(f, g) && (v ? dc(p, m) : !v);
3437
+ return fc(f, g) && (v ? fc(p, m) : !v);
3438
3438
  } catch {
3439
3439
  return !1;
3440
3440
  }
@@ -3634,7 +3634,7 @@ function vb(n, t, e) {
3634
3634
  return XA(t, i, r, s) ? KA(i, r) ? n.apply(void 0, [i, r, s].concat(a)) : JA(i, r, s) : n.apply(void 0, [i, r, s].concat(a));
3635
3635
  };
3636
3636
  }
3637
- var Ht = { INIT: "init", IDLE: "idle", OPENING: "opening", OPEN: "open", CLOSING: "closing" }, fc = Jh.createPortal !== void 0;
3637
+ var Ht = { INIT: "init", IDLE: "idle", OPENING: "opening", OPEN: "open", CLOSING: "closing" }, pc = Jh.createPortal !== void 0;
3638
3638
  function vr() {
3639
3639
  return !!(typeof window < "u" && window.document && window.document.createElement);
3640
3640
  }
@@ -3670,18 +3670,18 @@ var b0 = /* @__PURE__ */ function(n) {
3670
3670
  return Th(this, e), t.apply(this, arguments);
3671
3671
  }
3672
3672
  return Ph(e, [{ key: "componentDidMount", value: function() {
3673
- vr() && (this.node || this.appendNode(), fc || this.renderPortal());
3673
+ vr() && (this.node || this.appendNode(), pc || this.renderPortal());
3674
3674
  } }, { key: "componentDidUpdate", value: function() {
3675
- vr() && (fc || this.renderPortal());
3675
+ vr() && (pc || this.renderPortal());
3676
3676
  } }, { key: "componentWillUnmount", value: function() {
3677
- !vr() || !this.node || (fc || Jh.unmountComponentAtNode(this.node), this.node && this.node.parentNode === document.body && (document.body.removeChild(this.node), this.node = void 0));
3677
+ !vr() || !this.node || (pc || Jh.unmountComponentAtNode(this.node), this.node && this.node.parentNode === document.body && (document.body.removeChild(this.node), this.node = void 0));
3678
3678
  } }, { key: "appendNode", value: function() {
3679
3679
  var r = this.props, s = r.id, o = r.zIndex;
3680
3680
  this.node || (this.node = document.createElement("div"), s && (this.node.id = s), o && (this.node.style.zIndex = o), document.body.appendChild(this.node));
3681
3681
  } }, { key: "renderPortal", value: function() {
3682
3682
  if (!vr()) return null;
3683
3683
  var r = this.props, s = r.children, o = r.setRef;
3684
- if (this.node || this.appendNode(), fc)
3684
+ if (this.node || this.appendNode(), pc)
3685
3685
  return /* @__PURE__ */ Jh.createPortal(s, this.node);
3686
3686
  var a = Jh.unstable_renderSubtreeIntoContainer(this, s.length > 1 ? /* @__PURE__ */ kt.createElement("div", null, s) : s[0], this.node);
3687
3687
  return o(a), null;
@@ -3689,7 +3689,7 @@ var b0 = /* @__PURE__ */ function(n) {
3689
3689
  var r = this.props, s = r.hasChildren, o = r.placement, a = r.target;
3690
3690
  return s ? this.renderPortal() : a || o === "center" ? this.renderPortal() : null;
3691
3691
  } }, { key: "render", value: function() {
3692
- return fc ? this.renderReact16() : null;
3692
+ return pc ? this.renderReact16() : null;
3693
3693
  } }]), e;
3694
3694
  }(kt.Component);
3695
3695
  pn(b0, "propTypes", { children: K.oneOfType([K.element, K.array]), hasChildren: K.bool, id: K.oneOfType([K.string, K.number]), placement: K.string, setRef: K.func.isRequired, target: K.oneOfType([K.object, K.string]), zIndex: K.number });
@@ -3996,11 +3996,11 @@ function Oh(n, t) {
3996
3996
  function hS(n) {
3997
3997
  return n.offsetParent !== document.body;
3998
3998
  }
3999
- function Ql(n, t = "fixed") {
3999
+ function Zl(n, t = "fixed") {
4000
4000
  if (!n || !(n instanceof HTMLElement))
4001
4001
  return !1;
4002
4002
  const { nodeName: e } = n, i = uS(n);
4003
- return e === "BODY" || e === "HTML" ? !1 : i && i.position === t ? !0 : n.parentNode ? Ql(n.parentNode, t) : !1;
4003
+ return e === "BODY" || e === "HTML" ? !1 : i && i.position === t ? !0 : n.parentNode ? Zl(n.parentNode, t) : !1;
4004
4004
  }
4005
4005
  function dS(n) {
4006
4006
  var t;
@@ -4019,12 +4019,12 @@ function dS(n) {
4019
4019
  }
4020
4020
  function fS(n, t, e) {
4021
4021
  var i, r, s;
4022
- const o = S0(n), a = Yc(n, e), l = Oh(n, e), u = Ql(n);
4022
+ const o = S0(n), a = Yc(n, e), l = Oh(n, e), u = Zl(n);
4023
4023
  let h = 0, d = (i = o == null ? void 0 : o.top) != null ? i : 0;
4024
4024
  if (l && u) {
4025
4025
  const f = (r = n == null ? void 0 : n.offsetTop) != null ? r : 0, p = (s = a == null ? void 0 : a.scrollTop) != null ? s : 0;
4026
4026
  d = f - p;
4027
- } else a instanceof HTMLElement && (h = a.scrollTop, !l && !Ql(n) && (d += h), a.isSameNode(ho()) || (d += ho().scrollTop));
4027
+ } else a instanceof HTMLElement && (h = a.scrollTop, !l && !Zl(n) && (d += h), a.isSameNode(ho()) || (d += ho().scrollTop));
4028
4028
  return Math.floor(d - t);
4029
4029
  }
4030
4030
  function pS(n, t, e) {
@@ -4048,7 +4048,7 @@ function gS(n, t) {
4048
4048
  p1.top(i, n, { duration: a < 100 ? 50 : e }, (l) => l && l.message !== "Element already at target scroll position" ? s(l) : r());
4049
4049
  });
4050
4050
  }
4051
- var pc = jx !== void 0;
4051
+ var gc = jx !== void 0;
4052
4052
  function E0(n = navigator.userAgent) {
4053
4053
  let t = n;
4054
4054
  return typeof window > "u" ? t = "node" : document.documentMode ? t = "ie" : /Edge/.test(n) ? t = "edge" : window.opera || n.includes(" OPR/") ? t = "opera" : typeof window.InstallTrigger < "u" ? t = "firefox" : window.chrome ? t = "chrome" : /(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(n) && (t = "safari"), t;
@@ -4134,7 +4134,7 @@ function vp(n, t, e) {
4134
4134
  }
4135
4135
  function wS(n) {
4136
4136
  const { isFirstStep: t, lifecycle: e, previousLifecycle: i, scrollToFirstStep: r, step: s, target: o } = n;
4137
- return !s.disableScrolling && (!t || r || e === _t.TOOLTIP) && s.placement !== "center" && (!s.isFixed || !Ql(o)) && // fixed steps don't need to scroll
4137
+ return !s.disableScrolling && (!t || r || e === _t.TOOLTIP) && s.placement !== "center" && (!s.isFixed || !Zl(o)) && // fixed steps don't need to scroll
4138
4138
  i !== e && [_t.BEACON, _t.TOOLTIP].includes(e);
4139
4139
  }
4140
4140
  var xS = {
@@ -4203,7 +4203,7 @@ var xS = {
4203
4203
  textColor: "#333",
4204
4204
  width: 380,
4205
4205
  zIndex: 100
4206
- }, gc = {
4206
+ }, mc = {
4207
4207
  backgroundColor: "transparent",
4208
4208
  border: 0,
4209
4209
  borderRadius: 0,
@@ -4232,7 +4232,7 @@ function kS(n, t) {
4232
4232
  zIndex: d.zIndex
4233
4233
  }, m = {
4234
4234
  beacon: {
4235
- ...gc,
4235
+ ...mc,
4236
4236
  display: f ? "none" : "inline-block",
4237
4237
  height: d.beaconSize,
4238
4238
  position: "relative",
@@ -4299,19 +4299,19 @@ function kS(n, t) {
4299
4299
  flex: 1
4300
4300
  },
4301
4301
  buttonNext: {
4302
- ...gc,
4302
+ ...mc,
4303
4303
  backgroundColor: d.primaryColor,
4304
4304
  borderRadius: 4,
4305
4305
  color: "#fff"
4306
4306
  },
4307
4307
  buttonBack: {
4308
- ...gc,
4308
+ ...mc,
4309
4309
  color: d.primaryColor,
4310
4310
  marginLeft: "auto",
4311
4311
  marginRight: 5
4312
4312
  },
4313
4313
  buttonClose: {
4314
- ...gc,
4314
+ ...mc,
4315
4315
  color: d.textColor,
4316
4316
  height: 14,
4317
4317
  padding: 15,
@@ -4321,7 +4321,7 @@ function kS(n, t) {
4321
4321
  width: 14
4322
4322
  },
4323
4323
  buttonSkip: {
4324
- ...gc,
4324
+ ...mc,
4325
4325
  color: d.textColor,
4326
4326
  fontSize: 14
4327
4327
  },
@@ -4625,7 +4625,7 @@ var RS = PS, IS = class extends Ut.Component {
4625
4625
  e || this.updateState({ isScrolling: !0, showSpotlight: !1 }), clearTimeout(this.scrollTimeout), this.scrollTimeout = window.setTimeout(() => {
4626
4626
  this.updateState({ isScrolling: !1, showSpotlight: !0 });
4627
4627
  }, 50);
4628
- } else Ql(t, "sticky") && this.updateState({});
4628
+ } else Zl(t, "sticky") && this.updateState({});
4629
4629
  }), ct(this, "handleResize", () => {
4630
4630
  clearTimeout(this.resizeTimeout), this.resizeTimeout = window.setTimeout(() => {
4631
4631
  this.isActive && this.forceUpdate();
@@ -4674,7 +4674,7 @@ var RS = PS, IS = class extends Ut.Component {
4674
4674
  spotlightPadding: o = 0,
4675
4675
  styles: a,
4676
4676
  target: l
4677
- } = this.props, u = ss(l), h = S0(u), d = Ql(u), f = fS(u, o, r);
4677
+ } = this.props, u = ss(l), h = S0(u), d = Zl(u), f = fS(u, o, r);
4678
4678
  return {
4679
4679
  ...Ab() ? a.spotlightLegacy : a.spotlight,
4680
4680
  height: Math.round(((n = h == null ? void 0 : h.height) != null ? n : 0) + o * 2),
@@ -4717,13 +4717,13 @@ var RS = PS, IS = class extends Ut.Component {
4717
4717
  }
4718
4718
  componentDidMount() {
4719
4719
  const { id: n } = this.props;
4720
- gs() && (this.node = document.createElement("div"), this.node.id = n, document.body.appendChild(this.node), pc || this.renderReact15());
4720
+ gs() && (this.node = document.createElement("div"), this.node.id = n, document.body.appendChild(this.node), gc || this.renderReact15());
4721
4721
  }
4722
4722
  componentDidUpdate() {
4723
- gs() && (pc || this.renderReact15());
4723
+ gs() && (gc || this.renderReact15());
4724
4724
  }
4725
4725
  componentWillUnmount() {
4726
- !gs() || !this.node || (pc || Mf.unmountComponentAtNode(this.node), this.node.parentNode === document.body && (document.body.removeChild(this.node), this.node = null));
4726
+ !gs() || !this.node || (gc || Mf.unmountComponentAtNode(this.node), this.node.parentNode === document.body && (document.body.removeChild(this.node), this.node = null));
4727
4727
  }
4728
4728
  renderReact15() {
4729
4729
  if (!gs())
@@ -4732,13 +4732,13 @@ var RS = PS, IS = class extends Ut.Component {
4732
4732
  this.node && Mf.unstable_renderSubtreeIntoContainer(this, n, this.node);
4733
4733
  }
4734
4734
  renderReact16() {
4735
- if (!gs() || !pc)
4735
+ if (!gs() || !gc)
4736
4736
  return null;
4737
4737
  const { children: n } = this.props;
4738
4738
  return this.node ? Mf.createPortal(n, this.node) : null;
4739
4739
  }
4740
4740
  render() {
4741
- return pc ? this.renderReact16() : null;
4741
+ return gc ? this.renderReact16() : null;
4742
4742
  }
4743
4743
  }, MS = class {
4744
4744
  constructor(n, t) {
@@ -5373,33 +5373,33 @@ const R0 = "chatui_tour_done_v1", HS = () => {
5373
5373
  }
5374
5374
  };
5375
5375
  function WS() {
5376
- const [n, t] = ye(HS());
5377
- vi(() => {
5378
- const r = () => t(!0);
5379
- return window.addEventListener("start-chat-tour", r), () => window.removeEventListener("start-chat-tour", r);
5380
- }, []), vi(() => {
5381
- var o;
5376
+ const [n, t] = fe(HS());
5377
+ si(() => {
5378
+ const a = () => t(!0);
5379
+ return window.addEventListener("start-chat-tour", a), () => window.removeEventListener("start-chat-tour", a);
5380
+ }, []), si(() => {
5381
+ var u;
5382
5382
  if (!n) return;
5383
- const r = "tour-overflow-fix";
5384
- let s = document.getElementById(r);
5385
- s || (s = document.createElement("style"), s.id = r, s.textContent = ".messages-main{overflow:auto !important;}", document.head.appendChild(s));
5383
+ const a = "tour-overflow-fix";
5384
+ let l = document.getElementById(a);
5385
+ l || (l = document.createElement("style"), l.id = a, l.textContent = ".messages-main{overflow:auto !important;}", document.head.appendChild(l));
5386
5386
  try {
5387
- (o = document.querySelector(".messages-main")) == null || o.style.removeProperty("overflow");
5387
+ (u = document.querySelector(".messages-main")) == null || u.style.removeProperty("overflow");
5388
5388
  } catch {
5389
5389
  }
5390
5390
  return () => {
5391
- var a;
5391
+ var h;
5392
5392
  try {
5393
- s && s.remove();
5393
+ l && l.remove();
5394
5394
  } catch {
5395
5395
  }
5396
5396
  try {
5397
- (a = document.querySelector(".messages-main")) == null || a.style.removeProperty("overflow");
5397
+ (h = document.querySelector(".messages-main")) == null || h.style.removeProperty("overflow");
5398
5398
  } catch {
5399
5399
  }
5400
5400
  };
5401
5401
  }, [n]);
5402
- const e = Ac(() => [
5402
+ const e = ja(() => [
5403
5403
  {
5404
5404
  target: ".chat-container",
5405
5405
  placement: "center",
@@ -5439,21 +5439,51 @@ function WS() {
5439
5439
  content: "Create a fresh conversation anytime to keep topics organized.",
5440
5440
  placement: "right"
5441
5441
  }
5442
- ], []), i = Bn((r) => {
5443
- var a;
5444
- const { status: s } = r;
5445
- if (s === Nt.FINISHED || s === Nt.SKIPPED) {
5442
+ ], []), i = ja(() => {
5443
+ const a = (u) => {
5444
+ try {
5445
+ return !!document.querySelector(u);
5446
+ } catch {
5447
+ return !1;
5448
+ }
5449
+ };
5450
+ return e.map((u, h) => {
5451
+ const d = typeof u.target == "string" ? u.target : "";
5452
+ return d && a(d) ? u : (console.debug("[tour] step", h, "missing target:", d, "-> fallback to .chat-container"), { ...u, target: ".chat-container", placement: "center" });
5453
+ });
5454
+ }, [e, n]), r = Bn((a) => {
5455
+ var h;
5456
+ const { status: l } = a;
5457
+ if (l === Nt.FINISHED || l === Nt.SKIPPED) {
5446
5458
  US(), t(!1);
5447
5459
  try {
5448
- (a = document.querySelector(".messages-main")) == null || a.style.removeProperty("overflow");
5460
+ (h = document.querySelector(".messages-main")) == null || h.style.removeProperty("overflow");
5449
5461
  } catch {
5450
5462
  }
5451
5463
  }
5452
- }, []);
5453
- return /* @__PURE__ */ I.jsx(I.Fragment, { children: n && /* @__PURE__ */ I.jsx(
5464
+ }, []), [s, o] = fe(!1);
5465
+ return si(() => {
5466
+ if (!n) {
5467
+ o(!1);
5468
+ return;
5469
+ }
5470
+ let a = 0, l = 0;
5471
+ return a = requestAnimationFrame(() => {
5472
+ l = requestAnimationFrame(() => o(!0));
5473
+ }), () => {
5474
+ try {
5475
+ cancelAnimationFrame(a);
5476
+ } catch {
5477
+ }
5478
+ try {
5479
+ cancelAnimationFrame(l);
5480
+ } catch {
5481
+ }
5482
+ };
5483
+ }, [n]), /* @__PURE__ */ I.jsx(I.Fragment, { children: n && s && /* @__PURE__ */ I.jsx(
5454
5484
  $S,
5455
5485
  {
5456
- steps: e,
5486
+ steps: i,
5457
5487
  run: n,
5458
5488
  continuous: !0,
5459
5489
  showSkipButton: !0,
@@ -5468,7 +5498,7 @@ function WS() {
5468
5498
  }
5469
5499
  },
5470
5500
  spotlightClicks: !0,
5471
- callback: i
5501
+ callback: r
5472
5502
  }
5473
5503
  ) });
5474
5504
  }
@@ -5542,7 +5572,7 @@ Hn.prototype.property = "";
5542
5572
  Hn.prototype.spaceSeparated = !1;
5543
5573
  Hn.prototype.space = void 0;
5544
5574
  let JS = 0;
5545
- const Tt = Ea(), Ne = Ea(), xp = Ea(), G = Ea(), fe = Ea(), Ba = Ea(), Wn = Ea();
5575
+ const Tt = Ea(), Ne = Ea(), xp = Ea(), G = Ea(), pe = Ea(), $a = Ea(), Wn = Ea();
5546
5576
  function Ea() {
5547
5577
  return 2 ** ++JS;
5548
5578
  }
@@ -5551,10 +5581,10 @@ const Ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5551
5581
  boolean: Tt,
5552
5582
  booleanish: Ne,
5553
5583
  commaOrSpaceSeparated: Wn,
5554
- commaSeparated: Ba,
5584
+ commaSeparated: $a,
5555
5585
  number: G,
5556
5586
  overloadedBoolean: xp,
5557
- spaceSeparated: fe
5587
+ spaceSeparated: pe
5558
5588
  }, Symbol.toStringTag, { value: "Module" })), Uf = (
5559
5589
  /** @type {ReadonlyArray<keyof typeof types>} */
5560
5590
  Object.keys(Ap)
@@ -5586,7 +5616,7 @@ em.prototype.defined = !0;
5586
5616
  function Tb(n, t, e) {
5587
5617
  e && (n[t] = e);
5588
5618
  }
5589
- function ic(n) {
5619
+ function rc(n) {
5590
5620
  const t = {}, e = {};
5591
5621
  for (const [i, r] of Object.entries(n.properties)) {
5592
5622
  const s = new em(
@@ -5599,7 +5629,7 @@ function ic(n) {
5599
5629
  }
5600
5630
  return new Mh(t, e, n.space);
5601
5631
  }
5602
- const O0 = ic({
5632
+ const O0 = rc({
5603
5633
  properties: {
5604
5634
  ariaActiveDescendant: null,
5605
5635
  ariaAtomic: Ne,
@@ -5609,36 +5639,36 @@ const O0 = ic({
5609
5639
  ariaColCount: G,
5610
5640
  ariaColIndex: G,
5611
5641
  ariaColSpan: G,
5612
- ariaControls: fe,
5642
+ ariaControls: pe,
5613
5643
  ariaCurrent: null,
5614
- ariaDescribedBy: fe,
5644
+ ariaDescribedBy: pe,
5615
5645
  ariaDetails: null,
5616
5646
  ariaDisabled: Ne,
5617
- ariaDropEffect: fe,
5647
+ ariaDropEffect: pe,
5618
5648
  ariaErrorMessage: null,
5619
5649
  ariaExpanded: Ne,
5620
- ariaFlowTo: fe,
5650
+ ariaFlowTo: pe,
5621
5651
  ariaGrabbed: Ne,
5622
5652
  ariaHasPopup: null,
5623
5653
  ariaHidden: Ne,
5624
5654
  ariaInvalid: null,
5625
5655
  ariaKeyShortcuts: null,
5626
5656
  ariaLabel: null,
5627
- ariaLabelledBy: fe,
5657
+ ariaLabelledBy: pe,
5628
5658
  ariaLevel: G,
5629
5659
  ariaLive: null,
5630
5660
  ariaModal: Ne,
5631
5661
  ariaMultiLine: Ne,
5632
5662
  ariaMultiSelectable: Ne,
5633
5663
  ariaOrientation: null,
5634
- ariaOwns: fe,
5664
+ ariaOwns: pe,
5635
5665
  ariaPlaceholder: null,
5636
5666
  ariaPosInSet: G,
5637
5667
  ariaPressed: Ne,
5638
5668
  ariaReadOnly: Ne,
5639
5669
  ariaRelevant: null,
5640
5670
  ariaRequired: Ne,
5641
- ariaRoleDescription: fe,
5671
+ ariaRoleDescription: pe,
5642
5672
  ariaRowCount: G,
5643
5673
  ariaRowIndex: G,
5644
5674
  ariaRowSpan: G,
@@ -5661,7 +5691,7 @@ function M0(n, t) {
5661
5691
  function L0(n, t) {
5662
5692
  return M0(n, t.toLowerCase());
5663
5693
  }
5664
- const QS = ic({
5694
+ const QS = rc({
5665
5695
  attributes: {
5666
5696
  acceptcharset: "accept-charset",
5667
5697
  classname: "class",
@@ -5672,9 +5702,9 @@ const QS = ic({
5672
5702
  properties: {
5673
5703
  // Standard Properties.
5674
5704
  abbr: null,
5675
- accept: Ba,
5676
- acceptCharset: fe,
5677
- accessKey: fe,
5705
+ accept: $a,
5706
+ acceptCharset: pe,
5707
+ accessKey: pe,
5678
5708
  action: null,
5679
5709
  allow: null,
5680
5710
  allowFullScreen: Tt,
@@ -5684,22 +5714,22 @@ const QS = ic({
5684
5714
  as: null,
5685
5715
  async: Tt,
5686
5716
  autoCapitalize: null,
5687
- autoComplete: fe,
5717
+ autoComplete: pe,
5688
5718
  autoFocus: Tt,
5689
5719
  autoPlay: Tt,
5690
- blocking: fe,
5720
+ blocking: pe,
5691
5721
  capture: null,
5692
5722
  charSet: null,
5693
5723
  checked: Tt,
5694
5724
  cite: null,
5695
- className: fe,
5725
+ className: pe,
5696
5726
  cols: G,
5697
5727
  colSpan: null,
5698
5728
  content: null,
5699
5729
  contentEditable: Ne,
5700
5730
  controls: Tt,
5701
- controlsList: fe,
5702
- coords: G | Ba,
5731
+ controlsList: pe,
5732
+ coords: G | $a,
5703
5733
  crossOrigin: null,
5704
5734
  data: null,
5705
5735
  dateTime: null,
@@ -5720,14 +5750,14 @@ const QS = ic({
5720
5750
  formMethod: null,
5721
5751
  formNoValidate: Tt,
5722
5752
  formTarget: null,
5723
- headers: fe,
5753
+ headers: pe,
5724
5754
  height: G,
5725
5755
  hidden: xp,
5726
5756
  high: G,
5727
5757
  href: null,
5728
5758
  hrefLang: null,
5729
- htmlFor: fe,
5730
- httpEquiv: fe,
5759
+ htmlFor: pe,
5760
+ httpEquiv: pe,
5731
5761
  id: null,
5732
5762
  imageSizes: null,
5733
5763
  imageSrcSet: null,
@@ -5737,10 +5767,10 @@ const QS = ic({
5737
5767
  is: null,
5738
5768
  isMap: Tt,
5739
5769
  itemId: null,
5740
- itemProp: fe,
5741
- itemRef: fe,
5770
+ itemProp: pe,
5771
+ itemRef: pe,
5742
5772
  itemScope: Tt,
5743
- itemType: fe,
5773
+ itemType: pe,
5744
5774
  kind: null,
5745
5775
  label: null,
5746
5776
  lang: null,
@@ -5853,7 +5883,7 @@ const QS = ic({
5853
5883
  open: Tt,
5854
5884
  optimum: G,
5855
5885
  pattern: null,
5856
- ping: fe,
5886
+ ping: pe,
5857
5887
  placeholder: null,
5858
5888
  playsInline: Tt,
5859
5889
  popover: null,
@@ -5863,12 +5893,12 @@ const QS = ic({
5863
5893
  preload: null,
5864
5894
  readOnly: Tt,
5865
5895
  referrerPolicy: null,
5866
- rel: fe,
5896
+ rel: pe,
5867
5897
  required: Tt,
5868
5898
  reversed: Tt,
5869
5899
  rows: G,
5870
5900
  rowSpan: G,
5871
- sandbox: fe,
5901
+ sandbox: pe,
5872
5902
  scope: null,
5873
5903
  scoped: Tt,
5874
5904
  seamless: Tt,
@@ -5906,7 +5936,7 @@ const QS = ic({
5906
5936
  // Several. Use CSS `text-align` instead,
5907
5937
  aLink: null,
5908
5938
  // `<body>`. Use CSS `a:active {color}` instead
5909
- archive: fe,
5939
+ archive: pe,
5910
5940
  // `<object>`. List of URIs to archives
5911
5941
  axis: null,
5912
5942
  // `<td>` and `<th>`. Use `scope` on `<th>`
@@ -6022,7 +6052,7 @@ const QS = ic({
6022
6052
  },
6023
6053
  space: "html",
6024
6054
  transform: L0
6025
- }), ZS = ic({
6055
+ }), ZS = rc({
6026
6056
  attributes: {
6027
6057
  accentHeight: "accent-height",
6028
6058
  alignmentBaseline: "alignment-baseline",
@@ -6221,7 +6251,7 @@ const QS = ic({
6221
6251
  by: null,
6222
6252
  calcMode: null,
6223
6253
  capHeight: G,
6224
- className: fe,
6254
+ className: pe,
6225
6255
  clip: null,
6226
6256
  clipPath: null,
6227
6257
  clipPathUnits: null,
@@ -6281,9 +6311,9 @@ const QS = ic({
6281
6311
  from: null,
6282
6312
  fx: null,
6283
6313
  fy: null,
6284
- g1: Ba,
6285
- g2: Ba,
6286
- glyphName: Ba,
6314
+ g1: $a,
6315
+ g2: $a,
6316
+ glyphName: $a,
6287
6317
  glyphOrientationHorizontal: null,
6288
6318
  glyphOrientationVertical: null,
6289
6319
  glyphRef: null,
@@ -6456,7 +6486,7 @@ const QS = ic({
6456
6486
  patternTransform: null,
6457
6487
  patternUnits: null,
6458
6488
  phase: null,
6459
- ping: fe,
6489
+ ping: pe,
6460
6490
  pitch: null,
6461
6491
  playbackOrder: null,
6462
6492
  pointerEvents: null,
@@ -6581,7 +6611,7 @@ const QS = ic({
6581
6611
  },
6582
6612
  space: "svg",
6583
6613
  transform: M0
6584
- }), D0 = ic({
6614
+ }), D0 = rc({
6585
6615
  properties: {
6586
6616
  xLinkActuate: null,
6587
6617
  xLinkArcRole: null,
@@ -6595,12 +6625,12 @@ const QS = ic({
6595
6625
  transform(n, t) {
6596
6626
  return "xlink:" + t.slice(5).toLowerCase();
6597
6627
  }
6598
- }), N0 = ic({
6628
+ }), N0 = rc({
6599
6629
  attributes: { xmlnsxlink: "xmlns:xlink" },
6600
6630
  properties: { xmlnsXLink: null, xmlns: null },
6601
6631
  space: "xmlns",
6602
6632
  transform: L0
6603
- }), F0 = ic({
6633
+ }), F0 = rc({
6604
6634
  properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
6605
6635
  space: "xml",
6606
6636
  transform(n, t) {
@@ -7244,7 +7274,7 @@ function cm(n) {
7244
7274
  e.charCodeAt(e.length - 1) === 59 && n !== "semi" || e === t ? !1 : e
7245
7275
  );
7246
7276
  }
7247
- function oi(n, t, e, i) {
7277
+ function ai(n, t, e, i) {
7248
7278
  const r = n.length;
7249
7279
  let s = 0, o;
7250
7280
  if (t < 0 ? t = -t > r ? 0 : r + t : t = t > r ? r : t, e = e > 0 ? e : 0, i.length < 1e4)
@@ -7253,8 +7283,8 @@ function oi(n, t, e, i) {
7253
7283
  for (e && n.splice(t, e); s < i.length; )
7254
7284
  o = i.slice(s, s + 1e4), o.unshift(t, 0), n.splice(...o), s += 1e4, t += 1e4;
7255
7285
  }
7256
- function yi(n, t) {
7257
- return n.length > 0 ? (oi(n, n.length, 0, t), n) : t;
7286
+ function vi(n, t) {
7287
+ return n.length > 0 ? (ai(n, n.length, 0, t), n) : t;
7258
7288
  }
7259
7289
  const zb = {}.hasOwnProperty;
7260
7290
  function V0(n) {
@@ -7286,7 +7316,7 @@ function sk(n, t) {
7286
7316
  const i = [];
7287
7317
  for (; ++e < t.length; )
7288
7318
  (t[e].add === "after" ? n : i).push(t[e]);
7289
- oi(n, 0, 0, i);
7319
+ ai(n, 0, 0, i);
7290
7320
  }
7291
7321
  function q0(n, t) {
7292
7322
  const e = Number.parseInt(n, t);
@@ -7329,7 +7359,7 @@ function Zs(n) {
7329
7359
  return e !== null && e > -1 && n.test(String.fromCharCode(e));
7330
7360
  }
7331
7361
  }
7332
- function rc(n) {
7362
+ function sc(n) {
7333
7363
  const t = [];
7334
7364
  let e = -1, i = 0, r = 0;
7335
7365
  for (; ++e < n.length; ) {
@@ -7423,7 +7453,7 @@ function dk(n) {
7423
7453
  t.events[O][1].end = {
7424
7454
  ..._
7425
7455
  }, O++;
7426
- return oi(t.events, C + 1, 0, t.events.slice(T)), t.events.length = O, u(E);
7456
+ return ai(t.events, C + 1, 0, t.events.slice(T)), t.events.length = O, u(E);
7427
7457
  }
7428
7458
  return a(E);
7429
7459
  }
@@ -7493,7 +7523,7 @@ function dk(n) {
7493
7523
  t.events[_][1].end = {
7494
7524
  ...R
7495
7525
  }, _++;
7496
- oi(t.events, U + 1, 0, t.events.slice(O)), t.events.length = _;
7526
+ ai(t.events, U + 1, 0, t.events.slice(O)), t.events.length = _;
7497
7527
  }
7498
7528
  }
7499
7529
  function b(E) {
@@ -7511,7 +7541,7 @@ function dk(n) {
7511
7541
  function fk(n, t, e) {
7512
7542
  return Wt(n, n.attempt(this.parser.constructs.document, t, e), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
7513
7543
  }
7514
- function Zl(n) {
7544
+ function tc(n) {
7515
7545
  if (n === null || ce(n) || ba(n))
7516
7546
  return 1;
7517
7547
  if (bf(n))
@@ -7578,7 +7608,7 @@ function pk(n, t) {
7578
7608
  ...o.start
7579
7609
  }, n[e][1].start = {
7580
7610
  ...a.end
7581
- }, u = [], n[i][1].end.offset - n[i][1].start.offset && (u = yi(u, [["enter", n[i][1], t], ["exit", n[i][1], t]])), u = yi(u, [["enter", r, t], ["enter", o, t], ["exit", o, t], ["enter", s, t]]), u = yi(u, yf(t.parser.constructs.insideSpan.null, n.slice(i + 1, e), t)), u = yi(u, [["exit", s, t], ["enter", a, t], ["exit", a, t], ["exit", r, t]]), n[e][1].end.offset - n[e][1].start.offset ? (h = 2, u = yi(u, [["enter", n[e][1], t], ["exit", n[e][1], t]])) : h = 0, oi(n, i - 1, e - i + 3, u), e = i + u.length - h - 2;
7611
+ }, u = [], n[i][1].end.offset - n[i][1].start.offset && (u = vi(u, [["enter", n[i][1], t], ["exit", n[i][1], t]])), u = vi(u, [["enter", r, t], ["enter", o, t], ["exit", o, t], ["enter", s, t]]), u = vi(u, yf(t.parser.constructs.insideSpan.null, n.slice(i + 1, e), t)), u = vi(u, [["exit", s, t], ["enter", a, t], ["exit", a, t], ["exit", r, t]]), n[e][1].end.offset - n[e][1].start.offset ? (h = 2, u = vi(u, [["enter", n[e][1], t], ["exit", n[e][1], t]])) : h = 0, ai(n, i - 1, e - i + 3, u), e = i + u.length - h - 2;
7582
7612
  break;
7583
7613
  }
7584
7614
  }
@@ -7587,7 +7617,7 @@ function pk(n, t) {
7587
7617
  return n;
7588
7618
  }
7589
7619
  function gk(n, t) {
7590
- const e = this.parser.constructs.attentionMarkers.null, i = this.previous, r = Zl(i);
7620
+ const e = this.parser.constructs.attentionMarkers.null, i = this.previous, r = tc(i);
7591
7621
  let s;
7592
7622
  return o;
7593
7623
  function o(l) {
@@ -7596,7 +7626,7 @@ function gk(n, t) {
7596
7626
  function a(l) {
7597
7627
  if (l === s)
7598
7628
  return n.consume(l), a;
7599
- const u = n.exit("attentionSequence"), h = Zl(l), d = !h || h === 2 && r || e.includes(l), f = !r || r === 2 && h || e.includes(i);
7629
+ const u = n.exit("attentionSequence"), h = tc(l), d = !h || h === 2 && r || e.includes(l), f = !r || r === 2 && h || e.includes(i);
7600
7630
  return u._open = !!(s === 42 ? d : d && (r || !f)), u._close = !!(s === 42 ? f : f && (h || !d)), t(l);
7601
7631
  }
7602
7632
  }
@@ -7978,7 +8008,7 @@ class Mk {
7978
8008
  const r = e || 0;
7979
8009
  this.setCursor(Math.trunc(t));
7980
8010
  const s = this.right.splice(this.right.length - r, Number.POSITIVE_INFINITY);
7981
- return i && mc(this.left, i), s.reverse();
8011
+ return i && bc(this.left, i), s.reverse();
7982
8012
  }
7983
8013
  /**
7984
8014
  * Remove and return the highest-numbered item in the array, so
@@ -8013,7 +8043,7 @@ class Mk {
8013
8043
  * Nothing.
8014
8044
  */
8015
8045
  pushMany(t) {
8016
- this.setCursor(Number.POSITIVE_INFINITY), mc(this.left, t);
8046
+ this.setCursor(Number.POSITIVE_INFINITY), bc(this.left, t);
8017
8047
  }
8018
8048
  /**
8019
8049
  * Inserts a single item to the low-numbered side of the array;
@@ -8037,7 +8067,7 @@ class Mk {
8037
8067
  * Nothing.
8038
8068
  */
8039
8069
  unshiftMany(t) {
8040
- this.setCursor(0), mc(this.right, t.reverse());
8070
+ this.setCursor(0), bc(this.right, t.reverse());
8041
8071
  }
8042
8072
  /**
8043
8073
  * Move the cursor to a specific position in the array. Requires
@@ -8055,14 +8085,14 @@ class Mk {
8055
8085
  if (!(t === this.left.length || t > this.left.length && this.right.length === 0 || t < 0 && this.left.length === 0))
8056
8086
  if (t < this.left.length) {
8057
8087
  const e = this.left.splice(t, Number.POSITIVE_INFINITY);
8058
- mc(this.right, e.reverse());
8088
+ bc(this.right, e.reverse());
8059
8089
  } else {
8060
8090
  const e = this.right.splice(this.left.length + this.right.length - t, Number.POSITIVE_INFINITY);
8061
- mc(this.left, e.reverse());
8091
+ bc(this.left, e.reverse());
8062
8092
  }
8063
8093
  }
8064
8094
  }
8065
- function mc(n, t) {
8095
+ function bc(n, t) {
8066
8096
  let e = 0;
8067
8097
  if (t.length < 1e4)
8068
8098
  n.push(...t);
@@ -8092,7 +8122,7 @@ function K0(n) {
8092
8122
  }, a = h.slice(r, e), a.unshift(i), h.splice(r, e - r + 1, a));
8093
8123
  }
8094
8124
  }
8095
- return oi(n, 0, Number.POSITIVE_INFINITY, h.slice(0)), !u;
8125
+ return ai(n, 0, Number.POSITIVE_INFINITY, h.slice(0)), !u;
8096
8126
  }
8097
8127
  function Lk(n, t) {
8098
8128
  const e = n.get(t)[1], i = n.get(t)[2];
@@ -8341,7 +8371,7 @@ function Gk(n, t) {
8341
8371
  start: n[i][1].start,
8342
8372
  end: n[e][1].end,
8343
8373
  contentType: "text"
8344
- }, oi(n, i, e - i + 1, [["enter", r, t], ["enter", s, t], ["exit", s, t], ["exit", r, t]])), n;
8374
+ }, ai(n, i, e - i + 1, [["enter", r, t], ["enter", s, t], ["exit", s, t], ["exit", r, t]])), n;
8345
8375
  }
8346
8376
  function Yk(n, t, e) {
8347
8377
  let i = 0;
@@ -8685,7 +8715,7 @@ function l_(n) {
8685
8715
  i.type = "data", t += r;
8686
8716
  }
8687
8717
  }
8688
- return n.length !== e.length && oi(n, 0, n.length, e), n;
8718
+ return n.length !== e.length && ai(n, 0, n.length, e), n;
8689
8719
  }
8690
8720
  function c_(n, t) {
8691
8721
  let e = n.length, i = 0, r, s, o, a;
@@ -8725,7 +8755,7 @@ function c_(n, t) {
8725
8755
  ...n[o - 2][1].start
8726
8756
  }
8727
8757
  };
8728
- return a = [["enter", l, t], ["enter", u, t]], a = yi(a, n.slice(s + 1, s + i + 3)), a = yi(a, [["enter", h, t]]), a = yi(a, yf(t.parser.constructs.insideSpan.null, n.slice(s + i + 4, o - 3), t)), a = yi(a, [["exit", h, t], n[o - 2], n[o - 1], ["exit", u, t]]), a = yi(a, n.slice(o + 1)), a = yi(a, [["exit", l, t]]), oi(n, s, n.length, a), n;
8758
+ return a = [["enter", l, t], ["enter", u, t]], a = vi(a, n.slice(s + 1, s + i + 3)), a = vi(a, [["enter", h, t]]), a = vi(a, yf(t.parser.constructs.insideSpan.null, n.slice(s + i + 4, o - 3), t)), a = vi(a, [["exit", h, t], n[o - 2], n[o - 1], ["exit", u, t]]), a = vi(a, n.slice(o + 1)), a = vi(a, [["exit", l, t]]), ai(n, s, n.length, a), n;
8729
8759
  }
8730
8760
  function u_(n, t, e) {
8731
8761
  const i = this;
@@ -9217,7 +9247,7 @@ function V_(n, t, e) {
9217
9247
  let h = t.tokenize.call(u, l);
9218
9248
  return t.resolveAll && s.push(t), u;
9219
9249
  function d(z) {
9220
- return o = yi(o, z), v(), o[o.length - 1] !== null ? [] : (U(t, 0), u.events = yf(s, u.events, u), u.events);
9250
+ return o = vi(o, z), v(), o[o.length - 1] !== null ? [] : (U(t, 0), u.events = yf(s, u.events, u), u.events);
9221
9251
  }
9222
9252
  function f(z, D) {
9223
9253
  return G_(p(z), D);
@@ -9330,7 +9360,7 @@ function V_(n, t, e) {
9330
9360
  }
9331
9361
  }
9332
9362
  function U(z, D) {
9333
- z.resolveAll && !s.includes(z) && s.push(z), z.resolve && oi(u.events, D, u.events.length - D, z.resolve(u.events.slice(D), u)), z.resolveTo && (u.events = z.resolveTo(u.events, u));
9363
+ z.resolveAll && !s.includes(z) && s.push(z), z.resolve && ai(u.events, D, u.events.length - D, z.resolve(u.events.slice(D), u)), z.resolveTo && (u.events = z.resolveTo(u.events, u));
9334
9364
  }
9335
9365
  function B() {
9336
9366
  const z = g(), D = u.previous, N = u.currentConstruct, $ = u.events.length, W = Array.from(a);
@@ -9505,11 +9535,11 @@ function eC(n) {
9505
9535
  definitionLabelString: o,
9506
9536
  definitionTitleString: o,
9507
9537
  emphasis: s(ue),
9508
- hardBreakEscape: s(pe),
9509
- hardBreakTrailing: s(pe),
9510
- htmlFlow: s(li, o),
9538
+ hardBreakEscape: s(ge),
9539
+ hardBreakTrailing: s(ge),
9540
+ htmlFlow: s(ci, o),
9511
9541
  htmlFlowData: B,
9512
- htmlText: s(li, o),
9542
+ htmlText: s(ci, o),
9513
9543
  htmlTextData: B,
9514
9544
  image: s(Ei),
9515
9545
  label: o,
@@ -9524,7 +9554,7 @@ function eC(n) {
9524
9554
  resourceDestinationString: o,
9525
9555
  resourceTitleString: o,
9526
9556
  setextHeading: s(ze),
9527
- strong: s(sc),
9557
+ strong: s(oc),
9528
9558
  thematicBreak: s(Xi)
9529
9559
  },
9530
9560
  exit: {
@@ -9779,7 +9809,7 @@ function eC(n) {
9779
9809
  function B(j) {
9780
9810
  const wt = this.stack[this.stack.length - 1].children;
9781
9811
  let It = wt[wt.length - 1];
9782
- (!It || It.type !== "text") && (It = oc(), It.position = {
9812
+ (!It || It.type !== "text") && (It = ac(), It.position = {
9783
9813
  start: fs(j.start),
9784
9814
  // @ts-expect-error: we’ll add `end` later.
9785
9815
  end: void 0
@@ -9928,12 +9958,12 @@ function eC(n) {
9928
9958
  children: []
9929
9959
  };
9930
9960
  }
9931
- function pe() {
9961
+ function ge() {
9932
9962
  return {
9933
9963
  type: "break"
9934
9964
  };
9935
9965
  }
9936
- function li() {
9966
+ function ci() {
9937
9967
  return {
9938
9968
  type: "html",
9939
9969
  value: ""
@@ -9978,13 +10008,13 @@ function eC(n) {
9978
10008
  children: []
9979
10009
  };
9980
10010
  }
9981
- function sc() {
10011
+ function oc() {
9982
10012
  return {
9983
10013
  type: "strong",
9984
10014
  children: []
9985
10015
  };
9986
10016
  }
9987
- function oc() {
10017
+ function ac() {
9988
10018
  return {
9989
10019
  type: "text",
9990
10020
  value: ""
@@ -10105,7 +10135,7 @@ function lC(n, t) {
10105
10135
  return n.patch(t, e), n.applyData(t, e);
10106
10136
  }
10107
10137
  function cC(n, t) {
10108
- const e = typeof n.options.clobberPrefix == "string" ? n.options.clobberPrefix : "user-content-", i = String(t.identifier).toUpperCase(), r = rc(i.toLowerCase()), s = n.footnoteOrder.indexOf(i);
10138
+ const e = typeof n.options.clobberPrefix == "string" ? n.options.clobberPrefix : "user-content-", i = String(t.identifier).toUpperCase(), r = sc(i.toLowerCase()), s = n.footnoteOrder.indexOf(i);
10109
10139
  let o, a = n.footnoteCounts.get(i);
10110
10140
  a === void 0 ? (a = 0, n.footnoteOrder.push(i), o = n.footnoteOrder.length) : o = s + 1, a += 1, n.footnoteCounts.set(i, a);
10111
10141
  const l = {
@@ -10157,13 +10187,13 @@ function dC(n, t) {
10157
10187
  const e = String(t.identifier).toUpperCase(), i = n.definitionById.get(e);
10158
10188
  if (!i)
10159
10189
  return rv(n, t);
10160
- const r = { src: rc(i.url || ""), alt: t.alt };
10190
+ const r = { src: sc(i.url || ""), alt: t.alt };
10161
10191
  i.title !== null && i.title !== void 0 && (r.title = i.title);
10162
10192
  const s = { type: "element", tagName: "img", properties: r, children: [] };
10163
10193
  return n.patch(t, s), n.applyData(t, s);
10164
10194
  }
10165
10195
  function fC(n, t) {
10166
- const e = { src: rc(t.url) };
10196
+ const e = { src: sc(t.url) };
10167
10197
  t.alt !== null && t.alt !== void 0 && (e.alt = t.alt), t.title !== null && t.title !== void 0 && (e.title = t.title);
10168
10198
  const i = { type: "element", tagName: "img", properties: e, children: [] };
10169
10199
  return n.patch(t, i), n.applyData(t, i);
@@ -10183,7 +10213,7 @@ function gC(n, t) {
10183
10213
  const e = String(t.identifier).toUpperCase(), i = n.definitionById.get(e);
10184
10214
  if (!i)
10185
10215
  return rv(n, t);
10186
- const r = { href: rc(i.url || "") };
10216
+ const r = { href: sc(i.url || "") };
10187
10217
  i.title !== null && i.title !== void 0 && (r.title = i.title);
10188
10218
  const s = {
10189
10219
  type: "element",
@@ -10194,7 +10224,7 @@ function gC(n, t) {
10194
10224
  return n.patch(t, s), n.applyData(t, s);
10195
10225
  }
10196
10226
  function mC(n, t) {
10197
- const e = { href: rc(t.url) };
10227
+ const e = { href: sc(t.url) };
10198
10228
  t.title !== null && t.title !== void 0 && (e.title = t.title);
10199
10229
  const i = {
10200
10230
  type: "element",
@@ -10467,7 +10497,7 @@ const ov = -1, vf = 0, $c = 1, Fd = 2, hm = 3, dm = 4, fm = 5, pm = 6, av = 7, l
10467
10497
  return e(new Jb[s](o), r);
10468
10498
  };
10469
10499
  return i;
10470
- }, Qb = (n) => RC(/* @__PURE__ */ new Map(), n)(0), Pa = "", { toString: IC } = {}, { keys: OC } = Object, bc = (n) => {
10500
+ }, Qb = (n) => RC(/* @__PURE__ */ new Map(), n)(0), Pa = "", { toString: IC } = {}, { keys: OC } = Object, yc = (n) => {
10471
10501
  const t = typeof n;
10472
10502
  if (t !== "object" || !n)
10473
10503
  return [vf, t];
@@ -10496,7 +10526,7 @@ const ov = -1, vf = 0, $c = 1, Fd = 2, hm = 3, dm = 4, fm = 5, pm = 6, av = 7, l
10496
10526
  }, s = (o) => {
10497
10527
  if (e.has(o))
10498
10528
  return e.get(o);
10499
- let [a, l] = bc(o);
10529
+ let [a, l] = yc(o);
10500
10530
  switch (a) {
10501
10531
  case vf: {
10502
10532
  let h = o;
@@ -10539,7 +10569,7 @@ const ov = -1, vf = 0, $c = 1, Fd = 2, hm = 3, dm = 4, fm = 5, pm = 6, av = 7, l
10539
10569
  return s(o.toJSON());
10540
10570
  const h = [], d = r([a, h], o);
10541
10571
  for (const f of OC(o))
10542
- (n || !Uh(bc(o[f]))) && h.push([s(f), s(o[f])]);
10572
+ (n || !Uh(yc(o[f]))) && h.push([s(f), s(o[f])]);
10543
10573
  return d;
10544
10574
  }
10545
10575
  case hm:
@@ -10551,13 +10581,13 @@ const ov = -1, vf = 0, $c = 1, Fd = 2, hm = 3, dm = 4, fm = 5, pm = 6, av = 7, l
10551
10581
  case fm: {
10552
10582
  const h = [], d = r([a, h], o);
10553
10583
  for (const [f, p] of o)
10554
- (n || !(Uh(bc(f)) || Uh(bc(p)))) && h.push([s(f), s(p)]);
10584
+ (n || !(Uh(yc(f)) || Uh(yc(p)))) && h.push([s(f), s(p)]);
10555
10585
  return d;
10556
10586
  }
10557
10587
  case pm: {
10558
10588
  const h = [], d = r([a, h], o);
10559
10589
  for (const f of o)
10560
- (n || !Uh(bc(f))) && h.push(s(f));
10590
+ (n || !Uh(yc(f))) && h.push(s(f));
10561
10591
  return d;
10562
10592
  }
10563
10593
  }
@@ -10595,7 +10625,7 @@ function NC(n) {
10595
10625
  );
10596
10626
  if (!u)
10597
10627
  continue;
10598
- const h = n.all(u), d = String(u.identifier).toUpperCase(), f = rc(d.toLowerCase());
10628
+ const h = n.all(u), d = String(u.identifier).toUpperCase(), f = sc(d.toLowerCase());
10599
10629
  let p = 0;
10600
10630
  const g = [], m = n.footnoteCounts.get(d);
10601
10631
  for (; m !== void 0 && ++p <= m; ) {
@@ -12736,7 +12766,7 @@ function Kc(n) {
12736
12766
  return "&#x" + n.toString(16).toUpperCase() + ";";
12737
12767
  }
12738
12768
  function zd(n, t, e) {
12739
- const i = Zl(n), r = Zl(t);
12769
+ const i = tc(n), r = tc(t);
12740
12770
  return i === void 0 ? r === void 0 ? (
12741
12771
  // Letter inside:
12742
12772
  // we have to encode *both* letters for `_` as it is looser.
@@ -13798,7 +13828,7 @@ function wR(n) {
13798
13828
  start: Object.assign({}, o[u][1].end),
13799
13829
  end: Object.assign({}, o[l][1].start)
13800
13830
  }, f = [["enter", h, a], ["enter", o[u][1], a], ["exit", o[u][1], a], ["enter", d, a]], p = a.parser.constructs.insideSpan.null;
13801
- p && oi(f, f.length, 0, yf(p, o.slice(u + 1, l), a)), oi(f, f.length, 0, [["exit", d, a], ["enter", o[l][1], a], ["exit", o[l][1], a], ["exit", h, a]]), oi(o, u - 1, l - u + 3, f), l = u + f.length - 2;
13831
+ p && ai(f, f.length, 0, yf(p, o.slice(u + 1, l), a)), ai(f, f.length, 0, [["exit", d, a], ["enter", o[l][1], a], ["exit", o[l][1], a], ["exit", h, a]]), ai(o, u - 1, l - u + 3, f), l = u + f.length - 2;
13802
13832
  break;
13803
13833
  }
13804
13834
  }
@@ -13814,11 +13844,11 @@ function wR(n) {
13814
13844
  return u === 126 && h[h.length - 1][1].type !== "characterEscape" ? l(g) : (o.enter("strikethroughSequenceTemporary"), p(g));
13815
13845
  }
13816
13846
  function p(g) {
13817
- const m = Zl(u);
13847
+ const m = tc(u);
13818
13848
  if (g === 126)
13819
13849
  return d > 1 ? l(g) : (o.consume(g), d++, p);
13820
13850
  if (d < 2 && !e) return l(g);
13821
- const v = o.exit("strikethroughSequenceTemporary"), b = Zl(g);
13851
+ const v = o.exit("strikethroughSequenceTemporary"), b = tc(g);
13822
13852
  return v._open = !b || b === 2 && !!m, v._close = !m || m === 2 && !!b, a(g);
13823
13853
  }
13824
13854
  }
@@ -14360,7 +14390,7 @@ Hc.d(St, {
14360
14390
  ),
14361
14391
  PDFWorker: () => (
14362
14392
  /* reexport */
14363
- Ha
14393
+ Ua
14364
14394
  ),
14365
14395
  PasswordResponses: () => (
14366
14396
  /* reexport */
@@ -14456,7 +14486,7 @@ Hc.d(St, {
14456
14486
  ),
14457
14487
  stopEvent: () => (
14458
14488
  /* reexport */
14459
- si
14489
+ oi
14460
14490
  ),
14461
14491
  version: () => (
14462
14492
  /* reexport */
@@ -14538,7 +14568,7 @@ const mn = typeof process == "object" && process + "" == "[object process]" && !
14538
14568
  POPUP: 16,
14539
14569
  FILEATTACHMENT: 17,
14540
14570
  WIDGET: 20
14541
- }, yc = {
14571
+ }, vc = {
14542
14572
  SOLID: 1,
14543
14573
  DASHED: 2,
14544
14574
  BEVELED: 3,
@@ -15088,7 +15118,7 @@ function Sc(n, t) {
15088
15118
  function Wi(n) {
15089
15119
  n.preventDefault();
15090
15120
  }
15091
- function si(n) {
15121
+ function oi(n) {
15092
15122
  n.preventDefault(), n.stopPropagation();
15093
15123
  }
15094
15124
  var tu;
@@ -15261,9 +15291,9 @@ const Ir = class Ir {
15261
15291
  bs = new WeakMap(), fo = new WeakMap(), Ti = new WeakMap(), po = new WeakMap(), eu = new WeakMap(), nu = new WeakMap(), Yd = new WeakSet(), jv = function(t) {
15262
15292
  t.stopPropagation();
15263
15293
  }, Pn = new WeakSet(), zv = function(t) {
15264
- c(this, Ti)._focusEventsAllowed = !1, si(t);
15294
+ c(this, Ti)._focusEventsAllowed = !1, oi(t);
15265
15295
  }, Bv = function(t) {
15266
- c(this, Ti)._focusEventsAllowed = !0, si(t);
15296
+ c(this, Ti)._focusEventsAllowed = !0, oi(t);
15267
15297
  }, id = function(t) {
15268
15298
  const e = c(this, Ti)._uiManager._signal;
15269
15299
  t.addEventListener("focusin", A(this, Pn, zv).bind(this), {
@@ -15358,11 +15388,11 @@ class nI {
15358
15388
  }
15359
15389
  }
15360
15390
  Xd = new WeakMap();
15361
- var Ua, ru, un, Wa, rd;
15391
+ var Wa, ru, un, Va, rd;
15362
15392
  const Rm = class Rm {
15363
15393
  constructor() {
15364
- x(this, Wa);
15365
- x(this, Ua, XR());
15394
+ x(this, Va);
15395
+ x(this, Wa, XR());
15366
15396
  x(this, ru, 0);
15367
15397
  x(this, un, null);
15368
15398
  }
@@ -15381,14 +15411,14 @@ const Rm = class Rm {
15381
15411
  size: r,
15382
15412
  type: s
15383
15413
  } = t;
15384
- return A(this, Wa, rd).call(this, `${e}_${i}_${r}_${s}`, t);
15414
+ return A(this, Va, rd).call(this, `${e}_${i}_${r}_${s}`, t);
15385
15415
  }
15386
15416
  async getFromUrl(t) {
15387
- return A(this, Wa, rd).call(this, t, t);
15417
+ return A(this, Va, rd).call(this, t, t);
15388
15418
  }
15389
15419
  async getFromBlob(t, e) {
15390
15420
  const i = await e;
15391
- return A(this, Wa, rd).call(this, t, i);
15421
+ return A(this, Va, rd).call(this, t, i);
15392
15422
  }
15393
15423
  async getFromId(t) {
15394
15424
  c(this, un) || y(this, un, /* @__PURE__ */ new Map());
@@ -15415,7 +15445,7 @@ const Rm = class Rm {
15415
15445
  const r = new OffscreenCanvas(e.width, e.height);
15416
15446
  return r.getContext("2d").drawImage(e, 0, 0), i = {
15417
15447
  bitmap: r.transferToImageBitmap(),
15418
- id: `image_${c(this, Ua)}_${wn(this, ru)._++}`,
15448
+ id: `image_${c(this, Wa)}_${wn(this, ru)._++}`,
15419
15449
  refCounter: 1,
15420
15450
  isSvg: !1
15421
15451
  }, c(this, un).set(t, i), c(this, un).set(i.id, i), i;
@@ -15440,10 +15470,10 @@ const Rm = class Rm {
15440
15470
  (r = i.close) == null || r.call(i), e.bitmap = null;
15441
15471
  }
15442
15472
  isValidId(t) {
15443
- return t.startsWith(`image_${c(this, Ua)}_`);
15473
+ return t.startsWith(`image_${c(this, Wa)}_`);
15444
15474
  }
15445
15475
  };
15446
- Ua = new WeakMap(), ru = new WeakMap(), un = new WeakMap(), Wa = new WeakSet(), rd = async function(t, e) {
15476
+ Wa = new WeakMap(), ru = new WeakMap(), un = new WeakMap(), Va = new WeakSet(), rd = async function(t, e) {
15447
15477
  c(this, un) || y(this, un, /* @__PURE__ */ new Map());
15448
15478
  let i = c(this, un).get(t);
15449
15479
  if (i === null)
@@ -15453,7 +15483,7 @@ Ua = new WeakMap(), ru = new WeakMap(), un = new WeakMap(), Wa = new WeakSet(),
15453
15483
  try {
15454
15484
  i || (i = {
15455
15485
  bitmap: null,
15456
- id: `image_${c(this, Ua)}_${wn(this, ru)._++}`,
15486
+ id: `image_${c(this, Wa)}_${wn(this, ru)._++}`,
15457
15487
  refCounter: 0,
15458
15488
  isSvg: !1
15459
15489
  });
@@ -15589,7 +15619,7 @@ class Fh {
15589
15619
  checker: a = null
15590
15620
  }
15591
15621
  } = i;
15592
- a && !a(t, e) || (r.bind(t, ...o, e)(), s || si(e));
15622
+ a && !a(t, e) || (r.bind(t, ...o, e)(), s || oi(e));
15593
15623
  }
15594
15624
  }
15595
15625
  Kd = new WeakSet(), Vv = function(t) {
@@ -15618,21 +15648,21 @@ const Jd = class Jd {
15618
15648
  };
15619
15649
  ft(Jd, "_colorsMapping", /* @__PURE__ */ new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]));
15620
15650
  let zp = Jd;
15621
- var Va, Vn, Ue, tn, qa, Mr, Ga, hi, vs, bo, Ya, yo, nr, Pi, vo, ou, au, Xa, lu, ir, ws, Ka, xs, rr, Qd, As, cu, Ss, wo, uu, hu, Ye, ne, Lr, xo, du, fu, Es, sr, Dr, pu, di, et, sd, Bp, qv, Gv, od, Yv, Xv, Kv, $p, Jv, Hp, Up, Qv, xn, Pr, Zv, tw, Wp, ew, Ec, Vp;
15622
- const ja = class ja {
15651
+ var qa, Vn, Ue, tn, Ga, Mr, Ya, di, vs, bo, Xa, yo, nr, Pi, vo, ou, au, Ka, lu, ir, ws, Ja, xs, rr, Qd, As, cu, Ss, wo, uu, hu, Ye, ne, Lr, xo, du, fu, Es, sr, Dr, pu, fi, et, sd, Bp, qv, Gv, od, Yv, Xv, Kv, $p, Jv, Hp, Up, Qv, xn, Pr, Zv, tw, Wp, ew, Ec, Vp;
15652
+ const za = class za {
15623
15653
  constructor(t, e, i, r, s, o, a, l, u, h, d, f, p) {
15624
15654
  x(this, et);
15625
- x(this, Va, new AbortController());
15655
+ x(this, qa, new AbortController());
15626
15656
  x(this, Vn, null);
15627
15657
  x(this, Ue, /* @__PURE__ */ new Map());
15628
15658
  x(this, tn, /* @__PURE__ */ new Map());
15629
- x(this, qa, null);
15630
- x(this, Mr, null);
15631
15659
  x(this, Ga, null);
15632
- x(this, hi, new iI());
15660
+ x(this, Mr, null);
15661
+ x(this, Ya, null);
15662
+ x(this, di, new iI());
15633
15663
  x(this, vs, null);
15634
15664
  x(this, bo, null);
15635
- x(this, Ya, 0);
15665
+ x(this, Xa, 0);
15636
15666
  x(this, yo, /* @__PURE__ */ new Set());
15637
15667
  x(this, nr, null);
15638
15668
  x(this, Pi, null);
@@ -15640,11 +15670,11 @@ const ja = class ja {
15640
15670
  ft(this, "_editorUndoBar", null);
15641
15671
  x(this, ou, !1);
15642
15672
  x(this, au, !1);
15643
- x(this, Xa, !1);
15673
+ x(this, Ka, !1);
15644
15674
  x(this, lu, null);
15645
15675
  x(this, ir, null);
15646
15676
  x(this, ws, null);
15647
- x(this, Ka, null);
15677
+ x(this, Ja, null);
15648
15678
  x(this, xs, !1);
15649
15679
  x(this, rr, null);
15650
15680
  x(this, Qd, new nI());
@@ -15671,9 +15701,9 @@ const ja = class ja {
15671
15701
  x(this, sr, null);
15672
15702
  x(this, Dr, null);
15673
15703
  x(this, pu, null);
15674
- x(this, di, null);
15675
- const g = this._signal = c(this, Va).signal;
15676
- y(this, Dr, t), y(this, pu, e), y(this, qa, i), this._eventBus = r, r._on("editingaction", this.onEditingAction.bind(this), {
15704
+ x(this, fi, null);
15705
+ const g = this._signal = c(this, qa).signal;
15706
+ y(this, Dr, t), y(this, pu, e), y(this, Ga, i), this._eventBus = r, r._on("editingaction", this.onEditingAction.bind(this), {
15677
15707
  signal: g
15678
15708
  }), r._on("pagechanging", this.onPageChanging.bind(this), {
15679
15709
  signal: g
@@ -15685,13 +15715,13 @@ const ja = class ja {
15685
15715
  signal: g
15686
15716
  }), r._on("switchannotationeditorparams", (m) => this.updateParams(m.type, m.value), {
15687
15717
  signal: g
15688
- }), A(this, et, Yv).call(this), A(this, et, Qv).call(this), A(this, et, $p).call(this), y(this, Mr, s.annotationStorage), y(this, lu, s.filterFactory), y(this, xo, o), y(this, Ka, a || null), y(this, ou, l), y(this, au, u), y(this, Xa, h), y(this, hu, d || null), this.viewParameters = {
15718
+ }), A(this, et, Yv).call(this), A(this, et, Qv).call(this), A(this, et, $p).call(this), y(this, Mr, s.annotationStorage), y(this, lu, s.filterFactory), y(this, xo, o), y(this, Ja, a || null), y(this, ou, l), y(this, au, u), y(this, Ka, h), y(this, hu, d || null), this.viewParameters = {
15689
15719
  realScale: Js.PDF_TO_CSS_UNITS,
15690
15720
  rotation: 0
15691
15721
  }, this.isShiftKeyDown = !1, this._editorUndoBar = f || null, this._supportsPinchToZoom = p !== !1;
15692
15722
  }
15693
15723
  static get _keyboardManager() {
15694
- const t = ja.prototype, e = (o) => c(o, Dr).contains(document.activeElement) && document.activeElement.tagName !== "BUTTON" && o.hasSomethingToControl(), i = (o, {
15724
+ const t = za.prototype, e = (o) => c(o, Dr).contains(document.activeElement) && document.activeElement.tagName !== "BUTTON" && o.hasSomethingToControl(), i = (o, {
15695
15725
  target: a
15696
15726
  }) => {
15697
15727
  if (a instanceof HTMLInputElement) {
@@ -15746,10 +15776,10 @@ const ja = class ja {
15746
15776
  }
15747
15777
  destroy() {
15748
15778
  var t, e, i, r, s;
15749
- (t = c(this, di)) == null || t.resolve(), y(this, di, null), (e = c(this, Va)) == null || e.abort(), y(this, Va, null), this._signal = null;
15779
+ (t = c(this, fi)) == null || t.resolve(), y(this, fi, null), (e = c(this, qa)) == null || e.abort(), y(this, qa, null), this._signal = null;
15750
15780
  for (const o of c(this, tn).values())
15751
15781
  o.destroy();
15752
- c(this, tn).clear(), c(this, Ue).clear(), c(this, vo).clear(), y(this, Vn, null), c(this, ne).clear(), c(this, hi).destroy(), (i = c(this, qa)) == null || i.destroy(), (r = c(this, rr)) == null || r.hide(), y(this, rr, null), c(this, ir) && (clearTimeout(c(this, ir)), y(this, ir, null)), c(this, sr) && (clearTimeout(c(this, sr)), y(this, sr, null)), (s = this._editorUndoBar) == null || s.destroy();
15782
+ c(this, tn).clear(), c(this, Ue).clear(), c(this, vo).clear(), y(this, Vn, null), c(this, ne).clear(), c(this, di).destroy(), (i = c(this, Ga)) == null || i.destroy(), (r = c(this, rr)) == null || r.hide(), y(this, rr, null), c(this, ir) && (clearTimeout(c(this, ir)), y(this, ir, null)), c(this, sr) && (clearTimeout(c(this, sr)), y(this, sr, null)), (s = this._editorUndoBar) == null || s.destroy();
15753
15783
  }
15754
15784
  combinedSignal(t) {
15755
15785
  return AbortSignal.any([this._signal, t.signal]);
@@ -15761,7 +15791,7 @@ const ja = class ja {
15761
15791
  return c(this, au);
15762
15792
  }
15763
15793
  get useNewAltTextWhenAddingImage() {
15764
- return c(this, Xa);
15794
+ return c(this, Ka);
15765
15795
  }
15766
15796
  get hcmFilter() {
15767
15797
  return Ft(this, "hcmFilter", c(this, xo) ? c(this, lu).addHCMFilter(c(this, xo).foreground, c(this, xo).background) : "none");
@@ -15770,7 +15800,7 @@ const ja = class ja {
15770
15800
  return Ft(this, "direction", getComputedStyle(c(this, Dr)).direction);
15771
15801
  }
15772
15802
  get highlightColors() {
15773
- return Ft(this, "highlightColors", c(this, Ka) ? new Map(c(this, Ka).split(",").map((t) => t.split("=").map((e) => e.trim()))) : null);
15803
+ return Ft(this, "highlightColors", c(this, Ja) ? new Map(c(this, Ja).split(",").map((t) => t.split("=").map((e) => e.trim()))) : null);
15774
15804
  }
15775
15805
  get highlightColorNames() {
15776
15806
  return Ft(this, "highlightColorNames", this.highlightColors ? new Map(Array.from(this.highlightColors, (t) => t.reverse())) : null);
@@ -15783,7 +15813,7 @@ const ja = class ja {
15783
15813
  }
15784
15814
  editAltText(t, e = !1) {
15785
15815
  var i;
15786
- (i = c(this, qa)) == null || i.editAltText(this, t, e);
15816
+ (i = c(this, Ga)) == null || i.editAltText(this, t, e);
15787
15817
  }
15788
15818
  switchToMode(t, e) {
15789
15819
  this._eventBus.on("annotationeditormodechanged", e, {
@@ -15807,14 +15837,14 @@ const ja = class ja {
15807
15837
  }) {
15808
15838
  switch (t) {
15809
15839
  case "enableNewAltTextWhenAddingImage":
15810
- y(this, Xa, e);
15840
+ y(this, Ka, e);
15811
15841
  break;
15812
15842
  }
15813
15843
  }
15814
15844
  onPageChanging({
15815
15845
  pageNumber: t
15816
15846
  }) {
15817
- y(this, Ya, t - 1);
15847
+ y(this, Xa, t - 1);
15818
15848
  }
15819
15849
  focusMainContainer() {
15820
15850
  c(this, Dr).focus();
@@ -16002,7 +16032,7 @@ const ja = class ja {
16002
16032
  }
16003
16033
  }
16004
16034
  keydown(t) {
16005
- !this.isShiftKeyDown && t.key === "Shift" && (this.isShiftKeyDown = !0), c(this, Ye) !== Pt.NONE && !this.isEditorHandlingKeyboard && ja._keyboardManager.exec(this, t);
16035
+ !this.isShiftKeyDown && t.key === "Shift" && (this.isShiftKeyDown = !0), c(this, Ye) !== Pt.NONE && !this.isEditorHandlingKeyboard && za._keyboardManager.exec(this, t);
16006
16036
  }
16007
16037
  keyup(t) {
16008
16038
  this.isShiftKeyDown && t.key === "Shift" && (this.isShiftKeyDown = !1, c(this, xs) && (y(this, xs, !1), A(this, et, od).call(this, "main_toolbar")));
@@ -16026,8 +16056,8 @@ const ja = class ja {
16026
16056
  t ? (A(this, et, Xv).call(this), A(this, et, Hp).call(this), A(this, et, xn).call(this, {
16027
16057
  isEditing: c(this, Ye) !== Pt.NONE,
16028
16058
  isEmpty: A(this, et, Ec).call(this),
16029
- hasSomethingToUndo: c(this, hi).hasSomethingToUndo(),
16030
- hasSomethingToRedo: c(this, hi).hasSomethingToRedo(),
16059
+ hasSomethingToUndo: c(this, di).hasSomethingToUndo(),
16060
+ hasSomethingToRedo: c(this, di).hasSomethingToRedo(),
16031
16061
  hasSelectedEditor: !1
16032
16062
  })) : (A(this, et, Kv).call(this), A(this, et, Up).call(this), A(this, et, xn).call(this, {
16033
16063
  isEditing: !1
@@ -16044,13 +16074,13 @@ const ja = class ja {
16044
16074
  return c(this, Qd).id;
16045
16075
  }
16046
16076
  get currentLayer() {
16047
- return c(this, tn).get(c(this, Ya));
16077
+ return c(this, tn).get(c(this, Xa));
16048
16078
  }
16049
16079
  getLayer(t) {
16050
16080
  return c(this, tn).get(t);
16051
16081
  }
16052
16082
  get currentPageIndex() {
16053
- return c(this, Ya);
16083
+ return c(this, Xa);
16054
16084
  }
16055
16085
  addLayer(t) {
16056
16086
  c(this, tn).set(t.pageIndex, t), c(this, As) ? t.enable() : t.disable();
@@ -16060,21 +16090,21 @@ const ja = class ja {
16060
16090
  }
16061
16091
  async updateMode(t, e = null, i = !1) {
16062
16092
  var r;
16063
- if (c(this, Ye) !== t && !(c(this, di) && (await c(this, di).promise, !c(this, di)))) {
16064
- if (y(this, di, Promise.withResolvers()), y(this, Ye, t), t === Pt.NONE) {
16065
- this.setEditingState(!1), A(this, et, tw).call(this), (r = this._editorUndoBar) == null || r.hide(), c(this, di).resolve();
16093
+ if (c(this, Ye) !== t && !(c(this, fi) && (await c(this, fi).promise, !c(this, fi)))) {
16094
+ if (y(this, fi, Promise.withResolvers()), y(this, Ye, t), t === Pt.NONE) {
16095
+ this.setEditingState(!1), A(this, et, tw).call(this), (r = this._editorUndoBar) == null || r.hide(), c(this, fi).resolve();
16066
16096
  return;
16067
16097
  }
16068
16098
  this.setEditingState(!0), await A(this, et, Zv).call(this), this.unselectAll();
16069
16099
  for (const s of c(this, tn).values())
16070
16100
  s.updateMode(t);
16071
16101
  if (!e) {
16072
- i && this.addNewEditorFromKeyboard(), c(this, di).resolve();
16102
+ i && this.addNewEditorFromKeyboard(), c(this, fi).resolve();
16073
16103
  return;
16074
16104
  }
16075
16105
  for (const s of c(this, Ue).values())
16076
16106
  s.annotationElementId === e ? (this.setSelected(s), s.enterInEditMode()) : s.unselect();
16077
- c(this, di).resolve();
16107
+ c(this, fi).resolve();
16078
16108
  }
16079
16109
  }
16080
16110
  addNewEditorFromKeyboard() {
@@ -16203,28 +16233,28 @@ const ja = class ja {
16203
16233
  }
16204
16234
  undo() {
16205
16235
  var t;
16206
- c(this, hi).undo(), A(this, et, xn).call(this, {
16207
- hasSomethingToUndo: c(this, hi).hasSomethingToUndo(),
16236
+ c(this, di).undo(), A(this, et, xn).call(this, {
16237
+ hasSomethingToUndo: c(this, di).hasSomethingToUndo(),
16208
16238
  hasSomethingToRedo: !0,
16209
16239
  isEmpty: A(this, et, Ec).call(this)
16210
16240
  }), (t = this._editorUndoBar) == null || t.hide();
16211
16241
  }
16212
16242
  redo() {
16213
- c(this, hi).redo(), A(this, et, xn).call(this, {
16243
+ c(this, di).redo(), A(this, et, xn).call(this, {
16214
16244
  hasSomethingToUndo: !0,
16215
- hasSomethingToRedo: c(this, hi).hasSomethingToRedo(),
16245
+ hasSomethingToRedo: c(this, di).hasSomethingToRedo(),
16216
16246
  isEmpty: A(this, et, Ec).call(this)
16217
16247
  });
16218
16248
  }
16219
16249
  addCommands(t) {
16220
- c(this, hi).add(t), A(this, et, xn).call(this, {
16250
+ c(this, di).add(t), A(this, et, xn).call(this, {
16221
16251
  hasSomethingToUndo: !0,
16222
16252
  hasSomethingToRedo: !1,
16223
16253
  isEmpty: A(this, et, Ec).call(this)
16224
16254
  });
16225
16255
  }
16226
16256
  cleanUndoStack(t) {
16227
- c(this, hi).cleanType(t);
16257
+ c(this, di).cleanType(t);
16228
16258
  }
16229
16259
  delete() {
16230
16260
  var s;
@@ -16439,24 +16469,24 @@ const ja = class ja {
16439
16469
  annotationElementId: t,
16440
16470
  id: e
16441
16471
  }) {
16442
- (c(this, Ga) || y(this, Ga, /* @__PURE__ */ new Map())).set(t, e);
16472
+ (c(this, Ya) || y(this, Ya, /* @__PURE__ */ new Map())).set(t, e);
16443
16473
  }
16444
16474
  removeChangedExistingAnnotation({
16445
16475
  annotationElementId: t
16446
16476
  }) {
16447
16477
  var e;
16448
- (e = c(this, Ga)) == null || e.delete(t);
16478
+ (e = c(this, Ya)) == null || e.delete(t);
16449
16479
  }
16450
16480
  renderAnnotationElement(t) {
16451
16481
  var r;
16452
- const e = (r = c(this, Ga)) == null ? void 0 : r.get(t.data.id);
16482
+ const e = (r = c(this, Ya)) == null ? void 0 : r.get(t.data.id);
16453
16483
  if (!e)
16454
16484
  return;
16455
16485
  const i = c(this, Mr).getRawValue(e);
16456
16486
  i && (c(this, Ye) === Pt.NONE && !i.hasBeenModified || i.renderAnnotationElement(t));
16457
16487
  }
16458
16488
  };
16459
- Va = new WeakMap(), Vn = new WeakMap(), Ue = new WeakMap(), tn = new WeakMap(), qa = new WeakMap(), Mr = new WeakMap(), Ga = new WeakMap(), hi = new WeakMap(), vs = new WeakMap(), bo = new WeakMap(), Ya = new WeakMap(), yo = new WeakMap(), nr = new WeakMap(), Pi = new WeakMap(), vo = new WeakMap(), ou = new WeakMap(), au = new WeakMap(), Xa = new WeakMap(), lu = new WeakMap(), ir = new WeakMap(), ws = new WeakMap(), Ka = new WeakMap(), xs = new WeakMap(), rr = new WeakMap(), Qd = new WeakMap(), As = new WeakMap(), cu = new WeakMap(), Ss = new WeakMap(), wo = new WeakMap(), uu = new WeakMap(), hu = new WeakMap(), Ye = new WeakMap(), ne = new WeakMap(), Lr = new WeakMap(), xo = new WeakMap(), du = new WeakMap(), fu = new WeakMap(), Es = new WeakMap(), sr = new WeakMap(), Dr = new WeakMap(), pu = new WeakMap(), di = new WeakMap(), et = new WeakSet(), sd = function({
16489
+ qa = new WeakMap(), Vn = new WeakMap(), Ue = new WeakMap(), tn = new WeakMap(), Ga = new WeakMap(), Mr = new WeakMap(), Ya = new WeakMap(), di = new WeakMap(), vs = new WeakMap(), bo = new WeakMap(), Xa = new WeakMap(), yo = new WeakMap(), nr = new WeakMap(), Pi = new WeakMap(), vo = new WeakMap(), ou = new WeakMap(), au = new WeakMap(), Ka = new WeakMap(), lu = new WeakMap(), ir = new WeakMap(), ws = new WeakMap(), Ja = new WeakMap(), xs = new WeakMap(), rr = new WeakMap(), Qd = new WeakMap(), As = new WeakMap(), cu = new WeakMap(), Ss = new WeakMap(), wo = new WeakMap(), uu = new WeakMap(), hu = new WeakMap(), Ye = new WeakMap(), ne = new WeakMap(), Lr = new WeakMap(), xo = new WeakMap(), du = new WeakMap(), fu = new WeakMap(), Es = new WeakMap(), sr = new WeakMap(), Dr = new WeakMap(), pu = new WeakMap(), fi = new WeakMap(), et = new WeakSet(), sd = function({
16460
16490
  anchorNode: t
16461
16491
  }) {
16462
16492
  return t.nodeType === Node.TEXT_NODE ? t.parentElement : t;
@@ -16617,19 +16647,19 @@ Va = new WeakMap(), Vn = new WeakMap(), Ue = new WeakMap(), tn = new WeakMap(),
16617
16647
  A(this, et, xn).call(this, {
16618
16648
  hasSelectedEditor: this.hasSelection
16619
16649
  });
16620
- }, ft(ja, "TRANSLATE_SMALL", 1), ft(ja, "TRANSLATE_BIG", 10);
16621
- let va = ja;
16622
- var Xe, or, Ri, Ja, ar, qn, Qa, lr, Nn, Nr, Ao, cr, ks, Hi, kc, ad;
16650
+ }, ft(za, "TRANSLATE_SMALL", 1), ft(za, "TRANSLATE_BIG", 10);
16651
+ let va = za;
16652
+ var Xe, or, Ri, Qa, ar, qn, Za, lr, Nn, Nr, Ao, cr, ks, Hi, kc, ad;
16623
16653
  const An = class An {
16624
16654
  constructor(t) {
16625
16655
  x(this, Hi);
16626
16656
  x(this, Xe, null);
16627
16657
  x(this, or, !1);
16628
16658
  x(this, Ri, null);
16629
- x(this, Ja, null);
16659
+ x(this, Qa, null);
16630
16660
  x(this, ar, null);
16631
16661
  x(this, qn, null);
16632
- x(this, Qa, !1);
16662
+ x(this, Za, !1);
16633
16663
  x(this, lr, null);
16634
16664
  x(this, Nn, null);
16635
16665
  x(this, Nr, null);
@@ -16650,7 +16680,7 @@ const An = class An {
16650
16680
  async render() {
16651
16681
  const t = y(this, Ri, document.createElement("button"));
16652
16682
  t.className = "altText", t.tabIndex = "0";
16653
- const e = y(this, Ja, document.createElement("span"));
16683
+ const e = y(this, Qa, document.createElement("span"));
16654
16684
  t.append(e), c(this, cr) ? (t.classList.add("new"), t.setAttribute("data-l10n-id", c(An, ks).missing), e.setAttribute("data-l10n-id", c(An, ks)["missing-label"])) : (t.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button"), e.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button-label"));
16655
16685
  const i = c(this, Nn)._uiManager._signal;
16656
16686
  t.addEventListener("contextmenu", Wi, {
@@ -16670,15 +16700,15 @@ const An = class An {
16670
16700
  capture: !0,
16671
16701
  signal: i
16672
16702
  }), t.addEventListener("keydown", (s) => {
16673
- s.target === t && s.key === "Enter" && (y(this, Qa, !0), r(s));
16703
+ s.target === t && s.key === "Enter" && (y(this, Za, !0), r(s));
16674
16704
  }, {
16675
16705
  signal: i
16676
16706
  }), await A(this, Hi, ad).call(this), t;
16677
16707
  }
16678
16708
  finish() {
16679
16709
  c(this, Ri) && (c(this, Ri).focus({
16680
- focusVisible: c(this, Qa)
16681
- }), y(this, Qa, !1));
16710
+ focusVisible: c(this, Za)
16711
+ }), y(this, Za, !1));
16682
16712
  }
16683
16713
  isEmpty() {
16684
16714
  return c(this, cr) ? c(this, Xe) === null : !c(this, Xe) && !c(this, or);
@@ -16743,10 +16773,10 @@ const An = class An {
16743
16773
  }
16744
16774
  destroy() {
16745
16775
  var t, e;
16746
- (t = c(this, Ri)) == null || t.remove(), y(this, Ri, null), y(this, Ja, null), y(this, ar, null), (e = c(this, lr)) == null || e.remove(), y(this, lr, null);
16776
+ (t = c(this, Ri)) == null || t.remove(), y(this, Ri, null), y(this, Qa, null), y(this, ar, null), (e = c(this, lr)) == null || e.remove(), y(this, lr, null);
16747
16777
  }
16748
16778
  };
16749
- Xe = new WeakMap(), or = new WeakMap(), Ri = new WeakMap(), Ja = new WeakMap(), ar = new WeakMap(), qn = new WeakMap(), Qa = new WeakMap(), lr = new WeakMap(), Nn = new WeakMap(), Nr = new WeakMap(), Ao = new WeakMap(), cr = new WeakMap(), ks = new WeakMap(), Hi = new WeakSet(), kc = function() {
16779
+ Xe = new WeakMap(), or = new WeakMap(), Ri = new WeakMap(), Qa = new WeakMap(), ar = new WeakMap(), qn = new WeakMap(), Za = new WeakMap(), lr = new WeakMap(), Nn = new WeakMap(), Nr = new WeakMap(), Ao = new WeakMap(), cr = new WeakMap(), ks = new WeakMap(), Hi = new WeakSet(), kc = function() {
16750
16780
  return c(this, Xe) && "added" || c(this, Xe) === null && this.guessedText && "review" || "missing";
16751
16781
  }, ad = async function() {
16752
16782
  var r, s, o;
@@ -16754,7 +16784,7 @@ Xe = new WeakMap(), or = new WeakMap(), Ri = new WeakMap(), Ja = new WeakMap(),
16754
16784
  if (!t)
16755
16785
  return;
16756
16786
  if (c(this, cr)) {
16757
- if (t.classList.toggle("done", !!c(this, Xe)), t.setAttribute("data-l10n-id", c(An, ks)[c(this, Hi, kc)]), (r = c(this, Ja)) == null || r.setAttribute("data-l10n-id", c(An, ks)[`${c(this, Hi, kc)}-label`]), !c(this, Xe)) {
16787
+ if (t.classList.toggle("done", !!c(this, Xe)), t.setAttribute("data-l10n-id", c(An, ks)[c(this, Hi, kc)]), (r = c(this, Qa)) == null || r.setAttribute("data-l10n-id", c(An, ks)[`${c(this, Hi, kc)}-label`]), !c(this, Xe)) {
16758
16788
  (s = c(this, ar)) == null || s.remove();
16759
16789
  return;
16760
16790
  }
@@ -16793,7 +16823,7 @@ Xe = new WeakMap(), or = new WeakMap(), Ri = new WeakMap(), Ja = new WeakMap(),
16793
16823
  i == null || i.setAttribute("aria-describedby", e.id);
16794
16824
  }, x(An, ks, null), ft(An, "_l10n", null);
16795
16825
  let Hd = An;
16796
- var gu, So, mu, bu, yu, vu, wu, Za, Fr, Eo, _s, ls, nw, iw, qp;
16826
+ var gu, So, mu, bu, yu, vu, wu, tl, Fr, Eo, _s, ls, nw, iw, qp;
16797
16827
  const Im = class Im {
16798
16828
  constructor({
16799
16829
  container: t,
@@ -16812,13 +16842,13 @@ const Im = class Im {
16812
16842
  x(this, yu);
16813
16843
  x(this, vu);
16814
16844
  x(this, wu);
16815
- x(this, Za);
16845
+ x(this, tl);
16816
16846
  x(this, Fr, null);
16817
16847
  x(this, Eo);
16818
16848
  x(this, _s, null);
16819
- y(this, gu, t), y(this, mu, i), y(this, bu, e), y(this, yu, r), y(this, vu, s), y(this, wu, o), y(this, Eo, new AbortController()), y(this, Za, AbortSignal.any([a, c(this, Eo).signal])), t.addEventListener("touchstart", A(this, ls, nw).bind(this), {
16849
+ y(this, gu, t), y(this, mu, i), y(this, bu, e), y(this, yu, r), y(this, vu, s), y(this, wu, o), y(this, Eo, new AbortController()), y(this, tl, AbortSignal.any([a, c(this, Eo).signal])), t.addEventListener("touchstart", A(this, ls, nw).bind(this), {
16820
16850
  passive: !1,
16821
- signal: c(this, Za)
16851
+ signal: c(this, tl)
16822
16852
  });
16823
16853
  }
16824
16854
  get MIN_TOUCH_DISTANCE_TO_PINCH() {
@@ -16829,19 +16859,19 @@ const Im = class Im {
16829
16859
  (t = c(this, Eo)) == null || t.abort(), y(this, Eo, null);
16830
16860
  }
16831
16861
  };
16832
- gu = new WeakMap(), So = new WeakMap(), mu = new WeakMap(), bu = new WeakMap(), yu = new WeakMap(), vu = new WeakMap(), wu = new WeakMap(), Za = new WeakMap(), Fr = new WeakMap(), Eo = new WeakMap(), _s = new WeakMap(), ls = new WeakSet(), nw = function(t) {
16862
+ gu = new WeakMap(), So = new WeakMap(), mu = new WeakMap(), bu = new WeakMap(), yu = new WeakMap(), vu = new WeakMap(), wu = new WeakMap(), tl = new WeakMap(), Fr = new WeakMap(), Eo = new WeakMap(), _s = new WeakMap(), ls = new WeakSet(), nw = function(t) {
16833
16863
  var r, s, o;
16834
16864
  if ((r = c(this, bu)) != null && r.call(this) || t.touches.length < 2)
16835
16865
  return;
16836
16866
  if (!c(this, _s)) {
16837
16867
  y(this, _s, new AbortController());
16838
- const a = AbortSignal.any([c(this, Za), c(this, _s).signal]), l = c(this, gu), u = {
16868
+ const a = AbortSignal.any([c(this, tl), c(this, _s).signal]), l = c(this, gu), u = {
16839
16869
  signal: a,
16840
16870
  passive: !1
16841
16871
  };
16842
16872
  l.addEventListener("touchmove", A(this, ls, iw).bind(this), u), l.addEventListener("touchend", A(this, ls, qp).bind(this), u), l.addEventListener("touchcancel", A(this, ls, qp).bind(this), u), (s = c(this, yu)) == null || s.call(this);
16843
16873
  }
16844
- if (si(t), t.touches.length !== 2 || (o = c(this, mu)) != null && o.call(this)) {
16874
+ if (oi(t), t.touches.length !== 2 || (o = c(this, mu)) != null && o.call(this)) {
16845
16875
  y(this, Fr, null);
16846
16876
  return;
16847
16877
  }
@@ -16883,14 +16913,14 @@ gu = new WeakMap(), So = new WeakMap(), mu = new WeakMap(), bu = new WeakMap(),
16883
16913
  c(this, _s).abort(), y(this, _s, null), (e = c(this, wu)) == null || e.call(this), c(this, Fr) && (t.preventDefault(), y(this, Fr, null), y(this, So, !1));
16884
16914
  };
16885
16915
  let Ud = Im;
16886
- var ko, Ii, be, tl, Cs, xu, _o, en, Co, jr, Ts, Au, To, Gn, Su, Po, zr, ur, el, nl, fi, Ro, Eu, Zd, vt, Gp, ku, Yp, ld, rw, sw, Xp, cd, Kp, ow, aw, lw, Jp, cw, Qp, uw, hw, dw, Zp, _c;
16916
+ var ko, Ii, ye, el, Cs, xu, _o, en, Co, jr, Ts, Au, To, Gn, Su, Po, zr, ur, nl, il, pi, Ro, Eu, Zd, vt, Gp, ku, Yp, ld, rw, sw, Xp, cd, Kp, ow, aw, lw, Jp, cw, Qp, uw, hw, dw, Zp, _c;
16887
16917
  const Mt = class Mt {
16888
16918
  constructor(t) {
16889
16919
  x(this, vt);
16890
16920
  x(this, ko, null);
16891
16921
  x(this, Ii, null);
16892
- x(this, be, null);
16893
- x(this, tl, !1);
16922
+ x(this, ye, null);
16923
+ x(this, el, !1);
16894
16924
  x(this, Cs, null);
16895
16925
  x(this, xu, "");
16896
16926
  x(this, _o, !1);
@@ -16905,9 +16935,9 @@ const Mt = class Mt {
16905
16935
  x(this, Po, !1);
16906
16936
  x(this, zr, !1);
16907
16937
  x(this, ur, null);
16908
- x(this, el, 0);
16909
16938
  x(this, nl, 0);
16910
- x(this, fi, null);
16939
+ x(this, il, 0);
16940
+ x(this, pi, null);
16911
16941
  x(this, Ro, null);
16912
16942
  ft(this, "_editToolbar", null);
16913
16943
  ft(this, "_initialOptions", /* @__PURE__ */ Object.create(null));
@@ -17208,14 +17238,14 @@ const Mt = class Mt {
17208
17238
  }
17209
17239
  altTextFinish() {
17210
17240
  var t;
17211
- (t = c(this, be)) == null || t.finish();
17241
+ (t = c(this, ye)) == null || t.finish();
17212
17242
  }
17213
17243
  async addEditToolbar() {
17214
- return this._editToolbar || c(this, Po) ? this._editToolbar : (this._editToolbar = new Np(this), this.div.append(this._editToolbar.render()), c(this, be) && await this._editToolbar.addAltText(c(this, be)), this._editToolbar);
17244
+ return this._editToolbar || c(this, Po) ? this._editToolbar : (this._editToolbar = new Np(this), this.div.append(this._editToolbar.render()), c(this, ye) && await this._editToolbar.addAltText(c(this, ye)), this._editToolbar);
17215
17245
  }
17216
17246
  removeEditToolbar() {
17217
17247
  var t;
17218
- this._editToolbar && (this._editToolbar.remove(), this._editToolbar = null, (t = c(this, be)) == null || t.destroy());
17248
+ this._editToolbar && (this._editToolbar.remove(), this._editToolbar = null, (t = c(this, ye)) == null || t.destroy());
17219
17249
  }
17220
17250
  addContainer(t) {
17221
17251
  var i;
@@ -17226,37 +17256,37 @@ const Mt = class Mt {
17226
17256
  return this.div.getBoundingClientRect();
17227
17257
  }
17228
17258
  async addAltTextButton() {
17229
- c(this, be) || (Hd.initialize(Mt._l10n), y(this, be, new Hd(this)), c(this, ko) && (c(this, be).data = c(this, ko), y(this, ko, null)), await this.addEditToolbar());
17259
+ c(this, ye) || (Hd.initialize(Mt._l10n), y(this, ye, new Hd(this)), c(this, ko) && (c(this, ye).data = c(this, ko), y(this, ko, null)), await this.addEditToolbar());
17230
17260
  }
17231
17261
  get altTextData() {
17232
17262
  var t;
17233
- return (t = c(this, be)) == null ? void 0 : t.data;
17263
+ return (t = c(this, ye)) == null ? void 0 : t.data;
17234
17264
  }
17235
17265
  set altTextData(t) {
17236
- c(this, be) && (c(this, be).data = t);
17266
+ c(this, ye) && (c(this, ye).data = t);
17237
17267
  }
17238
17268
  get guessedAltText() {
17239
17269
  var t;
17240
- return (t = c(this, be)) == null ? void 0 : t.guessedText;
17270
+ return (t = c(this, ye)) == null ? void 0 : t.guessedText;
17241
17271
  }
17242
17272
  async setGuessedAltText(t) {
17243
17273
  var e;
17244
- await ((e = c(this, be)) == null ? void 0 : e.setGuessedText(t));
17274
+ await ((e = c(this, ye)) == null ? void 0 : e.setGuessedText(t));
17245
17275
  }
17246
17276
  serializeAltText(t) {
17247
17277
  var e;
17248
- return (e = c(this, be)) == null ? void 0 : e.serialize(t);
17278
+ return (e = c(this, ye)) == null ? void 0 : e.serialize(t);
17249
17279
  }
17250
17280
  hasAltText() {
17251
- return !!c(this, be) && !c(this, be).isEmpty();
17281
+ return !!c(this, ye) && !c(this, ye).isEmpty();
17252
17282
  }
17253
17283
  hasAltTextData() {
17254
17284
  var t;
17255
- return ((t = c(this, be)) == null ? void 0 : t.hasData()) ?? !1;
17285
+ return ((t = c(this, ye)) == null ? void 0 : t.hasData()) ?? !1;
17256
17286
  }
17257
17287
  render() {
17258
17288
  var s;
17259
- this.div = document.createElement("div"), this.div.setAttribute("data-editor-rotation", (360 - this.rotation) % 360), this.div.className = this.name, this.div.setAttribute("id", this.id), this.div.tabIndex = c(this, tl) ? -1 : 0, this._isVisible || this.div.classList.add("hidden"), this.setInForeground(), A(this, vt, Qp).call(this);
17289
+ this.div = document.createElement("div"), this.div.setAttribute("data-editor-rotation", (360 - this.rotation) % 360), this.div.className = this.name, this.div.setAttribute("id", this.id), this.div.tabIndex = c(this, el) ? -1 : 0, this._isVisible || this.div.classList.add("hidden"), this.setInForeground(), A(this, vt, Qp).call(this);
17260
17290
  const [t, e] = this.parentDimensions;
17261
17291
  this.parentRotation % 180 !== 0 && (this.div.style.maxWidth = `${(100 * e / t).toFixed(2)}%`, this.div.style.maxHeight = `${(100 * t / e).toFixed(2)}%`);
17262
17292
  const [i, r] = this.getInitialTranslation();
@@ -17395,10 +17425,10 @@ const Mt = class Mt {
17395
17425
  }
17396
17426
  remove() {
17397
17427
  var t, e;
17398
- if ((t = c(this, Ts)) == null || t.abort(), y(this, Ts, null), this.isEmpty() || this.commit(), this.parent ? this.parent.remove(this) : this._uiManager.removeEditor(this), c(this, ur) && (clearTimeout(c(this, ur)), y(this, ur, null)), A(this, vt, _c).call(this), this.removeEditToolbar(), c(this, fi)) {
17399
- for (const i of c(this, fi).values())
17428
+ if ((t = c(this, Ts)) == null || t.abort(), y(this, Ts, null), this.isEmpty() || this.commit(), this.parent ? this.parent.remove(this) : this._uiManager.removeEditor(this), c(this, ur) && (clearTimeout(c(this, ur)), y(this, ur, null)), A(this, vt, _c).call(this), this.removeEditToolbar(), c(this, pi)) {
17429
+ for (const i of c(this, pi).values())
17400
17430
  clearTimeout(i);
17401
- y(this, fi, null);
17431
+ y(this, pi, null);
17402
17432
  }
17403
17433
  this.parent = null, (e = c(this, Ro)) == null || e.destroy(), y(this, Ro, null);
17404
17434
  }
@@ -17479,13 +17509,13 @@ const Mt = class Mt {
17479
17509
  });
17480
17510
  return;
17481
17511
  }
17482
- (e = this._editToolbar) == null || e.show(), (i = c(this, be)) == null || i.toggleAltTextBadge(!1);
17512
+ (e = this._editToolbar) == null || e.show(), (i = c(this, ye)) == null || i.toggleAltTextBadge(!1);
17483
17513
  }
17484
17514
  unselect() {
17485
17515
  var t, e, i, r, s;
17486
17516
  (t = c(this, en)) == null || t.classList.add("hidden"), (e = this.div) == null || e.classList.remove("selectedEditor"), (i = this.div) != null && i.contains(document.activeElement) && this._uiManager.currentLayer.div.focus({
17487
17517
  preventScroll: !0
17488
- }), (r = this._editToolbar) == null || r.hide(), (s = c(this, be)) == null || s.toggleAltTextBadge(!0);
17518
+ }), (r = this._editToolbar) == null || r.hide(), (s = c(this, ye)) == null || s.toggleAltTextBadge(!0);
17489
17519
  }
17490
17520
  updateParams(t, e) {
17491
17521
  }
@@ -17530,14 +17560,14 @@ const Mt = class Mt {
17530
17560
  }
17531
17561
  _reportTelemetry(t, e = !1) {
17532
17562
  if (e) {
17533
- c(this, fi) || y(this, fi, /* @__PURE__ */ new Map());
17563
+ c(this, pi) || y(this, pi, /* @__PURE__ */ new Map());
17534
17564
  const {
17535
17565
  action: i
17536
17566
  } = t;
17537
- let r = c(this, fi).get(i);
17567
+ let r = c(this, pi).get(i);
17538
17568
  r && clearTimeout(r), r = setTimeout(() => {
17539
- this._reportTelemetry(t), c(this, fi).delete(i), c(this, fi).size === 0 && y(this, fi, null);
17540
- }, Mt._telemetryTimeout), c(this, fi).set(i, r);
17569
+ this._reportTelemetry(t), c(this, pi).delete(i), c(this, pi).size === 0 && y(this, pi, null);
17570
+ }, Mt._telemetryTimeout), c(this, pi).set(i, r);
17541
17571
  return;
17542
17572
  }
17543
17573
  t.type || (t.type = this.editorType), this._uiManager._eventBus.dispatch("reporttelemetry", {
@@ -17552,10 +17582,10 @@ const Mt = class Mt {
17552
17582
  this.div.classList.toggle("hidden", !t), this._isVisible = t;
17553
17583
  }
17554
17584
  enable() {
17555
- this.div && (this.div.tabIndex = 0), y(this, tl, !1);
17585
+ this.div && (this.div.tabIndex = 0), y(this, el, !1);
17556
17586
  }
17557
17587
  disable() {
17558
- this.div && (this.div.tabIndex = -1), y(this, tl, !0);
17588
+ this.div && (this.div.tabIndex = -1), y(this, el, !0);
17559
17589
  }
17560
17590
  renderAnnotationElement(t) {
17561
17591
  let e = t.container.querySelector(".annotationContent");
@@ -17574,7 +17604,7 @@ const Mt = class Mt {
17574
17604
  (e == null ? void 0 : e.nodeName) === "DIV" && e.classList.contains("annotationContent") && e.remove();
17575
17605
  }
17576
17606
  };
17577
- ko = new WeakMap(), Ii = new WeakMap(), be = new WeakMap(), tl = new WeakMap(), Cs = new WeakMap(), xu = new WeakMap(), _o = new WeakMap(), en = new WeakMap(), Co = new WeakMap(), jr = new WeakMap(), Ts = new WeakMap(), Au = new WeakMap(), To = new WeakMap(), Gn = new WeakMap(), Su = new WeakMap(), Po = new WeakMap(), zr = new WeakMap(), ur = new WeakMap(), el = new WeakMap(), nl = new WeakMap(), fi = new WeakMap(), Ro = new WeakMap(), Eu = new WeakMap(), Zd = new WeakMap(), vt = new WeakSet(), Gp = function([t, e], i, r) {
17607
+ ko = new WeakMap(), Ii = new WeakMap(), ye = new WeakMap(), el = new WeakMap(), Cs = new WeakMap(), xu = new WeakMap(), _o = new WeakMap(), en = new WeakMap(), Co = new WeakMap(), jr = new WeakMap(), Ts = new WeakMap(), Au = new WeakMap(), To = new WeakMap(), Gn = new WeakMap(), Su = new WeakMap(), Po = new WeakMap(), zr = new WeakMap(), ur = new WeakMap(), nl = new WeakMap(), il = new WeakMap(), pi = new WeakMap(), Ro = new WeakMap(), Eu = new WeakMap(), Zd = new WeakMap(), vt = new WeakSet(), Gp = function([t, e], i, r) {
17578
17608
  [i, r] = this.screenToPageTranslation(i, r), this.x += i / t, this.y += r / e, this._onTranslating(this.x, this.y), this.fixAndSetPosition();
17579
17609
  }, ku = new WeakSet(), Yp = function(t, e, i) {
17580
17610
  switch (i) {
@@ -17624,7 +17654,7 @@ ko = new WeakMap(), Ii = new WeakMap(), be = new WeakMap(), tl = new WeakMap(),
17624
17654
  } = Tn.platform;
17625
17655
  if (e.button !== 0 || e.ctrlKey && i)
17626
17656
  return;
17627
- (h = c(this, be)) == null || h.toggle(!1);
17657
+ (h = c(this, ye)) == null || h.toggle(!1);
17628
17658
  const r = this._isDraggable;
17629
17659
  this._isDraggable = !1, y(this, Co, [e.screenX, e.screenY]);
17630
17660
  const s = new AbortController(), o = this._uiManager.combinedSignal(s);
@@ -17632,7 +17662,7 @@ ko = new WeakMap(), Ii = new WeakMap(), be = new WeakMap(), tl = new WeakMap(),
17632
17662
  passive: !0,
17633
17663
  capture: !0,
17634
17664
  signal: o
17635
- }), window.addEventListener("touchmove", si, {
17665
+ }), window.addEventListener("touchmove", oi, {
17636
17666
  passive: !1,
17637
17667
  signal: o
17638
17668
  }), window.addEventListener("contextmenu", Wi, {
@@ -17647,7 +17677,7 @@ ko = new WeakMap(), Ii = new WeakMap(), be = new WeakMap(), tl = new WeakMap(),
17647
17677
  this.div.style.cursor = this.parent.div.style.cursor = window.getComputedStyle(e.target).cursor;
17648
17678
  const u = () => {
17649
17679
  var d;
17650
- s.abort(), this.parent.togglePointerEvents(!0), (d = c(this, be)) == null || d.toggle(!0), this._isDraggable = r, this.parent.div.style.cursor = a, this.div.style.cursor = l, A(this, vt, cd).call(this);
17680
+ s.abort(), this.parent.togglePointerEvents(!0), (d = c(this, ye)) == null || d.toggle(!0), this._isDraggable = r, this.parent.div.style.cursor = a, this.div.style.cursor = l, A(this, vt, cd).call(this);
17651
17681
  };
17652
17682
  window.addEventListener("pointerup", u, {
17653
17683
  signal: o
@@ -17734,7 +17764,7 @@ ko = new WeakMap(), Ii = new WeakMap(), be = new WeakMap(), tl = new WeakMap(),
17734
17764
  savedY: this.y,
17735
17765
  savedWidth: this.width,
17736
17766
  savedHeight: this.height
17737
- }), (t = c(this, be)) == null || t.toggle(!1), this.parent.togglePointerEvents(!1);
17767
+ }), (t = c(this, ye)) == null || t.toggle(!1), this.parent.togglePointerEvents(!1);
17738
17768
  }, aw = function(t, e, i) {
17739
17769
  let s = 0.7 * (i / e) + 1 - 0.7;
17740
17770
  if (s === 1)
@@ -17749,7 +17779,7 @@ ko = new WeakMap(), Ii = new WeakMap(), be = new WeakMap(), tl = new WeakMap(),
17749
17779
  this.x = E - C[0], this.y = T - C[1], this.width = v, this.height = b, this.setDims(l * v, u * b), this.fixAndSetPosition(), this._onResizing();
17750
17780
  }, lw = function() {
17751
17781
  var t;
17752
- (t = c(this, be)) == null || t.toggle(!0), this.parent.togglePointerEvents(!0), A(this, vt, cd).call(this);
17782
+ (t = c(this, ye)) == null || t.toggle(!0), this.parent.togglePointerEvents(!0), A(this, vt, cd).call(this);
17753
17783
  }, Jp = function(t) {
17754
17784
  const {
17755
17785
  isMac: e
@@ -17768,7 +17798,7 @@ ko = new WeakMap(), Ii = new WeakMap(), be = new WeakMap(), tl = new WeakMap(),
17768
17798
  }, a = (u) => {
17769
17799
  r.abort(), y(this, Cs, null), y(this, To, !1), this._uiManager.endDragSession() || A(this, vt, Jp).call(this, u), i && this._onStopDragging();
17770
17800
  };
17771
- e && (y(this, el, t.clientX), y(this, nl, t.clientY), y(this, Cs, t.pointerId), y(this, xu, t.pointerType), window.addEventListener("pointermove", (u) => {
17801
+ e && (y(this, nl, t.clientX), y(this, il, t.clientY), y(this, Cs, t.pointerId), y(this, xu, t.pointerType), window.addEventListener("pointermove", (u) => {
17772
17802
  i || (i = !0, this._onStartDragging());
17773
17803
  const {
17774
17804
  clientX: h,
@@ -17776,20 +17806,20 @@ ko = new WeakMap(), Ii = new WeakMap(), be = new WeakMap(), tl = new WeakMap(),
17776
17806
  pointerId: f
17777
17807
  } = u;
17778
17808
  if (f !== c(this, Cs)) {
17779
- si(u);
17809
+ oi(u);
17780
17810
  return;
17781
17811
  }
17782
- const [p, g] = this.screenToPageTranslation(h - c(this, el), d - c(this, nl));
17783
- y(this, el, h), y(this, nl, d), this._uiManager.dragSelectedEditors(p, g);
17784
- }, o), window.addEventListener("touchmove", si, o), window.addEventListener("pointerdown", (u) => {
17785
- u.pointerType === c(this, xu) && (c(this, Ro) || u.isPrimary) && a(u), si(u);
17812
+ const [p, g] = this.screenToPageTranslation(h - c(this, nl), d - c(this, il));
17813
+ y(this, nl, h), y(this, il, d), this._uiManager.dragSelectedEditors(p, g);
17814
+ }, o), window.addEventListener("touchmove", oi, o), window.addEventListener("pointerdown", (u) => {
17815
+ u.pointerType === c(this, xu) && (c(this, Ro) || u.isPrimary) && a(u), oi(u);
17786
17816
  }, o));
17787
17817
  const l = (u) => {
17788
17818
  if (!c(this, Cs) || c(this, Cs) === u.pointerId) {
17789
17819
  a(u);
17790
17820
  return;
17791
17821
  }
17792
- si(u);
17822
+ oi(u);
17793
17823
  };
17794
17824
  window.addEventListener("pointerup", l, {
17795
17825
  signal: s
@@ -17829,7 +17859,7 @@ class rI extends Ce {
17829
17859
  return this.serializeDeleted();
17830
17860
  }
17831
17861
  }
17832
- const _y = 3285377520, ui = 4294901760, Zi = 65535;
17862
+ const _y = 3285377520, hi = 4294901760, Zi = 65535;
17833
17863
  class fw {
17834
17864
  constructor(t) {
17835
17865
  this.h1 = t ? t & 4294967295 : _y, this.h2 = t ? t & 4294967295 : _y;
@@ -17850,20 +17880,20 @@ class fw {
17850
17880
  let a = 0, l = 0, u = this.h1, h = this.h2;
17851
17881
  const d = 3432918353, f = 461845907, p = d & Zi, g = f & Zi;
17852
17882
  for (let m = 0; m < r; m++)
17853
- m & 1 ? (a = o[m], a = a * d & ui | a * p & Zi, a = a << 15 | a >>> 17, a = a * f & ui | a * g & Zi, u ^= a, u = u << 13 | u >>> 19, u = u * 5 + 3864292196) : (l = o[m], l = l * d & ui | l * p & Zi, l = l << 15 | l >>> 17, l = l * f & ui | l * g & Zi, h ^= l, h = h << 13 | h >>> 19, h = h * 5 + 3864292196);
17883
+ m & 1 ? (a = o[m], a = a * d & hi | a * p & Zi, a = a << 15 | a >>> 17, a = a * f & hi | a * g & Zi, u ^= a, u = u << 13 | u >>> 19, u = u * 5 + 3864292196) : (l = o[m], l = l * d & hi | l * p & Zi, l = l << 15 | l >>> 17, l = l * f & hi | l * g & Zi, h ^= l, h = h << 13 | h >>> 19, h = h * 5 + 3864292196);
17854
17884
  switch (a = 0, s) {
17855
17885
  case 3:
17856
17886
  a ^= e[r * 4 + 2] << 16;
17857
17887
  case 2:
17858
17888
  a ^= e[r * 4 + 1] << 8;
17859
17889
  case 1:
17860
- a ^= e[r * 4], a = a * d & ui | a * p & Zi, a = a << 15 | a >>> 17, a = a * f & ui | a * g & Zi, r & 1 ? u ^= a : h ^= a;
17890
+ a ^= e[r * 4], a = a * d & hi | a * p & Zi, a = a << 15 | a >>> 17, a = a * f & hi | a * g & Zi, r & 1 ? u ^= a : h ^= a;
17861
17891
  }
17862
17892
  this.h1 = u, this.h2 = h;
17863
17893
  }
17864
17894
  hexdigest() {
17865
17895
  let t = this.h1, e = this.h2;
17866
- return t ^= e >>> 1, t = t * 3981806797 & ui | t * 36045 & Zi, e = e * 4283543511 & ui | ((e << 16 | t >>> 16) * 2950163797 & ui) >>> 16, t ^= e >>> 1, t = t * 444984403 & ui | t * 60499 & Zi, e = e * 3301882366 & ui | ((e << 16 | t >>> 16) * 3120437893 & ui) >>> 16, t ^= e >>> 1, (t >>> 0).toString(16).padStart(8, "0") + (e >>> 0).toString(16).padStart(8, "0");
17896
+ return t ^= e >>> 1, t = t * 3981806797 & hi | t * 36045 & Zi, e = e * 4283543511 & hi | ((e << 16 | t >>> 16) * 2950163797 & hi) >>> 16, t ^= e >>> 1, t = t * 444984403 & hi | t * 60499 & Zi, e = e * 3301882366 & hi | ((e << 16 | t >>> 16) * 3120437893 & hi) >>> 16, t ^= e >>> 1, (t >>> 0).toString(16).padStart(8, "0") + (e >>> 0).toString(16).padStart(8, "0");
17867
17897
  }
17868
17898
  }
17869
17899
  const tg = Object.freeze({
@@ -18019,13 +18049,13 @@ class gw extends _m {
18019
18049
  }
18020
18050
  }
18021
18051
  _u = new WeakMap();
18022
- var il;
18052
+ var rl;
18023
18053
  class sI {
18024
18054
  constructor({
18025
18055
  ownerDocument: t = globalThis.document,
18026
18056
  styleElement: e = null
18027
18057
  }) {
18028
- x(this, il, /* @__PURE__ */ new Set());
18058
+ x(this, rl, /* @__PURE__ */ new Set());
18029
18059
  this._document = t, this.nativeFontFaces = /* @__PURE__ */ new Set(), this.styleElement = null, this.loadingRequests = [], this.loadTestFontId = 0;
18030
18060
  }
18031
18061
  addNativeFontFace(t) {
@@ -18042,13 +18072,13 @@ class sI {
18042
18072
  clear() {
18043
18073
  for (const t of this.nativeFontFaces)
18044
18074
  this._document.fonts.delete(t);
18045
- this.nativeFontFaces.clear(), c(this, il).clear(), this.styleElement && (this.styleElement.remove(), this.styleElement = null);
18075
+ this.nativeFontFaces.clear(), c(this, rl).clear(), this.styleElement && (this.styleElement.remove(), this.styleElement = null);
18046
18076
  }
18047
18077
  async loadSystemFont({
18048
18078
  systemFontInfo: t,
18049
18079
  _inspectFont: e
18050
18080
  }) {
18051
- if (!(!t || c(this, il).has(t.loadedName))) {
18081
+ if (!(!t || c(this, rl).has(t.loadedName))) {
18052
18082
  if (Fe(!this.disableFontFace, "loadSystemFont shouldn't be called when `disableFontFace` is set."), this.isFontLoadingAPISupported) {
18053
18083
  const {
18054
18084
  loadedName: i,
@@ -18057,7 +18087,7 @@ class sI {
18057
18087
  } = t, o = new FontFace(i, r, s);
18058
18088
  this.addNativeFontFace(o);
18059
18089
  try {
18060
- await o.load(), c(this, il).add(i), e == null || e(t);
18090
+ await o.load(), c(this, rl).add(i), e == null || e(t);
18061
18091
  } catch {
18062
18092
  Rt(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`), this.removeNativeFontFace(o);
18063
18093
  }
@@ -18169,7 +18199,7 @@ class sI {
18169
18199
  });
18170
18200
  }
18171
18201
  }
18172
- il = new WeakMap();
18202
+ rl = new WeakMap();
18173
18203
  class oI {
18174
18204
  constructor(t, {
18175
18205
  disableFontFace: e = !1,
@@ -18258,13 +18288,13 @@ function Ln(n) {
18258
18288
  }
18259
18289
  return new sp(n.message, n.toString());
18260
18290
  }
18261
- var rl, Si, mw, bw, yw, ud;
18291
+ var sl, Si, mw, bw, yw, ud;
18262
18292
  class Cc {
18263
18293
  constructor(t, e, i) {
18264
18294
  x(this, Si);
18265
- x(this, rl, new AbortController());
18295
+ x(this, sl, new AbortController());
18266
18296
  this.sourceName = t, this.targetName = e, this.comObj = i, this.callbackId = 1, this.streamId = 1, this.streamSinks = /* @__PURE__ */ Object.create(null), this.streamControllers = /* @__PURE__ */ Object.create(null), this.callbackCapabilities = /* @__PURE__ */ Object.create(null), this.actionHandler = /* @__PURE__ */ Object.create(null), i.addEventListener("message", A(this, Si, mw).bind(this), {
18267
- signal: c(this, rl).signal
18297
+ signal: c(this, sl).signal
18268
18298
  });
18269
18299
  }
18270
18300
  on(t, e) {
@@ -18342,10 +18372,10 @@ class Cc {
18342
18372
  }
18343
18373
  destroy() {
18344
18374
  var t;
18345
- (t = c(this, rl)) == null || t.abort(), y(this, rl, null);
18375
+ (t = c(this, sl)) == null || t.abort(), y(this, sl, null);
18346
18376
  }
18347
18377
  }
18348
- rl = new WeakMap(), Si = new WeakSet(), mw = function({
18378
+ sl = new WeakMap(), Si = new WeakSet(), mw = function({
18349
18379
  data: t
18350
18380
  }) {
18351
18381
  if (t.targetName !== this.sourceName)
@@ -18634,7 +18664,7 @@ class Aw {
18634
18664
  destroy(t = !1) {
18635
18665
  }
18636
18666
  }
18637
- var Mo, sl, Br, $r, hn, Lo, Do, rt, ln, Tc, Ia, hd, Oa, Sw, eg, Ma, Pc, Rc, ng, Ic;
18667
+ var Mo, ol, Br, $r, hn, Lo, Do, rt, ln, Tc, Ia, hd, Oa, Sw, eg, Ma, Pc, Rc, ng, Ic;
18638
18668
  class lI extends Aw {
18639
18669
  constructor({
18640
18670
  docId: e,
@@ -18643,7 +18673,7 @@ class lI extends Aw {
18643
18673
  super();
18644
18674
  x(this, rt);
18645
18675
  x(this, Mo);
18646
- x(this, sl);
18676
+ x(this, ol);
18647
18677
  x(this, Br);
18648
18678
  x(this, $r);
18649
18679
  x(this, hn);
@@ -18749,11 +18779,11 @@ class lI extends Aw {
18749
18779
  }
18750
18780
  destroy(e = !1) {
18751
18781
  var i, r, s, o;
18752
- e && ((i = c(this, Lo)) != null && i.size) || ((r = c(this, Br)) == null || r.parentNode.parentNode.remove(), y(this, Br, null), (s = c(this, sl)) == null || s.clear(), y(this, sl, null), (o = c(this, Lo)) == null || o.clear(), y(this, Lo, null), y(this, Do, 0));
18782
+ e && ((i = c(this, Lo)) != null && i.size) || ((r = c(this, Br)) == null || r.parentNode.parentNode.remove(), y(this, Br, null), (s = c(this, ol)) == null || s.clear(), y(this, ol, null), (o = c(this, Lo)) == null || o.clear(), y(this, Lo, null), y(this, Do, 0));
18753
18783
  }
18754
18784
  }
18755
- Mo = new WeakMap(), sl = new WeakMap(), Br = new WeakMap(), $r = new WeakMap(), hn = new WeakMap(), Lo = new WeakMap(), Do = new WeakMap(), rt = new WeakSet(), ln = function() {
18756
- return c(this, sl) || y(this, sl, /* @__PURE__ */ new Map());
18785
+ Mo = new WeakMap(), ol = new WeakMap(), Br = new WeakMap(), $r = new WeakMap(), hn = new WeakMap(), Lo = new WeakMap(), Do = new WeakMap(), rt = new WeakSet(), ln = function() {
18786
+ return c(this, ol) || y(this, ol, /* @__PURE__ */ new Map());
18757
18787
  }, Tc = function() {
18758
18788
  return c(this, Lo) || y(this, Lo, /* @__PURE__ */ new Map());
18759
18789
  }, Ia = function() {
@@ -19348,7 +19378,7 @@ function Dy(n, t) {
19348
19378
  })), n.putImageData(a, 0, d * zn);
19349
19379
  }
19350
19380
  }
19351
- function vc(n, t) {
19381
+ function wc(n, t) {
19352
19382
  const e = ["strokeStyle", "fillStyle", "fillRule", "globalAlpha", "lineWidth", "lineCap", "lineJoin", "miterLimit", "globalCompositeOperation", "font", "filter"];
19353
19383
  for (const i of e)
19354
19384
  n[i] !== void 0 && (t[i] = n[i]);
@@ -19557,12 +19587,12 @@ const Om = class Om {
19557
19587
  const t = this.ctx.canvas.width, e = this.ctx.canvas.height, i = "smaskGroupAt" + this.groupLevel, r = this.cachedCanvases.getCanvas(i, t, e);
19558
19588
  this.suspendedCtx = this.ctx, this.ctx = r.context;
19559
19589
  const s = this.ctx;
19560
- s.setTransform(...xe(this.suspendedCtx)), vc(this.suspendedCtx, s), wI(s, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
19590
+ s.setTransform(...xe(this.suspendedCtx)), wc(this.suspendedCtx, s), wI(s, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
19561
19591
  }
19562
19592
  endSMaskMode() {
19563
19593
  if (!this.inSMaskMode)
19564
19594
  throw new Error("endSMaskMode called while not in smask mode");
19565
- this.ctx._removeMirroring(), vc(this.ctx, this.suspendedCtx), this.ctx = this.suspendedCtx, this.suspendedCtx = null;
19595
+ this.ctx._removeMirroring(), wc(this.ctx, this.suspendedCtx), this.ctx = this.suspendedCtx, this.suspendedCtx = null;
19566
19596
  }
19567
19597
  compose(t) {
19568
19598
  if (!this.current.activeSMask)
@@ -19593,12 +19623,12 @@ const Om = class Om {
19593
19623
  m.rect(l, u, i, r), e.clip(m), e.globalCompositeOperation = "destination-in", e.drawImage(f, p, g, i, r, l, u, i, r), e.restore();
19594
19624
  }
19595
19625
  save() {
19596
- this.inSMaskMode ? (vc(this.ctx, this.suspendedCtx), this.suspendedCtx.save()) : this.ctx.save();
19626
+ this.inSMaskMode ? (wc(this.ctx, this.suspendedCtx), this.suspendedCtx.save()) : this.ctx.save();
19597
19627
  const t = this.current;
19598
19628
  this.stateStack.push(t), this.current = t.clone();
19599
19629
  }
19600
19630
  restore() {
19601
- this.stateStack.length === 0 && this.inSMaskMode && this.endSMaskMode(), this.stateStack.length !== 0 && (this.current = this.stateStack.pop(), this.inSMaskMode ? (this.suspendedCtx.restore(), vc(this.suspendedCtx, this.ctx)) : this.ctx.restore(), this.checkSMaskState(), this.pendingClip = null, this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null);
19631
+ this.stateStack.length === 0 && this.inSMaskMode && this.endSMaskMode(), this.stateStack.length !== 0 && (this.current = this.stateStack.pop(), this.inSMaskMode ? (this.suspendedCtx.restore(), wc(this.suspendedCtx, this.ctx)) : this.ctx.restore(), this.checkSMaskState(), this.pendingClip = null, this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null);
19602
19632
  }
19603
19633
  transform(t, e, i, r, s, o) {
19604
19634
  this.ctx.transform(t, e, i, r, s, o), this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null;
@@ -19970,7 +20000,7 @@ const Om = class Om {
19970
20000
  backdrop: t.smask.backdrop,
19971
20001
  transferMap: t.smask.transferMap || null,
19972
20002
  startTransformInverse: null
19973
- }) : (e.setTransform(1, 0, 0, 1, 0, 0), e.translate(o, a), e.save()), vc(e, f), this.ctx = f, this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]), this.groupStack.push(e), this.groupLevel++;
20003
+ }) : (e.setTransform(1, 0, 0, 1, 0, 0), e.translate(o, a), e.save()), wc(e, f), this.ctx = f, this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]), this.groupStack.push(e), this.groupLevel++;
19974
20004
  }
19975
20005
  endGroup(t) {
19976
20006
  if (!this.contentVisible)
@@ -20258,9 +20288,9 @@ Vi = new WeakSet(), sg = function() {
20258
20288
  const r = new Path2D();
20259
20289
  return r.addPath(t, new DOMMatrix(i).invertSelf().multiplySelf(e)), r;
20260
20290
  };
20261
- let $a = Om;
20291
+ let Ha = Om;
20262
20292
  for (const n in Ci)
20263
- $a.prototype[n] !== void 0 && ($a.prototype[Ci[n]] = $a.prototype[n]);
20293
+ Ha.prototype[n] !== void 0 && (Ha.prototype[Ci[n]] = Ha.prototype[n]);
20264
20294
  var Tu, Pu;
20265
20295
  class rs {
20266
20296
  static get workerPort() {
@@ -20306,7 +20336,7 @@ class _I {
20306
20336
  }
20307
20337
  No = new WeakMap(), Ru = new WeakMap();
20308
20338
  const La = Symbol("INTERNAL");
20309
- var Iu, Ou, Mu, ol;
20339
+ var Iu, Ou, Mu, al;
20310
20340
  class CI {
20311
20341
  constructor(t, {
20312
20342
  name: e,
@@ -20317,13 +20347,13 @@ class CI {
20317
20347
  x(this, Iu, !1);
20318
20348
  x(this, Ou, !1);
20319
20349
  x(this, Mu, !1);
20320
- x(this, ol, !0);
20350
+ x(this, al, !0);
20321
20351
  y(this, Iu, !!(t & ii.DISPLAY)), y(this, Ou, !!(t & ii.PRINT)), this.name = e, this.intent = i, this.usage = r, this.rbGroups = s;
20322
20352
  }
20323
20353
  get visible() {
20324
20354
  if (c(this, Mu))
20325
- return c(this, ol);
20326
- if (!c(this, ol))
20355
+ return c(this, al);
20356
+ if (!c(this, al))
20327
20357
  return !1;
20328
20358
  const {
20329
20359
  print: t,
@@ -20332,20 +20362,20 @@ class CI {
20332
20362
  return c(this, Iu) ? (e == null ? void 0 : e.viewState) !== "OFF" : c(this, Ou) ? (t == null ? void 0 : t.printState) !== "OFF" : !0;
20333
20363
  }
20334
20364
  _setVisible(t, e, i = !1) {
20335
- t !== La && le("Internal method `_setVisible` called."), y(this, Mu, i), y(this, ol, e);
20365
+ t !== La && le("Internal method `_setVisible` called."), y(this, Mu, i), y(this, al, e);
20336
20366
  }
20337
20367
  }
20338
- Iu = new WeakMap(), Ou = new WeakMap(), Mu = new WeakMap(), ol = new WeakMap();
20339
- var Ps, ie, al, ll, Lu, lg;
20368
+ Iu = new WeakMap(), Ou = new WeakMap(), Mu = new WeakMap(), al = new WeakMap();
20369
+ var Ps, ie, ll, cl, Lu, lg;
20340
20370
  class TI {
20341
20371
  constructor(t, e = ii.DISPLAY) {
20342
20372
  x(this, Lu);
20343
20373
  x(this, Ps, null);
20344
20374
  x(this, ie, /* @__PURE__ */ new Map());
20345
- x(this, al, null);
20346
20375
  x(this, ll, null);
20376
+ x(this, cl, null);
20347
20377
  if (this.renderingIntent = e, this.name = null, this.creator = null, t !== null) {
20348
- this.name = t.name, this.creator = t.creator, y(this, ll, t.order);
20378
+ this.name = t.name, this.creator = t.creator, y(this, cl, t.order);
20349
20379
  for (const i of t.groups)
20350
20380
  c(this, ie).set(i.id, new CI(e, i));
20351
20381
  if (t.baseState === "OFF")
@@ -20355,7 +20385,7 @@ class TI {
20355
20385
  c(this, ie).get(i)._setVisible(La, !0);
20356
20386
  for (const i of t.off)
20357
20387
  c(this, ie).get(i)._setVisible(La, !1);
20358
- y(this, al, this.getHash());
20388
+ y(this, ll, this.getHash());
20359
20389
  }
20360
20390
  }
20361
20391
  isVisible(t) {
@@ -20448,10 +20478,10 @@ class TI {
20448
20478
  y(this, Ps, null);
20449
20479
  }
20450
20480
  get hasInitialVisibility() {
20451
- return c(this, al) === null || this.getHash() === c(this, al);
20481
+ return c(this, ll) === null || this.getHash() === c(this, ll);
20452
20482
  }
20453
20483
  getOrder() {
20454
- return c(this, ie).size ? c(this, ll) ? c(this, ll).slice() : [...c(this, ie).keys()] : null;
20484
+ return c(this, ie).size ? c(this, cl) ? c(this, cl).slice() : [...c(this, ie).keys()] : null;
20455
20485
  }
20456
20486
  getGroups() {
20457
20487
  return c(this, ie).size > 0 ? wm(c(this, ie)) : null;
@@ -20468,7 +20498,7 @@ class TI {
20468
20498
  return y(this, Ps, t.hexdigest());
20469
20499
  }
20470
20500
  }
20471
- Ps = new WeakMap(), ie = new WeakMap(), al = new WeakMap(), ll = new WeakMap(), Lu = new WeakSet(), lg = function(t) {
20501
+ Ps = new WeakMap(), ie = new WeakMap(), ll = new WeakMap(), cl = new WeakMap(), Lu = new WeakSet(), lg = function(t) {
20472
20502
  const e = t.length;
20473
20503
  if (e < 2)
20474
20504
  return !0;
@@ -21380,7 +21410,7 @@ class WI {
21380
21410
  }
21381
21411
  }
21382
21412
  const VI = 1e5, On = 30, qI = 0.8;
21383
- var Uy, Rs, Fn, Du, Nu, Fo, Hr, Fu, ju, jo, cl, ul, Is, hl, zu, dl, zo, Bu, $u, Bo, $o, Hu, Os, fl, cs, Mw, Lw, cg, ai, dd, ug, Dw, Nw;
21413
+ var Uy, Rs, Fn, Du, Nu, Fo, Hr, Fu, ju, jo, ul, hl, Is, dl, zu, fl, zo, Bu, $u, Bo, $o, Hu, Os, pl, cs, Mw, Lw, cg, li, dd, ug, Dw, Nw;
21384
21414
  const He = class He {
21385
21415
  constructor({
21386
21416
  textContentSource: t,
@@ -21397,27 +21427,27 @@ const He = class He {
21397
21427
  x(this, Fu, 0);
21398
21428
  x(this, ju, 0);
21399
21429
  x(this, jo, null);
21400
- x(this, cl, null);
21401
- x(this, ul, 0);
21430
+ x(this, ul, null);
21431
+ x(this, hl, 0);
21402
21432
  x(this, Is, 0);
21403
- x(this, hl, /* @__PURE__ */ Object.create(null));
21433
+ x(this, dl, /* @__PURE__ */ Object.create(null));
21404
21434
  x(this, zu, []);
21405
- x(this, dl, null);
21435
+ x(this, fl, null);
21406
21436
  x(this, zo, []);
21407
21437
  x(this, Bu, /* @__PURE__ */ new WeakMap());
21408
21438
  x(this, $u, null);
21409
21439
  var l;
21410
21440
  if (t instanceof ReadableStream)
21411
- y(this, dl, t);
21441
+ y(this, fl, t);
21412
21442
  else if (typeof t == "object")
21413
- y(this, dl, new ReadableStream({
21443
+ y(this, fl, new ReadableStream({
21414
21444
  start(u) {
21415
21445
  u.enqueue(t), u.close();
21416
21446
  }
21417
21447
  }));
21418
21448
  else
21419
21449
  throw new Error('No "textContentSource" parameter specified.');
21420
- y(this, Fn, y(this, cl, e)), y(this, Is, i.scale * (globalThis.devicePixelRatio || 1)), y(this, ul, i.rotation), y(this, Hr, {
21450
+ y(this, Fn, y(this, ul, e)), y(this, Is, i.scale * (globalThis.devicePixelRatio || 1)), y(this, hl, i.rotation), y(this, Hr, {
21421
21451
  div: null,
21422
21452
  properties: null,
21423
21453
  ctx: null
@@ -21428,8 +21458,8 @@ const He = class He {
21428
21458
  pageX: o,
21429
21459
  pageY: a
21430
21460
  } = i.rawDims;
21431
- y(this, $u, [1, 0, 0, -1, -o, a + s]), y(this, ju, r), y(this, Fu, s), A(l = He, ai, Dw).call(l), ya(e, i), c(this, Rs).promise.finally(() => {
21432
- c(He, fl).delete(this), y(this, Hr, null), y(this, hl, null);
21461
+ y(this, $u, [1, 0, 0, -1, -o, a + s]), y(this, ju, r), y(this, Fu, s), A(l = He, li, Dw).call(l), ya(e, i), c(this, Rs).promise.finally(() => {
21462
+ c(He, pl).delete(this), y(this, Hr, null), y(this, dl, null);
21433
21463
  }).catch(() => {
21434
21464
  });
21435
21465
  }
@@ -21450,10 +21480,10 @@ const He = class He {
21450
21480
  c(this, Rs).resolve();
21451
21481
  return;
21452
21482
  }
21453
- c(this, Fo) ?? y(this, Fo, e.lang), Object.assign(c(this, hl), e.styles), A(this, cs, Mw).call(this, e.items), t();
21483
+ c(this, Fo) ?? y(this, Fo, e.lang), Object.assign(c(this, dl), e.styles), A(this, cs, Mw).call(this, e.items), t();
21454
21484
  }, c(this, Rs).reject);
21455
21485
  };
21456
- return y(this, jo, c(this, dl).getReader()), c(He, fl).add(this), t(), c(this, Rs).promise;
21486
+ return y(this, jo, c(this, fl).getReader()), c(He, pl).add(this), t(), c(this, Rs).promise;
21457
21487
  }
21458
21488
  update({
21459
21489
  viewport: t,
@@ -21461,14 +21491,14 @@ const He = class He {
21461
21491
  }) {
21462
21492
  var s;
21463
21493
  const i = t.scale * (globalThis.devicePixelRatio || 1), r = t.rotation;
21464
- if (r !== c(this, ul) && (e == null || e(), y(this, ul, r), ya(c(this, cl), {
21494
+ if (r !== c(this, hl) && (e == null || e(), y(this, hl, r), ya(c(this, ul), {
21465
21495
  rotation: r
21466
21496
  })), i !== c(this, Is)) {
21467
21497
  e == null || e(), y(this, Is, i);
21468
21498
  const o = {
21469
21499
  div: null,
21470
21500
  properties: null,
21471
- ctx: A(s = He, ai, dd).call(s, c(this, Fo))
21501
+ ctx: A(s = He, li, dd).call(s, c(this, Fo))
21472
21502
  };
21473
21503
  for (const a of c(this, zo))
21474
21504
  o.properties = c(this, Bu).get(a), o.div = a, A(this, cs, cg).call(this, o);
@@ -21487,7 +21517,7 @@ const He = class He {
21487
21517
  return c(this, zu);
21488
21518
  }
21489
21519
  static cleanup() {
21490
- if (!(c(this, fl).size > 0)) {
21520
+ if (!(c(this, pl).size > 0)) {
21491
21521
  c(this, Bo).clear();
21492
21522
  for (const {
21493
21523
  canvas: t
@@ -21497,11 +21527,11 @@ const He = class He {
21497
21527
  }
21498
21528
  }
21499
21529
  };
21500
- Rs = new WeakMap(), Fn = new WeakMap(), Du = new WeakMap(), Nu = new WeakMap(), Fo = new WeakMap(), Hr = new WeakMap(), Fu = new WeakMap(), ju = new WeakMap(), jo = new WeakMap(), cl = new WeakMap(), ul = new WeakMap(), Is = new WeakMap(), hl = new WeakMap(), zu = new WeakMap(), dl = new WeakMap(), zo = new WeakMap(), Bu = new WeakMap(), $u = new WeakMap(), Bo = new WeakMap(), $o = new WeakMap(), Hu = new WeakMap(), Os = new WeakMap(), fl = new WeakMap(), cs = new WeakSet(), Mw = function(t) {
21530
+ Rs = new WeakMap(), Fn = new WeakMap(), Du = new WeakMap(), Nu = new WeakMap(), Fo = new WeakMap(), Hr = new WeakMap(), Fu = new WeakMap(), ju = new WeakMap(), jo = new WeakMap(), ul = new WeakMap(), hl = new WeakMap(), Is = new WeakMap(), dl = new WeakMap(), zu = new WeakMap(), fl = new WeakMap(), zo = new WeakMap(), Bu = new WeakMap(), $u = new WeakMap(), Bo = new WeakMap(), $o = new WeakMap(), Hu = new WeakMap(), Os = new WeakMap(), pl = new WeakMap(), cs = new WeakSet(), Mw = function(t) {
21501
21531
  var r, s;
21502
21532
  if (c(this, Du))
21503
21533
  return;
21504
- (s = c(this, Hr)).ctx ?? (s.ctx = A(r = He, ai, dd).call(r, c(this, Fo)));
21534
+ (s = c(this, Hr)).ctx ?? (s.ctx = A(r = He, li, dd).call(r, c(this, Fo)));
21505
21535
  const e = c(this, zo), i = c(this, zu);
21506
21536
  for (const o of t) {
21507
21537
  if (e.length > VI) {
@@ -21529,15 +21559,15 @@ Rs = new WeakMap(), Fn = new WeakMap(), Du = new WeakMap(), Nu = new WeakMap(),
21529
21559
  c(this, zo).push(e);
21530
21560
  const r = pt.transform(c(this, $u), t.transform);
21531
21561
  let s = Math.atan2(r[1], r[0]);
21532
- const o = c(this, hl)[t.fontName];
21562
+ const o = c(this, dl)[t.fontName];
21533
21563
  o.vertical && (s += Math.PI / 2);
21534
21564
  let a = c(this, Nu) && o.fontSubstitution || o.fontFamily;
21535
21565
  a = He.fontFamilyMap.get(a) || a;
21536
- const l = Math.hypot(r[2], r[3]), u = l * A(m = He, ai, Nw).call(m, a, c(this, Fo));
21566
+ const l = Math.hypot(r[2], r[3]), u = l * A(m = He, li, Nw).call(m, a, c(this, Fo));
21537
21567
  let h, d;
21538
21568
  s === 0 ? (h = r[4], d = r[5] - u) : (h = r[4] + u * Math.sin(s), d = r[5] - u * Math.cos(s));
21539
21569
  const f = "calc(var(--scale-factor)*", p = e.style;
21540
- c(this, Fn) === c(this, cl) ? (p.left = `${(100 * h / c(this, ju)).toFixed(2)}%`, p.top = `${(100 * d / c(this, Fu)).toFixed(2)}%`) : (p.left = `${f}${h.toFixed(2)}px)`, p.top = `${f}${d.toFixed(2)}px)`), p.fontSize = `${f}${(c(He, Os) * l).toFixed(2)}px)`, p.fontFamily = a, i.fontSize = l, e.setAttribute("role", "presentation"), e.textContent = t.str, e.dir = t.dir, c(this, Nu) && (e.dataset.fontName = o.fontSubstitutionLoadedName || t.fontName), s !== 0 && (i.angle = s * (180 / Math.PI));
21570
+ c(this, Fn) === c(this, ul) ? (p.left = `${(100 * h / c(this, ju)).toFixed(2)}%`, p.top = `${(100 * d / c(this, Fu)).toFixed(2)}%`) : (p.left = `${f}${h.toFixed(2)}px)`, p.top = `${f}${d.toFixed(2)}px)`), p.fontSize = `${f}${(c(He, Os) * l).toFixed(2)}px)`, p.fontFamily = a, i.fontSize = l, e.setAttribute("role", "presentation"), e.textContent = t.str, e.dir = t.dir, c(this, Nu) && (e.dataset.fontName = o.fontSubstitutionLoadedName || t.fontName), s !== 0 && (i.angle = s * (180 / Math.PI));
21541
21571
  let g = !1;
21542
21572
  if (t.str.length > 1)
21543
21573
  g = !0;
@@ -21566,14 +21596,14 @@ Rs = new WeakMap(), Fn = new WeakMap(), Du = new WeakMap(), Nu = new WeakMap(),
21566
21596
  canvasWidth: u,
21567
21597
  fontSize: h
21568
21598
  } = i;
21569
- A(a = He, ai, ug).call(a, r, h * c(this, Is), l);
21599
+ A(a = He, li, ug).call(a, r, h * c(this, Is), l);
21570
21600
  const {
21571
21601
  width: d
21572
21602
  } = r.measureText(e.textContent);
21573
21603
  d > 0 && (o = `scaleX(${u * c(this, Is) / d}) ${o}`);
21574
21604
  }
21575
21605
  i.angle !== 0 && (o = `rotate(${i.angle}deg) ${o}`), o.length > 0 && (s.transform = o);
21576
- }, ai = new WeakSet(), dd = function(t = null) {
21606
+ }, li = new WeakSet(), dd = function(t = null) {
21577
21607
  let e = c(this, $o).get(t || (t = ""));
21578
21608
  if (!e) {
21579
21609
  const i = document.createElement("canvas");
@@ -21598,8 +21628,8 @@ Rs = new WeakMap(), Fn = new WeakMap(), Du = new WeakMap(), Nu = new WeakMap(),
21598
21628
  const i = c(this, Bo).get(t);
21599
21629
  if (i)
21600
21630
  return i;
21601
- const r = A(this, ai, dd).call(this, e);
21602
- r.canvas.width = r.canvas.height = On, A(this, ai, ug).call(this, r, On, t);
21631
+ const r = A(this, li, dd).call(this, e);
21632
+ r.canvas.width = r.canvas.height = On, A(this, li, ug).call(this, r, On, t);
21603
21633
  const s = r.measureText("");
21604
21634
  let o = s.fontBoundingBoxAscent, a = Math.abs(s.fontBoundingBoxDescent);
21605
21635
  if (o) {
@@ -21623,7 +21653,7 @@ Rs = new WeakMap(), Fn = new WeakMap(), Du = new WeakMap(), Nu = new WeakMap(),
21623
21653
  r.canvas.width = r.canvas.height = 0;
21624
21654
  const u = o ? o / (o + a) : qI;
21625
21655
  return c(this, Bo).set(t, u), u;
21626
- }, x(He, ai), x(He, Bo, /* @__PURE__ */ new Map()), x(He, $o, /* @__PURE__ */ new Map()), x(He, Hu, /* @__PURE__ */ new WeakMap()), x(He, Os, null), x(He, fl, /* @__PURE__ */ new Set());
21656
+ }, x(He, li), x(He, Bo, /* @__PURE__ */ new Map()), x(He, $o, /* @__PURE__ */ new Map()), x(He, Hu, /* @__PURE__ */ new WeakMap()), x(He, Os, null), x(He, pl, /* @__PURE__ */ new Set());
21627
21657
  let Qc = He;
21628
21658
  class Zc {
21629
21659
  static textContent(t) {
@@ -21664,7 +21694,7 @@ function tO(n = {}) {
21664
21694
  const t = new hg(), {
21665
21695
  docId: e
21666
21696
  } = t, i = n.url ? eO(n.url) : null, r = n.data ? nO(n.data) : null, s = n.httpHeaders || null, o = n.withCredentials === !0, a = n.password ?? null, l = n.range instanceof Fw ? n.range : null, u = Number.isInteger(n.rangeChunkSize) && n.rangeChunkSize > 0 ? n.rangeChunkSize : GI;
21667
- let h = n.worker instanceof Ha ? n.worker : null;
21697
+ let h = n.worker instanceof Ua ? n.worker : null;
21668
21698
  const d = n.verbosity, f = typeof n.docBaseUrl == "string" && !Cf(n.docBaseUrl) ? n.docBaseUrl : null, p = typeof n.cMapUrl == "string" ? n.cMapUrl : null, g = n.cMapPacked !== !1, m = n.CMapReaderFactory || JI, v = typeof n.standardFontDataUrl == "string" ? n.standardFontDataUrl : null, b = n.StandardFontDataFactory || ZI, w = n.stopAtErrors !== !0, E = Number.isInteger(n.maxImageSize) && n.maxImageSize > -1 ? n.maxImageSize : -1, T = n.isEvalSupported !== !1, C = typeof n.isOffscreenCanvasSupported == "boolean" ? n.isOffscreenCanvasSupported : !mn, _ = typeof n.isImageDecoderSupported == "boolean" ? n.isImageDecoderSupported : !mn && (Tn.platform.isFirefox || !globalThis.chrome), O = Number.isInteger(n.canvasMaxAreaInBytes) ? n.canvasMaxAreaInBytes : -1, U = typeof n.disableFontFace == "boolean" ? n.disableFontFace : mn, B = n.fontExtraProperties === !0, R = n.enableXfa === !0, z = n.ownerDocument || globalThis.document, D = n.disableRange === !0, N = n.disableStream === !0, $ = n.disableAutoFetch === !0, W = n.pdfBug === !0, M = n.CanvasFactory || KI, L = n.FilterFactory || QI, nt = n.enableHWA === !0, gt = l ? l.length : n.length ?? NaN, S = typeof n.useSystemFonts == "boolean" ? n.useSystemFonts : !mn && !U, H = typeof n.useWorkerFetch == "boolean" ? n.useWorkerFetch : m === xw && b === kw && p && v && Sc(p, document.baseURI) && Sc(v, document.baseURI), Q = null;
21669
21699
  zR(d);
21670
21700
  const k = {
@@ -21689,7 +21719,7 @@ function tO(n = {}) {
21689
21719
  verbosity: d,
21690
21720
  port: rs.workerPort
21691
21721
  };
21692
- h = Y.port ? Ha.fromPort(Y) : new Ha(Y), t._worker = h;
21722
+ h = Y.port ? Ua.fromPort(Y) : new Ua(Y), t._worker = h;
21693
21723
  }
21694
21724
  const J = {
21695
21725
  docId: e,
@@ -22343,14 +22373,14 @@ class sO {
22343
22373
  }
22344
22374
  }
22345
22375
  Wr = new WeakMap(), sf = new WeakMap();
22346
- var of, Ho, Uo, pl, pd, gl, gd;
22376
+ var of, Ho, Uo, gl, pd, ml, gd;
22347
22377
  const we = class we {
22348
22378
  constructor({
22349
22379
  name: t = null,
22350
22380
  port: e = null,
22351
22381
  verbosity: i = BR()
22352
22382
  } = {}) {
22353
- x(this, pl);
22383
+ x(this, gl);
22354
22384
  var r;
22355
22385
  if (this.name = t, this.destroyed = !1, this.verbosity = i, this._readyCapability = Promise.withResolvers(), this._port = null, this._webWorker = null, this._messageHandler = null, e) {
22356
22386
  if ((r = c(we, Uo)) != null && r.has(e))
@@ -22371,10 +22401,10 @@ const we = class we {
22371
22401
  }
22372
22402
  _initializeFromPort(t) {
22373
22403
  this._port = t, this._messageHandler = new Cc("main", "worker", t), this._messageHandler.on("ready", function() {
22374
- }), A(this, pl, pd).call(this);
22404
+ }), A(this, gl, pd).call(this);
22375
22405
  }
22376
22406
  _initialize() {
22377
- if (c(we, Ho) || c(we, gl, gd)) {
22407
+ if (c(we, Ho) || c(we, ml, gd)) {
22378
22408
  this._setupFakeWorker();
22379
22409
  return;
22380
22410
  }
@@ -22397,7 +22427,7 @@ const we = class we {
22397
22427
  r();
22398
22428
  return;
22399
22429
  }
22400
- this._messageHandler = i, this._port = e, this._webWorker = e, A(this, pl, pd).call(this);
22430
+ this._messageHandler = i, this._port = e, this._webWorker = e, A(this, gl, pd).call(this);
22401
22431
  }), i.on("ready", (a) => {
22402
22432
  if (s.abort(), this.destroyed) {
22403
22433
  r();
@@ -22429,7 +22459,7 @@ const we = class we {
22429
22459
  const e = new sO();
22430
22460
  this._port = e;
22431
22461
  const i = `fake${wn(we, of)._++}`, r = new Cc(i + "_worker", i, e);
22432
- t.setup(r, e), this._messageHandler = new Cc(i, i + "_worker", e), A(this, pl, pd).call(this);
22462
+ t.setup(r, e), this._messageHandler = new Cc(i, i + "_worker", e), A(this, gl, pd).call(this);
22433
22463
  }).catch((t) => {
22434
22464
  this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`));
22435
22465
  });
@@ -22456,24 +22486,24 @@ const we = class we {
22456
22486
  throw new Error('No "GlobalWorkerOptions.workerSrc" specified.');
22457
22487
  }
22458
22488
  static get _setupFakeWorkerGlobal() {
22459
- return Ft(this, "_setupFakeWorkerGlobal", (async () => c(this, gl, gd) ? c(this, gl, gd) : (await import(
22489
+ return Ft(this, "_setupFakeWorkerGlobal", (async () => c(this, ml, gd) ? c(this, ml, gd) : (await import(
22460
22490
  /*webpackIgnore: true*/
22461
22491
  this.workerSrc
22462
22492
  )).WorkerMessageHandler)());
22463
22493
  }
22464
22494
  };
22465
- of = new WeakMap(), Ho = new WeakMap(), Uo = new WeakMap(), pl = new WeakSet(), pd = function() {
22495
+ of = new WeakMap(), Ho = new WeakMap(), Uo = new WeakMap(), gl = new WeakSet(), pd = function() {
22466
22496
  this._readyCapability.resolve(), this._messageHandler.send("configure", {
22467
22497
  verbosity: this.verbosity
22468
22498
  });
22469
- }, gl = new WeakSet(), gd = function() {
22499
+ }, ml = new WeakSet(), gd = function() {
22470
22500
  var t;
22471
22501
  try {
22472
22502
  return ((t = globalThis.pdfjsWorker) == null ? void 0 : t.WorkerMessageHandler) || null;
22473
22503
  } catch {
22474
22504
  return null;
22475
22505
  }
22476
- }, x(we, gl), x(we, of, 0), x(we, Ho, !1), x(we, Uo), mn && (y(we, Ho, !0), rs.workerSrc || (rs.workerSrc = "./pdf.worker.mjs")), we._isSameOrigin = (t, e) => {
22506
+ }, x(we, ml), x(we, of, 0), x(we, Ho, !1), x(we, Uo), mn && (y(we, Ho, !0), rs.workerSrc || (rs.workerSrc = "./pdf.worker.mjs")), we._isSameOrigin = (t, e) => {
22477
22507
  let i;
22478
22508
  try {
22479
22509
  if (i = new URL(t), !i.origin || i.origin === "null")
@@ -22489,15 +22519,15 @@ of = new WeakMap(), Ho = new WeakMap(), Uo = new WeakMap(), pl = new WeakSet(),
22489
22519
  type: "text/javascript"
22490
22520
  }));
22491
22521
  };
22492
- let Ha = we;
22493
- var Vr, hr, ml, bl, qr, Wo, Oc;
22522
+ let Ua = we;
22523
+ var Vr, hr, bl, yl, qr, Wo, Oc;
22494
22524
  class oO {
22495
22525
  constructor(t, e, i, r, s) {
22496
22526
  x(this, Wo);
22497
22527
  x(this, Vr, /* @__PURE__ */ new Map());
22498
22528
  x(this, hr, /* @__PURE__ */ new Map());
22499
- x(this, ml, /* @__PURE__ */ new Map());
22500
22529
  x(this, bl, /* @__PURE__ */ new Map());
22530
+ x(this, yl, /* @__PURE__ */ new Map());
22501
22531
  x(this, qr, null);
22502
22532
  this.messageHandler = t, this.loadingTask = e, this.commonObjs = new jw(), this.fontLoader = new sI({
22503
22533
  ownerDocument: r.ownerDocument,
@@ -22557,7 +22587,7 @@ class oO {
22557
22587
  const t = [];
22558
22588
  for (const r of c(this, hr).values())
22559
22589
  t.push(r._destroy());
22560
- c(this, hr).clear(), c(this, ml).clear(), c(this, bl).clear(), this.hasOwnProperty("annotationStorage") && this.annotationStorage.resetModified();
22590
+ c(this, hr).clear(), c(this, bl).clear(), c(this, yl).clear(), this.hasOwnProperty("annotationStorage") && this.annotationStorage.resetModified();
22561
22591
  const e = this.messageHandler.sendWithPromise("Terminate", null);
22562
22592
  return t.push(e), Promise.all(t).then(() => {
22563
22593
  var r, s;
@@ -22779,7 +22809,7 @@ class oO {
22779
22809
  getPage(t) {
22780
22810
  if (!Number.isInteger(t) || t <= 0 || t > this._numPages)
22781
22811
  return Promise.reject(new Error("Invalid page request."));
22782
- const e = t - 1, i = c(this, ml).get(e);
22812
+ const e = t - 1, i = c(this, bl).get(e);
22783
22813
  if (i)
22784
22814
  return i;
22785
22815
  const r = this.messageHandler.sendWithPromise("GetPage", {
@@ -22787,11 +22817,11 @@ class oO {
22787
22817
  }).then((s) => {
22788
22818
  if (this.destroyed)
22789
22819
  throw new Error("Transport destroyed");
22790
- s.refStr && c(this, bl).set(s.refStr, t);
22820
+ s.refStr && c(this, yl).set(s.refStr, t);
22791
22821
  const o = new rO(e, s, this, this._params.pdfBug);
22792
22822
  return c(this, hr).set(e, o), o;
22793
22823
  });
22794
- return c(this, ml).set(e, r), r;
22824
+ return c(this, bl).set(e, r), r;
22795
22825
  }
22796
22826
  getPageIndex(t) {
22797
22827
  return zy(t) ? this.messageHandler.sendWithPromise("GetPageIndex", {
@@ -22893,17 +22923,17 @@ class oO {
22893
22923
  if (!zy(t))
22894
22924
  return null;
22895
22925
  const e = t.gen === 0 ? `${t.num}R` : `${t.num}R${t.gen}`;
22896
- return c(this, bl).get(e) ?? null;
22926
+ return c(this, yl).get(e) ?? null;
22897
22927
  }
22898
22928
  }
22899
- Vr = new WeakMap(), hr = new WeakMap(), ml = new WeakMap(), bl = new WeakMap(), qr = new WeakMap(), Wo = new WeakSet(), Oc = function(t, e = null) {
22929
+ Vr = new WeakMap(), hr = new WeakMap(), bl = new WeakMap(), yl = new WeakMap(), qr = new WeakMap(), Wo = new WeakSet(), Oc = function(t, e = null) {
22900
22930
  const i = c(this, Vr).get(t);
22901
22931
  if (i)
22902
22932
  return i;
22903
22933
  const r = this.messageHandler.sendWithPromise(t, e);
22904
22934
  return c(this, Vr).set(t, r), r;
22905
22935
  };
22906
- const wc = Symbol("INITIAL_DATA");
22936
+ const xc = Symbol("INITIAL_DATA");
22907
22937
  var Yn, Uu, dg;
22908
22938
  class jw {
22909
22939
  constructor() {
@@ -22916,17 +22946,17 @@ class jw {
22916
22946
  return r.promise.then(() => e(r.data)), null;
22917
22947
  }
22918
22948
  const i = c(this, Yn)[t];
22919
- if (!i || i.data === wc)
22949
+ if (!i || i.data === xc)
22920
22950
  throw new Error(`Requesting object that isn't resolved yet ${t}.`);
22921
22951
  return i.data;
22922
22952
  }
22923
22953
  has(t) {
22924
22954
  const e = c(this, Yn)[t];
22925
- return !!e && e.data !== wc;
22955
+ return !!e && e.data !== xc;
22926
22956
  }
22927
22957
  delete(t) {
22928
22958
  const e = c(this, Yn)[t];
22929
- return !e || e.data === wc ? !1 : (delete c(this, Yn)[t], !0);
22959
+ return !e || e.data === xc ? !1 : (delete c(this, Yn)[t], !0);
22930
22960
  }
22931
22961
  resolve(t, e = null) {
22932
22962
  const i = A(this, Uu, dg).call(this, t);
@@ -22947,7 +22977,7 @@ class jw {
22947
22977
  const {
22948
22978
  data: e
22949
22979
  } = c(this, Yn)[t];
22950
- e !== wc && (yield [t, e]);
22980
+ e !== xc && (yield [t, e]);
22951
22981
  }
22952
22982
  }
22953
22983
  }
@@ -22955,7 +22985,7 @@ Yn = new WeakMap(), Uu = new WeakSet(), dg = function(t) {
22955
22985
  var e;
22956
22986
  return (e = c(this, Yn))[t] || (e[t] = {
22957
22987
  ...Promise.withResolvers(),
22958
- data: wc
22988
+ data: xc
22959
22989
  });
22960
22990
  };
22961
22991
  var Ls;
@@ -23025,7 +23055,7 @@ const uo = class uo {
23025
23055
  transform: s,
23026
23056
  background: o
23027
23057
  } = this.params;
23028
- this.gfx = new $a(i, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {
23058
+ this.gfx = new Ha(i, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {
23029
23059
  optionalContentConfig: e
23030
23060
  }, this.annotationCanvasMap, this.pageColors), this.gfx.beginDrawing({
23031
23061
  transform: s,
@@ -23064,7 +23094,7 @@ const lO = "4.10.38", cO = "f9bea397f";
23064
23094
  function By(n) {
23065
23095
  return Math.floor(Math.max(0, Math.min(1, n)) * 255).toString(16).padStart(2, "0");
23066
23096
  }
23067
- function xc(n) {
23097
+ function Ac(n) {
23068
23098
  return Math.max(0, Math.min(255, 255 * n));
23069
23099
  }
23070
23100
  class $y {
@@ -23078,7 +23108,7 @@ class $y {
23078
23108
  return ["RGB", t, t, t];
23079
23109
  }
23080
23110
  static G_rgb([t]) {
23081
- return t = xc(t), [t, t, t];
23111
+ return t = Ac(t), [t, t, t];
23082
23112
  }
23083
23113
  static G_HTML([t]) {
23084
23114
  const e = By(t);
@@ -23088,7 +23118,7 @@ class $y {
23088
23118
  return ["G", 0.3 * t + 0.59 * e + 0.11 * i];
23089
23119
  }
23090
23120
  static RGB_rgb(t) {
23091
- return t.map(xc);
23121
+ return t.map(Ac);
23092
23122
  }
23093
23123
  static RGB_HTML(t) {
23094
23124
  return `#${t.map(By).join("")}`;
@@ -23103,7 +23133,7 @@ class $y {
23103
23133
  return ["RGB", 1 - Math.min(1, t + r), 1 - Math.min(1, i + r), 1 - Math.min(1, e + r)];
23104
23134
  }
23105
23135
  static CMYK_rgb([t, e, i, r]) {
23106
- return [xc(1 - Math.min(1, t + r)), xc(1 - Math.min(1, i + r)), xc(1 - Math.min(1, e + r))];
23136
+ return [Ac(1 - Math.min(1, t + r)), Ac(1 - Math.min(1, i + r)), Ac(1 - Math.min(1, e + r))];
23107
23137
  }
23108
23138
  static CMYK_HTML(t) {
23109
23139
  const e = this.CMYK_RGB(t).slice(1);
@@ -23346,7 +23376,7 @@ class dO {
23346
23376
  }
23347
23377
  }
23348
23378
  }
23349
- var qo, yl, vl, Wu, pg;
23379
+ var qo, vl, wl, Wu, pg;
23350
23380
  const Mm = class Mm {
23351
23381
  constructor(t, {
23352
23382
  isRenderable: e = !1,
@@ -23355,8 +23385,8 @@ const Mm = class Mm {
23355
23385
  } = {}) {
23356
23386
  x(this, Wu);
23357
23387
  x(this, qo, null);
23358
- x(this, yl, !1);
23359
- x(this, vl, null);
23388
+ x(this, vl, !1);
23389
+ x(this, wl, null);
23360
23390
  this.isRenderable = e, this.data = t.data, this.layer = t.layer, this.linkService = t.linkService, this.downloadManager = t.downloadManager, this.imageResourcesPath = t.imageResourcesPath, this.renderForms = t.renderForms, this.svgFactory = t.svgFactory, this.annotationStorage = t.annotationStorage, this.enableScripting = t.enableScripting, this.hasJSActions = t.hasJSActions, this._fieldObjects = t.fieldObjects, this.parent = t.parent, e && (this.container = this._createContainer(i)), r && this._createQuadrilaterals();
23361
23391
  }
23362
23392
  static _hasPopupData({
@@ -23382,11 +23412,11 @@ const Mm = class Mm {
23382
23412
  const {
23383
23413
  rect: e
23384
23414
  } = t;
23385
- e && A(this, Wu, pg).call(this, e), (i = c(this, vl)) == null || i.popup.updateEdited(t);
23415
+ e && A(this, Wu, pg).call(this, e), (i = c(this, wl)) == null || i.popup.updateEdited(t);
23386
23416
  }
23387
23417
  resetEdited() {
23388
23418
  var t;
23389
- c(this, qo) && (A(this, Wu, pg).call(this, c(this, qo).rect), (t = c(this, vl)) == null || t.popup.resetEdited(), y(this, qo, null));
23419
+ c(this, qo) && (A(this, Wu, pg).call(this, c(this, qo).rect), (t = c(this, wl)) == null || t.popup.resetEdited(), y(this, qo, null));
23390
23420
  }
23391
23421
  _createContainer(t) {
23392
23422
  const {
@@ -23421,24 +23451,24 @@ const Mm = class Mm {
23421
23451
  o.borderRadius = w;
23422
23452
  }
23423
23453
  switch (e.borderStyle.style) {
23424
- case yc.SOLID:
23454
+ case vc.SOLID:
23425
23455
  o.borderStyle = "solid";
23426
23456
  break;
23427
- case yc.DASHED:
23457
+ case vc.DASHED:
23428
23458
  o.borderStyle = "dashed";
23429
23459
  break;
23430
- case yc.BEVELED:
23460
+ case vc.BEVELED:
23431
23461
  Rt("Unimplemented border style: beveled");
23432
23462
  break;
23433
- case yc.INSET:
23463
+ case vc.INSET:
23434
23464
  Rt("Unimplemented border style: inset");
23435
23465
  break;
23436
- case yc.UNDERLINE:
23466
+ case vc.UNDERLINE:
23437
23467
  o.borderBottomStyle = "solid";
23438
23468
  break;
23439
23469
  }
23440
23470
  const b = e.borderColor || null;
23441
- b ? (y(this, yl, !0), o.borderColor = pt.makeHexColor(b[0] | 0, b[1] | 0, b[2] | 0)) : o.borderWidth = 0;
23471
+ b ? (y(this, vl, !0), o.borderColor = pt.makeHexColor(b[0] | 0, b[1] | 0, b[2] | 0)) : o.borderWidth = 0;
23442
23472
  }
23443
23473
  const u = pt.normalizeRect([e.rect[0], i.view[3] - e.rect[1] + i.view[1], e.rect[2], i.view[3] - e.rect[3] + i.view[1]]), {
23444
23474
  pageWidth: h,
@@ -23581,7 +23611,7 @@ const Mm = class Mm {
23581
23611
  style: o
23582
23612
  } = this.container;
23583
23613
  let a;
23584
- if (c(this, yl)) {
23614
+ if (c(this, vl)) {
23585
23615
  const {
23586
23616
  borderColor: m,
23587
23617
  borderWidth: v
@@ -23600,12 +23630,12 @@ const Mm = class Mm {
23600
23630
  const b = t[m], w = t[m + 1], E = t[m + 2], T = t[m + 3], C = h.createElement("rect"), _ = (E - e) / l, O = (s - w) / u, U = (b - E) / l, B = (w - T) / u;
23601
23631
  C.setAttribute("x", _), C.setAttribute("y", O), C.setAttribute("width", U), C.setAttribute("height", B), p.append(C), a == null || a.push(`<rect vector-effect="non-scaling-stroke" x="${_}" y="${O}" width="${U}" height="${B}"/>`);
23602
23632
  }
23603
- c(this, yl) && (a.push("</g></svg>')"), o.backgroundImage = a.join("")), this.container.append(d), this.container.style.clipPath = `url(#${g})`;
23633
+ c(this, vl) && (a.push("</g></svg>')"), o.backgroundImage = a.join("")), this.container.append(d), this.container.style.clipPath = `url(#${g})`;
23604
23634
  }
23605
23635
  _createPopup() {
23606
23636
  const {
23607
23637
  data: t
23608
- } = this, e = y(this, vl, new gg({
23638
+ } = this, e = y(this, wl, new gg({
23609
23639
  data: {
23610
23640
  color: t.color,
23611
23641
  titleObj: t.titleObj,
@@ -23700,7 +23730,7 @@ const Mm = class Mm {
23700
23730
  });
23701
23731
  }
23702
23732
  };
23703
- qo = new WeakMap(), yl = new WeakMap(), vl = new WeakMap(), Wu = new WeakSet(), pg = function(t) {
23733
+ qo = new WeakMap(), vl = new WeakMap(), wl = new WeakMap(), Wu = new WeakSet(), pg = function(t) {
23704
23734
  const {
23705
23735
  container: {
23706
23736
  style: e
@@ -24449,7 +24479,7 @@ class gg extends Me {
24449
24479
  return this.container.setAttribute("aria-controls", e.map((i) => `${xm}${i}`).join(",")), this.container;
24450
24480
  }
24451
24481
  }
24452
- var wl, af, lf, xl, Go, Pe, Gr, Al, Vu, qu, Sl, Yr, Oi, Xr, Gu, Kr, Yu, Yo, Xo, se, md, mg, Ww, Vw, qw, Gw, bd, yd, bg;
24482
+ var xl, af, lf, Al, Go, Pe, Gr, Sl, Vu, qu, El, Yr, Oi, Xr, Gu, Kr, Yu, Yo, Xo, se, md, mg, Ww, Vw, qw, Gw, bd, yd, bg;
24453
24483
  class vO {
24454
24484
  constructor({
24455
24485
  container: t,
@@ -24465,17 +24495,17 @@ class vO {
24465
24495
  open: d
24466
24496
  }) {
24467
24497
  x(this, se);
24468
- x(this, wl, A(this, se, qw).bind(this));
24498
+ x(this, xl, A(this, se, qw).bind(this));
24469
24499
  x(this, af, A(this, se, bg).bind(this));
24470
24500
  x(this, lf, A(this, se, yd).bind(this));
24471
- x(this, xl, A(this, se, bd).bind(this));
24501
+ x(this, Al, A(this, se, bd).bind(this));
24472
24502
  x(this, Go, null);
24473
24503
  x(this, Pe, null);
24474
24504
  x(this, Gr, null);
24475
- x(this, Al, null);
24505
+ x(this, Sl, null);
24476
24506
  x(this, Vu, null);
24477
24507
  x(this, qu, null);
24478
- x(this, Sl, null);
24508
+ x(this, El, null);
24479
24509
  x(this, Yr, !1);
24480
24510
  x(this, Oi, null);
24481
24511
  x(this, Xr, null);
@@ -24485,11 +24515,11 @@ class vO {
24485
24515
  x(this, Yo, null);
24486
24516
  x(this, Xo, !1);
24487
24517
  var f;
24488
- y(this, Pe, t), y(this, Yu, r), y(this, Gr, o), y(this, Kr, a), y(this, qu, l), y(this, Go, e), y(this, Gu, u), y(this, Sl, h), y(this, Vu, i), y(this, Al, Em.toDateObject(s)), this.trigger = i.flatMap((p) => p.getElementsToTriggerPopup());
24518
+ y(this, Pe, t), y(this, Yu, r), y(this, Gr, o), y(this, Kr, a), y(this, qu, l), y(this, Go, e), y(this, Gu, u), y(this, El, h), y(this, Vu, i), y(this, Sl, Em.toDateObject(s)), this.trigger = i.flatMap((p) => p.getElementsToTriggerPopup());
24489
24519
  for (const p of this.trigger)
24490
- p.addEventListener("click", c(this, xl)), p.addEventListener("mouseenter", c(this, lf)), p.addEventListener("mouseleave", c(this, af)), p.classList.add("popupTriggerArea");
24520
+ p.addEventListener("click", c(this, Al)), p.addEventListener("mouseenter", c(this, lf)), p.addEventListener("mouseleave", c(this, af)), p.classList.add("popupTriggerArea");
24491
24521
  for (const p of i)
24492
- (f = p.container) == null || f.addEventListener("keydown", c(this, wl));
24522
+ (f = p.container) == null || f.addEventListener("keydown", c(this, xl));
24493
24523
  c(this, Pe).hidden = !0, d && A(this, se, bd).call(this);
24494
24524
  }
24495
24525
  render() {
@@ -24506,10 +24536,10 @@ class vO {
24506
24536
  if (e.append(i), {
24507
24537
  dir: i.dir,
24508
24538
  str: i.textContent
24509
- } = c(this, Yu), t.append(e), c(this, Al)) {
24539
+ } = c(this, Yu), t.append(e), c(this, Sl)) {
24510
24540
  const s = document.createElement("span");
24511
24541
  s.classList.add("popupDate"), s.setAttribute("data-l10n-id", "pdfjs-annotation-date-time-string"), s.setAttribute("data-l10n-args", JSON.stringify({
24512
- dateObj: c(this, Al).valueOf()
24542
+ dateObj: c(this, Sl).valueOf()
24513
24543
  })), e.append(s);
24514
24544
  }
24515
24545
  const r = c(this, se, md);
@@ -24565,7 +24595,7 @@ class vO {
24565
24595
  return c(this, Pe).hidden === !1;
24566
24596
  }
24567
24597
  }
24568
- wl = new WeakMap(), af = new WeakMap(), lf = new WeakMap(), xl = new WeakMap(), Go = new WeakMap(), Pe = new WeakMap(), Gr = new WeakMap(), Al = new WeakMap(), Vu = new WeakMap(), qu = new WeakMap(), Sl = new WeakMap(), Yr = new WeakMap(), Oi = new WeakMap(), Xr = new WeakMap(), Gu = new WeakMap(), Kr = new WeakMap(), Yu = new WeakMap(), Yo = new WeakMap(), Xo = new WeakMap(), se = new WeakSet(), md = function() {
24598
+ xl = new WeakMap(), af = new WeakMap(), lf = new WeakMap(), Al = new WeakMap(), Go = new WeakMap(), Pe = new WeakMap(), Gr = new WeakMap(), Sl = new WeakMap(), Vu = new WeakMap(), qu = new WeakMap(), El = new WeakMap(), Yr = new WeakMap(), Oi = new WeakMap(), Xr = new WeakMap(), Gu = new WeakMap(), Kr = new WeakMap(), Yu = new WeakMap(), Yo = new WeakMap(), Xo = new WeakMap(), se = new WeakSet(), md = function() {
24569
24599
  const t = c(this, Kr), e = c(this, Gr);
24570
24600
  return t != null && t.str && (!(e != null && e.str) || e.str === t.str) && c(this, Kr).html || null;
24571
24601
  }, mg = function() {
@@ -24619,7 +24649,7 @@ wl = new WeakMap(), af = new WeakMap(), lf = new WeakMap(), xl = new WeakMap(),
24619
24649
  }
24620
24650
  }
24621
24651
  } = c(this, qu);
24622
- let o = !!c(this, Sl), a = o ? c(this, Sl) : c(this, Gu);
24652
+ let o = !!c(this, El), a = o ? c(this, El) : c(this, Gu);
24623
24653
  for (const g of c(this, Vu))
24624
24654
  if (!a || pt.intersect(g.data.rect, a) !== null) {
24625
24655
  a = g.data.rect, o = !0;
@@ -24632,7 +24662,7 @@ wl = new WeakMap(), af = new WeakMap(), lf = new WeakMap(), xl = new WeakMap(),
24632
24662
  } = c(this, Pe);
24633
24663
  p.left = `${c(this, Xr)[0]}%`, p.top = `${c(this, Xr)[1]}%`;
24634
24664
  }, bd = function() {
24635
- y(this, Yr, !c(this, Yr)), c(this, Yr) ? (A(this, se, yd).call(this), c(this, Pe).addEventListener("click", c(this, xl)), c(this, Pe).addEventListener("keydown", c(this, wl))) : (A(this, se, bg).call(this), c(this, Pe).removeEventListener("click", c(this, xl)), c(this, Pe).removeEventListener("keydown", c(this, wl)));
24665
+ y(this, Yr, !c(this, Yr)), c(this, Yr) ? (A(this, se, yd).call(this), c(this, Pe).addEventListener("click", c(this, Al)), c(this, Pe).addEventListener("keydown", c(this, xl))) : (A(this, se, bg).call(this), c(this, Pe).removeEventListener("click", c(this, Al)), c(this, Pe).removeEventListener("keydown", c(this, xl)));
24636
24666
  }, yd = function() {
24637
24667
  c(this, Oi) || this.render(), this.isVisible ? c(this, Yr) && c(this, Pe).classList.add("focused") : (A(this, se, Gw).call(this), c(this, Pe).hidden = !1, c(this, Pe).style.zIndex = parseInt(c(this, Pe).style.zIndex) + 1e3);
24638
24668
  }, bg = function() {
@@ -25588,7 +25618,7 @@ class ot {
25588
25618
  }
25589
25619
  }
25590
25620
  ft(ot, "PRECISION", 1e-4);
25591
- var Jn, Li, El, kl, dr, Dt, ta, ea, oh, ah, _l, Cl, Ns, lh, cf, uf, qe, Mc, rx, sx, ox, ax, lx, cx;
25621
+ var Jn, Li, kl, _l, dr, Dt, ta, ea, oh, ah, Cl, Tl, Ns, lh, cf, uf, qe, Mc, rx, sx, ox, ax, lx, cx;
25592
25622
  const Or = class Or {
25593
25623
  constructor({
25594
25624
  x: t,
@@ -25597,18 +25627,18 @@ const Or = class Or {
25597
25627
  x(this, qe);
25598
25628
  x(this, Jn);
25599
25629
  x(this, Li, []);
25600
- x(this, El);
25601
25630
  x(this, kl);
25631
+ x(this, _l);
25602
25632
  x(this, dr, []);
25603
25633
  x(this, Dt, new Float32Array(18));
25604
25634
  x(this, ta);
25605
25635
  x(this, ea);
25606
25636
  x(this, oh);
25607
25637
  x(this, ah);
25608
- x(this, _l);
25609
25638
  x(this, Cl);
25639
+ x(this, Tl);
25610
25640
  x(this, Ns, []);
25611
- y(this, Jn, i), y(this, Cl, s * r), y(this, kl, o), c(this, Dt).set([NaN, NaN, NaN, NaN, t, e], 6), y(this, El, a), y(this, ah, c(Or, lh) * r), y(this, oh, c(Or, uf) * r), y(this, _l, r), c(this, Ns).push(t, e);
25641
+ y(this, Jn, i), y(this, Tl, s * r), y(this, _l, o), c(this, Dt).set([NaN, NaN, NaN, NaN, t, e], 6), y(this, kl, a), y(this, ah, c(Or, lh) * r), y(this, oh, c(Or, uf) * r), y(this, Cl, r), c(this, Ns).push(t, e);
25612
25642
  }
25613
25643
  isEmpty() {
25614
25644
  return isNaN(c(this, Dt)[8]);
@@ -25627,7 +25657,7 @@ const Or = class Or {
25627
25657
  const g = p - c(this, ah), m = g / p, v = m * d, b = m * f;
25628
25658
  let w = a, E = l;
25629
25659
  a = u, l = h, u += v, h += b, (B = c(this, Ns)) == null || B.push(t, e);
25630
- const T = -b / g, C = v / g, _ = T * c(this, Cl), O = C * c(this, Cl);
25660
+ const T = -b / g, C = v / g, _ = T * c(this, Tl), O = C * c(this, Tl);
25631
25661
  return c(this, Dt).set(c(this, Dt).subarray(2, 8), 0), c(this, Dt).set([u + _, h + O], 4), c(this, Dt).set(c(this, Dt).subarray(14, 18), 12), c(this, Dt).set([u - _, h - O], 16), isNaN(c(this, Dt)[6]) ? (c(this, dr).length === 0 && (c(this, Dt).set([a + _, l + O], 2), c(this, dr).push(NaN, NaN, NaN, NaN, (a + _ - i) / s, (l + O - r) / o), c(this, Dt).set([a - _, l - O], 14), c(this, Li).push(NaN, NaN, NaN, NaN, (a - _ - i) / s, (l - O - r) / o)), c(this, Dt).set([w, E, a, l, u, h], 6), !this.isEmpty()) : (c(this, Dt).set([w, E, a, l, u, h], 6), Math.abs(Math.atan2(E - l, w - a) - Math.atan2(b, v)) < Math.PI / 2 ? ([a, l, u, h] = c(this, Dt).subarray(2, 6), c(this, dr).push(NaN, NaN, NaN, NaN, ((a + u) / 2 - i) / s, ((l + h) / 2 - r) / o), [a, l, w, E] = c(this, Dt).subarray(14, 18), c(this, Li).push(NaN, NaN, NaN, NaN, ((w + a) / 2 - i) / s, ((E + l) / 2 - r) / o), !0) : ([w, E, a, l, u, h] = c(this, Dt).subarray(0, 6), c(this, dr).push(((w + 5 * a) / 6 - i) / s, ((E + 5 * l) / 6 - r) / o, ((5 * a + u) / 6 - i) / s, ((5 * l + h) / 6 - r) / o, ((a + u) / 2 - i) / s, ((l + h) / 2 - r) / o), [u, h, a, l, w, E] = c(this, Dt).subarray(12, 18), c(this, Li).push(((w + 5 * a) / 6 - i) / s, ((E + 5 * l) / 6 - r) / o, ((5 * a + u) / 6 - i) / s, ((5 * l + h) / 6 - r) / o, ((a + u) / 2 - i) / s, ((l + h) / 2 - r) / o), !0));
25632
25662
  }
25633
25663
  toSVGPath() {
@@ -25673,10 +25703,10 @@ const Or = class Or {
25673
25703
  }
25674
25704
  u[h] = e[f + p], u[h + 1] = e[f + p + 1], h += 2;
25675
25705
  }
25676
- return A(this, qe, lx).call(this, u, h), this.newFreeDrawOutline(u, l, c(this, Jn), c(this, _l), c(this, El), c(this, kl));
25706
+ return A(this, qe, lx).call(this, u, h), this.newFreeDrawOutline(u, l, c(this, Jn), c(this, Cl), c(this, kl), c(this, _l));
25677
25707
  }
25678
25708
  };
25679
- Jn = new WeakMap(), Li = new WeakMap(), El = new WeakMap(), kl = new WeakMap(), dr = new WeakMap(), Dt = new WeakMap(), ta = new WeakMap(), ea = new WeakMap(), oh = new WeakMap(), ah = new WeakMap(), _l = new WeakMap(), Cl = new WeakMap(), Ns = new WeakMap(), lh = new WeakMap(), cf = new WeakMap(), uf = new WeakMap(), qe = new WeakSet(), Mc = function() {
25709
+ Jn = new WeakMap(), Li = new WeakMap(), kl = new WeakMap(), _l = new WeakMap(), dr = new WeakMap(), Dt = new WeakMap(), ta = new WeakMap(), ea = new WeakMap(), oh = new WeakMap(), ah = new WeakMap(), Cl = new WeakMap(), Tl = new WeakMap(), Ns = new WeakMap(), lh = new WeakMap(), cf = new WeakMap(), uf = new WeakMap(), qe = new WeakSet(), Mc = function() {
25680
25710
  const t = c(this, Dt).subarray(4, 6), e = c(this, Dt).subarray(16, 18), [i, r, s, o] = c(this, Jn);
25681
25711
  return [(c(this, ta) + (t[0] - e[0]) / 2 - i) / s, (c(this, ea) + (t[1] - e[1]) / 2 - r) / o, (c(this, ta) + (e[0] - t[0]) / 2 - i) / s, (c(this, ea) + (e[1] - t[1]) / 2 - r) / o];
25682
25712
  }, rx = function() {
@@ -25690,7 +25720,7 @@ Jn = new WeakMap(), Li = new WeakMap(), El = new WeakMap(), kl = new WeakMap(),
25690
25720
  t.push(`L${(o[0] - e) / r} ${(o[1] - i) / s} L${l} ${u} L${h} ${d} L${(a[0] - e) / r} ${(a[1] - i) / s}`);
25691
25721
  }, ax = function(t) {
25692
25722
  const e = c(this, Dt), [i, r, s, o] = c(this, Jn), [a, l, u, h] = A(this, qe, Mc).call(this), d = new Float32Array(36);
25693
- return d.set([NaN, NaN, NaN, NaN, (e[2] - i) / s, (e[3] - r) / o, NaN, NaN, NaN, NaN, (e[4] - i) / s, (e[5] - r) / o, NaN, NaN, NaN, NaN, a, l, NaN, NaN, NaN, NaN, u, h, NaN, NaN, NaN, NaN, (e[16] - i) / s, (e[17] - r) / o, NaN, NaN, NaN, NaN, (e[14] - i) / s, (e[15] - r) / o], 0), this.newFreeDrawOutline(d, t, c(this, Jn), c(this, _l), c(this, El), c(this, kl));
25723
+ return d.set([NaN, NaN, NaN, NaN, (e[2] - i) / s, (e[3] - r) / o, NaN, NaN, NaN, NaN, (e[4] - i) / s, (e[5] - r) / o, NaN, NaN, NaN, NaN, a, l, NaN, NaN, NaN, NaN, u, h, NaN, NaN, NaN, NaN, (e[16] - i) / s, (e[17] - r) / o, NaN, NaN, NaN, NaN, (e[14] - i) / s, (e[15] - r) / o], 0), this.newFreeDrawOutline(d, t, c(this, Jn), c(this, Cl), c(this, kl), c(this, _l));
25694
25724
  }, lx = function(t, e) {
25695
25725
  const i = c(this, Li);
25696
25726
  return t.set([NaN, NaN, NaN, NaN, i[4], i[5]], e), e += 6;
@@ -25699,19 +25729,19 @@ Jn = new WeakMap(), Li = new WeakMap(), El = new WeakMap(), kl = new WeakMap(),
25699
25729
  return t.set([NaN, NaN, NaN, NaN, (i[0] - s) / a, (i[1] - o) / l, NaN, NaN, NaN, NaN, u, h, NaN, NaN, NaN, NaN, d, f, NaN, NaN, NaN, NaN, (r[0] - s) / a, (r[1] - o) / l], e), e += 24;
25700
25730
  }, x(Or, lh, 8), x(Or, cf, 2), x(Or, uf, c(Or, lh) + c(Or, cf));
25701
25731
  let Wd = Or;
25702
- var Tl, na, Jr, ch, Qn, uh, Oe, hf, hx;
25732
+ var Pl, na, Jr, ch, Qn, uh, Oe, hf, hx;
25703
25733
  class ux extends ot {
25704
25734
  constructor(e, i, r, s, o, a) {
25705
25735
  super();
25706
25736
  x(this, hf);
25707
- x(this, Tl);
25737
+ x(this, Pl);
25708
25738
  x(this, na, new Float32Array(4));
25709
25739
  x(this, Jr);
25710
25740
  x(this, ch);
25711
25741
  x(this, Qn);
25712
25742
  x(this, uh);
25713
25743
  x(this, Oe);
25714
- y(this, Oe, e), y(this, Qn, i), y(this, Tl, r), y(this, uh, s), y(this, Jr, o), y(this, ch, a), this.lastPoint = [NaN, NaN], A(this, hf, hx).call(this, a);
25744
+ y(this, Oe, e), y(this, Qn, i), y(this, Pl, r), y(this, uh, s), y(this, Jr, o), y(this, ch, a), this.lastPoint = [NaN, NaN], A(this, hf, hx).call(this, a);
25715
25745
  const [l, u, h, d] = c(this, na);
25716
25746
  for (let f = 0, p = e.length; f < p; f += 2)
25717
25747
  e[f] = (e[f] - l) / h, e[f + 1] = (e[f + 1] - u) / d;
@@ -25758,10 +25788,10 @@ class ux extends ot {
25758
25788
  return new Wd(e, i, r, s, o, a);
25759
25789
  }
25760
25790
  getNewOutline(e, i) {
25761
- const [r, s, o, a] = c(this, na), [l, u, h, d] = c(this, Tl), f = o * h, p = a * d, g = r * h + l, m = s * d + u, v = this.newOutliner({
25791
+ const [r, s, o, a] = c(this, na), [l, u, h, d] = c(this, Pl), f = o * h, p = a * d, g = r * h + l, m = s * d + u, v = this.newOutliner({
25762
25792
  x: c(this, Qn)[0] * f + g,
25763
25793
  y: c(this, Qn)[1] * p + m
25764
- }, c(this, Tl), c(this, uh), e, c(this, ch), i ?? c(this, Jr));
25794
+ }, c(this, Pl), c(this, uh), e, c(this, ch), i ?? c(this, Jr));
25765
25795
  for (let b = 2; b < c(this, Qn).length; b += 2)
25766
25796
  v.add({
25767
25797
  x: c(this, Qn)[b] * f + g,
@@ -25770,7 +25800,7 @@ class ux extends ot {
25770
25800
  return v.getOutlines();
25771
25801
  }
25772
25802
  }
25773
- Tl = new WeakMap(), na = new WeakMap(), Jr = new WeakMap(), ch = new WeakMap(), Qn = new WeakMap(), uh = new WeakMap(), Oe = new WeakMap(), hf = new WeakSet(), hx = function(e) {
25803
+ Pl = new WeakMap(), na = new WeakMap(), Jr = new WeakMap(), ch = new WeakMap(), Qn = new WeakMap(), uh = new WeakMap(), Oe = new WeakMap(), hf = new WeakSet(), hx = function(e) {
25774
25804
  const i = c(this, Oe);
25775
25805
  let r = i[4], s = i[5], o = r, a = s, l = r, u = s, h = r, d = s;
25776
25806
  const f = e ? Math.max : Math.min;
@@ -25907,17 +25937,17 @@ hh = new WeakMap(), dh = new WeakMap(), Fs = new WeakMap(), Di = new WeakMap(),
25907
25937
  }
25908
25938
  return s;
25909
25939
  };
25910
- var fh, Pl;
25940
+ var fh, Rl;
25911
25941
  class RO extends ot {
25912
25942
  constructor(e, i, r) {
25913
25943
  super();
25914
25944
  x(this, fh);
25915
- x(this, Pl);
25916
- y(this, Pl, e), y(this, fh, i), this.lastPoint = r;
25945
+ x(this, Rl);
25946
+ y(this, Rl, e), y(this, fh, i), this.lastPoint = r;
25917
25947
  }
25918
25948
  toSVGPath() {
25919
25949
  const e = [];
25920
- for (const i of c(this, Pl)) {
25950
+ for (const i of c(this, Rl)) {
25921
25951
  let [r, s] = i;
25922
25952
  e.push(`M${r} ${s}`);
25923
25953
  for (let o = 2; o < i.length; o += 2) {
@@ -25930,7 +25960,7 @@ class RO extends ot {
25930
25960
  }
25931
25961
  serialize([e, i, r, s], o) {
25932
25962
  const a = [], l = r - e, u = s - i;
25933
- for (const h of c(this, Pl)) {
25963
+ for (const h of c(this, Rl)) {
25934
25964
  const d = new Array(h.length);
25935
25965
  for (let f = 0; f < h.length; f += 2)
25936
25966
  d[f] = e + h[f] * l, d[f + 1] = s - h[f + 1] * u;
@@ -25945,7 +25975,7 @@ class RO extends ot {
25945
25975
  return ["highlightOutline"];
25946
25976
  }
25947
25977
  }
25948
- fh = new WeakMap(), Pl = new WeakMap();
25978
+ fh = new WeakMap(), Rl = new WeakMap();
25949
25979
  class kg extends Wd {
25950
25980
  newFreeDrawOutline(t, e, i, r, s, o) {
25951
25981
  return new IO(t, e, i, r, s, o);
@@ -25956,7 +25986,7 @@ class IO extends ux {
25956
25986
  return new kg(t, e, i, r, s, o);
25957
25987
  }
25958
25988
  }
25959
- var Ni, ia, Rl, We, ph, Il, gh, mh, js, Fi, Ol, bh, re, _g, Cg, Tg, oo, gx, ps;
25989
+ var Ni, ia, Il, We, ph, Ol, gh, mh, js, Fi, Ml, bh, re, _g, Cg, Tg, oo, gx, ps;
25960
25990
  const Dn = class Dn {
25961
25991
  constructor({
25962
25992
  editor: t = null,
@@ -25965,17 +25995,17 @@ const Dn = class Dn {
25965
25995
  x(this, re);
25966
25996
  x(this, Ni, null);
25967
25997
  x(this, ia, null);
25968
- x(this, Rl);
25998
+ x(this, Il);
25969
25999
  x(this, We, null);
25970
26000
  x(this, ph, !1);
25971
- x(this, Il, !1);
26001
+ x(this, Ol, !1);
25972
26002
  x(this, gh, null);
25973
26003
  x(this, mh);
25974
26004
  x(this, js, null);
25975
26005
  x(this, Fi, null);
25976
- x(this, Ol);
26006
+ x(this, Ml);
25977
26007
  var i;
25978
- t ? (y(this, Il, !1), y(this, Ol, $t.HIGHLIGHT_COLOR), y(this, gh, t)) : (y(this, Il, !0), y(this, Ol, $t.HIGHLIGHT_DEFAULT_COLOR)), y(this, Fi, (t == null ? void 0 : t._uiManager) || e), y(this, mh, c(this, Fi)._eventBus), y(this, Rl, (t == null ? void 0 : t.color) || ((i = c(this, Fi)) == null ? void 0 : i.highlightColors.values().next().value) || "#FFFF98"), c(Dn, bh) || y(Dn, bh, Object.freeze({
26008
+ t ? (y(this, Ol, !1), y(this, Ml, $t.HIGHLIGHT_COLOR), y(this, gh, t)) : (y(this, Ol, !0), y(this, Ml, $t.HIGHLIGHT_DEFAULT_COLOR)), y(this, Fi, (t == null ? void 0 : t._uiManager) || e), y(this, mh, c(this, Fi)._eventBus), y(this, Il, (t == null ? void 0 : t.color) || ((i = c(this, Fi)) == null ? void 0 : i.highlightColors.values().next().value) || "#FFFF98"), c(Dn, bh) || y(Dn, bh, Object.freeze({
25979
26009
  blue: "pdfjs-editor-colorpicker-blue",
25980
26010
  green: "pdfjs-editor-colorpicker-green",
25981
26011
  pink: "pdfjs-editor-colorpicker-pink",
@@ -25996,7 +26026,7 @@ const Dn = class Dn {
25996
26026
  signal: e
25997
26027
  });
25998
26028
  const i = y(this, ia, document.createElement("span"));
25999
- return i.className = "swatch", i.setAttribute("aria-hidden", !0), i.style.backgroundColor = c(this, Rl), t.append(i), t;
26029
+ return i.className = "swatch", i.setAttribute("aria-hidden", !0), i.style.backgroundColor = c(this, Il), t.append(i), t;
26000
26030
  }
26001
26031
  renderMainDropdown() {
26002
26032
  const t = y(this, We, A(this, re, _g).call(this));
@@ -26052,7 +26082,7 @@ const Dn = class Dn {
26052
26082
  }
26053
26083
  _hideDropdownFromKeyboard() {
26054
26084
  var t;
26055
- if (!c(this, Il)) {
26085
+ if (!c(this, Ol)) {
26056
26086
  if (!c(this, re, ps)) {
26057
26087
  (t = c(this, gh)) == null || t.unselect();
26058
26088
  return;
@@ -26075,7 +26105,7 @@ const Dn = class Dn {
26075
26105
  (t = c(this, Ni)) == null || t.remove(), y(this, Ni, null), y(this, ia, null), (e = c(this, We)) == null || e.remove(), y(this, We, null);
26076
26106
  }
26077
26107
  };
26078
- Ni = new WeakMap(), ia = new WeakMap(), Rl = new WeakMap(), We = new WeakMap(), ph = new WeakMap(), Il = new WeakMap(), gh = new WeakMap(), mh = new WeakMap(), js = new WeakMap(), Fi = new WeakMap(), Ol = new WeakMap(), bh = new WeakMap(), re = new WeakSet(), _g = function() {
26108
+ Ni = new WeakMap(), ia = new WeakMap(), Il = new WeakMap(), We = new WeakMap(), ph = new WeakMap(), Ol = new WeakMap(), gh = new WeakMap(), mh = new WeakMap(), js = new WeakMap(), Fi = new WeakMap(), Ml = new WeakMap(), bh = new WeakMap(), re = new WeakSet(), _g = function() {
26079
26109
  const t = document.createElement("div"), e = c(this, Fi)._signal;
26080
26110
  t.addEventListener("contextmenu", Wi, {
26081
26111
  signal: e
@@ -26084,7 +26114,7 @@ Ni = new WeakMap(), ia = new WeakMap(), Rl = new WeakMap(), We = new WeakMap(),
26084
26114
  const s = document.createElement("button");
26085
26115
  s.tabIndex = "0", s.role = "option", s.setAttribute("data-color", r), s.title = i, s.setAttribute("data-l10n-id", c(Dn, bh)[i]);
26086
26116
  const o = document.createElement("span");
26087
- s.append(o), o.className = "swatch", o.style.backgroundColor = r, s.setAttribute("aria-selected", r === c(this, Rl)), s.addEventListener("click", A(this, re, Cg).bind(this, r), {
26117
+ s.append(o), o.className = "swatch", o.style.backgroundColor = r, s.setAttribute("aria-selected", r === c(this, Il)), s.addEventListener("click", A(this, re, Cg).bind(this, r), {
26088
26118
  signal: e
26089
26119
  }), t.append(s);
26090
26120
  }
@@ -26094,7 +26124,7 @@ Ni = new WeakMap(), ia = new WeakMap(), Rl = new WeakMap(), We = new WeakMap(),
26094
26124
  }, Cg = function(t, e) {
26095
26125
  e.stopPropagation(), c(this, mh).dispatch("switchannotationeditorparams", {
26096
26126
  source: this,
26097
- type: c(this, Ol),
26127
+ type: c(this, Ml),
26098
26128
  value: t
26099
26129
  });
26100
26130
  }, Tg = function(t) {
@@ -26119,7 +26149,7 @@ Ni = new WeakMap(), ia = new WeakMap(), Rl = new WeakMap(), We = new WeakMap(),
26119
26149
  return c(this, We) && !c(this, We).classList.contains("hidden");
26120
26150
  }, x(Dn, bh, null);
26121
26151
  let Vd = Dn;
26122
- var Ml, yh, Qr, ra, Ll, jn, vh, wh, sa, pi, Zn, nn, Dl, Zr, dn, Nl, gi, xh, Ct, Pg, Sd, mx, bx, yx, Rg, ao, xi, Na, vx, Ed, Lc, wx, xx, Ax, Sx, Ex;
26152
+ var Ll, yh, Qr, ra, Dl, jn, vh, wh, sa, gi, Zn, nn, Nl, Zr, dn, Fl, mi, xh, Ct, Pg, Sd, mx, bx, yx, Rg, ao, xi, Na, vx, Ed, Lc, wx, xx, Ax, Sx, Ex;
26123
26153
  const Kt = class Kt extends Ce {
26124
26154
  constructor(e) {
26125
26155
  super({
@@ -26127,25 +26157,25 @@ const Kt = class Kt extends Ce {
26127
26157
  name: "highlightEditor"
26128
26158
  });
26129
26159
  x(this, Ct);
26130
- x(this, Ml, null);
26160
+ x(this, Ll, null);
26131
26161
  x(this, yh, 0);
26132
26162
  x(this, Qr);
26133
26163
  x(this, ra, null);
26134
- x(this, Ll, null);
26164
+ x(this, Dl, null);
26135
26165
  x(this, jn, null);
26136
26166
  x(this, vh, null);
26137
26167
  x(this, wh, 0);
26138
26168
  x(this, sa, null);
26139
- x(this, pi, null);
26169
+ x(this, gi, null);
26140
26170
  x(this, Zn, null);
26141
26171
  x(this, nn, !1);
26142
- x(this, Dl, null);
26172
+ x(this, Nl, null);
26143
26173
  x(this, Zr);
26144
26174
  x(this, dn, null);
26145
- x(this, Nl, "");
26146
- x(this, gi);
26175
+ x(this, Fl, "");
26176
+ x(this, mi);
26147
26177
  x(this, xh, "");
26148
- this.color = e.color || Kt._defaultColor, y(this, gi, e.thickness || Kt._defaultThickness), y(this, Zr, e.opacity || Kt._defaultOpacity), y(this, Qr, e.boxes || null), y(this, xh, e.methodOfCreation || ""), y(this, Nl, e.text || ""), this._isDraggable = !1, e.highlightId > -1 ? (y(this, nn, !0), A(this, Ct, Sd).call(this, e), A(this, Ct, ao).call(this)) : c(this, Qr) && (y(this, Ml, e.anchorNode), y(this, yh, e.anchorOffset), y(this, vh, e.focusNode), y(this, wh, e.focusOffset), A(this, Ct, Pg).call(this), A(this, Ct, ao).call(this), this.rotate(this.rotation));
26178
+ this.color = e.color || Kt._defaultColor, y(this, mi, e.thickness || Kt._defaultThickness), y(this, Zr, e.opacity || Kt._defaultOpacity), y(this, Qr, e.boxes || null), y(this, xh, e.methodOfCreation || ""), y(this, Fl, e.text || ""), this._isDraggable = !1, e.highlightId > -1 ? (y(this, nn, !0), A(this, Ct, Sd).call(this, e), A(this, Ct, ao).call(this)) : c(this, Qr) && (y(this, Ll, e.anchorNode), y(this, yh, e.anchorOffset), y(this, vh, e.focusNode), y(this, wh, e.focusOffset), A(this, Ct, Pg).call(this), A(this, Ct, ao).call(this), this.rotate(this.rotation));
26149
26179
  }
26150
26180
  static get _keyboardManager() {
26151
26181
  const e = Kt.prototype;
@@ -26164,7 +26194,7 @@ const Kt = class Kt extends Ce {
26164
26194
  action: "added",
26165
26195
  type: c(this, nn) ? "free_highlight" : "highlight",
26166
26196
  color: this._uiManager.highlightColorNames.get(this.color),
26167
- thickness: c(this, gi),
26197
+ thickness: c(this, mi),
26168
26198
  methodOfCreation: c(this, xh)
26169
26199
  };
26170
26200
  }
@@ -26196,7 +26226,7 @@ const Kt = class Kt extends Ce {
26196
26226
  translateInPage(e, i) {
26197
26227
  }
26198
26228
  get toolbarPosition() {
26199
- return c(this, Dl);
26229
+ return c(this, Nl);
26200
26230
  }
26201
26231
  updateParams(e, i) {
26202
26232
  switch (e) {
@@ -26212,13 +26242,13 @@ const Kt = class Kt extends Ce {
26212
26242
  return [[$t.HIGHLIGHT_DEFAULT_COLOR, Kt._defaultColor], [$t.HIGHLIGHT_THICKNESS, Kt._defaultThickness]];
26213
26243
  }
26214
26244
  get propertiesToUpdate() {
26215
- return [[$t.HIGHLIGHT_COLOR, this.color || Kt._defaultColor], [$t.HIGHLIGHT_THICKNESS, c(this, gi) || Kt._defaultThickness], [$t.HIGHLIGHT_FREE, c(this, nn)]];
26245
+ return [[$t.HIGHLIGHT_COLOR, this.color || Kt._defaultColor], [$t.HIGHLIGHT_THICKNESS, c(this, mi) || Kt._defaultThickness], [$t.HIGHLIGHT_FREE, c(this, nn)]];
26216
26246
  }
26217
26247
  async addEditToolbar() {
26218
26248
  const e = await super.addEditToolbar();
26219
- return e ? (this._uiManager.highlightColors && (y(this, Ll, new Vd({
26249
+ return e ? (this._uiManager.highlightColors && (y(this, Dl, new Vd({
26220
26250
  editor: this
26221
- })), e.addColorPicker(c(this, Ll))), e) : null;
26251
+ })), e.addColorPicker(c(this, Dl))), e) : null;
26222
26252
  }
26223
26253
  disableEditing() {
26224
26254
  super.disableEditing(), this.div.classList.toggle("disabled", !0);
@@ -26257,7 +26287,7 @@ const Kt = class Kt extends Ce {
26257
26287
  drawLayer: i
26258
26288
  } = this.parent;
26259
26289
  let r;
26260
- c(this, nn) ? (e = (e - this.rotation + 360) % 360, r = A(s = Kt, xi, Na).call(s, c(this, pi).box, e)) : r = A(o = Kt, xi, Na).call(o, [this.x, this.y, this.width, this.height], e), i.updateProperties(c(this, Zn), {
26290
+ c(this, nn) ? (e = (e - this.rotation + 360) % 360, r = A(s = Kt, xi, Na).call(s, c(this, gi).box, e)) : r = A(o = Kt, xi, Na).call(o, [this.x, this.y, this.width, this.height], e), i.updateProperties(c(this, Zn), {
26261
26291
  bbox: r,
26262
26292
  root: {
26263
26293
  "data-main-rotation": e
@@ -26273,7 +26303,7 @@ const Kt = class Kt extends Ce {
26273
26303
  if (this.div)
26274
26304
  return this.div;
26275
26305
  const e = super.render();
26276
- c(this, Nl) && (e.setAttribute("aria-label", c(this, Nl)), e.setAttribute("role", "mark")), c(this, nn) ? e.classList.add("free") : this.div.addEventListener("keydown", A(this, Ct, vx).bind(this), {
26306
+ c(this, Fl) && (e.setAttribute("aria-label", c(this, Fl)), e.setAttribute("role", "mark")), c(this, nn) ? e.classList.add("free") : this.div.addEventListener("keydown", A(this, Ct, vx).bind(this), {
26277
26307
  signal: this._uiManager._signal
26278
26308
  });
26279
26309
  const i = y(this, sa, document.createElement("div"));
@@ -26357,7 +26387,7 @@ const Kt = class Kt extends Ce {
26357
26387
  signal: f
26358
26388
  }), window.addEventListener("pointerup", p, {
26359
26389
  signal: f
26360
- }), window.addEventListener("pointerdown", si, {
26390
+ }), window.addEventListener("pointerdown", oi, {
26361
26391
  capture: !0,
26362
26392
  passive: !1,
26363
26393
  signal: f
@@ -26459,7 +26489,7 @@ const Kt = class Kt extends Ce {
26459
26489
  inkLists: l,
26460
26490
  opacity: u
26461
26491
  } = e, h = await super.deserialize(e, i, r);
26462
- h.color = pt.makeHexColor(...o), y(h, Zr, u || 1), l && y(h, gi, e.thickness), h.annotationElementId = e.id || null, h._initialData = s;
26492
+ h.color = pt.makeHexColor(...o), y(h, Zr, u || 1), l && y(h, mi, e.thickness), h.annotationElementId = e.id || null, h._initialData = s;
26463
26493
  const [d, f] = h.pageDimensions, [p, g] = h.pageTranslation;
26464
26494
  if (a) {
26465
26495
  const E = y(h, Qr, []);
@@ -26476,7 +26506,7 @@ const Kt = class Kt extends Ce {
26476
26506
  const E = l[0], T = {
26477
26507
  x: E[0] - p,
26478
26508
  y: f - (E[1] - g)
26479
- }, C = new kg(T, [0, 0, d, f], 1, c(h, gi) / 2, !0, 1e-3);
26509
+ }, C = new kg(T, [0, 0, d, f], 1, c(h, mi) / 2, !0, 1e-3);
26480
26510
  for (let U = 0, B = E.length; U < B; U += 2)
26481
26511
  T.x = E[U] - p, T.y = f - (E[U + 1] - g), C.add(T);
26482
26512
  const {
@@ -26514,7 +26544,7 @@ const Kt = class Kt extends Ce {
26514
26544
  annotationType: Pt.HIGHLIGHT,
26515
26545
  color: r,
26516
26546
  opacity: c(this, Zr),
26517
- thickness: c(this, gi),
26547
+ thickness: c(this, mi),
26518
26548
  quadPoints: A(this, Ct, wx).call(this),
26519
26549
  outlines: A(this, Ct, xx).call(this, i),
26520
26550
  pageIndex: this.pageIndex,
@@ -26533,22 +26563,22 @@ const Kt = class Kt extends Ce {
26533
26563
  return !1;
26534
26564
  }
26535
26565
  };
26536
- Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(), Ll = new WeakMap(), jn = new WeakMap(), vh = new WeakMap(), wh = new WeakMap(), sa = new WeakMap(), pi = new WeakMap(), Zn = new WeakMap(), nn = new WeakMap(), Dl = new WeakMap(), Zr = new WeakMap(), dn = new WeakMap(), Nl = new WeakMap(), gi = new WeakMap(), xh = new WeakMap(), Ct = new WeakSet(), Pg = function() {
26566
+ Ll = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(), Dl = new WeakMap(), jn = new WeakMap(), vh = new WeakMap(), wh = new WeakMap(), sa = new WeakMap(), gi = new WeakMap(), Zn = new WeakMap(), nn = new WeakMap(), Nl = new WeakMap(), Zr = new WeakMap(), dn = new WeakMap(), Fl = new WeakMap(), mi = new WeakMap(), xh = new WeakMap(), Ct = new WeakSet(), Pg = function() {
26537
26567
  const e = new Sg(c(this, Qr), 1e-3);
26538
- y(this, pi, e.getOutlines()), [this.x, this.y, this.width, this.height] = c(this, pi).box;
26568
+ y(this, gi, e.getOutlines()), [this.x, this.y, this.width, this.height] = c(this, gi).box;
26539
26569
  const i = new Sg(c(this, Qr), 25e-4, 1e-3, this._uiManager.direction === "ltr");
26540
26570
  y(this, jn, i.getOutlines());
26541
26571
  const {
26542
26572
  lastPoint: r
26543
26573
  } = c(this, jn);
26544
- y(this, Dl, [(r[0] - this.x) / this.width, (r[1] - this.y) / this.height]);
26574
+ y(this, Nl, [(r[0] - this.x) / this.width, (r[1] - this.y) / this.height]);
26545
26575
  }, Sd = function({
26546
26576
  highlightOutlines: e,
26547
26577
  highlightId: i,
26548
26578
  clipPathId: r
26549
26579
  }) {
26550
26580
  var d, f;
26551
- if (y(this, pi, e), y(this, jn, e.getNewOutline(c(this, gi) / 2 + 1.5, 25e-4)), i >= 0)
26581
+ if (y(this, gi, e), y(this, jn, e.getNewOutline(c(this, mi) / 2 + 1.5, 25e-4)), i >= 0)
26552
26582
  y(this, Zn, i), y(this, ra, r), this.parent.drawLayer.finalizeDraw(i, {
26553
26583
  bbox: e.box,
26554
26584
  path: {
@@ -26567,7 +26597,7 @@ Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(),
26567
26597
  else if (this.parent) {
26568
26598
  const p = this.parent.viewport.rotation;
26569
26599
  this.parent.drawLayer.updateProperties(c(this, Zn), {
26570
- bbox: A(d = Kt, xi, Na).call(d, c(this, pi).box, (p - this.rotation + 360) % 360),
26600
+ bbox: A(d = Kt, xi, Na).call(d, c(this, gi).box, (p - this.rotation + 360) % 360),
26571
26601
  path: {
26572
26602
  d: e.toSVGPath()
26573
26603
  }
@@ -26600,7 +26630,7 @@ Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(),
26600
26630
  const {
26601
26631
  lastPoint: h
26602
26632
  } = c(this, jn);
26603
- y(this, Dl, [(h[0] - o) / l, (h[1] - a) / u]);
26633
+ y(this, Nl, [(h[0] - o) / l, (h[1] - a) / u]);
26604
26634
  }, mx = function(e) {
26605
26635
  const i = (o, a) => {
26606
26636
  var l, u;
@@ -26609,7 +26639,7 @@ Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(),
26609
26639
  fill: o,
26610
26640
  "fill-opacity": a
26611
26641
  }
26612
- }), (u = c(this, Ll)) == null || u.updateColor(o);
26642
+ }), (u = c(this, Dl)) == null || u.updateColor(o);
26613
26643
  }, r = this.color, s = c(this, Zr);
26614
26644
  this.addCommands({
26615
26645
  cmd: i.bind(this, e, Kt._defaultOpacity),
@@ -26624,8 +26654,8 @@ Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(),
26624
26654
  color: this._uiManager.highlightColorNames.get(e)
26625
26655
  }, !0);
26626
26656
  }, bx = function(e) {
26627
- const i = c(this, gi), r = (s) => {
26628
- y(this, gi, s), A(this, Ct, yx).call(this, s);
26657
+ const i = c(this, mi), r = (s) => {
26658
+ y(this, mi, s), A(this, Ct, yx).call(this, s);
26629
26659
  };
26630
26660
  this.addCommands({
26631
26661
  cmd: r.bind(this, e),
@@ -26643,7 +26673,7 @@ Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(),
26643
26673
  if (!c(this, nn))
26644
26674
  return;
26645
26675
  A(this, Ct, Sd).call(this, {
26646
- highlightOutlines: c(this, pi).getNewOutline(e / 2)
26676
+ highlightOutlines: c(this, gi).getNewOutline(e / 2)
26647
26677
  }), this.fixAndSetPosition();
26648
26678
  const [i, r] = this.parentDimensions;
26649
26679
  this.setDims(this.width * i, this.height * r);
@@ -26654,7 +26684,7 @@ Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(),
26654
26684
  id: wn(this, Zn)._,
26655
26685
  clipPathId: wn(this, ra)._
26656
26686
  } = e.drawLayer.draw({
26657
- bbox: c(this, pi).box,
26687
+ bbox: c(this, gi).box,
26658
26688
  root: {
26659
26689
  viewBox: "0 0 1 1",
26660
26690
  fill: this.color,
@@ -26665,7 +26695,7 @@ Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(),
26665
26695
  free: c(this, nn)
26666
26696
  },
26667
26697
  path: {
26668
- d: c(this, pi).toSVGPath()
26698
+ d: c(this, gi).toSVGPath()
26669
26699
  }
26670
26700
  }, !1, !0), y(this, dn, e.drawLayer.drawOutline({
26671
26701
  rootClass: {
@@ -26690,10 +26720,10 @@ Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(),
26690
26720
  }, vx = function(e) {
26691
26721
  Kt._keyboardManager.exec(this, e);
26692
26722
  }, Ed = function(e) {
26693
- if (!c(this, Ml))
26723
+ if (!c(this, Ll))
26694
26724
  return;
26695
26725
  const i = window.getSelection();
26696
- e ? i.setPosition(c(this, Ml), c(this, yh)) : i.setPosition(c(this, vh), c(this, wh));
26726
+ e ? i.setPosition(c(this, Ll), c(this, yh)) : i.setPosition(c(this, vh), c(this, wh));
26697
26727
  }, Lc = function() {
26698
26728
  return c(this, nn) ? this.rotation : 0;
26699
26729
  }, wx = function() {
@@ -26712,7 +26742,7 @@ Ml = new WeakMap(), yh = new WeakMap(), Qr = new WeakMap(), ra = new WeakMap(),
26712
26742
  }
26713
26743
  return a;
26714
26744
  }, xx = function(e) {
26715
- return c(this, pi).serialize(e, A(this, Ct, Lc).call(this));
26745
+ return c(this, gi).serialize(e, A(this, Ct, Lc).call(this));
26716
26746
  }, Ax = function(e, i) {
26717
26747
  this._freeHighlight.add(i) && e.drawLayer.updateProperties(this._freeHighlightId, {
26718
26748
  path: {
@@ -26766,15 +26796,15 @@ class OO {
26766
26796
  }
26767
26797
  }
26768
26798
  oa = new WeakMap();
26769
- var ti, Fl, Je, aa, la, zs, Bs, $s, ca, Gt, Og, Mg, Lg, Dc, kx, kd, Nc, Fa;
26799
+ var ti, jl, Je, aa, la, zs, Bs, $s, ca, Gt, Og, Mg, Lg, Dc, kx, kd, Nc, Fa;
26770
26800
  const at = class at extends Ce {
26771
26801
  constructor(e) {
26772
26802
  super(e);
26773
26803
  x(this, Gt);
26774
26804
  x(this, ti, null);
26775
- x(this, Fl);
26805
+ x(this, jl);
26776
26806
  ft(this, "_drawId", null);
26777
- y(this, Fl, e.mustBeCommitted || !1), e.drawOutlines && (A(this, Gt, Og).call(this, e), A(this, Gt, Dc).call(this));
26807
+ y(this, jl, e.mustBeCommitted || !1), e.drawOutlines && (A(this, Gt, Og).call(this, e), A(this, Gt, Dc).call(this));
26778
26808
  }
26779
26809
  static _mergeSVGProperties(e, i) {
26780
26810
  const r = new Set(Object.keys(e));
@@ -26889,7 +26919,7 @@ const at = class at extends Ce {
26889
26919
  return !0;
26890
26920
  }
26891
26921
  onceAdded(e) {
26892
- this.annotationElementId || this.parent.addUndoableEditor(this), this._isDraggable = !0, c(this, Fl) && (y(this, Fl, !1), this.commit(), this.parent.setSelected(this), e && this.isOnScreen && this.div.focus());
26922
+ this.annotationElementId || this.parent.addUndoableEditor(this), this._isDraggable = !0, c(this, jl) && (y(this, jl, !1), this.commit(), this.parent.setSelected(this), e && this.isOnScreen && this.div.focus());
26893
26923
  }
26894
26924
  remove() {
26895
26925
  A(this, Gt, Lg).call(this), super.remove();
@@ -26965,7 +26995,7 @@ const at = class at extends Ce {
26965
26995
  }), o.addEventListener("pointermove", this._drawMove.bind(this), {
26966
26996
  signal: m
26967
26997
  }), o.addEventListener("touchmove", (b) => {
26968
- b.timeStamp === c(at, ca) && si(b);
26998
+ b.timeStamp === c(at, ca) && oi(b);
26969
26999
  }, {
26970
27000
  signal: m
26971
27001
  }), e.toggleDrawing(), (v = i._editorUndoBar) == null || v.hide(), c(at, Je)) {
@@ -26990,7 +27020,7 @@ const at = class at extends Ce {
26990
27020
  this._endDraw(e);
26991
27021
  return;
26992
27022
  }
26993
- this._currentParent.drawLayer.updateProperties(this._currentDrawId, c(at, Je).add(i, r)), y(at, ca, e.timeStamp), si(e);
27023
+ this._currentParent.drawLayer.updateProperties(this._currentDrawId, c(at, Je).add(i, r)), y(at, ca, e.timeStamp), oi(e);
26994
27024
  }
26995
27025
  }
26996
27026
  static _cleanup(e) {
@@ -27069,7 +27099,7 @@ const at = class at extends Ce {
27069
27099
  return !1;
27070
27100
  }
27071
27101
  };
27072
- ti = new WeakMap(), Fl = new WeakMap(), Je = new WeakMap(), aa = new WeakMap(), la = new WeakMap(), zs = new WeakMap(), Bs = new WeakMap(), $s = new WeakMap(), ca = new WeakMap(), Gt = new WeakSet(), Og = function({
27102
+ ti = new WeakMap(), jl = new WeakMap(), Je = new WeakMap(), aa = new WeakMap(), la = new WeakMap(), zs = new WeakMap(), Bs = new WeakMap(), $s = new WeakMap(), ca = new WeakMap(), Gt = new WeakSet(), Og = function({
27073
27103
  drawOutlines: e,
27074
27104
  drawId: i,
27075
27105
  drawingOptions: r
@@ -27177,22 +27207,22 @@ ti = new WeakMap(), Fl = new WeakMap(), Je = new WeakMap(), aa = new WeakMap(),
27177
27207
  }
27178
27208
  }, ft(at, "_currentDrawId", -1), ft(at, "_currentParent", null), x(at, Je, null), x(at, aa, null), x(at, la, null), x(at, zs, NaN), x(at, Bs, null), x(at, $s, null), x(at, ca, NaN), ft(at, "_INNER_MARGIN", 3);
27179
27209
  let Ig = at;
27180
- var fr, Qe, Ze, ua, jl, Sn, rn, mi, ha, da, fa, zl, _d;
27210
+ var fr, Qe, Ze, ua, zl, Sn, rn, bi, ha, da, fa, Bl, _d;
27181
27211
  class MO {
27182
27212
  constructor(t, e, i, r, s, o) {
27183
- x(this, zl);
27213
+ x(this, Bl);
27184
27214
  x(this, fr, new Float64Array(6));
27185
27215
  x(this, Qe);
27186
27216
  x(this, Ze);
27187
27217
  x(this, ua);
27188
- x(this, jl);
27218
+ x(this, zl);
27189
27219
  x(this, Sn);
27190
27220
  x(this, rn, "");
27191
- x(this, mi, 0);
27221
+ x(this, bi, 0);
27192
27222
  x(this, ha, new Gd());
27193
27223
  x(this, da);
27194
27224
  x(this, fa);
27195
- y(this, da, i), y(this, fa, r), y(this, ua, s), y(this, jl, o), [t, e] = A(this, zl, _d).call(this, t, e);
27225
+ y(this, da, i), y(this, fa, r), y(this, ua, s), y(this, zl, o), [t, e] = A(this, Bl, _d).call(this, t, e);
27196
27226
  const a = y(this, Qe, [NaN, NaN, NaN, NaN, t, e]);
27197
27227
  y(this, Sn, [t, e]), y(this, Ze, [{
27198
27228
  line: a,
@@ -27200,7 +27230,7 @@ class MO {
27200
27230
  }]), c(this, fr).set(a, 0);
27201
27231
  }
27202
27232
  updateProperty(t, e) {
27203
- t === "stroke-width" && y(this, jl, e);
27233
+ t === "stroke-width" && y(this, zl, e);
27204
27234
  }
27205
27235
  isEmpty() {
27206
27236
  return !c(this, Ze) || c(this, Ze).length === 0;
@@ -27209,7 +27239,7 @@ class MO {
27209
27239
  return c(this, Sn).length <= 10;
27210
27240
  }
27211
27241
  add(t, e) {
27212
- [t, e] = A(this, zl, _d).call(this, t, e);
27242
+ [t, e] = A(this, Bl, _d).call(this, t, e);
27213
27243
  const [i, r, s, o] = c(this, fr).subarray(2, 6), a = t - s, l = e - o;
27214
27244
  return Math.hypot(c(this, da) * a, c(this, fa) * l) <= 2 ? null : (c(this, Sn).push(t, e), isNaN(i) ? (c(this, fr).set([s, o, t, e], 2), c(this, Qe).push(NaN, NaN, NaN, NaN, t, e), {
27215
27245
  path: {
@@ -27230,20 +27260,20 @@ class MO {
27230
27260
  } : null);
27231
27261
  }
27232
27262
  startNew(t, e, i, r, s) {
27233
- y(this, da, i), y(this, fa, r), y(this, ua, s), [t, e] = A(this, zl, _d).call(this, t, e);
27263
+ y(this, da, i), y(this, fa, r), y(this, ua, s), [t, e] = A(this, Bl, _d).call(this, t, e);
27234
27264
  const o = y(this, Qe, [NaN, NaN, NaN, NaN, t, e]);
27235
27265
  y(this, Sn, [t, e]);
27236
27266
  const a = c(this, Ze).at(-1);
27237
27267
  return a && (a.line = new Float32Array(a.line), a.points = new Float32Array(a.points)), c(this, Ze).push({
27238
27268
  line: o,
27239
27269
  points: c(this, Sn)
27240
- }), c(this, fr).set(o, 0), y(this, mi, 0), this.toSVGPath(), null;
27270
+ }), c(this, fr).set(o, 0), y(this, bi, 0), this.toSVGPath(), null;
27241
27271
  }
27242
27272
  getLastElement() {
27243
27273
  return c(this, Ze).at(-1);
27244
27274
  }
27245
27275
  setLastElement(t) {
27246
- return c(this, Ze) ? (c(this, Ze).push(t), y(this, Qe, t.line), y(this, Sn, t.points), y(this, mi, 0), {
27276
+ return c(this, Ze) ? (c(this, Ze).push(t), y(this, Qe, t.line), y(this, Sn, t.points), y(this, bi, 0), {
27247
27277
  path: {
27248
27278
  d: this.toSVGPath()
27249
27279
  }
@@ -27258,7 +27288,7 @@ class MO {
27258
27288
  line: i,
27259
27289
  points: r
27260
27290
  } = c(this, Ze)[t];
27261
- y(this, Qe, i), y(this, Sn, r), y(this, mi, 0), this.toSVGPath();
27291
+ y(this, Qe, i), y(this, Sn, r), y(this, bi, 0), this.toSVGPath();
27262
27292
  }
27263
27293
  return {
27264
27294
  path: {
@@ -27272,23 +27302,23 @@ class MO {
27272
27302
  return y(this, rn, `${c(this, rn)} M ${t} ${e} Z`), c(this, rn);
27273
27303
  if (c(this, Sn).length <= 6) {
27274
27304
  const r = c(this, rn).lastIndexOf("M");
27275
- y(this, rn, `${c(this, rn).slice(0, r)} M ${t} ${e}`), y(this, mi, 6);
27305
+ y(this, rn, `${c(this, rn).slice(0, r)} M ${t} ${e}`), y(this, bi, 6);
27276
27306
  }
27277
27307
  if (c(this, Sn).length === 4) {
27278
27308
  const r = ot.svgRound(c(this, Qe)[10]), s = ot.svgRound(c(this, Qe)[11]);
27279
- return y(this, rn, `${c(this, rn)} L ${r} ${s}`), y(this, mi, 12), c(this, rn);
27309
+ return y(this, rn, `${c(this, rn)} L ${r} ${s}`), y(this, bi, 12), c(this, rn);
27280
27310
  }
27281
27311
  const i = [];
27282
- c(this, mi) === 0 && (i.push(`M ${t} ${e}`), y(this, mi, 6));
27283
- for (let r = c(this, mi), s = c(this, Qe).length; r < s; r += 6) {
27312
+ c(this, bi) === 0 && (i.push(`M ${t} ${e}`), y(this, bi, 6));
27313
+ for (let r = c(this, bi), s = c(this, Qe).length; r < s; r += 6) {
27284
27314
  const [o, a, l, u, h, d] = c(this, Qe).slice(r, r + 6).map(ot.svgRound);
27285
27315
  i.push(`C${o} ${a} ${l} ${u} ${h} ${d}`);
27286
27316
  }
27287
- return y(this, rn, c(this, rn) + i.join(" ")), y(this, mi, c(this, Qe).length), c(this, rn);
27317
+ return y(this, rn, c(this, rn) + i.join(" ")), y(this, bi, c(this, Qe).length), c(this, rn);
27288
27318
  }
27289
27319
  getOutlines(t, e, i, r) {
27290
27320
  const s = c(this, Ze).at(-1);
27291
- return s.line = new Float32Array(s.line), s.points = new Float32Array(s.points), c(this, ha).build(c(this, Ze), t, e, i, c(this, ua), c(this, jl), r), y(this, fr, null), y(this, Qe, null), y(this, Ze, null), y(this, rn, null), c(this, ha);
27321
+ return s.line = new Float32Array(s.line), s.points = new Float32Array(s.points), c(this, ha).build(c(this, Ze), t, e, i, c(this, ua), c(this, zl), r), y(this, fr, null), y(this, Qe, null), y(this, Ze, null), y(this, rn, null), c(this, ha);
27292
27322
  }
27293
27323
  get defaultSVGProperties() {
27294
27324
  return {
@@ -27302,10 +27332,10 @@ class MO {
27302
27332
  };
27303
27333
  }
27304
27334
  }
27305
- fr = new WeakMap(), Qe = new WeakMap(), Ze = new WeakMap(), ua = new WeakMap(), jl = new WeakMap(), Sn = new WeakMap(), rn = new WeakMap(), mi = new WeakMap(), ha = new WeakMap(), da = new WeakMap(), fa = new WeakMap(), zl = new WeakSet(), _d = function(t, e) {
27335
+ fr = new WeakMap(), Qe = new WeakMap(), Ze = new WeakMap(), ua = new WeakMap(), zl = new WeakMap(), Sn = new WeakMap(), rn = new WeakMap(), bi = new WeakMap(), ha = new WeakMap(), da = new WeakMap(), fa = new WeakMap(), Bl = new WeakSet(), _d = function(t, e) {
27306
27336
  return ot._normalizePoint(t, e, c(this, da), c(this, fa), c(this, ua));
27307
27337
  };
27308
- var En, Ah, Sh, ei, pr, gr, Bl, $l, Hl, on, Rr, _x, Cx, Tx;
27338
+ var En, Ah, Sh, ei, pr, gr, $l, Hl, Ul, on, Rr, _x, Cx, Tx;
27309
27339
  const Lm = class Lm extends ot {
27310
27340
  constructor() {
27311
27341
  super(...arguments);
@@ -27316,12 +27346,12 @@ const Lm = class Lm extends ot {
27316
27346
  x(this, ei);
27317
27347
  x(this, pr);
27318
27348
  x(this, gr);
27319
- x(this, Bl);
27320
27349
  x(this, $l);
27321
27350
  x(this, Hl);
27351
+ x(this, Ul);
27322
27352
  }
27323
27353
  build(e, i, r, s, o, a, l) {
27324
- y(this, pr, i), y(this, gr, r), y(this, Bl, s), y(this, $l, o), y(this, Hl, a), y(this, Sh, l ?? 0), y(this, ei, e), A(this, on, Cx).call(this);
27354
+ y(this, pr, i), y(this, gr, r), y(this, $l, s), y(this, Hl, o), y(this, Ul, a), y(this, Sh, l ?? 0), y(this, ei, e), A(this, on, Cx).call(this);
27325
27355
  }
27326
27356
  setLastElement(e) {
27327
27357
  return c(this, ei).push(e), {
@@ -27360,7 +27390,7 @@ const Lm = class Lm extends ot {
27360
27390
  serialize([e, i, r, s], o) {
27361
27391
  const a = [], l = [], [u, h, d, f] = A(this, on, _x).call(this);
27362
27392
  let p, g, m, v, b, w, E, T, C;
27363
- switch (c(this, $l)) {
27393
+ switch (c(this, Hl)) {
27364
27394
  case 0:
27365
27395
  C = ot._rescale, p = e, g = i + s, m = r, v = -s, b = e + u * r, w = i + (1 - h - f) * s, E = e + (u + d) * r, T = i + (1 - h) * s;
27366
27396
  break;
@@ -27447,7 +27477,7 @@ const Lm = class Lm extends ot {
27447
27477
  }
27448
27478
  updateParentDimensions([e, i], r) {
27449
27479
  const [s, o] = A(this, on, Rr).call(this);
27450
- y(this, pr, e), y(this, gr, i), y(this, Bl, r);
27480
+ y(this, pr, e), y(this, gr, i), y(this, $l, r);
27451
27481
  const [a, l] = A(this, on, Rr).call(this), u = a - s, h = l - o, d = c(this, En);
27452
27482
  return d[0] -= u, d[1] -= h, d[2] += 2 * u, d[3] += 2 * h, d;
27453
27483
  }
@@ -27593,9 +27623,9 @@ const Lm = class Lm extends ot {
27593
27623
  };
27594
27624
  }
27595
27625
  };
27596
- En = new WeakMap(), Ah = new WeakMap(), Sh = new WeakMap(), ei = new WeakMap(), pr = new WeakMap(), gr = new WeakMap(), Bl = new WeakMap(), $l = new WeakMap(), Hl = new WeakMap(), on = new WeakSet(), Rr = function(e = c(this, Hl)) {
27597
- const i = c(this, Sh) + e / 2 * c(this, Bl);
27598
- return c(this, $l) % 180 === 0 ? [i / c(this, pr), i / c(this, gr)] : [i / c(this, gr), i / c(this, pr)];
27626
+ En = new WeakMap(), Ah = new WeakMap(), Sh = new WeakMap(), ei = new WeakMap(), pr = new WeakMap(), gr = new WeakMap(), $l = new WeakMap(), Hl = new WeakMap(), Ul = new WeakMap(), on = new WeakSet(), Rr = function(e = c(this, Ul)) {
27627
+ const i = c(this, Sh) + e / 2 * c(this, $l);
27628
+ return c(this, Hl) % 180 === 0 ? [i / c(this, pr), i / c(this, gr)] : [i / c(this, gr), i / c(this, pr)];
27599
27629
  }, _x = function() {
27600
27630
  const [e, i, r, s] = c(this, En), [o, a] = A(this, on, Rr).call(this, 0);
27601
27631
  return [e + o, i + a, r - 2 * o, s - 2 * a];
@@ -27621,17 +27651,17 @@ En = new WeakMap(), Ah = new WeakMap(), Sh = new WeakMap(), ei = new WeakMap(),
27621
27651
  e[0] = Math.min(1, Math.max(0, e[0] - i)), e[1] = Math.min(1, Math.max(0, e[1] - r)), e[2] = Math.min(1, Math.max(0, e[2] + i)), e[3] = Math.min(1, Math.max(0, e[3] + r)), e[2] -= e[0], e[3] -= e[1];
27622
27652
  }, Tx = function(e) {
27623
27653
  const [i, r] = A(this, on, Rr).call(this);
27624
- y(this, Hl, e);
27654
+ y(this, Ul, e);
27625
27655
  const [s, o] = A(this, on, Rr).call(this), [a, l] = [s - i, o - r], u = c(this, En);
27626
27656
  return u[0] -= a, u[1] -= l, u[2] += 2 * a, u[3] += 2 * l, u;
27627
27657
  };
27628
27658
  let Gd = Lm;
27629
- var Ul;
27659
+ var Wl;
27630
27660
  const Dm = class Dm extends OO {
27631
27661
  constructor(e) {
27632
27662
  super();
27633
- x(this, Ul);
27634
- y(this, Ul, e), super.updateProperties({
27663
+ x(this, Wl);
27664
+ y(this, Wl, e), super.updateProperties({
27635
27665
  fill: "none",
27636
27666
  stroke: Ce._defaultLineColor,
27637
27667
  "stroke-opacity": 1,
@@ -27642,17 +27672,17 @@ const Dm = class Dm extends OO {
27642
27672
  });
27643
27673
  }
27644
27674
  updateSVGProperty(e, i) {
27645
- e === "stroke-width" && (i ?? (i = this["stroke-width"]), i *= c(this, Ul).realScale), super.updateSVGProperty(e, i);
27675
+ e === "stroke-width" && (i ?? (i = this["stroke-width"]), i *= c(this, Wl).realScale), super.updateSVGProperty(e, i);
27646
27676
  }
27647
27677
  clone() {
27648
- const e = new Dm(c(this, Ul));
27678
+ const e = new Dm(c(this, Wl));
27649
27679
  return e.updateAll(this), e;
27650
27680
  }
27651
27681
  };
27652
- Ul = new WeakMap();
27682
+ Wl = new WeakMap();
27653
27683
  let Dg = Dm;
27654
27684
  var df, Px;
27655
- const za = class za extends Ig {
27685
+ const Ba = class Ba extends Ig {
27656
27686
  constructor(e) {
27657
27687
  super({
27658
27688
  ...e,
@@ -27742,7 +27772,7 @@ const za = class za extends Ig {
27742
27772
  thickness: i,
27743
27773
  opacity: r
27744
27774
  }) {
27745
- this._drawingOptions = za.getDefaultDrawingOptions({
27775
+ this._drawingOptions = Ba.getDefaultDrawingOptions({
27746
27776
  stroke: pt.makeHexColor(...e),
27747
27777
  "stroke-width": i,
27748
27778
  "stroke-opacity": r
@@ -27799,9 +27829,9 @@ df = new WeakSet(), Px = function(e) {
27799
27829
  pageIndex: o
27800
27830
  } = this._initialData;
27801
27831
  return this._hasBeenMoved || this._hasBeenResized || e.color.some((a, l) => a !== i[l]) || e.thickness !== r || e.opacity !== s || e.pageIndex !== o;
27802
- }, ft(za, "_type", "ink"), ft(za, "_editorType", Pt.INK), ft(za, "_defaultDrawingOptions", null);
27803
- let Ng = za;
27804
- var _e, sn, Hs, ts, Us, Wl, mr, br, ni, Vl, Yt, Fc, jc, Cd, jg, Td, zg, Pd, Rx;
27832
+ }, ft(Ba, "_type", "ink"), ft(Ba, "_editorType", Pt.INK), ft(Ba, "_defaultDrawingOptions", null);
27833
+ let Ng = Ba;
27834
+ var _e, sn, Hs, ts, Us, Vl, mr, br, ni, ql, Yt, Fc, jc, Cd, jg, Td, zg, Pd, Rx;
27805
27835
  const Uc = class Uc extends Ce {
27806
27836
  constructor(e) {
27807
27837
  super({
@@ -27814,11 +27844,11 @@ const Uc = class Uc extends Ce {
27814
27844
  x(this, Hs, null);
27815
27845
  x(this, ts, null);
27816
27846
  x(this, Us, null);
27817
- x(this, Wl, "");
27847
+ x(this, Vl, "");
27818
27848
  x(this, mr, null);
27819
27849
  x(this, br, null);
27820
27850
  x(this, ni, !1);
27821
- x(this, Vl, !1);
27851
+ x(this, ql, !1);
27822
27852
  y(this, ts, e.bitmapUrl), y(this, Us, e.bitmapFile);
27823
27853
  }
27824
27854
  static initialize(e, i) {
@@ -28032,7 +28062,7 @@ const Uc = class Uc extends Ce {
28032
28062
  } = e;
28033
28063
  h && r.imageManager.isValidId(h) ? (y(o, sn, h), l && y(o, _e, l)) : y(o, ts, u), y(o, ni, d);
28034
28064
  const [p, g] = o.pageDimensions;
28035
- return o.width = (a[2] - a[0]) / p, o.height = (a[3] - a[1]) / g, o.annotationElementId = e.id || null, f && (o.altTextData = f), o._initialData = s, y(o, Vl, !!s), o;
28065
+ return o.width = (a[2] - a[0]) / p, o.height = (a[3] - a[1]) / g, o.annotationElementId = e.id || null, f && (o.altTextData = f), o._initialData = s, y(o, ql, !!s), o;
28036
28066
  }
28037
28067
  serialize(e = !1, i = null) {
28038
28068
  if (this.isEmpty())
@@ -28084,12 +28114,12 @@ const Uc = class Uc extends Ce {
28084
28114
  }), null;
28085
28115
  }
28086
28116
  };
28087
- _e = new WeakMap(), sn = new WeakMap(), Hs = new WeakMap(), ts = new WeakMap(), Us = new WeakMap(), Wl = new WeakMap(), mr = new WeakMap(), br = new WeakMap(), ni = new WeakMap(), Vl = new WeakMap(), Yt = new WeakSet(), Fc = function(e, i = !1) {
28117
+ _e = new WeakMap(), sn = new WeakMap(), Hs = new WeakMap(), ts = new WeakMap(), Us = new WeakMap(), Vl = new WeakMap(), mr = new WeakMap(), br = new WeakMap(), ni = new WeakMap(), ql = new WeakMap(), Yt = new WeakSet(), Fc = function(e, i = !1) {
28088
28118
  if (!e) {
28089
28119
  this.remove();
28090
28120
  return;
28091
28121
  }
28092
- y(this, _e, e.bitmap), i || (y(this, sn, e.id), y(this, ni, e.isSvg)), e.file && y(this, Wl, e.file.name), A(this, Yt, jg).call(this);
28122
+ y(this, _e, e.bitmap), i || (y(this, sn, e.id), y(this, ni, e.isSvg)), e.file && y(this, Vl, e.file.name), A(this, Yt, jg).call(this);
28093
28123
  }, jc = function() {
28094
28124
  if (y(this, Hs, null), this._uiManager.enableWaiting(!1), !!c(this, mr)) {
28095
28125
  if (this._uiManager.useNewAltTextWhenAddingImage && this._uiManager.useNewAltTextFlow && c(this, _e)) {
@@ -28171,9 +28201,9 @@ _e = new WeakMap(), sn = new WeakMap(), Hs = new WeakMap(), ts = new WeakMap(),
28171
28201
  const [l, u] = this.parentDimensions;
28172
28202
  this.setDims(i * l / s, r * u / o), this._uiManager.enableWaiting(!1);
28173
28203
  const h = y(this, mr, document.createElement("canvas"));
28174
- h.setAttribute("role", "img"), this.addContainer(h), this.width = i / s, this.height = r / o, (d = this._initialOptions) != null && d.isCentered ? this.center() : this.fixAndSetPosition(), this._initialOptions = null, (!this._uiManager.useNewAltTextWhenAddingImage || !this._uiManager.useNewAltTextFlow || this.annotationElementId) && (e.hidden = !1), A(this, Yt, zg).call(this), c(this, Vl) || (this.parent.addUndoableEditor(this), y(this, Vl, !0)), this._reportTelemetry({
28204
+ h.setAttribute("role", "img"), this.addContainer(h), this.width = i / s, this.height = r / o, (d = this._initialOptions) != null && d.isCentered ? this.center() : this.fixAndSetPosition(), this._initialOptions = null, (!this._uiManager.useNewAltTextWhenAddingImage || !this._uiManager.useNewAltTextFlow || this.annotationElementId) && (e.hidden = !1), A(this, Yt, zg).call(this), c(this, ql) || (this.parent.addUndoableEditor(this), y(this, ql, !0)), this._reportTelemetry({
28175
28205
  action: "inserted_image"
28176
- }), c(this, Wl) && h.setAttribute("aria-label", c(this, Wl));
28206
+ }), c(this, Vl) && h.setAttribute("aria-label", c(this, Vl));
28177
28207
  }, Td = function(e, i) {
28178
28208
  const {
28179
28209
  width: r,
@@ -28229,7 +28259,7 @@ _e = new WeakMap(), sn = new WeakMap(), Hs = new WeakMap(), ts = new WeakMap(),
28229
28259
  };
28230
28260
  }, ft(Uc, "_type", "stamp"), ft(Uc, "_editorType", Pt.STAMP);
28231
28261
  let Fg = Uc;
28232
- var pa, ql, yr, Ws, es, bi, Vs, Gl, ga, ji, ns, fn, is, dt, qs, Se, Ix, tr, $g, Hg, Rd;
28262
+ var pa, Gl, yr, Ws, es, yi, Vs, Yl, ga, ji, ns, fn, is, dt, qs, Se, Ix, tr, $g, Hg, Rd;
28233
28263
  const _i = class _i {
28234
28264
  constructor({
28235
28265
  uiManager: t,
@@ -28245,13 +28275,13 @@ const _i = class _i {
28245
28275
  }) {
28246
28276
  x(this, Se);
28247
28277
  x(this, pa);
28248
- x(this, ql, !1);
28278
+ x(this, Gl, !1);
28249
28279
  x(this, yr, null);
28250
28280
  x(this, Ws, null);
28251
28281
  x(this, es, null);
28252
- x(this, bi, /* @__PURE__ */ new Map());
28282
+ x(this, yi, /* @__PURE__ */ new Map());
28253
28283
  x(this, Vs, !1);
28254
- x(this, Gl, !1);
28284
+ x(this, Yl, !1);
28255
28285
  x(this, ga, !1);
28256
28286
  x(this, ji, null);
28257
28287
  x(this, ns, null);
@@ -28267,7 +28297,7 @@ const _i = class _i {
28267
28297
  t.registerEditorTypes(d), y(this, dt, t), this.pageIndex = e, this.div = i, y(this, pa, s), y(this, yr, o), this.viewport = u, y(this, fn, l), this.drawLayer = a, this._structTree = r, c(this, dt).addLayer(this);
28268
28298
  }
28269
28299
  get isEmpty() {
28270
- return c(this, bi).size === 0;
28300
+ return c(this, yi).size === 0;
28271
28301
  }
28272
28302
  get isInvisible() {
28273
28303
  return this.isEmpty && c(this, dt).getMode() === Pt.NONE;
@@ -28323,7 +28353,7 @@ const _i = class _i {
28323
28353
  async enable() {
28324
28354
  y(this, ga, !0), this.div.tabIndex = 0, this.togglePointerEvents(!0);
28325
28355
  const t = /* @__PURE__ */ new Set();
28326
- for (const i of c(this, bi).values())
28356
+ for (const i of c(this, yi).values())
28327
28357
  i.enableEditing(), i.show(!0), i.annotationElementId && (c(this, dt).removeChangedExistingAnnotation(i), t.add(i.annotationElementId));
28328
28358
  if (!c(this, yr)) {
28329
28359
  y(this, ga, !1);
@@ -28340,9 +28370,9 @@ const _i = class _i {
28340
28370
  }
28341
28371
  disable() {
28342
28372
  var r;
28343
- y(this, Gl, !0), this.div.tabIndex = -1, this.togglePointerEvents(!1);
28373
+ y(this, Yl, !0), this.div.tabIndex = -1, this.togglePointerEvents(!1);
28344
28374
  const t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
28345
- for (const s of c(this, bi).values())
28375
+ for (const s of c(this, yi).values())
28346
28376
  if (s.disableEditing(), !!s.annotationElementId) {
28347
28377
  if (s.serialize() !== null) {
28348
28378
  t.set(s.annotationElementId, s);
@@ -28373,7 +28403,7 @@ const _i = class _i {
28373
28403
  } = this.div;
28374
28404
  for (const s of c(_i, qs).values())
28375
28405
  i.remove(`${s._type}Editing`);
28376
- this.disableTextSelection(), this.toggleAnnotationLayerPointerEvents(!0), y(this, Gl, !1);
28406
+ this.disableTextSelection(), this.toggleAnnotationLayerPointerEvents(!0), y(this, Yl, !1);
28377
28407
  }
28378
28408
  getEditableAnnotation(t) {
28379
28409
  var e;
@@ -28416,7 +28446,7 @@ const _i = class _i {
28416
28446
  (t = c(this, Ws)) == null || t.abort(), y(this, Ws, null);
28417
28447
  }
28418
28448
  attach(t) {
28419
- c(this, bi).set(t.id, t);
28449
+ c(this, yi).set(t.id, t);
28420
28450
  const {
28421
28451
  annotationElementId: e
28422
28452
  } = t;
@@ -28424,7 +28454,7 @@ const _i = class _i {
28424
28454
  }
28425
28455
  detach(t) {
28426
28456
  var e;
28427
- c(this, bi).delete(t.id), (e = c(this, pa)) == null || e.removePointerInTextLayer(t.contentDiv), !c(this, Gl) && t.annotationElementId && c(this, dt).addDeletedAnnotationElement(t);
28457
+ c(this, yi).delete(t.id), (e = c(this, pa)) == null || e.removePointerInTextLayer(t.contentDiv), !c(this, Yl) && t.annotationElementId && c(this, dt).addDeletedAnnotationElement(t);
28428
28458
  }
28429
28459
  remove(t) {
28430
28460
  this.detach(t), c(this, dt).removeEditor(t), t.div.remove(), t.isAttachedToDOM = !1;
@@ -28531,8 +28561,8 @@ const _i = class _i {
28531
28561
  isMac: e
28532
28562
  } = Tn.platform;
28533
28563
  if (!(t.button !== 0 || t.ctrlKey && e) && t.target === this.div && c(this, Vs) && (y(this, Vs, !1), !((i = c(this, Se, tr)) != null && i.isDrawer && c(this, Se, tr).supportMultipleDrawings))) {
28534
- if (!c(this, ql)) {
28535
- y(this, ql, !0);
28564
+ if (!c(this, Gl)) {
28565
+ y(this, Gl, !0);
28536
28566
  return;
28537
28567
  }
28538
28568
  if (c(this, dt).getMode() === Pt.STAMP) {
@@ -28558,7 +28588,7 @@ const _i = class _i {
28558
28588
  return;
28559
28589
  }
28560
28590
  const i = c(this, dt).getActive();
28561
- y(this, ql, !i || i.isEmpty());
28591
+ y(this, Gl, !i || i.isEmpty());
28562
28592
  }
28563
28593
  startDrawingSession(t) {
28564
28594
  if (this.div.focus(), c(this, ji)) {
@@ -28604,9 +28634,9 @@ const _i = class _i {
28604
28634
  destroy() {
28605
28635
  var t, e;
28606
28636
  this.commitOrRemove(), ((t = c(this, dt).getActive()) == null ? void 0 : t.parent) === this && (c(this, dt).commitOrRemove(), c(this, dt).setActiveEditor(null)), c(this, es) && (clearTimeout(c(this, es)), y(this, es, null));
28607
- for (const i of c(this, bi).values())
28637
+ for (const i of c(this, yi).values())
28608
28638
  (e = c(this, pa)) == null || e.removePointerInTextLayer(i.contentDiv), i.setParent(null), i.isAttachedToDOM = !1, i.div.remove();
28609
- this.div = null, c(this, bi).clear(), c(this, dt).removeLayer(this);
28639
+ this.div = null, c(this, yi).clear(), c(this, dt).removeLayer(this);
28610
28640
  }
28611
28641
  render({
28612
28642
  viewport: t
@@ -28624,7 +28654,7 @@ const _i = class _i {
28624
28654
  if (this.viewport = t, ya(this.div, {
28625
28655
  rotation: i
28626
28656
  }), e !== i)
28627
- for (const r of c(this, bi).values())
28657
+ for (const r of c(this, yi).values())
28628
28658
  r.rotate(i);
28629
28659
  }
28630
28660
  get pageDimensions() {
@@ -28638,7 +28668,7 @@ const _i = class _i {
28638
28668
  return c(this, dt).viewParameters.realScale;
28639
28669
  }
28640
28670
  };
28641
- pa = new WeakMap(), ql = new WeakMap(), yr = new WeakMap(), Ws = new WeakMap(), es = new WeakMap(), bi = new WeakMap(), Vs = new WeakMap(), Gl = new WeakMap(), ga = new WeakMap(), ji = new WeakMap(), ns = new WeakMap(), fn = new WeakMap(), is = new WeakMap(), dt = new WeakMap(), qs = new WeakMap(), Se = new WeakSet(), Ix = function(t) {
28671
+ pa = new WeakMap(), Gl = new WeakMap(), yr = new WeakMap(), Ws = new WeakMap(), es = new WeakMap(), yi = new WeakMap(), Vs = new WeakMap(), Yl = new WeakMap(), ga = new WeakMap(), ji = new WeakMap(), ns = new WeakMap(), fn = new WeakMap(), is = new WeakMap(), dt = new WeakMap(), qs = new WeakMap(), Se = new WeakSet(), Ix = function(t) {
28642
28672
  c(this, dt).unselectAll();
28643
28673
  const {
28644
28674
  target: e
@@ -28677,7 +28707,7 @@ pa = new WeakMap(), ql = new WeakMap(), yr = new WeakMap(), Ws = new WeakMap(),
28677
28707
  offsetY: f
28678
28708
  };
28679
28709
  }, Rd = function() {
28680
- for (const t of c(this, bi).values())
28710
+ for (const t of c(this, yi).values())
28681
28711
  t.isEmpty() && t.remove();
28682
28712
  }, ft(_i, "_initialized", !1), x(_i, qs, new Map([xg, Ng, Fg, qd].map((t) => [t._editorType, t])));
28683
28713
  let Bg = _i;
@@ -28871,14 +28901,14 @@ function jO() {
28871
28901
  }
28872
28902
  const Hy = /* @__PURE__ */ new Map();
28873
28903
  function zO({ fileUrl: n, pageNumber: t, onMeta: e, scrollBehavior: i = "auto", highlights: r, clientId: s, apiKey: o, authToken: a }) {
28874
- const [l, u] = ye(0), [h, d] = ye(!0), [f, p] = ye(null), [g, m] = ye(0), v = Ve([]), b = Ve([]), w = Ve(null), E = Ve(null), T = Ve(!1), C = Ve(null), _ = Ve(null), O = Ve(1), U = Bn((D) => {
28904
+ const [l, u] = fe(0), [h, d] = fe(!0), [f, p] = fe(null), [g, m] = fe(0), v = Ve([]), b = Ve([]), w = Ve(null), E = Ve(null), T = Ve(!1), C = Ve(null), _ = Ve(null), O = Ve(1), U = Bn((D) => {
28875
28905
  try {
28876
28906
  return !D || /^https?:\/\//i.test(D) ? D : new URL(D, window.location.origin).href;
28877
28907
  } catch {
28878
28908
  return D;
28879
28909
  }
28880
28910
  }, []);
28881
- vi(() => {
28911
+ si(() => {
28882
28912
  v.current = [], b.current = [], u(0), d(!0), p(null);
28883
28913
  }, [n]);
28884
28914
  const B = Bn(async () => {
@@ -28947,7 +28977,7 @@ function zO({ fileUrl: n, pageNumber: t, onMeta: e, scrollBehavior: i = "auto",
28947
28977
  return console.error("Failed to create bbox highlight:", $), null;
28948
28978
  }
28949
28979
  }, []);
28950
- return vi(() => {
28980
+ return si(() => {
28951
28981
  const D = async () => {
28952
28982
  try {
28953
28983
  const $ = w.current, W = l;
@@ -28980,8 +29010,8 @@ function zO({ fileUrl: n, pageNumber: t, onMeta: e, scrollBehavior: i = "auto",
28980
29010
  ue.className = "hl-layer", ue.style.position = "absolute", ue.style.left = `${Y.left - ut.left}px`, ue.style.top = `${Y.top - ut.top}px`, ue.style.width = `${ve.width}px`, ue.style.height = `${ve.height}px`, ue.style.transformOrigin = "0 0", ue.style.transform = `scale(${xt}, ${bt})`, ue.style.pointerEvents = "none", ue.style.willChange = "transform", ue.style.zIndex = "2";
28981
29011
  const ze = `page-${M}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
28982
29012
  ue.setAttribute("data-highlight-id", ze), console.log(`SimplePdfViewer: Creating new highlight layer for page ${M} with ID: ${ze}`), L.style.userSelect = "none", L.style.webkitUserSelect = "none", L.style.mozUserSelect = "none", L.style.msUserSelect = "none";
28983
- const pe = L.querySelector("canvas"), li = L.querySelector(".textLayer");
28984
- pe && (pe.style.userSelect = "none", pe.style.webkitUserSelect = "none"), li && (li.style.userSelect = "none", li.style.webkitUserSelect = "none", li.style.pointerEvents = "none");
29013
+ const ge = L.querySelector("canvas"), ci = L.querySelector(".textLayer");
29014
+ ge && (ge.style.userSelect = "none", ge.style.webkitUserSelect = "none"), ci && (ci.style.userSelect = "none", ci.style.webkitUserSelect = "none", ci.style.pointerEvents = "none");
28985
29015
  const Ei = document.createElement("style");
28986
29016
  Ei.textContent = `
28987
29017
  .react-pdf__Page * {
@@ -29009,7 +29039,7 @@ function zO({ fileUrl: n, pageNumber: t, onMeta: e, scrollBehavior: i = "auto",
29009
29039
  requestAnimationFrame(D);
29010
29040
  };
29011
29041
  return window.addEventListener("resize", N), () => window.removeEventListener("resize", N);
29012
- }, [r, l, g, z]), vi(() => {
29042
+ }, [r, l, g, z]), si(() => {
29013
29043
  let D = !1;
29014
29044
  return (async () => {
29015
29045
  try {
@@ -29052,7 +29082,7 @@ function zO({ fileUrl: n, pageNumber: t, onMeta: e, scrollBehavior: i = "auto",
29052
29082
  })(), () => {
29053
29083
  D = !0;
29054
29084
  };
29055
- }, [n, s, o, R, e, U]), vi(() => {
29085
+ }, [n, s, o, R, e, U]), si(() => {
29056
29086
  const D = E.current;
29057
29087
  if (!D) return;
29058
29088
  let N = D.clientWidth, $, W = 0;
@@ -29070,7 +29100,7 @@ function zO({ fileUrl: n, pageNumber: t, onMeta: e, scrollBehavior: i = "auto",
29070
29100
  return M.observe(D), () => {
29071
29101
  M.disconnect(), clearTimeout($), cancelAnimationFrame(W);
29072
29102
  };
29073
- }, [R]), vi(() => {
29103
+ }, [R]), si(() => {
29074
29104
  if (!t || t < 1 || t > (l || 0)) return;
29075
29105
  const D = E.current, N = C.current, $ = _.current;
29076
29106
  let W = t;
@@ -29158,7 +29188,7 @@ function BO({
29158
29188
  onChangePage: h,
29159
29189
  onMeta: d
29160
29190
  }) {
29161
- const [f, p] = ye(!1), g = Ve(null), m = Ve(null), v = Ve(null);
29191
+ const [f, p] = fe(!1), g = Ve(null), m = Ve(null), v = Ve(null);
29162
29192
  return /* @__PURE__ */ I.jsx("div", { className: `modal ${n && t ? "open" : ""}`, onClick: u, children: /* @__PURE__ */ I.jsxs("div", { className: "modal-content", onClick: (b) => b.stopPropagation(), children: [
29163
29193
  /* @__PURE__ */ I.jsxs("div", { className: "modal-header", children: [
29164
29194
  /* @__PURE__ */ I.jsx("div", { className: "modal-title", children: e }),
@@ -29264,8 +29294,8 @@ function BO({
29264
29294
  }
29265
29295
  const hp = {};
29266
29296
  function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r }) {
29267
- const s = i || "https://fastify.tpsportal.co.nz/api/v1", o = r || "https://fastify.tpsportal.co.nz/api/v1/docs", a = hp == null ? void 0 : hp.VITE_API_KEY, [l, u] = ye([]), [h, d] = ye(""), [f, p] = ye(!1), [g, m] = ye(null), [v, b] = ye(null), [w, E] = ye([]), [T, C] = ye({}), [_, O] = ye({ open: !1 }), [U, B] = ye(null), R = Ve(null), z = Ve(!0), D = Ve(null), N = Ve(!0), $ = Ve(0), [W, M] = ye(!0), [L, nt] = ye(50), [gt, S] = ye(!1), [H, Q] = ye(!1), [k, J] = ye(null), [ut, Y] = ye(!1), [Z, ht] = ye(!0), [xt, bt] = ye(null), ee = Ve(null), tt = Ve(null), ve = Ve(null), { toasts: ue, pushToast: ze } = Vx(), pe = Ac(() => Hx({ apiBase: s, generateToken: t, clientId: e }), [s, t, e]), [li, Ei] = ye();
29268
- vi(() => {
29297
+ const s = i || "https://fastify.tpsportal.co.nz/api/v1", o = r || "https://fastify.tpsportal.co.nz/api/v1/docs", a = hp == null ? void 0 : hp.VITE_API_KEY, [l, u] = fe([]), [h, d] = fe(""), [f, p] = fe(!1), [g, m] = fe(null), [v, b] = fe(null), [w, E] = fe([]), [T, C] = fe({}), [_, O] = fe({ open: !1 }), [U, B] = fe(null), R = Ve(null), z = Ve(!0), D = Ve(null), N = Ve(!0), $ = Ve(0), [W, M] = fe(!0), [L, nt] = fe(50), [gt, S] = fe(!1), [H, Q] = fe(!1), [k, J] = fe(null), [ut, Y] = fe(!1), [Z, ht] = fe(!0), [xt, bt] = fe(null), ee = Ve(null), tt = Ve(null), ve = Ve(null), { toasts: ue, pushToast: ze } = Vx(), ge = ja(() => Hx({ apiBase: s, generateToken: t, clientId: e }), [s, t, e]), [ci, Ei] = fe();
29298
+ si(() => {
29269
29299
  t && Promise.resolve(t()).then(Ei).catch(() => Ei(void 0));
29270
29300
  }, [t]);
29271
29301
  const oe = Bn(({ numPages: q }) => B(q), []), Ee = Bn(() => {
@@ -29292,7 +29322,7 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29292
29322
  }
29293
29323
  const Et = new AbortController();
29294
29324
  tt.current = Et;
29295
- const qt = await pe.getMessages(q, 20, void 0, { signal: Et.signal });
29325
+ const qt = await ge.getMessages(q, 20, void 0, { signal: Et.signal });
29296
29326
  if (!N.current || mt !== $.current) return;
29297
29327
  const ae = [];
29298
29328
  for (const Te of qt) ae.push({ role: Te.role, content: Te.content, sources: Te.sources || [], createdAt: Te.created_at ? Date.parse(Te.created_at) : Date.now() });
@@ -29304,7 +29334,7 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29304
29334
  } finally {
29305
29335
  N.current && mt === $.current && Y(!1);
29306
29336
  }
29307
- }, [pe, Ee]), sc = Bn(async (q) => {
29337
+ }, [ge, Ee]), oc = Bn(async (q) => {
29308
29338
  var Ki, Ji;
29309
29339
  if (q.preventDefault(), !h.trim() || f) return;
29310
29340
  const mt = { role: "user", content: h.trim(), createdAt: Date.now() }, Ot = [...l, mt];
@@ -29315,31 +29345,31 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29315
29345
  let Te, he = null;
29316
29346
  const kr = (zt) => {
29317
29347
  if (!zt || !he) return;
29318
- const ge = he;
29348
+ const me = he;
29319
29349
  C((Un) => {
29320
- const Be = Un[ge], me = Be ? { ...Be, content: Be.content + zt } : { role: "assistant", content: zt, sources: Te || [], createdAt: Date.now() };
29321
- return { ...Un, [ge]: me };
29350
+ const Be = Un[me], be = Be ? { ...Be, content: Be.content + zt } : { role: "assistant", content: zt, sources: Te || [], createdAt: Date.now() };
29351
+ return { ...Un, [me]: be };
29322
29352
  }), p(!1);
29323
29353
  }, _r = (zt) => {
29324
- let ge = 0;
29325
- for (; ge < zt.length; ) {
29326
- const Un = zt[ge] === "!";
29327
- if ((Un && zt[ge + 1] === "[" || zt[ge] === "[" ? ge : -1) === -1) {
29328
- ge++;
29354
+ let me = 0;
29355
+ for (; me < zt.length; ) {
29356
+ const Un = zt[me] === "!";
29357
+ if ((Un && zt[me + 1] === "[" || zt[me] === "[" ? me : -1) === -1) {
29358
+ me++;
29329
29359
  continue;
29330
29360
  }
29331
- const me = Un ? ge + 1 : ge, Ge = zt.indexOf("]", me + 1);
29361
+ const be = Un ? me + 1 : me, Ge = zt.indexOf("]", be + 1);
29332
29362
  if (Ge === -1)
29333
- return ge;
29363
+ return me;
29334
29364
  let ki = Ge + 1;
29335
29365
  for (; ki < zt.length && /\s/.test(zt[ki]); ) ki++;
29336
29366
  if (ki < zt.length && zt[ki] === "(") {
29337
29367
  const ds = zt.indexOf(")", ki + 1);
29338
29368
  if (ds === -1)
29339
- return ge;
29340
- ge = ds + 1;
29369
+ return me;
29370
+ me = ds + 1;
29341
29371
  } else
29342
- ge = Ge + 1;
29372
+ me = Ge + 1;
29343
29373
  }
29344
29374
  return -1;
29345
29375
  };
@@ -29351,47 +29381,47 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29351
29381
  } catch {
29352
29382
  }
29353
29383
  const Be = new AbortController();
29354
- ve.current = Be, zt = (await pe.createConversation(mt.content.slice(0, 80), { signal: Be.signal })).id, b(zt), pe.listConversations().then(E).catch(() => {
29384
+ ve.current = Be, zt = (await ge.createConversation(mt.content.slice(0, 80), { signal: Be.signal })).id, b(zt), ge.listConversations().then(E).catch(() => {
29355
29385
  });
29356
29386
  }
29357
29387
  he = zt;
29358
- const ge = [{ role: "user", content: mt.content }];
29388
+ const me = [{ role: "user", content: mt.content }];
29359
29389
  try {
29360
29390
  (Ji = ve.current) == null || Ji.abort();
29361
29391
  } catch {
29362
29392
  }
29363
29393
  const Un = new AbortController();
29364
- ve.current = Un, await pe.chatStream(
29365
- { messages: ge, conversationId: zt },
29394
+ ve.current = Un, await ge.chatStream(
29395
+ { messages: me, conversationId: zt },
29366
29396
  {
29367
29397
  onMetadata: (Be) => {
29368
- Te = Be || [], he && C((me) => {
29369
- const Ge = me[he];
29370
- return Ge ? { ...me, [he]: { ...Ge, sources: Te } } : me;
29398
+ Te = Be || [], he && C((be) => {
29399
+ const Ge = be[he];
29400
+ return Ge ? { ...be, [he]: { ...Ge, sources: Te } } : be;
29371
29401
  });
29372
29402
  },
29373
29403
  onText: (Be) => {
29374
29404
  if (!N.current) return;
29375
- let me = qt + Be;
29405
+ let be = qt + Be;
29376
29406
  for (; ; ) {
29377
- const Ge = _r(me);
29407
+ const Ge = _r(be);
29378
29408
  if (Ge === -1) {
29379
- kr(me), me = "";
29409
+ kr(be), be = "";
29380
29410
  break;
29381
29411
  }
29382
29412
  if (Ge > 0) {
29383
- kr(me.slice(0, Ge)), me = me.slice(Ge);
29413
+ kr(be.slice(0, Ge)), be = be.slice(Ge);
29384
29414
  break;
29385
29415
  }
29386
29416
  break;
29387
29417
  }
29388
- qt = me, qt.length >= ae && (kr(qt), qt = "");
29418
+ qt = be, qt.length >= ae && (kr(qt), qt = "");
29389
29419
  },
29390
29420
  onComplete: (Be) => {
29391
- qt && kr(qt), qt = "", N.current && p(!1), he && C((me) => {
29392
- const Ge = me[he];
29421
+ qt && kr(qt), qt = "", N.current && p(!1), he && C((be) => {
29422
+ const Ge = be[he];
29393
29423
  Ge && v === he && u((_a) => [..._a, Ge]);
29394
- const { [he]: ki, ...ds } = me;
29424
+ const { [he]: ki, ...ds } = be;
29395
29425
  return ds;
29396
29426
  });
29397
29427
  },
@@ -29403,19 +29433,19 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29403
29433
  );
29404
29434
  } catch (zt) {
29405
29435
  if (zt instanceof DOMException && zt.name === "AbortError") return;
29406
- const ge = zt instanceof Id ? zt.status === 429 ? "You're sending messages too quickly. Please retry in a moment." : zt.status >= 500 ? "Server error while processing your message." : zt.status === 401 || zt.status === 403 ? "Unauthorized. Please sign in." : zt.message || "Request failed" : zt instanceof Error ? zt.message : "Unknown error";
29407
- N.current && (m(ge), ze(ge, "error"), p(!1));
29436
+ const me = zt instanceof Id ? zt.status === 429 ? "You're sending messages too quickly. Please retry in a moment." : zt.status >= 500 ? "Server error while processing your message." : zt.status === 401 || zt.status === 403 ? "Unauthorized. Please sign in." : zt.message || "Request failed" : zt instanceof Error ? zt.message : "Unknown error";
29437
+ N.current && (m(me), ze(me, "error"), p(!1));
29408
29438
  }
29409
- }, [pe, v, h, f, l, ze]);
29410
- vi(() => {
29439
+ }, [ge, v, h, f, l, ze]);
29440
+ si(() => {
29411
29441
  if (f && z.current) {
29412
29442
  Ee();
29413
29443
  return;
29414
29444
  }
29415
29445
  W && Ee();
29416
- }, [l, f, W, Ee]), vi(() => {
29446
+ }, [l, f, W, Ee]), si(() => {
29417
29447
  !v || !T[v] || f && z.current && Ee();
29418
- }, [T, v, f, Ee]), vi(() => {
29448
+ }, [T, v, f, Ee]), si(() => {
29419
29449
  var Ot;
29420
29450
  N.current = !0;
29421
29451
  let q = !1;
@@ -29427,7 +29457,7 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29427
29457
  return ee.current = mt, (async () => {
29428
29458
  try {
29429
29459
  Q(!0), J(null);
29430
- const Et = await pe.listConversations({ signal: mt.signal });
29460
+ const Et = await ge.listConversations({ signal: mt.signal });
29431
29461
  if (q || !N.current) return;
29432
29462
  E(Et), !v && Et.length > 0 && await Yi(Et[0].id);
29433
29463
  } catch (Et) {
@@ -29452,8 +29482,8 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29452
29482
  } catch {
29453
29483
  }
29454
29484
  };
29455
- }, [pe, Yi]);
29456
- const oc = Bn(async () => {
29485
+ }, [ge, Yi]);
29486
+ const ac = Bn(async () => {
29457
29487
  var mt;
29458
29488
  try {
29459
29489
  (mt = ee.current) == null || mt.abort();
@@ -29462,7 +29492,7 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29462
29492
  const q = new AbortController();
29463
29493
  ee.current = q, Q(!0), J(null);
29464
29494
  try {
29465
- const Ot = await pe.listConversations({ signal: q.signal });
29495
+ const Ot = await ge.listConversations({ signal: q.signal });
29466
29496
  if (!N.current) return;
29467
29497
  E(Ot);
29468
29498
  } catch (Ot) {
@@ -29471,15 +29501,15 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29471
29501
  } finally {
29472
29502
  N.current && Q(!1);
29473
29503
  }
29474
- }, [pe]), Xi = Ac(() => l.filter((q) => q.role !== "system"), [l]), j = Math.max(0, Xi.length - L), X = v ? T[v] : void 0, wt = Ac(() => {
29504
+ }, [ge]), Xi = ja(() => l.filter((q) => q.role !== "system"), [l]), j = Math.max(0, Xi.length - L), X = v ? T[v] : void 0, wt = ja(() => {
29475
29505
  const q = Xi.slice(j);
29476
29506
  return X ? [...q, X] : q;
29477
- }, [Xi, j, X]), It = Ac(() => {
29507
+ }, [Xi, j, X]), It = ja(() => {
29478
29508
  var mt;
29479
29509
  const q = wt[wt.length - 1];
29480
29510
  return !!(q && q.role === "assistant" && (((mt = q.content) == null ? void 0 : mt.trim()) || "").length > 0);
29481
29511
  }, [wt]), Vt = !Z && !ut && Xi.length === 0;
29482
- return vi(() => {
29512
+ return si(() => {
29483
29513
  if (!Vt) return;
29484
29514
  const q = D.current;
29485
29515
  if (!q) return;
@@ -29489,21 +29519,21 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29489
29519
  if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
29490
29520
  q.classList.add("js-motion");
29491
29521
  let Ki = 0, Ji = 0;
29492
- const zt = Math.PI * 2, ge = 16, Un = 8, Be = 28;
29493
- let me = 40;
29522
+ const zt = Math.PI * 2, me = 16, Un = 8, Be = 28;
29523
+ let be = 40;
29494
29524
  try {
29495
- me = parseFloat(qt[0].getAttribute("r") || "40");
29525
+ be = parseFloat(qt[0].getAttribute("r") || "40");
29496
29526
  } catch {
29497
29527
  }
29498
- const ki = (2 * me + 8) / Math.sqrt(3), ds = Math.max(34, ki + 6), _a = 12, ac = (eo) => {
29528
+ const ki = (2 * be + 8) / Math.sqrt(3), ds = Math.max(34, ki + 6), _a = 12, lc = (eo) => {
29499
29529
  Ji || (Ji = eo);
29500
- const lc = (eo - Ji) / 1e3, Rf = lc * 360 / ge % 360, zh = ds + _a * (0.5 - 0.5 * Math.cos(zt * (lc / Un))), P = lc * 360 / Be % 360;
29530
+ const cc = (eo - Ji) / 1e3, Rf = cc * 360 / me % 360, zh = ds + _a * (0.5 - 0.5 * Math.cos(zt * (cc / Un))), P = cc * 360 / Be % 360;
29501
29531
  qt.forEach((V) => {
29502
29532
  const it = V.getAttribute("class") || "", At = kr(it), Jt = Rf * Math.PI / 180 + At, Bt = Te + zh * Math.cos(Jt), Lt = he + zh * Math.sin(Jt);
29503
29533
  V.setAttribute("cx", Bt.toFixed(2)), V.setAttribute("cy", Lt.toFixed(2));
29504
- }), Ot.style.setProperty("--g", `${P.toFixed(3)}deg`), Ki = requestAnimationFrame(ac);
29534
+ }), Ot.style.setProperty("--g", `${P.toFixed(3)}deg`), Ki = requestAnimationFrame(lc);
29505
29535
  };
29506
- return Ki = requestAnimationFrame(ac), () => {
29536
+ return Ki = requestAnimationFrame(lc), () => {
29507
29537
  try {
29508
29538
  cancelAnimationFrame(Ki);
29509
29539
  } catch {
@@ -29523,9 +29553,9 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29523
29553
  title: "New chat",
29524
29554
  onClick: async () => {
29525
29555
  try {
29526
- const q = await pe.createConversation();
29556
+ const q = await ge.createConversation();
29527
29557
  b(q.id), u((Ot) => Ot.filter((Et) => Et.role === "system"));
29528
- const mt = await pe.listConversations();
29558
+ const mt = await ge.listConversations();
29529
29559
  E(mt);
29530
29560
  } catch (q) {
29531
29561
  m(q instanceof Error ? q.message : "Failed to create conversation");
@@ -29546,7 +29576,7 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29546
29576
  ] }),
29547
29577
  k && !H && /* @__PURE__ */ I.jsxs("div", { className: "sidebar-error", role: "alert", children: [
29548
29578
  /* @__PURE__ */ I.jsx("div", { className: "sidebar-error-text", children: k }),
29549
- /* @__PURE__ */ I.jsx("button", { className: "chip", type: "button", onClick: oc, "aria-label": "Retry loading conversations", children: "Retry" })
29579
+ /* @__PURE__ */ I.jsx("button", { className: "chip", type: "button", onClick: ac, "aria-label": "Retry loading conversations", children: "Retry" })
29550
29580
  ] }),
29551
29581
  !H && !k && (!w || w.length === 0) && /* @__PURE__ */ I.jsx("div", { className: "thread-empty", children: "No conversations yet" }),
29552
29582
  !H && !k && w && w.length > 0 && /* @__PURE__ */ I.jsxs("div", { className: "thread-group", children: [
@@ -29683,7 +29713,7 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29683
29713
  /* @__PURE__ */ I.jsx("span", { className: "typing-text", children: "Thinking…" })
29684
29714
  ] }) })
29685
29715
  ] }),
29686
- /* @__PURE__ */ I.jsx("form", { className: "composer", onSubmit: sc, "aria-busy": f, children: /* @__PURE__ */ I.jsxs("div", { className: "composer-field", children: [
29716
+ /* @__PURE__ */ I.jsx("form", { className: "composer", onSubmit: oc, "aria-busy": f, children: /* @__PURE__ */ I.jsxs("div", { className: "composer-field", children: [
29687
29717
  /* @__PURE__ */ I.jsx(
29688
29718
  "textarea",
29689
29719
  {
@@ -29717,7 +29747,7 @@ function VO({ user: n, generateToken: t, clientId: e, apiBase: i, docsBase: r })
29717
29747
  numPages: U,
29718
29748
  clientId: e,
29719
29749
  apiKey: a,
29720
- authToken: li,
29750
+ authToken: ci,
29721
29751
  onClose: () => O((q) => ({ ...q, open: !1 })),
29722
29752
  onChangePage: (q) => O((mt) => ({ ...mt, page: q, jumpTick: (mt.jumpTick || 0) + 1 })),
29723
29753
  onMeta: oe