bugstash 0.1.28 → 0.1.30
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/package.json +1 -1
- package/dist/index.cjs +0 -2033
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -112
- package/dist/index.d.ts +0 -112
- package/dist/index.js +0 -2033
- package/dist/index.js.map +0 -1
package/dist/index.cjs
DELETED
|
@@ -1,2033 +0,0 @@
|
|
|
1
|
-
"use strict";var dn=Object.defineProperty;var Ds=Object.getOwnPropertyDescriptor;var Bs=Object.getOwnPropertyNames;var Ns=Object.prototype.hasOwnProperty;var Os=(e,t)=>{for(var n in t)dn(e,n,{get:t[n],enumerable:!0})},js=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Bs(t))!Ns.call(e,s)&&s!==n&&dn(e,s,{get:()=>t[s],enumerable:!(r=Ds(t,s))||r.enumerable});return e};var qs=e=>js(dn({},"__esModule",{value:!0}),e);var Mi={};Os(Mi,{BugStash:()=>Is,default:()=>$i});module.exports=qs(Mi);var tt=[],Jn=50,nt=null,rt=null,st=null,ot=null;function Pt(e){if(e.id)return`#${e.id}`;let t=e.tagName.toLowerCase(),n=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"",r=(e.textContent||"").trim().slice(0,30),s=r?` "${r}"`:"";return`${t}${n}${s}`}function V(e){tt.push(e),tt.length>Jn&&tt.shift()}function Kn(e){e&&(Jn=e),nt=n=>{let r=n.target;!r||!r.tagName||V({type:"click",category:"ui",message:`Clicked ${Pt(r)}`,timestamp:Date.now(),data:{x:n.clientX,y:n.clientY,selector:Pt(r)}})},document.addEventListener("click",nt,!0);let t=new WeakMap;rt=n=>{let r=n.target;if(!r||!r.tagName)return;let s=r.tagName.toLowerCase();if(s!=="input"&&s!=="textarea"&&s!=="select")return;let o=t.get(r);o&&clearTimeout(o),t.set(r,window.setTimeout(()=>{let i=r instanceof HTMLInputElement&&r.type==="password";V({type:"input",category:"ui",message:`Input ${Pt(r)}`,timestamp:Date.now(),data:{selector:Pt(r),value:i?"[redacted]":void 0}})},300))},document.addEventListener("input",rt,!0),st=()=>{V({type:"navigation",category:"navigation",message:`Navigated to ${window.location.pathname}`,timestamp:Date.now(),data:{url:window.location.href}})},window.addEventListener("popstate",st),ot=()=>{V({type:"navigation",category:"navigation",message:`Hash changed to ${window.location.hash}`,timestamp:Date.now(),data:{url:window.location.href}})},window.addEventListener("hashchange",ot),V({type:"navigation",category:"navigation",message:`Page loaded: ${window.location.pathname}`,timestamp:Date.now(),data:{url:window.location.href}})}function Ie(){return[...tt]}function Gn(){tt=[]}function Qn(){nt&&document.removeEventListener("click",nt,!0),rt&&document.removeEventListener("input",rt,!0),st&&window.removeEventListener("popstate",st),ot&&window.removeEventListener("hashchange",ot),nt=null,rt=null,st=null,ot=null}var pn="[REDACTED]",Us=[[/\b(?:\d[ -]*?){13,19}\b/g,"[CC_REDACTED]"],[/\b\d{3}-\d{2}-\d{4}\b/g,"[SSN_REDACTED]"],[/Bearer\s+[A-Za-z0-9\-._~+/]+=*/g,"Bearer [TOKEN_REDACTED]"],[/eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,"[JWT_REDACTED]"],[/(?:api[_-]?key|apikey|secret|token|password|passwd|authorization)['":\s=]+['"]?([A-Za-z0-9\-._~+/]{20,})['"]?/gi,e=>{let t=e.search(/[=:]/);return e.slice(0,t+1)+" "+pn}],[/AKIA[0-9A-Z]{16}/g,"[AWS_KEY_REDACTED]"],[/"(?:password|passwd|secret|token|access_token|refresh_token|api_key|apiKey|private_key)":\s*"[^"]*"/gi,e=>{let t=e.indexOf(":");return e.slice(0,t+1)+' "'+pn+'"'}]];function Re(e){let t=e;for(let[n,r]of Us)t=t.replace(n,r);return t}function Zn(e){return e.map(Re)}function Tt(e){if(typeof e=="string")return Re(e);if(Array.isArray(e))return e.map(Tt);if(e&&typeof e=="object"){let t={};for(let[n,r]of Object.entries(e)){let s=n.toLowerCase();s.includes("password")||s.includes("secret")||s.includes("token")||s.includes("apikey")||s.includes("api_key")||s.includes("private")?t[n]=pn:t[n]=Tt(r)}return t}return e}var $t={log:console.log,warn:console.warn,error:console.error,debug:console.debug,info:console.info},it=[],er=50;function _s(e){return e.map(t=>{if(t instanceof Error)return`${t.name}: ${t.message}
|
|
2
|
-
${t.stack??""}`;if(typeof t=="object")try{return JSON.stringify(t,null,2)}catch{return String(t)}return String(t)})}function Fs(e,t){let n={level:e,args:Zn(_s(t)),timestamp:Date.now()};e==="error"&&(n.stack=new Error().stack?.split(`
|
|
3
|
-
`).slice(2).join(`
|
|
4
|
-
`)),it.push(n),it.length>er&&it.shift(),V({type:"console",category:`console.${e}`,message:n.args.join(" ").slice(0,200),timestamp:n.timestamp})}function tr(e){e&&(er=e);for(let t of Object.keys($t))console[t]=function(...n){Fs(t,n),$t[t].apply(console,n)}}function fe(){return[...it]}function nr(){it=[]}function rr(){for(let e of Object.keys($t))console[e]=$t[e]}var ze=[],sr=50,Mt,At,It;function bn(e){ze.push(e),ze.length>sr&&ze.shift(),V({type:"network",category:e.failed?"network.error":"network.ok",message:`${e.method} ${e.url} \u2192 ${e.status} (${e.duration}ms)`,timestamp:e.timestamp,data:{status:e.status,duration:e.duration}})}function or(e){try{let t=new URL(e,window.location.origin),n=new URLSearchParams(t.search);for(let s of n.keys()){let o=s.toLowerCase();(o.includes("token")||o.includes("key")||o.includes("secret")||o.includes("password")||o.includes("auth"))&&n.set(s,"[REDACTED]")}let r=n.toString();return t.pathname+(r?"?"+r:"")}catch{return Re(e)}}function Ws(){Mt=window.fetch,window.fetch=async function(e,t){let n=t?.method?.toUpperCase()??"GET",r=typeof e=="string"?e:e instanceof URL?e.href:e.url,s=or(r),o=Date.now();try{let i=await Mt.call(window,e,t);return bn({method:n,url:s,status:i.status,statusText:i.statusText,duration:Date.now()-o,responseType:i.headers.get("content-type")??void 0,timestamp:o,failed:i.status>=400}),i}catch(i){throw bn({method:n,url:s,status:0,statusText:"Network Error",duration:Date.now()-o,timestamp:o,failed:!0}),i}}}function Ys(){At=XMLHttpRequest.prototype.open,It=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.open=function(e,t,...n){return this.__bs_method=e.toUpperCase(),this.__bs_url=or(typeof t=="string"?t:t.href),At.apply(this,[e,t,...n])},XMLHttpRequest.prototype.send=function(e){let t=Date.now();return this.addEventListener("loadend",function(){bn({method:this.__bs_method??"GET",url:this.__bs_url??"",status:this.status,statusText:this.statusText,duration:Date.now()-t,responseType:this.getResponseHeader("content-type")??void 0,timestamp:t,failed:this.status>=400||this.status===0})}),It.call(this,e)}}function ir(e){e&&(sr=e),Ws(),Ys()}function He(){return[...ze]}function xe(){return ze.filter(e=>e.failed)}function ar(){ze=[]}function lr(){Mt&&(window.fetch=Mt),At&&(XMLHttpRequest.prototype.open=At),It&&(XMLHttpRequest.prototype.send=It)}var Rt=[],at=null,lt=null;function cr(){at=e=>{let t={message:e.message||"Unknown error",source:e.filename,lineno:e.lineno,colno:e.colno,stack:e.error?.stack,type:"error",timestamp:Date.now()};Rt.push(t),V({type:"error",category:"exception",message:t.message,timestamp:t.timestamp,data:{source:t.source,lineno:t.lineno}})},lt=e=>{let t=e.reason,n=t instanceof Error?t.message:typeof t=="string"?t:"Unhandled promise rejection",r={message:n,stack:t instanceof Error?t.stack:void 0,type:"unhandledrejection",timestamp:Date.now()};Rt.push(r),V({type:"error",category:"promise",message:n,timestamp:r.timestamp})},window.addEventListener("error",at),window.addEventListener("unhandledrejection",lt)}function ge(){return[...Rt]}function dr(){Rt=[]}function pr(){at&&window.removeEventListener("error",at),lt&&window.removeEventListener("unhandledrejection",lt),at=null,lt=null}var R=null,zt=null,Ht=null,Dt=null;function br(){if(R={timestamp:Date.now()},performance.getEntriesByType){let e=()=>{let[t]=performance.getEntriesByType("navigation");t&&R&&(R.pageLoadTime=Math.round(t.loadEventEnd-t.startTime),R.domContentLoaded=Math.round(t.domContentLoadedEventEnd-t.startTime));let n=performance.getEntriesByType("paint");for(let s of n)s.name==="first-paint"&&R&&(R.firstPaint=Math.round(s.startTime)),s.name==="first-contentful-paint"&&R&&(R.firstContentfulPaint=Math.round(s.startTime));R&&(R.resourceCount=performance.getEntriesByType("resource").length);let r=performance.memory;r&&R&&(R.memoryUsage={usedJSHeapSize:r.usedJSHeapSize,totalJSHeapSize:r.totalJSHeapSize})};document.readyState==="complete"?setTimeout(e,0):window.addEventListener("load",()=>setTimeout(e,100))}if(typeof PerformanceObserver<"u"){try{zt=new PerformanceObserver(e=>{let t=e.getEntries(),n=t[t.length-1];n&&R&&(R.largestContentfulPaint=Math.round(n.startTime))}),zt.observe({type:"largest-contentful-paint",buffered:!0})}catch{}try{let e=0;Ht=new PerformanceObserver(t=>{for(let n of t.getEntries())n.hadRecentInput||(e+=n.value);R&&(R.cumulativeLayoutShift=Math.round(e*1e3)/1e3)}),Ht.observe({type:"layout-shift",buffered:!0})}catch{}try{Dt=new PerformanceObserver(e=>{let[t]=e.getEntries();t&&R&&(R.firstInputDelay=Math.round(t.processingStart-t.startTime))}),Dt.observe({type:"first-input",buffered:!0})}catch{}}}function De(){return R&&(R.timestamp=Date.now()),R?{...R}:null}function ur(){zt?.disconnect(),Ht?.disconnect(),Dt?.disconnect(),zt=null,Ht=null,Dt=null,R=null}function mr(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let n=document.implementation.createHTMLDocument(),r=n.createElement("base"),s=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(s),t&&(r.href=t),s.href=e,s.href}var fr=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function oe(e){let t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}var Be=null;function Nt(e={}){return Be||(e.includeStyleProperties?(Be=e.includeStyleProperties,Be):(Be=oe(window.getComputedStyle(document.documentElement)),Be))}function Bt(e,t){let r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function Xs(e){let t=Bt(e,"border-left-width"),n=Bt(e,"border-right-width");return e.clientWidth+t+n}function Vs(e){let t=Bt(e,"border-top-width"),n=Bt(e,"border-bottom-width");return e.clientHeight+t+n}function un(e,t={}){let n=t.width||Xs(e),r=t.height||Vs(e);return{width:n,height:r}}function gr(){let e,t;try{t=process}catch{}let n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var ee=16384;function hr(e){(e.width>ee||e.height>ee)&&(e.width>ee&&e.height>ee?e.width>e.height?(e.height*=ee/e.width,e.width=ee):(e.width*=ee/e.height,e.height=ee):e.width>ee?(e.height*=ee/e.width,e.width=ee):(e.width*=ee/e.height,e.height=ee))}function Ne(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Js(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function vr(e,t,n){let r="http://www.w3.org/2000/svg",s=document.createElementNS(r,"svg"),o=document.createElementNS(r,"foreignObject");return s.setAttribute("width",`${t}`),s.setAttribute("height",`${n}`),s.setAttribute("viewBox",`0 0 ${t} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),s.appendChild(o),o.appendChild(e),Js(s)}var Y=(e,t)=>{if(e instanceof t)return!0;let n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||Y(n,t)};function Ks(e){let t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Gs(e,t){return Nt(t).map(n=>{let r=e.getPropertyValue(n),s=e.getPropertyPriority(n);return`${n}: ${r}${s?" !important":""};`}).join(" ")}function Qs(e,t,n,r){let s=`.${e}:${t}`,o=n.cssText?Ks(n):Gs(n,r);return document.createTextNode(`${s}{${o}}`)}function yr(e,t,n,r){let s=window.getComputedStyle(e,n),o=s.getPropertyValue("content");if(o===""||o==="none")return;let i=fr();try{t.className=`${t.className} ${i}`}catch{return}let a=document.createElement("style");a.appendChild(Qs(i,n,s,r)),t.appendChild(a)}function xr(e,t,n){yr(e,t,":before",n),yr(e,t,":after",n)}var wr="application/font-woff",kr="image/jpeg",Zs={woff:wr,woff2:wr,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:kr,jpeg:kr,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function eo(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Oe(e){let t=eo(e).toLowerCase();return Zs[t]||""}function to(e){return e.split(/,/)[1]}function ct(e){return e.search(/^(data:)/)!==-1}function fn(e,t){return`data:${t};base64,${e}`}async function gn(e,t,n){let r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);let s=await r.blob();return new Promise((o,i)=>{let a=new FileReader;a.onerror=i,a.onloadend=()=>{try{o(n({res:r,result:a.result}))}catch(d){i(d)}},a.readAsDataURL(s)})}var mn={};function no(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function je(e,t,n){let r=no(e,t,n.includeQueryParams);if(mn[r]!=null)return mn[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let s;try{let o=await gn(e,n.fetchRequestInit,({res:i,result:a})=>(t||(t=i.headers.get("Content-Type")||""),to(a)));s=fn(o,t)}catch(o){s=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;o&&(i=typeof o=="string"?o:o.message),i&&console.warn(i)}return mn[r]=s,s}async function ro(e){let t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Ne(t)}async function so(e,t){if(e.currentSrc){let o=document.createElement("canvas"),i=o.getContext("2d");o.width=e.clientWidth,o.height=e.clientHeight,i?.drawImage(e,0,0,o.width,o.height);let a=o.toDataURL();return Ne(a)}let n=e.poster,r=Oe(n),s=await je(n,r,t);return Ne(s)}async function oo(e,t){var n;try{if(!((n=e?.contentDocument)===null||n===void 0)&&n.body)return await dt(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function io(e,t){return Y(e,HTMLCanvasElement)?ro(e):Y(e,HTMLVideoElement)?so(e,t):Y(e,HTMLIFrameElement)?oo(e,t):e.cloneNode(Er(e))}var ao=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Er=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function lo(e,t,n){var r,s;if(Er(t))return t;let o=[];return ao(e)&&e.assignedNodes?o=oe(e.assignedNodes()):Y(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?o=oe(e.contentDocument.body.childNodes):o=oe(((s=e.shadowRoot)!==null&&s!==void 0?s:e).childNodes),o.length===0||Y(e,HTMLVideoElement)||await o.reduce((i,a)=>i.then(()=>dt(a,n)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function co(e,t,n){let r=t.style;if(!r)return;let s=window.getComputedStyle(e);s.cssText?(r.cssText=s.cssText,r.transformOrigin=s.transformOrigin):Nt(n).forEach(o=>{let i=s.getPropertyValue(o);o==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),Y(e,HTMLIFrameElement)&&o==="display"&&i==="inline"&&(i="block"),o==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),r.setProperty(o,i,s.getPropertyPriority(o))})}function po(e,t){Y(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),Y(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function bo(e,t){if(Y(e,HTMLSelectElement)){let r=Array.from(t.children).find(s=>e.value===s.getAttribute("value"));r&&r.setAttribute("selected","")}}function uo(e,t,n){return Y(t,Element)&&(co(e,t,n),xr(e,t,n),po(e,t),bo(e,t)),t}async function mo(e,t){let n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;let r={};for(let o=0;o<n.length;o++){let a=n[o].getAttribute("xlink:href");if(a){let d=e.querySelector(a),p=document.querySelector(a);!d&&p&&!r[a]&&(r[a]=await dt(p,t,!0))}}let s=Object.values(r);if(s.length){let o="http://www.w3.org/1999/xhtml",i=document.createElementNS(o,"svg");i.setAttribute("xmlns",o),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";let a=document.createElementNS(o,"defs");i.appendChild(a);for(let d=0;d<s.length;d++)a.appendChild(s[d]);e.appendChild(i)}return e}async function dt(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>io(r,t)).then(r=>lo(e,r,t)).then(r=>uo(e,r,t)).then(r=>mo(r,t))}var Sr=/url\((['"]?)([^'"]+?)\1\)/g,fo=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,go=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function ho(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function vo(e){let t=[];return e.replace(Sr,(n,r,s)=>(t.push(s),n)),t.filter(n=>!ct(n))}async function yo(e,t,n,r,s){try{let o=n?mr(t,n):t,i=Oe(t),a;if(s){let d=await s(o);a=fn(d,i)}else a=await je(o,i,r);return e.replace(ho(t),`$1${a}$3`)}catch{}return e}function xo(e,{preferredFontFormat:t}){return t?e.replace(go,n=>{for(;;){let[r,,s]=fo.exec(n)||[];if(!s)return"";if(s===t)return`src: ${r};`}}):e}function hn(e){return e.search(Sr)!==-1}async function Ot(e,t,n){if(!hn(e))return e;let r=xo(e,n);return vo(r).reduce((o,i)=>o.then(a=>yo(a,i,t,n)),Promise.resolve(r))}async function qe(e,t,n){var r;let s=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(s){let o=await Ot(s,null,n);return t.style.setProperty(e,o,t.style.getPropertyPriority(e)),!0}return!1}async function wo(e,t){await qe("background",e,t)||await qe("background-image",e,t),await qe("mask",e,t)||await qe("-webkit-mask",e,t)||await qe("mask-image",e,t)||await qe("-webkit-mask-image",e,t)}async function ko(e,t){let n=Y(e,HTMLImageElement);if(!(n&&!ct(e.src))&&!(Y(e,SVGImageElement)&&!ct(e.href.baseVal)))return;let r=n?e.src:e.href.baseVal,s=await je(r,Oe(r),t);await new Promise((o,i)=>{e.onload=o,e.onerror=t.onImageErrorHandler?(...d)=>{try{o(t.onImageErrorHandler(...d))}catch(p){i(p)}}:i;let a=e;a.decode&&(a.decode=o),a.loading==="lazy"&&(a.loading="eager"),n?(e.srcset="",e.src=s):e.href.baseVal=s})}async function Eo(e,t){let r=oe(e.childNodes).map(s=>vn(s,t));await Promise.all(r).then(()=>e)}async function vn(e,t){Y(e,Element)&&(await wo(e,t),await ko(e,t),await Eo(e,t))}function Lr(e,t){let{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);let r=t.style;return r!=null&&Object.keys(r).forEach(s=>{n[s]=r[s]}),e}var Cr={};async function Pr(e){let t=Cr[e];if(t!=null)return t;let r=await(await fetch(e)).text();return t={url:e,cssText:r},Cr[e]=t,t}async function Tr(e,t){let n=e.cssText,r=/url\(["']?([^"')]+)["']?\)/g,o=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let a=i.replace(r,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),gn(a,t.fetchRequestInit,({result:d})=>(n=n.replace(i,`url(${d})`),[i,d]))});return Promise.all(o).then(()=>n)}function $r(e){if(e==null)return[];let t=[],n=/(\/\*[\s\S]*?\*\/)/gi,r=e.replace(n,""),s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let d=s.exec(r);if(d===null)break;t.push(d[0])}r=r.replace(s,"");let o=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",a=new RegExp(i,"gi");for(;;){let d=o.exec(r);if(d===null){if(d=a.exec(r),d===null)break;o.lastIndex=a.lastIndex}else a.lastIndex=o.lastIndex;t.push(d[0])}return t}async function So(e,t){let n=[],r=[];return e.forEach(s=>{if("cssRules"in s)try{oe(s.cssRules||[]).forEach((o,i)=>{if(o.type===CSSRule.IMPORT_RULE){let a=i+1,d=o.href,p=Pr(d).then(b=>Tr(b,t)).then(b=>$r(b).forEach(v=>{try{s.insertRule(v,v.startsWith("@import")?a+=1:s.cssRules.length)}catch(k){console.error("Error inserting rule from remote css",{rule:v,error:k})}})).catch(b=>{console.error("Error loading remote css",b.toString())});r.push(p)}})}catch(o){let i=e.find(a=>a.href==null)||document.styleSheets[0];s.href!=null&&r.push(Pr(s.href).then(a=>Tr(a,t)).then(a=>$r(a).forEach(d=>{i.insertRule(d,i.cssRules.length)})).catch(a=>{console.error("Error loading remote stylesheet",a)})),console.error("Error inlining remote css file",o)}}),Promise.all(r).then(()=>(e.forEach(s=>{if("cssRules"in s)try{oe(s.cssRules||[]).forEach(o=>{n.push(o)})}catch(o){console.error(`Error while reading CSS rules from ${s.href}`,o)}}),n))}function Lo(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>hn(t.style.getPropertyValue("src")))}async function Co(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");let n=oe(e.ownerDocument.styleSheets),r=await So(n,t);return Lo(r)}function Mr(e){return e.trim().replace(/["']/g,"")}function Po(e){let t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(o=>{t.add(Mr(o))}),Array.from(r.children).forEach(o=>{o instanceof HTMLElement&&n(o)})}return n(e),t}async function yn(e,t){let n=await Co(e,t),r=Po(e);return(await Promise.all(n.filter(o=>r.has(Mr(o.style.fontFamily))).map(o=>{let i=o.parentStyleSheet?o.parentStyleSheet.href:null;return Ot(o.cssText,i,t)}))).join(`
|
|
5
|
-
`)}async function Ar(e,t){let n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await yn(e,t);if(n){let r=document.createElement("style"),s=document.createTextNode(n);r.appendChild(s),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function To(e,t={}){let{width:n,height:r}=un(e,t),s=await dt(e,t,!0);return await Ar(s,t),await vn(s,t),Lr(s,t),await vr(s,n,r)}async function Ir(e,t={}){let{width:n,height:r}=un(e,t),s=await To(e,t),o=await Ne(s),i=document.createElement("canvas"),a=i.getContext("2d"),d=t.pixelRatio||gr(),p=t.canvasWidth||n,b=t.canvasHeight||r;return i.width=p*d,i.height=b*d,t.skipAutoScale||hr(i),i.style.width=`${p}`,i.style.height=`${b}`,t.backgroundColor&&(a.fillStyle=t.backgroundColor,a.fillRect(0,0,i.width,i.height)),a.drawImage(o,0,0,i.width,i.height),i}async function Rr(e,t={}){return yn(e,t)}function $o(){let e=document.createElement("div");if(e.style.cssText=`
|
|
6
|
-
position: fixed; inset: 0; z-index: 2147483647;
|
|
7
|
-
background: white; opacity: 0;
|
|
8
|
-
pointer-events: none;
|
|
9
|
-
animation: bs-flash 0.4s ease-out forwards;
|
|
10
|
-
`,!document.getElementById("bs-flash-style")){let t=document.createElement("style");t.id="bs-flash-style",t.textContent=`
|
|
11
|
-
@keyframes bs-flash {
|
|
12
|
-
0% { opacity: 0; }
|
|
13
|
-
15% { opacity: 0.7; }
|
|
14
|
-
100% { opacity: 0; }
|
|
15
|
-
}
|
|
16
|
-
`,document.head.appendChild(t)}document.body.appendChild(e),e.addEventListener("animationend",()=>e.remove())}var zr=e=>{let t=e.tagName.toLowerCase();return t==="bugstash-root"||t==="bugstash-overlay"||t==="bugstash-pin"||e.classList?.contains("bs-fab")||e.classList?.contains("bs-toolbar")||e.classList?.contains("bs-modal")||e.classList?.contains("bs-backdrop")||e.id==="bs-flash-style"||e.id==="bugstash-live-pins"||e.id==="bugstash-pin-overlay"};async function jt(e=!1){e&&$o();try{let n=await Mo();if(n)return n}catch{}let t=[{tier:"high",timeout:5e3},{tier:"reduced",timeout:8e3},{tier:"reduced-skip-cors",timeout:8e3}];for(let{tier:n,timeout:r}of t)try{let s=await zo(n,r);if(s)return s}catch{}return null}async function Mo(){if(!navigator.mediaDevices?.getDisplayMedia)return null;let e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",width:{ideal:window.screen.width*(window.devicePixelRatio||1)},height:{ideal:window.screen.height*(window.devicePixelRatio||1)}},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include",monitorTypeSurfaces:"exclude"});try{if(!e.getVideoTracks()[0])return null;let n=document.createElement("video");n.srcObject=e,n.muted=!0,n.playsInline=!0,await n.play(),await new Promise(o=>{if(n.readyState>=2){o();return}n.onloadeddata=()=>o()}),await new Promise(o=>requestAnimationFrame(()=>o()));let r=document.createElement("canvas");r.width=n.videoWidth,r.height=n.videoHeight;let s=r.getContext("2d");return s?(s.drawImage(n,0,0),r.toDataURL("image/png")):null}finally{e.getTracks().forEach(t=>t.stop())}}function Ao(){let e=document.createElement("style");return e.id="bs-pause-animations",e.textContent=`
|
|
17
|
-
*, *::before, *::after {
|
|
18
|
-
animation-play-state: paused !important;
|
|
19
|
-
transition: none !important;
|
|
20
|
-
}
|
|
21
|
-
`,document.head.appendChild(e),()=>e.remove()}function Io(e,t){let n=e.getContext("2d");if(!n)return;let r=window.scrollX,s=window.scrollY;document.querySelectorAll("canvas, video").forEach(i=>{if(zr(i))return;let a=i.getBoundingClientRect(),d=(a.left+r)*t,p=(a.top+s)*t,b=a.width*t,v=a.height*t;try{n.drawImage(i,d,p,b,v)}catch{}})}function Ro(e){return new Promise((t,n)=>{setTimeout(()=>n(new Error(`Screenshot capture timed out after ${e}ms`)),e)})}async function zo(e,t){let n=e==="reduced-skip-cors",r=e==="high"?Math.min(window.devicePixelRatio||1,3):Math.min(window.devicePixelRatio||1,2),s=window.getComputedStyle(document.body).backgroundColor,o=window.getComputedStyle(document.documentElement).backgroundColor,i=b=>!b||b==="transparent"||b==="rgba(0, 0, 0, 0)",a=i(s)?i(o)?"#ffffff":o:s,d=await Rr(document.body),p=Ao();try{let b=await Promise.race([Ir(document.body,{pixelRatio:r,backgroundColor:a,width:window.innerWidth,height:window.innerHeight,cacheBust:!0,fontEmbedCSS:d,filter:v=>{if(n&&v.tagName==="IMG"){let k=v.src||"";if(k&&!k.startsWith(window.location.origin)&&!k.startsWith("data:"))return!1}return!zr(v)},imagePlaceholder:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}),Ro(t)]);return Io(b,r),b.toDataURL("image/png")}finally{p()}}var Ho="https://bugstash-backend.vercel.app",Hr="https://bugstash-backend.vercel.app",X=Ho,xn=!1;function Dr(e){X=e.replace(/\/$/,""),xn=!1}function Br(){return X}async function ce(e,t){try{return await fetch(e,t)}catch(n){if(xn)throw n;xn=!0;let r=X;X=Hr;let s=e.replace(r,Hr);return fetch(s,t)}}var wn="bugstash_auth";function kn(){try{let e=localStorage.getItem(wn);if(!e)return null;let t=JSON.parse(e);return t.tokens.expiresAt<Date.now(),t}catch{return null}}function Nr(e){localStorage.setItem(wn,JSON.stringify(e))}function Do(){localStorage.removeItem(wn)}function ie(){return kn()?.user||null}function Or(){return kn()?.tokens.accessToken||null}async function we(){let e=kn();if(!e)return{"Content-Type":"application/json"};if(e.tokens.expiresAt<Date.now()+6e4)try{let t=await ce(`${X}/api/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:e.tokens.refreshToken})});if(t.ok){let n=await t.json();n.success&&(e.tokens=n.data,Nr(e))}}catch{}return{"Content-Type":"application/json",Authorization:`Bearer ${e.tokens.accessToken}`}}async function Ut(e,t,n){try{let s=await(await ce(`${X}/api/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:t,projectId:n})})).json();return s.success&&Nr({user:s.data.user,tokens:s.data.tokens}),s}catch{return{success:!1,error:"Network error"}}}async function _t(){Do()}async function En(e){try{let t=await we();return await(await ce(`${X}/api/reports`,{method:"POST",headers:t,body:JSON.stringify(e)})).json()}catch{return{success:!1,error:"Network error - could not reach BugStash"}}}async function jr(e,t){try{let n=await we();return await(await ce(`${X}/api/pins/by-page?projectId=${e}&pathname=${encodeURIComponent(t)}`,{headers:n})).json()}catch{return{success:!1,error:"Network error"}}}async function Sn(e){try{let t=await we();return await(await ce(`${X}/api/pins`,{method:"POST",headers:t,body:JSON.stringify(e)})).json()}catch{return{success:!1,error:"Network error"}}}async function Ft(e,t){try{let n=await we();return await(await ce(`${X}/api/pins/${e}`,{method:"PUT",headers:n,body:JSON.stringify(t)})).json()}catch{return{success:!1,error:"Network error"}}}async function qr(e){try{let t=await we();return await(await ce(`${X}/api/pins/${e}`,{method:"DELETE",headers:t})).json()}catch{return{success:!1,error:"Network error"}}}async function Ur(e){try{let t=await we();return await(await ce(`${X}/api/pins/${e}/comments`,{headers:t})).json()}catch{return{success:!1,error:"Network error"}}}async function Ln(e,t,n=[]){try{let r=await we();return await(await ce(`${X}/api/pins/${e}/comments`,{method:"POST",headers:r,body:JSON.stringify({body:t,mentions:n})})).json()}catch{return{success:!1,error:"Network error"}}}async function _r(e){try{let t=await we();return await(await ce(`${X}/api/members/for-project/${e}`,{headers:t})).json()}catch{return{success:!1,error:"Network error"}}}var qt=null;function Fr(e){return qt||(qt=(async()=>{try{let t=await fetch(`${X}/api/orgs/projects/${encodeURIComponent(e)}/verify-domain`,{headers:{"Content-Type":"application/json"}});return t.ok?(await t.json()).allowed===!0:!1}catch{return!1}})(),qt)}var Cn="bugstash_offline_queue";function Pn(e){let t=Wr();t.push({...e,id:Math.random().toString(36).slice(2),timestamp:Date.now()}),localStorage.setItem(Cn,JSON.stringify(t))}function Wr(){try{return JSON.parse(localStorage.getItem(Cn)||"[]")}catch{return[]}}async function Bo(){let e=Wr();if(e.length===0)return 0;let t=0,n=[];for(let r of e)try{let s;switch(r.type){case"create_pin":s=await Sn(r.data);break;case"create_comment":s=await Ln(r.data.pinId,r.data.body,r.data.mentions);break;case"update_pin":s=await Ft(r.data.pinId,r.data.updates);break;case"submit_report":s=await En(r.data);break;default:s={success:!1,error:"Unknown action"}}s.success?t++:n.push(r)}catch{n.push(r)}return localStorage.setItem(Cn,JSON.stringify(n)),t}typeof window<"u"&&window.addEventListener("online",()=>{Bo().catch(()=>{})});var Tn=[{id:"slate",name:"Slate",preview:["#0f1117","#6E9ED0"],vars:{"--bs-bg":"#0f1117","--bs-bg2":"#1a1d27","--bs-bg3":"#2a2d37","--bs-text":"#e8eaed","--bs-muted":"#9ca3af","--bs-border":"#2a2d37","--bs-accent":"#6E9ED0","--bs-accent2":"#C3CAD6","--bs-fab1":"#6E9ED0","--bs-fab2":"#4a7ba8","--bs-radius":"12px","--bs-radius-sm":"8px","--bs-red":"#ef4444","--bs-green":"#22c55e","--bs-orange":"#f97316","--bs-yellow":"#eab308"}},{id:"black",name:"Dark",preview:["#0a0a0a","#ffffff"],vars:{"--bs-bg":"#0a0a0a","--bs-bg2":"#141414","--bs-bg3":"#1e1e1e","--bs-text":"#f5f5f5","--bs-muted":"#737373","--bs-border":"#262626","--bs-accent":"#f5f5f5","--bs-accent2":"#d4d4d4","--bs-fab1":"#262626","--bs-fab2":"#171717","--bs-radius":"12px","--bs-radius-sm":"8px","--bs-red":"#ef4444","--bs-green":"#22c55e","--bs-orange":"#f97316","--bs-yellow":"#eab308"}},{id:"white",name:"Light",preview:["#ffffff","#0a0a0a"],vars:{"--bs-bg":"#ffffff","--bs-bg2":"#f5f5f5","--bs-bg3":"#e5e5e5","--bs-text":"#0a0a0a","--bs-muted":"#737373","--bs-border":"#e5e5e5","--bs-accent":"#0a0a0a","--bs-accent2":"#404040","--bs-fab1":"#0a0a0a","--bs-fab2":"#262626","--bs-radius":"12px","--bs-radius-sm":"8px","--bs-red":"#dc2626","--bs-green":"#16a34a","--bs-orange":"#ea580c","--bs-yellow":"#ca8a04"}}];function Wt(){return Tn}function Yt(e){return Tn.find(t=>t.id===e)}function Yr(){return Tn[0]}var $n=[{id:"classic",name:"Center",description:"Centered modal",tabPosition:"top"},{id:"drawer-right",name:"Right Drawer",description:"Slides from right",tabPosition:"top"},{id:"bottom-sheet",name:"Bottom Sheet",description:"Slides from bottom",tabPosition:"top"},{id:"sidebar-tabs",name:"Sidebar",description:"Side navigation",tabPosition:"left"}];function Xt(){return $n}function pt(e){return $n.find(t=>t.id===e)}function Xr(){return $n[0]}var Vr=`
|
|
22
|
-
/* \u2500\u2500 1. Classic (default \u2014 no overrides) \u2500\u2500 */
|
|
23
|
-
|
|
24
|
-
/* \u2500\u2500 2. Drawer Right \u2500\u2500 */
|
|
25
|
-
.bs-ly-drawer-right.bs-modal {
|
|
26
|
-
top: 0; left: auto; right: 0; bottom: 0;
|
|
27
|
-
width: 420px; max-width: 100vw; max-height: 100vh;
|
|
28
|
-
height: 100vh;
|
|
29
|
-
border-radius: 0;
|
|
30
|
-
transform: translateX(100%);
|
|
31
|
-
transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
|
|
32
|
-
}
|
|
33
|
-
.bs-ly-drawer-right.bs-modal.bs-in {
|
|
34
|
-
transform: translateX(0);
|
|
35
|
-
opacity: 1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* \u2500\u2500 3. Bottom Sheet \u2500\u2500 */
|
|
39
|
-
.bs-ly-bottom-sheet.bs-modal {
|
|
40
|
-
top: auto; left: 50%; right: auto; bottom: 0;
|
|
41
|
-
width: 600px; max-width: 100vw;
|
|
42
|
-
max-height: 80vh;
|
|
43
|
-
border-radius: var(--bs-radius) var(--bs-radius) 0 0;
|
|
44
|
-
transform: translate(-50%, 100%);
|
|
45
|
-
transition: transform 0.45s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
|
|
46
|
-
}
|
|
47
|
-
.bs-ly-bottom-sheet.bs-modal.bs-in {
|
|
48
|
-
transform: translate(-50%, 0);
|
|
49
|
-
opacity: 1;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* \u2500\u2500 4. Sidebar Tabs \u2500\u2500 */
|
|
53
|
-
.bs-ly-sidebar-tabs.bs-modal {
|
|
54
|
-
width: 620px;
|
|
55
|
-
}
|
|
56
|
-
.bs-ly-sidebar-tabs .bs-body-wrap {
|
|
57
|
-
display: flex;
|
|
58
|
-
flex: 1;
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
}
|
|
61
|
-
.bs-ly-sidebar-tabs .bs-tabs {
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
padding: 12px 0 12px 12px;
|
|
64
|
-
gap: 4px;
|
|
65
|
-
min-width: 140px;
|
|
66
|
-
border-right: 1px solid var(--bs-border);
|
|
67
|
-
overflow-y: auto;
|
|
68
|
-
}
|
|
69
|
-
.bs-ly-sidebar-tabs .bs-tab {
|
|
70
|
-
border-radius: var(--bs-radius-sm);
|
|
71
|
-
padding: 10px 12px;
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
74
|
-
.bs-ly-sidebar-tabs .bs-tab.bs-active::after {
|
|
75
|
-
top: 8px; bottom: 8px; left: 0; right: auto;
|
|
76
|
-
width: 2px; height: auto;
|
|
77
|
-
border-radius: 0 2px 2px 0;
|
|
78
|
-
}
|
|
79
|
-
.bs-ly-sidebar-tabs .bs-tab-divider { display: none; }
|
|
80
|
-
.bs-ly-sidebar-tabs .bs-scroll { flex: 1; }
|
|
81
|
-
`;var Fe=null,Vt=0,No=5e3,Ue=new Map,_e=null,Jt=new Set;function We(e){_e=e,Vt=Date.now(),Oo()}function Oo(){Fe||(Fe=setInterval(jo,No))}async function jo(){if(!_e)return;let e=Or();if(e)try{let t=Br(),n=window.location.pathname,r=await fetch(`${t}/api/pins/poll?projectId=${_e}&pathname=${encodeURIComponent(n)}&since=${Vt}`,{headers:{Authorization:`Bearer ${e}`}});if(!r.ok)return;let s=await r.json();if(!s.success)return;let o=Array.isArray(s.data)?s.data:s.data?.pins||[];Vt=s.serverTime||s.data?.serverTime||Date.now();for(let i of o)Jt.has(i.id)?Jr("pin:updated",{type:"pin:updated",projectId:_e,data:i,userId:"",timestamp:Date.now()}):(Jt.add(i.id),Jr("pin:created",{type:"pin:created",projectId:_e,data:i,userId:"",timestamp:Date.now()}))}catch{}}function Kr(){Fe&&(clearInterval(Fe),Fe=null),_e=null,Jt.clear(),Vt=0}function bt(e,t){return Ue.has(e)||Ue.set(e,new Set),Ue.get(e).add(t),()=>{Ue.get(e)?.delete(t)}}function Jr(e,t){Ue.get(e)?.forEach(n=>n(t)),Ue.get("*")?.forEach(n=>n(t))}function Mn(e){Jt=new Set(e)}function Gr(){return Fe!==null}var Qr=`
|
|
82
|
-
:host {
|
|
83
|
-
all: initial !important;
|
|
84
|
-
display: block !important;
|
|
85
|
-
position: absolute !important;
|
|
86
|
-
/* CSS custom properties survive all:initial \u2014 inline --bs-x/--bs-y set per pin */
|
|
87
|
-
left: var(--bs-x, 0) !important;
|
|
88
|
-
top: var(--bs-y, 0) !important;
|
|
89
|
-
pointer-events: auto !important;
|
|
90
|
-
z-index: 2147483640 !important;
|
|
91
|
-
cursor: pointer !important;
|
|
92
|
-
transform: translate(-50%, -50%) !important;
|
|
93
|
-
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
94
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
95
|
-
line-height: 1.5;
|
|
96
|
-
-webkit-font-smoothing: antialiased;
|
|
97
|
-
-moz-osx-font-smoothing: grayscale;
|
|
98
|
-
}
|
|
99
|
-
:host(:hover) {
|
|
100
|
-
transform: translate(-50%, -50%) scale(1.1) !important;
|
|
101
|
-
z-index: 2147483645 !important;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* Color scheme support */
|
|
105
|
-
@media (prefers-color-scheme: light) {
|
|
106
|
-
:host { --bs-pin-bg: #ffffff; --bs-pin-text: #171717; --bs-pin-muted: #6b7280; --bs-pin-border: #eaeaea; --bs-pin-surface: #fafafa; --bs-pin-input-bg: #ffffff; --bs-pin-hover: #f5f5f5; --bs-pin-shadow: rgba(0,0,0,0.08); --bs-pin-shadow-lg: rgba(0,0,0,0.12); }
|
|
107
|
-
}
|
|
108
|
-
@media (prefers-color-scheme: dark) {
|
|
109
|
-
:host { --bs-pin-bg: #1a1a1a; --bs-pin-text: #ededed; --bs-pin-muted: #888; --bs-pin-border: #333; --bs-pin-surface: #222; --bs-pin-input-bg: #2a2a2a; --bs-pin-hover: #2a2a2a; --bs-pin-shadow: rgba(0,0,0,0.2); --bs-pin-shadow-lg: rgba(0,0,0,0.4); }
|
|
110
|
-
}
|
|
111
|
-
/* Fallback (default to light) */
|
|
112
|
-
:host {
|
|
113
|
-
--bs-pin-bg: #ffffff; --bs-pin-text: #171717; --bs-pin-muted: #6b7280; --bs-pin-border: #eaeaea; --bs-pin-surface: #fafafa; --bs-pin-input-bg: #ffffff; --bs-pin-hover: #f5f5f5; --bs-pin-shadow: rgba(0,0,0,0.08); --bs-pin-shadow-lg: rgba(0,0,0,0.12);
|
|
114
|
-
}
|
|
115
|
-
@media (prefers-color-scheme: dark) {
|
|
116
|
-
:host { --bs-pin-bg: #1a1a1a; --bs-pin-text: #ededed; --bs-pin-muted: #888; --bs-pin-border: #333; --bs-pin-surface: #222; --bs-pin-input-bg: #2a2a2a; --bs-pin-hover: #2a2a2a; --bs-pin-shadow: rgba(0,0,0,0.2); --bs-pin-shadow-lg: rgba(0,0,0,0.4); }
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
*, *::before, *::after {
|
|
120
|
-
box-sizing: border-box !important;
|
|
121
|
-
margin: 0;
|
|
122
|
-
padding: 0;
|
|
123
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
124
|
-
line-height: 1.5;
|
|
125
|
-
direction: ltr;
|
|
126
|
-
text-align: left;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/* \u2500\u2500 Pin Marker (Avatar-based) \u2500\u2500 */
|
|
130
|
-
.bs-lp-dot {
|
|
131
|
-
width: 32px;
|
|
132
|
-
height: 32px;
|
|
133
|
-
border-radius: 50%;
|
|
134
|
-
display: flex;
|
|
135
|
-
align-items: center;
|
|
136
|
-
justify-content: center;
|
|
137
|
-
font-size: 12px;
|
|
138
|
-
font-weight: 600;
|
|
139
|
-
color: #fff;
|
|
140
|
-
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
|
141
|
-
position: relative;
|
|
142
|
-
overflow: hidden;
|
|
143
|
-
background-size: cover;
|
|
144
|
-
background-position: center;
|
|
145
|
-
}
|
|
146
|
-
.bs-lp-dot.bs-overdue {
|
|
147
|
-
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4), 0 0 12px rgba(239, 68, 68, 0.25);
|
|
148
|
-
}
|
|
149
|
-
.bs-lp-avatar {
|
|
150
|
-
width: 100%;
|
|
151
|
-
height: 100%;
|
|
152
|
-
border-radius: 50%;
|
|
153
|
-
object-fit: cover;
|
|
154
|
-
}
|
|
155
|
-
.bs-lp-initials {
|
|
156
|
-
width: 100%;
|
|
157
|
-
height: 100%;
|
|
158
|
-
border-radius: 50%;
|
|
159
|
-
display: flex;
|
|
160
|
-
align-items: center;
|
|
161
|
-
justify-content: center;
|
|
162
|
-
font-size: 12px;
|
|
163
|
-
font-weight: 600;
|
|
164
|
-
color: #fff;
|
|
165
|
-
}
|
|
166
|
-
.bs-lp-badge {
|
|
167
|
-
position: absolute;
|
|
168
|
-
top: -3px;
|
|
169
|
-
right: -3px;
|
|
170
|
-
min-width: 14px;
|
|
171
|
-
height: 14px;
|
|
172
|
-
border-radius: 7px;
|
|
173
|
-
background: var(--bs-pin-text, #171717);
|
|
174
|
-
color: var(--bs-pin-bg, #fff);
|
|
175
|
-
font-size: 9px;
|
|
176
|
-
font-weight: 700;
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
justify-content: center;
|
|
180
|
-
padding: 0 3px;
|
|
181
|
-
line-height: 1;
|
|
182
|
-
z-index: 2;
|
|
183
|
-
}
|
|
184
|
-
`,Zr=`
|
|
185
|
-
/* \u2500\u2500 Popup (Clean Card) \u2500\u2500 */
|
|
186
|
-
.bs-lp-popup {
|
|
187
|
-
position: absolute;
|
|
188
|
-
left: 40px;
|
|
189
|
-
top: -8px;
|
|
190
|
-
width: min(360px, calc(100vw - 48px));
|
|
191
|
-
background: var(--bs-pin-bg);
|
|
192
|
-
border: 1px solid var(--bs-pin-border);
|
|
193
|
-
border-radius: 14px;
|
|
194
|
-
box-shadow: 0 8px 30px var(--bs-pin-shadow-lg), 0 0 0 1px var(--bs-pin-shadow);
|
|
195
|
-
backdrop-filter: blur(12px);
|
|
196
|
-
z-index: 10;
|
|
197
|
-
pointer-events: auto;
|
|
198
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
199
|
-
color: var(--bs-pin-text);
|
|
200
|
-
overflow: hidden;
|
|
201
|
-
animation: bs-lp-pop-in 0.2s ease;
|
|
202
|
-
}
|
|
203
|
-
@keyframes bs-lp-pop-in {
|
|
204
|
-
from { opacity: 0; transform: translateY(4px); }
|
|
205
|
-
to { opacity: 1; transform: translateY(0); }
|
|
206
|
-
}
|
|
207
|
-
.bs-lp-popup-hdr {
|
|
208
|
-
padding: 14px 16px 12px;
|
|
209
|
-
display: flex;
|
|
210
|
-
align-items: flex-start;
|
|
211
|
-
gap: 10px;
|
|
212
|
-
}
|
|
213
|
-
.bs-lp-popup-hdr-avatar {
|
|
214
|
-
width: 24px;
|
|
215
|
-
height: 24px;
|
|
216
|
-
border-radius: 50%;
|
|
217
|
-
flex-shrink: 0;
|
|
218
|
-
display: flex;
|
|
219
|
-
align-items: center;
|
|
220
|
-
justify-content: center;
|
|
221
|
-
font-size: 10px;
|
|
222
|
-
font-weight: 600;
|
|
223
|
-
color: #fff;
|
|
224
|
-
overflow: hidden;
|
|
225
|
-
}
|
|
226
|
-
.bs-lp-popup-hdr-avatar img { width: 100%; height: 100%; object-fit: cover; }
|
|
227
|
-
.bs-lp-popup-hdr-body { flex: 1; min-width: 0; }
|
|
228
|
-
.bs-lp-popup-title {
|
|
229
|
-
font-size: 14px;
|
|
230
|
-
font-weight: 600;
|
|
231
|
-
color: var(--bs-pin-text);
|
|
232
|
-
line-height: 1.3;
|
|
233
|
-
margin-bottom: 2px;
|
|
234
|
-
}
|
|
235
|
-
.bs-lp-popup-meta {
|
|
236
|
-
font-size: 12px;
|
|
237
|
-
color: var(--bs-pin-muted);
|
|
238
|
-
display: flex;
|
|
239
|
-
align-items: center;
|
|
240
|
-
gap: 6px;
|
|
241
|
-
flex-wrap: wrap;
|
|
242
|
-
}
|
|
243
|
-
.bs-lp-popup-pill {
|
|
244
|
-
font-size: 11px;
|
|
245
|
-
padding: 2px 8px;
|
|
246
|
-
border-radius: 99px;
|
|
247
|
-
font-weight: 500;
|
|
248
|
-
white-space: nowrap;
|
|
249
|
-
}
|
|
250
|
-
.bs-lp-popup-close {
|
|
251
|
-
all: initial;
|
|
252
|
-
color: var(--bs-pin-muted);
|
|
253
|
-
cursor: pointer;
|
|
254
|
-
padding: 2px;
|
|
255
|
-
flex-shrink: 0;
|
|
256
|
-
display: flex;
|
|
257
|
-
align-items: center;
|
|
258
|
-
justify-content: center;
|
|
259
|
-
border-radius: 6px;
|
|
260
|
-
transition: background 0.15s, color 0.15s;
|
|
261
|
-
}
|
|
262
|
-
.bs-lp-popup-close:hover { color: var(--bs-pin-text); background: var(--bs-pin-hover); }
|
|
263
|
-
.bs-lp-popup-close svg { width: 16px; height: 16px; }
|
|
264
|
-
.bs-lp-popup-desc {
|
|
265
|
-
padding: 0 16px 12px;
|
|
266
|
-
font-size: 13px;
|
|
267
|
-
line-height: 1.6;
|
|
268
|
-
color: var(--bs-pin-muted);
|
|
269
|
-
}
|
|
270
|
-
.bs-lp-popup-due {
|
|
271
|
-
padding: 6px 16px;
|
|
272
|
-
font-size: 12px;
|
|
273
|
-
font-weight: 500;
|
|
274
|
-
display: flex;
|
|
275
|
-
align-items: center;
|
|
276
|
-
gap: 4px;
|
|
277
|
-
}
|
|
278
|
-
.bs-lp-popup-due.overdue { color: #ef4444; background: rgba(239,68,68,0.06); }
|
|
279
|
-
.bs-lp-popup-due:not(.overdue) { color: var(--bs-pin-muted); }
|
|
280
|
-
.bs-lp-popup-info {
|
|
281
|
-
padding: 8px 16px;
|
|
282
|
-
font-size: 11px;
|
|
283
|
-
color: var(--bs-pin-muted);
|
|
284
|
-
background: var(--bs-pin-surface);
|
|
285
|
-
border-top: 1px solid var(--bs-pin-border);
|
|
286
|
-
display: flex;
|
|
287
|
-
justify-content: space-between;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/* Comments */
|
|
291
|
-
.bs-lp-cmts {
|
|
292
|
-
max-height: 220px;
|
|
293
|
-
overflow-y: auto;
|
|
294
|
-
border-top: 1px solid var(--bs-pin-border);
|
|
295
|
-
}
|
|
296
|
-
.bs-lp-cmts::-webkit-scrollbar { width: 4px; }
|
|
297
|
-
.bs-lp-cmts::-webkit-scrollbar-thumb { background: var(--bs-pin-border); border-radius: 2px; }
|
|
298
|
-
.bs-lp-cmt {
|
|
299
|
-
padding: 10px 16px;
|
|
300
|
-
display: flex;
|
|
301
|
-
gap: 8px;
|
|
302
|
-
align-items: flex-start;
|
|
303
|
-
border-bottom: 1px solid var(--bs-pin-border);
|
|
304
|
-
}
|
|
305
|
-
.bs-lp-cmt:last-child { border-bottom: none; }
|
|
306
|
-
.bs-lp-cmt-avatar {
|
|
307
|
-
width: 20px;
|
|
308
|
-
height: 20px;
|
|
309
|
-
border-radius: 50%;
|
|
310
|
-
flex-shrink: 0;
|
|
311
|
-
display: flex;
|
|
312
|
-
align-items: center;
|
|
313
|
-
justify-content: center;
|
|
314
|
-
font-size: 8px;
|
|
315
|
-
font-weight: 600;
|
|
316
|
-
color: #fff;
|
|
317
|
-
overflow: hidden;
|
|
318
|
-
}
|
|
319
|
-
.bs-lp-cmt-avatar img { width: 100%; height: 100%; object-fit: cover; }
|
|
320
|
-
.bs-lp-cmt-content { flex: 1; min-width: 0; }
|
|
321
|
-
.bs-lp-cmt-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
|
|
322
|
-
.bs-lp-cmt-author { font-weight: 600; color: var(--bs-pin-text); font-size: 12px; }
|
|
323
|
-
.bs-lp-cmt-time { font-size: 11px; color: var(--bs-pin-muted); }
|
|
324
|
-
.bs-lp-cmt-body { color: var(--bs-pin-text); font-size: 13px; line-height: 1.5; }
|
|
325
|
-
|
|
326
|
-
/* Comment input */
|
|
327
|
-
.bs-lp-input {
|
|
328
|
-
display: flex;
|
|
329
|
-
align-items: center;
|
|
330
|
-
border-top: 1px solid var(--bs-pin-border);
|
|
331
|
-
padding: 4px;
|
|
332
|
-
gap: 4px;
|
|
333
|
-
}
|
|
334
|
-
.bs-lp-input input {
|
|
335
|
-
all: initial;
|
|
336
|
-
flex: 1;
|
|
337
|
-
padding: 8px 12px;
|
|
338
|
-
color: var(--bs-pin-text);
|
|
339
|
-
font-size: 13px;
|
|
340
|
-
font-family: inherit;
|
|
341
|
-
background: var(--bs-pin-input-bg);
|
|
342
|
-
border: 1px solid var(--bs-pin-border);
|
|
343
|
-
border-radius: 8px;
|
|
344
|
-
box-sizing: border-box;
|
|
345
|
-
transition: border-color 0.15s;
|
|
346
|
-
}
|
|
347
|
-
.bs-lp-input input:focus { border-color: #6E9ED0; outline: none; }
|
|
348
|
-
.bs-lp-input input::placeholder { color: var(--bs-pin-muted); }
|
|
349
|
-
.bs-lp-input button {
|
|
350
|
-
all: initial;
|
|
351
|
-
width: 32px;
|
|
352
|
-
height: 32px;
|
|
353
|
-
border-radius: 8px;
|
|
354
|
-
background: #6E9ED0;
|
|
355
|
-
color: #fff;
|
|
356
|
-
cursor: pointer;
|
|
357
|
-
display: flex;
|
|
358
|
-
align-items: center;
|
|
359
|
-
justify-content: center;
|
|
360
|
-
flex-shrink: 0;
|
|
361
|
-
transition: opacity 0.15s;
|
|
362
|
-
}
|
|
363
|
-
.bs-lp-input button:hover { opacity: 0.85; }
|
|
364
|
-
.bs-lp-input button svg { width: 14px; height: 14px; }
|
|
365
|
-
|
|
366
|
-
/* Actions */
|
|
367
|
-
.bs-lp-acts {
|
|
368
|
-
padding: 8px 16px 10px;
|
|
369
|
-
display: flex;
|
|
370
|
-
gap: 8px;
|
|
371
|
-
border-top: 1px solid var(--bs-pin-border);
|
|
372
|
-
}
|
|
373
|
-
.bs-lp-act {
|
|
374
|
-
all: initial;
|
|
375
|
-
padding: 6px 14px;
|
|
376
|
-
border-radius: 8px;
|
|
377
|
-
background: var(--bs-pin-surface);
|
|
378
|
-
color: var(--bs-pin-muted);
|
|
379
|
-
font-size: 12px;
|
|
380
|
-
font-weight: 500;
|
|
381
|
-
font-family: inherit;
|
|
382
|
-
cursor: pointer;
|
|
383
|
-
transition: all 0.15s;
|
|
384
|
-
display: flex;
|
|
385
|
-
align-items: center;
|
|
386
|
-
gap: 5px;
|
|
387
|
-
}
|
|
388
|
-
.bs-lp-act:hover { background: var(--bs-pin-hover); color: var(--bs-pin-text); }
|
|
389
|
-
.bs-lp-act.resolve { color: #22c55e; }
|
|
390
|
-
.bs-lp-act.resolve:hover { background: rgba(34,197,94,0.1); }
|
|
391
|
-
.bs-lp-act.delete { color: #ef4444; }
|
|
392
|
-
.bs-lp-act.delete:hover { background: rgba(239,68,68,0.1); }
|
|
393
|
-
`,es=`
|
|
394
|
-
/* \u2500\u2500 New Pin Form \u2500\u2500 */
|
|
395
|
-
.bs-lp-form {
|
|
396
|
-
position: fixed;
|
|
397
|
-
width: min(320px, calc(100vw - 32px));
|
|
398
|
-
background: var(--bs-pin-bg);
|
|
399
|
-
border: 1px solid var(--bs-pin-border);
|
|
400
|
-
border-radius: 14px;
|
|
401
|
-
box-shadow: 0 8px 30px var(--bs-pin-shadow-lg);
|
|
402
|
-
backdrop-filter: blur(12px);
|
|
403
|
-
z-index: 2147483645;
|
|
404
|
-
pointer-events: auto;
|
|
405
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
406
|
-
color: var(--bs-pin-text);
|
|
407
|
-
padding: 16px;
|
|
408
|
-
animation: bs-lp-pop-in 0.2s ease;
|
|
409
|
-
}
|
|
410
|
-
.bs-lp-form-label {
|
|
411
|
-
display: block;
|
|
412
|
-
font-size: 12px;
|
|
413
|
-
color: var(--bs-pin-muted);
|
|
414
|
-
margin-bottom: 4px;
|
|
415
|
-
margin-top: 12px;
|
|
416
|
-
font-weight: 500;
|
|
417
|
-
}
|
|
418
|
-
.bs-lp-form-label:first-child { margin-top: 0; }
|
|
419
|
-
.bs-lp-form input,
|
|
420
|
-
.bs-lp-form textarea,
|
|
421
|
-
.bs-lp-form select {
|
|
422
|
-
all: initial;
|
|
423
|
-
display: block;
|
|
424
|
-
width: 100%;
|
|
425
|
-
background: var(--bs-pin-input-bg);
|
|
426
|
-
border: 1px solid var(--bs-pin-border);
|
|
427
|
-
border-radius: 10px;
|
|
428
|
-
padding: 8px 12px;
|
|
429
|
-
color: var(--bs-pin-text);
|
|
430
|
-
font-size: 13px;
|
|
431
|
-
font-family: inherit;
|
|
432
|
-
box-sizing: border-box;
|
|
433
|
-
transition: border-color 0.15s;
|
|
434
|
-
}
|
|
435
|
-
.bs-lp-form textarea { resize: vertical; min-height: 48px; white-space: pre-wrap; }
|
|
436
|
-
.bs-lp-form input:focus,
|
|
437
|
-
.bs-lp-form textarea:focus,
|
|
438
|
-
.bs-lp-form select:focus { border-color: #6E9ED0; outline: none; }
|
|
439
|
-
.bs-lp-form input::placeholder,
|
|
440
|
-
.bs-lp-form textarea::placeholder { color: var(--bs-pin-muted); }
|
|
441
|
-
/* Segmented buttons for priority/category */
|
|
442
|
-
.bs-lp-seg-row {
|
|
443
|
-
display: flex;
|
|
444
|
-
gap: 0;
|
|
445
|
-
border: 1px solid var(--bs-pin-border);
|
|
446
|
-
border-radius: 10px;
|
|
447
|
-
overflow: hidden;
|
|
448
|
-
}
|
|
449
|
-
.bs-lp-seg-btn {
|
|
450
|
-
all: initial;
|
|
451
|
-
flex: 1;
|
|
452
|
-
padding: 7px 4px;
|
|
453
|
-
text-align: center;
|
|
454
|
-
font-size: 12px;
|
|
455
|
-
font-weight: 500;
|
|
456
|
-
font-family: inherit;
|
|
457
|
-
cursor: pointer;
|
|
458
|
-
color: var(--bs-pin-muted);
|
|
459
|
-
background: var(--bs-pin-input-bg);
|
|
460
|
-
border-right: 1px solid var(--bs-pin-border);
|
|
461
|
-
transition: all 0.15s;
|
|
462
|
-
box-sizing: border-box;
|
|
463
|
-
}
|
|
464
|
-
.bs-lp-seg-btn:last-child { border-right: none; }
|
|
465
|
-
.bs-lp-seg-btn:hover { color: var(--bs-pin-text); background: var(--bs-pin-hover); }
|
|
466
|
-
.bs-lp-seg-btn.bs-active { background: #6E9ED0; color: #fff; }
|
|
467
|
-
.bs-lp-form-btns { display: flex; gap: 8px; margin-top: 14px; }
|
|
468
|
-
.bs-lp-form-btns button {
|
|
469
|
-
all: initial;
|
|
470
|
-
padding: 9px 16px;
|
|
471
|
-
border-radius: 10px;
|
|
472
|
-
font-size: 13px;
|
|
473
|
-
font-weight: 600;
|
|
474
|
-
font-family: inherit;
|
|
475
|
-
cursor: pointer;
|
|
476
|
-
text-align: center;
|
|
477
|
-
transition: opacity 0.15s;
|
|
478
|
-
}
|
|
479
|
-
.bs-lp-form-submit { background: #6E9ED0; color: #fff; flex: 1; }
|
|
480
|
-
.bs-lp-form-submit:hover { opacity: 0.85; }
|
|
481
|
-
.bs-lp-form-cancel { background: transparent; color: var(--bs-pin-muted); }
|
|
482
|
-
.bs-lp-form-cancel:hover { color: var(--bs-pin-text); }
|
|
483
|
-
`;var Zt,de=null,L=null,M=[],is=[],Ye=!1,Xe=null,qo="",Gt=null,Rn=null,Ve=new Map,Kt=null,Qt={open:"#f97316",in_progress:"#3b82f6",resolved:"#22c55e",closed:"#6b7280"},ts={critical:"#ef4444",high:"#f97316",medium:"#eab308",low:"#6b7280"};function Je(e,t){Zt=e,Rn=t,qo=window.location.pathname,Yo(),ps(),Xo(),Zo(),ei(),_o()}function as(){Fo(),ds(),de?.remove(),de=null,L?.remove(),L=null,Rn=null,M=[]}function Pe(e){return Ye=e!==void 0?e:!Ye,L&&L.style.setProperty("display",Ye?"block":"none","important"),Ye}function en(){return Ye}function ls(e,t){let n;if(e&&e.startsWith('["')&&e.endsWith('"]'))try{let r=JSON.parse(e);n=Array.isArray(r)?r.filter(s=>typeof s=="string"):[e]}catch{n=[e]}else n=e?[e]:[];for(let r of n)if(r&&r!=="body")try{let s=document.querySelector(r);if(s)return s}catch{}if(t)try{let r=document.evaluate(t,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null);if(r.singleNodeValue instanceof Element)return r.singleNodeValue}catch{}return null}function Uo(e){let t=e.getBoundingClientRect();if(t.bottom<=0||t.top>=window.innerHeight||t.right<=0||t.left>=window.innerWidth)return!0;let n=e.parentElement;for(;n&&n!==document.documentElement;){let r=window.getComputedStyle(n),s=r.overflowY,o=r.overflowX;if(s==="hidden"||s==="scroll"||s==="auto"||o==="hidden"||o==="scroll"||o==="auto"){let i=n.getBoundingClientRect();if(t.bottom<=i.top||t.top>=i.bottom||t.right<=i.left||t.left>=i.right)return!0}n=n.parentElement}return!1}function _o(){window.addEventListener("keydown",cs),Gt=new MutationObserver(e=>{for(let t of e)for(let n of t.removedNodes)if(n.nodeType===Node.ELEMENT_NODE){for(let[r,s]of Ve)if(n.contains(s)){Ve.delete(r),pe();return}}}),Gt.observe(document.body,{childList:!0,subtree:!0}),Kt=setInterval(Wo,500)}function Fo(){window.removeEventListener("keydown",cs),Gt?.disconnect(),Gt=null,Kt&&(clearInterval(Kt),Kt=null)}function cs(e){e.key==="Escape"&&(Xe?ke():Ye&&(de?.querySelectorAll(".bs-lp-form").forEach(t=>t.remove()),Pe(!1)))}function Wo(){for(let[e,t]of Ve){let n=M.find(s=>s.id===e);if(!n)continue;let r=ls(n.elementSelector,n.elementXPath);r&&Uo(r)?t.style.display="none":t.style.display=""}}function ds(){for(let[,e]of Ve)e.remove();Ve=new Map}function Yo(){if(de)return;de=document.createElement("div"),de.id="bugstash-live-pins",L=document.createElement("bugstash-overlay"),L.style.setProperty("display","none","important"),L.style.setProperty("position","fixed","important"),L.style.setProperty("inset","0","important"),L.style.setProperty("z-index","2147483641","important"),L.style.setProperty("cursor","crosshair","important"),L.style.setProperty("background","rgba(0,0,0,0.05)","important"),L.style.setProperty("margin","0","important"),L.style.setProperty("padding","0","important"),L.style.setProperty("border","none","important"),L.style.setProperty("opacity","1","important"),L.style.setProperty("visibility","visible","important"),L.style.setProperty("pointer-events","auto","important"),L.style.setProperty("transform","none","important"),L.style.setProperty("filter","none","important"),L.style.setProperty("perspective","none","important"),L.style.setProperty("will-change","auto","important"),L.style.setProperty("contain","none","important"),L.style.setProperty("clip-path","none","important"),L.style.setProperty("isolation","auto","important"),L.style.setProperty("mix-blend-mode","normal","important"),L.style.setProperty("box-sizing","border-box","important"),L.style.setProperty("overflow","visible","important"),L.style.setProperty("float","none","important");let e=document.createElement("style");e.textContent=`
|
|
484
|
-
/* \u2500\u2500\u2500 Container styles for form overlay (pins are in light DOM now) \u2500\u2500\u2500 */
|
|
485
|
-
:host {
|
|
486
|
-
all: initial !important;
|
|
487
|
-
position: fixed !important;
|
|
488
|
-
inset: 0 !important;
|
|
489
|
-
pointer-events: none !important;
|
|
490
|
-
z-index: 2147483640 !important;
|
|
491
|
-
display: block !important;
|
|
492
|
-
visibility: visible !important;
|
|
493
|
-
opacity: 1 !important;
|
|
494
|
-
transform: none !important;
|
|
495
|
-
perspective: none !important;
|
|
496
|
-
filter: none !important;
|
|
497
|
-
will-change: auto !important;
|
|
498
|
-
contain: none !important;
|
|
499
|
-
isolation: auto !important;
|
|
500
|
-
}
|
|
501
|
-
*, *::before, *::after {
|
|
502
|
-
box-sizing: border-box !important;
|
|
503
|
-
margin: 0;
|
|
504
|
-
padding: 0;
|
|
505
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
506
|
-
line-height: 1.5;
|
|
507
|
-
}
|
|
508
|
-
/* Color scheme support */
|
|
509
|
-
@media (prefers-color-scheme: light) {
|
|
510
|
-
:host { --bs-pin-bg: #ffffff; --bs-pin-text: #171717; --bs-pin-muted: #6b7280; --bs-pin-border: #eaeaea; --bs-pin-surface: #fafafa; --bs-pin-input-bg: #ffffff; --bs-pin-hover: #f5f5f5; --bs-pin-shadow: rgba(0,0,0,0.08); --bs-pin-shadow-lg: rgba(0,0,0,0.12); }
|
|
511
|
-
}
|
|
512
|
-
@media (prefers-color-scheme: dark) {
|
|
513
|
-
:host { --bs-pin-bg: #1a1a1a; --bs-pin-text: #ededed; --bs-pin-muted: #888; --bs-pin-border: #333; --bs-pin-surface: #222; --bs-pin-input-bg: #2a2a2a; --bs-pin-hover: #2a2a2a; --bs-pin-shadow: rgba(0,0,0,0.2); --bs-pin-shadow-lg: rgba(0,0,0,0.4); }
|
|
514
|
-
}
|
|
515
|
-
:host {
|
|
516
|
-
--bs-pin-bg: #ffffff; --bs-pin-text: #171717; --bs-pin-muted: #6b7280; --bs-pin-border: #eaeaea; --bs-pin-surface: #fafafa; --bs-pin-input-bg: #ffffff; --bs-pin-hover: #f5f5f5; --bs-pin-shadow: rgba(0,0,0,0.08); --bs-pin-shadow-lg: rgba(0,0,0,0.12);
|
|
517
|
-
}
|
|
518
|
-
@media (prefers-color-scheme: dark) {
|
|
519
|
-
:host { --bs-pin-bg: #1a1a1a; --bs-pin-text: #ededed; --bs-pin-muted: #888; --bs-pin-border: #333; --bs-pin-surface: #222; --bs-pin-input-bg: #2a2a2a; --bs-pin-hover: #2a2a2a; --bs-pin-shadow: rgba(0,0,0,0.2); --bs-pin-shadow-lg: rgba(0,0,0,0.4); }
|
|
520
|
-
}
|
|
521
|
-
#bugstash-live-pins {
|
|
522
|
-
position: fixed !important;
|
|
523
|
-
top: 0 !important;
|
|
524
|
-
left: 0 !important;
|
|
525
|
-
width: 0 !important;
|
|
526
|
-
height: 0 !important;
|
|
527
|
-
overflow: visible !important;
|
|
528
|
-
z-index: 2147483640 !important;
|
|
529
|
-
pointer-events: none !important;
|
|
530
|
-
transform: none !important;
|
|
531
|
-
perspective: none !important;
|
|
532
|
-
filter: none !important;
|
|
533
|
-
will-change: auto !important;
|
|
534
|
-
contain: none !important;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
${es}
|
|
538
|
-
`,de.appendChild(e),Rn.appendChild(de),document.body.appendChild(L),L.addEventListener("click",t=>{let n=t.clientX,r=t.clientY,s=null;try{L.style.setProperty("pointer-events","none","important"),s=document.elementFromPoint(n,r)}finally{L.style.setProperty("pointer-events","auto","important")}let o=n+window.scrollX,i=r+window.scrollY,a,d;if(s&&s!==document.body&&s!==document.documentElement){let p=s.getBoundingClientRect();if(p.width>0&&p.height>0)a=(n-p.left)/p.width,d=(r-p.top)/p.height;else{let b=document.documentElement.scrollWidth||document.body.scrollWidth||1,v=document.documentElement.scrollHeight||document.body.scrollHeight||1;a=o/b*100,d=i/v*100}}else{let p=document.documentElement.scrollWidth||document.body.scrollWidth||1,b=document.documentElement.scrollHeight||document.body.scrollHeight||1;a=o/p*100,d=i/b*100}Qo(o,i,a,d,n,r,s)})}async function ps(){let e=await jr(Zt,window.location.pathname);e.success&&e.data&&(M=e.data,Mn(M.map(t=>t.id)),pe())}async function Xo(){let e=await _r(Zt);e.success&&e.data&&(is=e.data)}function pe(){ds(),M.forEach(e=>{let t=e.xPercent>=0&&e.xPercent<=1&&e.yPercent>=0&&e.yPercent<=1,n=ls(e.elementSelector,e.elementXPath),r=document.createElement("bugstash-pin");r.dataset.pinId=e.id,t&&n?(window.getComputedStyle(n).position==="static"&&(n.style.position="relative"),r.style.setProperty("--bs-x",`${e.xPercent*100}%`),r.style.setProperty("--bs-y",`${e.yPercent*100}%`),n.appendChild(r)):(r.style.setProperty("--bs-x",`${e.pageX}px`),r.style.setProperty("--bs-y",`${e.pageY}px`),document.body.appendChild(r));let s=r.attachShadow({mode:"open"}),o=document.createElement("style");o.textContent=Qr+Zr,s.appendChild(o);let i=Qt[e.status]||Qt.open,a=zn(e.creatorName||"U"),d=Dn(e.creatorName||"U"),p=Hn(e.creatorAvatar)?`<img class="bs-lp-avatar" src="${he(e.creatorAvatar)}" alt="" />`:`<div class="bs-lp-initials" style="background:${d}">${a}</div>`,b=e.commentCount>0?`<span class="bs-lp-badge">${e.commentCount>99?"99+":e.commentCount}</span>`:"",v=e.dueDate&&e.dueDate<Date.now()&&e.status!=="resolved"&&e.status!=="closed",k=document.createElement("div");k.className="bs-lp-marker",k.innerHTML=`
|
|
539
|
-
<div class="bs-lp-dot${v?" bs-overdue":""}" style="border:2px solid ${i}; background:transparent;">
|
|
540
|
-
${p}
|
|
541
|
-
${b}
|
|
542
|
-
</div>
|
|
543
|
-
`,s.appendChild(k),k.addEventListener("click",S=>{S.stopPropagation(),Vo(e,r)}),Ve.set(e.id,r)})}function bs(e){let t=typeof e=="string"?new Date(e).getTime():e;if(isNaN(t))return"";let n=Date.now()-t,r=Math.floor(n/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;let s=Math.floor(r/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`}function ns(e){requestAnimationFrame(()=>{let t=e.getBoundingClientRect(),n=16,r=0,s=0;if(t.right>window.innerWidth-n&&(r=window.innerWidth-n-t.right),t.left+r<n&&(r=n-t.left),t.bottom>window.innerHeight-n&&(s=window.innerHeight-n-t.bottom),t.top+s<n&&(s=n-t.top),r!==0||s!==0){let o=parseFloat(e.style.left)||0,i=parseFloat(e.style.top)||0;e.style.left=`${o+r}px`,e.style.top=`${i+s}px`,e.style.right="auto",e.style.bottom="auto"}})}async function Vo(e,t){ke();let n=document.createElement("div");n.className="bs-lp-popup";let r=ie(),s=e.createdBy||e.createdById,o=r&&(r.role==="owner"||r.role==="admin"||r.id===s),i=Qt[e.status]||Qt.open,a=ts[e.priority]||ts.medium,d=e.priority?e.priority.charAt(0).toUpperCase()+e.priority.slice(1):"Medium",p=zn(e.creatorName||"U"),b=Dn(e.creatorName||"U"),v=Hn(e.creatorAvatar)?`<img src="${he(e.creatorAvatar)}" alt="" style="width:100%;height:100%;object-fit:cover;border-radius:50%;" />`:`<span>${p}</span>`,k=e.status.replace("_"," "),S='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="22" y1="2" x2="11" y2="13"/><polygon points="22 2 15 22 11 13 2 9 22 2"/></svg>',ue='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',ye=e.dueDate&&e.dueDate<Date.now()&&e.status!=="resolved"&&e.status!=="closed",N=e.dueDate?`<div class="bs-lp-popup-due${ye?" overdue":""}">${ye?"OVERDUE: ":"Due: "}${new Date(e.dueDate).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}</div>`:"";n.innerHTML=`
|
|
544
|
-
<div class="bs-lp-popup-hdr">
|
|
545
|
-
<div class="bs-lp-popup-hdr-avatar" style="background:${b}">
|
|
546
|
-
${v}
|
|
547
|
-
</div>
|
|
548
|
-
<div class="bs-lp-popup-hdr-body">
|
|
549
|
-
<div class="bs-lp-popup-title">${he(e.title)}</div>
|
|
550
|
-
<div class="bs-lp-popup-meta">
|
|
551
|
-
<span>${e.creatorName||"Unknown"}</span>
|
|
552
|
-
<span>·</span>
|
|
553
|
-
<span>${bs(e.createdAt)}</span>
|
|
554
|
-
<span class="bs-lp-popup-pill" style="background:${i}18;color:${i}">${k}</span>
|
|
555
|
-
<span class="bs-lp-popup-pill" style="background:${a}18;color:${a}">${d}</span>
|
|
556
|
-
</div>
|
|
557
|
-
</div>
|
|
558
|
-
<button class="bs-lp-popup-close">${ue}</button>
|
|
559
|
-
</div>
|
|
560
|
-
${e.description?`<div class="bs-lp-popup-desc">${he(e.description)}</div>`:""}
|
|
561
|
-
${N}
|
|
562
|
-
${e.assigneeName?`<div class="bs-lp-popup-info"><span>Assigned to ${he(e.assigneeName)}</span></div>`:""}
|
|
563
|
-
<div class="bs-lp-cmts" id="bs-lp-cmts">
|
|
564
|
-
<div style="text-align:center;color:var(--bs-pin-muted);padding:12px;font-size:12px">Loading comments...</div>
|
|
565
|
-
</div>
|
|
566
|
-
<div class="bs-lp-input">
|
|
567
|
-
<input type="text" placeholder="Write a comment..." id="bs-lp-cmt-in" name="pin-comment" />
|
|
568
|
-
<button id="bs-lp-cmt-send">${S}</button>
|
|
569
|
-
</div>
|
|
570
|
-
<div class="bs-lp-acts">
|
|
571
|
-
${e.status!=="resolved"?'<button class="bs-lp-act resolve" id="bs-lp-resolve">✓ Resolve</button>':'<button class="bs-lp-act" id="bs-lp-reopen">↺ Reopen</button>'}
|
|
572
|
-
${o?'<button class="bs-lp-act delete" id="bs-lp-delete">✕ Delete</button>':""}
|
|
573
|
-
</div>
|
|
574
|
-
`,t.shadowRoot.appendChild(n),Xe=n,Ur(e.id).then(E=>{let D=n.querySelector("#bs-lp-cmts");if(!D)return;let z=E.success&&E.data?E.data:[];D.innerHTML=z.length?z.map(Z=>In(Z)).join(""):"",ns(n)}),ns(n),n.querySelector(".bs-lp-popup-close").addEventListener("click",E=>{E.stopPropagation(),ke()}),n.querySelector("#bs-lp-cmt-send")?.addEventListener("click",async()=>{let E=n.querySelector("#bs-lp-cmt-in"),D=E.value.trim();if(D)if(E.value="",navigator.onLine){let z=await Ln(e.id,D);if(z.success&&z.data){let Z=n.querySelector("#bs-lp-cmts");Z.innerHTML+=In(z.data),Z.scrollTop=Z.scrollHeight}}else Pn({type:"create_comment",data:{pinId:e.id,body:D}})}),n.querySelector("#bs-lp-cmt-in")?.addEventListener("keydown",E=>{E.key==="Enter"&&n.querySelector("#bs-lp-cmt-send")?.dispatchEvent(new Event("click"))}),n.querySelector("#bs-lp-resolve")?.addEventListener("click",async()=>{await Ft(e.id,{status:"resolved"});let E=M.findIndex(D=>D.id===e.id);E>=0&&(M=M.map((D,z)=>z===E?{...D,status:"resolved"}:D)),ke(),pe()}),n.querySelector("#bs-lp-reopen")?.addEventListener("click",async()=>{await Ft(e.id,{status:"open"});let E=M.findIndex(D=>D.id===e.id);E>=0&&(M=M.map((D,z)=>z===E?{...D,status:"open"}:D)),ke(),pe()});let H=!1;n.querySelector("#bs-lp-delete")?.addEventListener("click",async()=>{H||confirm("Delete this pin?")&&(H=!0,await qr(e.id),M=M.filter(E=>E.id!==e.id),ke(),pe())}),n.addEventListener("click",E=>E.stopPropagation())}function ke(){Xe?.remove(),Xe=null}var An=e=>e?typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1"):"";function Jo(e){if(!e||e===document.body||e===document.documentElement)return["body"];let t=[];for(let r of["data-testid","data-test-id","data-cy"]){let s=e.getAttribute(r);if(s){t.push(`[${r}="${An(s)}"]`);break}}if(e.id)try{let r=`#${An(e.id)}`;document.querySelectorAll(r).length===1&&t.push(r)}catch{}let n=e.getAttribute("aria-label");if(n){let r=`${e.tagName.toLowerCase()}[aria-label="${An(n)}"]`;try{document.querySelectorAll(r).length===1&&t.push(r)}catch{}}return t.push(Ko(e)),t}function Ko(e){let t=[],n=e;for(;n&&n!==document.body&&n!==document.documentElement;){let r=n,s=r.parentElement;if(!s)break;let o=r.tagName.toLowerCase(),i=Array.from(s.children).filter(a=>a.tagName===r.tagName);i.length>1&&(o+=`:nth-of-type(${i.indexOf(r)+1})`),t.unshift(o),n=s}return t.join(" > ")}function Go(e){if(!e)return"";let t=[],n=e;for(;n&&n!==document.body;){let r=1,s=n.previousElementSibling;for(;s;)s.tagName===n.tagName&&r++,s=s.previousElementSibling;t.unshift(`${n.tagName.toLowerCase()}[${r}]`),n=n.parentElement}return"/body/"+t.join("/")}function Qo(e,t,n,r,s,o,i){ke(),de?.querySelectorAll(".bs-lp-form").forEach(S=>S.remove());let a=document.createElement("div");a.className="bs-lp-form";let d=Math.min(300,window.innerWidth-32),p=16,b=s+p,v=o-8;b+d>window.innerWidth-p&&(b=s-d-p),b<p&&(b=p),a.style.left=`${b}px`,a.style.top=`${v}px`,requestAnimationFrame(()=>{let S=a.getBoundingClientRect();S.bottom>window.innerHeight-p&&(a.style.top=`${Math.max(p,o-S.height)}px`)});let k=is.filter(S=>S.userId!==ie()?.id).map(S=>`<option value="${S.userId}">${he(S.name)}</option>`).join("");a.innerHTML=`
|
|
575
|
-
<label class="bs-lp-form-label">Title</label>
|
|
576
|
-
<input type="text" id="bs-np-title" name="pin-title" placeholder="What's the issue?" autofocus />
|
|
577
|
-
<label class="bs-lp-form-label">Description</label>
|
|
578
|
-
<textarea id="bs-np-desc" name="pin-desc" placeholder="Add more details..."></textarea>
|
|
579
|
-
<label class="bs-lp-form-label">Priority</label>
|
|
580
|
-
<div class="bs-lp-seg-row" id="bs-np-priority-row">
|
|
581
|
-
<button class="bs-lp-seg-btn" data-value="low">Low</button>
|
|
582
|
-
<button class="bs-lp-seg-btn bs-active" data-value="medium">Medium</button>
|
|
583
|
-
<button class="bs-lp-seg-btn" data-value="high">High</button>
|
|
584
|
-
<button class="bs-lp-seg-btn" data-value="critical">Critical</button>
|
|
585
|
-
</div>
|
|
586
|
-
<label class="bs-lp-form-label">Category</label>
|
|
587
|
-
<div class="bs-lp-seg-row" id="bs-np-category-row">
|
|
588
|
-
<button class="bs-lp-seg-btn" data-value="ui">UI</button>
|
|
589
|
-
<button class="bs-lp-seg-btn" data-value="functionality">Func</button>
|
|
590
|
-
<button class="bs-lp-seg-btn" data-value="performance">Perf</button>
|
|
591
|
-
<button class="bs-lp-seg-btn" data-value="content">Content</button>
|
|
592
|
-
<button class="bs-lp-seg-btn bs-active" data-value="other">Other</button>
|
|
593
|
-
</div>
|
|
594
|
-
${k?`
|
|
595
|
-
<label class="bs-lp-form-label">Assign to</label>
|
|
596
|
-
<select id="bs-np-assignee" name="pin-assignee">
|
|
597
|
-
<option value="">Unassigned</option>
|
|
598
|
-
${k}
|
|
599
|
-
</select>
|
|
600
|
-
`:""}
|
|
601
|
-
<label class="bs-lp-form-label">Due date</label>
|
|
602
|
-
<input type="date" id="bs-np-duedate" name="pin-duedate" />
|
|
603
|
-
<div class="bs-lp-form-btns">
|
|
604
|
-
<button class="bs-lp-form-cancel" id="bs-np-cancel">Cancel</button>
|
|
605
|
-
<button class="bs-lp-form-submit" id="bs-np-submit">Create pin</button>
|
|
606
|
-
</div>
|
|
607
|
-
`,de.appendChild(a),a.addEventListener("click",S=>S.stopPropagation()),ss(a,"#bs-np-priority-row"),ss(a,"#bs-np-category-row"),a.querySelector("#bs-np-cancel").addEventListener("click",()=>a.remove()),a.querySelector("#bs-np-submit").addEventListener("click",async()=>{let S=a.querySelector("#bs-np-title").value.trim();if(!S){a.querySelector("#bs-np-title").style.borderColor="#ef4444";return}let ue=a.querySelector("#bs-np-submit");ue.textContent="Creating...",ue.style.opacity="0.6",ue.style.pointerEvents="none";let ye=a.querySelector("#bs-np-desc").value.trim(),N=os(a,"#bs-np-priority-row")||"medium",H=os(a,"#bs-np-category-row")||"other",D=a.querySelector("#bs-np-assignee")?.value||void 0,z=a.querySelector("#bs-np-duedate")?.value,Z=z?new Date(z).getTime():void 0,Se=JSON.stringify(Jo(i)),w=Go(i),se=fe().slice(-20).map(U=>`[${U.level}] ${U.args.join(" ")}`),wt=ge().slice(-10).map(U=>`${U.message} at ${U.source}:${U.lineno}`),an=xe().slice(-10).map(U=>`${U.method} ${U.url} \u2192 ${U.status}`),Le={projectId:Zt,pageUrl:window.location.href,pathname:window.location.pathname,elementSelector:Se,elementXPath:w,xPercent:n,yPercent:r,pageX:e,pageY:t,title:S,description:ye,priority:N,category:H,assigneeId:D,dueDate:Z,browserInfo:navigator.userAgent,screenSize:`${screen.width}x${screen.height}`,viewportSize:`${window.innerWidth}x${window.innerHeight}`,devicePixelRatio:window.devicePixelRatio,consoleLogs:se,networkErrors:an,jsErrors:wt};if(a.remove(),navigator.onLine){let U=await Sn(Le);U.success&&U.data&&(M=[...M,U.data],pe())}else{Pn({type:"create_pin",data:Le});let U=ie();M=[...M,{...Le,id:"local-"+Date.now(),orgId:"",status:"open",tags:[],createdBy:U?.id||"",creatorName:U?.name||"",commentCount:0,createdAt:Date.now(),updatedAt:Date.now()}],pe()}}),setTimeout(()=>a.querySelector("#bs-np-title")?.focus(),50)}function Zo(){bt("pin:created",e=>{let t=e.data;t.pathname===window.location.pathname&&(M.find(n=>n.id===t.id)||(M=[...M,t],Mn(M.map(n=>n.id)),pe()))}),bt("pin:updated",e=>{let t=e.data,n=M.findIndex(r=>r.id===t.id);n>=0&&(M=M.map((r,s)=>s===n?{...r,...t}:r),pe())}),bt("pin:deleted",e=>{let{id:t}=e.data;M=M.filter(n=>n.id!==t),ke(),pe()}),bt("comment:created",e=>{let t=e.data;if(Xe){let n=Xe.querySelector("#bs-lp-cmts");n&&(n.innerHTML+=In(t),n.scrollTop=n.scrollHeight)}})}function ei(){let e=window.location.pathname,t=()=>{window.location.pathname!==e&&(e=window.location.pathname,window.location.href,ps())},n=history.pushState,r=history.replaceState;history.pushState=function(...s){n.apply(this,s),t()},history.replaceState=function(...s){r.apply(this,s),t()},window.addEventListener("popstate",t)}function zn(e){return e.split(" ").map(t=>t[0]||"").join("").toUpperCase().slice(0,2)||"U"}function Hn(e){if(!e)return!1;try{let t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"}catch{return!1}}var rs=["linear-gradient(135deg, #667eea, #764ba2)","linear-gradient(135deg, #f093fb, #f5576c)","linear-gradient(135deg, #4facfe, #00f2fe)","linear-gradient(135deg, #43e97b, #38f9d7)","linear-gradient(135deg, #fa709a, #fee140)","linear-gradient(135deg, #a18cd1, #fbc2eb)","linear-gradient(135deg, #fccb90, #d57eeb)","linear-gradient(135deg, #e0c3fc, #8ec5fc)"];function Dn(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return rs[Math.abs(t)%rs.length]}function In(e){let t=e.author?.name||e.authorName||"Unknown",n=e.author?.avatar||e.authorAvatar,r=zn(t),s=Dn(t),o=Hn(n)?`<img src="${he(n)}" alt="" />`:`<span style="font-size:8px">${r}</span>`;return`
|
|
608
|
-
<div class="bs-lp-cmt">
|
|
609
|
-
<div class="bs-lp-cmt-avatar" style="background:${s}">
|
|
610
|
-
${o}
|
|
611
|
-
</div>
|
|
612
|
-
<div class="bs-lp-cmt-content">
|
|
613
|
-
<div class="bs-lp-cmt-top">
|
|
614
|
-
<span class="bs-lp-cmt-author">${he(t)}</span>
|
|
615
|
-
<span class="bs-lp-cmt-time">${bs(e.createdAt?new Date(e.createdAt).getTime():Date.now())}</span>
|
|
616
|
-
</div>
|
|
617
|
-
<div class="bs-lp-cmt-body">${he(e.body)}</div>
|
|
618
|
-
</div>
|
|
619
|
-
</div>
|
|
620
|
-
`}function ss(e,t){let n=e.querySelector(t);n&&n.querySelectorAll(".bs-lp-seg-btn").forEach(r=>{r.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),n.querySelectorAll(".bs-lp-seg-btn").forEach(o=>o.classList.remove("bs-active")),r.classList.add("bs-active")})})}function os(e,t){return e.querySelector(`${t} .bs-lp-seg-btn.bs-active`)?.dataset.value||""}function he(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML}var G,x=null,P=null,g=null,te=null,ut=null,ne=null,J=null,Te=null,K=!1,tn=!1,$e=!1,mt=null,Bn=null,ms="bugstash_fab_position",ft=null,Ke=null,Ge="report";var ae=Yr(),Me=Xr(),B={bug:'<svg width="28" height="28" viewBox="55 38 60 105" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M95.8 44h-29c-3 0-5.4 2.4-5.4 5.4v29c0 3 2.4 5.4 5.4 5.4h19.5c13 0 23.5-10.5 23.5-23.5v-2.8c0-7.5-6-13.5-13.5-13.5h-.5zm-6.2 28.2H74.8V57.4h14.8c5.8 0 10.4 4.7 10.4 10.4s-4.7 10.4-10.4 10.4z" fill="rgba(255,255,255,0.85)"/><path d="M100.4 96h-33.6c-3 0-5.4 2.4-5.4 5.4v33.6c0 3 2.4 5.4 5.4 5.4h22c15 0 27-12 27-27v-3.9c0-7.5-6-13.5-13.5-13.5h-1.9zm-7.8 32.2H74.8v-20h17.8c6.7 0 12.2 5.5 12.2 12.2 0 4.3-3.5 7.8-7.8 7.8h-4.6z" fill="rgba(255,255,255,1)"/></svg>',x:'<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',cam:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>',check:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg>',report:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>',console:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>',network:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>',ctx:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>',settings:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="21" x2="4" y2="14"/><line x1="4" y1="10" x2="4" y2="3"/><line x1="12" y1="21" x2="12" y2="12"/><line x1="12" y1="8" x2="12" y2="3"/><line x1="20" y1="21" x2="20" y2="16"/><line x1="20" y1="12" x2="20" y2="3"/><line x1="1" y1="14" x2="7" y2="14"/><line x1="9" y1="8" x2="15" y2="8"/><line x1="17" y1="16" x2="23" y2="16"/></svg>',history:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>',pin:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>',sun:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>',moon:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>',keyboard:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="2" y="4" width="20" height="16" rx="2"/><line x1="6" y1="8" x2="6" y2="8"/><line x1="10" y1="8" x2="10" y2="8"/><line x1="14" y1="8" x2="14" y2="8"/><line x1="18" y1="8" x2="18" y2="8"/><line x1="8" y1="12" x2="16" y2="12"/><line x1="6" y1="16" x2="18" y2="16"/></svg>'},ti=`
|
|
621
|
-
/* \u2500\u2500 Shadow Boundary Reset \u2500\u2500
|
|
622
|
-
* Cuts ALL inherited CSS from host page (color, font, line-height, etc.)
|
|
623
|
-
* Every element below must declare its own styles explicitly. */
|
|
624
|
-
:host {
|
|
625
|
-
all: initial !important;
|
|
626
|
-
display: block !important;
|
|
627
|
-
position: fixed !important;
|
|
628
|
-
inset: 0 !important;
|
|
629
|
-
pointer-events: none !important;
|
|
630
|
-
z-index: 2147483640 !important;
|
|
631
|
-
visibility: visible !important;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
/* \u2500\u2500 FAB \u2500\u2500 */
|
|
635
|
-
.bs-fab {
|
|
636
|
-
all: initial;
|
|
637
|
-
pointer-events: auto;
|
|
638
|
-
position: fixed;
|
|
639
|
-
bottom: 24px;
|
|
640
|
-
z-index: 2147483647;
|
|
641
|
-
width: 56px;
|
|
642
|
-
height: 56px;
|
|
643
|
-
border-radius: var(--bs-radius);
|
|
644
|
-
background: linear-gradient(135deg, var(--bs-fab1), var(--bs-fab2));
|
|
645
|
-
color: #fff;
|
|
646
|
-
cursor: grab;
|
|
647
|
-
box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 0 rgba(0,0,0,0.15);
|
|
648
|
-
display: flex;
|
|
649
|
-
align-items: center;
|
|
650
|
-
justify-content: center;
|
|
651
|
-
transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
|
|
652
|
-
animation: bs-pulse 3s ease-in-out infinite;
|
|
653
|
-
touch-action: none;
|
|
654
|
-
user-select: none;
|
|
655
|
-
-webkit-user-select: none;
|
|
656
|
-
}
|
|
657
|
-
.bs-fab.bs-dragging {
|
|
658
|
-
cursor: grabbing;
|
|
659
|
-
transition: none;
|
|
660
|
-
animation: none;
|
|
661
|
-
}
|
|
662
|
-
.bs-fab:hover {
|
|
663
|
-
transform: scale(1.08) translateY(-2px);
|
|
664
|
-
box-shadow: 0 8px 32px rgba(0,0,0,0.4);
|
|
665
|
-
animation: none;
|
|
666
|
-
}
|
|
667
|
-
.bs-fab:active { transform: scale(0.95); }
|
|
668
|
-
.bs-fab.bs-open {
|
|
669
|
-
animation: none;
|
|
670
|
-
transform: rotate(45deg) scale(0.9);
|
|
671
|
-
box-shadow: 0 2px 12px rgba(0,0,0,0.3);
|
|
672
|
-
}
|
|
673
|
-
.bs-fab.bs-open:hover { transform: rotate(45deg) scale(1); }
|
|
674
|
-
@keyframes bs-pulse {
|
|
675
|
-
0%, 100% { box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 0 rgba(0,0,0,0.15); }
|
|
676
|
-
50% { box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 10px rgba(0,0,0,0); }
|
|
677
|
-
}
|
|
678
|
-
.bs-fab-label {
|
|
679
|
-
position: absolute;
|
|
680
|
-
right: calc(100% + 12px);
|
|
681
|
-
background: var(--bs-bg2);
|
|
682
|
-
color: var(--bs-text);
|
|
683
|
-
font-family: 'Inter', sans-serif;
|
|
684
|
-
font-size: 13px;
|
|
685
|
-
font-weight: 500;
|
|
686
|
-
padding: 8px 14px;
|
|
687
|
-
border-radius: var(--bs-radius-sm);
|
|
688
|
-
white-space: nowrap;
|
|
689
|
-
box-shadow: 0 4px 20px rgba(0,0,0,0.3);
|
|
690
|
-
opacity: 0;
|
|
691
|
-
transform: translateX(8px);
|
|
692
|
-
transition: all 0.25s ease;
|
|
693
|
-
pointer-events: none;
|
|
694
|
-
}
|
|
695
|
-
.bs-fab:hover .bs-fab-label { opacity: 1; transform: translateX(0); }
|
|
696
|
-
.bs-fab-label::after {
|
|
697
|
-
content: '';
|
|
698
|
-
position: absolute;
|
|
699
|
-
right: -6px;
|
|
700
|
-
top: 50%;
|
|
701
|
-
transform: translateY(-50%);
|
|
702
|
-
border: 6px solid transparent;
|
|
703
|
-
border-left-color: var(--bs-bg2);
|
|
704
|
-
border-right: none;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
/* \u2500\u2500 Quick Action Toolbar \u2500\u2500 */
|
|
708
|
-
.bs-toolbar {
|
|
709
|
-
pointer-events: auto;
|
|
710
|
-
position: fixed;
|
|
711
|
-
z-index: 2147483646;
|
|
712
|
-
display: flex;
|
|
713
|
-
flex-direction: column;
|
|
714
|
-
gap: 6px;
|
|
715
|
-
bottom: 88px;
|
|
716
|
-
opacity: 0;
|
|
717
|
-
transform: translateY(10px);
|
|
718
|
-
transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
|
|
719
|
-
pointer-events: none;
|
|
720
|
-
}
|
|
721
|
-
.bs-toolbar.bs-show {
|
|
722
|
-
opacity: 1;
|
|
723
|
-
transform: translateY(0);
|
|
724
|
-
pointer-events: all;
|
|
725
|
-
}
|
|
726
|
-
.bs-toolbar-btn {
|
|
727
|
-
all: initial;
|
|
728
|
-
width: 40px;
|
|
729
|
-
height: 40px;
|
|
730
|
-
border-radius: var(--bs-radius-sm);
|
|
731
|
-
background: var(--bs-bg2);
|
|
732
|
-
border: 1px solid var(--bs-border);
|
|
733
|
-
color: var(--bs-muted);
|
|
734
|
-
cursor: pointer;
|
|
735
|
-
display: flex;
|
|
736
|
-
align-items: center;
|
|
737
|
-
justify-content: center;
|
|
738
|
-
transition: all 0.2s;
|
|
739
|
-
position: relative;
|
|
740
|
-
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
|
741
|
-
}
|
|
742
|
-
.bs-toolbar-btn:hover { color: var(--bs-text); border-color: var(--bs-accent); background: var(--bs-bg3); }
|
|
743
|
-
.bs-toolbar-btn.bs-active { color: var(--bs-accent); border-color: var(--bs-accent); }
|
|
744
|
-
.bs-toolbar-tip {
|
|
745
|
-
position: absolute;
|
|
746
|
-
right: calc(100% + 8px);
|
|
747
|
-
background: var(--bs-bg2);
|
|
748
|
-
color: var(--bs-text);
|
|
749
|
-
font-family: 'Inter', sans-serif;
|
|
750
|
-
font-size: 11px;
|
|
751
|
-
font-weight: 500;
|
|
752
|
-
padding: 4px 8px;
|
|
753
|
-
border-radius: 6px;
|
|
754
|
-
white-space: nowrap;
|
|
755
|
-
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
|
756
|
-
opacity: 0;
|
|
757
|
-
pointer-events: none;
|
|
758
|
-
transition: opacity 0.15s;
|
|
759
|
-
}
|
|
760
|
-
.bs-toolbar-btn:hover .bs-toolbar-tip { opacity: 1; }
|
|
761
|
-
.bs-toolbar-kbd {
|
|
762
|
-
font-size: 9px;
|
|
763
|
-
color: var(--bs-muted);
|
|
764
|
-
margin-left: 4px;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
/* \u2500\u2500 Backdrop \u2500\u2500 */
|
|
768
|
-
.bs-backdrop {
|
|
769
|
-
pointer-events: auto;
|
|
770
|
-
position: fixed;
|
|
771
|
-
inset: 0;
|
|
772
|
-
z-index: 2147483644;
|
|
773
|
-
background: rgba(0,0,0,0);
|
|
774
|
-
backdrop-filter: blur(0px);
|
|
775
|
-
transition: all 0.4s ease;
|
|
776
|
-
pointer-events: none;
|
|
777
|
-
}
|
|
778
|
-
.bs-backdrop.bs-in {
|
|
779
|
-
background: rgba(10,12,20,0.55);
|
|
780
|
-
backdrop-filter: blur(6px);
|
|
781
|
-
pointer-events: all;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
/* \u2500\u2500 Modal \u2500\u2500 */
|
|
785
|
-
.bs-modal {
|
|
786
|
-
pointer-events: auto;
|
|
787
|
-
position: fixed;
|
|
788
|
-
z-index: 2147483645;
|
|
789
|
-
top: 50%;
|
|
790
|
-
left: 50%;
|
|
791
|
-
width: 620px;
|
|
792
|
-
height: 680px;
|
|
793
|
-
max-width: calc(100vw - 32px);
|
|
794
|
-
max-height: calc(100vh - 48px);
|
|
795
|
-
background: var(--bs-bg);
|
|
796
|
-
border: 1px solid var(--bs-border);
|
|
797
|
-
border-radius: var(--bs-radius);
|
|
798
|
-
box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03) inset;
|
|
799
|
-
display: flex;
|
|
800
|
-
flex-direction: column;
|
|
801
|
-
overflow: hidden;
|
|
802
|
-
font-family: 'Inter', -apple-system, sans-serif;
|
|
803
|
-
transform: translate(-50%, -50%) scale(0.88);
|
|
804
|
-
opacity: 0;
|
|
805
|
-
transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1),
|
|
806
|
-
opacity 0.3s ease,
|
|
807
|
-
width 0.35s cubic-bezier(0.25,1,0.5,1),
|
|
808
|
-
height 0.35s cubic-bezier(0.25,1,0.5,1);
|
|
809
|
-
}
|
|
810
|
-
.bs-modal.bs-in {
|
|
811
|
-
transform: translate(-50%, -50%) scale(1);
|
|
812
|
-
opacity: 1;
|
|
813
|
-
}
|
|
814
|
-
.bs-modal.bs-out {
|
|
815
|
-
transform: translate(-50%, -50%) scale(0.85);
|
|
816
|
-
opacity: 0;
|
|
817
|
-
transition: transform 0.3s cubic-bezier(0.4,0,1,1), opacity 0.25s ease;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
/* \u2500\u2500 Header \u2500\u2500 */
|
|
821
|
-
.bs-hdr {
|
|
822
|
-
padding: 18px 22px 0;
|
|
823
|
-
display: flex;
|
|
824
|
-
justify-content: space-between;
|
|
825
|
-
align-items: center;
|
|
826
|
-
flex-shrink: 0;
|
|
827
|
-
}
|
|
828
|
-
.bs-logo {
|
|
829
|
-
font-family: 'Comfortaa', cursive;
|
|
830
|
-
font-weight: 700;
|
|
831
|
-
font-size: 18px;
|
|
832
|
-
background: linear-gradient(135deg, var(--bs-accent), #fff);
|
|
833
|
-
-webkit-background-clip: text;
|
|
834
|
-
-webkit-text-fill-color: transparent;
|
|
835
|
-
background-clip: text;
|
|
836
|
-
}
|
|
837
|
-
.bs-hdr-right {
|
|
838
|
-
display: flex;
|
|
839
|
-
align-items: center;
|
|
840
|
-
gap: 8px;
|
|
841
|
-
}
|
|
842
|
-
.bs-pin-toggle {
|
|
843
|
-
all: initial;
|
|
844
|
-
cursor: pointer;
|
|
845
|
-
padding: 5px 10px;
|
|
846
|
-
border-radius: var(--bs-radius-sm);
|
|
847
|
-
font-size: 11px;
|
|
848
|
-
font-weight: 600;
|
|
849
|
-
font-family: 'Inter', sans-serif;
|
|
850
|
-
color: var(--bs-muted);
|
|
851
|
-
border: 1px solid var(--bs-border);
|
|
852
|
-
transition: all 0.2s;
|
|
853
|
-
display: flex;
|
|
854
|
-
align-items: center;
|
|
855
|
-
gap: 5px;
|
|
856
|
-
}
|
|
857
|
-
.bs-pin-toggle:hover { color: var(--bs-text); border-color: var(--bs-accent); }
|
|
858
|
-
.bs-pin-toggle.active {
|
|
859
|
-
background: var(--bs-accent);
|
|
860
|
-
color: #fff;
|
|
861
|
-
border-color: var(--bs-accent);
|
|
862
|
-
-webkit-text-fill-color: #fff;
|
|
863
|
-
}
|
|
864
|
-
.bs-hdr-icon {
|
|
865
|
-
all: initial;
|
|
866
|
-
cursor: pointer;
|
|
867
|
-
display: flex;
|
|
868
|
-
align-items: center;
|
|
869
|
-
justify-content: center;
|
|
870
|
-
width: 28px;
|
|
871
|
-
height: 28px;
|
|
872
|
-
border-radius: var(--bs-radius-sm);
|
|
873
|
-
color: var(--bs-muted);
|
|
874
|
-
transition: all 0.2s;
|
|
875
|
-
}
|
|
876
|
-
.bs-hdr-icon:hover { color: var(--bs-text); background: var(--bs-bg3); }
|
|
877
|
-
.bs-user-badge {
|
|
878
|
-
display: flex;
|
|
879
|
-
align-items: center;
|
|
880
|
-
gap: 6px;
|
|
881
|
-
font-size: 11px;
|
|
882
|
-
color: var(--bs-muted);
|
|
883
|
-
font-family: 'Inter', sans-serif;
|
|
884
|
-
}
|
|
885
|
-
.bs-user-avatar {
|
|
886
|
-
width: 22px;
|
|
887
|
-
height: 22px;
|
|
888
|
-
border-radius: 50%;
|
|
889
|
-
background: linear-gradient(135deg, var(--bs-accent), var(--bs-accent2));
|
|
890
|
-
display: flex;
|
|
891
|
-
align-items: center;
|
|
892
|
-
justify-content: center;
|
|
893
|
-
font-size: 10px;
|
|
894
|
-
font-weight: 700;
|
|
895
|
-
color: #fff;
|
|
896
|
-
}
|
|
897
|
-
.bs-login-form {
|
|
898
|
-
padding: 32px 24px;
|
|
899
|
-
display: flex;
|
|
900
|
-
flex-direction: column;
|
|
901
|
-
align-items: center;
|
|
902
|
-
gap: 14px;
|
|
903
|
-
}
|
|
904
|
-
.bs-login-logo {
|
|
905
|
-
font-family: 'Comfortaa', cursive;
|
|
906
|
-
font-weight: 700;
|
|
907
|
-
font-size: 28px;
|
|
908
|
-
background: linear-gradient(135deg, var(--bs-accent), #fff);
|
|
909
|
-
-webkit-background-clip: text;
|
|
910
|
-
-webkit-text-fill-color: transparent;
|
|
911
|
-
background-clip: text;
|
|
912
|
-
margin-bottom: 4px;
|
|
913
|
-
}
|
|
914
|
-
.bs-login-subtitle {
|
|
915
|
-
font-size: 13px;
|
|
916
|
-
color: var(--bs-muted);
|
|
917
|
-
margin-bottom: 8px;
|
|
918
|
-
}
|
|
919
|
-
.bs-login-input {
|
|
920
|
-
width: 100%;
|
|
921
|
-
max-width: 300px;
|
|
922
|
-
padding: 10px 14px;
|
|
923
|
-
border-radius: var(--bs-radius-sm);
|
|
924
|
-
border: 1px solid var(--bs-border);
|
|
925
|
-
background: var(--bs-bg2);
|
|
926
|
-
color: var(--bs-text);
|
|
927
|
-
font-size: 13px;
|
|
928
|
-
font-family: 'Inter', sans-serif;
|
|
929
|
-
outline: none;
|
|
930
|
-
transition: border-color 0.2s;
|
|
931
|
-
box-sizing: border-box;
|
|
932
|
-
}
|
|
933
|
-
.bs-login-input:focus { border-color: var(--bs-accent); }
|
|
934
|
-
.bs-login-input::placeholder { color: var(--bs-muted); opacity: 0.6; }
|
|
935
|
-
.bs-login-btn {
|
|
936
|
-
width: 100%;
|
|
937
|
-
max-width: 300px;
|
|
938
|
-
padding: 10px;
|
|
939
|
-
border-radius: var(--bs-radius-sm);
|
|
940
|
-
border: none;
|
|
941
|
-
background: linear-gradient(135deg, var(--bs-accent), var(--bs-accent2));
|
|
942
|
-
color: #fff;
|
|
943
|
-
font-size: 14px;
|
|
944
|
-
font-weight: 600;
|
|
945
|
-
font-family: 'Inter', sans-serif;
|
|
946
|
-
cursor: pointer;
|
|
947
|
-
transition: opacity 0.2s;
|
|
948
|
-
}
|
|
949
|
-
.bs-login-btn:hover { opacity: 0.9; }
|
|
950
|
-
.bs-login-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
951
|
-
.bs-login-error {
|
|
952
|
-
font-size: 12px;
|
|
953
|
-
color: var(--bs-red);
|
|
954
|
-
max-width: 300px;
|
|
955
|
-
text-align: center;
|
|
956
|
-
}
|
|
957
|
-
.bs-login-logout {
|
|
958
|
-
all: initial;
|
|
959
|
-
cursor: pointer;
|
|
960
|
-
font-size: 11px;
|
|
961
|
-
color: var(--bs-muted);
|
|
962
|
-
font-family: 'Inter', sans-serif;
|
|
963
|
-
padding: 4px 8px;
|
|
964
|
-
border-radius: 4px;
|
|
965
|
-
transition: all 0.15s;
|
|
966
|
-
}
|
|
967
|
-
.bs-login-logout:hover { color: var(--bs-red); }
|
|
968
|
-
.bs-close-btn {
|
|
969
|
-
all: initial;
|
|
970
|
-
cursor: pointer;
|
|
971
|
-
color: var(--bs-muted);
|
|
972
|
-
padding: 6px;
|
|
973
|
-
border-radius: var(--bs-radius-sm);
|
|
974
|
-
display: flex;
|
|
975
|
-
transition: all 0.2s;
|
|
976
|
-
}
|
|
977
|
-
.bs-close-btn:hover { color: var(--bs-text); background: var(--bs-bg3); }
|
|
978
|
-
|
|
979
|
-
/* \u2500\u2500 Tabs \u2500\u2500 */
|
|
980
|
-
.bs-tabs {
|
|
981
|
-
display: flex;
|
|
982
|
-
gap: 2px;
|
|
983
|
-
padding: 12px 22px 0;
|
|
984
|
-
position: relative;
|
|
985
|
-
flex-shrink: 0;
|
|
986
|
-
overflow-x: auto;
|
|
987
|
-
-webkit-overflow-scrolling: touch;
|
|
988
|
-
scrollbar-width: none;
|
|
989
|
-
}
|
|
990
|
-
.bs-tabs::-webkit-scrollbar { display: none; }
|
|
991
|
-
.bs-tab {
|
|
992
|
-
all: initial;
|
|
993
|
-
cursor: pointer;
|
|
994
|
-
display: flex;
|
|
995
|
-
align-items: center;
|
|
996
|
-
gap: 6px;
|
|
997
|
-
padding: 10px 14px;
|
|
998
|
-
border-radius: var(--bs-radius-sm) var(--bs-radius-sm) 0 0;
|
|
999
|
-
font-family: 'Inter', sans-serif;
|
|
1000
|
-
font-size: 12px;
|
|
1001
|
-
font-weight: 600;
|
|
1002
|
-
color: var(--bs-muted);
|
|
1003
|
-
transition: all 0.25s ease;
|
|
1004
|
-
position: relative;
|
|
1005
|
-
white-space: nowrap;
|
|
1006
|
-
flex-shrink: 0;
|
|
1007
|
-
}
|
|
1008
|
-
.bs-tab:hover { color: var(--bs-text); background: var(--bs-bg2); }
|
|
1009
|
-
.bs-tab.bs-active {
|
|
1010
|
-
color: var(--bs-accent);
|
|
1011
|
-
background: var(--bs-bg2);
|
|
1012
|
-
}
|
|
1013
|
-
.bs-tab.bs-active::after {
|
|
1014
|
-
content: '';
|
|
1015
|
-
position: absolute;
|
|
1016
|
-
bottom: 0;
|
|
1017
|
-
left: 8px;
|
|
1018
|
-
right: 8px;
|
|
1019
|
-
height: 2px;
|
|
1020
|
-
background: var(--bs-accent);
|
|
1021
|
-
border-radius: 2px 2px 0 0;
|
|
1022
|
-
animation: bs-tabIn 0.25s ease;
|
|
1023
|
-
}
|
|
1024
|
-
@keyframes bs-tabIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
|
|
1025
|
-
.bs-tab-badge {
|
|
1026
|
-
font-size: 10px;
|
|
1027
|
-
font-weight: 700;
|
|
1028
|
-
padding: 1px 6px;
|
|
1029
|
-
border-radius: 10px;
|
|
1030
|
-
background: var(--bs-bg3);
|
|
1031
|
-
color: var(--bs-muted);
|
|
1032
|
-
line-height: 1.4;
|
|
1033
|
-
}
|
|
1034
|
-
.bs-tab.bs-active .bs-tab-badge { background: var(--bs-accent); color: #fff; }
|
|
1035
|
-
.bs-tab-badge.bs-warn { background: var(--bs-red); color: #fff; }
|
|
1036
|
-
.bs-tab-divider {
|
|
1037
|
-
height: 1px;
|
|
1038
|
-
background: var(--bs-border);
|
|
1039
|
-
flex-shrink: 0;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
/* \u2500\u2500 Scrollable Body \u2500\u2500 */
|
|
1043
|
-
.bs-scroll {
|
|
1044
|
-
flex: 1;
|
|
1045
|
-
overflow-y: auto;
|
|
1046
|
-
overflow-x: hidden;
|
|
1047
|
-
padding: 16px 22px 22px;
|
|
1048
|
-
overscroll-behavior: contain;
|
|
1049
|
-
}
|
|
1050
|
-
.bs-scroll::-webkit-scrollbar { width: 5px; }
|
|
1051
|
-
.bs-scroll::-webkit-scrollbar-track { background: transparent; }
|
|
1052
|
-
.bs-scroll::-webkit-scrollbar-thumb { background: var(--bs-border); border-radius: 4px; }
|
|
1053
|
-
|
|
1054
|
-
/* \u2500\u2500 View slide animation \u2500\u2500 */
|
|
1055
|
-
.bs-view { animation: bs-slideUp 0.3s cubic-bezier(0.22,1,0.36,1); }
|
|
1056
|
-
@keyframes bs-slideUp {
|
|
1057
|
-
from { opacity: 0; transform: translateY(12px); }
|
|
1058
|
-
to { opacity: 1; transform: translateY(0); }
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
/* \u2500\u2500 Form \u2500\u2500 */
|
|
1062
|
-
.bs-field { margin-bottom: 16px; }
|
|
1063
|
-
.bs-field-label {
|
|
1064
|
-
font-size: 13px;
|
|
1065
|
-
font-weight: 600;
|
|
1066
|
-
color: var(--bs-text);
|
|
1067
|
-
margin-bottom: 7px;
|
|
1068
|
-
display: flex;
|
|
1069
|
-
align-items: center;
|
|
1070
|
-
gap: 6px;
|
|
1071
|
-
}
|
|
1072
|
-
.bs-field-hint { font-size: 11px; font-weight: 400; color: var(--bs-muted); }
|
|
1073
|
-
.bs-input, .bs-textarea {
|
|
1074
|
-
width: 100%;
|
|
1075
|
-
padding: 11px 14px;
|
|
1076
|
-
border: 1.5px solid var(--bs-border);
|
|
1077
|
-
border-radius: var(--bs-radius-sm);
|
|
1078
|
-
font-size: 14px;
|
|
1079
|
-
font-family: 'Inter', sans-serif;
|
|
1080
|
-
background: var(--bs-bg2);
|
|
1081
|
-
color: var(--bs-text);
|
|
1082
|
-
box-sizing: border-box;
|
|
1083
|
-
transition: all 0.2s ease;
|
|
1084
|
-
-webkit-appearance: none;
|
|
1085
|
-
}
|
|
1086
|
-
.bs-input::placeholder, .bs-textarea::placeholder { color: var(--bs-muted); opacity: 0.5; }
|
|
1087
|
-
.bs-input:focus, .bs-textarea:focus {
|
|
1088
|
-
outline: none;
|
|
1089
|
-
border-color: var(--bs-accent);
|
|
1090
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--bs-accent) 15%, transparent);
|
|
1091
|
-
}
|
|
1092
|
-
.bs-textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
|
|
1093
|
-
/* \u2500\u2500 Severity \u2500\u2500 */
|
|
1094
|
-
.bs-sev-row { display: flex; gap: 8px; }
|
|
1095
|
-
.bs-sev-btn {
|
|
1096
|
-
all: initial;
|
|
1097
|
-
flex: 1;
|
|
1098
|
-
padding: 10px 0;
|
|
1099
|
-
border-radius: var(--bs-radius-sm);
|
|
1100
|
-
text-align: center;
|
|
1101
|
-
font-size: 12px;
|
|
1102
|
-
font-weight: 600;
|
|
1103
|
-
font-family: 'Inter', sans-serif;
|
|
1104
|
-
cursor: pointer;
|
|
1105
|
-
transition: all 0.25s ease;
|
|
1106
|
-
position: relative;
|
|
1107
|
-
}
|
|
1108
|
-
.bs-sev-btn.bs-sev-low { background: color-mix(in srgb, var(--bs-green) 8%, transparent); color: var(--bs-green); border: 1.5px solid color-mix(in srgb, var(--bs-green) 15%, transparent); }
|
|
1109
|
-
.bs-sev-btn.bs-sev-medium { background: color-mix(in srgb, var(--bs-yellow) 8%, transparent); color: var(--bs-yellow); border: 1.5px solid color-mix(in srgb, var(--bs-yellow) 15%, transparent); }
|
|
1110
|
-
.bs-sev-btn.bs-sev-high { background: color-mix(in srgb, var(--bs-orange) 8%, transparent); color: var(--bs-orange); border: 1.5px solid color-mix(in srgb, var(--bs-orange) 15%, transparent); }
|
|
1111
|
-
.bs-sev-btn.bs-sev-critical { background: color-mix(in srgb, var(--bs-red) 8%, transparent); color: var(--bs-red); border: 1.5px solid color-mix(in srgb, var(--bs-red) 15%, transparent); }
|
|
1112
|
-
.bs-sev-btn:hover { transform: translateY(-1px); }
|
|
1113
|
-
.bs-sev-btn:active { transform: scale(0.96); }
|
|
1114
|
-
.bs-sev-btn.bs-picked { box-shadow: 0 0 0 2px currentColor; transform: translateY(-1px); }
|
|
1115
|
-
.bs-sev-btn.bs-picked::after {
|
|
1116
|
-
content: '';
|
|
1117
|
-
position: absolute;
|
|
1118
|
-
top: 4px;
|
|
1119
|
-
right: 6px;
|
|
1120
|
-
width: 6px;
|
|
1121
|
-
height: 6px;
|
|
1122
|
-
border-radius: 50%;
|
|
1123
|
-
background: currentColor;
|
|
1124
|
-
animation: bs-pop 0.3s cubic-bezier(0.34,1.56,0.64,1);
|
|
1125
|
-
}
|
|
1126
|
-
@keyframes bs-pop { from { transform: scale(0); } to { transform: scale(1); } }
|
|
1127
|
-
|
|
1128
|
-
/* \u2500\u2500 Screenshot \u2500\u2500 */
|
|
1129
|
-
.bs-shot-area {
|
|
1130
|
-
display: flex;
|
|
1131
|
-
align-items: center;
|
|
1132
|
-
gap: 12px;
|
|
1133
|
-
padding: 14px 16px;
|
|
1134
|
-
background: var(--bs-bg2);
|
|
1135
|
-
border: 1.5px dashed var(--bs-border);
|
|
1136
|
-
border-radius: var(--bs-radius-sm);
|
|
1137
|
-
margin-bottom: 16px;
|
|
1138
|
-
cursor: pointer;
|
|
1139
|
-
transition: all 0.25s ease;
|
|
1140
|
-
}
|
|
1141
|
-
.bs-shot-area:hover { border-color: var(--bs-accent); border-style: solid; background: var(--bs-bg3); }
|
|
1142
|
-
.bs-shot-area:active { transform: scale(0.98); }
|
|
1143
|
-
.bs-shot-icon {
|
|
1144
|
-
width: 40px;
|
|
1145
|
-
height: 40px;
|
|
1146
|
-
border-radius: var(--bs-radius-sm);
|
|
1147
|
-
background: color-mix(in srgb, var(--bs-accent) 12%, transparent);
|
|
1148
|
-
display: flex;
|
|
1149
|
-
align-items: center;
|
|
1150
|
-
justify-content: center;
|
|
1151
|
-
color: var(--bs-accent);
|
|
1152
|
-
flex-shrink: 0;
|
|
1153
|
-
}
|
|
1154
|
-
.bs-shot-text { flex: 1; }
|
|
1155
|
-
.bs-shot-title { font-size: 13px; font-weight: 600; color: var(--bs-text); }
|
|
1156
|
-
.bs-shot-sub { font-size: 11px; color: var(--bs-muted); margin-top: 2px; }
|
|
1157
|
-
.bs-shot-area.bs-captured { border-style: solid; border-color: var(--bs-green); }
|
|
1158
|
-
.bs-shot-area.bs-captured .bs-shot-icon { background: color-mix(in srgb, var(--bs-green) 12%, transparent); color: var(--bs-green); }
|
|
1159
|
-
|
|
1160
|
-
/* \u2500\u2500 Category Chips \u2500\u2500 */
|
|
1161
|
-
.bs-cat-row { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
1162
|
-
.bs-cat-btn {
|
|
1163
|
-
all: initial;
|
|
1164
|
-
padding: 7px 14px;
|
|
1165
|
-
border-radius: 20px;
|
|
1166
|
-
font-size: 12px;
|
|
1167
|
-
font-weight: 600;
|
|
1168
|
-
font-family: 'Inter', sans-serif;
|
|
1169
|
-
cursor: pointer;
|
|
1170
|
-
transition: all 0.2s ease;
|
|
1171
|
-
background: var(--bs-bg2);
|
|
1172
|
-
color: var(--bs-muted);
|
|
1173
|
-
border: 1.5px solid var(--bs-border);
|
|
1174
|
-
}
|
|
1175
|
-
.bs-cat-btn:hover { color: var(--bs-text); border-color: var(--bs-accent); }
|
|
1176
|
-
.bs-cat-btn.bs-picked {
|
|
1177
|
-
background: color-mix(in srgb, var(--bs-accent) 12%, transparent);
|
|
1178
|
-
color: var(--bs-accent);
|
|
1179
|
-
border-color: var(--bs-accent);
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
/* \u2500\u2500 Context Bar \u2500\u2500 */
|
|
1183
|
-
.bs-ctx-bar {
|
|
1184
|
-
display: flex;
|
|
1185
|
-
gap: 2px;
|
|
1186
|
-
margin-bottom: 16px;
|
|
1187
|
-
background: var(--bs-bg2);
|
|
1188
|
-
border-radius: var(--bs-radius-sm);
|
|
1189
|
-
padding: 3px;
|
|
1190
|
-
border: 1px solid var(--bs-border);
|
|
1191
|
-
}
|
|
1192
|
-
.bs-ctx-chip {
|
|
1193
|
-
flex: 1;
|
|
1194
|
-
display: flex;
|
|
1195
|
-
flex-direction: column;
|
|
1196
|
-
align-items: center;
|
|
1197
|
-
gap: 2px;
|
|
1198
|
-
padding: 8px 4px;
|
|
1199
|
-
border-radius: calc(var(--bs-radius-sm) - 2px);
|
|
1200
|
-
transition: background 0.2s;
|
|
1201
|
-
}
|
|
1202
|
-
.bs-ctx-chip.bs-has { background: var(--bs-bg3); }
|
|
1203
|
-
.bs-ctx-chip.bs-alert { background: color-mix(in srgb, var(--bs-red) 8%, transparent); }
|
|
1204
|
-
.bs-ctx-n {
|
|
1205
|
-
font-size: 15px;
|
|
1206
|
-
font-weight: 700;
|
|
1207
|
-
color: var(--bs-text);
|
|
1208
|
-
line-height: 1;
|
|
1209
|
-
}
|
|
1210
|
-
.bs-ctx-chip.bs-alert .bs-ctx-n { color: var(--bs-red); }
|
|
1211
|
-
.bs-ctx-l {
|
|
1212
|
-
font-size: 9px;
|
|
1213
|
-
font-weight: 600;
|
|
1214
|
-
text-transform: uppercase;
|
|
1215
|
-
letter-spacing: 0.3px;
|
|
1216
|
-
color: var(--bs-muted);
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
/* \u2500\u2500 Report Summary Bar \u2500\u2500 */
|
|
1220
|
-
.bs-report-summary {
|
|
1221
|
-
display: flex;
|
|
1222
|
-
align-items: center;
|
|
1223
|
-
justify-content: space-between;
|
|
1224
|
-
padding: 10px 14px;
|
|
1225
|
-
border-radius: var(--bs-radius-sm);
|
|
1226
|
-
background: var(--bs-bg2);
|
|
1227
|
-
border: 1px solid var(--bs-border);
|
|
1228
|
-
margin-bottom: 16px;
|
|
1229
|
-
font-size: 12px;
|
|
1230
|
-
color: var(--bs-muted);
|
|
1231
|
-
}
|
|
1232
|
-
.bs-report-summary.bs-alert {
|
|
1233
|
-
background: color-mix(in srgb, var(--bs-red) 6%, transparent);
|
|
1234
|
-
border-color: color-mix(in srgb, var(--bs-red) 15%, transparent);
|
|
1235
|
-
color: var(--bs-red);
|
|
1236
|
-
}
|
|
1237
|
-
.bs-report-summary.bs-has { color: var(--bs-text); }
|
|
1238
|
-
.bs-report-summary-left { display: flex; align-items: center; gap: 8px; }
|
|
1239
|
-
.bs-report-summary-icon {
|
|
1240
|
-
width: 22px; height: 22px;
|
|
1241
|
-
border-radius: 50%;
|
|
1242
|
-
background: color-mix(in srgb, var(--bs-green) 12%, transparent);
|
|
1243
|
-
color: var(--bs-green);
|
|
1244
|
-
display: flex; align-items: center; justify-content: center;
|
|
1245
|
-
font-size: 10px; flex-shrink: 0;
|
|
1246
|
-
}
|
|
1247
|
-
.bs-report-summary-icon.bs-warn {
|
|
1248
|
-
background: color-mix(in srgb, var(--bs-red) 12%, transparent);
|
|
1249
|
-
color: var(--bs-red);
|
|
1250
|
-
font-weight: 800; font-size: 12px;
|
|
1251
|
-
}
|
|
1252
|
-
.bs-input-title {
|
|
1253
|
-
font-size: 16px !important;
|
|
1254
|
-
font-weight: 600;
|
|
1255
|
-
padding: 14px !important;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
.bs-auto-step-n {
|
|
1259
|
-
width: 20px;
|
|
1260
|
-
height: 20px;
|
|
1261
|
-
border-radius: 50%;
|
|
1262
|
-
background: color-mix(in srgb, var(--bs-accent) 15%, transparent);
|
|
1263
|
-
color: var(--bs-accent);
|
|
1264
|
-
font-size: 10px;
|
|
1265
|
-
font-weight: 700;
|
|
1266
|
-
display: flex;
|
|
1267
|
-
align-items: center;
|
|
1268
|
-
justify-content: center;
|
|
1269
|
-
flex-shrink: 0;
|
|
1270
|
-
}
|
|
1271
|
-
.bs-auto-muted {
|
|
1272
|
-
font-size: 12px;
|
|
1273
|
-
color: var(--bs-muted);
|
|
1274
|
-
padding: 6px 0;
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
/* \u2500\u2500 Submit \u2500\u2500 */
|
|
1278
|
-
.bs-submit-btn {
|
|
1279
|
-
all: initial;
|
|
1280
|
-
width: 100%;
|
|
1281
|
-
padding: 14px;
|
|
1282
|
-
background: linear-gradient(135deg, var(--bs-fab1), var(--bs-fab2));
|
|
1283
|
-
color: #fff;
|
|
1284
|
-
border-radius: var(--bs-radius-sm);
|
|
1285
|
-
font-size: 15px;
|
|
1286
|
-
font-weight: 700;
|
|
1287
|
-
font-family: 'Inter', sans-serif;
|
|
1288
|
-
cursor: pointer;
|
|
1289
|
-
text-align: center;
|
|
1290
|
-
box-sizing: border-box;
|
|
1291
|
-
transition: all 0.3s ease;
|
|
1292
|
-
position: relative;
|
|
1293
|
-
overflow: hidden;
|
|
1294
|
-
}
|
|
1295
|
-
.bs-submit-btn:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.3); transform: translateY(-1px); }
|
|
1296
|
-
.bs-submit-btn:active { transform: translateY(0) scale(0.98); }
|
|
1297
|
-
.bs-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
|
|
1298
|
-
.bs-submit-btn.bs-submit-ok {
|
|
1299
|
-
background: var(--bs-green) !important;
|
|
1300
|
-
opacity: 1 !important;
|
|
1301
|
-
display: flex; align-items: center; justify-content: center; gap: 6px;
|
|
1302
|
-
}
|
|
1303
|
-
.bs-submit-btn.bs-submit-err {
|
|
1304
|
-
background: var(--bs-red) !important;
|
|
1305
|
-
opacity: 1 !important;
|
|
1306
|
-
font-size: 13px;
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
/* \u2500\u2500 Console \u2500\u2500 */
|
|
1310
|
-
.bs-log {
|
|
1311
|
-
padding: 8px 10px;
|
|
1312
|
-
border-radius: var(--bs-radius-sm);
|
|
1313
|
-
margin-bottom: 4px;
|
|
1314
|
-
font-family: 'SF Mono', 'Fira Code', monospace;
|
|
1315
|
-
font-size: 11.5px;
|
|
1316
|
-
line-height: 1.5;
|
|
1317
|
-
display: flex;
|
|
1318
|
-
gap: 8px;
|
|
1319
|
-
align-items: flex-start;
|
|
1320
|
-
transition: background 0.15s;
|
|
1321
|
-
}
|
|
1322
|
-
.bs-log:hover { background: var(--bs-bg2); }
|
|
1323
|
-
.bs-log-lv {
|
|
1324
|
-
font-weight: 700;
|
|
1325
|
-
text-transform: uppercase;
|
|
1326
|
-
font-size: 9px;
|
|
1327
|
-
padding: 3px 6px;
|
|
1328
|
-
border-radius: 5px;
|
|
1329
|
-
flex-shrink: 0;
|
|
1330
|
-
margin-top: 2px;
|
|
1331
|
-
letter-spacing: 0.4px;
|
|
1332
|
-
}
|
|
1333
|
-
.bs-log-lv.bs-le { background: color-mix(in srgb, var(--bs-red) 12%, transparent); color: var(--bs-red); }
|
|
1334
|
-
.bs-log-lv.bs-lw { background: color-mix(in srgb, var(--bs-orange) 10%, transparent); color: var(--bs-orange); }
|
|
1335
|
-
.bs-log-lv.bs-ll { background: var(--bs-bg3); color: var(--bs-muted); }
|
|
1336
|
-
.bs-log-lv.bs-li { background: color-mix(in srgb, var(--bs-accent) 10%, transparent); color: var(--bs-accent); }
|
|
1337
|
-
.bs-log-lv.bs-ld { background: var(--bs-bg2); color: var(--bs-muted); }
|
|
1338
|
-
.bs-log-m { color: var(--bs-text); word-break: break-word; flex: 1; white-space: pre-wrap; }
|
|
1339
|
-
.bs-log-t { color: var(--bs-muted); opacity: 0.5; flex-shrink: 0; font-size: 10px; margin-top: 3px; }
|
|
1340
|
-
|
|
1341
|
-
/* \u2500\u2500 Network \u2500\u2500 */
|
|
1342
|
-
.bs-net {
|
|
1343
|
-
padding: 9px 10px;
|
|
1344
|
-
border-radius: var(--bs-radius-sm);
|
|
1345
|
-
margin-bottom: 4px;
|
|
1346
|
-
font-family: 'SF Mono', 'Fira Code', monospace;
|
|
1347
|
-
font-size: 11.5px;
|
|
1348
|
-
display: flex;
|
|
1349
|
-
gap: 8px;
|
|
1350
|
-
align-items: center;
|
|
1351
|
-
transition: background 0.15s;
|
|
1352
|
-
}
|
|
1353
|
-
.bs-net:hover { background: var(--bs-bg2); }
|
|
1354
|
-
.bs-net-m { font-weight: 700; font-size: 10px; color: var(--bs-accent); flex-shrink: 0; width: 34px; }
|
|
1355
|
-
.bs-net-s { font-weight: 700; font-size: 10px; padding: 3px 7px; border-radius: 5px; flex-shrink: 0; }
|
|
1356
|
-
.bs-net-s.bs-ok { background: color-mix(in srgb, var(--bs-green) 10%, transparent); color: var(--bs-green); }
|
|
1357
|
-
.bs-net-s.bs-fail { background: color-mix(in srgb, var(--bs-red) 10%, transparent); color: var(--bs-red); }
|
|
1358
|
-
.bs-net-u { color: var(--bs-text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1359
|
-
.bs-net-d { color: var(--bs-muted); opacity: 0.5; flex-shrink: 0; font-size: 10px; }
|
|
1360
|
-
|
|
1361
|
-
/* \u2500\u2500 Context: Errors \u2500\u2500 */
|
|
1362
|
-
.bs-err-card {
|
|
1363
|
-
padding: 12px 14px;
|
|
1364
|
-
margin-bottom: 8px;
|
|
1365
|
-
background: color-mix(in srgb, var(--bs-red) 6%, transparent);
|
|
1366
|
-
border: 1px solid color-mix(in srgb, var(--bs-red) 10%, transparent);
|
|
1367
|
-
border-radius: var(--bs-radius-sm);
|
|
1368
|
-
transition: border-color 0.2s;
|
|
1369
|
-
}
|
|
1370
|
-
.bs-err-card:hover { border-color: color-mix(in srgb, var(--bs-red) 20%, transparent); }
|
|
1371
|
-
.bs-err-m { color: var(--bs-red); font-weight: 600; font-size: 13px; margin-bottom: 6px; line-height: 1.4; }
|
|
1372
|
-
.bs-err-stack {
|
|
1373
|
-
font-family: 'SF Mono', monospace;
|
|
1374
|
-
font-size: 10px;
|
|
1375
|
-
color: var(--bs-muted);
|
|
1376
|
-
white-space: pre-wrap;
|
|
1377
|
-
max-height: 72px;
|
|
1378
|
-
overflow-y: auto;
|
|
1379
|
-
line-height: 1.5;
|
|
1380
|
-
}
|
|
1381
|
-
.bs-err-meta { font-size: 10px; color: var(--bs-muted); margin-top: 6px; }
|
|
1382
|
-
|
|
1383
|
-
/* \u2500\u2500 Context: Section Title \u2500\u2500 */
|
|
1384
|
-
.bs-sec {
|
|
1385
|
-
font-size: 10px;
|
|
1386
|
-
font-weight: 700;
|
|
1387
|
-
color: var(--bs-accent);
|
|
1388
|
-
text-transform: uppercase;
|
|
1389
|
-
letter-spacing: 0.8px;
|
|
1390
|
-
margin: 20px 0 10px;
|
|
1391
|
-
padding-bottom: 8px;
|
|
1392
|
-
border-bottom: 1px solid var(--bs-border);
|
|
1393
|
-
display: flex;
|
|
1394
|
-
align-items: center;
|
|
1395
|
-
gap: 6px;
|
|
1396
|
-
}
|
|
1397
|
-
.bs-sec:first-child { margin-top: 0; }
|
|
1398
|
-
.bs-sec-n {
|
|
1399
|
-
background: var(--bs-bg3);
|
|
1400
|
-
color: var(--bs-muted);
|
|
1401
|
-
font-size: 9px;
|
|
1402
|
-
padding: 2px 6px;
|
|
1403
|
-
border-radius: 5px;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
/* \u2500\u2500 KV Grid \u2500\u2500 */
|
|
1407
|
-
.bs-kv {
|
|
1408
|
-
display: grid;
|
|
1409
|
-
grid-template-columns: 100px 1fr;
|
|
1410
|
-
gap: 7px 12px;
|
|
1411
|
-
font-size: 12px;
|
|
1412
|
-
}
|
|
1413
|
-
.bs-kv-k { color: var(--bs-muted); font-size: 11px; }
|
|
1414
|
-
.bs-kv-v { color: var(--bs-text); word-break: break-all; font-size: 11px; }
|
|
1415
|
-
|
|
1416
|
-
/* \u2500\u2500 Breadcrumbs \u2500\u2500 */
|
|
1417
|
-
.bs-bc {
|
|
1418
|
-
padding: 7px 10px;
|
|
1419
|
-
border-radius: 8px;
|
|
1420
|
-
margin-bottom: 3px;
|
|
1421
|
-
font-size: 11px;
|
|
1422
|
-
display: flex;
|
|
1423
|
-
gap: 8px;
|
|
1424
|
-
align-items: flex-start;
|
|
1425
|
-
transition: background 0.15s;
|
|
1426
|
-
}
|
|
1427
|
-
.bs-bc:hover { background: var(--bs-bg2); }
|
|
1428
|
-
.bs-bc-t {
|
|
1429
|
-
font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
|
|
1430
|
-
padding: 3px 6px; border-radius: 5px; flex-shrink: 0;
|
|
1431
|
-
background: var(--bs-bg3); color: var(--bs-muted);
|
|
1432
|
-
}
|
|
1433
|
-
.bs-bc-t.bs-t-click { color: var(--bs-accent); background: color-mix(in srgb, var(--bs-accent) 10%, transparent); }
|
|
1434
|
-
.bs-bc-t.bs-t-input { color: var(--bs-green); background: color-mix(in srgb, var(--bs-green) 10%, transparent); }
|
|
1435
|
-
.bs-bc-t.bs-t-navigation { color: var(--bs-accent2); background: color-mix(in srgb, var(--bs-accent2) 10%, transparent); }
|
|
1436
|
-
.bs-bc-t.bs-t-error { color: var(--bs-red); background: color-mix(in srgb, var(--bs-red) 10%, transparent); }
|
|
1437
|
-
.bs-bc-t.bs-t-network { color: var(--bs-orange); background: color-mix(in srgb, var(--bs-orange) 10%, transparent); }
|
|
1438
|
-
.bs-bc-t.bs-t-console { color: var(--bs-yellow); background: color-mix(in srgb, var(--bs-yellow) 10%, transparent); }
|
|
1439
|
-
.bs-bc-t.bs-t-custom { color: var(--bs-accent); background: color-mix(in srgb, var(--bs-accent) 10%, transparent); }
|
|
1440
|
-
.bs-bc-m { color: var(--bs-text); flex: 1; line-height: 1.4; }
|
|
1441
|
-
.bs-bc-time { color: var(--bs-muted); opacity: 0.5; font-size: 10px; flex-shrink: 0; }
|
|
1442
|
-
|
|
1443
|
-
/* \u2500\u2500 Performance \u2500\u2500 */
|
|
1444
|
-
.bs-pf { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
|
|
1445
|
-
.bs-pf-l { font-size: 11px; color: var(--bs-muted); width: 85px; flex-shrink: 0; }
|
|
1446
|
-
.bs-pf-tr { flex: 1; height: 6px; background: var(--bs-bg3); border-radius: 4px; overflow: hidden; }
|
|
1447
|
-
.bs-pf-fl { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--bs-accent), var(--bs-accent2)); transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1); }
|
|
1448
|
-
.bs-pf-fl.bs-slow { background: linear-gradient(90deg, var(--bs-orange), var(--bs-red)); }
|
|
1449
|
-
.bs-pf-v { font-size: 11px; font-weight: 600; color: var(--bs-text); width: 55px; text-align: right; flex-shrink: 0; }
|
|
1450
|
-
|
|
1451
|
-
/* \u2500\u2500 Annotation \u2500\u2500 */
|
|
1452
|
-
.bs-ann-wrap { position: relative; margin-bottom: 16px; border-radius: var(--bs-radius-sm); overflow: hidden; border: 1.5px solid var(--bs-border); animation: bs-slideUp 0.3s ease; }
|
|
1453
|
-
.bs-ann-viewport { overflow: hidden; position: relative; }
|
|
1454
|
-
.bs-ann-canvas { display: block; width: 100%; transform-origin: 0 0; transition: transform 0.15s ease; }
|
|
1455
|
-
.bs-ann-canvas.bs-select { cursor: default; }
|
|
1456
|
-
.bs-ann-canvas.bs-draw { cursor: crosshair; }
|
|
1457
|
-
.bs-ann-canvas.bs-arrow { cursor: crosshair; }
|
|
1458
|
-
.bs-ann-canvas.bs-rect { cursor: crosshair; }
|
|
1459
|
-
.bs-ann-canvas.bs-circle { cursor: crosshair; }
|
|
1460
|
-
.bs-ann-canvas.bs-text { cursor: text; }
|
|
1461
|
-
.bs-ann-canvas.bs-highlight { cursor: crosshair; }
|
|
1462
|
-
.bs-ann-canvas.bs-grab { cursor: grab; }
|
|
1463
|
-
.bs-ann-canvas.bs-grabbing { cursor: grabbing; }
|
|
1464
|
-
.bs-ann-toolbar { display: flex; gap: 2px; padding: 6px 8px; background: var(--bs-bg2); border-top: 1px solid var(--bs-border); align-items: center; flex-wrap: wrap; }
|
|
1465
|
-
.bs-ann-sep { width: 1px; height: 20px; background: var(--bs-border); margin: 0 4px; flex-shrink: 0; }
|
|
1466
|
-
.bs-ann-btn {
|
|
1467
|
-
all: initial; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
|
|
1468
|
-
border-radius: 6px; cursor: pointer; color: var(--bs-muted); transition: all 0.15s; font-size: 14px;
|
|
1469
|
-
}
|
|
1470
|
-
.bs-ann-btn:hover { background: var(--bs-bg3); color: var(--bs-text); }
|
|
1471
|
-
.bs-ann-btn.bs-sel { background: color-mix(in srgb, var(--bs-accent) 15%, transparent); color: var(--bs-accent); }
|
|
1472
|
-
.bs-ann-btn[title]::after { content: none; }
|
|
1473
|
-
.bs-ann-dot {
|
|
1474
|
-
width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid transparent; cursor: pointer;
|
|
1475
|
-
transition: all 0.15s; flex-shrink: 0;
|
|
1476
|
-
}
|
|
1477
|
-
.bs-ann-dot:hover { transform: scale(1.15); }
|
|
1478
|
-
.bs-ann-dot.bs-sel { border-color: var(--bs-text); transform: scale(1.15); box-shadow: 0 0 8px rgba(255,255,255,0.15); }
|
|
1479
|
-
.bs-ann-size {
|
|
1480
|
-
width: 60px; height: 4px; -webkit-appearance: none; appearance: none; background: var(--bs-border);
|
|
1481
|
-
border-radius: 2px; outline: none; cursor: pointer;
|
|
1482
|
-
}
|
|
1483
|
-
.bs-ann-size::-webkit-slider-thumb {
|
|
1484
|
-
-webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
|
|
1485
|
-
background: var(--bs-accent); cursor: pointer; border: 2px solid var(--bs-bg);
|
|
1486
|
-
}
|
|
1487
|
-
.bs-ann-zoom-label { font-size: 10px; font-weight: 600; color: var(--bs-muted); min-width: 32px; text-align: center; }
|
|
1488
|
-
.bs-ann-right { margin-left: auto; display: flex; gap: 2px; align-items: center; }
|
|
1489
|
-
.bs-ann-clr-btn {
|
|
1490
|
-
all: initial; padding: 3px 10px; border: 1px solid var(--bs-border); border-radius: 6px;
|
|
1491
|
-
color: var(--bs-muted); font-size: 10px; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.15s;
|
|
1492
|
-
}
|
|
1493
|
-
.bs-ann-clr-btn:hover { color: var(--bs-red); border-color: color-mix(in srgb, var(--bs-red) 30%, transparent); }
|
|
1494
|
-
|
|
1495
|
-
/* \u2500\u2500 Pin Tool \u2500\u2500 */
|
|
1496
|
-
.bs-ann-canvas.bs-pin { cursor: crosshair; }
|
|
1497
|
-
.bs-ann-pins { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
|
|
1498
|
-
.bs-ann-pin {
|
|
1499
|
-
position: absolute;
|
|
1500
|
-
width: 26px; height: 26px;
|
|
1501
|
-
border-radius: 50% 50% 50% 0;
|
|
1502
|
-
transform: translate(-50%, -100%) rotate(-45deg);
|
|
1503
|
-
display: flex; align-items: center; justify-content: center;
|
|
1504
|
-
font-size: 11px; font-weight: 700; font-family: 'Inter', sans-serif;
|
|
1505
|
-
color: #fff;
|
|
1506
|
-
pointer-events: all;
|
|
1507
|
-
cursor: grab;
|
|
1508
|
-
transition: transform 0.15s, box-shadow 0.15s;
|
|
1509
|
-
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
|
1510
|
-
z-index: 1;
|
|
1511
|
-
}
|
|
1512
|
-
.bs-ann-pin:hover { transform: translate(-50%, -100%) rotate(-45deg) scale(1.15); box-shadow: 0 4px 16px rgba(0,0,0,0.4); z-index: 2; }
|
|
1513
|
-
.bs-ann-pin.bs-dragging { cursor: grabbing; transform: translate(-50%, -100%) rotate(-45deg) scale(1.2); z-index: 3; }
|
|
1514
|
-
.bs-ann-pin-n { transform: rotate(45deg); line-height: 1; }
|
|
1515
|
-
.bs-ann-pin-pulse {
|
|
1516
|
-
position: absolute; inset: -4px; border-radius: 50% 50% 50% 0;
|
|
1517
|
-
border: 2px solid currentColor; opacity: 0;
|
|
1518
|
-
animation: bs-pin-ring 1.5s ease-out forwards;
|
|
1519
|
-
}
|
|
1520
|
-
@keyframes bs-pin-ring { 0% { opacity: 0.6; inset: -4px; } 100% { opacity: 0; inset: -14px; } }
|
|
1521
|
-
|
|
1522
|
-
/* \u2500\u2500 Pin List (below canvas) \u2500\u2500 */
|
|
1523
|
-
.bs-ann-pin-list {
|
|
1524
|
-
max-height: 140px;
|
|
1525
|
-
overflow-y: auto;
|
|
1526
|
-
border-top: 1px solid var(--bs-border);
|
|
1527
|
-
background: var(--bs-bg2);
|
|
1528
|
-
}
|
|
1529
|
-
.bs-ann-pin-item {
|
|
1530
|
-
display: flex;
|
|
1531
|
-
align-items: flex-start;
|
|
1532
|
-
gap: 10px;
|
|
1533
|
-
padding: 8px 12px;
|
|
1534
|
-
border-bottom: 1px solid color-mix(in srgb, var(--bs-border) 50%, transparent);
|
|
1535
|
-
font-size: 12px;
|
|
1536
|
-
color: var(--bs-text);
|
|
1537
|
-
}
|
|
1538
|
-
.bs-ann-pin-item:last-child { border-bottom: none; }
|
|
1539
|
-
.bs-ann-pin-num {
|
|
1540
|
-
width: 22px; height: 22px;
|
|
1541
|
-
border-radius: 50%;
|
|
1542
|
-
display: flex; align-items: center; justify-content: center;
|
|
1543
|
-
font-size: 11px; font-weight: 700; color: #fff;
|
|
1544
|
-
flex-shrink: 0;
|
|
1545
|
-
}
|
|
1546
|
-
.bs-ann-pin-body { flex: 1; min-width: 0; }
|
|
1547
|
-
.bs-ann-pin-note { word-break: break-word; line-height: 1.4; }
|
|
1548
|
-
.bs-ann-pin-loc { font-size: 10px; color: var(--bs-muted); margin-top: 2px; }
|
|
1549
|
-
.bs-ann-pin-del {
|
|
1550
|
-
all: initial; cursor: pointer; color: var(--bs-muted); font-size: 14px;
|
|
1551
|
-
padding: 2px 4px; border-radius: 4px; transition: color 0.15s;
|
|
1552
|
-
flex-shrink: 0;
|
|
1553
|
-
}
|
|
1554
|
-
.bs-ann-pin-del:hover { color: var(--bs-red); }
|
|
1555
|
-
|
|
1556
|
-
/* \u2500\u2500 History \u2500\u2500 */
|
|
1557
|
-
.bs-hist-card {
|
|
1558
|
-
background: var(--bs-bg2);
|
|
1559
|
-
border: 1px solid var(--bs-border);
|
|
1560
|
-
border-radius: var(--bs-radius-sm);
|
|
1561
|
-
padding: 14px;
|
|
1562
|
-
margin-bottom: 10px;
|
|
1563
|
-
transition: border-color 0.2s;
|
|
1564
|
-
}
|
|
1565
|
-
.bs-hist-card:hover { border-color: var(--bs-accent); }
|
|
1566
|
-
.bs-hist-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
|
|
1567
|
-
.bs-hist-title {
|
|
1568
|
-
font-size: 14px;
|
|
1569
|
-
font-weight: 600;
|
|
1570
|
-
color: var(--bs-text);
|
|
1571
|
-
flex: 1;
|
|
1572
|
-
min-width: 0;
|
|
1573
|
-
overflow: hidden;
|
|
1574
|
-
text-overflow: ellipsis;
|
|
1575
|
-
white-space: nowrap;
|
|
1576
|
-
}
|
|
1577
|
-
.bs-hist-actions { display: flex; gap: 4px; flex-shrink: 0; }
|
|
1578
|
-
.bs-hist-btn {
|
|
1579
|
-
all: initial;
|
|
1580
|
-
width: 26px; height: 26px;
|
|
1581
|
-
display: flex; align-items: center; justify-content: center;
|
|
1582
|
-
border-radius: 6px;
|
|
1583
|
-
cursor: pointer;
|
|
1584
|
-
color: var(--bs-muted);
|
|
1585
|
-
transition: all 0.15s;
|
|
1586
|
-
font-size: 12px;
|
|
1587
|
-
}
|
|
1588
|
-
.bs-hist-btn:hover { background: var(--bs-bg3); color: var(--bs-text); }
|
|
1589
|
-
.bs-hist-btn.bs-del:hover { color: var(--bs-red); }
|
|
1590
|
-
.bs-hist-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
|
|
1591
|
-
.bs-hist-badge {
|
|
1592
|
-
padding: 2px 8px;
|
|
1593
|
-
border-radius: 12px;
|
|
1594
|
-
font-size: 10px;
|
|
1595
|
-
font-weight: 600;
|
|
1596
|
-
text-transform: uppercase;
|
|
1597
|
-
letter-spacing: 0.3px;
|
|
1598
|
-
}
|
|
1599
|
-
.bs-hist-badge.bs-sev-low { background: color-mix(in srgb, var(--bs-green) 12%, transparent); color: var(--bs-green); }
|
|
1600
|
-
.bs-hist-badge.bs-sev-medium { background: color-mix(in srgb, var(--bs-yellow) 12%, transparent); color: var(--bs-yellow); }
|
|
1601
|
-
.bs-hist-badge.bs-sev-high { background: color-mix(in srgb, var(--bs-orange) 12%, transparent); color: var(--bs-orange); }
|
|
1602
|
-
.bs-hist-badge.bs-sev-critical { background: color-mix(in srgb, var(--bs-red) 12%, transparent); color: var(--bs-red); }
|
|
1603
|
-
.bs-hist-badge.bs-cat { background: color-mix(in srgb, var(--bs-accent) 12%, transparent); color: var(--bs-accent); }
|
|
1604
|
-
.bs-hist-badge.bs-status-sent { background: color-mix(in srgb, var(--bs-green) 12%, transparent); color: var(--bs-green); }
|
|
1605
|
-
.bs-hist-badge.bs-status-draft { background: color-mix(in srgb, var(--bs-yellow) 12%, transparent); color: var(--bs-yellow); }
|
|
1606
|
-
.bs-hist-desc { font-size: 12px; color: var(--bs-muted); line-height: 1.5; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
1607
|
-
.bs-hist-foot { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--bs-muted); }
|
|
1608
|
-
.bs-hist-pins { display: flex; gap: 4px; }
|
|
1609
|
-
.bs-hist-pin-dot { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; }
|
|
1610
|
-
.bs-hist-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; border: 1px solid var(--bs-border); flex-shrink: 0; }
|
|
1611
|
-
.bs-hist-confirm {
|
|
1612
|
-
display: flex; align-items: center; gap: 8px;
|
|
1613
|
-
padding: 10px 14px;
|
|
1614
|
-
background: color-mix(in srgb, var(--bs-red) 8%, transparent);
|
|
1615
|
-
border: 1px solid color-mix(in srgb, var(--bs-red) 20%, transparent);
|
|
1616
|
-
border-radius: var(--bs-radius-sm);
|
|
1617
|
-
margin-bottom: 10px;
|
|
1618
|
-
font-size: 12px; color: var(--bs-text);
|
|
1619
|
-
animation: bs-slideUp 0.2s ease;
|
|
1620
|
-
}
|
|
1621
|
-
.bs-hist-confirm-yes {
|
|
1622
|
-
all: initial; padding: 4px 12px; background: var(--bs-red); color: #fff; border-radius: 6px;
|
|
1623
|
-
font-size: 11px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
|
|
1624
|
-
}
|
|
1625
|
-
.bs-hist-confirm-no {
|
|
1626
|
-
all: initial; padding: 4px 12px; border: 1px solid var(--bs-border); border-radius: 6px;
|
|
1627
|
-
font-size: 11px; font-weight: 600; cursor: pointer; color: var(--bs-muted); font-family: 'Inter', sans-serif;
|
|
1628
|
-
}
|
|
1629
|
-
.bs-hist-edit-wrap { margin-bottom: 10px; animation: bs-slideUp 0.2s ease; }
|
|
1630
|
-
.bs-hist-edit-row { display: flex; gap: 6px; margin-top: 8px; }
|
|
1631
|
-
.bs-hist-save {
|
|
1632
|
-
all: initial; padding: 6px 16px; background: linear-gradient(135deg, var(--bs-fab1), var(--bs-fab2));
|
|
1633
|
-
color: #fff; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
|
|
1634
|
-
}
|
|
1635
|
-
.bs-hist-cancel {
|
|
1636
|
-
all: initial; padding: 6px 16px; border: 1px solid var(--bs-border); border-radius: 6px;
|
|
1637
|
-
font-size: 12px; font-weight: 600; cursor: pointer; color: var(--bs-muted); font-family: 'Inter', sans-serif;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
/* \u2500\u2500 Empty \u2500\u2500 */
|
|
1641
|
-
.bs-empty { text-align: center; padding: 36px 16px; color: var(--bs-muted); font-size: 13px; line-height: 1.6; }
|
|
1642
|
-
.bs-empty svg { opacity: 0.12; margin-bottom: 10px; }
|
|
1643
|
-
|
|
1644
|
-
/* \u2500\u2500 Settings \u2500\u2500 */
|
|
1645
|
-
.bs-set-sec {
|
|
1646
|
-
font-size: 11px;
|
|
1647
|
-
font-weight: 700;
|
|
1648
|
-
color: var(--bs-accent);
|
|
1649
|
-
text-transform: uppercase;
|
|
1650
|
-
letter-spacing: 0.8px;
|
|
1651
|
-
margin: 0 0 12px;
|
|
1652
|
-
}
|
|
1653
|
-
.bs-set-sec + .bs-set-sec { margin-top: 24px; }
|
|
1654
|
-
.bs-set-grid {
|
|
1655
|
-
display: grid;
|
|
1656
|
-
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
|
|
1657
|
-
gap: 8px;
|
|
1658
|
-
}
|
|
1659
|
-
.bs-set-card {
|
|
1660
|
-
all: initial;
|
|
1661
|
-
cursor: pointer;
|
|
1662
|
-
border: 2px solid var(--bs-border);
|
|
1663
|
-
border-radius: var(--bs-radius-sm);
|
|
1664
|
-
overflow: hidden;
|
|
1665
|
-
transition: all 0.2s ease;
|
|
1666
|
-
display: flex;
|
|
1667
|
-
flex-direction: column;
|
|
1668
|
-
}
|
|
1669
|
-
.bs-set-card:hover { border-color: var(--bs-accent); transform: translateY(-1px); }
|
|
1670
|
-
.bs-set-card.bs-picked { border-color: var(--bs-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bs-accent) 25%, transparent); }
|
|
1671
|
-
.bs-set-preview {
|
|
1672
|
-
height: 36px;
|
|
1673
|
-
display: flex;
|
|
1674
|
-
align-items: center;
|
|
1675
|
-
justify-content: center;
|
|
1676
|
-
gap: 5px;
|
|
1677
|
-
}
|
|
1678
|
-
.bs-set-dot {
|
|
1679
|
-
width: 12px;
|
|
1680
|
-
height: 12px;
|
|
1681
|
-
border-radius: 50%;
|
|
1682
|
-
border: 1px solid rgba(255,255,255,0.1);
|
|
1683
|
-
}
|
|
1684
|
-
.bs-set-name {
|
|
1685
|
-
padding: 6px 8px;
|
|
1686
|
-
font-family: 'Inter', sans-serif;
|
|
1687
|
-
font-size: 10px;
|
|
1688
|
-
font-weight: 600;
|
|
1689
|
-
text-align: center;
|
|
1690
|
-
color: var(--bs-text);
|
|
1691
|
-
background: var(--bs-bg2);
|
|
1692
|
-
white-space: nowrap;
|
|
1693
|
-
overflow: hidden;
|
|
1694
|
-
text-overflow: ellipsis;
|
|
1695
|
-
}
|
|
1696
|
-
.bs-set-ly-grid {
|
|
1697
|
-
display: grid;
|
|
1698
|
-
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
|
|
1699
|
-
gap: 8px;
|
|
1700
|
-
}
|
|
1701
|
-
.bs-set-ly {
|
|
1702
|
-
all: initial;
|
|
1703
|
-
cursor: pointer;
|
|
1704
|
-
border: 2px solid var(--bs-border);
|
|
1705
|
-
border-radius: var(--bs-radius-sm);
|
|
1706
|
-
padding: 10px 12px;
|
|
1707
|
-
transition: all 0.2s ease;
|
|
1708
|
-
font-family: 'Inter', sans-serif;
|
|
1709
|
-
}
|
|
1710
|
-
.bs-set-ly:hover { border-color: var(--bs-accent); transform: translateY(-1px); }
|
|
1711
|
-
.bs-set-ly.bs-picked { border-color: var(--bs-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bs-accent) 25%, transparent); }
|
|
1712
|
-
.bs-set-ly-name { font-size: 12px; font-weight: 600; color: var(--bs-text); margin-bottom: 2px; }
|
|
1713
|
-
.bs-set-ly-desc { font-size: 10px; color: var(--bs-muted); }
|
|
1714
|
-
`,ni=`
|
|
1715
|
-
:host {
|
|
1716
|
-
all: initial !important;
|
|
1717
|
-
display: block !important;
|
|
1718
|
-
position: fixed !important;
|
|
1719
|
-
inset: 0 !important;
|
|
1720
|
-
pointer-events: none !important;
|
|
1721
|
-
z-index: 2147483640 !important;
|
|
1722
|
-
visibility: visible !important;
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
/* \u2500\u2500 FAB \u2500\u2500 */
|
|
1726
|
-
.bs-fab {
|
|
1727
|
-
all: initial;
|
|
1728
|
-
pointer-events: auto;
|
|
1729
|
-
position: fixed;
|
|
1730
|
-
bottom: 24px;
|
|
1731
|
-
z-index: 2147483647;
|
|
1732
|
-
width: 56px;
|
|
1733
|
-
height: 56px;
|
|
1734
|
-
border-radius: var(--bs-radius);
|
|
1735
|
-
background: linear-gradient(135deg, var(--bs-fab1), var(--bs-fab2));
|
|
1736
|
-
color: #fff;
|
|
1737
|
-
cursor: grab;
|
|
1738
|
-
box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 0 rgba(0,0,0,0.15);
|
|
1739
|
-
display: flex;
|
|
1740
|
-
align-items: center;
|
|
1741
|
-
justify-content: center;
|
|
1742
|
-
transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
|
|
1743
|
-
animation: bs-pulse 3s ease-in-out infinite;
|
|
1744
|
-
touch-action: none;
|
|
1745
|
-
user-select: none;
|
|
1746
|
-
-webkit-user-select: none;
|
|
1747
|
-
font-family: 'Inter', -apple-system, sans-serif;
|
|
1748
|
-
}
|
|
1749
|
-
.bs-fab.bs-dragging { cursor: grabbing; transition: none; animation: none; }
|
|
1750
|
-
.bs-fab:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.4); animation: none; }
|
|
1751
|
-
.bs-fab:active { transform: scale(0.95); }
|
|
1752
|
-
.bs-fab.bs-open { animation: none; transform: rotate(45deg) scale(0.9); box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
|
|
1753
|
-
.bs-fab.bs-open:hover { transform: rotate(45deg) scale(1); }
|
|
1754
|
-
@keyframes bs-pulse {
|
|
1755
|
-
0%, 100% { box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 0 rgba(0,0,0,0.15); }
|
|
1756
|
-
50% { box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 10px rgba(0,0,0,0); }
|
|
1757
|
-
}
|
|
1758
|
-
.bs-fab-label {
|
|
1759
|
-
position: absolute;
|
|
1760
|
-
right: calc(100% + 12px);
|
|
1761
|
-
background: var(--bs-bg2);
|
|
1762
|
-
color: var(--bs-text);
|
|
1763
|
-
font-family: 'Inter', sans-serif;
|
|
1764
|
-
font-size: 13px;
|
|
1765
|
-
font-weight: 500;
|
|
1766
|
-
padding: 8px 14px;
|
|
1767
|
-
border-radius: var(--bs-radius-sm);
|
|
1768
|
-
white-space: nowrap;
|
|
1769
|
-
box-shadow: 0 4px 20px rgba(0,0,0,0.3);
|
|
1770
|
-
opacity: 0;
|
|
1771
|
-
transform: translateX(8px);
|
|
1772
|
-
transition: all 0.25s ease;
|
|
1773
|
-
pointer-events: none;
|
|
1774
|
-
}
|
|
1775
|
-
.bs-fab:hover .bs-fab-label { opacity: 1; transform: translateX(0); }
|
|
1776
|
-
.bs-fab-label::after {
|
|
1777
|
-
content: '';
|
|
1778
|
-
position: absolute;
|
|
1779
|
-
right: -6px;
|
|
1780
|
-
top: 50%;
|
|
1781
|
-
transform: translateY(-50%);
|
|
1782
|
-
border: 6px solid transparent;
|
|
1783
|
-
border-left-color: var(--bs-bg2);
|
|
1784
|
-
border-right: none;
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
/* \u2500\u2500 Quick Action Toolbar \u2500\u2500 */
|
|
1788
|
-
.bs-toolbar {
|
|
1789
|
-
pointer-events: auto;
|
|
1790
|
-
position: fixed;
|
|
1791
|
-
z-index: 2147483646;
|
|
1792
|
-
display: flex;
|
|
1793
|
-
flex-direction: column;
|
|
1794
|
-
gap: 6px;
|
|
1795
|
-
bottom: 88px;
|
|
1796
|
-
opacity: 0;
|
|
1797
|
-
transform: translateY(10px);
|
|
1798
|
-
transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
|
|
1799
|
-
pointer-events: none;
|
|
1800
|
-
font-family: 'Inter', -apple-system, sans-serif;
|
|
1801
|
-
}
|
|
1802
|
-
.bs-toolbar.bs-show { opacity: 1; transform: translateY(0); pointer-events: all; }
|
|
1803
|
-
.bs-toolbar-btn {
|
|
1804
|
-
all: initial;
|
|
1805
|
-
width: 40px;
|
|
1806
|
-
height: 40px;
|
|
1807
|
-
border-radius: var(--bs-radius-sm);
|
|
1808
|
-
background: var(--bs-bg2);
|
|
1809
|
-
border: 1px solid var(--bs-border);
|
|
1810
|
-
color: var(--bs-muted);
|
|
1811
|
-
cursor: pointer;
|
|
1812
|
-
display: flex;
|
|
1813
|
-
align-items: center;
|
|
1814
|
-
justify-content: center;
|
|
1815
|
-
transition: all 0.2s;
|
|
1816
|
-
position: relative;
|
|
1817
|
-
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
|
1818
|
-
}
|
|
1819
|
-
.bs-toolbar-btn:hover { color: var(--bs-text); border-color: var(--bs-accent); background: var(--bs-bg3); }
|
|
1820
|
-
.bs-toolbar-btn.bs-active { color: var(--bs-accent); border-color: var(--bs-accent); }
|
|
1821
|
-
.bs-toolbar-tip {
|
|
1822
|
-
position: absolute;
|
|
1823
|
-
right: calc(100% + 8px);
|
|
1824
|
-
background: var(--bs-bg2);
|
|
1825
|
-
color: var(--bs-text);
|
|
1826
|
-
font-family: 'Inter', sans-serif;
|
|
1827
|
-
font-size: 11px;
|
|
1828
|
-
font-weight: 500;
|
|
1829
|
-
padding: 4px 8px;
|
|
1830
|
-
border-radius: 6px;
|
|
1831
|
-
white-space: nowrap;
|
|
1832
|
-
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
|
1833
|
-
opacity: 0;
|
|
1834
|
-
pointer-events: none;
|
|
1835
|
-
transition: opacity 0.15s;
|
|
1836
|
-
}
|
|
1837
|
-
.bs-toolbar-btn:hover .bs-toolbar-tip { opacity: 1; }
|
|
1838
|
-
.bs-toolbar-kbd { font-size: 9px; color: var(--bs-muted); margin-left: 4px; }
|
|
1839
|
-
`;function ri(){return`
|
|
1840
|
-
<div class="bs-login-form">
|
|
1841
|
-
<div class="bs-login-logo">BugStash</div>
|
|
1842
|
-
<div class="bs-login-subtitle">Sign in to report bugs & collaborate</div>
|
|
1843
|
-
<input class="bs-login-input" type="email" id="bs-login-email" placeholder="Email" autocomplete="email" />
|
|
1844
|
-
<input class="bs-login-input" type="password" id="bs-login-pass" placeholder="Password" autocomplete="current-password" />
|
|
1845
|
-
<div class="bs-login-error" id="bs-login-error" style="display:none"></div>
|
|
1846
|
-
<button class="bs-login-btn" id="bs-login-submit">Sign In</button>
|
|
1847
|
-
<div style="font-size:11px;color:var(--bs-muted);margin-top:4px">Contact your admin for an account</div>
|
|
1848
|
-
</div>
|
|
1849
|
-
`}function j(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function si(e){let t=Math.floor((Date.now()-e)/1e3);return t<5?"now":t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:new Date(e).toLocaleTimeString()}function fs(e){return new Date(e).toLocaleTimeString("en",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}var gs="bugstash_history";function Qe(){try{return JSON.parse(localStorage.getItem(gs)||"[]")}catch{return[]}}function On(e){try{localStorage.setItem(gs,JSON.stringify(e))}catch{}}function oi(e){let t=Qe(),n=Date.now();t.unshift({...e,id:n}),t.length>50&&(t.length=50),On(t)}function ii(e){let t=Qe().filter(n=>n.id!==e);On(t)}function ai(e,t){let n=Qe(),r=n.findIndex(s=>s.id===e);r>=0&&(n[r]={...n[r],...t},On(n))}function hs(){return{url:window.location.href,userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookiesEnabled:navigator.cookieEnabled,online:navigator.onLine,screenWidth:screen.width,screenHeight:screen.height,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio,timestamp:Date.now(),environment:G.environment??"development",commitHash:G.commitHash,user:G.user}}function vs(){let e=ge(),t=fe(),n=He(),r=xe(),s=Ie(),o=De(),i=t.filter(p=>p.level==="error"),a="low";e.length>=3||r.length>=3?a="critical":e.length>=1||r.length>=2?a="high":(i.length>0||r.length>=1)&&(a="medium");let d=[];return e.length&&d.push("has-errors"),r.length&&d.push("network-failures"),i.length&&d.push("console-errors"),o?.pageLoadTime&&o.pageLoadTime>3e3&&d.push("slow-load"),o?.cumulativeLayoutShift&&o.cumulativeLayoutShift>.25&&d.push("layout-shift"),navigator.onLine||d.push("offline"),window.innerWidth<768&&d.push("mobile"),{severity:a,tags:d,counts:{logs:t.length,network:n.length,failedNet:r.length,errors:e.length,crumbs:s.length}}}function ys(){let e=vs(),t=[{id:"ui",label:"UI"},{id:"functionality",label:"Feature"},{id:"performance",label:"Speed"},{id:"crash",label:"Crash"},{id:"security",label:"Security"},{id:"other",label:"Other"}],n=e.counts.errors>0||e.counts.failedNet>0;return`<div class="bs-view">
|
|
1850
|
-
<form data-bs-form>
|
|
1851
|
-
<div class="bs-report-summary${n?" bs-alert":e.counts.logs>0?" bs-has":""}">
|
|
1852
|
-
<div class="bs-report-summary-left">
|
|
1853
|
-
${n?`<div class="bs-report-summary-icon bs-warn">!</div><span>${e.counts.errors} error${e.counts.errors!==1?"s":""}, ${e.counts.failedNet} failed request${e.counts.failedNet!==1?"s":""} detected</span>`:`<div class="bs-report-summary-icon">${B.check}</div><span>Auto-collecting ${e.counts.logs} logs, ${e.counts.network} requests, ${e.counts.crumbs} actions</span>`}
|
|
1854
|
-
</div>
|
|
1855
|
-
</div>
|
|
1856
|
-
<div class="bs-field">
|
|
1857
|
-
<input class="bs-input bs-input-title" name="title" placeholder="What's the bug?" required autocomplete="off" />
|
|
1858
|
-
</div>
|
|
1859
|
-
<div class="bs-field">
|
|
1860
|
-
<textarea class="bs-textarea" name="description" placeholder="Steps to reproduce or extra details (optional)"></textarea>
|
|
1861
|
-
</div>
|
|
1862
|
-
<div class="bs-field">
|
|
1863
|
-
<div class="bs-field-label">Category</div>
|
|
1864
|
-
<input type="hidden" name="category" value="functionality" />
|
|
1865
|
-
<div class="bs-cat-row">
|
|
1866
|
-
${t.map(s=>`<button type="button" class="bs-cat-btn${s.id==="functionality"?" bs-picked":""}" data-cat="${s.id}">${s.label}</button>`).join("")}
|
|
1867
|
-
</div>
|
|
1868
|
-
</div>
|
|
1869
|
-
<div class="bs-field">
|
|
1870
|
-
<div class="bs-field-label">Severity</div>
|
|
1871
|
-
<input type="hidden" name="severity" value="${e.severity}" />
|
|
1872
|
-
<div class="bs-sev-row">
|
|
1873
|
-
<button type="button" class="bs-sev-btn bs-sev-low${e.severity==="low"?" bs-picked":""}" data-sev="low">Low</button>
|
|
1874
|
-
<button type="button" class="bs-sev-btn bs-sev-medium${e.severity==="medium"?" bs-picked":""}" data-sev="medium">Med</button>
|
|
1875
|
-
<button type="button" class="bs-sev-btn bs-sev-high${e.severity==="high"?" bs-picked":""}" data-sev="high">High</button>
|
|
1876
|
-
<button type="button" class="bs-sev-btn bs-sev-critical${e.severity==="critical"?" bs-picked":""}" data-sev="critical">Critical</button>
|
|
1877
|
-
</div>
|
|
1878
|
-
</div>
|
|
1879
|
-
<div class="bs-shot-area" data-bs-screenshot>
|
|
1880
|
-
<div class="bs-shot-icon">${B.cam}</div>
|
|
1881
|
-
<div class="bs-shot-text">
|
|
1882
|
-
<div class="bs-shot-title" data-bs-shot-title>Attach screenshot</div>
|
|
1883
|
-
<div class="bs-shot-sub" data-bs-shot-sub>Capture & annotate the current view</div>
|
|
1884
|
-
</div>
|
|
1885
|
-
</div>
|
|
1886
|
-
<div data-bs-annotate></div>
|
|
1887
|
-
<button type="submit" class="bs-submit-btn">Submit Report</button>
|
|
1888
|
-
</form>
|
|
1889
|
-
</div>`}function li(){let e=fe(),t={error:"bs-le",warn:"bs-lw",log:"bs-ll",info:"bs-li",debug:"bs-ld"};return e.length?`<div class="bs-view">${e.slice().reverse().map(n=>`<div class="bs-log"><span class="bs-log-lv ${t[n.level]||"bs-ll"}">${n.level}</span><span class="bs-log-m">${j(n.args.join(" ")).slice(0,500)}</span><span class="bs-log-t">${fs(n.timestamp)}</span></div>`).join("")}</div>`:'<div class="bs-view"><div class="bs-empty"><p>No console logs captured yet.<br>Use the app \u2014 logs will appear here automatically.</p></div></div>'}function ci(){let e=He();return e.length?`<div class="bs-view">${e.slice().reverse().map(t=>`<div class="bs-net"><span class="bs-net-m">${t.method}</span><span class="bs-net-s ${t.failed?"bs-fail":"bs-ok"}">${t.status||"ERR"}</span><span class="bs-net-u" title="${j(t.url)}">${j(t.url)}</span><span class="bs-net-d">${t.duration}ms</span></div>`).join("")}</div>`:'<div class="bs-view"><div class="bs-empty"><p>No network requests captured yet.<br>API calls will show up here automatically.</p></div></div>'}function di(){let e='<div class="bs-view">',t=ge();t.length&&(e+=`<div class="bs-sec">Errors <span class="bs-sec-n">${t.length}</span></div>`,e+=t.slice().reverse().map(o=>`<div class="bs-err-card"><div class="bs-err-m">${j(o.message)}</div>${o.stack?`<div class="bs-err-stack">${j(o.stack)}</div>`:""}<div class="bs-err-meta">${o.type} · ${fs(o.timestamp)}${o.source?` · ${j(o.source)}:${o.lineno}`:""}</div></div>`).join(""));let n=De();if(n){e+='<div class="bs-sec">Performance</div>';let o=[["Page Load",n.pageLoadTime,5e3],["DOM Ready",n.domContentLoaded,3e3],["First Paint",n.firstPaint,2e3],["FCP",n.firstContentfulPaint,2500],["LCP",n.largestContentfulPaint,4e3],["FID",n.firstInputDelay,300]];for(let[i,a,d]of o){if(a===void 0)continue;let p=Math.min(100,a/d*100);e+=`<div class="bs-pf"><span class="bs-pf-l">${i}</span><div class="bs-pf-tr"><div class="bs-pf-fl${p>75?" bs-slow":""}" style="width:${p}%"></div></div><span class="bs-pf-v">${a}ms</span></div>`}if(n.cumulativeLayoutShift!==void 0){let i=Math.min(100,n.cumulativeLayoutShift*400);e+=`<div class="bs-pf"><span class="bs-pf-l">CLS</span><div class="bs-pf-tr"><div class="bs-pf-fl${i>40?" bs-slow":""}" style="width:${i}%"></div></div><span class="bs-pf-v">${n.cumulativeLayoutShift}</span></div>`}}let r=Ie();r.length&&(e+=`<div class="bs-sec">Your activity trail <span class="bs-sec-n">${r.length}</span></div>`,e+=r.slice().reverse().map(o=>`<div class="bs-bc"><span class="bs-bc-t bs-t-${o.type}">${o.type}</span><span class="bs-bc-m">${j(o.message).slice(0,120)}</span><span class="bs-bc-time">${si(o.timestamp)}</span></div>`).join(""));let s=hs();return e+='<div class="bs-sec">Environment</div>',e+=`<div class="bs-kv">
|
|
1890
|
-
<span class="bs-kv-k">URL</span><span class="bs-kv-v">${j(s.url)}</span>
|
|
1891
|
-
<span class="bs-kv-k">Viewport</span><span class="bs-kv-v">${s.viewportWidth}×${s.viewportHeight} @${s.devicePixelRatio}x</span>
|
|
1892
|
-
<span class="bs-kv-k">Screen</span><span class="bs-kv-v">${s.screenWidth}×${s.screenHeight}</span>
|
|
1893
|
-
<span class="bs-kv-k">Platform</span><span class="bs-kv-v">${j(s.platform)}</span>
|
|
1894
|
-
<span class="bs-kv-k">Language</span><span class="bs-kv-v">${s.language}</span>
|
|
1895
|
-
${G.commitHash?`<span class="bs-kv-k">Commit</span><span class="bs-kv-v">${j(G.commitHash)}</span>`:""}
|
|
1896
|
-
${G.user?.email?`<span class="bs-kv-k">User</span><span class="bs-kv-v">${j(G.user.email)}</span>`:""}
|
|
1897
|
-
</div>`,e+="</div>",e}function pi(){let e=Qe();if(!e.length)return'<div class="bs-view"><div class="bs-empty"><p>No reports yet.<br>Submitted bugs will appear here.</p></div></div>';let t={ui:"UI",functionality:"Feature",performance:"Perf",crash:"Crash",security:"Security",other:"Other"},n=s=>{let o=new Date(s),a=new Date().getTime()-o.getTime(),d=Math.floor(a/6e4);if(d<1)return"Just now";if(d<60)return`${d}m ago`;let p=Math.floor(d/60);if(p<24)return`${p}h ago`;let b=Math.floor(p/24);return b<7?`${b}d ago`:o.toLocaleDateString("en",{month:"short",day:"numeric"})},r='<div class="bs-view">';for(let s of e){let o=s.pins?.length?`<div class="bs-hist-pins">${s.pins.slice(0,5).map(i=>`<div class="bs-hist-pin-dot" style="background:${["#ef4444","#3b82f6","#f59e0b","#10b981","#8b5cf6"][i.number%5]}">${i.number}</div>`).join("")}${s.pins.length>5?`<span>+${s.pins.length-5}</span>`:""}</div>`:"";r+=`<div class="bs-hist-card" data-hist-id="${s.id}">
|
|
1898
|
-
<div class="bs-hist-top">
|
|
1899
|
-
<div class="bs-hist-title">${j(s.title)}</div>
|
|
1900
|
-
${s.screenshot?`<img class="bs-hist-thumb" src="${s.screenshot}" alt=""/>`:""}
|
|
1901
|
-
<div class="bs-hist-actions">
|
|
1902
|
-
<button class="bs-hist-btn" data-hist-edit="${s.id}" title="Edit"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/></svg></button>
|
|
1903
|
-
<button class="bs-hist-btn bs-del" data-hist-del="${s.id}" title="Delete"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 01-2 2H8a2 2 0 01-2-2L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/></svg></button>
|
|
1904
|
-
</div>
|
|
1905
|
-
</div>
|
|
1906
|
-
<div class="bs-hist-meta">
|
|
1907
|
-
<span class="bs-hist-badge bs-cat">${t[s.category]||s.category}</span>
|
|
1908
|
-
<span class="bs-hist-badge bs-sev-${s.severity}">${s.severity}</span>
|
|
1909
|
-
<span class="bs-hist-badge bs-status-${s.status}">${s.status}</span>
|
|
1910
|
-
</div>
|
|
1911
|
-
${s.description?`<div class="bs-hist-desc">${j(s.description)}</div>`:""}
|
|
1912
|
-
<div class="bs-hist-foot">
|
|
1913
|
-
<span>${n(s.createdAt)} · ${j(s.url.replace(/^https?:\/\//,"").slice(0,40))}</span>
|
|
1914
|
-
${o}
|
|
1915
|
-
</div>
|
|
1916
|
-
</div>`}return r+="</div>",r}function bi(){let e=Wt(),t=Xt(),n='<div class="bs-view">';n+='<div class="bs-set-sec">Layout</div>',n+='<div class="bs-set-ly-grid">';for(let r of t)n+=`<button class="bs-set-ly${r.id===Me.id?" bs-picked":""}" data-set-layout="${r.id}"><div class="bs-set-ly-name">${j(r.name)}</div><div class="bs-set-ly-desc">${j(r.description)}</div></button>`;n+="</div>",n+='<div class="bs-set-sec">Theme</div>',n+='<div class="bs-set-grid">';for(let r of e)n+=`<button class="bs-set-card${r.id===ae.id?" bs-picked":""}" data-set-theme="${r.id}"><div class="bs-set-preview" style="background:${r.preview[0]}"><div class="bs-set-dot" style="background:${r.preview[1]}"></div><div class="bs-set-dot" style="background:${r.vars["--bs-accent2"]||r.preview[1]};opacity:0.6"></div></div><div class="bs-set-name">${j(r.name)}</div></button>`;return n+="</div>",n+="</div>",n}function ui(e,t){let n=["#f87171","#3b82f6","#fb923c","#4ade80","#a78bfa","#facc15"],r=n[0],s="draw",o=4,i=1,a=!1,d=[],p=[],b=-1,v=-1,k=!1,S=!1,ue=0,ye=0,N=0,H=0,E=[],D=["#ef4444","#3b82f6","#f59e0b","#10b981","#8b5cf6","#ec4899"],z=new Image;z.src=t;let Z=document.createElement("div");Z.className="bs-ann-wrap";let Se=document.createElement("div");Se.className="bs-ann-viewport";let w=document.createElement("canvas");w.className="bs-ann-canvas bs-draw";let se=document.createElement("div");se.className="bs-ann-toolbar";let wt={select:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"/><path d="M13 13l6 6"/></svg>',draw:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/></svg>',arrow:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg>',rect:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"/></svg>',circle:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/></svg>',text:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><polyline points="4 7 4 4 20 4 20 7"/><line x1="9.5" y1="20" x2="14.5" y2="20"/><line x1="12" y1="4" x2="12" y2="20"/></svg>',highlight:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M9 11l-6 6v3h9l3-3"/><path d="M22 12l-4.6 4.6a2 2 0 01-2.8 0l-5.2-5.2a2 2 0 010-2.8L14 4"/></svg>',pin:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"/><circle cx="12" cy="10" r="3"/></svg>'},an={select:"Select & Move",draw:"Draw",arrow:"Arrow",rect:"Rectangle",circle:"Circle",text:"Text",highlight:"Highlight",pin:"Pin Issue"},Le=[],U=l=>{s=l,b=-1,w.className=`bs-ann-canvas bs-${l}`,Le.forEach(f=>f.classList.remove("bs-sel")),Le.find(f=>f.dataset.tool===l)?.classList.add("bs-sel")};Object.keys(wt).forEach(l=>{let f=document.createElement("button");f.type="button",f.dataset.tool=l,f.className=`bs-ann-btn${l===s?" bs-sel":""}`,f.title=an[l],f.innerHTML=wt[l],f.addEventListener("click",()=>U(l)),Le.push(f),se.appendChild(f)}),se.appendChild(Object.assign(document.createElement("div"),{className:"bs-ann-sep"})),n.forEach((l,f)=>{let h=document.createElement("button");h.type="button",h.className=`bs-ann-dot${f===0?" bs-sel":""}`,h.style.background=l,h.addEventListener("click",()=>{r=l,se.querySelectorAll(".bs-ann-dot").forEach(A=>A.classList.remove("bs-sel")),h.classList.add("bs-sel")}),se.appendChild(h)}),se.appendChild(Object.assign(document.createElement("div"),{className:"bs-ann-sep"}));let me=document.createElement("input");me.type="range",me.min="1",me.max="12",me.value="4",me.className="bs-ann-size",me.title="Brush size",me.addEventListener("input",()=>{o=parseInt(me.value)}),se.appendChild(me);let kt=document.createElement("div");kt.className="bs-ann-right";let Et=(l,f)=>{let h=document.createElement("button");return h.type="button",h.className="bs-ann-btn",h.title=l,h.innerHTML=f,h},Un=Et("Zoom out",'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></svg>'),_n=Object.assign(document.createElement("span"),{className:"bs-ann-zoom-label",textContent:"100%"}),Fn=Et("Zoom in",'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></svg>'),Wn=Et("Fit",'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M15 3h6v6"/><path d="M9 21H3v-6"/><path d="M21 3l-7 7"/><path d="M3 21l7-7"/></svg>'),Yn=Et("Undo",'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 105.42-8.49L1 10"/></svg>'),Xn=Object.assign(document.createElement("button"),{type:"button",className:"bs-ann-clr-btn",textContent:"Clear"}),ln=()=>{w.style.transform=`scale(${i})`,_n.textContent=`${Math.round(i*100)}%`};Fn.addEventListener("click",()=>{i<3&&(i=Math.min(3,i+.25),ln())}),Un.addEventListener("click",()=>{i>.5&&(i=Math.max(.5,i-.25),ln())}),Wn.addEventListener("click",()=>{i=1,ln()}),kt.appendChild(Object.assign(document.createElement("div"),{className:"bs-ann-sep"})),[Un,_n,Fn,Wn,Yn,Xn].forEach(l=>kt.appendChild(l)),se.appendChild(kt);let St=document.createElement("div");St.className="bs-ann-pins";let Ae=document.createElement("div");Ae.className="bs-ann-pin-list",Ae.style.display="none",Se.appendChild(w),Se.appendChild(St),Z.appendChild(Se),Z.appendChild(se),Z.appendChild(Ae),e.innerHTML="",e.appendChild(Z);let Lt=()=>{St.innerHTML="",Ae.innerHTML="",Ae.style.display=p.length?"":"none",p.forEach((l,f)=>{let h=document.createElement("div");h.className="bs-ann-pin",h.style.background=l.color,h.style.color=l.color;let A=l.x/(w.width||1)*100,m=l.y/(w.height||1)*100;h.style.left=`${A}%`,h.style.top=`${m}%`,h.innerHTML=`<span class="bs-ann-pin-n">${f+1}</span><span class="bs-ann-pin-pulse"></span>`,h.title=`#${f+1}: ${l.note}`;let I=!1;h.addEventListener("mousedown",O=>{O.stopPropagation(),I=!0,h.classList.add("bs-dragging");let u=T=>{if(!I)return;let $=Se.getBoundingClientRect();l.x=(T.clientX-$.left)/$.width*w.width,l.y=(T.clientY-$.top)/$.height*w.height,h.style.left=`${(T.clientX-$.left)/$.width*100}%`,h.style.top=`${(T.clientY-$.top)/$.height*100}%`},y=()=>{I=!1,h.classList.remove("bs-dragging"),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",y),Lt()};document.addEventListener("mousemove",u),document.addEventListener("mouseup",y)}),St.appendChild(h);let _=document.createElement("div");_.className="bs-ann-pin-item",_.innerHTML=`
|
|
1917
|
-
<div class="bs-ann-pin-num" style="background:${l.color}">${f+1}</div>
|
|
1918
|
-
<div class="bs-ann-pin-body">
|
|
1919
|
-
<div class="bs-ann-pin-note">${j(l.note)}</div>
|
|
1920
|
-
<div class="bs-ann-pin-loc">${Math.round(A)}% \xD7 ${Math.round(m)}%</div>
|
|
1921
|
-
</div>`;let W=document.createElement("button");W.type="button",W.className="bs-ann-pin-del",W.innerHTML="×",W.title="Remove pin",W.addEventListener("click",()=>{p.splice(f,1),Lt()}),_.appendChild(W),Ae.appendChild(_)})},c,cn=()=>a?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.35)",Ce=(l,f)=>{c.save(),c.strokeStyle=cn(),c.lineWidth=f+3,c.lineCap="round",c.lineJoin="round",c.globalAlpha=.5,l(),c.restore()},Rs=(l,f=!1)=>{if(l.type==="draw"||l.type==="highlight"){if(l.points.length<2)return;let m=l.type==="highlight"?.25:1,I=l.type==="highlight"?l.size*4+10:l.size,_=()=>{c.beginPath(),c.moveTo(l.points[0].x,l.points[0].y);for(let W=1;W<l.points.length;W++)c.lineTo(l.points[W].x,l.points[W].y);c.stroke()};l.type!=="highlight"&&Ce(_,I),c.strokeStyle=l.color,c.lineWidth=I,c.lineCap="round",c.lineJoin="round",c.globalAlpha=m,_(),c.globalAlpha=1}else if(l.type==="rect"){let m=()=>c.strokeRect(l.x,l.y,l.w,l.h);Ce(m,l.size),c.strokeStyle=l.color,c.lineWidth=l.size,c.lineCap="round",c.lineJoin="round",m()}else if(l.type==="circle"){let m=()=>{c.beginPath(),c.ellipse(l.cx,l.cy,Math.abs(l.rx),Math.abs(l.ry),0,0,Math.PI*2),c.stroke()};Ce(m,l.size),c.strokeStyle=l.color,c.lineWidth=l.size,m()}else if(l.type==="arrow"){let m=Math.atan2(l.y2-l.y1,l.x2-l.x1),I=12+l.size*2,_=()=>{c.beginPath(),c.moveTo(l.x1,l.y1),c.lineTo(l.x2,l.y2),c.stroke(),c.beginPath(),c.moveTo(l.x2,l.y2),c.lineTo(l.x2-I*Math.cos(m-.45),l.y2-I*Math.sin(m-.45)),c.moveTo(l.x2,l.y2),c.lineTo(l.x2-I*Math.cos(m+.45),l.y2-I*Math.sin(m+.45)),c.stroke()};Ce(_,l.size),c.strokeStyle=l.color,c.lineWidth=l.size,c.lineCap="round",c.lineJoin="round",_()}else if(l.type==="text"){let m=l.size*5+12;c.font=`bold ${m}px Inter, -apple-system, sans-serif`,c.fillStyle=cn(),c.globalAlpha=.6,c.fillText(l.text,l.x+1,l.y+1),c.globalAlpha=1,c.fillStyle=l.color,c.fillText(l.text,l.x,l.y)}let h=!f&&b>=0&&d[b]===l,A=!f&&!h&&v>=0&&d[v]===l;if(h||A){let m=et(l);if(c.save(),c.setLineDash([6,4]),c.strokeStyle=a?"#fff":"#000",c.lineWidth=h?1.5:1,c.globalAlpha=h?.7:.45,c.strokeRect(m.x-4,m.y-4,m.w+8,m.h+8),l.type==="rect"||l.type==="circle"){c.setLineDash([]),c.globalAlpha=h?.9:.6;let _=l.type==="rect"?[[m.x,m.y],[m.x+m.w,m.y],[m.x,m.y+m.h],[m.x+m.w,m.y+m.h]]:[[m.x+m.w/2,m.y],[m.x+m.w,m.y+m.h/2],[m.x+m.w/2,m.y+m.h],[m.x,m.y+m.h/2]];for(let[W,O]of _)c.fillStyle="#fff",c.fillRect(W-5,O-5,10,10),c.strokeStyle=a?"#aaa":"#333",c.lineWidth=1.2,c.strokeRect(W-5,O-5,10,10)}c.restore()}},F=()=>{c.clearRect(0,0,w.width,w.height),c.drawImage(z,0,0);for(let l of d)Rs(l)},et=l=>{if(l.type==="rect")return{x:Math.min(l.x,l.x+l.w),y:Math.min(l.y,l.y+l.h),w:Math.abs(l.w),h:Math.abs(l.h)};if(l.type==="circle")return{x:l.cx-Math.abs(l.rx),y:l.cy-Math.abs(l.ry),w:Math.abs(l.rx)*2,h:Math.abs(l.ry)*2};if(l.type==="arrow"){let I=Math.min(l.x1,l.x2),_=Math.min(l.y1,l.y2);return{x:I,y:_,w:Math.abs(l.x2-l.x1)||20,h:Math.abs(l.y2-l.y1)||20}}if(l.type==="text")return{x:l.x,y:l.y-(l.size*5+12),w:l.text.length*(l.size*3+8),h:l.size*5+16};if(l.points.length===0)return{x:0,y:0,w:0,h:0};let f=1/0,h=1/0,A=-1/0,m=-1/0;for(let I of l.points)f=Math.min(f,I.x),h=Math.min(h,I.y),A=Math.max(A,I.x),m=Math.max(m,I.y);return{x:f,y:h,w:A-f||10,h:m-h||10}},Ct=(l,f)=>{for(let h=d.length-1;h>=0;h--){let A=et(d[h]),m=8;if(l>=A.x-m&&l<=A.x+A.w+m&&f>=A.y-m&&f<=A.y+A.h+m)return h}return-1},zs=(l,f,h)=>{if(l.type==="draw"||l.type==="highlight")for(let A of l.points)A.x+=f,A.y+=h;else l.type==="rect"?(l.x+=f,l.y+=h):l.type==="circle"?(l.cx+=f,l.cy+=h):l.type==="arrow"?(l.x1+=f,l.y1+=h,l.x2+=f,l.y2+=h):l.type==="text"&&(l.x+=f,l.y+=h)};z.onload=()=>{let f=(e.clientWidth||450)/z.width;w.width=z.width,w.height=z.height,w.style.height=`${z.height*f}px`,c=w.getContext("2d"),c.drawImage(z,0,0);let h=[[10,10],[w.width-10,10],[10,w.height-10],[w.width-10,w.height-10],[w.width/2,w.height/2]],A=0;for(let[O,u]of h){let y=c.getImageData(O,u,1,1).data;A+=(y[0]*299+y[1]*587+y[2]*114)/1e3}a=A/h.length<128;let m=O=>{let u=w.getBoundingClientRect();return{x:(O.clientX-u.left)*(w.width/u.width),y:(O.clientY-u.top)*(w.height/u.height)}},I=!1;w.addEventListener("mousedown",O=>{let u=m(O);if(s==="select"){let y=Ct(u.x,u.y);if(y>=0){b=y,k=!0;let T=et(d[y]);ue=u.x-T.x,ye=u.y-T.y,w.classList.add("bs-grabbing"),w.classList.remove("bs-grab"),F()}else b=-1,F();return}if(s!=="pin"&&s!=="text"){let y=Ct(u.x,u.y);if(y>=0){b=y,k=!0,I=!0;let T=et(d[y]);ue=u.x-T.x,ye=u.y-T.y,w.classList.add("bs-grabbing"),F();return}}if(S=!0,N=u.x,H=u.y,s==="pin"){S=!1;let y=prompt("Describe the issue at this spot:");if(y){let T=D[p.length%D.length];p.push({x:u.x,y:u.y,note:y,color:T}),Lt()}return}if(s==="text"){S=!1;let y=prompt("Enter text:");y&&(d.push({type:"text",color:r,size:o,x:u.x,y:u.y,text:y}),F());return}(s==="draw"||s==="highlight")&&(E=[{x:u.x,y:u.y}])}),w.addEventListener("mousemove",O=>{let u=m(O);if(k&&b>=0){let y=et(d[b]),T=u.x-ue-y.x,$=u.y-ye-y.y;zs(d[b],T,$),F();return}if(s==="select"){let y=Ct(u.x,u.y);w.classList.toggle("bs-grab",y>=0),v!==y&&(v=y,F());return}if(s!=="pin"&&s!=="text"&&!S){let y=Ct(u.x,u.y);w.classList.toggle("bs-grab",y>=0),v!==y&&(v=y,F())}if(S){if(s==="draw"||s==="highlight"){E.push({x:u.x,y:u.y}),F();let y=s==="highlight"?.25:1,T=s==="highlight"?o*4+10:o;if(s!=="highlight"){c.save(),c.strokeStyle=cn(),c.lineWidth=T+3,c.lineCap="round",c.lineJoin="round",c.globalAlpha=.5,c.beginPath(),c.moveTo(E[0].x,E[0].y);for(let $=1;$<E.length;$++)c.lineTo(E[$].x,E[$].y);c.stroke(),c.restore()}c.strokeStyle=r,c.lineWidth=T,c.lineCap="round",c.lineJoin="round",c.globalAlpha=y,c.beginPath(),c.moveTo(E[0].x,E[0].y);for(let $=1;$<E.length;$++)c.lineTo(E[$].x,E[$].y);c.stroke(),c.globalAlpha=1}else if(F(),c.strokeStyle=r,c.lineWidth=o,c.lineCap="round",c.lineJoin="round",s==="rect")Ce(()=>c.strokeRect(N,H,u.x-N,u.y-H),o),c.strokeStyle=r,c.lineWidth=o,c.strokeRect(N,H,u.x-N,u.y-H);else if(s==="circle"){let y=Math.abs(u.x-N)/2,T=Math.abs(u.y-H)/2,$=N+(u.x-N)/2,Vn=H+(u.y-H)/2;Ce(()=>{c.beginPath(),c.ellipse($,Vn,y,T,0,0,Math.PI*2),c.stroke()},o),c.strokeStyle=r,c.lineWidth=o,c.beginPath(),c.ellipse($,Vn,y,T,0,0,Math.PI*2),c.stroke()}else if(s==="arrow"){let y=Math.atan2(u.y-H,u.x-N),T=12+o*2,$=()=>{c.beginPath(),c.moveTo(N,H),c.lineTo(u.x,u.y),c.stroke(),c.beginPath(),c.moveTo(u.x,u.y),c.lineTo(u.x-T*Math.cos(y-.45),u.y-T*Math.sin(y-.45)),c.moveTo(u.x,u.y),c.lineTo(u.x-T*Math.cos(y+.45),u.y-T*Math.sin(y+.45)),c.stroke()};Ce($,o),c.strokeStyle=r,c.lineWidth=o,c.lineCap="round",c.lineJoin="round",$()}}});let _=O=>{if(k)return k=!1,I=!1,b=-1,w.classList.remove("bs-grabbing"),w.classList.remove("bs-grab"),F(),void 0;if(!S)return;S=!1;let u=m(O);if(s==="draw"||s==="highlight")E.length>1&&d.push({type:s,color:r,size:o,alpha:s==="highlight"?.25:1,points:[...E]}),E=[];else if(s==="rect")d.push({type:"rect",color:r,size:o,x:N,y:H,w:u.x-N,h:u.y-H});else if(s==="circle"){let y=Math.abs(u.x-N)/2,T=Math.abs(u.y-H)/2;d.push({type:"circle",color:r,size:o,cx:N+(u.x-N)/2,cy:H+(u.y-H)/2,rx:y,ry:T})}else s==="arrow"&&d.push({type:"arrow",color:r,size:o,x1:N,y1:H,x2:u.x,y2:u.y});F()};w.addEventListener("mouseup",_),w.addEventListener("mouseleave",O=>{k?(k=!1,I=!1,w.classList.remove("bs-grabbing"),w.classList.remove("bs-grab"),F()):S&&_(O)});let W=O=>{b>=0&&(O.key==="Delete"||O.key==="Backspace")&&(d.splice(b,1),b=-1,F())};document.addEventListener("keydown",W),Yn.addEventListener("click",()=>{d.length&&(d.pop(),b=-1,F())}),Xn.addEventListener("click",()=>{d.length=0,p.length=0,b=-1,F(),Lt()})};let Hs=()=>{for(let l=0;l<p.length;l++){let f=p[l],h=16;c.beginPath(),c.arc(f.x,f.y-h,h,0,Math.PI*2),c.fillStyle=f.color,c.fill(),c.strokeStyle="#fff",c.lineWidth=2,c.stroke(),c.beginPath(),c.moveTo(f.x-8,f.y-6),c.lineTo(f.x,f.y+4),c.lineTo(f.x+8,f.y-6),c.fillStyle=f.color,c.fill(),c.fillStyle="#fff",c.font="bold 14px Inter, sans-serif",c.textAlign="center",c.textBaseline="middle",c.fillText(`${l+1}`,f.x,f.y-h),c.textAlign="start",c.textBaseline="alphabetic"}};return{getAnnotation:()=>{try{return b=-1,F(),Hs(),w.toDataURL("image/jpeg",.7)}catch{return null}},getPins:()=>p.map((l,f)=>({number:f+1,x:Math.round(l.x),y:Math.round(l.y),note:l.note}))}}function gt(e){if(!g)return;Ge=e,g.querySelectorAll(".bs-tab").forEach(r=>{r.classList.toggle("bs-active",r.dataset.tab===e)});let t=g.querySelector(".bs-scroll"),n={report:ys,console:li,network:ci,context:di,history:pi,settings:bi};t.innerHTML=n[e](),t.scrollTop=0,xs()}function xs(){if(!g)return;if(Ge==="history"){g.querySelectorAll("[data-hist-del]").forEach(n=>{n.addEventListener("click",()=>{let r=parseInt(n.dataset.histDel),s=g.querySelector(`[data-hist-id="${r}"]`);if(!s)return;let o=s.querySelector(".bs-hist-confirm");if(o){o.remove();return}let i=document.createElement("div");i.className="bs-hist-confirm",i.innerHTML="<span>Delete this report?</span>";let a=document.createElement("button");a.type="button",a.className="bs-hist-confirm-yes",a.textContent="Delete";let d=document.createElement("button");d.type="button",d.className="bs-hist-confirm-no",d.textContent="Cancel",a.addEventListener("click",()=>{ii(r),gt("history")}),d.addEventListener("click",()=>i.remove()),i.appendChild(a),i.appendChild(d),s.appendChild(i)})}),g.querySelectorAll("[data-hist-edit]").forEach(n=>{n.addEventListener("click",()=>{let r=parseInt(n.dataset.histEdit),s=g.querySelector(`[data-hist-id="${r}"]`);if(!s)return;let o=s.querySelector(".bs-hist-edit-wrap");if(o){o.remove();return}s.querySelector(".bs-hist-confirm")?.remove();let i=Qe().find(k=>k.id===r);if(!i)return;let a=document.createElement("div");a.className="bs-hist-edit-wrap",a.innerHTML=`
|
|
1922
|
-
<div class="bs-field" style="margin-bottom:8px">
|
|
1923
|
-
<input class="bs-input" data-edit-title value="${j(i.title)}" />
|
|
1924
|
-
</div>
|
|
1925
|
-
<div class="bs-field" style="margin-bottom:8px">
|
|
1926
|
-
<textarea class="bs-textarea" data-edit-desc style="min-height:56px">${j(i.description)}</textarea>
|
|
1927
|
-
</div>
|
|
1928
|
-
<div class="bs-field" style="margin-bottom:8px">
|
|
1929
|
-
<div class="bs-sev-row">
|
|
1930
|
-
<button type="button" class="bs-sev-btn bs-sev-low${i.severity==="low"?" bs-picked":""}" data-edit-sev="low">Low</button>
|
|
1931
|
-
<button type="button" class="bs-sev-btn bs-sev-medium${i.severity==="medium"?" bs-picked":""}" data-edit-sev="medium">Medium</button>
|
|
1932
|
-
<button type="button" class="bs-sev-btn bs-sev-high${i.severity==="high"?" bs-picked":""}" data-edit-sev="high">High</button>
|
|
1933
|
-
<button type="button" class="bs-sev-btn bs-sev-critical${i.severity==="critical"?" bs-picked":""}" data-edit-sev="critical">Critical</button>
|
|
1934
|
-
</div>
|
|
1935
|
-
</div>
|
|
1936
|
-
<div class="bs-hist-edit-row"></div>`;let d=i.severity;s.appendChild(a),a.querySelectorAll("[data-edit-sev]").forEach(k=>{k.addEventListener("click",()=>{d=k.dataset.editSev,a.querySelectorAll(".bs-sev-btn").forEach(S=>S.classList.remove("bs-picked")),k.classList.add("bs-picked")})});let p=a.querySelector(".bs-hist-edit-row"),b=document.createElement("button");b.type="button",b.className="bs-hist-save",b.textContent="Save";let v=document.createElement("button");v.type="button",v.className="bs-hist-cancel",v.textContent="Cancel",b.addEventListener("click",()=>{let k=a.querySelector("[data-edit-title]").value.trim(),S=a.querySelector("[data-edit-desc]").value.trim();k&&(ai(r,{title:k,description:S,severity:d}),gt("history"))}),v.addEventListener("click",()=>a.remove()),p.appendChild(b),p.appendChild(v)})});return}if(Ge==="settings"){g.querySelectorAll("[data-set-theme]").forEach(n=>{n.addEventListener("click",()=>{let r=n.dataset.setTheme;ht(r),g.querySelectorAll("[data-set-theme]").forEach(s=>s.classList.remove("bs-picked")),n.classList.add("bs-picked")})}),g.querySelectorAll("[data-set-layout]").forEach(n=>{n.addEventListener("click",()=>{let r=n.dataset.setLayout,s=pt(r);s&&(Me=s,re(),setTimeout(()=>{Ge="settings",le(),setTimeout(()=>gt("settings"),50)},400))})});return}if(Ge!=="report")return;g.querySelectorAll(".bs-cat-btn").forEach(n=>{n.addEventListener("click",()=>{let r=n.dataset.cat;g.querySelector('input[name="category"]').value=r,g.querySelectorAll(".bs-cat-btn").forEach(s=>s.classList.remove("bs-picked")),n.classList.add("bs-picked")})}),g.querySelectorAll(".bs-sev-btn").forEach(n=>{n.addEventListener("click",()=>{let r=n.dataset.sev;g.querySelector('input[name="severity"]').value=r,g.querySelectorAll(".bs-sev-btn").forEach(s=>s.classList.remove("bs-picked")),n.classList.add("bs-picked")})});let e=null,t=null;g.querySelector("[data-bs-screenshot]")?.addEventListener("click",async()=>{let n=g?.querySelector("[data-bs-shot-title]"),r=g?.querySelector("[data-bs-shot-sub]"),s=g?.querySelector("[data-bs-screenshot]");if(n&&(n.textContent="Capturing..."),g&&(g.style.visibility="hidden"),te&&(te.style.visibility="hidden"),await new Promise(o=>setTimeout(o,200)),e=await jt(!0),g&&(g.style.visibility=""),te&&(te.style.visibility=""),e){n&&(n.textContent="Screenshot captured!"),r&&(r.textContent="Draw on the image below to highlight the issue"),s?.classList.add("bs-captured");let o=g?.querySelector("[data-bs-annotate]");o&&(t=ui(o,e))}else n&&(n.textContent="Screenshot unavailable"),r&&(r.textContent="Could not capture screenshot on this page")}),g.querySelector("[data-bs-form]")?.addEventListener("submit",async n=>{n.preventDefault();let r=n.target,s=r.querySelector(".bs-submit-btn"),o=r.elements.namedItem("title").value.trim(),i=r.elements.namedItem("description").value.trim(),a=r.elements.namedItem("severity").value,d=r.elements.namedItem("category").value;if(!o)return;s.disabled=!0,s.textContent="Sending...";let p=vs(),b={projectId:G.projectId,title:o,description:i,category:d,severity:a,tags:p.tags.length?p.tags:void 0,context:hs(),consoleLogs:fe(),errors:ge(),networkCaptures:xe(),breadcrumbs:Ie(),performance:De()??void 0,screenshot:e??void 0,annotation:t?.getAnnotation()??void 0,pins:t?.getPins().length?t.getPins():void 0,createdAt:Date.now()},v=await En(b);oi({title:b.title,description:b.description,category:b.category,severity:b.severity,tags:b.tags,screenshot:b.screenshot,pins:b.pins,url:window.location.href,createdAt:b.createdAt,status:v.success?"sent":"draft"}),v.success?(s.innerHTML=`${B.check} Bug reported!`,s.classList.add("bs-submit-ok"),setTimeout(re,1200)):(s.textContent=v.error??"Failed \u2014 saved as draft",s.classList.add("bs-submit-err"),setTimeout(()=>{s.disabled=!1,s.textContent="Submit Report",s.classList.remove("bs-submit-err")},2500))})}function le(){if(!Te||K)return;K=!0,Ge="report",Nn(),J&&(J.style.display="",J.style.pointerEvents="auto"),te=Te.createElement("div"),te.className="bs-backdrop",Te.body.appendChild(te);let e=xe().length,t=ge().length;g=Te.createElement("div"),g.className=`bs-modal bs-ly-${Me.id}`,Ee(g);let n=`
|
|
1937
|
-
<div class="bs-tabs">
|
|
1938
|
-
<button class="bs-tab bs-active" data-tab="report">${B.report} Report</button>
|
|
1939
|
-
<button class="bs-tab" data-tab="console">${B.console} Console <span class="bs-tab-badge">${fe().length}</span></button>
|
|
1940
|
-
<button class="bs-tab" data-tab="network">${B.network} Network ${e?`<span class="bs-tab-badge bs-warn">${e}</span>`:`<span class="bs-tab-badge">${He().length}</span>`}</button>
|
|
1941
|
-
<button class="bs-tab" data-tab="context">${B.ctx} Context ${t?`<span class="bs-tab-badge bs-warn">${t}</span>`:""}</button>
|
|
1942
|
-
<button class="bs-tab" data-tab="history">${B.history} History <span class="bs-tab-badge">${Qe().length}</span></button>
|
|
1943
|
-
</div>`,r=ie(),s=r?r.name.split(" ").map(v=>v[0]).join("").toUpperCase().slice(0,2):"",o=en(),i=r?`
|
|
1944
|
-
<div class="bs-hdr">
|
|
1945
|
-
<div class="bs-logo">BugStash</div>
|
|
1946
|
-
<div class="bs-hdr-right">
|
|
1947
|
-
<button class="bs-pin-toggle${o?" active":""}" data-bs-pin-toggle title="Toggle pin mode">
|
|
1948
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>
|
|
1949
|
-
Pins ${o?"ON":"OFF"}
|
|
1950
|
-
</button>
|
|
1951
|
-
<div class="bs-user-badge">
|
|
1952
|
-
<div class="bs-user-avatar">${s}</div>
|
|
1953
|
-
<span>${r.name.split(" ")[0]}</span>
|
|
1954
|
-
</div>
|
|
1955
|
-
<button class="bs-hdr-icon" data-tab="settings" title="Settings">${B.settings}</button>
|
|
1956
|
-
<button class="bs-login-logout" data-bs-logout title="Sign out">Logout</button>
|
|
1957
|
-
<button class="bs-close-btn" data-bs-close title="Close">${B.x}</button>
|
|
1958
|
-
</div>
|
|
1959
|
-
</div>`:`
|
|
1960
|
-
<div class="bs-hdr" style="justify-content:flex-end">
|
|
1961
|
-
<button class="bs-close-btn" data-bs-close title="Close">${B.x}</button>
|
|
1962
|
-
</div>`,a=Me.tabPosition==="left",d=Me.tabPosition==="bottom",p=r?ys():ri();a?g.innerHTML=`
|
|
1963
|
-
${i}
|
|
1964
|
-
<div class="bs-body-wrap">
|
|
1965
|
-
${r?n:""}
|
|
1966
|
-
<div class="bs-scroll">${p}</div>
|
|
1967
|
-
</div>`:d?g.innerHTML=`
|
|
1968
|
-
${i}
|
|
1969
|
-
<div class="bs-scroll">${p}</div>
|
|
1970
|
-
${r?`<div class="bs-tab-divider"></div>${n}`:""}`:g.innerHTML=`
|
|
1971
|
-
${i}
|
|
1972
|
-
${r?`${n}<div class="bs-tab-divider"></div>`:""}
|
|
1973
|
-
<div class="bs-scroll">${p}</div>`,Te.body.appendChild(g),x&&x.classList.add("bs-open"),requestAnimationFrame(()=>{te?.classList.add("bs-in"),g?.classList.add("bs-in")}),g.querySelectorAll(".bs-tab").forEach(v=>{v.addEventListener("click",()=>gt(v.dataset.tab))}),g.querySelector('.bs-hdr-icon[data-tab="settings"]')?.addEventListener("click",()=>gt("settings")),g.querySelector("[data-bs-close]")?.addEventListener("click",re),te.addEventListener("click",re),g.querySelector("[data-bs-pin-toggle]")?.addEventListener("click",()=>{let v=Pe(),k=g?.querySelector("[data-bs-pin-toggle]");k&&(k.classList.toggle("active",v),k.innerHTML=`
|
|
1974
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>
|
|
1975
|
-
Pins ${v?"ON":"OFF"}
|
|
1976
|
-
`)}),g.querySelector("[data-bs-logout]")?.addEventListener("click",()=>{_t(),re(),setTimeout(()=>le(),300)}),r?xs():mi();let b=v=>{v.key==="Escape"&&(re(),document.removeEventListener("keydown",b))};document.addEventListener("keydown",b)}function mi(){if(!g)return;let e=g.querySelector("#bs-login-submit"),t=g.querySelector("#bs-login-email"),n=g.querySelector("#bs-login-pass"),r=g.querySelector("#bs-login-error");if(!e||!t||!n)return;let s=async()=>{let o=t.value.trim(),i=n.value;if(!o||!i){r.textContent="Please enter email and password",r.style.display="block";return}e.setAttribute("disabled","true"),e.textContent="Signing in...",r.style.display="none";let a=await Ut(o,i,G.projectId);a.success?(Je(G.projectId,ne),We(G.projectId),re(),setTimeout(()=>le(),300)):(r.textContent=a.error||"Invalid credentials",r.style.display="block",e.removeAttribute("disabled"),e.textContent="Sign In")};e.addEventListener("click",s),n.addEventListener("keydown",o=>{o.key==="Enter"&&s()}),t.addEventListener("keydown",o=>{o.key==="Enter"&&n.focus()}),setTimeout(()=>t.focus(),100)}function re(){K&&(x&&x.classList.remove("bs-open"),g&&(g.classList.remove("bs-in"),g.classList.add("bs-out")),te&&te.classList.remove("bs-in"),setTimeout(()=>{g?.remove(),te?.remove(),g=null,te=null,K=!1,J&&(J.style.display="none",J.style.pointerEvents="none")},350))}function Ee(e){for(let[t,n]of Object.entries(ae.vars))e.style.setProperty(t,n)}function ht(e){let t=Yt(e);t&&(ae=t,g&&Ee(g),x&&Ee(x),P&&Ee(P))}function ws(){return ae.id}function ks(e){let t=pt(e);t&&(Me=t,K&&(re(),setTimeout(le,400)))}function Es(){return Me.id}function fi(){try{let e=localStorage.getItem(ms);if(!e)return null;let t=JSON.parse(e);if(typeof t.top=="number"&&typeof t.left=="number")return t}catch{}return null}function gi(e,t){try{localStorage.setItem(ms,JSON.stringify({top:e,left:t}))}catch{}}function hi(e,t){let s=window.innerWidth,o=window.innerHeight;return{top:Math.max(8,Math.min(o-56-8,e)),left:Math.max(8,Math.min(s-56-8,t))}}function jn(e,t){if(!x)return;let n=hi(e,t);x.style.top=`${n.top}px`,x.style.left=`${n.left}px`,x.style.bottom="auto",x.style.right="auto",Ss(n.top,n.left)}function Ss(e,t){if(!P)return;let n=56,r=8,s=P.offsetHeight||200,o=e-s-r;o<8&&(o=e+n+r),P.style.top=`${o}px`,P.style.bottom="auto",P.style.left=`${t+n/2-20}px`,P.style.right="auto"}function vi(){if(!x)return;let e=0,t=0,n=0,r=0,s=!1;function o(){x&&(x.removeEventListener("pointermove",a),x.removeEventListener("pointerup",d),x.classList.remove("bs-dragging")),Bn=null}function i(p){if(!x)return;$e=!1,s=!1,e=p.clientX,t=p.clientY;let b=x.getBoundingClientRect();n=b.top,r=b.left,x.setPointerCapture(p.pointerId),x.addEventListener("pointermove",a),x.addEventListener("pointerup",d),Bn=o}function a(p){let b=p.clientX-e,v=p.clientY-t;if(!s&&Math.abs(b)<5&&Math.abs(v)<5)return;s=!0,$e=!0,x?.classList.add("bs-dragging");let k=n+v,S=r+b;jn(k,S)}function d(p){if(x?.releasePointerCapture(p.pointerId),o(),s&&x){let b=x.getBoundingClientRect();gi(b.top,b.left),p.preventDefault(),p.stopPropagation(),setTimeout(()=>{$e=!1},10)}else $e=!1}x.addEventListener("pointerdown",i)}function Ls(e,t){G=e,ne=t,Ke=document.createElement("link"),Ke.rel="stylesheet",Ke.href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap",ne.appendChild(Ke),ft=document.createElement("style"),ft.textContent=ni,ne.appendChild(ft),yi(e),J=document.createElement("iframe"),J.style.cssText="position:fixed;inset:0;z-index:2147483640;pointer-events:none;border:none;background:transparent;width:100%;height:100%;color-scheme:normal;display:none;";let n=`
|
|
1977
|
-
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');
|
|
1978
|
-
${ti}
|
|
1979
|
-
${Vr}
|
|
1980
|
-
html, body { margin: 0; padding: 0; background: transparent; pointer-events: none; overflow: hidden; }
|
|
1981
|
-
`;J.srcdoc=`<!DOCTYPE html><html><head><style>${n}</style></head><body></body></html>`,J.addEventListener("load",()=>{Te=J.contentDocument}),ne.appendChild(J),xi(e),mt=()=>{if(!(!x||$e)&&x.style.top&&x.style.top!=="auto"){let r=x.getBoundingClientRect();jn(r.top,r.left)}},window.addEventListener("resize",mt)}function yi(e){if(!ne)return;let t=e.panelPosition==="bottom-left"?"left":"right";x=document.createElement("button"),x.className="bs-fab",Ee(x),x.innerHTML=`${B.bug}<span class="bs-fab-label">Report a bug</span>`;let n=fi();n?jn(n.top,n.left):x.style[t]="24px",x.addEventListener("click",()=>{$e||(K?re():le())}),ne.appendChild(x),vi(),P=document.createElement("div"),P.className="bs-toolbar",n?Ss(n.top,n.left):P.style[t]="32px",Ee(P);let s=navigator.platform.toUpperCase().includes("MAC")?"\u2318":"Ctrl",o=[{icon:B.cam,tip:"Screenshot",kbd:`${s}+Shift+S`,action:async()=>{let i=await jt(!0);i&&(K||le(),setTimeout(()=>{let a=g?.querySelector("[data-bs-screenshot]");if(a){a.__screenshot=i,a.classList.add("bs-captured");let d=a.querySelector("[data-bs-shot-title]"),p=a.querySelector("[data-bs-shot-sub]");d&&(d.textContent="Screenshot captured!"),p&&(p.textContent="Click to retake or annotate"),a.click()}},400))}},{icon:B.pin,tip:"Toggle Pins",kbd:`${s}+Shift+P`,id:"bs-tb-pin",action:()=>{if(!ie()){K||le();return}ne?.querySelector("#bugstash-live-pins")||(Je(G.projectId,ne),We(G.projectId));let a=Pe(),d=P?.querySelector("#bs-tb-pin");d&&d.classList.toggle("bs-active",a);let p=g?.querySelector("[data-bs-pin-toggle]");p&&(p.classList.toggle("active",a),p.innerHTML=`
|
|
1982
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>
|
|
1983
|
-
Pins ${a?"ON":"OFF"}
|
|
1984
|
-
`)}},{icon:ae.id==="black"?B.sun:B.moon,tip:"Toggle Theme",kbd:`${s}+Shift+T`,id:"bs-tb-theme",action:()=>{let i=ae.id==="black"?"white":"black";ht(i),P&&Ee(P);let a=P?.querySelector("#bs-tb-theme");a&&(a.innerHTML=`${ae.id==="black"?B.sun:B.moon}<span class="bs-toolbar-tip">${ae.id==="black"?"Light":"Dark"} Mode<span class="bs-toolbar-kbd">${s}+Shift+T</span></span>`)}},{icon:B.report,tip:"Open Panel",kbd:`${s}+Shift+B`,action:()=>{K?re():le()}}];for(let i of o){let a=document.createElement("button");a.className="bs-toolbar-btn",i.id&&(a.id=i.id),a.innerHTML=`${i.icon}<span class="bs-toolbar-tip">${i.tip}<span class="bs-toolbar-kbd">${i.kbd}</span></span>`,a.addEventListener("click",d=>{d.stopPropagation(),i.action()}),P.appendChild(a)}ne.appendChild(P),x.addEventListener("mouseenter",()=>{K||us()}),x.addEventListener("mouseleave",i=>{let a=i.relatedTarget;P?.contains(a)||Nn()}),P.addEventListener("mouseenter",()=>us()),P.addEventListener("mouseleave",i=>{let a=i.relatedTarget;x?.contains(a)||Nn()})}function xi(e){let n=navigator.platform.toUpperCase().includes("MAC")?"\u2318":"Ctrl";ut=r=>{if((r.ctrlKey||r.metaKey)&&r.shiftKey){if(r.key==="B"||r.key==="b")r.preventDefault(),K?re():le();else if(r.key==="S"||r.key==="s")r.preventDefault(),jt(!0).then(o=>{o&&(K||le(),setTimeout(()=>{let i=g?.querySelector("[data-bs-screenshot]");if(i){i.__screenshot=o,i.classList.add("bs-captured");let a=i.querySelector("[data-bs-shot-title]"),d=i.querySelector("[data-bs-shot-sub]");a&&(a.textContent="Screenshot captured!"),d&&(d.textContent="Click to retake or annotate"),i.click()}},400))});else if(r.key==="P"||r.key==="p"){if(r.preventDefault(),!ie()){K||le();return}ne?.querySelector("#bugstash-live-pins")||(Je(e.projectId,ne),We(e.projectId));let i=Pe(),a=P?.querySelector("#bs-tb-pin");a&&a.classList.toggle("bs-active",i);let d=g?.querySelector("[data-bs-pin-toggle]");d&&(d.classList.toggle("active",i),d.innerHTML=`
|
|
1985
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>
|
|
1986
|
-
Pins ${i?"ON":"OFF"}
|
|
1987
|
-
`)}else if(r.key==="T"||r.key==="t"){r.preventDefault();let i=navigator.platform.toUpperCase().includes("MAC")?"\u2318":"Ctrl",a=ae.id==="black"?"white":"black";ht(a),P&&Ee(P);let d=P?.querySelector("#bs-tb-theme");d&&(d.innerHTML=`${ae.id==="black"?B.sun:B.moon}<span class="bs-toolbar-tip">${ae.id==="black"?"Light":"Dark"} Mode<span class="bs-toolbar-kbd">${i}+Shift+T</span></span>`)}}},document.addEventListener("keydown",ut)}function us(){tn||K||(tn=!0,P?.classList.add("bs-show"))}function Nn(){tn=!1,P?.classList.remove("bs-show")}function Cs(){re(),Bn?.(),$e=!1,x?.remove(),x=null,P?.remove(),P=null,tn=!1,ft?.remove(),ft=null,Ke?.remove(),Ke=null,J?.remove(),J=null,Te=null,ne=null,ut&&document.removeEventListener("keydown",ut),ut=null,mt&&window.removeEventListener("resize",mt),mt=null}var be=null,q=null,C=null,ve=null,nn="freehand",rn="#ef4444",wi=3,Ze=[],Q=null,vt=!1,sn=null,ki=[{id:"freehand",label:"Draw",icon:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25z"},{id:"rectangle",label:"Rect",icon:"M3 3h18v18H3V3zm2 2v14h14V5H5z"},{id:"circle",label:"Circle",icon:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},{id:"arrow",label:"Arrow",icon:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}],Ei=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#ffffff","#000000"];function $s(e){return new Promise(t=>{sn=t,Ze=[],Q=null,nn="freehand",rn="#ef4444",Si(e)})}function Si(e){be&&be.remove(),be=document.createElement("div"),be.id="bs-annotation-overlay";let t=document.createElement("style");t.textContent=`
|
|
1988
|
-
#bs-annotation-overlay {
|
|
1989
|
-
position: fixed; inset: 0; z-index: 2147483647;
|
|
1990
|
-
background: rgba(0,0,0,0.85);
|
|
1991
|
-
display: flex; flex-direction: column;
|
|
1992
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1993
|
-
}
|
|
1994
|
-
.bs-ann-toolbar {
|
|
1995
|
-
display: flex; align-items: center; gap: 8px;
|
|
1996
|
-
padding: 10px 16px; background: #1a1d2e;
|
|
1997
|
-
border-bottom: 1px solid #333;
|
|
1998
|
-
}
|
|
1999
|
-
.bs-ann-tool {
|
|
2000
|
-
width: 36px; height: 36px; border-radius: 8px;
|
|
2001
|
-
border: 2px solid transparent; background: #222639;
|
|
2002
|
-
cursor: pointer; display: flex; align-items: center; justify-content: center;
|
|
2003
|
-
transition: all 0.15s;
|
|
2004
|
-
}
|
|
2005
|
-
.bs-ann-tool:hover { border-color: #555; }
|
|
2006
|
-
.bs-ann-tool.active { border-color: #6E9ED0; background: #2a3550; }
|
|
2007
|
-
.bs-ann-tool svg { width: 18px; height: 18px; fill: #ccc; }
|
|
2008
|
-
.bs-ann-color {
|
|
2009
|
-
width: 24px; height: 24px; border-radius: 50%;
|
|
2010
|
-
border: 2px solid transparent; cursor: pointer;
|
|
2011
|
-
transition: transform 0.15s;
|
|
2012
|
-
}
|
|
2013
|
-
.bs-ann-color:hover { transform: scale(1.15); }
|
|
2014
|
-
.bs-ann-color.active { border-color: #fff; }
|
|
2015
|
-
.bs-ann-sep { width: 1px; height: 28px; background: #444; margin: 0 6px; }
|
|
2016
|
-
.bs-ann-btn {
|
|
2017
|
-
padding: 8px 18px; border-radius: 8px; border: none;
|
|
2018
|
-
font-size: 13px; font-weight: 600; cursor: pointer;
|
|
2019
|
-
margin-left: auto;
|
|
2020
|
-
}
|
|
2021
|
-
.bs-ann-cancel { background: #333; color: #aaa; margin-left: 8px; }
|
|
2022
|
-
.bs-ann-cancel:hover { background: #444; color: #fff; }
|
|
2023
|
-
.bs-ann-save { background: linear-gradient(135deg, #6E9ED0, #8FAFD6); color: #fff; }
|
|
2024
|
-
.bs-ann-save:hover { opacity: 0.9; }
|
|
2025
|
-
.bs-ann-undo { background: #333; color: #aaa; font-size: 12px; padding: 6px 12px; }
|
|
2026
|
-
.bs-ann-undo:hover { color: #fff; }
|
|
2027
|
-
.bs-ann-canvas-wrap {
|
|
2028
|
-
flex: 1; display: flex; align-items: center; justify-content: center;
|
|
2029
|
-
overflow: hidden; padding: 16px;
|
|
2030
|
-
}
|
|
2031
|
-
.bs-ann-canvas-wrap canvas { cursor: crosshair; border-radius: 4px; }
|
|
2032
|
-
`,be.appendChild(t);let n=document.createElement("div");n.className="bs-ann-toolbar";for(let a of ki){let d=document.createElement("button");d.className=`bs-ann-tool${a.id===nn?" active":""}`,d.title=a.label,d.innerHTML=`<svg viewBox="0 0 24 24"><path d="${a.icon}"/></svg>`,d.addEventListener("click",()=>{nn=a.id,n.querySelectorAll(".bs-ann-tool").forEach(p=>p.classList.remove("active")),d.classList.add("active")}),n.appendChild(d)}n.appendChild(Ps());for(let a of Ei){let d=document.createElement("button");d.className=`bs-ann-color${a===rn?" active":""}`,d.style.background=a,d.addEventListener("click",()=>{rn=a,n.querySelectorAll(".bs-ann-color").forEach(p=>p.classList.remove("active")),d.classList.add("active")}),n.appendChild(d)}n.appendChild(Ps());let r=document.createElement("button");r.className="bs-ann-btn bs-ann-undo",r.textContent="Undo",r.addEventListener("click",()=>{Ze.pop(),on()}),n.appendChild(r);let s=document.createElement("button");s.className="bs-ann-btn bs-ann-save",s.textContent="Save",s.addEventListener("click",Ci);let o=document.createElement("button");o.className="bs-ann-btn bs-ann-cancel",o.textContent="Cancel",o.addEventListener("click",()=>{qn(),sn?.(null)}),n.appendChild(s),n.appendChild(o),be.appendChild(n);let i=document.createElement("div");i.className="bs-ann-canvas-wrap",q=document.createElement("canvas"),C=q.getContext("2d"),i.appendChild(q),be.appendChild(i),document.body.appendChild(be),ve=new Image,ve.onload=()=>{if(!q||!C||!ve)return;let a=window.innerWidth-32,d=window.innerHeight-100,p=ve.width,b=ve.height,v=Math.min(1,a/p,d/b);p=Math.round(p*v),b=Math.round(b*v),q.width=p,q.height=b,on(),Li()},ve.src=e}function Ps(){let e=document.createElement("div");return e.className="bs-ann-sep",e}function Li(){if(!q)return;q.addEventListener("mousedown",t=>{vt=!0;let{x:n,y:r}=Ts(t);Q={type:nn,color:rn,lineWidth:wi,points:[{x:n,y:r}],x:n,y:r,width:0,height:0}}),q.addEventListener("mousemove",t=>{if(!vt||!Q)return;let{x:n,y:r}=Ts(t);Q.type==="freehand"?Q.points.push({x:n,y:r}):(Q.width=n-Q.x,Q.height=r-Q.y),on(),Ms(Q)});let e=()=>{vt&&Q&&(Ze.push(Q),Q=null),vt=!1,on()};q.addEventListener("mouseup",e),q.addEventListener("mouseleave",e)}function Ts(e){let t=q.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}function on(){if(!(!C||!q||!ve)){C.clearRect(0,0,q.width,q.height),C.drawImage(ve,0,0,q.width,q.height);for(let e of Ze)Ms(e)}}function Ms(e){if(C)switch(C.strokeStyle=e.color,C.fillStyle=e.color,C.lineWidth=e.lineWidth,C.lineCap="round",C.lineJoin="round",e.type){case"freehand":{if(!e.points||e.points.length<2)return;C.beginPath(),C.moveTo(e.points[0].x,e.points[0].y);for(let t=1;t<e.points.length;t++)C.lineTo(e.points[t].x,e.points[t].y);C.stroke();break}case"rectangle":{C.strokeRect(e.x,e.y,e.width,e.height);break}case"circle":{let t=e.x+e.width/2,n=e.y+e.height/2,r=Math.abs(e.width)/2,s=Math.abs(e.height)/2;C.beginPath(),C.ellipse(t,n,r,s,0,0,Math.PI*2),C.stroke();break}case"arrow":{let t=e.x,n=e.y,r=e.x+e.width,s=e.y+e.height,o=14,i=Math.atan2(s-n,r-t);C.beginPath(),C.moveTo(t,n),C.lineTo(r,s),C.stroke(),C.beginPath(),C.moveTo(r,s),C.lineTo(r-o*Math.cos(i-Math.PI/6),s-o*Math.sin(i-Math.PI/6)),C.lineTo(r-o*Math.cos(i+Math.PI/6),s-o*Math.sin(i+Math.PI/6)),C.closePath(),C.fill();break}}}function Ci(){if(!q){qn(),sn?.(null);return}let t={dataUrl:q.toDataURL("image/png"),annotations:Ze};qn(),sn?.(t)}function qn(){be?.remove(),be=null,q=null,C=null,ve=null,Ze=[],Q=null,vt=!1}var xt=!1,yt=null;function Pi(){if(yt)return yt;let e=document.createElement("bugstash-root");return e.style.setProperty("position","fixed","important"),e.style.setProperty("inset","0","important"),e.style.setProperty("pointer-events","none","important"),e.style.setProperty("z-index","2147483640","important"),e.style.setProperty("display","block","important"),e.style.setProperty("visibility","visible","important"),e.style.setProperty("opacity","1","important"),e.style.setProperty("transform","none","important"),e.style.setProperty("perspective","none","important"),e.style.setProperty("filter","none","important"),e.style.setProperty("will-change","auto","important"),e.style.setProperty("contain","none","important"),e.style.setProperty("isolation","auto","important"),e.style.setProperty("mix-blend-mode","normal","important"),e.style.setProperty("clip-path","none","important"),e.style.setProperty("margin","0","important"),e.style.setProperty("padding","0","important"),e.style.setProperty("border","none","important"),e.style.setProperty("background","none","important"),e.style.setProperty("box-sizing","border-box","important"),e.style.setProperty("overflow","visible","important"),e.style.setProperty("min-width","0","important"),e.style.setProperty("min-height","0","important"),e.style.setProperty("max-width","none","important"),e.style.setProperty("max-height","none","important"),e.style.setProperty("float","none","important"),e.style.setProperty("clear","none","important"),e.style.setProperty("columns","auto","important"),e.style.setProperty("font-size","16px","important"),e.style.setProperty("line-height","normal","important"),e.style.setProperty("text-align","left","important"),e.style.setProperty("direction","ltr","important"),yt=e.attachShadow({mode:"closed"}),document.body.appendChild(e),yt}function As(e){if(xt)return;xt=!0;let t=Pi();Kn(e.maxBreadcrumbs),tr(e.maxLogs),ir(e.maxNetworkCaptures),cr(),e.enablePerformance!==!1&&br(),Ls(e,t),e.enableLivePins!==!1&&ie()&&(Je(e.projectId,t),We(e.projectId))}function Ti(){if(typeof window>"u")return"production";let e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"||e==="0.0.0.0"||e.endsWith(".local")||/^192\.168\./.test(e)||/^10\./.test(e)||/^172\.(1[6-9]|2\d|3[01])\./.test(e)?"development":e.includes("staging")||e.includes("stage")||e.includes("preview")||e.includes("preprod")||e.includes("pre-prod")||e.includes("qa.")||e.includes(".qa")||e.includes("test.")||e.includes(".dev.")||e.includes("vercel.app")||e.includes("netlify.app")||e.includes("pages.dev")||e.includes("ngrok.io")||e.includes("ngrok-free.app")||e.includes("localhost.run")||e.includes("loca.lt")?"staging":"production"}var Is={init(e){if(xt||typeof window>"u"||(e.environment??Ti())==="production")return;e.endpoint&&Dr(e.endpoint);let n=window.location.hostname;n==="localhost"||n==="127.0.0.1"||n==="0.0.0.0"||n.endsWith(".local")||/^192\.168\./.test(n)||/^10\./.test(n)||/^172\.(1[6-9]|2\d|3[01])\./.test(n)?As(e):Fr(e.projectId).then(s=>{s&&As(e)}).catch(()=>{})},destroy(){xt&&(Cs(),as(),Kr(),rr(),lr(),pr(),Qn(),ur(),document.querySelector("bugstash-root")?.remove(),yt=null,xt=!1)},getLogs:fe,clearLogs:nr,getNetworkCaptures:He,getFailedNetworkCaptures:xe,clearNetworkCaptures:ar,getErrors:ge,clearErrors:dr,getBreadcrumbs:Ie,clearBreadcrumbs:Gn,getPerformanceMetrics:De,addBreadcrumb:V,getThemes:Wt,getThemeById:Yt,setTheme:ht,getCurrentThemeId:ws,getLayouts:Xt,getLayoutById:pt,setLayout:ks,getCurrentLayoutId:Es,getCurrentUser:ie,login:Ut,logout:_t,togglePinMode:Pe,isPinModeActive:en,isConnected:Gr,openAnnotationEditor:$s,redactString:Re,redactObject:Tt},$i=Is;0&&(module.exports={BugStash});
|
|
2033
|
-
//# sourceMappingURL=index.cjs.map
|