PageSourceSearch

https://bbcc.ai/build/assets/themepurchasehistory-DJQl-KCX.js

js bbcc.ai collected 2026-10-05 12:14:07 UTC 19,027 bytes, 96 lines download raw bytes

1import{u as X,r as l,j as e,b as ee,H as te,L as g}from"./app-DP13319Q.js";import{F as s,k as p,h as $,f as ae,aw as se,ap as z,ar as le,as as oe,at as ie,au as re,av as ne,ah as ce}from"./index-CtyZ6W6U.js";import{D as de}from"./DraggableMenu-Bk7Spryo.js";import{M as me}from"./react-tooltip.min-DW3XhwOj.js";/* empty css            */import"./index-DQkUn08L.js";function ye(){const{auth:F,template:a,purchases:d}=X().props,[c,y]=l.useState(!1),[C,P]=l.useState(!0),[b,S]=l.useState(d.current_page||1),[u,T]=l.useState(d.data),[m,w]=l.useState(d.current_page<d.last_page),j=l.useCallback(t=>{try{return new URL(t),!0}catch{return!1}},[]),x=l.useCallback(t=>{var r;return(r=t.split("?")[0].split(".").pop())==null?void 0:r.toLowerCase()},[]),h=l.useCallback(t=>t?["jpg","jpeg","png","gif","bmp","tiff","tif","webp","apng","svg","ico"].includes(t):!1,[]),M=l.useMemo(()=>a!=null&&a.image&&h(x(a.image))?e.jsx("style",{children:`
2                    .blur-bg {
3                        background: url('${a.user_id===0?"https://admin.ez3d.ai/":"https://ez.wiki/"}${a.image}') no-repeat center center;
4                        background-size: cover;
5                    }
6                `}):null,[a,x,h]),_=l.useMemo(()=>{var k;if(!a)return null;const t=((k=a.image.split(".").pop())==null?void 0:k.toLowerCase())||"",r=`${a.user_id===0?"https://admin.ez3d.ai/":"https://ez.wiki/"}${a.image}`,E=["jpg","jpeg","png","gif","bmp","tiff","tif","webp","apng","svg","ico"],R=["ppt","pptx","pdf","xls","xlsx","doc","docx","pages","ai","psd","eps","ttf","dxf","xps","rar","zip","ods","odt","odp"],D=/(?:youtube(?:-nocookie)?\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?/ ]{11})/i,V=/(?:https?:\/\/)?(?:www\.)?linkedin\.com\/(?:in|posts|company|feed|showcase|embed\/feed\/update\/urn:li:[^/]+:[^"&?/ ]+)/i,A=/^https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)(?:[?]?.*)$/im,H=/^(https?:\/\/)?(www\.)?fb\.watch\/[a-zA-Z0-9(\.\?)?]/,U=/^(https?:\/\/)?(www\.)?facebook\.com\/[a-zA-Z0-9(\.\?)?]/,q=/<iframe.*?src=["'](.*?)["'].*?>.*?<\/iframe>/is,Y=/<blockquote/,n=a.image.match(D),Z=a.image.match(V),f=a.image.match(A),W=a.image.match(H),G=a.image.match(U),O=a.image.match(q)||Y.test(a.image),J=new Blob([a.image],{type:"text/html"}),K=URL.createObjectURL(J);if(E.includes(t))return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
7                        .blur-overlay {
8                            position: fixed;
9                            top: 0;
10                            left: 0;
11                            width: 100%;
12                            height: 100%;
13                            backdrop-filter: blur(20px);
14                            z-index: -1;
15                        }
16                    `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("img",{src:r,alt:"Background",className:"absolute inset-0 max-w-full max-h-full m-auto z-0 rounded-lg",onError:i=>console.error("Image failed to load",i)},`image-${a.image}`)]});if(R.includes(t))return e.jsx("iframe",{src:`https://docs.google.com/viewer?url=${r}&embedded=true`,className:"fixed top-0 left-0 w-full h-full",frameBorder:"0",loading:"lazy",allow:"autoplay; fullscreen",allowFullScreen:!0,sandbox:"allow-scripts allow-same-origin",title:"Document Viewer",scrolling:"yes"},`doc-${a.image}`);if(O){const i=a.image.replace(/<(iframe|blockquote)([^>]*)\s(height|width|style)=["'][^"']*["']([^>]*)>/gi,'<$1$2$4 class="fixed top-0 left-0 w-full h-full" scrolling="yes">').replace(/class="([^"]*)"/g,'class="$1 absolute inset-0 m-auto"'),Q=/<(iframe|blockquote)[^>]*class="/i.test(i)?i:i.replace(/<(iframe|blockquote)/g,'<$1 scrolling="yes" class="absolute w-full h-full inset-0 m-auto"');return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
17                        .blur-overlay {
18                            position: fixed;
19                            top: 0;
20                            left: 0;
21                            width: 100%;
22                            height: 100%;
23                            backdrop-filter: blur(20px);
24                            z-index: -2;
25                        }
26                        .twitter-tweet {
27                            position: fixed;
28                            top: 0;
29                            left: 0;
30                            width: 100vw;
31                            height: 100vh;
32                            object-fit: cover;
33                            z-index: 0;
34                            border: none;
35                        }
36                    `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("div",{className:"fixed top-0 left-0 w-full h-full object-cover",dangerouslySetInnerHTML:{__html:Q}},`iframe-${a.image}`)]})}if(n){const i=a.option==="autoplay"?"autoplay=1":a.option==="mute"?"autoplay=1&mute=1":"mute=1";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed top-0 left-0 w-full h-full z-[-2]",children:e.jsx("iframe",{loading:"lazy",src:`https://www.youtube.com/embed/${n[1]}?${i}&loop=1&playlist=${n[1]}&controls=0&showinfo=0&modestbranding=1&iv_load_policy=3`,className:"w-full h-full object-cover",frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0},`youtube-1-${n[1]}`)}),e.jsx("style",{children:`
37                        .blur-overlay {
38                            position: fixed;
39                            top: 0;
40                            left: 0;
41                            width: 100%;
42                            height: 100%;
43                            backdrop-filter: blur(20px);
44                            z-index: -1;
45                        }
46                    `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("iframe",{id:"bgVideo",loading:"lazy",className:"fixed top-0 left-0 w-full h-full object-cover",src:`https://www.youtube.com/embed/${n[1]}?${a.option}=1&mute=1&loop=1&playlist=${n[1]}`,title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;
46 web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0},`youtube-2-${n[1]}`)]})}if(Z){let i=a.image;return i.includes("?compact=1")||(i+=(i.includes("?")?"&":"?")+"compact=1"),e.jsx("div",{className:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black",children:e.jsx("iframe",{id:"bgVideo",src:i,className:"w-full h-full",frameBorder:"0",allowFullScreen:!0,title:"Embedded LinkedIn Post",scrolling:"yes"},`linkedin-${i}`)})}return f?e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
47                        .blur-overlay {
48                            position: fixed;
49                            top: 0;
50                            left: 0;
51                            width: 100%;
52                            height: 100%;
53                            backdrop-filter: blur(20px);
54                            z-index: -1;
55                        }
56                    `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("iframe",{loading:"lazy",id:"bgVideo",allow:"camera; microphone; fullscreen; display-capture; autoplay",src:`https://player.vimeo.com/video/${f[3]}?h=33160d1512&color=de0101`,className:"fixed top-0 left-0 w-full h-full object-cover",frameBorder:"0",allowFullScreen:!0},`vimeo-${f[3]}`)]}):W||G&&!a.image.includes("groups")?e.jsx("div",{className:"fixed top-0 left-0 w-full h-full",children:e.jsx("div",{className:"fb-post","data-href":a.image,"data-width":"1400","data-show-text":"true"},`fb-${a.image}`)}):t==="mp4"?e.jsxs(e.Fragment,{children:[e.jsxs("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"fixed top-0 left-0 w-full h-full object-cover z-[-3]",children:[e.jsx("source",{src:r,type:"video/mp4"}),"Your browser does not support the video tag."]},`video-bg-${a.image}`),e.jsx("style",{children:`
57                        .blur-overlay {
58                            position: fixed;
59                            top: 0;
60                            left: 0;
61                            width: 100%;
62                            height: 100%;
63                            backdrop-filter: blur(20px);
64                            z-index: -2;
65                        }
66                    `}),e.jsx("div",{className:"blur-overlay"}),e.jsxs("video",{id:"bgVideo",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"absolute inset-0 max-w-full max-h-full m-auto",controls:!0,children:[e.jsx("source",{src:r,type:"video/mp4"}),"Your browser does not support the video tag."]},`video-main-${a.image}`)]}):t==="glb"?e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
67                        .blur-overlay {
68                            position: fixed;
69                            top: 0;
70                            left: 0;
71                            width: 100%;
72                            height: 100%;
73                            backdrop-filter: blur(20px);
74                            z-index: -1;
75                        }
76                    `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("model-viewer",{src:r,alt:"3D model",className:"fixed top-0 left-0 w-full h-full",ar:!0,"auto-rotate":!0,"camera-controls":!0,"shadow-intensity":"1"},`model-${a.image}`)]}):j(a.image)?e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
77                        .blur-overlay {
78                            position: fixed;
79                            top: 0;
80                            left: 0;
81                            width: 100%;
82                            height: 100%;
83                            backdrop-filter: blur(20px);
84                            z-index: -1;
85                        }
86                    `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("iframe",{loading:"lazy",id:"bgVideo",allow:"camera; microphone; fullscreen; display-capture; autoplay",src:a.image,className:"fixed top-0 left-0 w-full h-full",frameBorder:"0",allowFullScreen:!0,scrolling:"yes"},`iframe-url-${a.image}`)]}):e.jsx("iframe",{src:K,className:"fixed top-0 left-0 w-full h-full border-none",allow:"microphone *; camera *; autoplay *; fullscreen *; display-capture *;",sandbox:`allow-forms allow-modals allow-orientation-lock allow-pointer-lock 
87                        allow-popups allow-popups-to-escape-sandbox allow-presentation 
88                        allow-same-origin allow-scripts allow-top-navigation 
89                        allow-top-navigation-by-user-activation allow-downloads allow-storage-access-by-user-activation`,allowFullScreen:!0,loading:"lazy",name:"binauralMixerFrame",allowTransparency:"true",scrolling:"yes"},`html-${a.image}`)},[a,j]),L=l.useCallback(t=>new Date(t).toLocaleDateString("en-US",{weekday:"short",day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}),[]),I=l.useCallback(t=>{switch(t){case"completed":return e.jsx(s,{icon:ae,className:"text-green-500"});case"failed":return e.jsx(s,{icon:$,className:"text-red-500"});
89case"pending":return e.jsx(s,{icon:p,className:"text-yellow-500 animate-spin"});default:return e.jsx(s,{icon:p,className:"text-gray-500"})}},[]),B=l.useCallback(async()=>{if(!(!m||c)){y(!0);try{const t=b+1,o=await ee.get("/themepurchasehistory",{params:{page:t}});o.data.data&&o.data.data.length>0?(T(r=>[...r,...o.data.data]),S(t),w(o.data.current_page<o.data.last_page)):w(!1)}catch(t){console.error("Error loading more purchases:",t)}finally{y(!1)}}},[b,m,c]),v=l.useCallback(t=>{const o=typeof t=="string"?parseFloat(t):t;return isNaN(o)?"0.00":o.toFixed(2)},[]),N=l.useCallback(t=>{const o=typeof t=="string"?parseFloat(t):t;return`EZ$${v(o)}`},[v]);return e.jsxs(e.Fragment,{children:[e.jsxs(te,{children:[e.jsx("title",{children:"Theme Purchase History - Your Theme Transactions"}),e.jsx("meta",{name:"description",content:"View your theme purchase history and transactions"}),M,e.jsx("style",{children:`
90                    .react-tooltip {
91                        z-index: 99999 !important;
92                        opacity: 1 !important;
93                        font-size: 12px;
94                        padding: 4px 8px;
95                    }
96                `})]}),e.jsx(me,{id:"history-tooltip"}),e.jsx(de,{auth:F}),e.jsxs("main",{className:`relative flex justify-end p-4 min-h-screen overflow-hidden ${a!=null&&a.image&&h(x(a.image))?"blur-bg":""}`,children:[e.jsx("div",{className:"absolute inset-0 z-0",children:_}),C&&e.jsxs("div",{className:"relative mt-4 mx-auto bottom-4 z-50 backdrop-blur-sm p-4 rounded-xl border border-white-700 overflow-y-auto shadow-2xl w-full max-w-6xl",children:[e.jsx("button",{onClick:()=>P(!1),className:"absolute top-2 right-2 w-8 h-8 bg-black rounded-full flex items-center justify-center z-50 hover:bg-gray-800 transition-colors focus:outline-none focus:ring-2 focus:ring-white","aria-label":"Close panel","data-tooltip-id":"history-tooltip","data-tooltip-content":"Close this panel",children:e.jsx(s,{icon:$,className:"text-white text-lg",style:{textShadow:"0.7px 0.7px 0 rgb(255,0,0), -0.7px -0.7px 0 rgb(0,255,255)"}})}),e.jsxs("div",{className:"bg-gray-800/80 border border-gray-700 rounded-lg p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(s,{icon:se,className:"text-yellow-400 text-2xl"}),e.jsx("h1",{className:"text-2xl font-bold text-white",children:"Theme Purchase History"})]}),e.jsxs(g,{href:"/themes",className:"flex items-center gap-2 bg-yellow-400 text-black font-bold py-2 px-4 rounded-md hover:bg-yellow-500 transition-colors","data-tooltip-id":"history-tooltip","data-tooltip-content":"Browse and purchase more themes",children:[e.jsx(s,{icon:z}),"Browse Themes"]})]}),c&&u.length===0?e.jsx("div",{className:"flex justify-center items-center h-64",children:e.jsx(s,{icon:p,className:"text-yellow-400 text-4xl animate-spin"})}):u.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(s,{icon:le,className:"text-gray-400 text-5xl mb-4"}),e.jsx("h3",{className:"text-xl font-medium text-gray-300 mb-2",children:"No theme purchases yet"}),e.jsx("p",{className:"text-gray-400 mb-6",children:"Your theme purchase history will appear here"}),e.jsxs(g,{href:"/themes",className:"inline-flex items-center gap-2 bg-yellow-400 text-black font-bold py-2 px-6 rounded-md hover:bg-yellow-500 transition-colors","data-tooltip-id":"history-tooltip","data-tooltip-content":"Go to the themes marketplace",children:[e.jsx(s,{icon:z}),"Browse Themes"]})]}):e.jsxs("div",{className:"overflow-x-auto",children:[e.jsxs("table",{className:"min-w-full divide-y divide-gray-700",children:[e.jsx("thead",{className:"bg-gray-900/50",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"history-tooltip","data-tooltip-content":"The purchased theme details",children:"Theme"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"history-tooltip","data-tooltip-content":"Link to the transaction invoice",children:"Invoice"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"history-tooltip","data-tooltip-content":"Total amount paid",children:"Amount"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"history-tooltip","data-tooltip-content":"Payment method used",children:"Method"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"history-tooltip","data-tooltip-content":"Current status of the transaction",children:"Status"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"history-tooltip","data-tooltip-content":"Date and time of the transaction",children:"Date"})]})}),e.jsx("tbody",{className:"bg-gray-800/50 divide-y divide-gray-700",children:u.map(t=>e.jsxs("tr",{className:"hover:bg-gray-700/50 transition-colors",children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.theme?e.jsxs("div",{className:"flex items-center",children:[e.jsx(s,{icon:oe,className:"mr-2 text-purple-400"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-white",children:t.theme.title}),e.jsxs("div",{className:"text-xs text-gray-400",children:["ID: ",t.theme.unique_id]}),e.jsxs("div",{className:"text-xs text-gray-300",children:["Price
96: ",N(t.theme.price)]})]})]}):e.jsx("span",{className:"text-sm text-gray-400",children:"N/A"})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.invoice?e.jsxs(g,{href:`/theme-invoice/${t.invoice.number}`,target:"_blank",className:"flex items-center text-sm text-blue-400 hover:text-blue-300 hover:underline","data-tooltip-id":"history-tooltip","data-tooltip-content":"View invoice details in a new tab",children:[e.jsx(s,{icon:ie,className:"mr-2"}),t.invoice.number]}):e.jsx("span",{className:"text-sm text-gray-400",children:"N/A"})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"text-sm font-medium text-white",children:N(t.amount)})})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:"text-sm text-gray-300 capitalize",children:t.payment_method})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center","data-tooltip-id":"history-tooltip","data-tooltip-content":`Transaction status: ${t.status}`,children:[I(t.status),e.jsx("span",{className:"ml-2 text-sm text-gray-300 capitalize",children:t.status})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(s,{icon:re,className:"text-blue-400 mr-2"}),e.jsx("span",{className:"text-sm text-gray-300",children:L(t.processed_at)})]})})]},t.id))})]}),e.jsxs("div",{className:"mt-6 flex flex-col items-center space-y-4",children:[e.jsxs("button",{className:"flex items-center gap-2 bg-gray-700 text-white px-4 py-2 rounded-md hover:bg-gray-600 transition-colors",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),"data-tooltip-id":"history-tooltip","data-tooltip-content":"Scroll to the top of the page",children:[e.jsx(s,{icon:ne}),"Back to Top"]}),m&&e.jsx("button",{onClick:B,disabled:c,className:"flex items-center gap-2 bg-yellow-400 text-black font-bold py-2 px-6 rounded-md hover:bg-yellow-500 transition-colors disabled:opacity-50","data-tooltip-id":"history-tooltip","data-tooltip-content":m?"Load the next page of purchase history":"No more purchases to load",children:c?e.jsxs(e.Fragment,{children:[e.jsx(s,{icon:p,className:"animate-spin"}),"Loading..."]}):e.jsxs(e.Fragment,{children:[e.jsx(s,{icon:ce}),"Load More"]})})]})]})]})]})]})]})}export{ye 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.