import{b as e,p as t,w as n}from"./ca9c256b9-7brFE8T2.js";import{r as a,k as o,u as i}from"./vendor--leCAzSo.js";const s=(e,t)=>["interviews",e,t];function r(n,a=!0){const{activeOrganization:o,account:i}=e(),r=o?.uuid,l=i?.uuid;return t(`/api/organizations/${r}/interviews/${n}`,{queryKey:s(l||"",n),enabled:Boolean(r&&l&&a&&n),meta:{noToast:!0,silent:!0},retry:!1,retryOnMount:!1,refetchOnMount:!1,staleTime:1/0})}function l(n,a=!0){const{activeOrganization:o,account:i}=e(),s=o?.uuid,r=i?.uuid;return t(`/api/organizations/${s}/interviews/${n}/config`,{enabled:Boolean(s&&r&&a&&n),meta:{noToast:!0,silent:!0},retry:!1,retryOnMount:!1,refetchOnMount:!1,staleTime:1/0})}function c(t,r){const l=function(){const t=i(),{activeOrganization:r,account:l}=e(),c=r?.uuid,u=l?.uuid,p=o(),m=n(e=>`/api/organizations/${c}/interviews/${e.interviewType}`,"POST",{transformVariables:e=>{const{interviewType:t,...n}=e;return n},onSuccess:(e,t)=>{p.setQueryData(s(u||"",t.interviewType),e)},meta:{noToast:!0}});return a.useCallback((e,n)=>m.mutateAsync({interviewType:e,use_conversation:n?.useConversation,locale:t.locale}),[m,t.locale])}(),c=function(){const{activeOrganization:t,account:i}=e(),r=t?.uuid,l=i?.uuid,c=o(),u=n(e=>`/api/organizations/${r}/interviews/${e.interviewType}/status`,"PUT",{transformVariables:e=>{const{interviewType:t,...n}=e;return n},onSuccess:(e,t)=>{c.setQueryData(s(l||"",t.interviewType),e)},meta:{noToast:!0}});return a.useCallback((e,t)=>u.mutateAsync({interviewType:e,status:t}),[u])}(),u=function(){const{activeOrganization:t,account:i}=e(),r=t?.uuid,l=i?.uuid,c=o(),u=n(e=>`/api/organizations/${r}/interviews/${e.interviewType}`,"DELETE",{onSuccess:(e,t)=>{c.removeQueries({queryKey:s(l||"",t.interviewType)})},meta:{noToast:!0}});return a.useCallback(e=>u.mutateAsync({interviewType:e}),[u])}();return{startInterview:a.useCallback(async e=>l(t,{sessionId:e,useConversation:r?.useConversation}),[l,t,r?.useConversation]),dismissInterview:a.useCallback(async()=>c(t,"dismissed"),[c,t]),completeInterview:a.useCallback(async()=>c(t,"completed"),[c,t]),deleteInterview:a.useCallback(async()=>u(t),[u,t])}}function u(){const{activeOrganization:t,account:i}=e(),r=t?.uuid,l=i?.uuid,c=o(),u=n(e=>`/api/organizations/${r}/interviews/${e.interviewType}/followup_consents`,"PUT",{transformVariables:e=>{const{interviewType:t,...n}=e;return n},onSuccess:(e,t)=>{c.setQueryData(s(l||"",t.interviewType),e)},meta:{noToast:!0}});return{submitFollowupConsents:a.useCallback((e,t)=>u.mutateAsync({interviewType:e,answers:t}),[u]),isSubmitting:u.isPending,error:u.error,reset:u.reset}}function p(){const{activeOrganization:t,account:i}=e(),r=t?.uuid,l=i?.uuid,c=o(),u=n(e=>`/api/organizations/${r}/interviews/${e.interviewType}/compensation`,"PUT",{transformVariables:e=>{const{interviewType:t,...n}=e;return n},onSuccess:(e,t)=>{c.setQueryData(s(l||"",t.interviewType),e)},meta:{noToast:!0}});return{claimCompensation:a.useCallback((e,t,n)=>u.mutateAsync({interviewType:e,email:t,first_name:n}),[u]),isSubmitting:u.isPending,error:u.error}}
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/const m=Object.freeze(Object.defineProperty({__proto__:null,conf:{comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},language:{defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],blockText:[[/^\s+.*$/,{cases:{"($S2\\s+.*$)":{token:"$S3"},"@default":{token:"@rematch",next:"@popall"}}}],[/./,{token:"@rematch",next:"@popall"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]],string:[[/[^\\"'#]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,{cases:{"@eos":{token:"string.escape",next:"@popall"},"@default":"string.escape"}}],[/\\./,{cases:{"@eos":{token:"string.escape.invalid",next:"@popall"},"@default":"string.escape.invalid"}}],[/(#{)([^}]*)(})/,["interpolation.delimiter","interpolation","interpolation.delimiter"]],[/#/,"string"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":{token:"string"}}}]],value:[[/[^\\"']+/,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/\\./,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/["']/,{cases:{"$#==$S2":{token:"attribute.value",next:"@pop"},"@default":{token:"attribute.value"}}}]]}}},Symbol.toStringTag,{value:"Module"}));export{l as a,c as b,p as c,u as d,m as p,r as u};
