PageSourceSearch

https://icaas.org/assets/PaynowQrImage-Be2N0Ya7.js

js icaas.org collected 2026-10-05 19:50:05 UTC 1,483 bytes, 1 lines download raw bytes

1import{n as e,s as t,t as n}from"./jsx-runtime-CKh-7KOC.js";import{p as r}from"./chunk-BV7QT456-CDyPqCoy.js";import{t as i}from"./api-C36ujMwF.js";var a=t(e()),o=n();function s(e){return e===`UEN`||e===`FPS`||e===`PAYID`}function c(e){return e?.paynowQrSource===`FPS`?`FPS`:e?.paynowQrSource===`PAYID`?`PayID`:`PayNow`}function l(e){let t=String(e||``).toUpperCase();return t===`HKD`?`FPS`:t===`AUD`?`PayID`:`PayNow`}function u(e,t){let n=Number(e);if(!Number.isFinite(n)||n<=0||n>9999999.99)return null;let r=new URLSearchParams({amount:n.toFixed(2)}),i=String(t??``).replace(/[^A-Za-z0-9-]/g,``).slice(0,25);return i&&r.set(`reference`,i),r.toString()}function d(e,t,n){return s(e?.paynowQrSource)?u(t,n)!==null:!!e?.paynowQrUrl}var f=({info:e,amount:t,reference:n,className:l,imgProps:d={},onUnavailable:f})=>{let{t:p}=r(),m=s(e?.paynowQrSource),h=p(`components.paynowQrImage.alt`,{network:c(e)}),g=m?u(t,n):null,[_,v]=(0,a.useState)(null),[y,b]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!g)return;let e=null,t=!1;return b(!1),v(null),i.get(`/public/payment-settings/paynow-qr.png?${g}`,{responseType:`blob`}).then(n=>{t||(e=URL.createObjectURL(n.data),v(e))}).catch(()=>{t||(b(!0),f?.())}),()=>{t=!0,e&&URL.revokeObjectURL(e)}},[g]),m?!g||y?null:_?(0,o.jsx)(`img`,{src:_,alt:h,className:l,...d}):(0,o.jsx)(`div`,{className:l,"aria-hidden":`true`}):e?.paynowQrUrl?(0,o.jsx)(`img`,{src:e.paynowQrUrl,alt:h,className:l,...d}):null};export{c as a,l as i,d as n,s as r,f as t};

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