@sidesuit/pkg-module-proxy 2.0.7 → 2.0.9

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/global.d.ts CHANGED
@@ -28,6 +28,7 @@ interface SearchConfig {
28
28
 
29
29
  export declare global {
30
30
  interface Window {
31
+ UNCRPTY_PREFIX: string;
31
32
  // window.require
32
33
  rq(module: string): any;
33
34
  defineModule: DefineModuleFunction<any, any>;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";function e(e){const t=/^Comet/.test(e)||/^Base/.test(e)||/^Relay/.test(e)||/^Polaris/.test(e)||/^MWP/.test(e)||/^use/.test(e)||/^react$/.test(e)||/^cr:\d+/.test(e)||/^__debug$/.test(e)||/^Async$/.test(e)||/^Bootloader$/.test(e)||/^CurrentUser$/.test(e)||/^DTSG$/.test(e)||/^DynamicUFIReactionTypes$/.test(e)||/^Env$/.test(e)||/^ErrorPubSub$/.test(e)||/^I64$/.test(e)||/^Lexical$/.test(e)||/^entrypoint$/.test(e)||/^ReQLSuspense$/.test(e)||/^RunComet$/.test(e)||/^SprinkleConfig$/.test(e)||/^WebPixelRatio$/.test(e)||/^XHRRequest$/.test(e)||/^cometAsyncFetch$/.test(e)||/^getAsyncParams$/.test(e)||/^ifRequired$/.test(e)||/^normalizeCometRouterUrl$/.test(e)||/^queryMWLSOtherParticipantContact$/.test(e),n=e.startsWith("relay")||e.startsWith("fb")||e.startsWith("graphql")||e.startsWith("use")||e.startsWith("I64");return e.toLowerCase().includes("react")||e.toLowerCase().includes(".bs")||n||t?e:e.split("").reverse().map(e=>String.fromCharCode(e.charCodeAt(0)-1)).join("")}function t(t){const[n,r="default"]=e(t).split("|");return[n,r]}function n(e){const t=function(e){let t=e.slice(e.indexOf("{")+1,e.lastIndexOf("}"));return t||""}(e),n=function(e){let t=e.replace(r,""),n=t.slice(t.indexOf("(")+1,t.indexOf(")")).match(o);null===n&&(n=[]);return n}(e),i="id_"+function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)})}();let s=`window['__fnCache']["${i}"]= function(${n}){${t}}`,c=document.createElement("script");try{c.appendChild(document.createTextNode(s))}catch(a){c.text=s}let d=document.getElementsByTagName("head")[0]||document.documentElement;return d.appendChild(c),d.removeChild(c),window.__fnCache[`${i}`]}window.__fnCache=window.__fnCache||{};let r=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,o=/([^\s,]+)/g;function i(e,t,n=!1){const r=t.split(/\.|\[(\d+)\]/).filter(Boolean);let o,i=e;for(let s=0;s<r.length;s++){if(o=i,i=i[r[s]],void 0===i)return n?o:void 0}return n?o:i}(r=>{if(window.GZUAwCFuFf)return window.rq=window.zKjQYvgSmF,window.defineModule=window.zKjQYvcSmF,window.moduleProxyDefine=window.zKjQYVcSmF,window.moduleDebugDefine=window.zKjQYwcSmF,window.moduleCodeReplace=window.zKjQYvcSfF,void(window.moduleProxyImmediately=window.zKGQYvcSmF);window.GZUAwCFuFf=!0;const o={},s={},c={},d={},a={};let l=window.__d;window.__d&&(~l.toString().indexOf("__d_stub")?delete window.__d:l=new Proxy(window.__d,{apply:(e,t,n)=>(n=f(n),e.apply(t,n))})),Object.defineProperty(window,"__d",{get:function(){return l},set:function(e){l=new Proxy(e,{apply:(e,t,n)=>(n=f(n),e.apply(t,n))})}});const u=[];function f(e){let[t,r,a]=e;return"string"!=typeof t||u.includes(t)||(u.push(t),e[2]=function(e,t){if(!c[t])return e;const r=c[t];r.sort((e,t)=>e.options.order-t.options.order);const o=r.find(e=>e.options.skipOthers);if(o)return n(o.replacement(e.toString()));return n(r.reduce((e,t)=>e=t.replacement(e),e.toString()))}(e[2],t),e[2]=function(e,t){return s[t]?new Proxy(e,{apply(e,n,r){if(r[5]&&r[5].dependencies)for(let t=0;t<r[5].dependencies.length;t++)r.push(r[5].dependencies[t].exports);const o=e.apply(n,r);return s[t].map(e=>{e(r)}),o}}):e}(e[2],t),e[2]=function(e,t){if(!o[t]||0===o[t].length)return e;const n=o[t];n.sort((e,t)=>e.options.order-t.options.order);const r=n.reduce((e,t)=>{const n=t.options.definerPath;return e[n]=e[n]||[],e[n].push(t),e},{});return new Proxy(e,{apply(e,o,s){const c=e.apply(o,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],a=(0,s[2])("CometErrorBoundary.react"),l=e=>(console.error(e),"Error");for(let u in r){const e=i(s,u,!0),o=u.split(".").pop(),c=i(s,u);e[o]=function(...e){const o=c.apply(c,e),i=e[0],{useState:f,useEffect:w,jsx:y,Fragment:_}=d("react"),[x,h]=f(0),g=()=>{if(!r[u])return S(o);const c=r[u].find(e=>e.options.skipOthers);if(c&&c.component)return y(c.fallback?a:_,{fallback:c.fallback,children:y(c.component,{payload:i,SourceCmp:o,lastCmp:S(o),definedArgs:s,callingArgs:e,extraPayloadFromDefiner:c.options.extraPayload,proxyCount:0,removeThisModuleProxy(){const e=r[u].indexOf(c);~e&&r[u].splice(e,1)}})});let d=0;return r[u].reduce((c,l)=>(l.component&&(c=y(l.fallback?a:_,{fallback:l.fallback,children:y(l.component,{payload:i,SourceCmp:o,lastCmp:c,extraPayloadFromDefiner:l.options.extraPayload,proxyCount:d,definedArgs:s,callingArgs:e,removeThisModuleProxy(){const e=r[u].indexOf(l);if(~e){const o=n.indexOf(l);r[u].splice(e,1),n.splice(o,1),m(t)}}})}),d++),c),S(o))};function S(e){return e&&e.$1&&"function"==typeof e.$1?y(e,e.props):e}return w(()=>{const e=p(t,()=>{h(Math.random())});return()=>e()},[]),y(a,{fallback:l,children:g()})}}return c}})}(e[2],t),d[t]&&console.log(t,e)),e}function p(e,t){return a[e]=a[e]||[],a[e].push(t),()=>{const n=a[e].findIndex(t);a[e].splice(n,1)}}function m(e){if(a[e])for(let t of a[e])t()}r.rq=window.zKjQYvgSmF=function(t){return window.require(e(t))},r.defineModule=window.zKjQYvcSmF=(e,n,r)=>{const[i,s]=t(e);o[i]||console.error(`Undefined module ${i} from ${s} #1`);const c=o[i].find(e=>e.extensionId===s);if(!c)return console.error(`Undefined module ${i} from ${s} #2`);const{fallback:d}=r||{};c.component=n,c.fallback=d,m(i)},r.moduleProxyDefine=window.zKjQYVcSmF=(e,n)=>{const r=Object.assign({order:10,skipOthers:!1,beforeInject:()=>!0,afterInject:()=>{},extraPayload:void 0,definerPath:"[6].default"},n),[i,s]=t(e);o[i]=o[i]||[],o[i].push({extensionId:s,moduleName:i,options:r,component:void 0,fallback:void 0})},r.moduleDebugDefine=window.zKjQYwcSmF=t=>{d[e(t)]=!0},r.moduleCodeReplace=window.zKjQYvcSfF=(e,n,r)=>{const o=Object.assign({order:10,skipOthers:!1},r),[i]=t(e);c[i]=c[i]||[],c[i].push({moduleName:i,options:o,replacement:n})},r.moduleProxyImmediately=window.zKGQYvcSmF=(t,n)=>{t=e(t),s[t]=s[t]||[],s[t].push(n)},r.moduleCodeReplace("fb-error",e=>e.replace('debugjs.")','debugjs.");console.error(b.stackFrames.slice(0,10).map(e=>e.text).join("\\n"))')),r.moduleCodeReplace("ReactDOM-prod.classic",e=>e.replace(/Error\(\w\(418\)\)/g,"void 0")),r.moduleCodeReplace("relay-runtime/store/RelayPublishQueue",e=>e.replace(/,(\w+)=new\((\w+)\("relay-runtime\/mutations\/RelayRecordSourceProxy"/,',$1=window["RlbiULLGWt"]=new($2("relay-runtime/mutations/RelayRecordSourceProxy"')),r.moduleCodeReplace("relay-runtime/store/RelayPublishQueue",e=>e=e.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),(e=>{if(e.vTUNhjwVvX)return void(e.storeFinder=e.zKjqYvcSmF);e.vTUNhjwVvX=!0;e.storeFinder=window.zKjqYvcSmF=(t,n,r)=>{const o=e.RlbiULLGWt,i="string"==typeof t?o.get(t):t;if(void 0===i)return i;let s=(c=n.replace(/\[(\d+)\]/g,".$1"),c.replace(/\((.*?)\.(.*?)\)/g,"($1_*_*_*_*_$2)")).split(".");var c;s=s.map(e=>function(e){return e.replaceAll("_*_*_*_*_",".")}(e));let d=i;for(let e=0;e<s.length;e++){const t=s[e];if("*"===t)return d;if(0===t.indexOf("^^")){const[e,n]=a(t.substring(2));if(d=d.getLinkedRecords(e,n),void 0===d)return l(t),d}else if(0===t.indexOf("^")){const[e,n]=a(t.substring(1));if(d=d.getLinkedRecord(e,n),null==d)return l(t),d}else if(t.match(/^\d+$/)){if(d=d[parseInt(t)],null==d)return l(t),d}else{const[e,n]=a(t);if(d=d.getValue(e,n),null==d)return l(t),d}}return d;function a(e){const[t,n]=e.split("{");if(!n)return[t,{}];if(!r)throw new Error("args undefined");return[t,r[n.substring(0,n.length-1)]||{}]}function l(o){~e.location.search.indexOf("debug")&&console.warn("undefined value",{id:t,path:n,args:r,currentPath:o})}}})(window),(e=>{if(e.vTUNhJwVvX)return e.storeFinderFindParentsSourcesByStoreId=e.zkjQYvCSmF,e.storeFinderFindParentsTypenamesByStoreId=e.zkJqYvcSmF,e.storeFinderFindParentSourceByTypename=e.zkJQyvcSmF,e.storeFinderFindParentByExistingValue=e.zkjQYvcSMf,e.storeFinderFindParentSourceByTypenameByPathMatch=e.zKjQYvCSMf,void(e.findDirectParentArray=e.zKjQyvCSMf);function t(){const t=e.RlbiULLGWt.getRoot();let n=[];return Object.keys(t).forEach(e=>{const r=t[e];if(r.__sources&&Array.isArray(r.__sources)){const e=r.__sources;for(const t of e)for(const e in t){const r=t[e];r instanceof Map&&n.push(r)}}}),n}function n(e){const n=t();let r=[];for(const t of n)for(const[n,o]of t)for(const[t,i]of Object.entries(o))"__id"!==t&&"__typename"!==t&&("object"==typeof i&&null!==i&&"__ref"in i&&i.__ref===e&&r.push(o),"object"==typeof i&&null!==i&&"__refs"in i&&Array.isArray(i.__refs)&&i.__refs.includes(e)&&r.push(o));return r}function r(e){const n=t();for(const t of n)for(const[n,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===e)return r;if("object"==typeof o&&null!==o&&"__refs"in o&&Array.isArray(o.__refs)&&o.__refs.includes(e))return r}return null}function o(e,t,n){const o=[];let i=e,s=0;for(;s<t;){const e=r(i);if(!e)break;o.push(e);const t=n(e,o);if("continue"!==t){if("break"===t)break;return t}i=e.__id,s++}return null}function i(e,t){const n=[];return o(e,t?.depth||10,(e,t)=>(n.push(e),"continue")),n.length>0?n:null}e.vTUNhJwVvX=!0,e.storeFinderFindParentsSourcesByStoreId=window.zkjQYvCSmF=i,e.storeFinderFindParentsTypenamesByStoreId=window.zkJqYvcSmF=function(e,t){const n=i(e,t);return n?n.map(e=>e.__typename):null},e.storeFinderFindParentSourceByTypename=window.zkJQyvcSmF=function(e,t,n){return o(e,n?.depth||10,e=>e.__typename===t?e:"continue")},e.storeFinderFindParentByExistingValue=window.zkjQYvcSMf=function(t,n,r){return o(t,r?.depth||10,t=>{try{const r=e.storeFinder(t.__id,n);if(null!=r)return t.__id}catch(r){}return"continue"})},e.storeFinderFindParentSourceByTypenameByPathMatch=window.zKjQYvCSMf=function(e,t){const r=t.split(".");let o=null;e:for(;;){if(0===r.length)return o;const t=o?.__id??e,i=r.shift(),s=n(t);for(const e of s)if(e.__typename===i){o=e;continue e}return null}},e.findDirectParentArray=window.zKjQyvCSMf=n})(window),(t=>{if(window.xmxlgxMDjA)return void(window.ajaxHijack=window.zkjQYvcSmF);window.xmxlgxMDjA=!0;let n={};t.moduleProxyImmediately("xhrSimpleDataSerializer",e=>{const t=e[4].exports.default;e[4].exports.default=function(...e){const r=e[0].fb_api_req_friendly_name;return r&&n[r]&&(e[0]=n[r].reduce((e,t)=>e=t(e),e[0])),t.apply(t,e)}});t.ajaxHijack=window.zkjQYvcSmF=(t,r)=>{t=e(t),n[t]=n[t]||[],n[t].push(r)}})(window)}();
1
+ !function(){"use strict";function e(e){if(e.startsWith("__proxy__"))return e.slice(9);const t=/^Comet/.test(e)||/^Base/.test(e)||/^Relay/.test(e)||/^Polaris/.test(e)||/^MWP/.test(e)||/^use/.test(e)||/^react$/.test(e)||/^cr:\d+/.test(e)||/^__debug$/.test(e)||/^Async$/.test(e)||/^Bootloader$/.test(e)||/^CurrentUser$/.test(e)||/^DTSG$/.test(e)||/^DynamicUFIReactionTypes$/.test(e)||/^Env$/.test(e)||/^ErrorPubSub$/.test(e)||/^I64$/.test(e)||/^Lexical$/.test(e)||/^entrypoint$/.test(e)||/^ReQLSuspense$/.test(e)||/^RunComet$/.test(e)||/^SprinkleConfig$/.test(e)||/^WebPixelRatio$/.test(e)||/^XHRRequest$/.test(e)||/^cometAsyncFetch$/.test(e)||/^getAsyncParams$/.test(e)||/^ifRequired$/.test(e)||/^normalizeCometRouterUrl$/.test(e)||/^queryMWLSOtherParticipantContact$/.test(e),n=e.startsWith("relay")||e.startsWith("fb")||e.startsWith("graphql")||e.startsWith("use")||e.startsWith("I64");return e.toLowerCase().includes("react")||e.toLowerCase().includes(".bs")||n||t?e:e.split("").reverse().map(e=>String.fromCharCode(e.charCodeAt(0)-1)).join("")}function t(t){const[n,r="default"]=e(t).split("|");return[n,r]}function n(e){const t=function(e){let t=e.slice(e.indexOf("{")+1,e.lastIndexOf("}"));return t||""}(e),n=function(e){let t=e.replace(r,""),n=t.slice(t.indexOf("(")+1,t.indexOf(")")).match(o);null===n&&(n=[]);return n}(e),i="id_"+function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)})}();let s=`window['__fnCache']["${i}"]= function(${n}){${t}}`,c=document.createElement("script");try{c.appendChild(document.createTextNode(s))}catch(a){c.text=s}let d=document.getElementsByTagName("head")[0]||document.documentElement;return d.appendChild(c),d.removeChild(c),window.__fnCache[`${i}`]}window.__fnCache=window.__fnCache||{};let r=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,o=/([^\s,]+)/g;function i(e,t,n=!1){const r=t.split(/\.|\[(\d+)\]/).filter(Boolean);let o,i=e;for(let s=0;s<r.length;s++){if(o=i,i=i[r[s]],void 0===i)return n?o:void 0}return n?o:i}window.UNCRPTY_PREFIX="__proxy__",(r=>{if(window.GZUAwCFuFf)return window.rq=window.zKjQYvgSmF,window.defineModule=window.zKjQYvcSmF,window.moduleProxyDefine=window.zKjQYVcSmF,window.moduleDebugDefine=window.zKjQYwcSmF,window.moduleCodeReplace=window.zKjQYvcSfF,void(window.moduleProxyImmediately=window.zKGQYvcSmF);window.GZUAwCFuFf=!0;const o={},s={},c={},d={},a={};let l=window.__d;window.__d&&(~l.toString().indexOf("__d_stub")?delete window.__d:l=new Proxy(window.__d,{apply:(e,t,n)=>(n=f(n),e.apply(t,n))})),Object.defineProperty(window,"__d",{get:function(){return l},set:function(e){l=new Proxy(e,{apply:(e,t,n)=>(n=f(n),e.apply(t,n))})}});const u=[];function f(e){let[t,r,a]=e;return"string"!=typeof t||u.includes(t)||(u.push(t),e[2]=function(e,t){if(!c[t])return e;const r=c[t];r.sort((e,t)=>e.options.order-t.options.order);const o=r.find(e=>e.options.skipOthers);if(o)return n(o.replacement(e.toString()));return n(r.reduce((e,t)=>e=t.replacement(e),e.toString()))}(e[2],t),e[2]=function(e,t){return s[t]?new Proxy(e,{apply(e,n,r){if(r[5]&&r[5].dependencies)for(let t=0;t<r[5].dependencies.length;t++)r.push(r[5].dependencies[t].exports);const o=e.apply(n,r);return s[t].map(e=>{e(r)}),o}}):e}(e[2],t),e[2]=function(e,t){if(!o[t]||0===o[t].length)return e;const n=o[t];n.sort((e,t)=>e.options.order-t.options.order);const r=n.reduce((e,t)=>{const n=t.options.definerPath;return e[n]=e[n]||[],e[n].push(t),e},{});return new Proxy(e,{apply(e,o,s){const c=e.apply(o,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],a=(0,s[2])("CometErrorBoundary.react"),l=e=>(console.error(e),"Error");for(let u in r){const e=i(s,u,!0),o=u.split(".").pop(),c=i(s,u);e[o]=function(...e){const o=c.apply(c,e),i=e[0],{useState:f,useEffect:w,jsx:y,Fragment:_}=d("react"),[x,h]=f(0),g=()=>{if(!r[u])return S(o);const c=r[u].find(e=>e.options.skipOthers);if(c&&c.component)return y(c.fallback?a:_,{fallback:c.fallback,children:y(c.component,{payload:i,SourceCmp:o,lastCmp:S(o),definedArgs:s,callingArgs:e,extraPayloadFromDefiner:c.options.extraPayload,proxyCount:0,removeThisModuleProxy(){const e=r[u].indexOf(c);~e&&r[u].splice(e,1)}})});let d=0;return r[u].reduce((c,l)=>(l.component&&(c=y(l.fallback?a:_,{fallback:l.fallback,children:y(l.component,{payload:i,SourceCmp:o,lastCmp:c,extraPayloadFromDefiner:l.options.extraPayload,proxyCount:d,definedArgs:s,callingArgs:e,removeThisModuleProxy(){const e=r[u].indexOf(l);if(~e){const o=n.indexOf(l);r[u].splice(e,1),n.splice(o,1),m(t)}}})}),d++),c),S(o))};function S(e){return e&&e.$1&&"function"==typeof e.$1?y(e,e.props):e}return w(()=>{const e=p(t,()=>{h(Math.random())});return()=>e()},[]),y(a,{fallback:l,children:g()})}}return c}})}(e[2],t),d[t]&&console.log(t,e)),e}function p(e,t){return a[e]=a[e]||[],a[e].push(t),()=>{const n=a[e].findIndex(t);a[e].splice(n,1)}}function m(e){if(a[e])for(let t of a[e])t()}r.rq=window.zKjQYvgSmF=function(t){return window.require(e(t))},r.defineModule=window.zKjQYvcSmF=(e,n,r)=>{const[i,s]=t(e);o[i]||console.error(`Undefined module ${i} from ${s} #1`);const c=o[i].find(e=>e.extensionId===s);if(!c)return console.error(`Undefined module ${i} from ${s} #2`);const{fallback:d}=r||{};c.component=n,c.fallback=d,m(i)},r.moduleProxyDefine=window.zKjQYVcSmF=(e,n)=>{const r=Object.assign({order:10,skipOthers:!1,beforeInject:()=>!0,afterInject:()=>{},extraPayload:void 0,definerPath:"[6].default"},n),[i,s]=t(e);o[i]=o[i]||[],o[i].push({extensionId:s,moduleName:i,options:r,component:void 0,fallback:void 0})},r.moduleDebugDefine=window.zKjQYwcSmF=t=>{d[e(t)]=!0},r.moduleCodeReplace=window.zKjQYvcSfF=(e,n,r)=>{const o=Object.assign({order:10,skipOthers:!1},r),[i]=t(e);c[i]=c[i]||[],c[i].push({moduleName:i,options:o,replacement:n})},r.moduleProxyImmediately=window.zKGQYvcSmF=(t,n)=>{t=e(t),s[t]=s[t]||[],s[t].push(n)},r.moduleCodeReplace("fb-error",e=>e.replace('debugjs.")','debugjs.");console.error(b.stackFrames.slice(0,10).map(e=>e.text).join("\\n"))')),r.moduleCodeReplace("ReactDOM-prod.classic",e=>e.replace(/Error\(\w\(418\)\)/g,"void 0")),r.moduleCodeReplace("relay-runtime/store/RelayPublishQueue",e=>e.replace(/,(\w+)=new\((\w+)\("relay-runtime\/mutations\/RelayRecordSourceProxy"/,',$1=window["RlbiULLGWt"]=new($2("relay-runtime/mutations/RelayRecordSourceProxy"')),r.moduleCodeReplace("relay-runtime/store/RelayPublishQueue",e=>e=e.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),(e=>{if(e.vTUNhjwVvX)return void(e.storeFinder=e.zKjqYvcSmF);e.vTUNhjwVvX=!0;e.storeFinder=window.zKjqYvcSmF=(t,n,r)=>{const o=e.RlbiULLGWt,i="string"==typeof t?o.get(t):t;if(void 0===i)return i;let s=(c=n.replace(/\[(\d+)\]/g,".$1"),c.replace(/\((.*?)\.(.*?)\)/g,"($1_*_*_*_*_$2)")).split(".");var c;s=s.map(e=>function(e){return e.replaceAll("_*_*_*_*_",".")}(e));let d=i;for(let e=0;e<s.length;e++){const t=s[e];if("*"===t)return d;if(0===t.indexOf("^^")){const[e,n]=a(t.substring(2));if(d=d.getLinkedRecords(e,n),void 0===d)return l(t),d}else if(0===t.indexOf("^")){const[e,n]=a(t.substring(1));if(d=d.getLinkedRecord(e,n),null==d)return l(t),d}else if(t.match(/^\d+$/)){if(d=d[parseInt(t)],null==d)return l(t),d}else{const[e,n]=a(t);if(d=d.getValue(e,n),null==d)return l(t),d}}return d;function a(e){const[t,n]=e.split("{");if(!n)return[t,{}];if(!r)throw new Error("args undefined");return[t,r[n.substring(0,n.length-1)]||{}]}function l(o){~e.location.search.indexOf("debug")&&console.warn("undefined value",{id:t,path:n,args:r,currentPath:o})}}})(window),(e=>{if(e.vTUNhJwVvX)return e.storeFinderFindParentsSourcesByStoreId=e.zkjQYvCSmF,e.storeFinderFindParentsTypenamesByStoreId=e.zkJqYvcSmF,e.storeFinderFindParentSourceByTypename=e.zkJQyvcSmF,e.storeFinderFindParentByExistingValue=e.zkjQYvcSMf,e.storeFinderFindParentSourceByTypenameByPathMatch=e.zKjQYvCSMf,void(e.findDirectParentArray=e.zKjQyvCSMf);function t(){const t=e.RlbiULLGWt.getRoot();let n=[];return Object.keys(t).forEach(e=>{const r=t[e];if(r.__sources&&Array.isArray(r.__sources)){const e=r.__sources;for(const t of e)for(const e in t){const r=t[e];r instanceof Map&&n.push(r)}}}),n}function n(e){const n=t();let r=[];for(const t of n)for(const[n,o]of t)for(const[t,i]of Object.entries(o))"__id"!==t&&"__typename"!==t&&("object"==typeof i&&null!==i&&"__ref"in i&&i.__ref===e&&r.push(o),"object"==typeof i&&null!==i&&"__refs"in i&&Array.isArray(i.__refs)&&i.__refs.includes(e)&&r.push(o));return r}function r(e){const n=t();for(const t of n)for(const[n,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===e)return r;if("object"==typeof o&&null!==o&&"__refs"in o&&Array.isArray(o.__refs)&&o.__refs.includes(e))return r}return null}function o(e,t,n){const o=[];let i=e,s=0;for(;s<t;){const e=r(i);if(!e)break;o.push(e);const t=n(e,o);if("continue"!==t){if("break"===t)break;return t}i=e.__id,s++}return null}function i(e,t){const n=[];return o(e,t?.depth||10,(e,t)=>(n.push(e),"continue")),n.length>0?n:null}e.vTUNhJwVvX=!0,e.storeFinderFindParentsSourcesByStoreId=window.zkjQYvCSmF=i,e.storeFinderFindParentsTypenamesByStoreId=window.zkJqYvcSmF=function(e,t){const n=i(e,t);return n?n.map(e=>e.__typename):null},e.storeFinderFindParentSourceByTypename=window.zkJQyvcSmF=function(e,t,n){return o(e,n?.depth||10,e=>e.__typename===t?e:"continue")},e.storeFinderFindParentByExistingValue=window.zkjQYvcSMf=function(t,n,r){return o(t,r?.depth||10,t=>{try{const r=e.storeFinder(t.__id,n);if(null!=r)return t.__id}catch(r){}return"continue"})},e.storeFinderFindParentSourceByTypenameByPathMatch=window.zKjQYvCSMf=function(e,t){const r=t.split(".");let o=null;e:for(;;){if(0===r.length)return o;const t=o?.__id??e,i=r.shift(),s=n(t);for(const e of s)if(e.__typename===i){o=e;continue e}return null}},e.findDirectParentArray=window.zKjQyvCSMf=n})(window),(t=>{if(window.xmxlgxMDjA)return void(window.ajaxHijack=window.zkjQYvcSmF);window.xmxlgxMDjA=!0;let n={};t.moduleProxyImmediately("xhrSimpleDataSerializer",e=>{const t=e[4].exports.default;e[4].exports.default=function(...e){const r=e[0].fb_api_req_friendly_name;return r&&n[r]&&(e[0]=n[r].reduce((e,t)=>e=t(e),e[0])),t.apply(t,e)}});t.ajaxHijack=window.zkjQYvcSmF=(t,r)=>{t=e(t),n[t]=n[t]||[],n[t].push(r)}})(window)}();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sidesuit/pkg-module-proxy",
3
3
  "private": false,
4
- "version": "2.0.7",
4
+ "version": "2.0.9",
5
5
  "type": "module",
6
6
  "main": "./dist/index.iife.js",
7
7
  "module": "./dist/index.iife.js",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@rollup/plugin-replace": "^6.0.3",
20
- "@sidesuit/pkg-vite-plugins": "^2.1.5",
20
+ "@sidesuit/pkg-vite-plugins": "^2.1.8",
21
21
  "@types/lodash-es": "^4.17.12",
22
22
  "@types/node": "^24.10.0",
23
23
  "@types/react": "18.3.26",