tanya-chatbot 0.6.5 → 0.6.7

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.
@@ -4,7 +4,7 @@
4
4
  ${a?"translate-y-0 md:translate-y-0 md:translate-x-0 opacity-100":"translate-y-full md:translate-y-0 md:translate-x-full opacity-0 pointer-events-none"}
5
5
  `,style:{willChange:"transform, opacity"},onClick:I=>I.stopPropagation(),children:[n.jsxs("div",{className:"mt-3 flex flex-row justify-between w-full ",children:[n.jsx("div",{children:n.jsx("p",{className:"text-[#000000] font-bold font-nunitoSans",children:r.name})}),n.jsx("div",{children:n.jsx("div",{className:"text-[#555555] w-6 h-6 cursor-pointer",onClick:()=>{c(!1),setTimeout(()=>e(te(null)),ve)},children:"✕"})})]}),n.jsxs("div",{className:"flex flex-row gap-2 items-center flex-wrap",children:[n.jsx("div",{className:"flex flex-row items-center justify-center w-[120px] h-[120px] my-5",children:n.jsx("img",{src:(C=(m=(h=(i=r.imageGroups)==null?void 0:i[0])==null?void 0:h.images)==null?void 0:m[0])==null?void 0:C.link,alt:r.name,className:"rounded-[10px]"})}),n.jsx("div",{className:"flex flex-col items-center gap-2",children:r.imageGroups.slice(1,2).map(I=>I.images.slice(1,2).map($=>n.jsx("img",{src:$.link,alt:r.name,className:"rounded-[10px] w-[60px] h-[60px]"},$.link)))})]}),n.jsxs("div",{className:"flex flex-row items-center justify-between w-full",children:[n.jsxs("div",{className:"flex flex-row items-center gap-2",children:[n.jsxs("p",{className:"text-[#14121F] font-bold font-nunitoSans",children:[" ","$",r.price.toFixed(2)]})," ",n.jsxs("p",{className:"text-[#14121F] font-normal line-through text-sm font-nunitoSans",children:[" ","$",(r.price+5).toFixed(2)]})]}),n.jsx("div",{children:n.jsx("p",{className:"text-[#EC5050] font-bold font-nunitoSans",children:r.discount})})]}),n.jsx("div",{className:"mt-2 w-full border-t-2 border-gray-200"}),n.jsxs("div",{className:"w-full text-left",children:[n.jsx("div",{className:"text-[#323135] font-bold font-nunitoSans mt-3 text-[14px]",children:"Product Details"}),n.jsx("div",{className:"text-[#68656E] font-normal font-nunitoSans text-xs pl-2 mt-3",dangerouslySetInnerHTML:{__html:r.short_description||r.longDescription}})]}),n.jsxs("div",{className:"mt-4 flex flex-col gap-2 w-full p-2",children:[n.jsx("div",{className:"flex flex-row items-center gap-2",children:n.jsxs("div",{className:"flex items-center gap-2 text-left font-nunitoSans",children:[n.jsxs("div",{className:"text-[#323135] font-bold",children:[((v=r==null?void 0:r.rating)==null?void 0:v.rate)||0," /"," ",n.jsx("span",{className:"text-[#68656E]",children:"5"})]}),n.jsx("div",{className:"text-[#323135] font-semibold text-sm",children:"Overall Rating"}),n.jsxs("div",{className:"text-[#68656E] font-semibold text-sm",children:[((R=r==null?void 0:r.rating)==null?void 0:R.count)||0," ratings"]})]})}),n.jsx("div",{className:"mt-2 flex flex-row items-center gap-2",children:Array.from({length:5}).map((I,$)=>{var W;return n.jsx(or.Icon,{icon:"mdi:star",width:"20",height:"20",className:`text-yellow-500
6
6
  ${((W=r==null?void 0:r.rating)==null?void 0:W.rate)>$?"text-yellow-500":"text-gray-300"}
7
- `},$)})})]}),n.jsxs("div",{className:"flex flex-col items-center justify-between font-nunitoSans font-semibold w-5/6 text-black gap-2",style:{marginTop:"70px"},children:[n.jsx("button",{className:"rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",style:{backgroundColor:o.tanyaThemeColor},onClick:l,children:"Add to Cart"}),n.jsx("button",{className:"rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",style:{backgroundColor:o.tanyaThemeColor},onClick:d,children:"View more"})]})]})]})},jr=({tanyaConfig:t,basketId:e,addToCart:r})=>{const o=["Myself","My Child","My Grandchild","Niece/Nephew","My Friends","Others"],a={Myself:"himself/herself","My Child":"his/her child","My Grandchild":"his/her grandchild","Niece/Nephew":"his/her niece/nephew","My Friends":"his/her friends",Others:"others"},c=p.useRef(null),l=p.useRef(null),d=p.useRef(null),i=p.useRef(null),[h,m]=p.useState(null);p.useRef(null);const[C,v]=p.useState(!1),[R,I]=p.useState(!1),[$,W]=p.useState(!1),[ct,H]=p.useState(!1),[dt,kt]=p.useState(!1),[Et,ut]=p.useState(!1),[St,jt]=p.useState(""),[ft,Tt]=p.useState(""),Pt=s=>({id:s.id,title:s.name,image:s.image??"",price:s.price??0}),[rt,L]=p.useState([]),k=p.useRef(null),x=at.useSelector(s=>s.store.store),pt=at.useSelector(s=>s.product.product);p.useEffect(()=>{const s=localStorage.getItem(`access_token_${t.siteId}`),b=localStorage.getItem(`chat-token-${t.siteId}`);if(s&&b===s){const w=localStorage.getItem("chatHistory");w&&L(JSON.parse(w))}else localStorage.setItem("chatHistory",JSON.stringify([])),localStorage.setItem(`chat-token-${t.siteId}`,s||"")},[]),p.useEffect(()=>{localStorage.setItem("chatHistory",JSON.stringify(rt));const s=localStorage.getItem(`access_token_${t.siteId}`);s&&localStorage.setItem(`chat-token-${t.siteId}`,s)},[rt]);const Kt=()=>{W(!0),setTimeout(()=>I(!0),10)},Ot=()=>{I(!1),setTimeout(()=>W(!1),300)};p.useEffect(()=>{C?Kt():Ot()},[C]);const $t=s=>{Tt(a[s])};p.useEffect(()=>{$&&k.current&&k.current.scrollTo({top:k.current.scrollHeight,behavior:"smooth"})},[rt,$]);let A=null,ht=null;const zt=async()=>{if(A&&ht&&Date.now()<ht)return A;try{const s="https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token",b=new URLSearchParams({grant_type:"client_credentials",client_id:"4i8rd70sgt961tc4dhskgf08c",client_secret:"bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",scope:"default-m2m-resource-server-8xzfzo/read"}),w=await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:b});if(!w.ok)throw new Error(`Token request failed! status: ${w.status}`);const j=await w.json();A=j.access_token;const S=j.expires_in||3600;return ht=Date.now()+(S-60)*1e3,A}catch(s){return console.error("Error obtaining JWT token:",s),A=null,ht=null,null}},y=async()=>{const s=await Nt();s!=null&&m(s)};p.useEffect(()=>{if(t!=null&&t.siteId){const{clientID:s,host:b,organizationID:w,shortCode:j,siteId:S}=t;sessionStorage.setItem("Host",b),sessionStorage.setItem("SiteId",S),sessionStorage.setItem("pubCfg",btoa(s)),sessionStorage.setItem("envRef",j),sessionStorage.setItem("orgRef",w)}y(),console.log("scapi environment v1")},[]),p.useEffect(()=>{e&&(console.log("setting the basket id",e),nt(e))},[e]);const G=async()=>{const s=JSON.parse(sessionStorage.getItem("customerData")||"{}").customerId;return(await wr(s||"")).c_interests},_t=async(s,b)=>{console.log("in secondary flow",Dt);const w=await G();if(console.log(w,"interests of customer",Dt),!!w)try{L(U=>U.map((V,Y)=>Y===U.length-1?{...V,secondaryLoading:!0}:V));const j=await zt();if(!j)throw new Error("Failed to fetch token");const S=localStorage.getItem("customerNumber"),g=localStorage.getItem("isLoggedIn"),P=`https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({registered:String(g||!1),userId:String(S||new Date().getTime())}).toString()}`,_=JSON.stringify({flowId:"Q166PR519W",flowAliasId:"HKFUVLWVH2",input:{loyaltyPoints:"",productName:s,productPoints:String(b||0),interests:w}}),E=await fetch(P,{signal:AbortSignal.timeout(3e4),method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${j}`},body:_});if(!E.body)throw new Error("Readable stream not supported");const X=E.body.getReader(),mt=new TextDecoder;let B="";for(;;){const{done:U,value:V}=await X.read();if(U)break;B+=mt.decode(V,{stream:!0});const Y=B.split(`
7
+ `},$)})})]}),n.jsxs("div",{className:"flex flex-col items-center justify-between font-nunitoSans font-semibold w-5/6 text-black gap-2",style:{marginTop:"40px"},children:[n.jsx("button",{className:"rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",style:{backgroundColor:o.tanyaThemeColor},onClick:l,children:"Add to Cart"}),n.jsx("button",{className:"rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",style:{backgroundColor:o.tanyaThemeColor},onClick:d,children:"View more"})]})]})]})},jr=({tanyaConfig:t,basketId:e,addToCart:r})=>{const o=["Myself","My Child","My Grandchild","Niece/Nephew","My Friends","Others"],a={Myself:"himself/herself","My Child":"his/her child","My Grandchild":"his/her grandchild","Niece/Nephew":"his/her niece/nephew","My Friends":"his/her friends",Others:"others"},c=p.useRef(null),l=p.useRef(null),d=p.useRef(null),i=p.useRef(null),[h,m]=p.useState(null);p.useRef(null);const[C,v]=p.useState(!1),[R,I]=p.useState(!1),[$,W]=p.useState(!1),[ct,H]=p.useState(!1),[dt,kt]=p.useState(!1),[Et,ut]=p.useState(!1),[St,jt]=p.useState(""),[ft,Tt]=p.useState(""),Pt=s=>({id:s.id,title:s.name,image:s.image??"",price:s.price??0}),[rt,L]=p.useState([]),k=p.useRef(null),x=at.useSelector(s=>s.store.store),pt=at.useSelector(s=>s.product.product);p.useEffect(()=>{const s=localStorage.getItem(`access_token_${t.siteId}`),b=localStorage.getItem(`chat-token-${t.siteId}`);if(s&&b===s){const w=localStorage.getItem("chatHistory");w&&L(JSON.parse(w))}else localStorage.setItem("chatHistory",JSON.stringify([])),localStorage.setItem(`chat-token-${t.siteId}`,s||"")},[]),p.useEffect(()=>{localStorage.setItem("chatHistory",JSON.stringify(rt));const s=localStorage.getItem(`access_token_${t.siteId}`);s&&localStorage.setItem(`chat-token-${t.siteId}`,s)},[rt]);const Kt=()=>{W(!0),setTimeout(()=>I(!0),10)},Ot=()=>{I(!1),setTimeout(()=>W(!1),300)};p.useEffect(()=>{C?Kt():Ot()},[C]);const $t=s=>{Tt(a[s])};p.useEffect(()=>{$&&k.current&&k.current.scrollTo({top:k.current.scrollHeight,behavior:"smooth"})},[rt,$]);let A=null,ht=null;const zt=async()=>{if(A&&ht&&Date.now()<ht)return A;try{const s="https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token",b=new URLSearchParams({grant_type:"client_credentials",client_id:"4i8rd70sgt961tc4dhskgf08c",client_secret:"bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",scope:"default-m2m-resource-server-8xzfzo/read"}),w=await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:b});if(!w.ok)throw new Error(`Token request failed! status: ${w.status}`);const j=await w.json();A=j.access_token;const S=j.expires_in||3600;return ht=Date.now()+(S-60)*1e3,A}catch(s){return console.error("Error obtaining JWT token:",s),A=null,ht=null,null}},y=async()=>{const s=await Nt();s!=null&&m(s)};p.useEffect(()=>{if(t!=null&&t.siteId){const{clientID:s,host:b,organizationID:w,shortCode:j,siteId:S}=t;sessionStorage.setItem("Host",b),sessionStorage.setItem("SiteId",S),sessionStorage.setItem("pubCfg",btoa(s)),sessionStorage.setItem("envRef",j),sessionStorage.setItem("orgRef",w)}y(),console.log("scapi environment v1")},[]),p.useEffect(()=>{e&&(console.log("setting the basket id",e),nt(e))},[e]);const G=async()=>{const s=JSON.parse(sessionStorage.getItem("customerData")||"{}").customerId;return(await wr(s||"")).c_interests},_t=async(s,b)=>{console.log("in secondary flow",Dt);const w=await G();if(console.log(w,"interests of customer",Dt),!!w)try{L(U=>U.map((V,Y)=>Y===U.length-1?{...V,secondaryLoading:!0}:V));const j=await zt();if(!j)throw new Error("Failed to fetch token");const S=localStorage.getItem("customerNumber"),g=localStorage.getItem("isLoggedIn"),P=`https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({registered:String(g||!1),userId:String(S||new Date().getTime())}).toString()}`,_=JSON.stringify({flowId:"Q166PR519W",flowAliasId:"HKFUVLWVH2",input:{loyaltyPoints:"",productName:s,productPoints:String(b||0),interests:w}}),E=await fetch(P,{signal:AbortSignal.timeout(3e4),method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${j}`},body:_});if(!E.body)throw new Error("Readable stream not supported");const X=E.body.getReader(),mt=new TextDecoder;let B="";for(;;){const{done:U,value:V}=await X.read();if(U)break;B+=mt.decode(V,{stream:!0});const Y=B.split(`
8
8
  `);B=Y.pop()||"";for(const Q of Y)if(Q.startsWith("data:")){const u=Q.slice(5).trim();try{const K=JSON.parse(u);K.index===0&&L(F=>F.map((z,Z)=>Z===F.length-1?{...z,secondaryResponse:K.data,secondaryLoading:!1}:z))}catch(K){L(F=>F.map((z,Z)=>Z===F.length-1?{...z,secondaryLoading:!1}:z)),console.error("Secondary flow JSON parse error:",K)}}}}catch(j){console.error("Secondary flow error:",j)}},q=async s=>{const b=s||St.trim();if(b){kt(!0),jt(""),c.current=null,l.current=null,d.current=null,i.current=null,L(w=>[...w,{query:b,response:"Thinking for what suits you best...",potentialQuestions:"",products:[],keywords:"Thinking for best products..."}]);try{const w=ft,j=localStorage.getItem("customerNumber"),S=localStorage.getItem("isLoggedIn"),g=await zt();if(!g)throw new Error("Failed to obtain access token");const P=`https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({registered:String(S||!1),userId:String(j||new Date().getTime())}).toString()}`,_=JSON.stringify({flowId:"MMHQKYI1NE",flowAliasId:"SZF9ZK1ATE",input:{userPrompt:b,whom:w}}),E=await fetch(P,{signal:AbortSignal.timeout(3e4),method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${g}`},body:_});if(!E.ok)throw new Error(`HTTP error! status: ${E.status}`);if(!E.body)throw new Error("Readable stream not supported");const X=E.body.getReader(),mt=new TextDecoder;let B="",U="";for(;;){ut(!0);const{done:V,value:Y}=await X.read();if(V)break;B+=mt.decode(Y,{stream:!0});const Q=B.split(`
9
9
  `);B=Q.pop()||"";for(const u of Q)if(u.startsWith("data:")){const K=u.slice(5).trim();try{const F=JSON.parse(K);F.index==1&&(U=F.data),L(z=>z.map((Z,At)=>At===z.length-1?{...Z,[F.index==0?"response":F.index==1?"keywords":F.index==2?"potentialQuestions":"end"]:F.data}:Z))}catch(F){console.error("Error parsing JSON:",F)}}}Xe(Ge(U))}catch(w){console.error("Error sending message to Tanya:",w)}finally{kt(!1)}}},Ge=s=>{const b=s.match(/top five relevant product or category names are: (.*)/i),S=(b?b[1]:s).split(", ").map(D=>D.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi,"").trim());return[...new Set(S)].filter(Boolean).join(",")},Xe=async s=>{var w,j,S;const b=typeof s=="string"?s.split(","):s;ut(!0);try{const g=await Promise.all(b.map(_=>mr(_).catch(()=>[]))),D=b.map((_,E)=>({keyword:_,items:g[E]??[],loading:!1})).filter(_=>_.items.length>0),P=(j=(w=D[0])==null?void 0:w.items)==null?void 0:j[0];if(P){l.current=P.product_id,c.current=P.product_name,d.current=(S=P.image)==null?void 0:S.link;const _=typeof P.price=="number"?P.price:null;i.current=_}if(L(_=>_.map((E,X)=>X===_.length-1?{...E,products:D,productSnapshot:P?{id:l.current,name:c.current,image:d.current,price:i.current,points:0,quantity:1}:E.productSnapshot}:E)),P){const _=JSON.parse(sessionStorage.getItem("customerData")||"{}");_!=null&&_.isGuest||(console.log("running secondary flow",Dt),_t(c.current,0))}}catch(g){console.error("error in keyword search",g)}finally{ut(!1)}},Qe=async(s,b)=>{var w,j,S,g,D,P,_,E,X,mt,B,U,V,Y,Q;H(!0);try{const u=await Le(s.id);if(!((j=(w=u==null?void 0:u.variants)==null?void 0:w[0])!=null&&j.product_id||(g=(S=u==null?void 0:u.variants)==null?void 0:S[0])!=null&&g.productId)&&!(u.type.item||u.type.bundle)){H(!1),M.toast.error("Variants not found",{position:"bottom-right",autoClose:1e3}),console.error("No product variant found");return}const K=[{product_id:((D=u.variants)==null?void 0:D[0].product_id)||((P=u.variants)==null?void 0:P[0].productId)||(u==null?void 0:u.id),quantity:b}];console.log(K,"product data","app version",Dt);const F=JSON.parse(sessionStorage.getItem("customerData")||"{}"),z=(F==null?void 0:F.basketId)||localStorage.getItem(Ht),Z=!1,At=localStorage.getItem(Ft),he=Date.now();if(!Z||!At||he>=parseInt(At)){const Ze=await Ae();let{customer_token:wt}=await De(Ze);if(wt="Bearer "+h.access_token,!wt){console.error("Failed to get customer_token");return}const tr=he+300*1e3;if(Vt(wt),localStorage.setItem(Ft,tr.toString()),console.log(z,"basketIdFromCustomer"),z){const me=await Be({basketId:z,customer_token:wt});if(me.status===200&&me){const Jt=await ee(z,K,wt);((_=Jt==null?void 0:Jt.product_items)==null?void 0:_.length)>0&&(M.toast.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),Rt(z),H(!1));return}}const er={productItems:[{productId:((E=u.variants)==null?void 0:E[0].product_id)||((X=u.variants)==null?void 0:X[0].productId)||(u==null?void 0:u.id),quantity:1}]},f=await qe(wt,er);if(console.log(f,f==null?void 0:f.basket_id,f==null?void 0:f.basketId,"the basket response"),!(f!=null&&f.basket_id||!(f!=null&&f.basketId))){H(!1),console.error("Failed to create basket");return}nt((f==null?void 0:f.basket_id)||(f==null?void 0:f.basketId));const gt=await r({productId:l,quantity:b},(f==null?void 0:f.basket_id)||(f==null?void 0:f.basketId));(((mt=gt==null?void 0:gt.product_items)==null?void 0:mt.length)>0||((B=gt==null?void 0:gt.productItems)==null?void 0:B.length)>0)&&M.toast.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),Rt(f.basket_id||(f==null?void 0:f.basketId))}}catch(u){H(!1),console.error("Error adding to cart:",u),M.toast.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}),((U=u==null?void 0:u.response)==null?void 0:U.status)===404||((V=u==null?void 0:u.response)==null?void 0:V.status)===401?(((Y=u==null?void 0:u.response)==null?void 0:Y.status)===404&&nt(null),((Q=u==null?void 0:u.response)==null?void 0:Q.status)===401&&(nt(null),Vt(null))):(console.error("Failed to add product to basket:",u.message),M.toast.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}))}H(!1)};return p.useEffect(()=>{$?setTimeout(()=>I(!0),10):I(!1)},[$]),n.jsx("div",{className:"relative flex justify-center",children:n.jsxs(pr,{open:C,onOpenChange:v,children:[n.jsx(hr,{onClick:()=>v(!0),style:{},className:"flex items-center rounded-lg cursor-pointer hover:opacity-90 transition-opacity p-0",children:n.jsx("div",{className:"flex flex-col",children:n.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsxs("g",{clipPath:"url(#clip0_958_585)",children:[n.jsx("path",{d:"M30.0002 5C31.7683 5 33.464 5.70238 34.7142 6.95262C35.9644 8.20286 36.6668 9.89856 36.6668 11.6667V25C36.6668 26.7681 35.9644 28.4638 34.7142 29.714C33.464 30.9643 31.7683 31.6667 30.0002 31.6667H25.6902L21.1785 36.1783C20.8915 36.4653 20.5097 36.6377 20.1046 36.6631C19.6996 36.6886 19.2992 36.5654 18.9785 36.3167L18.8218 36.1783L14.3085 31.6667H10.0002C8.28976 31.6667 6.64478 31.0093 5.40548 29.8305C4.16617 28.6516 3.42735 27.0416 3.34183 25.3333L3.3335 25V11.6667C3.3335 9.89856 4.03588 8.20286 5.28612 6.95262C6.53636 5.70238 8.23205 5 10.0002 5H30.0002Z",fill:"url(#paint0_linear_958_585)"}),n.jsx("path",{d:"M28.3335 15.6511V11.6667C28.3335 11.6667 22.2774 12.6042 20.1148 15.4167C17.9521 18.2292 18.6644 26.6667 18.6644 26.6667H22.5321C22.5321 26.6667 22.0614 18.9323 23.4989 17.2917C24.9364 15.6511 28.3335 15.6511 28.3335 15.6511Z",fill:"white"}),n.jsx("path",{d:"M13.3335 11.6667H19.6184V15.4167H13.3335V11.6667Z",fill:"white"})]}),n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:"paint0_linear_958_585",x1:"20.0002",y1:"5",x2:"35.0002",y2:"30",gradientUnits:"userSpaceOnUse",children:[n.jsx("stop",{stopColor:"#452697"}),n.jsx("stop",{offset:"1",stopColor:"#7C5BFF"})]}),n.jsx("clipPath",{id:"clip0_958_585",children:n.jsx("rect",{width:"40",height:"40",fill:"white"})})]})]})})}),$&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"fixed inset-0 z-40 bg-black/30",onClick:()=>v(!1)}),n.jsxs("div",{className:`
10
10
  fixed z-50 h-screen w-[100vw] sm:w-[80vw] md:w-[770px] border-0 bg-white lg:rounded-l-xl overflow-hidden flex flex-col shadow-[0px_4px_10px_0px_#5F499840]