@sidesuit/pkg-module-proxy 2.2.3 → 2.2.4
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/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";function e(e){const[
|
|
1
|
+
!function(){"use strict";function n(n){return n}function e(e){const[t,r="default"]=n(e).split("|");return[t,r]}function t(n){const e=r(n),t=_(n),o="id_"+s();let i="window['__fnCache'][\""+o+'"]= function('+t+"){"+e+"}",c=document.createElement("script");try{c.appendChild(document.createTextNode(i))}catch(f){c.text=i}let u=document.getElementsByTagName("head")[0]||document.documentElement;return u.appendChild(c),u.removeChild(c),window.__fnCache[""+o]}function r(n){return n.slice(n.indexOf("{")+1,n.lastIndexOf("}"))||""}window.__fnCache=window.__fnCache||{};let o=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,i=/([^\s,]+)/g;function _(n){let e=n.replace(o,""),t=e.slice(e.indexOf("(")+1,e.indexOf(")")).match(i);return null===t&&(t=[]),t}function c(n,e,t=!1){const r=e.split(/\.|\[(\d+)\]/).filter(Boolean);let o,i=n;for(let _=0;_<r.length;_++)if(o=i,i=i[r[_]],void 0===i)return t?o:void 0;return t?o:i}function s(){const n=function(n,e){return n*e},e=function(n,e){return n|e};let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){var o=(t+n(16,Math.random()))%16|0;return t=Math.floor(t/16),("x"==r?o:e(3&o,8)).toString(16)})}const u="relay-runtime/store/RelayPublishQueue",f="ReactDOM-prod.classic",d="fb-error";(r=>{const o=function(n,e){return n(e)},i=function(n,e){return n+e},_=function(n,e){return n+e};if(window[Symbol.for("___ig")])return r.___xf=window.___xf,r.___km=window.___km,r.___pt=window.___pt,r.___wd=window.___wd,r.___cr=window.___cr,void(r.___gi=window.___gi);window[Symbol.for("___ig")]=!0;const s={},l={},a={},p={},w={};let m=window.__d;window.__d&&(~m.toString().indexOf("__d_stub")?delete window.__d:m=new Proxy(window.__d,{apply:(n,e,t)=>(t=x(t),n.apply(e,t))})),Object.defineProperty(window,"__d",{get:function(){return m},set:function(n){m=new Proxy(n,{apply:(n,e,t)=>(t=x(t),n.apply(e,t))})}});const y=[];function x(n){const e=function(n,e){return o(n,e)};let[r,i,_]=n;return"string"!=typeof r||y.includes(r)||(y.push(r),n[2]=function(n,e){if(!a[e])return n;const r=a[e];r.sort((n,e)=>n.options.order-e.options.order);const o=r.find(n=>n.options.skipOthers);return t(o?o.replacement(n.toString()):r.reduce((n,e)=>e.replacement(n),n.toString()))}(n[2],r),n[2]=(u=n[2],l[f=r]?new Proxy(u,{apply(n,e,t){const r=function(n,e){return n(e)};if(t[5]&&t[5].dependencies)for(let i=0;i<t[5].dependencies.length;i++)t.push(t[5].dependencies[i].exports);const o=n.apply(e,t);return l[f].map(n=>{r(n,t)}),o}}):u),n[2]=function(n,t){const r=function(n,t){return e(n,t)},o=function(n,e,t,r){return n(e,t,r)};if(!s[t]||0===s[t].length)return n;const i=s[t];i.sort((n,e)=>n.options.order-e.options.order);const _=i.reduce((n,e)=>{const t=e.options.definerPath;return n[t]=n[t]||[],n[t].push(e),n},{});return new Proxy(n,{apply(n,e,s){const u=function(n,e,t){return n(e,t)},f=n.apply(e,s);if(s[5]&&s[5].dependencies)for(let t=0;t<s[5].dependencies.length;t++)s.push(s[5].dependencies[t].exports);const d=s[3],l=(0,s[2])("CometErrorBoundary.react"),a=n=>(console.error(n),"Error");for(let p in _){const n=o(c,s,p,!0),e=p.split(".").pop(),f=c(s,p);n[e]=function(...n){const e=f.apply(f,n),o=n[0],{useState:c,useEffect:w,jsx:m,Fragment:y}=r(d,"react"),[x,b]=c(0);function P(n){return n&&n.$1&&"function"==typeof n.$1?m(n,n.props):n}return w(()=>{const n=u(h,t,()=>{b(Math.random())});return()=>n()},[]),m(l,{fallback:a,children:(()=>{const r=function(n,e){return n(e)};if(!_[p])return P(e);const c=_[p].find(n=>n.options.skipOthers);if(c&&c.component)return m(c.fallback?l:y,{fallback:c.fallback,children:m(c.component,{payload:o,SourceCmp:e,lastCmp:P(e),definedArgs:s,callingArgs:n,extraPayloadFromDefiner:c.options.extraPayload,proxyCount:0,removeThisModuleProxy(){const n=_[p].indexOf(c);~n&&_[p].splice(n,1)}})});let u=0;return _[p].reduce((c,f)=>(f.component&&(c=m(f.fallback?l:y,{fallback:f.fallback,children:m(f.component,{payload:o,SourceCmp:e,lastCmp:c,extraPayloadFromDefiner:f.options.extraPayload,proxyCount:u,definedArgs:s,callingArgs:n,removeThisModuleProxy(){const n=_[p].indexOf(f);if(~n){const e=i.indexOf(f);_[p].splice(n,1),i.splice(e,1),r(g,t)}}})}),u++),c),P(e))})()})}}return f}})}(n[2],r),p[r]&&console.log(r,n)),n;var u,f}function h(n,e){return w[n]=w[n]||[],w[n].push(e),()=>{const t=w[n].findIndex(e);w[n].splice(t,1)}}function g(n){if(w[n])for(let e of w[n])e()}r.___xf=window.___xf=function(e){return window.require(o(n,e))},r.___km=window.___km=(n,t,r)=>{const[o,i]=e(n);s[o]||console.error("Undefined module "+o+" from "+i+" #1");const _=s[o].find(n=>n.extensionId===i);if(!_)return console.error("Undefined module "+o+" from "+i+" #2");const{fallback:c}=r||{};_.component=t,_.fallback=c,g(o)},r.___pt=window.___pt=(n,t)=>{const r=Object.assign({order:10,skipOthers:!1,beforeInject:()=>!0,afterInject:()=>{},extraPayload:void 0,definerPath:"[6].default"},t),[o,i]=e(n);s[o]=s[o]||[],s[o].push({extensionId:i,moduleName:o,options:r,component:void 0,fallback:void 0})},r.___wd=window.___wd=e=>{p[n(e)]=!0},r.___cr=window.___cr=(n,t,r)=>{const o=Object.assign({order:10,skipOthers:!1},r),[i]=e(n);a[i]=a[i]||[],a[i].push({moduleName:i,options:o,replacement:t})},r.___gi=window.___gi=(e,t)=>{e=n(e),l[e]=l[e]||[],l[e].push(t)},r.___cr(i(d,"|"),n=>n.replace('debugjs.")','debugjs.");console.error(b.stackFrames.slice(0,10).map(e=>e.text).join("\\n"))')),r.___cr(f+"|",n=>n.replace(/Error\(\w\(418\)\)/g,"void 0")),r.___cr(_(u,"|"),n=>n.replace(/,(\w+)=new\((\w+)\("relay-runtime\/mutations\/RelayRecordSourceProxy"/,',$1=window["___rs"]=new($2("relay-runtime/mutations/RelayRecordSourceProxy"')),r.___cr(u+"|",n=>n.replace(/;(\w)\.commitPayload=function\(([\w,]+)\){/,";$1.commitPayload=function($2){try{if(arguments[0]){if(arguments[0]?.request?.variables?.__relay_internal__pv__CometUFIReactionEnableShortNamerelayprovider === true) return;};}catch(e){console.log('relayStoreCommitPayload',e)};"))})(window),(n=>{const e=function(n,e){return n===e},t=function(n,e){return n(e)},r=function(n,e){return n==e};n[Symbol.for("___sg")]?n.storeFinder=n.___sf:(n[Symbol.for("___sg")]=!0,n.___sf=window.___sf=(o,i,_)=>{const c=function(n,e){return n-e},s=n.___rs,u="string"==typeof o?s.get(o):o;if(e(void 0,u))return u;let f=(d=i.replace(/\[(\d+)\]/g,".$1"),d.replace(/\((.*?)\.(.*?)\)/g,"($1_*_*_*_*_$2)")).split(".");var d;f=f.map(n=>n.replaceAll("_*_*_*_*_","."));let l=u;for(let n=0;n<f.length;n++){const e=f[n];if("*"===e)return l;if(0===e.indexOf("^^")){const[n,t]=a(e.substring(2));if(l=l.getLinkedRecords(n,t),void 0===l)return p(e),l}else if(0===e.indexOf("^")){const[n,t]=a(e.substring(1));if(l=l.getLinkedRecord(n,t),null==l)return p(e),l}else if(e.match(/^\d+$/)){if(l=l[t(parseInt,e)],null==l)return p(e),l}else{const[n,t]=a(e);if(l=l.getValue(n,t),r(null,l))return p(e),l}}return l;function a(n){const[e,t]=n.split("{");if(!t)return[e,{}];if(!_)throw new Error("args undefined");return[e,_[t.substring(0,c(t.length,1))]||{}]}function p(e){~n.location.search.indexOf("debug")&&console.warn("undefined value",{id:o,path:i,args:_,currentPath:e})}})})(window),(n=>{const e=function(n,e){return n!==e},t=function(n,e){return n===e},r=function(n){return n()},o=function(n,e){return n>e},i=function(n,e,t){return n(e,t)},_=function(n,e,t,r){return n(e,t,r)};if(n[Symbol.for("___rg")])return n.storeFinderFindParentsSourcesByStoreId=n.___ps,n.storeFinderFindParentsTypenamesByStoreId=n.___pn,n.storeFinderFindParentSourceByTypename=n.___ft,n.storeFinderFindParentByExistingValue=n.___fv,n.storeFinderFindParentSourceByTypenameByPathMatch=n.___fp,void(n.findDirectParentArray=n.___dp);function c(){const e=n.___rs.getRoot();let t=[];return Object.keys(e).forEach(n=>{const r=e[n];if(r.__sources&&Array.isArray(r.__sources)){const n=r.__sources;for(const e of n)for(const n in e){const r=e[n];r instanceof Map&&t.push(r)}}}),t}function s(n){const r=c();let o=[];for(const i of r)for(const[r,_]of i)for(const[i,c]of Object.entries(_))"__id"!==i&&e("__typename",i)&&("object"==typeof c&&e(null,c)&&"__ref"in c&&t(c.__ref,n)&&o.push(_),"object"==typeof c&&null!==c&&"__refs"in c&&Array.isArray(c.__refs)&&c.__refs.includes(n)&&o.push(_));return o}function u(n){const e=r(c);for(const t of e)for(const[e,r]of t)for(const[t,o]of Object.entries(r))if("__id"!==t&&"__typename"!==t){if("object"==typeof o&&null!==o&&"__ref"in o&&o.__ref===n)return r;if("object"==typeof o&&null!==o&&"__refs"in o&&Array.isArray(o.__refs)&&o.__refs.includes(n))return r}return null}function f(n,e,t){const r=[];let o=n,i=0;for(;i<e;){const n=u(o);if(!n)break;r.push(n);const e=t(n,r);if("continue"!==e){if("break"===e)break;return e}o=n.__id,i++}return null}function d(n,e){const t=[];return f(n,e?.depth||10,(n,e)=>(t.push(n),"continue")),o(t.length,0)?t:null}n[Symbol.for("___rg")]=!0,n.___ps=window.___ps=d,n.___pn=window.___pn=function(n,e){const t=i(d,n,e);return t?t.map(n=>n.__typename):null},n.___ft=window.___ft=function(n,e,t){return _(f,n,t?.depth||10,n=>n.__typename===e?n:"continue")},n.___fv=window.___fv=function(e,t,r){return f(e,r?.depth||10,e=>{try{if(null!=n.___sf(e.__id,t))return e.__id}catch(r){}return"continue"})},n.___fp=window.___fp=function(n,e){const t=e.split(".");let r=null;n:for(;;){if(0===t.length)return r;const e=r?.__id??n,o=t.shift(),i=s(e);for(const n of i)if(n.__typename===o){r=n;continue n}return null}},n.___dp=window.___dp=s})(window);const l="xhrSimpleDataSerializer";(e=>{if(window[Symbol.for("___ag")])return void(window.ajaxHijack=window.___ah);window[Symbol.for("___ag")]=!0,window[Symbol.for("___na")]=!0;let t={};e.___gi(l,n=>{const e=n[4].exports.default;n[4].exports.default=function(...n){const r=n[0].fb_api_req_friendly_name;return r&&t[r]&&(n[0]=t[r].reduce((n,e)=>e(n),n[0])),e.apply(e,n)}}),e.___ah=window.___ah=(e,r)=>{e=n(e),t[e]=t[e]||[],t[e].push(r)}})(window)}();
|