PageSourceSearch

https://divinetalk.in/assets/OrderHistory-Clv5gNBY.js

js divinetalk.in collected 2026-10-01 16:41:47 UTC 48,537 bytes, 9 lines download raw bytes

vendor: 4,961 bytes, line 1
1import{j as s,P as L,Q as A,T as K,A as N,V as D,r as f,u as le,t as C,W as ye,X as Z,Y as de,Z as ue,$ as me,N as we,L as be,p as je}from"./index-CjBBelq3.js";import{c as I}from"./copyToClipboard-DNep3Ioy.js";const he=6048e5,ve=864e5,ee=Symbol.for("constructDateFrom");function O(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ee in e?e[ee](t):e instanceof Date?new e.constructor(t):new Date(t)}function E(e,t){return O(t||e,e)}let Ne={};function B(){return Ne}function H(e,t){var l,g,d,u;const r=B(),n=(t==null?void 0:t.weekStartsOn)??((g=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=E(e,t==null?void 0:t.in),o=a.getDay(),i=(o<n?7:0)+o-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function Y(e,t){return H(e,{...t,weekStartsOn:1})}function fe(e,t){const r=E(e,t==null?void 0:t.in),n=r.getFullYear(),a=O(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=Y(a),i=O(r,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const l=Y(i);return r.getTime()>=o.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function te(e){const t=E(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Ee(e,...t){const r=O.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function re(e,t){const r=E(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function Se(e,t,r){const[n,a]=Ee(r==null?void 0:r.in,e,t),o=re(n),i=re(a),l=+o-te(o),g=+i-te(i);return Math.round((l-g)/ve)}function De(e,t){const r=fe(e,t),n=O(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Y(n)}function Oe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Pe(e){return!(!Oe(e)&&typeof e!="number"||isNaN(+E(e)))}function Me(e,t){const r=E(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const Ce={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ke=(e,t,r)=>{let n;const a=Ce[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function G(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const _e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Fe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},He={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},We={date:G({formats:_e,defaultWidth:"full"}),time:G({formats:Fe,defaultWidth:"full"}),dateTime:G({formats:He,defaultWidth:"full"})},Te={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ye=(e,t,r,n)=>Te[e];function k(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):i;a=e.formattingValues[l]||e.formattingValues[i]}else{const i=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}const Le={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ae={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ie={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Be={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"]},Re={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ge=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},$e={ordinalNumber:Ge,era:k({values:Le,defaultWidth:"wide"}),quarter:k({values:Ae,defaultWidth:"wide",argumentCallback:e=>e-1}),month:k({values:Ie,defaultWidth:"wide"}),day:k({values:Be,defaultWidth:"wide"}),dayPeriod:k({values:Re,defaultWidth:"wide",formattingValues:qe,defaultFormattingWidth:"wide"})};function _(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const i=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],g=Array.isArray(l)?Xe(l,c=>c.test(i)):Qe(l,c=>c.test(i));let d;d=e.valueCallback?e.valueCallback(g):g,d=r.valueCallback?r.valueCallback(d):d;const u=t.slice(i.length);return{value:d,rest:u}}}function Qe(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Xe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Ve(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const l=t.slice(a.length);return{value:i,rest:l}}}const Ue=/^(\d+)(th|st|nd|rd)?/i,Je=/\d+/i,ze={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ke={any:[/^b/i,/^(a|c)/i]},Ze={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},et={any:[/1/i,/2/i,/3/i,/4/i]},tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},st={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},at={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ot={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},it={ordinalNumber:Ve({matchPattern:Ue,parsePattern:Je,valueCallback:e=>parseInt(e,10)}),era:_({matchPatterns:ze,defaultMatchWidth:"wide",parsePatterns:Ke,defaultParseWidth:"any"}),quarter:_({matchPatterns:Ze,defaultMatchWidth:"wide",parsePatterns:et,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_({matchPatterns:tt,defaultMatchWidth:"wide",parsePatterns:rt,defaultParseWidth:"any"}),day:_({matchPatterns:nt,defaultMatchWidth:"wide",parsePatterns:st,defaultParseWidth:"any"}),dayPeriod:_({matchPatterns:at,defaultMatchWidth:"any",parsePatterns:ot,defaultParseWidth:"any"})},ct={code:"en-US",formatDistance:ke,formatLong:We,formatRelative:Ye,localize:$e,match:it,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lt(e,t){const r=E(e,t==null?void 0:t.in);return Se(r,Me(r))+1}function dt(e,t){const r=E(e,t==null?void 0:t.in),n=+Y(r)-+De(r);return Math.round(n/he)+1}function ge(e,t){var u,c,p,w;const r=E(e,t==null?void 0:t.in),n=r.getFullYear(),a=B(),o=(t==null?void 0:t.firstWeekContainsDate)??((c=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??a.firstWeekContainsDate??((w=(p=a.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??1,i=O((t==null?void 0:t.in)||e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const l=H(i,t),g=O((t==null?void 0:t.in)||e,0);g.setFullYear(n,0,o),g.setHours(0,0,0,0);const d=H(g,t);return+r>=+l?n+1:+r>=+d?n:n-1}function ut(e,t){var l,g,d,u;const r=B(),n=(t==null?void 0:t.firstWeekContainsDate)??((g=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:g.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,a=ge(e,t),o=O((t==null?void 0:t.in)||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),H(o,t)}function mt(e,t){const r=E(e,t==null?void 0:t.in),n=+H(r,t)-+ut(r,t);return Math.round(n/he)+1}function b(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const S={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return b(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):b(r+1,2)},d(e,t){return b(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return b(e.getHours()%12||12,t.length)},H(e,t){return b(e.getHours(),t.length)},m(e,t){return b(e.getMinutes(),t.length)},s(e,t){return b(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return b(a,t.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ne={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return S.y(e,t)},Y:function(e,t,r,n){const a=ge(e,n),o=a>0?a:1-a;if(t==="YY"){const i=o%100;return b(i,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):b(o,t.length)},R:function(e,t){const r=fe(e);return b(r,t.length)},u:function(e,t){const r=e.getFullYear();return b(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return b(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return b(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return S.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return b(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=mt(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):b(a,t.length)},I:function(e,t,r){const n=dt(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):b(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):S.d(e,t)},D:function(e,t,r){const n=lt(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):b(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return b(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return b(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return b(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=M.noon:n===0?a=M.midnight:a=n/12>
vendor: 4,366 bytes, line 1
1=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=M.evening:n>=12?a=M.afternoon:n>=4?a=M.morning:a=M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return S.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):S.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):b(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):b(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):S.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):S.s(e,t)},S:function(e,t){return S.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return ae(n);case"XXXX":case"XX":return P(n);case"XXXXX":case"XXX":default:return P(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return ae(n);case"xxxx":case"xx":return P(n);case"xxxxx":case"xxx":default:return P(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+se(n,":");case"OOOO":default:return"GMT"+P(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+se(n,":");case"zzzz":default:return"GMT"+P(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return b(n,t.length)},T:function(e,t,r){return b(+e,t.length)}};function se(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return o===0?r+String(a):r+String(a)+t+b(o,2)}function ae(e,t){return e%60===0?(e>0?"-":"+")+b(Math.abs(e)/60,2):P(e,t)}function P(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=b(Math.trunc(n/60),2),o=b(n%60,2);return r+a+t+o}const oe=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},xe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ht=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return oe(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",oe(n,t)).replace("{{time}}",xe(a,t))},ft={p:xe,P:ht},gt=/^D+$/,xt=/^Y+$/,pt=["D","DD","YY","YYYY"];function yt(e){return gt.test(e)}function wt(e){return xt.test(e)}function bt(e,t,r){const n=jt(e,t,r);if(console.warn(n),pt.includes(e))throw new RangeError(n)}function jt(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Nt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Et=/^'([^]*?)'?$/,St=/''/g,Dt=/[a-zA-Z]/;function $(e,t,r){var u,c,p,w;const n=B(),a=n.locale??ct,o=n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=n.weekStartsOn??((w=(p=n.locale)==null?void 0:p.options)==null?void 0:w.weekStartsOn)??0,l=E(e,r==null?void 0:r.in);if(!Pe(l))throw new RangeError("Invalid time value");let g=t.match(Nt).map(h=>{const m=h[0];if(m==="p"||m==="P"){const y=ft[m];return y(h,a.formatLong)}return h}).join("").match(vt).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const m=h[0];if(m==="'")return{isToken:!1,value:Ot(h)};if(ne[m])return{isToken:!0,value:h};
1if(m.match(Dt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:h}});a.localize.preprocessor&&(g=a.localize.preprocessor(l,g));const d={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return g.map(h=>{if(!h.isToken)return h.value;const m=h.value;(wt(m)||yt(m))&&bt(m,t,String(e));const y=ne[m[0]];return y(l,m,a.localize,d)}).join("")}function Ot(e){const t=e.match(Et);return t?t[1].replace(St,"'"):e}const ie=e=>{if(!e)return"text-gray-900";const t=e.toString().toLowerCase();return t==="completed"?"text-[#35BA80]":t==="pending"?"text-red-500":t==="failed"?"text-red-600":"text-gray-900"},Pt=e=>{if(!e)return null;const t=e.toString().toLowerCase();return t==="pending"?s.jsx(K,{className:"w-5 h-5"}):t==="failed"?s.jsx(K,{className:"w-5 h-5"}):null},Mt=({data:e={},onDownload:t=()=>{}})=>{var p,w;const r=e.status??null,n=e.transaction_type??null,a=e.amount??"",o=e.order_id??null,i=e.created_at?(()=>{try{return $(new Date(e.created_at),"dd MMM yy, hh:mm a")}catch{return""}})():"",l=n===1&&o===null&&!["pending","failed"].includes((r??"").toString().toLowerCase()),g=Pt(r),d=ie(r),u=e.text?e.text.charAt(0).toUpperCase()+e.text.slice(1):"Na",c=(w=(p=e.get_order)==null?void 0:p.get_astrologer)!=null&&w.name?e.get_order.get_astrologer.name.charAt(0).toUpperCase()+e.get_order.get_astrologer.name.slice(1):null;return s.jsxs("div",{className:"flex justify-between gap-1 w-full px-4 py-2 rounded-[10px] border-[1px] border-[#0E23391A] bg-white",children:[s.jsxs("div",{className:"space-y-2 flex-1",children:[s.jsxs("p",{className:"text-base font-medium text-gray-900",children:[u," ",c&&s.jsx("span",{className:"text-base font-medium",children:`with ${c}`})]}),s.jsx("p",{className:"text-[12px] font-normal text-gray-500",children:i}),o&&s.jsxs("button",{type:"button",onClick:()=>{I(o)},className:"text-[12px] font-normal text-start break-all inline-flex items-center gap-2 group",children:[s.jsxs("span",{className:"text-base mr-2",children:["#",o]}),s.jsx(L,{size:16,className:"transition-colors group-hover:text-green-600"})]})]}),s.jsxs("div",{className:"flex flex-col justify-between items-end",children:[r==="completed"||r===null?n===1?s.jsx("div",{className:`text-xl font-semibold ${d}`,children:`+ ₹${a}`}):s.jsx("div",{className:"text-xl font-semibold text-[#EF5862]",children:`- ₹${a}`}):s.jsxs("div",{className:"flex items-center gap-2",children:[g&&s.jsx("span",{className:ie(r),children:g}),s.jsx("div",{className:"text-xl font-semibold text-[#EF5862]",children:`₹${a}`})]}),l&&s.jsx("div",{className:"mt-3 text-right",children:s.jsxs("button",{type:"button",onClick:()=>t(e==null?void 0:e.id),className:"flex items-center gap-2 text-gray-700 border border-gray-500 px-3 py-1 rounded-full md:rounded-md hover:bg-gray-100",children:[s.jsx(A,{size:14}),s.jsx("span",{className:"text-sm font-medium",children:"Invoice"})]})})]})]})},Q=async(e,t)=>{var r;try{const n=await N.getInvoice({orderId:e,moduleName:t});(r=n==null?void 0:n.data)!=null&&r.link?window.open(n.data.link,"_blank"):D.error("Invoice not available")}catch(n){D.error("Failed to download"),console.error("Error",n)}},Ct=()=>{const[e,t]=f.useState([]),[r,n]=f.useState([]),[a,o]=f.useState(1),[i,l]=f.useState(!1),[g,d]=f.useState(!0),u=async m=>{if(g){l(!0);try{const y={type:8,page:m},x=await N.orderHistory(y);x&&x.data.wallet_transaction_list.length>0?(t(j=>[...j,...x.data.wallet_transaction_list]),x&&n(x.data.wallet_balance),o(m)):d(!1)}catch(y){console.error("Error fetching order history:",y)}finally{l(!1)}}};f.useEffect(()=>{u(1)},[]),f.useEffect(()=>{const m=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight-10&&!i&&u(a+1)};return window.addEventListener("scroll",m),()=>window.removeEventListener("scroll",m)},[a,i]);const c=async m=>{try{await navigator.clipboard.writeText(m),D.success("Copied to clipboard")}catch{D.error("Failed to copy")}},p=m=>{Q(m,"recharge")},w=le(),h=()=>{w("/wallet")};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between mb-2 items-center",children:[s.jsxs("div",{className:"font-medium text-base",children:["Available Balance :",s.jsxs("span",{className:"text-[#EF5862]",children:[" ₹",r," "]})]}),s.jsx("div",{children:s.jsx("button",{className:"bg-[#EF5862] text-white py-2 px-4 roun
1ded-full md:rounded-lg ",onClick:h,children:"Recharge"})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:px-auto gap-3 md:grid-cols-2 lg:grid-cols-2 lg:gap-8 2xl:gap-8",children:[e.map((m,y)=>s.jsx(Mt,{index:y,data:m,onCopy:c,onDownload:p},m.id)),i&&s.jsx("p",{className:"text-center text-gray-500",children:"Loading more..."}),!g&&s.jsx("p",{className:"text-center text-gray-400",children:"No more transactions"})]}),s.jsx(C,{position:"top-center",autoClose:2e3})]})};var T={exports:{}},kt=T.exports,ce;function _t(){return ce||(ce=1,function(e,t){(function(r,n){e.exports=n()})(kt,()=>(()=>{var r={d:(h,m)=>{for(var y in m)r.o(m,y)&&!r.o(h,y)&&Object.defineProperty(h,y,{enumerable:!0,get:m[y]})},o:(h,m)=>Object.prototype.hasOwnProperty.call(h,m)},n={};r.d(n,{default:()=>w});const a=(...h)=>{},o=h=>h!==null&&(h==null?void 0:h.constructor.name)==="Object";let i,l;const g=()=>{if(!i){i=!0;try{l=c.storage||localStorage,l.getItem("")}catch{l=(()=>{const h={getItem:y=>m[y]||null,setItem:(y,x)=>{m[y]=x},removeItem:y=>{m[y]=void 0},clear:()=>{m={__proto__:h}}};let m={__proto__:h};return m})()}p()}},d="\0",u=(h,m,y=!0)=>y?[...JSON.stringify(h)].map(x=>
1String.fromCharCode(x.charCodeAt(0)+m)).join(""):JSON.parse([...h].map(x=>String.fromCharCode(x.charCodeAt(0)-m)).join("")),c={ttl:null,encrypt:!1,encrypter:u,decrypter:(h,m)=>u(h,m,!1),secret:75,storage:void 0};Object.seal(c);const p=(h=!1)=>{g();for(const m of Object.keys(l)){const y=l.getItem(m);let x;try{x=JSON.parse(y||"")}catch{continue}o(x)&&d in x&&(Date.now()>x.ttl||h)&&l.removeItem(m)}},w={config:c,set:(h,m,y={})=>{g();const x={...c,...y,encrypt:y.encrypt!==!1&&(y.encrypt||c.encrypt),ttl:y.ttl===null?null:y.ttl||c.ttl};try{const j=x.ttl&&!isNaN(x.ttl)&&x.ttl>0;let v=j?{[d]:m,ttl:Date.now()+1e3*x.ttl}:m;x.encrypt&&(j?v[d]=(x.encrypter||a)(v[d],x.secret):v=(x.encrypter||a)(v,x.secret)),l.setItem(h,JSON.stringify(v))}catch{return!1}},get:(h,m={})=>{g();const y=l.getItem(h),x={...c,...m,encrypt:m.encrypt!==!1&&(m.encrypt||c.encrypt),ttl:m.ttl===null?null:m.ttl||c.ttl};let j,v;try{j=JSON.parse(y||""),v=o(j)&&d in j,(x.decrypt||x.encrypt)&&(v?j[d]=(x.decrypter||a)(j[d],x.secret):j=(x.decrypter||a)(j,x.secret))}catch{}return v?Date.now()>j.ttl?(l.removeItem(h),null):j[d]:j!==void 0?j:y},flush:p,clear:()=>{g(),l.clear()},remove:h=>{g(),l.removeItem(h)}};return n.default})())}(T)),T.exports}var Ft=_t();const F=ye(Ft),R=({data:e,orderType:t})=>{var p,w,h,m,y;const r=le(),[n,a]=f.useState(!1),[o,i]=f.useState(null),l=x=>{Q(x,"service")},g=x=>new Date(x).toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"}),d=()=>{r("/HistoryCustomerChat",{state:{orderData:e}})},u=async x=>{var j,v,X,V,U;i(x),a(!0);try{const q={name:(j=F.get("userData"))==null?void 0:j.name,location:(v=F.get("userData"))==null?void 0:v.place_of_birth,customerId:String((X=F.get("userData"))==null?void 0:X.id),email:(V=F.get("userData"))==null?void 0:V.email,contactNumber:String((U=F.get("userData"))==null?void 0:U.phone_no),clientId:"41046643-acf2-40ea-a794-36ce41edda1c"},J=await N.customer(q);if(J.statusCode===201){const pe={customerId:J.data.customerId,clientId:"41046643-acf2-40ea-a794-36ce41edda1c",orderId:String(x)||"",status:"OPEN"},z=await N.ticket(pe);z.statusCode===201?r("/customersupportchat",{state:{ticketdata:z.data}}):alert("Failed to start chat. Please try again later.")}else alert("Failed to start chat. Please try again later.")}catch(q){console.error("Chat initiation error:",q),alert("An unexpected error occurred while trying to start chat.")}finally{a(!1),i(null)}};return s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx("p",{className:"bg-[#EBEBEB] inline-flex mx-auto px-3 py-2 rounded-[10px]",children:g(e.date)}),s.jsxs("div",{className:"flex justify-between w-full border border-[#0E23391A] rounded-[20px] p-4",children:[s.jsxs("div",{className:"flex gap-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("img",{className:"h-16 w-16 min-w-16 min-h-16 lg:h-[84px] lg:w-[84px] rounded-full border border-[#0E233933]",src:e!=null&&e.astrologer_image?"https://divineprod.s3.ap-south-1.amazonaws.com/"+e.astrologer_image:Z,alt:"img",onError:x=>{x.target.onerror=null,x.target.src=Z}}),s.jsx("p",{className:"flex justify-start gap-1",children:Array.from({length:e.astrologer_rating},(x,j)=>s.jsx("img",{className:"h-3 w-3",src:de,alt:"star"},j))})]}),s.jsxs("div",{className:"space-y-2 mr-4",children:[s.jsx("p",{className:"font-medium text-base md:text-xl",children:e==null?void 0:e.astrologer_name}),s.jsx("p",{className:"font-normal text-[10px] md:text-sm",children:e.date}),s.jsx("p",{className:"font-normal text-[10px] md:text-sm text-[#35BA80]",children:e.status}),(e==null?void 0:e.gift_name)=="Flowers"&&s.jsxs("p",{className:"font-normal text-[10px] md:text-sm",children:["Gift Name: ",e.gift_name]}),s.jsx("p",{className:"font-normal text-[10px] md:text-sm",children:(e==null?void 0:e.gift_name)=="Flowers"?`Gift Price: ₹${e.price}`:`Rate: ₹${e.rate}`}),(e==null?void 0:e.gift_name)=="Flowers"?s.jsxs("p",{className:"font-normal text-[10px] md:text-sm",children:["Quantity: ",e.count]}):s.jsxs("p",{className:"font-normal text-[10px] md:text-sm",children:["Duration: ",e.duration]}),s.jsxs("p",{className:"font-normal text-[10px] md:text-sm",children:["Deduction: ₹",e.deduction]}),s.jsxs("button",{className:"font-normal text-[10px] md:text-sm break-all text-start hover:text-gray-700",onClick:()=>{var x;return I((x=e==null?void 0:e.order_details)==null?void 0:x.order_id)},children:["#",(p=e==null?void 0:e.order_details)==null?void 0:p.order_id,s.jsx(L,{className:"inline-flex text-[10px] md:text-base ml-2"})]})]})]}),s.jsxs("div",{className:"flex flex-col justify-between items-end",children:[s.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[s.jsx("button",{className:`font-normal text-[10px] md:text-xs py-1 px-2 border rounded-full md:rounded-lg 
2              ${n&&o===((w=e==null?void 0:e.order_details)==null?void 0:w.id)?"text-gray-400 border-gray-400 cursor-not-allowed":"text-[#EF5862] border-[#
2EF5862]"}`,onClick:()=>{var x;n||u((x=e==null?void 0:e.order_details)==null?void 0:x.id)},disabled:n&&o===((h=e==null?void 0:e.order_details)==null?void 0:h.id),children:n&&o===((m=e==null?void 0:e.order_details)==null?void 0:m.id)?"Starting...":"Help ?"}),s.jsxs("button",{className:"flex items-center gap-1 font-normal text-[10px] md:text-xs py-1 px-[10px] border border-[#0E2339] rounded-full md:rounded-lg",onClick:()=>{var x;return l((x=e==null?void 0:e.order_details)==null?void 0:x.id)},children:[s.jsx(A,{className:"text-[10px] md:text-base"}),"Invoice"]})]}),[7,3,5,4].includes((y=e==null?void 0:e.order_details)==null?void 0:y.product_type)?null:s.jsx("button",{className:`font-semibold text-xs md:text-sm bg-[#EF5862] text-white py-2 px-4 rounded-full md:rounded-lg text-nowrap ${t?"block":"hidden"}`,onClick:d,children:t===10||t===2?"View Chat":t===9?"Donate Again":""})]})]})]})},W="/notAvailable.webp",Ht=({data:e})=>{var o,i,l,g,d,u,c,p,w;const t="https://divineprod.s3.ap-south-1.amazonaws.com/",r=h=>{I(h)},n=h=>{Q(h,"service")},a=h=>new Date(h).toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"});return s.jsx(s.Fragment,{children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx("p",{className:"bg-[#EBEBEB] inline-flex mx-auto px-3 py-2 rounded-[10px]",children:a(e==null?void 0:e.created_at)}),s.jsxs("div",{className:"flex justify-between w-full border border-[#0E23391A] rounded-[20px] p-4",children:[s.jsxs("div",{className:"flex gap-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("img",{className:"h-16 w-16 min-w-16 lg:h-[84px] lg:w-[84px] lg:min-w-[84px] rounded-lg border border-[#0E233933]",src:(i=(o=e==null?void 0:e.order)==null?void 0:o.get_product)!=null&&i.image?t+((g=(l=e==null?void 0:e.order)==null?void 0:l.get_product)==null?void 0:g.image):W,alt:"img"}),s.jsx("p",{children:e.astrologer_rating})]}),s.jsxs("div",{className:"space-y-2 mr-4",children:[s.jsx("p",{className:"font-medium text-base md:text-xl",children:((u=(d=e==null?void 0:e.order)==null?void 0:d.get_product)==null?void 0:u.name)||"N/A"}),s.jsx("p",{className:"font-normal text-[10px] md:text-sm",children:e.created_at?$(new Date(e.created_at),"dd MMM yy, hh:mm aa"):""}),s.jsx("p",{className:"font-normal text-[10px] md:text-sm text-[#35BA80]",children:e.status=="completed"?e.status:e.delivery_text||"N/A"}),s.jsxs("p",{className:"font-normal text-[10px] md:text-sm",children:["Price
2: ₹",((c=e==null?void 0:e.order.get_product)==null?void 0:c.price)||"N/A"]}),s.jsxs("p",{className:"font-normal text-[10px] md:text-sm",children:["Quantity: ",((p=e==null?void 0:e.order)==null?void 0:p.quantity)||"N/A"]}),s.jsxs("button",{className:`font-normal text-[10px] md:text-sm break-all text-start\r
3                 hover:text-slate-700`,onClick:()=>{var h;return r((h=e==null?void 0:e.order)==null?void 0:h.order_id)},children:["#",((w=e==null?void 0:e.order)==null?void 0:w.order_id)||"N/A",s.jsx(L,{className:"inline-flex ml-3 text-[10px] md:text-sm"})]})]})]}),s.jsxs("div",{className:"flex flex-col items-end justify-between",children:[s.jsx(ue,{className:"w-5 h-5 text-[#0E233980]"}),s.jsx("div",{className:"flex flex-col justify-between items-end",children:s.jsxs("div",{className:"flex flex-col gap-4 items-end",children:[s.jsx("button",{className:"font-normal text-[10px] md:text-xs py-1 px-2 text-[#EF5862] border border-[#EF5862] rounded-full md:rounded-lg",children:"Help ?"}),s.jsxs("button",{className:"flex items-center gap-1 font-normal text-[10px] md:text-xs py-1 px-[10px] border border-[#0E2339] rounded-full md:rounded-lg",onClick:()=>n(e==null?void 0:e.order_id),children:[s.jsx(A,{size:16}),"Invoice"]})]})})]}),s.jsx(C,{position:"top-center",autoClose:2e3})]})]})})},Wt=({data:e})=>{var n,a,o,i;const t="https://divineprod.s3.ap-south-1.amazonaws.com/",r=l=>new Date(l).toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"});return s.jsx(s.Fragment,{children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx("p",{className:"bg-[#EBEBEB] inline-flex mx-auto px-3 py-2 rounded-[10px]",children:r(e.created_at)}),s.jsxs("div",{className:"flex justify-between w-full border border-[#0E23391A] rounded-[20px] p-4",children:[s.jsxs("div",{className:"flex gap-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("img",{className:"h-[84px] w-[84px] min-w-[84px] rounded-lg border border-[#0E233933]",src:e!=null&&e.get_new_product_details?t+((n=e==null?void 0:e.get_new_product_details)==null?void 0:n.image):W,alt:"img",onError:l=>{l.target.onError=null,l.target.src=W}}),s.jsx("p",{children:e.astrologer_rating})]}),s.jsxs("div",{className:"space-y-2 mr-4",children:[s.jsx("p",{className:"font-semibold md:font-medium text-base md:text-xl",children:((a=e==null?void 0:e.get_new_product_details)==null?void 0:a.name)||"N/A"}),s.jsxs("p",{className:"font-normal text-xs md:text-sm ",children:["By ",(o=e==null?void 0:e.get_astrologer)==null?void 0:o.name]}),s.jsx("p",{className:"font-normal text-xs md:text-sm",children:e.created_at?$(new Date(e.created_at),"dd MMM yy, hh:mm aa"):""}),s.jsxs("p",{className:"font-normal text-xs md:text-sm",children:["₹",((i=e==null?void 0:e.get_new_product_details)==null?void 0:i.price)||"N/A"]})]})]}),s.jsxs("div",{className:"flex flex-col justify-between items-end",children:[s.jsx(ue,{className:"w-5 h-5 text-[#0E233980]"}),s.jsx("button",{className:"font-normal text-xs py-2 px-4 text-white text-nowrap bg-[#35BA80] rounded-[10px]",children:"Book Now"})]})]})]})})},Tt=()=>{const[e,t]=f.useState([]),[r,n]=f.useState(1),[a,o]=f.useState(!1),[i,l]=f.useState(!0),g=async d=>{if(i){o(!0);try{const u={type:10,page:d},c=await N.getSuggestedRemedies(u);c&&c.status_code==200?(t(p=>[...p,...c.data]),n(d)):l(!1)}catch(u){console.error("Error fetching order history:",u)}finally{o(!1)}}};return f.useEffect(()=>{g(1)},[]),f.useEffect(()=>{const d=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight-10&&!a&&g(r+1)};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[r,a]),s.jsxs("div",{className:"grid grid-cols-1 lg:px-auto gap-3 md:grid-cols-2 lg:grid-cols-2 lg:gap-8 2xl:gap-8",children:[e.map((d,u)=>s.jsx(Wt,{data:d},u)),a&&s.jsx("p",{className:"text-center text-gray-500",children:"Loading more..."}),!i&&s.jsx("p",{className:"text-center text-gray-400",children:"No more transactions"})]})},Yt=()=>{const[e,t]=f.useState([]),[r,n]=f.useState(1),[a,o]=f.useState(!1),[i,l]=f.useState(!0);console.log(e);const g=async d=>{if(i){o(!0);try{const u={page:d},c=await N.getPurchasedRemedies(u);c&&c.status_code==200?(t(p=>[...p,...c.data]),n(d)):l(!1)}catch(u){console.error("Error fetching order history:",u)}finally{o(!1)}}};return f.useEffect(()=>{g(1)},[]),f.useEffect(()=>{const d=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight-10&&!a&&g(r+1)};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[r,a]),s.jsxs("div",{className:"grid grid-cols-1 lg:px-auto gap-3 md:grid-cols-2 lg:grid-cols-2 lg:gap-8 2xl:gap-8",children:[e.map((d,u)=>s.jsx(Ht,{data:d},u)),a&&s.jsx("p",{className:"text-center text-gray-500",children:"Loading more..."}),!i&&s.jsx("p",{className:"text-center text-gray-400",children:"No more transactions"})]})},Lt=()=>{const[e,t]=f.useState("suggested");return s.jsxs(s.Fragment,{children:[s.jsx("button",{className:`rounded-[20px] mr-4 py-1 px-4 border hover:border-red-300 hover:text-red-300 
4            ${e==="suggested"?"text-[#EF5862] border-[#EF5862] bg-[#FEE6E5]":""}`,onClick:()=>t("suggested"),children:"Suggested"}),s.jsx("button",{className:`rounded-[20px] mr-4 py-1 px-4 border hover:border-red-300 hover:text-red-300 
5            ${e==="purchased"?"text-[#EF5862] border-[#EF5862] bg-[#FEE6E5]":""}`,onClick:()=>t("purchased"),children:"Purchased"}),s.jsxs("div",{className:"mt-4",children:[e==="suggested"&&s.jsx(Tt,{}),e==="purchased"&&s.jsx(Yt,{})]})]})},At=({data:e,orderType:t})=>{var a,o;const r="https://divineprod.s3.ap-south-1.amazonaws.com/",n=i=>new Date(i).toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"});return s.jsx(s.Fragment,{children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx("p",{className:"bg-[#EBEBEB] inline-flex mx-auto px-3 py-2 rounded-[10px]",children:n(e==null?void 0:e.created_at)}),s.jsxs("div",{className:"flex justify-between w-full border border-[#0E23391A] rounded-[20px] p-4",children:[s.jsxs("div",{className:"flex gap-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("img",{className:"h-16 w-16 min-w-16 lg:h-[84px] lg:w-[84px] lg:min-w-[84px] rounded-lg border border-[#0E233933]",src:e!=null&&e.astrologer_image?r+e.astrologer_image:W,alt:"img",onError:i=>{i.target.onError=null,i.target.src=W}}),s.jsx("p",{className:"flex justify-start gap-1",children:Array.from({length:e.astrologer_rating},(i,l)=>s.jsx("img",{className:"h-3 w-3",src:de,alt:"s"},l))})]}),s.jsxs("div",{className:"space-y-2 mr-2",children:[s.jsxs("p",{className:"font-medium text-xl",children:[((a=e==null?void 0:e.get_donation)==null?void 0:a.donation_name)&&s.jsxs("span",{className:"text-base",children:["Good Deeds - ",(o=e==null?void 0:e.get_donation)==null?void 0:o.donation_name]}),e==null?void 0:e.astrologer_name]}),s.jsx("p",{className:"font-normal text-sm",children:e.date}),s.jsx("p",{className:"font-normal text-sm text-[#35BA80]",children:e.status}),s.jsxs("p",{className:"font-normal text-sm",children:["Donated: ₹",e==null?void 0:e.amount]}),s.jsxs("button",{className:"font-normal text-sm break-all text-start hover:text-slate-700",onClick:()=>I(e==null?void 0:e.order_id),children:["#",e==null?void 0:e.order_id,s.jsx(L,{className:"inline-flex",size:16})]})]})]}),s.jsxs("div",{className:"flex flex-col justify-between items-end",children:[s.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[s.jsx("button",{className:"font-normal text-xs py-1 px-2 text-[#EF5862] border border-[#EF5862] rounded-lg",children:"Help ?"}),s.jsxs("button",{className:"flex items-center gap-1 font-normal text-xs py-1 px-[10px] border border-[#0E2339] rounded-lg",children:[s.jsx(A,{size:20}),"Invoice"]})]}),s.jsx("button",{className:`font-semibold text-sm bg-[#EF5862] text-white py-2 px-4 rounded-lg text-nowrap ${t?"block":"hidden"}`,children:t===10||t===2?"View Chat":t===9?"Donate Again":" "})]})]})]})})},It=()=>{const[e,t]=f.useState([]),r=9,[n,a]=f.useState(1),[o,i]=f.useState(!1),[l,g]=f.useState(!0),d=async u=>{if(l){i(!0);try{const c={type:r,page:u},p=await N.orderHistory(c);p&&p.data.length>0?(t(w=>[...w,...p.data]),a(u)):g(!1)}catch(c){console.error("Error fetching order history:",c)}finally{i(!1)}}};return f.useEffect(()=>{d(1)},[]),f.useEffect(()=>{const u=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight-10&&!o&&d(n+1)};return window.addEventListener("scroll",u),()=>window.removeEventListener("scroll",u)},[n,o]),s.jsxs("div",{className:"grid grid-cols-1 lg:px-auto gap-3 md:grid-cols-2 lg:grid-cols-2 lg:gap-8 2xl:gap-8",children:[e.length>0?e.map((u,c)=>s.jsx(At,{data:u,orderType:r},c)):s.jsx("div",{className:"col-span-full text-center text-gray-500",children:"No Data Available"}),s.jsx(C,{position:"top-center",autoClose:2e3})]})},Bt=()=>{const[e,t]=f.useState([]),r=10,[n,a]=f.useState(1),[o,i]=f.useState(!1),[l,g]=f.useState(!0),d=async c=>{if(l){i(!0);try{const p={type:r,page:c},w=await N.orderHistory(p);w&&w.data.length>0?(t(h=>[...h,...w.data]),a(c)):g(!1)}catch(p){console.error("Error fetching order history:",p)}finally{i(!1)}}};f.useEffect(()=>{d(1)},[]),f.useEffect(()=>{const c=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight-10&&!o&&d(n+1)};return window.addEventListener("scroll",c),()=>window.removeEventListener("scroll",c)},[n,o]);const u=async c=>{try{await navigator.clipboard.writeText(c),D.success("Copied to Clipboard")}catch{D.error("Failed to Copy")}};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 lg:px-auto gap-3 md:grid-cols-2 lg:grid-cols-2 lg:gap-8 2xl:gap-8",children:[e.map((c,p)=>s.jsx(R,{data:c,orderType:r,onCopy:u},p)),o&&s.jsx("p",{className:"text-center text-gray-500",children:"Loading..."}),!l&&s.jsx("p",{className:"text-center text-gray-400",children:"No more transactions"})]}),s.jsx(C,{position:"top-center",autoClose:2e3})]})},Rt=()=>{const[e,t]=f.useState([]),r=2,[n,a]=f.useState(1),[o,i]=f.useState(!1),[l,g]=f.useState(!0),d=async c=>{if(l){i(!0);try{const p={type:r,page:c},w=await N.orderHistory(p);w&&w.data.length>0?(t(h=>[...h,...w.data]),a(c)):g(!1)}catch(p){console.error("Error fetching order history:",p)}finally{i(!1)}}};f.useEffect(()=>{d(1)},[]),f.useEffect(()=>{const c=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight-10&&!o&&d(n+1)};return window.addEventListener("scroll",c),()=>window.removeEventListener("scroll",c)},[n,o]);const u=async c=>{try{await navigator.clipboard.writeText(c),D.success("Copied to Clipboard")}catch{D.error("Failed to Copy")}};return s.jsxs("div",{className:"grid grid-cols-1 lg:px-auto gap-3 md:grid-cols-2 lg:grid-cols-2 lg:gap-8 2xl:gap-8",children:[e.map((c,p)=>s.jsx(R,{data:c,orderType:r,onCopy:u},p)),o&&s.jsx("p",{className:"text-center text-gray-500",children:"Loading..."}),!l&&s.jsx("p",{className:"text-center text-gray-400",children:"No more transactions"}),s.jsx(C,{position:"top-center",autoClose:2e3})]})},qt=()=>{const[e,t]=f.useState([]),[r,n]=f.useState(1),[a,o]=f.useState(!1),[i,l]=f.useState(!0),g=1,d=async u=>
5{if(i){o(!0);try{const c={type:g,page:u},p=await N.orderHistory(c);p&&p.data.length>0?(t(w=>[...w,...p.data]),n(u)):l(!1)}catch(c){console.error("Error fetching order history:",c)}finally{o(!1)}}};return f.useEffect(()=>{d(1)},[]),f.useEffect(()=>{const u=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight-10&&!a&&d(r+1)};return window.addEventListener("scroll",u),()=>window.removeEventListener("scroll",u)},[r,a]),s.jsx("div",{className:"grid grid-cols-1 lg:px-auto gap-3 md:grid-cols-2 lg:grid-cols-2 lg:gap-8 2xl:gap-8",children:e.length>0?e.map((u,c)=>s.jsx(R,{data:u,orderType:!1},c)):s.jsx("div",{className:"col-span-full text-center text-gray-500",children:"No Data Available"})})},Gt=()=>{const[e,t]=f.useState([]),[r,n]=f.useState(1),[a,o]=f.useState(!1),[i,l]=f.useState(!0),g=async d=>{if(i){o(!0);try{const u={type:7,page:d},c=await N.orderHistory(u);c&&c.data.length>0?(t(p=>[...p,...c.data]),n(d)):l(!1)}catch(u){console.error("Error fetching order history:",u)}finally{o(!1)}}};return f.useEffect(()=>{g(1)},[]),f.useEffect(()=>{const d=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight-10&&!a&&g(r+1)};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[r,a]),s.jsxs("div",{className:"grid grid-cols-1 lg:px-auto gap-3 md:grid-cols-2 lg:grid-cols-2 lg:gap-8 2xl:gap-8",children:[e.map((d,u)=>s.jsx(R,{data:d},u)),a&&s.jsx("p",{className:"text-center text-gray-500",children:"Loading more..."}),!i&&s.jsx("p",{className:"text-center text-gray-400",children:"No more transactions"}),s.jsx(C,{position:"top-center",autoClose:2e3})]})},$t=()=>{const[e,t]=me(),r=e.get("sub")||"all",[n,a]=f.useState(r);return f.useEffect(()=>{if(e.get("sub")!==n){const i=new URLSearchParams(e);i.set("sub",n),t(i,{replace:!0})}},[n,e,t]),s.jsxs(s.Fragment,{children:[s.jsx("button",{className:`rounded-[20px] mr-4 py-1 px-4 border hover:border-red-300 hover:text-red-300 
6          ${n==="all"?"text-[#EF5862] border-[#EF5862] bg-[#FEE6E5]":""}`,onClick:()=>a("all"),children:"All"}),s.jsx("button",{className:`rounded-[20px] mr-4 py-1 px-4 border hover:border-red-300 hover:text-red-300 
7          ${n==="chat"?"text-[#EF5862] border-[#EF5862] bg-[#FEE6E5]":""}`,onClick:()=>a("chat"),children:"Chat"}),s.jsx("button",{className:`rounded-[20px] mr-4 py-1 px-4 border hover:border-red-300 hover:text-red-300 
8          ${n==="call"?"text-[#EF5862] border-[#EF5862] bg-[#FEE6E5]":""}`,onClick:()=>a("call"),children:"Call"}),s.jsx("button",{className:`rounded-[20px] mr-4 py-1 px-4 border hover:border-red-300 hover:text-red-300 
9          ${n==="gift"?"text-[#EF5862] border-[#EF5862] bg-[#FEE6E5]":""}`,onClick:()=>a("gift"),children:"Gift"}),s.jsxs("div",{className:"mt-4",children:[n==="all"&&s.jsx(Bt,{}),n==="chat"&&s.jsx(Rt,{}),n==="call"&&s.jsx(qt,{}),n==="gift"&&s.jsx(Gt,{})]})]})},Vt=()=>{const[e,t]=me(),r=e.get("main")||"wallet",[n,a]=f.useState(r);return f.useEffect(()=>{if(e.get("main")!==n){const i=new URLSearchParams(e);i.set("main",n),t(i,{replace:!0})}},[n,e,t]),s.jsxs(s.Fragment,{children:[s.jsx(we,{}),s.jsxs("section",{className:"mx-4 lg:mx-48",children:[s.jsxs("div",{className:"flex items-center gap-5 font-medium mt-5 lg:mt-8",children:[s.jsxs(be,{to:"/",children:[s.jsx("img",{src:je,alt:"home",className:"hidden md:inline-block"}),s.jsx("span",{className:"md:hidden text-[24px] font-light",children:"<"})]}),s.jsx("span",{className:"hidden md:inline-block",children:">"}),s.jsx("span",{className:"text-base md:text-[15px]",children:"Order History"})]}),s.jsxs("div",{className:"my-8",children:[s.jsxs("div",{className:"flex justify-between md:justify-start pb-2 mt-4 text-sm md:text-base w-full",children:[s.jsx("button",{className:`px-4 py-2 ${n==="wallet"?"border-b-2 border-black":""}`,onClick:()=>a("wallet"),children:"Wallet"}),s.jsx("button",{className:`px-4 py-2 ${n==="order"?"border-b-2 border-black":""}`,onClick:()=>a("order"),children:"Order"}),s.jsx("button",{className:`px-4 py-2 ${n==="remedies"?"border-b-2 border-black":""}`,onClick:()=>a("remedies"),children:"Remedies"}),s.jsx("button",{className:`px-4 py-2 ${n==="gooddeeds"?"border-b-2 border-black":""}`,onClick:()=>a("gooddeeds"),children:"Good Deeds"})]}),s.jsx("div",{className:"border-[0.5px] -mt-2.5"})]}),s.jsxs("div",{className:"mt-4",children:[n==="wallet"&&s.jsx(Ct,{}),n==="order"&&s.jsx($t,{}),n==="remedies"&&s.jsx(Lt,{}),n==="gooddeeds"&&s.jsx(It,{})]})]})]})};export{Vt as default};

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.