@qaiddev/thumbs-embed 1.9.1 → 1.10.0

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.
@@ -1,26 +1,26 @@
1
- import { i as At, F as Tt, T as It, a as Et, R as zt } from "./annotate-D-o8xCV9.js";
2
- const Dt = "button{cursor:pointer}.qaid-buttons{display:flex;gap:.5rem}.qaid-buttons.qaid-vertical{flex-direction:column}.qaid-buttons.qaid-auto-container{position:fixed;z-index:50}.qaid-buttons.qaid-auto-container.qaid-bottom-right{bottom:1rem;right:1rem}.qaid-buttons.qaid-auto-container.qaid-bottom-left{bottom:1rem;left:1rem}.qaid-buttons.qaid-auto-container.qaid-top-right{top:1rem;right:1rem}.qaid-buttons.qaid-auto-container.qaid-top-left{top:1rem;left:1rem}.qaid-buttons.qaid-incognito{opacity:0;transition:opacity .2s ease-in-out}.qaid-buttons.qaid-incognito:hover{opacity:1}.qaid-buttons.qaid-dismissed{display:none!important}.qaid-dismiss-btn{width:20px;height:20px;padding:0;border:none;border-radius:50%;background:#0006;color:#fff;display:flex;align-items:center;justify-content:center;align-self:center;opacity:0;transition:opacity .15s,background .15s;cursor:pointer;pointer-events:auto;-webkit-appearance:none;appearance:none}.qaid-dismiss-btn:hover{background:#0009}.qaid-buttons:hover .qaid-dismiss-btn{opacity:1}button.qaid-btn-structural{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-appearance:none;appearance:none}.qaid-icon{width:24px;height:24px}:where(button.qaid-btn-structural)>svg:where(:not(.qaid-icon):not([width])){width:var(--qaid-icon-size, 24px);height:var(--qaid-icon-size, 24px)}.qaid-btn-structural:not(:has(svg)),.qaid-btn:not(:has(svg)){font-size:var(--qaid-icon-size, 24px);line-height:1}.qaid-emoji-icon{font-size:var(--qaid-icon-size, 24px);line-height:1}.qaid-buttons,.qaid-buttons *,.qaid-modal-container,.qaid-modal-container *{cursor:pointer!important}.qaid-tooltip-wrapper{position:relative}.qaid-tooltip-text{position:fixed;padding:.5rem .75rem;background:#1f2937;color:#fff;font-size:var(--qaid-font-size, 16px);font-weight:600;border-radius:.5rem;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s;z-index:99999}.qaid-tooltip-text.qaid-tooltip-visible{opacity:1}.qaid-targeting-overlay{position:fixed;inset:0;z-index:40;pointer-events:none}.qaid-capture-layer{position:fixed;inset:0;pointer-events:none;z-index:9999}@keyframes qaid-slideDown{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.qaid-vignette{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 30%,rgba(0,0,0,.3) 70%,rgba(0,0,0,.6) 100%);z-index:41}.qaid-crosshair-h,.qaid-crosshair-v{position:fixed;pointer-events:none;z-index:42}.qaid-crosshair-h{left:0;right:0;height:1px;background:color-mix(in srgb,var(--qaid-negative) 60%,transparent)}.qaid-crosshair-v{top:0;bottom:0;width:1px;background:color-mix(in srgb,var(--qaid-negative) 60%,transparent)}.qaid-type-up .qaid-crosshair-h,.qaid-type-up .qaid-crosshair-v{background:color-mix(in srgb,var(--qaid-positive) 60%,transparent)}.qaid-highlight-box{position:fixed;top:0;left:0;pointer-events:none;z-index:41;display:none;border:3px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent);border-radius:2px;background:color-mix(in srgb,var(--qaid-negative) 8%,transparent);will-change:transform,width,height}.qaid-type-up .qaid-highlight-box{border-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent);background:color-mix(in srgb,var(--qaid-positive) 8%,transparent)}.qaid-scope{position:fixed;width:80px;height:80px;pointer-events:none;z-index:43;transform:translate(-50%,-50%)}.qaid-scope-ring{position:absolute;inset:10px;border:2px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent);border-radius:50%}.qaid-type-up .qaid-scope-ring{border-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent)}.qaid-scope-ring-inner{position:absolute;inset:20px;border:1px solid color-mix(in srgb,var(--qaid-negative) 50%,transparent);border-radius:50%}.qaid-type-up .qaid-scope-ring-inner{border-color:color-mix(in srgb,var(--qaid-positive) 50%,transparent)}.qaid-scope-dot{position:absolute;top:50%;left:50%;width:4px;height:4px;background:var(--qaid-negative);border-radius:50%;transform:translate(-50%,-50%)}.qaid-type-up .qaid-scope-dot{background:var(--qaid-positive)}.qaid-selected-marker{position:fixed;border:3px solid var(--qaid-marker, #6365f1);border-radius:50%;pointer-events:none;z-index:44;animation:qaid-markerPulse 1.5s ease-in-out infinite}@keyframes qaid-markerPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.05)}}.qaid-backdrop{position:fixed;inset:0;z-index:45;background:#0000004d}.qaid-modal-container{position:fixed;z-index:50;display:flex;flex-direction:column;align-items:flex-start;max-height:calc(100vh - 32px);font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-modal-container.qaid-above{flex-direction:column-reverse}.qaid-modal-arrow{width:0;height:0;border-left:12px solid transparent;border-right:12px solid transparent;position:relative;align-self:flex-start}.qaid-modal-container.qaid-below .qaid-modal-arrow{border-bottom:12px solid light-dark(#ffffff,#1f2937)}.qaid-modal-container.qaid-above .qaid-modal-arrow{border-top:12px solid light-dark(#ffffff,#1f2937)}.qaid-modal-box{color-scheme:inherit;background:light-dark(#ffffff,#1f2937);border-radius:1rem;padding:1.5rem;box-shadow:0 25px 50px -12px light-dark(rgba(0,0,0,.25),rgba(0,0,0,.5));width:var(--qaid-modal-width, 400px);max-width:calc(100vw - 32px);max-height:calc(100vh - 60px);overflow-y:auto}.qaid-modal-header{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:1rem}button.qaid-type-toggle{border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;flex-shrink:0;-webkit-appearance:none;appearance:none}button.qaid-type-toggle:hover{transform:scale(1.1)}button.qaid-type-toggle:not(.qaid-type-toggle-custom){width:2.5rem;height:2.5rem;border-radius:50%}button.qaid-type-toggle:not(.qaid-type-toggle-custom) svg{width:1.25rem;height:1.25rem}button.qaid-type-toggle.qaid-type-up{background:var(--qaid-positive);color:#fff}button.qaid-type-toggle.qaid-type-down{background:var(--qaid-negative);color:#fff}.qaid-type-static{width:2.5rem;height:2.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--qaid-marker, #6365f1);color:var(--qaid-marker-text, white)}.qaid-type-static svg{width:1.25rem;height:1.25rem}.qaid-modal-header-text{flex:1;min-width:0}.qaid-modal-title{font-size:calc(var(--qaid-font-size, 16px) * 1.125);font-weight:700;margin:0 0 .25rem;color:light-dark(#1f2937,#f9fafb)}.qaid-modal-subtitle{color:light-dark(#6b7280,#9ca3af);margin:0;font-size:calc(var(--qaid-font-size, 16px) * .875)}.qaid-textarea{width:100%;height:6rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:var(--qaid-font-size, 16px);resize:vertical;margin-bottom:1rem;box-sizing:border-box;background:light-dark(#ffffff,#111827);color:light-dark(#1f2937,#f9fafb)}.qaid-textarea:focus{outline:none;border-color:var(--qaid-marker);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 20%,transparent)}.qaid-btn-row{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-btn-submit{padding:.5rem 1rem;background:var(--qaid-marker);color:var(--qaid-marker-text, white);border:none;border-radius:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;appearance:none}button.qaid-btn-submit:hover{filter:brightness(.85)}button.qaid-btn-submit:focus{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 30%,transparent)}.qaid-bottom-sheet{position:fixed;bottom:0;left:0;right:0;z-index:50;animation:qaid-slideUpSheet .3s ease-out;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-bottom-sheet-content{background:light-dark(#ffffff,#1f2937);border-radius:1rem 1rem 0 0;padding:1.5rem;padding-bottom:max(1.5rem,env(safe-area-inset-bottom))}.qaid-bottom-sheet-handle{width:36px;height:4px;background:light-dark(rgba(0,0,0,.2),rgba(255,255,255,.2));border-radius:2px;margin:0 auto 1rem}@keyframes qaid-slideUpSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}button.qaid-btn-record:hover{background:#dc2626;color:#fff}.qaid-recording-indicator{position:fixed;pointer-events:auto;top:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:light-dark(#1f2937,#374151);color:#fff;border-radius:9999px;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;box-shadow:0 4px 12px #0000004d;z-index:99999;animation:qaid-slideDown .2s ease-out}.qaid-recording-dot{width:10px;height:10px;background:#dc2626;border-radius:50%;animation:qaid-dotPulse 1.5s ease-in-out infinite}@keyframes qaid-dotPulse{0%,to{opacity:1}50%{opacity:.3}}.qaid-recording-time{font-variant-numeric:tabular-nums;min-width:2.5rem;text-align:center}button.qaid-recording-stop{padding:.25rem .75rem;background:#dc2626;color:#fff;border:none;border-radius:9999px;font-size:calc(var(--qaid-font-size, 16px) * .75);font-weight:600;cursor:pointer;transition:background-color .2s;-webkit-appearance:none;appearance:none}button.qaid-recording-stop:hover{background:#b91c1c}.qaid-video-preview{position:fixed;inset:0 0 auto;height:100vh;height:100dvh;display:flex;align-items:center;justify-content:center;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));box-sizing:border-box;background:#0009;z-index:99998;animation:qaid-fadeIn .2s ease-out}@keyframes qaid-fadeIn{0%{opacity:0}to{opacity:1}}.qaid-video-preview-box{color-scheme:inherit;background:light-dark(#ffffff,#1f2937);border-radius:1rem;padding:1.5rem;box-shadow:0 25px 50px -12px #00000080;width:560px;max-width:100%;max-height:100%;overflow-y:auto;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-video-preview-box h3{font-size:calc(var(--qaid-font-size, 16px) * 1.125);font-weight:700;margin:0 0 1rem;color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box video{width:100%;max-height:50vh;max-height:50dvh;object-fit:contain;border-radius:.5rem;background:#000;margin-bottom:1rem}.qaid-video-preview-box textarea{width:100%;height:4rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:calc(var(--qaid-font-size, 16px) * .875);resize:vertical;margin-bottom:1rem;box-sizing:border-box;background:light-dark(#ffffff,#111827);color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box textarea:focus{outline:none;border-color:var(--qaid-marker);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 20%,transparent)}.qaid-video-error{margin:0 0 .75rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;color:light-dark(#b91c1c,#fca5a5)}.qaid-video-preview-actions{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-video-btn{padding:.5rem 1rem;border:none;border-radius:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;appearance:none}button.qaid-video-btn-cancel{background:light-dark(#f3f4f6,#374151);color:light-dark(#374151,#d1d5db)}button.qaid-video-btn-cancel:hover{background:light-dark(#e5e7eb,#4b5563)}button.qaid-video-btn-rerecord{background:light-dark(#fef3c7,#78350f);color:light-dark(#92400e,#fde68a)}button.qaid-video-btn-rerecord:hover{filter:brightness(.9)}button.qaid-video-btn-send{background:var(--qaid-marker);color:var(--qaid-marker-text, white)}button.qaid-video-btn-send:hover{filter:brightness(.85)}button.qaid-video-btn-send:disabled{opacity:.5;cursor:not-allowed}.qaid-video-sending{display:flex;align-items:center;gap:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);color:light-dark(#6b7280,#9ca3af)}.qaid-annotate{position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;gap:.75rem;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));box-sizing:border-box;background:#000000d9;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px);animation:qaid-fadeIn .2s ease-out}.qaid-annotate-title{margin:0;font-size:var(--qaid-font-size, 16px);font-weight:700;text-align:center;color:#f9fafb}.qaid-annotate-desc{margin:0;font-size:calc(var(--qaid-font-size, 16px) * .8125);line-height:1.4;text-align:center;color:#f9fafbbf}.qaid-annotate-stage{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto}.qaid-annotate-canvas{max-width:100%;max-height:100%;object-fit:contain;background:light-dark(#ffffff,#111827);border-radius:.5rem;box-shadow:0 10px 30px #00000080;touch-action:none;cursor:crosshair}.qaid-annotate-toolbar{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;justify-content:center;padding:.5rem .75rem;background:light-dark(#ffffff,#1f2937);border-radius:.75rem;box-shadow:0 10px 30px light-dark(rgba(0,0,0,.25),rgba(0,0,0,.5))}.qaid-annotate-tools,.qaid-annotate-actions{display:flex;gap:.375rem;align-items:center}button.qaid-annotate-tool,button.qaid-annotate-action{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;min-width:44px;min-height:44px;padding:0 .75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;background:light-dark(#f9fafb,#111827);color:light-dark(#1f2937,#f9fafb);font-family:inherit;font-size:calc(var(--qaid-font-size, 16px) * .8125);font-weight:600;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color .15s,color .15s,border-color .15s,filter .15s}button.qaid-annotate-tool svg,button.qaid-annotate-action svg{width:20px;height:20px}.qaid-annotate-colors{display:flex;gap:.25rem;align-items:center}button.qaid-annotate-swatch{width:28px;height:28px;min-width:28px;padding:0;border-radius:9999px;border:2px solid light-dark(#d1d5db,#4b5563);background:var(--qaid-swatch, #000);cursor:pointer;-webkit-appearance:none;appearance:none;transition:transform .1s,box-shadow .15s,border-color .15s}button.qaid-annotate-swatch:hover{transform:scale(1.12)}button.qaid-annotate-swatch[aria-pressed=true]{border-color:light-dark(#111827,#f9fafb);box-shadow:0 0 0 2px var(--qaid-swatch)}@media(forced-colors:active){button.qaid-annotate-swatch[aria-pressed=true]{outline:2px solid Highlight;outline-offset:1px}}button.qaid-annotate-tool:hover,button.qaid-annotate-action:hover{background:light-dark(#eef2ff,#312e81)}button.qaid-annotate-tool[aria-pressed=true],button.qaid-annotate-done{background:var(--qaid-marker, #6365f1);color:var(--qaid-marker-text, #fff);border-color:var(--qaid-marker, #6365f1)}button.qaid-annotate-done:hover{filter:brightness(.9);background:var(--qaid-marker, #6365f1)}button.qaid-annotate-action:disabled{opacity:.45;cursor:not-allowed}@media(forced-colors:active){button.qaid-annotate-tool[aria-pressed=true],button.qaid-annotate-done{border:2px solid Highlight}.qaid-annotate-canvas{border:1px solid CanvasText}}button:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible,[role=button]:focus-visible{outline:2px solid var(--qaid-marker, #6365f1);outline-offset:2px}.qaid-textarea:focus-visible,button.qaid-btn-submit:focus-visible,.qaid-video-preview-box textarea:focus-visible{outline:2px solid var(--qaid-marker, #6365f1);outline-offset:2px}.qaid-buttons.qaid-incognito:focus-within{opacity:1}.qaid-buttons:focus-within .qaid-dismiss-btn,.qaid-dismiss-btn:focus-visible{opacity:1}.qaid-dismiss-btn{min-width:24px;min-height:24px}button.qaid-recording-stop{min-height:24px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(forced-colors:active){button:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible,[role=button]:focus-visible,.qaid-textarea:focus,button.qaid-btn-submit:focus,.qaid-video-preview-box textarea:focus{outline:2px solid CanvasText;outline-offset:2px}.qaid-selected-marker,.qaid-highlight-box{border-color:Highlight}}.qaid-confirm{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.5rem;padding:.5rem 0}.qaid-confirm-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:9999px;color:#fff;background:var(--qaid-success, #22c55e);margin-bottom:.25rem;animation:qaid-confirm-pop .28s cubic-bezier(.34,1.56,.64,1)}.qaid-confirm-icon .qaid-icon{width:24px;height:24px}.qaid-confirm-error .qaid-confirm-icon{background:var(--qaid-error, #dc2626)}.qaid-confirm-title{margin:0;font-size:var(--qaid-font-size, 16px);font-weight:600;color:var(--qaid-text, light-dark(#111827, #f9fafb))}.qaid-confirm-title:focus-visible{outline:2px solid var(--qaid-primary, #6365f1);outline-offset:3px;border-radius:4px}.qaid-confirm-message{margin:0;font-size:calc(var(--qaid-font-size, 16px) * .875);color:var(--qaid-text-muted, light-dark(#6b7280, #9ca3af))}.qaid-confirm .qaid-confirm-close{margin-top:.5rem;min-width:96px}@keyframes qaid-confirm-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.qaid-confirm-icon{animation:none}}", Ht = "body.qaid-targeting,body.qaid-targeting *{cursor:none!important}";
1
+ import { i as Dt, F as zt, T as Ht, a as Lt, R as Mt } from "./annotate-D-o8xCV9.js";
2
+ const Bt = "button{cursor:pointer}.qaid-buttons{display:flex;gap:.5rem}.qaid-buttons.qaid-vertical{flex-direction:column}.qaid-buttons.qaid-auto-container{position:fixed;z-index:50}.qaid-buttons.qaid-auto-container.qaid-bottom-right{bottom:1rem;right:1rem}.qaid-buttons.qaid-auto-container.qaid-bottom-left{bottom:1rem;left:1rem}.qaid-buttons.qaid-auto-container.qaid-top-right{top:1rem;right:1rem}.qaid-buttons.qaid-auto-container.qaid-top-left{top:1rem;left:1rem}.qaid-buttons.qaid-incognito{opacity:0;transition:opacity .2s ease-in-out}.qaid-buttons.qaid-incognito:hover{opacity:1}.qaid-buttons.qaid-dismissed{display:none!important}.qaid-dismiss-btn{width:20px;height:20px;padding:0;border:none;border-radius:50%;background:#0006;color:#fff;display:flex;align-items:center;justify-content:center;align-self:center;opacity:0;transition:opacity .15s,background .15s;cursor:pointer;pointer-events:auto;-webkit-appearance:none;appearance:none}.qaid-dismiss-btn:hover{background:#0009}.qaid-buttons:hover .qaid-dismiss-btn{opacity:1}button.qaid-btn-structural{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-appearance:none;appearance:none}.qaid-icon{width:24px;height:24px}:where(button.qaid-btn-structural)>svg:where(:not(.qaid-icon):not([width])){width:var(--qaid-icon-size, 24px);height:var(--qaid-icon-size, 24px)}.qaid-btn-structural:not(:has(svg)),.qaid-btn:not(:has(svg)){font-size:var(--qaid-icon-size, 24px);line-height:1}.qaid-emoji-icon{font-size:var(--qaid-icon-size, 24px);line-height:1}.qaid-buttons,.qaid-buttons *,.qaid-modal-container,.qaid-modal-container *{cursor:pointer!important}.qaid-tooltip-wrapper{position:relative}.qaid-tooltip-text{position:fixed;padding:.5rem .75rem;background:#1f2937;color:#fff;font-size:var(--qaid-font-size, 16px);font-weight:600;border-radius:.5rem;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s;z-index:99999}.qaid-tooltip-text.qaid-tooltip-visible{opacity:1}.qaid-targeting-overlay{position:fixed;inset:0;z-index:40;pointer-events:none}.qaid-capture-layer{position:fixed;inset:0;pointer-events:none;z-index:9999}@keyframes qaid-slideDown{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.qaid-vignette{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 30%,rgba(0,0,0,.3) 70%,rgba(0,0,0,.6) 100%);z-index:41}.qaid-crosshair-h,.qaid-crosshair-v{position:fixed;pointer-events:none;z-index:42}.qaid-crosshair-h{left:0;right:0;height:1px;background:color-mix(in srgb,var(--qaid-negative) 60%,transparent)}.qaid-crosshair-v{top:0;bottom:0;width:1px;background:color-mix(in srgb,var(--qaid-negative) 60%,transparent)}.qaid-type-up .qaid-crosshair-h,.qaid-type-up .qaid-crosshair-v{background:color-mix(in srgb,var(--qaid-positive) 60%,transparent)}.qaid-highlight-box{position:fixed;top:0;left:0;pointer-events:none;z-index:41;display:none;border:3px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent);border-radius:2px;background:color-mix(in srgb,var(--qaid-negative) 8%,transparent);will-change:transform,width,height}.qaid-type-up .qaid-highlight-box{border-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent);background:color-mix(in srgb,var(--qaid-positive) 8%,transparent)}.qaid-scope{position:fixed;width:80px;height:80px;pointer-events:none;z-index:43;transform:translate(-50%,-50%)}.qaid-scope-ring{position:absolute;inset:10px;border:2px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent);border-radius:50%}.qaid-type-up .qaid-scope-ring{border-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent)}.qaid-scope-ring-inner{position:absolute;inset:20px;border:1px solid color-mix(in srgb,var(--qaid-negative) 50%,transparent);border-radius:50%}.qaid-type-up .qaid-scope-ring-inner{border-color:color-mix(in srgb,var(--qaid-positive) 50%,transparent)}.qaid-scope-dot{position:absolute;top:50%;left:50%;width:4px;height:4px;background:var(--qaid-negative);border-radius:50%;transform:translate(-50%,-50%)}.qaid-type-up .qaid-scope-dot{background:var(--qaid-positive)}.qaid-selected-marker{position:fixed;border:3px solid var(--qaid-marker, #6365f1);border-radius:50%;pointer-events:none;z-index:44;animation:qaid-markerPulse 1.5s ease-in-out infinite}@keyframes qaid-markerPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.05)}}.qaid-backdrop{position:fixed;inset:0;z-index:45;background:#0000004d}.qaid-modal-container{position:fixed;z-index:50;display:flex;flex-direction:column;align-items:flex-start;max-height:calc(100vh - 32px);font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-modal-container.qaid-above{flex-direction:column-reverse}.qaid-modal-arrow{width:0;height:0;border-left:12px solid transparent;border-right:12px solid transparent;position:relative;align-self:flex-start}.qaid-modal-container.qaid-below .qaid-modal-arrow{border-bottom:12px solid light-dark(#ffffff,#1f2937)}.qaid-modal-container.qaid-above .qaid-modal-arrow{border-top:12px solid light-dark(#ffffff,#1f2937)}.qaid-modal-box{color-scheme:inherit;background:light-dark(#ffffff,#1f2937);border-radius:1rem;padding:1.5rem;box-shadow:0 25px 50px -12px light-dark(rgba(0,0,0,.25),rgba(0,0,0,.5));width:var(--qaid-modal-width, 400px);max-width:calc(100vw - 32px);max-height:calc(100vh - 60px);overflow-y:auto}.qaid-modal-header{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:1rem}button.qaid-type-toggle{border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;flex-shrink:0;-webkit-appearance:none;appearance:none}button.qaid-type-toggle:hover{transform:scale(1.1)}button.qaid-type-toggle:not(.qaid-type-toggle-custom){width:2.5rem;height:2.5rem;border-radius:50%}button.qaid-type-toggle:not(.qaid-type-toggle-custom) svg{width:1.25rem;height:1.25rem}button.qaid-type-toggle.qaid-type-up{background:var(--qaid-positive);color:#fff}button.qaid-type-toggle.qaid-type-down{background:var(--qaid-negative);color:#fff}.qaid-type-static{width:2.5rem;height:2.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--qaid-marker, #6365f1);color:var(--qaid-marker-text, white)}.qaid-type-static svg{width:1.25rem;height:1.25rem}.qaid-modal-header-text{flex:1;min-width:0}.qaid-modal-title{font-size:calc(var(--qaid-font-size, 16px) * 1.125);font-weight:700;margin:0 0 .25rem;color:light-dark(#1f2937,#f9fafb)}.qaid-modal-subtitle{color:light-dark(#6b7280,#9ca3af);margin:0;font-size:calc(var(--qaid-font-size, 16px) * .875)}.qaid-textarea{width:100%;height:6rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:var(--qaid-font-size, 16px);resize:vertical;margin-bottom:1rem;box-sizing:border-box;background:light-dark(#ffffff,#111827);color:light-dark(#1f2937,#f9fafb)}.qaid-textarea:focus{outline:none;border-color:var(--qaid-marker);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 20%,transparent)}.qaid-btn-row{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-btn-submit{padding:.5rem 1rem;background:var(--qaid-marker);color:var(--qaid-marker-text, white);border:none;border-radius:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;appearance:none}button.qaid-btn-submit:hover{filter:brightness(.85)}button.qaid-btn-submit:focus{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 30%,transparent)}.qaid-bottom-sheet{position:fixed;bottom:0;left:0;right:0;z-index:50;animation:qaid-slideUpSheet .3s ease-out;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-bottom-sheet-content{background:light-dark(#ffffff,#1f2937);border-radius:1rem 1rem 0 0;padding:1.5rem;padding-bottom:max(1.5rem,env(safe-area-inset-bottom))}.qaid-bottom-sheet-handle{width:36px;height:4px;background:light-dark(rgba(0,0,0,.2),rgba(255,255,255,.2));border-radius:2px;margin:0 auto 1rem}@keyframes qaid-slideUpSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}button.qaid-btn-record:hover{background:#dc2626;color:#fff}.qaid-recording-indicator{position:fixed;pointer-events:auto;top:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:light-dark(#1f2937,#374151);color:#fff;border-radius:9999px;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;box-shadow:0 4px 12px #0000004d;z-index:99999;animation:qaid-slideDown .2s ease-out}.qaid-recording-dot{width:10px;height:10px;background:#dc2626;border-radius:50%;animation:qaid-dotPulse 1.5s ease-in-out infinite}@keyframes qaid-dotPulse{0%,to{opacity:1}50%{opacity:.3}}.qaid-recording-time{font-variant-numeric:tabular-nums;min-width:2.5rem;text-align:center}button.qaid-recording-stop{padding:.25rem .75rem;background:#dc2626;color:#fff;border:none;border-radius:9999px;font-size:calc(var(--qaid-font-size, 16px) * .75);font-weight:600;cursor:pointer;transition:background-color .2s;-webkit-appearance:none;appearance:none}button.qaid-recording-stop:hover{background:#b91c1c}.qaid-video-preview{position:fixed;inset:0 0 auto;height:100vh;height:100dvh;display:flex;align-items:center;justify-content:center;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));box-sizing:border-box;background:#0009;z-index:99998;animation:qaid-fadeIn .2s ease-out}@keyframes qaid-fadeIn{0%{opacity:0}to{opacity:1}}.qaid-video-preview-box{color-scheme:inherit;background:light-dark(#ffffff,#1f2937);border-radius:1rem;padding:1.5rem;box-shadow:0 25px 50px -12px #00000080;width:560px;max-width:100%;max-height:100%;overflow-y:auto;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-video-preview-box h3{font-size:calc(var(--qaid-font-size, 16px) * 1.125);font-weight:700;margin:0 0 1rem;color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box video{width:100%;max-height:50vh;max-height:50dvh;object-fit:contain;border-radius:.5rem;background:#000;margin-bottom:1rem}.qaid-video-preview-box textarea{width:100%;height:4rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:calc(var(--qaid-font-size, 16px) * .875);resize:vertical;margin-bottom:1rem;box-sizing:border-box;background:light-dark(#ffffff,#111827);color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box textarea:focus{outline:none;border-color:var(--qaid-marker);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 20%,transparent)}.qaid-video-error{margin:0 0 .75rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;color:light-dark(#b91c1c,#fca5a5)}.qaid-video-preview-actions{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-video-btn{padding:.5rem 1rem;border:none;border-radius:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;appearance:none}button.qaid-video-btn-cancel{background:light-dark(#f3f4f6,#374151);color:light-dark(#374151,#d1d5db)}button.qaid-video-btn-cancel:hover{background:light-dark(#e5e7eb,#4b5563)}button.qaid-video-btn-rerecord{background:light-dark(#fef3c7,#78350f);color:light-dark(#92400e,#fde68a)}button.qaid-video-btn-rerecord:hover{filter:brightness(.9)}button.qaid-video-btn-send{background:var(--qaid-marker);color:var(--qaid-marker-text, white)}button.qaid-video-btn-send:hover{filter:brightness(.85)}button.qaid-video-btn-send:disabled{opacity:.5;cursor:not-allowed}.qaid-video-sending{display:flex;align-items:center;gap:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);color:light-dark(#6b7280,#9ca3af)}.qaid-annotate{position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;gap:.75rem;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));box-sizing:border-box;background:#000000d9;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px);animation:qaid-fadeIn .2s ease-out}.qaid-annotate-title{margin:0;font-size:var(--qaid-font-size, 16px);font-weight:700;text-align:center;color:#f9fafb}.qaid-annotate-desc{margin:0;font-size:calc(var(--qaid-font-size, 16px) * .8125);line-height:1.4;text-align:center;color:#f9fafbbf}.qaid-annotate-stage{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto}.qaid-annotate-canvas{max-width:100%;max-height:100%;object-fit:contain;background:light-dark(#ffffff,#111827);border-radius:.5rem;box-shadow:0 10px 30px #00000080;touch-action:none;cursor:crosshair}.qaid-annotate-toolbar{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;justify-content:center;padding:.5rem .75rem;background:light-dark(#ffffff,#1f2937);border-radius:.75rem;box-shadow:0 10px 30px light-dark(rgba(0,0,0,.25),rgba(0,0,0,.5))}.qaid-annotate-tools,.qaid-annotate-actions{display:flex;gap:.375rem;align-items:center}button.qaid-annotate-tool,button.qaid-annotate-action{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;min-width:44px;min-height:44px;padding:0 .75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;background:light-dark(#f9fafb,#111827);color:light-dark(#1f2937,#f9fafb);font-family:inherit;font-size:calc(var(--qaid-font-size, 16px) * .8125);font-weight:600;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color .15s,color .15s,border-color .15s,filter .15s}button.qaid-annotate-tool svg,button.qaid-annotate-action svg{width:20px;height:20px}.qaid-annotate-colors{display:flex;gap:.25rem;align-items:center}button.qaid-annotate-swatch{width:28px;height:28px;min-width:28px;padding:0;border-radius:9999px;border:2px solid light-dark(#d1d5db,#4b5563);background:var(--qaid-swatch, #000);cursor:pointer;-webkit-appearance:none;appearance:none;transition:transform .1s,box-shadow .15s,border-color .15s}button.qaid-annotate-swatch:hover{transform:scale(1.12)}button.qaid-annotate-swatch[aria-pressed=true]{border-color:light-dark(#111827,#f9fafb);box-shadow:0 0 0 2px var(--qaid-swatch)}@media(forced-colors:active){button.qaid-annotate-swatch[aria-pressed=true]{outline:2px solid Highlight;outline-offset:1px}}button.qaid-annotate-tool:hover,button.qaid-annotate-action:hover{background:light-dark(#eef2ff,#312e81)}button.qaid-annotate-tool[aria-pressed=true],button.qaid-annotate-done{background:var(--qaid-marker, #6365f1);color:var(--qaid-marker-text, #fff);border-color:var(--qaid-marker, #6365f1)}button.qaid-annotate-done:hover{filter:brightness(.9);background:var(--qaid-marker, #6365f1)}button.qaid-annotate-action:disabled{opacity:.45;cursor:not-allowed}@media(forced-colors:active){button.qaid-annotate-tool[aria-pressed=true],button.qaid-annotate-done{border:2px solid Highlight}.qaid-annotate-canvas{border:1px solid CanvasText}}button:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible,[role=button]:focus-visible{outline:2px solid var(--qaid-marker, #6365f1);outline-offset:2px}.qaid-textarea:focus-visible,button.qaid-btn-submit:focus-visible,.qaid-video-preview-box textarea:focus-visible{outline:2px solid var(--qaid-marker, #6365f1);outline-offset:2px}.qaid-buttons.qaid-incognito:focus-within{opacity:1}.qaid-buttons:focus-within .qaid-dismiss-btn,.qaid-dismiss-btn:focus-visible{opacity:1}.qaid-dismiss-btn{min-width:24px;min-height:24px}button.qaid-recording-stop{min-height:24px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(forced-colors:active){button:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible,[role=button]:focus-visible,.qaid-textarea:focus,button.qaid-btn-submit:focus,.qaid-video-preview-box textarea:focus{outline:2px solid CanvasText;outline-offset:2px}.qaid-selected-marker,.qaid-highlight-box{border-color:Highlight}}.qaid-confirm{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.5rem;padding:.5rem 0}.qaid-confirm-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:9999px;color:#fff;background:var(--qaid-success, #22c55e);margin-bottom:.25rem;animation:qaid-confirm-pop .28s cubic-bezier(.34,1.56,.64,1)}.qaid-confirm-icon .qaid-icon{width:24px;height:24px}.qaid-confirm-error .qaid-confirm-icon{background:var(--qaid-error, #dc2626)}.qaid-confirm-title{margin:0;font-size:var(--qaid-font-size, 16px);font-weight:600;color:var(--qaid-text, light-dark(#111827, #f9fafb))}.qaid-confirm-title:focus-visible{outline:2px solid var(--qaid-primary, #6365f1);outline-offset:3px;border-radius:4px}.qaid-confirm-message{margin:0;font-size:calc(var(--qaid-font-size, 16px) * .875);color:var(--qaid-text-muted, light-dark(#6b7280, #9ca3af))}.qaid-confirm .qaid-confirm-close{margin-top:.5rem;min-width:96px}@keyframes qaid-confirm-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.qaid-confirm-icon{animation:none}}", Ot = "body.qaid-targeting,body.qaid-targeting *{cursor:none!important}";
3
3
  let b = 0;
4
- const Lt = "button.qaid-btn{width:var(--qaid-btn-size);height:var(--qaid-btn-size);border-radius:50%;border:none;background:#f3f4f6;color:#374151;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);transition:background-color .2s,color .2s,transform .2s;-webkit-appearance:none;appearance:none;--qaid-hover-up-bg:var(--qaid-positive);--qaid-hover-up-color:#fff;--qaid-hover-down-bg:var(--qaid-negative);--qaid-hover-down-color:#fff}button.qaid-btn:hover{transform:scale(1.05)}button.qaid-btn-up:hover{background:var(--qaid-hover-up-bg);color:var(--qaid-hover-up-color)}button.qaid-btn-down:hover{background:var(--qaid-hover-down-bg);color:var(--qaid-hover-down-color)}button.qaid-btn-feedback:hover{background:var(--qaid-marker,#6365f1);color:var(--qaid-marker-text,#fff)}button.qaid-btn svg{width:var(--qaid-icon-size);height:var(--qaid-icon-size)}", Mt = {
4
+ const Pt = "button.qaid-btn{width:var(--qaid-btn-size);height:var(--qaid-btn-size);border-radius:50%;border:none;background:#f3f4f6;color:#374151;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);transition:background-color .2s,color .2s,transform .2s;-webkit-appearance:none;appearance:none;--qaid-hover-up-bg:var(--qaid-positive);--qaid-hover-up-color:#fff;--qaid-hover-down-bg:var(--qaid-negative);--qaid-hover-down-color:#fff}button.qaid-btn:hover{transform:scale(1.05)}button.qaid-btn-up:hover{background:var(--qaid-hover-up-bg);color:var(--qaid-hover-up-color)}button.qaid-btn-down:hover{background:var(--qaid-hover-down-bg);color:var(--qaid-hover-down-color)}button.qaid-btn-feedback:hover{background:var(--qaid-marker,#6365f1);color:var(--qaid-marker-text,#fff)}button.qaid-btn svg{width:var(--qaid-icon-size);height:var(--qaid-icon-size)}", Rt = {
5
5
  small: 36,
6
6
  medium: 48,
7
7
  large: 64
8
- }, Bt = {
8
+ }, Ft = {
9
9
  small: 18,
10
10
  medium: 24,
11
11
  large: 32
12
12
  };
13
- function Ot(e, t, i) {
14
- const [o, r, n] = [e, t, i].map((a) => (a = a / 255, a <= 0.03928 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4)));
15
- return 0.2126 * o + 0.7152 * r + 0.0722 * n;
13
+ function Ut(e, t, i) {
14
+ const [o, n, a] = [e, t, i].map((r) => (r = r / 255, r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4)));
15
+ return 0.2126 * o + 0.7152 * n + 0.0722 * a;
16
16
  }
17
- function Rt(e) {
17
+ function Vt(e) {
18
18
  if (e.startsWith("#")) {
19
- const i = e.slice(1), o = i.length === 3 ? i.split("").map((n) => n + n).join("") : i, r = parseInt(o, 16);
19
+ const i = e.slice(1), o = i.length === 3 ? i.split("").map((a) => a + a).join("") : i, n = parseInt(o, 16);
20
20
  return {
21
- r: r >> 16 & 255,
22
- g: r >> 8 & 255,
23
- b: r & 255
21
+ r: n >> 16 & 255,
22
+ g: n >> 8 & 255,
23
+ b: n & 255
24
24
  };
25
25
  }
26
26
  const t = e.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
@@ -30,21 +30,21 @@ function Rt(e) {
30
30
  b: parseInt(t[3])
31
31
  } : null;
32
32
  }
33
- function Pt(e) {
34
- const t = Rt(e);
35
- return t && Ot(t.r, t.g, t.b) > 0.4 ? "black" : "white";
33
+ function $t(e) {
34
+ const t = Vt(e);
35
+ return t && Ut(t.r, t.g, t.b) > 0.4 ? "black" : "white";
36
36
  }
37
- function Ft(e = {}) {
37
+ function _t(e = {}) {
38
38
  const {
39
39
  positiveColor: t = "rgb(0, 200, 83)",
40
40
  negativeColor: i = "rgb(255, 0, 0)",
41
41
  markerColor: o = "#6365f1",
42
- buttonSize: r = "medium",
43
- modalWidth: n = 400,
44
- backdropOpacity: a = 0.3,
42
+ buttonSize: n = "medium",
43
+ modalWidth: a = 400,
44
+ backdropOpacity: r = 0.3,
45
45
  fontFamily: l = "system-ui, -apple-system, sans-serif",
46
46
  fontSize: c = 16
47
- } = e, d = Mt[r], s = Bt[r], u = Pt(o);
47
+ } = e, d = Rt[n], s = Ft[n], u = $t(o);
48
48
  return {
49
49
  "--qaid-positive": t,
50
50
  "--qaid-negative": i,
@@ -52,28 +52,28 @@ function Ft(e = {}) {
52
52
  "--qaid-marker-text": u,
53
53
  "--qaid-btn-size": `${d}px`,
54
54
  "--qaid-icon-size": `${s}px`,
55
- "--qaid-modal-width": `${n}px`,
56
- "--qaid-backdrop-opacity": String(a),
55
+ "--qaid-modal-width": `${a}px`,
56
+ "--qaid-backdrop-opacity": String(r),
57
57
  "--qaid-font-family": l,
58
58
  "--qaid-font-size": `${c}px`
59
59
  };
60
60
  }
61
- function Ut(e, t) {
61
+ function Kt(e, t) {
62
62
  for (const [i, o] of Object.entries(t))
63
63
  e.style.setProperty(i, o);
64
64
  }
65
- function Q() {
66
- return Dt + Lt;
65
+ function Y() {
66
+ return Bt + Pt;
67
67
  }
68
- function Vt() {
68
+ function Nt() {
69
69
  if (b++, b > 1) return;
70
70
  const e = document.createElement("style");
71
- e.id = "qaid-styles", e.textContent = Ht, document.head.appendChild(e);
71
+ e.id = "qaid-styles", e.textContent = Ot, document.head.appendChild(e);
72
72
  }
73
- function _t() {
73
+ function Qt() {
74
74
  b <= 0 || (b--, b === 0 && document.getElementById("qaid-styles")?.remove());
75
75
  }
76
- const W = "data-qaid-a11y-live", $t = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;", Kt = [
76
+ const X = "data-qaid-a11y-live", jt = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;", Wt = [
77
77
  "a[href]",
78
78
  "button",
79
79
  "input",
@@ -81,25 +81,25 @@ const W = "data-qaid-a11y-live", $t = "position:absolute;width:1px;height:1px;ma
81
81
  "select",
82
82
  "[tabindex]"
83
83
  ].join(",");
84
- function Nt(e) {
84
+ function Yt(e) {
85
85
  return e.ownerDocument || document;
86
86
  }
87
- function jt(e, t) {
87
+ function Xt(e, t) {
88
88
  const i = t ? "assertive" : "polite", o = e.querySelector(
89
- `[${W}="${i}"]`
89
+ `[${X}="${i}"]`
90
90
  );
91
91
  if (o) return o;
92
- const n = Nt(e).createElement("div");
93
- return n.setAttribute(W, i), n.setAttribute("role", t ? "alert" : "status"), n.setAttribute("aria-live", t ? "assertive" : "polite"), n.setAttribute("aria-atomic", "true"), n.style.cssText = $t, e.appendChild(n), n;
92
+ const a = Yt(e).createElement("div");
93
+ return a.setAttribute(X, i), a.setAttribute("role", t ? "alert" : "status"), a.setAttribute("aria-live", t ? "assertive" : "polite"), a.setAttribute("aria-atomic", "true"), a.style.cssText = jt, e.appendChild(a), a;
94
94
  }
95
- function Qt(e, t, i = {}) {
96
- const o = jt(e, !!i.assertive);
95
+ function Jt(e, t, i = {}) {
96
+ const o = Xt(e, !!i.assertive);
97
97
  o.textContent = "", o.textContent = t;
98
98
  }
99
- function Wt(e) {
99
+ function Gt(e) {
100
100
  return e.hasAttribute("disabled") ? !0 : e.disabled === !0;
101
101
  }
102
- function Yt(e) {
102
+ function Zt(e) {
103
103
  let t = e;
104
104
  for (; t; ) {
105
105
  if (t.hasAttribute("hidden")) return !0;
@@ -110,52 +110,52 @@ function Yt(e) {
110
110
  }
111
111
  return !1;
112
112
  }
113
- function Y(e) {
113
+ function J(e) {
114
114
  return Array.from(
115
- e.querySelectorAll(Kt)
116
- ).filter((i) => !(i.getAttribute("tabindex") === "-1" || i instanceof HTMLInputElement && i.type === "hidden" || i instanceof HTMLAnchorElement && !i.getAttribute("href") || Wt(i) || Yt(i)));
115
+ e.querySelectorAll(Wt)
116
+ ).filter((i) => !(i.getAttribute("tabindex") === "-1" || i instanceof HTMLInputElement && i.type === "hidden" || i instanceof HTMLAnchorElement && !i.getAttribute("href") || Gt(i) || Zt(i)));
117
117
  }
118
- function tt(e) {
118
+ function it(e) {
119
119
  let t = e.activeElement;
120
120
  for (; t && t.shadowRoot && t.shadowRoot.activeElement; )
121
121
  t = t.shadowRoot.activeElement;
122
122
  return t instanceof HTMLElement ? t : null;
123
123
  }
124
- function Xt(e) {
124
+ function te(e) {
125
125
  const t = e.ownerDocument || document;
126
126
  let i = !1;
127
- const o = (n) => {
128
- if (n.key !== "Tab") return;
129
- const a = Y(e);
130
- if (a.length === 0) {
131
- n.preventDefault(), e.focus();
127
+ const o = (a) => {
128
+ if (a.key !== "Tab") return;
129
+ const r = J(e);
130
+ if (r.length === 0) {
131
+ a.preventDefault(), e.focus();
132
132
  return;
133
133
  }
134
- const l = a[0], c = a[a.length - 1], d = tt(t), s = d ? a.indexOf(d) !== -1 : !1;
135
- n.shiftKey ? (!s || d === l) && (n.preventDefault(), c.focus()) : (!s || d === c) && (n.preventDefault(), l.focus());
134
+ const l = r[0], c = r[r.length - 1], d = it(t), s = d ? r.indexOf(d) !== -1 : !1;
135
+ a.shiftKey ? (!s || d === l) && (a.preventDefault(), c.focus()) : (!s || d === c) && (a.preventDefault(), l.focus());
136
136
  };
137
137
  e.addEventListener("keydown", o);
138
- const r = Y(e);
139
- return r.length > 0 ? r[0].focus() : (e.hasAttribute("tabindex") || (e.setAttribute("tabindex", "-1"), i = !0), e.focus()), {
138
+ const n = J(e);
139
+ return n.length > 0 ? n[0].focus() : (e.hasAttribute("tabindex") || (e.setAttribute("tabindex", "-1"), i = !0), e.focus()), {
140
140
  release() {
141
141
  e.removeEventListener("keydown", o), i && (e.removeAttribute("tabindex"), i = !1);
142
142
  }
143
143
  };
144
144
  }
145
- function Jt() {
146
- return tt(document);
145
+ function ee() {
146
+ return it(document);
147
147
  }
148
- function Gt(e) {
148
+ function ie(e) {
149
149
  if (!(!e || typeof e.focus != "function"))
150
150
  try {
151
151
  e.focus();
152
152
  } catch {
153
153
  }
154
154
  }
155
- function Zt(e, t = {}) {
155
+ function oe(e, t = {}) {
156
156
  e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), t.labelledbyId && e.setAttribute("aria-labelledby", t.labelledbyId), t.describedbyId && e.setAttribute("aria-describedby", t.describedbyId), t.label && e.setAttribute("aria-label", t.label);
157
157
  }
158
- function te(e, t) {
158
+ function ae(e, t) {
159
159
  let i = e;
160
160
  for (; i && i !== t; ) {
161
161
  const o = i.parentNode;
@@ -169,117 +169,117 @@ function te(e, t) {
169
169
  }
170
170
  return null;
171
171
  }
172
- function ee(e) {
172
+ function ne(e) {
173
173
  const i = (e.ownerDocument || document).body;
174
174
  if (!i) return () => {
175
175
  };
176
- const o = te(e, i), r = [];
177
- return Array.from(i.children).forEach((n) => {
178
- if (!(n instanceof HTMLElement) || o && n === o) return;
179
- const a = n.inert === !0, l = n.getAttribute("aria-hidden");
180
- a && l === "true" || (n.inert = !0, n.setAttribute("aria-hidden", "true"), r.push({ el: n, prevInert: a, prevAriaHidden: l }));
176
+ const o = ae(e, i), n = [];
177
+ return Array.from(i.children).forEach((a) => {
178
+ if (!(a instanceof HTMLElement) || o && a === o) return;
179
+ const r = a.inert === !0, l = a.getAttribute("aria-hidden");
180
+ r && l === "true" || (a.inert = !0, a.setAttribute("aria-hidden", "true"), n.push({ el: a, prevInert: r, prevAriaHidden: l }));
181
181
  }), function() {
182
- for (; r.length; ) {
183
- const a = r.pop();
184
- a.el.inert = a.prevInert, a.prevAriaHidden === null ? a.el.removeAttribute("aria-hidden") : a.el.setAttribute("aria-hidden", a.prevAriaHidden);
182
+ for (; n.length; ) {
183
+ const r = n.pop();
184
+ r.el.inert = r.prevInert, r.prevAriaHidden === null ? r.el.removeAttribute("aria-hidden") : r.el.setAttribute("aria-hidden", r.prevAriaHidden);
185
185
  }
186
186
  };
187
187
  }
188
- const et = {
188
+ const ot = {
189
189
  width: 400,
190
190
  height: 280,
191
191
  arrowHeight: 12,
192
192
  gap: 8,
193
193
  viewportPadding: 16
194
194
  };
195
- function ie(e, t, i, o, r) {
196
- const n = e.y, a = t - (e.y + e.height);
197
- if (a >= i + o)
195
+ function re(e, t, i, o, n) {
196
+ const a = e.y, r = t - (e.y + e.height);
197
+ if (r >= i + o)
198
198
  return {
199
199
  top: e.y + e.height + o,
200
200
  position: "below"
201
201
  };
202
- if (n >= i + o)
202
+ if (a >= i + o)
203
203
  return {
204
204
  top: e.y - i - o,
205
205
  position: "above"
206
206
  };
207
- const l = a > n ? "below" : "above";
207
+ const l = r > a ? "below" : "above";
208
208
  let c;
209
209
  return l === "below" ? c = Math.min(
210
210
  e.y + e.height + o,
211
- t - i - r
212
- ) : c = Math.max(r, e.y - i - o), { top: c, position: l };
211
+ t - i - n
212
+ ) : c = Math.max(n, e.y - i - o), { top: c, position: l };
213
213
  }
214
- function oe(e, t, i, o) {
215
- let n = e.x + e.width / 2 - i / 2;
216
- return n = Math.max(o, Math.min(n, t - i - o)), n;
214
+ function se(e, t, i, o) {
215
+ let a = e.x + e.width / 2 - i / 2;
216
+ return a = Math.max(o, Math.min(a, t - i - o)), a;
217
217
  }
218
- function ae(e, t, i, o = 24, r = 24) {
219
- const a = e.clickX - t - r / 2;
220
- return Math.max(o, Math.min(a, i - o - r / 2));
218
+ function de(e, t, i, o = 24, n = 24) {
219
+ const r = e.clickX - t - n / 2;
220
+ return Math.max(o, Math.min(r, i - o - n / 2));
221
221
  }
222
- function ne(e, t, i, o = et) {
223
- const r = o.height + o.arrowHeight, n = ie(
222
+ function le(e, t, i, o = ot) {
223
+ const n = o.height + o.arrowHeight, a = re(
224
224
  e,
225
225
  i,
226
- r,
226
+ n,
227
227
  o.gap,
228
228
  o.viewportPadding
229
- ), a = oe(
229
+ ), r = se(
230
230
  e,
231
231
  t,
232
232
  o.width,
233
233
  o.viewportPadding
234
234
  );
235
235
  return {
236
- top: n.top,
237
- left: a,
238
- position: n.position
236
+ top: a.top,
237
+ left: r,
238
+ position: a.position
239
239
  };
240
240
  }
241
- function re(e, t, i, o = {}) {
242
- const r = o.gap ?? 8;
243
- let n = e.bottom + r;
244
- n + t.height > i.height - r && (n = e.top - t.height - r);
245
- let a = e.left;
246
- return a < r ? a = r : a + t.width > i.width - r && (a = i.width - t.width - r), n < r ? n = r : n + t.height > i.height - r && (n = i.height - t.height - r), { top: n, left: a };
241
+ function ce(e, t, i, o = {}) {
242
+ const n = o.gap ?? 8;
243
+ let a = e.bottom + n;
244
+ a + t.height > i.height - n && (a = e.top - t.height - n);
245
+ let r = e.left;
246
+ return r < n ? r = n : r + t.width > i.width - n && (r = i.width - t.width - n), a < n ? a = n : a + t.height > i.height - n && (a = i.height - t.height - n), { top: a, left: r };
247
247
  }
248
- function Ce(e, t, i, o = et) {
249
- const r = ne(e, t, i, o), n = ae(
248
+ function Ee(e, t, i, o = ot) {
249
+ const n = le(e, t, i, o), a = de(
250
250
  e,
251
- r.left,
251
+ n.left,
252
252
  o.width
253
253
  );
254
254
  return {
255
- modal: r,
256
- arrow: { left: n }
255
+ modal: n,
256
+ arrow: { left: a }
257
257
  };
258
258
  }
259
- const se = 20;
260
- function de(e) {
261
- const t = [], i = console.error, o = console.warn, r = console.log, n = (a, l) => {
259
+ const ue = 20;
260
+ function he(e) {
261
+ const t = [], i = console.error, o = console.warn, n = console.log, a = (r, l) => {
262
262
  const c = {
263
263
  message: l.map((d) => String(d)).join(" "),
264
264
  timestamp: Date.now(),
265
- level: a
265
+ level: r
266
266
  };
267
- t.length >= se && t.shift(), t.push(c), e && e(c);
267
+ t.length >= ue && t.shift(), t.push(c), e && e(c);
268
268
  };
269
- return console.error = function(...a) {
270
- n("error", a), i.apply(console, a);
271
- }, console.warn = function(...a) {
272
- n("warn", a), o.apply(console, a);
273
- }, console.log = function(...a) {
274
- n("log", a), r.apply(console, a);
269
+ return console.error = function(...r) {
270
+ a("error", r), i.apply(console, r);
271
+ }, console.warn = function(...r) {
272
+ a("warn", r), o.apply(console, r);
273
+ }, console.log = function(...r) {
274
+ a("log", r), n.apply(console, r);
275
275
  }, {
276
276
  errors: t,
277
277
  restore: () => {
278
- console.error = i, console.warn = o, console.log = r;
278
+ console.error = i, console.warn = o, console.log = n;
279
279
  }
280
280
  };
281
281
  }
282
- const le = "https://unpkg.com/@qaiddev/quests-embed@1/dist/qaid-quests.js", ce = (e) => (
282
+ const fe = "https://unpkg.com/@qaiddev/quests-embed@1/dist/qaid-quests.js", pe = (e) => (
283
283
  // The URL is a runtime value, not a static specifier — keep Vite from
284
284
  // trying to analyze/bundle it.
285
285
  import(
@@ -287,9 +287,25 @@ const le = "https://unpkg.com/@qaiddev/quests-embed@1/dist/qaid-quests.js", ce =
287
287
  e
288
288
  )
289
289
  );
290
- let ue = ce, p = null, k = null;
291
- function he(e) {
292
- return p && k === e || (k = e, p = Promise.resolve(ue(e)).then((t) => {
290
+ let be = pe, p = null, k = null;
291
+ const C = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
292
+ function at(e, t) {
293
+ return `${e.replace(/\/+$/, "")}/${encodeURIComponent(t)}/definition`;
294
+ }
295
+ function me(e) {
296
+ if (C.has(e)) return Promise.resolve();
297
+ const t = S.get(e);
298
+ if (t) return t;
299
+ const i = fetch(e, { headers: { Accept: "application/json" } }).then((o) => o.ok ? o.json() : null).then((o) => {
300
+ o && C.set(e, o);
301
+ }).catch(() => {
302
+ }).finally(() => {
303
+ S.delete(e);
304
+ });
305
+ return S.set(e, i), i;
306
+ }
307
+ function nt(e) {
308
+ return p && k === e || (k = e, p = Promise.resolve(be(e)).then((t) => {
293
309
  const i = t;
294
310
  if (!i || typeof i.QaidQuests != "function")
295
311
  throw new Error("quests module has no QaidQuests export");
@@ -298,17 +314,23 @@ function he(e) {
298
314
  throw p = null, k = null, t;
299
315
  })), p;
300
316
  }
301
- async function fe(e) {
302
- const t = await he(e.moduleUrl), i = e.base.replace(/\/+$/, ""), o = e.feedbackId != null ? { feedbackId: e.feedbackId } : void 0;
303
- return new t.QaidQuests({
317
+ async function ge(e) {
318
+ const t = await nt(e.moduleUrl), i = e.base.replace(/\/+$/, ""), o = at(i, e.questId), n = (l) => l != null ? { feedbackId: l } : void 0;
319
+ let a;
320
+ const r = e.feedbackId;
321
+ return r instanceof Promise ? a = t.QaidQuests.supports?.asyncMetadata ? r.then(n, () => {
322
+ }) : n(await r.catch(() => null)) : a = n(r ?? null), new t.QaidQuests({
304
323
  endpoint: `${i}/responses`,
305
- configUrl: `${i}/${encodeURIComponent(e.questId)}/definition`,
324
+ configUrl: o,
325
+ // Only a definition already in hand. One still loading is left to the
326
+ // widget, which shows its own loading state instead of nothing.
327
+ questionnaire: C.get(o),
306
328
  apiKey: e.apiKey || void 0,
307
- metadata: o,
329
+ metadata: a,
308
330
  onClose: e.onClose
309
331
  });
310
332
  }
311
- const X = "qaid_visitor_id", J = "qaid_hide_feedback", pe = [
333
+ const G = "qaid_visitor_id", Z = "qaid_hide_feedback", ve = [
312
334
  "#ef4444",
313
335
  "#f59e0b",
314
336
  "#22c55e",
@@ -316,26 +338,26 @@ const X = "qaid_visitor_id", J = "qaid_hide_feedback", pe = [
316
338
  "#111827",
317
339
  "#ffffff"
318
340
  ];
319
- function be() {
341
+ function ye() {
320
342
  return typeof window.matchMedia == "function" && window.matchMedia("(pointer: coarse)").matches;
321
343
  }
322
- function S(e) {
323
- return e ? `${J}_${e}` : J;
344
+ function A(e) {
345
+ return e ? `${Z}_${e}` : Z;
324
346
  }
325
- function me(e) {
347
+ function qe(e) {
326
348
  try {
327
- return localStorage.getItem(S(e)) === "1";
349
+ return localStorage.getItem(A(e)) === "1";
328
350
  } catch {
329
351
  return !1;
330
352
  }
331
353
  }
332
- function G(e, t = !0) {
354
+ function tt(e, t = !0) {
333
355
  try {
334
- t ? localStorage.setItem(S(e), "1") : localStorage.removeItem(S(e));
356
+ t ? localStorage.setItem(A(e), "1") : localStorage.removeItem(A(e));
335
357
  } catch {
336
358
  }
337
359
  }
338
- function Z() {
360
+ function et() {
339
361
  const e = typeof crypto < "u" ? crypto : void 0;
340
362
  if (e && typeof e.randomUUID == "function") return e.randomUUID();
341
363
  const t = new Uint8Array(16);
@@ -347,15 +369,15 @@ function Z() {
347
369
  const i = Array.from(t, (o) => o.toString(16).padStart(2, "0")).join("");
348
370
  return `${i.slice(0, 8)}-${i.slice(8, 12)}-${i.slice(12, 16)}-${i.slice(16, 20)}-${i.slice(20)}`;
349
371
  }
350
- function ge() {
372
+ function we() {
351
373
  try {
352
- let e = localStorage.getItem(X);
353
- return e || (e = Z(), localStorage.setItem(X, e)), e;
374
+ let e = localStorage.getItem(G);
375
+ return e || (e = et(), localStorage.setItem(G, e)), e;
354
376
  } catch {
355
- return Z();
377
+ return et();
356
378
  }
357
379
  }
358
- class ve {
380
+ class xe {
359
381
  config;
360
382
  state = "IDLE";
361
383
  feedbackData = {
@@ -373,7 +395,13 @@ class ve {
373
395
  clickY: 0,
374
396
  visible: !1
375
397
  };
376
- feedbackId = null;
398
+ /**
399
+ * This feedback's record id, once its POST answers (null if it failed).
400
+ * The message box and a linked quest open without waiting for it; the
401
+ * PATCHes that need the id wait on this instead.
402
+ */
403
+ feedbackIdPromise = Promise.resolve(null);
404
+ questsPrewarmed = !1;
377
405
  // A quest launched from a button (in place of the message box), if any.
378
406
  activeQuest = null;
379
407
  isMobile = !1;
@@ -473,7 +501,7 @@ class ve {
473
501
  captureScreenshot: t.captureScreenshot ?? !1,
474
502
  annotate: t.annotate ?? !0,
475
503
  annotationColor: t.annotationColor ?? t.colors?.marker ?? "#6365f1",
476
- annotationPalette: t.annotationPalette ?? pe,
504
+ annotationPalette: t.annotationPalette ?? ve,
477
505
  screenshotMethod: t.screenshotMethod ?? "permission",
478
506
  screenshotOptions: {
479
507
  quality: t.screenshotOptions?.quality ?? 0.8,
@@ -500,12 +528,12 @@ class ve {
500
528
  video: t.quests?.video ?? "",
501
529
  // Quest service reuses the feedback API key unless overridden.
502
530
  apiKey: t.quests?.apiKey ?? t.apiKey ?? "",
503
- moduleUrl: t.quests?.moduleUrl ?? le
531
+ moduleUrl: t.quests?.moduleUrl ?? fe
504
532
  }
505
- }, this.boundKeyDown = this.handleKeyDown.bind(this), this.boundResize = this.handleResize.bind(this), this.visitorId = ge(), this.init();
533
+ }, this.boundKeyDown = this.handleKeyDown.bind(this), this.boundResize = this.handleResize.bind(this), this.visitorId = we(), this.init();
506
534
  }
507
535
  applyVars(t) {
508
- Ut(t, this.cssVars);
536
+ Kt(t, this.cssVars);
509
537
  }
510
538
  /**
511
539
  * Announce a message via the shared visually-hidden live regions.
@@ -515,7 +543,7 @@ class ve {
515
543
  */
516
544
  announceMsg(t, i = !1) {
517
545
  const o = this.overlayShadowRoot ?? this.shadowRoot;
518
- o && Qt(o, t, { assertive: i });
546
+ o && Jt(o, t, { assertive: i });
519
547
  }
520
548
  /**
521
549
  * Turn a transient surface into an accessible modal dialog: save the
@@ -523,16 +551,16 @@ class ve {
523
551
  * background. Paired with closeDialogA11y() on every close path.
524
552
  */
525
553
  openDialogA11y(t, i) {
526
- this.dialogTrigger = Jt(), Zt(t, i), this.dialogTrap = Xt(t), this.dialogRestoreInert = ee(t);
554
+ this.dialogTrigger = ee(), oe(t, i), this.dialogTrap = te(t), this.dialogRestoreInert = ne(t);
527
555
  }
528
556
  closeDialogA11y() {
529
- this.dialogTrap?.release(), this.dialogTrap = null, this.dialogRestoreInert && (this.dialogRestoreInert(), this.dialogRestoreInert = null), Gt(this.dialogTrigger), this.dialogTrigger = null;
557
+ this.dialogTrap?.release(), this.dialogTrap = null, this.dialogRestoreInert && (this.dialogRestoreInert(), this.dialogRestoreInert = null), ie(this.dialogTrigger), this.dialogTrigger = null;
530
558
  }
531
559
  clearActiveThumb() {
532
560
  this.activeThumbBtn && (this.activeThumbBtn.setAttribute("aria-pressed", "false"), this.activeThumbBtn = null);
533
561
  }
534
562
  init() {
535
- Vt(), this.cssVars = Ft({
563
+ Nt(), this.cssVars = _t({
536
564
  positiveColor: this.config.colors.positive,
537
565
  negativeColor: this.config.colors.negative,
538
566
  markerColor: this.config.colors.marker,
@@ -541,10 +569,10 @@ class ve {
541
569
  backdropOpacity: this.config.backdropOpacity,
542
570
  fontFamily: this.config.fontFamily,
543
571
  fontSize: this.config.fontSize
544
- }), !this.config.hideDismiss && me(this.config.apiKey) && (this._startDismissed = !0), this.checkMobile(), window.addEventListener("resize", this.boundResize), this.createEmbed(), this.consoleCapture = de((t) => {
572
+ }), !this.config.hideDismiss && qe(this.config.apiKey) && (this._startDismissed = !0), this.checkMobile(), window.addEventListener("resize", this.boundResize), this.createEmbed(), this.consoleCapture = he((t) => {
545
573
  this.feedbackData.consoleErrors = this.consoleCapture?.errors ?? [];
546
- }), this.feedbackData.consoleErrors = this.consoleCapture.errors, this.observeDom(), (this.config.captureVideo && this.videoSupported() || this.config.captureScreenshot) && this.schedulePrewarm(() => {
547
- this.config.captureVideo && this.videoSupported() && this.prewarmVideo(), this.config.captureScreenshot && this.prewarmScreenshot();
574
+ }), this.feedbackData.consoleErrors = this.consoleCapture.errors, this.observeDom(), (this.config.captureVideo && this.videoSupported() || this.config.captureScreenshot || this.linkedQuestIds().length > 0) && this.schedulePrewarm(() => {
575
+ this.config.captureVideo && this.videoSupported() && this.prewarmVideo(), this.config.captureScreenshot && this.prewarmScreenshot(), this.prewarmQuests();
548
576
  });
549
577
  }
550
578
  /**
@@ -563,6 +591,26 @@ class ve {
563
591
  }), this.config.annotate && import("./annotate-D-o8xCV9.js").then((t) => t.d).catch(() => {
564
592
  }));
565
593
  }
594
+ /** Quest ids linked to any button, when quest launching is on. */
595
+ linkedQuestIds() {
596
+ const t = this.config.quests;
597
+ return t.base ? [t.up, t.down, t.video].filter((i) => i) : [];
598
+ }
599
+ /**
600
+ * Load the quests module and fetch every linked quest's definition, so a
601
+ * click opens the quest with no network wait. Both are best-effort: a miss
602
+ * just means the quest loads on click, as it always did.
603
+ */
604
+ prewarmQuests() {
605
+ if (this.questsPrewarmed) return;
606
+ const t = this.linkedQuestIds();
607
+ if (t.length !== 0) {
608
+ this.questsPrewarmed = !0, nt(this.config.quests.moduleUrl).catch(() => {
609
+ });
610
+ for (const i of t)
611
+ me(at(this.config.quests.base, i));
612
+ }
613
+ }
566
614
  /** Run fn when the main thread is idle; cancelled by destroy(). */
567
615
  schedulePrewarm(t) {
568
616
  const i = window, o = () => {
@@ -589,7 +637,7 @@ class ve {
589
637
  }), this.domObserver.observe(document.body, { childList: !0 });
590
638
  }
591
639
  checkMobile() {
592
- this.isMobile = At();
640
+ this.isMobile = Dt();
593
641
  }
594
642
  handleResize() {
595
643
  this.checkMobile();
@@ -599,7 +647,7 @@ class ve {
599
647
  let t = null;
600
648
  this.config.container && (t = document.querySelector(this.config.container)), t ? (t.appendChild(this.shadowHost), this.isUserProvidedContainer = !0, this.config.hideDismiss = !0) : (this.shadowHost.style.position = "fixed", this.shadowHost.style.display = "block", this.shadowHost.style.inset = "0", this.shadowHost.style.pointerEvents = "none", this.shadowHost.style.zIndex = String(this.config.zIndex), document.body.appendChild(this.shadowHost)), this.shadowRoot = this.shadowHost.attachShadow({ mode: "open" });
601
649
  const i = document.createElement("style");
602
- if (i.textContent = Q(), this.shadowRoot.appendChild(i), this.config.css) {
650
+ if (i.textContent = Y(), this.shadowRoot.appendChild(i), this.config.css) {
603
651
  const d = document.createElement("style");
604
652
  d.textContent = this.config.css, this.shadowRoot.appendChild(d);
605
653
  }
@@ -618,33 +666,33 @@ class ve {
618
666
  }), this.buttonsContainer.addEventListener("pointerdown", () => {
619
667
  this.keyboardActivation = !1;
620
668
  });
621
- const r = !!this.config.buttonClass, n = r ? `qaid-btn-structural ${this.config.buttonClass}` : "qaid-btn", l = this.config.text.tooltip || "Feedback for us?", c = document.createElement("div");
669
+ const n = !!this.config.buttonClass, a = n ? `qaid-btn-structural ${this.config.buttonClass}` : "qaid-btn", l = this.config.text.tooltip || "Feedback for us?", c = document.createElement("div");
622
670
  if (c.className = "qaid-tooltip-text", c.textContent = l, this.applyVars(c), this.shadowRoot.appendChild(c), this.tooltipElement = c, this.config.singleButton) {
623
671
  const d = document.createElement("div");
624
672
  d.className = "qaid-tooltip-wrapper";
625
673
  const s = document.createElement("button");
626
- s.type = "button", s.className = r ? `${n} qaid-btn-feedback` : "qaid-btn qaid-btn-feedback", s.setAttribute("aria-label", this.config.text.feedbackLabel), s.innerHTML = this.config.feedbackIcon || Tt, s.addEventListener("click", (u) => this.handleThumbClick("neutral", u.currentTarget, u)), s.addEventListener("mouseenter", () => {
674
+ s.type = "button", s.className = n ? `${a} qaid-btn-feedback` : "qaid-btn qaid-btn-feedback", s.setAttribute("aria-label", this.config.text.feedbackLabel), s.innerHTML = this.config.feedbackIcon || zt, s.addEventListener("click", (u) => this.handleThumbClick("neutral", u.currentTarget, u)), s.addEventListener("mouseenter", () => {
627
675
  this.prewarmTargeting(), this.showTooltip(s);
628
676
  }), s.addEventListener("mouseleave", () => this.hideTooltip()), d.appendChild(s), this.buttonsContainer.appendChild(d);
629
677
  } else if (!this.config.hideThumbs) {
630
678
  const d = document.createElement("div");
631
679
  d.className = "qaid-tooltip-wrapper";
632
680
  const s = document.createElement("button");
633
- s.type = "button", s.className = r ? `${n} qaid-btn-up` : "qaid-btn qaid-btn-up", s.setAttribute("aria-label", this.config.text.positiveLabel), s.innerHTML = this.config.positiveIcon || It, s.addEventListener("click", (f) => this.handleThumbClick("up", f.currentTarget, f)), s.addEventListener("mouseenter", () => {
634
- this.prewarmTargeting(), this.showTooltip(s);
681
+ s.type = "button", s.className = n ? `${a} qaid-btn-up` : "qaid-btn qaid-btn-up", s.setAttribute("aria-label", this.config.text.positiveLabel), s.innerHTML = this.config.positiveIcon || Ht, s.addEventListener("click", (f) => this.handleThumbClick("up", f.currentTarget, f)), s.addEventListener("mouseenter", () => {
682
+ this.prewarmTargeting(), this.prewarmQuests(), this.showTooltip(s);
635
683
  }), s.addEventListener("mouseleave", () => this.hideTooltip()), d.appendChild(s);
636
684
  const u = document.createElement("div");
637
685
  u.className = "qaid-tooltip-wrapper";
638
686
  const h = document.createElement("button");
639
- h.type = "button", h.className = r ? `${n} qaid-btn-down` : "qaid-btn qaid-btn-down", h.setAttribute("aria-label", this.config.text.negativeLabel), h.innerHTML = this.config.negativeIcon || Et, h.addEventListener("click", (f) => this.handleThumbClick("down", f.currentTarget, f)), h.addEventListener("mouseenter", () => {
640
- this.prewarmTargeting(), this.showTooltip(h);
687
+ h.type = "button", h.className = n ? `${a} qaid-btn-down` : "qaid-btn qaid-btn-down", h.setAttribute("aria-label", this.config.text.negativeLabel), h.innerHTML = this.config.negativeIcon || Lt, h.addEventListener("click", (f) => this.handleThumbClick("down", f.currentTarget, f)), h.addEventListener("mouseenter", () => {
688
+ this.prewarmTargeting(), this.prewarmQuests(), this.showTooltip(h);
641
689
  }), h.addEventListener("mouseleave", () => this.hideTooltip()), u.appendChild(h), this.buttonsContainer.appendChild(d), this.buttonsContainer.appendChild(u);
642
690
  }
643
691
  if (this.config.captureVideo && this.videoSupported()) {
644
692
  const d = document.createElement("div");
645
693
  d.className = "qaid-tooltip-wrapper";
646
694
  const s = document.createElement("button");
647
- s.type = "button", s.className = r ? `${n} qaid-btn-record` : "qaid-btn qaid-btn-record", s.setAttribute("aria-label", this.config.text.recordLabel), s.innerHTML = this.config.recordIcon || zt, s.addEventListener("click", () => {
695
+ s.type = "button", s.className = n ? `${a} qaid-btn-record` : "qaid-btn qaid-btn-record", s.setAttribute("aria-label", this.config.text.recordLabel), s.innerHTML = this.config.recordIcon || Mt, s.addEventListener("click", () => {
648
696
  this.ensureRecording().then(
649
697
  (h) => this.config.videoOptions.redaction ? h.startPicking() : h.startRecording()
650
698
  );
@@ -668,7 +716,7 @@ class ve {
668
716
  if (this.overlayShadowRoot) return this.overlayShadowRoot;
669
717
  this.overlayShadowHost = document.createElement("div"), this.overlayShadowHost.setAttribute("data-qaid-embed-overlay", ""), this.overlayShadowHost.style.position = "fixed", this.overlayShadowHost.style.inset = "0", this.overlayShadowHost.style.pointerEvents = "none", this.overlayShadowHost.style.zIndex = String(this.config.zIndex), document.body.appendChild(this.overlayShadowHost), this.overlayShadowRoot = this.overlayShadowHost.attachShadow({ mode: "open" });
670
718
  const t = document.createElement("style");
671
- if (t.textContent = Q(), this.overlayShadowRoot.appendChild(t), this.config.css) {
719
+ if (t.textContent = Y(), this.overlayShadowRoot.appendChild(t), this.config.css) {
672
720
  const i = document.createElement("style");
673
721
  i.textContent = this.config.css, this.overlayShadowRoot.appendChild(i);
674
722
  }
@@ -678,27 +726,27 @@ class ve {
678
726
  showTooltip(t) {
679
727
  const i = this.tooltipElement;
680
728
  i.style.visibility = "hidden", i.classList.add("qaid-tooltip-visible");
681
- const o = t.getBoundingClientRect(), r = i.getBoundingClientRect(), { top: n, left: a } = re(
729
+ const o = t.getBoundingClientRect(), n = i.getBoundingClientRect(), { top: a, left: r } = ce(
682
730
  o,
683
- r,
731
+ n,
684
732
  { width: window.innerWidth, height: window.innerHeight }
685
733
  );
686
- i.style.top = `${n}px`, i.style.left = `${a}px`, i.style.visibility = "visible";
734
+ i.style.top = `${a}px`, i.style.left = `${r}px`, i.style.visibility = "visible";
687
735
  }
688
736
  hideTooltip() {
689
737
  this.tooltipElement.classList.remove("qaid-tooltip-visible");
690
738
  }
691
739
  handleDismiss() {
692
- this.buttonsContainer.classList.add("qaid-dismissed"), G(this.config.apiKey, !0);
740
+ this.buttonsContainer.classList.add("qaid-dismissed"), tt(this.config.apiKey, !0);
693
741
  }
694
742
  handleThumbClick(t, i, o) {
695
- if (this.buttonsContainer?.classList.contains("qaid-incognito") && (this.buttonsContainer.classList.remove("qaid-incognito"), G(this.config.apiKey, !1)), this.prewarmModal(), this.config.skipTargeting || this.config.feedbackMode === "annotate")
743
+ if (this.buttonsContainer?.classList.contains("qaid-incognito") && (this.buttonsContainer.classList.remove("qaid-incognito"), tt(this.config.apiKey, !1)), this.prewarmModal(), this.config.skipTargeting || this.config.feedbackMode === "annotate")
696
744
  this.submitDirectFeedback(t, i);
697
745
  else {
698
746
  this.activeThumbBtn = i, i.setAttribute("aria-pressed", "true");
699
- const r = this.keyboardActivation;
700
- this.keyboardActivation = !1, this.ensureTargeting().then((n) => {
701
- this.destroyed || (r ? n.startKeyboard(t) : n.startPointer(t, o));
747
+ const n = this.keyboardActivation;
748
+ this.keyboardActivation = !1, this.ensureTargeting().then((a) => {
749
+ this.destroyed || (n ? a.startKeyboard(t) : a.startPointer(t, o));
702
750
  });
703
751
  }
704
752
  }
@@ -725,7 +773,7 @@ class ve {
725
773
  * instead of the permission-based Screen Capture API. Explicit "dom" wins;
726
774
  * otherwise DOM is used on touch devices to avoid the getDisplayMedia prompt. */
727
775
  shouldCaptureViaDom() {
728
- return this.config.screenshotMethod === "dom" || be();
776
+ return this.config.screenshotMethod === "dom" || ye();
729
777
  }
730
778
  /**
731
779
  * Open the full-screen annotation editor over the captured screenshot,
@@ -735,25 +783,25 @@ class ve {
735
783
  * enabled while the editor is open and restored on close.
736
784
  */
737
785
  async openAnnotationEditor(t) {
738
- const i = this.ensureOverlayHost(), o = this.overlayShadowHost, r = o.style.pointerEvents;
786
+ const i = this.ensureOverlayHost(), o = this.overlayShadowHost, n = o.style.pointerEvents;
739
787
  o.style.pointerEvents = "auto";
740
788
  try {
741
- const { openAnnotationEditor: n } = await import("./annotate-D-o8xCV9.js").then((a) => a.d);
742
- return await n({
789
+ const { openAnnotationEditor: a } = await import("./annotate-D-o8xCV9.js").then((r) => r.d);
790
+ return await a({
743
791
  dataUrl: t,
744
792
  root: i,
745
793
  quality: this.config.screenshotOptions.quality,
746
794
  color: this.config.annotationColor,
747
795
  palette: this.config.annotationPalette,
748
- applyVars: (a) => this.applyVars(a),
749
- announce: (a, l) => this.announceMsg(a, l),
750
- openDialog: (a, l) => this.openDialogA11y(a, l),
796
+ applyVars: (r) => this.applyVars(r),
797
+ announce: (r, l) => this.announceMsg(r, l),
798
+ openDialog: (r, l) => this.openDialogA11y(r, l),
751
799
  closeDialog: () => this.closeDialogA11y()
752
800
  });
753
- } catch (n) {
754
- return console.error("Annotation editor failed to open:", n), null;
801
+ } catch (a) {
802
+ return console.error("Annotation editor failed to open:", a), null;
755
803
  } finally {
756
- o.style.pointerEvents = r;
804
+ o.style.pointerEvents = n;
757
805
  }
758
806
  }
759
807
  async submitFeedback() {
@@ -761,15 +809,15 @@ class ve {
761
809
  if (this.config.captureScreenshot || this.config.feedbackMode === "annotate")
762
810
  try {
763
811
  if (this.shouldCaptureViaDom()) {
764
- const { captureDomScreenshot: a } = await import("./screenshot-dom-CME7tYRE.js");
765
- t = await a(this.config.screenshotOptions);
812
+ const { captureDomScreenshot: r } = await import("./screenshot-dom-CME7tYRE.js");
813
+ t = await r(this.config.screenshotOptions);
766
814
  } else {
767
- const { captureScreenshot: a } = await import("./screenshot-DYOKg2bS.js");
768
- t = await a(this.config.screenshotOptions);
815
+ const { captureScreenshot: r } = await import("./screenshot-DYOKg2bS.js");
816
+ t = await r(this.config.screenshotOptions);
769
817
  }
770
818
  t && this.announceMsg("Screenshot captured");
771
- } catch (a) {
772
- console.error("Screenshot capture failed:", a), t = null;
819
+ } catch (r) {
820
+ console.error("Screenshot capture failed:", r), t = null;
773
821
  }
774
822
  t && this.config.annotate && (t = await this.openAnnotationEditor(t) ?? t);
775
823
  const o = this.feedbackData.elementSelector ? {
@@ -777,7 +825,7 @@ class ve {
777
825
  y: this.selectedBounds.y,
778
826
  width: this.selectedBounds.width,
779
827
  height: this.selectedBounds.height
780
- } : null, r = {
828
+ } : null, n = {
781
829
  feedbackType: this.feedbackData.feedbackType,
782
830
  pageUrl: window.location.href,
783
831
  apiKey: this.config.apiKey || void 0,
@@ -796,32 +844,37 @@ class ve {
796
844
  elementBounds: o,
797
845
  userAgent: navigator.userAgent
798
846
  };
799
- try {
800
- const a = await fetch(this.config.endpoint, {
801
- method: "POST",
802
- headers: { "Content-Type": "application/json" },
803
- body: JSON.stringify(r)
804
- });
805
- if (a.ok) {
806
- const l = await a.json();
807
- this.feedbackId = l.id, this.announceMsg("Feedback sent");
808
- }
809
- } catch (a) {
810
- console.error("Failed to submit feedback:", a), this.announceMsg("Failed to send feedback", !0);
811
- }
812
- const n = this.feedbackData.feedbackType;
813
- if (n && n !== "neutral" && await this.tryLaunchQuest(n, this.feedbackId)) {
847
+ this.feedbackIdPromise = this.postFeedback(n);
848
+ const a = this.feedbackData.feedbackType;
849
+ if (a && a !== "neutral" && await this.tryLaunchQuest(a, this.feedbackIdPromise)) {
814
850
  this.resetFeedbackUi();
815
851
  return;
816
852
  }
817
853
  this.state = "MODAL_OPEN";
818
854
  try {
819
- const a = await this.ensureModal();
855
+ const r = await this.ensureModal();
820
856
  if (this.destroyed) return;
821
- a.open(), this.overlayShadowHost && (this.overlayShadowHost.style.pointerEvents = "auto");
822
- } catch (a) {
823
- console.error("Failed to open the feedback modal:", a), this.announceMsg("Thank you for your feedback!", !0), this.resetFeedbackUi();
857
+ r.open(), this.overlayShadowHost && (this.overlayShadowHost.style.pointerEvents = "auto");
858
+ } catch (r) {
859
+ console.error("Failed to open the feedback modal:", r), this.announceMsg("Thank you for your feedback!", !0), this.resetFeedbackUi();
860
+ }
861
+ }
862
+ /** POST the feedback. Resolves to the new record's id, or null if it failed. */
863
+ async postFeedback(t) {
864
+ try {
865
+ const i = await fetch(this.config.endpoint, {
866
+ method: "POST",
867
+ headers: { "Content-Type": "application/json" },
868
+ body: JSON.stringify(t)
869
+ });
870
+ if (i.ok) {
871
+ const o = await i.json();
872
+ return this.announceMsg("Feedback sent"), o.id;
873
+ }
874
+ } catch (i) {
875
+ console.error("Failed to submit feedback:", i), this.announceMsg("Failed to send feedback", !0);
824
876
  }
877
+ return null;
825
878
  }
826
879
  /**
827
880
  * Quest id linked to `type`, or "" when quest launching is disabled
@@ -842,7 +895,7 @@ class ve {
842
895
  const o = this.questIdFor(t);
843
896
  if (!o) return !1;
844
897
  try {
845
- return this.activeQuest?.destroy(), this.activeQuest = await fe({
898
+ return this.activeQuest?.destroy(), this.activeQuest = await ge({
846
899
  questId: o,
847
900
  base: this.config.quests.base,
848
901
  apiKey: this.config.quests.apiKey || void 0,
@@ -852,8 +905,8 @@ class ve {
852
905
  this.activeQuest = null;
853
906
  }
854
907
  }), !0;
855
- } catch (r) {
856
- return console.error("Failed to launch quest:", r), this.activeQuest = null, !1;
908
+ } catch (n) {
909
+ return console.error("Failed to launch quest:", n), this.activeQuest = null, !1;
857
910
  }
858
911
  }
859
912
  /**
@@ -862,7 +915,7 @@ class ve {
862
915
  * path (which bypasses the modal entirely).
863
916
  */
864
917
  resetFeedbackUi() {
865
- this.targeting?.hideMarker(), this.overlayShadowHost && (this.overlayShadowHost.style.pointerEvents = "none"), this.state = "IDLE", this.feedbackId = null, this.feedbackData.feedbackType = null, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null, this.selectedBounds.visible = !1;
918
+ this.targeting?.hideMarker(), this.overlayShadowHost && (this.overlayShadowHost.style.pointerEvents = "none"), this.state = "IDLE", this.feedbackIdPromise = Promise.resolve(null), this.feedbackData.feedbackType = null, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null, this.selectedBounds.visible = !1;
866
919
  }
867
920
  /**
868
921
  * Lazily load and instantiate the modal controller. The message modal lives
@@ -871,7 +924,7 @@ class ve {
871
924
  */
872
925
  async ensureModal() {
873
926
  if (!this.modal) {
874
- const { ModalController: t } = await import("./modal-CEfcaIQR.js");
927
+ const { ModalController: t } = await import("./modal-DwwbWQ-F.js");
875
928
  this.modal = new t(this.makeModalHost());
876
929
  }
877
930
  return this.modal;
@@ -901,12 +954,7 @@ class ve {
901
954
  get selectedBounds() {
902
955
  return t.selectedBounds;
903
956
  },
904
- get feedbackId() {
905
- return t.feedbackId;
906
- },
907
- setFeedbackId: (i) => {
908
- t.feedbackId = i;
909
- },
957
+ whenFeedbackId: () => t.feedbackIdPromise,
910
958
  ensureOverlayHost: () => t.ensureOverlayHost(),
911
959
  applyVars: (i) => t.applyVars(i),
912
960
  announceMsg: (i, o) => t.announceMsg(i, o),
@@ -917,7 +965,7 @@ class ve {
917
965
  }
918
966
  /** Warm the modal chunk while the user is targeting, so it opens instantly. */
919
967
  prewarmModal() {
920
- this.modalPrewarmed || (this.modalPrewarmed = !0, import("./modal-CEfcaIQR.js").catch(() => {
968
+ this.modalPrewarmed || (this.modalPrewarmed = !0, import("./modal-DwwbWQ-F.js").catch(() => {
921
969
  }));
922
970
  }
923
971
  /**
@@ -1047,13 +1095,13 @@ class ve {
1047
1095
  const t = window;
1048
1096
  this.prewarmIsTimeout ? clearTimeout(this.prewarmHandle) : t.cancelIdleCallback?.(this.prewarmHandle), this.prewarmHandle = null;
1049
1097
  }
1050
- this.recording?.destroy(), this.recording = null, this.modal?.destroy(), this.modal = null, this.activeQuest?.destroy(), this.activeQuest = null, this.consoleCapture && (this.consoleCapture.restore(), this.consoleCapture = null), window.removeEventListener("resize", this.boundResize), document.removeEventListener("keydown", this.boundKeyDown), document.body.classList.remove("qaid-targeting", "qaid-type-up"), document.body.style.removeProperty("--qaid-positive"), document.body.style.removeProperty("--qaid-negative"), this.shadowHost && (this.shadowHost.remove(), this.shadowHost = null, this.shadowRoot = null), this.overlayShadowHost && (this.overlayShadowHost.remove(), this.overlayShadowHost = null, this.overlayShadowRoot = null), this.buttonsContainer = null, this.dismissBtn = null, this.tooltipElement = null, _t();
1098
+ this.recording?.destroy(), this.recording = null, this.modal?.destroy(), this.modal = null, this.activeQuest?.destroy(), this.activeQuest = null, this.consoleCapture && (this.consoleCapture.restore(), this.consoleCapture = null), window.removeEventListener("resize", this.boundResize), document.removeEventListener("keydown", this.boundKeyDown), document.body.classList.remove("qaid-targeting", "qaid-type-up"), document.body.style.removeProperty("--qaid-positive"), document.body.style.removeProperty("--qaid-negative"), this.shadowHost && (this.shadowHost.remove(), this.shadowHost = null, this.shadowRoot = null), this.overlayShadowHost && (this.overlayShadowHost.remove(), this.overlayShadowHost = null, this.overlayShadowRoot = null), this.buttonsContainer = null, this.dismissBtn = null, this.tooltipElement = null, Qt();
1051
1099
  }
1052
1100
  }
1053
- function it(e) {
1101
+ function rt(e) {
1054
1102
  return document.querySelector(e)?.textContent?.trim() ?? "";
1055
1103
  }
1056
- function ye() {
1104
+ function ke() {
1057
1105
  const e = document.querySelector(
1058
1106
  'script[type="application/json"][data-feedback-config]'
1059
1107
  );
@@ -1062,22 +1110,22 @@ function ye() {
1062
1110
  if (!t) return null;
1063
1111
  try {
1064
1112
  const i = JSON.parse(t);
1065
- return i.cssSelector && !i.css && (i.css = it(i.cssSelector), delete i.cssSelector), i;
1113
+ return i.cssSelector && !i.css && (i.css = rt(i.cssSelector), delete i.cssSelector), i;
1066
1114
  } catch {
1067
1115
  return null;
1068
1116
  }
1069
1117
  }
1070
- function ot(e, t, i) {
1118
+ function st(e, t, i) {
1071
1119
  console.warn(`[thumbs-embed] Ignoring ${e}="${t}": expected ${i}.`);
1072
1120
  }
1073
- function qe(e) {
1121
+ function Se(e) {
1074
1122
  const t = [];
1075
1123
  let i = 0, o = "";
1076
- for (const r of e)
1077
- r === "(" && i++, r === ")" && (i = Math.max(0, i - 1)), r === "," && i === 0 ? (t.push(o.trim()), o = "") : o += r;
1124
+ for (const n of e)
1125
+ n === "(" && i++, n === ")" && (i = Math.max(0, i - 1)), n === "," && i === 0 ? (t.push(o.trim()), o = "") : o += n;
1078
1126
  return t.push(o.trim()), t;
1079
1127
  }
1080
- function xe(e, t) {
1128
+ function Ce(e, t) {
1081
1129
  if (t === null) return;
1082
1130
  const i = t.trim();
1083
1131
  let o = null;
@@ -1088,46 +1136,46 @@ function xe(e, t) {
1088
1136
  o = null;
1089
1137
  }
1090
1138
  else
1091
- o = qe(i);
1092
- if (Array.isArray(o) && o.length > 0 && o.every((r) => typeof r == "string" && r.trim() !== ""))
1093
- return o.map((r) => r.trim());
1094
- ot(e, t, "a JSON array of colours or a comma-separated list");
1139
+ o = Se(i);
1140
+ if (Array.isArray(o) && o.length > 0 && o.every((n) => typeof n == "string" && n.trim() !== ""))
1141
+ return o.map((n) => n.trim());
1142
+ st(e, t, "a JSON array of colours or a comma-separated list");
1095
1143
  }
1096
1144
  function m(e, t) {
1097
1145
  if (t !== null) {
1098
1146
  if (t.trim() === "") {
1099
- ot(e, t, "a non-empty label");
1147
+ st(e, t, "a non-empty label");
1100
1148
  return;
1101
1149
  }
1102
1150
  return t;
1103
1151
  }
1104
1152
  }
1105
- function we(e) {
1153
+ function Ae(e) {
1106
1154
  const t = e.getAttribute("data-endpoint");
1107
1155
  if (!t) return null;
1108
- const i = e.getAttribute("data-position"), o = e.getAttribute("data-zindex"), r = e.getAttribute("data-positive-color"), n = e.getAttribute("data-negative-color"), a = e.getAttribute("data-marker-color"), l = e.getAttribute("data-container"), c = e.getAttribute("data-button-class"), d = e.getAttribute("data-skip-targeting"), s = e.getAttribute("data-hide-confirmation"), u = e.getAttribute("data-single-button"), h = e.getAttribute("data-feedback-mode"), f = e.getAttribute("data-incognito"), at = e.getAttribute("data-button-size"), g = e.getAttribute("data-offset-x"), v = e.getAttribute("data-offset-y"), C = e.getAttribute("data-modal-width"), A = e.getAttribute("data-backdrop-opacity"), nt = e.getAttribute("data-font-family"), T = e.getAttribute("data-font-size"), I = e.getAttribute("data-tooltip"), E = e.getAttribute("data-modal-title"), z = e.getAttribute("data-confirmation-title"), D = e.getAttribute("data-confirmation-message"), H = e.getAttribute("data-confirmation-close"), L = e.getAttribute("data-error-title"), M = e.getAttribute("data-error-message"), B = e.getAttribute("data-modal-subtitle"), O = e.getAttribute("data-placeholder"), R = e.getAttribute("data-submit-button"), P = e.getAttribute("data-skip-button"), rt = e.getAttribute("data-positive-icon"), st = e.getAttribute("data-negative-icon"), dt = e.getAttribute("data-feedback-icon"), F = e.getAttribute("data-feedback-label"), lt = e.getAttribute("data-api-key"), ct = e.getAttribute("data-capture-screenshot"), ut = e.getAttribute("data-annotate"), ht = e.getAttribute("data-annotation-color"), y = e.getAttribute("data-screenshot-quality"), q = e.getAttribute("data-screenshot-max-width"), x = e.getAttribute("data-screenshot-max-height"), ft = e.getAttribute("data-capture-video"), U = e.getAttribute("data-video-redaction"), pt = e.getAttribute("data-hide-thumbs"), bt = e.getAttribute("data-hide-dismiss"), w = e.getAttribute("data-video-max-duration"), mt = e.getAttribute("data-screenshot-method"), gt = e.getAttribute("data-direction"), V = e.getAttribute("data-css-selector"), vt = e.getAttribute("data-css"), _ = m("data-positive-label", e.getAttribute("data-positive-label")), $ = m("data-negative-label", e.getAttribute("data-negative-label")), K = m("data-record-label", e.getAttribute("data-record-label")), N = m("data-dismiss-label", e.getAttribute("data-dismiss-label")), yt = xe(
1156
+ const i = e.getAttribute("data-position"), o = e.getAttribute("data-zindex"), n = e.getAttribute("data-positive-color"), a = e.getAttribute("data-negative-color"), r = e.getAttribute("data-marker-color"), l = e.getAttribute("data-container"), c = e.getAttribute("data-button-class"), d = e.getAttribute("data-skip-targeting"), s = e.getAttribute("data-hide-confirmation"), u = e.getAttribute("data-single-button"), h = e.getAttribute("data-feedback-mode"), f = e.getAttribute("data-incognito"), dt = e.getAttribute("data-button-size"), g = e.getAttribute("data-offset-x"), v = e.getAttribute("data-offset-y"), T = e.getAttribute("data-modal-width"), I = e.getAttribute("data-backdrop-opacity"), lt = e.getAttribute("data-font-family"), E = e.getAttribute("data-font-size"), D = e.getAttribute("data-tooltip"), z = e.getAttribute("data-modal-title"), H = e.getAttribute("data-confirmation-title"), L = e.getAttribute("data-confirmation-message"), M = e.getAttribute("data-confirmation-close"), B = e.getAttribute("data-error-title"), O = e.getAttribute("data-error-message"), P = e.getAttribute("data-modal-subtitle"), R = e.getAttribute("data-placeholder"), F = e.getAttribute("data-submit-button"), U = e.getAttribute("data-skip-button"), ct = e.getAttribute("data-positive-icon"), ut = e.getAttribute("data-negative-icon"), ht = e.getAttribute("data-feedback-icon"), V = e.getAttribute("data-feedback-label"), ft = e.getAttribute("data-api-key"), pt = e.getAttribute("data-capture-screenshot"), bt = e.getAttribute("data-annotate"), mt = e.getAttribute("data-annotation-color"), y = e.getAttribute("data-screenshot-quality"), q = e.getAttribute("data-screenshot-max-width"), w = e.getAttribute("data-screenshot-max-height"), gt = e.getAttribute("data-capture-video"), $ = e.getAttribute("data-video-redaction"), vt = e.getAttribute("data-hide-thumbs"), yt = e.getAttribute("data-hide-dismiss"), x = e.getAttribute("data-video-max-duration"), qt = e.getAttribute("data-screenshot-method"), wt = e.getAttribute("data-direction"), _ = e.getAttribute("data-css-selector"), xt = e.getAttribute("data-css"), K = m("data-positive-label", e.getAttribute("data-positive-label")), N = m("data-negative-label", e.getAttribute("data-negative-label")), Q = m("data-record-label", e.getAttribute("data-record-label")), j = m("data-dismiss-label", e.getAttribute("data-dismiss-label")), kt = Ce(
1109
1157
  "data-annotation-palette",
1110
1158
  e.getAttribute("data-annotation-palette")
1111
- ), qt = e.getAttribute("data-record-icon"), j = e.getAttribute("data-quest-base"), xt = e.getAttribute("data-quest-up"), wt = e.getAttribute("data-quest-down"), kt = e.getAttribute("data-quest-video"), St = e.getAttribute("data-quest-api-key"), Ct = e.getAttribute("data-quest-module-url");
1159
+ ), St = e.getAttribute("data-record-icon"), W = e.getAttribute("data-quest-base"), Ct = e.getAttribute("data-quest-up"), At = e.getAttribute("data-quest-down"), Tt = e.getAttribute("data-quest-video"), It = e.getAttribute("data-quest-api-key"), Et = e.getAttribute("data-quest-module-url");
1112
1160
  return {
1113
1161
  endpoint: t,
1114
1162
  // Inline CSS wins over a selector, as `css` wins over `cssSelector` in
1115
1163
  // the JSON block.
1116
- css: vt || (V ? it(V) : void 0),
1117
- apiKey: lt ?? void 0,
1118
- captureScreenshot: ct === "true" ? !0 : void 0,
1164
+ css: xt || (_ ? rt(_) : void 0),
1165
+ apiKey: ft ?? void 0,
1166
+ captureScreenshot: pt === "true" ? !0 : void 0,
1119
1167
  // Annotation is on by default; only an explicit "false" disables it.
1120
- annotate: ut === "false" ? !1 : void 0,
1121
- annotationColor: ht ?? void 0,
1122
- annotationPalette: yt,
1123
- screenshotOptions: y || q || x ? {
1168
+ annotate: bt === "false" ? !1 : void 0,
1169
+ annotationColor: mt ?? void 0,
1170
+ annotationPalette: kt,
1171
+ screenshotOptions: y || q || w ? {
1124
1172
  quality: y ? parseFloat(y) : void 0,
1125
1173
  maxWidth: q ? parseInt(q, 10) : void 0,
1126
- maxHeight: x ? parseInt(x, 10) : void 0
1174
+ maxHeight: w ? parseInt(w, 10) : void 0
1127
1175
  } : void 0,
1128
1176
  container: l ?? void 0,
1129
1177
  buttonClass: c ?? void 0,
1130
- direction: gt ?? void 0,
1178
+ direction: wt ?? void 0,
1131
1179
  position: i ?? void 0,
1132
1180
  zIndex: o ? parseInt(o, 10) : void 0,
1133
1181
  skipTargeting: d === "true" ? !0 : void 0,
@@ -1135,71 +1183,71 @@ function we(e) {
1135
1183
  singleButton: u === "true" ? !0 : void 0,
1136
1184
  feedbackMode: h ?? void 0,
1137
1185
  incognito: f === "true" ? !0 : void 0,
1138
- buttonSize: at ?? void 0,
1186
+ buttonSize: dt ?? void 0,
1139
1187
  offset: g || v ? {
1140
1188
  x: g ? parseInt(g, 10) : void 0,
1141
1189
  y: v ? parseInt(v, 10) : void 0
1142
1190
  } : void 0,
1143
- modalWidth: C ? parseInt(C, 10) : void 0,
1144
- backdropOpacity: A ? parseFloat(A) : void 0,
1145
- fontFamily: nt ?? void 0,
1146
- fontSize: T ? parseInt(T, 10) : void 0,
1191
+ modalWidth: T ? parseInt(T, 10) : void 0,
1192
+ backdropOpacity: I ? parseFloat(I) : void 0,
1193
+ fontFamily: lt ?? void 0,
1194
+ fontSize: E ? parseInt(E, 10) : void 0,
1147
1195
  colors: {
1148
- positive: r ?? void 0,
1149
- negative: n ?? void 0,
1150
- marker: a ?? void 0
1196
+ positive: n ?? void 0,
1197
+ negative: a ?? void 0,
1198
+ marker: r ?? void 0
1151
1199
  },
1152
- text: I || E || B || O || R || P || F || z || D || H || L || M || _ || $ || K || N ? {
1153
- tooltip: I ?? void 0,
1154
- modalTitle: E ?? void 0,
1155
- modalSubtitle: B ?? void 0,
1156
- placeholder: O ?? void 0,
1157
- submitButton: R ?? void 0,
1158
- skipButton: P ?? void 0,
1159
- feedbackLabel: F ?? void 0,
1160
- confirmationTitle: z ?? void 0,
1161
- confirmationMessage: D ?? void 0,
1162
- confirmationClose: H ?? void 0,
1163
- errorTitle: L ?? void 0,
1164
- errorMessage: M ?? void 0,
1165
- positiveLabel: _,
1166
- negativeLabel: $,
1167
- recordLabel: K,
1168
- dismissLabel: N
1200
+ text: D || z || P || R || F || U || V || H || L || M || B || O || K || N || Q || j ? {
1201
+ tooltip: D ?? void 0,
1202
+ modalTitle: z ?? void 0,
1203
+ modalSubtitle: P ?? void 0,
1204
+ placeholder: R ?? void 0,
1205
+ submitButton: F ?? void 0,
1206
+ skipButton: U ?? void 0,
1207
+ feedbackLabel: V ?? void 0,
1208
+ confirmationTitle: H ?? void 0,
1209
+ confirmationMessage: L ?? void 0,
1210
+ confirmationClose: M ?? void 0,
1211
+ errorTitle: B ?? void 0,
1212
+ errorMessage: O ?? void 0,
1213
+ positiveLabel: K,
1214
+ negativeLabel: N,
1215
+ recordLabel: Q,
1216
+ dismissLabel: j
1169
1217
  } : void 0,
1170
- positiveIcon: rt ?? void 0,
1171
- recordIcon: qt ?? void 0,
1172
- negativeIcon: st ?? void 0,
1173
- feedbackIcon: dt ?? void 0,
1174
- screenshotMethod: mt ?? void 0,
1175
- captureVideo: ft === "true" ? !0 : void 0,
1176
- hideThumbs: pt === "true" ? !0 : void 0,
1177
- hideDismiss: bt === "true" ? !0 : void 0,
1178
- videoOptions: w || U ? {
1179
- maxDuration: w ? parseInt(w, 10) : void 0,
1180
- redaction: U === "true" ? !0 : void 0
1218
+ positiveIcon: ct ?? void 0,
1219
+ recordIcon: St ?? void 0,
1220
+ negativeIcon: ut ?? void 0,
1221
+ feedbackIcon: ht ?? void 0,
1222
+ screenshotMethod: qt ?? void 0,
1223
+ captureVideo: gt === "true" ? !0 : void 0,
1224
+ hideThumbs: vt === "true" ? !0 : void 0,
1225
+ hideDismiss: yt === "true" ? !0 : void 0,
1226
+ videoOptions: x || $ ? {
1227
+ maxDuration: x ? parseInt(x, 10) : void 0,
1228
+ redaction: $ === "true" ? !0 : void 0
1181
1229
  } : void 0,
1182
- quests: j ? {
1183
- base: j,
1184
- up: xt ?? void 0,
1185
- down: wt ?? void 0,
1186
- video: kt ?? void 0,
1187
- apiKey: St ?? void 0,
1188
- moduleUrl: Ct ?? void 0
1230
+ quests: W ? {
1231
+ base: W,
1232
+ up: Ct ?? void 0,
1233
+ down: At ?? void 0,
1234
+ video: Tt ?? void 0,
1235
+ apiKey: It ?? void 0,
1236
+ moduleUrl: Et ?? void 0
1189
1237
  } : void 0
1190
1238
  };
1191
1239
  }
1192
- function ke() {
1240
+ function Te() {
1193
1241
  if (typeof document > "u") return;
1194
1242
  const e = () => {
1195
- const t = document.currentScript ?? document.querySelector("script[data-endpoint]"), i = ye() ?? (t ? we(t) : null);
1196
- i?.endpoint && new ve(i);
1243
+ const t = document.currentScript ?? document.querySelector("script[data-endpoint]"), i = ke() ?? (t ? Ae(t) : null);
1244
+ i?.endpoint && new xe(i);
1197
1245
  };
1198
1246
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : e();
1199
1247
  }
1200
- ke();
1248
+ Te();
1201
1249
  export {
1202
- ve as Q,
1203
- Ce as c
1250
+ xe as Q,
1251
+ Ee as c
1204
1252
  };
1205
- //# sourceMappingURL=loader-DepVS4i5.js.map
1253
+ //# sourceMappingURL=loader-BVNyi56k.js.map