@creaditor/business-ai 1.0.17 โ†’ 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23517,7 +23517,7 @@ function lj({
23517
23517
  </html>
23518
23518
  `), m.close();
23519
23519
  const H = m.createElement("script");
23520
- H.src = "https://unpkg.com/@creaditor/newsletter-starterkit@1.0.10/dist/creaditor.bundle.js", H.defer = !0;
23520
+ H.src = "https://unpkg.com/@creaditor/newsletter-starterkit@1.0.11/dist/creaditor.bundle.js", H.defer = !0;
23521
23521
  let O = !1;
23522
23522
  H.onload = () => {
23523
23523
  if (console.log("๐Ÿ“œ [Iframe] Script loaded successfully"), O) {
@@ -676,7 +676,7 @@ Error generating stack: `+s.message+`
676
676
 
677
677
  </body>
678
678
  </html>
679
- `),m.close();const H=m.createElement("script");H.src="https://unpkg.com/@creaditor/newsletter-starterkit@1.0.10/dist/creaditor.bundle.js",H.defer=!0;let O=!1;H.onload=()=>{if(console.log("๐Ÿ“œ [Iframe] Script loaded successfully"),O){console.log("โญ๏ธ [Iframe] Script already processed, skipping");return}O=!0,setTimeout(()=>{console.log("โณ [Iframe] Initializing cdtrStarter...");const z=x;if(z.cdtrStarter){const T=y.length>0?y:[];console.log("๐ŸŽจ [Iframe] Initializing with template:",{hasTemplate:T.length>0,componentCount:T.length,template:T});try{new z.cdtrStarter({editable:!1,mode:"preview",components:T}),console.log("โœ… [Iframe] cdtrStarter initialized successfully",T.length>0?"with template":"empty")}catch(N){console.error("โŒ [Iframe] Error initializing cdtrStarter:",N)}}else console.error("โŒ [Iframe] cdtrStarter not available on window object"),console.log("๐Ÿ” [Iframe] Available window properties:",Object.keys(z))},0)},H.onerror=z=>{console.error("โŒ [Iframe] Failed to load creaditor.bundle.js:",z),u.current=!1},m.head.appendChild(H)},h.src="about:blank",()=>{u.current=!1,h&&h.parentNode&&h.parentNode.removeChild(h),d.current=null}},[f,y]),g.useEffect(()=>{if(y.length===0&&(console.log("๐Ÿงน [Template Clear] Template is empty, clearing iframe"),d.current&&d.current.parentNode&&(d.current.parentNode.removeChild(d.current),d.current=null,u.current=!1),a.current)){const D=a.current.querySelector("iframe");D&&(D.remove(),u.current=!1)}},[y]),g.useEffect(()=>{if(console.log("๐Ÿ”„ [Template Restart] Effect triggered, template length:",y.length),y.length===0){console.log("โญ๏ธ [Template Restart] Template is empty, skipping restart");return}if(console.log("๐Ÿ”„ [Template Restart] Forcing full iframe restart for new template"),u.current=!1,d.current&&d.current.parentNode&&(console.log("๐Ÿงน [Template Restart] Removing existing iframe before restart"),d.current.parentNode.removeChild(d.current),d.current=null),a.current){const D=a.current.querySelector("iframe");D&&(console.log("๐Ÿงน [Template Restart] Removing orphaned iframe from editorRootRef"),D.remove())}v(D=>{const h=D+1;return console.log("๐Ÿ”„ [Template Restart] Incrementing reloadKey to:",h),h})},[y]),c.jsxs(ke,{sx:{width:"100vw"},container:!0,height:"100%",children:[" ",c.jsx(ke,{sx:{height:"100%"},item:!0,xs:12,md:3,children:c.jsx(QT,{language:n,onSendMessage:P,logo:l})}),c.jsxs(ke,{sx:{height:"100%",position:"relative"},item:!0,xs:12,md:9,children:[y.length===0?c.jsx(ee,{sx:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:4,textAlign:"center",backgroundColor:"#f5f5f5",direction:n==="he"?"rtl":"ltr",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:1},children:c.jsx(ee,{sx:{width:120,height:120,borderRadius:"50%",backgroundColor:"rgba(156, 39, 176, 0.1)",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:3},children:c.jsx(Pe,{variant:"h2",sx:{color:"rgba(156, 39, 176, 0.5)",fontSize:"3rem"},children:"โœ‰๏ธ"})})}):null,c.jsx(ee,{ref:a,sx:{height:"100%",width:"100%",position:y.length===0?"relative":"static"}})]})]})}var wm={},_T=Et;Object.defineProperty(wm,"__esModule",{value:!0});var Yy=wm.default=void 0,ej=_T(an()),tj=c;Yy=wm.default=(0,ej.default)((0,tj.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");const lo=ml,Om=["ื ืฉืžืข ืขืกืง ืžืขื ื™ื™ืŸ ืžืื•ื“!","ื‘ื•ืื• ื ืžืฆื ืืช ื”ื“ื•ืžื™ื™ืŸ ื”ืžื•ืฉืœื ืขื‘ื•ืจืš!","ืื ื™ ืžื—ืคืฉ ืืช ื”ืืคืฉืจื•ื™ื•ืช ื”ื˜ื•ื‘ื•ืช ื‘ื™ื•ืชืจ...","ื–ื” ืœื•ืงื— ืจื’ืข, ืื‘ืœ ื–ื” ืฉื•ื•ื” ืืช ื–ื”!","ืžืฆืืชื™ ื›ืžื” ืืคืฉืจื•ื™ื•ืช ืžืขื•ืœื•ืช!","ืื ื™ ื‘ื•ื“ืง ืืช ื”ื–ืžื™ื ื•ืช ืฉืœ ื”ื“ื•ืžื™ื™ื ื™ื...","ื›ืžืขื˜ ืกื™ื™ืžืชื™, ืขื•ื“ ืจื’ืข!"];function nj({userName:e="",websiteUrl:t="",businessName:n="",setActiveStep:r}){const o=rc(),[s,i]=g.useState([]),[l,a]=g.useState(!1),[u,d]=g.useState(null),[f,v]=g.useState(null),[y,w]=g.useState(""),[P,D]=g.useState(n||""),[h,p]=g.useState(!1),m=()=>{o&&(o.open=!1)},x=H=>{const O=new CustomEvent("business-ai-buy-domain",{detail:{domain:H},bubbles:!0,composed:!0});window.dispatchEvent(O)};return g.useEffect(()=>{p(!0)},[]),g.useEffect(()=>{const H=O=>{const T=O.detail;T!=null&&T.business_name&&D(T.business_name)};return window.addEventListener("business-analysis-saved",H),()=>{window.removeEventListener("business-analysis-saved",H)}},[]),g.useEffect(()=>{if(!l){w("");return}let H=0;w(Om[H]);const O=setInterval(()=>{H=(H+1)%Om.length,w(Om[H])},2500);return()=>{clearInterval(O)}},[l]),g.useEffect(()=>{(!t||t.trim()==="")&&P&&(a(!0),d(null),v(null),fetch("https://agent.creaditor.ai/api/v1/domain-finder/find",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:`find domain for ${P}`})}).then(async O=>{var k,M;if(!O.ok)throw new Error("Failed to fetch domain suggestions");const z=(k=O.body)==null?void 0:k.getReader(),T=new TextDecoder;let N="",L=null;if(!z)throw new Error("Response body is not readable");let X=!1;for(;!X;){const R=await z.read();if(X=R.done,X)break;const{value:Z}=R;N+=T.decode(Z,{stream:!0});const W=N.split(`
679
+ `),m.close();const H=m.createElement("script");H.src="https://unpkg.com/@creaditor/newsletter-starterkit@1.0.11/dist/creaditor.bundle.js",H.defer=!0;let O=!1;H.onload=()=>{if(console.log("๐Ÿ“œ [Iframe] Script loaded successfully"),O){console.log("โญ๏ธ [Iframe] Script already processed, skipping");return}O=!0,setTimeout(()=>{console.log("โณ [Iframe] Initializing cdtrStarter...");const z=x;if(z.cdtrStarter){const T=y.length>0?y:[];console.log("๐ŸŽจ [Iframe] Initializing with template:",{hasTemplate:T.length>0,componentCount:T.length,template:T});try{new z.cdtrStarter({editable:!1,mode:"preview",components:T}),console.log("โœ… [Iframe] cdtrStarter initialized successfully",T.length>0?"with template":"empty")}catch(N){console.error("โŒ [Iframe] Error initializing cdtrStarter:",N)}}else console.error("โŒ [Iframe] cdtrStarter not available on window object"),console.log("๐Ÿ” [Iframe] Available window properties:",Object.keys(z))},0)},H.onerror=z=>{console.error("โŒ [Iframe] Failed to load creaditor.bundle.js:",z),u.current=!1},m.head.appendChild(H)},h.src="about:blank",()=>{u.current=!1,h&&h.parentNode&&h.parentNode.removeChild(h),d.current=null}},[f,y]),g.useEffect(()=>{if(y.length===0&&(console.log("๐Ÿงน [Template Clear] Template is empty, clearing iframe"),d.current&&d.current.parentNode&&(d.current.parentNode.removeChild(d.current),d.current=null,u.current=!1),a.current)){const D=a.current.querySelector("iframe");D&&(D.remove(),u.current=!1)}},[y]),g.useEffect(()=>{if(console.log("๐Ÿ”„ [Template Restart] Effect triggered, template length:",y.length),y.length===0){console.log("โญ๏ธ [Template Restart] Template is empty, skipping restart");return}if(console.log("๐Ÿ”„ [Template Restart] Forcing full iframe restart for new template"),u.current=!1,d.current&&d.current.parentNode&&(console.log("๐Ÿงน [Template Restart] Removing existing iframe before restart"),d.current.parentNode.removeChild(d.current),d.current=null),a.current){const D=a.current.querySelector("iframe");D&&(console.log("๐Ÿงน [Template Restart] Removing orphaned iframe from editorRootRef"),D.remove())}v(D=>{const h=D+1;return console.log("๐Ÿ”„ [Template Restart] Incrementing reloadKey to:",h),h})},[y]),c.jsxs(ke,{sx:{width:"100vw"},container:!0,height:"100%",children:[" ",c.jsx(ke,{sx:{height:"100%"},item:!0,xs:12,md:3,children:c.jsx(QT,{language:n,onSendMessage:P,logo:l})}),c.jsxs(ke,{sx:{height:"100%",position:"relative"},item:!0,xs:12,md:9,children:[y.length===0?c.jsx(ee,{sx:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:4,textAlign:"center",backgroundColor:"#f5f5f5",direction:n==="he"?"rtl":"ltr",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:1},children:c.jsx(ee,{sx:{width:120,height:120,borderRadius:"50%",backgroundColor:"rgba(156, 39, 176, 0.1)",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:3},children:c.jsx(Pe,{variant:"h2",sx:{color:"rgba(156, 39, 176, 0.5)",fontSize:"3rem"},children:"โœ‰๏ธ"})})}):null,c.jsx(ee,{ref:a,sx:{height:"100%",width:"100%",position:y.length===0?"relative":"static"}})]})]})}var wm={},_T=Et;Object.defineProperty(wm,"__esModule",{value:!0});var Yy=wm.default=void 0,ej=_T(an()),tj=c;Yy=wm.default=(0,ej.default)((0,tj.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");const lo=ml,Om=["ื ืฉืžืข ืขืกืง ืžืขื ื™ื™ืŸ ืžืื•ื“!","ื‘ื•ืื• ื ืžืฆื ืืช ื”ื“ื•ืžื™ื™ืŸ ื”ืžื•ืฉืœื ืขื‘ื•ืจืš!","ืื ื™ ืžื—ืคืฉ ืืช ื”ืืคืฉืจื•ื™ื•ืช ื”ื˜ื•ื‘ื•ืช ื‘ื™ื•ืชืจ...","ื–ื” ืœื•ืงื— ืจื’ืข, ืื‘ืœ ื–ื” ืฉื•ื•ื” ืืช ื–ื”!","ืžืฆืืชื™ ื›ืžื” ืืคืฉืจื•ื™ื•ืช ืžืขื•ืœื•ืช!","ืื ื™ ื‘ื•ื“ืง ืืช ื”ื–ืžื™ื ื•ืช ืฉืœ ื”ื“ื•ืžื™ื™ื ื™ื...","ื›ืžืขื˜ ืกื™ื™ืžืชื™, ืขื•ื“ ืจื’ืข!"];function nj({userName:e="",websiteUrl:t="",businessName:n="",setActiveStep:r}){const o=rc(),[s,i]=g.useState([]),[l,a]=g.useState(!1),[u,d]=g.useState(null),[f,v]=g.useState(null),[y,w]=g.useState(""),[P,D]=g.useState(n||""),[h,p]=g.useState(!1),m=()=>{o&&(o.open=!1)},x=H=>{const O=new CustomEvent("business-ai-buy-domain",{detail:{domain:H},bubbles:!0,composed:!0});window.dispatchEvent(O)};return g.useEffect(()=>{p(!0)},[]),g.useEffect(()=>{const H=O=>{const T=O.detail;T!=null&&T.business_name&&D(T.business_name)};return window.addEventListener("business-analysis-saved",H),()=>{window.removeEventListener("business-analysis-saved",H)}},[]),g.useEffect(()=>{if(!l){w("");return}let H=0;w(Om[H]);const O=setInterval(()=>{H=(H+1)%Om.length,w(Om[H])},2500);return()=>{clearInterval(O)}},[l]),g.useEffect(()=>{(!t||t.trim()==="")&&P&&(a(!0),d(null),v(null),fetch("https://agent.creaditor.ai/api/v1/domain-finder/find",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:`find domain for ${P}`})}).then(async O=>{var k,M;if(!O.ok)throw new Error("Failed to fetch domain suggestions");const z=(k=O.body)==null?void 0:k.getReader(),T=new TextDecoder;let N="",L=null;if(!z)throw new Error("Response body is not readable");let X=!1;for(;!X;){const R=await z.read();if(X=R.done,X)break;const{value:Z}=R;N+=T.decode(Z,{stream:!0});const W=N.split(`
680
680
  `);N=W.pop()||"";for(const B of W)if(B.startsWith("data: ")){const j=B.slice(6);try{const S=JSON.parse(j);S.message&&!((M=S.metadata)!=null&&M.token)&&v(S.message),(S.suggestions&&Array.isArray(S.suggestions)||S.status==="complete"&&S.suggestions)&&(L=S,v(null))}catch{continue}}}if(N.startsWith("data: ")){const R=N.slice(6);try{const Z=JSON.parse(R);(Z.suggestions&&Array.isArray(Z.suggestions)||Z.status==="complete"&&Z.suggestions)&&(L=Z,v(null))}catch{}}return L}).then(O=>{if(O!=null&&O.suggestions&&Array.isArray(O.suggestions))i(O.suggestions.map(z=>({domain:z.domain,available:z.available})));else if(O!=null&&O.data){const z=O.data;Array.isArray(z)?i(z.map(T=>({domain:T}))):z.domains&&Array.isArray(z.domains)?i(z.domains.map(T=>({domain:T}))):z.domain?i([{domain:z.domain}]):i([])}else i([]);a(!1)}).catch(O=>{console.error("Error fetching domains:",O),d("ืœื ื”ืฆืœื—ื ื• ืœื˜ืขื•ืŸ ื”ืฆืขื•ืช ื“ื•ืžื™ื™ืŸ"),a(!1)}))},[t,P]),c.jsxs(ee,{sx:{padding:{xs:2,sm:3,md:5},width:{xs:"100%",sm:"500px"},maxWidth:"100%",maxHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",position:"relative",boxSizing:"border-box"},children:[c.jsx(Wo,{label:"Business AI",className:h?lo.fadeUp:"",sx:{p:{xs:1,sm:1.5,md:2},mb:{xs:2,sm:2.5,md:3},fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem"}},icon:c.jsxs("svg",{width:"20",height:"23",viewBox:"0 0 24 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M21 22H23V24H1V22H3V7C3 6.44772 3.44772 6 4 6H14C14.5523 6 15 6.44772 15 7V22H19V14H17V12H20C20.5523 12 21 12.4477 21 13V22ZM5 8V22H13V8H5ZM7 14H11V16H7V14ZM7 10H11V12H7V10Z",fill:"#4B2ADA"}),c.jsx("g",{clipPath:"url(#clip0_2838_2)",children:c.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"black"})}),c.jsx("g",{clipPath:"url(#clip1_2838_2)",children:c.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"#4B2ADA"})}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"clip0_2838_2",children:c.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})}),c.jsx("clipPath",{id:"clip1_2838_2",children:c.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})})]})]})}),c.jsx(ee,{className:h?lo.fadeUpDelay1:"",sx:{mb:{xs:2,sm:3,md:4},display:"flex",justifyContent:"center",alignItems:"center"},children:c.jsx(Yy,{sx:{fontSize:{xs:50,sm:65,md:80},color:"#4B2ADA"}})}),c.jsxs(Pe,{gutterBottom:!0,variant:"h4",className:h?lo.fadeUpDelay2:"",sx:{mb:2,fontWeight:600,fontSize:{xs:"1.5rem",sm:"2rem",md:"2.125rem"}},children:["ืชื•ื“ื” ืจื‘ื”",e?` ${e}`:"","!"]}),c.jsx(Pe,{gutterBottom:!0,variant:"h6",className:h?lo.fadeUpDelay3:"",sx:{mb:3,color:"text.secondary",fontSize:{xs:"1rem",sm:"1.25rem",md:"1.5rem"}},children:"ื›ืœ ื”ืžื™ื“ืข ื ืฉืžืจ ื‘ื”ืฆืœื—ื”"}),c.jsx(Pe,{variant:"body1",className:h?lo.fadeUpDelay4:"",sx:{mb:{xs:2,sm:3,md:4},color:"text.secondary",fontSize:{xs:"0.875rem",sm:"1rem"},px:{xs:1,sm:0}},children:"ื›ืขืช ืชื•ื›ืœื• ืœื™ืฆื•ืจ ื ื™ื•ื–ืœื˜ืจื™ื, ื“ืคื™ ื ื—ื™ืชื”, ืฉื™ื•ื•ืง ื—ื›ื ื•ืขื•ื“ - ื”ื›ืœ ื‘ืกื’ื ื•ืŸ ื”ืžื•ืชื’ ืฉืœืš!"}),t&&t.trim()!==""||(!t||t.trim()==="")&&!l?c.jsxs(ee,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%",mb:{xs:2,sm:0}},children:[r&&c.jsx(ut,{onClick:()=>r(3),variant:"contained",color:"primary",fullWidth:!0,className:h?lo.fadeUpDelay4:"",sx:{maxWidth:{xs:"100%",sm:"auto"}},children:"ืฆื•ืจ ืืช ื”ื ื™ื•ื–ืœื˜ืจ ื”ืจืืฉื•ืŸ ืฉืœืš ื‘ืืžืฆืขื•ืช AI"}),c.jsx(ut,{onClick:m,variant:"text",color:"primary",fullWidth:!0,className:h?lo.fadeUpDelay4:"",sx:{maxWidth:{xs:"100%",sm:"auto"}},children:"ืžืขื•ืœื”! ืื ื™ ืจื•ืฆื” ืœื”ืžืฉื™ืš ืœืขื‘ื•ื“"})]}):null,!t||t.trim()===""?c.jsxs(ee,{className:h&&!l&&s.length>0?lo.fadeUpDelay4:"",sx:{width:"100%",mt:2,px:{xs:0,sm:0}},children:[s.length>0?c.jsx(Pe,{variant:"h6",sx:{mb:2,fontWeight:600,fontSize:{xs:"1rem",sm:"1.25rem",md:"1.5rem"}},children:"ืžืฆืื ื• ื›ืžื” ื“ื•ืžื™ื™ื ื™ื ืžืชืื™ืžื™ื ืœืขืกืง ืฉืœืš"}):null,l?c.jsxs(ee,{sx:{display:"flex",flexDirection:"column",alignItems:"center",my:{xs:2,sm:3},px:{xs:1,sm:0}},children:[c.jsx(O3,{sx:{mb:2,width:{xs:30,sm:40},height:{xs:30,sm:40}}}),f?c.jsx(Pe,{variant:"body2",sx:{color:"text.secondary",textAlign:"center",fontSize:{xs:"0.75rem",sm:"0.875rem"},px:{xs:1,sm:0}},children:f}):c.jsx(Pe,{variant:"body2",sx:{color:"text.secondary",textAlign:"center",fontSize:{xs:"0.75rem",sm:"0.875rem"},px:{xs:1,sm:0}},children:y})]}):u?c.jsx(X0,{severity:"error",sx:{mb:2,fontSize:{xs:"0.75rem",sm:"0.875rem"}},children:u}):s.length>0?c.jsx(ee,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, 1fr)"},gap:{xs:1,sm:1.5},width:"100%",mt:{xs:2,sm:3}},children:s.map((H,O)=>c.jsx(ee,{onClick:()=>x(H.domain),sx:{border:"1px solid",borderColor:"divider",borderRadius:"8px",padding:{xs:1.25,sm:1.5},cursor:"pointer",transition:"all 0.2s ease",backgroundColor:"background.paper","&:hover":{borderColor:O<2?"#4B2ADA":"primary.main",backgroundColor:"action.hover"}},children:c.jsxs(ee,{sx:{display:"flex",flexDirection:"column",gap:.75},children:[c.jsxs(ee,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[c.jsx(Pe,{sx:{fontSize:{xs:"0.875rem",sm:"0.9375rem"},fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:H.domain}),O<2&&c.jsx(Wo,{label:"ืžื•ืžืœืฅ",size:"small",sx:{height:20,fontSize:"0.7rem",backgroundColor:"#4B2ADA",color:"white",flexShrink:0,"& .MuiChip-label":{px:.75}}})]}),H.available!==!1&&c.jsx(Pe,{variant:"caption",sx:{color:"success.main",fontSize:"0.75rem"},children:"ื–ืžื™ืŸ"})]})},O))}):null]}):null]})}var zm={},rj=Et;Object.defineProperty(zm,"__esModule",{value:!0});var Fy=zm.default=void 0,oj=rj(an()),sj=c;Fy=zm.default=(0,oj.default)((0,sj.jsx)("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91"}),"RestartAlt");var Hm={},ij=Et;Object.defineProperty(Hm,"__esModule",{value:!0});var qy=Hm.default=void 0,lj=ij(an()),aj=c;qy=Hm.default=(0,lj.default)((0,aj.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");function uj({userName:e="",setActiveStep:t,onViewResults:n}){const r=()=>{t(0)},o=()=>{n?n():t(1)},s=()=>{t(-2)};return c.jsxs(ee,{sx:{padding:{xs:2,sm:3,md:5},width:{xs:"100%",sm:"600px",md:"800px"},maxWidth:"100%",maxHeight:"100vh",overflowY:"auto",display:"flex",flexDirection:"column",alignItems:"center",boxSizing:"border-box"},children:[c.jsx(Wo,{label:"Business AI",sx:{p:{xs:1,sm:1.5,md:2},mb:{xs:2,sm:2.5,md:3},fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem"}},icon:c.jsxs("svg",{width:"20",height:"23",viewBox:"0 0 24 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M21 22H23V24H1V22H3V7C3 6.44772 3.44772 6 4 6H14C14.5523 6 15 6.44772 15 7V22H19V14H17V12H20C20.5523 12 21 12.4477 21 13V22ZM5 8V22H13V8H5ZM7 14H11V16H7V14ZM7 10H11V12H7V10Z",fill:"#4B2ADA"}),c.jsx("g",{clipPath:"url(#clip0_2838_2)",children:c.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"black"})}),c.jsx("g",{clipPath:"url(#clip1_2838_2)",children:c.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"#4B2ADA"})}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"clip0_2838_2",children:c.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})}),c.jsx("clipPath",{id:"clip1_2838_2",children:c.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})})]})]})}),c.jsxs(Pe,{gutterBottom:!0,variant:"h4",sx:{mb:1,fontWeight:600,fontSize:{xs:"1.5rem",sm:"2rem",md:"2.125rem"}},children:["ื”ื™ื™",e?` ${e}`:"","!"]}),c.jsx(Pe,{gutterBottom:!0,variant:"body1",sx:{mb:{xs:2,sm:3,md:4},color:"text.secondary",textAlign:"center",fontSize:{xs:"0.875rem",sm:"1rem"},px:{xs:1,sm:0}},children:"ืžื” ืชืจืฆื• ืœืขืฉื•ืช ื”ื™ื•ื?"}),c.jsxs(ke,{container:!0,spacing:{xs:2,sm:3},sx:{width:"100%",maxWidth:{xs:"100%",sm:"600px"},px:{xs:0,sm:0}},children:[c.jsx(ke,{item:!0,xs:12,sm:6,children:c.jsx(h3,{sx:{height:"100%",borderRadius:{xs:2,sm:3},boxShadow:0,backgroundColor:"#f5f5f5",transition:"all 0.3s ease-in-out","&:hover":{transform:"translateY(-4px)"}},children:c.jsx(g3,{onClick:r,sx:{height:"100%",p:{xs:2,sm:2.5,md:3},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:{xs:"160px",sm:"180px",md:"200px"}},children:c.jsxs(y3,{sx:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:{xs:1.5,sm:2},p:0},children:[c.jsx(ee,{sx:{width:{xs:40,sm:44,md:48},height:{xs:40,sm:44,md:48},borderRadius:"50%",backgroundColor:"primary.main",display:"flex",alignItems:"center",justifyContent:"center",mb:1},children:c.jsx(Fy,{sx:{fontSize:{xs:20,sm:22,md:24},color:"white"}})}),c.jsx(Pe,{variant:"h6",sx:{fontWeight:600,fontSize:{xs:"1rem",sm:"1.25rem",md:"1.5rem"}},children:"ื”ืชื—ืœ ืžื”ื”ืชื—ืœื”"}),c.jsx(Pe,{variant:"body2",sx:{color:"text.secondary",mt:1,fontSize:{xs:"0.75rem",sm:"0.875rem"},px:{xs:1,sm:0}},children:"ื”ืชื—ืœ ืชื”ืœื™ืš ื—ื“ืฉ ืžื”ื”ืชื—ืœื”"})]})})})}),c.jsx(ke,{item:!0,xs:12,sm:6,children:c.jsx(h3,{sx:{height:"100%",borderRadius:{xs:2,sm:3},boxShadow:0,backgroundColor:"#f5f5f5",transition:"all 0.3s ease-in-out","&:hover":{transform:"translateY(-4px)"}},children:c.jsx(g3,{onClick:o,sx:{height:"100%",p:{xs:2,sm:2.5,md:3},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:{xs:"160px",sm:"180px",md:"200px"}},children:c.jsxs(y3,{sx:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:{xs:1.5,sm:2},p:0},children:[c.jsx(ee,{sx:{width:{xs:40,sm:44,md:48},height:{xs:40,sm:44,md:48},borderRadius:"50%",backgroundColor:"primary.main",display:"flex",alignItems:"center",justifyContent:"center",mb:1},children:c.jsx(qy,{sx:{fontSize:{xs:20,sm:22,md:24},color:"white"}})}),c.jsx(Pe,{variant:"h6",sx:{fontWeight:600,fontSize:{xs:"1rem",sm:"1.25rem",md:"1.5rem"}},children:"ืฆืคื” ื‘ืชื•ืฆืื•ืช"}),c.jsx(Pe,{variant:"body2",sx:{color:"text.secondary",mt:1,fontSize:{xs:"0.75rem",sm:"0.875rem"},px:{xs:1,sm:0}},children:"ืฆืคื” ื‘ืชื•ืฆืื•ืช ื”ืงื•ื“ืžื•ืช ืฉืœืš"})]})})})})]}),c.jsx(ut,{variant:"text",color:"primary",onClick:s,sx:{mt:{xs:2,sm:3,md:4},fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem"},px:{xs:1,sm:2},textAlign:"center",whiteSpace:{xs:"normal",sm:"nowrap"}},children:"ืžื” ื”ื“ื‘ืจ, ื”ื˜ื›ื ื•ืœื•ื’ื™ื” ืฉื”ื›ื™ ื™ื›ื•ืœื” ืœืขื–ื•ืจ ืœื›ื?"})]})}function cj({userName:e="",setActiveStep:t}){const[n,r]=g.useState({title:"",description:"",email:""}),o=()=>{if(!n.title.trim()||!n.description.trim())return;const i=new CustomEvent("business-ai-feature-request",{detail:{title:n.title,description:n.description,email:n.email||void 0,timestamp:new Date().toISOString()},bubbles:!0,composed:!0});window.dispatchEvent(i),t(-1)},s=()=>{t(-1)};return c.jsxs(ee,{sx:{padding:{xs:2,sm:3,md:5},width:{xs:"100%",sm:"500px"},maxWidth:"100%",maxHeight:"100vh",overflowY:"auto",boxSizing:"border-box"},children:[c.jsx(Wo,{label:"Business AI",sx:{p:{xs:1,sm:1.5,md:2},mb:{xs:2,sm:2.5,md:3},fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem"}},icon:c.jsxs("svg",{width:"20",height:"23",viewBox:"0 0 24 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M21 22H23V24H1V22H3V7C3 6.44772 3.44772 6 4 6H14C14.5523 6 15 6.44772 15 7V22H19V14H17V12H20C20.5523 12 21 12.4477 21 13V22ZM5 8V22H13V8H5ZM7 14H11V16H7V14ZM7 10H11V12H7V10Z",fill:"#4B2ADA"}),c.jsx("g",{clipPath:"url(#clip0_2838_2)",children:c.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"black"})}),c.jsx("g",{clipPath:"url(#clip1_2838_2)",children:c.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"#4B2ADA"})}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"clip0_2838_2",children:c.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})}),c.jsx("clipPath",{id:"clip1_2838_2",children:c.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})})]})]})}),c.jsx(Pe,{gutterBottom:!0,variant:"h4",sx:{mb:1,fontWeight:600,fontSize:{xs:"1.5rem",sm:"2rem",md:"2.125rem"}},children:"ืฉืชืคื• ืื•ืชื ื• ืจืขื™ื•ื ื•ืช ื—ื“ืฉื™ื"}),c.jsxs(Pe,{gutterBottom:!0,variant:"body1",sx:{mb:{xs:2,sm:3,md:4},color:"text.secondary",fontSize:{xs:"0.875rem",sm:"1rem"},px:{xs:1,sm:0}},children:[e?`${e}, `:"","ืžื” ื”ืชื›ื•ื ื” ืฉื‘ืจืฆื•ื ืš ืœื‘ืงืฉ? ื ืฉืžื— ืœืฉืžื•ืข ืืช ื”ืจืขื™ื•ื ื•ืช ืฉืœืš!"]}),c.jsx(ee,{sx:{display:"flex",flexDirection:"column",gap:{xs:2,sm:3},mb:{xs:2,sm:3,md:4}},children:c.jsx(qt,{label:"ืชื™ืื•ืจ ืžืคื•ืจื˜",fullWidth:!0,required:!0,multiline:!0,minRows:3,maxRows:8,value:n.description,onChange:i=>r({...n,description:i.target.value}),placeholder:"ืชืืจ ืืช ื”ืชื›ื•ื ื” ื”ืžื‘ื•ืงืฉืช ื‘ืคื™ืจื•ื˜...",sx:{"& .MuiInputBase-input":{fontSize:{xs:"0.875rem",sm:"1rem"}},"& .MuiInputLabel-root":{fontSize:{xs:"0.875rem",sm:"1rem"}}}})}),c.jsxs(ke,{sx:{width:"100%",gap:{xs:1,sm:0}},justifyContent:{xs:"center",sm:"space-between"},container:!0,children:[c.jsx(ke,{item:!0,xs:12,sm:"auto",children:c.jsx(ut,{variant:"text",color:"primary",onClick:s,fullWidth:!0,sx:{fontSize:{xs:"0.875rem",sm:"1rem"},maxWidth:{xs:"100%",sm:"auto"}},children:"ื—ื–ืจื”"})}),c.jsx(ke,{item:!0,xs:12,sm:"auto",children:c.jsx(ut,{disabled:!n.title.trim()||!n.description.trim(),variant:"contained",color:"primary",onClick:o,fullWidth:!0,sx:{fontSize:{xs:"0.875rem",sm:"1rem"},maxWidth:{xs:"100%",sm:"auto"}},children:"ืฉืœื— ื‘ืงืฉื”"})})]})]})}const dj="https://static.intercomassets.com/avatars/5075191/square_128/%D7%AA%D7%9E%D7%95%D7%A0%D7%AA_%D7%A4%D7%A8%D7%95%D7%A4%D7%99%D7%9C_%D7%9E%D7%A6%D7%95%D7%99%D7%A8%D7%AA-1763991463.jpg",fj="ื˜ื•ื‘ ืฉื‘ืืช ",pj=` ื‘ืจื•ื›ื™ื ื”ื‘ืื™ื ืœืžืขืจื›ืช ืฉืœื— ืžืกืจ ๐Ÿš€. ื›ืืŸ ืชื•ื›ืœื• ืœืžืฆื•ื ื›ืœื™ื ืœืฉื•ื•ืง ืืช ื”ืขืกืง ืฉืœื›ื.
681
681
  ื›ื‘ืจ ืขื›ืฉื™ื• ืืคืฉืจ ืœื”ืชื—ื™ืœ ื‘ืฉื™ื—ื” ืงืฆืจื” ื•ืœื”ื›ื™ืจ ืื•ืชื ื•
682
682
  ื ืฉืžื— ืœื”ื›ื™ืจ ืื•ืชืš ื•ืืช ื”ืขืกืง ืฉืœืš ื•ืœืขืฉื•ืช ื™ื—ื“ ืืช ื”ืฆืขื“ื™ื ื”ืจืืฉื•ื ื™ื:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@creaditor/business-ai",
3
3
  "private": false,
4
- "version": "1.0.17",
4
+ "version": "1.0.18",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"