1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[96344],{22114:function(t,e,n){n.d(e,{Vh:function(){return p},C6:function(){return g},E:function(){return f}});var r=n(31004),o=n(10761),a=n(19021),i=n(25425),s=n(53545),l=n(76801),c=n(51368);let d=new o.H$("commentTooltip"),u={en:s.production,no:l.production,sv:c.production},m=t=>{let e=u[(0,i.x)()][t],n=u.en[t];return"string"==typeof e?e:"string"==typeof n?n:t},p=r.vc.create({name:"comment",inclusive:!1,excludes:"",addOptions:()=>({HTMLAttributes:{}}),addAttributes:()=>({id:{default:null,parseHTML:t=>t.getAttribute("data-comment-id"),renderHTML:t=>t.id?{"data-comment-id":t.id}:{}},text:{default:"",parseHTML:t=>t.getAttribute("data-comment-text"),renderHTML:t=>t.text?{"data-comment-text":t.text}:{}},resolved:{default:!1,parseHTML:t=>"true"===t.getAttribute("data-comment-resolved"),renderHTML:t=>({"data-comment-resolved":String(!!t.resolved)})},createdAt:{default:null,parseHTML:t=>t.getAttribute("data-comment-created"),renderHTML:t=>t.createdAt?{"data-comment-created":t.createdAt}:{}}}),parseHTML:()=>[{tag:"span[data-comment-id]"}],renderHTML(t){let{HTMLAttributes:e}=t,n="true"===e["data-comment-resolved"];return["span",(0,r.P1)(this.options.HTMLAttributes,e,{class:"comment-mark ".concat(n?"comment-mark-resolved":"comment-mark-active"),style:n?"border-bottom: 2px dotted rgba(156, 163, 175, 0.4);":"background-color: rgba(251, 191, 36, 0.2); border-bottom: 2px solid rgba(245, 158, 11, 0.6); cursor: pointer;"}),0]},addCommands(){return{setComment:t=>{let{id:e,text:n}=t;return t=>{let{commands:r}=t;return r.setMark(this.name,{id:e,text:n,resolved:!1,createdAt:new Date().toISOString()})}},resolveComment:t=>e=>{let{tr:n,state:r,dispatch:o}=e;if(!o)return!1;let{doc:a}=r,i=!1;return a.descendants((e,r)=>{if(e.isText)for(let o of e.marks)o.type.name===this.name&&o.attrs.id===t&&(n.removeMark(r,r+e.nodeSize,o.type),n.addMark(r,r+e.nodeSize,o.type.create({...o.attrs,resolved:!0})),i=!0)}),i},removeComment:t=>e=>{let{tr:n,state:r,dispatch:o}=e;if(!o)return!1;let{doc:a}=r,i=!1;return a.descendants((e,r)=>{if(e.isText)for(let o of e.marks)o.type.name===this.name&&o.attrs.id===t&&(n.removeMark(r,r+e.nodeSize,o.type),i=!0)}),i},removeAllComments:()=>t=>{let{tr:e,state:n,dispatch:r}=t;if(!r)return!1;let o=n.schema.marks[this.name];return!!o&&(e.removeMark(0,n.doc.content.size,o),!0)}}},addKeyboardShortcuts:()=>
1({"Mod-Shift-m":()=>(window.dispatchEvent(new CustomEvent("comment-mark-shortcut")),!0)}),addProseMirrorPlugins:()=>[new o.Sy({key:d,state:{init:()=>({hoveredCommentId:null}),apply(t,e){let n=t.getMeta(d);return(null==n?void 0:n.hoveredCommentId)!==void 0?{hoveredCommentId:n.hoveredCommentId}:e}},props:{decorations(t){let e=d.getState(t),n=function(t){let{doc:e}=t,n=[],r=new Map;e.descendants((t,e)=>{if(t.isText)for(let n of t.marks){if("comment"!==n.type.name||"string"!=typeof n.attrs.id)continue;let o=n.attrs.id,a=e+t.nodeSize,i=r.get(o);(!i||a>i.pos)&&r.set(o,{pos:a,resolved:!!n.attrs.resolved,text:"string"==typeof n.attrs.text?n.attrs.text:""})}});let o=new Set;for(let[t,i]of r){if(i.resolved)continue;let r=e.resolve(Math.max(0,i.pos-1)),s=r.before(r.depth);o.has(s)||(o.add(s),n.push(a.p.node(s,r.after(r.depth),{style:"position: relative"}))),n.push(a.p.widget(i.pos,()=>(function(t,e){let n=document.createElement("button");n.type="button",n.contentEditable="false",n.className="comment-margin-marker absolute -right-10 z-10 inline-flex h-6 items-center gap-1 rounded-full border border-status-needs-you-border bg-status-needs-you-muted px-1.5 text-xs text-status-needs-you-foreground shadow-sm hover:bg-status-needs-you-border",n.dataset.commentMarginId=t,n.setAttribute("aria-label","".concat(m("textMenuCommentButtonLabel"),": ").concat(e));let r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("viewBox","0 0 24 24"),r.setAttribute("width","12"),r.setAttribute("height","12"),r.setAttribute("fill","none"),r.setAttribute("stroke","currentColor"),r.setAttribute("stroke-width","2");let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d","M21 11.5a8.5 8.5 0 0 1-8.5 8.5H5l-3 2v-8.5A8.5 8.5 0 0 1 10.5 5H12"),r.appendChild(o),n.append(r,document.createTextNode("1")),n.onclick=e=>{e.preventDefault(),e.stopPropagation(),window.dispatchEvent(new CustomEvent("comment-margin-select",{detail:{commentId:t}}))},n})(t,i.text),{side:1,key:"comment-margin-".concat(t)}))}return n}(t),{doc:r}=t;if(!(null==e?void 0:e.hoveredCommentId))return a.EH.create(r,n);let o=e.hoveredCommentId,i=-1,s="",l=!1;return r.descendants((t,e)=>{if(t.isText){for(let n of t.marks)if("comment"===n.type.name&&n.attrs.id===o){s=n.attrs.text||"",l=!!n.attrs.resolved;let r=e+t.nodeSize;r>i&&(i=r)}}}),i>0&&s&&n.push(a.p.widget(i,()=>(function(t,e,n){let r=document.createElement("span");r.className="comment-tooltip",r.contentEditable="false",r.setAttribute("data-tooltip-for",e),r.style.cssText="\n position: absolute;\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n background: var(--popover, #1f2937);\n color: var(--popover-foreground, #f9fafb);\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.4;\n max-width: 240px;\n white-space: pre-wrap;\n word-break: break-word;\n box-shadow: 0 4px 12px rgba(0,0,0,0.15);\n pointer-events: auto;\n z-index: 50;\n opacity: ".concat(n?"0.6":"1",";\n ");let o=document.createElement("span");if(o.textContent=t,r.appendChild(o),!n){let t=document.createElement("button");t.textContent="â ".concat(m("commentPluginResolve")),t.type="button",t.style.cssText="\n display: block;\n margin-top: 4px;\n padding: 2px 6px;\n font-size: 11px;\n border-radius: 3px;\n border: 1px solid rgba(255,255,255,0.2);\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: 0.7;\n ",t.onmouseenter=()=>{t.style.opacity="1"},t.onmouseleave=()=>{t.style.opacity="0.7"},t.onmousedown=t=>{t.preventDefault(),t.stopPropagation()},t.onclick=t=>{t.preventDefault(),t.stopPropagation(),window.dispatchEvent(new CustomEvent("comment-action",{detail:{action:"resolve",commentId:e}}))},r.appendChild(t)}return r})(s,o,l),{side:1,key:"comment-tooltip-".concat(o)})),a.EH.create(r,n)},handleDOMEvents:{click(t,e){var n;let r=e.target;if(!(r instanceof HTMLElement))return!1;let o=null===(n=r.closest(".comment-mark"))||void 0===n?void 0:n.getAttribute("data-comment-id");return o&&window.dispatchEvent(new CustomEvent("comment-text-select",{detail:{commentId:o}})),!1},mouseover(t,e){let n=e.target,r=n.closest(".comment-mark");if(n.closest(".comment-tooltip"),r){let e=r.getAttribute("data-comment-id");if(e){let n=d.getState(t.state);(null==n?void 0:n.hoveredCommentId)!==e&&t.dispatch(t.state.tr.setMeta(d,{hoveredCommentId:e}))}}return!1},mouseout(t,e){let n=e.relatedTarget;if(n&&(n.closest(".comment-mark")||n.closest(".comment-tooltip")))return!1;let r=e.target;if(r.closest(".comment-mark")||r.closest(".comment-tooltip")){let e=d.getState(t.state);(null==e?void 0:e.hoveredCommentId)&&t.dispatch(t.state.tr.setMeta(d,{hoveredCommentId:null}))}return!1}}}})]});function f(t){if(!t||"undefined"==typeof document)return[];let e=document.createElement("div");e.innerHTML=t;let n=[];return e.querySelectorAll("span[data-comment-id]").forEach(t=>{let e=t.getAttribute("data-comment-id"),r=t.getAttribute("data-comment-text");e&&r&&n.push({id:e,text:r,markedText:t.textContent||"",resolved:"true"===t.getAttribute("data-comment-resolved"),createdAt:t.getAttribute("data-comment-created")||new Date().toISOString()})}),n}function g(t){var e;if(!(null==t?void 0:null===(e=t.state)||void 0===e?void 0:e.doc))return[];let n=[],r=new Set;return t.state.doc.descendants((e,o)=>{if(e.isText){for(let a of e.marks)if("comment"===a.type.name&&a.attrs.id&&!r.has(a.attrs.id)){r.add(a.attrs.id);let e="";
1t.state.doc.nodesBetween(o,t.state.doc.content.size,t=>{if(t.isText){if(!t.marks.some(t=>"comment"===t.type.name&&t.attrs.id===a.attrs.id))return!1;e+=t.text}}),n.push({id:a.attrs.id,text:a.attrs.text||"",markedText:e,resolved:!!a.attrs.resolved,createdAt:a.attrs.createdAt||new Date().toISOString()})}}}),n}},14185:function(t,e,n){n.d(e,{_O:function(){return l},cF:function(){return c}});var r=n(83152),o=n(3374);let a={all:["workspaces"],lists:()=>[...a.all,"list"],list:t=>[...a.lists(),{projectId:t}],details:()=>[...a.all,"detail"],detail:t=>[...a.details(),t]};async function i(t){let e=(0,o.createClient)(),{data:n,error:r}=await e.from("workspaces").select("id, project_id, name, description, project_brief, sort_order, created_by, created_at, updated_at").eq("project_id",t).eq("is_system_managed",!1).order("sort_order",{ascending:!0});if(r)throw r;return n||[]}async function s(t){let e=(0,o.createClient)(),{data:n,error:r}=await e.from("workspaces").select("id, project_id, name, description, project_brief, sort_order, created_by, created_at, updated_at").eq("id",t).single();if(r)throw r;return n}function l(t){return(0,r.a)({queryKey:a.list(t||""),queryFn:()=>i(t),staleTime:3e5,gcTime:18e5,enabled:!!t})}function c(t){return(0,r.a)({queryKey:a.detail(t||""),queryFn:()=>s(t),staleTime:3e5,gcTime:18e5,enabled:!!t})}},76034:function(t,e,n){n.d(e,{A3:function(){return a}});var r=n(47200),o=n(7653);function a(t){let[e,n]=(0,o.useState)(null),[a,i]=(0,o.useState)(!1),[s,l]=(0,o.useState)(null),c=(0,o.useCallback)(async()=>{if(!t){n(null);return}i(!0),l(null);try{let e=await fetch("/api/production/folders/".concat(t,"/inherited-context"));if(!e.ok)throw Error("Failed to fetch folder context: ".concat(e.statusText));let r=await e.json();n(r)}catch(t){r.kg.error("Error fetching folder context:",t),l(t instanceof Error?t.message:"Unknown error"),n(null)}finally{i(!1)}},[t]);return(0,o.useEffect)(()=>{c()},[c]),{folderContext:e,loading:a,error:s,refetch:c}}},8586:function(t,e,n){n.d(e,{c:function(){return o}});var r=n(19171);function o(t){return t?(0,r.G)(t):"<p></p>"}},25425:function(t,e,n){function r(t){return"en"===t||"no"===t||"sv"===t}function o(){let t=localStorage.getItem("user-language");return t&&r(t)?t:"en"}function a(t){localStorage.setItem("user-language",t),document.cookie="locale=".concat(t,"; path=/; max-age=").concat(31536e3,"; samesite=lax")}n.d(e,{wX:function(){return a},x:function(){return o},ys:function(){return r}})},45192:function(t,e,n){n.d(e,{e:function(){return s},o:function(){return l}});var r=n(92084);let o=/<(div|p|h[1-6]|article|section|header|footer|nav|main|aside|ul|ol|li|table|thead|tbody|tr|td|th|blockquote|pre|code|form|script|style)[\s>]/,a=[/#{1,6}\s/,/\*\*[^*]+\*\*/,/__[^_]+__/,/\*[^*\n]+\*/,/_[^_\n]+_/,/\[.+\]\(.+\)/,/```/,/^\s*[*-]\s+/m,/^\s*\d+\.\s+/m,/\|.+\|/,/^\s*>+/m,/^[-*]{3,}$/m],i=[/^#/,/^>/,/^[*-]/,/^\s*\d+\./];function s(t){if(o.test(t))return!1;let e=t.trim();return a.some(e=>e.test(t))||i.some(t=>t.test(e))||/\n#{1,6}\s/.test(t)}function l(t){if(!s(t))return t;try{return(0,r.TU)(t,{gfm:!0,breaks:!1,pedantic:!1,async:!1})}catch(e){return t}}},54460:function(t,e,n){n.d(e,{F7:function(){return r},RP:function(){return s},Us:function(){return i},W$:function(){return l}});let r="data-heading-id",o="0123456789ABCDEFGHJKMNPQRSTVWXYZ",a=/^[0-9A-HJKMNP-TV-Z]{26}$/;function i(t){return"string"==typeof t&&a.test(t)}function s(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r="".concat(t,"\0").concat(e.normalize("NFC").replace(/\s+/g," ").trim().toLowerCase(),"\0").concat(n),a=2166136261;for(let t=0;t<r.length;t++)a=Math.imul(a=(a^r.charCodeAt(t))>>>0,16777619)>>>0;let i="",s=a||1;for(;i.length<26;)s^=s<<13,s>>>=0,s^=s>>>17,s^=s<<5,s>>>=0,i+=o[s%32];return i}function l(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),e="",n=t;for(let t=0;t<10;t++)e=o[n%32]+e,n=Math.floor(n/32);let r=new Uint8Array(16);globalThis.crypto.getRandomValues(r);let a="";for(let t of r)a+=o[t%32];return e+a}},19171:function(t,e,n){n.d(e,{G:function(){return d}});var r=n(92084),o=n(54460);let a=new Map("AElig:5i Aacute:5d Acirc:5e Agrave:5c Alpha:pd Aring:5h Atilde:5f Auml:5g Beta:pe Ccedil:5j Chi:pz Dagger:6ch Delta:pg ETH:5s Eacute:5l Ecirc:5m Egrave:5k Epsilon:ph Eta:pj Euml:5n Gamma:pf Iacute:5p Icirc:5q Igrave:5o Iota:pl Iuml:5r Kappa:pm Lambda:pn Mu:po Ntilde:5t Nu:pp OElig:9e Oacute:5v Ocirc:5w Ograve:5u Omega:q1 Omicron:pr Oslash:60 Otilde:5x Ouml:5y Phi:py Pi:ps Prime:6cz Psi:q0 Rho:pt Scaron:9s Sigma:pv THORN:66 Tau:pw Theta:pk Uacute:62 Ucirc:63 Ugrave:61 Upsilon:px Uuml:64 Xi:pq Yacute:65 Yuml:ag Zeta:pi aacute:69 acirc:6a acute:50 aelig:6e agrave:68 alefsym:6k5 alpha:q9 amp:12 and:6qv ang:6qo apos:13 aring:6d asymp:6rs atilde:6b auml:6c bdquo:6ce beta:qa brvbar:4m bull:6ci cap:6qx ccedil:6f cedil:54 cent:4i chi:qv circ:jq clubs:7kz cong:6rp copy:4p crarr:6np cup:6qy curren:4k dArr:6oj dagger:6cg darr:6mr deg:4w delta:qc diams:7l2 divide:6v eacute:6h ecirc:6i egrave:6g empty:6px emsp:6bn ensp:6bm epsilon:qd equiv:6sh eta:qf eth:6o euml:6j euro:6gc exist:6pv fnof:b6 forall:6ps frac12:59 frac14:58 frac34:5a frasl:6dg gamma:qb ge:6sl gt:1q hArr:6ok harr:6ms hearts:7l1 hellip:6cm iacute:6l icirc:6m iexcl:4h igrave:6k image:6j5 infin:6qm int:6qz iota:qh iquest:5b isin:6q0 iuml:6n kappa:qi lArr:6og lambda:qj lang:7vs laquo:4r larr:6mo lceil:6x4 ldquo:6cc le:6sk lfloor:6x6 lowast:6qf loz:7gq lrm:6by lsaquo:6d5 lsquo:6c8 lt:1o macr:4v mdash:6c4 micro:51 middot:53 minus:6qa mu:qk nabla:6pz nbsp:4g ndash:6c3 ne:6sg ni:6q3 not:4s notin:6q1 nsub:6tg ntilde:6p nu:ql oacute:6r ocirc:6s oelig:9f ograve:6q oline:6da omega:qx omicron:qn oplus:6tx or:6qw ordf:4q ordm:56 oslash:6w otilde:6t otimes:6tz ouml:6u para:52 part:6pu permil:6cw perp:6ud phi:qu pi:qo piv:ra plusmn:4x pound:4j prime:6cy prod:6q7 prop:6ql psi:qw quot:y rArr:6oi radic:6qi rang:7vt raquo:57 rarr:6mq rceil:6x5 rdquo:6cd real:6jg reg:4u rfloor:6x7 rho:qp rlm:6bz rsaquo:6d6 rsquo:6c9 sbquo:6ca scaron:9t sdot:6v9 sect:4n shy:4t sigma:qr sigmaf:qq sim:6rg spades:7kw sub:6te sube:6ti sum:6q9 sup:6tf sup1:55 sup2:4y sup3:4z supe:6tj szlig:67 tau:qs there4:6r8 theta:qg thetasym:r5 thinsp:6bt thorn:72 tilde:kc times:5z trade:6jm uArr:6oh uacute:6y uarr:6mp ucirc:6z ugrave:6x uml:4o upsih:r6 upsilon:qt uuml:70 weierp:6jc xi:qm yacute:71 yen:4l yuml:73 zeta:qe zwj:6bx zwnj:6bw".split(" ").map(t=>{let e=t.lastIndexOf(":");return[t.slice(0,e),String.fromCodePoint(parseInt(t.slice(e+1),36))]})),i=t=>void 0!==t&&/\s/.test(t),s=t=>i(t)||"="===t||"/"===t||">"===t;function l(t,e,n){let r=e;for(;r<t.length&&n(t[r]);)r++;return r}var c=n(45192);function d(t){if(!(0,c.e)(t))return t;let e=new r.M2({gfm:!0,breaks:!1,pedantic:!1,async:!1}),n=new Set,d=!1;e.use({renderer:{heading(t){var e;let r=this.parser.parseInline(null!==(e=t.tokens)&&void 0!==e?e:[]),c="<h".concat(t.depth),u="</h".concat(t.depth,">\n"),m=function(t){let e="",n=0;for(;n<t.length;){let r=t[n];if("<"===r){if(t.startsWith("<!--",n)){let e=t.indexOf("-->",n+4);n=e<0?t.length:e+3;continue}if("!"===t[n+1]||"?"===t[n+1])return null;if(void 0!==t[n+1]&&/[a-zA-Z/]/.test(t[n+1])){n=function(t,e){let n=l(t,e+1,t=>!s(t));for(;n<t.length;){let e=l(t,n,t=>i(t)||"/"===t);if(e>=t.length)break;if(">"===t[e])return e+1;n=function(t,e){let n=l(t,e,i);if("="!==t[n])return e;let r=l(t,n+1,i),o=t[r];if('"'!==o&&"'"!==o)return l(t,r,t=>!i(t)&&">"!==t);let a=t.indexOf(o,r+1);return a<0?t.length:a+1}(t,l(t,e,t=>!s(t)))}return t.length}(t,n);continue}e+=r,n+=1;continue}if("&"===r){let r=function(t,e){let n=t.indexOf(";",e+1),r=t[e+1];if("#"===r){var o;let r="x"===t[e+2]||"X"===t[e+2],a=t.slice(e+(r?3:2),n<0?void 0:n);return n<0||!(r?/^[0-9a-fA-F]+$/:/^[0-9]+$/).test(a)?{text:null,end:t.length}:{text:0===(o=parseInt(a,r?16:10))||o>1114111||o>=55296&&o<=57343||o>=128&&o<=159?null:String.fromCodePoint(o),end:n+1}}if(void 0===r||!/[a-zA-Z]/.test(r))return{text:"&",end:e+1};let i=t.slice(e+1,n<0?void 0:n);if(n<0||!/^[a-zA-Z][a-zA-Z0-9]*$/.test(i))return{text:null,end:t.length};let s=a.get(i);return{text:null!=s?s:null,end:n+1}}(t,n);if(null===r.text)return null;e+=r.text,n=r.end;continue}e+=r,n+=1}return e}(r);if(null===m)return d=!0,"".concat(c,">").concat(r).concat(u);let p=0,f=(0,o.RP)(t.depth,m,p);for(;n.has(f);)f=(0,o.RP)(t.depth,m,++p);return n.add(f),"".concat(c," ").concat(o.F7,'="').concat(f,'">').concat(r).concat(u)}}});try{let n=e.parse(t);return d?(0,c.o)(t):n}catch(e){return t}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.