ed-widget 1.26.0 → 1.27.0
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.
- package/dist/ed-widget.js +3 -3
- package/npm/ed-widget.js +3 -3
- package/package.json +1 -1
package/dist/ed-widget.js
CHANGED
|
@@ -347,7 +347,7 @@ Valid keys: `+JSON.stringify(Object.keys(ne),null," "));var ae=Ne(je,Oe,be,Fe,k
|
|
|
347
347
|
<h6 className="ed-text-14 ed-font-semibold ed-text-border-dark">Email</h6>
|
|
348
348
|
<p className="ed-text-border-regular ed-truncate">${b==null?void 0:b.contact_person_email}</p>
|
|
349
349
|
</div>
|
|
350
|
-
</div>`,is_customer_reply:!0},{message:d?s:a,is_customer_reply:!1}]}}}),N=T==null?void 0:T.createAConversationForPortal;N!=null&&N.id&&(n(N==null?void 0:N.id),Fw("easydesk_chat_widget_conversation_id",N==null?void 0:N.id,{expires:30}),t==null||t({contact_person_name:b==null?void 0:b.contact_person_name,contact_person_email:b==null?void 0:b.contact_person_email}))}catch(T){const{message:N,response:M}=T;Jr("error",((P=M==null?void 0:M.data)==null?void 0:P.message)||N,"top-left")}},O=D=>{const{name:P,value:T}=D.target;S(N=>({...N,[P]:T}))},k=z.useMemo(()=>!(b!=null&&b.contact_person_name)||!(b!=null&&b.contact_person_email)||!jw(b==null?void 0:b.contact_person_email),[b]);return z.useEffect(()=>{const D=setTimeout(()=>{y(!1)},1e3);return()=>clearTimeout(D)},[]),F.jsxs("div",{className:"ed-space-y-5",children:[F.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[F.jsx("div",{children:F.jsx(Wu,{className:"ed-size-7 ed-object-cover ed-rounded-full",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:f==null?void 0:f.logo_icon_key,defaultImageName:sh(f==null?void 0:f.name)})}),F.jsxs("div",{children:[F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[F.jsx("p",{className:"ed-text-border-regular",children:f==null?void 0:f.name}),F.jsx("span",{className:"ed-text-border ed-font-medium",children:b1().format("HH:MM")})]}),m?F.jsx("div",{className:"ed-py-4",children:F.jsx(hx,{})}):F.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-rounded-lg ed-mt-2",children:F.jsx("p",{className:"ed-text-border-dark",children:u})})]})]}),!m&&F.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto",children:F.jsxs("form",{onSubmit:x,className:"ed-p-5 ed-rounded-[20px] ed-bg-white-light ed-space-y-5",children:[F.jsxs("div",{className:"ed-space-y-2",children:[F.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Name ",F.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),F.jsx("input",{type:"text",name:"contact_person_name",required:!0,placeholder:"Enter your name",value:b==null?void 0:b.contact_person_name,onChange:O,disabled:p,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),F.jsxs("div",{className:"ed-space-y-2",children:[F.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Email ",F.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),F.jsx("input",{type:"email",name:"contact_person_email",required:!0,placeholder:"Enter your email",value:b==null?void 0:b.contact_person_email,onChange:O,disabled:p,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),F.jsx("div",{className:"ed-flex ed-justify-end",children:F.jsx(Sh,{title:"Submit",loaderText:"Submitting",fullWidthBtn:!0,disabled:k||C,loader:m||C,callBack:x})})]})})]})},_G=({height:t="48",width:e="49"})=>F.jsx("svg",{width:e,height:t,viewBox:"0 0 49 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:F.jsx("path",{d:"M42.5 23.0001C42.5069 25.6398 41.8901 28.2438 40.7 30.6001C39.2889 33.4235 37.1195 35.7984 34.4349 37.4586C31.7503 39.1188 28.6565 39.9988 25.5 40.0001C22.8603 40.0069 20.2562 39.3902 17.9 38.2001L6.5 42.0001L10.3 30.6001C9.10986 28.2438 8.49312 25.6398 8.5 23.0001C8.50122 19.8436 9.38122 16.7498 11.0414 14.0652C12.7017 11.3806 15.0765 9.21119 17.9 7.80006C20.2562 6.60992 22.8603 5.99317 25.5 6.00006H26.5C30.6687 6.23004 34.6061 7.98958 37.5583 10.9418C40.5105 13.894 42.27 17.8314 42.5 22.0001V23.0001Z",fill:"white",stroke:"#00A1E0",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),wG=()=>F.jsxs("svg",{width:"192",height:"165",viewBox:"0 0 192 165",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{opacity:"0.4",d:"M124.365 148.68H57.3652L63.8177 119.68H117.913L124.365 148.68Z",fill:"#44A9F1"}),F.jsx("path",{opacity:"0.4",d:"M173.775 119.874H7.99173C3.77973 119.874 0.365234 116.459 0.365234 112.247V7.80619C0.365234 3.59419 3.77973 0.179688 7.99173 0.179688H173.775C177.987 0.179688 181.402 3.59419 181.402 7.80619V112.247C181.402 116.459 177.987 119.874 173.775 119.874Z",fill:"#44A9F1"}),F.jsx("path",{d:"M169.382 107.314H12.3843C8.17232 107.314 4.75781 103.9 4.75781 99.6877V11.4077C4.75781 7.19575 8.17232 3.78125 12.3843 3.78125H169.382C173.594 3.78125 177.009 7.19575 177.009 11.4077V99.6877C177.009 103.9 173.594 107.314 169.382 107.314Z",fill:"white"}),F.jsx("path",{opacity:"0.4",d:"M138.348 159.397H43.418V154.811C43.418 151.265 46.2925 148.391 49.8385 148.391H131.927C135.473 148.391 138.348 151.265 138.348 154.811V159.397Z",fill:"#44A9F1"}),F.jsx("path",{d:"M10.375 107.312H168.21",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("path",{d:"M47.5977 157.107V154.699C47.5977 153.243 48.7781 152.062 50.2346 152.062H121.432",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("path",{d:"M113.863 123.398L116.385 142.66",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("path",{d:"M89.2912 117.684C91.331 117.684 92.9847 116.03 92.9847 113.99C92.9847 111.951 91.331 110.297 89.2912 110.297C87.2513 110.297 85.5977 111.951 85.5977 113.99C85.5977 116.03 87.2513 117.684 89.2912 117.684Z",fill:"white"}),F.jsx("path",{d:"M141.84 10.8125H161.445C165.181 10.8125 168.209 13.841 168.209 17.577V58.3125",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("g",{opacity:"0.5",children:F.jsx("path",{d:"M88.1608 69.8837C88.0874 66.9345 88.253 64.5539 88.6584 62.7429C89.0634 60.9321 89.8966 59.2607 91.1596 57.7286C91.8875 56.8101 92.7171 56.0144 93.6518 55.3405C94.5848 54.6678 95.4423 53.9582 96.2249 53.213C97.0058 52.469 97.6603 51.639 98.1883 50.7253C98.7159 49.8117 98.9617 48.6306 98.9257 47.1804C98.8644 44.7316 98.1469 43.0353 96.7729 42.0943C95.3989 41.1533 93.7863 40.7055 91.9372 40.7516C89.2865 40.8179 87.4805 41.6012 86.518 43.1003C85.5544 44.6005 84.9787 46.6032 84.7917 49.1089L75.1185 49.3502C75.0577 46.9012 75.4013 44.6662 76.1517 42.6464C76.9013 40.6275 77.9965 38.8991 79.4365 37.4622C80.8761 36.0265 82.6238 34.9069 84.6804 34.105C86.7351 33.3035 89.0133 32.8716 91.5136 32.8092C96.9126 32.6746 101.201 33.6687 104.382 35.79C107.56 37.9127 109.212 41.4473 109.335 46.3966C109.375 47.9972 109.247 49.4003 108.953 50.6083C108.657 51.8161 108.196 52.9155 107.572 53.9068C106.945 54.8976 106.168 55.8304 105.24 56.7039C104.311 57.578 103.258 58.479 102.081 59.4086C101.002 60.2865 100.135 61.0962 99.4778 61.837C98.821 62.5793 98.3267 63.3549 97.9977 64.1625C97.6672 64.9714 97.4633 65.8153 97.3853 66.6912C97.3066 67.5691 97.2818 68.5583 97.3095 69.6569L88.1608 69.8837ZM88.2219 84.3642L87.977 74.5405L98.1001 74.2883L98.345 84.112L88.2219 84.3642Z",fill:"#44A9F1"})}),F.jsx("path",{d:"M189.428 162.528C186.451 165.558 181.581 165.6 178.551 162.622L142.516 127.208L153.299 116.236L189.333 151.65C192.364 154.628 192.406 159.498 189.428 162.528Z",fill:"#004E92"}),F.jsx("path",{opacity:"0.2",d:"M156.307 99.3327C156.268 82.1553 142.311 68.2623 125.133 68.3018C107.956 68.3413 94.0628 82.2984 94.1023 99.4757C94.1418 116.653 108.099 130.546 125.276 130.507C142.454 130.467 156.347 116.51 156.307 99.3327Z",fill:"#F8F9FB"}),F.jsx("path",{d:"M99.6105 74.257C85.7147 88.3958 85.9121 111.123 100.051 125.018C114.19 138.914 136.917 138.717 150.813 124.577C164.709 110.439 164.511 87.7118 150.372 73.816C136.232 59.9202 113.506 60.1176 99.6105 74.257ZM146.295 120.137C134.851 131.781 116.136 131.944 104.491 120.5C92.8472 109.057 92.6847 90.341 104.128 78.6972C115.571 67.0533 134.287 66.8909 145.932 78.3342C157.576 89.777 157.738 108.493 146.295 120.137Z",fill:"#004E92"}),F.jsx("path",{d:"M156.613 124.724L185.106 152.727",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("path",{d:"M91.8946 96.8405C91.0045 105.663 94.0498 114.81 100.05 121.339C106.052 127.869 114.91 131.672 123.777 131.527",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})]}),CG=({height:t="238",width:e="300"})=>F.jsxs("svg",{width:e,height:t,viewBox:"0 0 300 238",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M59.041 51C59.041 51 177.481 15.24 231.121 19.26C231.121 19.26 256.261 126.48 250.321 133.08C244.381 139.68 87.121 166.2 82.681 162.84C78.241 159.48 59.041 51 59.041 51Z",fill:"#00A1E0"}),F.jsx("path",{d:"M77.7021 72.12C77.7021 72.12 77.5221 74.58 78.1821 74.64C78.8421 74.7 89.4021 72.42 89.4021 72.42C89.4021 72.42 93.1821 97.92 94.5621 98.34C95.9421 98.76 99.7221 97.32 99.7221 97.32L93.9621 71.22C93.9621 71.22 106.562 69.3 106.442 68.52L106.082 66.54L77.7021 72.12Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M109.98 66.4201C110.16 66.3601 110.28 66.3001 110.46 66.2401C111.54 65.7601 114.06 64.6201 114.6 65.5201C115.26 66.6601 117.72 77.3401 117.72 77.3401L130.2 74.8801C130.2 74.8801 127.56 62.6401 128.28 62.1601C129 61.6801 131.82 61.1401 132.54 61.3201C133.26 61.5001 138.18 87.6601 138 89.0401C137.82 90.4201 134.28 90.9601 133.8 90.3601C133.32 89.7601 130.92 77.1601 130.92 77.1601L117.84 79.1401C117.84 79.1401 120.72 93.1201 119.94 93.6601C119.16 94.2001 116.76 94.8001 115.86 94.4401C114.96 94.0801 109.98 66.4201 109.98 66.4201Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M144.841 88.6799C145.681 88.3199 146.521 87.8399 147.181 87.2399C147.841 86.4599 150.901 65.2199 150.901 65.2199C150.901 65.2199 163.441 85.2599 164.041 84.9599C164.641 84.6599 169.321 83.3999 169.321 83.3999C169.321 83.3999 152.701 56.9999 151.381 57.2999L150.061 57.5999C150.061 57.5999 143.641 87.8399 144.841 88.6799Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M147.781 77.3999L159.181 75.1799L158.821 73.4399L148.501 74.9399L147.061 77.5799L147.781 77.3999Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M175.26 81.6601C175.26 81.6601 176.4 81.9601 176.7 81.3601C177 80.7601 172.08 58.0201 172.08 58.0201C172.08 58.0201 192.72 77.9401 194.1 77.8801C194.88 77.8801 195.66 77.7601 196.44 77.6401C196.44 77.6401 191.88 50.6401 191.04 50.2201C190.2 49.8001 188.34 50.7601 188.34 50.7601L192.54 70.5001C192.54 70.5001 174.48 53.1001 173.46 53.4601C172.44 53.8201 169.74 53.8201 168.9 54.3601C168.06 54.9001 175.26 81.6601 175.26 81.6601Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M203.941 76.2001C203.941 76.2001 208.261 76.0201 208.501 75.3001C208.741 74.5801 206.161 63.5401 206.161 63.5401C206.161 63.5401 221.461 73.0201 223.021 72.7201C224.581 72.4201 229.741 71.6401 229.561 71.1601C229.381 70.6801 208.681 60.2401 208.681 60.2401C208.681 60.2401 219.661 46.2601 219.481 45.4201C219.301 44.5801 215.281 45.1201 215.281 45.1201L205.381 60.1201C205.381 60.1201 203.341 47.5201 202.981 47.5201C202.621 47.5201 198.001 48.5401 197.881 49.0201C197.761 49.5001 203.941 76.2001 203.941 76.2001Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M118.08 111.36C118.08 111.36 130.92 124.02 131.4 125.52C131.88 127.02 133.38 135.54 134.28 136.2C135.18 136.86 137.22 135.9 137.88 135.48C138.54 135.06 135.72 124.5 135.72 124.5C135.72 124.5 143.58 105.54 142.56 105.3C141.54 105.06 139.26 105.96 139.26 105.96L133.92 121.8C133.92 121.8 122.82 109.2 121.8 109.44C120.78 109.68 116.94 110.22 118.08 111.36Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M177.84 98.3397C177.84 98.3397 182.94 96.5997 183.24 97.8597C183.54 99.1197 185.28 119.82 189.84 122.16C194.4 124.5 202.2 120 201.78 116.04C201.36 112.08 198 95.5797 198.78 95.0397C199.56 94.4997 201.36 93.7197 201.78 96.4197C202.2 99.1197 207.18 115.62 202.62 120.3C198.06 124.98 185.46 128.1 181.98 119.34C178.5 110.58 177.84 98.3397 177.84 98.3397Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M173.581 111.6C170.881 103.56 162.061 100.2 155.881 102.54C155.881 102.54 147.421 105.24 146.161 113.82C144.901 122.4 151.321 131.52 161.521 130.92C171.721 130.32 176.281 119.64 173.581 111.6ZM162.481 127.74C155.761 127.92 151.201 120.54 151.861 113.76C152.521 106.98 157.981 105.12 157.981 105.12C162.001 103.44 167.941 106.38 169.981 112.8C172.021 119.22 169.201 127.56 162.481 127.74Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M52.2605 112.2L49.5005 111C53.2205 102.3 53.2805 99.9603 53.1605 99.3603C52.2605 99.3603 49.9205 100.62 48.3605 101.46C45.1805 103.14 41.6405 105 38.5805 104.76C36.4805 104.58 35.5805 103.5 35.2205 102.6C33.3005 98.0403 41.8205 87.4203 44.4605 84.3003L46.7405 86.2203C41.8805 91.9803 37.2005 99.4803 37.9805 101.46C38.0405 101.64 38.3405 101.76 38.8205 101.82C40.9805 102 44.2805 100.26 46.9805 98.8203C50.5805 96.9003 53.4605 95.4003 55.2605 97.0803C57.3605 99.0003 55.7405 104.1 52.2605 112.2Z",fill:"#00A1E0"}),F.jsx("path",{d:"M258.481 51.3602L256.621 49.0202C258.541 47.4602 258.961 46.5602 259.021 46.3202C258.781 46.2002 258.001 45.7802 255.481 45.8402C252.241 45.9002 250.381 45.1202 249.841 43.3802C248.941 40.5602 252.661 37.6202 254.881 36.1202C255.721 35.5802 256.081 35.1002 256.021 34.8602C255.961 34.2002 254.221 33.0602 252.841 32.5202L253.921 29.7002C254.701 30.0002 258.721 31.6202 259.021 34.5002C259.201 36.0002 258.361 37.3802 256.561 38.5802C253.741 40.4402 252.781 41.9402 252.721 42.3602C252.841 42.4802 253.501 42.7802 255.421 42.7802C256.801 42.7202 260.941 42.6602 261.841 45.1802C262.501 47.0402 261.421 49.0202 258.481 51.3602Z",fill:"#004E92"}),F.jsx("path",{d:"M49.0805 60.9C48.9605 60.3 45.8405 46.56 54.2405 43.5L55.2605 46.32C49.4405 48.42 52.0205 60.06 52.0205 60.18L49.0805 60.9Z",fill:"#004E92"}),F.jsx("path",{d:"M253.92 164.04L253.44 161.1C259.26 160.2 261.06 159.42 261.54 159C260.88 158.28 258.66 157.02 257.16 156.12C254.28 154.44 250.98 152.58 249.24 150.24C247.8 148.32 248.1 146.94 248.64 146.16C250.68 142.8 260.76 144.18 265.02 144.96L264.48 147.9C258.42 146.82 252.18 146.76 251.22 147.66C251.34 147.96 251.46 148.2 251.64 148.44C252.96 150.24 255.96 151.98 258.6 153.48C262.32 155.64 265.02 157.14 264.6 159.48C264.3 161.7 261.36 162.9 253.92 164.04Z",fill:"#00A1E0"}),F.jsx("path",{d:"M61.0198 156.66C60.2398 156.36 56.2198 154.74 55.9198 151.86C55.7398 150.36 56.5798 148.98 58.3798 147.78C61.1998 145.92 62.1598 144.42 62.2198 144C62.0998 143.88 61.4398 143.52 59.5198 143.58C58.1398 143.64 53.9998 143.7 53.0998 141.18C52.4398 139.44 53.5798 137.46 56.4598 135.12L58.3198 137.46C56.3998 139.02 55.9798 139.92 55.9198 140.16C56.1598 140.28 56.9998 140.7 59.4598 140.64C62.6998 140.58 64.5598 141.42 65.0998 143.1C65.9998 145.92 62.2798 148.86 60.0598 150.36C59.2198 150.9 58.9198 151.38 58.9198 151.62C58.9798 152.28 60.7198 153.42 62.0998 153.96L61.0198 156.66Z",fill:"#00A1E0"}),F.jsx("path",{d:"M258.421 83.2799L257.881 80.3399C259.561 80.0399 260.641 79.3799 261.121 78.4799C261.841 77.1599 261.241 75.2399 260.941 74.6399L263.641 73.3799C263.701 73.4999 265.261 76.9199 263.761 79.8599C262.861 81.5999 261.061 82.7999 258.421 83.2799Z",fill:"#00A1E0"}),F.jsx("path",{d:"M46.5003 195.48C42.8403 190.44 41.9403 188.1 43.0803 186.54C44.4003 184.74 47.2203 185.58 51.1803 186.84C53.8803 187.68 56.8803 188.64 59.0403 188.52C59.2203 188.52 59.4603 188.46 59.6403 188.46C59.0403 187.14 55.5603 183.9 51.7803 181.26L53.5203 178.8C58.1403 182.04 63.4803 186.54 62.6403 189.48C62.4003 190.38 61.5603 191.4 59.1603 191.52C56.5203 191.64 53.1603 190.62 50.2803 189.72C48.7803 189.18 47.2803 188.82 45.7203 188.52C45.9603 189.18 46.6803 190.68 48.9003 193.74L46.5003 195.48Z",fill:"#004E92"}),F.jsx("path",{d:"M194.281 164.46L191.521 163.38C191.821 162.6 192.421 160.2 191.581 158.58C191.101 157.68 190.141 157.02 188.701 156.72L189.301 153.78C191.641 154.26 193.261 155.4 194.221 157.14C195.841 160.32 194.341 164.28 194.281 164.46Z",fill:"#004E92"}),F.jsx("path",{d:"M240.54 218.22L238.86 215.76C238.86 215.76 241.38 214.02 241.68 211.8C241.8 210.6 241.38 209.46 240.54 208.56C237.78 205.32 235.38 200.76 236.88 197.82C237.3 196.92 238.5 195.42 241.56 195.6C242.88 195.66 243.84 195.42 244.08 194.94C244.44 194.22 244.14 192.3 241.98 189.18L244.44 187.5C247.08 191.28 247.8 194.4 246.72 196.44C246.12 197.52 244.68 198.78 241.44 198.66C240.72 198.66 239.82 198.72 239.58 199.26C239.04 200.34 240 203.34 242.88 206.76C244.26 208.26 244.92 210.3 244.68 212.34C244.14 215.76 240.66 218.1 240.54 218.22Z",fill:"#004E92"})]}),xG=({isActive:t=!1})=>F.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M3.5 21.29V6C3.5 5.46957 3.71071 4.96086 4.08579 4.58579C4.46086 4.21071 4.96957 4 5.5 4H19.5C20.0304 4 20.5391 4.21071 20.9142 4.58579C21.2893 4.96086 21.5 5.46957 21.5 6V16C21.5 16.5304 21.2893 17.0391 20.9142 17.4142C20.5391 17.7893 20.0304 18 19.5 18H8.461C8.16123 18 7.86531 18.0675 7.59511 18.1973C7.32491 18.3271 7.08735 18.516 6.9 18.75L4.569 21.664C4.49143 21.7612 4.38556 21.8319 4.26604 21.8664C4.14652 21.9008 4.01926 21.8972 3.90186 21.8561C3.78446 21.815 3.68273 21.7385 3.61073 21.6371C3.53874 21.5357 3.50005 21.4144 3.5 21.29Z",className:t?"ed-stroke-brand":"ed-fill-white",stroke:"#797979",strokeWidth:"1.5"}),F.jsx("path",{d:"M7.5 13H17.5M7.5 9H13.5",className:t?"ed-stroke-brand":"ed-stroke-border-regular",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),TG=({isActive:t=!1})=>F.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.8571 7.5H13.7857L13.3357 7.68987L12.5 8.5L11.6643 7.68987L11.2143 7.5H4.14286L3.5 8.13291V20.7911L4.14286 21.424H10.9443L12.05 22.5H12.95L14.0557 21.424H20.8571L21.5 20.7911V8.13291L20.8571 7.5ZM11.8571 20.5633L11.6257 20.3481L11.2143 20.1582H4.78571V8.76582H10.9443L11.8957 9.70253L11.8571 20.5633ZM20.2143 20.1582H13.7857L13.3357 20.3481L13.1557 20.5127V9.6519L14.0557 8.76582H20.2143V20.1582ZM9.92857 12.2975H6.07143C5.3 12.2975 5.3 13.5633 6.07143 13.5633H9.92857C10.7 13.5633 10.7 12.2975 9.92857 12.2975ZM9.92857 17.3608H6.07143C5.3 17.3608 5.3 18.6266 6.07143 18.6266H9.92857C10.7 18.6266 10.7 17.3608 9.92857 17.3608ZM6.07143 14.8291H9.92857C10.7 14.8291 10.7 16.0949 9.92857 16.0949H6.07143C5.29297 16.0949 5.3 14.8291 6.07143 14.8291ZM18.9286 12.2975H15.0714C14.3 12.2975 14.3 13.5633 15.0714 13.5633H18.9286C19.7 13.5633 19.7 12.2975 18.9286 12.2975ZM15.0714 14.8291H18.9286C19.7 14.8291 19.7 16.0949 18.9286 16.0949H15.0714C14.3 16.0949 14.3 14.8291 15.0714 14.8291ZM15.0714 17.3608H18.9286C19.7 17.3608 19.7 18.6266 18.9286 18.6266H15.0714C14.3 18.6266 14.3 17.3608 15.0714 17.3608Z",className:t?"ed-fill-brand":"ed-fill-border-regular"}),F.jsx("path",{d:"M11.3634 7.22827C11.1775 8.71234 10.1635 9.30535 9.72555 9.73582C9.28695 10.1676 9.3655 10.2535 9.39496 10.8867C9.39988 10.965 9.38801 11.0435 9.36008 11.1173C9.33216 11.191 9.28877 11.2585 9.23259 11.3156C9.17641 11.3727 9.10863 11.4182 9.03343 11.4492C8.95823 11.4802 8.87719 11.4961 8.79532 11.496H7.05532C6.97351 11.4959 6.89258 11.4798 6.81748 11.4487C6.74237 11.4175 6.67467 11.3721 6.6185 11.3151C6.56232 11.2581 6.51886 11.1907 6.49075 11.117C6.46265 11.0434 6.45049 10.965 6.45503 10.8867C6.45503 10.2654 6.51525 10.1211 6.12509 9.73582C5.62757 9.25891 4.4571 8.58558 4.4571 6.73378C4.45411 6.27381 4.55056 5.81824 4.74036 5.39577C4.93017 4.9733 5.20922 4.59311 5.55992 4.27916C5.91062 3.9652 6.32536 3.72429 6.77801 3.57161C7.23066 3.41894 7.71139 3.3578 8.18991 3.39206C8.66843 3.42632 9.13436 3.55524 9.55833 3.77068C9.98229 3.98612 10.3551 4.28342 10.6533 4.64383C10.9514 5.00424 11.1684 5.41996 11.2907 5.86476C11.4129 6.30957 11.4377 6.77382 11.3634 7.22827Z",fill:"white",className:t?"ed-stroke-brand":"ed-stroke-border-regular",strokeLinecap:"round",strokeLinejoin:"round"}),F.jsx("path",{d:"M6.91717 11.4599V12.4087C6.91717 12.6679 7.06773 12.8806 7.25299 12.8806H8.59694C8.78351 12.8806 8.93342 12.6672 8.93342 12.4087V11.4599M10.5 2.5L11.5 1.5M8 1L8 2M4.5 1.5L5.5 2.5",className:t?"ed-stroke-brand":"ed-stroke-border-regular",strokeLinecap:"round",strokeLinejoin:"round"})]}),RG=()=>F.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M4.875 0C4.04662 0 3.375 0.671625 3.375 1.5V22.5C3.375 23.3284 4.04662 24 4.875 24H19.125C19.9534 24 20.625 23.3284 20.625 22.5V6L14.625 0H4.875Z",fill:"#E2E7F0"}),F.jsx("path",{d:"M16.125 6H20.625L14.625 0V4.5C14.625 5.32837 15.2966 6 16.125 6ZM9 7.5H15C15.207 7.5 15.375 7.668 15.375 7.875C15.375 8.082 15.207 8.25 15 8.25H9C8.793 8.25 8.625 8.082 8.625 7.875C8.625 7.668 8.793 7.5 9 7.5ZM6.75 15.375H17.25C17.457 15.375 17.625 15.543 17.625 15.75C17.625 15.957 17.457 16.125 17.25 16.125H6.75C6.543 16.125 6.375 15.957 6.375 15.75C6.375 15.543 6.543 15.375 6.75 15.375ZM6.75 19.875H12.75C12.957 19.875 13.125 20.043 13.125 20.25C13.125 20.457 12.957 20.625 12.75 20.625H6.75C6.543 20.625 6.375 20.457 6.375 20.25C6.375 20.043 6.543 19.875 6.75 19.875ZM6.75 17.625H17.25C17.457 17.625 17.625 17.793 17.625 18C17.625 18.207 17.457 18.375 17.25 18.375H6.75C6.543 18.375 6.375 18.207 6.375 18C6.375 17.793 6.543 17.625 6.75 17.625ZM6.75 13.125H17.25C17.457 13.125 17.625 13.293 17.625 13.5C17.625 13.707 17.457 13.875 17.25 13.875H6.75C6.543 13.875 6.375 13.707 6.375 13.5C6.375 13.293 6.543 13.125 6.75 13.125ZM6.75 10.875H17.25C17.457 10.875 17.625 11.043 17.625 11.25C17.625 11.457 17.457 11.625 17.25 11.625H6.75C6.543 11.625 6.375 11.457 6.375 11.25C6.375 11.043 6.543 10.875 6.75 10.875Z",fill:"#9DACBA"}),F.jsx("path",{d:"M16.125 6L19.6537 9.52875C19.7239 9.59855 19.7796 9.68153 19.8175 9.77292C19.8555 9.8643 19.875 9.96229 19.875 10.0612V22.5C19.875 22.9144 19.5394 23.25 19.125 23.25H5.625C5.21062 23.25 4.875 23.5856 4.875 24H19.125C19.9534 24 20.625 23.3284 20.625 22.5V6H16.125Z",fill:"#C9D5E3"})]});var bx={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GET_FILE_DOWNLOADING_URL"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"queryData"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FileDownloadingInputDataType"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFileDownloadingURLForWidget"},arguments:[{kind:"Argument",name:{kind:"Name",value:"queryData"},value:{kind:"Variable",name:{kind:"Name",value:"queryData"}}}],directives:[]}]}}],loc:{start:0,end:134}};bx.loc.source={body:`query GET_FILE_DOWNLOADING_URL($queryData: FileDownloadingInputDataType!) {
|
|
350
|
+
</div>`,is_customer_reply:!0},{message:d?s:a,is_customer_reply:!1}]}}}),N=T==null?void 0:T.createAConversationForPortal;N!=null&&N.id&&(n(N==null?void 0:N.id),Fw("easydesk_chat_widget_conversation_id",N==null?void 0:N.id,{expires:30}),t==null||t({contact_person_name:b==null?void 0:b.contact_person_name,contact_person_email:b==null?void 0:b.contact_person_email}))}catch(T){const{message:N,response:M}=T;Jr("error",((P=M==null?void 0:M.data)==null?void 0:P.message)||N,"top-left")}},O=D=>{const{name:P,value:T}=D.target;S(N=>({...N,[P]:T}))},k=z.useMemo(()=>!(b!=null&&b.contact_person_name)||!(b!=null&&b.contact_person_email)||!jw(b==null?void 0:b.contact_person_email),[b]);return z.useEffect(()=>{const D=setTimeout(()=>{y(!1)},1e3);return()=>clearTimeout(D)},[]),F.jsxs("div",{className:"ed-space-y-5",children:[F.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[F.jsx(Wu,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:f==null?void 0:f.logo_icon_key,defaultImageName:sh(f==null?void 0:f.name)}),F.jsxs("div",{children:[F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[F.jsx("p",{className:"ed-text-border-regular",children:f==null?void 0:f.name}),F.jsx("span",{className:"ed-text-border ed-font-medium",children:b1().format("HH:MM")})]}),m?F.jsx("div",{className:"ed-py-4",children:F.jsx(hx,{})}):F.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-rounded-lg ed-mt-2",children:F.jsx("p",{className:"ed-text-border-dark",children:u})})]})]}),!m&&F.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto",children:F.jsxs("form",{onSubmit:x,className:"ed-p-5 ed-rounded-[20px] ed-bg-white-light ed-space-y-5",children:[F.jsxs("div",{className:"ed-space-y-2",children:[F.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Name ",F.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),F.jsx("input",{type:"text",name:"contact_person_name",required:!0,placeholder:"Enter your name",value:b==null?void 0:b.contact_person_name,onChange:O,disabled:p,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),F.jsxs("div",{className:"ed-space-y-2",children:[F.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Email ",F.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),F.jsx("input",{type:"email",name:"contact_person_email",required:!0,placeholder:"Enter your email",value:b==null?void 0:b.contact_person_email,onChange:O,disabled:p,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),F.jsx("div",{className:"ed-flex ed-justify-end",children:F.jsx(Sh,{title:"Submit",loaderText:"Submitting",fullWidthBtn:!0,disabled:k||C,loader:m||C,callBack:x})})]})})]})},_G=({height:t="48",width:e="49"})=>F.jsx("svg",{width:e,height:t,viewBox:"0 0 49 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:F.jsx("path",{d:"M42.5 23.0001C42.5069 25.6398 41.8901 28.2438 40.7 30.6001C39.2889 33.4235 37.1195 35.7984 34.4349 37.4586C31.7503 39.1188 28.6565 39.9988 25.5 40.0001C22.8603 40.0069 20.2562 39.3902 17.9 38.2001L6.5 42.0001L10.3 30.6001C9.10986 28.2438 8.49312 25.6398 8.5 23.0001C8.50122 19.8436 9.38122 16.7498 11.0414 14.0652C12.7017 11.3806 15.0765 9.21119 17.9 7.80006C20.2562 6.60992 22.8603 5.99317 25.5 6.00006H26.5C30.6687 6.23004 34.6061 7.98958 37.5583 10.9418C40.5105 13.894 42.27 17.8314 42.5 22.0001V23.0001Z",fill:"white",stroke:"#00A1E0",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),wG=()=>F.jsxs("svg",{width:"192",height:"165",viewBox:"0 0 192 165",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{opacity:"0.4",d:"M124.365 148.68H57.3652L63.8177 119.68H117.913L124.365 148.68Z",fill:"#44A9F1"}),F.jsx("path",{opacity:"0.4",d:"M173.775 119.874H7.99173C3.77973 119.874 0.365234 116.459 0.365234 112.247V7.80619C0.365234 3.59419 3.77973 0.179688 7.99173 0.179688H173.775C177.987 0.179688 181.402 3.59419 181.402 7.80619V112.247C181.402 116.459 177.987 119.874 173.775 119.874Z",fill:"#44A9F1"}),F.jsx("path",{d:"M169.382 107.314H12.3843C8.17232 107.314 4.75781 103.9 4.75781 99.6877V11.4077C4.75781 7.19575 8.17232 3.78125 12.3843 3.78125H169.382C173.594 3.78125 177.009 7.19575 177.009 11.4077V99.6877C177.009 103.9 173.594 107.314 169.382 107.314Z",fill:"white"}),F.jsx("path",{opacity:"0.4",d:"M138.348 159.397H43.418V154.811C43.418 151.265 46.2925 148.391 49.8385 148.391H131.927C135.473 148.391 138.348 151.265 138.348 154.811V159.397Z",fill:"#44A9F1"}),F.jsx("path",{d:"M10.375 107.312H168.21",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("path",{d:"M47.5977 157.107V154.699C47.5977 153.243 48.7781 152.062 50.2346 152.062H121.432",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("path",{d:"M113.863 123.398L116.385 142.66",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("path",{d:"M89.2912 117.684C91.331 117.684 92.9847 116.03 92.9847 113.99C92.9847 111.951 91.331 110.297 89.2912 110.297C87.2513 110.297 85.5977 111.951 85.5977 113.99C85.5977 116.03 87.2513 117.684 89.2912 117.684Z",fill:"white"}),F.jsx("path",{d:"M141.84 10.8125H161.445C165.181 10.8125 168.209 13.841 168.209 17.577V58.3125",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("g",{opacity:"0.5",children:F.jsx("path",{d:"M88.1608 69.8837C88.0874 66.9345 88.253 64.5539 88.6584 62.7429C89.0634 60.9321 89.8966 59.2607 91.1596 57.7286C91.8875 56.8101 92.7171 56.0144 93.6518 55.3405C94.5848 54.6678 95.4423 53.9582 96.2249 53.213C97.0058 52.469 97.6603 51.639 98.1883 50.7253C98.7159 49.8117 98.9617 48.6306 98.9257 47.1804C98.8644 44.7316 98.1469 43.0353 96.7729 42.0943C95.3989 41.1533 93.7863 40.7055 91.9372 40.7516C89.2865 40.8179 87.4805 41.6012 86.518 43.1003C85.5544 44.6005 84.9787 46.6032 84.7917 49.1089L75.1185 49.3502C75.0577 46.9012 75.4013 44.6662 76.1517 42.6464C76.9013 40.6275 77.9965 38.8991 79.4365 37.4622C80.8761 36.0265 82.6238 34.9069 84.6804 34.105C86.7351 33.3035 89.0133 32.8716 91.5136 32.8092C96.9126 32.6746 101.201 33.6687 104.382 35.79C107.56 37.9127 109.212 41.4473 109.335 46.3966C109.375 47.9972 109.247 49.4003 108.953 50.6083C108.657 51.8161 108.196 52.9155 107.572 53.9068C106.945 54.8976 106.168 55.8304 105.24 56.7039C104.311 57.578 103.258 58.479 102.081 59.4086C101.002 60.2865 100.135 61.0962 99.4778 61.837C98.821 62.5793 98.3267 63.3549 97.9977 64.1625C97.6672 64.9714 97.4633 65.8153 97.3853 66.6912C97.3066 67.5691 97.2818 68.5583 97.3095 69.6569L88.1608 69.8837ZM88.2219 84.3642L87.977 74.5405L98.1001 74.2883L98.345 84.112L88.2219 84.3642Z",fill:"#44A9F1"})}),F.jsx("path",{d:"M189.428 162.528C186.451 165.558 181.581 165.6 178.551 162.622L142.516 127.208L153.299 116.236L189.333 151.65C192.364 154.628 192.406 159.498 189.428 162.528Z",fill:"#004E92"}),F.jsx("path",{opacity:"0.2",d:"M156.307 99.3327C156.268 82.1553 142.311 68.2623 125.133 68.3018C107.956 68.3413 94.0628 82.2984 94.1023 99.4757C94.1418 116.653 108.099 130.546 125.276 130.507C142.454 130.467 156.347 116.51 156.307 99.3327Z",fill:"#F8F9FB"}),F.jsx("path",{d:"M99.6105 74.257C85.7147 88.3958 85.9121 111.123 100.051 125.018C114.19 138.914 136.917 138.717 150.813 124.577C164.709 110.439 164.511 87.7118 150.372 73.816C136.232 59.9202 113.506 60.1176 99.6105 74.257ZM146.295 120.137C134.851 131.781 116.136 131.944 104.491 120.5C92.8472 109.057 92.6847 90.341 104.128 78.6972C115.571 67.0533 134.287 66.8909 145.932 78.3342C157.576 89.777 157.738 108.493 146.295 120.137Z",fill:"#004E92"}),F.jsx("path",{d:"M156.613 124.724L185.106 152.727",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),F.jsx("path",{d:"M91.8946 96.8405C91.0045 105.663 94.0498 114.81 100.05 121.339C106.052 127.869 114.91 131.672 123.777 131.527",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})]}),CG=({height:t="238",width:e="300"})=>F.jsxs("svg",{width:e,height:t,viewBox:"0 0 300 238",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M59.041 51C59.041 51 177.481 15.24 231.121 19.26C231.121 19.26 256.261 126.48 250.321 133.08C244.381 139.68 87.121 166.2 82.681 162.84C78.241 159.48 59.041 51 59.041 51Z",fill:"#00A1E0"}),F.jsx("path",{d:"M77.7021 72.12C77.7021 72.12 77.5221 74.58 78.1821 74.64C78.8421 74.7 89.4021 72.42 89.4021 72.42C89.4021 72.42 93.1821 97.92 94.5621 98.34C95.9421 98.76 99.7221 97.32 99.7221 97.32L93.9621 71.22C93.9621 71.22 106.562 69.3 106.442 68.52L106.082 66.54L77.7021 72.12Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M109.98 66.4201C110.16 66.3601 110.28 66.3001 110.46 66.2401C111.54 65.7601 114.06 64.6201 114.6 65.5201C115.26 66.6601 117.72 77.3401 117.72 77.3401L130.2 74.8801C130.2 74.8801 127.56 62.6401 128.28 62.1601C129 61.6801 131.82 61.1401 132.54 61.3201C133.26 61.5001 138.18 87.6601 138 89.0401C137.82 90.4201 134.28 90.9601 133.8 90.3601C133.32 89.7601 130.92 77.1601 130.92 77.1601L117.84 79.1401C117.84 79.1401 120.72 93.1201 119.94 93.6601C119.16 94.2001 116.76 94.8001 115.86 94.4401C114.96 94.0801 109.98 66.4201 109.98 66.4201Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M144.841 88.6799C145.681 88.3199 146.521 87.8399 147.181 87.2399C147.841 86.4599 150.901 65.2199 150.901 65.2199C150.901 65.2199 163.441 85.2599 164.041 84.9599C164.641 84.6599 169.321 83.3999 169.321 83.3999C169.321 83.3999 152.701 56.9999 151.381 57.2999L150.061 57.5999C150.061 57.5999 143.641 87.8399 144.841 88.6799Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M147.781 77.3999L159.181 75.1799L158.821 73.4399L148.501 74.9399L147.061 77.5799L147.781 77.3999Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M175.26 81.6601C175.26 81.6601 176.4 81.9601 176.7 81.3601C177 80.7601 172.08 58.0201 172.08 58.0201C172.08 58.0201 192.72 77.9401 194.1 77.8801C194.88 77.8801 195.66 77.7601 196.44 77.6401C196.44 77.6401 191.88 50.6401 191.04 50.2201C190.2 49.8001 188.34 50.7601 188.34 50.7601L192.54 70.5001C192.54 70.5001 174.48 53.1001 173.46 53.4601C172.44 53.8201 169.74 53.8201 168.9 54.3601C168.06 54.9001 175.26 81.6601 175.26 81.6601Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M203.941 76.2001C203.941 76.2001 208.261 76.0201 208.501 75.3001C208.741 74.5801 206.161 63.5401 206.161 63.5401C206.161 63.5401 221.461 73.0201 223.021 72.7201C224.581 72.4201 229.741 71.6401 229.561 71.1601C229.381 70.6801 208.681 60.2401 208.681 60.2401C208.681 60.2401 219.661 46.2601 219.481 45.4201C219.301 44.5801 215.281 45.1201 215.281 45.1201L205.381 60.1201C205.381 60.1201 203.341 47.5201 202.981 47.5201C202.621 47.5201 198.001 48.5401 197.881 49.0201C197.761 49.5001 203.941 76.2001 203.941 76.2001Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M118.08 111.36C118.08 111.36 130.92 124.02 131.4 125.52C131.88 127.02 133.38 135.54 134.28 136.2C135.18 136.86 137.22 135.9 137.88 135.48C138.54 135.06 135.72 124.5 135.72 124.5C135.72 124.5 143.58 105.54 142.56 105.3C141.54 105.06 139.26 105.96 139.26 105.96L133.92 121.8C133.92 121.8 122.82 109.2 121.8 109.44C120.78 109.68 116.94 110.22 118.08 111.36Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M177.84 98.3397C177.84 98.3397 182.94 96.5997 183.24 97.8597C183.54 99.1197 185.28 119.82 189.84 122.16C194.4 124.5 202.2 120 201.78 116.04C201.36 112.08 198 95.5797 198.78 95.0397C199.56 94.4997 201.36 93.7197 201.78 96.4197C202.2 99.1197 207.18 115.62 202.62 120.3C198.06 124.98 185.46 128.1 181.98 119.34C178.5 110.58 177.84 98.3397 177.84 98.3397Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M173.581 111.6C170.881 103.56 162.061 100.2 155.881 102.54C155.881 102.54 147.421 105.24 146.161 113.82C144.901 122.4 151.321 131.52 161.521 130.92C171.721 130.32 176.281 119.64 173.581 111.6ZM162.481 127.74C155.761 127.92 151.201 120.54 151.861 113.76C152.521 106.98 157.981 105.12 157.981 105.12C162.001 103.44 167.941 106.38 169.981 112.8C172.021 119.22 169.201 127.56 162.481 127.74Z",fill:"#F2EBEB"}),F.jsx("path",{d:"M52.2605 112.2L49.5005 111C53.2205 102.3 53.2805 99.9603 53.1605 99.3603C52.2605 99.3603 49.9205 100.62 48.3605 101.46C45.1805 103.14 41.6405 105 38.5805 104.76C36.4805 104.58 35.5805 103.5 35.2205 102.6C33.3005 98.0403 41.8205 87.4203 44.4605 84.3003L46.7405 86.2203C41.8805 91.9803 37.2005 99.4803 37.9805 101.46C38.0405 101.64 38.3405 101.76 38.8205 101.82C40.9805 102 44.2805 100.26 46.9805 98.8203C50.5805 96.9003 53.4605 95.4003 55.2605 97.0803C57.3605 99.0003 55.7405 104.1 52.2605 112.2Z",fill:"#00A1E0"}),F.jsx("path",{d:"M258.481 51.3602L256.621 49.0202C258.541 47.4602 258.961 46.5602 259.021 46.3202C258.781 46.2002 258.001 45.7802 255.481 45.8402C252.241 45.9002 250.381 45.1202 249.841 43.3802C248.941 40.5602 252.661 37.6202 254.881 36.1202C255.721 35.5802 256.081 35.1002 256.021 34.8602C255.961 34.2002 254.221 33.0602 252.841 32.5202L253.921 29.7002C254.701 30.0002 258.721 31.6202 259.021 34.5002C259.201 36.0002 258.361 37.3802 256.561 38.5802C253.741 40.4402 252.781 41.9402 252.721 42.3602C252.841 42.4802 253.501 42.7802 255.421 42.7802C256.801 42.7202 260.941 42.6602 261.841 45.1802C262.501 47.0402 261.421 49.0202 258.481 51.3602Z",fill:"#004E92"}),F.jsx("path",{d:"M49.0805 60.9C48.9605 60.3 45.8405 46.56 54.2405 43.5L55.2605 46.32C49.4405 48.42 52.0205 60.06 52.0205 60.18L49.0805 60.9Z",fill:"#004E92"}),F.jsx("path",{d:"M253.92 164.04L253.44 161.1C259.26 160.2 261.06 159.42 261.54 159C260.88 158.28 258.66 157.02 257.16 156.12C254.28 154.44 250.98 152.58 249.24 150.24C247.8 148.32 248.1 146.94 248.64 146.16C250.68 142.8 260.76 144.18 265.02 144.96L264.48 147.9C258.42 146.82 252.18 146.76 251.22 147.66C251.34 147.96 251.46 148.2 251.64 148.44C252.96 150.24 255.96 151.98 258.6 153.48C262.32 155.64 265.02 157.14 264.6 159.48C264.3 161.7 261.36 162.9 253.92 164.04Z",fill:"#00A1E0"}),F.jsx("path",{d:"M61.0198 156.66C60.2398 156.36 56.2198 154.74 55.9198 151.86C55.7398 150.36 56.5798 148.98 58.3798 147.78C61.1998 145.92 62.1598 144.42 62.2198 144C62.0998 143.88 61.4398 143.52 59.5198 143.58C58.1398 143.64 53.9998 143.7 53.0998 141.18C52.4398 139.44 53.5798 137.46 56.4598 135.12L58.3198 137.46C56.3998 139.02 55.9798 139.92 55.9198 140.16C56.1598 140.28 56.9998 140.7 59.4598 140.64C62.6998 140.58 64.5598 141.42 65.0998 143.1C65.9998 145.92 62.2798 148.86 60.0598 150.36C59.2198 150.9 58.9198 151.38 58.9198 151.62C58.9798 152.28 60.7198 153.42 62.0998 153.96L61.0198 156.66Z",fill:"#00A1E0"}),F.jsx("path",{d:"M258.421 83.2799L257.881 80.3399C259.561 80.0399 260.641 79.3799 261.121 78.4799C261.841 77.1599 261.241 75.2399 260.941 74.6399L263.641 73.3799C263.701 73.4999 265.261 76.9199 263.761 79.8599C262.861 81.5999 261.061 82.7999 258.421 83.2799Z",fill:"#00A1E0"}),F.jsx("path",{d:"M46.5003 195.48C42.8403 190.44 41.9403 188.1 43.0803 186.54C44.4003 184.74 47.2203 185.58 51.1803 186.84C53.8803 187.68 56.8803 188.64 59.0403 188.52C59.2203 188.52 59.4603 188.46 59.6403 188.46C59.0403 187.14 55.5603 183.9 51.7803 181.26L53.5203 178.8C58.1403 182.04 63.4803 186.54 62.6403 189.48C62.4003 190.38 61.5603 191.4 59.1603 191.52C56.5203 191.64 53.1603 190.62 50.2803 189.72C48.7803 189.18 47.2803 188.82 45.7203 188.52C45.9603 189.18 46.6803 190.68 48.9003 193.74L46.5003 195.48Z",fill:"#004E92"}),F.jsx("path",{d:"M194.281 164.46L191.521 163.38C191.821 162.6 192.421 160.2 191.581 158.58C191.101 157.68 190.141 157.02 188.701 156.72L189.301 153.78C191.641 154.26 193.261 155.4 194.221 157.14C195.841 160.32 194.341 164.28 194.281 164.46Z",fill:"#004E92"}),F.jsx("path",{d:"M240.54 218.22L238.86 215.76C238.86 215.76 241.38 214.02 241.68 211.8C241.8 210.6 241.38 209.46 240.54 208.56C237.78 205.32 235.38 200.76 236.88 197.82C237.3 196.92 238.5 195.42 241.56 195.6C242.88 195.66 243.84 195.42 244.08 194.94C244.44 194.22 244.14 192.3 241.98 189.18L244.44 187.5C247.08 191.28 247.8 194.4 246.72 196.44C246.12 197.52 244.68 198.78 241.44 198.66C240.72 198.66 239.82 198.72 239.58 199.26C239.04 200.34 240 203.34 242.88 206.76C244.26 208.26 244.92 210.3 244.68 212.34C244.14 215.76 240.66 218.1 240.54 218.22Z",fill:"#004E92"})]}),xG=({isActive:t=!1})=>F.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M3.5 21.29V6C3.5 5.46957 3.71071 4.96086 4.08579 4.58579C4.46086 4.21071 4.96957 4 5.5 4H19.5C20.0304 4 20.5391 4.21071 20.9142 4.58579C21.2893 4.96086 21.5 5.46957 21.5 6V16C21.5 16.5304 21.2893 17.0391 20.9142 17.4142C20.5391 17.7893 20.0304 18 19.5 18H8.461C8.16123 18 7.86531 18.0675 7.59511 18.1973C7.32491 18.3271 7.08735 18.516 6.9 18.75L4.569 21.664C4.49143 21.7612 4.38556 21.8319 4.26604 21.8664C4.14652 21.9008 4.01926 21.8972 3.90186 21.8561C3.78446 21.815 3.68273 21.7385 3.61073 21.6371C3.53874 21.5357 3.50005 21.4144 3.5 21.29Z",className:t?"ed-stroke-brand":"ed-fill-white",stroke:"#797979",strokeWidth:"1.5"}),F.jsx("path",{d:"M7.5 13H17.5M7.5 9H13.5",className:t?"ed-stroke-brand":"ed-stroke-border-regular",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),TG=({isActive:t=!1})=>F.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.8571 7.5H13.7857L13.3357 7.68987L12.5 8.5L11.6643 7.68987L11.2143 7.5H4.14286L3.5 8.13291V20.7911L4.14286 21.424H10.9443L12.05 22.5H12.95L14.0557 21.424H20.8571L21.5 20.7911V8.13291L20.8571 7.5ZM11.8571 20.5633L11.6257 20.3481L11.2143 20.1582H4.78571V8.76582H10.9443L11.8957 9.70253L11.8571 20.5633ZM20.2143 20.1582H13.7857L13.3357 20.3481L13.1557 20.5127V9.6519L14.0557 8.76582H20.2143V20.1582ZM9.92857 12.2975H6.07143C5.3 12.2975 5.3 13.5633 6.07143 13.5633H9.92857C10.7 13.5633 10.7 12.2975 9.92857 12.2975ZM9.92857 17.3608H6.07143C5.3 17.3608 5.3 18.6266 6.07143 18.6266H9.92857C10.7 18.6266 10.7 17.3608 9.92857 17.3608ZM6.07143 14.8291H9.92857C10.7 14.8291 10.7 16.0949 9.92857 16.0949H6.07143C5.29297 16.0949 5.3 14.8291 6.07143 14.8291ZM18.9286 12.2975H15.0714C14.3 12.2975 14.3 13.5633 15.0714 13.5633H18.9286C19.7 13.5633 19.7 12.2975 18.9286 12.2975ZM15.0714 14.8291H18.9286C19.7 14.8291 19.7 16.0949 18.9286 16.0949H15.0714C14.3 16.0949 14.3 14.8291 15.0714 14.8291ZM15.0714 17.3608H18.9286C19.7 17.3608 19.7 18.6266 18.9286 18.6266H15.0714C14.3 18.6266 14.3 17.3608 15.0714 17.3608Z",className:t?"ed-fill-brand":"ed-fill-border-regular"}),F.jsx("path",{d:"M11.3634 7.22827C11.1775 8.71234 10.1635 9.30535 9.72555 9.73582C9.28695 10.1676 9.3655 10.2535 9.39496 10.8867C9.39988 10.965 9.38801 11.0435 9.36008 11.1173C9.33216 11.191 9.28877 11.2585 9.23259 11.3156C9.17641 11.3727 9.10863 11.4182 9.03343 11.4492C8.95823 11.4802 8.87719 11.4961 8.79532 11.496H7.05532C6.97351 11.4959 6.89258 11.4798 6.81748 11.4487C6.74237 11.4175 6.67467 11.3721 6.6185 11.3151C6.56232 11.2581 6.51886 11.1907 6.49075 11.117C6.46265 11.0434 6.45049 10.965 6.45503 10.8867C6.45503 10.2654 6.51525 10.1211 6.12509 9.73582C5.62757 9.25891 4.4571 8.58558 4.4571 6.73378C4.45411 6.27381 4.55056 5.81824 4.74036 5.39577C4.93017 4.9733 5.20922 4.59311 5.55992 4.27916C5.91062 3.9652 6.32536 3.72429 6.77801 3.57161C7.23066 3.41894 7.71139 3.3578 8.18991 3.39206C8.66843 3.42632 9.13436 3.55524 9.55833 3.77068C9.98229 3.98612 10.3551 4.28342 10.6533 4.64383C10.9514 5.00424 11.1684 5.41996 11.2907 5.86476C11.4129 6.30957 11.4377 6.77382 11.3634 7.22827Z",fill:"white",className:t?"ed-stroke-brand":"ed-stroke-border-regular",strokeLinecap:"round",strokeLinejoin:"round"}),F.jsx("path",{d:"M6.91717 11.4599V12.4087C6.91717 12.6679 7.06773 12.8806 7.25299 12.8806H8.59694C8.78351 12.8806 8.93342 12.6672 8.93342 12.4087V11.4599M10.5 2.5L11.5 1.5M8 1L8 2M4.5 1.5L5.5 2.5",className:t?"ed-stroke-brand":"ed-stroke-border-regular",strokeLinecap:"round",strokeLinejoin:"round"})]}),RG=()=>F.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M4.875 0C4.04662 0 3.375 0.671625 3.375 1.5V22.5C3.375 23.3284 4.04662 24 4.875 24H19.125C19.9534 24 20.625 23.3284 20.625 22.5V6L14.625 0H4.875Z",fill:"#E2E7F0"}),F.jsx("path",{d:"M16.125 6H20.625L14.625 0V4.5C14.625 5.32837 15.2966 6 16.125 6ZM9 7.5H15C15.207 7.5 15.375 7.668 15.375 7.875C15.375 8.082 15.207 8.25 15 8.25H9C8.793 8.25 8.625 8.082 8.625 7.875C8.625 7.668 8.793 7.5 9 7.5ZM6.75 15.375H17.25C17.457 15.375 17.625 15.543 17.625 15.75C17.625 15.957 17.457 16.125 17.25 16.125H6.75C6.543 16.125 6.375 15.957 6.375 15.75C6.375 15.543 6.543 15.375 6.75 15.375ZM6.75 19.875H12.75C12.957 19.875 13.125 20.043 13.125 20.25C13.125 20.457 12.957 20.625 12.75 20.625H6.75C6.543 20.625 6.375 20.457 6.375 20.25C6.375 20.043 6.543 19.875 6.75 19.875ZM6.75 17.625H17.25C17.457 17.625 17.625 17.793 17.625 18C17.625 18.207 17.457 18.375 17.25 18.375H6.75C6.543 18.375 6.375 18.207 6.375 18C6.375 17.793 6.543 17.625 6.75 17.625ZM6.75 13.125H17.25C17.457 13.125 17.625 13.293 17.625 13.5C17.625 13.707 17.457 13.875 17.25 13.875H6.75C6.543 13.875 6.375 13.707 6.375 13.5C6.375 13.293 6.543 13.125 6.75 13.125ZM6.75 10.875H17.25C17.457 10.875 17.625 11.043 17.625 11.25C17.625 11.457 17.457 11.625 17.25 11.625H6.75C6.543 11.625 6.375 11.457 6.375 11.25C6.375 11.043 6.543 10.875 6.75 10.875Z",fill:"#9DACBA"}),F.jsx("path",{d:"M16.125 6L19.6537 9.52875C19.7239 9.59855 19.7796 9.68153 19.8175 9.77292C19.8555 9.8643 19.875 9.96229 19.875 10.0612V22.5C19.875 22.9144 19.5394 23.25 19.125 23.25H5.625C5.21062 23.25 4.875 23.5856 4.875 24H19.125C19.9534 24 20.625 23.3284 20.625 22.5V6H16.125Z",fill:"#C9D5E3"})]});var bx={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GET_FILE_DOWNLOADING_URL"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"queryData"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FileDownloadingInputDataType"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFileDownloadingURLForWidget"},arguments:[{kind:"Argument",name:{kind:"Name",value:"queryData"},value:{kind:"Variable",name:{kind:"Name",value:"queryData"}}}],directives:[]}]}}],loc:{start:0,end:134}};bx.loc.source={body:`query GET_FILE_DOWNLOADING_URL($queryData: FileDownloadingInputDataType!) {
|
|
351
351
|
getFileDownloadingURLForWidget(queryData: $queryData)
|
|
352
352
|
}
|
|
353
353
|
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Y1(t,e){if(t.kind==="FragmentSpread")e.add(t.name.value);else if(t.kind==="VariableDefinition"){var n=t.type;n.kind==="NamedType"&&e.add(n.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(r){Y1(r,e)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(r){Y1(r,e)}),t.definitions&&t.definitions.forEach(function(r){Y1(r,e)})}var Sx={};(function(){bx.definitions.forEach(function(e){if(e.name){var n=new Set;Y1(e,n),Sx[e.name.value]=n}})})();function iN(t,e){for(var n=0;n<t.definitions.length;n++){var r=t.definitions[n];if(r.name&&r.name.value==e)return r}}function OG(t,e){var n={kind:t.kind,definitions:[iN(t,e)]};t.hasOwnProperty("loc")&&(n.loc=t.loc);var r=Sx[e]||new Set,a=new Set,s=new Set;for(r.forEach(function(f){s.add(f)});s.size>0;){var u=s;s=new Set,u.forEach(function(f){if(!a.has(f)){a.add(f);var d=Sx[f]||new Set;d.forEach(function(p){s.add(p)})}})}return a.forEach(function(f){var d=iN(t,f);d&&n.definitions.push(d)}),n}const kG=OG(bx,"GET_FILE_DOWNLOADING_URL"),AG=({previewImageInfo:t,setPreviewImageInfo:e,isPrivate:n=!1})=>{const[r,a]=z.useState(1),s=z.useRef(null),u=()=>{e($w),a(1)};z.useEffect(()=>{const C=x=>{x.key==="Escape"&&u()};return window.addEventListener("keydown",C),()=>{window.removeEventListener("keydown",C)}},[]);const{fileName:f,isOpen:d,loading:p,error:m,url:y,height:b,width:S}=t||{},w=z.useMemo(()=>y==null?void 0:y.split("?")[0].split("/").pop(),[y]);return F.jsx("div",{children:d&&F.jsxs("div",{className:"ed-overflow-hidden",children:[F.jsx("div",{className:"ed-h-full ed-w-full ed-z-[1000] ed-fixed ed-bg-black/80 ed-inset-0"}),F.jsxs("div",{className:"ed-size-full ed-flex items-center ed-w-full ed-h-full ed-justify-center ed-overflow-hidden ed-fixed ed-top-9 ed-left-0 ed-z-[1100]",children:[p?F.jsx(hx,{}):!m&&y&&F.jsx("div",{ref:s,style:{transform:`scale(${r})`,transformOrigin:"center center",transition:"transform 0.2s ease-out"},children:F.jsx(Wu,{alt:"Feedback attachment",className:"ed-max-w-[90vw] ed-max-h-[90vh] ed-object-contain ed-select-none",height:b,src:y,width:S,isPrivate:n})}),m&&F.jsx("p",{className:"ed-text-14 ed-font-semibold ed-text-red",children:m})]}),F.jsxs("div",{className:"ed-fixed ed-z-[1100] ed-top-5 ed-right-16 ed-flex ed-items-center ed-gap-3",children:[F.jsx("a",{href:`${y}&dl=${f||w}`,className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors ed-bg-black/50 ed-rounded-lg ed-p-2",title:"Download",children:F.jsx(SC,{className:"ed-size-4",strokeWidth:"2"})}),F.jsx("button",{type:"button",className:"ed-fixed ed-z-[1100] ed-top-5 ed-right-5 ed-text-white ed-hover:text-gray-300 ed-transition-colors ed-bg-black/50 ed-rounded-lg ed-p-2",onClick:u,title:"Close (Esc)",children:F.jsx(hu,{className:"ed-size-4",strokeWidth:"2"})})]}),!p&&!m&&F.jsx("div",{className:"ed-fixed ed-z-[1100] ed-bottom-5 ed-left-1/2 ed-transform -ed-translate-x-1/2",children:F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-bg-black/70 ed-rounded-lg ed-p-3",children:[F.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>a(C=>Math.max(C/1.5,.5)),disabled:r<=.5,title:"Zoom Out",children:F.jsx(QC,{className:"ed-size-5",strokeWidth:"2"})}),F.jsxs("span",{className:"ed-text-white ed-text-sm ed-min-w-[3rem] ed-text-center ed-font-medium",children:[Math.round(r*100),"%"]}),F.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>a(C=>Math.min(C*1.5,5)),disabled:r>=5,title:"Zoom In",children:F.jsx(WC,{className:"ed-size-5",strokeWidth:"2"})}),F.jsx("div",{className:"ed-w-px ed-h-5 ed-bg-white/30 ed-mx-1"}),F.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>a(1),title:"Reset",children:F.jsx(NC,{className:"ed-size-5",strokeWidth:"2"})})]})})]})})},NG=({filesData:t=[]})=>{var S;const[e,n]=z.useState(!1),[r,a]=z.useState($w),s=t==null?void 0:t.filter(w=>/\.(jpg|jpeg|png|gif|webp)$/i.test(w.name)),u=t==null?void 0:t.filter(w=>!/\.(jpg|jpeg|png|gif|webp)$/i.test(w.name)),f=()=>n(!0),d=e?s:s==null?void 0:s.slice(0,2),p=Qt.size(s)-2,[m]=jl(kG,{errorPolicy:"all",fetchPolicy:"no-cache"}),y=async w=>{const x=(await m({variables:{queryData:{file_id:w,content_disposition:"inline"}}})).data.getFileDownloadingURLForWidget;window.open(x,"_blank")},b=async w=>{a(C=>({...C,loading:!0}));try{const C=await V3({fit:"scale",isPrivate:!1,needActualSize:!0,path:w==null?void 0:w.key,quality:100});if(C){const x=await YV(C);a(O=>({...O,isOpen:!0,url:C,fileName:w==null?void 0:w.title,image:C,loading:!1,height:x==null?void 0:x.height,width:x==null?void 0:x.width}))}}catch{a({...$w,error:"Failed to load image"})}};return F.jsxs("div",{className:"ed-flex ed-flex-col ed-gap-3",children:[Qt.size(s)>0&&F.jsxs("div",{className:"ed-grid ed-grid-cols-2 ed-gap-2.5",children:[d.map(w=>F.jsx("div",{onClick:()=>b(w),role:"button",tabIndex:0,children:F.jsx(Wu,{path:w.key,className:"ed-w-full ed-rounded",defaultImageClasses:"ed-w-full ed-h-20 !ed-rounded"})},w==null?void 0:w.id)),!e&&p>0&&F.jsxs("div",{role:"button",tabIndex:0,className:"ed-relative cursor-pointer",onClick:f,children:[F.jsx(Wu,{path:(S=s[2])==null?void 0:S.key,className:"ed-w-full ed-rounded",defaultImageClasses:"ed-w-full ed-h-20 !ed-rounded"}),F.jsx("div",{className:"ed-w-full ed-h-full ed-bg-black/15 ed-absolute ed-top-0 ed-left-0 ed-rounded",children:F.jsx("div",{className:"ed-bg-white ed-h-8 ed-w-8 ed-flex ed-items-center ed-justify-center ed-rounded-full ed-absolute ed-top-1/2 ed-left-1/2 ed--translate-x-1/2 ed--translate-y-1/2",children:F.jsxs("span",{className:"ed-text-12 ed-text-border-dark ed-font-semibold",children:["+",p]})})})]})]}),Qt.size(u)>0&&F.jsx("div",{className:"ed-flex ed-flex-col ed-gap-2.5",children:u.map(w=>F.jsxs("div",{className:"ed-p-2.5 ed-bg-white-light ed-rounded-lg ed-flex ed-items-center ed-justify-between",children:[F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[F.jsx(RG,{}),F.jsx("p",{className:"ed-text-12 ed-font-semibold ed-text-border-dark",children:w.name})]}),F.jsx("button",{type:"button",onClick:()=>y(w==null?void 0:w.id),children:F.jsx(_C,{className:"ed-text-brand-link ed-size-5"})})]},w==null?void 0:w.id))}),(r==null?void 0:r.isOpen)&&F.jsx(AG,{previewImageInfo:r,setPreviewImageInfo:a})]})},DG="hh:mm A",aN=({activityMessage:t={},brand:e={},isReplying:n=!1})=>{const{id:r,analytics:a,author:s,files:u,message:f,is_customer_reply:d,created_at:p}=t||{},m=z.useMemo(()=>s!=null&&s.id?Iw(s==null?void 0:s.first_name,s==null?void 0:s.last_name,s==null?void 0:s.email):(e==null?void 0:e.name)||"",[s==null?void 0:s.id]),y=z.useMemo(()=>s!=null&&s.id?{...(s==null?void 0:s.avatar_file)||{},default_image_name:sh(s==null?void 0:s.first_name,s==null?void 0:s.last_name,s==null?void 0:s.email)}:{key:e==null?void 0:e.logo_icon_key,default_image_name:sh(e==null?void 0:e.name)},[s==null?void 0:s.id]),b=!n&&om(f),S=z.isValidElement(b)?"div":"p",w=()=>{var x,O,k;return F.jsxs("div",{className:`ed-p-2.5 ${d?"ed-bg-blue-light":"ed-bg-white-light"} ${(x=b==null?void 0:b.props)!=null&&x.className.includes("form-response")?"ed-p-0 ed-bg-white":""} ed-rounded-lg ed-mt-2`,children:[F.jsx(S,{className:`ed-text-border-dark ${(O=b==null?void 0:b.props)!=null&&O.className.includes("form-response")||(k=b==null?void 0:b.props)!=null&&k.className.includes("selected-channel")?"":"ed-whitespace-pre-line ed-break-words"}`,children:b}),F.jsx(NG,{filesData:u})]})},C=a==null?void 0:a.some(x=>(x==null?void 0:x.status)!=="seen");return d?F.jsx("div",{className:"ed-max-w-[85%] ed-w-max ed-ml-auto",children:F.jsx(w,{})}):F.jsxs("div",{...C&&{"data-message-id":r},className:"ed-message ed-flex ed-gap-4 ed-my-4 ed-max-w-[85%] ed-w-max",children:[F.jsx("div",{className:"ed-size-7 ed-flex-shrink-0",children:F.jsx(Wu,{className:"ed-size-7 ed-object-cover ed-rounded-full",alt:m,defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:y==null?void 0:y.key,defaultImageName:y==null?void 0:y.default_image_name})}),F.jsxs("div",{children:[F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[F.jsx("p",{className:"ed-text-border-regular",children:m}),F.jsx("span",{className:"ed-text-border ed-font-medium",children:b1(p).format(DG)})]}),n?F.jsx("div",{className:"ed-py-4",children:F.jsx(hx,{})}):F.jsx(w,{})]})]})};var Ex={exports:{}};/*!
|
|
@@ -697,7 +697,7 @@ Open your browser's console to view the Component stack trace.`:""))};Object.key
|
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function rb(t,e){if(t.kind==="FragmentSpread")e.add(t.name.value);else if(t.kind==="VariableDefinition"){var n=t.type;n.kind==="NamedType"&&e.add(n.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(r){rb(r,e)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(r){rb(r,e)}),t.definitions&&t.definitions.forEach(function(r){rb(r,e)})}var IR={};(function(){jR.definitions.forEach(function(e){if(e.name){var n=new Set;rb(e,n),IR[e.name.value]=n}})})();function tM(t,e){for(var n=0;n<t.definitions.length;n++){var r=t.definitions[n];if(r.name&&r.name.value==e)return r}}function uee(t,e){var n={kind:t.kind,definitions:[tM(t,e)]};t.hasOwnProperty("loc")&&(n.loc=t.loc);var r=IR[e]||new Set,a=new Set,s=new Set;for(r.forEach(function(f){s.add(f)});s.size>0;){var u=s;s=new Set,u.forEach(function(f){if(!a.has(f)){a.add(f);var d=IR[f]||new Set;d.forEach(function(p){s.add(p)})}})}return a.forEach(function(f){var d=tM(t,f);d&&n.definitions.push(d)}),n}const lee=uee(jR,"GET_SECTIONS_WITH_ARTICLES"),cee=({setArticleId:t,selectedCategory:e})=>{const[n,r]=z.useState(null),[a,s]=z.useState([]),u=p=>{r(n===p?null:p)},[f,{loading:d}]=jl(lee,{errorPolicy:"all",fetchPolicy:"no-cache",variables:{queryData:{category_id:e},optionData:{order:[["serial","asc"]]}},onCompleted:p=>{var m;s((m=p==null?void 0:p.getSectionsWithArticles)==null?void 0:m.data)},onError:p=>{console.error(p)}});return z.useEffect(()=>{f()},[]),d?F.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:F.jsx(Ul,{})}):F.jsx("div",{children:a.map(p=>{var m;return F.jsx("div",{className:`ed-border-b ed-border-disabled ${n===p.id?"pb-2":""}`,children:F.jsxs("div",{className:"ed-py-3 ed-px-4",children:[F.jsxs("div",{role:"button",tabIndex:0,onClick:()=>u(p.id),className:`ed-flex ed-items-center ed-justify-between ed-gap-2 ed-p-2 ed-cursor-pointer ed-transition-all ed-duration-300 ed-ease-in-out ${n===p.id?"ed-bg-white-light":""}`,children:[F.jsx("h6",{className:"ed-text-14 ed-font-semibold ed-text-border-dark",children:p.name}),F.jsx("div",{className:"ed-transform ed-transition-transform ed-duration-300 ed-ease-in-out",children:n===p.id?F.jsx(yC,{className:"ed-text-border-regular ed-size-5"}):F.jsx(em,{className:"ed-text-border-regular ed-size-5"})})]}),F.jsx("div",{className:`ed-overflow-hidden ed-transition-all ed-ease-in-out ${n===p.id?"ed-max-h-96 ed-opacity-100 ed-mt-3":"ed-max-h-0 ed-opacity-0"}`,children:(m=p==null?void 0:p.section_articles)==null?void 0:m.map(y=>F.jsxs("button",{type:"button",onClick:()=>t(y==null?void 0:y.id),className:"ed-flex ed-items-center ed-gap-2 ed-flex-1 ed-w-full ed-px-6 ed-py-2 ed-hover:bg-white-light ed-group ed-text-left",children:[F.jsx("p",{className:"ed-text-border-dark ed-text-14 ed-font-medium ed-group-hover:text-brand-link ed-flex-1 ed-ease-in-out ed-transition-all",children:om((y==null?void 0:y.title)||"")}),F.jsx("div",{className:"ed-size-4 ed--translate-x-2 ed-opacity-0 ed-group-hover:opacity-100 ed-group-hover:translate-x-2 ed-transition-all",children:F.jsx(fh,{className:"ed-text-border ed-size-4"})})]},y.id))})]})},p.id)})})},fee=({loading:t,selectedCategory:e,setArticleId:n,articleId:r,isAuthenticated:a,setSelectedCategory:s})=>F.jsx("div",{children:t?F.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:F.jsx(Ul,{})}):e&&r||!e&&r?F.jsx(see,{articleId:r,setArticleId:n,isAuthenticated:a}):e&&!r?F.jsx(cee,{setArticleId:n,selectedCategory:e}):F.jsx(xJ,{setSelectedCategory:s})}),dee=({setIsCreateNewTicketClicked:t})=>{const{t:e}=bh();return F.jsxs("div",{className:"ed-flex ed-flex-col ed-items-center ed-justify-center ed-min-h-min ed-h-full",children:[F.jsx(wG,{}),F.jsxs("p",{className:"ed-text-14 ed-text-border-regular ed-text-center",children:[e("widget.label.no_article_found"),F.jsx("button",{type:"button",onClick:()=>t(!0),className:"ed-text-14 ed-font-semibold ed-text-brand-link ed-ml-1",children:e("widget.label.click_here")})]})]})},hee=({isPopupOpen:t,handlePopupTrigger:e,orgBrandSetting:n})=>{const r=X9("(max-width: 768px)"),{brand:a,widget_icon_key:s}=n;return F.jsx("button",{type:"button",onClick:e,style:{transformOrigin:"center",translate:"50% 50%"},className:`${r&&t?"ed-hidden":""} hover:ed-size-14 ed-absolute ed-bottom-12 ed-right-12 ed-rounded-full ed-inline-flex ed-justify-center ed-items-center ed-bg-brand ed-size-12 ed-cursor-pointer ed-origin-center ed-transition-all ed-duration-200 ed-ease-in-out`,children:F.jsxs("div",{className:"ed-relative ed-w-8 ed-h-8 ed-flex ed-items-center ed-justify-center",children:[F.jsx("div",{className:`ed-absolute ed-transition-all ed-duration-300 ${t?"ed-opacity-100 ed-scale-100 ed-rotate-[360deg]":"ed-opacity-0 ed-scale-0 ed-rotate-0"}`,children:F.jsx(em,{className:"ed-size-7 ed-text-white"})}),F.jsx("div",{className:`ed-absolute ed-transition-all ed-duration-300 ${t?"ed-opacity-0 ed-scale-0 ed-rotate-[360deg]":"ed-opacity-100 ed-scale-100 ed-rotate-0"}`,children:s?F.jsx(Wu,{alt:`${a==null?void 0:a.name}'s widget icon`,defaultUserNameTextSize:"text-10",className:"ed-size-7 ed-object-cover ed-rounded-full",defaultImageClasses:"ed-w-7 ed-h-7",path:s,defaultImageName:sh(a==null?void 0:a.name)}):F.jsx(_G,{height:28,width:28})})]})})},pee=({activeTab:t,handleTabChange:e,orgBrandSetting:n={}})=>{const{t:r}=bh(),{remove_app_branding:a,is_knowledge_base_enabled:s,is_live_chat_enabled:u}=n,f=[{id:1,key:"messages",label:"Messages",icon:xG},{id:2,key:"knowledge_base",label:"Knowledge base",icon:TG}],d=z.useMemo(()=>s&&u,[s,u]);return F.jsxs("div",{className:`${d&&"ed-shadow-[0_-8px_10px_rgba(0,0,0,0.02)] ed-pt-2.5"} 'ed-h-max'`,children:[s&&u&&F.jsx("div",{className:"ed-grid ed-grid-cols-2",children:f.map(p=>{const m=t===p.key;return F.jsxs("button",{type:"button",onClick:()=>e(p.key),className:"ed-flex ed-flex-col ed-items-center ed-justify-center",children:[F.jsx(p.icon,{isActive:m}),F.jsx("h3",{className:`ed-text-14 ed-font-semibold ${m?"ed-text-brand":"ed-text-border-regular"} ed-inline-block`,children:p.label})]},p.id)})}),!a&&F.jsxs("p",{className:"ed-py-2 ed-text-center ed-text-12 ed-font-medium ed-text-border-regular ed-bg-gray md:ed-rounded-b-[10px] ed-mt-1.5",children:[r("widget.label.powerd_by")," ",F.jsx(ZP,{href:"https://easydesk.app/",target:"_blank",className:"ed-text-14 ed-font-semibold ed-text-border-regular",children:r("widget.label.easydesk")})]})]})},vee=({searchedText:t,selectedCategory:e,setSearchedText:n,setArticleId:r,setSelectedCategory:a,setIsPopupOpen:s,handleSearch:u,setArticlesData:f,brandInfo:d,activeTab:p})=>{const{t:m}=bh(),y=X9("(max-width: 768px)"),b=()=>{n(""),r(null),a(null)};return F.jsx("div",{className:"ed-bg-brand ed-py-8 ed-px-5 md:ed-rounded-t-[10px] ed-h-max",children:p==="messages"?F.jsxs("div",{className:"ed-flex ed-items-center ed-justify-between",children:[F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[F.jsx(Wu,{className:"ed-size-10 ed-rounded-full ed-object-cover ed-shrink-0",defaultImageClasses:"ed-h-10 ed-w-10 ed-shrink-0",path:d==null?void 0:d.logo_icon_key,defaultImageName:sh(d==null?void 0:d.name)}),F.jsx("h6",{className:"ed-text-14 ed-font-semibold ed-text-white",children:d==null?void 0:d.name})]}),y&&F.jsx("button",{type:"button",onClick:()=>s(!1),children:F.jsx(hu,{size:20,className:"ed-text-white"})})]}):F.jsxs("div",{children:[F.jsxs("div",{className:"ed-flex ed-items-start ed-justify-between",children:[Qt.size(t)||e?F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-mb-4",children:[F.jsx(vC,{onClick:b,className:"ed-text-white ed-size-5"}),F.jsx("p",{className:"ed-text-14 ed-font-medium ed-text-white",children:m("widget.label.knowledge_base")})]}):F.jsxs("div",{children:[F.jsx("p",{className:"ed-text-14 ed-font-medium ed-text-white",children:m("widget.label.lets_explore")}),F.jsx("h4",{className:"ed-text-24 ed-font-bold ed-text-white ed-mt-2 ed-mb-4",children:m("widget.label.knowledge_base")})]}),y&&F.jsx("button",{type:"button",onClick:()=>s(!1),children:F.jsx(hu,{size:20,className:"ed-text-white"})})]}),F.jsxs("div",{className:"ed-bg-white ed-rounded-full ed-border ed-border-border-light ed-flex ed-items-center ed-justify-between ed-gap-2 ed-px-4 ed-py-2.5",children:[F.jsx("input",{value:t,onChange:S=>u(S.target.value),placeholder:m("widget.placeholder.search_for_articles"),type:"text",className:"ed-bg-transparent ed-outline-none ed-w-full ed-placeholder:text-14 ed-placeholder:font-medium ed-placeholder:text-border"}),F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-3",children:[t&&F.jsx("button",{type:"button",onClick:()=>{n(""),f([])},children:F.jsx(hu,{size:20,className:"ed-text-border"})}),F.jsx(LC,{size:24,className:"ed-text-border"})]})]})]})})};var $R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GET_ARTICLES"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"queryData"}},type:{kind:"NamedType",name:{kind:"Name",value:"ArticleQueryInputType"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"optionData"}},type:{kind:"NamedType",name:{kind:"Name",value:"OptionDataType"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getArticles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"queryData"},value:{kind:"Variable",name:{kind:"Name",value:"queryData"}}},{kind:"Argument",name:{kind:"Name",value:"optionData"},value:{kind:"Variable",name:{kind:"Name",value:"optionData"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:193}};$R.loc.source={body:`query GET_ARTICLES($queryData: ArticleQueryInputType, $optionData: OptionDataType) {
|
|
700
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function rb(t,e){if(t.kind==="FragmentSpread")e.add(t.name.value);else if(t.kind==="VariableDefinition"){var n=t.type;n.kind==="NamedType"&&e.add(n.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(r){rb(r,e)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(r){rb(r,e)}),t.definitions&&t.definitions.forEach(function(r){rb(r,e)})}var IR={};(function(){jR.definitions.forEach(function(e){if(e.name){var n=new Set;rb(e,n),IR[e.name.value]=n}})})();function tM(t,e){for(var n=0;n<t.definitions.length;n++){var r=t.definitions[n];if(r.name&&r.name.value==e)return r}}function uee(t,e){var n={kind:t.kind,definitions:[tM(t,e)]};t.hasOwnProperty("loc")&&(n.loc=t.loc);var r=IR[e]||new Set,a=new Set,s=new Set;for(r.forEach(function(f){s.add(f)});s.size>0;){var u=s;s=new Set,u.forEach(function(f){if(!a.has(f)){a.add(f);var d=IR[f]||new Set;d.forEach(function(p){s.add(p)})}})}return a.forEach(function(f){var d=tM(t,f);d&&n.definitions.push(d)}),n}const lee=uee(jR,"GET_SECTIONS_WITH_ARTICLES"),cee=({setArticleId:t,selectedCategory:e})=>{const[n,r]=z.useState(null),[a,s]=z.useState([]),u=p=>{r(n===p?null:p)},[f,{loading:d}]=jl(lee,{errorPolicy:"all",fetchPolicy:"no-cache",variables:{queryData:{category_id:e},optionData:{order:[["serial","asc"]]}},onCompleted:p=>{var m;s((m=p==null?void 0:p.getSectionsWithArticles)==null?void 0:m.data)},onError:p=>{console.error(p)}});return z.useEffect(()=>{f()},[]),d?F.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:F.jsx(Ul,{})}):F.jsx("div",{children:a.map(p=>{var m;return F.jsx("div",{className:`ed-border-b ed-border-disabled ${n===p.id?"pb-2":""}`,children:F.jsxs("div",{className:"ed-py-3 ed-px-4",children:[F.jsxs("div",{role:"button",tabIndex:0,onClick:()=>u(p.id),className:`ed-flex ed-items-center ed-justify-between ed-gap-2 ed-p-2 ed-cursor-pointer ed-transition-all ed-duration-300 ed-ease-in-out ${n===p.id?"ed-bg-white-light":""}`,children:[F.jsx("h6",{className:"ed-text-14 ed-font-semibold ed-text-border-dark",children:p.name}),F.jsx("div",{className:"ed-transform ed-transition-transform ed-duration-300 ed-ease-in-out",children:n===p.id?F.jsx(yC,{className:"ed-text-border-regular ed-size-5"}):F.jsx(em,{className:"ed-text-border-regular ed-size-5"})})]}),F.jsx("div",{className:`ed-overflow-hidden ed-transition-all ed-ease-in-out ${n===p.id?"ed-max-h-96 ed-opacity-100 ed-mt-3":"ed-max-h-0 ed-opacity-0"}`,children:(m=p==null?void 0:p.section_articles)==null?void 0:m.map(y=>F.jsxs("button",{type:"button",onClick:()=>t(y==null?void 0:y.id),className:"ed-flex ed-items-center ed-gap-2 ed-flex-1 ed-w-full ed-px-6 ed-py-2 ed-hover:bg-white-light ed-group ed-text-left",children:[F.jsx("p",{className:"ed-text-border-dark ed-text-14 ed-font-medium ed-group-hover:text-brand-link ed-flex-1 ed-ease-in-out ed-transition-all",children:om((y==null?void 0:y.title)||"")}),F.jsx("div",{className:"ed-size-4 ed--translate-x-2 ed-opacity-0 ed-group-hover:opacity-100 ed-group-hover:translate-x-2 ed-transition-all",children:F.jsx(fh,{className:"ed-text-border ed-size-4"})})]},y.id))})]})},p.id)})})},fee=({loading:t,selectedCategory:e,setArticleId:n,articleId:r,isAuthenticated:a,setSelectedCategory:s})=>F.jsx("div",{children:t?F.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:F.jsx(Ul,{})}):e&&r||!e&&r?F.jsx(see,{articleId:r,setArticleId:n,isAuthenticated:a}):e&&!r?F.jsx(cee,{setArticleId:n,selectedCategory:e}):F.jsx(xJ,{setSelectedCategory:s})}),dee=({setIsCreateNewTicketClicked:t})=>{const{t:e}=bh();return F.jsxs("div",{className:"ed-flex ed-flex-col ed-items-center ed-justify-center ed-min-h-min ed-h-full",children:[F.jsx(wG,{}),F.jsxs("p",{className:"ed-text-14 ed-text-border-regular ed-text-center",children:[e("widget.label.no_article_found"),F.jsx("button",{type:"button",onClick:()=>t(!0),className:"ed-text-14 ed-font-semibold ed-text-brand-link ed-ml-1",children:e("widget.label.click_here")})]})]})},hee=({isPopupOpen:t,handlePopupTrigger:e,orgBrandSetting:n})=>{const r=X9("(max-width: 768px)"),{brand:a,widget_icon_key:s}=n;return F.jsx("button",{type:"button",onClick:e,style:{transformOrigin:"center",translate:"50% 50%"},className:`${r&&t?"ed-hidden":""} hover:ed-size-14 ed-fixed ed-bottom-12 ed-right-12 ed-z-[9999999] ed-rounded-full ed-inline-flex ed-justify-center ed-items-center ed-bg-brand ed-size-12 ed-cursor-pointer ed-origin-center ed-transition-all ed-duration-200 ed-ease-in-out`,children:F.jsxs("div",{className:"ed-relative ed-w-8 ed-h-8 ed-flex ed-items-center ed-justify-center",children:[F.jsx("div",{className:`ed-absolute ed-transition-all ed-duration-300 ${t?"ed-opacity-100 ed-scale-100 ed-rotate-[360deg]":"ed-opacity-0 ed-scale-0 ed-rotate-0"}`,children:F.jsx(em,{className:"ed-size-7 ed-text-white"})}),F.jsx("div",{className:`ed-absolute ed-transition-all ed-duration-300 ${t?"ed-opacity-0 ed-scale-0 ed-rotate-[360deg]":"ed-opacity-100 ed-scale-100 ed-rotate-0"}`,children:s?F.jsx(Wu,{alt:`${a==null?void 0:a.name}'s widget icon`,defaultUserNameTextSize:"text-10",className:"ed-size-7 ed-object-cover ed-rounded-full",defaultImageClasses:"ed-w-7 ed-h-7",path:s,defaultImageName:sh(a==null?void 0:a.name)}):F.jsx(_G,{height:28,width:28})})]})})},pee=({activeTab:t,handleTabChange:e,orgBrandSetting:n={}})=>{const{t:r}=bh(),{remove_app_branding:a,is_knowledge_base_enabled:s,is_live_chat_enabled:u}=n,f=[{id:1,key:"messages",label:"Messages",icon:xG},{id:2,key:"knowledge_base",label:"Knowledge base",icon:TG}],d=z.useMemo(()=>s&&u,[s,u]);return F.jsxs("div",{className:`${d&&"ed-shadow-[0_-8px_10px_rgba(0,0,0,0.02)] ed-pt-2.5"} 'ed-h-max'`,children:[s&&u&&F.jsx("div",{className:"ed-grid ed-grid-cols-2",children:f.map(p=>{const m=t===p.key;return F.jsxs("button",{type:"button",onClick:()=>e(p.key),className:"ed-flex ed-flex-col ed-items-center ed-justify-center",children:[F.jsx(p.icon,{isActive:m}),F.jsx("h3",{className:`ed-text-14 ed-font-semibold ${m?"ed-text-brand":"ed-text-border-regular"} ed-inline-block`,children:p.label})]},p.id)})}),!a&&F.jsxs("p",{className:"ed-py-2 ed-text-center ed-text-12 ed-font-medium ed-text-border-regular ed-bg-gray md:ed-rounded-b-[10px] ed-mt-1.5",children:[r("widget.label.powerd_by")," ",F.jsx(ZP,{href:"https://easydesk.app/",target:"_blank",className:"ed-text-14 ed-font-semibold ed-text-border-regular",children:r("widget.label.easydesk")})]})]})},vee=({searchedText:t,selectedCategory:e,setSearchedText:n,setArticleId:r,setSelectedCategory:a,setIsPopupOpen:s,handleSearch:u,setArticlesData:f,brandInfo:d,activeTab:p})=>{const{t:m}=bh(),y=X9("(max-width: 768px)"),b=()=>{n(""),r(null),a(null)};return F.jsx("div",{className:"ed-bg-brand ed-py-8 ed-px-5 md:ed-rounded-t-[10px] ed-h-max",children:p==="messages"?F.jsxs("div",{className:"ed-flex ed-items-center ed-justify-between",children:[F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[F.jsx(Wu,{className:"ed-size-10 ed-rounded-full ed-object-cover ed-shrink-0",defaultImageClasses:"ed-h-10 ed-w-10 ed-shrink-0",path:d==null?void 0:d.logo_icon_key,defaultImageName:sh(d==null?void 0:d.name)}),F.jsx("h6",{className:"ed-text-14 ed-font-semibold ed-text-white",children:d==null?void 0:d.name})]}),y&&F.jsx("button",{type:"button",onClick:()=>s(!1),children:F.jsx(hu,{size:20,className:"ed-text-white"})})]}):F.jsxs("div",{children:[F.jsxs("div",{className:"ed-flex ed-items-start ed-justify-between",children:[Qt.size(t)||e?F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-mb-4",children:[F.jsx(vC,{onClick:b,className:"ed-text-white ed-size-5"}),F.jsx("p",{className:"ed-text-14 ed-font-medium ed-text-white",children:m("widget.label.knowledge_base")})]}):F.jsxs("div",{children:[F.jsx("p",{className:"ed-text-14 ed-font-medium ed-text-white",children:m("widget.label.lets_explore")}),F.jsx("h4",{className:"ed-text-24 ed-font-bold ed-text-white ed-mt-2 ed-mb-4",children:m("widget.label.knowledge_base")})]}),y&&F.jsx("button",{type:"button",onClick:()=>s(!1),children:F.jsx(hu,{size:20,className:"ed-text-white"})})]}),F.jsxs("div",{className:"ed-bg-white ed-rounded-full ed-border ed-border-border-light ed-flex ed-items-center ed-justify-between ed-gap-2 ed-px-4 ed-py-2.5",children:[F.jsx("input",{value:t,onChange:S=>u(S.target.value),placeholder:m("widget.placeholder.search_for_articles"),type:"text",className:"ed-bg-transparent ed-outline-none ed-w-full ed-placeholder:text-14 ed-placeholder:font-medium ed-placeholder:text-border"}),F.jsxs("div",{className:"ed-flex ed-items-center ed-gap-3",children:[t&&F.jsx("button",{type:"button",onClick:()=>{n(""),f([])},children:F.jsx(hu,{size:20,className:"ed-text-border"})}),F.jsx(LC,{size:24,className:"ed-text-border"})]})]})]})})};var $R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GET_ARTICLES"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"queryData"}},type:{kind:"NamedType",name:{kind:"Name",value:"ArticleQueryInputType"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"optionData"}},type:{kind:"NamedType",name:{kind:"Name",value:"OptionDataType"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getArticles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"queryData"},value:{kind:"Variable",name:{kind:"Name",value:"queryData"}}},{kind:"Argument",name:{kind:"Name",value:"optionData"},value:{kind:"Variable",name:{kind:"Name",value:"optionData"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:193}};$R.loc.source={body:`query GET_ARTICLES($queryData: ArticleQueryInputType, $optionData: OptionDataType) {
|
|
701
701
|
getArticles(queryData: $queryData, optionData: $optionData) {
|
|
702
702
|
data {
|
|
703
703
|
id
|
|
@@ -705,4 +705,4 @@ Open your browser's console to view the Component stack trace.`:""))};Object.key
|
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function ib(t,e){if(t.kind==="FragmentSpread")e.add(t.name.value);else if(t.kind==="VariableDefinition"){var n=t.type;n.kind==="NamedType"&&e.add(n.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(r){ib(r,e)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(r){ib(r,e)}),t.definitions&&t.definitions.forEach(function(r){ib(r,e)})}var UR={};(function(){$R.definitions.forEach(function(e){if(e.name){var n=new Set;ib(e,n),UR[e.name.value]=n}})})();function nM(t,e){for(var n=0;n<t.definitions.length;n++){var r=t.definitions[n];if(r.name&&r.name.value==e)return r}}function mee(t,e){var n={kind:t.kind,definitions:[nM(t,e)]};t.hasOwnProperty("loc")&&(n.loc=t.loc);var r=UR[e]||new Set,a=new Set,s=new Set;for(r.forEach(function(f){s.add(f)});s.size>0;){var u=s;s=new Set,u.forEach(function(f){if(!a.has(f)){a.add(f);var d=UR[f]||new Set;d.forEach(function(p){s.add(p)})}})}return a.forEach(function(f){var d=nM(t,f);d&&n.definitions.push(d)}),n}const gee=mee($R,"GET_ARTICLES"),yee=t=>{const{userData:e}=t||{},[n,r]=z.useState(!1),[a,s]=z.useState(""),[u,f]=z.useState(null),[d,p]=z.useState(null),[m,y]=z.useState(!1),[b,S]=z.useState([]),[w,C]=z.useState(""),[x,O]=z.useState(!1),[k,D]=z.useState({}),[P,{loading:T}]=jl(gee,{errorPolicy:"all",fetchPolicy:"no-cache",onCompleted:G=>{var K;S(((K=G==null?void 0:G.getArticles)==null?void 0:K.data)||[])},onError:G=>{console.error(G)}}),N=Wq(G=>{P({variables:{queryData:{search_keyword:G}}})},500),M=G=>{s(G),N(G)},U=async()=>{O(!0);try{const G=await Gq();if(G){const{font:K,is_knowledge_base_enabled:X,is_live_chat_enabled:ee,theme_color:me}=G;D(G),Qq(me),Yq(K),(X&&!ee||X&&ee)&&C("knowledge_base"),!X&&ee&&C("messages"),O(!1)}}catch(G){console.error(G),O(!1)}},H=()=>{r(!n),s(""),f(null),p(null),y(!1),U()};z.useEffect(()=>{U()},[]);const Y=()=>w==="knowledge_base"?F.jsx(fee,{loading:T,articleId:d,isAuthenticated:e==null?void 0:e.isAuthenticated,selectedCategory:u,setArticleId:p,setSelectedCategory:f}):w==="messages"?F.jsx(wJ,{orgBrandSetting:k,setIsPopupOpen:r,userData:e}):null,{brand:J,is_knowledge_base_enabled:ue,is_live_chat_enabled:Z}=k||{},Q=G=>{C(G),s(""),f(null),p(null),y(!1)};return!ue&&!Z?null:F.jsxs("div",{children:[F.jsx(hee,{isPopupOpen:n,handlePopupTrigger:H,orgBrandSetting:k}),F.jsx("div",{className:`ed-
|
|
708
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function ib(t,e){if(t.kind==="FragmentSpread")e.add(t.name.value);else if(t.kind==="VariableDefinition"){var n=t.type;n.kind==="NamedType"&&e.add(n.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(r){ib(r,e)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(r){ib(r,e)}),t.definitions&&t.definitions.forEach(function(r){ib(r,e)})}var UR={};(function(){$R.definitions.forEach(function(e){if(e.name){var n=new Set;ib(e,n),UR[e.name.value]=n}})})();function nM(t,e){for(var n=0;n<t.definitions.length;n++){var r=t.definitions[n];if(r.name&&r.name.value==e)return r}}function mee(t,e){var n={kind:t.kind,definitions:[nM(t,e)]};t.hasOwnProperty("loc")&&(n.loc=t.loc);var r=UR[e]||new Set,a=new Set,s=new Set;for(r.forEach(function(f){s.add(f)});s.size>0;){var u=s;s=new Set,u.forEach(function(f){if(!a.has(f)){a.add(f);var d=UR[f]||new Set;d.forEach(function(p){s.add(p)})}})}return a.forEach(function(f){var d=nM(t,f);d&&n.definitions.push(d)}),n}const gee=mee($R,"GET_ARTICLES"),yee=t=>{const{userData:e}=t||{},[n,r]=z.useState(!1),[a,s]=z.useState(""),[u,f]=z.useState(null),[d,p]=z.useState(null),[m,y]=z.useState(!1),[b,S]=z.useState([]),[w,C]=z.useState(""),[x,O]=z.useState(!1),[k,D]=z.useState({}),[P,{loading:T}]=jl(gee,{errorPolicy:"all",fetchPolicy:"no-cache",onCompleted:G=>{var K;S(((K=G==null?void 0:G.getArticles)==null?void 0:K.data)||[])},onError:G=>{console.error(G)}}),N=Wq(G=>{P({variables:{queryData:{search_keyword:G}}})},500),M=G=>{s(G),N(G)},U=async()=>{O(!0);try{const G=await Gq();if(G){const{font:K,is_knowledge_base_enabled:X,is_live_chat_enabled:ee,theme_color:me}=G;D(G),Qq(me),Yq(K),(X&&!ee||X&&ee)&&C("knowledge_base"),!X&&ee&&C("messages"),O(!1)}}catch(G){console.error(G),O(!1)}},H=()=>{r(!n),s(""),f(null),p(null),y(!1),U()};z.useEffect(()=>{U()},[]);const Y=()=>w==="knowledge_base"?F.jsx(fee,{loading:T,articleId:d,isAuthenticated:e==null?void 0:e.isAuthenticated,selectedCategory:u,setArticleId:p,setSelectedCategory:f}):w==="messages"?F.jsx(wJ,{orgBrandSetting:k,setIsPopupOpen:r,userData:e}):null,{brand:J,is_knowledge_base_enabled:ue,is_live_chat_enabled:Z}=k||{},Q=G=>{C(G),s(""),f(null),p(null),y(!1)};return!ue&&!Z?null:F.jsxs("div",{children:[F.jsx(hee,{isPopupOpen:n,handlePopupTrigger:H,orgBrandSetting:k}),F.jsx("div",{className:`ed-fixed ${n?"ed-opacity-100 ed-w-screen ed-h-dvh md:ed-max-h-[704px] md:ed-h-[80vh] md:ed-w-[400px]":"ed-opacity-0 ed-max-h-0 ed-h-0 ed-w-0 ed-pointer-events-none"} md:ed-bottom-24 md:ed-right-6 ed-bottom-0 ed-right-0 ed-bg-white ed-shadow-lg md:ed-rounded-[10px] ed-z-[9999999] ed-p-0.5 ed-overflow-hidden ed-transition-all ed-duration-300 ed-ease-in-out ed-flex ed-flex-col`,children:n&&F.jsxs(F.Fragment,{children:[F.jsx(vee,{searchedText:a,selectedCategory:u,setSearchedText:s,setArticleId:p,setSelectedCategory:f,setIsPopupOpen:r,handleSearch:M,setArticlesData:S,brandInfo:J,activeTab:w}),F.jsx("div",{className:`ed-flex-1 ed-overflow-y-auto no-scrollbar ed-px-5 ${w==="knowledge_base"?"ed-pb-5":""} ed-pt-1 ed-root-scrollbar`,children:a?F.jsx("div",{className:"ed-h-full",children:Qt.size(b)?F.jsx(uW,{}):F.jsx(dee,{setIsCreateNewTicketClicked:y})}):F.jsx("div",{className:`${w==="knowledge_base"?"ed-py-1":""} ed-space-y-4`,children:Y()})}),F.jsx(pee,{activeTab:w,handleTabChange:Q,orgBrandSetting:k}),m&&F.jsx(pG,{setIsCreateNewTicketClicked:y,setSearchedText:s,searchedText:a,isAuthenticated:e==null?void 0:e.isAuthenticated})]})})]})},bee=async(t,e)=>{var n;try{const r=await jr.post(`${Lw()||e}/auth/widget-login`,{api_key:t});return((n=r==null?void 0:r.data)==null?void 0:n.data)||{}}catch{return{access_token:null,refresh_token:null}}},zR=t=>{const{apiKey:e,envVariables:n}=t,[r,a]=z.useState(!1),[s,u]=z.useState(!1),f=(n==null?void 0:n.apiBaseUrl)||"https://api.easydesk.app",d=async m=>{a(!0);const y=await bee(m,f);y!=null&&y.access_token&&(Fw("easydesk_chat_widget_public_access_token",y==null?void 0:y.access_token,{expires:30}),a(!1))};z.useEffect(()=>{e&&d(e)},[e]),z.useEffect(()=>{n!=null&&n.apiBaseUrl&&(n!=null&&n.cdnDomain)?H3(n):H3({apiBaseUrl:"https://api.easydesk.app",cdnDomain:"easydesk-prod"}),u(!0)},[n]);const p=z.useMemo(()=>rC(f),[f]);return r||!s?F.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:F.jsx(ux,{})}):F.jsxs(hz,{client:p,children:[F.jsx(zz,{}),F.jsx(yee,{...t})]})},VR=t=>{let e=document.getElementById("easydesk-chat-container");e||(e=document.createElement("div"),e.id="ed-widget",document.body.appendChild(e)),yI.createRoot(e).render(F.jsx(zR,{...t}))},rM=()=>{const t=document.getElementById("ed-widget");if(t){const e=t.getAttribute("ed-key"),n=t.getAttribute("ed-api-url"),r=t.getAttribute("ed-cdn-domain");e?VR({apiKey:e,envVariables:{apiBaseUrl:n,cdnDomain:r}}):console.error("ChatKey: API key is required for initialization")}};typeof window<"u"&&(window.ChatKey={init:VR},document.readyState==="complete"?rM():window.addEventListener("load",rM));const See=Object.freeze(Object.defineProperty({__proto__:null,default:{widget:{label:{click_here:"click here",copy_code:"Copy code",create_a_ticket:"Create a ticket",easydesk:"EasyDesk",explore_more_articles:"Explore more articles",knowledge_base:"Knowledge Base",lets_explore:"Let's explore",no_article_found:"We couldn't find any articles that match your search. Want to create a ticket?",powerd_by:"Powered by",soon_get_response:"Soon you will get an email",ticket_created:"Ticket created",thank_you_for_your_feedback:"Thank you for your valuable feedback!"},placeholder:{search_for_articles:"Search for articles"}}}},Symbol.toStringTag,{value:"Module"})),Eee=Object.freeze(Object.defineProperty({__proto__:null,default:{widget:{label:{click_here:"klikk her",copy_code:"Kopier kode",create_a_ticket:"Opprett en sak",easydesk:"EasyDesk",explore_more_articles:"Utforsk flere artikler",knowledge_base:"Kunnskapsbase",lets_explore:"La oss utforske",no_article_found:"Vi fant ingen artikler som samsvarer med søket ditt. Vil du opprette en sak?",powerd_by:"Drevet av",soon_get_response:"Du vil snart motta en e-post",ticket_created:"Sak opprettet",thank_you_for_your_feedback:"Takk for tilbakemeldingen din!"},placeholder:{search_for_articles:"Søk etter artikler"}}}},Symbol.toStringTag,{value:"Module"}));eo.Widget=zR,eo.default=zR,eo.initChatKey=VR,Object.defineProperties(eo,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/npm/ed-widget.js
CHANGED
|
@@ -167,7 +167,7 @@ Valid keys: `+JSON.stringify(Object.keys(q),null," "));var Y=de(ge,ce,ie,pe,le+
|
|
|
167
167
|
<h6 className="ed-text-14 ed-font-semibold ed-text-border-dark">Email</h6>
|
|
168
168
|
<p className="ed-text-border-regular ed-truncate">${p==null?void 0:p.contact_person_email}</p>
|
|
169
169
|
</div>
|
|
170
|
-
</div>`,is_customer_reply:!0},{message:l?a:i,is_customer_reply:!1}]}}}),x=_==null?void 0:_.createAConversationForPortal;x!=null&&x.id&&(n(x==null?void 0:x.id),Uh("easydesk_chat_widget_conversation_id",x==null?void 0:x.id,{expires:30}),e==null||e({contact_person_name:p==null?void 0:p.contact_person_name,contact_person_email:p==null?void 0:p.contact_person_email}))}catch(_){const{message:x,response:k}=_;en("error",((T=k==null?void 0:k.data)==null?void 0:T.message)||x,"top-left")}},w=C=>{const{name:T,value:_}=C.target;m(x=>({...x,[T]:_}))},S=L.useMemo(()=>!(p!=null&&p.contact_person_name)||!(p!=null&&p.contact_person_email)||!Hh(p==null?void 0:p.contact_person_email),[p]);return L.useEffect(()=>{const C=setTimeout(()=>{h(!1)},1e3);return()=>clearTimeout(C)},[]),O.jsxs("div",{className:"ed-space-y-5",children:[O.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[O.jsx("div",{children:O.jsx(Si,{className:"ed-size-7 ed-object-cover ed-rounded-full",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:u==null?void 0:u.logo_icon_key,defaultImageName:Fo(u==null?void 0:u.name)})}),O.jsxs("div",{children:[O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[O.jsx("p",{className:"ed-text-border-regular",children:u==null?void 0:u.name}),O.jsx("span",{className:"ed-text-border ed-font-medium",children:Vl().format("HH:MM")})]}),d?O.jsx("div",{className:"ed-py-4",children:O.jsx(_v,{})}):O.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-rounded-lg ed-mt-2",children:O.jsx("p",{className:"ed-text-border-dark",children:o})})]})]}),!d&&O.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto",children:O.jsxs("form",{onSubmit:b,className:"ed-p-5 ed-rounded-[20px] ed-bg-white-light ed-space-y-5",children:[O.jsxs("div",{className:"ed-space-y-2",children:[O.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Name ",O.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),O.jsx("input",{type:"text",name:"contact_person_name",required:!0,placeholder:"Enter your name",value:p==null?void 0:p.contact_person_name,onChange:w,disabled:c,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),O.jsxs("div",{className:"ed-space-y-2",children:[O.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Email ",O.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),O.jsx("input",{type:"email",name:"contact_person_email",required:!0,placeholder:"Enter your email",value:p==null?void 0:p.contact_person_email,onChange:w,disabled:c,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),O.jsx("div",{className:"ed-flex ed-justify-end",children:O.jsx(Qo,{title:"Submit",loaderText:"Submitting",fullWidthBtn:!0,disabled:S||y,loader:d||y,callBack:b})})]})})]})},QR=({height:e="48",width:t="49"})=>O.jsx("svg",{width:t,height:e,viewBox:"0 0 49 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("path",{d:"M42.5 23.0001C42.5069 25.6398 41.8901 28.2438 40.7 30.6001C39.2889 33.4235 37.1195 35.7984 34.4349 37.4586C31.7503 39.1188 28.6565 39.9988 25.5 40.0001C22.8603 40.0069 20.2562 39.3902 17.9 38.2001L6.5 42.0001L10.3 30.6001C9.10986 28.2438 8.49312 25.6398 8.5 23.0001C8.50122 19.8436 9.38122 16.7498 11.0414 14.0652C12.7017 11.3806 15.0765 9.21119 17.9 7.80006C20.2562 6.60992 22.8603 5.99317 25.5 6.00006H26.5C30.6687 6.23004 34.6061 7.98958 37.5583 10.9418C40.5105 13.894 42.27 17.8314 42.5 22.0001V23.0001Z",fill:"white",stroke:"#00A1E0",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),YR=()=>O.jsxs("svg",{width:"192",height:"165",viewBox:"0 0 192 165",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{opacity:"0.4",d:"M124.365 148.68H57.3652L63.8177 119.68H117.913L124.365 148.68Z",fill:"#44A9F1"}),O.jsx("path",{opacity:"0.4",d:"M173.775 119.874H7.99173C3.77973 119.874 0.365234 116.459 0.365234 112.247V7.80619C0.365234 3.59419 3.77973 0.179688 7.99173 0.179688H173.775C177.987 0.179688 181.402 3.59419 181.402 7.80619V112.247C181.402 116.459 177.987 119.874 173.775 119.874Z",fill:"#44A9F1"}),O.jsx("path",{d:"M169.382 107.314H12.3843C8.17232 107.314 4.75781 103.9 4.75781 99.6877V11.4077C4.75781 7.19575 8.17232 3.78125 12.3843 3.78125H169.382C173.594 3.78125 177.009 7.19575 177.009 11.4077V99.6877C177.009 103.9 173.594 107.314 169.382 107.314Z",fill:"white"}),O.jsx("path",{opacity:"0.4",d:"M138.348 159.397H43.418V154.811C43.418 151.265 46.2925 148.391 49.8385 148.391H131.927C135.473 148.391 138.348 151.265 138.348 154.811V159.397Z",fill:"#44A9F1"}),O.jsx("path",{d:"M10.375 107.312H168.21",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("path",{d:"M47.5977 157.107V154.699C47.5977 153.243 48.7781 152.062 50.2346 152.062H121.432",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("path",{d:"M113.863 123.398L116.385 142.66",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("path",{d:"M89.2912 117.684C91.331 117.684 92.9847 116.03 92.9847 113.99C92.9847 111.951 91.331 110.297 89.2912 110.297C87.2513 110.297 85.5977 111.951 85.5977 113.99C85.5977 116.03 87.2513 117.684 89.2912 117.684Z",fill:"white"}),O.jsx("path",{d:"M141.84 10.8125H161.445C165.181 10.8125 168.209 13.841 168.209 17.577V58.3125",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("g",{opacity:"0.5",children:O.jsx("path",{d:"M88.1608 69.8837C88.0874 66.9345 88.253 64.5539 88.6584 62.7429C89.0634 60.9321 89.8966 59.2607 91.1596 57.7286C91.8875 56.8101 92.7171 56.0144 93.6518 55.3405C94.5848 54.6678 95.4423 53.9582 96.2249 53.213C97.0058 52.469 97.6603 51.639 98.1883 50.7253C98.7159 49.8117 98.9617 48.6306 98.9257 47.1804C98.8644 44.7316 98.1469 43.0353 96.7729 42.0943C95.3989 41.1533 93.7863 40.7055 91.9372 40.7516C89.2865 40.8179 87.4805 41.6012 86.518 43.1003C85.5544 44.6005 84.9787 46.6032 84.7917 49.1089L75.1185 49.3502C75.0577 46.9012 75.4013 44.6662 76.1517 42.6464C76.9013 40.6275 77.9965 38.8991 79.4365 37.4622C80.8761 36.0265 82.6238 34.9069 84.6804 34.105C86.7351 33.3035 89.0133 32.8716 91.5136 32.8092C96.9126 32.6746 101.201 33.6687 104.382 35.79C107.56 37.9127 109.212 41.4473 109.335 46.3966C109.375 47.9972 109.247 49.4003 108.953 50.6083C108.657 51.8161 108.196 52.9155 107.572 53.9068C106.945 54.8976 106.168 55.8304 105.24 56.7039C104.311 57.578 103.258 58.479 102.081 59.4086C101.002 60.2865 100.135 61.0962 99.4778 61.837C98.821 62.5793 98.3267 63.3549 97.9977 64.1625C97.6672 64.9714 97.4633 65.8153 97.3853 66.6912C97.3066 67.5691 97.2818 68.5583 97.3095 69.6569L88.1608 69.8837ZM88.2219 84.3642L87.977 74.5405L98.1001 74.2883L98.345 84.112L88.2219 84.3642Z",fill:"#44A9F1"})}),O.jsx("path",{d:"M189.428 162.528C186.451 165.558 181.581 165.6 178.551 162.622L142.516 127.208L153.299 116.236L189.333 151.65C192.364 154.628 192.406 159.498 189.428 162.528Z",fill:"#004E92"}),O.jsx("path",{opacity:"0.2",d:"M156.307 99.3327C156.268 82.1553 142.311 68.2623 125.133 68.3018C107.956 68.3413 94.0628 82.2984 94.1023 99.4757C94.1418 116.653 108.099 130.546 125.276 130.507C142.454 130.467 156.347 116.51 156.307 99.3327Z",fill:"#F8F9FB"}),O.jsx("path",{d:"M99.6105 74.257C85.7147 88.3958 85.9121 111.123 100.051 125.018C114.19 138.914 136.917 138.717 150.813 124.577C164.709 110.439 164.511 87.7118 150.372 73.816C136.232 59.9202 113.506 60.1176 99.6105 74.257ZM146.295 120.137C134.851 131.781 116.136 131.944 104.491 120.5C92.8472 109.057 92.6847 90.341 104.128 78.6972C115.571 67.0533 134.287 66.8909 145.932 78.3342C157.576 89.777 157.738 108.493 146.295 120.137Z",fill:"#004E92"}),O.jsx("path",{d:"M156.613 124.724L185.106 152.727",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("path",{d:"M91.8946 96.8405C91.0045 105.663 94.0498 114.81 100.05 121.339C106.052 127.869 114.91 131.672 123.777 131.527",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})]}),KR=({height:e="238",width:t="300"})=>O.jsxs("svg",{width:t,height:e,viewBox:"0 0 300 238",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{d:"M59.041 51C59.041 51 177.481 15.24 231.121 19.26C231.121 19.26 256.261 126.48 250.321 133.08C244.381 139.68 87.121 166.2 82.681 162.84C78.241 159.48 59.041 51 59.041 51Z",fill:"#00A1E0"}),O.jsx("path",{d:"M77.7021 72.12C77.7021 72.12 77.5221 74.58 78.1821 74.64C78.8421 74.7 89.4021 72.42 89.4021 72.42C89.4021 72.42 93.1821 97.92 94.5621 98.34C95.9421 98.76 99.7221 97.32 99.7221 97.32L93.9621 71.22C93.9621 71.22 106.562 69.3 106.442 68.52L106.082 66.54L77.7021 72.12Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M109.98 66.4201C110.16 66.3601 110.28 66.3001 110.46 66.2401C111.54 65.7601 114.06 64.6201 114.6 65.5201C115.26 66.6601 117.72 77.3401 117.72 77.3401L130.2 74.8801C130.2 74.8801 127.56 62.6401 128.28 62.1601C129 61.6801 131.82 61.1401 132.54 61.3201C133.26 61.5001 138.18 87.6601 138 89.0401C137.82 90.4201 134.28 90.9601 133.8 90.3601C133.32 89.7601 130.92 77.1601 130.92 77.1601L117.84 79.1401C117.84 79.1401 120.72 93.1201 119.94 93.6601C119.16 94.2001 116.76 94.8001 115.86 94.4401C114.96 94.0801 109.98 66.4201 109.98 66.4201Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M144.841 88.6799C145.681 88.3199 146.521 87.8399 147.181 87.2399C147.841 86.4599 150.901 65.2199 150.901 65.2199C150.901 65.2199 163.441 85.2599 164.041 84.9599C164.641 84.6599 169.321 83.3999 169.321 83.3999C169.321 83.3999 152.701 56.9999 151.381 57.2999L150.061 57.5999C150.061 57.5999 143.641 87.8399 144.841 88.6799Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M147.781 77.3999L159.181 75.1799L158.821 73.4399L148.501 74.9399L147.061 77.5799L147.781 77.3999Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M175.26 81.6601C175.26 81.6601 176.4 81.9601 176.7 81.3601C177 80.7601 172.08 58.0201 172.08 58.0201C172.08 58.0201 192.72 77.9401 194.1 77.8801C194.88 77.8801 195.66 77.7601 196.44 77.6401C196.44 77.6401 191.88 50.6401 191.04 50.2201C190.2 49.8001 188.34 50.7601 188.34 50.7601L192.54 70.5001C192.54 70.5001 174.48 53.1001 173.46 53.4601C172.44 53.8201 169.74 53.8201 168.9 54.3601C168.06 54.9001 175.26 81.6601 175.26 81.6601Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M203.941 76.2001C203.941 76.2001 208.261 76.0201 208.501 75.3001C208.741 74.5801 206.161 63.5401 206.161 63.5401C206.161 63.5401 221.461 73.0201 223.021 72.7201C224.581 72.4201 229.741 71.6401 229.561 71.1601C229.381 70.6801 208.681 60.2401 208.681 60.2401C208.681 60.2401 219.661 46.2601 219.481 45.4201C219.301 44.5801 215.281 45.1201 215.281 45.1201L205.381 60.1201C205.381 60.1201 203.341 47.5201 202.981 47.5201C202.621 47.5201 198.001 48.5401 197.881 49.0201C197.761 49.5001 203.941 76.2001 203.941 76.2001Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M118.08 111.36C118.08 111.36 130.92 124.02 131.4 125.52C131.88 127.02 133.38 135.54 134.28 136.2C135.18 136.86 137.22 135.9 137.88 135.48C138.54 135.06 135.72 124.5 135.72 124.5C135.72 124.5 143.58 105.54 142.56 105.3C141.54 105.06 139.26 105.96 139.26 105.96L133.92 121.8C133.92 121.8 122.82 109.2 121.8 109.44C120.78 109.68 116.94 110.22 118.08 111.36Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M177.84 98.3397C177.84 98.3397 182.94 96.5997 183.24 97.8597C183.54 99.1197 185.28 119.82 189.84 122.16C194.4 124.5 202.2 120 201.78 116.04C201.36 112.08 198 95.5797 198.78 95.0397C199.56 94.4997 201.36 93.7197 201.78 96.4197C202.2 99.1197 207.18 115.62 202.62 120.3C198.06 124.98 185.46 128.1 181.98 119.34C178.5 110.58 177.84 98.3397 177.84 98.3397Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M173.581 111.6C170.881 103.56 162.061 100.2 155.881 102.54C155.881 102.54 147.421 105.24 146.161 113.82C144.901 122.4 151.321 131.52 161.521 130.92C171.721 130.32 176.281 119.64 173.581 111.6ZM162.481 127.74C155.761 127.92 151.201 120.54 151.861 113.76C152.521 106.98 157.981 105.12 157.981 105.12C162.001 103.44 167.941 106.38 169.981 112.8C172.021 119.22 169.201 127.56 162.481 127.74Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M52.2605 112.2L49.5005 111C53.2205 102.3 53.2805 99.9603 53.1605 99.3603C52.2605 99.3603 49.9205 100.62 48.3605 101.46C45.1805 103.14 41.6405 105 38.5805 104.76C36.4805 104.58 35.5805 103.5 35.2205 102.6C33.3005 98.0403 41.8205 87.4203 44.4605 84.3003L46.7405 86.2203C41.8805 91.9803 37.2005 99.4803 37.9805 101.46C38.0405 101.64 38.3405 101.76 38.8205 101.82C40.9805 102 44.2805 100.26 46.9805 98.8203C50.5805 96.9003 53.4605 95.4003 55.2605 97.0803C57.3605 99.0003 55.7405 104.1 52.2605 112.2Z",fill:"#00A1E0"}),O.jsx("path",{d:"M258.481 51.3602L256.621 49.0202C258.541 47.4602 258.961 46.5602 259.021 46.3202C258.781 46.2002 258.001 45.7802 255.481 45.8402C252.241 45.9002 250.381 45.1202 249.841 43.3802C248.941 40.5602 252.661 37.6202 254.881 36.1202C255.721 35.5802 256.081 35.1002 256.021 34.8602C255.961 34.2002 254.221 33.0602 252.841 32.5202L253.921 29.7002C254.701 30.0002 258.721 31.6202 259.021 34.5002C259.201 36.0002 258.361 37.3802 256.561 38.5802C253.741 40.4402 252.781 41.9402 252.721 42.3602C252.841 42.4802 253.501 42.7802 255.421 42.7802C256.801 42.7202 260.941 42.6602 261.841 45.1802C262.501 47.0402 261.421 49.0202 258.481 51.3602Z",fill:"#004E92"}),O.jsx("path",{d:"M49.0805 60.9C48.9605 60.3 45.8405 46.56 54.2405 43.5L55.2605 46.32C49.4405 48.42 52.0205 60.06 52.0205 60.18L49.0805 60.9Z",fill:"#004E92"}),O.jsx("path",{d:"M253.92 164.04L253.44 161.1C259.26 160.2 261.06 159.42 261.54 159C260.88 158.28 258.66 157.02 257.16 156.12C254.28 154.44 250.98 152.58 249.24 150.24C247.8 148.32 248.1 146.94 248.64 146.16C250.68 142.8 260.76 144.18 265.02 144.96L264.48 147.9C258.42 146.82 252.18 146.76 251.22 147.66C251.34 147.96 251.46 148.2 251.64 148.44C252.96 150.24 255.96 151.98 258.6 153.48C262.32 155.64 265.02 157.14 264.6 159.48C264.3 161.7 261.36 162.9 253.92 164.04Z",fill:"#00A1E0"}),O.jsx("path",{d:"M61.0198 156.66C60.2398 156.36 56.2198 154.74 55.9198 151.86C55.7398 150.36 56.5798 148.98 58.3798 147.78C61.1998 145.92 62.1598 144.42 62.2198 144C62.0998 143.88 61.4398 143.52 59.5198 143.58C58.1398 143.64 53.9998 143.7 53.0998 141.18C52.4398 139.44 53.5798 137.46 56.4598 135.12L58.3198 137.46C56.3998 139.02 55.9798 139.92 55.9198 140.16C56.1598 140.28 56.9998 140.7 59.4598 140.64C62.6998 140.58 64.5598 141.42 65.0998 143.1C65.9998 145.92 62.2798 148.86 60.0598 150.36C59.2198 150.9 58.9198 151.38 58.9198 151.62C58.9798 152.28 60.7198 153.42 62.0998 153.96L61.0198 156.66Z",fill:"#00A1E0"}),O.jsx("path",{d:"M258.421 83.2799L257.881 80.3399C259.561 80.0399 260.641 79.3799 261.121 78.4799C261.841 77.1599 261.241 75.2399 260.941 74.6399L263.641 73.3799C263.701 73.4999 265.261 76.9199 263.761 79.8599C262.861 81.5999 261.061 82.7999 258.421 83.2799Z",fill:"#00A1E0"}),O.jsx("path",{d:"M46.5003 195.48C42.8403 190.44 41.9403 188.1 43.0803 186.54C44.4003 184.74 47.2203 185.58 51.1803 186.84C53.8803 187.68 56.8803 188.64 59.0403 188.52C59.2203 188.52 59.4603 188.46 59.6403 188.46C59.0403 187.14 55.5603 183.9 51.7803 181.26L53.5203 178.8C58.1403 182.04 63.4803 186.54 62.6403 189.48C62.4003 190.38 61.5603 191.4 59.1603 191.52C56.5203 191.64 53.1603 190.62 50.2803 189.72C48.7803 189.18 47.2803 188.82 45.7203 188.52C45.9603 189.18 46.6803 190.68 48.9003 193.74L46.5003 195.48Z",fill:"#004E92"}),O.jsx("path",{d:"M194.281 164.46L191.521 163.38C191.821 162.6 192.421 160.2 191.581 158.58C191.101 157.68 190.141 157.02 188.701 156.72L189.301 153.78C191.641 154.26 193.261 155.4 194.221 157.14C195.841 160.32 194.341 164.28 194.281 164.46Z",fill:"#004E92"}),O.jsx("path",{d:"M240.54 218.22L238.86 215.76C238.86 215.76 241.38 214.02 241.68 211.8C241.8 210.6 241.38 209.46 240.54 208.56C237.78 205.32 235.38 200.76 236.88 197.82C237.3 196.92 238.5 195.42 241.56 195.6C242.88 195.66 243.84 195.42 244.08 194.94C244.44 194.22 244.14 192.3 241.98 189.18L244.44 187.5C247.08 191.28 247.8 194.4 246.72 196.44C246.12 197.52 244.68 198.78 241.44 198.66C240.72 198.66 239.82 198.72 239.58 199.26C239.04 200.34 240 203.34 242.88 206.76C244.26 208.26 244.92 210.3 244.68 212.34C244.14 215.76 240.66 218.1 240.54 218.22Z",fill:"#004E92"})]}),XR=({isActive:e=!1})=>O.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{d:"M3.5 21.29V6C3.5 5.46957 3.71071 4.96086 4.08579 4.58579C4.46086 4.21071 4.96957 4 5.5 4H19.5C20.0304 4 20.5391 4.21071 20.9142 4.58579C21.2893 4.96086 21.5 5.46957 21.5 6V16C21.5 16.5304 21.2893 17.0391 20.9142 17.4142C20.5391 17.7893 20.0304 18 19.5 18H8.461C8.16123 18 7.86531 18.0675 7.59511 18.1973C7.32491 18.3271 7.08735 18.516 6.9 18.75L4.569 21.664C4.49143 21.7612 4.38556 21.8319 4.26604 21.8664C4.14652 21.9008 4.01926 21.8972 3.90186 21.8561C3.78446 21.815 3.68273 21.7385 3.61073 21.6371C3.53874 21.5357 3.50005 21.4144 3.5 21.29Z",className:e?"ed-stroke-brand":"ed-fill-white",stroke:"#797979",strokeWidth:"1.5"}),O.jsx("path",{d:"M7.5 13H17.5M7.5 9H13.5",className:e?"ed-stroke-brand":"ed-stroke-border-regular",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),ZR=({isActive:e=!1})=>O.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.8571 7.5H13.7857L13.3357 7.68987L12.5 8.5L11.6643 7.68987L11.2143 7.5H4.14286L3.5 8.13291V20.7911L4.14286 21.424H10.9443L12.05 22.5H12.95L14.0557 21.424H20.8571L21.5 20.7911V8.13291L20.8571 7.5ZM11.8571 20.5633L11.6257 20.3481L11.2143 20.1582H4.78571V8.76582H10.9443L11.8957 9.70253L11.8571 20.5633ZM20.2143 20.1582H13.7857L13.3357 20.3481L13.1557 20.5127V9.6519L14.0557 8.76582H20.2143V20.1582ZM9.92857 12.2975H6.07143C5.3 12.2975 5.3 13.5633 6.07143 13.5633H9.92857C10.7 13.5633 10.7 12.2975 9.92857 12.2975ZM9.92857 17.3608H6.07143C5.3 17.3608 5.3 18.6266 6.07143 18.6266H9.92857C10.7 18.6266 10.7 17.3608 9.92857 17.3608ZM6.07143 14.8291H9.92857C10.7 14.8291 10.7 16.0949 9.92857 16.0949H6.07143C5.29297 16.0949 5.3 14.8291 6.07143 14.8291ZM18.9286 12.2975H15.0714C14.3 12.2975 14.3 13.5633 15.0714 13.5633H18.9286C19.7 13.5633 19.7 12.2975 18.9286 12.2975ZM15.0714 14.8291H18.9286C19.7 14.8291 19.7 16.0949 18.9286 16.0949H15.0714C14.3 16.0949 14.3 14.8291 15.0714 14.8291ZM15.0714 17.3608H18.9286C19.7 17.3608 19.7 18.6266 18.9286 18.6266H15.0714C14.3 18.6266 14.3 17.3608 15.0714 17.3608Z",className:e?"ed-fill-brand":"ed-fill-border-regular"}),O.jsx("path",{d:"M11.3634 7.22827C11.1775 8.71234 10.1635 9.30535 9.72555 9.73582C9.28695 10.1676 9.3655 10.2535 9.39496 10.8867C9.39988 10.965 9.38801 11.0435 9.36008 11.1173C9.33216 11.191 9.28877 11.2585 9.23259 11.3156C9.17641 11.3727 9.10863 11.4182 9.03343 11.4492C8.95823 11.4802 8.87719 11.4961 8.79532 11.496H7.05532C6.97351 11.4959 6.89258 11.4798 6.81748 11.4487C6.74237 11.4175 6.67467 11.3721 6.6185 11.3151C6.56232 11.2581 6.51886 11.1907 6.49075 11.117C6.46265 11.0434 6.45049 10.965 6.45503 10.8867C6.45503 10.2654 6.51525 10.1211 6.12509 9.73582C5.62757 9.25891 4.4571 8.58558 4.4571 6.73378C4.45411 6.27381 4.55056 5.81824 4.74036 5.39577C4.93017 4.9733 5.20922 4.59311 5.55992 4.27916C5.91062 3.9652 6.32536 3.72429 6.77801 3.57161C7.23066 3.41894 7.71139 3.3578 8.18991 3.39206C8.66843 3.42632 9.13436 3.55524 9.55833 3.77068C9.98229 3.98612 10.3551 4.28342 10.6533 4.64383C10.9514 5.00424 11.1684 5.41996 11.2907 5.86476C11.4129 6.30957 11.4377 6.77382 11.3634 7.22827Z",fill:"white",className:e?"ed-stroke-brand":"ed-stroke-border-regular",strokeLinecap:"round",strokeLinejoin:"round"}),O.jsx("path",{d:"M6.91717 11.4599V12.4087C6.91717 12.6679 7.06773 12.8806 7.25299 12.8806H8.59694C8.78351 12.8806 8.93342 12.6672 8.93342 12.4087V11.4599M10.5 2.5L11.5 1.5M8 1L8 2M4.5 1.5L5.5 2.5",className:e?"ed-stroke-brand":"ed-stroke-border-regular",strokeLinecap:"round",strokeLinejoin:"round"})]}),JR=()=>O.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{d:"M4.875 0C4.04662 0 3.375 0.671625 3.375 1.5V22.5C3.375 23.3284 4.04662 24 4.875 24H19.125C19.9534 24 20.625 23.3284 20.625 22.5V6L14.625 0H4.875Z",fill:"#E2E7F0"}),O.jsx("path",{d:"M16.125 6H20.625L14.625 0V4.5C14.625 5.32837 15.2966 6 16.125 6ZM9 7.5H15C15.207 7.5 15.375 7.668 15.375 7.875C15.375 8.082 15.207 8.25 15 8.25H9C8.793 8.25 8.625 8.082 8.625 7.875C8.625 7.668 8.793 7.5 9 7.5ZM6.75 15.375H17.25C17.457 15.375 17.625 15.543 17.625 15.75C17.625 15.957 17.457 16.125 17.25 16.125H6.75C6.543 16.125 6.375 15.957 6.375 15.75C6.375 15.543 6.543 15.375 6.75 15.375ZM6.75 19.875H12.75C12.957 19.875 13.125 20.043 13.125 20.25C13.125 20.457 12.957 20.625 12.75 20.625H6.75C6.543 20.625 6.375 20.457 6.375 20.25C6.375 20.043 6.543 19.875 6.75 19.875ZM6.75 17.625H17.25C17.457 17.625 17.625 17.793 17.625 18C17.625 18.207 17.457 18.375 17.25 18.375H6.75C6.543 18.375 6.375 18.207 6.375 18C6.375 17.793 6.543 17.625 6.75 17.625ZM6.75 13.125H17.25C17.457 13.125 17.625 13.293 17.625 13.5C17.625 13.707 17.457 13.875 17.25 13.875H6.75C6.543 13.875 6.375 13.707 6.375 13.5C6.375 13.293 6.543 13.125 6.75 13.125ZM6.75 10.875H17.25C17.457 10.875 17.625 11.043 17.625 11.25C17.625 11.457 17.457 11.625 17.25 11.625H6.75C6.543 11.625 6.375 11.457 6.375 11.25C6.375 11.043 6.543 10.875 6.75 10.875Z",fill:"#9DACBA"}),O.jsx("path",{d:"M16.125 6L19.6537 9.52875C19.7239 9.59855 19.7796 9.68153 19.8175 9.77292C19.8555 9.8643 19.875 9.96229 19.875 10.0612V22.5C19.875 22.9144 19.5394 23.25 19.125 23.25H5.625C5.21062 23.25 4.875 23.5856 4.875 24H19.125C19.9534 24 20.625 23.3284 20.625 22.5V6H16.125Z",fill:"#C9D5E3"})]});var Tv={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GET_FILE_DOWNLOADING_URL"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"queryData"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FileDownloadingInputDataType"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFileDownloadingURLForWidget"},arguments:[{kind:"Argument",name:{kind:"Name",value:"queryData"},value:{kind:"Variable",name:{kind:"Name",value:"queryData"}}}],directives:[]}]}}],loc:{start:0,end:134}};Tv.loc.source={body:`query GET_FILE_DOWNLOADING_URL($queryData: FileDownloadingInputDataType!) {
|
|
170
|
+
</div>`,is_customer_reply:!0},{message:l?a:i,is_customer_reply:!1}]}}}),x=_==null?void 0:_.createAConversationForPortal;x!=null&&x.id&&(n(x==null?void 0:x.id),Uh("easydesk_chat_widget_conversation_id",x==null?void 0:x.id,{expires:30}),e==null||e({contact_person_name:p==null?void 0:p.contact_person_name,contact_person_email:p==null?void 0:p.contact_person_email}))}catch(_){const{message:x,response:k}=_;en("error",((T=k==null?void 0:k.data)==null?void 0:T.message)||x,"top-left")}},w=C=>{const{name:T,value:_}=C.target;m(x=>({...x,[T]:_}))},S=L.useMemo(()=>!(p!=null&&p.contact_person_name)||!(p!=null&&p.contact_person_email)||!Hh(p==null?void 0:p.contact_person_email),[p]);return L.useEffect(()=>{const C=setTimeout(()=>{h(!1)},1e3);return()=>clearTimeout(C)},[]),O.jsxs("div",{className:"ed-space-y-5",children:[O.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[O.jsx(Si,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:u==null?void 0:u.logo_icon_key,defaultImageName:Fo(u==null?void 0:u.name)}),O.jsxs("div",{children:[O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[O.jsx("p",{className:"ed-text-border-regular",children:u==null?void 0:u.name}),O.jsx("span",{className:"ed-text-border ed-font-medium",children:Vl().format("HH:MM")})]}),d?O.jsx("div",{className:"ed-py-4",children:O.jsx(_v,{})}):O.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-rounded-lg ed-mt-2",children:O.jsx("p",{className:"ed-text-border-dark",children:o})})]})]}),!d&&O.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto",children:O.jsxs("form",{onSubmit:b,className:"ed-p-5 ed-rounded-[20px] ed-bg-white-light ed-space-y-5",children:[O.jsxs("div",{className:"ed-space-y-2",children:[O.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Name ",O.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),O.jsx("input",{type:"text",name:"contact_person_name",required:!0,placeholder:"Enter your name",value:p==null?void 0:p.contact_person_name,onChange:w,disabled:c,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),O.jsxs("div",{className:"ed-space-y-2",children:[O.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Email ",O.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),O.jsx("input",{type:"email",name:"contact_person_email",required:!0,placeholder:"Enter your email",value:p==null?void 0:p.contact_person_email,onChange:w,disabled:c,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),O.jsx("div",{className:"ed-flex ed-justify-end",children:O.jsx(Qo,{title:"Submit",loaderText:"Submitting",fullWidthBtn:!0,disabled:S||y,loader:d||y,callBack:b})})]})})]})},QR=({height:e="48",width:t="49"})=>O.jsx("svg",{width:t,height:e,viewBox:"0 0 49 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("path",{d:"M42.5 23.0001C42.5069 25.6398 41.8901 28.2438 40.7 30.6001C39.2889 33.4235 37.1195 35.7984 34.4349 37.4586C31.7503 39.1188 28.6565 39.9988 25.5 40.0001C22.8603 40.0069 20.2562 39.3902 17.9 38.2001L6.5 42.0001L10.3 30.6001C9.10986 28.2438 8.49312 25.6398 8.5 23.0001C8.50122 19.8436 9.38122 16.7498 11.0414 14.0652C12.7017 11.3806 15.0765 9.21119 17.9 7.80006C20.2562 6.60992 22.8603 5.99317 25.5 6.00006H26.5C30.6687 6.23004 34.6061 7.98958 37.5583 10.9418C40.5105 13.894 42.27 17.8314 42.5 22.0001V23.0001Z",fill:"white",stroke:"#00A1E0",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),YR=()=>O.jsxs("svg",{width:"192",height:"165",viewBox:"0 0 192 165",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{opacity:"0.4",d:"M124.365 148.68H57.3652L63.8177 119.68H117.913L124.365 148.68Z",fill:"#44A9F1"}),O.jsx("path",{opacity:"0.4",d:"M173.775 119.874H7.99173C3.77973 119.874 0.365234 116.459 0.365234 112.247V7.80619C0.365234 3.59419 3.77973 0.179688 7.99173 0.179688H173.775C177.987 0.179688 181.402 3.59419 181.402 7.80619V112.247C181.402 116.459 177.987 119.874 173.775 119.874Z",fill:"#44A9F1"}),O.jsx("path",{d:"M169.382 107.314H12.3843C8.17232 107.314 4.75781 103.9 4.75781 99.6877V11.4077C4.75781 7.19575 8.17232 3.78125 12.3843 3.78125H169.382C173.594 3.78125 177.009 7.19575 177.009 11.4077V99.6877C177.009 103.9 173.594 107.314 169.382 107.314Z",fill:"white"}),O.jsx("path",{opacity:"0.4",d:"M138.348 159.397H43.418V154.811C43.418 151.265 46.2925 148.391 49.8385 148.391H131.927C135.473 148.391 138.348 151.265 138.348 154.811V159.397Z",fill:"#44A9F1"}),O.jsx("path",{d:"M10.375 107.312H168.21",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("path",{d:"M47.5977 157.107V154.699C47.5977 153.243 48.7781 152.062 50.2346 152.062H121.432",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("path",{d:"M113.863 123.398L116.385 142.66",stroke:"#3B3B3B","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("path",{d:"M89.2912 117.684C91.331 117.684 92.9847 116.03 92.9847 113.99C92.9847 111.951 91.331 110.297 89.2912 110.297C87.2513 110.297 85.5977 111.951 85.5977 113.99C85.5977 116.03 87.2513 117.684 89.2912 117.684Z",fill:"white"}),O.jsx("path",{d:"M141.84 10.8125H161.445C165.181 10.8125 168.209 13.841 168.209 17.577V58.3125",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("g",{opacity:"0.5",children:O.jsx("path",{d:"M88.1608 69.8837C88.0874 66.9345 88.253 64.5539 88.6584 62.7429C89.0634 60.9321 89.8966 59.2607 91.1596 57.7286C91.8875 56.8101 92.7171 56.0144 93.6518 55.3405C94.5848 54.6678 95.4423 53.9582 96.2249 53.213C97.0058 52.469 97.6603 51.639 98.1883 50.7253C98.7159 49.8117 98.9617 48.6306 98.9257 47.1804C98.8644 44.7316 98.1469 43.0353 96.7729 42.0943C95.3989 41.1533 93.7863 40.7055 91.9372 40.7516C89.2865 40.8179 87.4805 41.6012 86.518 43.1003C85.5544 44.6005 84.9787 46.6032 84.7917 49.1089L75.1185 49.3502C75.0577 46.9012 75.4013 44.6662 76.1517 42.6464C76.9013 40.6275 77.9965 38.8991 79.4365 37.4622C80.8761 36.0265 82.6238 34.9069 84.6804 34.105C86.7351 33.3035 89.0133 32.8716 91.5136 32.8092C96.9126 32.6746 101.201 33.6687 104.382 35.79C107.56 37.9127 109.212 41.4473 109.335 46.3966C109.375 47.9972 109.247 49.4003 108.953 50.6083C108.657 51.8161 108.196 52.9155 107.572 53.9068C106.945 54.8976 106.168 55.8304 105.24 56.7039C104.311 57.578 103.258 58.479 102.081 59.4086C101.002 60.2865 100.135 61.0962 99.4778 61.837C98.821 62.5793 98.3267 63.3549 97.9977 64.1625C97.6672 64.9714 97.4633 65.8153 97.3853 66.6912C97.3066 67.5691 97.2818 68.5583 97.3095 69.6569L88.1608 69.8837ZM88.2219 84.3642L87.977 74.5405L98.1001 74.2883L98.345 84.112L88.2219 84.3642Z",fill:"#44A9F1"})}),O.jsx("path",{d:"M189.428 162.528C186.451 165.558 181.581 165.6 178.551 162.622L142.516 127.208L153.299 116.236L189.333 151.65C192.364 154.628 192.406 159.498 189.428 162.528Z",fill:"#004E92"}),O.jsx("path",{opacity:"0.2",d:"M156.307 99.3327C156.268 82.1553 142.311 68.2623 125.133 68.3018C107.956 68.3413 94.0628 82.2984 94.1023 99.4757C94.1418 116.653 108.099 130.546 125.276 130.507C142.454 130.467 156.347 116.51 156.307 99.3327Z",fill:"#F8F9FB"}),O.jsx("path",{d:"M99.6105 74.257C85.7147 88.3958 85.9121 111.123 100.051 125.018C114.19 138.914 136.917 138.717 150.813 124.577C164.709 110.439 164.511 87.7118 150.372 73.816C136.232 59.9202 113.506 60.1176 99.6105 74.257ZM146.295 120.137C134.851 131.781 116.136 131.944 104.491 120.5C92.8472 109.057 92.6847 90.341 104.128 78.6972C115.571 67.0533 134.287 66.8909 145.932 78.3342C157.576 89.777 157.738 108.493 146.295 120.137Z",fill:"#004E92"}),O.jsx("path",{d:"M156.613 124.724L185.106 152.727",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),O.jsx("path",{d:"M91.8946 96.8405C91.0045 105.663 94.0498 114.81 100.05 121.339C106.052 127.869 114.91 131.672 123.777 131.527",stroke:"white","stroke-width":"0.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})]}),KR=({height:e="238",width:t="300"})=>O.jsxs("svg",{width:t,height:e,viewBox:"0 0 300 238",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{d:"M59.041 51C59.041 51 177.481 15.24 231.121 19.26C231.121 19.26 256.261 126.48 250.321 133.08C244.381 139.68 87.121 166.2 82.681 162.84C78.241 159.48 59.041 51 59.041 51Z",fill:"#00A1E0"}),O.jsx("path",{d:"M77.7021 72.12C77.7021 72.12 77.5221 74.58 78.1821 74.64C78.8421 74.7 89.4021 72.42 89.4021 72.42C89.4021 72.42 93.1821 97.92 94.5621 98.34C95.9421 98.76 99.7221 97.32 99.7221 97.32L93.9621 71.22C93.9621 71.22 106.562 69.3 106.442 68.52L106.082 66.54L77.7021 72.12Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M109.98 66.4201C110.16 66.3601 110.28 66.3001 110.46 66.2401C111.54 65.7601 114.06 64.6201 114.6 65.5201C115.26 66.6601 117.72 77.3401 117.72 77.3401L130.2 74.8801C130.2 74.8801 127.56 62.6401 128.28 62.1601C129 61.6801 131.82 61.1401 132.54 61.3201C133.26 61.5001 138.18 87.6601 138 89.0401C137.82 90.4201 134.28 90.9601 133.8 90.3601C133.32 89.7601 130.92 77.1601 130.92 77.1601L117.84 79.1401C117.84 79.1401 120.72 93.1201 119.94 93.6601C119.16 94.2001 116.76 94.8001 115.86 94.4401C114.96 94.0801 109.98 66.4201 109.98 66.4201Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M144.841 88.6799C145.681 88.3199 146.521 87.8399 147.181 87.2399C147.841 86.4599 150.901 65.2199 150.901 65.2199C150.901 65.2199 163.441 85.2599 164.041 84.9599C164.641 84.6599 169.321 83.3999 169.321 83.3999C169.321 83.3999 152.701 56.9999 151.381 57.2999L150.061 57.5999C150.061 57.5999 143.641 87.8399 144.841 88.6799Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M147.781 77.3999L159.181 75.1799L158.821 73.4399L148.501 74.9399L147.061 77.5799L147.781 77.3999Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M175.26 81.6601C175.26 81.6601 176.4 81.9601 176.7 81.3601C177 80.7601 172.08 58.0201 172.08 58.0201C172.08 58.0201 192.72 77.9401 194.1 77.8801C194.88 77.8801 195.66 77.7601 196.44 77.6401C196.44 77.6401 191.88 50.6401 191.04 50.2201C190.2 49.8001 188.34 50.7601 188.34 50.7601L192.54 70.5001C192.54 70.5001 174.48 53.1001 173.46 53.4601C172.44 53.8201 169.74 53.8201 168.9 54.3601C168.06 54.9001 175.26 81.6601 175.26 81.6601Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M203.941 76.2001C203.941 76.2001 208.261 76.0201 208.501 75.3001C208.741 74.5801 206.161 63.5401 206.161 63.5401C206.161 63.5401 221.461 73.0201 223.021 72.7201C224.581 72.4201 229.741 71.6401 229.561 71.1601C229.381 70.6801 208.681 60.2401 208.681 60.2401C208.681 60.2401 219.661 46.2601 219.481 45.4201C219.301 44.5801 215.281 45.1201 215.281 45.1201L205.381 60.1201C205.381 60.1201 203.341 47.5201 202.981 47.5201C202.621 47.5201 198.001 48.5401 197.881 49.0201C197.761 49.5001 203.941 76.2001 203.941 76.2001Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M118.08 111.36C118.08 111.36 130.92 124.02 131.4 125.52C131.88 127.02 133.38 135.54 134.28 136.2C135.18 136.86 137.22 135.9 137.88 135.48C138.54 135.06 135.72 124.5 135.72 124.5C135.72 124.5 143.58 105.54 142.56 105.3C141.54 105.06 139.26 105.96 139.26 105.96L133.92 121.8C133.92 121.8 122.82 109.2 121.8 109.44C120.78 109.68 116.94 110.22 118.08 111.36Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M177.84 98.3397C177.84 98.3397 182.94 96.5997 183.24 97.8597C183.54 99.1197 185.28 119.82 189.84 122.16C194.4 124.5 202.2 120 201.78 116.04C201.36 112.08 198 95.5797 198.78 95.0397C199.56 94.4997 201.36 93.7197 201.78 96.4197C202.2 99.1197 207.18 115.62 202.62 120.3C198.06 124.98 185.46 128.1 181.98 119.34C178.5 110.58 177.84 98.3397 177.84 98.3397Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M173.581 111.6C170.881 103.56 162.061 100.2 155.881 102.54C155.881 102.54 147.421 105.24 146.161 113.82C144.901 122.4 151.321 131.52 161.521 130.92C171.721 130.32 176.281 119.64 173.581 111.6ZM162.481 127.74C155.761 127.92 151.201 120.54 151.861 113.76C152.521 106.98 157.981 105.12 157.981 105.12C162.001 103.44 167.941 106.38 169.981 112.8C172.021 119.22 169.201 127.56 162.481 127.74Z",fill:"#F2EBEB"}),O.jsx("path",{d:"M52.2605 112.2L49.5005 111C53.2205 102.3 53.2805 99.9603 53.1605 99.3603C52.2605 99.3603 49.9205 100.62 48.3605 101.46C45.1805 103.14 41.6405 105 38.5805 104.76C36.4805 104.58 35.5805 103.5 35.2205 102.6C33.3005 98.0403 41.8205 87.4203 44.4605 84.3003L46.7405 86.2203C41.8805 91.9803 37.2005 99.4803 37.9805 101.46C38.0405 101.64 38.3405 101.76 38.8205 101.82C40.9805 102 44.2805 100.26 46.9805 98.8203C50.5805 96.9003 53.4605 95.4003 55.2605 97.0803C57.3605 99.0003 55.7405 104.1 52.2605 112.2Z",fill:"#00A1E0"}),O.jsx("path",{d:"M258.481 51.3602L256.621 49.0202C258.541 47.4602 258.961 46.5602 259.021 46.3202C258.781 46.2002 258.001 45.7802 255.481 45.8402C252.241 45.9002 250.381 45.1202 249.841 43.3802C248.941 40.5602 252.661 37.6202 254.881 36.1202C255.721 35.5802 256.081 35.1002 256.021 34.8602C255.961 34.2002 254.221 33.0602 252.841 32.5202L253.921 29.7002C254.701 30.0002 258.721 31.6202 259.021 34.5002C259.201 36.0002 258.361 37.3802 256.561 38.5802C253.741 40.4402 252.781 41.9402 252.721 42.3602C252.841 42.4802 253.501 42.7802 255.421 42.7802C256.801 42.7202 260.941 42.6602 261.841 45.1802C262.501 47.0402 261.421 49.0202 258.481 51.3602Z",fill:"#004E92"}),O.jsx("path",{d:"M49.0805 60.9C48.9605 60.3 45.8405 46.56 54.2405 43.5L55.2605 46.32C49.4405 48.42 52.0205 60.06 52.0205 60.18L49.0805 60.9Z",fill:"#004E92"}),O.jsx("path",{d:"M253.92 164.04L253.44 161.1C259.26 160.2 261.06 159.42 261.54 159C260.88 158.28 258.66 157.02 257.16 156.12C254.28 154.44 250.98 152.58 249.24 150.24C247.8 148.32 248.1 146.94 248.64 146.16C250.68 142.8 260.76 144.18 265.02 144.96L264.48 147.9C258.42 146.82 252.18 146.76 251.22 147.66C251.34 147.96 251.46 148.2 251.64 148.44C252.96 150.24 255.96 151.98 258.6 153.48C262.32 155.64 265.02 157.14 264.6 159.48C264.3 161.7 261.36 162.9 253.92 164.04Z",fill:"#00A1E0"}),O.jsx("path",{d:"M61.0198 156.66C60.2398 156.36 56.2198 154.74 55.9198 151.86C55.7398 150.36 56.5798 148.98 58.3798 147.78C61.1998 145.92 62.1598 144.42 62.2198 144C62.0998 143.88 61.4398 143.52 59.5198 143.58C58.1398 143.64 53.9998 143.7 53.0998 141.18C52.4398 139.44 53.5798 137.46 56.4598 135.12L58.3198 137.46C56.3998 139.02 55.9798 139.92 55.9198 140.16C56.1598 140.28 56.9998 140.7 59.4598 140.64C62.6998 140.58 64.5598 141.42 65.0998 143.1C65.9998 145.92 62.2798 148.86 60.0598 150.36C59.2198 150.9 58.9198 151.38 58.9198 151.62C58.9798 152.28 60.7198 153.42 62.0998 153.96L61.0198 156.66Z",fill:"#00A1E0"}),O.jsx("path",{d:"M258.421 83.2799L257.881 80.3399C259.561 80.0399 260.641 79.3799 261.121 78.4799C261.841 77.1599 261.241 75.2399 260.941 74.6399L263.641 73.3799C263.701 73.4999 265.261 76.9199 263.761 79.8599C262.861 81.5999 261.061 82.7999 258.421 83.2799Z",fill:"#00A1E0"}),O.jsx("path",{d:"M46.5003 195.48C42.8403 190.44 41.9403 188.1 43.0803 186.54C44.4003 184.74 47.2203 185.58 51.1803 186.84C53.8803 187.68 56.8803 188.64 59.0403 188.52C59.2203 188.52 59.4603 188.46 59.6403 188.46C59.0403 187.14 55.5603 183.9 51.7803 181.26L53.5203 178.8C58.1403 182.04 63.4803 186.54 62.6403 189.48C62.4003 190.38 61.5603 191.4 59.1603 191.52C56.5203 191.64 53.1603 190.62 50.2803 189.72C48.7803 189.18 47.2803 188.82 45.7203 188.52C45.9603 189.18 46.6803 190.68 48.9003 193.74L46.5003 195.48Z",fill:"#004E92"}),O.jsx("path",{d:"M194.281 164.46L191.521 163.38C191.821 162.6 192.421 160.2 191.581 158.58C191.101 157.68 190.141 157.02 188.701 156.72L189.301 153.78C191.641 154.26 193.261 155.4 194.221 157.14C195.841 160.32 194.341 164.28 194.281 164.46Z",fill:"#004E92"}),O.jsx("path",{d:"M240.54 218.22L238.86 215.76C238.86 215.76 241.38 214.02 241.68 211.8C241.8 210.6 241.38 209.46 240.54 208.56C237.78 205.32 235.38 200.76 236.88 197.82C237.3 196.92 238.5 195.42 241.56 195.6C242.88 195.66 243.84 195.42 244.08 194.94C244.44 194.22 244.14 192.3 241.98 189.18L244.44 187.5C247.08 191.28 247.8 194.4 246.72 196.44C246.12 197.52 244.68 198.78 241.44 198.66C240.72 198.66 239.82 198.72 239.58 199.26C239.04 200.34 240 203.34 242.88 206.76C244.26 208.26 244.92 210.3 244.68 212.34C244.14 215.76 240.66 218.1 240.54 218.22Z",fill:"#004E92"})]}),XR=({isActive:e=!1})=>O.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{d:"M3.5 21.29V6C3.5 5.46957 3.71071 4.96086 4.08579 4.58579C4.46086 4.21071 4.96957 4 5.5 4H19.5C20.0304 4 20.5391 4.21071 20.9142 4.58579C21.2893 4.96086 21.5 5.46957 21.5 6V16C21.5 16.5304 21.2893 17.0391 20.9142 17.4142C20.5391 17.7893 20.0304 18 19.5 18H8.461C8.16123 18 7.86531 18.0675 7.59511 18.1973C7.32491 18.3271 7.08735 18.516 6.9 18.75L4.569 21.664C4.49143 21.7612 4.38556 21.8319 4.26604 21.8664C4.14652 21.9008 4.01926 21.8972 3.90186 21.8561C3.78446 21.815 3.68273 21.7385 3.61073 21.6371C3.53874 21.5357 3.50005 21.4144 3.5 21.29Z",className:e?"ed-stroke-brand":"ed-fill-white",stroke:"#797979",strokeWidth:"1.5"}),O.jsx("path",{d:"M7.5 13H17.5M7.5 9H13.5",className:e?"ed-stroke-brand":"ed-stroke-border-regular",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),ZR=({isActive:e=!1})=>O.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.8571 7.5H13.7857L13.3357 7.68987L12.5 8.5L11.6643 7.68987L11.2143 7.5H4.14286L3.5 8.13291V20.7911L4.14286 21.424H10.9443L12.05 22.5H12.95L14.0557 21.424H20.8571L21.5 20.7911V8.13291L20.8571 7.5ZM11.8571 20.5633L11.6257 20.3481L11.2143 20.1582H4.78571V8.76582H10.9443L11.8957 9.70253L11.8571 20.5633ZM20.2143 20.1582H13.7857L13.3357 20.3481L13.1557 20.5127V9.6519L14.0557 8.76582H20.2143V20.1582ZM9.92857 12.2975H6.07143C5.3 12.2975 5.3 13.5633 6.07143 13.5633H9.92857C10.7 13.5633 10.7 12.2975 9.92857 12.2975ZM9.92857 17.3608H6.07143C5.3 17.3608 5.3 18.6266 6.07143 18.6266H9.92857C10.7 18.6266 10.7 17.3608 9.92857 17.3608ZM6.07143 14.8291H9.92857C10.7 14.8291 10.7 16.0949 9.92857 16.0949H6.07143C5.29297 16.0949 5.3 14.8291 6.07143 14.8291ZM18.9286 12.2975H15.0714C14.3 12.2975 14.3 13.5633 15.0714 13.5633H18.9286C19.7 13.5633 19.7 12.2975 18.9286 12.2975ZM15.0714 14.8291H18.9286C19.7 14.8291 19.7 16.0949 18.9286 16.0949H15.0714C14.3 16.0949 14.3 14.8291 15.0714 14.8291ZM15.0714 17.3608H18.9286C19.7 17.3608 19.7 18.6266 18.9286 18.6266H15.0714C14.3 18.6266 14.3 17.3608 15.0714 17.3608Z",className:e?"ed-fill-brand":"ed-fill-border-regular"}),O.jsx("path",{d:"M11.3634 7.22827C11.1775 8.71234 10.1635 9.30535 9.72555 9.73582C9.28695 10.1676 9.3655 10.2535 9.39496 10.8867C9.39988 10.965 9.38801 11.0435 9.36008 11.1173C9.33216 11.191 9.28877 11.2585 9.23259 11.3156C9.17641 11.3727 9.10863 11.4182 9.03343 11.4492C8.95823 11.4802 8.87719 11.4961 8.79532 11.496H7.05532C6.97351 11.4959 6.89258 11.4798 6.81748 11.4487C6.74237 11.4175 6.67467 11.3721 6.6185 11.3151C6.56232 11.2581 6.51886 11.1907 6.49075 11.117C6.46265 11.0434 6.45049 10.965 6.45503 10.8867C6.45503 10.2654 6.51525 10.1211 6.12509 9.73582C5.62757 9.25891 4.4571 8.58558 4.4571 6.73378C4.45411 6.27381 4.55056 5.81824 4.74036 5.39577C4.93017 4.9733 5.20922 4.59311 5.55992 4.27916C5.91062 3.9652 6.32536 3.72429 6.77801 3.57161C7.23066 3.41894 7.71139 3.3578 8.18991 3.39206C8.66843 3.42632 9.13436 3.55524 9.55833 3.77068C9.98229 3.98612 10.3551 4.28342 10.6533 4.64383C10.9514 5.00424 11.1684 5.41996 11.2907 5.86476C11.4129 6.30957 11.4377 6.77382 11.3634 7.22827Z",fill:"white",className:e?"ed-stroke-brand":"ed-stroke-border-regular",strokeLinecap:"round",strokeLinejoin:"round"}),O.jsx("path",{d:"M6.91717 11.4599V12.4087C6.91717 12.6679 7.06773 12.8806 7.25299 12.8806H8.59694C8.78351 12.8806 8.93342 12.6672 8.93342 12.4087V11.4599M10.5 2.5L11.5 1.5M8 1L8 2M4.5 1.5L5.5 2.5",className:e?"ed-stroke-brand":"ed-stroke-border-regular",strokeLinecap:"round",strokeLinejoin:"round"})]}),JR=()=>O.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{d:"M4.875 0C4.04662 0 3.375 0.671625 3.375 1.5V22.5C3.375 23.3284 4.04662 24 4.875 24H19.125C19.9534 24 20.625 23.3284 20.625 22.5V6L14.625 0H4.875Z",fill:"#E2E7F0"}),O.jsx("path",{d:"M16.125 6H20.625L14.625 0V4.5C14.625 5.32837 15.2966 6 16.125 6ZM9 7.5H15C15.207 7.5 15.375 7.668 15.375 7.875C15.375 8.082 15.207 8.25 15 8.25H9C8.793 8.25 8.625 8.082 8.625 7.875C8.625 7.668 8.793 7.5 9 7.5ZM6.75 15.375H17.25C17.457 15.375 17.625 15.543 17.625 15.75C17.625 15.957 17.457 16.125 17.25 16.125H6.75C6.543 16.125 6.375 15.957 6.375 15.75C6.375 15.543 6.543 15.375 6.75 15.375ZM6.75 19.875H12.75C12.957 19.875 13.125 20.043 13.125 20.25C13.125 20.457 12.957 20.625 12.75 20.625H6.75C6.543 20.625 6.375 20.457 6.375 20.25C6.375 20.043 6.543 19.875 6.75 19.875ZM6.75 17.625H17.25C17.457 17.625 17.625 17.793 17.625 18C17.625 18.207 17.457 18.375 17.25 18.375H6.75C6.543 18.375 6.375 18.207 6.375 18C6.375 17.793 6.543 17.625 6.75 17.625ZM6.75 13.125H17.25C17.457 13.125 17.625 13.293 17.625 13.5C17.625 13.707 17.457 13.875 17.25 13.875H6.75C6.543 13.875 6.375 13.707 6.375 13.5C6.375 13.293 6.543 13.125 6.75 13.125ZM6.75 10.875H17.25C17.457 10.875 17.625 11.043 17.625 11.25C17.625 11.457 17.457 11.625 17.25 11.625H6.75C6.543 11.625 6.375 11.457 6.375 11.25C6.375 11.043 6.543 10.875 6.75 10.875Z",fill:"#9DACBA"}),O.jsx("path",{d:"M16.125 6L19.6537 9.52875C19.7239 9.59855 19.7796 9.68153 19.8175 9.77292C19.8555 9.8643 19.875 9.96229 19.875 10.0612V22.5C19.875 22.9144 19.5394 23.25 19.125 23.25H5.625C5.21062 23.25 4.875 23.5856 4.875 24H19.125C19.9534 24 20.625 23.3284 20.625 22.5V6H16.125Z",fill:"#C9D5E3"})]});var Tv={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GET_FILE_DOWNLOADING_URL"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"queryData"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FileDownloadingInputDataType"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFileDownloadingURLForWidget"},arguments:[{kind:"Argument",name:{kind:"Name",value:"queryData"},value:{kind:"Variable",name:{kind:"Name",value:"queryData"}}}],directives:[]}]}}],loc:{start:0,end:134}};Tv.loc.source={body:`query GET_FILE_DOWNLOADING_URL($queryData: FileDownloadingInputDataType!) {
|
|
171
171
|
getFileDownloadingURLForWidget(queryData: $queryData)
|
|
172
172
|
}
|
|
173
173
|
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function mc(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(r){mc(r,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(r){mc(r,t)}),e.definitions&&e.definitions.forEach(function(r){mc(r,t)})}var Ov={};(function(){Tv.definitions.forEach(function(t){if(t.name){var n=new Set;mc(t,n),Ov[t.name.value]=n}})})();function Iw(e,t){for(var n=0;n<e.definitions.length;n++){var r=e.definitions[n];if(r.name&&r.name.value==t)return r}}function eA(e,t){var n={kind:e.kind,definitions:[Iw(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=Ov[t]||new Set,i=new Set,a=new Set;for(r.forEach(function(u){a.add(u)});a.size>0;){var o=a;a=new Set,o.forEach(function(u){if(!i.has(u)){i.add(u);var l=Ov[u]||new Set;l.forEach(function(c){a.add(c)})}})}return i.forEach(function(u){var l=Iw(e,u);l&&n.definitions.push(l)}),n}const tA=eA(Tv,"GET_FILE_DOWNLOADING_URL"),nA=({previewImageInfo:e,setPreviewImageInfo:t,isPrivate:n=!1})=>{const[r,i]=L.useState(1),a=L.useRef(null),o=()=>{t(Wh),i(1)};L.useEffect(()=>{const y=b=>{b.key==="Escape"&&o()};return window.addEventListener("keydown",y),()=>{window.removeEventListener("keydown",y)}},[]);const{fileName:u,isOpen:l,loading:c,error:d,url:h,height:p,width:m}=e||{},g=L.useMemo(()=>h==null?void 0:h.split("?")[0].split("/").pop(),[h]);return O.jsx("div",{children:l&&O.jsxs("div",{className:"ed-overflow-hidden",children:[O.jsx("div",{className:"ed-h-full ed-w-full ed-z-[1000] ed-fixed ed-bg-black/80 ed-inset-0"}),O.jsxs("div",{className:"ed-size-full ed-flex items-center ed-w-full ed-h-full ed-justify-center ed-overflow-hidden ed-fixed ed-top-9 ed-left-0 ed-z-[1100]",children:[c?O.jsx(_v,{}):!d&&h&&O.jsx("div",{ref:a,style:{transform:`scale(${r})`,transformOrigin:"center center",transition:"transform 0.2s ease-out"},children:O.jsx(Si,{alt:"Feedback attachment",className:"ed-max-w-[90vw] ed-max-h-[90vh] ed-object-contain ed-select-none",height:p,src:h,width:m,isPrivate:n})}),d&&O.jsx("p",{className:"ed-text-14 ed-font-semibold ed-text-red",children:d})]}),O.jsxs("div",{className:"ed-fixed ed-z-[1100] ed-top-5 ed-right-16 ed-flex ed-items-center ed-gap-3",children:[O.jsx("a",{href:`${h}&dl=${u||g}`,className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors ed-bg-black/50 ed-rounded-lg ed-p-2",title:"Download",children:O.jsx(Op,{className:"ed-size-4",strokeWidth:"2"})}),O.jsx("button",{type:"button",className:"ed-fixed ed-z-[1100] ed-top-5 ed-right-5 ed-text-white ed-hover:text-gray-300 ed-transition-colors ed-bg-black/50 ed-rounded-lg ed-p-2",onClick:o,title:"Close (Esc)",children:O.jsx(oi,{className:"ed-size-4",strokeWidth:"2"})})]}),!c&&!d&&O.jsx("div",{className:"ed-fixed ed-z-[1100] ed-bottom-5 ed-left-1/2 ed-transform -ed-translate-x-1/2",children:O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-bg-black/70 ed-rounded-lg ed-p-3",children:[O.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>i(y=>Math.max(y/1.5,.5)),disabled:r<=.5,title:"Zoom Out",children:O.jsx(tv,{className:"ed-size-5",strokeWidth:"2"})}),O.jsxs("span",{className:"ed-text-white ed-text-sm ed-min-w-[3rem] ed-text-center ed-font-medium",children:[Math.round(r*100),"%"]}),O.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>i(y=>Math.min(y*1.5,5)),disabled:r>=5,title:"Zoom In",children:O.jsx(Jp,{className:"ed-size-5",strokeWidth:"2"})}),O.jsx("div",{className:"ed-w-px ed-h-5 ed-bg-white/30 ed-mx-1"}),O.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>i(1),title:"Reset",children:O.jsx(Dp,{className:"ed-size-5",strokeWidth:"2"})})]})})]})})},rA=({filesData:e=[]})=>{var m;const[t,n]=L.useState(!1),[r,i]=L.useState(Wh),a=e==null?void 0:e.filter(g=>/\.(jpg|jpeg|png|gif|webp)$/i.test(g.name)),o=e==null?void 0:e.filter(g=>!/\.(jpg|jpeg|png|gif|webp)$/i.test(g.name)),u=()=>n(!0),l=t?a:a==null?void 0:a.slice(0,2),c=Be.size(a)-2,[d]=Zi(tA,{errorPolicy:"all",fetchPolicy:"no-cache"}),h=async g=>{const b=(await d({variables:{queryData:{file_id:g,content_disposition:"inline"}}})).data.getFileDownloadingURLForWidget;window.open(b,"_blank")},p=async g=>{i(y=>({...y,loading:!0}));try{const y=await g2({fit:"scale",isPrivate:!1,needActualSize:!0,path:g==null?void 0:g.key,quality:100});if(y){const b=await wk(y);i(w=>({...w,isOpen:!0,url:y,fileName:g==null?void 0:g.title,image:y,loading:!1,height:b==null?void 0:b.height,width:b==null?void 0:b.width}))}}catch{i({...Wh,error:"Failed to load image"})}};return O.jsxs("div",{className:"ed-flex ed-flex-col ed-gap-3",children:[Be.size(a)>0&&O.jsxs("div",{className:"ed-grid ed-grid-cols-2 ed-gap-2.5",children:[l.map(g=>O.jsx("div",{onClick:()=>p(g),role:"button",tabIndex:0,children:O.jsx(Si,{path:g.key,className:"ed-w-full ed-rounded",defaultImageClasses:"ed-w-full ed-h-20 !ed-rounded"})},g==null?void 0:g.id)),!t&&c>0&&O.jsxs("div",{role:"button",tabIndex:0,className:"ed-relative cursor-pointer",onClick:u,children:[O.jsx(Si,{path:(m=a[2])==null?void 0:m.key,className:"ed-w-full ed-rounded",defaultImageClasses:"ed-w-full ed-h-20 !ed-rounded"}),O.jsx("div",{className:"ed-w-full ed-h-full ed-bg-black/15 ed-absolute ed-top-0 ed-left-0 ed-rounded",children:O.jsx("div",{className:"ed-bg-white ed-h-8 ed-w-8 ed-flex ed-items-center ed-justify-center ed-rounded-full ed-absolute ed-top-1/2 ed-left-1/2 ed--translate-x-1/2 ed--translate-y-1/2",children:O.jsxs("span",{className:"ed-text-12 ed-text-border-dark ed-font-semibold",children:["+",c]})})})]})]}),Be.size(o)>0&&O.jsx("div",{className:"ed-flex ed-flex-col ed-gap-2.5",children:o.map(g=>O.jsxs("div",{className:"ed-p-2.5 ed-bg-white-light ed-rounded-lg ed-flex ed-items-center ed-justify-between",children:[O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[O.jsx(JR,{}),O.jsx("p",{className:"ed-text-12 ed-font-semibold ed-text-border-dark",children:g.name})]}),O.jsx("button",{type:"button",onClick:()=>h(g==null?void 0:g.id),children:O.jsx(Rp,{className:"ed-text-brand-link ed-size-5"})})]},g==null?void 0:g.id))}),(r==null?void 0:r.isOpen)&&O.jsx(nA,{previewImageInfo:r,setPreviewImageInfo:i})]})},iA="hh:mm A",Lw=({activityMessage:e={},brand:t={},isReplying:n=!1})=>{const{id:r,analytics:i,author:a,files:o,message:u,is_customer_reply:l,created_at:c}=e||{},d=L.useMemo(()=>a!=null&&a.id?Bh(a==null?void 0:a.first_name,a==null?void 0:a.last_name,a==null?void 0:a.email):(t==null?void 0:t.name)||"",[a==null?void 0:a.id]),h=L.useMemo(()=>a!=null&&a.id?{...(a==null?void 0:a.avatar_file)||{},default_image_name:Fo(a==null?void 0:a.first_name,a==null?void 0:a.last_name,a==null?void 0:a.email)}:{key:t==null?void 0:t.logo_icon_key,default_image_name:Fo(t==null?void 0:t.name)},[a==null?void 0:a.id]),p=!n&&gu(u),m=L.isValidElement(p)?"div":"p",g=()=>{var b,w,S;return O.jsxs("div",{className:`ed-p-2.5 ${l?"ed-bg-blue-light":"ed-bg-white-light"} ${(b=p==null?void 0:p.props)!=null&&b.className.includes("form-response")?"ed-p-0 ed-bg-white":""} ed-rounded-lg ed-mt-2`,children:[O.jsx(m,{className:`ed-text-border-dark ${(w=p==null?void 0:p.props)!=null&&w.className.includes("form-response")||(S=p==null?void 0:p.props)!=null&&S.className.includes("selected-channel")?"":"ed-whitespace-pre-line ed-break-words"}`,children:p}),O.jsx(rA,{filesData:o})]})},y=i==null?void 0:i.some(b=>(b==null?void 0:b.status)!=="seen");return l?O.jsx("div",{className:"ed-max-w-[85%] ed-w-max ed-ml-auto",children:O.jsx(g,{})}):O.jsxs("div",{...y&&{"data-message-id":r},className:"ed-message ed-flex ed-gap-4 ed-my-4 ed-max-w-[85%] ed-w-max",children:[O.jsx("div",{className:"ed-size-7 ed-flex-shrink-0",children:O.jsx(Si,{className:"ed-size-7 ed-object-cover ed-rounded-full",alt:d,defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:h==null?void 0:h.key,defaultImageName:h==null?void 0:h.default_image_name})}),O.jsxs("div",{children:[O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[O.jsx("p",{className:"ed-text-border-regular",children:d}),O.jsx("span",{className:"ed-text-border ed-font-medium",children:Vl(c).format(iA)})]}),n?O.jsx("div",{className:"ed-py-4",children:O.jsx(_v,{})}):O.jsx(g,{})]})]})};var kv={exports:{}};/*!
|
|
@@ -517,7 +517,7 @@ Open your browser's console to view the Component stack trace.`:""))};Object.key
|
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Cf(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(r){Cf(r,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(r){Cf(r,t)}),e.definitions&&e.definitions.forEach(function(r){Cf(r,t)})}var Bg={};(function(){Hg.definitions.forEach(function(t){if(t.name){var n=new Set;Cf(t,n),Bg[t.name.value]=n}})})();function k5(e,t){for(var n=0;n<e.definitions.length;n++){var r=e.definitions[n];if(r.name&&r.name.value==t)return r}}function Lj(e,t){var n={kind:e.kind,definitions:[k5(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=Bg[t]||new Set,i=new Set,a=new Set;for(r.forEach(function(u){a.add(u)});a.size>0;){var o=a;a=new Set,o.forEach(function(u){if(!i.has(u)){i.add(u);var l=Bg[u]||new Set;l.forEach(function(c){a.add(c)})}})}return i.forEach(function(u){var l=k5(e,u);l&&n.definitions.push(l)}),n}const Fj=Lj(Hg,"GET_SECTIONS_WITH_ARTICLES"),jj=({setArticleId:e,selectedCategory:t})=>{const[n,r]=L.useState(null),[i,a]=L.useState([]),o=c=>{r(n===c?null:c)},[u,{loading:l}]=Zi(Fj,{errorPolicy:"all",fetchPolicy:"no-cache",variables:{queryData:{category_id:t},optionData:{order:[["serial","asc"]]}},onCompleted:c=>{var d;a((d=c==null?void 0:c.getSectionsWithArticles)==null?void 0:d.data)},onError:c=>{console.error(c)}});return L.useEffect(()=>{u()},[]),l?O.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:O.jsx(ta,{})}):O.jsx("div",{children:i.map(c=>{var d;return O.jsx("div",{className:`ed-border-b ed-border-disabled ${n===c.id?"pb-2":""}`,children:O.jsxs("div",{className:"ed-py-3 ed-px-4",children:[O.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(c.id),className:`ed-flex ed-items-center ed-justify-between ed-gap-2 ed-p-2 ed-cursor-pointer ed-transition-all ed-duration-300 ed-ease-in-out ${n===c.id?"ed-bg-white-light":""}`,children:[O.jsx("h6",{className:"ed-text-14 ed-font-semibold ed-text-border-dark",children:c.name}),O.jsx("div",{className:"ed-transform ed-transition-transform ed-duration-300 ed-ease-in-out",children:n===c.id?O.jsx(Cp,{className:"ed-text-border-regular ed-size-5"}):O.jsx(fu,{className:"ed-text-border-regular ed-size-5"})})]}),O.jsx("div",{className:`ed-overflow-hidden ed-transition-all ed-ease-in-out ${n===c.id?"ed-max-h-96 ed-opacity-100 ed-mt-3":"ed-max-h-0 ed-opacity-0"}`,children:(d=c==null?void 0:c.section_articles)==null?void 0:d.map(h=>O.jsxs("button",{type:"button",onClick:()=>e(h==null?void 0:h.id),className:"ed-flex ed-items-center ed-gap-2 ed-flex-1 ed-w-full ed-px-6 ed-py-2 ed-hover:bg-white-light ed-group ed-text-left",children:[O.jsx("p",{className:"ed-text-border-dark ed-text-14 ed-font-medium ed-group-hover:text-brand-link ed-flex-1 ed-ease-in-out ed-transition-all",children:gu((h==null?void 0:h.title)||"")}),O.jsx("div",{className:"ed-size-4 ed--translate-x-2 ed-opacity-0 ed-group-hover:opacity-100 ed-group-hover:translate-x-2 ed-transition-all",children:O.jsx($o,{className:"ed-text-border ed-size-4"})})]},h.id))})]})},c.id)})})},Mj=({loading:e,selectedCategory:t,setArticleId:n,articleId:r,isAuthenticated:i,setSelectedCategory:a})=>O.jsx("div",{children:e?O.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:O.jsx(ta,{})}):t&&r||!t&&r?O.jsx(Ij,{articleId:r,setArticleId:n,isAuthenticated:i}):t&&!r?O.jsx(jj,{setArticleId:n,selectedCategory:t}):O.jsx(XF,{setSelectedCategory:a})}),Dj=({setIsCreateNewTicketClicked:e})=>{const{t}=Go();return O.jsxs("div",{className:"ed-flex ed-flex-col ed-items-center ed-justify-center ed-min-h-min ed-h-full",children:[O.jsx(YR,{}),O.jsxs("p",{className:"ed-text-14 ed-text-border-regular ed-text-center",children:[t("widget.label.no_article_found"),O.jsx("button",{type:"button",onClick:()=>e(!0),className:"ed-text-14 ed-font-semibold ed-text-brand-link ed-ml-1",children:t("widget.label.click_here")})]})]})},$j=({isPopupOpen:e,handlePopupTrigger:t,orgBrandSetting:n})=>{const r=C_("(max-width: 768px)"),{brand:i,widget_icon_key:a}=n;return O.jsx("button",{type:"button",onClick:t,style:{transformOrigin:"center",translate:"50% 50%"},className:`${r&&e?"ed-hidden":""} hover:ed-size-14 ed-absolute ed-bottom-12 ed-right-12 ed-rounded-full ed-inline-flex ed-justify-center ed-items-center ed-bg-brand ed-size-12 ed-cursor-pointer ed-origin-center ed-transition-all ed-duration-200 ed-ease-in-out`,children:O.jsxs("div",{className:"ed-relative ed-w-8 ed-h-8 ed-flex ed-items-center ed-justify-center",children:[O.jsx("div",{className:`ed-absolute ed-transition-all ed-duration-300 ${e?"ed-opacity-100 ed-scale-100 ed-rotate-[360deg]":"ed-opacity-0 ed-scale-0 ed-rotate-0"}`,children:O.jsx(fu,{className:"ed-size-7 ed-text-white"})}),O.jsx("div",{className:`ed-absolute ed-transition-all ed-duration-300 ${e?"ed-opacity-0 ed-scale-0 ed-rotate-[360deg]":"ed-opacity-100 ed-scale-100 ed-rotate-0"}`,children:a?O.jsx(Si,{alt:`${i==null?void 0:i.name}'s widget icon`,defaultUserNameTextSize:"text-10",className:"ed-size-7 ed-object-cover ed-rounded-full",defaultImageClasses:"ed-w-7 ed-h-7",path:a,defaultImageName:Fo(i==null?void 0:i.name)}):O.jsx(QR,{height:28,width:28})})]})})},Vj=({activeTab:e,handleTabChange:t,orgBrandSetting:n={}})=>{const{t:r}=Go(),{remove_app_branding:i,is_knowledge_base_enabled:a,is_live_chat_enabled:o}=n,u=[{id:1,key:"messages",label:"Messages",icon:XR},{id:2,key:"knowledge_base",label:"Knowledge base",icon:ZR}],l=L.useMemo(()=>a&&o,[a,o]);return O.jsxs("div",{className:`${l&&"ed-shadow-[0_-8px_10px_rgba(0,0,0,0.02)] ed-pt-2.5"} 'ed-h-max'`,children:[a&&o&&O.jsx("div",{className:"ed-grid ed-grid-cols-2",children:u.map(c=>{const d=e===c.key;return O.jsxs("button",{type:"button",onClick:()=>t(c.key),className:"ed-flex ed-flex-col ed-items-center ed-justify-center",children:[O.jsx(c.icon,{isActive:d}),O.jsx("h3",{className:`ed-text-14 ed-font-semibold ${d?"ed-text-brand":"ed-text-border-regular"} ed-inline-block`,children:c.label})]},c.id)})}),!i&&O.jsxs("p",{className:"ed-py-2 ed-text-center ed-text-12 ed-font-medium ed-text-border-regular ed-bg-gray md:ed-rounded-b-[10px] ed-mt-1.5",children:[r("widget.label.powerd_by")," ",O.jsx(C5,{href:"https://easydesk.app/",target:"_blank",className:"ed-text-14 ed-font-semibold ed-text-border-regular",children:r("widget.label.easydesk")})]})]})},zj=({searchedText:e,selectedCategory:t,setSearchedText:n,setArticleId:r,setSelectedCategory:i,setIsPopupOpen:a,handleSearch:o,setArticlesData:u,brandInfo:l,activeTab:c})=>{const{t:d}=Go(),h=C_("(max-width: 768px)"),p=()=>{n(""),r(null),i(null)};return O.jsx("div",{className:"ed-bg-brand ed-py-8 ed-px-5 md:ed-rounded-t-[10px] ed-h-max",children:c==="messages"?O.jsxs("div",{className:"ed-flex ed-items-center ed-justify-between",children:[O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[O.jsx(Si,{className:"ed-size-10 ed-rounded-full ed-object-cover ed-shrink-0",defaultImageClasses:"ed-h-10 ed-w-10 ed-shrink-0",path:l==null?void 0:l.logo_icon_key,defaultImageName:Fo(l==null?void 0:l.name)}),O.jsx("h6",{className:"ed-text-14 ed-font-semibold ed-text-white",children:l==null?void 0:l.name})]}),h&&O.jsx("button",{type:"button",onClick:()=>a(!1),children:O.jsx(oi,{size:20,className:"ed-text-white"})})]}):O.jsxs("div",{children:[O.jsxs("div",{className:"ed-flex ed-items-start ed-justify-between",children:[Be.size(e)||t?O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-mb-4",children:[O.jsx(Ep,{onClick:p,className:"ed-text-white ed-size-5"}),O.jsx("p",{className:"ed-text-14 ed-font-medium ed-text-white",children:d("widget.label.knowledge_base")})]}):O.jsxs("div",{children:[O.jsx("p",{className:"ed-text-14 ed-font-medium ed-text-white",children:d("widget.label.lets_explore")}),O.jsx("h4",{className:"ed-text-24 ed-font-bold ed-text-white ed-mt-2 ed-mb-4",children:d("widget.label.knowledge_base")})]}),h&&O.jsx("button",{type:"button",onClick:()=>a(!1),children:O.jsx(oi,{size:20,className:"ed-text-white"})})]}),O.jsxs("div",{className:"ed-bg-white ed-rounded-full ed-border ed-border-border-light ed-flex ed-items-center ed-justify-between ed-gap-2 ed-px-4 ed-py-2.5",children:[O.jsx("input",{value:e,onChange:m=>o(m.target.value),placeholder:d("widget.placeholder.search_for_articles"),type:"text",className:"ed-bg-transparent ed-outline-none ed-w-full ed-placeholder:text-14 ed-placeholder:font-medium ed-placeholder:text-border"}),O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-3",children:[e&&O.jsx("button",{type:"button",onClick:()=>{n(""),u([])},children:O.jsx(oi,{size:20,className:"ed-text-border"})}),O.jsx(Vp,{size:24,className:"ed-text-border"})]})]})]})})};var Wg={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GET_ARTICLES"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"queryData"}},type:{kind:"NamedType",name:{kind:"Name",value:"ArticleQueryInputType"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"optionData"}},type:{kind:"NamedType",name:{kind:"Name",value:"OptionDataType"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getArticles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"queryData"},value:{kind:"Variable",name:{kind:"Name",value:"queryData"}}},{kind:"Argument",name:{kind:"Name",value:"optionData"},value:{kind:"Variable",name:{kind:"Name",value:"optionData"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:193}};Wg.loc.source={body:`query GET_ARTICLES($queryData: ArticleQueryInputType, $optionData: OptionDataType) {
|
|
520
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Cf(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(r){Cf(r,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(r){Cf(r,t)}),e.definitions&&e.definitions.forEach(function(r){Cf(r,t)})}var Bg={};(function(){Hg.definitions.forEach(function(t){if(t.name){var n=new Set;Cf(t,n),Bg[t.name.value]=n}})})();function k5(e,t){for(var n=0;n<e.definitions.length;n++){var r=e.definitions[n];if(r.name&&r.name.value==t)return r}}function Lj(e,t){var n={kind:e.kind,definitions:[k5(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=Bg[t]||new Set,i=new Set,a=new Set;for(r.forEach(function(u){a.add(u)});a.size>0;){var o=a;a=new Set,o.forEach(function(u){if(!i.has(u)){i.add(u);var l=Bg[u]||new Set;l.forEach(function(c){a.add(c)})}})}return i.forEach(function(u){var l=k5(e,u);l&&n.definitions.push(l)}),n}const Fj=Lj(Hg,"GET_SECTIONS_WITH_ARTICLES"),jj=({setArticleId:e,selectedCategory:t})=>{const[n,r]=L.useState(null),[i,a]=L.useState([]),o=c=>{r(n===c?null:c)},[u,{loading:l}]=Zi(Fj,{errorPolicy:"all",fetchPolicy:"no-cache",variables:{queryData:{category_id:t},optionData:{order:[["serial","asc"]]}},onCompleted:c=>{var d;a((d=c==null?void 0:c.getSectionsWithArticles)==null?void 0:d.data)},onError:c=>{console.error(c)}});return L.useEffect(()=>{u()},[]),l?O.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:O.jsx(ta,{})}):O.jsx("div",{children:i.map(c=>{var d;return O.jsx("div",{className:`ed-border-b ed-border-disabled ${n===c.id?"pb-2":""}`,children:O.jsxs("div",{className:"ed-py-3 ed-px-4",children:[O.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(c.id),className:`ed-flex ed-items-center ed-justify-between ed-gap-2 ed-p-2 ed-cursor-pointer ed-transition-all ed-duration-300 ed-ease-in-out ${n===c.id?"ed-bg-white-light":""}`,children:[O.jsx("h6",{className:"ed-text-14 ed-font-semibold ed-text-border-dark",children:c.name}),O.jsx("div",{className:"ed-transform ed-transition-transform ed-duration-300 ed-ease-in-out",children:n===c.id?O.jsx(Cp,{className:"ed-text-border-regular ed-size-5"}):O.jsx(fu,{className:"ed-text-border-regular ed-size-5"})})]}),O.jsx("div",{className:`ed-overflow-hidden ed-transition-all ed-ease-in-out ${n===c.id?"ed-max-h-96 ed-opacity-100 ed-mt-3":"ed-max-h-0 ed-opacity-0"}`,children:(d=c==null?void 0:c.section_articles)==null?void 0:d.map(h=>O.jsxs("button",{type:"button",onClick:()=>e(h==null?void 0:h.id),className:"ed-flex ed-items-center ed-gap-2 ed-flex-1 ed-w-full ed-px-6 ed-py-2 ed-hover:bg-white-light ed-group ed-text-left",children:[O.jsx("p",{className:"ed-text-border-dark ed-text-14 ed-font-medium ed-group-hover:text-brand-link ed-flex-1 ed-ease-in-out ed-transition-all",children:gu((h==null?void 0:h.title)||"")}),O.jsx("div",{className:"ed-size-4 ed--translate-x-2 ed-opacity-0 ed-group-hover:opacity-100 ed-group-hover:translate-x-2 ed-transition-all",children:O.jsx($o,{className:"ed-text-border ed-size-4"})})]},h.id))})]})},c.id)})})},Mj=({loading:e,selectedCategory:t,setArticleId:n,articleId:r,isAuthenticated:i,setSelectedCategory:a})=>O.jsx("div",{children:e?O.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:O.jsx(ta,{})}):t&&r||!t&&r?O.jsx(Ij,{articleId:r,setArticleId:n,isAuthenticated:i}):t&&!r?O.jsx(jj,{setArticleId:n,selectedCategory:t}):O.jsx(XF,{setSelectedCategory:a})}),Dj=({setIsCreateNewTicketClicked:e})=>{const{t}=Go();return O.jsxs("div",{className:"ed-flex ed-flex-col ed-items-center ed-justify-center ed-min-h-min ed-h-full",children:[O.jsx(YR,{}),O.jsxs("p",{className:"ed-text-14 ed-text-border-regular ed-text-center",children:[t("widget.label.no_article_found"),O.jsx("button",{type:"button",onClick:()=>e(!0),className:"ed-text-14 ed-font-semibold ed-text-brand-link ed-ml-1",children:t("widget.label.click_here")})]})]})},$j=({isPopupOpen:e,handlePopupTrigger:t,orgBrandSetting:n})=>{const r=C_("(max-width: 768px)"),{brand:i,widget_icon_key:a}=n;return O.jsx("button",{type:"button",onClick:t,style:{transformOrigin:"center",translate:"50% 50%"},className:`${r&&e?"ed-hidden":""} hover:ed-size-14 ed-fixed ed-bottom-12 ed-right-12 ed-z-[9999999] ed-rounded-full ed-inline-flex ed-justify-center ed-items-center ed-bg-brand ed-size-12 ed-cursor-pointer ed-origin-center ed-transition-all ed-duration-200 ed-ease-in-out`,children:O.jsxs("div",{className:"ed-relative ed-w-8 ed-h-8 ed-flex ed-items-center ed-justify-center",children:[O.jsx("div",{className:`ed-absolute ed-transition-all ed-duration-300 ${e?"ed-opacity-100 ed-scale-100 ed-rotate-[360deg]":"ed-opacity-0 ed-scale-0 ed-rotate-0"}`,children:O.jsx(fu,{className:"ed-size-7 ed-text-white"})}),O.jsx("div",{className:`ed-absolute ed-transition-all ed-duration-300 ${e?"ed-opacity-0 ed-scale-0 ed-rotate-[360deg]":"ed-opacity-100 ed-scale-100 ed-rotate-0"}`,children:a?O.jsx(Si,{alt:`${i==null?void 0:i.name}'s widget icon`,defaultUserNameTextSize:"text-10",className:"ed-size-7 ed-object-cover ed-rounded-full",defaultImageClasses:"ed-w-7 ed-h-7",path:a,defaultImageName:Fo(i==null?void 0:i.name)}):O.jsx(QR,{height:28,width:28})})]})})},Vj=({activeTab:e,handleTabChange:t,orgBrandSetting:n={}})=>{const{t:r}=Go(),{remove_app_branding:i,is_knowledge_base_enabled:a,is_live_chat_enabled:o}=n,u=[{id:1,key:"messages",label:"Messages",icon:XR},{id:2,key:"knowledge_base",label:"Knowledge base",icon:ZR}],l=L.useMemo(()=>a&&o,[a,o]);return O.jsxs("div",{className:`${l&&"ed-shadow-[0_-8px_10px_rgba(0,0,0,0.02)] ed-pt-2.5"} 'ed-h-max'`,children:[a&&o&&O.jsx("div",{className:"ed-grid ed-grid-cols-2",children:u.map(c=>{const d=e===c.key;return O.jsxs("button",{type:"button",onClick:()=>t(c.key),className:"ed-flex ed-flex-col ed-items-center ed-justify-center",children:[O.jsx(c.icon,{isActive:d}),O.jsx("h3",{className:`ed-text-14 ed-font-semibold ${d?"ed-text-brand":"ed-text-border-regular"} ed-inline-block`,children:c.label})]},c.id)})}),!i&&O.jsxs("p",{className:"ed-py-2 ed-text-center ed-text-12 ed-font-medium ed-text-border-regular ed-bg-gray md:ed-rounded-b-[10px] ed-mt-1.5",children:[r("widget.label.powerd_by")," ",O.jsx(C5,{href:"https://easydesk.app/",target:"_blank",className:"ed-text-14 ed-font-semibold ed-text-border-regular",children:r("widget.label.easydesk")})]})]})},zj=({searchedText:e,selectedCategory:t,setSearchedText:n,setArticleId:r,setSelectedCategory:i,setIsPopupOpen:a,handleSearch:o,setArticlesData:u,brandInfo:l,activeTab:c})=>{const{t:d}=Go(),h=C_("(max-width: 768px)"),p=()=>{n(""),r(null),i(null)};return O.jsx("div",{className:"ed-bg-brand ed-py-8 ed-px-5 md:ed-rounded-t-[10px] ed-h-max",children:c==="messages"?O.jsxs("div",{className:"ed-flex ed-items-center ed-justify-between",children:[O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[O.jsx(Si,{className:"ed-size-10 ed-rounded-full ed-object-cover ed-shrink-0",defaultImageClasses:"ed-h-10 ed-w-10 ed-shrink-0",path:l==null?void 0:l.logo_icon_key,defaultImageName:Fo(l==null?void 0:l.name)}),O.jsx("h6",{className:"ed-text-14 ed-font-semibold ed-text-white",children:l==null?void 0:l.name})]}),h&&O.jsx("button",{type:"button",onClick:()=>a(!1),children:O.jsx(oi,{size:20,className:"ed-text-white"})})]}):O.jsxs("div",{children:[O.jsxs("div",{className:"ed-flex ed-items-start ed-justify-between",children:[Be.size(e)||t?O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-mb-4",children:[O.jsx(Ep,{onClick:p,className:"ed-text-white ed-size-5"}),O.jsx("p",{className:"ed-text-14 ed-font-medium ed-text-white",children:d("widget.label.knowledge_base")})]}):O.jsxs("div",{children:[O.jsx("p",{className:"ed-text-14 ed-font-medium ed-text-white",children:d("widget.label.lets_explore")}),O.jsx("h4",{className:"ed-text-24 ed-font-bold ed-text-white ed-mt-2 ed-mb-4",children:d("widget.label.knowledge_base")})]}),h&&O.jsx("button",{type:"button",onClick:()=>a(!1),children:O.jsx(oi,{size:20,className:"ed-text-white"})})]}),O.jsxs("div",{className:"ed-bg-white ed-rounded-full ed-border ed-border-border-light ed-flex ed-items-center ed-justify-between ed-gap-2 ed-px-4 ed-py-2.5",children:[O.jsx("input",{value:e,onChange:m=>o(m.target.value),placeholder:d("widget.placeholder.search_for_articles"),type:"text",className:"ed-bg-transparent ed-outline-none ed-w-full ed-placeholder:text-14 ed-placeholder:font-medium ed-placeholder:text-border"}),O.jsxs("div",{className:"ed-flex ed-items-center ed-gap-3",children:[e&&O.jsx("button",{type:"button",onClick:()=>{n(""),u([])},children:O.jsx(oi,{size:20,className:"ed-text-border"})}),O.jsx(Vp,{size:24,className:"ed-text-border"})]})]})]})})};var Wg={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GET_ARTICLES"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"queryData"}},type:{kind:"NamedType",name:{kind:"Name",value:"ArticleQueryInputType"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"optionData"}},type:{kind:"NamedType",name:{kind:"Name",value:"OptionDataType"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getArticles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"queryData"},value:{kind:"Variable",name:{kind:"Name",value:"queryData"}}},{kind:"Argument",name:{kind:"Name",value:"optionData"},value:{kind:"Variable",name:{kind:"Name",value:"optionData"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:193}};Wg.loc.source={body:`query GET_ARTICLES($queryData: ArticleQueryInputType, $optionData: OptionDataType) {
|
|
521
521
|
getArticles(queryData: $queryData, optionData: $optionData) {
|
|
522
522
|
data {
|
|
523
523
|
id
|
|
@@ -525,4 +525,4 @@ Open your browser's console to view the Component stack trace.`:""))};Object.key
|
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Tf(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(r){Tf(r,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(r){Tf(r,t)}),e.definitions&&e.definitions.forEach(function(r){Tf(r,t)})}var Gg={};(function(){Wg.definitions.forEach(function(t){if(t.name){var n=new Set;Tf(t,n),Gg[t.name.value]=n}})})();function R5(e,t){for(var n=0;n<e.definitions.length;n++){var r=e.definitions[n];if(r.name&&r.name.value==t)return r}}function qj(e,t){var n={kind:e.kind,definitions:[R5(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=Gg[t]||new Set,i=new Set,a=new Set;for(r.forEach(function(u){a.add(u)});a.size>0;){var o=a;a=new Set,o.forEach(function(u){if(!i.has(u)){i.add(u);var l=Gg[u]||new Set;l.forEach(function(c){a.add(c)})}})}return i.forEach(function(u){var l=R5(e,u);l&&n.definitions.push(l)}),n}const Uj=qj(Wg,"GET_ARTICLES"),Hj=e=>{const{userData:t}=e||{},[n,r]=L.useState(!1),[i,a]=L.useState(""),[o,u]=L.useState(null),[l,c]=L.useState(null),[d,h]=L.useState(!1),[p,m]=L.useState([]),[g,y]=L.useState(""),[b,w]=L.useState(!1),[S,C]=L.useState({}),[T,{loading:_}]=Zi(Uj,{errorPolicy:"all",fetchPolicy:"no-cache",onCompleted:F=>{var $;m((($=F==null?void 0:F.getArticles)==null?void 0:$.data)||[])},onError:F=>{console.error(F)}}),x=y7(F=>{T({variables:{queryData:{search_keyword:F}}})},500),k=F=>{a(F),x(F)},A=async()=>{w(!0);try{const F=await b7();if(F){const{font:$,is_knowledge_base_enabled:H,is_live_chat_enabled:V,theme_color:te}=F;C(F),_7(te),w7($),(H&&!V||H&&V)&&y("knowledge_base"),!H&&V&&y("messages"),w(!1)}}catch(F){console.error(F),w(!1)}},N=()=>{r(!n),a(""),u(null),c(null),h(!1),A()};L.useEffect(()=>{A()},[]);const M=()=>g==="knowledge_base"?O.jsx(Mj,{loading:_,articleId:l,isAuthenticated:t==null?void 0:t.isAuthenticated,selectedCategory:o,setArticleId:c,setSelectedCategory:u}):g==="messages"?O.jsx(YF,{orgBrandSetting:S,setIsPopupOpen:r,userData:t}):null,{brand:z,is_knowledge_base_enabled:X,is_live_chat_enabled:B}=S||{},j=F=>{y(F),a(""),u(null),c(null),h(!1)};return!X&&!B?null:O.jsxs("div",{children:[O.jsx($j,{isPopupOpen:n,handlePopupTrigger:N,orgBrandSetting:S}),O.jsx("div",{className:`ed-
|
|
528
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Tf(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(r){Tf(r,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(r){Tf(r,t)}),e.definitions&&e.definitions.forEach(function(r){Tf(r,t)})}var Gg={};(function(){Wg.definitions.forEach(function(t){if(t.name){var n=new Set;Tf(t,n),Gg[t.name.value]=n}})})();function R5(e,t){for(var n=0;n<e.definitions.length;n++){var r=e.definitions[n];if(r.name&&r.name.value==t)return r}}function qj(e,t){var n={kind:e.kind,definitions:[R5(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=Gg[t]||new Set,i=new Set,a=new Set;for(r.forEach(function(u){a.add(u)});a.size>0;){var o=a;a=new Set,o.forEach(function(u){if(!i.has(u)){i.add(u);var l=Gg[u]||new Set;l.forEach(function(c){a.add(c)})}})}return i.forEach(function(u){var l=R5(e,u);l&&n.definitions.push(l)}),n}const Uj=qj(Wg,"GET_ARTICLES"),Hj=e=>{const{userData:t}=e||{},[n,r]=L.useState(!1),[i,a]=L.useState(""),[o,u]=L.useState(null),[l,c]=L.useState(null),[d,h]=L.useState(!1),[p,m]=L.useState([]),[g,y]=L.useState(""),[b,w]=L.useState(!1),[S,C]=L.useState({}),[T,{loading:_}]=Zi(Uj,{errorPolicy:"all",fetchPolicy:"no-cache",onCompleted:F=>{var $;m((($=F==null?void 0:F.getArticles)==null?void 0:$.data)||[])},onError:F=>{console.error(F)}}),x=y7(F=>{T({variables:{queryData:{search_keyword:F}}})},500),k=F=>{a(F),x(F)},A=async()=>{w(!0);try{const F=await b7();if(F){const{font:$,is_knowledge_base_enabled:H,is_live_chat_enabled:V,theme_color:te}=F;C(F),_7(te),w7($),(H&&!V||H&&V)&&y("knowledge_base"),!H&&V&&y("messages"),w(!1)}}catch(F){console.error(F),w(!1)}},N=()=>{r(!n),a(""),u(null),c(null),h(!1),A()};L.useEffect(()=>{A()},[]);const M=()=>g==="knowledge_base"?O.jsx(Mj,{loading:_,articleId:l,isAuthenticated:t==null?void 0:t.isAuthenticated,selectedCategory:o,setArticleId:c,setSelectedCategory:u}):g==="messages"?O.jsx(YF,{orgBrandSetting:S,setIsPopupOpen:r,userData:t}):null,{brand:z,is_knowledge_base_enabled:X,is_live_chat_enabled:B}=S||{},j=F=>{y(F),a(""),u(null),c(null),h(!1)};return!X&&!B?null:O.jsxs("div",{children:[O.jsx($j,{isPopupOpen:n,handlePopupTrigger:N,orgBrandSetting:S}),O.jsx("div",{className:`ed-fixed ${n?"ed-opacity-100 ed-w-screen ed-h-dvh md:ed-max-h-[704px] md:ed-h-[80vh] md:ed-w-[400px]":"ed-opacity-0 ed-max-h-0 ed-h-0 ed-w-0 ed-pointer-events-none"} md:ed-bottom-24 md:ed-right-6 ed-bottom-0 ed-right-0 ed-bg-white ed-shadow-lg md:ed-rounded-[10px] ed-z-[9999999] ed-p-0.5 ed-overflow-hidden ed-transition-all ed-duration-300 ed-ease-in-out ed-flex ed-flex-col`,children:n&&O.jsxs(O.Fragment,{children:[O.jsx(zj,{searchedText:i,selectedCategory:o,setSearchedText:a,setArticleId:c,setSelectedCategory:u,setIsPopupOpen:r,handleSearch:k,setArticlesData:m,brandInfo:z,activeTab:g}),O.jsx("div",{className:`ed-flex-1 ed-overflow-y-auto no-scrollbar ed-px-5 ${g==="knowledge_base"?"ed-pb-5":""} ed-pt-1 ed-root-scrollbar`,children:i?O.jsx("div",{className:"ed-h-full",children:Be.size(p)?O.jsx(L7,{}):O.jsx(Dj,{setIsCreateNewTicketClicked:h})}):O.jsx("div",{className:`${g==="knowledge_base"?"ed-py-1":""} ed-space-y-4`,children:M()})}),O.jsx(Vj,{activeTab:g,handleTabChange:j,orgBrandSetting:S}),d&&O.jsx(VR,{setIsCreateNewTicketClicked:h,setSearchedText:a,searchedText:i,isAuthenticated:t==null?void 0:t.isAuthenticated})]})})]})},Bj=async(e,t)=>{var n;try{const r=await Bt.post(`${Vh()||t}/auth/widget-login`,{api_key:e});return((n=r==null?void 0:r.data)==null?void 0:n.data)||{}}catch{return{access_token:null,refresh_token:null}}},Qg=e=>{const{apiKey:t,envVariables:n}=e,[r,i]=L.useState(!1),[a,o]=L.useState(!1),u=(n==null?void 0:n.apiBaseUrl)||"https://api.easydesk.app",l=async d=>{i(!0);const h=await Bj(d,u);h!=null&&h.access_token&&(Uh("easydesk_chat_widget_public_access_token",h==null?void 0:h.access_token,{expires:30}),i(!1))};L.useEffect(()=>{t&&l(t)},[t]),L.useEffect(()=>{n!=null&&n.apiBaseUrl&&(n!=null&&n.cdnDomain)?y2(n):y2({apiBaseUrl:"https://api.easydesk.app",cdnDomain:"easydesk-prod"}),o(!0)},[n]);const c=L.useMemo(()=>cp(u),[u]);return r||!a?O.jsx("div",{className:"ed-flex ed-justify-center ed-items-center ed-my-10",children:O.jsx(vv,{})}):O.jsxs($4,{client:c,children:[O.jsx(h8,{}),O.jsx(Hj,{...e})]})},Yg=e=>{let t=document.getElementById("easydesk-chat-container");t||(t=document.createElement("div"),t.id="ed-widget",document.body.appendChild(t)),H6.createRoot(t).render(O.jsx(Qg,{...e}))},A5=()=>{const e=document.getElementById("ed-widget");if(e){const t=e.getAttribute("ed-key"),n=e.getAttribute("ed-api-url"),r=e.getAttribute("ed-cdn-domain");t?Yg({apiKey:t,envVariables:{apiBaseUrl:n,cdnDomain:r}}):console.error("ChatKey: API key is required for initialization")}};typeof window<"u"&&(window.ChatKey={init:Yg},document.readyState==="complete"?A5():window.addEventListener("load",A5));const Wj=Object.freeze(Object.defineProperty({__proto__:null,default:{widget:{label:{click_here:"click here",copy_code:"Copy code",create_a_ticket:"Create a ticket",easydesk:"EasyDesk",explore_more_articles:"Explore more articles",knowledge_base:"Knowledge Base",lets_explore:"Let's explore",no_article_found:"We couldn't find any articles that match your search. Want to create a ticket?",powerd_by:"Powered by",soon_get_response:"Soon you will get an email",ticket_created:"Ticket created",thank_you_for_your_feedback:"Thank you for your valuable feedback!"},placeholder:{search_for_articles:"Search for articles"}}}},Symbol.toStringTag,{value:"Module"})),Gj=Object.freeze(Object.defineProperty({__proto__:null,default:{widget:{label:{click_here:"klikk her",copy_code:"Kopier kode",create_a_ticket:"Opprett en sak",easydesk:"EasyDesk",explore_more_articles:"Utforsk flere artikler",knowledge_base:"Kunnskapsbase",lets_explore:"La oss utforske",no_article_found:"Vi fant ingen artikler som samsvarer med søket ditt. Vil du opprette en sak?",powerd_by:"Drevet av",soon_get_response:"Du vil snart motta en e-post",ticket_created:"Sak opprettet",thank_you_for_your_feedback:"Takk for tilbakemeldingen din!"},placeholder:{search_for_articles:"Søk etter artikler"}}}},Symbol.toStringTag,{value:"Module"}));kn.Widget=Qg,kn.default=Qg,kn.initChatKey=Yg,Object.defineProperties(kn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ed-widget",
|
|
3
3
|
"description": "A flexible and lightweight EasyDesk chat widget for React apps and websites. Supports both React integration and CDN-based embedding for fast, real-time customer support.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.27.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Gain Solutions AS",
|
|
7
7
|
"license": "MIT",
|