PageSourceSearch

https://app.instantdm.com/static/js/345.d2169029.chunk.js

js instantdm.com collected 2026-09-24 09:27:40 UTC 52,613 bytes, 2 lines download raw bytes

1(self.webpackChunkinsta_automate=self.webpackChunkinsta_automate||[]).push([[345],{80345:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>Me});var r=i(89379),n=i(65043),l=i(43569),s=i(31023),o=i(64376),a=i(10898),c=i(96651),d=i(13382),u=i(63942),p=i(85578),h=i(97326),m=i(68662),v=i(45964),x=i(51753),g=i(26851),y=i(94434),f=i(97914),j=i(96603),A=i(78507),b=i(54522),S=i(60647),k=i(76399),w=i(16569),C=i(56597),P=i(12624),_=i(8354),T=i(8918),I=i(57692),E=i(82870),F=i(37490),z=i(48677),O=i(44990),N=i(52472),D=i(16727),B=i(3072),L=i(69376),R=i(661),M=i(68409),U=i(51238),q=i(13256),W=i(94008),G=i(12481),H=i(50849),V=i(41402),Y=i(62803),K=i(75337),X=i(67407),Q=i(61966),$=i(7130),J=i(73139),Z=i(68330),ee=i(17689),te=i(94733),ie=i(1919),re=i(46237),ne=i(9025),le=i(30119),se=i(58168);const oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M476 399.1c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1V484h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H420v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V540h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H476v-84.9zM560.5 704h-225c-4.1 0-7.5 3.2-7.5 7v42c0 3.8 3.4 7 7.5 7h225c4.1 0 7.5-3.2 7.5-7v-42c0-3.8-3.4-7-7.5-7zm-7.1-502.6c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v704c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V397.3c0-8.5-3.4-16.6-9.4-22.6L553.4 201.4zM664 888H232V264h282.2L664 413.8V888zm190.2-581.4L611.3 72.9c-6-5.7-13.9-8.9-22.2-8.9H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h277l219 210.6V824c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V329.6c0-8.7-3.5-17-9.8-23z"}}]},name:"diff",theme:"outlined"};var ae=i(22172),ce=function(e,t){return n.createElement(ae.A,(0,se.A)({},e,{ref:t,icon:oe}))};const de=n.forwardRef(ce);var ue=i(69231),pe=i(14524),he=i(91736),me=i(8092),ve=i.n(me),xe=i(52446),ge=i(55472),ye=(i(10446),i(60446)),fe=i.n(ye),je=i(48663),Ae=i(78600),be=(i(78838),i(70579));fe().extend(ve());const{Title:Se,Paragraph:ke,Text:we}=s.A,{Step:Ce}=o.A;const Pe=e=>{let{editor:t}=e;const[i,r]=(0,n.useState)(!1),[l,s]=(0,n.useState)(!1),[o,h]=(0,n.useState)(""),[m,v]=(0,n.useState)("");if(!t)return null;return(0,be.jsxs)(be.Fragment,{children:[(0,be.jsx)("div",{className:"menu-bar",children:(0,be.jsxs)(a.A,{children:[(0,be.jsx)(c.A,{title:"Bold",children:(0,be.jsx)(d.Ay,{type:t.isActive("bold")?"primary":"default",icon:(0,be.jsx)(q.A,{}),onClick:()=>t.chain().focus().toggleBold().run()})}),(0,be.jsx)(c.A,{title:"Italic",children:(0,be.jsx)(d.Ay,{type:t.isActive("italic")?"primary":"default",icon:(0,be.jsx)(W.A,{}),onClick:()=>t.chain().focus().toggleItalic().run()})}),(0,be.jsx)(c.A,{title:"Underline",children:(0,be.jsx)(d.Ay,{type:t.isActive("underline")?"primary":"default",icon:(0,be.jsx)(G.A,{}),onClick:()=>t.chain().focus().toggleUnderline().run()})}),(0,be.jsx)(c.A,{title:"Heading 2",children:(0,be.jsx)(d.Ay,{type:t.isActive("heading",{level:2})?"primary":"default",icon:(0,be.jsx)(H.A,{}),onClick:()=>t.chain().focus().toggleHeading({level:2}).run()})}),(0,be.jsx)(c.A,{title:"Insert Link",children:(0,be.jsx)(d.Ay,{icon:(0,be.jsx)(V.A,{}),onClick:()=>r(!0)})}),(0,be.jsx)(c.A,{title:"Embed YouTube",children:(0,be.jsx)(d.Ay,{icon:(0,be.jsx)(Y.A,{}),onClick:()=>s(!0)})})]})}),(0,be.jsx)(u.A,{title:"Insert Link",open:i,onOk:()=>{o&&(t.chain().focus().setLink({href:o}).run(),r(!1),h(""))},onCancel:()=>r(!1),okText:"Insert",children:(0,be.jsx)(p.A,{placeholder:"https://example.com",value:o,onChange:e=>h(e.target.value)})}),(0,be.jsx)(u.A,{title:"Embed YouTube Video",open:l,onOk:()=>{m&&(t.chain().focus().setYoutubeVideo({src:m}).run(),s(!1),v(""))},onCancel:()=>s(!1),okText:"Embed",children:(0,be.jsx)(p.A,{placeholder:"https://www.youtube.com/watch?v=xyz",value:m,onChange:e=>v(e.target.value)})})]})},_e=e=>{let{data:t,onChange:i}=e;const r=(0,O.hG)({extensions:[N.A,D.A,B.Ay.configure({openOnClick:!1}),L.A.configure({width:640,height:360}),R.A.configure({levels:[1,2,3]})],content:t||"Click to add description, youtube video, link to platfrom and more.",onUpdate:e=>{let{editor:t}=e;null===i||void 0===i||i(t.getHTML())}});return(0,be.jsxs)("div",{className:"editor-wrapper",children:[(0,be.jsx)(Pe,{editor:r}),(0,be.jsx)(O.$Z,{editor:r})]})},{TextArea:Te}=p.A;function Ie(e){let{faqs:t,setFaqs:i}=e;
1const[r,l]=(0,n.useState)(!1),[s,o]=(0,n.useState)(""),[a,c]=(0,n.useState)(""),[m,v]=(0,n.useState)(null),x=()=>{o(""),c(""),v(null)};return(0,be.jsxs)("div",{style:{marginBottom:"10px"},children:[(0,be.jsx)("h3",{children:"FAQ"}),(0,be.jsx)("p",{children:"Add some frequently asked question of customers"}),(0,be.jsx)(d.Ay,{color:"primary",variant:"dashed",icon:(0,be.jsx)(K.A,{}),onClick:()=>l(!0),children:"Add FAQ"}),(0,be.jsx)("div",{style:{marginTop:16,display:"flex",flexDirection:"column",gap:12},children:t.map(((e,r)=>(0,be.jsx)("div",{className:"faq-card",children:(0,be.jsx)(h.A,{items:[{key:"1",label:e.question,children:(0,be.jsxs)("div",{children:[" ",(0,be.jsx)("p",{children:e.answer}),(0,be.jsxs)("div",{className:"faq-actions",children:[(0,be.jsx)(d.Ay,{size:"small",type:"text",onClick:()=>(e=>{v(e),o(t[e].question),c(t[e].answer),l(!0)})(r),children:(0,be.jsx)(X.A,{})}),(0,be.jsx)(d.Ay,{size:"small",type:"text",danger:!0,onClick:()=>(e=>{const r=[...t];r.splice(e,1),i(r)})(r),children:(0,be.jsx)(Q.A,{})})]})]})}]})},r)))}),(0,be.jsx)(u.A,{title:null!==m?"Edit FAQ":"Add FAQ",open:r,onOk:()=>{const e={question:s,answer:a};if(null!==m){const r=[...t];r[m]=e,i(r)}else i([...t,e]);l(!1),x()},onCancel:()=>{l(!1),x()},okText:null!==m?"Update":"Add",children:(0,be.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,be.jsx)(p.A,{placeholder:"Enter question",value:s,onChange:e=>o(e.target.value)}),(0,be.jsx)(Te,{rows:3,placeholder:"Enter answer",value:a,onChange:e=>c(e.target.value)})]})})]})}function Ee(e){let{testimonials:t,setTestimonials:i,productId:r}=e;const l=[{label:(0,be.jsxs)("p",{children:[(0,be.jsx)($.A,{style:{color:"skyblue"}})," Twitter"]}),value:"Twitter"},{label:(0,be.jsxs)("p",{children:[(0,be.jsx)(J.A,{style:{color:"violet"}})," Instagram"]}),value:"Instagram"},{label:(0,be.jsxs)("p",{children:[(0,be.jsx)(Z.A,{style:{color:"blue"}})," LinkedIn"]}),value:"LinkedIn"},{label:(0,be.jsxs)("p",{children:[(0,be.jsx)(ee.A,{style:{color:"red"}})," Youtube"]}),value:"YouTube"}],[s,o]=(0,n.useState)(!1),[c,h]=(0,n.useState)(null),[f,j]=(0,n.useState)(""),[A,b]=(0,n.useState)(""),[S,k]=(0,n.useState)(""),[w,C]=(0,n.useState)(5),[P,_]=(0,n.useState)(0),[T,I]=(0,n.useState)(null),E=()=>{h(null),j(""),b(""),k(""),C(0),I(null)};return(0,be.jsxs)("div",{style:{marginBottom:"10px"},children:[(0,be.jsx)("h3",{children:"Testimonials"}),(0,be.jsx)("p",{children:"Add reviews, feedbacks, and comments from your users."}),(0,be.jsx)(d.Ay,{color:"primary",variant:"dashed",icon:(0,be.jsx)(K.A,{}),onClick:()=>o(!0),children:"Add Testimonial"}),(0,be.jsx)("div",{className:"testimonial-cards",children:t.map(((e,r)=>(0,be.jsx)("div",{className:"testimonial-card",children:(0,be.jsx)(m.A,{size:"small",children:(0,be.jsxs)(a.A,{align:"start",children:[(0,be.jsx)(v.A,{src:e.profilePicUrl}),(0,be.jsxs)("div",{style:{flex:1},children:[(0,be.jsx)("strong",{children:e.name})," \u2014 ",e.social,(0,be.jsx)("div",{children:(0,be.jsx)(x.A,{disabled:!0,defaultValue:e.rating})}),(0,be.jsx)("p",{style:{margin:0},children:e.review}),(0,be.jsxs)("div",{className:"testimonial-actions",children:[(0,be.jsx)(d.Ay,{type:"text",size:"small",onClick:()=>(e=>{const i=t[e];b(i.name),k(i.review),j(i.social),C(i.rating),h(i.profilePicUrl),I(e),o(!0)})(r),children:(0,be.jsx)(X.A,{})}),(0,be.jsx)(d.Ay,{type:"text",size:"small",danger:!0,onClick:()=>(e=>{const r=[...t];r.splice(e,1),i(r)})(r),children:(0,be.jsx)(Q.A,{})})]})]})]})})},r)))}),(0,be.jsx)(u.A,{title:"Add Testimonial",open:s,onOk:()=>{const e={name:A,review:S,social:f,rating:w,profilePicUrl:null};!function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e.profilePicUrl=r,null!==T){const r=[...t];r[T]=e,i(r)}else i([...t,e]);o(!1),h(null),E()}(c?"".concat(c):null)},onCancel:()=>{o(!1),E()},okText:"Add",children:(0,be.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,be.jsxs)("div",{children:[(0,be.jsx)("label",{children:"Profile Picture"}),(0,be.jsx)(g.A,{beforeUpload:e=>!1,maxCount:1,onChange:e=>{let{file:t}=e;Fe({file:t,product_id:r,uploadStatus:_,setURL:e=>{h((t=>e))}})},listType:"picture",fileList:c?[{uid:"-1",name:"Profile Picture",status:"done",url:c}]:[],onRemove:()=>{h(null)},children:(0,be.jsx)(d.Ay,{icon:(0,be.jsx)(te.A,{}),children:"Upload"})})]}),(0,be.jsxs)("div",{children:[(0,be.jsx)("label",{children:"Social Media"}),(0,be.jsx)(y.A,{options:l,value:f,onChange:j,placeholder:"Select platform",style:{width:"100%"}})]}),(0,be.jsxs)("div",{children:[(0,be.jsx)("label",{children:"Reviewer Name"}),(0,be.jsx)(p.A,{value:A,onChange:e=>b(e.target.value),placeholder:"e.g. John Doe"})]}),(0,be.jsxs)("div",{children:[(0,be.jsx)("label",{children:"Review"}),(0,be.jsx)(Te,{rows:3,value:S,onChange:e=>k(e.target.value),placeholder:"Write the review here..."})]}),(0,be.jsxs)("div",{children:[(0,be.jsx)("label",{children:"Rating"}),(0,be.jsx)(x.A,{value:w,onChange:C})]})]})})]})}const Fe=async e=>{let{file:t,product_id:i,messageApi:r,uploadStatus:n,setURL:l}=e,s=(0,U.A)(),o=t.name.split(".").pop(),a=await(0,M.A)(r,t,i,s,o,n);return l&&l(a),a},{Option:ze}=y.A;function Oe(e){let{pricing:t,setPricing:i}=e;return(0,be.jsxs)("div",{children:[(0,be.jsx)("h3",{children:"Pricing"}),"fixed"===t.pricingType&&(0,be.jsxs)(a.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,be.jsxs)("div",{children:[(0,be.jsx)("p",{children:"Regular Price"}),(0,be.jsx)(f.A,{min:0,style:{width:"100%"},value:t.regularPrice,onChange:e=>i((0,r.A)((0,r.A)({},t),{},{regularPrice:e||0})),prefix:"\u20b9"})]}),(0,be.jsxs)("div",{children:[(0,be.jsxs)(j.Ay.Group,{style:{marginBottom:"10px"},onChange:e=>i((0,r.A)((0,r.A)({},t),{},{free:e.target.value})),defaultValue:(null===t||void 0===t?void 0:t.free)||!1,children:[(0,be.jsx)(j.Ay.Button,{value:!1,children:"Offer Price"}),(0,be.jsx)(j.Ay.Button,{value:!0,children:"Free Resource"})]}),1!=(null===t||void 0===t?void 0:t.free)&&(0,be.jsx)(f.A,{min:0,style:{width:"100%"},value:t.offerPrice,onChange:e=>i((0,r.A)((0,r.A)({},t),{},{offerPrice:e||0})),prefix:"\u20b9"}),1==(null===t||void 0===t?void 0:t.free)&&(0,be.jsx)("p",{children:"It's a free content"})]})]}),"student"===t.pricingType&&(0,be.jsxs)(a.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,be.jsxs)("div",{children:[(0,be.jsx)("p",{children:"Minimum Price"}),(0,be.jsx)(f.A,{min:0,style:{width:"100%"},value:t.minPrice,onChange:e=>i((0,r.A)((0,r.A)({},t),{},{minPrice:e||0})),prefix:"\u20b9"})]}),(0,be.jsxs)("div",{children:[(0,be.jsx)("p",{children:"Suggested Price"}),(0,be.jsx)(f.A,{min:0,style:{width:"100%"},value:t.suggestedPrice,onChange:e=>i((0,r.A)((0,r.A)({},t),{},{suggestedPrice:e||0})),prefix:"\u20b9"})]})]})]})}const Ne=e=>{let{customFields:t,setCustomFields:i}=e;
1const[l,s]=(0,n.useState)(!1),[o]=A.A.useForm();return(0,be.jsxs)("div",{children:[(0,be.jsx)(we,{strong:!0,children:"Buyers Details:"}),(0,be.jsx)(he.JY,{onDragEnd:e=>{if(!e.destination)return;const r=[...t],[n]=r.splice(e.source.index,1);r.splice(e.destination.index,0,n),i(r)},children:(0,be.jsx)(he.gL,{droppableId:"fields",children:e=>(0,be.jsx)(b.A,(0,r.A)((0,r.A)({bordered:!0,style:{marginTop:12},ref:e.innerRef},e.droppableProps),{},{dataSource:t,renderItem:(e,n)=>{e.isDefault,["email","whatsapp number"].includes(e.label.toLowerCase());return(0,be.jsx)(he.sx,{draggableId:e.label+n,index:n,children:(l,s)=>(0,be.jsx)(b.A.Item,(0,r.A)((0,r.A)({ref:l.innerRef},l.draggableProps),{},{style:(0,r.A)((0,r.A)({},l.draggableProps.style),{},{background:s.isDragging?"#fafafa":"white"}),actions:[(0,be.jsx)(S.A,{title:"Delete this field?",onConfirm:()=>(e=>{const r=[...t];r.splice(e,1),i(r)})(n),okText:"Yes",cancelText:"No",children:(0,be.jsx)(Q.A,{})})],children:(0,be.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,width:"100%"},children:[(0,be.jsx)("div",(0,r.A)((0,r.A)({},l.dragHandleProps),{},{style:{cursor:"grab"},children:(0,be.jsx)(ie.A,{style:{opacity:".4"}})})),(0,be.jsxs)(a.A,{direction:"vertical",style:{width:"100%"},children:[(0,be.jsx)(we,{strong:!0,children:e.label}),(0,be.jsxs)(we,{type:"secondary",children:["Type: ",(0,be.jsx)(k.A,{color:"blue",children:e.type})]})]})]})}))},e.label+n)}}))})}),(0,be.jsx)(d.Ay,{icon:(0,be.jsx)(K.A,{}),type:"primary",style:{marginTop:16},onClick:()=>s(!0),children:"Add Field"}),(0,be.jsx)(u.A,{title:"Add Custom Field",open:l,onCancel:()=>s(!1),footer:null,children:(0,be.jsxs)(A.A,{form:o,layout:"vertical",onFinish:e=>{const r={label:e.label.trim(),type:e.type,options:e.options||[],isDefault:!1};i([...t,r]),o.resetFields(),s(!1)},children:[(0,be.jsx)(A.A.Item,{label:"Field Label",name:"label",rules:[{required:!0,message:"Please enter field name"}],children:(0,be.jsx)(p.A,{})}),(0,be.jsx)(A.A.Item,{label:"Field Type",name:"type",rules:[{required:!0,message:"Please select field type"}],children:(0,be.jsxs)(y.A,{placeholder:"Select a type",children:[(0,be.jsx)(ze,{value:"text",children:"Text"}),(0,be.jsx)(ze,{value:"dropdown",children:"Dropdown (Single choice)"}),(0,be.jsx)(ze,{value:"checkbox",children:"Checkbox (Multiple choices)"})]})}),(0,be.jsx)(A.A.Item,{shouldUpdate:(e,t)=>e.type!==t.type,children:()=>{const e=o.getFieldValue("type");return"dropdown"===e||"checkbox"===e?(0,be.jsx)(A.A.Item,{label:"Options",name:"options",rules:[{required:!0,message:"Please provide at least one option"}],children:(0,be.jsx)(y.A,{mode:"tags",placeholder:"Enter options and press enter",tokenSeparators:[","]})}):null}}),(0,be.jsx)(A.A.Item,{children:(0,be.jsx)(d.Ay,{type:"primary",htmlType:"submit",block:!0,children:"Add Field"})})]})})]})};function De(e){let{showPaymentSettings:t,setShowPaymentSettings:i}=e;const[r,l]=(0,n.useState)(!1),[s,o]=(0,n.useState)(!1),[a,c]=(0,n.useState)(""),[h,m]=(0,n.use
1State)(""),[v,x]=(0,n.useState)(""),[g,y]=(0,n.useState)(!1),f=async e=>{const t=null!==e&&void 0!==e?e:r;if((null===a||void 0===a?void 0:a.length)<=0&&!0===t)return void w.Ay.error("Missing UPI ID");const i={wallet:{ids:a?[a]:[],name:"upi",enabled:t}};(0,je.A)({url:"dp_payment_conf",method:"POST",body:i,loadingState:y,dataState:e=>200===(null===e||void 0===e?void 0:e.code)?w.Ay.success(e.message):w.Ay.error(e.message)})},j=[{key:"upi",label:"UPI",children:(0,be.jsxs)(be.Fragment,{children:[(0,be.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[(0,be.jsxs)(C.A,{vertical:!0,children:[(0,be.jsxs)(Se,{level:5,children:["Enable UPI ",(0,be.jsx)(k.A,{color:"purple",children:"Comming Soon"})]}),(0,be.jsx)(we,{type:"secondary",children:"Collect Money directly to your UPI, no Payment Gateway, no charges, you can verify manually with screenshot and reference number."})]}),(0,be.jsx)(P.A,{disabled:!0,checked:r,onChange:e=>{l(e),f(e)}})]}),r&&(0,be.jsxs)(be.Fragment,{children:[(0,be.jsx)(ke,{type:"secondary",children:"Enter your UPI ID or UPI Number. This is where you will receive payments from your customers directly."}),(0,be.jsx)(p.A,{placeholder:"e.g. yourname@upi or 9876543210",value:a,onChange:e=>c(e.target.value)}),(0,be.jsx)(d.Ay,{loading:g,type:"primary",style:{marginTop:20},block:!0,onClick:f,children:"Save Changes"})]})]})},{key:"razorpay",label:"Razorpay",children:(0,be.jsxs)(be.Fragment,{children:[(0,be.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[(0,be.jsxs)(C.A,{vertical:!0,children:[(0,be.jsxs)(Se,{level:5,children:["Enable Custom Razorpay ",(0,be.jsx)(k.A,{color:"purple",children:"Comming Soon"})]}),(0,be.jsx)(we,{type:"secondary",children:"Collect payments instantly via your Payment Gateway. Get fast leads, instant fund transfers, and easy refund management."})]}),(0,be.jsx)(P.A,{disabled:!0,checked:!1,onChange:e=>{o(e),(async e=>{const t=null!==e&&void 0!==e?e:s;if(((null===h||void 0===h?void 0:h.length)<=0||(null===v||void 0===v?void 0:v.length)<=0)&&!0===t)return void w.Ay.error("Missing Keys");const i={pg:{public:h,secrect:v,name:"razorpay"}};(0,je.A)({url:"dp_payment_conf",method:"POST",body:i,loadingState:y,dataState:e=>200===(null===e||void 0===e?void 0:e.code)?w.Ay.success(e.message):w.Ay.error(e.message)})})(e)}})]}),!1]})}];return(0,n.useEffect)((()=>{t&&(0,je.A)({url:"dp_payment_conf",method:"GET",loadingState:y,dataState:e=>{if(null!==e&&void 0!==e&&e.data){var t,i;const r=e.data.wallet||{},n=e.data.pg||{};l(null!==(t=r.enabled)&&void 0!==t&&t),c((null===(i=r.ids)||void 0===i?void 0:i[0])||""),o(Boolean(n.public||n.secrect)),m(n.public||""),x(n.secret||"")}else w.Ay.error(e.message||"Failed to load config")}})}),[t]),(0,be.jsxs)(u.A,{title:"Configure Payment Settings",open:t,onCancel:()=>i(!1),footer:null,children:[(0,be.jsxs)(ke,{children:["This is where you configure how to ",(0,be.jsx)(we,{strong:!0,children:"receive payments from your customers"}),". You can choose to enable either UPI, Razorpay, or both."]}),(0,be.jsx)(_.A,{}),(0,be.jsx)(T.A,{defaultActiveKey:"upi",items:j})]})}function Be(e){var t,i,l;let{onPublish:s,productId_:o,formState:a,setFormState:c}=e,u=o;const[m,v]=(0,n.useState)("1"),[x,y]=(0,n.useState)(0);if(void 0==a)return(0,be.jsx)("p",{children:"Loading"});const f=[{key:"1",label:"Product Details",children:(0,be.jsxs)("div",{style:{paddingBottom:"20px"},children:[(0,be.jsx)("h3",{children:"Title"}),(0,be.jsx)("p",{children:"Give it a name for your product"}),(0,be.jsx)(p.A,{placeholder:"Give it a name",value:a.title,onChange:e=>c((t=>(0,r.A)((0,r.A)({},t),{},{title:e.target.value})))}),(0,be.jsx)("h3",{children:"Cover Image"}),(0,be.jsx)("p",{children:"Upload a cover image which will be visible in all social media while sharing"}),a.coverMedia?(0,be.jsxs)("div",{style:{position:"relative"},children:[(0,be.jsx)("img",{src:a.coverMedia,width:"100%"}),(0,be.jsx)(d.Ay,{onClick:()=>{c((0,r.A)((0,r.A)({},a),{},{coverMedia:void 0}))},style:{position:"absolute",top:-10,right:10},color:"danger",variant:"solid",icon:(0,be.jsx)(Q.A,{}),children:"Delete Image"})]}):(0,be.jsx)(g.A,{beforeUpload:e=>!1,maxCount:1,onChange:e=>{let{file:t}=e;Fe({file:t,product_id:u,uploadStatus:y,setURL:e=>{c((t=>(0,r.A)((0,r.A)({},t),{},{coverMedia:e})))}})},children:(0,be.jsx)(d.Ay,{icon:(0,be.jsx)(te.A,{}),block:!0,color:"purple",variant:"outlined",children:"Upload Image / Video"})}),x>0&&x<100&&(0,be.jsx)(I.A,{percent:x}),(0,be.jsx)("h3",{children:"Gallery"}),(0,be.jsx)("p",{children:"You can upload up to 6 images to show below the product preview"}),(0,be.jsx)(g.A,{listType:"picture-card",beforeUpload:()=>!1,multiple:!0,accept:"image/*",fileList:[],maxCount:6-((null===(t=a.gallery)||void 0===t?void 0:t.length)||0),onChange:e=>{var t;let{file:i}=e;((null===(t=a.gallery)||void 0===t?void 0:t.length)||0)>=6||Fe({file:i,product_id:u,uploadStatus:y,setURL:e=>{c((t=>(0,r.A)((0,r.A)({},t),{},{gallery:[...t.gallery||[],e]})))}})},children:(null===(i=a.gallery)||void 0===i?void 0:i.length)<6&&(0,be.jsx)(d.Ay,{icon:(0,be.jsx)(te.A,{}),color:"purple",variant:"outlined",children:"Upload Image"})}),x>0&&x<100&&(0,be.jsx)(I.A,{percent:x}),(0,be.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:12,marginTop:12},children:null===(l=a.gallery)||void 0===l?void 0:l.map(((e,t)=>(0,be.jsxs)("div",{style:{position:"relative",width:120,height:120},children:[(0,be.jsx)("img",{src:e,alt:"Gallery ".concat(t),style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}}),(0,be.jsx)(d.Ay,{size:"small",style:{position:"absolute",top:-10,right:-10},shape:"circle",icon:(0,be.jsx)(Q.A,{}),onClick:()=>{c((e=>(0,r.A)((0,r.A)({},e),{},{gallery:e.gallery.filter(((e,i)=>i!==t))})))}})]},t)))}),(0,be.jsx)("h3",{children:"Description"}),(0,be.jsx)(_e,{data:a.description,onChange:e=>c((t=>(0,r.A)((0,r.A)({},t),{},{description:e})))}),(0,be.jsx)(h.A,{style:{marginTop:"20px"},items:[{key:"1",label:"Preview Description",children:a.description.length>0&&(0,be.jsxs)(be.Fragment,{children:[(0,be.jsx)("h3",{children:"Description"}),(0,be.jsx)("div",{dangerouslySetInnerHTML:{__html:a.description.replace('iframe width="640"','iframe width="100%"')}}),(0,be.jsx)(_.A,{})]})}]}),(0,be.jsx)("h3",{style:{marginBottom:"0"},children:"Redirect Link"}),(0,be.jsx)("p",{style:{margin:0,opacity:".5",marginBottom:"10px"}
1,children:"Link to your E-book, courses, telegram channel or anything. Once payment is done we'll redirect your buyers to this link"}),(0,be.jsx)(p.A,{placeholder:"https://redirectlink.com",value:a.rdrLink,onChange:e=>c((t=>(0,r.A)((0,r.A)({},t),{},{rdrLink:e.target.value})))}),(0,be.jsx)(_.A,{}),(0,be.jsx)(Ee,{productId:u,testimonials:a.testimonials,setTestimonials:e=>{c((t=>(0,r.A)((0,r.A)({},t),{},{testimonials:e})))}}),(0,be.jsx)(Ie,{faqs:a.faqs,setFaqs:e=>{c((t=>(0,r.A)((0,r.A)({},t),{},{faqs:e})))}}),(0,be.jsx)(d.Ay,{onClick:()=>v("2"),color:"default",variant:"solid",block:!0,children:"Next Step : Pricing"})]})},{key:"2",label:"Pricing",children:(0,be.jsxs)("div",{style:{paddingBottom:"20px"},children:[(0,be.jsx)(Oe,{pricing:a.pricing,setPricing:e=>{c((t=>(0,r.A)((0,r.A)({},t),{},{pricing:e})))}}),(0,be.jsx)(d.Ay,{style:{marginTop:"20px"},onClick:()=>v("3"),color:"default",variant:"solid",block:!0,children:"Next Step : Settings"})]})},{key:"3",label:"Settings",children:(0,be.jsxs)("div",{style:{paddingBottom:"20px"},children:[(0,be.jsx)("div",{}),(0,be.jsx)(Ne,{customFields:a.fields,setCustomFields:e=>{c((t=>(0,r.A)((0,r.A)({},t),{},{fields:e})))}}),(0,be.jsx)(d.Ay,{onClick:()=>s((0,r.A)((0,r.A)({},a),{},{published:!0})),icon:(0,be.jsx)(re.A,{}),style:{marginTop:"20px"},color:"green",variant:"solid",block:!0,children:"Publish Product"})]})}];return(0,be.jsx)("div",{className:"course-create-left-side",children:(0,be.jsx)(T.A,{activeKey:m,onChange:e=>v(e),items:f})})}const Le=async e=>{try{const t=(0,ge.collection)(xe.fireDB,"dp-orders",e,"orders"),i=await(0,ge.getDocs)(t);return i.docs.map((e=>(0,r.A)({id:e.id},e.data())))}catch(t){return[]}},Re=e=>{const t={};for(const i of e){let e=i.status||"unknown";"manual_verification_requried"!=e&&(e="all"),t[e]||(t[e]=[]),t[e].push(i)}return Object.keys(t).forEach((e=>{t[e].sort(((e,t)=>{var i,r;const n=new Date(null!==(i=e.ordered_at)&&void 0!==i&&i.seconds?1e3*e.ordered_at.seconds:e.ordered_at).getTime();return new Date(null!==(r=t.ordered_at)&&void 0!==r&&r.seconds?1e3*t.ordered_at.seconds:t.ordered_at).getTime()-n}))})),t};function Me(){var e,t,i,s,o,a,c,p,h,v,x,g;
1const[y,f]=w.Ay.useMessage(),[j,A]=(0,n.useState)(!1),[b,S]=(0,n.useState)(!0),[I,O]=(0,n.useState)(),[N,D]=(0,n.useState)([]),[B,L]=(0,n.useState)({});JSON.parse(localStorage.getItem("userData"));const[R,M]=(0,n.useState)({}),[q,W]=(0,n.useState)({}),[G,H]=(0,n.useState)(!1),[V,Y]=(0,n.useState)();let Q=(0,Ae.A)();let $={title:"",coverMedia:null,description:"",cta:"",benefits:[],testimonials:[],faqs:[],gallery:[],authors:[],customSection:"",themeColor:"black",modules:[],validity:{type:"lifetime",limitValue:1,limitUnit:"months"},pricing:{pricingType:"fixed",regularPrice:0,offerPrice:0,gstEnabled:!1,minPrice:200,suggestedPrice:500},fields:[{label:"Full Name",type:"text",isDefault:!0},{label:"Email",type:"text",isDefault:!0,verifyWithOTP:!1},{label:"Whatsapp Number",type:"number",isDefault:!0,verifyWithOTP:!1}],coupons:[],policies:{terms:"",refund:"",privacy:""}};const[J,Z]=(0,n.useState)(),[ee,te]=(0,n.useState)([]);console.log("-=-=-=-=-drafts",ee),(0,n.useEffect)((()=>{}),[B]),(0,n.useEffect)((()=>{if(N.length<1)return;const e=Re(N);L(e)}),[N]),(0,n.useEffect)((()=>{if(!ee)return;if(ee.length<1)return;(async()=>{let e=[],t=[];for(const i of ee){const e=i.productId;e&&t.push(e)}for(const i of[...new Set(t)])e=e.concat(await Le(i));D(e)})()}),[ee]);const ie=e=>{console.log("record--==-=-",e),Z(e),Y(e),O(e.productId),A(!0)},re=async e=>{console.log("-=-=-=-=-draft",e);try{const t="".concat(e.productId,"-copy-").concat((0,U.A)()),i=(0,ge.H9)(xe.fireDB,"digital-products",Q,"draft_products",t);let n=(0,r.A)((0,r.A)({},e),{},{id:t,productId:t,title:e.title+" (Copy)",createdAt:(new Date).toISOString(),published:!1,short_url:null});await(0,ge.BN)(i,n),w.Ay.success("Duplicated!"),te([n,...ee])}catch(t){console.error("Duplicate failed:",t),w.Ay.error("Failed to duplicate.")}},se=async()=>{console.log("Fetching drafts");try{const e=(0,ge.collection)(xe.fireDB,"digital-products",Q,"draft_products"),t=(await(0,ge.getDocs)(e)).docs.map((e=>(0,r.A)({id:e.id},e.data())));te(t)}catch(e){console.error("Error loading drafts",e),w.Ay.error("Failed to load drafts.")}finally{S(!1)}};(0,n.useEffect)((()=>{se()}),[Q]),(0,n.useEffect)((()=>{"".concat((0,U.A)());(0,je.A)({url:"mini-account-summary",method:"GET",loadingState:H,dataState:e=>{200==(null===e||void 0===e?void 0:e.code)?W(e):W({pg_charge:"0",currency:"NA",last_payment_id:"",order_count:"0",amount_after_pg:"0",total_collected:"0",last_order_time:""})}})}),[]);const[oe,ae]=(0,n.useState)({}),ce=[{title:"Title",dataIndex:"title",key:"title",render:e=>e||"(Untitled)"},{title:"Price",key:"price",render:(e,t)=>{var i;return(0,be.jsx)(be.Fragment,{children:null!==t&&void 0!==t&&null!==(i=t.pricing)&&void 0!==i&&i.free?"Free Content":t.pricing.offerPrice||t.pricing.regularPrice})}},{title:"Product URL",dataIndex:"short_url",key:"short_url",render:e=>e?(0,be.jsxs)(C.A,{gap:10,children:[(0,be.jsx)("a",{href:"https://mini.instantdm.com/".concat(e),target:"_blank",rel:"noopener noreferrer",children:(0,be.jsxs)(k.A,{color:"blue",children:[" https://mini.instantdm.com/",e," "]})}),(0,be.jsx)(ne.A,{style:{color:"blue"},onClick:()=>{navigator.clipboard.writeText("https://mini.instantdm.com/".concat(e)),w.Ay.success("Link copied to clipboard!")}})]}):"\u2014"},{title:"Actions",key:"actions",render:(e,t)=>(0,be.jsxs)(be.Fragment,{children:[(0,be.jsx)(P.A,{defaultChecked:null===t||void 0===t?void 0:t.published,onChange:e=>{Pe((0,r.A)((0,r.A)({},t),{},{published:e}))}}),(0,be.jsx)(d.Ay,{type:"link",onClick:()=>ie(t),children:"Edit"}),(0,be.jsx)(d.Ay,{type:"link",onClick:()=>re(t),children:"Duplicate"})]})}],he=[{title:"Customer Name",key:"fields",render:(e,t)=>{var i;return(0,be.jsx)(be.Fragment,{children:null===(i=t.fields)||void 0===i?void 0:i["Full Name"]})}},{title:"Whatsapp / Email",key:"fields",render:(e,t)=>{var i,r;return(0,be.jsxs)(be.Fragment,{children:[null===(i=t.fields)||void 0===i?void 0:i["Whatsapp Number"]," / ",null===(r=t.fields)||void 0===r?void 0:r.Email]})}},{title:"Price",key:"price",render:(e,t)=>(0,be.jsxs)(be.Fragment,{children:[t.price.currency," ",t.price.amount]})},{title:"Product",dataIndex:"product",key:"product"},{title:"Stauts",dataIndex:"status",key:"status",render:(e,t)=>{let i={manual_verification_requried:(0,be.jsx)(k.A,{color:"orange",icon:(0,be.jsx)(le.A,{}),children:"Waiting for approval"}),manual_verified:(0,be.jsx)(k.A,{color:"blue",children:"Verified Manually"}),auto_verified:(0,be.jsx)(k.A,{color:"green",children:"Auto Verified"})};return(null===i||void 0===i?void 0:i[null===t||void 0===t?void 0:t.status])||(0,be.jsx)(k.A,{color:"grey",children:"No Status"})}}
1,{title:"Time",key:"ordered_at",dataIndex:"ordered_at",render:(e,t)=>{var i;const r=null===t||void 0===t||null===(i=t.ordered_at)||void 0===i?void 0:i.seconds;if(!r)return"-";return fe().unix(r).fromNow()}},{title:"Actions",key:"actions",render:(e,t)=>(0,be.jsx)(be.Fragment,{children:(0,be.jsx)(d.Ay,{color:"primary",variant:"solid",onClick:()=>{ae(t)},children:"manual_verification_requried"==(null===t||void 0===t?void 0:t.status)?"Verify Payment":"View Details "})})}],me=[{title:"Customer Name",key:"fields",render:(e,t)=>{var i;return(0,be.jsx)(be.Fragment,{children:null===(i=t.fields)||void 0===i?void 0:i["Full Name"]})}},{title:"Whatsapp / Email",key:"fields",render:(e,t)=>{var i,r;return(0,be.jsxs)(be.Fragment,{children:[null===(i=t.fields)||void 0===i?void 0:i["Whatsapp Number"]," / ",null===(r=t.fields)||void 0===r?void 0:r.Email]})}},{title:"Price",key:"price",render:(e,t)=>(0,be.jsxs)(be.Fragment,{children:[t.price.currency," ",t.price.amount]})},{title:"Product",dataIndex:"product",key:"product"},{title:"Time",ke
1y:"ordered_at",dataIndex:"ordered_at",render:(e,t)=>{var i;const r=null===t||void 0===t||null===(i=t.ordered_at)||void 0===i?void 0:i.seconds;if(!r)return"-";return fe().unix(r).fromNow()}},{title:"Actions",key:"actions",render:(e,t)=>(0,be.jsx)(be.Fragment,{children:(0,be.jsx)(d.Ay,{color:"primary",variant:"solid",onClick:()=>{ae(t)},children:"Verify Payment"})})}],ve=[(null===B||void 0===B||null===(e=B.manual_verification_requried)||void 0===e?void 0:e.length)>0&&{key:"1",label:"Manual Payments",children:(0,be.jsx)(E.A,{rowKey:"orderID",columns:me,dataSource:null===B||void 0===B?void 0:B.manual_verification_requried,pagination:{pageSize:20}})},{key:"2",label:"Products",children:(0,be.jsxs)("div",{children:[(0,be.jsx)(E.A,{className:"desktop",rowKey:"id",columns:ce,dataSource:ee,loading:b,pagination:{pageSize:100}}),(0,be.jsx)("div",{className:"mobile",children:ee.map((e=>{var t,i;return(0,be.jsxs)(m.A,{style:{marginBottom:12},cover:(0,be.jsx)("img",{src:null===e||void 0===e?void 0:e.coverMedia}),actions:[(0,be.jsx)(P.A,{defaultChecked:null===e||void 0===e?void 0:e.published,onChange:t=>Pe((0,r.A)((0,r.A)({},e),{},{published:t}))}),(0,be.jsx)(X.A,{onClick:()=>ie(e)}),(0,be.jsx)(de,{onClick:()=>re(e)}),(0,be.jsx)(ue.A,{onClick:()=>{navigator.clipboard.writeText("https://mini.instantdm.com/".concat(null===e||void 0===e?void 0:e.short_url)),w.Ay.success("Link copied to clipboard!")}})],children:[(0,be.jsx)("h3",{children:e.title||"(Untitled)"}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Price:"})," ",(null===(t=e.pricing)||void 0===t?void 0:t.offerPrice)||(null===(i=e.pricing)||void 0===i?void 0:i.regularPrice)]}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"URL: "}),e.short_url&&e.published?(0,be.jsxs)("a",{href:"https://mini.instantdm.com/".concat(e.short_url),target:"_blank",rel:"noopener noreferrer",children:["https://mini.instantdm.com/",e.short_url]}):"\u2014"]})]},e.id)}))})]})},{key:"3",label:"All Orders",children:(0,be.jsxs)("div",{children:[(0,be.jsx)(E.A,{rowKey:"orderID",className:"desktop",columns:he,dataSource:null===B||void 0===B?void 0:B.all,pagination:{pageSize:20}}),(0,be.jsx)("div",{className:"mobile",children:null===B||void 0===B||null===(t=B.all)||void 0===t?void 0:t.map((e=>{var t,i,r,n,l,s;return(0,be.jsxs)(m.A,{style:{marginBottom:12},children:[(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Name:"})," ",null===(t=e.fields)||void 0===t?void 0:t["Full Name"]]}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Contact:"})," ",null===(i=e.fields)||void 0===i?void 0:i["Whatsapp Number"]," / ",null===(r=e.fields)||void 0===r?void 0:r.Email]}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Price:"})," ",null===(n=e.price)||void 0===n?void 0:n.currency," ",null===(l=e.price)||void 0===l?void 0:l.amount]}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Product:"})," ",e.product]}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Status:"})," ",{manual_verification_requried:"\u23f3 Waiting for approval",manual_verified:"\u2705 Verified Manually",auto_verified:"\u2705 Auto Verified"}[e.status]||"No Status"]}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Time:"})," ",fe().unix((null===e||void 0===e||null===(s=e.ordered_at)||void 0===s?void 0:s.seconds)||0).fromNow()]}),(0,be.jsx)(d.Ay,{type:"primary",onClick:()=>ae(e),children:"manual_verification_requried"===e.status?"Verify Payment":"View Details"})]},e.orderID)}))})]})}],ye=async()=>{try{const{productId:e,orderID:t}=oe;console.log("-=-=productId, orderID-=-=",e,t);const i=(0,ge.H9)(xe.fireDB,"dp-orders",e,"orders",t);await(0,ge.mZ)(i,{status:"manual_verified",verified_at:new Date}),w.Ay.success("Payment Approved \u2705")}catch(e){console.error("Error approving payment:",e),w.Ay.error("Failed to approve payment \u274c")}finally{ae({})}},ke=async()=>{try{const{productId:e,id:t}=oe,i=(0,ge.H9)(xe.fireDB,"dp-orders",e,"orders",t);await(0,ge.mZ)(i,{status:"manual_rejected",verified_at:new Date}),w.Ay.success("Payment Rejected \u274c")}catch(e){console.error("Error rejecting payment:",e),w.Ay.error("Failed to reject payment \u274c")}finally{ae({})}},Ce=async e=>{try{const t=(0,Ae.A)(),i=(0,ge.H9)(xe.fireDB,"digital-products",t,"draft_products",null===e||void 0===e?void 0:e.productId);await(0,ge.BN)(i,e,{merge:!0}),console.log("Draftt saved",null===e||void 0===e?void 0:e.product_id)}catch(t){console.error("Error saving draft:",t)}};async function Pe(e){var t;if((null===(t=e.title)||void 0===t?void 0:t.length)<1)return void w.Ay.error("Please enter product title");let i={product_data:e,product_id:e.productId,short_url:e.short_url,status:"published",published:!0};w.Ay.loading("Publishing Changes"),(0,je.A)({url:"/mini-products",method:"POST",body:i,loadingState:()=>{},dataState:t=>{if(200==(null===t||void 0===t?void 0:t.code)){let i=(0,r.A)((0,r.A)({},e),{},{short_url:null===t||void 0===t?void 0:t.short_url,published:void 0==(null===e||void 0===e?void 0:e.published)||(null===e||void 0===e?void 0:e.published),status:"published"});return Ce((0,r.A)((0,r.A)({},e),{},{short_url:null===i||void 0===i?void 0:i.short_url,published:void 0==(null===e||void 0===e?void 0:e.published)||(null===e||void 0===e?void 0:e.published)})),Y((0,r.A)((0,r.A)({},e),{},{short_url:null===i||void 0===i?void 0:i.short_url,published:void 0==(null===e||void 0===e?void 0:e.published)||(null===e||void 0===e?void 0:e.published)})),se(),w.Ay.destroy(),w.Ay.success("Published"),1==(null===e||void 0===e?void 0:e.published)&&M(i),i}w.Ay.error("Error Publishing product")}})}const _e={borderRadius:12,textAlign:"center",minHeight:200,display:"flex",flexDirection:"column",justifyContent:"center",padding:"20px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.05)",backgroundColor:"#fff",minWidth:"400px"},Te={width:48,height:48,marginBottom:12}
1,[Ie,Ee]=(0,n.useState)(!1),[Fe,ze]=(0,n.useState)(!0);return(0,be.jsxs)("div",{className:"page-layout",style:{backgroundImage:"linear-gradient(180deg, #f4e9f9 0%, #e9f0fc 100%)"},children:[f,(0,be.jsx)(l.A,{}),(0,be.jsxs)("div",{className:"page-content",children:[(0,be.jsxs)(C.A,{wrap:!0,gap:16,style:{marginTop:24},children:[(0,be.jsxs)(m.A,{style:_e,children:[(0,be.jsx)("img",{src:"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Smilies/Smiling%20Face%20with%20Heart-Eyes.png",alt:"Total Orders",style:Te}),(0,be.jsx)(Se,{level:4,style:{margin:0},children:null!==(i=null===q||void 0===q?void 0:q.order_count)&&void 0!==i?i:0}),(0,be.jsx)(we,{type:"secondary",children:"Total Orders"})]}),(0,be.jsxs)(m.A,{style:_e,children:[(0,be.jsx)("img",{src:"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Smilies/Face%20with%20Peeking%20Eye.png",alt:"Total Collected",style:Te}),(0,be.jsxs)(Se,{level:4,style:{margin:0},children:[null===q||void 0===q?void 0:q.currency," ",null!==(s=null===q||void 0===q?void 0:q.total_collected)&&void 0!==s?s:0]}),(0,be.jsx)(we,{type:"secondary",children:"Total Collected"})]}),(0,be.jsx)(F.A.Ribbon,{text:"No Platform fee till Oct 31",color:"green",children:(0,be.jsxs)(m.A,{style:(0,r.A)((0,r.A)({},_e),{},{minHeight:"100%"}),children:[(0,be.jsx)("img",{src:"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Activities/Party%20Popper.png",alt:"Platform Fee",style:Te}),(0,be.jsxs)(Se,{level:4,style:{margin:0},children:[null===q||void 0===q?void 0:q.currency," 0"]}),(0,be.jsx)(we,{type:"secondary",children:"Platform Fee - 0%"})]})}),(0,be.jsxs)(m.A,{style:_e,children:[(0,be.jsx)("img",{src:"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Smilies/Face%20with%20Rolling%20Eyes.png",alt:"PG Charges",style:Te}),(0,be.jsxs)(Se,{level:4,style:{margin:0},children:[null===q||void 0===q?void 0:q.currency," ",null!==(o=null===q||void 0===q?void 0:q.pg_charge)&&void 0!==o?o:0]}),(0,be.jsxs)(we,{type:"secondary",children:["PG Charges (Razorpay, Payu, etc.) - ",(0,be.jsx)("span",{style:{fontSize:"12px"},children:" 2% + 18% GST "})]})]}),(0,be.jsxs)(m.A,{style:_e,children:[(0,be.jsx)("img",{src:"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Smilies/Smiling%20Face%20with%20Heart-Eyes.png",alt:"Account Balance",style:Te}),(0,be.jsxs)(Se,{level:4,style:{margin:0},children:[null===q||void 0===q?void 0:q.currency," ",null!==(a=null===q||void 0===q?void 0:q.amount_after_pg)&&void 0!==a?a:0]}),(0,be.jsxs)(C.A,{vertical:!0,children:[(0,be.jsx)(we,{type:"secondary",children:"Account Balance"}),(0,be.jsx)(d.Ay,{variant:"solid",color:"purple",style:{marginTop:20},target:"_blank",href:"https://forms.zohopublic.in/sskinst1/form/InstantMiniForms/formperma/eKX_p2HAagtAIiYEHcd_d8bk9P7IwfRsy0-RLBeP9FE",children:"Activate Settlements"})]})]}),(0,be.jsxs)(m.A,{style:_e,children:[(0,be.jsx)("img",{src:"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Travel%20and%20places/Tornado.png",alt:"Account Balance",style:Te}),(0,be.jsx)(Se,{level:4,style:{margin:0},children:"India Now, Global Soon"}),(0,be.jsx)(C.A,{vertical:!0,children:(0,be.jsx)(we,{style:{maxWidth:"300px"},type:"secondary",children:"We're waiting for stripe's approval. Soon we will available to everyone."})})]})]}),(0,be.jsxs)(C.A,{style:{marginTop:"20px",padding:"20px"},align:"center",justify:"flex-end",gap:10,wrap:!0,children:[(0,be.jsx)(d.Ay,{icon:(0,be.jsx)(pe.A,{}),onClick:()=>{Ee(!0)},children:"Payment Settings"}),(0,be.jsx)(d.Ay,{icon:(0,be.jsx)(K.A,{}),color:"primary",variant:"solid",onClick:()=>{let e="".concat((0,U.A)());Y((0,r.A)({productId:e},$)),Z((0,r.A)({productId:e},$)),A(!0)},children:"Sell New Product / Service"})]}),(null===B||void 0===B||null===(c=B.manual_verification_requried)||void 0===c?void 0:c.length)>0&&(0,be.jsx)("div",{}),(0,be.jsx)(T.A,{items:ve})]}),(0,be.jsx)(z.A,{width:"700px",style:{backgroundColor:"#f5f5ff",maxWidth:"100%",overflowX:"hidden"},open:j,title:(null===J||void 0===J?void 0:J.title)||"Sell new Digital Product",onClose:()=>{A(!1)},children:(0,be.jsx)(Be,{formState:V,setFormState:Y,onPublish:Pe,productId_:I,defaultData:J})}),(0,be.jsx)(z.A,{width:600,style:{backgroundColor:"white"},open:!(null===oe||void 0===oe||!oe.product),title:"manual_verification_requried"==(null===oe||void 0===oe?void 0:oe.status)?"Approve Payment":"Payment details",onClose:()=>ae({}),extra:"manual_verification_requried"==(null===oe||void 0===oe?void 0:oe.status)&&(0,be.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,be.jsx)(d.Ay,{danger:!0,onClick:ke,children:"Reject"}),(0,be.jsx)(d.Ay,{type:"primary",onClick:ye,children:"Approve"})]}),children:(0,be.jsxs)("div",{style:{padding:"16px"},children:[(0,be.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,be.jsx)("h3",{style:{marginBottom:12},children:"Buyer Details"}),(0,be.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",rowGap:8,columnGap:16},children:Object.entries((null===oe||void 0===oe?void 0:oe.fields)||{}).map((e=>{let[t,i]=e;return(0,be.jsxs)("div",{children:[(0,be.jsx)("p",{style:{margin:0,fontWeight:500,color:"#333"},children:t}),(0,be.jsx)("p",{style:{margin:0,color:"#555"},children:i})]},t)}))})]}),(0,be.jsx)(_.A,{}),(0,be.jsxs)("div",{style:{marginBottom:24},children:[(0,be.jsx)("h3",{style:{marginBottom:12},children:"Payment Info"}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Paid Amount:"})," ",null===oe||void 0===oe||null===(p=oe.price)||void 0===p?void 0:p.currency," ",null===oe||void 0===oe||null===(h=oe.price)||void 0===h?void 0:h.amount]}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Paid At:"})," ",null!==oe&&void 0!==oe&&null!==(v=oe.ordered_at)&&void 0!==v&&v.seconds?new Date(1e3*oe.ordered_at.seconds).toLocaleStr
1ing():"-"]}),(0,be.jsxs)("p",{children:[(0,be.jsx)("strong",{children:"Payment Made To:"})," ",null===oe||void 0===oe||null===(x=oe.upi)||void 0===x?void 0:x.id]})]}),(0,be.jsx)(_.A,{}),"manual_verification_requried"==(null===oe||void 0===oe?void 0:oe.status)&&(0,be.jsxs)("div",{children:[(0,be.jsx)("h3",{children:"Payment Screenshots"}),(0,be.jsx)("p",{children:"Please verify the screenshot(s) before approving the payment."}),(0,be.jsx)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"16px",marginTop:"16px"},children:null===oe||void 0===oe||null===(g=oe.screenshots)||void 0===g?void 0:g.map(((e,t)=>(0,be.jsx)("img",{src:e,alt:"screenshot-".concat(t),style:{width:"100%",height:"auto",borderRadius:"10px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",objectFit:"cover"}},t)))})]}),"manual_verification_requried"==(null===oe||void 0===oe?void 0:oe.status)&&(0,be.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"space-between",gap:"10px",marginTop:24},children:[(0,be.jsx)(d.Ay,{type:"primary",onClick:ye,block:!0,children:"Approve Payment"}),(0,be.jsx)(d.Ay,{danger:!0,onClick:ke,block:!0,children:"Reject Payment"})]})]})}),(0,be.jsx)(De,{showPaymentSettings:Ie,setShowPaymentSettings:Ee}),(0,be.jsx)(u.A,{title:"Product is live",footer:null,open:null===R||void 0===R?void 0:R.short_url,onCancel:()=>{M({}),A(!1)},children:(0,be.jsx)("div",{style:{background:"#fff",borderRadius:12,margin:"10px",marginBottom:18,backgroundColor:"whitesmoke",border:"1px solid rgba(0,0,0,.2)",padding:"16px 14px"},children:(0,be.jsxs)(C.A,{align:"center",justify:"center",className:"white-bg-border",vertical:!0,children:[(0,be.jsx)("img",{style:{justifyContent:"center"},src:"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Smilies/Partying%20Face.png",alt:"Partying Face",width:"100",height:"100"}),(0,be.jsxs)("p",{style:{fontSize:"18px",fontWeight:"600",margin:0},children:[null===R||void 0===R?void 0:R.title," is Published \ud83c\udf89"]}),(0,be.jsx)(we,{type:"secondary",style:{fontSize:"14px",marginBottom:8,display:"block"},children:"Share this link with your audience:"}),(0,be.jsxs)(k.A,{color:"processing",icon:(0,be.jsx)(ne.A,{}),style:{cursor:"pointer",fontSize:"14px",padding:"6px 12px",userSelect:"none",maxWidth:"100%",overflowWrap:"break-word",marginTop:"10px"},onClick:()=>{navigator.clipboard.writeText("https://mini.instantdm.com/".concat(null===R||void 0===R?void 0:R.short_url)),w.Ay.success("Link copied to clipboard!")},children:["https://mini.instantdm.com/",null===R||void 0===R?void 0:R.short_url]}),(0,be.jsx)("p",{style:{margin:0,marginTop:"10px",opacity:".4",fontSize:"12px"},children:"Click to copy the link"})]})})})]})}},69231:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(58168),n=i(65043);const l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 000-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z"}}]},name:"share-alt",theme:"outlined"};var s=i(22172),o=function(e,t){return n.createElement(s.A,(0,r.A)({},e,{ref:t,icon:l}))};const a=n.forwardRef(o)},7130:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(58168),n=i(65043);const l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0075-94 336.64 336.64 0 01-108.2 41.2A170.1 170.1 0 00672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 00-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 01-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 01-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"}}]},name:"twitter",theme:"outlined"};var s=i(22172),o=function(e,t){return n.createElement(s.A,(0,r.A)({},e,{ref:t,icon:l}))};const a=n.forwardRef(o)},45964:(e,t,i)=>{"use strict";i.d(t,{A:()=>I});var r=i(65043),n=i(98139),l=i.n(n),s=i(68802),o=i(13758),a=i(44320),c=i(35296),d=i(78887),u=i(89122),p=i(99598);const h=r.createContext({});var m=i(43944),v=i(94414),x=i(78855),g=i(78446);const y=e=>
1{const{antCls:t,componentCls:i,iconCls:r,avatarBg:n,avatarColor:l,containerSize:s,containerSizeLG:o,containerSizeSM:a,textFontSize:c,textFontSizeLG:d,textFontSizeSM:u,borderRadius:p,borderRadiusLG:h,borderRadiusSM:x,lineWidth:g,lineType:y}=e,f=(e,t,n)=>({width:e,height:e,borderRadius:"50%",["&".concat(i,"-square")]:{borderRadius:n},["&".concat(i,"-icon")]:{fontSize:t,["> ".concat(r)]:{margin:0}}});return{[i]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,v.dF)(e)),{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:l,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:n,border:"".concat((0,m.zA)(g)," ").concat(y," transparent"),"&-image":{background:"transparent"},["".concat(t,"-image-img")]:{display:"block"}}),f(s,c,p)),{"&-lg":Object.assign({},f(o,d,h)),"&-sm":Object.assign({},f(a,u,x)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},f=e=>{const{componentCls:t,groupBorderColor:i,groupOverlapping:r,groupSpace:n}=e;return{["".concat(t,"-group")]:{display:"inline-flex",[t]:{borderColor:i},"> *:not(:first-child)":{marginInlineStart:r}},["".concat(t,"-group-popover")]:{["".concat(t," + ").concat(t)]:{marginInlineStart:n}}}},j=(0,x.OF)("Avatar",(e=>{const{colorTextLightSolid:t,colorTextPlaceholder:i}=e,r=(0,g.oX)(e,{avatarBg:i,avatarColor:t});return[y(r),f(r)]}),(e=>{const{controlHeight:t,controlHeightLG:i,controlHeightSM:r,fontSize:n,fontSizeLG:l,fontSizeXL:s,fontSizeHeading3:o,marginXS:a,marginXXS:c,colorBorderBg:d}=e;return{containerSize:t,containerSizeLG:i,containerSizeSM:r,textFontSize:Math.round((l+s)/2),textFontSizeLG:o,textFontSizeSM:n,groupSpace:c,groupOverlapping:-a,groupBorderColor:d}}));var A=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]])}return i};const b=(e,t)=>{const[i,n]=r.useState(1),[m,v]=r.useState(!1),[x,g]=r.useState(!0),y=r.useRef(null),f=r.useRef(null),b=(0,o.K4)(t,y),{getPrefixCls:S,avatar:k}=r.useContext(c.QO),w=r.useContext(h),C=()=>{if(!f.current||!y.current)return;const t=f.current.offsetWidth,i=y.current.offsetWidth;if(0!==t&&0!==i){const{gap:r=4}=e;2*r<i&&n(i-2*r<t?(i-2*r)/t:1)}};r.useEffect((()=>{v(!0)}),[]),r.useEffect((()=>{g(!0),n(1)}),[e.src]),r.useEffect(C,[e.gap]);const P=()=>{const{onError:t}=e;!1!==(null===t||void 0===t?void 0:t())&&g(!1)},{prefixCls:_,shape:T,size:I,src:E,srcSet:F,icon:z,className:O,rootClassName:N,alt:D,draggable:B,children:L,crossOrigin:R}=e,M=A(e,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","alt","draggable","children","crossOrigin"]),U=(0,u.A)((e=>{var t,i;return null!==(i=null!==(t=null!==I&&void 0!==I?I:null===w||void 0===w?void 0:w.size)&&void 0!==t?t:e)&&void 0!==i?i:"default"})),q=Object.keys("object"===typeof U&&U||{}).some((e=>["xs","sm","md","lg","xl","xxl"].includes(e))),W=(0,p.A)(q),G=r.useMemo((()=>{if("object"!==typeof U)return{};const e=a.ye.find((e=>W[e])),t=U[e];return t?{width:t,height:t,fontSize:t&&(z||L)?t/2:18}:{}}),[W,U]);const H=S("avatar",_),V=(0,d.A)(H),[Y,K,X]=j(H,V),Q=l()({["".concat(H,"-lg")]:"large"===U,["".concat(H,"-sm")]:"small"===U}),$=r.isValidElement(E),J=T||(null===w||void 0===w?void 0:w.shape)||"circle",Z=l()(H,Q,null===k||void 0===k?void 0:k.className,"".concat(H,"-").concat(J),{["".concat(H,"-image")]:$||E&&x,["".concat(H,"-icon")]:!!z}
1,X,V,O,N,K),ee="number"===typeof U?{width:U,height:U,fontSize:z?U/2:18}:{};let te;if("string"===typeof E&&x)te=r.createElement("img",{src:E,draggable:B,srcSet:F,onError:P,alt:D,crossOrigin:R});else if($)te=E;else if(z)te=z;else if(m||1!==i){const e="scale(".concat(i,")"),t={msTransform:e,WebkitTransform:e,transform:e};te=r.createElement(s.A,{onResize:C},r.createElement("span",{className:"".concat(H,"-string"),ref:f,style:Object.assign({},t)},L))}else te=r.createElement("span",{className:"".concat(H,"-string"),style:{opacity:0},ref:f},L);return delete M.onError,delete M.gap,Y(r.createElement("span",Object.assign({},M,{style:Object.assign(Object.assign(Object.assign(Object.assign({},ee),G),null===k||void 0===k?void 0:k.style),M.style),className:Z,ref:b}),te))};const S=r.forwardRef(b);var k=i(62149),w=i(12701),C=i(36282);const P=e=>{const{size:t,shape:i}=r.useContext(h),n=r.useMemo((()=>({size:e.size||t,shape:e.shape||i})),[e.size,e.shape,t,i]);return r.createElement(h.Provider,{value:n},e.children)},_=e=>{var t,i,n,s;const{getPrefixCls:o,direction:a}=r.useContext(c.QO),{prefixCls:u,className:p,rootClassName:h,style:m,maxCount:v,maxStyle:x,size:g,shape:y,maxPopoverPlacement:f,maxPopoverTrigger:A,children:b,max:_}=e;const T=o("avatar",u),I="".concat(T,"-group"),E=(0,d.A)(T),[F,z,O]=j(T,E),N=l()(I,{["".concat(I,"-rtl")]:"rtl"===a},O,E,p,h,z),D=(0,k.A)(b).map(((e,t)=>(0,w.Ob)(e,{key:"avatar-key-".concat(t)}))),B=(null===_||void 0===_?void 0:_.count)||v,L=D.length;if(B&&B<L){const e=D.slice(0,B),o=D.slice(B,L),a=(null===_||void 0===_?void 0:_.style)||x,c=(null===(t=null===_||void 0===_?void 0:_.popover)||void 0===t?void 0:t.trigger)||A||"hover",d=(null===(i=null===_||void 0===_?void 0:_.popover)||void 0===i?void 0:i.placement)||f||"top",u=Object.assign(Object.assign({content:o},null===_||void 0===_?void 0:_.popover),{classNames:{root:l()("".concat(I,"-popover"),null===(s=null===(n=null===_||void 0===_?void 0:_.popover)||void 0===n?void 0:n.classNames)||void 0===s?void 0:s.root)},placement:d,trigger:c});return e.push(r.createElement(C.A,Object.assign({key:"avatar-popover-key",destroyTooltipOnHide:!0},u),r.createElement(S,{style:a},"+".concat(L-B)))),F(r.createElement(P,{shape:y,size:g},r.createElement("div",{className:N,style:m},e)))}return F(r.createElement(P,{shape:y,size:g},r.createElement("div",{className:N,style:m},D)))},T=S;T.Group=_;const I=T},10446:(e,t,i)=>{var r=NaN,n="[object Symbol]",l=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt,d="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,u="object"==typeof self&&self&&self.Object===Object&&self,p=d||u||Function("return this")(),h=Object.prototype.toString,m=Math.max,v=Math.min,x=function(){return p.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&h.call(e)==n}(e))return r;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var i=o.test(e);return i||a.test(e)?c(e.slice(2),i?2:8):s.test(e)?r:+e}e.exports=function(e,t,i){var r,n,l,s,o,a,c=0,d=!1,u=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var i=r,l=n;return r=n=void 0,c=t,s=e.apply(l,i)}function f(e){var i=e-a;return void 0===a||i>=t||i<0||u&&e-c>=l}function j(){var e=x();if(f(e))return A(e);o=setTimeout(j,function(e){var i=t-(e-a);return u?v(i,l-(e-c)):i}(e))}function A(e){return o=void 0,p&&r?h(e):(r=n=void 0,s)}function b(){var e=x(),i=f(e);if(r=arguments,n=this,a=e,i){if(void 0===o)return function(e){return c=e,o=setTimeout(j,t),d?h(e):s}(a);if(u)return o=setTimeout(j,t),h(a)}return void 0===o&&(o=setTimeout(j,t)),s}return t=y(t)||0,g(i)&&(d=!!i.leading,l=(u="maxWait"in i)?m(y(i.maxWait)||0,t):l,p="trailing"in i?!!i.trailing:p),b.cancel=function(){void 0!==o&&clearTimeout(o),c=0,r=a=n=o=void 0},b.flush=function(){return void 0===o?s:A(x())},b}}}]);
2//# sourceMappingURL=345.d2169029.chunk.js.map

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.