PageSourceSearch

https://spotgenie.in/assets/QRScanner-PWjdsO7P.js

js spotgenie.in collected 2026-10-04 17:09:34 UTC 3,197 bytes, 2 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="99f546e2-f996-465a-a18b-aae41ee759b1",e._sentryDebugIdIdentifier="sentry-dbid-99f546e2-f996-465a-a18b-aae41ee759b1")}catch(p){}import{u as e,j as s,C as t}from"./index-CHD2GkyO.js";import{r}from"./react-vendor-Bf8bSGXU.js";import{H as n}from"./qrcode-C-14VdFt.js";/* empty css              *//* empty css            */import{s as a}from"./toast-DxHaxKW0.js";import{A as l}from"./AddPriceDialog-CGYIQmWn.js";import{c as i,T as o}from"./antd-Bifdq3vN.js";import{B as c}from"./antd-components-D4I4H2A0.js";import{F as d}from"./supabase-DWkEZWW1.js";import"./icons-D3YD4CPz.js";import"./antd-core-C0afp5T5.js";import"./dayjs-CSY51gPi.js";const{Title:u,Text:m}=o,f=()=>{const{supabase:o}=e(),[u,f]=r.useState(!1),[x,j]=r.useState(null),[y,h]=r.useState(null),[b,g]=r.useState(!1),[v,w]=r.useState(!1),[S,N]=r.useState(null),[R,Q]=r.useState(""),C=(e,s)=>{return t=void 0,r=null,n=function*(){var t,r;g(!0),N(null);const n={qr_tag:e,price:s};try{const{data:e,error:s}=yield o.functions.invoke("sale",{method:"POST",body:JSON.stringify(n)});if(s)throw s;Q(null==(t=null==e?void 0:e.data)?void 0:t.series_number),a("success","QR scanned successful!!!")}catch(l){if(g(!1),l&&l instanceof d){const e=yield null==(r=null==l?void 0:l.context)?void 0:r.json();a("error",(null==e?void 0:e.error)||"Error in QR code, please scan right QR code again")}else a("error",(null==l?void 0:l.message)||"Error in QR code, please scan right QR code again")}finally{g(!1)}},new Promise(((e,s)=>{var a=e=>{try{i(n.next(e))}catch(p){s(p)}},l=e=>{try{i(n.throw(e))}catch(p){s(p)}},i=s=>s.done?e(s.value):Promise.resolve(s.value).then(a,l);i((n=n.apply(t,r)).next())}));var t,r,n};return s.jsxs("div",{className:"flex max-h-screen items-center justify-center bg-gray-100 px-4 w-full overflow-y-hidden",children:[b&&s.jsx(t,{}),s.jsx(i,{className:"!p-3",children:s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("div",{className:"!flex !w-full !justify-center !items-center !text-center text-xl md:text-2xl",children:"Sales QR Code Scanner"}),x?s.jsxs("div",{className:"flex flex-col items-center justify-center",children:[R&&s.jsxs(m,{strong:!0,className:"result mb-2",children:["QR Series Name: ",R||"..."]}),s.jsxs(m,{strong:!0,className:"result mb-4",children:["Scanned Result: ",x]}),s.jsx(c,{type:"primary",onClick:()=>{j(null),w(!1)},className:"landing-whatsapp-btn mt-4",children:"Back To Scan"})]}):!v&&s.jsx(c,{type:"primary",disabled:v,onClick:()=>{w(!0);const e=new n("qr-reader",{fps:10,qrbox:{width:500,height:500}},!1);e.render((e=>{const s=e.substring(e.lastIndexOf("/")+1);j(s),f(!0)}),(e=>{})),h(e)},className:"landing-whatsapp-btn flex justify-center items-center !mt-10",children:"Scan QR Code"}),s.jsx("div",{id:"qr-reader",className:"mt-5"})]})}),u&&s.jsx(l,{onCancel:()=>{f(!1),j(null),w(!1)},onConfirm:e=>{f(!1),C(x||"",e),null==y||y.clear(),h(null)},isModalVisible:u})]})};export{f as default};
2//# sourceMappingURL=QRScanner-PWjdsO7P.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.