@elcrm/telegram 0.0.87 → 0.0.88
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.
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -675,7 +675,7 @@ var $t;
|
|
|
675
675
|
}
|
|
676
676
|
r.Add = f;
|
|
677
677
|
function c(R, d = Date.now().toString()) {
|
|
678
|
-
return {
|
|
678
|
+
return J[d] = {}, {
|
|
679
679
|
Open: (m) => {
|
|
680
680
|
r.Add(
|
|
681
681
|
/* @__PURE__ */ s.jsx(
|
|
@@ -701,7 +701,7 @@ var $t;
|
|
|
701
701
|
}
|
|
702
702
|
r.Close = p;
|
|
703
703
|
function E(R, d, x, g) {
|
|
704
|
-
J.i && (g && (
|
|
704
|
+
J.i && (g && (x.callback = g), J.i(`${R}/modals/${d}.tsx`).then((m) => {
|
|
705
705
|
m.default.Open(x);
|
|
706
706
|
}));
|
|
707
707
|
}
|
package/dist/index.umd.js
CHANGED
|
@@ -28,7 +28,7 @@ Check the top-level render call using <`+o+">.")}return t}}function Ge(e,t){{if(
|
|
|
28
28
|
<%s {...props} />
|
|
29
29
|
React keys must be passed directly to JSX without using spread:
|
|
30
30
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,ke,U,Pt,U),Xe[U+ke]=!0}}return e===f?Et(k):Rt(k),k}}function jt(e,t,o){return Qe(e,t,o,!0)}function At(e,t,o){return Qe(e,t,o,!1)}var Ot=At,Ct=jt;Ae.Fragment=f,Ae.jsx=Ot,Ae.jsxs=Ct}()),Ae}process.env.NODE_ENV==="production"?ot.exports=Kt():ot.exports=Gt();var s=ot.exports;let z={};var at;(r=>{function n({children:_,onCallbackModal:d,nameModal:j}){const[m,v]=E.useState(!1),[x,I]=E.useState(!1);if(z[j].onClose=()=>{w.default.BackButton(!1),I(!0),setTimeout(()=>{v(!1),I(!1),d==null||d(),z.x(j)},300)},E.useEffect(()=>{m?z[j].onClose():(w.default.BackButton({callback:()=>z[j].onClose()}),v(!0))},[]),!!m)return s.jsx("div",{className:`modal-overlay ${x?"closing":""}`,children:s.jsx("div",{className:`modal-popup ${x?"closing":""}`,children:s.jsx("div",{children:_})})})}r.Content=n;function a({import_modules:_}){let[d,j]=E.useState([]);return z.x=m=>{j(m?d.filter(v=>v.key!==m):[])},E.useEffect(()=>{_&&(z.i=_)},[]),z.add=(m,v=Date.now())=>{j([...d,{key:v,item:m}])},s.jsx(s.Fragment,{children:d.map(m=>m.item)})}r.Init=a;function f(_,d){z.add(s.jsx(n,{onCallbackModal:z["callback_modal"+d],nameModal:d||"",children:_},String(Date.now())),d)}r.Add=f;function u(_,d=Date.now().toString()){return{Open:v=>{r.Add(s.jsx(_,{...v,onCallbackModal:x=>{var I;(I=v.callback)==null||I.call(v,x)},nameModal:d},new Date().getTime()),d)}}}r.Create=u;function p(_){z[_].onClose()}r.Close=p;function S(_,d,j,m){z.i&&(m&&(
|
|
31
|
+
<%s key={someKey} {...props} />`,ke,U,Pt,U),Xe[U+ke]=!0}}return e===f?Et(k):Rt(k),k}}function jt(e,t,o){return Qe(e,t,o,!0)}function At(e,t,o){return Qe(e,t,o,!1)}var Ot=At,Ct=jt;Ae.Fragment=f,Ae.jsx=Ot,Ae.jsxs=Ct}()),Ae}process.env.NODE_ENV==="production"?ot.exports=Kt():ot.exports=Gt();var s=ot.exports;let z={};var at;(r=>{function n({children:_,onCallbackModal:d,nameModal:j}){const[m,v]=E.useState(!1),[x,I]=E.useState(!1);if(z[j].onClose=()=>{w.default.BackButton(!1),I(!0),setTimeout(()=>{v(!1),I(!1),d==null||d(),z.x(j)},300)},E.useEffect(()=>{m?z[j].onClose():(w.default.BackButton({callback:()=>z[j].onClose()}),v(!0))},[]),!!m)return s.jsx("div",{className:`modal-overlay ${x?"closing":""}`,children:s.jsx("div",{className:`modal-popup ${x?"closing":""}`,children:s.jsx("div",{children:_})})})}r.Content=n;function a({import_modules:_}){let[d,j]=E.useState([]);return z.x=m=>{j(m?d.filter(v=>v.key!==m):[])},E.useEffect(()=>{_&&(z.i=_)},[]),z.add=(m,v=Date.now())=>{j([...d,{key:v,item:m}])},s.jsx(s.Fragment,{children:d.map(m=>m.item)})}r.Init=a;function f(_,d){z.add(s.jsx(n,{onCallbackModal:z["callback_modal"+d],nameModal:d||"",children:_},String(Date.now())),d)}r.Add=f;function u(_,d=Date.now().toString()){return z[d]={},{Open:v=>{r.Add(s.jsx(_,{...v,onCallbackModal:x=>{var I;(I=v.callback)==null||I.call(v,x)},nameModal:d},new Date().getTime()),d)}}}r.Create=u;function p(_){z[_].onClose()}r.Close=p;function S(_,d,j,m){z.i&&(m&&(j.callback=m),z.i(`${_}/modals/${d}.tsx`).then(v=>{v.default.Open(j)}))}r.Open=S})(at||(at={}));function Dt(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{}}const Bt={key:"Y0zt37HgOx-BY7SQjYVmrqhPkO41Ii2Jcb9yydUDPf6",iterations:7,saltLength:16};function Ft(r){const n=Dt();n.CRYPTO_PARAMS?n.CRYPTO_PARAMS={...n.CRYPTO_PARAMS,...r}:n.CRYPTO_PARAMS={...Bt,...r}}function et(){return Dt().CRYPTO_PARAMS||Bt}const tt=r=>{let n=0;for(let f=0;f<r.length;f++){const u=r.charCodeAt(f);n=(n<<5)-n+u,n=n&n}n=Math.abs(n);let a="";for(let f=0;f<64;f++){const u=(n^f*197)&255;a+=u.toString(16).padStart(2,"0")}return a},Wt=(r,n)=>{let a=r+n;for(let u=0;u<et().iterations;u++)a=tt(a);const f=new Uint8Array(32);for(let u=0;u<32;u++)f[u]=parseInt(a.substring(u*2,u*2+2),16);return f},Ut=(r,n)=>{const a=new Uint8Array(r.length),f=new Uint8Array(r.length);let u=0;for(let p=0;p<r.length;p++){const S=p%n.length;u=n[S]+p+u&255,f[p]=u}for(let p=0;p<r.length;p++)a[p]=r[p]^f[p];return a},Zt=r=>new TextEncoder().encode(r),Xt=r=>new TextDecoder().decode(r),Qt=r=>{let n="";for(let a=0;a<r.length;a+=8192){const f=r.slice(a,Math.min(a+8192,r.length));n+=String.fromCharCode.apply(null,Array.from(f))}return btoa(n)},er=r=>{const n=atob(r),a=new Uint8Array(n.length);for(let f=0;f<n.length;f++)a[f]=n.charCodeAt(f);return a},tr=r=>{try{const n=tt(Date.now().toString()+Math.random()).substring(0,et().saltLength*2),a=tt(r+n).substring(0,8),f=Wt(et().key,n),u=Zt(r),p=Ut(u,f),S=Qt(p);return`${n}.${S}.${a}`}catch{throw new Error("Не удалось зашифровать данные")}},rr=r=>{try{const n=r.split(".");if(n.length!==3)throw new Error("Неверный формат зашифрованных данных");const a=n[0],f=n[1],u=n[2],p=Wt(et().key,a),S=er(f),_=Ut(S,p),d=Xt(_);if(tt(d+a).substring(0,8)!==u)throw new Error("Контрольная сумма не совпадает");return d}catch{return""}};var le;(r=>{r.setKey=n=>{Ft({key:n})},r.enCode=n=>{try{const a=JSON.stringify(n);return tr(a)}catch{throw new Error("Не удалось зашифровать объект")}},r.deCode=n=>{try{if(!n||n.length<10)return!1;const a=rr(n);return a&&JSON.parse(a)||!1}catch{return!1}},r.setSecurityParams=(n,a)=>{Ft({iterations:n,saltLength:a})}})(le||(le={}));var Oe={};/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.production.min.js
|
|
34
34
|
*
|