PageSourceSearch

https://help.jpegmini.com/_next/static/chunks/6410-f675a449cc7eade0.js

js jpegmini.com collected 2026-09-24 15:16:41 UTC 40,613 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5c407c1f-3f85-4e7c-a355-5d2d35cc944a",e._sentryDebugIdIdentifier="sentry-dbid-5c407c1f-3f85-4e7c-a355-5d2d35cc944a")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6410],{16902:function(e,t,n){n.d(t,{W:function(){return p}});var i=n(57437),l=n(75060),o=n(40279),s=n(15291),c=n(26748),a=n(32489),r=n(30401),d=n(12381),u=n(2265),m=n(62170),f=n(33145);let p=e=>{let{selectedIntegration:t,importType:n,onImportTypeChange:p,token:h,onTokenChange:v,domain:x,onDomainChange:g,email:k,onEmailChange:y,websiteId:j,onWebsiteIdChange:N,tokenIdentifier:b,onTokenIdentifierChange:w,isVerified:I,setIsVerified:C,isCrispConnected:A,isExport:T,workspaceId:D}=e,[E,S]=(0,u.useState)(!1),[_,P]=(0,u.useState)(null),{mutateAsync:M}=m.hi.crisp.verifyApiKey.useMutation(),{mutateAsync:z}=m.hi.zendesk.verifyApiKey.useMutation(),{mutateAsync:L}=m.hi.intercom.verifyApiKey.useMutation(),{mutateAsync:B}=m.hi.notion.verifyApiKey.useMutation(),{mutateAsync:F}=m.hi.confluence.verifyApiKey.useMutation(),{mutateAsync:U}=m.hi.groove.verifyGrooveToken.useMutation();(0,u.useEffect)(()=>{"crisp"===t||"zendesk"===t?p("token"):p("oauth")},[]),(0,u.useEffect)(()=>{C(!1),P(null)},[h,x,k,j,b]);let O=(e,t)=>!!e&&("confluence"===t?/^[a-zA-Z0-9-]+\.atlassian\.net$/i.test(e):"zendesk"!==t||(console.log("domain",e),/^[a-zA-Z0-9-]+$/i.test(e))),H=async()=>{S(!0),P(null);try{let e;if("confluence"===t&&x){if(!O(x,"confluence")){P("Invalid Confluence domain format. Expected: SUBDOMAIN.ATLASSIAN.NET"),S(!1);return}}else if("zendesk"===t&&x&&!O(x,"zendesk")){P("Invalid Zendesk domain format. Expected: SUBDOMAIN (without .zendesk.com)"),S(!1);return}if("crisp"===t)e=await M({workspaceId:D,apiToken:h});else if("intercom"===t)e=await L({workspaceId:D,apiToken:h});else if("confluence"===t)e=await F({workspaceId:D,apiToken:"".concat(k,":").concat(h),domain:x});else if("notion"===t)e=await B({workspaceId:D,apiToken:h});else if("zendesk"===t)e=await z({workspaceId:D,apiToken:h,domain:x,userEmail:k});else if("groove"===t)e=await U({workspaceId:D,token:h,domain:x});else{P("API key connect not implemented for this integration"),S(!1);return}e.valid?C(!0):P("Token not verified")}catch(e){P("Token not verified")}finally{S(!1)}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)(l._,{children:"How would you like to import?"}),(0,i.jsxs)(s.Ph,{onValueChange:p,value:n,children:[(0,i.jsx)(s.i4,{children:(0,i.jsx)(s.ki,{placeholder:"Select connection method"})}),(0,i.jsxs)(s.Bw,{children:[["google-docs","confluence","notion","intercom"].includes(null!=t?t:"")&&(0,i.jsx)(s.Ql,{value:"oauth",children:"OAuth"}),["intercom","zendesk","notion","confluence","crisp"].includes(null!=t?t:"")&&(0,i.jsx)(s.Ql,{value:"token",children:"API Key"}),!T&&["crisp"].includes(null!=t?t:"")&&(0,i.jsx)(s.Ql,{value:"file",children:"File Upload"})]})]})]}),"oauth"===n?(0,i.jsx)("div",{className:"flex flex-col gap-4",children:(0,i.jsxs)(l._,{className:"flex items-start gap-2 rounded-lg border bg-accent/50 px-3 py-2 ",children:[(0,i.jsx)(c.Z,{className:"h-4 w-4"}),(0,i.jsx)("p",{className:"text-xs text-foreground",children:"Your OAuth credentials will be saved under Integrations for future use."})]})}):"token"===n?(0,i.jsx)(i.Fragment,{children:"crisp"!==t||A?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:"flex flex-col text-muted-foreground",children:[(0,i.jsx)(l._,{className:"text-sm font-medium text-primary",children:"API Key"}),(0,i.jsxs)("span",{className:"text-sm text-muted-foreground",children:["Copy your API Key from the API Page of your"," ",t," account to paste it below. Want to know how? Learn more here."]})]}),(()=>{if(!t)return null;switch(t){case"confluence":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.I,{className:"w-full border p-2",placeholder:"Confluence Email",value:k,onChange:e=>y(e.target.value.trim())}),(0,i.jsx)(o.I,{className:"w-full border p-2",placeholder:"SUBDOMAIN.ATLASSIAN.NET",value:x,onChange:e=>g(e.target.value.trim())})]});case"zendesk":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.I,{className:"w-full border p-2",placeholder:"Zendesk Email",value:k,onChange:e=>y(e.target.value.trim())}),(0,i.jsx)(o.I,{className:"w-full border p-2",placeholder:"SUBDOMAIN",value:x,onChange:e=>g(e.target.value.trim())})]});case"groove":return(0,i.jsx)(o.I,{className:"w-full border p-2",placeholder:"Groove Domain",value:x,onChange:e=>g(e.target.value.trim())});default:return null}})(),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(o.I,{placeholder:"".concat(t,"-").concat("crisp"===t?"website_id":"api_key","_xxxxxxxxxxxxxxxxxxxxx"),value:h,onChange:e=>{v(e.target.value.trim())},disabled:E}),(0,i.jsx)(d.z,{onClick:H,disabled:E||!h||I,children:E?"Verifying...":"
1Verify"})]}),_&&(0,i.jsxs)("span",{className:"flex items-center gap-2 text-xs text-red-600",children:[(0,i.jsx)(a.Z,{className:"h-4 w-4"}),_]}),I&&(0,i.jsxs)("span",{className:"flex items-center gap-2 text-xs text-green-600",children:[(0,i.jsx)(r.Z,{className:"h-4 w-4"}),"API Verified Successfully"]})]}),!_&&!I&&(0,i.jsxs)(l._,{className:"flex items-start gap-2 rounded-lg border bg-accent/50 px-3 py-2 ",children:[(0,i.jsx)(c.Z,{className:"h-4 w-4"}),(0,i.jsx)("p",{className:"text-xs text-foreground",children:"Your API token will be saved under Integrations for future use."})]})]}):(0,i.jsxs)("div",{className:"flex gap-4 p-3",children:[(0,i.jsx)(f.default,{src:"/crisp-app-connection.png",alt:"Crisp App Connection",width:213,height:284}),(0,i.jsxs)("div",{className:"flex h-[213px] w-[284px] flex-col justify-center gap-1",children:[(0,i.jsx)("p",{className:"text-sm font-medium text-primary",children:"Connect InstantDocs App"}),(0,i.jsxs)("ol",{className:"list-decimal pl-4",children:[(0,i.jsxs)("li",{className:"text-sm text-muted-foreground",children:["Click this"," ",(0,i.jsx)("a",{href:"https://app.crisp.chat/initiate/plugin/b7efabb8-8d64-444d-8f02-b83e719da279/",target:"_blank",className:"underline underline-offset-1",children:"link"}),"."]}),(0,i.jsx)("li",{className:"text-sm text-muted-foreground",children:"Connect the InstantDocs app with your Crisp workspace"}),(0,i.jsx)("li",{className:"text-sm text-muted-foreground",children:"Once connected, return to this screen"}),(0,i.jsx)("li",{className:"text-sm text-muted-foreground",children:"Click ‘next’ and continue with the process."})]}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Need more help?"," ",(0,i.jsx)("a",{href:"https://docs.getdocs.ai/docs/importing-data/confluence",target:"_blank",className:"underline underline-offset-1",children:"Learn more here."})]}),(0,i.jsx)("p",{className:"text-sm text-muted-foreground",children:"Ignore this step if already connected."})]})]})}):"file"===n?(0,i.jsxs)("div",{className:"flex gap-4 p-3",children:[(0,i.jsx)("div",{className:"h-[213px] w-[284px] rounded-md bg-muted"}),(0,i.jsxs)("div",{className:"flex h-[213px] w-[284px] flex-col justify-center gap-1",children:[(0,i.jsx)("p",{className:"text-sm font-medium text-primary",children:"How to prepare files for import?"}),(0,i.jsxs)("ol",{className:"list-decimal pl-4",children:[(0,i.jsx)("li",{className:"text-sm text-muted-foreground",children:"Open crips Knowledge Base."}),(0,i.jsxs)("li",{className:"text-sm text-muted-foreground",children:["Go to ",(0,i.jsx)("b",{children:"Actions"})," > ",(0,i.jsx)("b",{children:"Export Articles"}),"."]}),(0,i.jsxs)("li",{className:"text-sm text-muted-foreground",children:["Click on ",(0,i.jsx)("b",{children:"Export"})," to Export Articles button."]}),(0,i.jsx)("li",{className:"text-sm text-muted-foreground",children:"You will receive a zip file with the exported articles on your email."}),(0,i.jsx)("li",{className:"text-sm text-muted-foreground",children:"Unzip the file and you will see a csv file with the exported articles."})]}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Need more help?"," ",(0,i.jsx)("a",{href:"https://docs.getdocs.ai/docs/importing-data/confluence",target:"_blank",className:"underline underline-offset-1",children:"Learn more here."})]})]})]}):null]})}},13344:function(e,t,n){n.d(t,{E:function(){return s}});var i=n(57437),l=n(33145),o=n(94024);let s=e=>{let{selectedIntegration:t,onIntegrationSelect:n,showGroove:s,isKnowledgeGap:c}=e,a=o.Du.filter(e=>"front"!==e.name&&"missive"!==e.name&&"freshDesk"!==e.name&&(c?"groove"===e.name:!!s||"groove"!==e.name));return(0,i.jsx)("div",{className:"mt-2 grid w-[608px] grid-cols-2 gap-2",children:a.map(e=>(0,i.jsxs)("button",{className:"flex h-[54px] items-center gap-1 rounded-lg border p-2 ".concat(t===e.name?"border-2 border-card-foreground":""),onClick:()=>n(e.name),children:[(0,i.jsx)(l.default,{src:e.icon,alt:e.name,width:32,height:32}),(0,i.jsxs)("div",{className:"flex flex-col items-start",children:[(0,i.jsx)("span",{className:"text-start text-xs capitalize",children:e.name.replace("-"," ")}),(0,i.jsx)("span",{className:"text-start text-xs capitalize",children:e.description})]})]},e.name))})}},55341:function(e,t,n){n.d(t,{j:function(){return u}});var i=n(57437),l=n(68245),o=n(22549),s=n(71488),c=n(17689),a=n(2265),r
1=n(15452),d=n.n(r);let u=e=>{var t;let{selectedIntegration:n,data:r,onCsvDataChange:u,selectedItems:m,onSelectedItemsChange:f,expandedCategories:p,onExpandedCategoriesChange:h,onDataChange:v}=e,x=(0,a.useRef)(null),[g,k]=(0,a.useState)(!1),y=(e,t)=>(0,i.jsxs)(s.u,{children:[(0,i.jsx)(s.aJ,{asChild:!0,children:e}),(0,i.jsx)(s._v,{children:(0,i.jsx)("p",{children:t})})]}),j=(e,t)=>{let n={...m},i="".concat(t,"s");n[i]&&Array.isArray(n[i])||(n[i]=[]),n[i].includes(e)?n[i]=n[i].filter(t=>t!==e):n[i].push(e),f(n)},N=(0,a.useCallback)(e=>{let t=d().parse(e,{header:!0,skipEmptyLines:!0,transformHeader:e=>e.trim().replace(/^"|"$/g,"")}),n=t.data.filter(e=>!!(e.id&&e.title)).map(e=>{var t,n;return{id:e.id,name:null!==(n=null!==(t=e.title)&&void 0!==t?t:e.slug)&&void 0!==n?n:"Article ".concat(e.id)}});return u(t.data),{articles:n,collections:[],sections:[]}},[u]),b=(0,a.useCallback)(e=>{if(console.log(e),(!e||"text/csv"!==e.type)&&!e.name.endsWith(".csv")){console.error("Please upload a CSV file");return}let t=new FileReader;t.onload=e=>{var t;let i=null===(t=e.target)||void 0===t?void 0:t.result;if(i&&"crisp"===n)try{let e=N(i);console.log(e),null==v||v(e)}catch(e){console.error("Error parsing CSV:",e)}},t.readAsText(e)},[n,N,v]),w=(0,a.useCallback)(e=>{e.preventDefault(),k(!1);let t=e.dataTransfer.files[0];t&&b(t)},[b]),I=(0,a.useCallback)(e=>{e.preventDefault(),k(!0)},[]),C=(0,a.useCallback)(e=>{e.preventDefault(),k(!1)},[]),A=(0,a.useCallback)(e=>{var t;let n=null===(t=e.target.files)||void 0===t?void 0:t[0];n&&b(n)},[b]),T=(0,a.useCallback)(()=>{var e;null===(e=x.current)||void 0===e||e.click()},[]);return r?(0,i.jsx)(s.pn,{children:"crisp"===n?(null==r?void 0:r.collections)||(null==r?void 0:r.sections)||(null==r?void 0:r.articles)?(0,i.jsx)("div",{className:"flex flex-col gap-2",children:(0,i.jsxs)("div",{className:"flex flex-col rounded-lg border",children:[(0,i.jsxs)("div",{className:"flex !h-10 items-center gap-4 px-4",children:[y((0,i.jsx)(l.X,{checked:(()=>{var e,t;let n=null===(t=null===(e=r.sections)||void 0===e?void 0:e.every(e=>m.sections.includes(e.id)))||void 0===t||t,i=(()=>{var e,t,n,i;let l=null===(n=null===(e=r.collections)||void 0===e?void 0:e.every(e=>m.collections.includes(e.id)))||void 0===n||n,o=null===(i=null===(t=r.sections)||void 0===t?void 0:t.every(e=>{var t,n;return null===(n=null===(t=e.collections)||void 0===t?void 0:t.every(e=>m.collections.includes(e.id)))||void 0===n||n}))||void 0===i||i;return l&&o})(),l=(()=>{var e,t,n,i;let l=null===(n=null===(e=r.articles)||void 0===e?void 0:e.every(e=>m.articles.includes(e.id)))||void 0===n||n,o=(()=>{var e,t,n,i;let l=null===(n=null===(e=r.collections)||void 0===e?void 0:e.every(e=>{var t,n;return null===(n=null===(t=e.articles)||void 0===t?void 0:t.every(e=>m.articles.includes(e.id)))||void 0===n||n}))||void 0===n||n,o=null===(i=null===(t=r.sections)||void 0===t?void 0:t.every(e=>{var t,n;return null===(n=null===(t=e.collections)||void 0===t?void 0:t.every(e=>{var t,n;return null===(n=null===(t=e.articles)||void 0===t?void 0:t.every(e=>m.articles.includes(e.id)))||void 0===n||n}))||void 0===n||n}))||void 0===i||i;return l&&o})(),s=null===(i=null===(t=r.sections)||void 0===t?void 0:t.every(e=>{var t,n;return null===(n=null===(t=e.articles)||void 0===t?void 0:t.every(e=>m.articles.includes(e.id)))||void 0===n||n}))||void 0===i||i;return l&&o&&s})();return n&&i&&l})(),onCheckedChange:e=>{let t={...m};e?(r.sections&&r.sections.forEach(e=>{var n,i;t.sections.includes(e.id)||t.sections.push(e.id),null===(n=e.collections)||void 0===n||n.forEach(e=>{var n;t.collections.includes(e.id)||t.collections.push(e.id),null===(n=e.articles)||void 0===n||n.forEach(e=>{t.articles.includes(e.id)||t.articles.push(e.id)})}),null===(i=e.articles)||void 0===i||i.forEach(e=>{t.articles.includes(e.id)||t.articles.push(e.id)})}),r.collections&&r.collections.forEach(e=>{var n;t.collections.includes(e.id)||t.collections.push(e.id),null===(n=e.articles)||void 0===n||n.forEach(e=>{t.articles.includes(e.id)||t.articles.push(e.id)})}),r.articles&&r.articles.forEach(e=>{t.articles.includes(e.id)||t.articles.push(e.id)}
1)):(r.sections&&r.sections.forEach(e=>{var n,i;t.sections=t.sections.filter(t=>t!==e.id),null===(n=e.collections)||void 0===n||n.forEach(e=>{var n;t.collections=t.collections.filter(t=>t!==e.id),null===(n=e.articles)||void 0===n||n.forEach(e=>{t.articles=t.articles.filter(t=>t!==e.id)})}),null===(i=e.articles)||void 0===i||i.forEach(e=>{t.articles=t.articles.filter(t=>t!==e.id)})}),r.collections&&r.collections.forEach(e=>{var n;t.collections=t.collections.filter(t=>t!==e.id),null===(n=e.articles)||void 0===n||n.forEach(e=>{t.articles=t.articles.filter(t=>t!==e.id)})}),r.articles&&r.articles.forEach(e=>{t.articles=t.articles.filter(t=>t!==e.id)})),f(t)}}),"Select All"),(0,i.jsx)("span",{className:"text-sm font-medium text-muted-foreground",children:"Select All"})]}),(0,i.jsxs)("div",{className:"flex max-h-[400px] flex-col overflow-y-auto rounded-lg",children:[(0,i.jsxs)(o.UQ,{type:"multiple",className:"w-full",value:p,onValueChange:h,children:[null===(t=r.sections)||void 0===t?void 0:t.map(e=>(0,i.jsxs)(o.Qd,{value:"section-".concat(e.id),className:"border-b-0 p-0",children:[(0,i.jsx)(o.o4,{className:"flex h-14 w-full items-center border-t px-4 py-0 hover:no-underline",children:(0,i.jsxs)("div",{className:"flex items-center gap-4",children:[y((0,i.jsx)(l.X,{checked:m.sections.includes(e.id),onCheckedChange:t=>{var n,i;let l={...m};t?(l.sections.includes(e.id)||l.sections.push(e.id),null===(n=e.collections)||void 0===n||n.forEach(e=>{var t;l.collections.includes(e.id)||l.collections.push(e.id),null===(t=e.articles)||void 0===t||t.forEach(e=>{l.articles.includes(e.id)||l.articles.push(e.id)})})):(l.sections=l.sections.filter(t=>t!==e.id),null===(i=e.collections)||void 0===i||i.forEach(e=>{var t;l.collections=l.collections.filter(t=>t!==e.id),null===(t=e.articles)||void 0===t||t.forEach(e=>{l.articles=l.articles.filter(t=>t!==e.id)})})),f(l)}}),"Section"),(0,i.jsx)("span",{children:e.name})]})}),(0,i.jsxs)(o.vF,{className:"py-0",children:[e.collections&&e.collections.length>0&&(0,i.jsx)(o.UQ,{type:"multiple",className:"w-full",children:e.collections.map(e=>(0,i.jsxs)(o.Qd,{value:"collection-".concat(e.id),className:"border-b-0 p-0",children:[(0,i.jsx)(o.o4,{className:"flex h-14 w-full items-center border-t px-4 py-0 hover:no-underline",children:(0,i.jsxs)("div",{className:"flex items-center gap-4 pl-10",children:[y((0,i.jsx)(l.X,{checked:m.collections.includes(e.id),onCheckedChange:t=>{var n,i;let l={...m};t?(l.collections.includes(e.id)||l.collections.push(e.id),null===(n=e.articles)||void 0===n||n.forEach(e=>{l.articles.includes(e.id)||l.articles.push(e.id)})):(l.collections=l.collections.filter(t=>t!==e.id),null===(i=e.articles)||void 0===i||i.forEach(e=>{l.articles=l.articles.filter(t=>t!==e.id)})),f(l)}}),"Collection"),(0,i.jsx)("span",{children:e.name})]})}),(0,i.jsx)(o.vF,{className:"py-0",children:e.articles&&e.articles.length>0&&(0,i.jsx)("div",{className:"flex flex-col",children:e.articles.map(e=>(0,i.jsx)("div",{className:"flex h-14 w-full items-center border-t px-4 py-0",children:(0,i.jsxs)("div",{className:"flex items-center gap-4 pl-[72px]",children:[y((0,i.jsx)(l.X,{checked:m.articles.includes(e.id),onCheckedChange:()=>{j(e.id,"article")}}),"Article"),(0,i.jsx)("span",{className:"text-sm text-muted-foreground",children:e.name})]})},e.id))})})]},e.id))}),e.articles&&e.articles.length>0&&(0,i.jsx)("div",{className:"flex flex-col",children:e.articles.map(e=>(0,i.jsx)("div",{className:"flex h-14 w-full items-center border-t px-4 py-0",children:(0,i.jsxs)("div",{className:"flex items-center gap-4 pl-10",children:[y((0,i.jsx)(l.X,{checked:m.articles.includes(e.id),onCheckedChange:()=>{j(e.id,"article")}}),"Article"),(0,i.jsx)("span",{className:"text-sm text-muted-foreground",children:e.name})]})},e.id))})]})]},e.id)),r.collections&&r.collections.length>0&&(0,i.jsxs)(o.Qd,{value:"collections",className:"border-b-0 p-0",children:[(0,i.jsx)(o.o4,{className:"flex h-14 w-full items-center border-t px-4 py-0 hover:no-underline",children:(0,i.jsxs)("div",{className:"flex items-center gap-4",children:[y((0,i.jsx)(l.X,{checked:r.collections.every(e=>m.collections.includes(String(e.id))),onCheckedChange:e=>{var t,n;let i=null!==(n=null===(t=r.collections)||void 0===t?void 0:t.map(e=>String(e.id)))&&void 0!==n?n:[],l={...m};e?l.collections=[...new Set([...l.collections,...i])]:l.collections=l.collections.filter(e=>!i.includes(String(e))),f(l)}}),"Collections"),(0,i.jsx)("span",{children:"Collections"})]})}),(0,i.jsx)(o.vF,{className:"py-0",children:(0,i.jsx)("div",{className:"flex flex-col",children:r.collections.map(e=>(0,i.jsx)("div",{className:"flex h-14 w-full items-center border-t px-4 py-0",children:(0,i.jsxs)("div",{className:"flex items-center gap-4 pl-10",children:[y((0,i.jsx)(l.X,{checked:m.collections.includes(String(e.id)),onCheckedChange:()=>{j(e.id,"collection")}}),"Collection"),(0,i.jsx)("span",{children:e.name})]})},e.id))})})]})]}),r.articles&&r.articles.length>0&&(0,i.jsx)("div",{className:"flex flex-col",children:r.articles.map(e=>(0,i.jsx)("div",{className:"flex h-14 w-full items-center border-t px-4 py-0",children:(0,i.jsxs)("div",{className:"flex items-center gap-4",children:[y((0,i.jsx)(l.X,{checked:m.articles.includes(e.id),onCheckedChange:t=>{let n={...m};t?n.articles.includes(e.id)||n.articles.push(e.id):n.articles=n.articles.filter(t=>t!==e.id),f(n)}}),"Article"),(0,i.jsx)("span",{className:"text-sm text-muted-foreground",children:e.name})]})},e.id))})]})]})}):null:(0,i.jsx)(i.Fragment,{})}):(0,i.jsxs)("div",{className:"flex flex-col gap-4 text-sm text-muted-foreground ",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsx)("p",{className:"text-sm font-medium text-primary",children:"Upload your Files"}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Upload the files exported from"," ",null==n?void 0:n.split("-").join(" "),"."]})]}),(0,i.jsxs)("div",{className:"flex w-full cursor-pointer flex-col items-center justify-center gap-2 rounded-md border border-dashed border-muted-foreground p-8 transition-colors ".concat(g?"border-primary bg-muted/50":""),onDrop:w,onDragOver:I,onDragLeave:C,onClick:T,children:[(0,i.jsx)("input",{ref:x,type:"file",accept:".csv",onChange:A,className:"hidden"}),(0,i.jsx)(c.Z,{className:"h-4 w-4 shrink-0 text-muted-foreground "}),(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,i.jsxs)("p",{children:["Drop your files here or"," ",(0,i.jsx)("span",{className:"font-medium text-primary underline underline-offset-2",children:"click to upload"})]}),(0,i.jsx)("p",{children:"Upload csv"})]})]})]})}},22549:function(e,t,n){n.d(t,{Qd:function(){return r},UQ:function(){return a},o4:function(){return d},vF:function(){return u}});var i=n(57437),l=n(2265),o=n(47307),s=n(40875),c=n(93448);let a=o.fC,r=l.forwardRef((e,t)=>
1{let{className:n,...l}=e;return(0,i.jsx)(o.ck,{ref:t,className:(0,c.cn)("border-b",n),...l})});r.displayName="AccordionItem";let d=l.forwardRef((e,t)=>{let{className:n,children:l,hideIcon:a=!1,...r}=e;return(0,i.jsx)(o.h4,{className:"flex",children:(0,i.jsxs)(o.xz,{ref:t,className:(0,c.cn)("flex flex-1 items-center justify-between py-4 text-left text-sm font-medium transition-all hover:underline",!a&&"[&[data-state=open]>svg]:rotate-180",n),...r,children:[l,!a&&(0,i.jsx)(s.Z,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})})});d.displayName=o.xz.displayName;let u=l.forwardRef((e,t)=>{let{className:n,children:l,...s}=e;return(0,i.jsx)(o.VY,{ref:t,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...s,children:(0,i.jsx)("div",{className:(0,c.cn)("pb-4 pt-0",n),children:l})})});u.displayName=o.VY.displayName},68245:function(e,t,n){n.d(t,{X:function(){return a}});var i=n(57437),l=n(2265),o=n(9270),s=n(30401),c=n(93448);let a=l.forwardRef((e,t)=>{let{className:n,...l}=e;return(0,i.jsx)(o.fC,{ref:t,className:(0,c.cn)("peer h-4 w-4 shrink-0 rounded-[2px] border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",n),...l,children:(0,i.jsx)(o.z$,{className:(0,c.cn)("flex items-center justify-center text-current"),children:(0,i.jsx)(s.Z,{className:"h-4 w-4"})})})});a.displayName=o.fC.displayName},94589:function(e,t,n){n.d(t,{r:function(){return c}});var i=n(57437),l=n(2265),o=n(50721),s=n(93448);let c=l.forwardRef((e,t)=>{let{className:n,...l}=e;return(0,i.jsx)(o.fC,{className:(0,s.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n),...l,ref:t,children:(0,i.jsx)(o.bU,{className:(0,s.cn)("pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-black")})})});c.displayName=o.fC.displayName},94024:function(e,t,n){n.d(t,{B3:function(){return l},Du:function(){return i},o_:function(){return o}});let i=[{name:"intercom",description:"Import and sync from Help Center.",icon:"/intercom.png"},{name:"google-docs",description:"Move your docs from Google Workspace.",icon:"/google-docs.png"},{name:"confluence",description:"Transfer your team's documentation.",icon:"/confluence.png"},{name:"crisp",description:"Import documents from Crisp Helpdesk.",icon:"/crisp.png"},{name:"notion",description:"Push your document to support portal",icon:"/notion.png"},{name:"zendesk",description:"Import from Zendesk Help Center",icon:"/zendesk.png"},{name:"groove",description:"Import from Groove",icon:"/groove.png"},{name:"front",description:"Import from Front",icon:"/front.avif"},{name:"missive",description:"Import from Missive",icon:"/missive.png"},{name:"freshDesk",description:"Import from FreshDesk",icon:"/freshdesk.png"}],l=(e,t,n)=>{var i,l,o,s,c,a,r,d,u,m,f,p,h,v,x,g,k,y,j,N,b,w,I,C,A,T;if(!e)return n;switch(t){case"intercom":return{token:null!==(o=null===(i=e.intercom)||void 0===i?void 0:i.apiToken)&&void 0!==o?o:n.token,accessToken:null!==(s=null===(l=e.intercom)||void 0===l?void 0:l.accessToken)&&void 0!==s?s:"",domain:n.domain,email:n.email,websiteId:n.websiteId,tokenIdentifier:n.tokenIdentifier};case"google-docs":return{token:null!==(a=null===(c=e.googleDocs)||void 0===c?void 0:c.accessToken)&&void 0!==a?a:n.token,domain:n.domain,email:n.email,websiteId:n.websiteId,tokenIdentifier:n.tokenIdentifier};case"confluence":return{token:(null===(r=e.confluence)||void 0===r?void 0:r.apiToken)?"".concat(n.email,":").concat(null===(d=e.confluence)||void 0===d?void 0:d.apiToken):"",accessToken:null!==(f=null===(u=e.confluence)||void 0===u?void 0:u.accessToken)&&void 0!==f?f:"",domain:null!==(p=null===(m=e.confluence)||void 0===m?void 0:m.domain)&&void 0!==p?p:""};case"crisp":return{token:null!==(g=null===(h=e.crisp)||void 0===h?void 0:h.apiToken)&&void 0!==g?g:n.token,email:n.email,websiteId:null!==(k=null===(v=e.crisp)||void 0===v?void 0:v.websiteId)&&void 0!==k?k:n.websiteId,tokenIdentifier:null!==(y=null===(x=e.crisp)||void 0===x?void 0:x.tokenIdentifier)&&void 0!==y?y:n.tokenIdentifier};case"notion":return{token:null!==(N=null===(j=e.notion)||void 0===j?void 0:j.apiToken)&&void 0!==N?N:n.token,domain:n.domain,email:n.email,websiteId:n.websiteId,tokenIdentifier:n.tokenIdentifier};case"zendesk":return{token:null!==(C=null===(b=e.zendesk)||void 0===b?void 0:b.apiToken)&&void 0!==C?C:n.token,domain:null!==(A=null===(w=e.zendesk)||void 0===w?void 0:w.domain)&&void 0!==A?A:n.domain,email:null!==(T=null===(I=e.zendesk)||void 0===I?void 0:I.userEmail)&&void 0!==T?T:n.email,websiteId:n.websiteId,tokenIdentifier:n.tokenIdentifier};default:return n}},o=(e,t)=>{var n,i,l,o,s,c,a,r,d,u,m,f;if(!e)return!1;switch(t){case"intercom":return!!(null===(n=e.intercom)||void 0===n?void 0:n.accessToken)||!!(null===(i=e.intercom)||void 0===i?void 0:i.apiToken);case"google-docs":return!!(null===(l=e.googleDocs)||void 0===l?void 0:l.accessToken)||!!(null===(o=e.googleDocs)||void 0===o?void 0:o.apiToken);case"confluence":return!!(null===(s=e.confluence)||void 0===s?void 0:s.accessToken)||!!(null===(c=e.confluence)||void 0===c?void 0:c.apiToken);case"crisp":return!!(null===(a=e.crisp)||void 0===a?void 0:a.accessToken)||!!(null===(r=e.crisp)||void 0===r?void 0:r.apiToken);case"notion":return!!(null===(d=e.notion)||void 0===d?void 0:d.accessToken)||!!(null===(u=e.notion)||void 0===u?void 0:u.apiToken);case"zendesk":return!!(null===(m=e.zendesk)||void 0===m?void 0:m.accessToken)||!!(null===(f=e.zendesk)||void 0===f?void 0:f.a
1piToken);default:return!1}}},75832:function(e,t,n){n.d(t,{R:function(){return o}});var i=n(67491),l=n(7038);let o=e=>{let t=(0,l.$)(),n=encodeURIComponent(JSON.stringify({integration:e,source:"popup"})),o=encodeURIComponent("".concat(t,"/oauth/connect")),s=encodeURIComponent("".concat(t,"/oauth/connect-intercom"));switch(e){case"google-docs":return"https://accounts.google.com/o/oauth2/auth?client_id="+i.O.NEXT_PUBLIC_GOOGLE_DOCS_CLIENT_ID+"&redirect_uri="+o+"&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdocuments&response_type=code&access_type=offline&prompt=consent&state="+n;case"notion":return"https://api.notion.com/v1/oauth/authorize?client_id="+i.O.NEXT_PUBLIC_NOTION_CLIENT_ID+"&response_type=code&owner=user&redirect_uri="+o+"&scope=offline_access&state="+n+"&prompt=consent";case"confluence":return"https://auth.atlassian.com/authorize?audience=api.atlassian.com&client_id="+i.O.NEXT_PUBLIC_CONFLUENCE_CLIENT_ID+"&scope="+encodeURIComponent("offline_access read:space:confluence read:page:confluence write:page:confluence read:content:confluence read:content-details:confluence read:attachment:confluence")+"&redirect_uri="+o+"&state="+n+"&response_type=code&prompt=consent";case"intercom":return"https://app.intercom.com/oauth?client_id="+i.O.NEXT_PUBLIC_INTERCOM_CLIENT_ID+"&redirect_uri="+s+"&response_type=code&prompt=consent&state="+n;default:return""}}},64720:function(e,t,n){n.d(t,{k:function(){return a}});var i=n(62170),l=n(14438),o=n(99376),s=n(94024),c=n(92137);let a=()=>{var e;let t=i.hi.useContext(),n=(0,o.useRouter)(),a=(0,o.useSearchParams)(),r=null!==(e=null==a?void 0:a.get("locale"))&&void 0!==e?e:void 0,{mutateAsync:d}=i.hi.intercom.importIntercomWithHierarchy.useMutation(),{mutateAsync:u}=i.hi.notion.importNotionWithHierarchy.useMutation(),{mutateAsync:m}=i.hi.googleDocs.importGoogleDocsWithHierarchyNew.useMutation(),{mutateAsync:f}=i.hi.crisp.importCrispWithHierarchy.useMutation(),{mutateAsync:p}=i.hi.crisp.importCrispCsv.useMutation(),{mutateAsync:h}=i.hi.confluence.importConfluenceWithHierarchy.useMutation(),{mutateAsync:v}=i.hi.zendesk.importZendeskWithHierarchy.useMutation(),{mutateAsync:x}=i.hi.intercom.importIntercomDocument.useMutation(),{mutateAsync:g}=i.hi.notion.importNotionDocument.useMutation(),{mutateAsync:k}=i.hi.googleDocs.importGoogleDocsDocumentNew.useMutation(),{mutateAsync:y}=i.hi.crisp.importCrispDocument.useMutation(),{mutateAsync:j}=i.hi.confluence.importConfluenceDocument.useMutation(),{mutateAsync:N}=i.hi.zendesk.importZendeskDocument.useMutation(),{mutateAsync:b}=i.hi.kb.create.useMutation();return{handleImport:async(e,n,i,o,a,p,x,g)=>{if(0===i.collections.length+i.sections.length+i.articles.length){l.Am.error("Please select at least one item to import.");return}try{var k,y,j,N,w,I;let l=(0,s.B3)(o,e,g),C=p;if(C=p||(x?(await b({defaultLocale:null!=r?r:c.gk,title:x,workspaceId:a,createDefaultArticle:!1,locale:null!=r?r:null},{onSuccess:()=>{t.billing.getPlanBenefitsAndLimits.invalidate()}})).id:(await b({defaultLocale:null!=r?r:c.gk,title:null!=x?x:"".concat(e,"_import"),workspaceId:a,createDefaultArticle:!1,locale:null!=r?r:null},{onSuccess:()=>{t.billing.getPlanBenefitsAndLimits.invalidate()}})).id),t.kb.getKBTreeById.invalidate(),t.billing.getPlanBenefitsAndLimits.invalidate(),"intercom"===e)d({data:n,selectedItems:{collections:i.collections,articles:i.articles,sections:i.sections},workspaceId:a,kbId:null!=C?C:void 0});else if("notion"===e)u({data:n,selectedItems:{collections:i.collections,articles:i.articles},workspaceId:a,kbId:null!=C?C:void 0});else if("crisp"===e)f({data:n,selectedItems:{sections:i.sections,collections:i.collections,articles:i.articles},workspaceId:a,kbId:null!=C?C:void 0});else if("zendesk"===e)v({data:n,selectedItems:{sections:i.sections,collections:i.collections,articles:i.articles},workspaceId:a,kbId:null!=C?C:void 0,credentials:{token:l.token,domain:null!==(k=l.domain)&&void 0!==k?k:"",email:null!==(y=l.email)&&void 0!==y?y:""}});else if("confluence"===e){let e={accessToken:null!==(j=l.accessToken)&&void 0!==j?j:"",apiToken:null!==(N=l.token)&&void 0!==N?N:"",domain:null!==(w=l.domain)&&void 0!==w?w:""};h({data:n,selectedItems:{sections:i.sections,collections:i.collections,articles:i.articles},workspaceId:a,kbId:null!=C?C:void 0,credentials:e})}else"google-docs"===e&&m({data:n,selectedItems:{articles:i.articles,sections:i.sections,collections:i.collections},workspaceId:a,kbId:null!=C?C:void 0,accessToken:null!==(I=l.token)&&void 0!==I?I:""})}catch(e){console.error("Error during import:",e),l.Am.error("Failed to import. Please try again.")}},handleDocumentImport:async(e,i,o,c,a,r,d,u,m)=>{var f,p,h,v,b,w,I,C,A,T,D,E,S,_,P,M,z,L,B,F,U;if(0===(null!==(v=null===(f=i.collections)||void 0===f?void 0:f.length)&&void 0!==v?v:0)+(null!==(b=null===(p=i.sections)||void 0===p?void 0:p.length)&&void 0!==b?b:0)+(null!==(w=null===(h=i.articles)||void 0===h?void 0:h.length)&&void 0!==w?w:0)){l.Am.error("Please select at least one document to import.");return}try{let f;let p=(0,s.B3)(o,e,r);if(!(null!==(T=null!==(A=i.articles[0])&&void 0!==A?A:null===(I=i.collections)||void 0===I?void 0:I[0])&&void 0!==T?T:null===(C=i.sections)||void 0===C?void 0:C[0])){l.Am.error("No item selected for import.");return}if("intercom"===e)f=await x({pageIds:null!==(D=i.articles)&&void 0!==D?D:[],workspaceId:c,kbId:null!=a?a:void 0,targetDocumentId:u&&null!=d?d:void 0});else if("notion"===e)f=await g({pageIds:null!==(E=i.articles)&&void 0!==E?E:[],workspaceId:c,pageTitle:"",kbId:null!=a?a:void 0,targetDocumentId:u&&null!=d?d:void 0});else if("crisp"===e)f=await y({pageIds:null!==(S=i.articles)&&void 0!==S?S:[],workspaceId:c,kbId:null!=a?a:void 0,targetDocumentId:u&&null!=d?d:void 0});else if("zendesk"===e){let e={token:p.token,domain:null!==(_=p.domain)&&void 0!==_?_:"",email:null!==(P=p.email)&&void 0!==P?P:"",targetDocumentId:u&&null!=d?d:void 0};f=await N({pageIds:i.articles,workspaceId:c,kbId:null!=a?a:void 0,credentials:e,targetDocumentId:u&&null!=d?d:void 0})}else if("confluence"===e){let e={accessToken:null!==(M=p.accessToken)&&void 0!==M?M:"",apiToken:null!==(z=p.apiToken)&&void 0!==z?z:"",domain:null!==(L=p.domain)&&void 0!==L?L:""};f=await j({pageIds:null!==(B=i.articles)&&void 0!==B?B:[],workspaceId:c,kbId:null!=a?a:void 0,credentials:e,targetDocumentId:u&&null!=d?d:void 0})}else"google-docs"===e&&(f=await k({pageIds:null!==(F=i.articles)&&void 0!==F?F:[],workspaceId:c,kbId:null!=a?a:void 0,accessToken:null!==(U=p.token)&&void 0!==U?U:"",parentCollectionId:null!=m?m:void 0}));return t.kb.getKBTreeById.invalidate(),(null==f?void 0:f.success)&&(l.Am.success("Successfully imported document from ".concat(e,"!")),!u&&f.success&&f.pageId&&n.push("/doc/".concat(f.pageId))),f}catch(e){throw console.error("Error during document import:",e),l.Am.error("Failed to import document. Please try again."),e}},handleCsvImport:async(e,n,i,o,s,a,d)=>{try{let l=n.filter(e=>i.articles.includes(e.id)),u=s;u=s||(a?(await b({title:a,defaultLocale:null!=r?r:c.gk,workspaceId:o,createDefaultArticle:!1,locale:null!=r?r:null},{onSuccess:()=>{t.billing.getPlanBenefitsAndLimits.invalidate()}})).id:(await b({defaultLocale:null!=r?r:c.gk,title:null!=a?a:"".concat(e,"_import"),workspaceId:o,createDefaultArticle:!1,locale:null!=r?r:null},{onSuccess:()=>{t.billing.getPlanBenefitsAndLimits.invalidate()}})).id),"crisp"===e&&await p({data:l,workspaceId:o,kbId:null!=u?u:void 0,parentCollectionId:d}),t.kb.getKBTreeById.invalidate(),t.billing.getPlanBenefitsAndLimits.invalidate()}catch(e){console.error("Error during import:",e),l.Am.error("Failed to import. Please try again.")}}}}},7032:function(e,t,n){n.d(t,{L:function(){return l}});var i=n(2265);let l=()=>{let[e,t]=(0,i.useState)(1),[n,l]=(0,i.useState)(null),[o,s]=(0,i.useState)(null),[c,a]=(0,i.useState)(!1),[r,d
1]=(0,i.useState)(!1),[u,m]=(0,i.useState)(null),[f,p]=(0,i.useState)(null),[h,v]=(0,i.useState)(""),[x,g]=(0,i.useState)(""),[k,y]=(0,i.useState)(""),[j,N]=(0,i.useState)(""),[b,w]=(0,i.useState)(""),[I,C]=(0,i.useState)(""),[A,T]=(0,i.useState)(null),[D,E]=(0,i.useState)("token"),[S,_]=(0,i.useState)([]),[P,M]=(0,i.useState)(!1),[z,L]=(0,i.useState)(!1),[B,F]=(0,i.useState)(!1),[U,O]=(0,i.useState)(!1),[H,Z]=(0,i.useState)(!1),[R,X]=(0,i.useState)(null),[K,G]=(0,i.useState)(!1),[W,Q]=(0,i.useState)({collections:[],sections:[],articles:[]}),[V,Y]=(0,i.useState)(null);return{step:e,setStep:t,selectedIntegration:n,setSelectedIntegration:l,importedProgress:o,setImportedProgress:s,hasFailed:r,setHasFailed:d,data:u,setData:m,token:h,setToken:v,domain:x,setDomain:g,email:j,setEmail:N,websiteId:b,setWebsiteId:w,tokenIdentifier:I,setTokenIdentifier:C,selectedKb:A,setSelectedKb:T,importType:D,setImportType:E,expandedCategories:S,setExpandedCategories:_,isImporting:P,setIsImporting:M,isLoadingData:z,setIsLoadingData:L,selectedItems:W,setSelectedItems:Q,isVerified:B,setIsVerified:F,csvData:f,setCsvData:p,isExporting:U,setIsExporting:O,parentId:k,setParentId:y,isPublishing:c,setIsPublishing:a,isCrispConnected:K,setIsCrispConnected:G,isImportingDraft:H,setIsImportingDraft:Z,crispSelectedCategory:V,setCrispSelectedCategory:Y,resetState:()=>{t(1),l(null),s(null),d(!1),m(null),v(""),g(""),N(""),w(""),C(""),y(""),Q({collections:[],sections:[],articles:[]}),T(null),E("token"),Y(null),L(!1),_([]),M(!1),F(!1),p(null),Q({collections:[],sections:[],articles:[]}),_([]),m(null),O(!1),a(!1),G(!1),Z(!1),Y(null)},exportPathData:R,setExportPathData:X}}},58486:function(e,t,n){n.d(t,{z:function(){return o}});var i=n(62170),l=n(94024);let o=()=>{let{mutateAsync:e,isPending:t}=i.hi.intercom.fetchIntercomData.useMutation(),{mutateAsync:n,isPending:o}=i.hi.notion.fetchNotionData.useMutation(),{mutateAsync:s,isPending:c}=i.hi.googleDocs.fetchHierarchicalGoogleDocs.useMutation(),{mutateAsync:a,isPending:r}=i.hi.crisp.getCrispHierarchicalData.useMutation(),{mutateAsync:d,isPending:u}=i.hi.confluence.fetchConfluenceHierarchicalData.useMutation(),{mutateAsync:m,isPending:f}=i.hi.zendesk.getZendeskHierarchicalData.useMutation(),{mutateAsync:p,isPending:h}=i.hi.intercom.fetchIntercomExportPathData.useMutation(),{mutateAsync:v,isPending:x}=i.hi.notion.fetchNotionExportPathData.useMutation(),{mutateAsync:g,isPending:k}=i.hi.confluence.fetchConfluenceExportPathData.useMutation(),{mutateAsync:y,isPending:j}=i.hi.googleDocs.fetchGoogleDocsExportPathData.useMutation(),{mutateAsync:N,isPending:b}=i.hi.zendesk.fetchZendeskExportPathData.useMutation(),{mutateAsync:w,isPending:I}=i.hi.crisp.fetchCrispExportPathData.useMutation();return{fetchHelpCenterData:async(t,i,o,c,r)=>{var u,f,p,h,v,x,g,k,y;if(!t)return null;let j=(0,l.B3)(i,t,c);if(""===j.token&&""===j.apiToken&&""===j.accessToken)throw Error("No token or access token provided");if("intercom"===t){let t=j.token?j.token:j.accessToken?j.accessToken:"",n=await e({token:t,workspaceId:o,isImportingDraft:r});if(n){let e=t=>t.map(t=>{var n;return{id:t.id,name:t.name,collections:t.subcollections?e(t.subcollections):[],articles:(null===(n=t.articles)||void 0===n?void 0:n.map(e=>({id:e.id,name:e.title})))||[],sections:[]}});return{collections:e(n.collections),sections:[],articles:[]}}}else if("notion"===t){let e=await n({workspaceId:o});if(e)return{collections:e.collections.map(e=>{var t,n;return{id:e.id,name:e.title,articles:e.articles.map(e=>({id:e.id,name:e.title}
1)),collections:null!==(n=null===(t=e.collections)||void 0===t?void 0:t.map(e=>({id:e.id,name:e.title,articles:e.articles.map(e=>({id:e.id,name:e.title})),collections:[],sections:[]})))&&void 0!==n?n:[],sections:[]}}),articles:e.articles.map(e=>({id:e.id,name:e.title})),sections:[]}}else if("google-docs"===t){let e=await s({workspaceId:o});if(e)return e}else if("crisp"===t){let e=await a({workspaceId:o,websiteId:null!==(u=j.websiteId)&&void 0!==u?u:"",tokenIdentifier:null!==(f=j.tokenIdentifier)&&void 0!==f?f:"",apiToken:null!==(p=j.token)&&void 0!==p?p:""});if(null==e?void 0:e.collections)return e}else if("confluence"===t)return await d({accessToken:null!==(h=j.accessToken)&&void 0!==h?h:"",apiToken:null!==(v=j.token)&&void 0!==v?v:"",domain:null!==(x=j.domain)&&void 0!==x?x:"",workspaceId:o,isImportingDraft:r});else if("zendesk"===t){let e=await m({workspaceId:o,apiToken:null!==(g=j.token)&&void 0!==g?g:"",domain:"domain"in j&&null!==(k=j.domain)&&void 0!==k?k:"",userEmail:null!==(y=j.email)&&void 0!==y?y:"",isImportingDraft:r});if(e)return{sections:e.categories.map(e=>({id:e.id,name:e.name||"Category ".concat(e.id),collections:e.sections.map(e=>({id:e.id||"section_".concat(Math.random()),name:e.name||"Section ".concat(Math.random()),articles:e.articles.map(e=>({id:e.id||"article_".concat(Math.random()),name:e.name||"Article ".concat(Math.random())})),collections:[],sections:[]})),articles:[]})),collections:[],articles:[]}}return null},fetchHelpCenterExportData:async(e,t,n,i)=>{var o,s,c,a,r,d,u,m,f;if(!e)return null;let h=(0,l.B3)(t,e,i);return"intercom"===e?await p({workspaceId:n}):"confluence"===e?await g({workspaceId:n,domain:null!==(o=h.domain)&&void 0!==o?o:"",apiToken:null!==(s=h.token)&&void 0!==s?s:"",accessToken:null!==(c=h.accessToken)&&void 0!==c?c:""}):"notion"===e?await v({workspaceId:n}):"google-docs"===e?await y({workspaceId:n}):"zendesk"===e?await N({apiToken:null!==(a=h.token)&&void 0!==a?a:"",domain:null!==(r=h.domain)&&void 0!==r?r:"",userEmail:null!==(d=h.email)&&void 0!==d?d:"",workspaceId:n}):"crisp"===e?await w({workspaceId:n,websiteId:null!==(u=h.websiteId)&&void 0!==u?u:"",tokenIdentifier:null!==(m=h.tokenIdentifier)&&void 0!==m?m:"",apiToken:null!==(f=h.token)&&void 0!==f?f:""}):null}
1,isFetchingIntercomData:t,isFetchingNotionData:o,isFetchingHierarchicalGoogleDocs:c,isFetchingCrispData:r,isFetchingConfluenceData:u,isFetchingZendeskData:f,isFetchingIntercomExportPathData:h,isFetchingConfluenceExportPathData:k,isFetchingNotionExportPathData:x,isFetchingGoogleDocsExportPathData:j,isFetchingZendeskExportPathData:b,isFetchingCrispExportPathData:I}}}}]);

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.