PageSourceSearch

https://madchemclasses.online/_next/static/chunks/pages/help-chat-7d0b19087570e91b.js

js madchemclasses.online collected 2026-09-26 16:41:37 UTC 22,285 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8783],{90962:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});const n=(0,r(91373).Z)("file-audio",[["path",{d:"M17.5 22h.5a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"rslqgf"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 19a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 1 1-4 0v-1a2 2 0 1 1 4 0",key:"9f7x3i"}]])},13766:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});const n=(0,r(91373).Z)("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},74354:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});const n=(0,r(91373).Z)("file-video",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m10 11 5 3-5 3v-6Z",key:"7ntvm4"}]])},27674:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});const n=(0,r(91373).Z)("headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]])},5097:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});const n=(0,r(91373).Z)("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]])},84617:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});const n=(0,r(91373).Z)("paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]])},42841:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});const n=(0,r(91373).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},73682:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});const n=(0,r(91373).Z)("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]])},50201:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/help-chat",function(){return r(15262)}])},72685:function(e,t,r){"use strict";r.d(t,{I:function(){return u}});var n=r(26042),s=r(99534),i=r(85893),a=r(67294),o=r(62461),u=a.forwardRef((function(e,t){var r=e.className,a=e.type,u=(0,s.Z)(e,["className","type"]);return(0,i.jsx)("input",(0,n.Z)({type:a,className:(0,o.cn)("flex h-10 w-full rounded-md border border-foreground
1/50 bg-background px-3 py-2 text-base text-foreground file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-[13px]",r),ref:t},u))}));u.displayName="Input"},93223:function(e,t,r){"use strict";r.d(t,{_:function(){return d}});var n=r(26042),s=r(99534),i=r(85893),a=r(67294),o=r(49102),u=r(12003),l=r(62461),c=(0,u.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef((function(e,t){var r=e.className,a=(0,s.Z)(e,["className"]);return(0,i.jsx)(o.f,(0,n.Z)({ref:t,className:(0,l.cn)(c(),r)},a))}));d.displayName=o.f.displayName},15262:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var n=r(85893),s=r(67294),i=r(26042),a=r(69396),o=r(10253),u=r(29815),l=r(89355),c=r(73716),d=r(24271),f=r(96486),m=r(19201),p=r(74354),h=r(90962),g=r(13766),v=r(73682),x=r(27674),y=r(5097),b=r(84617),w=r(42841),N=r(97340),k=r(89885),j=r(58907),Z=r(51438),_=function e(t){(0,Z.Z)(this,e),this.userid=t.userid,this.courses=t.courses,this.lastUpdated=(new Date).getTime(),this.courseSlugs=t.courses.map((function(e){return t.topicId?"".concat(t.topicId,"-").concat(e.course_slug):e.course_slug}))},M=r(99209),C=r(96076);var E=r(10062),S=r(62922),A=r(22050),I=r(72685),T=r(35739),D=r(93223),z=r(62461),F={VIDEO:p.Z,AUDIO:h.Z,PDF:g.Z},U={VIDEO:"Video",AUDIO:"Audio",PDF:"PDF document"},H=function(e){var t,r=e.message,i=(0,s.useContext)(k.Z).currentUser,a=r.userId===i.userid,o=F[r.type];return(0,n.jsxs)("div",{className:(0,z.cn)("flex w-full items-end gap-2",a?"justify-end":"justify-start"),children:[!a&&(0,n.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground",children:(0,n.jsx)(v.Z,{className:"size-4"})}),(0,n.jsxs)("div",{className:(0,z.cn)("flex max-w-[85%] flex-col gap-1.5 rounded-2xl px-4 py-2.5 text-sm leading-relaxed shadow-sm sm:max-w-[75%]",a?"rounded-br-md bg-primary text-primary-foreground":"rounded-bl-md border border-border bg-background text-foreground"),children:[(0,n.jsx)("div",{className:"whitespace-pre-wrap break-words [&_a]:underline [&_a]:underline-offset-2",children:(0,n.jsx)(N.Z,{options:{target:"_blank",rel:"noopener noreferrer"},children:(0,c.i5)(r.userComment)})}),!(0,f.isEmpty)(r.image)&&(0,n.jsx)("img",{src:r.image,className:"my-0.5 max-w-full cursor-pointer rounded-lg",onClick:function(){return window.open(r.image)},alt:"attachment"}),!(0,f.isEmpty)(r.type)&&!(0,f.isEmpty)(r.url)&&o&&(0,n.jsxs)("button",{type:"button",onClick:function(){return window.open(r.url)},className:(0,z.cn)("group/file inline-flex items-center gap-3 self-start rounded-xl border px-3 py-2 text-left transition-colors",a?"border-primary-foreground/25 bg-primary-foreground/10 hover:bg-primary-foreground/20":"border-border bg-background/60 hover:bg-accent"),children:[(0,n.jsx)("span",{className:(0,z.cn)("flex size-9 shrink-0 items-center justify-center rounded-lg",a?"bg-primary-foreground/15 text-primary-foreground":"bg-primary/10 text-primary"),children:(0,n.jsx)(o,{className:"size-4"})}),(0,n.jsxs)("span",{className:"flex flex-col leading-tight",children:[(0,n.jsx)("span",{className:"text-xs font-semibold",children:null!==(t=U[r.type])&&void 0!==t?t:"Attachment"}),(0,n.jsx)("span",{className:(0,z.cn)("text-[10px]",a?"text-primary-foreground/70":"text-muted-foreground"),children:"Tap to open"})]})]}),(0,n.jsxs)("div",{className:(0,z.cn)("flex items-center gap-3 text-[11px]",a?"justify-end text-primary-foreground/70":"justify-between text-muted-foreground"),children:[!a&&!(0,f.isEmpty)(r.userName)&&(0,n.jsx)("span",{className:"font-medium",children:r.userName}),(0,n.jsx)("span",{className:"shrink-0",children:(0,S.by)(r.userTime,r.postedAt)})]})]})]})};function P(e){var t=function(){var e=(0,s.useContext)(k.Z),t=e.currentUser,r=e.appConfig,n=(0,s.use
1State)(null),i=n[0],a=n[1],o=(0,d.G5)(r.web_firebaseconfig),u=(0,s.useCallback)((function(){var e,r=null!==(e=(0,l.N8)(o).app.options.topicurl)&&void 0!==e?e:"";t&&t.userid&&(0,M.oY)(t.userid).then((function(e){if(200===e.status){var n,s=new _({userid:t.userid,courses:null!==(n=e.data)&&void 0!==n?n:[],topicId:r});window[C.dA.USER_COURSES]=s,a(s)}})).catch((function(e){console.error(e)}))}),[t]);return(0,s.useEffect)((function(){var e=window[C.dA.USER_COURSES];e&&(new Date).getTime()-e.lastUpdated<6e5?a(e):u()}),[u]),{userCourses:i}}().userCourses,r=(0,s.useState)([]),p=r[0],h=r[1],g=(0,s.useState)([]),v=g[0],N=g[1],Z=(0,s.useState)([]),S=Z[0],F=Z[1],U=(0,s.useState)(void 0),P=U[0],R=U[1],O=(0,s.useRef)(null),q=(0,s.useRef)(!0),V=(0,s.useContext)(k.Z),B=V.currentUser,G=V.appConfig,L=(0,d.G5)(G.web_firebaseconfig),W=(0,s.useMemo)((function(){return"/helpChats/"+B.userid}),[B]),Q=(0,s.useMemo)((function(){return(0,l.iH)((0,l.N8)(L),W+"/chats")}),[L,W]),X=(0,s.useRef)(null),K=(0,s.useMemo)((function(){return"/data/broadcast"}),[B]),Y=(0,s.useCallback)((function(e){var t=e.map((function(e){return(0,l.VF)(Q,e)}));return t.length>0?Promise.all(t):Promise.resolve([])}),[Q]),$=(0,s.useCallback)((function(e){if(e){var t=(0,l.N8)(L),r=(0,l.iH)(t,W+"/lastSyncedBroadcastTimestamp");return(0,l.t8)(r,e.postedAt)}}),[L,W]),J=(0,s.useMemo)((function(){return(0,f.debounce)((function(e,r){var n,s=(0,E.E)(e,r,null!==(n=null===t||void 0===t?void 0:t.courseSlugs)&&void 0!==n?n:[]),i=s.combinedMessages,a=s.latestMessage,o=s.skippedAdminMessages;(0,f.isEqual)(i,S)||(Y(o),$(a)),F(i)}),200)}),[]);(0,s.useEffect)((function(){var e=(0,l.N8)(L),t=(0,l.iH)(e,W+"/userDetails");return(0,l.t8)(t,{name:B.name,phone:B.phone,email:B.email}),(0,l.jM)(Q,(function(e){if(!e.exists()){var t=(new Date).getTime(),r={userName:"",userEmail:"",userComment:(0,A.p)({templateUserMessage:(null===G||void 0===G?void 0:G.web_helpchatWelcomeMessage)||C.fp,appConfig:G,userDetails:B}),userFlag:"0",userTime:"",postedAt:t,userId:"-1",readStatus:"1",type:"",url:""};(0,l.VF)(Q,r)}}),{onlyOnce:!0}),(0,l.yv)(Q,(function(e){var t=e.val(),r=e.key;h((function(e){return!e.some((function(e){return e.key===r}))?(0,u.Z)(e).concat([(0,a.Z)((0,i.Z)({},t),{key:r})]):e}))})),(0,l.MQ)(Q,(function(e){h((function(t){return t.some((function(t){return t.key===e.key}))?t.filter((function(t){return t.key!==e.key})):t}))})),function(){(0,l.S1)(t,"value"),(0,l.S1)(Q,"child_added"),(0,l.S1)(Q,"child_removed"),h([])}}),[L,W]),(0,s.useEffect)((function(){var e=(0,l.N8)(L),t=(0,l.iH)(e,K);return(0,l.jM)(t,(function(e){var t=e.val(),r=Object.entries(t||[]).map((function(e){var t=(0,o.Z)(e,2),r=t[0],n=t[1];return(0,a.Z)((0,i.Z)({},n),{key:r})}));N(r)}),{onlyOnce:!0}),(0,l.yv)(t,(function(e){var t=e.val(),r=e.key;N((function(e){return!e.some((function(e){return e.key===r}))?(0,u.Z)(e).concat([(0,a.Z)((0,i.Z)({},t),{key:r})]):e}))})),(0,l.MQ)(t,(function(e){N((function(t){return t.some((function(t){return t.key===e.key}))?t.filter((function(t){return t.key!==e.key})):t}))})),function(){(0,l.S1)(t,"value"),(0,l.S1)(t,"child_added"),(0,l.S1)(t,"child_removed"),N([])}}),[]),(0,s.useEffect)((function(){J(v,p)}),[p,v]),(0,s.useEffect)((function(){q.current&&ee()}),[S]);var ee=function(){var e=document.getElementById("msgContainer");e&&(e.scrollTop=e.scrollHeight,q.current=!0)},te=function(){var e,t=null===(e=X.current)||void 0===e?void 0:e.value,r=(0,c.MI)(t);if(null===r||void 0===r?void 0:r.trim()){if((0,c.$N)(r))return X.current&&(X.current.value=r),void m.A.warn("URLs are not allowed");q.current=!0;var n=(new Date).getTime(),s={userName:B.name,userEmail:B.email,userComment:r,userFlag:"0",userTime:(0,c.xv)(),postedAt:n,userId:B.userid,readStatus:"0",type:"",url:"",key:""};(0,f.isEmpty)(P)||(s.image=P,s.type="IMAGE");var i=(0,l.N8)(L),a=(0,l.iH)(i,W+"/chats");(0,l.VF)(a,{}).then((function(e){var t=e.key,r=(0,l.iH)(i,W+"/chats/"+t);(0,l.t8)(r,s),X.current&&(X.current.value=""),R(void 0)})),(0,l.Vx)((0,l.iH)(i,W+"/unread"),{lastMessage:r,lastMessageTime:n,admin:(0,l.nP)(1)})}else(0,f.isEmpty)(P)||m.A.warn("Please type a message to upload the image")};return(0,n.jsx)("div",{className:"mx-auto flex w-full max-w-6xl flex-col px-4 py-6 md:py-8",children:(0,n.jsxs)("div",{className:"flex h-[82dvh] min-h-[560px] flex-col overflow-hidden rounded-2xl border border-border bg-card shadow-sm",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 border-b border-border bg-background px-5 py-4",children:[(0,n.jsx)("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,n.jsx)(x.Z,{className:"size-5"})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h1",{className:"mb-0 truncate text-lg font-semibold leading-tight text-foreground",children:"Help & Support"}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-green-500"}),(0,n.jsx)("span",{className:"text-sm capitalize text-green-600",children:"online"})]})]})]}),(0,n.jsxs)("div",{className:"flex-1 space-y-3 overflow-y-auto bg-card px-4 py-6",i
1d:"msgContainer",onScroll:function(e){var t=e.currentTarget,r=t.scrollHeight-t.scrollTop-t.clientHeight;q.current=r<80},children:[0===S.length?(0,n.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3 text-center text-muted-foreground",children:[(0,n.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-muted",children:(0,n.jsx)(y.Z,{className:"size-6"})}),(0,n.jsx)("p",{className:"mb-0 max-w-xs text-sm",children:"No messages yet. Start the conversation below."})]}):S.map((function(e,t){return(0,n.jsx)(H,{message:e},t)})),(0,n.jsx)("div",{className:"float-left clear-both",ref:O})]}),(0,n.jsxs)("div",{className:"border-t border-border bg-background p-3",children:[!(0,f.isEmpty)(P)&&(0,n.jsxs)("div",{className:"mb-2 inline-flex items-center gap-2 rounded-lg border border-border bg-muted px-3 py-1.5 text-xs text-muted-foreground",children:[(0,n.jsx)(b.Z,{className:"size-3.5 text-primary"}),(0,n.jsx)("span",{children:"Image attached"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1 rounded-2xl border border-border bg-muted/40 py-2 pl-6 pr-2 transition-colors focus-within:border-ring",children:[(0,n.jsx)(I.I,{ref:X,type:"text",placeholder:"Write your message here...",onKeyDown:function(e){"Enter"==e.key&&te()},name:"typedMessage",className:"h-10 flex-1 border-0 bg-transparent px-0 focus-visible:border-transparent"}),(0,n.jsxs)(D._,{htmlFor:"asset",className:"flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,n.jsx)(b.Z,{className:(0,z.cn)("size-5",P&&"text-primary")}),(0,n.jsx)(I.I,{accept:"image/jpeg, image/jpg, image/png",type:"file",className:"hidden",id:"asset",onChange:function(e){var t=e.target.files[0];if(t){var r=Date.now()+t.name;(0,j.c)({fileName:r,file:t,path:"/help-chat-images/",cb:function(e,t){e?m.A.error("Something went wrong in uploading file"):(m.A.success("File uploaded."),R(t.Location))}})}}})]}),(0,n.jsx)(T.z,{id:"btn-chat",size:"icon","aria-label":"Send message",className:"size-10 shrink-0 rounded-full bg-muted text-muted-foreground hover:bg-muted/80 [&_svg]:size-5",onClick:te,children:(0,n.jsx)(w.Z,{})})]})]})]})})}function R(){var e=(0,s.useContext)(k.Z),t=e.currentUser,r=e.toggleAuthModal;return(0,s.useEffect)((function(){var e=localStorage.getItem(C.gm);t||e||r()}),[t]),(0,n.jsx)(n.Fragment,{children:t&&(0,n.jsx)(P,{})})}},10062:function(e,t,r){"use strict";r.d(t,{E:function(){return o}});var n=r(29815),s=r(96486),i=r(96076),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[];return e.forEach((function(e){var n,i,a,o,u,l,c,d,f;"topics"in e?(null===(n=e.topics)||void 0===n?void 0:n.length)&&(0,s.intersection)(e.topics,t).length&&r.push({userName:e.userName,userEmail:null!==(i=e.userEmail)&&void 0!==i?i:"",userComment:e.userComment,userFlag:e.userFlag,userTime:e.userTime,postedAt:e.postedAt,userId:e.userId,readStatus:e.readStatus,type:null!==(a=e.type)&&void 0!==a?a:"",url:null!==(o=e.url)&&void 0!==o?o:"",image:null!==(u=e.image)&&void 0!==u?u:"",key:e.key}):r.push({userName:e.userName,userEmail:null!==(l=e.userEmail)&&void 0!==l?l:"",userComment:e.userComment,userFlag:e.userFlag,userTime:e.userTime,postedAt:e.postedAt,userId:e.userId,readStatus:e.readStatus,type:null!==(c=e.type)&&void 0!==c?c:"",url:null!==(d=e.url)&&void 0!==d?d:"",image:null!==(f=e.image)&&void 0!==f?f:"",key:e.key})})),r},o=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],u=a(t,o).filter((function(e){return!!e.userId&&!!e.postedAt})),l=r.filter((function(e){return!!e.userId&&(!!e.postedAt||!e.postedAt&&e.userComment===i.fp)})),c=(0,n.Z)(l).concat((0,n.Z)(u)),d=(0,s.sortBy)(c,"postedAt"),f=(0,s.uniqWith)(d,(function(e,t){return e.userId===t.userId&&e.postedAt===t.postedAt})).filter((function(e){return!!e.userId})),m=(0,s.difference)(f,l);return{combinedMessages:f,latestMessage:null!==(e=m[m.length-1])&&void 0!==e?e:null,skippedAdm
1inMessages:m}}},62922:function(e,t,r){"use strict";r.d(t,{AQ:function(){return u},Av:function(){return s},by:function(){return o},dA:function(){return i},vF:function(){return a}});var n=function(e){if(!e)return"00";var t=e>=10?e.toString()[0]:"0",r=e>=10?e.toString()[1]:e.toString();return"".concat(t).concat(r)},s=function(e,t,r){var s=[];return s.push(n(e)),s.push(n(t)),s.push(n(r)),s.join(":")};function i(e){var t=new Date(e),r=new Intl.DateTimeFormat("en-GB",{day:"2-digit",month:"short"}).format(t),n=new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!0}).format(t).toLowerCase().replace(" ","");return"".concat(r," \xb7 ").concat(n)}function a(e){return new Date(e).toDateString()===(new Date).toDateString()?new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",hour12:!0}).format(new Date(e)):new Intl.DateTimeFormat("en-GB",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",hour12:!0}).format(new Date(e))}var o=function(e,t){return t?a(t):e?e.toLocaleUpperCase():""},u=function(e,t){return"".concat(n(e),":").concat(n(t))}},22050:function(e,t,r){"use strict";r.d(t,{p:function(){return n}});var n=function(e){var t,r,n,s,i,a,o=e.templateUserMessage,u=e.appConfig,l=e.userDetails,c={client_name:null!==(t=null===u||void 0===u?void 0:u.web_clientname)&&void 0!==t?t:"",host:null!==(r=null===u||void 0===u?void 0:u.host)&&void 0!==r?r:"",name:null!==(n=null===l||void 0===l?void 0:l.name)&&void 0!==n?n:"",email:null!==(s=null===l||void 0===l?void 0:l.email)&&void 0!==s?s:"",phone:null!==(i=null===l||void 0===l?void 0:l.phone)&&void 0!==i?i:"",user_id:null!==(a=null===l||void 0===l?void 0:l.userid)&&void 0!==a?a:""};for(var d in c)o=o.replace(new RegExp("{{".concat(d,"}}"),"g"),c[d]);return o}},58907:function(e,t,r){"use strict";r.d(t,{c:function(){return w},s:function(){return N}});var n=r(47568),s=r(51438),i=r(28668),a=r(25892),o=r(76166),u=r(97582),l=r(29061),c=r(27432),d=function(e){(0,i.Z)(r,e);var t=(0,o.Z)(r);function r(e,n){var i;return(0,s.Z)(this,r),(i=t.call(this,e)).name="UploadError",i.status=n,i}return r}((0,a.Z)(Error)),f=function(e){return new Promise((function(t){return setTimeout(t,e)}))},m=function(e){return{400:"Invalid request format",401:"Unauthorized access",403:"Permission denied",404:"Resource not found",408:"Request timeout",413:"File too large",422:"File format not supported",429:"Too many requests",500:"Server error",503:"Service unavailable"}[e]||"Unknown error occurred"};function p(e){return h.apply(this,arguments)}function h(){return h=(0,n.Z)((function(e){var t,r,n,s,i,a,o,l,c,p,h,g,v,x,y=arguments;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:t=y.length>1&&void 0!==y[1]?y[1]:{},r=t.maxRetries,n=void 0===r?3:r,s=t.baseDelay,i=void 0===s?1e3:s,a=t.retryStatusCodes,o=void 0===a?[408,413,422,429,500,503]:a,c=0,u.label=1;case 1:if(!(c<=n))return[3,7];u.label=2;case 2:return u.trys.push([2,4,,6]),[4,e()];case 3:return[2,u.sent()];case 4:if(p=u.sent(),l=p,g=(null===(h=p.response)||void 0===h?void 0:h.status)||500,!o.includes(g)||c===n)throw v="".concat(m(g)," (Status: ").concat(g,")"),new d(v,g);return x=i*Math.pow(2,c),[4,f(x)];case 5:return u.sent(),[3,6];case 6:return c++,[3,1];case 7:throw l}}))})),h.apply(this,arguments)}var g=function(e){return e.replaceAll(" ","-").replaceAll("&","and").replaceAll("+","-")};function v(e,t,r){return x.apply(this,arguments)}function x(){return x=(0,n.Z)((function(e,t,r){var n,s,i=arguments;return(0,u.__generator)(this,(function(a){switch(a.label){case 0:return n=i.length>3&&void 0!==i[3]?i[3]:"",s={filePath:e},r?s.type="test":n&&(s.type=n),[4,l.Z.post("/post/generateTencentWebsitePresignedUrl",s,{headers:{"Content-Type":t}})];case 1:return[2,a.sent().data.data]}}))})),x.apply(this,arguments)}function y(e,t,r,n){return b.apply(this,arguments)}function b(){return(b=(0,n.Z)((function(e,t,r,n){return(0,u.__generator)(this,(function(s){return[2,l.Z.put(e,t,{headers:{"Content-Type":r},onUploadProgress:n})]}))}))).apply(this,arguments)}var w=function(){var e=(0,n.Z)((function(e){var t,r,s,i,a,o,l,d,f,m,h,x,b,w,N,k,j,Z=arguments;return(0,u.__generator)(this,(function(_){switch(_.label){case 0:t=e.fileName,r=e.file,s=e.path,i=e.cb,a=e.progressCb,o=void 0===a?void 0:a,l=e.isTest,d=void 0!==l&&l,f=e.type,m=void 0===f?"":f,h=Z.length>1&&void 0!==Z[1]?Z[1]:{maxRetries:0},_.label=1;case 1:return _.trys.push([1,3,,4]),x=g(t),b="".concat(s,"/").concat(x),w=c.Z.getType(t),N=function(){var e=(0,n.Z)((function(){var e;return(0,u.__generator)(this,(function(t){switch(t.label){case 0:return[4,v(b,w,d,m)];case 1:return[4,y((e=t.sent()).presignedUrl,r,w,o?function(e){o({loaded:e.loaded,total:e.total,lengthComputable:!0})}:void 0)];case 2:return t.sent(),[2,{Location:e.actualUrl}]}}))}));return function(){return e.apply(this,arguments)}}(),[4,p(N,h)];case 2:return k=_.sent(),i(null,k),[2,k];case 3:throw j=_.sent(),console.error("Error in uploadFile:",j),i(j,null),j;case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}();function N(e){return k.apply(this,arguments)}function k(){return k=(0,n.Z)((function(e){var t,r,n,s,i,a,o,l,c,d=arguments;return(0,u.__generator)(this,(function(u){return t=e.fileName,r=e.file,n=e.path,s=e.progressCb,i=void 0===s?void 0:s,a=e.isTest,o=void 0!==a&&a,l=e.type,c=void 0===l?"":l,[2,p((function(){return new Promise((function(e,s){w({fileName:t,file:r,path:n,cb:function(t,r){if(t)return console.error(t),void s(t);e(r)},progressCb:i,isTest:o,type:c})}))}),d.length>1&&void 0!==d[1]?d[1]:{maxRetries:0})]}))})),k.apply(this,arguments)}},49102:function(e,t,r){"use strict";r.d(t,{f:function(){return u}});var n=r(67294),s=r(75320),i=r(85893),a=Object.defineProperty,o=(e,t)=>a(e,"name",{value:t,configurable:!0}),u=n.forwardRef(o((function(e,t){return(0,i.jsx)(s.WV.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})}),"Label"))}},function(e){e.O(0,[7432,7340,9774,2888,179],(function(){return t=50201,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.