@topthink/components 1.0.105 → 1.0.107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{jsx as t,Fragment as r}from"react/jsx-runtime";import{memo as e,useContext as i,useState as o,useEffect as s}from"react";import{I as a}from"./index-VU_MdRkG.js";import{useInView as m}from"react-intersection-observer";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"lodash";import"axios";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"styled-components";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";var n=e((e=>{let{lazy:n=!0,...c}=e;const{registerImage:p,setShow:l,setCurrent:h,getId:g}=i(a),[d,w]=o(),[u,f]=o(!1),{ref:v,inView:x}=m({threshold:.2,skip:!n,initialInView:!0}),[y]=o(g);if(s((()=>{if(c.src)return p(y,c.src)}),[]),u)return t(r,{children:c.alt?`[图片加载失败:${c.alt}]`:" "});const k=!x&&n&&d?"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e %3crect width='1' height='1' fill='none'/%3e%3c/svg%3e":c.src;return t("img",{width:d?.[0],height:d?.[1],onLoad:t=>{d||w([t.currentTarget.clientWidth,t.currentTarget.clientHeight])},onError:()=>{f(!0)},ref:v,...c,alt:void 0,src:k,onClick:()=>{h(y),l(!0)}})}));export{n as default};
1
+ import{jsx as t,Fragment as r}from"react/jsx-runtime";import{memo as e,useContext as i,useState as o,useEffect as s}from"react";import{I as a}from"./index-XAyIeRue.js";import{useInView as m}from"react-intersection-observer";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"lodash";import"axios";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"styled-components";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";var n=e((e=>{let{lazy:n=!0,...c}=e;const{registerImage:p,setShow:l,setCurrent:h,getId:g}=i(a),[d,w]=o(),[u,f]=o(!1),{ref:v,inView:x}=m({threshold:.2,skip:!n,initialInView:!0}),[y]=o(g);if(s((()=>{if(c.src)return p(y,c.src)}),[]),u)return t(r,{children:c.alt?`[图片加载失败:${c.alt}]`:" "});const k=!x&&n&&d?"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e %3crect width='1' height='1' fill='none'/%3e%3c/svg%3e":c.src;return t("img",{width:d?.[0],height:d?.[1],onLoad:t=>{d||w([t.currentTarget.clientWidth,t.currentTarget.clientHeight])},onError:()=>{f(!0)},ref:v,...c,alt:void 0,src:k,onClick:()=>{h(y),l(!0)}})}));export{n as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import o,{getRegistry as r}from"@topthink/json-form";import*as a from"react";import{forwardRef as e,useState as n,useCallback as i}from"react";import s from"axios";import{c as p,r as m,B as l}from"./index-VU_MdRkG.js";import{mapValues as c}from"lodash";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"styled-components";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";const d=require("ajv-i18n/localize/zh"),u=a.lazy((()=>import("./editor-widget-CQ3zv-Xu.js"))),f=o=>t(a.Suspense,{fallback:null,children:t(u,{...o})}),h={upload:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:r,value:e}=await m({url:a.endpoint,method:"post",data:o});return{url:r,value:e}}),t(n.upload,{...e,options:a})},avatar:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:r}=await m({url:a.endpoint,method:"post",data:o});return r}),t(n.avatar,{...e,options:a})},editor:function(o){let{options:r,...a}=o;return r.endpoint&&(r.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:a}=await m({url:r.endpoint,method:"post",data:o});return a}),t(f,{...a,options:r})},typeahead:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onSearch=async t=>{let{value:o,query:r}=t;return await m({url:a.endpoint,params:{value:o,query:r}})}),t(n.typeahead,{...e,options:a})}},y=e(((r,a)=>{let{action:e,method:u="post",onSuccess:f,formData:y,onSubmitting:w,onSubmit:g,onChange:v,submitText:b="保存",transformData:x,children:D,...j}=r;const[S,k]=n(),[q,_]=p(!1),[z,E]=n(y),F=i((async(t,o)=>{if(!q)try{if(_(!0),w&&w(!0),e){let{formData:o}=t;x&&(o=x(o));try{const t=await m({url:e,method:u,data:o});return k(void 0),f&&await f(t),t}catch(t){if(!s.isAxiosError(t))throw t;k((t=>{const o=t.errors;return"string"==typeof o?{__errors:[o]}:c(o,(t=>({__errors:[t]})))})(t))}}else if(g)return await g(t,o)}finally{_(!1),w&&w(!1)}}),[e,u,g]),U=i((t=>{const{formData:o}=t;E(o),v&&v(t)}),[E,v]),C=i((t=>(t=t.map((t=>({keyword:t.name,dataPath:t.property,...t}))),d(t),t)),[]),N=t(l,{className:"px-4",loading:q,type:"submit",variant:"primary",children:b});return"function"==typeof D&&(D=D({submit:N,loading:q})),t(o,{ref:a,extraErrors:S,onSubmit:F,transformErrors:C,noHtml5Validate:!0,noValidate:!0,...j,formData:z,onChange:U,widgets:h,children:D||t("div",{className:"col-12",children:N})})}));export{y as default};
1
+ import{jsx as t}from"react/jsx-runtime";import o,{getRegistry as r}from"@topthink/json-form";import*as a from"react";import{forwardRef as e,useState as n,useCallback as i}from"react";import s from"axios";import{c as p,r as m,B as l}from"./index-XAyIeRue.js";import{mapValues as c}from"lodash";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"styled-components";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";const d=require("ajv-i18n/localize/zh"),u=a.lazy((()=>import("./editor-widget-CQ3zv-Xu.js"))),f=o=>t(a.Suspense,{fallback:null,children:t(u,{...o})}),h={upload:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:r,value:e}=await m({url:a.endpoint,method:"post",data:o});return{url:r,value:e}}),t(n.upload,{...e,options:a})},avatar:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:r}=await m({url:a.endpoint,method:"post",data:o});return r}),t(n.avatar,{...e,options:a})},editor:function(o){let{options:r,...a}=o;return r.endpoint&&(r.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:a}=await m({url:r.endpoint,method:"post",data:o});return a}),t(f,{...a,options:r})},typeahead:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onSearch=async t=>{let{value:o,query:r}=t;return await m({url:a.endpoint,params:{value:o,query:r}})}),t(n.typeahead,{...e,options:a})}},y=e(((r,a)=>{let{action:e,method:u="post",onSuccess:f,formData:y,onSubmitting:w,onSubmit:g,onChange:v,submitText:b="保存",transformData:x,children:D,...j}=r;const[S,k]=n(),[q,_]=p(!1),[z,E]=n(y),F=i((async(t,o)=>{if(!q)try{if(_(!0),w&&w(!0),e){let{formData:o}=t;x&&(o=x(o));try{const t=await m({url:e,method:u,data:o});return k(void 0),f&&await f(t),t}catch(t){if(!s.isAxiosError(t))throw t;k((t=>{const o=t.errors;return"string"==typeof o?{__errors:[o]}:c(o,(t=>({__errors:[t]})))})(t))}}else if(g)return await g(t,o)}finally{_(!1),w&&w(!1)}}),[e,u,g]),U=i((t=>{const{formData:o}=t;E(o),v&&v(t)}),[E,v]),C=i((t=>(t=t.map((t=>({keyword:t.name,dataPath:t.property,...t}))),d(t),t)),[]),N=t(l,{className:"px-4",loading:q,type:"submit",variant:"primary",children:b});return"function"==typeof D&&(D=D({submit:N,loading:q})),t(o,{ref:a,extraErrors:S,onSubmit:F,transformErrors:C,noHtml5Validate:!0,noValidate:!0,...j,formData:z,onChange:U,widgets:h,children:D||t("div",{className:"col-12",children:N})})}));export{y as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useState as o,useCallback as e}from"react";import i,{useController as n,useLightboxState as a}from"yet-another-react-lightbox";import s from"yet-another-react-lightbox/plugins/counter";import l from"yet-another-react-lightbox/plugins/download";import m from"yet-another-react-lightbox/plugins/zoom";import p from"yet-another-react-lightbox/plugins/thumbnails";import"yet-another-react-lightbox/styles.css";import"yet-another-react-lightbox/plugins/counter.css";import"yet-another-react-lightbox/plugins/thumbnails.css";import"yet-another-react-lightbox/plugins/captions.css";import{I as c}from"./index-VU_MdRkG.js";import u from"styled-components";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"lodash";import"axios";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";const d={counter:s,zoom:m,download:l,thumbnails:p};let h=0;function g(i){let{children:s,toolbar:l,plugins:m=["counter","zoom","download"]}=i;const[p,u]=o((()=>new Map)),[g,y]=o(),[x,f]=o(!1),w=e(((t,r)=>(u((o=>new Map(o).set(t,r))),()=>{u((r=>{const o=new Map(r);return o.delete(t)?o:r}))})),[]),_=Array.from(p.keys()),k=_.indexOf(g),v=_.map((t=>{const r=p.get(t);return"string"==typeof r?{src:r}:{render:r}})),j=e((()=>h++),[]);return t(c.Provider,{value:{images:p,current:g,setCurrent:y,setShow:f,registerImage:w,getId:j},children:[s,r(b,{plugins:m.map((t=>d[t])),open:x,index:k,close:()=>f(!1),slides:v,carousel:{finite:!0,preload:3},toolbar:l?.({useController:n,useLightboxState:a}),render:{buttonPrev:v.length<=1?()=>null:void 0,buttonNext:v.length<=1?()=>null:void 0,slide:t=>{let{slide:r}=t;if("render"in r)return r.render()}},controller:{closeOnBackdropClick:!0}})]})}const b=u(i)`
1
+ import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useState as o,useCallback as e}from"react";import i,{useController as n,useLightboxState as a}from"yet-another-react-lightbox";import s from"yet-another-react-lightbox/plugins/counter";import l from"yet-another-react-lightbox/plugins/download";import m from"yet-another-react-lightbox/plugins/zoom";import p from"yet-another-react-lightbox/plugins/thumbnails";import"yet-another-react-lightbox/styles.css";import"yet-another-react-lightbox/plugins/counter.css";import"yet-another-react-lightbox/plugins/thumbnails.css";import"yet-another-react-lightbox/plugins/captions.css";import{I as c}from"./index-XAyIeRue.js";import u from"styled-components";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"lodash";import"axios";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";const d={counter:s,zoom:m,download:l,thumbnails:p};let h=0;function g(i){let{children:s,toolbar:l,plugins:m=["counter","zoom","download"]}=i;const[p,u]=o((()=>new Map)),[g,y]=o(),[x,f]=o(!1),w=e(((t,r)=>(u((o=>new Map(o).set(t,r))),()=>{u((r=>{const o=new Map(r);return o.delete(t)?o:r}))})),[]),_=Array.from(p.keys()),k=_.indexOf(g),v=_.map((t=>{const r=p.get(t);return"string"==typeof r?{src:r}:{render:r}})),j=e((()=>h++),[]);return t(c.Provider,{value:{images:p,current:g,setCurrent:y,setShow:f,registerImage:w,getId:j},children:[s,r(b,{plugins:m.map((t=>d[t])),open:x,index:k,close:()=>f(!1),slides:v,carousel:{finite:!0,preload:3},toolbar:l?.({useController:n,useLightboxState:a}),render:{buttonPrev:v.length<=1?()=>null:void 0,buttonNext:v.length<=1?()=>null:void 0,slide:t=>{let{slide:r}=t;if("render"in r)return r.render()}},controller:{closeOnBackdropClick:!0}})]})}const b=u(i)`
2
2
  --yarl__color_backdrop: rgba(0, 0, 0, .7);
3
3
  --yarl__thumbnails_container_background_color: rgba(0, 0, 0, .9);
4
4
  `;export{g as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n from"rc-table";import{unstable_batchedUpdates as o}from"react-dom";import{FormControl as a,Table as i}from"react-bootstrap";import{useUrlSearchParams as c}from"use-url-search-params";import{isEqual as l,omit as s}from"lodash";import*as d from"react";import{useState as p,useCallback as u,useRef as m,useEffect as h,useMemo as f,memo as g,forwardRef as v,useImperativeHandle as y}from"react";import{B as b,u as x,P as w,a as j,b as C,r as k,i as S,N as E,L as O,T as V,C as z,S as N}from"./index-VU_MdRkG.js";import H from"styled-components";import M from"./index-ytz-rTYp.js";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"axios";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"path";import"classnames";import"copy-to-clipboard";import"immer";import"react-intersection-observer";import"@topthink/json-form";const q=function(t){let{indeterminate:r=!1,...n}=t;const o=m(null);return h((()=>{o.current&&(o.current.indeterminate=r)}),[r]),e("input",{ref:o,...n,className:"form-check-input",type:"checkbox"})};var K;function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}const P=e=>d.createElement("svg",B({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",viewBox:"0 0 1024 1024"},e),K||(K=d.createElement("path",{d:"M252.069 906.496h520.283c89.582 0 134.144-44.562 134.144-132.846V250.331c0-88.283-44.562-132.845-134.144-132.845H252.069c-89.143 0-134.583 44.141-134.583 132.845V773.67c0 88.704 45.44 132.845 134.583 132.845zm1.28-68.992c-42.844 0-66.853-22.71-66.853-67.291V253.806c0-44.58 24.01-67.292 66.853-67.292h517.723c42.423 0 66.432 22.711 66.432 67.292v516.388c0 44.58-24.01 67.292-66.432 67.292zM511.78 714.496c22.71 0 36.425-15.854 36.425-40.704V547.365H682.35c24.009 0 40.722-12.874 40.722-35.584 0-23.132-15.854-36.426-40.722-36.426H548.206V340.773c0-24.85-13.715-40.704-36.425-40.704s-35.566 16.713-35.566 40.722v134.583H342.49c-24.85 0-41.142 13.275-41.142 36.407 0 22.71 17.152 35.584 41.142 35.584h133.724v126.427c0 23.99 12.855 40.704 35.566 40.704"})));var F;function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T.apply(this,arguments)}const D=e=>d.createElement("svg",T({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",viewBox:"0 0 1024 1024"},e),F||(F=d.createElement("path",{d:"M252.069 906.496h520.283c89.582 0 134.144-44.562 134.144-132.846V250.331c0-88.283-44.562-132.845-134.144-132.845H252.069c-89.143 0-134.583 44.141-134.583 132.845V773.67c0 88.704 45.44 132.845 134.583 132.845zm1.28-68.992c-42.844 0-66.853-22.71-66.853-67.291V253.806c0-44.58 24.01-67.292 66.853-67.292h517.723c42.423 0 66.432 22.711 66.432 67.292v516.388c0 44.58-24.01 67.292-66.432 67.292zm86.582-289.719h344.576c23.991 0 40.704-12.855 40.704-35.566 0-23.15-15.433-36.425-40.704-36.425H339.931c-24.868 0-40.722 13.276-40.722 36.425 0 22.711 16.713 35.566 40.722 35.566"})));function I(r){let{data:n,options:o,columns:a,onSearch:i}=r;const[c,s]=p(0),[d,m]=p(n);h((()=>{l(n,d)||(m(n),s((e=>e+1)))}),[n]);const[g,v,y]=f((()=>{const e={"ui:col":10,"ui:order":o.order},t={},r={};o.fields.forEach((n=>{const i=a.find((e=>e.dataIndex===n));if(i){const a=i.title;if("string"==typeof a){if(e[n]={"ui:col":4,"ui:labelCol":3,"ui:placeholder":"请输入",...o.ui?.[n]},i.valueEnum){const t=i.valueEnum;return e[n]["ui:placeholder"]="请选择",r[n]={title:a,type:"string",enum:Object.keys(t).flatMap((e=>"string"==typeof t[e].text?[e]:[])),enumNames:Object.keys(t).flatMap((e=>{const r=t[e].text;return"string"==typeof r?[r]:[]}))}}t[n]=void 0,r[n]={title:a,type:"string"}}}})),o.extraFields&&Object.entries(o.extraFields).forEach((n=>{let[a,i]=n;e[a]={"ui:col":4,"ui:labelCol":3,"ui:placeholder":"请输入",...o.ui?.[a]},t[a]=void 0,r[a]={title:i,type:"string"}}));return[{type:"object",properties:r},e,t]}),[o.fields,o.extraFields]),x=u((e=>{let{formData:t}=e;m(t),i({...y,...t})}),[i,y]),w=u((()=>{i(y)}),[i,y]);return e(R,{children:e(M,{formContext:{layout:"horizontal"},schema:g,uiSchema:v,onSubmit:x,formData:d,children:e("div",{className:"col-2 ms-auto mt-auto",children:t("div",{className:"justify-content-end d-flex gap-2 ",children:[e(b,{className:"px-4",onClick:w,variant:"secondary",children:"重置"}),e(b,{className:"px-4",type:"submit",variant:"primary",children:"查询"})]})})})},c)}const R=H.div`
1
+ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n from"rc-table";import{unstable_batchedUpdates as o}from"react-dom";import{FormControl as a,Table as i}from"react-bootstrap";import{useUrlSearchParams as c}from"use-url-search-params";import{isEqual as l,omit as s}from"lodash";import*as d from"react";import{useState as p,useCallback as u,useRef as m,useEffect as h,useMemo as f,memo as g,forwardRef as v,useImperativeHandle as y}from"react";import{B as b,u as x,P as w,a as j,b as C,r as k,i as S,N as E,L as O,T as V,C as z,S as N}from"./index-XAyIeRue.js";import H from"styled-components";import M from"./index-5IUc6aiO.js";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"axios";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"path";import"classnames";import"copy-to-clipboard";import"immer";import"react-intersection-observer";import"@topthink/json-form";const q=function(t){let{indeterminate:r=!1,...n}=t;const o=m(null);return h((()=>{o.current&&(o.current.indeterminate=r)}),[r]),e("input",{ref:o,...n,className:"form-check-input",type:"checkbox"})};var K;function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}const P=e=>d.createElement("svg",B({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",viewBox:"0 0 1024 1024"},e),K||(K=d.createElement("path",{d:"M252.069 906.496h520.283c89.582 0 134.144-44.562 134.144-132.846V250.331c0-88.283-44.562-132.845-134.144-132.845H252.069c-89.143 0-134.583 44.141-134.583 132.845V773.67c0 88.704 45.44 132.845 134.583 132.845zm1.28-68.992c-42.844 0-66.853-22.71-66.853-67.291V253.806c0-44.58 24.01-67.292 66.853-67.292h517.723c42.423 0 66.432 22.711 66.432 67.292v516.388c0 44.58-24.01 67.292-66.432 67.292zM511.78 714.496c22.71 0 36.425-15.854 36.425-40.704V547.365H682.35c24.009 0 40.722-12.874 40.722-35.584 0-23.132-15.854-36.426-40.722-36.426H548.206V340.773c0-24.85-13.715-40.704-36.425-40.704s-35.566 16.713-35.566 40.722v134.583H342.49c-24.85 0-41.142 13.275-41.142 36.407 0 22.71 17.152 35.584 41.142 35.584h133.724v126.427c0 23.99 12.855 40.704 35.566 40.704"})));var F;function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T.apply(this,arguments)}const D=e=>d.createElement("svg",T({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",viewBox:"0 0 1024 1024"},e),F||(F=d.createElement("path",{d:"M252.069 906.496h520.283c89.582 0 134.144-44.562 134.144-132.846V250.331c0-88.283-44.562-132.845-134.144-132.845H252.069c-89.143 0-134.583 44.141-134.583 132.845V773.67c0 88.704 45.44 132.845 134.583 132.845zm1.28-68.992c-42.844 0-66.853-22.71-66.853-67.291V253.806c0-44.58 24.01-67.292 66.853-67.292h517.723c42.423 0 66.432 22.711 66.432 67.292v516.388c0 44.58-24.01 67.292-66.432 67.292zm86.582-289.719h344.576c23.991 0 40.704-12.855 40.704-35.566 0-23.15-15.433-36.425-40.704-36.425H339.931c-24.868 0-40.722 13.276-40.722 36.425 0 22.711 16.713 35.566 40.722 35.566"})));function I(r){let{data:n,options:o,columns:a,onSearch:i}=r;const[c,s]=p(0),[d,m]=p(n);h((()=>{l(n,d)||(m(n),s((e=>e+1)))}),[n]);const[g,v,y]=f((()=>{const e={"ui:col":10,"ui:order":o.order},t={},r={};o.fields.forEach((n=>{const i=a.find((e=>e.dataIndex===n));if(i){const a=i.title;if("string"==typeof a){if(e[n]={"ui:col":4,"ui:labelCol":3,"ui:placeholder":"请输入",...o.ui?.[n]},i.valueEnum){const t=i.valueEnum;return e[n]["ui:placeholder"]="请选择",r[n]={title:a,type:"string",enum:Object.keys(t).flatMap((e=>"string"==typeof t[e].text?[e]:[])),enumNames:Object.keys(t).flatMap((e=>{const r=t[e].text;return"string"==typeof r?[r]:[]}))}}t[n]=void 0,r[n]={title:a,type:"string"}}}})),o.extraFields&&Object.entries(o.extraFields).forEach((n=>{let[a,i]=n;e[a]={"ui:col":4,"ui:labelCol":3,"ui:placeholder":"请输入",...o.ui?.[a]},t[a]=void 0,r[a]={title:i,type:"string"}}));return[{type:"object",properties:r},e,t]}),[o.fields,o.extraFields]),x=u((e=>{let{formData:t}=e;m(t),i({...y,...t})}),[i,y]),w=u((()=>{i(y)}),[i,y]);return e(R,{children:e(M,{formContext:{layout:"horizontal"},schema:g,uiSchema:v,onSubmit:x,formData:d,children:e("div",{className:"col-2 ms-auto mt-auto",children:t("div",{className:"justify-content-end d-flex gap-2 ",children:[e(b,{className:"px-4",onClick:w,variant:"secondary",children:"重置"}),e(b,{className:"px-4",type:"submit",variant:"primary",children:"查询"})]})})})},c)}const R=H.div`
2
2
  margin-bottom: 1rem;
3
3
  `;function _(t){let{keyword:r,onKeywordChange:n}=t;const[o,i]=p(r),c=x(n,500);h((()=>{i(r)}),[r]);const l=u((e=>{i(e.target.value),c(e.target.value)}),[c,i]);return e(a,{value:o,onChange:l,type:"search",placeholder:"Search..."})}const A=H.thead`
4
4
  th {
@@ -0,0 +1,76 @@
1
+ import e from"sweetalert2/dist/sweetalert2.js";import t from"sweetalert2-react-content";import{jsx as n,jsxs as r,Fragment as o}from"react/jsx-runtime";import{useRef as a,useState as i,useEffect as s,createContext as c,Fragment as l,useContext as d,useCallback as u,useMemo as h,forwardRef as m,lazy as f,Suspense as p,Children as g,createElement as y,useImperativeHandle as w,memo as v}from"react";import{OverlayTrigger as b,Tooltip as x,Spinner as k,Button as N,Modal as C,ButtonGroup as S,ToggleButton as P,Card as z,Accordion as j,Stack as T,Alert as $,Pagination as H,Offcanvas as B,Row as E,Col as _}from"react-bootstrap";import{uniqueId as D,values as M,debounce as F}from"lodash";import L from"axios";import O from"query-string";import*as A from"retry-axios";import{enqueueSnackbar as I}from"notistack";import{useAsyncCallback as R}from"react-async-hook";import U,{css as W}from"styled-components";import G from"path";import K from"classnames";import{useUrlSearchParams as q}from"use-url-search-params";import V from"copy-to-clipboard";import{freeze as Y,produce as Q}from"immer";import"react-intersection-observer";const J=()=>{document.body.style.setProperty("--vh",window.innerHeight/100+"px"),document.body.style.setProperty("--100vh",window.innerHeight+"px")};window.addEventListener("resize",J),J();const X=t(e),Z={confirmButtonText:"确定",cancelButtonText:"取消"},ee={confirm:async e=>{const{isConfirmed:t}=await X.fire({...Z,icon:"warning",showCancelButton:!0,...e,async preConfirm(t){if(e.preConfirm)try{return await e.preConfirm(t)}catch(e){return e instanceof Error&&X.showValidationMessage(e.message),!1}return!0}});return t},success:e=>{X.fire({...Z,toast:!0,position:"top",icon:"success",timer:2e3,showConfirmButton:!1,...e})},error:e=>{X.fire({...Z,toast:!0,position:"top",icon:"error",timer:5e3,showConfirmButton:!1,...e})},close:e=>{X.close(e)},defaults:Z};const te=c({});function ne(e){return t=>{let{resolve:r,destroy:o,message:c}=t;const[l,m]=function(e){const t=a(null),[n,r]=i(e);return s((()=>{t.current&&(t.current(),t.current=null)}),[n]),[n,(e,n)=>{t.current="function"==typeof n?n:null,r(e)}]}(!0),f=d(te),p=u((e=>{m(!1,(()=>{r(e)}))}),[m,r]),g=h((()=>({show:l,onHide:()=>p(),onExited:()=>o(),container:f.container})),[l,p,o]);return n(e,{resolve:p,state:g,message:c})}}function re(e){return t=>new Promise((r=>{const o=n(e,{resolve:r,destroy:()=>{se(o)},message:t});ie(o)}))}let oe=()=>{},ae=new Set;const ie=e=>{ae=new Set(ae),ae.add(e),oe(ae)},se=e=>{ae=new Set(ae),ae.delete(e),oe(ae)};function ce(e,t){return re(ne(e))(t)}function le(e){let{tooltip:t,children:r,placement:o="bottom"}=e;return n(b,{placement:o,overlay:n(x,{id:D(),children:t}),children:r})}const de=c(!1),ue=m(((e,t)=>{let{loading:a,percent:i,disabled:s,children:c,tooltip:l,variant:u,...h}=e;d(de)&&!u&&(u="link"),a&&(s=!0,c=r(o,{children:[n(k,{ref:t,as:"span",size:"sm",role:"status","aria-hidden":"true",animation:"border"}),i?r("span",{className:"ms-2",children:[i,"%"]}):null]}));const m=n(N,{ref:t,...h,variant:u,disabled:s,children:c});return l?n(le,{tooltip:l,children:n("span",{className:"d-inline-block",children:m})}):m})),he=function(e){let{state:t,message:{title:o,message:a,okText:i,cancelText:s},resolve:c}=e;return r(C,{...t,children:[n(C.Header,{children:n(C.Title,{as:"h5",children:o||"确认"})}),n(C.Body,{children:a}),r(C.Footer,{children:[n(ue,{variant:"secondary",onClick:()=>c(),children:s||"取消"}),n(ue,{onClick:()=>c(!0),children:i||"确定"})]})]})};const me=e=>{let{header:t,children:a,footer:s,closable:c=!0,show:l,cancelText:d="取消",okText:u="确定",onOk:m,onCancel:f,onHide:p,okButtonProps:g,bodyAs:y,headerAs:w="h5",confirmLoading:v=!1,...b}=e;const[x,k]=i(!1),N=h((()=>n(ue,{loading:x||v,variant:"primary",onClick:async e=>{k(!0);try{await(m?.(e)),e.defaultPrevented||p?.()}finally{k(!1)}},...g,children:u})),[g,u,m,p,x,v]),S=h((()=>n(ue,{variant:"secondary",onClick:e=>{f?.(e),e.defaultPrevented||p?.()},children:d})),[f,p,d]),P={close:()=>{p?.()}};switch(typeof s){case"undefined":s=r(o,{children:[S,N]});break;case"function":s=s({okButton:N,cancelButton:S,action:P})}return r(C,{...b,onHide:p,show:l,children:[t&&n(C.Header,{closeButton:c,children:n(C.Title,{as:w,children:t})}),n(C.Body,{as:y,children:a}),s&&n(C.Footer,{children:s})]})};me.Message=function(e){const[t,r]=i(ae);return s((()=>{oe=r}),[]),n(te.Provider,{value:e,children:Array.from(t).map(((e,t)=>n(l,{children:e},`message-${t}`)))})},me.confirm=function(e){return re(ne(he))(e)},me.show=ce;const fe=["default","error","warning","success","info"].reduce(((e,t)=>(e[t]=(e,n)=>I(e,{variant:t,autoHideDuration:3e3,anchorOrigin:{vertical:"top",horizontal:"center"},...n}),e)),{});function pe(e){return e&&"object"==typeof e}A.attach(),L.defaults.raxConfig={retryDelay:2e3,backoffType:"static",shouldRetry:e=>{let{config:t,response:n}=e;return!(t.raxConfig?.retryDecider&&!t.raxConfig.retryDecider())&&("GET"===t.method?.toUpperCase()&&449===n?.status)}},L.defaults.maxContentLength=1/0,L.defaults.maxBodyLength=1/0,L.defaults.baseURL="/api",L.defaults.authTokenName="authorization",L.interceptors.request.use((e=>{const t=e.authTokenName;if(t){const n=localStorage.getItem(t);n&&(e.headers={Authorization:`Bearer ${n}`,...e.headers})}return e}),(e=>Promise.reject(e))),L.interceptors.response.use((e=>(201===e.status&&e.data.location&&(window.location.href=e.data.location,e.data=void 0),e)),(e=>{if(L.isAxiosError(e)&&e.response){const{data:t,status:n}=e.response;401===n?e.errors="Unauthorized":pe(t)?422===n?e.errors=t:"message"in t&&(e.errors=t.message):e.errors=t,"string"!=typeof e.errors?e.message=Object.values(e.errors).join("<br />"):e.message=e.errors}return Promise.reject(e)}));const ge=L.isAxiosError,ye=e=>{if(!L.isAxiosError(e))throw e;fe.error(e.message)},we=async function(e){if(e="string"==typeof e?{url:e}:e,(e={paramsSerializer:function(e){return O.stringify(e,{sort:!1,skipNull:!0,skipEmptyString:!0,arrayFormat:"bracket"})},...e}).onMessage){let t=0,n="",r=null;const o=e.onMessage;e.onDownloadProgress=e=>{const a=e.target,{responseText:i}=a;for(;t<e.loaded;){const e=i.substring(t,++t);if(n+=e,"\n"===e){if(r||(r={id:"",event:"",data:""}),"\n"===n)o(r),r=null;else{const e=n.match(/^data:(?<data>.*)/);e&&(r.data=e.groups.data.trim())}n=""}}}}const{data:t}=await L.request(e);return t};we.defaults=L.defaults,we.interceptors=L.interceptors;function ve(e){const t=(()=>{const e=a(!1);return s((()=>(e.current=!1,()=>{e.current=!0})),[]),e})(),[n,r]=i(e);return[n,u((e=>{t.current||r(e)}),[])]}function be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{locale:n="zh-CN",currency:r=!0,...o}=t;let a;a=r?{style:"currency",currency:"CNY"}:{minimumFractionDigits:2};return new Intl.NumberFormat(n,{...a,...o}).format(e)}function xe(e){let{manual:t,refreshDeps:n,...r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{execute:o,currentParams:a,error:i,...c}=R((async t=>(e="string"==typeof e?{url:e}:e,await we({...e,...t}))),r);s((()=>{if(!t&&!n)try{o()}catch{}}),[]),s((()=>{n&&l()}),n);const l=u((async()=>{try{a?await o(...a):await o()}catch{}}),[o,a]);if(i&&ge(i)){const e=i.errors;i=new Error("string"==typeof e?e:M(e).join(""))}return{refresh:l,execute:o,error:i,...c}}function ke(e){let{active:t,inverted:r,...o}=e;return n(Ne,{$active:t,$inverted:r,...o})}U.div`
2
+ position: relative;
3
+ `;const Ne=U.div`
4
+ display: ${e=>e.$active?"flex":"none"};
5
+ position: absolute;
6
+ top: 0 !important;
7
+ left: 0 !important;
8
+ width: 100%;
9
+ height: 100%;
10
+ text-align: center;
11
+ vertical-align: middle;
12
+ padding: 1em;
13
+ background-color: ${e=>e.$inverted?"rgba(255, 255, 255, .85)":"rgba(0, 0, 0, .85)"};
14
+ opacity: ${e=>e.$active?1:0};
15
+ line-height: 1;
16
+ animation-fill-mode: both;
17
+ animation-duration: .5s;
18
+ transition: background-color .5s linear;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ justify-content: center;
22
+ user-select: none;
23
+ will-change: opacity;
24
+ z-index: 990;
25
+ `;function Ce(e){let{loading:t=!0,children:o,variant:a="primary",animation:i="border",wrap:s,...c}=e;return t?(o&&(o=n("p",{className:"mt-3 text-secondary",children:o})),o=r(ke,{inverted:!0,active:!0,children:[n(k,{animation:i,variant:a,...c}),o]}),s?n(Se,{$height:"number"==typeof s?s:150,children:o}):o):null}const Se=U.div`
26
+ position: relative;
27
+ height: ${e=>`${e.$height}px`};
28
+ `,Pe=f((async()=>{const{QRCodeSVG:e}=await import("qrcode.react");return{default:e}}));function ze(e){return n(p,{fallback:null,children:n(Pe,{...e})})}const je=function(e){let{state:t,message:r,resolve:o}=e;const i=a(!0),{result:c,checkUrl:l,onComplete:d}=r,[u,h]=ve(!1);return s((()=>{we({url:l,method:"post",data:{order_no:c.order_no},raxConfig:{shouldRetry:e=>i.current&&449===e.response?.status}}).then((()=>{d?.(),o()})).catch((()=>null))}),[]),n(me,{...t,centered:!0,onHide:()=>{i.current=!1,t.onHide()},backdrop:"static",header:"支付结果",okText:"已完成支付",okButtonProps:{loading:u},onOk:async e=>{e.preventDefault();try{h(!0),await we({url:l,method:"post",data:{order_no:c.order_no,force:!0},raxConfig:{shouldRetry:()=>!1}}),d?.(),o()}catch(e){ge(e)&&fe.error(e.message)}finally{h(!1)}},cancelText:"取消",children:"请在新打开的页面上进行支付,支付完成后再关闭此窗口"})},Te=function(e){let{state:t,message:o,resolve:i}=e;const c=a(!0),{result:{pay_options:l,order_no:d},checkUrl:u,onComplete:h}=o,[m,f]=ve(l.channels.alipay?"alipay":"wechat"),[p,g]=ve(!1);s((()=>{we({url:u,method:"post",data:{order_no:d},raxConfig:{shouldRetry:e=>c.current&&449===e.response?.status}}).then((()=>{h?.(),i()})).catch((()=>null))}),[]);const{loading:y,result:w}=xe({url:l.url,method:"POST",data:{channel:m,order_no:d}},{refreshDeps:[m]});return r(me,{...t,onHide:()=>{c.current=!1,t.onHide()},centered:!0,backdrop:"static",header:"收银台",okText:"已完成支付",okButtonProps:{loading:p},onOk:async e=>{e.preventDefault();try{g(!0),await we({url:u,method:"post",data:{order_no:d,force:{channel:m}},raxConfig:{shouldRetry:()=>!1}}),h?.(),i()}catch(e){ge(e)&&fe.error(e.message)}finally{g(!1)}},cancelText:"取消",children:[r("dl",{className:"row",children:[n("dt",{className:"col-3",children:"商品名称"}),n("dd",{className:"col-9",children:l.subject})]}),r("dl",{className:"row",children:[n("dt",{className:"col-3",children:"支付金额"}),n("dd",{className:"col-9 text-success h3",children:be(l.amount/100)})]}),r("dl",{className:"row",children:[n("dt",{className:"col-3",children:"支付方式"}),n("dd",{className:"col-9",children:r(S,{children:[l.channels.alipay&&n(P,{id:"payment-alipay",type:"radio",variant:"alipay"===m?"primary":"outline-primary",name:"alipay",value:"alipay",checked:"alipay"===m,onChange:()=>f("alipay"),children:"支付宝"}),l.channels.alipay&&n(P,{id:"payment-wechat",type:"radio",variant:"wechat"===m?"primary":"outline-primary",name:"wechat",value:"wechat",checked:"wechat"===m,onChange:()=>f("wechat"),children:"微信支付"})]})})]}),r("dl",{className:"row mb-0",children:[n("dt",{className:"col-3",children:"扫码支付"}),r("dd",{className:"col-9",children:[n(Ce,{loading:y,wrap:200}),w&&n(ze,{size:200,value:w.data})]})]})]})};function $e(e){const{result:t}=e;t.pay_url?(window.opener=null,window.innerWidth<992?location.href=t.pay_url:(window.open(t.pay_url),ce(je,e))):ce(Te,e)}function He(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const n=["","K","M","G"];let r=0;for(;e>=1024&&r<n.length-1;)e/=1024,r++;return e%1==0&&(t=0),e.toFixed(t)+n[r]}function Be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const n=["","K","M","G"];let r=0;for(;e>=1e3&&r<n.length-1;)e/=1e3,r++;return e%1==0&&(t=0),e.toFixed(t)+n[r]}function Ee(e){const t=G.extname(e);return!(!/^data:image\//.test(e)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(t))||!/^data:/.test(e)&&!t}function _e(e){const t=document.createElement("a");return t.href=e,t.href}const De={success:n("i",{className:"bi bi-check-circle-fill text-success"}),error:n("i",{className:"bi bi-exclamation-circle-fill text-danger"}),info:n("i",{className:"bi bi-info-circle-fill text-info"}),warning:n("i",{className:"bi bi-exclamation-triangle-fill text-warning"})};function Me(e){let{className:t,status:o,title:a,icon:i,extra:s}=e;return!i&&o&&(i=De[o]),r(Fe,{className:t,children:[i&&n(Le,{children:i}),a&&n(Oe,{children:a}),s&&n(Ae,{children:s})]})}const Fe=U.div`
29
+ padding: 48px 32px;
30
+ `,Le=U.div`
31
+ margin-bottom: 24px;
32
+ text-align: center;
33
+ font-size: 72px;
34
+ `,Oe=U.div`
35
+ color: rgba(0, 0, 0, .85);
36
+ font-size: 24px;
37
+ line-height: 1.8;
38
+ text-align: center;
39
+ `,Ae=U.div`
40
+ margin-top: 32px;
41
+ text-align: center;
42
+ `;function Ie(e){let{children:t,title:a,className:i,...s}=e;return n(Re,{className:K("border-0 shadow-sm",i),...s,children:r("div",{className:"card-body",children:[a&&r(o,{children:[n("h5",{children:a}),n("hr",{})]}),t]})})}const Re=U(z)`
43
+ &:not(:last-child) {
44
+ margin-bottom: 1rem;
45
+ }
46
+ `,Ue=c(void 0);function We(e){let{children:t}=e;const[r,o]=i(new Set),a=u((e=>{e&&"string"==typeof e&&(e=[e]),o(new Set(e))}),[o]);return n(Ue.Provider,{value:[r,o],children:n(j,{activeKey:Array.from(r),onSelect:a,alwaysOpen:!0,children:t})})}const Ge=()=>{const e=d(Ue);if(!e)throw new Error("usePanel must be used within a PanelGroup");return e};function Ke(e){let{title:t,action:a,children:i,eventKey:c,open:l}=e;if(c){const[e,t]=Ge();s((()=>{void 0!==l&&t(l?new Set([...e,c]):new Set([...e].filter((e=>e!==c))))}),[l]),i=n(j.Collapse,{eventKey:c,children:r(o,{children:[n("hr",{}),i]})})}else i=r(o,{children:[n("hr",{}),i]});return r(Ie,{children:[r(T,{direction:"horizontal",children:[n("div",{className:"fs-5 me-auto",children:t}),a]}),i]})}function qe(e){let{errors:t}=e;return t?n($,{variant:"danger",children:n("ul",{className:"mb-0",children:"string"==typeof t?n("li",{children:t}):Object.entries(t).map((e=>{let[t,r]=e;return n("li",{children:r},t)}))})}):null}function Ve(e){let{children:t,className:r,size:o="small",direction:a="horizontal"}=e;"string"==typeof o&&(o={small:8,middle:16,large:24}[o]);const i=g.map(t,(e=>{if(e)return n(Qe,{children:e})}));return n(Ye,{className:r,$direction:a,$size:o,children:i})}const Ye=U.div`
47
+ display: inline-flex;
48
+ align-items: center;
49
+ gap: ${e=>e.$size}px;
50
+
51
+ ${e=>"vertical"===e.$direction&&W`
52
+ display: flex;
53
+ flex-direction: column;
54
+ align-items: inherit;
55
+ `}
56
+ `,Qe=U.div`
57
+
58
+ `,Je=f((()=>import("./steps-b_BcYIwk.js"))),Xe=f((()=>import("./steps-b_BcYIwk.js").then((e=>{let{Step:t}=e;return{default:t}}))));function Ze(e){return n(p,{fallback:null,children:n(Je,{...e})})}const et=function(e){return n(p,{fallback:null,children:n(Xe,{...e})})};function tt(e){let{title:t,content:o,footer:a}=e;return r(Ie,{children:[n(ot,{children:t}),n(rt,{children:o}),a&&n(nt,{children:a})]})}Ze.Step=et;const nt=U.div`
59
+ margin-top: 9px;
60
+ padding-top: 10px;
61
+ border-top: 1px solid #f0f0f0;
62
+ color: rgba(0, 0, 0, .65);
63
+ `,rt=U.div`
64
+ color: rgba(0, 0, 0, .85);
65
+ font-size: 24px;
66
+ `,ot=U.div`
67
+ margin-bottom: 4px;
68
+ color: rgba(0, 0, 0, .45);
69
+ font-size: 1.1rem;
70
+ `;function at(){}function it(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function st(e){return"current_page"in e}function ct(e){let{total:t=0,onChange:r=at,defaultCurrent:o=1,defaultPageSize:a=10,className:c,...l}=e;const[d,m]=i(o),[f,p]=i(a);s((()=>{it(l.current)&&m(l.current)}),[l.current]),s((()=>{it(l.pageSize)&&p(l.pageSize)}),[l.pageSize]);const g=h((()=>Math.floor((t-1)/f)+1),[t,f]),y=u((e=>()=>{e!==d&&(m(e),r(e,f))}),[r,d,f]),w=d-1>0?d-1:0,v=d+1<g?d+1:g,b=[];let x=null,k=null,N=null,C=null;if(g<=7)for(let e=1;e<=g;e+=1){const t=d===e;b.push(n(H.Item,{active:t,onClick:y(e),children:e},e))}else{C=n(H.Last,{onClick:y(g)},"last"),N=n(H.First,{onClick:y(1)},"first"),x=n(H.Prev,{onClick:y(w)},"prev"),k=n(H.Next,{onClick:y(v)},"next");let e=Math.max(1,d-2),t=Math.min(d+2,g);d-1<=2&&(t=5),g-d<=2&&(e=g-4);for(let r=e;r<=t;r+=1){const e=d===r;b.push(n(H.Item,{active:e,onClick:y(r),children:r},r))}d-1>=4&&3!==d&&b.unshift(x),g-d>=4&&d!==g-2&&b.push(k),1!==e&&b.unshift(N),t!==g&&b.push(C)}return n(H,{className:c,children:b})}function lt(e){let{className:t,value:r,locale:a="zh-CN",currency:i=!0,options:s={}}=e;const c=h((()=>{let e;return e=i?{style:"currency",currency:"CNY"}:{minimumFractionDigits:2},new Intl.NumberFormat(a,{...e,...s})}),[i,a,s]);return t?n("span",{className:t,children:c.format(r)}):n(o,{children:c.format(r)})}function dt(e){let{loading:t,disabled:r,children:o,...a}=e;return n(N,{...a,disabled:t||r,children:t?"Loading…":o})}const ut=f((()=>import("./image-zoom-OrIPGqh0.js")));function ht(e){return n(p,{fallback:null,children:n(ut,{...e})})}const mt=m(((e,t)=>{let{url:n,method:r,confirm:o,onSuccess:a,children:i,disabled:s,as:c=ue,onError:l,...d}=e;const[h,m]=ve(!1),f=u((async e=>{e.preventDefault(),e.stopPropagation();try{if(m(!0),o&&!await me.confirm({message:o}))return;const e="string"==typeof n?{url:n,method:r}:{method:r,...n},t=await we(e);a&&a(t)}catch(e){if(!(e instanceof Error))throw e;l?l(e):fe.error(e.message,{preventDuplicate:!0})}finally{m(!1)}}),[n,r,m]);return y(c,{...d,disabled:s||h,onClick:f,ref:t},i)})),ft=f((()=>import("./index-5IUc6aiO.js"))),pt=m(((e,t)=>n(p,{fallback:null,children:n(ft,{...e,ref:t})}))),gt=f((()=>import("./index-GxHLWcAi.js"))),yt=m(((e,t)=>n(p,{fallback:null,children:n(gt,{...e,ref:t})})));let wt=0;function vt(){let{onHide:e,onShow:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,r]=i(!1),[o,a]=i(`visible-${wt}`),s=u((()=>{r(!1),e&&e()}),[r,e]),c=u((()=>{a("visible-"+ ++wt)}),[a,wt]);return{visible:n,show:u((()=>{r(!0),t&&t()}),[r,t]),hide:s,state:{show:n,onHide:s,onExited:c,key:o}}}const bt=m(((e,t)=>{let{text:a,onOk:i,modalProps:s,children:c,onShow:l,onHide:d,confirmLoading:u,as:h=ue,...m}=e;const{state:f,show:p,hide:g}=vt({onShow:l,onHide:d});w(t,(()=>({close:g})));const v=y(h,{...m,onClick:e=>{e.preventDefault(),e.stopPropagation(),p()}},a);return r(o,{children:[v,n(me,{header:a,...s,...f,confirmLoading:u,onOk:async e=>{if(i){!1===await i()&&e.preventDefault()}},children:c})]})})),xt=m(((e,t)=>{let{text:o,onSuccess:s,onSubmit:c,buttonProps:l,modalProps:d,children:h,...m}=e;const[f,p]=i(!1),g=a(null),y=a(null);w(t,(()=>({close:()=>{g.current?.close()}})));const v=u((()=>(y.current?.submit(),!1)),[]),b=u((e=>{s&&s(e),g.current?.close()}),[s]),x=u((async(e,t)=>{c&&await c(e,t)&&g.current?.close()}),[c]);return n(bt,{ref:g,text:o,...l,modalProps:d,onOk:v,confirmLoading:f,children:r(pt,{...m,onSubmitting:p,ref:y,onSuccess:b,onSubmit:x,children:[h,n("input",{type:"submit",hidden:!0})]})})}));function kt(e){let{header:t,children:o,closable:a=!0,show:i,onHide:s,bodyAs:c,headerAs:l="h5",...d}=e;return r(B,{...d,onHide:s,show:i,children:[t&&n(B.Header,{closeButton:a,children:n(B.Title,{as:l,children:t})}),n(B.Body,{as:c,children:o})]})}const Nt=m(((e,t)=>{let{text:a,offcanvasProps:i,children:s,onShow:c,onHide:l,as:d=ue,...u}=e;const{state:h,show:m,hide:f}=vt({onShow:c,onHide:l});w(t,(()=>({close:f})));const p=y(d,{...u,onClick:m},a);return r(o,{children:[p,n(kt,{header:a,...i,...h,children:s})]})}));function Ct(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=a(e);return s((()=>{n.current=e})),u((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.current?.(...t)}),t)}function St(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=((e,t)=>e!==t)}=e,a=Ct(r),s=Ct(o),[c,l]=i(n),d=void 0!==t,u=d?t:c,h=Ct((e=>{const t="function"==typeof e?e(u):e;s(u,t)&&(d||l(t),a(t))}),[d,a,u,s]);return[u,h]}const Pt=m(((e,t)=>{let{className:o,rowClassName:c,paginate:l=!0,sync:d=!1,columns:h=3,source:m,renderItem:f,renderEmpty:p}=e;const[g,y]=i([]),[v,b]=i(l?{total:0,current:1,pageSize:10}:null),[x,k]=i(!0),[N,C]=q({}),[S,P]=St({value:d?N.page||1:void 0,defaultValue:1,onChange:e=>{d&&C({page:e||void 0})}}),z=u((async function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||k(!0);try{let e;const t={page:S>1?S:void 0};e="string"==typeof m?await we({url:m,params:t}):await m(t),l&&st(e)&&(e.last_page>1&&b({total:e.total,current:e.current_page,pageSize:e.per_page}),e=e.data),y(e)}catch(e){}finally{k(!1)}}),[m,y,S]);s((()=>{z()}),[S]),s((()=>{j.current={reload:z}}),[z]);const j=a({reload:z});return w(t,(()=>j.current)),r(zt,{className:o,children:[n(Ce,{wrap:!0,loading:x}),0===g.length&&!x&&p?.(),n(E,{className:c,children:g.map(((e,t)=>n(_,{className:"d-flex",md:12/h,children:f(e)},`card-${t}`)))}),v&&n(jt,{...v,onChange:P})]})})),zt=U.div`
71
+
72
+ `,jt=U(ct)`
73
+ margin-bottom: 0;
74
+ justify-content: flex-end;
75
+ margin-top: 1rem;
76
+ `;var Tt=v(Pt);function $t(){const[e,t]=i(!1),n=a();return s((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{copied:e,copy:u((e=>{V(e),t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{t(!1),n.current=void 0}),3e3)}),[])}}function Ht(e){let{as:t="div",className:r,content:o,tooltip:a=!0,placement:i}=e;const{copy:s,copied:c}=$t(),l=a?n("i",c?{className:"bi bi-clipboard-check"}:{className:"bi bi-clipboard"}):c?"已复制":"复制",d=y(t,{role:"button",className:r,onClick:()=>{"function"==typeof o&&(o=o()),s(o)}},l);return a?n(le,{tooltip:c?"已复制":"复制",placement:i,children:d}):d}const Bt=c({images:new Map,current:0,setCurrent:()=>null,setShow:()=>null,registerImage:()=>()=>null,getId:()=>0}),Et=f((()=>import("./index-7Hg6R-C0.js"))),_t=f((()=>import("./image-5aVq7h33.js")));function Dt(e){return n(p,{fallback:null,children:n(Et,{...e})})}Dt.Image=function(e){return n(p,{fallback:null,children:n(_t,{...e})})},Dt.Context=Bt;const Mt=f((()=>import("./infinite-scroller-5T3ThatT.js"))),Ft=m(((e,t)=>n(p,{fallback:null,children:n(Mt,{...e,ref:t})}))),Lt=f((()=>import("./slider-KuqHu6UH.js")));function Ot(e){return n(p,{fallback:null,children:n(Lt,{...e})})}function At(e,t,n){const r=a(e),o=a(F(e,t,n));return s((()=>{r.current=e})),s((()=>{o.current=F((function(){r.current(...arguments)}),t,n)}),[t,n]),o.current}function It(e){const[t,n]=i((()=>Y("function"==typeof e?e():e,!0)));return[t,u((e=>{n("function"==typeof e?Q(e):Y(e))}),[])]}function Rt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lg";function t(){const t=e=>{switch(e){case"xxl":return window.innerWidth>=1400;case"xl":return window.innerWidth>=1200;case"lg":return window.innerWidth>=992;case"md":return window.innerWidth>=768;case"sm":return window.innerWidth>=576;default:return!0}};return{isMobile:!t(e),width:window.innerWidth,match:t}}const[n,r]=i(t),o=At((()=>{r(t())}),100);return s((()=>(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o))),[]),n}var Ut;!function(e){e[e.init=0]="init",e[e.play=1]="play",e[e.pause=2]="pause",e[e.end=3]="end"}(Ut||(Ut={}));const Wt=(e,t)=>{let n=a(!1);const[r,o]=i((()=>{const{lang:e="default",name:n=""}=t.voice||{};return{isPlaying:!1,status:Ut[Ut.init],lang:t.lang||"default",voiceInfo:{lang:e,name:n},rate:t.rate||1,pitch:t.pitch||1,volume:t.volume||1}})),c=u((()=>{n.current&&o((e=>({...e,isPlaying:!0,status:Ut[Ut.play]})))}),[]),l=u((()=>{n.current&&o((e=>({...e,isPlaying:!1,status:Ut[Ut.pause]})))}),[]),d=u((()=>{n.current&&o((e=>({...e,isPlaying:!1,status:Ut[Ut.end]})))}),[]);return s((()=>{n.current=!0;const r=new SpeechSynthesisUtterance(e);return t.lang&&(r.lang=t.lang),t.voice&&(r.voice=t.voice),r.rate=t.rate||1,r.pitch=t.pitch||1,r.volume=t.volume||1,r.onstart=c,r.onpause=l,r.onresume=c,r.onend=d,window.speechSynthesis.speak(r),()=>{n.current=!1}}),[]),r};function Gt(e,t){s((()=>{const t=e();!async function(){await t}()}),t)}export{Gt as $,bt as A,ue as B,Ie as C,me as D,qe as E,pt as F,kt as G,le as H,Bt as I,Tt as J,Ht as K,Ce as L,ee as M,lt as N,Nt as O,ct as P,Dt as Q,Me as R,Ve as S,de as T,Ft as U,Ot as V,ze as W,xe as X,vt as Y,$t as Z,Wt as _,Rt as a,ge as a0,ye as a1,St as b,ve as c,It as d,fe as e,pe as f,He as g,be as h,st as i,Be as j,Ee as k,_e as l,Ke as m,We as n,Ge as o,Ze as p,et as q,we as r,tt as s,dt as t,At as u,ht as v,$e as w,mt as x,yt as y,xt as z};
package/es/index.js CHANGED
@@ -1 +1 @@
1
- export{B as Button,C as Card,A as CardList,D as Clipboard,E as Error,F as Form,p as ImageZoom,H as InfiniteScroller,G as Lightbox,L as Loader,o as LoadingButton,M as Message,x as Modal,v as ModalButton,t as ModalForm,N as NumberFormat,y as Offcanvas,O as OffcanvasButton,P as Pagination,Q as Qrcode,q as RequestButton,R as Result,J as Slider,S as Space,n as Statistic,m as Step,l as Steps,s as Table,e as Toast,z as Tooltip,h as formatNumber,g as formatSize,k as getAbsoluteUrl,j as isImageUrl,f as isRecord,Y as isRequestError,r as request,Z as showRequestError,X as useAsyncEffect,V as useClipboard,b as useControllableState,u as useDebounce,d as useImmer,U as useOverlayState,K as useRequest,c as useSafeState,W as useSpeech,a as useWindowSize,w as waitPayComplete}from"./index-VU_MdRkG.js";export{StyleSheetManager,ThemeProvider,createGlobalStyle,css,keyframes,default as styled}from"styled-components";export{useAsync,useAsyncCallback}from"react-async-hook";export{useInView}from"react-intersection-observer";export{SnackbarProvider as ToastProvider}from"notistack";export{default as queryString}from"query-string";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react/jsx-runtime";import"react";import"react-bootstrap";import"lodash";import"axios";import"retry-axios";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";
1
+ export{B as Button,C as Card,J as CardList,K as Clipboard,E as Error,F as Form,v as ImageZoom,U as InfiniteScroller,Q as Lightbox,L as Loader,t as LoadingButton,M as Message,D as Modal,A as ModalButton,z as ModalForm,N as NumberFormat,G as Offcanvas,O as OffcanvasButton,P as Pagination,m as Panel,n as PanelGroup,W as Qrcode,x as RequestButton,R as Result,V as Slider,S as Space,s as Statistic,q as Step,p as Steps,y as Table,e as Toast,H as Tooltip,j as formatLongNumber,h as formatNumber,g as formatSize,l as getAbsoluteUrl,k as isImageUrl,f as isRecord,a0 as isRequestError,r as request,a1 as showRequestError,$ as useAsyncEffect,Z as useClipboard,b as useControllableState,u as useDebounce,d as useImmer,Y as useOverlayState,o as usePanel,X as useRequest,c as useSafeState,_ as useSpeech,a as useWindowSize,w as waitPayComplete}from"./index-XAyIeRue.js";export{StyleSheetManager,ThemeProvider,createGlobalStyle,css,keyframes,default as styled}from"styled-components";export{useAsync,useAsyncCallback}from"react-async-hook";export{useInView}from"react-intersection-observer";export{SnackbarProvider as ToastProvider}from"notistack";export{default as queryString}from"query-string";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react/jsx-runtime";import"react";import"react-bootstrap";import"lodash";import"axios";import"retry-axios";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{memo as a,forwardRef as r,useState as e,useCallback as o,useImperativeHandle as s}from"react";import i from"react-infinite-scroller";import{d as n,r as m,i as p}from"./index-VU_MdRkG.js";import{last as d}from"lodash";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"axios";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"styled-components";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";var c=a(r(((a,r)=>{let{source:c,render:l,as:f,useWindow:u,className:g,getState:h,limit:y=10}=a;const[w,x]=e(!1),[b,j]=n({params:{},end:!1,data:[]}),v=o((async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!w){x(!0);try{let a;const r=t?{}:b.params;a="string"==typeof c?await m({url:c,params:r}):await c(r),h||(h=t=>p(t)?{params:{page:t.current_page+1},end:t.current_page>=t.last_page,data:t.data}:{params:{offset:d(t)?.id},end:t.length<y,data:t});const e=h(a);j({...e,data:t?e.data:[...b.data,...e.data]})}catch{j({...b,end:!0})}finally{x(!1)}}}),[c,b,h,w]),_=o((()=>{v(!0)}),[v]);s(r,(()=>({reload:_})),[_]);const k=o((t=>{j((a=>{const r=t(a.data);r&&(a.data=r)}))}),[j]);return t(i,{className:g,hasMore:!b.end,pageStart:0,loadMore:()=>{v()},useWindow:u,element:f,children:l({data:b.data,setData:k,end:b.end,loading:w,action:{reload:_}})})})));export{c as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{memo as a,forwardRef as r,useState as e,useCallback as o,useImperativeHandle as s}from"react";import i from"react-infinite-scroller";import{d as n,r as m,i as p}from"./index-XAyIeRue.js";import{last as d}from"lodash";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"axios";import"query-string";import"retry-axios";import"notistack";import"react-async-hook";import"styled-components";import"path";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";var c=a(r(((a,r)=>{let{source:c,render:l,as:f,useWindow:u,className:g,getState:h,limit:y=10}=a;const[w,x]=e(!1),[b,j]=n({params:{},end:!1,data:[]}),v=o((async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!w){x(!0);try{let a;const r=t?{}:b.params;a="string"==typeof c?await m({url:c,params:r}):await c(r),h||(h=t=>p(t)?{params:{page:t.current_page+1},end:t.current_page>=t.last_page,data:t.data}:{params:{offset:d(t)?.id},end:t.length<y,data:t});const e=h(a);j({...e,data:t?e.data:[...b.data,...e.data]})}catch{j({...b,end:!0})}finally{x(!1)}}}),[c,b,h,w]),_=o((()=>{v(!0)}),[v]);s(r,(()=>({reload:_})),[_]);const k=o((t=>{j((a=>{const r=t(a.data);r&&(a.data=r)}))}),[j]);return t(i,{className:g,hasMore:!b.end,pageStart:0,loadMore:()=>{v()},useWindow:u,element:f,children:l({data:b.data,setData:k,end:b.end,loading:w,action:{reload:_}})})})));export{c as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topthink/components",
3
- "version": "1.0.105",
3
+ "version": "1.0.107",
4
4
  "scripts": {
5
5
  "prebuild": "rimraf es types",
6
6
  "build": "rollup -c --environment NODE_ENV:production",
@@ -71,5 +71,5 @@
71
71
  },
72
72
  "author": "yunwuxin <tzzhangyajun@qq.com> (https://github.com/yunwuxin)",
73
73
  "license": "MIT",
74
- "gitHead": "f5d11d8c21a22e5e95602d79b97ce88117d8cf1c"
74
+ "gitHead": "ca05f7a3e414fa94f903581dffeffd2f2dfd5bab"
75
75
  }
@@ -0,0 +1,14 @@
1
+ import { Dispatch, ReactNode, SetStateAction } from 'react';
2
+ interface Props {
3
+ children: ReactNode;
4
+ title: ReactNode;
5
+ action?: ReactNode;
6
+ eventKey?: string;
7
+ open?: boolean;
8
+ }
9
+ export declare function PanelGroup({ children }: {
10
+ children: ReactNode;
11
+ }): JSX.Element;
12
+ export declare const usePanel: () => [Set<string>, Dispatch<SetStateAction<Set<string>>>];
13
+ export default function Panel({ title, action, children, eventKey, open }: Props): JSX.Element;
14
+ export {};
package/types/index.d.ts CHANGED
@@ -6,11 +6,13 @@ export { PaginationType } from './utils/types';
6
6
  export { default as isRecord } from './utils/is-record';
7
7
  export { default as formatSize } from './utils/format-size';
8
8
  export { default as formatNumber } from './utils/format-number';
9
+ export { default as formatLongNumber } from './utils/format-long-number';
9
10
  export { default as isImageUrl } from './utils/is-image-url';
10
11
  export { default as getAbsoluteUrl } from './utils/get-absolute-url';
11
12
  export { default as Result } from './components/result';
12
13
  export { default as Loader } from './components/loader';
13
14
  export { default as Card } from './components/card';
15
+ export { default as Panel, PanelGroup, usePanel } from './components/panel';
14
16
  export { default as Error } from './components/error';
15
17
  export { default as Space } from './components/space';
16
18
  export { default as Steps, Step } from './components/steps';
@@ -0,0 +1 @@
1
+ export default function formatLongNumber(size: number, fractionDigits?: number): string;
@@ -1 +1 @@
1
- export default function formatSize(token: number, fractionDigits?: number): string;
1
+ export default function formatSize(size: number, fractionDigits?: number): string;
@@ -1,76 +0,0 @@
1
- import e from"sweetalert2/dist/sweetalert2.js";import t from"sweetalert2-react-content";import{jsx as n,jsxs as r,Fragment as o}from"react/jsx-runtime";import{useRef as a,useState as i,useEffect as s,createContext as c,Fragment as l,useContext as d,useCallback as u,useMemo as h,forwardRef as m,lazy as p,Suspense as f,Children as g,createElement as y,useImperativeHandle as w,memo as v}from"react";import{OverlayTrigger as b,Tooltip as x,Spinner as k,Button as N,Modal as C,ButtonGroup as S,ToggleButton as z,Card as P,Alert as j,Pagination as T,Offcanvas as $,Row as H,Col as B}from"react-bootstrap";import{uniqueId as E,values as D,debounce as _}from"lodash";import F from"axios";import L from"query-string";import*as M from"retry-axios";import{enqueueSnackbar as O}from"notistack";import{useAsyncCallback as A}from"react-async-hook";import I,{css as R}from"styled-components";import U from"path";import W from"classnames";import{useUrlSearchParams as q}from"use-url-search-params";import V from"copy-to-clipboard";import{freeze as G,produce as Y}from"immer";import"react-intersection-observer";const K=()=>{document.body.style.setProperty("--vh",window.innerHeight/100+"px"),document.body.style.setProperty("--100vh",window.innerHeight+"px")};window.addEventListener("resize",K),K();const Q=t(e),J={confirmButtonText:"确定",cancelButtonText:"取消"},X={confirm:async e=>{const{isConfirmed:t}=await Q.fire({...J,icon:"warning",showCancelButton:!0,...e,async preConfirm(t){if(e.preConfirm)try{return await e.preConfirm(t)}catch(e){return e instanceof Error&&Q.showValidationMessage(e.message),!1}return!0}});return t},success:e=>{Q.fire({...J,toast:!0,position:"top",icon:"success",timer:2e3,showConfirmButton:!1,...e})},error:e=>{Q.fire({...J,toast:!0,position:"top",icon:"error",timer:5e3,showConfirmButton:!1,...e})},close:e=>{Q.close(e)},defaults:J};const Z=c({});function ee(e){return t=>{let{resolve:r,destroy:o,message:c}=t;const[l,m]=function(e){const t=a(null),[n,r]=i(e);return s((()=>{t.current&&(t.current(),t.current=null)}),[n]),[n,(e,n)=>{t.current="function"==typeof n?n:null,r(e)}]}(!0),p=d(Z),f=u((e=>{m(!1,(()=>{r(e)}))}),[m,r]),g=h((()=>({show:l,onHide:()=>f(),onExited:()=>o(),container:p.container})),[l,f,o]);return n(e,{resolve:f,state:g,message:c})}}function te(e){return t=>new Promise((r=>{const o=n(e,{resolve:r,destroy:()=>{ae(o)},message:t});oe(o)}))}let ne=()=>{},re=new Set;const oe=e=>{re=new Set(re),re.add(e),ne(re)},ae=e=>{re=new Set(re),re.delete(e),ne(re)};function ie(e,t){return te(ee(e))(t)}function se(e){let{tooltip:t,children:r,placement:o="bottom"}=e;return n(b,{placement:o,overlay:n(x,{id:E(),children:t}),children:r})}const ce=c(!1),le=m(((e,t)=>{let{loading:a,percent:i,disabled:s,children:c,tooltip:l,variant:u,...h}=e;d(ce)&&!u&&(u="link"),a&&(s=!0,c=r(o,{children:[n(k,{ref:t,as:"span",size:"sm",role:"status","aria-hidden":"true",animation:"border"}),i?r("span",{className:"ms-2",children:[i,"%"]}):null]}));const m=n(N,{ref:t,...h,variant:u,disabled:s,children:c});return l?n(se,{tooltip:l,children:n("span",{className:"d-inline-block",children:m})}):m})),de=function(e){let{state:t,message:{title:o,message:a,okText:i,cancelText:s},resolve:c}=e;return r(C,{...t,children:[n(C.Header,{children:n(C.Title,{as:"h5",children:o||"确认"})}),n(C.Body,{children:a}),r(C.Footer,{children:[n(le,{variant:"secondary",onClick:()=>c(),children:s||"取消"}),n(le,{onClick:()=>c(!0),children:i||"确定"})]})]})};const ue=e=>{let{header:t,children:a,footer:s,closable:c=!0,show:l,cancelText:d="取消",okText:u="确定",onOk:m,onCancel:p,onHide:f,okButtonProps:g,bodyAs:y,headerAs:w="h5",confirmLoading:v=!1,...b}=e;const[x,k]=i(!1),N=h((()=>n(le,{loading:x||v,variant:"primary",onClick:async e=>{k(!0);try{await(m?.(e)),e.defaultPrevented||f?.()}finally{k(!1)}},...g,children:u})),[g,u,m,f,x,v]),S=h((()=>n(le,{variant:"secondary",onClick:e=>{p?.(e),e.defaultPrevented||f?.()},children:d})),[p,f,d]),z={close:()=>{f?.()}};switch(typeof s){case"undefined":s=r(o,{children:[S,N]});break;case"function":s=s({okButton:N,cancelButton:S,action:z})}return r(C,{...b,onHide:f,show:l,children:[t&&n(C.Header,{closeButton:c,children:n(C.Title,{as:w,children:t})}),n(C.Body,{as:y,children:a}),s&&n(C.Footer,{children:s})]})};ue.Message=function(e){const[t,r]=i(re);return s((()=>{ne=r}),[]),n(Z.Provider,{value:e,children:Array.from(t).map(((e,t)=>n(l,{children:e},`message-${t}`)))})},ue.confirm=function(e){return te(ee(de))(e)},ue.show=ie;const he=["default","error","warning","success","info"].reduce(((e,t)=>(e[t]=(e,n)=>O(e,{variant:t,autoHideDuration:3e3,anchorOrigin:{vertical:"top",horizontal:"center"},...n}),e)),{});function me(e){return e&&"object"==typeof e}M.attach(),F.defaults.raxConfig={retryDelay:2e3,backoffType:"static",shouldRetry:e=>{let{config:t,response:n}=e;return!(t.raxConfig?.retryDecider&&!t.raxConfig.retryDecider())&&("GET"===t.method?.toUpperCase()&&449===n?.status)}},F.defaults.maxContentLength=1/0,F.defaults.maxBodyLength=1/0,F.defaults.baseURL="/api",F.defaults.authTokenName="authorization",F.interceptors.request.use((e=>{const t=e.authTokenName;if(t){const n=localStorage.getItem(t);n&&(e.headers={Authorization:`Bearer ${n}`,...e.headers})}return e}),(e=>Promise.reject(e))),F.interceptors.response.use((e=>(201===e.status&&e.data.location&&(window.location.href=e.data.location,e.data=void 0),e)),(e=>{if(F.isAxiosError(e)&&e.response){const{data:t,status:n}=e.response;401===n?e.errors="Unauthorized":me(t)?422===n?e.errors=t:"message"in t&&(e.errors=t.message):e.errors=t,"string"!=typeof e.errors?e.message=Object.values(e.errors).join("<br />"):e.message=e.errors}return Promise.reject(e)}));const pe=F.isAxiosError,fe=e=>{if(!F.isAxiosError(e))throw e;he.error(e.message)},ge=async function(e){if(e="string"==typeof e?{url:e}:e,(e={paramsSerializer:function(e){return L.stringify(e,{sort:!1,skipNull:!0,skipEmptyString:!0,arrayFormat:"bracket"})},...e}).onMessage){let t=0,n="",r=null;const o=e.onMessage;e.onDownloadProgress=e=>{const a=e.target,{responseText:i}=a;for(;t<e.loaded;){const e=i.substring(t,++t);if(n+=e,"\n"===e){if(r||(r={id:"",event:"",data:""}),"\n"===n)o(r),r=null;else{const e=n.match(/^data:(?<data>.*)/);e&&(r.data=e.groups.data.trim())}n=""}}}}const{data:t}=await F.request(e);return t};ge.defaults=F.defaults,ge.interceptors=F.interceptors;function ye(e){const t=(()=>{const e=a(!1);return s((()=>(e.current=!1,()=>{e.current=!0})),[]),e})(),[n,r]=i(e);return[n,u((e=>{t.current||r(e)}),[])]}function we(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{locale:n="zh-CN",currency:r=!0,...o}=t;let a;a=r?{style:"currency",currency:"CNY"}:{minimumFractionDigits:2};return new Intl.NumberFormat(n,{...a,...o}).format(e)}function ve(e){let{manual:t,refreshDeps:n,...r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{execute:o,currentParams:a,error:i,...c}=A((async t=>(e="string"==typeof e?{url:e}:e,await ge({...e,...t}))),r);s((()=>{if(!t&&!n)try{o()}catch{}}),[]),s((()=>{n&&l()}),n);const l=u((async()=>{try{a?await o(...a):await o()}catch{}}),[o,a]);if(i&&pe(i)){const e=i.errors;i=new Error("string"==typeof e?e:D(e).join(""))}return{refresh:l,execute:o,error:i,...c}}function be(e){let{active:t,inverted:r,...o}=e;return n(xe,{$active:t,$inverted:r,...o})}I.div`
2
- position: relative;
3
- `;const xe=I.div`
4
- display: ${e=>e.$active?"flex":"none"};
5
- position: absolute;
6
- top: 0 !important;
7
- left: 0 !important;
8
- width: 100%;
9
- height: 100%;
10
- text-align: center;
11
- vertical-align: middle;
12
- padding: 1em;
13
- background-color: ${e=>e.$inverted?"rgba(255, 255, 255, .85)":"rgba(0, 0, 0, .85)"};
14
- opacity: ${e=>e.$active?1:0};
15
- line-height: 1;
16
- animation-fill-mode: both;
17
- animation-duration: .5s;
18
- transition: background-color .5s linear;
19
- flex-direction: column;
20
- align-items: center;
21
- justify-content: center;
22
- user-select: none;
23
- will-change: opacity;
24
- z-index: 990;
25
- `;function ke(e){let{loading:t=!0,children:o,variant:a="primary",animation:i="border",wrap:s,...c}=e;return t?(o&&(o=n("p",{className:"mt-3 text-secondary",children:o})),o=r(be,{inverted:!0,active:!0,children:[n(k,{animation:i,variant:a,...c}),o]}),s?n(Ne,{$height:"number"==typeof s?s:150,children:o}):o):null}const Ne=I.div`
26
- position: relative;
27
- height: ${e=>`${e.$height}px`};
28
- `,Ce=p((async()=>{const{QRCodeSVG:e}=await import("qrcode.react");return{default:e}}));function Se(e){return n(f,{fallback:null,children:n(Ce,{...e})})}const ze=function(e){let{state:t,message:r,resolve:o}=e;const i=a(!0),{result:c,checkUrl:l,onComplete:d}=r,[u,h]=ye(!1);return s((()=>{ge({url:l,method:"post",data:{order_no:c.order_no},raxConfig:{shouldRetry:e=>i.current&&449===e.response?.status}}).then((()=>{d?.(),o()})).catch((()=>null))}),[]),n(ue,{...t,centered:!0,onHide:()=>{i.current=!1,t.onHide()},backdrop:"static",header:"支付结果",okText:"已完成支付",okButtonProps:{loading:u},onOk:async e=>{e.preventDefault();try{h(!0),await ge({url:l,method:"post",data:{order_no:c.order_no,force:!0},raxConfig:{shouldRetry:()=>!1}}),d?.(),o()}catch(e){pe(e)&&he.error(e.message)}finally{h(!1)}},cancelText:"取消",children:"请在新打开的页面上进行支付,支付完成后再关闭此窗口"})},Pe=function(e){let{state:t,message:o,resolve:i}=e;const c=a(!0),{result:{pay_options:l,order_no:d},checkUrl:u,onComplete:h}=o,[m,p]=ye(l.channels.alipay?"alipay":"wechat"),[f,g]=ye(!1);s((()=>{ge({url:u,method:"post",data:{order_no:d},raxConfig:{shouldRetry:e=>c.current&&449===e.response?.status}}).then((()=>{h?.(),i()})).catch((()=>null))}),[]);const{loading:y,result:w}=ve({url:l.url,method:"POST",data:{channel:m,order_no:d}},{refreshDeps:[m]});return r(ue,{...t,onHide:()=>{c.current=!1,t.onHide()},centered:!0,backdrop:"static",header:"收银台",okText:"已完成支付",okButtonProps:{loading:f},onOk:async e=>{e.preventDefault();try{g(!0),await ge({url:u,method:"post",data:{order_no:d,force:{channel:m}},raxConfig:{shouldRetry:()=>!1}}),h?.(),i()}catch(e){pe(e)&&he.error(e.message)}finally{g(!1)}},cancelText:"取消",children:[r("dl",{className:"row",children:[n("dt",{className:"col-3",children:"商品名称"}),n("dd",{className:"col-9",children:l.subject})]}),r("dl",{className:"row",children:[n("dt",{className:"col-3",children:"支付金额"}),n("dd",{className:"col-9 text-success h3",children:we(l.amount/100)})]}),r("dl",{className:"row",children:[n("dt",{className:"col-3",children:"支付方式"}),n("dd",{className:"col-9",children:r(S,{children:[l.channels.alipay&&n(z,{id:"payment-alipay",type:"radio",variant:"alipay"===m?"primary":"outline-primary",name:"alipay",value:"alipay",checked:"alipay"===m,onChange:()=>p("alipay"),children:"支付宝"}),l.channels.alipay&&n(z,{id:"payment-wechat",type:"radio",variant:"wechat"===m?"primary":"outline-primary",name:"wechat",value:"wechat",checked:"wechat"===m,onChange:()=>p("wechat"),children:"微信支付"})]})})]}),r("dl",{className:"row mb-0",children:[n("dt",{className:"col-3",children:"扫码支付"}),r("dd",{className:"col-9",children:[n(ke,{loading:y,wrap:200}),w&&n(Se,{size:200,value:w.data})]})]})]})};function je(e){const{result:t}=e;t.pay_url?(window.opener=null,window.innerWidth<992?location.href=t.pay_url:(window.open(t.pay_url),ie(ze,e))):ie(Pe,e)}function Te(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return e>=1024**3?(e/1024**3).toFixed(t)+"G":e>=1048576?(e/1048576).toFixed(t)+"M":(e/1024).toFixed(t)+"K"}function $e(e){const t=U.extname(e);return!(!/^data:image\//.test(e)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(t))||!/^data:/.test(e)&&!t}function He(e){const t=document.createElement("a");return t.href=e,t.href}const Be={success:n("i",{className:"bi bi-check-circle-fill text-success"}),error:n("i",{className:"bi bi-exclamation-circle-fill text-danger"}),info:n("i",{className:"bi bi-info-circle-fill text-info"}),warning:n("i",{className:"bi bi-exclamation-triangle-fill text-warning"})};function Ee(e){let{className:t,status:o,title:a,icon:i,extra:s}=e;return!i&&o&&(i=Be[o]),r(De,{className:t,children:[i&&n(_e,{children:i}),a&&n(Fe,{children:a}),s&&n(Le,{children:s})]})}const De=I.div`
29
- padding: 48px 32px;
30
- `,_e=I.div`
31
- margin-bottom: 24px;
32
- text-align: center;
33
- font-size: 72px;
34
- `,Fe=I.div`
35
- color: rgba(0, 0, 0, .85);
36
- font-size: 24px;
37
- line-height: 1.8;
38
- text-align: center;
39
- `,Le=I.div`
40
- margin-top: 32px;
41
- text-align: center;
42
- `;function Me(e){let{children:t,title:a,className:i,...s}=e;return n(Oe,{className:W("border-0 shadow-sm",i),...s,children:r("div",{className:"card-body",children:[a&&r(o,{children:[n("h5",{children:a}),n("hr",{})]}),t]})})}const Oe=I(P)`
43
- &:not(:last-child) {
44
- margin-bottom: 1rem;
45
- }
46
- `;function Ae(e){let{errors:t}=e;return t?n(j,{variant:"danger",children:n("ul",{className:"mb-0",children:"string"==typeof t?n("li",{children:t}):Object.entries(t).map((e=>{let[t,r]=e;return n("li",{children:r},t)}))})}):null}function Ie(e){let{children:t,className:r,size:o="small",direction:a="horizontal"}=e;"string"==typeof o&&(o={small:8,middle:16,large:24}[o]);const i=g.map(t,(e=>{if(e)return n(Ue,{children:e})}));return n(Re,{className:r,$direction:a,$size:o,children:i})}const Re=I.div`
47
- display: inline-flex;
48
- align-items: center;
49
- gap: ${e=>e.$size}px;
50
-
51
- ${e=>"vertical"===e.$direction&&R`
52
- display: flex;
53
- flex-direction: column;
54
- align-items: inherit;
55
- `}
56
- `,Ue=I.div`
57
-
58
- `,We=p((()=>import("./steps-b_BcYIwk.js"))),qe=p((()=>import("./steps-b_BcYIwk.js").then((e=>{let{Step:t}=e;return{default:t}}))));function Ve(e){return n(f,{fallback:null,children:n(We,{...e})})}const Ge=function(e){return n(f,{fallback:null,children:n(qe,{...e})})};function Ye(e){let{title:t,content:o,footer:a}=e;return r(Me,{children:[n(Je,{children:t}),n(Qe,{children:o}),a&&n(Ke,{children:a})]})}Ve.Step=Ge;const Ke=I.div`
59
- margin-top: 9px;
60
- padding-top: 10px;
61
- border-top: 1px solid #f0f0f0;
62
- color: rgba(0, 0, 0, .65);
63
- `,Qe=I.div`
64
- color: rgba(0, 0, 0, .85);
65
- font-size: 24px;
66
- `,Je=I.div`
67
- margin-bottom: 4px;
68
- color: rgba(0, 0, 0, .45);
69
- font-size: 1.1rem;
70
- `;function Xe(){}function Ze(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function et(e){return"current_page"in e}function tt(e){let{total:t=0,onChange:r=Xe,defaultCurrent:o=1,defaultPageSize:a=10,className:c,...l}=e;const[d,m]=i(o),[p,f]=i(a);s((()=>{Ze(l.current)&&m(l.current)}),[l.current]),s((()=>{Ze(l.pageSize)&&f(l.pageSize)}),[l.pageSize]);const g=h((()=>Math.floor((t-1)/p)+1),[t,p]),y=u((e=>()=>{e!==d&&(m(e),r(e,p))}),[r,d,p]),w=d-1>0?d-1:0,v=d+1<g?d+1:g,b=[];let x=null,k=null,N=null,C=null;if(g<=7)for(let e=1;e<=g;e+=1){const t=d===e;b.push(n(T.Item,{active:t,onClick:y(e),children:e},e))}else{C=n(T.Last,{onClick:y(g)},"last"),N=n(T.First,{onClick:y(1)},"first"),x=n(T.Prev,{onClick:y(w)},"prev"),k=n(T.Next,{onClick:y(v)},"next");let e=Math.max(1,d-2),t=Math.min(d+2,g);d-1<=2&&(t=5),g-d<=2&&(e=g-4);for(let r=e;r<=t;r+=1){const e=d===r;b.push(n(T.Item,{active:e,onClick:y(r),children:r},r))}d-1>=4&&3!==d&&b.unshift(x),g-d>=4&&d!==g-2&&b.push(k),1!==e&&b.unshift(N),t!==g&&b.push(C)}return n(T,{className:c,children:b})}function nt(e){let{className:t,value:r,locale:a="zh-CN",currency:i=!0,options:s={}}=e;const c=h((()=>{let e;return e=i?{style:"currency",currency:"CNY"}:{minimumFractionDigits:2},new Intl.NumberFormat(a,{...e,...s})}),[i,a,s]);return t?n("span",{className:t,children:c.format(r)}):n(o,{children:c.format(r)})}function rt(e){let{loading:t,disabled:r,children:o,...a}=e;return n(N,{...a,disabled:t||r,children:t?"Loading…":o})}const ot=p((()=>import("./image-zoom-OrIPGqh0.js")));function at(e){return n(f,{fallback:null,children:n(ot,{...e})})}const it=m(((e,t)=>{let{url:n,method:r,confirm:o,onSuccess:a,children:i,disabled:s,as:c=le,onError:l,...d}=e;const[h,m]=ye(!1),p=u((async e=>{e.preventDefault(),e.stopPropagation();try{if(m(!0),o&&!await ue.confirm({message:o}))return;const e="string"==typeof n?{url:n,method:r}:{method:r,...n},t=await ge(e);a&&a(t)}catch(e){if(!(e instanceof Error))throw e;l?l(e):he.error(e.message,{preventDuplicate:!0})}finally{m(!1)}}),[n,r,m]);return y(c,{...d,disabled:s||h,onClick:p,ref:t},i)})),st=p((()=>import("./index-ytz-rTYp.js"))),ct=m(((e,t)=>n(f,{fallback:null,children:n(st,{...e,ref:t})}))),lt=p((()=>import("./index-Hmdc3ELq.js"))),dt=m(((e,t)=>n(f,{fallback:null,children:n(lt,{...e,ref:t})})));let ut=0;function ht(){let{onHide:e,onShow:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,r]=i(!1),[o,a]=i(`visible-${ut}`),s=u((()=>{r(!1),e&&e()}),[r,e]),c=u((()=>{a("visible-"+ ++ut)}),[a,ut]);return{visible:n,show:u((()=>{r(!0),t&&t()}),[r,t]),hide:s,state:{show:n,onHide:s,onExited:c,key:o}}}const mt=m(((e,t)=>{let{text:a,onOk:i,modalProps:s,children:c,onShow:l,onHide:d,confirmLoading:u,as:h=le,...m}=e;const{state:p,show:f,hide:g}=ht({onShow:l,onHide:d});w(t,(()=>({close:g})));const v=y(h,{...m,onClick:e=>{e.preventDefault(),e.stopPropagation(),f()}},a);return r(o,{children:[v,n(ue,{header:a,...s,...p,confirmLoading:u,onOk:async e=>{if(i){!1===await i()&&e.preventDefault()}},children:c})]})})),pt=m(((e,t)=>{let{text:o,onSuccess:s,onSubmit:c,buttonProps:l,modalProps:d,children:h,...m}=e;const[p,f]=i(!1),g=a(null),y=a(null);w(t,(()=>({close:()=>{g.current?.close()}})));const v=u((()=>(y.current?.submit(),!1)),[]),b=u((e=>{s&&s(e),g.current?.close()}),[s]),x=u((async(e,t)=>{c&&await c(e,t)&&g.current?.close()}),[c]);return n(mt,{ref:g,text:o,...l,modalProps:d,onOk:v,confirmLoading:p,children:r(ct,{...m,onSubmitting:f,ref:y,onSuccess:b,onSubmit:x,children:[h,n("input",{type:"submit",hidden:!0})]})})}));function ft(e){let{header:t,children:o,closable:a=!0,show:i,onHide:s,bodyAs:c,headerAs:l="h5",...d}=e;return r($,{...d,onHide:s,show:i,children:[t&&n($.Header,{closeButton:a,children:n($.Title,{as:l,children:t})}),n($.Body,{as:c,children:o})]})}const gt=m(((e,t)=>{let{text:a,offcanvasProps:i,children:s,onShow:c,onHide:l,as:d=le,...u}=e;const{state:h,show:m,hide:p}=ht({onShow:c,onHide:l});w(t,(()=>({close:p})));const f=y(d,{...u,onClick:m},a);return r(o,{children:[f,n(ft,{header:a,...i,...h,children:s})]})}));function yt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=a(e);return s((()=>{n.current=e})),u((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.current?.(...t)}),t)}function wt(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=((e,t)=>e!==t)}=e,a=yt(r),s=yt(o),[c,l]=i(n),d=void 0!==t,u=d?t:c,h=yt((e=>{const t="function"==typeof e?e(u):e;s(u,t)&&(d||l(t),a(t))}),[d,a,u,s]);return[u,h]}const vt=m(((e,t)=>{let{className:o,rowClassName:c,paginate:l=!0,sync:d=!1,columns:h=3,source:m,renderItem:p,renderEmpty:f}=e;const[g,y]=i([]),[v,b]=i(l?{total:0,current:1,pageSize:10}:null),[x,k]=i(!0),[N,C]=q({}),[S,z]=wt({value:d?N.page||1:void 0,defaultValue:1,onChange:e=>{d&&C({page:e||void 0})}}),P=u((async function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||k(!0);try{let e;const t={page:S>1?S:void 0};e="string"==typeof m?await ge({url:m,params:t}):await m(t),l&&et(e)&&(e.last_page>1&&b({total:e.total,current:e.current_page,pageSize:e.per_page}),e=e.data),y(e)}catch(e){}finally{k(!1)}}),[m,y,S]);s((()=>{P()}),[S]),s((()=>{j.current={reload:P}}),[P]);const j=a({reload:P});return w(t,(()=>j.current)),r(bt,{className:o,children:[n(ke,{wrap:!0,loading:x}),0===g.length&&!x&&f?.(),n(H,{className:c,children:g.map(((e,t)=>n(B,{className:"d-flex",md:12/h,children:p(e)},`card-${t}`)))}),v&&n(xt,{...v,onChange:z})]})})),bt=I.div`
71
-
72
- `,xt=I(tt)`
73
- margin-bottom: 0;
74
- justify-content: flex-end;
75
- margin-top: 1rem;
76
- `;var kt=v(vt);function Nt(){const[e,t]=i(!1),n=a();return s((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{copied:e,copy:u((e=>{V(e),t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{t(!1),n.current=void 0}),3e3)}),[])}}function Ct(e){let{as:t="div",className:r,content:o,tooltip:a=!0,placement:i}=e;const{copy:s,copied:c}=Nt(),l=a?n("i",c?{className:"bi bi-clipboard-check"}:{className:"bi bi-clipboard"}):c?"已复制":"复制",d=y(t,{role:"button",className:r,onClick:()=>{"function"==typeof o&&(o=o()),s(o)}},l);return a?n(se,{tooltip:c?"已复制":"复制",placement:i,children:d}):d}const St=c({images:new Map,current:0,setCurrent:()=>null,setShow:()=>null,registerImage:()=>()=>null,getId:()=>0}),zt=p((()=>import("./index-jgv6xMhc.js"))),Pt=p((()=>import("./image-NelhiCI3.js")));function jt(e){return n(f,{fallback:null,children:n(zt,{...e})})}jt.Image=function(e){return n(f,{fallback:null,children:n(Pt,{...e})})},jt.Context=St;const Tt=p((()=>import("./infinite-scroller-_6I5a80t.js"))),$t=m(((e,t)=>n(f,{fallback:null,children:n(Tt,{...e,ref:t})}))),Ht=p((()=>import("./slider-KuqHu6UH.js")));function Bt(e){return n(f,{fallback:null,children:n(Ht,{...e})})}function Et(e,t,n){const r=a(e),o=a(_(e,t,n));return s((()=>{r.current=e})),s((()=>{o.current=_((function(){r.current(...arguments)}),t,n)}),[t,n]),o.current}function Dt(e){const[t,n]=i((()=>G("function"==typeof e?e():e,!0)));return[t,u((e=>{n("function"==typeof e?Y(e):G(e))}),[])]}function _t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lg";function t(){const t=e=>{switch(e){case"xxl":return window.innerWidth>=1400;case"xl":return window.innerWidth>=1200;case"lg":return window.innerWidth>=992;case"md":return window.innerWidth>=768;case"sm":return window.innerWidth>=576;default:return!0}};return{isMobile:!t(e),width:window.innerWidth,match:t}}const[n,r]=i(t),o=Et((()=>{r(t())}),100);return s((()=>(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o))),[]),n}var Ft;!function(e){e[e.init=0]="init",e[e.play=1]="play",e[e.pause=2]="pause",e[e.end=3]="end"}(Ft||(Ft={}));const Lt=(e,t)=>{let n=a(!1);const[r,o]=i((()=>{const{lang:e="default",name:n=""}=t.voice||{};return{isPlaying:!1,status:Ft[Ft.init],lang:t.lang||"default",voiceInfo:{lang:e,name:n},rate:t.rate||1,pitch:t.pitch||1,volume:t.volume||1}})),c=u((()=>{n.current&&o((e=>({...e,isPlaying:!0,status:Ft[Ft.play]})))}),[]),l=u((()=>{n.current&&o((e=>({...e,isPlaying:!1,status:Ft[Ft.pause]})))}),[]),d=u((()=>{n.current&&o((e=>({...e,isPlaying:!1,status:Ft[Ft.end]})))}),[]);return s((()=>{n.current=!0;const r=new SpeechSynthesisUtterance(e);return t.lang&&(r.lang=t.lang),t.voice&&(r.voice=t.voice),r.rate=t.rate||1,r.pitch=t.pitch||1,r.volume=t.volume||1,r.onstart=c,r.onpause=l,r.onresume=c,r.onend=d,window.speechSynthesis.speak(r),()=>{n.current=!1}}),[]),r};function Mt(e,t){s((()=>{const t=e();!async function(){await t}()}),t)}export{kt as A,le as B,Me as C,Ct as D,Ae as E,ct as F,jt as G,$t as H,St as I,Bt as J,ve as K,ke as L,X as M,nt as N,gt as O,tt as P,Se as Q,Ee as R,Ie as S,ce as T,ht as U,Nt as V,Lt as W,Mt as X,pe as Y,fe as Z,_t as a,wt as b,ye as c,Dt as d,he as e,me as f,Te as g,we as h,et as i,$e as j,He as k,Ve as l,Ge as m,Ye as n,rt as o,at as p,it as q,ge as r,dt as s,pt as t,Et as u,mt as v,je as w,ue as x,ft as y,se as z};