From fac28afb6272be39f0aa0813875dda2fb2d6a9cf Mon Sep 17 00:00:00 2001 From: corsacca Date: Wed, 22 Apr 2026 14:10:39 +0100 Subject: [PATCH] remove missing file. --- public/assets/feedback-widget/feedback-widget.iife.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/assets/feedback-widget/feedback-widget.iife.js b/public/assets/feedback-widget/feedback-widget.iife.js index e717aced..96ec4d25 100644 --- a/public/assets/feedback-widget/feedback-widget.iife.js +++ b/public/assets/feedback-widget/feedback-widget.iife.js @@ -26,4 +26,3 @@ let Q,ee;class te{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,t * @license MIT */(e);if(!o)return;const s=t._component;g(s)||s.render||s.template||(s.template=o.innerHTML),1===o.nodeType&&(o.textContent="");const r=n(o,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t};let ri;const ii=e=>ri=e,li=Symbol();function ai(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var ci,ui;(ui=ci||(ci={})).direct="direct",ui.patchObject="patch object",ui.patchFunction="patch function";const fi=()=>{};function di(e,t,n,o=fi){e.push(t);const s=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),o())};var r;return!n&&oe()&&(r=s,Q&&Q.cleanups.push(r)),s}function pi(e,...t){e.slice().forEach(e=>{e(...t)})}const hi=e=>e(),gi=Symbol(),vi=Symbol();function mi(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],s=e[n];ai(s)&&ai(o)&&e.hasOwnProperty(n)&&!kt(o)&&!gt(o)?e[n]=mi(s,o):e[n]=o}return e}const bi=Symbol();function _i(e){return!ai(e)||!e.hasOwnProperty(bi)}const{assign:yi}=Object;function wi(e){return!(!kt(e)||!e.effect)}function xi(e,t,n={},o,s,r){let i;const l=yi({actions:{}},n),a={deep:!0};let c,u,f,d=[],p=[];const h=o.state.value[e];let g;function v(t){let n;c=u=!1,"function"==typeof t?(t(o.state.value[e]),n={type:ci.patchFunction,storeId:e,events:f}):(mi(o.state.value[e],t),n={type:ci.patchObject,payload:t,storeId:e,events:f});const s=g=Symbol();Zt().then(()=>{g===s&&(c=!0)}),u=!0,pi(d,n,o.state.value[e])}r||h||(o.state.value[e]={});const m=r?function(){const{state:e}=n,t=e?e():{};this.$patch(e=>{yi(e,t)})}:fi;const b=(t,n="")=>{if(gi in t)return t[vi]=n,t;const s=function(){ii(o);const n=Array.from(arguments),r=[],i=[];let l;pi(p,{args:n,name:s[vi],store:_,after:function(e){r.push(e)},onError:function(e){i.push(e)}});try{l=t.apply(this&&this.$id===e?this:_,n)}catch(a){throw pi(i,a),a}return l instanceof Promise?l.then(e=>(pi(r,e),e)).catch(e=>(pi(i,e),Promise.reject(e))):(pi(r,l),l)};return s[gi]=!0,s[vi]=n,s},_=ft({_p:o,$id:e,$onAction:di.bind(null,p),$patch:v,$reset:m,$subscribe(t,n={}){const s=di(d,t,n.detached,()=>r()),r=i.run(()=>dn(()=>o.state.value[e],o=>{("sync"===n.flush?u:c)&&t({storeId:e,type:ci.direct,events:f},o)},yi({},a,n)));return s},$dispose:function(){i.stop(),d=[],p=[],o._s.delete(e)}});o._s.set(e,_);const y=(o._a&&o._a.runWithContext||hi)(()=>o._e.run(()=>(i=ne()).run(()=>t({action:b}))));for(const w in y){const t=y[w];if(kt(t)&&!wi(t)||gt(t))r||(h&&_i(t)&&(kt(t)?t.value=h[w]:mi(t,h[w])),o.state.value[e][w]=t);else if("function"==typeof t){const e=b(t,w);y[w]=e,l.actions[w]=t}}return yi(_,y),yi(_t(_),y),Object.defineProperty(_,"$state",{get:()=>o.state.value[e],set:e=>{v(t=>{yi(t,e)})}}),o._p.forEach(e=>{yi(_,i.run(()=>e({store:_,app:o._a,pinia:o,options:l})))}),h&&r&&n.hydrate&&n.hydrate(_.$state,h),c=!0,u=!0,_} /*! #__NO_SIDE_EFFECTS__ */function ki(e,t,n){let o,s;const r="function"==typeof t;function i(e,n){const i=!(!Is()&&!To);(e=e||(i?un(li,null):null))&&ii(e),(e=ri)._s.has(o)||(r?xi(o,t,s,e):function(e,t,n){const{state:o,actions:s,getters:r}=t,i=n.state.value[e];let l;l=xi(e,function(){i||(n.state.value[e]=o?o():{});const t=Tt(n.state.value[e]);return yi(t,s,Object.keys(r||{}).reduce((t,o)=>(t[o]=yt(Js(()=>{ii(n);const t=n._s.get(e);return r[o].call(t,t)})),t),{}))},t,n,0,!0)}(o,s,e));return e._s.get(o)}return o=e,s=r?n:t,i.$id=o,i}const Si=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},Ci={key:0,class:"fw-loader"},Ai={key:0,class:"fw-loader-error"},Ei={key:1,class:"fw-loader-error"},ji=Vr(Si({__name:"ProfileLoader",props:{profileConfig:{type:String,default:""}},setup(e){const t=e,n=Js(()=>{if(!t.profileConfig)return null;try{return JSON.parse(t.profileConfig)}catch(Vl){return console.error("[feedback-widget] Invalid profile-config JSON:",t.profileConfig),null}}),o=Js(()=>{var e;return(null==(e=n.value)?void 0:e.profile)||"chat-bubble"}),s=Js(()=>{var e;return(null==(e=n.value)?void 0:e.projectId)||""}),r=Js(()=>{var e;return(null==(e=n.value)?void 0:e.apiBase)||""}),i=Js(()=>{var e;const t=null==(e=n.value)?void 0:e.enabled;return void 0===t||Boolean(t)}),l=Js(()=>{var e;return(null==(e=n.value)?void 0:e.instanceId)||"fb-"+Math.random().toString(36).slice(2,9)}),a=Object.assign({"./app-profiles/chat-bubble.vue":()=>Promise.resolve().then(()=>Nl)}),c=Js(()=>{if(!n.value)return null;const e=`./app-profiles/${o.value}.vue`;return a[e]?Vn(a[e]):(console.error(`[feedback-widget] Profile not found: "${o.value}". Available:`,Object.keys(a)),null)});return cn("projectId",s),cn("apiBase",r),cn("enabled",i),cn("instanceId",l),cn("profileConfig",n),(e,t)=>n.value&&i.value?(hs(),bs("div",Ci,[c.value?(hs(),_s(ro(c.value),{key:1})):(hs(),bs("div",Ai,[Ss("p",null,[t[0]||(t[0]=Es("⚠️ feedback-widget: profile ",-1)),Ss("strong",null,'"'+G(o.value)+'"',1),t[1]||(t[1]=Es(" not found.",-1))])]))])):n.value?js("",!0):(hs(),bs("div",Ei,[...t[2]||(t[2]=[Ss("p",null,[Es("⚠️ feedback-widget: missing or invalid "),Ss("code",null,"profile-config"),Es(" prop.")],-1),Ss("p",null,"Example:",-1),Ss("pre",null,'profile-config=\'{"profile":"chat-bubble","projectId":"...","apiBase":"https://..."}\'',-1)])]))}},[["styles",[".fw-loader[data-v-ff8ed6a3]{width:100%;height:100%}.fw-loader-error[data-v-ff8ed6a3]{padding:10px 12px;background:#fef3c7;border:1px solid #fcd34d;border-radius:6px;font-family:monospace;font-size:12px;color:#78350f;max-width:360px}.fw-loader-error pre[data-v-ff8ed6a3]{background:#0000000d;padding:6px 8px;border-radius:4px;margin:6px 0 0;overflow-x:auto;white-space:pre-wrap;word-break:break-all}"]],["__scopeId","data-v-ff8ed6a3"]]),{configureApp(e){e.use(function(){const e=ne(!0),t=e.run(()=>St({}));let n=[],o=[];const s=yt({install(e){ii(s),s._a=e,e.provide(li,s),e.config.globalProperties.$pinia=s,o.forEach(e=>n.push(e)),o=[]},use(e){return this._a?n.push(e):o.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}())}});customElements.get("feedback-widget")||customElements.define("feedback-widget",ji);const Ti="fw-token";function Oi(){try{return localStorage.getItem(Ti)||""}catch{return""}}const Pi=ki("auth",{state:()=>({token:Oi(),user:null,authChecking:!1,authError:""}),getters:{isAuthed:e=>Boolean(e.user)},actions:{setToken(e){this.token=e||"";try{e?localStorage.setItem(Ti,e):localStorage.removeItem(Ti)}catch{}},setUser(e){this.user=e},reset(){this.setToken(""),this.user=null,this.authError=""}}});function Mi(){const e=un("apiBase"),t=Pi();function n(t){return`${((null==e?void 0:e.value)||"").replace(/\/$/,"")}${t}`}return{request:async function(e,{method:o="GET",body:s}={}){const r={"Content-Type":"application/json"};t.token&&(r.Authorization=`Bearer ${t.token}`);const i=await fetch(n(e),{method:o,headers:r,body:s?JSON.stringify(s):void 0});if(204===i.status)return null;const l=await i.text(),a=l?function(e){try{return JSON.parse(e)}catch{return null}}(l):null;if(!i.ok){const e=new Error((null==a?void 0:a.statusMessage)||(null==a?void 0:a.message)||`HTTP ${i.status}`);throw e.status=i.status,e.data=a,e}return a},url:n}}const Li=["data-project"],Fi={key:0,class:"fw-panel",role:"dialog","aria-label":"Feedback"},Ri={class:"fw-header"},Ii={class:"fw-title"},$i=["title"],Ni={class:"fw-header-right"},Vi={key:0,class:"fw-user"},Di=["aria-expanded"],Ui=["title"],Bi={key:0,class:"fw-alert fw-alert-error fw-alert-inline"},qi={key:0,class:"fw-alert fw-alert-error fw-alert-inline"},zi={key:1,class:"fw-project-banner"},Wi={key:2,class:"fw-body fw-auth"},Hi={class:"fw-auth-tabs"},Ki={class:"fw-field"},Ji={class:"fw-field"},Zi={key:0,class:"fw-alert fw-alert-error"},Gi=["disabled"],Yi={class:"fw-field"},Xi={class:"fw-field"},Qi={class:"fw-field"},el={key:0,class:"fw-alert fw-alert-error"},tl=["disabled"],nl={class:"fw-tabs",role:"tablist"},ol=["aria-selected"],sl=["aria-selected"],rl={key:0,class:"fw-count"},il={key:0,class:"fw-body"},ll={class:"fw-field"},al=["value"],cl={class:"fw-field"},ul={class:"fw-field"},fl={class:"fw-field"},dl={class:"fw-field"},pl={key:0,class:"fw-alert fw-alert-error"},hl={key:1,class:"fw-alert fw-alert-ok"},gl=["disabled"],vl={key:1,class:"fw-body"},ml={key:0,class:"fw-signin-cta"},bl={class:"fw-signin-cta-actions"},_l={key:1,class:"fw-empty"},yl={key:2,class:"fw-alert fw-alert-error"},wl={key:3,class:"fw-empty"},xl={key:4,class:"fw-list"},kl=["onClick"],Sl={class:"fw-item-title"},Cl={class:"fw-item-meta"},Al={key:0,class:"fw-item-body"},El={key:0},jl={key:1},Tl={key:2},Ol={key:3},Pl={key:4},Ml={key:5},Ll=["aria-expanded"],Fl={key:0,xmlns:"http://www.w3.org/2000/svg",height:"32",viewBox:"0 -960 960 960",width:"32",fill:"#1f1f1f",style:{display:"block",margin:"auto"}},Rl={key:1,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none"},Il=2e3,$l=Si({__name:"chat-bubble",setup(e){const t=un("projectId"),n=function(){const e=Pi(),t=Mi(),n=un("projectId"),o=St([]),s=St(!1),r=St(""),i=St(null),l=St("");async function a(){if(e.token){e.authChecking=!0,e.authError="";try{const n=await t.request("/api/auth/me");e.setUser(n.user)}catch(Vl){401===Vl.status?e.reset():e.authError=Vl.message}finally{e.authChecking=!1}}else e.setUser(null)}async function c(){if(e.isAuthed&&(null==n?void 0:n.value)){s.value=!0,r.value="";try{const e=await t.request(`/api/v1/feedback?project_id=${encodeURIComponent(n.value)}`);o.value=Array.isArray(e)?e:[]}catch(Vl){r.value=Vl.message||"Failed to load submissions"}finally{s.value=!1}}else o.value=[]}return{auth:e,projectId:Js(()=>(null==n?void 0:n.value)||""),project:i,projectError:l,loadProject:async function(){if(i.value=null,l.value="",null==n?void 0:n.value)try{const e=await t.request(`/api/v1/project/${encodeURIComponent(n.value)}`);i.value=e}catch(Vl){l.value=404===Vl.status?"Unknown project — check the projectId in profile-config.":Vl.message||"Failed to load project"}},submissions:o,submissionsLoading:s,submissionsError:r,refreshMe:a,login:async function({email:n,password:o}){const s=await t.request("/api/auth/login",{method:"POST",body:{email:n,password:o}});if(!(null==s?void 0:s.token))throw new Error("Server did not return a token");return e.setToken(s.token),e.setUser(s.user),s},register:async function({email:n,password:o,display_name:s}){const r=await t.request("/api/auth/register",{method:"POST",body:{email:n,password:o,display_name:s}});return(null==r?void 0:r.autoLoggedIn)&&r.token&&(e.setToken(r.token),e.setUser(r.user)),r},logout:function(){e.reset(),o.value=[]},loadSubmissions:c,submit:async function(o){if(!(null==n?void 0:n.value))throw new Error("Missing projectId");const s={project_id:n.value,...o,page_url:window.location.href,page_path:window.location.pathname,locale:navigator.language,referrer:document.referrer,client_context:{viewport:{w:window.innerWidth,h:window.innerHeight},screen:{w:screen.width,h:screen.height},dpr:window.devicePixelRatio,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,language:navigator.language,color_scheme:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",connection:(null==(r=navigator.connection)?void 0:r.effectiveType)||null,query:window.location.search,hash:window.location.hash}};var r;await t.request("/api/v1/feedback",{method:"POST",body:s}),e.isAuthed&&await c()},bindStorageSync:function(){const t=t=>{t.key===Ti&&(e.token=t.newValue||"",t.newValue?a().then(()=>e.isAuthed&&c()):(e.setUser(null),o.value=[]))};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}}}(),{auth:o,project:s,projectError:r,loadProject:i,submissions:l,submissionsLoading:a,submissionsError:c,refreshMe:u,login:f,register:d,logout:p,loadSubmissions:h,submit:g,bindStorageSync:v}=n,m=St(!1),b=St("submit"),_=St("tabs"),y=St("login"),w=St(!1),x=St(null),k=St(!1),S=St(""),C=St(!1),A=St(!1);function E(e="login"){y.value=e,o.authError="",_.value="auth"}function j(){_.value="tabs",o.authError=""}const T=[{value:"bug",label:"Bug Fix"},{value:"feature_addition",label:"New Feature Request"},{value:"feature_change",label:"Change Request to Existing Feature"}],O={new:"New",triage_needed:"Triage",in_progress:"In progress",rejected:"Rejected",accepted:"Accepted"},P=ft({email:"",password:""}),M=ft({email:"",password:"",display_name:""}),L=ft({feedback_sub_type:"bug",reported_element:"",problem_description:"",suggested_fix:"",tags:""}),F=un("apiBase"),R=Js(()=>Boolean(null==F?void 0:F.value));async function I(){w.value=!0,o.authError="";try{await f({email:P.email,password:P.password}),P.password="",_.value="tabs",b.value="mine",await h()}catch(Vl){o.authError=Vl.message||"Login failed"}finally{w.value=!1}}async function $(){w.value=!0,o.authError="";try{const e=await d({email:M.email,password:M.password,display_name:M.display_name});(null==e?void 0:e.requiresVerification)&&!e.autoLoggedIn?(o.authError="Check your email to verify, then log in.",y.value="login",P.email=M.email):(null==e?void 0:e.autoLoggedIn)&&(_.value="tabs",b.value="mine",await h()),M.password=""}catch(Vl){o.authError=Vl.message||"Registration failed"}finally{w.value=!1}}async function N(){S.value="",C.value=!1;const e=L.reported_element.trim()?L.problem_description.trim()?L.suggested_fix.trim()?"":"Suggested fix is required.":"Problem description is required.":"Reported element is required.";if(e)S.value=e;else{k.value=!0;try{await g({feedback_sub_type:L.feedback_sub_type,reported_element:L.reported_element.trim(),problem_description:L.problem_description.trim(),suggested_fix:L.suggested_fix.trim(),tags:L.tags.split(",").map(e=>e.trim()).filter(Boolean)}),C.value=!0,L.feedback_sub_type="bug",L.reported_element="",L.problem_description="",L.suggested_fix="",L.tags="",setTimeout(()=>{C.value=!1},2500)}catch(Vl){S.value=Vl.message||"Submit failed."}finally{k.value=!1}}}function V(e,t=60){return e?e.length>t?e.slice(0,t)+"…":e:""}function D(){A.value=!1,p()}function U(){A.value&&(A.value=!1)}let B=null;return Zn(()=>{B=v(),i(),o.token&&u().then(()=>o.isAuthed&&h()),document.addEventListener("click",U)}),Xn(()=>{B&&B(),document.removeEventListener("click",U)}),dn(()=>null==t?void 0:t.value,()=>{i(),o.isAuthed&&h()}),dn(m,e=>{e&&o.isAuthed&&!l.value.length&&h()}),(e,n)=>(hs(),bs("div",{class:"fw-root","data-project":At(t)},[Cs(lr,{name:"fw-panel"},{default:rn(()=>{var e,i,u,f,d;return[m.value?(hs(),bs("div",Fi,[Ss("header",Ri,[Ss("div",Ii,[n[21]||(n[21]=Ss("span",{class:"fw-dot"},null,-1)),n[22]||(n[22]=Ss("span",null,"Feedback",-1)),(null==(e=At(s))?void 0:e.name)?(hs(),bs("span",{key:0,class:"fw-project",title:At(t)}," · "+G(V(At(s).name,24)),9,$i)):js("",!0)]),Ss("div",Ni,[At(o).isAuthed?(hs(),bs("div",Vi,[Ss("button",{class:"fw-user-btn","aria-expanded":A.value,"aria-haspopup":"menu",onClick:n[0]||(n[0]=Qr(e=>A.value=!A.value,["stop"]))},[Es(G((null==(i=At(o).user)?void 0:i.display_name)||(null==(u=At(o).user)?void 0:u.email))+" ",1),Ss("span",{class:z(["fw-caret",{open:A.value}])},"▾",2)],8,Di),A.value?(hs(),bs("div",{key:0,class:"fw-user-menu",role:"menu",onClick:n[1]||(n[1]=Qr(()=>{},["stop"]))},[Ss("div",{class:"fw-user-menu-email",title:null==(f=At(o).user)?void 0:f.email},G(null==(d=At(o).user)?void 0:d.email),9,Ui),Ss("button",{class:"fw-user-menu-item",role:"menuitem",onClick:D},"Log out")])):js("",!0)])):"auth"!==_.value?(hs(),bs("button",{key:1,class:"fw-header-signin",type:"button",onClick:n[2]||(n[2]=e=>E("login"))},"Sign in")):js("",!0),Ss("button",{class:"fw-close","aria-label":"Close",onClick:n[3]||(n[3]=e=>m.value=!1)},"×")])]),R.value?(hs(),bs(as,{key:1},[At(r)?(hs(),bs("div",qi,G(At(r)),1)):js("",!0),At(s)?(hs(),bs("div",zi,[n[24]||(n[24]=Es(" Sending feedback to ",-1)),Ss("strong",null,G(At(s).name),1)])):js("",!0),"auth"===_.value?(hs(),bs("section",Wi,[Ss("button",{type:"button",class:"fw-back",onClick:j}," ← Back to feedback "),Ss("div",Hi,[Ss("button",{class:z({active:"login"===y.value}),onClick:n[4]||(n[4]=e=>{y.value="login",At(o).authError=""})},"Log in",2),Ss("button",{class:z({active:"register"===y.value}),onClick:n[5]||(n[5]=e=>{y.value="register",At(o).authError=""})},"Register",2)]),"login"===y.value?(hs(),bs("form",{key:0,onSubmit:Qr(I,["prevent"])},[Ss("label",Ki,[n[25]||(n[25]=Ss("span",null,"Email",-1)),ln(Ss("input",{"onUpdate:modelValue":n[6]||(n[6]=e=>P.email=e),type:"email",autocomplete:"email",required:""},null,512),[[Kr,P.email]])]),Ss("label",Ji,[n[26]||(n[26]=Ss("span",null,"Password",-1)),ln(Ss("input",{"onUpdate:modelValue":n[7]||(n[7]=e=>P.password=e),type:"password",autocomplete:"current-password",required:""},null,512),[[Kr,P.password]])]),At(o).authError?(hs(),bs("div",Zi,G(At(o).authError),1)):js("",!0),Ss("button",{class:"fw-submit",disabled:w.value,type:"submit"},G(w.value?"Signing in…":"Log in"),9,Gi)],32)):(hs(),bs("form",{key:1,onSubmit:Qr($,["prevent"])},[Ss("label",Yi,[n[27]||(n[27]=Ss("span",null,"Display name",-1)),ln(Ss("input",{"onUpdate:modelValue":n[8]||(n[8]=e=>M.display_name=e),type:"text",required:"",minlength:"2"},null,512),[[Kr,M.display_name]])]),Ss("label",Xi,[n[28]||(n[28]=Ss("span",null,"Email",-1)),ln(Ss("input",{"onUpdate:modelValue":n[9]||(n[9]=e=>M.email=e),type:"email",autocomplete:"email",required:""},null,512),[[Kr,M.email]])]),Ss("label",Qi,[n[29]||(n[29]=Ss("span",null,"Password",-1)),ln(Ss("input",{"onUpdate:modelValue":n[10]||(n[10]=e=>M.password=e),type:"password",autocomplete:"new-password",required:"",minlength:"8"},null,512),[[Kr,M.password]])]),At(o).authError?(hs(),bs("div",el,G(At(o).authError),1)):js("",!0),Ss("button",{class:"fw-submit",disabled:w.value,type:"submit"},G(w.value?"Creating…":"Create account"),9,tl)],32))])):(hs(),bs(as,{key:3},[Ss("nav",nl,[Ss("button",{role:"tab","aria-selected":"submit"===b.value,class:z({active:"submit"===b.value}),onClick:n[11]||(n[11]=e=>b.value="submit")},"Submit",10,ol),Ss("button",{role:"tab","aria-selected":"mine"===b.value,class:z({active:"mine"===b.value}),onClick:n[12]||(n[12]=e=>{b.value="mine",At(o).isAuthed&&At(h)()})},[n[30]||(n[30]=Es(" My Submissions ",-1)),At(o).isAuthed&&At(l).length?(hs(),bs("span",rl,G(At(l).length),1)):js("",!0)],10,sl)]),"submit"===b.value?(hs(),bs("section",il,[Ss("label",ll,[n[31]||(n[31]=Ss("span",null,"Type",-1)),ln(Ss("select",{"onUpdate:modelValue":n[13]||(n[13]=e=>L.feedback_sub_type=e)},[(hs(),bs(as,null,lo(T,e=>Ss("option",{key:e.value,value:e.value},G(e.label),9,al)),64))],512),[[Jr,L.feedback_sub_type]])]),Ss("label",cl,[n[32]||(n[32]=Ss("span",null,"What element are you reporting?",-1)),ln(Ss("input",{"onUpdate:modelValue":n[14]||(n[14]=e=>L.reported_element=e),type:"text",placeholder:"e.g. 'Save button on settings page'",maxlength:Il},null,512),[[Kr,L.reported_element]])]),Ss("label",ul,[n[33]||(n[33]=Ss("span",null,"What is the problem?",-1)),ln(Ss("textarea",{"onUpdate:modelValue":n[15]||(n[15]=e=>L.problem_description=e),rows:"3",placeholder:"What is broken, confusing, or could be better?",maxlength:Il},null,512),[[Kr,L.problem_description]])]),Ss("label",fl,[n[34]||(n[34]=Ss("span",null,"What fix do you suggest?",-1)),ln(Ss("textarea",{"onUpdate:modelValue":n[16]||(n[16]=e=>L.suggested_fix=e),rows:"3",placeholder:"How would you improve it?",maxlength:Il},null,512),[[Kr,L.suggested_fix]])]),Ss("label",dl,[n[35]||(n[35]=Ss("span",null,[Es("Tags "),Ss("em",null,"(comma-separated, optional)")],-1)),ln(Ss("input",{"onUpdate:modelValue":n[17]||(n[17]=e=>L.tags=e),type:"text",placeholder:"ux, mobile, blocker"},null,512),[[Kr,L.tags]])]),S.value?(hs(),bs("div",pl,G(S.value),1)):js("",!0),C.value?(hs(),bs("div",hl,"Thanks — feedback submitted.")):js("",!0),Ss("button",{class:"fw-submit",disabled:k.value,onClick:N},G(k.value?"Sending…":"Submit feedback"),9,gl)])):(hs(),bs("section",vl,[At(o).isAuthed?At(a)?(hs(),bs("div",_l,"Loading…")):At(c)?(hs(),bs("div",yl,G(At(c)),1)):At(l).length?(hs(),bs("ul",xl,[(hs(!0),bs(as,null,lo(At(l),e=>{var t,o;return hs(),bs("li",{key:e.id,class:z(["fw-item",{open:x.value===e.id}])},[Ss("button",{class:"fw-item-head",onClick:t=>{return n=e.id,void(x.value=x.value===n?null:n);var n}},[Ss("span",Sl,G(V(e.reported_element,48)),1),Ss("span",Cl,[Ss("span",{class:z(["fw-badge","fw-badge-"+e.status])},G(O[e.status]||e.status),3),Ss("time",null,G(new Date(e.created_at).toLocaleDateString()),1)])],8,kl),x.value===e.id?(hs(),bs("div",Al,[Ss("dl",null,[n[39]||(n[39]=Ss("dt",null,"Type",-1)),Ss("dd",null,G(e.feedback_sub_type),1),n[40]||(n[40]=Ss("dt",null,"Problem",-1)),Ss("dd",null,G(e.problem_description),1),n[41]||(n[41]=Ss("dt",null,"Suggested fix",-1)),Ss("dd",null,G(e.suggested_fix),1),(null==(t=e.tags)?void 0:t.length)?(hs(),bs("dt",El,"Tags")):js("",!0),(null==(o=e.tags)?void 0:o.length)?(hs(),bs("dd",jl,G(e.tags.join(", ")),1)):js("",!0),e.page_path?(hs(),bs("dt",Tl,"Page")):js("",!0),e.page_path?(hs(),bs("dd",Ol,G(e.page_path),1)):js("",!0),e.external_reference?(hs(),bs("dt",Pl,"Ref")):js("",!0),e.external_reference?(hs(),bs("dd",Ml,G(e.external_reference),1)):js("",!0)])])):js("",!0)],2)}),128))])):(hs(),bs("div",wl," No submissions yet on this project. ")):(hs(),bs("div",ml,[n[36]||(n[36]=Ss("div",{class:"fw-signin-cta-icon"},[Ss("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},[Ss("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),Ss("circle",{cx:"12",cy:"7",r:"4"})])],-1)),n[37]||(n[37]=Ss("div",{class:"fw-signin-cta-title"}," Track your feedback ",-1)),n[38]||(n[38]=Ss("div",{class:"fw-signin-cta-body"}," Sign in or create an account to see your past submissions and track their status as the team works on them. ",-1)),Ss("div",bl,[Ss("button",{class:"fw-submit",type:"button",onClick:n[18]||(n[18]=e=>E("login"))}," Log in "),Ss("button",{class:"fw-submit fw-submit-ghost",type:"button",onClick:n[19]||(n[19]=e=>E("register"))}," Create account ")])]))]))],64))],64)):(hs(),bs("div",Bi,[...n[23]||(n[23]=[Ss("strong",null,"apiBase",-1),Es(" missing from ",-1),Ss("code",null,"profile-config",-1),Es(". ",-1)])]))])):js("",!0)]}),_:1}),Ss("button",{class:z(["fw-bubble",{open:m.value}]),"aria-expanded":m.value,"aria-label":"Open feedback",onClick:n[20]||(n[20]=e=>m.value=!m.value)},[m.value?(hs(),bs("svg",Rl,[...n[43]||(n[43]=[Ss("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)])])):(hs(),bs("svg",Fl,[...n[42]||(n[42]=[Ss("path",{d:"M480-200q66 0 113-47t47-113v-160q0-66-47-113t-113-47q-66 0-113 47t-47 113v160q0 66 47 113t113 47Zm-80-120h160v-80H400v80Zm0-160h160v-80H400v80Zm80 40Zm0 320q-65 0-120.5-32T272-240H160v-80h84q-3-20-3.5-40t-.5-40h-80v-80h80q0-20 .5-40t3.5-40h-84v-80h112q14-23 31.5-43t40.5-35l-64-66 56-56 86 86q28-9 57-9t57 9l88-86 56 56-66 66q23 15 41.5 34.5T688-640h112v80h-84q3 20 3.5 40t.5 40h80v80h-80q0 20-.5 40t-3.5 40h84v80H688q-32 56-87.5 88T480-120Z"},null,-1)])]))],10,Ll)],8,Li))}},[["styles",[":host{all:initial;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:14px;color:#1f2937}.fw-root{display:flex;flex-direction:column;align-items:flex-end;gap:12px}.fw-bubble{width:52px;height:52px;border-radius:50%;border:none;background:#2563eb;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 16px #2563eb59;transition:transform .15s ease,background .15s ease}.fw-bubble:hover{background:#1d4ed8;transform:translateY(-1px)}.fw-bubble.open{background:#111827;box-shadow:0 6px 16px #00000040}.fw-panel{width:360px;max-width:calc(100vw - 40px);max-height:70vh;background:#fff;border-radius:12px;box-shadow:0 10px 30px #0000002e,0 2px 6px #00000014;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(0,0,0,.06)}.fw-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#111827;color:#fff;gap:8px}.fw-title{display:flex;align-items:center;gap:8px;font-weight:600;min-width:0}.fw-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px #22c55e40;flex-shrink:0}.fw-project{font-weight:400;font-size:12px;opacity:.7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fw-header-right{display:flex;align-items:center;gap:8px}.fw-user{position:relative}.fw-user-btn{background:#ffffff1a;border:none;color:#fff;font-size:11px;padding:4px 8px;border-radius:4px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:inherit}.fw-user-btn:hover{background:#fff3}.fw-caret{font-size:9px;opacity:.7;transition:transform .15s ease}.fw-caret.open{transform:rotate(180deg)}.fw-user-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:180px;background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 4px 12px #0000001f;overflow:hidden;z-index:10}.fw-user-menu-email{padding:8px 12px;font-size:11px;color:#6b7280;background:#f9fafb;border-bottom:1px solid #e5e7eb;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fw-user-menu-item{width:100%;padding:8px 12px;background:#fff;color:#111827;border:none;text-align:left;font:inherit;font-size:13px;cursor:pointer}.fw-user-menu-item:hover{background:#f3f4f6}.fw-bubble{width:52px;height:52px;border-radius:50%;border:none;background:#fff;color:#2563eb;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 16px #2563eb2e;padding:0;transition:transform .15s ease,background .15s ease}.fw-bubble:hover{background:#f3f4f6;transform:translateY(-1px) scale(1.04)}.fw-bubble.open{background:#e5e7eb;filter:grayscale(.5) opacity(.7)}.fw-bubble:hover{filter:brightness(1.08) drop-shadow(0 2px 8px #2563eb33);transform:translateY(-1px) scale(1.04)}.fw-bubble.open{filter:grayscale(.5) opacity(.7)}.fw-close{background:transparent;border:none;color:#fff;font-size:22px;line-height:1;cursor:pointer;padding:0 4px;opacity:.75}.fw-close:hover{opacity:1}.fw-tabs{display:flex;border-bottom:1px solid #e5e7eb;background:#f9fafb}.fw-tabs button{flex:1;padding:10px 12px;border:none;background:transparent;cursor:pointer;font-size:13px;color:#6b7280;font-weight:500;border-bottom:2px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:6px}.fw-tabs button.active{color:#111827;border-bottom-color:#2563eb;background:#fff}.fw-count{background:#e5e7eb;color:#374151;font-size:11px;padding:1px 6px;border-radius:10px}.fw-body{padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:10px}.fw-project-banner{padding:8px 14px;background:#eff6ff;border-bottom:1px solid #dbeafe;font-size:12px;color:#1e40af}.fw-project-banner strong{color:#1e3a8a;font-weight:600}.fw-auth-tabs{display:flex;gap:4px;margin-bottom:8px}.fw-auth-tabs button{flex:1;padding:6px 8px;border:1px solid #e5e7eb;background:#fff;border-radius:6px;cursor:pointer;font-size:12px;color:#6b7280;font-weight:500}.fw-auth-tabs button.active{background:#2563eb;color:#fff;border-color:#2563eb}.fw-auth form{display:flex;flex-direction:column;gap:10px}.fw-field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#374151}.fw-field span{font-weight:500}.fw-field em{font-style:normal;color:#9ca3af;font-weight:400}.fw-field input,.fw-field select,.fw-field textarea{font:inherit;color:#111827;padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;background:#fff;resize:vertical}.fw-field input:focus,.fw-field select:focus,.fw-field textarea:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb2e}.fw-submit{margin-top:4px;padding:10px 12px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-weight:600;cursor:pointer}.fw-submit:hover{background:#1d4ed8}.fw-submit-ghost{background:#fff;color:#2563eb;border:1px solid #2563eb}.fw-submit-ghost:hover{background:#eff6ff}.fw-back{background:transparent;border:none;color:#6b7280;cursor:pointer;font:inherit;font-size:12px;padding:4px 6px;align-self:flex-start;border-radius:4px;margin-bottom:2px}.fw-back:hover{background:#f3f4f6;color:#111827}.fw-header-signin{background:#2563eb;color:#fff;border:none;font:inherit;font-size:11px;font-weight:600;padding:4px 10px;border-radius:4px;cursor:pointer}.fw-header-signin:hover{background:#1d4ed8}.fw-signin-cta{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:12px 6px}.fw-signin-cta-icon{width:52px;height:52px;border-radius:50%;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center}.fw-signin-cta-title{font-weight:600;font-size:14px;color:#111827}.fw-signin-cta-body{font-size:12px;color:#6b7280;line-height:1.5;max-width:280px}.fw-signin-cta-actions{display:flex;flex-direction:column;gap:6px;width:100%;margin-top:4px}.fw-signin-cta-actions .fw-submit{width:100%}.fw-submit:disabled{background:#93c5fd;cursor:not-allowed}.fw-alert{padding:8px 10px;border-radius:6px;font-size:12px}.fw-alert-inline{margin:14px 14px 0}.fw-alert-error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}.fw-alert-ok{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}.fw-empty{padding:24px 8px;color:#9ca3af;text-align:center;font-size:13px}.fw-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.fw-item{border:1px solid #e5e7eb;border-radius:8px;overflow:hidden;background:#fff}.fw-item.open{border-color:#c7d2fe}.fw-item-head{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border:none;background:transparent;cursor:pointer;text-align:left;font:inherit;color:inherit}.fw-item-head:hover{background:#f9fafb}.fw-item-title{font-weight:500;color:#111827;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fw-item-meta{display:flex;align-items:center;gap:8px;flex-shrink:0;font-size:11px;color:#6b7280}.fw-badge{padding:2px 7px;border-radius:10px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.02em}.fw-badge-new{background:#dbeafe;color:#1d4ed8}.fw-badge-triage_needed{background:#fef3c7;color:#92400e}.fw-badge-in_progress{background:#ede9fe;color:#5b21b6}.fw-badge-rejected{background:#fee2e2;color:#991b1b}.fw-badge-accepted{background:#dcfce7;color:#166534}.fw-item-body{padding:0 12px 12px;font-size:12px;color:#374151}.fw-item-body dl{display:grid;grid-template-columns:90px 1fr;gap:4px 10px;margin:0}.fw-item-body dt{color:#6b7280;font-weight:500}.fw-item-body dd{margin:0;word-break:break-word}.fw-panel-enter-active,.fw-panel-leave-active{transition:opacity .15s ease,transform .15s ease}.fw-panel-enter-from,.fw-panel-leave-to{opacity:0;transform:translateY(8px)}"]]]),Nl=Object.freeze(Object.defineProperty({__proto__:null,default:$l},Symbol.toStringTag,{value:"Module"}));return ji}(); -//# sourceMappingURL=feedback-widget.iife.js.map