@qaiddev/thumbs-embed 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +99 -86
- package/dist/qaid.js +474 -418
- package/dist/qaid.js.map +1 -1
- package/dist/qaid.umd.cjs +8 -11
- package/dist/qaid.umd.cjs.map +1 -1
- package/package.json +2 -2
package/dist/qaid.js
CHANGED
|
@@ -1,291 +1,313 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var h = (
|
|
1
|
+
var Q = Object.defineProperty;
|
|
2
|
+
var tt = (e, t, o) => t in e ? Q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var h = (e, t, o) => tt(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
4
|
const T = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
5
5
|
<path stroke-linecap="round" stroke-linejoin="round" d="M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5"/>
|
|
6
|
-
</svg>`,
|
|
6
|
+
</svg>`, I = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
7
7
|
<path stroke-linecap="round" stroke-linejoin="round" d="M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.737 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.095c.5 0 .905-.405.905-.905 0-.714.211-1.412.608-2.006L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5"/>
|
|
8
|
-
</svg>`,
|
|
8
|
+
</svg>`, et = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
9
9
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 10.5l4.72-4.72a.75.75 0 011.28.53v11.38a.75.75 0 01-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 002.25-2.25v-9a2.25 2.25 0 00-2.25-2.25h-9A2.25 2.25 0 002.25 7.5v9a2.25 2.25 0 002.25 2.25z"/>
|
|
10
|
-
</svg>`, et = "body.qaid-targeting,body.qaid-targeting *{cursor:none!important}.qaid-widget,.qaid-widget *,.qaid-modal-container,.qaid-modal-container *{cursor:pointer!important}.qaid-widget.qaid-auto-container{position:fixed;z-index:50;display:flex;gap:.5rem}.qaid-widget.qaid-auto-container.qaid-bottom-right{bottom:1rem;right:1rem}.qaid-widget.qaid-auto-container.qaid-bottom-left{bottom:1rem;left:1rem}.qaid-widget.qaid-auto-container.qaid-top-right{top:1rem;right:1rem}.qaid-widget.qaid-auto-container.qaid-top-left{top:1rem;left:1rem}.qaid-widget.qaid-incognito{opacity:0;transition:opacity .2s ease-in-out}.qaid-widget.qaid-incognito:hover{opacity:1}button.qaid-btn-structural{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.qaid-icon{width:24px;height: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-tooltip-wrapper{position:relative}.qaid-tooltip-text{position:fixed;padding:.5rem .75rem;background:#1f2937;color:#fff;font-size:1rem;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;top:0;right:0;bottom:0;left:0;z-index:40;pointer-events:none}.qaid-capture-layer{position:fixed;top:0;right:0;bottom:0;left:0;cursor:crosshair;pointer-events:auto;z-index:9999}.qaid-banner{position:fixed;top:0;left:0;right:0;padding:.75rem 1rem;text-align:center;z-index:10000;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px);animation:qaid-slideDown .2s ease-out}.qaid-banner-up{background:color-mix(in srgb,var(--qaid-positive) 90%,transparent);color:#fff}.qaid-banner-down{background:color-mix(in srgb,var(--qaid-negative) 90%,transparent);color:#fff}.qaid-banner-text{font-weight:500}.qaid-banner-hint{margin-left:.5rem;opacity:.75}@keyframes qaid-slideDown{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.qaid-vignette{position:fixed;top:0;right:0;bottom:0;left: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-scope{position:fixed;width:80px;height:80px;pointer-events:none;z-index:43;transform:translate(-50%,-50%)}.qaid-scope-ring{position:absolute;top:10px;right:10px;bottom:10px;left: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;top:20px;right:20px;bottom:20px;left: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-highlight{outline:3px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent)!important;outline-offset:2px!important;background-color:color-mix(in srgb,var(--qaid-negative) 10%,transparent)!important;transition:outline .1s ease,background-color .1s ease}body.qaid-targeting.qaid-type-up .qaid-highlight{outline-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent)!important;background-color:color-mix(in srgb,var(--qaid-positive) 10%,transparent)!important}.qaid-selected-marker{position:fixed;border:3px solid var(--qaid-marker, #6366f1);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;top:0;right:0;bottom:0;left: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;-moz-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-modal-header-text{flex:1;min-width:0}.qaid-modal-title{font-size:1.125rem;font-weight:700;margin:0 0 .25rem;color:light-dark(#1f2937,#f9fafb)}.qaid-modal-subtitle{color:light-dark(#6b7280,#9ca3af);margin:0;font-size:.875rem}.qaid-textarea{width:100%;height:6rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:1rem;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:.875rem;font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;-moz-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;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:.875rem;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:.75rem;font-weight:600;cursor:pointer;transition:background-color .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none}button.qaid-recording-stop:hover{background:#b91c1c}.qaid-video-preview{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;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:calc(100vw - 32px);max-height:calc(100vh - 32px);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:1.125rem;font-weight:700;margin:0 0 1rem;color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box video{width:100%;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:.875rem;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-preview-actions{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-video-btn{padding:.5rem 1rem;border:none;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;-moz-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:.875rem;color:light-dark(#6b7280,#9ca3af)}";
|
|
11
|
-
let
|
|
12
|
-
const
|
|
10
|
+
</svg>`, it = "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}button.qaid-btn-structural{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.qaid-icon{width:24px;height: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:1rem;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;top:0;right:0;bottom:0;left:0;z-index:40;pointer-events:none}.qaid-capture-layer{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9999}@keyframes qaid-slideDown{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.qaid-vignette{position:fixed;top:0;right:0;bottom:0;left: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;top:10px;right:10px;bottom:10px;left: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;top:20px;right:20px;bottom:20px;left: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, #6366f1);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;top:0;right:0;bottom:0;left: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;-moz-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-modal-header-text{flex:1;min-width:0}.qaid-modal-title{font-size:1.125rem;font-weight:700;margin:0 0 .25rem;color:light-dark(#1f2937,#f9fafb)}.qaid-modal-subtitle{color:light-dark(#6b7280,#9ca3af);margin:0;font-size:.875rem}.qaid-textarea{width:100%;height:6rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:1rem;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:.875rem;font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;-moz-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;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:.875rem;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:.75rem;font-weight:600;cursor:pointer;transition:background-color .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none}button.qaid-recording-stop:hover{background:#b91c1c}.qaid-video-preview{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;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:calc(100vw - 32px);max-height:calc(100vh - 32px);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:1.125rem;font-weight:700;margin:0 0 1rem;color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box video{width:100%;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:.875rem;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-preview-actions{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-video-btn{padding:.5rem 1rem;border:none;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;-moz-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:.875rem;color:light-dark(#6b7280,#9ca3af)}", ot = "body.qaid-targeting,body.qaid-targeting *{cursor:none!important}";
|
|
11
|
+
let x = 0;
|
|
12
|
+
const nt = "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 svg{width:var(--qaid-icon-size);height:var(--qaid-icon-size)}", at = {
|
|
13
13
|
small: 36,
|
|
14
14
|
medium: 48,
|
|
15
15
|
large: 64
|
|
16
|
-
},
|
|
16
|
+
}, st = {
|
|
17
17
|
small: 18,
|
|
18
18
|
medium: 24,
|
|
19
19
|
large: 32
|
|
20
20
|
};
|
|
21
|
-
function
|
|
22
|
-
const [
|
|
23
|
-
return 0.2126 *
|
|
21
|
+
function rt(e, t, o) {
|
|
22
|
+
const [i, n, a] = [e, t, o].map((s) => (s = s / 255, s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4)));
|
|
23
|
+
return 0.2126 * i + 0.7152 * n + 0.0722 * a;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
if (
|
|
27
|
-
const
|
|
25
|
+
function dt(e) {
|
|
26
|
+
if (e.startsWith("#")) {
|
|
27
|
+
const o = e.slice(1), i = o.length === 3 ? o.split("").map((a) => a + a).join("") : o, n = parseInt(i, 16);
|
|
28
28
|
return {
|
|
29
29
|
r: n >> 16 & 255,
|
|
30
30
|
g: n >> 8 & 255,
|
|
31
31
|
b: n & 255
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
const t =
|
|
34
|
+
const t = e.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
|
|
35
35
|
return t ? {
|
|
36
36
|
r: parseInt(t[1]),
|
|
37
37
|
g: parseInt(t[2]),
|
|
38
38
|
b: parseInt(t[3])
|
|
39
39
|
} : null;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const t =
|
|
43
|
-
return t &&
|
|
41
|
+
function ct(e) {
|
|
42
|
+
const t = dt(e);
|
|
43
|
+
return t && rt(t.r, t.g, t.b) > 0.4 ? "black" : "white";
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
if (L) return;
|
|
47
|
-
L = !0;
|
|
45
|
+
function lt(e = {}) {
|
|
48
46
|
const {
|
|
49
47
|
positiveColor: t = "rgb(0, 200, 83)",
|
|
50
|
-
negativeColor:
|
|
51
|
-
markerColor:
|
|
52
|
-
// skipButtonStyles kept for backwards compatibility but no longer used
|
|
48
|
+
negativeColor: o = "rgb(255, 0, 0)",
|
|
49
|
+
markerColor: i = "#6366f1",
|
|
53
50
|
buttonSize: n = "medium",
|
|
54
51
|
modalWidth: a = 400,
|
|
55
|
-
backdropOpacity:
|
|
52
|
+
backdropOpacity: s = 0.3,
|
|
56
53
|
fontFamily: l = "system-ui, -apple-system, sans-serif",
|
|
57
54
|
fontSize: d = 16
|
|
58
|
-
} =
|
|
59
|
-
|
|
55
|
+
} = e, r = at[n], c = st[n], u = ct(i);
|
|
56
|
+
return {
|
|
57
|
+
"--qaid-positive": t,
|
|
58
|
+
"--qaid-negative": o,
|
|
59
|
+
"--qaid-marker": i,
|
|
60
|
+
"--qaid-marker-text": u,
|
|
61
|
+
"--qaid-btn-size": `${r}px`,
|
|
62
|
+
"--qaid-icon-size": `${c}px`,
|
|
63
|
+
"--qaid-modal-width": `${a}px`,
|
|
64
|
+
"--qaid-backdrop-opacity": String(s),
|
|
65
|
+
"--qaid-font-family": l,
|
|
66
|
+
"--qaid-font-size": `${d}px`
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function ht(e, t) {
|
|
70
|
+
for (const [o, i] of Object.entries(t))
|
|
71
|
+
e.style.setProperty(o, i);
|
|
72
|
+
}
|
|
73
|
+
function B() {
|
|
74
|
+
return it + nt;
|
|
60
75
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
|
|
76
|
+
function ut() {
|
|
77
|
+
if (x++, x > 1) return;
|
|
78
|
+
const e = document.createElement("style");
|
|
79
|
+
e.id = "qaid-styles", e.textContent = ot, document.head.appendChild(e);
|
|
64
80
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
81
|
+
function pt() {
|
|
82
|
+
if (!(x <= 0) && (x--, x === 0)) {
|
|
83
|
+
const e = document.getElementById("qaid-styles");
|
|
84
|
+
e && e.remove();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const mt = ["data-comp", "data-qa", "data-testid", "data-id"];
|
|
88
|
+
function U(e, t = document.body) {
|
|
89
|
+
let o = e;
|
|
90
|
+
for (; o && o !== t; ) {
|
|
91
|
+
for (const i of mt) {
|
|
92
|
+
const n = o.getAttribute(i);
|
|
71
93
|
if (n)
|
|
72
|
-
return `${
|
|
94
|
+
return `${i}="${n}"`;
|
|
73
95
|
}
|
|
74
|
-
|
|
96
|
+
o = o.parentElement;
|
|
75
97
|
}
|
|
76
98
|
return null;
|
|
77
99
|
}
|
|
78
|
-
function
|
|
79
|
-
var
|
|
80
|
-
const
|
|
81
|
-
return
|
|
100
|
+
function ft(e, t = 100) {
|
|
101
|
+
var i;
|
|
102
|
+
const o = ((i = e.textContent) == null ? void 0 : i.trim().slice(0, t)) || "";
|
|
103
|
+
return o.length === t ? o + "..." : o;
|
|
82
104
|
}
|
|
83
|
-
function
|
|
84
|
-
let t = 1,
|
|
85
|
-
for (;
|
|
86
|
-
t++,
|
|
105
|
+
function gt(e) {
|
|
106
|
+
let t = 1, o = e.previousElementSibling;
|
|
107
|
+
for (; o; )
|
|
108
|
+
t++, o = o.previousElementSibling;
|
|
87
109
|
return t;
|
|
88
110
|
}
|
|
89
|
-
function
|
|
111
|
+
function bt(e) {
|
|
90
112
|
const t = [];
|
|
91
|
-
let
|
|
92
|
-
for (;
|
|
93
|
-
const
|
|
94
|
-
t.unshift(`${
|
|
113
|
+
let o = e;
|
|
114
|
+
for (; o && o !== document.body && o !== document.documentElement; ) {
|
|
115
|
+
const i = o.tagName.toLowerCase(), n = gt(o);
|
|
116
|
+
t.unshift(`${i}:nth-child(${n})`), o = o.parentElement;
|
|
95
117
|
}
|
|
96
118
|
return t.length > 0 ? `body > ${t.join(" > ")}` : "body";
|
|
97
119
|
}
|
|
98
|
-
function
|
|
99
|
-
return
|
|
120
|
+
function vt(e) {
|
|
121
|
+
return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
|
|
100
122
|
}
|
|
101
|
-
function
|
|
102
|
-
const t =
|
|
103
|
-
return t ? `[${t}]` :
|
|
123
|
+
function yt(e) {
|
|
124
|
+
const t = U(e);
|
|
125
|
+
return t ? `[${t}]` : e.id ? `#${vt(e.id)}` : bt(e);
|
|
104
126
|
}
|
|
105
|
-
function
|
|
106
|
-
const t =
|
|
107
|
-
return { selector:
|
|
127
|
+
function wt(e) {
|
|
128
|
+
const t = ft(e), o = U(e);
|
|
129
|
+
return { selector: yt(e), text: t, dataAttr: o };
|
|
108
130
|
}
|
|
109
|
-
const
|
|
131
|
+
const F = {
|
|
110
132
|
width: 400,
|
|
111
133
|
height: 280,
|
|
112
134
|
arrowHeight: 12,
|
|
113
135
|
gap: 8,
|
|
114
136
|
viewportPadding: 16
|
|
115
137
|
};
|
|
116
|
-
function
|
|
117
|
-
const a =
|
|
118
|
-
if (
|
|
138
|
+
function xt(e, t, o, i, n) {
|
|
139
|
+
const a = e.y, s = t - (e.y + e.height);
|
|
140
|
+
if (s >= o + i)
|
|
119
141
|
return {
|
|
120
|
-
top:
|
|
142
|
+
top: e.y + e.height + i,
|
|
121
143
|
position: "below"
|
|
122
144
|
};
|
|
123
|
-
if (a >=
|
|
145
|
+
if (a >= o + i)
|
|
124
146
|
return {
|
|
125
|
-
top:
|
|
147
|
+
top: e.y - o - i,
|
|
126
148
|
position: "above"
|
|
127
149
|
};
|
|
128
|
-
const l =
|
|
150
|
+
const l = s > a ? "below" : "above";
|
|
129
151
|
let d;
|
|
130
152
|
return l === "below" ? d = Math.min(
|
|
131
|
-
|
|
132
|
-
t -
|
|
133
|
-
) : d = Math.max(n,
|
|
153
|
+
e.y + e.height + i,
|
|
154
|
+
t - o - n
|
|
155
|
+
) : d = Math.max(n, e.y - o - i), { top: d, position: l };
|
|
134
156
|
}
|
|
135
|
-
function
|
|
136
|
-
let a =
|
|
137
|
-
return a = Math.max(
|
|
157
|
+
function qt(e, t, o, i) {
|
|
158
|
+
let a = e.x + e.width / 2 - o / 2;
|
|
159
|
+
return a = Math.max(i, Math.min(a, t - o - i)), a;
|
|
138
160
|
}
|
|
139
|
-
function
|
|
140
|
-
const
|
|
141
|
-
return Math.max(
|
|
161
|
+
function kt(e, t, o, i = 24, n = 24) {
|
|
162
|
+
const s = e.clickX - t - n / 2;
|
|
163
|
+
return Math.max(i, Math.min(s, o - i - n / 2));
|
|
142
164
|
}
|
|
143
|
-
function
|
|
144
|
-
const n =
|
|
145
|
-
i,
|
|
165
|
+
function Ct(e, t, o, i = F) {
|
|
166
|
+
const n = i.height + i.arrowHeight, a = xt(
|
|
146
167
|
e,
|
|
168
|
+
o,
|
|
147
169
|
n,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
),
|
|
151
|
-
|
|
170
|
+
i.gap,
|
|
171
|
+
i.viewportPadding
|
|
172
|
+
), s = qt(
|
|
173
|
+
e,
|
|
152
174
|
t,
|
|
153
|
-
|
|
154
|
-
|
|
175
|
+
i.width,
|
|
176
|
+
i.viewportPadding
|
|
155
177
|
);
|
|
156
178
|
return {
|
|
157
179
|
top: a.top,
|
|
158
|
-
left:
|
|
180
|
+
left: s,
|
|
159
181
|
position: a.position
|
|
160
182
|
};
|
|
161
183
|
}
|
|
162
|
-
function
|
|
163
|
-
const n =
|
|
164
|
-
|
|
184
|
+
function St(e, t, o, i = F) {
|
|
185
|
+
const n = Ct(e, t, o, i), a = kt(
|
|
186
|
+
e,
|
|
165
187
|
n.left,
|
|
166
|
-
|
|
188
|
+
i.width
|
|
167
189
|
);
|
|
168
190
|
return {
|
|
169
191
|
modal: n,
|
|
170
192
|
arrow: { left: a }
|
|
171
193
|
};
|
|
172
194
|
}
|
|
173
|
-
const
|
|
174
|
-
function
|
|
175
|
-
const t = [],
|
|
195
|
+
const Et = 20;
|
|
196
|
+
function Tt(e) {
|
|
197
|
+
const t = [], o = console.error, i = console.warn, n = console.log, a = (s, l) => {
|
|
176
198
|
const d = {
|
|
177
|
-
message: l.map((
|
|
199
|
+
message: l.map((r) => String(r)).join(" "),
|
|
178
200
|
timestamp: Date.now(),
|
|
179
|
-
level:
|
|
201
|
+
level: s
|
|
180
202
|
};
|
|
181
|
-
t.length >=
|
|
203
|
+
t.length >= Et && t.shift(), t.push(d), e && e(d);
|
|
182
204
|
};
|
|
183
|
-
return console.error = function(...
|
|
184
|
-
a("error",
|
|
185
|
-
}, console.warn = function(...
|
|
186
|
-
a("warn",
|
|
187
|
-
}, console.log = function(...
|
|
188
|
-
a("log",
|
|
205
|
+
return console.error = function(...s) {
|
|
206
|
+
a("error", s), o.apply(console, s);
|
|
207
|
+
}, console.warn = function(...s) {
|
|
208
|
+
a("warn", s), i.apply(console, s);
|
|
209
|
+
}, console.log = function(...s) {
|
|
210
|
+
a("log", s), n.apply(console, s);
|
|
189
211
|
}, {
|
|
190
212
|
errors: t,
|
|
191
213
|
restore: () => {
|
|
192
|
-
console.error =
|
|
214
|
+
console.error = o, console.warn = i, console.log = n;
|
|
193
215
|
}
|
|
194
216
|
};
|
|
195
217
|
}
|
|
196
|
-
const
|
|
197
|
-
function
|
|
198
|
-
if (
|
|
199
|
-
const t = typeof
|
|
218
|
+
const It = 20, P = 4096;
|
|
219
|
+
function k(e) {
|
|
220
|
+
if (e == null) return;
|
|
221
|
+
const t = typeof e == "string" ? e : JSON.stringify(e);
|
|
200
222
|
return t.length > P ? t.slice(0, P) + "…[truncated]" : t;
|
|
201
223
|
}
|
|
202
|
-
function
|
|
203
|
-
|
|
224
|
+
function A(e, t) {
|
|
225
|
+
e.length >= It && e.shift(), e.push(t);
|
|
204
226
|
}
|
|
205
|
-
async function
|
|
227
|
+
async function Lt(e) {
|
|
206
228
|
try {
|
|
207
|
-
const t = await
|
|
208
|
-
return
|
|
229
|
+
const t = await e.clone().text();
|
|
230
|
+
return k(t);
|
|
209
231
|
} catch {
|
|
210
232
|
return;
|
|
211
233
|
}
|
|
212
234
|
}
|
|
213
|
-
function
|
|
214
|
-
const
|
|
235
|
+
function Rt() {
|
|
236
|
+
const e = [], t = window.fetch;
|
|
215
237
|
window.fetch = async function(n, a) {
|
|
216
|
-
const
|
|
238
|
+
const s = typeof n == "string" ? n : n instanceof URL ? n.toString() : n.url, l = (a == null ? void 0 : a.method) ?? (typeof n == "object" && "method" in n ? n.method : "GET");
|
|
217
239
|
let d;
|
|
218
|
-
a != null && a.body && (d =
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
221
|
-
const c = await
|
|
222
|
-
|
|
223
|
-
url:
|
|
240
|
+
a != null && a.body && (d = k(a.body));
|
|
241
|
+
const r = await t.apply(window, [n, a]);
|
|
242
|
+
if (r.status >= 400) {
|
|
243
|
+
const c = await Lt(r);
|
|
244
|
+
A(e, {
|
|
245
|
+
url: s,
|
|
224
246
|
method: l.toUpperCase(),
|
|
225
|
-
status:
|
|
226
|
-
statusText:
|
|
247
|
+
status: r.status,
|
|
248
|
+
statusText: r.statusText,
|
|
227
249
|
requestBody: d,
|
|
228
250
|
responseBody: c,
|
|
229
251
|
timestamp: Date.now()
|
|
230
252
|
});
|
|
231
253
|
}
|
|
232
|
-
return
|
|
254
|
+
return r;
|
|
233
255
|
};
|
|
234
|
-
const
|
|
235
|
-
return XMLHttpRequest.prototype.open = function(n, a, ...
|
|
236
|
-
return this._qaid_method = n, this._qaid_url = typeof a == "string" ? a : a.toString(),
|
|
256
|
+
const o = XMLHttpRequest.prototype.open, i = XMLHttpRequest.prototype.send;
|
|
257
|
+
return XMLHttpRequest.prototype.open = function(n, a, ...s) {
|
|
258
|
+
return this._qaid_method = n, this._qaid_url = typeof a == "string" ? a : a.toString(), o.apply(this, [n, a, ...s]);
|
|
237
259
|
}, XMLHttpRequest.prototype.send = function(n) {
|
|
238
|
-
const a = this,
|
|
260
|
+
const a = this, s = n ? k(n) : void 0;
|
|
239
261
|
return a.addEventListener("load", function() {
|
|
240
|
-
a.status >= 400 &&
|
|
262
|
+
a.status >= 400 && A(e, {
|
|
241
263
|
url: a._qaid_url,
|
|
242
264
|
method: a._qaid_method.toUpperCase(),
|
|
243
265
|
status: a.status,
|
|
244
266
|
statusText: a.statusText,
|
|
245
|
-
requestBody:
|
|
246
|
-
responseBody:
|
|
267
|
+
requestBody: s,
|
|
268
|
+
responseBody: k(a.responseText),
|
|
247
269
|
timestamp: Date.now()
|
|
248
270
|
});
|
|
249
|
-
}),
|
|
271
|
+
}), i.apply(this, [n]);
|
|
250
272
|
}, {
|
|
251
|
-
errors:
|
|
273
|
+
errors: e,
|
|
252
274
|
restore: () => {
|
|
253
|
-
window.fetch = t, XMLHttpRequest.prototype.open =
|
|
275
|
+
window.fetch = t, XMLHttpRequest.prototype.open = o, XMLHttpRequest.prototype.send = i;
|
|
254
276
|
}
|
|
255
277
|
};
|
|
256
278
|
}
|
|
257
|
-
function
|
|
279
|
+
function Mt() {
|
|
258
280
|
return typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function" && typeof MediaRecorder < "u";
|
|
259
281
|
}
|
|
260
|
-
function
|
|
282
|
+
function Dt() {
|
|
261
283
|
if (typeof MediaRecorder > "u") return "";
|
|
262
|
-
const
|
|
284
|
+
const e = [
|
|
263
285
|
"video/webm;codecs=vp9",
|
|
264
286
|
"video/webm;codecs=vp8",
|
|
265
287
|
"video/webm",
|
|
266
288
|
"video/mp4"
|
|
267
289
|
];
|
|
268
|
-
for (const t of
|
|
290
|
+
for (const t of e)
|
|
269
291
|
if (MediaRecorder.isTypeSupported(t))
|
|
270
292
|
return t;
|
|
271
293
|
return "";
|
|
272
294
|
}
|
|
273
|
-
function
|
|
274
|
-
const t =
|
|
275
|
-
let
|
|
276
|
-
function g() {
|
|
277
|
-
d !== null && (clearInterval(d), d = null), f !== null && (clearTimeout(f), f = null), o && (o.getTracks().forEach((m) => m.stop()), o = null), n = null, a = [], r = null, l = null, c = null, p = null;
|
|
278
|
-
}
|
|
295
|
+
function zt(e = {}) {
|
|
296
|
+
const t = e.maxDuration ?? 15, o = e.videoBitsPerSecond ?? 8e5;
|
|
297
|
+
let i = null, n = null, a = [], s = null, l = null, d = null, r = 0, c = null, u = null, p = !1, f = null;
|
|
279
298
|
function b() {
|
|
280
|
-
|
|
299
|
+
d !== null && (clearInterval(d), d = null), f !== null && (clearTimeout(f), f = null), i && (i.getTracks().forEach((m) => m.stop()), i = null), n = null, a = [], s = null, l = null, c = null, u = null;
|
|
300
|
+
}
|
|
301
|
+
function g() {
|
|
302
|
+
p || (p = !0, n && n.state !== "inactive" && n.stop());
|
|
281
303
|
}
|
|
282
304
|
return {
|
|
283
305
|
async start() {
|
|
284
|
-
|
|
285
|
-
const m =
|
|
306
|
+
p = !1, a = [];
|
|
307
|
+
const m = Dt();
|
|
286
308
|
if (!m)
|
|
287
309
|
throw new Error("No supported video MIME type found");
|
|
288
|
-
|
|
310
|
+
i = await navigator.mediaDevices.getDisplayMedia({
|
|
289
311
|
video: {
|
|
290
312
|
frameRate: 15
|
|
291
313
|
},
|
|
@@ -293,71 +315,66 @@ function It(i = {}) {
|
|
|
293
315
|
// @ts-expect-error preferCurrentTab is not in the TS types yet
|
|
294
316
|
preferCurrentTab: !0
|
|
295
317
|
});
|
|
296
|
-
const v =
|
|
318
|
+
const v = i.getVideoTracks()[0];
|
|
297
319
|
v && v.addEventListener("ended", () => {
|
|
298
|
-
|
|
299
|
-
}), n = new MediaRecorder(
|
|
320
|
+
g();
|
|
321
|
+
}), n = new MediaRecorder(i, {
|
|
300
322
|
mimeType: m,
|
|
301
|
-
videoBitsPerSecond:
|
|
323
|
+
videoBitsPerSecond: o
|
|
302
324
|
}), n.ondataavailable = (y) => {
|
|
303
325
|
y.data.size > 0 && a.push(y.data);
|
|
304
326
|
}, n.onstop = () => {
|
|
305
327
|
const y = new Blob(a, { type: m });
|
|
306
|
-
c && c(y), l && l(y),
|
|
328
|
+
c && c(y), l && l(y), i && i.getTracks().forEach((q) => q.stop());
|
|
307
329
|
}, n.onerror = () => {
|
|
308
|
-
|
|
309
|
-
}, n.start(1e3),
|
|
310
|
-
const y = Math.floor((Date.now() -
|
|
311
|
-
|
|
330
|
+
u && u(new Error("MediaRecorder error"));
|
|
331
|
+
}, n.start(1e3), r = Date.now(), d = setInterval(() => {
|
|
332
|
+
const y = Math.floor((Date.now() - r) / 1e3);
|
|
333
|
+
s && s(y);
|
|
312
334
|
}, 1e3), f = setTimeout(() => {
|
|
313
|
-
|
|
335
|
+
g();
|
|
314
336
|
}, t * 1e3);
|
|
315
337
|
},
|
|
316
338
|
stop() {
|
|
317
339
|
return new Promise((m, v) => {
|
|
318
|
-
c = m,
|
|
340
|
+
c = m, u = v, g();
|
|
319
341
|
});
|
|
320
342
|
},
|
|
321
343
|
onTick(m) {
|
|
322
|
-
|
|
344
|
+
s = m;
|
|
323
345
|
},
|
|
324
346
|
onStop(m) {
|
|
325
347
|
l = m;
|
|
326
348
|
},
|
|
327
349
|
destroy() {
|
|
328
|
-
|
|
350
|
+
g(), b();
|
|
329
351
|
}
|
|
330
352
|
};
|
|
331
353
|
}
|
|
332
|
-
function
|
|
333
|
-
return typeof window < "u" && window.innerWidth <
|
|
354
|
+
function Ht(e = 640) {
|
|
355
|
+
return typeof window < "u" && window.innerWidth < e;
|
|
334
356
|
}
|
|
335
|
-
function O(
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
const n = document.elementFromPoint(
|
|
339
|
-
return
|
|
357
|
+
function O(e, t, o) {
|
|
358
|
+
const i = o.map((a) => a.style.visibility);
|
|
359
|
+
o.forEach((a) => a.style.visibility = "hidden");
|
|
360
|
+
const n = document.elementFromPoint(e, t);
|
|
361
|
+
return o.forEach((a, s) => a.style.visibility = i[s]), n;
|
|
340
362
|
}
|
|
341
|
-
function
|
|
342
|
-
return
|
|
363
|
+
function $(e) {
|
|
364
|
+
return e ? e.hasAttribute("data-qaid-embed") || e.hasAttribute("data-qaid-embed-overlay") ? !0 : !!e.closest("[data-qaid-embed], [data-qaid-embed-overlay]") : !1;
|
|
343
365
|
}
|
|
344
|
-
function
|
|
345
|
-
const
|
|
366
|
+
function Bt(e, t = 0) {
|
|
367
|
+
const o = e.getBoundingClientRect();
|
|
346
368
|
return {
|
|
347
|
-
x:
|
|
348
|
-
y:
|
|
349
|
-
width:
|
|
350
|
-
height:
|
|
369
|
+
x: o.left - t,
|
|
370
|
+
y: o.top - t,
|
|
371
|
+
width: o.width + t * 2,
|
|
372
|
+
height: o.height + t * 2
|
|
351
373
|
};
|
|
352
374
|
}
|
|
353
|
-
function
|
|
354
|
-
document.querySelectorAll(`.${i}`).forEach((t) => {
|
|
355
|
-
t.classList.remove(i);
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
async function Dt(i = {}) {
|
|
375
|
+
async function Pt(e = {}) {
|
|
359
376
|
var n;
|
|
360
|
-
const { quality: t = 1, maxWidth:
|
|
377
|
+
const { quality: t = 1, maxWidth: o = 1280, maxHeight: i = 800 } = e;
|
|
361
378
|
try {
|
|
362
379
|
if (!((n = navigator.mediaDevices) != null && n.getDisplayMedia))
|
|
363
380
|
return console.warn("Screen Capture API not available"), null;
|
|
@@ -366,7 +383,7 @@ async function Dt(i = {}) {
|
|
|
366
383
|
video: {
|
|
367
384
|
displaySurface: "browser"
|
|
368
385
|
}
|
|
369
|
-
}),
|
|
386
|
+
}), s = a.getVideoTracks()[0], l = s.getSettings(), d = document.createElement("video");
|
|
370
387
|
d.srcObject = a, d.muted = !0, await new Promise((m) => {
|
|
371
388
|
d.onloadedmetadata = () => {
|
|
372
389
|
d.play(), m();
|
|
@@ -377,48 +394,48 @@ async function Dt(i = {}) {
|
|
|
377
394
|
};
|
|
378
395
|
v();
|
|
379
396
|
}), await new Promise((m) => setTimeout(m, 100));
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
const
|
|
383
|
-
return
|
|
397
|
+
const r = l.width || d.videoWidth, c = l.height || d.videoHeight, u = Math.min(o / r, i / c, 1), p = Math.round(r * u), f = Math.round(c * u), b = document.createElement("canvas");
|
|
398
|
+
b.width = p, b.height = f;
|
|
399
|
+
const g = b.getContext("2d");
|
|
400
|
+
return g ? (g.drawImage(d, 0, 0, p, f), s.stop(), b.toDataURL("image/webp", t)) : (s.stop(), null);
|
|
384
401
|
} catch (a) {
|
|
385
402
|
return console.warn("Screenshot capture failed:", a), null;
|
|
386
403
|
}
|
|
387
404
|
}
|
|
388
|
-
const
|
|
405
|
+
const N = "https://qaid.dev/lib/html2canvas.min.js", At = 1e4, Ot = 50;
|
|
389
406
|
let w = null;
|
|
390
|
-
function
|
|
407
|
+
function _t() {
|
|
391
408
|
if (typeof document > "u" || typeof window > "u")
|
|
392
409
|
return !1;
|
|
393
|
-
const
|
|
394
|
-
return typeof
|
|
410
|
+
const e = document.createElement("canvas");
|
|
411
|
+
return typeof e.getContext == "function" && !!e.getContext("2d");
|
|
395
412
|
}
|
|
396
|
-
function
|
|
397
|
-
return window.html2canvas ? Promise.resolve(!0) : w || (w = new Promise((
|
|
413
|
+
function $t() {
|
|
414
|
+
return window.html2canvas ? Promise.resolve(!0) : w || (w = new Promise((e) => {
|
|
398
415
|
if (!document.querySelector(
|
|
399
|
-
`script[src="${
|
|
416
|
+
`script[src="${N}"]`
|
|
400
417
|
)) {
|
|
401
418
|
const n = document.createElement("script");
|
|
402
|
-
n.src =
|
|
419
|
+
n.src = N, n.async = !0, document.head.appendChild(n);
|
|
403
420
|
}
|
|
404
|
-
const
|
|
421
|
+
const o = Date.now(), i = () => {
|
|
405
422
|
if (window.html2canvas) {
|
|
406
|
-
|
|
423
|
+
e(!0);
|
|
407
424
|
return;
|
|
408
425
|
}
|
|
409
|
-
if (Date.now() -
|
|
410
|
-
w = null,
|
|
426
|
+
if (Date.now() - o > At) {
|
|
427
|
+
w = null, e(!1);
|
|
411
428
|
return;
|
|
412
429
|
}
|
|
413
|
-
setTimeout(
|
|
430
|
+
setTimeout(i, Ot);
|
|
414
431
|
};
|
|
415
|
-
|
|
432
|
+
i();
|
|
416
433
|
}), w);
|
|
417
434
|
}
|
|
418
|
-
async function
|
|
419
|
-
const { quality: t = 0.8, maxWidth:
|
|
435
|
+
async function Nt(e = {}) {
|
|
436
|
+
const { quality: t = 0.8, maxWidth: o = 1280, maxHeight: i = 800 } = e;
|
|
420
437
|
try {
|
|
421
|
-
if (!await
|
|
438
|
+
if (!await $t() || !window.html2canvas)
|
|
422
439
|
return console.warn("html2canvas failed to load"), null;
|
|
423
440
|
const a = await window.html2canvas(document.body, {
|
|
424
441
|
useCORS: !0,
|
|
@@ -430,16 +447,16 @@ async function At(i = {}) {
|
|
|
430
447
|
height: document.documentElement.clientHeight,
|
|
431
448
|
x: window.scrollX,
|
|
432
449
|
y: window.scrollY,
|
|
433
|
-
ignoreElements: (
|
|
434
|
-
var c,
|
|
435
|
-
return
|
|
450
|
+
ignoreElements: (r) => {
|
|
451
|
+
var c, u, p;
|
|
452
|
+
return r instanceof HTMLElement ? r.classList.contains("qaid-buttons") || r.classList.contains("qaid-targeting-overlay") || r.classList.contains("qaid-modal-container") || r.classList.contains("qaid-bottom-sheet") || r.classList.contains("qaid-backdrop") || r.classList.contains("qaid-selected-marker") || r.classList.contains("qaid-tooltip-text") || r.classList.contains("qaid-recording-indicator") || r.classList.contains("qaid-video-preview") || ((p = (c = r.className) == null ? void 0 : (u = c.toString()).startsWith) == null ? void 0 : p.call(u, "qaid-")) : !1;
|
|
436
453
|
}
|
|
437
|
-
}),
|
|
454
|
+
}), s = a.width, l = a.height, d = Math.min(o / s, i / l, 1);
|
|
438
455
|
if (d < 1) {
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
return
|
|
456
|
+
const r = Math.round(s * d), c = Math.round(l * d), u = document.createElement("canvas");
|
|
457
|
+
u.width = r, u.height = c;
|
|
458
|
+
const p = u.getContext("2d");
|
|
459
|
+
return p ? (p.drawImage(a, 0, 0, r, c), u.toDataURL("image/webp", t)) : null;
|
|
443
460
|
}
|
|
444
461
|
return a.toDataURL("image/webp", t);
|
|
445
462
|
} catch (n) {
|
|
@@ -447,15 +464,15 @@ async function At(i = {}) {
|
|
|
447
464
|
}
|
|
448
465
|
}
|
|
449
466
|
const V = "qaid_visitor_id";
|
|
450
|
-
function
|
|
467
|
+
function Vt() {
|
|
451
468
|
try {
|
|
452
|
-
let
|
|
453
|
-
return
|
|
469
|
+
let e = localStorage.getItem(V);
|
|
470
|
+
return e || (e = crypto.randomUUID(), localStorage.setItem(V, e)), e;
|
|
454
471
|
} catch {
|
|
455
472
|
return crypto.randomUUID();
|
|
456
473
|
}
|
|
457
474
|
}
|
|
458
|
-
class
|
|
475
|
+
class Ut {
|
|
459
476
|
constructor(t) {
|
|
460
477
|
h(this, "config");
|
|
461
478
|
h(this, "state", "IDLE");
|
|
@@ -476,7 +493,6 @@ class Pt {
|
|
|
476
493
|
});
|
|
477
494
|
h(this, "feedbackId", null);
|
|
478
495
|
h(this, "mousePos", { x: 0, y: 0 });
|
|
479
|
-
h(this, "lastHighlighted", null);
|
|
480
496
|
h(this, "isMobile", !1);
|
|
481
497
|
h(this, "visitorId");
|
|
482
498
|
// Console capture
|
|
@@ -489,51 +505,59 @@ class Pt {
|
|
|
489
505
|
h(this, "videoPreview", null);
|
|
490
506
|
h(this, "isRecording", !1);
|
|
491
507
|
h(this, "isSendingVideo", !1);
|
|
492
|
-
// DOM
|
|
493
|
-
h(this, "
|
|
508
|
+
// Shadow DOM
|
|
509
|
+
h(this, "shadowHost", null);
|
|
510
|
+
h(this, "shadowRoot", null);
|
|
511
|
+
// Overlay shadow DOM (always on document.body for full-page coverage)
|
|
512
|
+
h(this, "overlayShadowHost", null);
|
|
513
|
+
h(this, "overlayShadowRoot", null);
|
|
514
|
+
// DOM elements (inside shadow root)
|
|
515
|
+
h(this, "buttonsContainer", null);
|
|
494
516
|
h(this, "isUserProvidedContainer", !1);
|
|
495
517
|
h(this, "overlayContainer", null);
|
|
496
518
|
h(this, "captureLayer", null);
|
|
497
519
|
h(this, "crosshairH", null);
|
|
498
520
|
h(this, "crosshairV", null);
|
|
499
521
|
h(this, "scope", null);
|
|
522
|
+
h(this, "highlightBox", null);
|
|
500
523
|
h(this, "marker", null);
|
|
501
524
|
h(this, "modalContainer", null);
|
|
502
525
|
h(this, "backdrop", null);
|
|
526
|
+
// Per-instance CSS variables
|
|
527
|
+
h(this, "cssVars", {});
|
|
503
528
|
// Bound event handlers
|
|
504
529
|
h(this, "boundKeyDown");
|
|
505
530
|
h(this, "boundMouseMove");
|
|
506
531
|
h(this, "boundClick");
|
|
507
532
|
h(this, "boundResize");
|
|
508
533
|
h(this, "tooltipElement", null);
|
|
509
|
-
var
|
|
534
|
+
var o, i, n, a, s, l, d, r, c, u, p, f, b, g, m;
|
|
510
535
|
this.config = {
|
|
511
536
|
endpoint: t.endpoint,
|
|
512
537
|
apiKey: t.apiKey ?? "",
|
|
513
538
|
container: t.container ?? "",
|
|
514
539
|
buttonClass: t.buttonClass ?? "",
|
|
540
|
+
direction: t.direction ?? "horizontal",
|
|
515
541
|
position: t.position ?? "bottom-right",
|
|
516
542
|
offset: {
|
|
517
|
-
x: ((
|
|
518
|
-
y: ((
|
|
543
|
+
x: ((o = t.offset) == null ? void 0 : o.x) ?? 16,
|
|
544
|
+
y: ((i = t.offset) == null ? void 0 : i.y) ?? 16
|
|
519
545
|
},
|
|
520
546
|
zIndex: t.zIndex ?? 50,
|
|
521
547
|
skipTargeting: t.skipTargeting ?? !1,
|
|
522
548
|
colors: {
|
|
523
549
|
positive: ((n = t.colors) == null ? void 0 : n.positive) ?? "rgb(0, 200, 83)",
|
|
524
550
|
negative: ((a = t.colors) == null ? void 0 : a.negative) ?? "rgb(255, 0, 0)",
|
|
525
|
-
marker: ((
|
|
551
|
+
marker: ((s = t.colors) == null ? void 0 : s.marker) ?? "#6366f1"
|
|
526
552
|
},
|
|
527
553
|
buttonSize: t.buttonSize ?? "medium",
|
|
528
554
|
text: {
|
|
529
555
|
tooltip: ((l = t.text) == null ? void 0 : l.tooltip) ?? "",
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
submitButton: ((f = t.text) == null ? void 0 : f.submitButton) ?? "Submit",
|
|
536
|
-
skipButton: ((g = t.text) == null ? void 0 : g.skipButton) ?? "Skip"
|
|
556
|
+
modalTitle: ((d = t.text) == null ? void 0 : d.modalTitle) ?? "Thank you for your feedback!",
|
|
557
|
+
modalSubtitle: ((r = t.text) == null ? void 0 : r.modalSubtitle) ?? "Would you like to add a message to help us understand your feedback better?",
|
|
558
|
+
placeholder: ((c = t.text) == null ? void 0 : c.placeholder) ?? "Optional: Tell us more about your experience...",
|
|
559
|
+
submitButton: ((u = t.text) == null ? void 0 : u.submitButton) ?? "Submit",
|
|
560
|
+
skipButton: ((p = t.text) == null ? void 0 : p.skipButton) ?? "Skip"
|
|
537
561
|
},
|
|
538
562
|
modalWidth: t.modalWidth ?? 400,
|
|
539
563
|
backdropOpacity: t.backdropOpacity ?? 0.3,
|
|
@@ -542,159 +566,187 @@ class Pt {
|
|
|
542
566
|
captureScreenshot: t.captureScreenshot ?? !1,
|
|
543
567
|
screenshotMethod: t.screenshotMethod ?? "permission",
|
|
544
568
|
screenshotOptions: {
|
|
545
|
-
quality: ((
|
|
546
|
-
maxWidth: ((
|
|
547
|
-
maxHeight: ((
|
|
569
|
+
quality: ((f = t.screenshotOptions) == null ? void 0 : f.quality) ?? 0.8,
|
|
570
|
+
maxWidth: ((b = t.screenshotOptions) == null ? void 0 : b.maxWidth) ?? 1280,
|
|
571
|
+
maxHeight: ((g = t.screenshotOptions) == null ? void 0 : g.maxHeight) ?? 800
|
|
548
572
|
},
|
|
549
573
|
incognito: t.incognito ?? !1,
|
|
550
574
|
positiveIcon: t.positiveIcon ?? "",
|
|
551
575
|
negativeIcon: t.negativeIcon ?? "",
|
|
552
576
|
hideThumbs: t.hideThumbs ?? !1,
|
|
577
|
+
css: t.css ?? "",
|
|
553
578
|
captureVideo: t.captureVideo ?? !1,
|
|
554
579
|
videoOptions: {
|
|
555
|
-
maxDuration: ((
|
|
580
|
+
maxDuration: ((m = t.videoOptions) == null ? void 0 : m.maxDuration) ?? 15
|
|
556
581
|
},
|
|
557
582
|
recordIcon: t.recordIcon ?? ""
|
|
558
|
-
}, this.boundKeyDown = this.handleKeyDown.bind(this), this.boundMouseMove = this.handleMouseMove.bind(this), this.boundClick = this.handleClick.bind(this), this.boundResize = this.handleResize.bind(this), this.visitorId =
|
|
583
|
+
}, this.boundKeyDown = this.handleKeyDown.bind(this), this.boundMouseMove = this.handleMouseMove.bind(this), this.boundClick = this.handleClick.bind(this), this.boundResize = this.handleResize.bind(this), this.visitorId = Vt(), this.init();
|
|
584
|
+
}
|
|
585
|
+
applyVars(t) {
|
|
586
|
+
ht(t, this.cssVars);
|
|
559
587
|
}
|
|
560
588
|
init() {
|
|
561
|
-
|
|
589
|
+
ut(), this.cssVars = lt({
|
|
562
590
|
positiveColor: this.config.colors.positive,
|
|
563
591
|
negativeColor: this.config.colors.negative,
|
|
564
592
|
markerColor: this.config.colors.marker,
|
|
565
|
-
skipButtonStyles: !!this.config.buttonClass,
|
|
566
593
|
buttonSize: this.config.buttonSize,
|
|
567
594
|
modalWidth: this.config.modalWidth,
|
|
568
595
|
backdropOpacity: this.config.backdropOpacity,
|
|
569
596
|
fontFamily: this.config.fontFamily,
|
|
570
597
|
fontSize: this.config.fontSize
|
|
571
|
-
}), this.checkMobile(), window.addEventListener("resize", this.boundResize), this.createEmbed(), this.consoleCapture =
|
|
572
|
-
var
|
|
573
|
-
this.feedbackData.consoleErrors = ((
|
|
598
|
+
}), this.checkMobile(), window.addEventListener("resize", this.boundResize), this.createEmbed(), this.consoleCapture = Tt((t) => {
|
|
599
|
+
var o;
|
|
600
|
+
this.feedbackData.consoleErrors = ((o = this.consoleCapture) == null ? void 0 : o.errors) ?? [];
|
|
574
601
|
}), this.feedbackData.consoleErrors = this.consoleCapture.errors;
|
|
575
602
|
}
|
|
576
603
|
checkMobile() {
|
|
577
|
-
this.isMobile =
|
|
604
|
+
this.isMobile = Ht();
|
|
578
605
|
}
|
|
579
606
|
handleResize() {
|
|
580
607
|
this.checkMobile();
|
|
581
608
|
}
|
|
582
609
|
createEmbed() {
|
|
610
|
+
this.shadowHost = document.createElement("div"), this.shadowHost.setAttribute("data-qaid-embed", ""), this.shadowHost.style.position = "static", this.shadowHost.style.display = "contents";
|
|
583
611
|
let t = null;
|
|
584
|
-
|
|
585
|
-
|
|
612
|
+
this.config.container && (t = document.querySelector(this.config.container)), t ? (t.appendChild(this.shadowHost), this.isUserProvidedContainer = !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" });
|
|
613
|
+
const o = document.createElement("style");
|
|
614
|
+
if (o.textContent = B(), this.shadowRoot.appendChild(o), this.config.css) {
|
|
615
|
+
const r = document.createElement("style");
|
|
616
|
+
r.textContent = this.config.css, this.shadowRoot.appendChild(r);
|
|
617
|
+
}
|
|
618
|
+
const i = this.config.direction === "vertical" ? "qaid-vertical" : "";
|
|
619
|
+
if (this.isUserProvidedContainer)
|
|
620
|
+
this.buttonsContainer = document.createElement("div"), this.buttonsContainer.className = `qaid-buttons qaid-${this.config.position} ${i}`.trim(), this.config.incognito && this.buttonsContainer.classList.add("qaid-incognito");
|
|
586
621
|
else {
|
|
587
|
-
this.
|
|
588
|
-
const { x:
|
|
589
|
-
this.config.position.includes("right") ? this.
|
|
622
|
+
this.buttonsContainer = document.createElement("div"), this.buttonsContainer.className = `qaid-buttons qaid-auto-container qaid-${this.config.position} ${i}${this.config.incognito ? " qaid-incognito" : ""}`.trim(), this.buttonsContainer.style.pointerEvents = "auto";
|
|
623
|
+
const { x: r, y: c } = this.config.offset;
|
|
624
|
+
this.config.position.includes("right") ? this.buttonsContainer.style.right = `${r}px` : this.buttonsContainer.style.left = `${r}px`, this.config.position.includes("bottom") ? this.buttonsContainer.style.bottom = `${c}px` : this.buttonsContainer.style.top = `${c}px`;
|
|
590
625
|
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
s.className = "qaid-tooltip-wrapper";
|
|
626
|
+
this.applyVars(this.buttonsContainer), this.shadowRoot.appendChild(this.buttonsContainer);
|
|
627
|
+
const n = !!this.config.buttonClass, a = n ? `qaid-btn-structural ${this.config.buttonClass}` : "qaid-btn", l = this.config.text.tooltip || "Feedback for us?", d = document.createElement("div");
|
|
628
|
+
if (d.className = "qaid-tooltip-text", d.textContent = l, this.applyVars(d), this.shadowRoot.appendChild(d), this.tooltipElement = d, !this.config.hideThumbs) {
|
|
629
|
+
const r = document.createElement("div");
|
|
630
|
+
r.className = "qaid-tooltip-wrapper";
|
|
597
631
|
const c = document.createElement("button");
|
|
598
|
-
c.type = "button", c.className = n ? `${a} qaid-btn-up` : "qaid-btn qaid-btn-up", c.innerHTML = this.config.positiveIcon || T, c.addEventListener("click", (f) => this.handleThumbClick("up", f.currentTarget)), c.addEventListener("mouseenter", () => this.showTooltip(c)), c.addEventListener("mouseleave", () => this.hideTooltip()),
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
|
|
632
|
+
c.type = "button", c.className = n ? `${a} qaid-btn-up` : "qaid-btn qaid-btn-up", c.innerHTML = this.config.positiveIcon || T, c.addEventListener("click", (f) => this.handleThumbClick("up", f.currentTarget, f)), c.addEventListener("mouseenter", () => this.showTooltip(c)), c.addEventListener("mouseleave", () => this.hideTooltip()), r.appendChild(c);
|
|
633
|
+
const u = document.createElement("div");
|
|
634
|
+
u.className = "qaid-tooltip-wrapper";
|
|
635
|
+
const p = document.createElement("button");
|
|
636
|
+
p.type = "button", p.className = n ? `${a} qaid-btn-down` : "qaid-btn qaid-btn-down", p.innerHTML = this.config.negativeIcon || I, p.addEventListener("click", (f) => this.handleThumbClick("down", f.currentTarget, f)), p.addEventListener("mouseenter", () => this.showTooltip(p)), p.addEventListener("mouseleave", () => this.hideTooltip()), u.appendChild(p), this.buttonsContainer.appendChild(r), this.buttonsContainer.appendChild(u);
|
|
603
637
|
}
|
|
604
|
-
if (this.config.captureVideo &&
|
|
605
|
-
const
|
|
606
|
-
|
|
638
|
+
if (this.config.captureVideo && Mt()) {
|
|
639
|
+
const r = document.createElement("div");
|
|
640
|
+
r.className = "qaid-tooltip-wrapper";
|
|
607
641
|
const c = document.createElement("button");
|
|
608
|
-
c.type = "button", c.className = n ? `${a} qaid-btn-record` : "qaid-btn qaid-btn-record", c.innerHTML = this.config.recordIcon ||
|
|
642
|
+
c.type = "button", c.className = n ? `${a} qaid-btn-record` : "qaid-btn qaid-btn-record", c.innerHTML = this.config.recordIcon || et, c.addEventListener("click", () => this.startRecording()), c.addEventListener("mouseenter", () => this.showTooltip(c)), c.addEventListener("mouseleave", () => this.hideTooltip()), r.appendChild(c), this.buttonsContainer.appendChild(r);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Lazily create a separate overlay shadow host on document.body.
|
|
647
|
+
* This host contains all full-page elements (targeting overlay, marker,
|
|
648
|
+
* backdrop, modal, recording indicator, video preview) so they escape
|
|
649
|
+
* clip-path / transform containing blocks in user containers.
|
|
650
|
+
*/
|
|
651
|
+
ensureOverlayHost() {
|
|
652
|
+
if (this.overlayShadowRoot) return this.overlayShadowRoot;
|
|
653
|
+
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" });
|
|
654
|
+
const t = document.createElement("style");
|
|
655
|
+
if (t.textContent = B(), this.overlayShadowRoot.appendChild(t), this.config.css) {
|
|
656
|
+
const o = document.createElement("style");
|
|
657
|
+
o.textContent = this.config.css, this.overlayShadowRoot.appendChild(o);
|
|
609
658
|
}
|
|
659
|
+
return this.overlayShadowRoot;
|
|
610
660
|
}
|
|
611
661
|
showTooltip(t) {
|
|
612
662
|
if (!this.tooltipElement) return;
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
-
const n = t.getBoundingClientRect(), a =
|
|
616
|
-
let d,
|
|
617
|
-
d = n.bottom +
|
|
663
|
+
const o = this.tooltipElement, i = 8;
|
|
664
|
+
o.style.visibility = "hidden", o.classList.add("qaid-tooltip-visible");
|
|
665
|
+
const n = t.getBoundingClientRect(), a = o.getBoundingClientRect(), s = window.innerWidth, l = window.innerHeight;
|
|
666
|
+
let d, r;
|
|
667
|
+
d = n.bottom + i, d + a.height > l - i && (d = n.top - a.height - i), r = n.left, r < i ? r = i : r + a.width > s - i && (r = s - a.width - i), d < i ? d = i : d + a.height > l - i && (d = l - a.height - i), o.style.top = `${d}px`, o.style.left = `${r}px`, o.style.visibility = "visible";
|
|
618
668
|
}
|
|
619
669
|
hideTooltip() {
|
|
620
670
|
this.tooltipElement && this.tooltipElement.classList.remove("qaid-tooltip-visible");
|
|
621
671
|
}
|
|
622
|
-
handleThumbClick(t,
|
|
623
|
-
this.config.skipTargeting ? this.submitDirectFeedback(t,
|
|
672
|
+
handleThumbClick(t, o, i) {
|
|
673
|
+
this.config.skipTargeting ? this.submitDirectFeedback(t, o) : this.startTargeting(t, i);
|
|
624
674
|
}
|
|
625
|
-
submitDirectFeedback(t,
|
|
675
|
+
submitDirectFeedback(t, o) {
|
|
626
676
|
this.feedbackData.feedbackType = t, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null;
|
|
627
|
-
const
|
|
677
|
+
const i = o.getBoundingClientRect();
|
|
628
678
|
this.selectedBounds = {
|
|
629
|
-
x:
|
|
630
|
-
y:
|
|
631
|
-
width:
|
|
632
|
-
height:
|
|
633
|
-
clickX:
|
|
634
|
-
clickY:
|
|
679
|
+
x: i.left,
|
|
680
|
+
y: i.top,
|
|
681
|
+
width: i.width,
|
|
682
|
+
height: i.height,
|
|
683
|
+
clickX: i.left + i.width / 2,
|
|
684
|
+
clickY: i.top + i.height / 2,
|
|
635
685
|
visible: !1
|
|
636
686
|
}, this.submitFeedback();
|
|
637
687
|
}
|
|
638
|
-
startTargeting(t) {
|
|
639
|
-
this.state = "TARGETING", this.feedbackData.feedbackType = t, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null, this.selectedBounds.visible = !1, document.body.classList.add("qaid-targeting"), t === "up" ? document.body.classList.add("qaid-type-up") : document.body.classList.remove("qaid-type-up"), this.createTargetingOverlay(), document.addEventListener("keydown", this.boundKeyDown);
|
|
688
|
+
startTargeting(t, o) {
|
|
689
|
+
this.state = "TARGETING", this.feedbackData.feedbackType = t, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null, this.selectedBounds.visible = !1, this.mousePos.x = o.clientX, this.mousePos.y = o.clientY, document.body.classList.add("qaid-targeting"), t === "up" ? document.body.classList.add("qaid-type-up") : document.body.classList.remove("qaid-type-up"), document.body.style.setProperty("--qaid-positive", this.cssVars["--qaid-positive"]), document.body.style.setProperty("--qaid-negative", this.cssVars["--qaid-negative"]), this.createTargetingOverlay(), document.addEventListener("keydown", this.boundKeyDown), document.addEventListener("mousemove", this.boundMouseMove), document.addEventListener("click", this.boundClick, !0);
|
|
640
690
|
}
|
|
641
691
|
createTargetingOverlay() {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
t.className = `qaid-banner qaid-banner-${this.feedbackData.feedbackType}`;
|
|
645
|
-
const e = this.config.fontFamily;
|
|
646
|
-
e && e !== "system-ui, -apple-system, sans-serif" && (t.style.fontFamily = e), t.innerHTML = `
|
|
647
|
-
<span class="qaid-banner-text">${this.config.text.bannerText}</span>
|
|
648
|
-
<span class="qaid-banner-hint">${this.config.text.bannerHint}</span>
|
|
649
|
-
`;
|
|
692
|
+
const t = this.ensureOverlayHost();
|
|
693
|
+
this.overlayContainer = document.createElement("div"), this.overlayContainer.className = `qaid-targeting-overlay qaid-type-${this.feedbackData.feedbackType}`, this.captureLayer = document.createElement("div"), this.captureLayer.className = "qaid-capture-layer";
|
|
650
694
|
const o = document.createElement("div");
|
|
651
695
|
o.className = "qaid-vignette", this.crosshairH = document.createElement("div"), this.crosshairH.className = "qaid-crosshair-h", this.crosshairV = document.createElement("div"), this.crosshairV.className = "qaid-crosshair-v", this.scope = document.createElement("div"), this.scope.className = "qaid-scope", this.scope.innerHTML = `
|
|
652
696
|
<div class="qaid-scope-ring"></div>
|
|
653
697
|
<div class="qaid-scope-ring-inner"></div>
|
|
654
698
|
<div class="qaid-scope-dot"></div>
|
|
655
|
-
`, this.overlayContainer.appendChild(this.captureLayer), this.overlayContainer.appendChild(
|
|
699
|
+
`, this.highlightBox = document.createElement("div"), this.highlightBox.className = "qaid-highlight-box", this.overlayContainer.appendChild(this.captureLayer), this.overlayContainer.appendChild(o), this.overlayContainer.appendChild(this.highlightBox), this.overlayContainer.appendChild(this.crosshairH), this.overlayContainer.appendChild(this.crosshairV), this.overlayContainer.appendChild(this.scope), this.crosshairH.style.top = `${this.mousePos.y}px`, this.crosshairV.style.left = `${this.mousePos.x}px`, this.scope.style.left = `${this.mousePos.x}px`, this.scope.style.top = `${this.mousePos.y}px`, this.applyVars(this.overlayContainer), t.appendChild(this.overlayContainer);
|
|
656
700
|
}
|
|
657
701
|
handleKeyDown(t) {
|
|
658
702
|
t.key === "Escape" && (this.isRecording ? this.stopRecording() : this.videoPreview ? this.cancelRecordingPreview() : this.state === "TARGETING" ? this.cancelTargeting() : this.state === "MODAL_OPEN" && this.closeModal());
|
|
659
703
|
}
|
|
660
704
|
handleMouseMove(t) {
|
|
661
|
-
if (this.mousePos.x = t.clientX, this.mousePos.y = t.clientY, this.crosshairH && (this.crosshairH.style.top = `${t.clientY}px`), this.crosshairV && (this.crosshairV.style.left = `${t.clientX}px`), this.scope && (this.scope.style.left = `${t.clientX}px`, this.scope.style.top = `${t.clientY}px`), this.captureLayer) {
|
|
662
|
-
const
|
|
705
|
+
if (this.mousePos.x = t.clientX, this.mousePos.y = t.clientY, this.crosshairH && (this.crosshairH.style.top = `${t.clientY}px`), this.crosshairV && (this.crosshairV.style.left = `${t.clientX}px`), this.scope && (this.scope.style.left = `${t.clientX}px`, this.scope.style.top = `${t.clientY}px`), this.captureLayer && this.shadowHost) {
|
|
706
|
+
const o = [this.shadowHost, this.overlayShadowHost].filter(Boolean), i = O(
|
|
663
707
|
t.clientX,
|
|
664
708
|
t.clientY,
|
|
665
|
-
|
|
709
|
+
o
|
|
666
710
|
);
|
|
667
|
-
|
|
711
|
+
if (i && !$(i)) {
|
|
712
|
+
if (this.highlightBox) {
|
|
713
|
+
const n = i.getBoundingClientRect();
|
|
714
|
+
this.highlightBox.style.transform = `translate(${n.left}px, ${n.top}px)`, this.highlightBox.style.width = `${n.width}px`, this.highlightBox.style.height = `${n.height}px`, this.highlightBox.style.display = "block";
|
|
715
|
+
}
|
|
716
|
+
} else
|
|
717
|
+
this.highlightBox && (this.highlightBox.style.display = "none");
|
|
668
718
|
}
|
|
669
719
|
}
|
|
670
720
|
handleClick(t) {
|
|
671
|
-
if (!this.
|
|
672
|
-
|
|
721
|
+
if (this.state !== "TARGETING" || !this.shadowHost) return;
|
|
722
|
+
t.preventDefault(), t.stopPropagation();
|
|
723
|
+
const o = [this.shadowHost, this.overlayShadowHost].filter(Boolean), i = O(
|
|
673
724
|
t.clientX,
|
|
674
725
|
t.clientY,
|
|
675
|
-
|
|
726
|
+
o
|
|
676
727
|
);
|
|
677
|
-
if (!
|
|
728
|
+
if (!i || $(i))
|
|
678
729
|
return;
|
|
679
|
-
|
|
680
|
-
const o = Mt(e, 8);
|
|
730
|
+
const n = Bt(i, 8);
|
|
681
731
|
this.selectedBounds = {
|
|
682
|
-
...
|
|
732
|
+
...n,
|
|
683
733
|
clickX: t.clientX,
|
|
684
734
|
clickY: t.clientY,
|
|
685
735
|
visible: !0
|
|
686
736
|
};
|
|
687
|
-
const { selector:
|
|
688
|
-
this.feedbackData.elementSelector =
|
|
737
|
+
const { selector: a, text: s } = wt(i);
|
|
738
|
+
this.feedbackData.elementSelector = a, this.feedbackData.elementText = s, this.removeTargetingOverlay(), document.removeEventListener("mousemove", this.boundMouseMove), document.removeEventListener("click", this.boundClick, !0), 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.state = "SELECTED", this.showSelectedMarker(), this.submitFeedback();
|
|
689
739
|
}
|
|
690
740
|
cancelTargeting() {
|
|
691
|
-
|
|
741
|
+
this.removeTargetingOverlay(), document.removeEventListener("mousemove", this.boundMouseMove), document.removeEventListener("click", this.boundClick, !0), 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.state = "IDLE", this.feedbackData.feedbackType = null, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null, this.selectedBounds.visible = !1;
|
|
692
742
|
}
|
|
693
743
|
removeTargetingOverlay() {
|
|
694
744
|
this.overlayContainer && (this.overlayContainer.remove(), this.overlayContainer = null), this.captureLayer = null, this.crosshairH = null, this.crosshairV = null, this.scope = null;
|
|
695
745
|
}
|
|
696
746
|
showSelectedMarker() {
|
|
697
|
-
|
|
747
|
+
if (!this.selectedBounds.visible) return;
|
|
748
|
+
const t = this.ensureOverlayHost();
|
|
749
|
+
this.marker = document.createElement("div"), this.marker.className = "qaid-selected-marker", this.marker.style.left = `${this.selectedBounds.x}px`, this.marker.style.top = `${this.selectedBounds.y}px`, this.marker.style.width = `${this.selectedBounds.width}px`, this.marker.style.height = `${this.selectedBounds.height}px`, this.marker.style.zIndex = String(this.config.zIndex + 1), this.applyVars(this.marker), t.appendChild(this.marker);
|
|
698
750
|
}
|
|
699
751
|
hideSelectedMarker() {
|
|
700
752
|
this.marker && (this.marker.remove(), this.marker = null);
|
|
@@ -702,13 +754,13 @@ class Pt {
|
|
|
702
754
|
async submitFeedback() {
|
|
703
755
|
if (!this.feedbackData.feedbackType) return;
|
|
704
756
|
let t = null;
|
|
705
|
-
this.config.captureScreenshot && (this.config.screenshotMethod === "dom" ? t = await
|
|
706
|
-
const
|
|
757
|
+
this.config.captureScreenshot && (this.config.screenshotMethod === "dom" ? t = await Nt(this.config.screenshotOptions) : t = await Pt(this.config.screenshotOptions));
|
|
758
|
+
const o = this.feedbackData.elementSelector ? {
|
|
707
759
|
x: this.selectedBounds.x,
|
|
708
760
|
y: this.selectedBounds.y,
|
|
709
761
|
width: this.selectedBounds.width,
|
|
710
762
|
height: this.selectedBounds.height
|
|
711
|
-
} : null,
|
|
763
|
+
} : null, i = {
|
|
712
764
|
feedbackType: this.feedbackData.feedbackType,
|
|
713
765
|
pageUrl: window.location.href,
|
|
714
766
|
apiKey: this.config.apiKey || void 0,
|
|
@@ -724,14 +776,14 @@ class Pt {
|
|
|
724
776
|
screenshot: t,
|
|
725
777
|
visitorId: this.visitorId,
|
|
726
778
|
// Include element bounds and user agent for server-side screenshot fallback
|
|
727
|
-
elementBounds:
|
|
779
|
+
elementBounds: o,
|
|
728
780
|
userAgent: navigator.userAgent
|
|
729
781
|
};
|
|
730
782
|
try {
|
|
731
783
|
const n = await fetch(this.config.endpoint, {
|
|
732
784
|
method: "POST",
|
|
733
785
|
headers: { "Content-Type": "application/json" },
|
|
734
|
-
body: JSON.stringify(
|
|
786
|
+
body: JSON.stringify(i)
|
|
735
787
|
});
|
|
736
788
|
if (n.ok) {
|
|
737
789
|
const a = await n.json();
|
|
@@ -740,24 +792,23 @@ class Pt {
|
|
|
740
792
|
} catch (n) {
|
|
741
793
|
console.error("Failed to submit feedback:", n);
|
|
742
794
|
}
|
|
743
|
-
this.state = "MODAL_OPEN", this.showModal();
|
|
795
|
+
this.state = "MODAL_OPEN", this.showModal(), this.overlayShadowHost && (this.overlayShadowHost.style.pointerEvents = "auto");
|
|
744
796
|
}
|
|
745
797
|
showModal() {
|
|
746
|
-
|
|
798
|
+
const t = this.ensureOverlayHost();
|
|
799
|
+
this.backdrop = document.createElement("div"), this.backdrop.className = "qaid-backdrop", this.backdrop.style.zIndex = String(this.config.zIndex + 2), this.backdrop.style.background = `rgba(0, 0, 0, ${this.config.backdropOpacity})`, this.backdrop.addEventListener("click", () => this.closeModal()), this.applyVars(this.backdrop), this.isMobile ? this.showBottomSheet() : this.showPositionedModal(), t.appendChild(this.backdrop), document.addEventListener("keydown", this.boundKeyDown);
|
|
747
800
|
}
|
|
748
801
|
showBottomSheet() {
|
|
749
|
-
const t = document.createElement("div");
|
|
750
|
-
|
|
751
|
-
const e = this.config.fontFamily;
|
|
752
|
-
e && e !== "system-ui, -apple-system, sans-serif" && (t.style.fontFamily = e), t.innerHTML = `
|
|
802
|
+
const t = this.ensureOverlayHost(), o = document.createElement("div");
|
|
803
|
+
o.className = "qaid-bottom-sheet", o.style.zIndex = String(this.config.zIndex + 3), o.innerHTML = `
|
|
753
804
|
<div class="qaid-bottom-sheet-content">
|
|
754
805
|
<div class="qaid-bottom-sheet-handle"></div>
|
|
755
806
|
${this.getModalContent()}
|
|
756
807
|
</div>
|
|
757
|
-
`,
|
|
808
|
+
`, this.applyVars(o), t.appendChild(o), this.modalContainer = o, this.setupModalInteractions();
|
|
758
809
|
}
|
|
759
810
|
showPositionedModal() {
|
|
760
|
-
const { modal:
|
|
811
|
+
const t = this.ensureOverlayHost(), { modal: o, arrow: i } = St(
|
|
761
812
|
this.selectedBounds,
|
|
762
813
|
window.innerWidth,
|
|
763
814
|
window.innerHeight,
|
|
@@ -769,20 +820,18 @@ class Pt {
|
|
|
769
820
|
viewportPadding: 16
|
|
770
821
|
}
|
|
771
822
|
);
|
|
772
|
-
this.modalContainer = document.createElement("div"), this.modalContainer.className = `qaid-modal-container qaid-${
|
|
773
|
-
const o = this.config.fontFamily;
|
|
774
|
-
o && o !== "system-ui, -apple-system, sans-serif" && (this.modalContainer.style.fontFamily = o);
|
|
823
|
+
this.modalContainer = document.createElement("div"), this.modalContainer.className = `qaid-modal-container qaid-${o.position}`, this.modalContainer.style.top = `${o.top}px`, this.modalContainer.style.left = `${o.left}px`, this.modalContainer.style.zIndex = String(this.config.zIndex + 3);
|
|
775
824
|
const n = document.createElement("div");
|
|
776
|
-
n.className = "qaid-modal-arrow", n.style.left = `${
|
|
825
|
+
n.className = "qaid-modal-arrow", n.style.left = `${i.left}px`;
|
|
777
826
|
const a = document.createElement("div");
|
|
778
|
-
a.className = "qaid-modal-box", a.innerHTML = this.getModalContent(), this.modalContainer.appendChild(n), this.modalContainer.appendChild(a),
|
|
827
|
+
a.className = "qaid-modal-box", a.innerHTML = this.getModalContent(), this.modalContainer.appendChild(n), this.modalContainer.appendChild(a), this.applyVars(this.modalContainer), t.appendChild(this.modalContainer), this.setupModalInteractions();
|
|
779
828
|
}
|
|
780
829
|
getModalContent() {
|
|
781
|
-
const t = this.feedbackData.feedbackType === "up",
|
|
830
|
+
const t = this.feedbackData.feedbackType === "up", o = this.config.positiveIcon || T, i = this.config.negativeIcon || I;
|
|
782
831
|
return `
|
|
783
832
|
<div class="qaid-modal-header">
|
|
784
833
|
<button type="button" class="${this.config.buttonClass ? `qaid-type-toggle qaid-type-toggle-custom ${this.config.buttonClass} ${t ? "qaid-btn-up" : "qaid-btn-down"}` : `qaid-type-toggle ${t ? "qaid-type-up" : "qaid-type-down"}`}" title="Click to switch">
|
|
785
|
-
${t ?
|
|
834
|
+
${t ? o : i}
|
|
786
835
|
</button>
|
|
787
836
|
<div class="qaid-modal-header-text">
|
|
788
837
|
<h3 class="qaid-modal-title">${this.config.text.modalTitle}</h3>
|
|
@@ -797,19 +846,19 @@ class Pt {
|
|
|
797
846
|
}
|
|
798
847
|
setupModalInteractions() {
|
|
799
848
|
if (!this.modalContainer) return;
|
|
800
|
-
const t = this.modalContainer.querySelector(".qaid-textarea"),
|
|
849
|
+
const t = this.modalContainer.querySelector(".qaid-textarea"), o = this.modalContainer.querySelector(".qaid-btn-submit");
|
|
801
850
|
t && (setTimeout(() => t.focus(), 100), t.addEventListener("input", () => {
|
|
802
|
-
|
|
803
|
-
})),
|
|
851
|
+
o && (o.textContent = t.value.trim() ? this.config.text.submitButton : this.config.text.skipButton);
|
|
852
|
+
})), o && o.addEventListener("click", () => {
|
|
804
853
|
const n = (t == null ? void 0 : t.value.trim()) || null;
|
|
805
854
|
this.submitMessage(n);
|
|
806
855
|
});
|
|
807
|
-
const
|
|
808
|
-
|
|
856
|
+
const i = this.modalContainer.querySelector(".qaid-type-toggle");
|
|
857
|
+
i && i.addEventListener("click", () => {
|
|
809
858
|
const n = this.feedbackData.feedbackType === "up" ? "down" : "up";
|
|
810
|
-
this.feedbackData.feedbackType = n, this.config.buttonClass ? (
|
|
811
|
-
const a = this.config.positiveIcon || T,
|
|
812
|
-
|
|
859
|
+
this.feedbackData.feedbackType = n, this.config.buttonClass ? (i.classList.toggle("qaid-btn-up", n === "up"), i.classList.toggle("qaid-btn-down", n === "down")) : (i.classList.toggle("qaid-type-up", n === "up"), i.classList.toggle("qaid-type-down", n === "down"));
|
|
860
|
+
const a = this.config.positiveIcon || T, s = this.config.negativeIcon || I;
|
|
861
|
+
i.innerHTML = n === "up" ? a : s, this.feedbackId && fetch(`${this.config.endpoint}/${this.feedbackId}`, {
|
|
813
862
|
method: "PATCH",
|
|
814
863
|
headers: { "Content-Type": "application/json" },
|
|
815
864
|
body: JSON.stringify({ feedbackType: n })
|
|
@@ -824,8 +873,8 @@ class Pt {
|
|
|
824
873
|
headers: { "Content-Type": "application/json" },
|
|
825
874
|
body: JSON.stringify({ message: t })
|
|
826
875
|
});
|
|
827
|
-
} catch (
|
|
828
|
-
console.error("Failed to submit feedback message:",
|
|
876
|
+
} catch (o) {
|
|
877
|
+
console.error("Failed to submit feedback message:", o);
|
|
829
878
|
}
|
|
830
879
|
this.feedbackId = null;
|
|
831
880
|
}
|
|
@@ -836,13 +885,13 @@ class Pt {
|
|
|
836
885
|
method: "PATCH",
|
|
837
886
|
headers: { "Content-Type": "application/json" },
|
|
838
887
|
body: JSON.stringify({ message: null })
|
|
839
|
-
}).catch((t) => console.error("Failed to finalize feedback:", t)), this.modalContainer && (this.modalContainer.remove(), this.modalContainer = null), this.backdrop && (this.backdrop.remove(), this.backdrop = null), document.removeEventListener("keydown", this.boundKeyDown), this.hideSelectedMarker(), this.state = "IDLE", this.feedbackId = null, this.feedbackData.feedbackType = null, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null, this.selectedBounds.visible = !1;
|
|
888
|
+
}).catch((t) => console.error("Failed to finalize feedback:", t)), this.modalContainer && (this.modalContainer.remove(), this.modalContainer = null), this.backdrop && (this.backdrop.remove(), this.backdrop = null), document.removeEventListener("keydown", this.boundKeyDown), this.hideSelectedMarker(), 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;
|
|
840
889
|
}
|
|
841
890
|
// ==================== Video Recording ====================
|
|
842
891
|
async startRecording() {
|
|
843
892
|
if (!(this.isRecording || this.state !== "IDLE"))
|
|
844
893
|
try {
|
|
845
|
-
this.networkCapture =
|
|
894
|
+
this.networkCapture = Rt(), this.videoRecorder = zt({
|
|
846
895
|
maxDuration: this.config.videoOptions.maxDuration
|
|
847
896
|
}), this.videoRecorder.onTick((t) => {
|
|
848
897
|
this.updateRecordingTimer(t);
|
|
@@ -864,54 +913,55 @@ class Pt {
|
|
|
864
913
|
}
|
|
865
914
|
}
|
|
866
915
|
showRecordingIndicator() {
|
|
916
|
+
const t = this.ensureOverlayHost();
|
|
867
917
|
this.recordingIndicator = document.createElement("div"), this.recordingIndicator.className = "qaid-recording-indicator", this.recordingIndicator.style.zIndex = String(this.config.zIndex + 100);
|
|
868
|
-
const
|
|
869
|
-
|
|
870
|
-
const
|
|
871
|
-
|
|
872
|
-
const
|
|
873
|
-
|
|
918
|
+
const o = document.createElement("div");
|
|
919
|
+
o.className = "qaid-recording-dot";
|
|
920
|
+
const i = document.createElement("span");
|
|
921
|
+
i.className = "qaid-recording-time", i.textContent = this.formatTime(this.config.videoOptions.maxDuration);
|
|
922
|
+
const n = document.createElement("button");
|
|
923
|
+
n.type = "button", n.className = "qaid-recording-stop", n.textContent = "Stop", n.addEventListener("click", () => this.stopRecording()), this.recordingIndicator.appendChild(o), this.recordingIndicator.appendChild(i), this.recordingIndicator.appendChild(n), this.applyVars(this.recordingIndicator), this.overlayShadowHost && (this.overlayShadowHost.style.pointerEvents = "auto"), t.appendChild(this.recordingIndicator);
|
|
874
924
|
}
|
|
875
925
|
updateRecordingTimer(t) {
|
|
876
926
|
if (!this.recordingIndicator) return;
|
|
877
|
-
const
|
|
878
|
-
if (
|
|
879
|
-
const
|
|
880
|
-
|
|
927
|
+
const o = this.recordingIndicator.querySelector(".qaid-recording-time");
|
|
928
|
+
if (o) {
|
|
929
|
+
const i = Math.max(0, this.config.videoOptions.maxDuration - t);
|
|
930
|
+
o.textContent = this.formatTime(i);
|
|
881
931
|
}
|
|
882
932
|
}
|
|
883
933
|
formatTime(t) {
|
|
884
|
-
const
|
|
885
|
-
return `${
|
|
934
|
+
const o = Math.floor(t / 60), i = t % 60;
|
|
935
|
+
return `${o}:${i.toString().padStart(2, "0")}`;
|
|
886
936
|
}
|
|
887
937
|
removeRecordingIndicator() {
|
|
888
938
|
this.recordingIndicator && (this.recordingIndicator.remove(), this.recordingIndicator = null);
|
|
889
939
|
}
|
|
890
940
|
showRecordingPreview() {
|
|
891
941
|
if (!this.recordedBlob) return;
|
|
892
|
-
const t = URL.createObjectURL(this.recordedBlob);
|
|
942
|
+
const t = this.ensureOverlayHost(), o = URL.createObjectURL(this.recordedBlob);
|
|
893
943
|
this.videoPreview = document.createElement("div"), this.videoPreview.className = "qaid-video-preview", this.videoPreview.style.zIndex = String(this.config.zIndex + 100);
|
|
894
|
-
const
|
|
895
|
-
|
|
896
|
-
const
|
|
897
|
-
|
|
898
|
-
const
|
|
899
|
-
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
const l = document.createElement("button");
|
|
905
|
-
l.type = "button", l.className = "qaid-video-btn qaid-video-btn-cancel", l.textContent = "Cancel", l.addEventListener("click", () => this.cancelRecordingPreview());
|
|
944
|
+
const i = document.createElement("div");
|
|
945
|
+
i.className = "qaid-video-preview-box";
|
|
946
|
+
const n = document.createElement("h3");
|
|
947
|
+
n.textContent = "Review your recording";
|
|
948
|
+
const a = document.createElement("video");
|
|
949
|
+
a.src = o, a.controls = !0, a.autoplay = !0, a.muted = !0;
|
|
950
|
+
const s = document.createElement("textarea");
|
|
951
|
+
s.placeholder = "Optional: Describe the issue you recorded...";
|
|
952
|
+
const l = document.createElement("div");
|
|
953
|
+
l.className = "qaid-video-preview-actions";
|
|
906
954
|
const d = document.createElement("button");
|
|
907
|
-
d.type = "button", d.className = "qaid-video-btn qaid-video-btn-
|
|
955
|
+
d.type = "button", d.className = "qaid-video-btn qaid-video-btn-cancel", d.textContent = "Cancel", d.addEventListener("click", () => this.cancelRecordingPreview());
|
|
956
|
+
const r = document.createElement("button");
|
|
957
|
+
r.type = "button", r.className = "qaid-video-btn qaid-video-btn-rerecord", r.textContent = "Re-record", r.addEventListener("click", () => {
|
|
908
958
|
this.cancelRecordingPreview(), this.startRecording();
|
|
909
959
|
});
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
const
|
|
913
|
-
this.submitVideoFeedback(
|
|
914
|
-
}),
|
|
960
|
+
const c = document.createElement("button");
|
|
961
|
+
c.type = "button", c.className = "qaid-video-btn qaid-video-btn-send", c.textContent = "Send", c.addEventListener("click", () => {
|
|
962
|
+
const u = s.value.trim() || null;
|
|
963
|
+
this.submitVideoFeedback(u, c);
|
|
964
|
+
}), l.appendChild(d), l.appendChild(r), l.appendChild(c), i.appendChild(n), i.appendChild(a), i.appendChild(s), i.appendChild(l), this.videoPreview.appendChild(i), this.applyVars(this.videoPreview), this.overlayShadowHost && (this.overlayShadowHost.style.pointerEvents = "auto"), t.appendChild(this.videoPreview), document.addEventListener("keydown", this.boundKeyDown);
|
|
915
965
|
}
|
|
916
966
|
cancelRecordingPreview() {
|
|
917
967
|
this.removeVideoPreview(), this.cleanupRecording();
|
|
@@ -923,15 +973,15 @@ class Pt {
|
|
|
923
973
|
}
|
|
924
974
|
document.removeEventListener("keydown", this.boundKeyDown);
|
|
925
975
|
}
|
|
926
|
-
async submitVideoFeedback(t,
|
|
976
|
+
async submitVideoFeedback(t, o) {
|
|
927
977
|
if (!this.recordedBlob || this.isSendingVideo) return;
|
|
928
|
-
this.isSendingVideo = !0,
|
|
929
|
-
const
|
|
930
|
-
|
|
978
|
+
this.isSendingVideo = !0, o.disabled = !0, o.textContent = "Sending...";
|
|
979
|
+
const i = new FormData();
|
|
980
|
+
i.append("video", this.recordedBlob, `recording.${this.recordedBlob.type.includes("mp4") ? "mp4" : "webm"}`), i.append("pageUrl", window.location.href), i.append("visitorId", this.visitorId), this.config.apiKey && i.append("apiKey", this.config.apiKey), t && i.append("message", t), this.consoleCapture && i.append("consoleErrors", JSON.stringify(this.consoleCapture.errors)), this.networkCapture && i.append("networkErrors", JSON.stringify(this.networkCapture.errors));
|
|
931
981
|
try {
|
|
932
982
|
const n = await fetch(`${this.config.endpoint}/video`, {
|
|
933
983
|
method: "POST",
|
|
934
|
-
body:
|
|
984
|
+
body: i
|
|
935
985
|
});
|
|
936
986
|
n.ok || console.error("Failed to submit video feedback:", await n.text());
|
|
937
987
|
} catch (n) {
|
|
@@ -940,102 +990,108 @@ class Pt {
|
|
|
940
990
|
this.isSendingVideo = !1, this.removeVideoPreview(), this.cleanupRecording();
|
|
941
991
|
}
|
|
942
992
|
cleanupRecording() {
|
|
943
|
-
this.isRecording = !1, this.removeRecordingIndicator(), this.videoRecorder && (this.videoRecorder.destroy(), this.videoRecorder = null), this.networkCapture && (this.networkCapture.restore(), this.networkCapture = null), this.recordedBlob && (this.recordedBlob = null), this.setButtonsDisabled(!1);
|
|
993
|
+
this.isRecording = !1, this.removeRecordingIndicator(), this.videoRecorder && (this.videoRecorder.destroy(), this.videoRecorder = null), this.networkCapture && (this.networkCapture.restore(), this.networkCapture = null), this.recordedBlob && (this.recordedBlob = null), this.setButtonsDisabled(!1), this.overlayShadowHost && this.state === "IDLE" && (this.overlayShadowHost.style.pointerEvents = "none");
|
|
944
994
|
}
|
|
945
995
|
setButtonsDisabled(t) {
|
|
946
|
-
if (!this.
|
|
947
|
-
this.
|
|
948
|
-
t ?
|
|
996
|
+
if (!this.buttonsContainer) return;
|
|
997
|
+
this.buttonsContainer.querySelectorAll("button.qaid-btn, button.qaid-btn-structural").forEach((i) => {
|
|
998
|
+
t ? i.classList.contains("qaid-btn-record") || (i.disabled = !0, i.style.opacity = "0.5") : (i.disabled = !1, i.style.opacity = "");
|
|
949
999
|
});
|
|
950
1000
|
}
|
|
951
1001
|
/**
|
|
952
1002
|
* Destroy the embed and clean up all resources
|
|
953
1003
|
*/
|
|
954
1004
|
destroy() {
|
|
955
|
-
this.cleanupRecording(), this.removeVideoPreview(), this.consoleCapture && (this.consoleCapture.restore(), this.consoleCapture = null), window.removeEventListener("resize", this.boundResize), document.removeEventListener("keydown", this.boundKeyDown),
|
|
1005
|
+
this.cleanupRecording(), this.removeVideoPreview(), this.consoleCapture && (this.consoleCapture.restore(), this.consoleCapture = null), window.removeEventListener("resize", this.boundResize), document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("mousemove", this.boundMouseMove), document.removeEventListener("click", this.boundClick, !0), 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.overlayContainer = null, this.captureLayer = null, this.crosshairH = null, this.crosshairV = null, this.scope = null, this.marker = null, this.modalContainer = null, this.backdrop = null, this.tooltipElement = null, pt();
|
|
956
1006
|
}
|
|
957
1007
|
}
|
|
958
|
-
function
|
|
959
|
-
var
|
|
960
|
-
const
|
|
1008
|
+
function W(e) {
|
|
1009
|
+
var o;
|
|
1010
|
+
const t = document.querySelector(e);
|
|
1011
|
+
return ((o = t == null ? void 0 : t.textContent) == null ? void 0 : o.trim()) ?? "";
|
|
1012
|
+
}
|
|
1013
|
+
function Ft() {
|
|
1014
|
+
var o;
|
|
1015
|
+
const e = document.querySelector(
|
|
961
1016
|
'script[type="application/json"][data-feedback-config]'
|
|
962
1017
|
);
|
|
963
|
-
if (!
|
|
964
|
-
const t = (
|
|
1018
|
+
if (!e) return null;
|
|
1019
|
+
const t = (o = e.textContent) == null ? void 0 : o.trim();
|
|
965
1020
|
if (!t) return null;
|
|
966
1021
|
try {
|
|
967
|
-
|
|
1022
|
+
const i = JSON.parse(t);
|
|
1023
|
+
return i.cssSelector && !i.css && (i.css = W(i.cssSelector), delete i.cssSelector), i;
|
|
968
1024
|
} catch {
|
|
969
1025
|
return null;
|
|
970
1026
|
}
|
|
971
1027
|
}
|
|
972
|
-
function
|
|
973
|
-
const t =
|
|
1028
|
+
function Wt(e) {
|
|
1029
|
+
const t = e.getAttribute("data-endpoint");
|
|
974
1030
|
if (!t) return null;
|
|
975
|
-
const
|
|
1031
|
+
const o = e.getAttribute("data-position"), i = e.getAttribute("data-zindex"), n = e.getAttribute("data-positive-color"), a = e.getAttribute("data-negative-color"), s = e.getAttribute("data-marker-color"), l = e.getAttribute("data-container"), d = e.getAttribute("data-button-class"), r = e.getAttribute("data-skip-targeting"), c = e.getAttribute("data-incognito"), u = e.getAttribute("data-button-size"), p = e.getAttribute("data-offset-x"), f = e.getAttribute("data-offset-y"), b = e.getAttribute("data-modal-width"), g = e.getAttribute("data-backdrop-opacity"), m = e.getAttribute("data-font-family"), v = e.getAttribute("data-font-size"), y = e.getAttribute("data-tooltip"), q = e.getAttribute("data-modal-title"), L = e.getAttribute("data-modal-subtitle"), R = e.getAttribute("data-placeholder"), M = e.getAttribute("data-submit-button"), D = e.getAttribute("data-skip-button"), X = e.getAttribute("data-positive-icon"), _ = e.getAttribute("data-negative-icon"), j = e.getAttribute("data-api-key"), K = e.getAttribute("data-capture-screenshot"), C = e.getAttribute("data-screenshot-quality"), S = e.getAttribute("data-screenshot-max-width"), E = e.getAttribute("data-screenshot-max-height"), Y = e.getAttribute("data-capture-video"), J = e.getAttribute("data-hide-thumbs"), z = e.getAttribute("data-video-max-duration"), G = e.getAttribute("data-screenshot-method"), Z = e.getAttribute("data-direction"), H = e.getAttribute("data-css-selector");
|
|
976
1032
|
return {
|
|
977
1033
|
endpoint: t,
|
|
1034
|
+
css: H ? W(H) : void 0,
|
|
978
1035
|
apiKey: j ?? void 0,
|
|
979
1036
|
captureScreenshot: K === "true" ? !0 : void 0,
|
|
980
|
-
screenshotOptions:
|
|
981
|
-
quality:
|
|
982
|
-
maxWidth:
|
|
1037
|
+
screenshotOptions: C || S || E ? {
|
|
1038
|
+
quality: C ? parseFloat(C) : void 0,
|
|
1039
|
+
maxWidth: S ? parseInt(S, 10) : void 0,
|
|
983
1040
|
maxHeight: E ? parseInt(E, 10) : void 0
|
|
984
1041
|
} : void 0,
|
|
985
1042
|
container: l ?? void 0,
|
|
986
1043
|
buttonClass: d ?? void 0,
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1044
|
+
direction: Z ?? void 0,
|
|
1045
|
+
position: o ?? void 0,
|
|
1046
|
+
zIndex: i ? parseInt(i, 10) : void 0,
|
|
1047
|
+
skipTargeting: r === "true" ? !0 : void 0,
|
|
990
1048
|
incognito: c === "true" ? !0 : void 0,
|
|
991
|
-
buttonSize:
|
|
992
|
-
offset:
|
|
993
|
-
x:
|
|
1049
|
+
buttonSize: u ?? void 0,
|
|
1050
|
+
offset: p || f ? {
|
|
1051
|
+
x: p ? parseInt(p, 10) : void 0,
|
|
994
1052
|
y: f ? parseInt(f, 10) : void 0
|
|
995
1053
|
} : void 0,
|
|
996
|
-
modalWidth:
|
|
997
|
-
backdropOpacity:
|
|
1054
|
+
modalWidth: b ? parseInt(b, 10) : void 0,
|
|
1055
|
+
backdropOpacity: g ? parseFloat(g) : void 0,
|
|
998
1056
|
fontFamily: m ?? void 0,
|
|
999
1057
|
fontSize: v ? parseInt(v, 10) : void 0,
|
|
1000
1058
|
colors: {
|
|
1001
1059
|
positive: n ?? void 0,
|
|
1002
1060
|
negative: a ?? void 0,
|
|
1003
|
-
marker:
|
|
1061
|
+
marker: s ?? void 0
|
|
1004
1062
|
},
|
|
1005
|
-
text: y || q ||
|
|
1063
|
+
text: y || q || L || R || M || D ? {
|
|
1006
1064
|
tooltip: y ?? void 0,
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
modalTitle: D ?? void 0,
|
|
1010
|
-
modalSubtitle: z ?? void 0,
|
|
1065
|
+
modalTitle: q ?? void 0,
|
|
1066
|
+
modalSubtitle: L ?? void 0,
|
|
1011
1067
|
placeholder: R ?? void 0,
|
|
1012
|
-
submitButton:
|
|
1013
|
-
skipButton:
|
|
1068
|
+
submitButton: M ?? void 0,
|
|
1069
|
+
skipButton: D ?? void 0
|
|
1014
1070
|
} : void 0,
|
|
1015
1071
|
positiveIcon: X ?? void 0,
|
|
1016
1072
|
negativeIcon: _ ?? void 0,
|
|
1017
1073
|
screenshotMethod: G ?? void 0,
|
|
1018
1074
|
captureVideo: Y === "true" ? !0 : void 0,
|
|
1019
1075
|
hideThumbs: J === "true" ? !0 : void 0,
|
|
1020
|
-
videoOptions:
|
|
1021
|
-
maxDuration: parseInt(
|
|
1076
|
+
videoOptions: z ? {
|
|
1077
|
+
maxDuration: parseInt(z, 10)
|
|
1022
1078
|
} : void 0
|
|
1023
1079
|
};
|
|
1024
1080
|
}
|
|
1025
1081
|
if (typeof document < "u") {
|
|
1026
|
-
const
|
|
1027
|
-
const t = document.currentScript,
|
|
1028
|
-
n != null && n.endpoint && new
|
|
1082
|
+
const e = () => {
|
|
1083
|
+
const t = document.currentScript, o = Ft(), i = t ? Wt(t) : null, n = o ?? i;
|
|
1084
|
+
n != null && n.endpoint && new Ut(n);
|
|
1029
1085
|
};
|
|
1030
|
-
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
1086
|
+
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : e();
|
|
1031
1087
|
}
|
|
1032
1088
|
export {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1089
|
+
Ut as QaidFeedback,
|
|
1090
|
+
Nt as captureDomScreenshot,
|
|
1091
|
+
Rt as captureNetworkErrors,
|
|
1092
|
+
zt as createVideoRecorder,
|
|
1093
|
+
Dt as getSupportedMimeType,
|
|
1094
|
+
_t as isDomScreenshotSupported,
|
|
1095
|
+
Mt as isVideoRecordingSupported
|
|
1040
1096
|
};
|
|
1041
1097
|
//# sourceMappingURL=qaid.js.map
|