@sidesuit/pkg-module-proxy 0.0.9 → 0.0.11
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.js +1 -1
- package/dist/utils.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";function e(e){return e.split("").reverse().map((e=>String.fromCharCode(e.charCodeAt(0)-1))).join("")}function n(n){const[t,r="default"]=e(n).split("|");return[t,r]}function t(e){const n=function(e){let n=e.slice(e.indexOf("{")+1,e.lastIndexOf("}"));return n||""}(e),t=function(e){let n=e.replace(r,""),t=n.slice(n.indexOf("(")+1,n.indexOf(")")).match(o);null===t&&(t=[]);return t}(e);return
|
|
1
|
+
!function(){"use strict";function e(e){return e.split("").reverse().map((e=>String.fromCharCode(e.charCodeAt(0)-1))).join("")}function n(n){const[t,r="default"]=e(n).split("|");return[t,r]}function t(e){const n=function(e){let n=e.slice(e.indexOf("{")+1,e.lastIndexOf("}"));return n||""}(e),t=function(e){let n=e.replace(r,""),t=n.slice(n.indexOf("(")+1,n.indexOf(")")).match(o);null===t&&(t=[]);return t}(e),i="id_"+function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var t=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==n?t:3&t|8).toString(16)}))}();let c=`window['__fnCache'][${i}]= function(${t}){${n}}`;var s=document.createElement("script");try{s.appendChild(document.createTextNode(c))}catch(d){s.text=c}let l=document.getElementsByTagName("head")[0]||document.documentElement;return l.appendChild(s),l.removeChild(s),window.__fnCache[i]}window.__fnCache=window.__fnCache||{};let r=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,o=/([^\s,]+)/g;function i(e,n,t=!1){const r=n.split(/\.|\[(\d+)\]/).filter(Boolean);let o,i=e;for(let c=0;c<r.length;c++){if(o=i,i=i[r[c]],void 0===i)return t?o:void 0}return t?o:i}(r=>{if(window.GZUAwCFuFf)return;window.GZUAwCFuFf=!0;const o={},c={},s={},l={},d={};let u=window.__d;window.__d&&(~u.toString().indexOf("__d_stub")?delete window.__d:u=new Proxy(window.__d,{apply:(e,n,t)=>(t=a(t),e.apply(n,t))})),Object.defineProperty(window,"__d",{get:function(){return u},set:function(e){u=new Proxy(e,{apply:(e,n,t)=>(t=a(t),e.apply(n,t))})}});const f=[];function a(e){let[n,r,d]=e;return"string"!=typeof n||f.includes(n)||(f.push(n),e[2]=function(e,n){if(!s[n])return e;const r=s[n];r.sort(((e,n)=>e.options.order-n.options.order));const o=r.find((e=>e.options.skipOthers));if(o)return t(o.replacement(e.toString()));return t(r.reduce(((e,n)=>e=n.replacement(e)),e.toString()))}(e[2],n),e[2]=function(e,n){return c[n]?new Proxy(e,{apply(e,t,r){if(r[5]&&r[5].dependencies)for(let n=0;n<r[5].dependencies.length;n++)r.push(r[5].dependencies[n].exports);const o=e.apply(t,r);return c[n].map((e=>{e(r)})),o}}):e}(e[2],n),e[2]=function(e,n){if(!o[n]||0===o[n].length)return e;const t=o[n];t.sort(((e,n)=>e.options.order-n.options.order));const r=t.reduce(((e,n)=>{const t=n.options.definerPath;return e[t]=e[t]||[],e[t].push(n),e}),{});return new Proxy(e,{apply(e,o,c){const s=e.apply(o,c);if(c[5]&&c[5].dependencies)for(let n=0;n<c[5].dependencies.length;n++)c.push(c[5].dependencies[n].exports);const l=c[3],d=(0,c[2])("CometErrorBoundary.react"),u=e=>(console.error(e),"Error");for(let f in r){const e=i(c,f,!0),o=f.split(".").pop(),s=i(c,f);e[o]=function(...e){const o=s.apply(s,e),i=e[0],{useState:a,useEffect:m,jsx:w,Fragment:g}=l("react"),[h,y]=a(0),b=()=>{if(!r[f])return o;const s=r[f].find((e=>e.options.skipOthers));if(s&&s.component)return w(s.fallback?d:g,{fallback:s.fallback,children:w(s.component,{payload:i,SourceCmp:o,lastCmp:o,definedArgs:c,callingArgs:e,extraPayloadFromDefiner:s.options.extraPayload,proxyCount:0,removeThisModuleProxy(){const e=r[f].indexOf(s);~e&&r[f].splice(e,1)}})});let l=0;return r[f].reduce(((s,u)=>(u.component&&(s=w(u.fallback?d:g,{fallback:u.fallback,children:w(u.component,{payload:i,SourceCmp:o,lastCmp:s,extraPayloadFromDefiner:u.options.extraPayload,proxyCount:l,definedArgs:c,callingArgs:e,removeThisModuleProxy(){const e=r[f].indexOf(u);if(~e){const o=t.indexOf(u);r[f].splice(e,1),t.splice(o,1),x(n)}}})}),l++),s)),o)};return m((()=>{const e=p(n,(()=>{y(Math.random())}));return()=>e()}),[]),w(d,{fallback:u,children:b()})}}return s}})}(e[2],n),l[n]&&console.log(n,e)),e}function p(e,n){return d[e]=d[e]||[],d[e].push(n),()=>{const t=d[e].findIndex(n);d[e].splice(t,1)}}function x(e){if(d[e])for(let n of d[e])n()}r.zKjQYvgSmF=function(n){return window.require(e(n))},r.zKjQYvcSmF=(e,t,r)=>{const[i,c]=n(e);o[i]||console.error(`Undefined module ${i} from ${c} #1`);const s=o[i].find((e=>e.extensionId===c));if(!s)return console.error(`Undefined module ${i} from ${c} #2`);const{fallback:l}=r||{};s.component=t,s.fallback=l,x(i)},r.zKjQYVcSmF=(e,t)=>{const r=Object.assign({order:10,skipOthers:!1,beforeInject:()=>!0,afterInject:()=>{},extraPayload:void 0,definerPath:"[6].default"},t),[i,c]=n(e);o[i]=o[i]||[],o[i].push({extensionId:c,moduleName:i,options:r,component:void 0,fallback:void 0})},r.zKjQYwcSmF=n=>{l[e(n)]=!0},r.zKjQYvcSfF=(e,t,r)=>{const o=Object.assign({order:10,skipOthers:!1},r),[i,c]=n(e);s[i]=s[i]||[],s[i].push({moduleName:i,options:o,replacement:t})},r.zKGQYvcSmF=(n,t)=>{n=e(n),c[n]=c[n]||[],c[n].push(t)},r.zKjQYvcSfF("umvbgfe}spssf.cg",(e=>e.replace('debugjs.")','debugjs.");console.error(b.stackFrames.slice(0,10).map(e=>e.text).join("\\n"))'))),r.zKjQYvcSfF("umvbgfe}djttbmd/epsq.NPEudbfS",(e=>e.replace(/Error\(\w\(418\)\)/g,"void 0"))),r.zKjQYvcSfF("umvbgfe}fvfvRitjmcvQzbmfS0fsput0fnjuovs.zbmfs",(e=>e.replace(/,(\w)=new\(b\("relay-runtime\/mutations\/RelayRecordSourceProxy"/,',$1=window["RlbiULLGWt"]=new(b("relay-runtime/mutations/RelayRecordSourceProxy"')))})(window),(e=>{if(e.vTUNhjwVvX)return;e.vTUNhjwVvX=!0;e.zKjqYvcSmF=(n,t,r)=>{const o=e.RlbiULLGWt,i="string"==typeof n?o.get(n):n;if(void 0===i)return i;let c=(s=t.replace(/\[(\d+)\]/g,".$1"),s.replace(/\((.*?)\.(.*?)\)/g,"($1_*_*_*_*_$2)")).split(".");var s;c=c.map((e=>function(e){return e.replaceAll("_*_*_*_*_",".")}(e)));let l=i;for(let e=0;e<c.length;e++){const n=c[e];if("*"===n)return l;if(0===n.indexOf("^^")){const[e,t]=d(n.substring(2));if(l=l.getLinkedRecords(e,t),void 0===l)return u(n),l}else if(0===n.indexOf("^")){const[e,t]=d(n.substring(1));if(l=l.getLinkedRecord(e,t),null==l)return u(n),l}else if(n.match(/^\d+$/)){if(l=l[parseInt(n)],null==l)return u(n),l}else{const[e,t]=d(n);if(l=l.getValue(e,t),null==l)return u(n),l}}return l;function d(e){const[n,t]=e.split("{");if(!t)return[n,{}];if(!r)throw new Error("args undefined");return[n,r[t.substring(0,t.length-1)]||{}]}function u(o){~e.location.search.indexOf("debug")&&console.warn("undefined value",{id:n,path:t,args:r,currentPath:o})}}})(window),(n=>{if(window.xmxlgxMDjA)return;window.xmxlgxMDjA=!0;let t={};n.zKGQYvcSmF("sf{jmbjsfTbubEfmqnjTsiy",(e=>{const n=e[4].exports.default;e[4].exports.default=function(...e){const r=e[0].fb_api_req_friendly_name;return r&&t[r]&&(e[0]=t[r].reduce(((e,n)=>e=n(e)),e[0])),n.apply(n,e)}}));n.zkjQYvcSmF=(n,r)=>{n=e(n),t[n]=t[n]||[],t[n].push(r)}})(window)}();
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function getModuleName(name: string): [name: string, extensionId: string];
|
|
2
|
-
export declare function parseFunction(fnStr: string):
|
|
2
|
+
export declare function parseFunction(fnStr: string): any;
|
|
3
3
|
export declare function getWithParent(obj: any, path: string, getParent?: boolean): any;
|
|
4
|
+
export declare function uuidv4(): string;
|