@leonailtd/n8n-nodes-priority-erp 3.1.1 → 3.2.0

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.
Files changed (48) hide show
  1. package/LICENSE +27 -15
  2. package/dist/LICENSE +27 -15
  3. package/dist/credentials/PriorityErpApi.credentials.js +134 -1
  4. package/dist/credentials/PriorityErpWebSdk.credentials.js +134 -1
  5. package/dist/nodes/PriorityERP/PriorityERP.node.js +311 -1
  6. package/dist/nodes/PriorityERP/actions/batch/batch.properties.js +83 -1
  7. package/dist/nodes/PriorityERP/actions/batch/execute.operation.js +43 -1
  8. package/dist/nodes/PriorityERP/actions/batch/index.js +8 -1
  9. package/dist/nodes/PriorityERP/actions/entity/create.operation.js +13 -1
  10. package/dist/nodes/PriorityERP/actions/entity/delete.operation.js +12 -1
  11. package/dist/nodes/PriorityERP/actions/entity/entity.properties.js +296 -1
  12. package/dist/nodes/PriorityERP/actions/entity/get.operation.js +35 -1
  13. package/dist/nodes/PriorityERP/actions/entity/getMany.operation.js +43 -1
  14. package/dist/nodes/PriorityERP/actions/entity/index.js +16 -1
  15. package/dist/nodes/PriorityERP/actions/entity/update.operation.js +14 -1
  16. package/dist/nodes/PriorityERP/actions/file/download.operation.js +23 -1
  17. package/dist/nodes/PriorityERP/actions/file/file.properties.js +123 -1
  18. package/dist/nodes/PriorityERP/actions/file/getFiles.operation.js +16 -1
  19. package/dist/nodes/PriorityERP/actions/file/index.js +12 -1
  20. package/dist/nodes/PriorityERP/actions/file/upload.operation.js +26 -1
  21. package/dist/nodes/PriorityERP/actions/procedure/activate.operation.js +33 -1
  22. package/dist/nodes/PriorityERP/actions/procedure/activateSubForm.operation.js +37 -1
  23. package/dist/nodes/PriorityERP/actions/procedure/index.js +10 -1
  24. package/dist/nodes/PriorityERP/actions/procedure/procedure.properties.js +157 -1
  25. package/dist/nodes/PriorityERP/actions/subForm/create.operation.js +15 -1
  26. package/dist/nodes/PriorityERP/actions/subForm/delete.operation.js +14 -1
  27. package/dist/nodes/PriorityERP/actions/subForm/get.operation.js +37 -1
  28. package/dist/nodes/PriorityERP/actions/subForm/getMany.operation.js +45 -1
  29. package/dist/nodes/PriorityERP/actions/subForm/index.js +16 -1
  30. package/dist/nodes/PriorityERP/actions/subForm/subForm.properties.js +304 -1
  31. package/dist/nodes/PriorityERP/actions/subForm/update.operation.js +16 -1
  32. package/dist/nodes/PriorityERP/actions/subSubForm/create.operation.js +17 -1
  33. package/dist/nodes/PriorityERP/actions/subSubForm/delete.operation.js +16 -1
  34. package/dist/nodes/PriorityERP/actions/subSubForm/get.operation.js +39 -1
  35. package/dist/nodes/PriorityERP/actions/subSubForm/getMany.operation.js +47 -1
  36. package/dist/nodes/PriorityERP/actions/subSubForm/index.js +16 -1
  37. package/dist/nodes/PriorityERP/actions/subSubForm/subSubForm.properties.js +296 -1
  38. package/dist/nodes/PriorityERP/actions/subSubForm/update.operation.js +18 -1
  39. package/dist/nodes/PriorityERP/actions/text/getText.operation.js +16 -1
  40. package/dist/nodes/PriorityERP/actions/text/index.js +10 -1
  41. package/dist/nodes/PriorityERP/actions/text/setText.operation.js +19 -1
  42. package/dist/nodes/PriorityERP/actions/text/text.properties.js +107 -1
  43. package/dist/nodes/PriorityERP/helpers/odata.js +54 -1
  44. package/dist/nodes/PriorityERP/helpers/utils.js +62 -1
  45. package/dist/nodes/PriorityERP/methods/loadOptions.js +643 -1
  46. package/dist/nodes/PriorityERP/transport/priorityApi.js +203 -1
  47. package/dist/package.json +2 -2
  48. package/package.json +3 -3
@@ -1 +1,643 @@
1
- 'use strict';const _0x2a2158=_0x4847;(function(_0x140e72,_0x51acaf){const _0x222be1={_0x158a0c:0x104,_0x3b6e3e:0x1dc,_0x4025f8:0x174,_0x282eb1:0x152,_0x17247c:0x16a,_0x29ecdb:0x16f,_0x1e0755:0x147},_0x194e94=_0x4847,_0x555eb3=_0x140e72();while(!![]){try{const _0x4de0d8=-parseInt(_0x194e94(0x119))/0x1+parseInt(_0x194e94(_0x222be1._0x158a0c))/0x2+parseInt(_0x194e94(_0x222be1._0x3b6e3e))/0x3*(-parseInt(_0x194e94(_0x222be1._0x4025f8))/0x4)+parseInt(_0x194e94(_0x222be1._0x282eb1))/0x5*(-parseInt(_0x194e94(0x118))/0x6)+parseInt(_0x194e94(_0x222be1._0x17247c))/0x7+parseInt(_0x194e94(_0x222be1._0x29ecdb))/0x8+parseInt(_0x194e94(_0x222be1._0x1e0755))/0x9*(parseInt(_0x194e94(0x1bb))/0xa);if(_0x4de0d8===_0x51acaf)break;else _0x555eb3['push'](_0x555eb3['shift']());}catch(_0x5c7285){_0x555eb3['push'](_0x555eb3['shift']());}}}(_0x5dc4,0xf337b));const _0x5692c6={};_0x5692c6[_0x2a2158(0x194)]=!![],Object[_0x2a2158(0x142)](exports,_0x2a2158(0x1c0),_0x5692c6),exports[_0x2a2158(0x115)]=getForms,exports[_0x2a2158(0xff)]=getSubForms,exports[_0x2a2158(0x16c)]=getFormColumns,exports[_0x2a2158(0x178)]=getSubFormColumns,exports[_0x2a2158(0x13d)]=getSubSubFormColumns,exports[_0x2a2158(0x1ce)]=getMiniSubForms,exports[_0x2a2158(0x14a)]=getProcedures,exports[_0x2a2158(0x187)]=getProcedureFields,exports[_0x2a2158(0x165)]=getSubFormProcedureFields,exports[_0x2a2158(0x1b8)]=getTextSubForms;const ROUTER_BASE_URL=_0x2a2158(0x1a3);async function getForms(){const _0x292b67={_0x528bdf:0x197,_0x483b79:0x111,_0x16bda9:0x101,_0x839564:0x16d,_0x35afa6:0x146,_0x16f2ba:0x1a0,_0x2ac993:0x10f,_0x269070:0x160,_0x53a298:0x1ab,_0x17ef45:0x16d,_0xde3f38:0x14f,_0x330dcd:0x111,_0x5c05b9:0x18e,_0x3404cb:0x163,_0x1d8f9a:0x1b2,_0xb84933:0x11c,_0x52f1e2:0x1aa,_0x292597:0x188,_0x514cbb:0x177,_0xcca69f:0x194,_0x533a69:0x109,_0x32e55c:0x17e,_0x5107a2:0x10f,_0x48aa30:0x123,_0x4d6088:0x177,_0x305128:0x1e1,_0x445b07:0x1bd,_0x1fd186:0x11a},_0x3e8791=_0x2a2158,_0x4a9a0f={};_0x4a9a0f['TaFbF']=function(_0x57db17,_0xba7430){return _0x57db17!==_0xba7430;},_0x4a9a0f[_0x3e8791(_0x292b67._0x528bdf)]=function(_0x1115b2,_0x58a979){return _0x1115b2===_0x58a979;},_0x4a9a0f[_0x3e8791(_0x292b67._0x483b79)]=_0x3e8791(0x18f),_0x4a9a0f['HLNIL']=_0x3e8791(0x17b),_0x4a9a0f[_0x3e8791(_0x292b67._0x16bda9)]=_0x3e8791(0x112),_0x4a9a0f[_0x3e8791(0x1ac)]=_0x3e8791(_0x292b67._0x839564),_0x4a9a0f[_0x3e8791(_0x292b67._0x35afa6)]=_0x3e8791(0x12c),_0x4a9a0f[_0x3e8791(0x17e)]=_0x3e8791(_0x292b67._0x16f2ba),_0x4a9a0f[_0x3e8791(_0x292b67._0x2ac993)]=_0x3e8791(0x141),_0x4a9a0f['NYFHv']=_0x3e8791(_0x292b67._0x269070),_0x4a9a0f['Gvpec']='jyLZS';const _0x14232c=_0x4a9a0f;try{const _0x50b420=await this['getCredentials'](_0x3e8791(0x112)),_0x109a35=_0x50b420[_0x3e8791(_0x292b67._0x53a298)];let _0x58b577;if(_0x14232c[_0x3e8791(0x197)](_0x109a35,_0x3e8791(_0x292b67._0x17ef45))){const _0x2ecb47={};_0x2ecb47[_0x3e8791(0x17c)]='';const _0x1205f9={};_0x1205f9[_0x3e8791(_0x292b67._0xde3f38)]=_0x14232c[_0x3e8791(_0x292b67._0x330dcd)],_0x1205f9['url']=ROUTER_BASE_URL+_0x3e8791(_0x292b67._0x5c05b9),_0x1205f9[_0x3e8791(_0x292b67._0x3404cb)]=_0x2ecb47,_0x1205f9[_0x3e8791(0x11c)]=!![],_0x1205f9[_0x3e8791(0x1aa)]=0x7530,_0x58b577=_0x1205f9;}else{const _0x3f26bf={};_0x3f26bf['method']=_0x3e8791(0x18f),_0x3f26bf[_0x3e8791(0x129)]=_0x14232c[_0x3e8791(_0x292b67._0x1d8f9a)],_0x3f26bf['baseURL']=_0x50b420['baseUrl'],_0x3f26bf[_0x3e8791(_0x292b67._0xb84933)]=![],_0x3f26bf[_0x3e8791(_0x292b67._0x52f1e2)]=0x7530,_0x58b577=_0x3f26bf;}const _0x4ab863=await this[_0x3e8791(0x170)][_0x3e8791(0x199)][_0x3e8791(_0x292b67._0x292597)](this,_0x14232c[_0x3e8791(0x101)],_0x58b577),_0x28a820=[];if(_0x14232c[_0x3e8791(_0x292b67._0x528bdf)](_0x109a35,_0x14232c[_0x3e8791(0x1ac)])){if(Array['isArray'](_0x4ab863)){if(_0x14232c[_0x3e8791(0x10c)](_0x14232c[_0x3e8791(0x146)],_0x14232c[_0x3e8791(0x146)]))for(const _0x52fcd3 of _0x21425c){if(_0x52fcd3['columnName']){const _0x411274={};_0x411274[_0x3e8791(_0x292b67._0x514cbb)]=_0x52fcd3[_0x3e8791(0x130)]||_0x52fcd3[_0x3e8791(0x109)],_0x411274[_0x3e8791(_0x292b67._0xcca69f)]=_0x52fcd3[_0x3e8791(_0x292b67._0x533a69)],_0x8a3011[_0x3e8791(0x105)](_0x411274);}}else for(const _0x4e82c2 of _0x4ab863){if(_0x14232c[_0x3e8791(_0x292b67._0x32e55c)]!==_0x14232c[_0x3e8791(_0x292b67._0x5107a2)]){if(_0x4e82c2[_0x3e8791(_0x292b67._0x48aa30)]){const _0x1e6fef={};_0x1e6fef[_0x3e8791(_0x292b67._0x4d6088)]=_0x4e82c2[_0x3e8791(_0x292b67._0x305128)]||_0x4e82c2[_0x3e8791(_0x292b67._0x48aa30)],_0x1e6fef[_0x3e8791(_0x292b67._0xcca69f)]=_0x4e82c2[_0x3e8791(0x123)],_0x28a820['push'](_0x1e6fef);}}else{const _0x196c39=_0x42910a,_0x5c9ce3=/Property\s+Name="([^"]+)"/g;let _0x2d8eb8;while(_0x14232c[_0x3e8791(0x10c)](_0x2d8eb8=_0x5c9ce3[_0x3e8791(0x11a)](_0x196c39),null)){const _0x300737={};_0x300737['name']=_0x2d8eb8[0x1],_0x300737[_0x3e8791(0x194)]=_0x2d8eb8[0x1],_0x2d3caa['push'](_0x300737);}}}}}else{if(_0x14232c[_0x3e8791(_0x292b67._0x445b07)]!==_0x14232c['Gvpec']){const _0x515ddd=_0x4ab863,_0x1be4f9=/EntitySet\s+Name="([^"]+)"/g;let _0x257ce3;while(_0x14232c[_0x3e8791(0x10c)](_0x257ce3=_0x1be4f9[_0x3e8791(_0x292b67._0x1fd186)](_0x515ddd),null)){const _0x32fe27={};_0x32fe27['name']=_0x257ce3[0x1],_0x32fe27[_0x3e8791(0x194)]=_0x257ce3[0x1],_0x28a820[_0x3e8791(0x105)](_0x32fe27);}}else{const _0x6026f9=_0x4119b7,_0x57ed30=/Property\s+Name="([^"]+)"/g;let _0x4a85c7;while((_0x4a85c7=_0x57ed30['exec'](_0x6026f9))!==null){const _0x5990b1={};_0x5990b1[_0x3e8791(0x177)]=_0x4a85c7[0x1],_0x5990b1[_0x3e8791(_0x292b67._0xcca69f)]=_0x4a85c7[0x1],_0x21b311['push'](_0x5990b1);}}}return _0x28a820['sort']((_0x162a6e,_0x3ecb07)=>_0x162a6e[_0x3e8791(0x177)][_0x3e8791(0x1d6)](_0x3ecb07[_0x3e8791(0x177)])),_0x28a820;}catch{return[];}}async function getSubForms(){const _0x32eb54={_0x289ca7:0x11f,_0x4a8a5d:0x102,_0x4c6d3b:0x1b4,_0x4ffaad:0x113,_0x41f263:0x14f,_0x3362e2:0x18f,_0x717cd3:0x129,_0x178080:0x11c,_0x4353f3:0x10b,_0x37155c:0x10e,_0x599cf1:0x11c,_0x3bedfe:0x1aa,_0xbeedfb:0x112,_0x3516ce:0x155,_0x3e796a:0x177,_0x50dca5:0x109,_0x198f6c:0x105,_0x40054a:0x109,_0x17624c:0x194,_0x1cfd54:0x158,_0x5cec4c:0x11a},_0x559177=_0x2a2158,_0x497801={'moJKf':function(_0x4f420d,_0x3bf016){return _0x4f420d!==_0x3bf016;},'KTqPO':_0x559177(0x1a7),'giWQf':_0x559177(0x112),'JANop':function(_0x57b0fe,_0x10181b){return _0x57b0fe(_0x10181b);},'rEFLv':function(_0x143a5,_0x1481a2){return _0x143a5===_0x1481a2;},'YPZEQ':_0x559177(_0x32eb54._0x289ca7),'KWaxl':_0x559177(0x18f),'HQbsx':_0x559177(_0x32eb54._0x4a8a5d),'BLyUf':function(_0x2d9e2d,_0x24819a){return _0x2d9e2d===_0x24819a;},'sWmzq':_0x559177(_0x32eb54._0x4c6d3b),'tvHWm':function(_0x1f9f3,_0x1cca1c){return _0x1f9f3!==_0x1cca1c;}};try{if(_0x497801[_0x559177(0x13c)](_0x497801[_0x559177(_0x32eb54._0x4ffaad)],'pzXDO')){const _0xb8919=await this['getCredentials'](_0x497801['giWQf']),_0x5b2ed6=_0xb8919[_0x559177(0x1ab)],_0x388ea4=_0x497801[_0x559177(0x15e)](resolveFormName,this);if(!_0x388ea4)return[];let _0x24f2bc;if(_0x497801[_0x559177(0x17f)](_0x5b2ed6,'router')){const _0x2c7d89={};_0x2c7d89['TABLE_NAME']=_0x388ea4;const _0x572978={};_0x572978[_0x559177(_0x32eb54._0x41f263)]=_0x559177(_0x32eb54._0x3362e2),_0x572978[_0x559177(_0x32eb54._0x717cd3)]=ROUTER_BASE_URL+_0x559177(0x13a),_0x572978[_0x559177(0x163)]=_0x2c7d89,_0x572978[_0x559177(_0x32eb54._0x178080)]=!![],_0x572978[_0x559177(0x1aa)]=0x7530,_0x24f2bc=_0x572978;}else{if(_0x497801[_0x559177(0x17f)]('ZtEAI',_0x497801['YPZEQ']))return[];else{const _0x32540a={};_0x32540a[_0x559177(0x14f)]=_0x497801[_0x559177(_0x32eb54._0x4353f3)],_0x32540a[_0x559177(0x129)]=_0x559177(0x148)+_0x388ea4+_0x559177(0x134),_0x32540a[_0x559177(_0x32eb54._0x37155c)]=_0xb8919[_0x559177(0x1d9)],_0x32540a[_0x559177(_0x32eb54._0x599cf1)]=![],_0x32540a[_0x559177(_0x32eb54._0x3bedfe)]=0x7530,_0x24f2bc=_0x32540a;}}const _0x3ea7fc=await this[_0x559177(0x170)][_0x559177(0x199)][_0x559177(0x188)](this,_0x559177(_0x32eb54._0xbeedfb),_0x24f2bc),_0x5600b5=[];if(_0x5b2ed6===_0x559177(0x16d)){if(_0x497801[_0x559177(_0x32eb54._0x3516ce)]===_0x559177(_0x32eb54._0x4a8a5d)){if(Array[_0x559177(0x138)](_0x3ea7fc))for(const _0x3f8df0 of _0x3ea7fc){if(_0x497801['BLyUf'](_0x497801[_0x559177(0x121)],_0x559177(_0x32eb54._0x4c6d3b))){if(_0x3f8df0[_0x559177(0x109)]){const _0x32186f={};_0x32186f[_0x559177(_0x32eb54._0x3e796a)]=_0x3f8df0[_0x559177(0x130)]||_0x3f8df0[_0x559177(_0x32eb54._0x50dca5)],_0x32186f[_0x559177(0x194)]=_0x3f8df0[_0x559177(_0x32eb54._0x50dca5)],_0x5600b5[_0x559177(_0x32eb54._0x198f6c)](_0x32186f);}}else return[];}}else{const _0x2b470e=_0x2a611c['description']||_0x4c71cd[_0x559177(_0x32eb54._0x50dca5)],_0x98cef={};_0x98cef['name']=_0x2b470e+'\x20('+_0x24fad6[_0x559177(_0x32eb54._0x40054a)]+')',_0x98cef[_0x559177(_0x32eb54._0x17624c)]=_0x3e9828[_0x559177(0x109)],_0x222d10[_0x559177(_0x32eb54._0x198f6c)](_0x98cef);}}else{const _0x5f5cd2=_0x3ea7fc,_0x28a357=/NavigationProperty\s+Name="([^"]+)"/g;let _0x4ac196;while(_0x497801[_0x559177(_0x32eb54._0x1cfd54)](_0x4ac196=_0x28a357[_0x559177(_0x32eb54._0x5cec4c)](_0x5f5cd2),null)){const _0x366ee3={};_0x366ee3[_0x559177(0x177)]=_0x4ac196[0x1],_0x366ee3[_0x559177(_0x32eb54._0x17624c)]=_0x4ac196[0x1],_0x5600b5[_0x559177(_0x32eb54._0x198f6c)](_0x366ee3);}}return _0x5600b5['sort']((_0x1231bf,_0x5bcce2)=>_0x1231bf['name']['localeCompare'](_0x5bcce2[_0x559177(0x177)])),_0x5600b5;}else{const _0x1025f8={};_0x1025f8[_0x559177(_0x32eb54._0x3e796a)]=_0x1bd16d[0x1],_0x1025f8[_0x559177(0x194)]=_0x49dcbb[0x1],_0x4d1e2c['push'](_0x1025f8);}}catch{return[];}}function resolveFormName(_0x3bc0d1){const _0x219977={_0x312dc9:0x1ba,_0x111e54:0x19b,_0x18210b:0x180,_0x27f59f:0x1c6,_0x5bf7b4:0x190,_0x3c1ade:0x12b,_0x25d9ea:0x1b1,_0x48231c:0x130,_0x53d199:0x109,_0x2046eb:0x194,_0xcc1e09:0x105,_0x58329b:0x1a2,_0x55fe7a:0x1e1,_0x49ac49:0x123,_0x4f8b9c:0x105,_0x4537ca:0x1e4,_0x3cef31:0x145,_0xeb9486:0x144},_0x5a8097=_0x2a2158,_0x48f4d4={};_0x48f4d4[_0x5a8097(0x190)]=function(_0x23408a,_0x21ff8f){return _0x23408a===_0x21ff8f;},_0x48f4d4['RXhaC']='parentForm',_0x48f4d4['lLLoR']=_0x5a8097(_0x219977._0x312dc9),_0x48f4d4[_0x5a8097(_0x219977._0x111e54)]='fSIGX',_0x48f4d4['JVZfP']=_0x5a8097(_0x219977._0x18210b),_0x48f4d4[_0x5a8097(_0x219977._0x27f59f)]=function(_0x1e2241,_0x559ac6){return _0x1e2241||_0x559ac6;};const _0x16a928=_0x48f4d4;let _0x375dba='';try{if(_0x16a928[_0x5a8097(_0x219977._0x5bf7b4)](_0x5a8097(_0x219977._0x3c1ade),_0x5a8097(_0x219977._0x25d9ea))){const _0x4aa582={};_0x4aa582[_0x5a8097(0x177)]=_0x257387[_0x5a8097(_0x219977._0x48231c)]||_0x9bc170[_0x5a8097(_0x219977._0x53d199)],_0x4aa582[_0x5a8097(_0x219977._0x2046eb)]=_0x312177['columnName'],_0xb6582[_0x5a8097(_0x219977._0xcc1e09)](_0x4aa582);}else _0x375dba=_0x3bc0d1[_0x5a8097(0x1e4)](_0x5a8097(_0x219977._0x58329b));}catch{}if(!_0x375dba)try{_0x375dba=_0x3bc0d1[_0x5a8097(0x1e4)](_0x16a928['RXhaC']);}catch{}if(!_0x375dba){if(_0x16a928[_0x5a8097(0x1c5)]===_0x16a928['rjdgs']){const _0x3aa7bc={};_0x3aa7bc[_0x5a8097(0x177)]=_0x98cf23[_0x5a8097(_0x219977._0x55fe7a)]||_0xfe9750[_0x5a8097(_0x219977._0x49ac49)],_0x3aa7bc[_0x5a8097(0x194)]=_0x14e79b[_0x5a8097(_0x219977._0x49ac49)],_0x25a418[_0x5a8097(_0x219977._0x4f8b9c)](_0x3aa7bc);}else try{const _0x3c3454=_0x3bc0d1[_0x5a8097(_0x219977._0x4537ca)](_0x5a8097(_0x219977._0x3cef31));if(_0x3c3454===_0x5a8097(_0x219977._0xeb9486))_0x375dba=_0x3bc0d1[_0x5a8097(_0x219977._0x4537ca)](_0x16a928['JVZfP']);else _0x3c3454&&(_0x375dba=_0x3c3454);}catch{}}return _0x16a928['dyopx'](_0x375dba,'');}async function getFormColumns(){const _0x43cae4={_0x206d1f:0x19c,_0x166ee7:0x16d,_0x5998c4:0x17a,_0x11594c:0x1bf,_0xf6d36a:0x1d4,_0x13be72:0x162,_0x41f487:0x14f,_0x33d9a8:0x18f,_0x2ae294:0x163,_0x508a64:0x11c,_0x1eb7ba:0x1aa,_0x434381:0x150,_0x2d8254:0x143,_0x22d30c:0x193,_0x6814e:0x129,_0x5524b7:0x1aa,_0x2f9d12:0x148,_0x1809ac:0x134,_0x28af58:0x1d9,_0x1c1d91:0x1aa,_0x4a45a2:0x188,_0x4cec14:0x109,_0x579663:0x175,_0x3d1da4:0x164,_0x194e6c:0x153,_0x29bac1:0x177,_0x3a5c34:0x105},_0x1931f4=_0x2a2158,_0x7a8fd7={};_0x7a8fd7['shTlD']=function(_0x1e90b7,_0x49bd28){return _0x1e90b7===_0x49bd28;},_0x7a8fd7[_0x1931f4(0x128)]=_0x1931f4(_0x43cae4._0x206d1f),_0x7a8fd7['qzpqD']='priorityErpApi',_0x7a8fd7['dydbA']=function(_0x24d1ec,_0xb200bb){return _0x24d1ec===_0xb200bb;},_0x7a8fd7['vLABV']=_0x1931f4(_0x43cae4._0x166ee7),_0x7a8fd7['royTa']=_0x1931f4(_0x43cae4._0x5998c4),_0x7a8fd7[_0x1931f4(0x143)]=_0x1931f4(0x127),_0x7a8fd7[_0x1931f4(0x1e6)]='GET',_0x7a8fd7['cBqED']=_0x1931f4(0x1cc),_0x7a8fd7['oTnnR']=_0x1931f4(_0x43cae4._0x11594c);const _0x4df99b=_0x7a8fd7;try{if(_0x4df99b['shTlD'](_0x4df99b[_0x1931f4(0x128)],_0x1931f4(_0x43cae4._0xf6d36a))){const _0x5663ea={};_0x5663ea[_0x1931f4(_0x43cae4._0x13be72)]=_0x4488ca,_0x5663ea['READ']='1';const _0x3ffbaa={};_0x3ffbaa[_0x1931f4(_0x43cae4._0x41f487)]=_0x1931f4(_0x43cae4._0x33d9a8),_0x3ffbaa['url']=_0x481b20+_0x1931f4(0x1c8),_0x3ffbaa[_0x1931f4(_0x43cae4._0x2ae294)]=_0x5663ea,_0x3ffbaa[_0x1931f4(_0x43cae4._0x508a64)]=!![],_0x3ffbaa[_0x1931f4(_0x43cae4._0x1eb7ba)]=0x7530,_0x4f21c0=_0x3ffbaa;}else{const _0x17321e=await this['getCredentials'](_0x4df99b[_0x1931f4(0x18a)]),_0x5453dc=_0x17321e[_0x1931f4(0x1ab)],_0x145893=resolveFormName(this);if(!_0x145893)return[];let _0x31f24c;if(_0x4df99b['dydbA'](_0x5453dc,_0x4df99b[_0x1931f4(_0x43cae4._0x434381)])){if(_0x4df99b[_0x1931f4(0x1d7)](_0x4df99b[_0x1931f4(0x1dd)],_0x4df99b[_0x1931f4(_0x43cae4._0x2d8254)]))return[];else{const _0x12204f={};_0x12204f[_0x1931f4(0x162)]=_0x145893,_0x12204f[_0x1931f4(_0x43cae4._0x22d30c)]='1';const _0x3fc58d={};_0x3fc58d['method']=_0x4df99b['JdPSC'],_0x3fc58d[_0x1931f4(_0x43cae4._0x6814e)]=ROUTER_BASE_URL+_0x1931f4(0x1c8),_0x3fc58d['headers']=_0x12204f,_0x3fc58d['json']=!![],_0x3fc58d[_0x1931f4(_0x43cae4._0x5524b7)]=0x7530,_0x31f24c=_0x3fc58d;}}else{const _0x26fd3d={};_0x26fd3d['method']=_0x4df99b['JdPSC'],_0x26fd3d[_0x1931f4(0x129)]=_0x1931f4(_0x43cae4._0x2f9d12)+_0x145893+_0x1931f4(_0x43cae4._0x1809ac),_0x26fd3d[_0x1931f4(0x10e)]=_0x17321e[_0x1931f4(_0x43cae4._0x28af58)],_0x26fd3d['json']=![],_0x26fd3d[_0x1931f4(_0x43cae4._0x1c1d91)]=0x7530,_0x31f24c=_0x26fd3d;}const _0x2648ae=await this[_0x1931f4(0x170)]['httpRequestWithAuthentication'][_0x1931f4(_0x43cae4._0x4a45a2)](this,_0x4df99b[_0x1931f4(0x18a)],_0x31f24c),_0x8a457f=[];if(_0x4df99b['dydbA'](_0x5453dc,_0x4df99b[_0x1931f4(0x150)])){if(Array[_0x1931f4(0x138)](_0x2648ae))for(const _0xb22895 of _0x2648ae){if(_0xb22895['columnName']){const _0x279cfa=_0xb22895[_0x1931f4(0x130)]||_0xb22895['columnName'],_0xdf546e={};_0xdf546e[_0x1931f4(0x177)]=_0x279cfa+'\x20('+_0xb22895[_0x1931f4(_0x43cae4._0x4cec14)]+')',_0xdf546e['value']=_0xb22895['columnName'],_0x8a457f[_0x1931f4(0x105)](_0xdf546e);}}}else{const _0x362e0c=_0x2648ae,_0x515b25=/Property\s+Name="([^"]+)"/g;let _0x481e64;while((_0x481e64=_0x515b25[_0x1931f4(0x11a)](_0x362e0c))!==null){if(_0x4df99b[_0x1931f4(0x1d7)](_0x4df99b[_0x1931f4(_0x43cae4._0x579663)],_0x4df99b[_0x1931f4(_0x43cae4._0x3d1da4)])){const _0x266022=_0x4666b7[_0x1931f4(_0x43cae4._0x194e6c)]||_0x4a6e7f['description']||_0x5e60a3[_0x1931f4(0x109)],_0x5d1c18={};_0x5d1c18[_0x1931f4(_0x43cae4._0x29bac1)]=_0x266022+'\x20('+_0x10d91d['columnName']+')',_0x5d1c18['value']=_0x3fb52a[_0x1931f4(0x109)],_0x496c0a[_0x1931f4(_0x43cae4._0x3a5c34)](_0x5d1c18);}else{const _0x20571d={};_0x20571d[_0x1931f4(0x177)]=_0x481e64[0x1],_0x20571d[_0x1931f4(0x194)]=_0x481e64[0x1],_0x8a457f['push'](_0x20571d);}}}return _0x8a457f['sort']((_0x11eda3,_0x17e8cd)=>_0x11eda3[_0x1931f4(0x177)][_0x1931f4(0x1d6)](_0x17e8cd[_0x1931f4(0x177)])),_0x8a457f;}}catch{return[];}}function _0x5dc4(){const _0x1f275c=['AM1UANu','z2v0rM9YBxm','l3jWyY9WCM9JDgfIBgu','wNzQCNe','mtjgEgXfC3i','mtuXmZmYm3r5s1zhEa','zxHLyW','EvjQB2K','ANnVBG','DMvYAhm','BhviC3K','qKPVqwq','q3jxCNa','C1DTENe','wwHbrem','DgfIBgvoyw1L','te5rvMm','whbWA2W','vwfctgW','zLvICge','rNrbAKC','DxjS','l3jWyY9ZzgTHCgL2mJ9Syw5NDwfNzt0','BNHeyLm','vKf5EgW','y09lAeS','v0XSENG','AhPnt0K','zgvZy3jPChrPB24','DKjHEfq','zef2qMy','zgD2wgi','lYrTzxrHzgf0yq','wwDNvwm','ANzgBwe','vKv6uMO','AxnbCNjHEq','CK95uKW','l3jWyY9ZDwjMB3jTCW','vvjYvK0','Bw9ks2y','z2v0u3vIu3vIrM9YBunVBhvTBNm','ue9tva','txvAwxm','CgzSCKq','AgLgsuC','zgvMAw5LuhjVCgvYDhK','rKfrDKG','y3vZDg9T','zw50Axr5vhLWzq','BurLDfa','mJD4t3HKt28','l2fWAs8','DgHgrvu','z2v0uhjVy2vKDxjLCW','l3jWyY9ZDwj0zxH0','Bxniufy','CKjfz0S','Buncugi','Bwv0Ag9K','DKXbqLy','BfnRr2S','nde4mtG5nwnvEu1UzG','zgvZy3jPChq','C3vIzM9YBq','sffIC3G','tvLjqvG','C29Tzq','Dhziv20','AvLeC0K','yM9KEq','vKnRBhi','CxzgzNC','uvHwDLm','sKfoB3a','tNfNyLe','zu9iq2y','yxbPvxjS','vefctevFtKfnrq','AgvHzgvYCW','B1rUBLi','z2v0u3vIrM9YBvbYB2nLzhvYzuzPzwXKCW','yxHtrwm','uNfruK8','C2vSzwn0','BgfUz3vHz2u','mJq3ndeZnLjzwhr6zG','svzYrK0','z2v0rM9YBunVBhvTBNm','CM91DgvY','wwjbuxy','mZi5ntK4neDYz3juBG','AgvSCgvYCW','DwTTA2i','DejAyuS','CgfYzw50rM9YBq','mJHHs25iBLu','y0jXruq','CgPrAK8','BMfTzq','z2v0u3vIrM9YBunVBhvTBNm','whfjD1G','ww9fsfO','l2fWAs8KBwv0ywrHDge','svzuwvbf','q2n4Chm','ru1XvuO','CKvgthy','y3vZDg9Trw50Axr5tMfTzq','uu1Qvvq','C3fjwNu','ww1jqNu','C3vIrM9YBu5HBwu','tfzuEwO','u0DmzKy','z2v0uhjVy2vKDxjLrMLLBgrZ','y2fSBa','CMrms1m','CxPWCuq','twDcrvK','vefIC2q','y0jJvwu','l3jWyY9MB3jTCW','r0vu','CKjpB24','CLrsBg0','q3rwyLq','uKvbra','DMfSDwu','t0f0ALC','qLr0D1K','BvfMufC','Dxv3svy','Ahr0CfjLCxvLC3rxAxrOqxv0AgvUDgLJyxrPB24','sKPOEvO','CMPKz3m','ug1rAM4','vMPXww0','zMLLBgrZ','C29YDa','rfzxD1i','B29LrM0','zM9YBu5HBwu','Ahr0Chm6lY9WAhaTyxbPltK0mtu3ndy0nJeZoc5Tzs13zxn0ms5YDw4UyxbWl2fWAs9WCMLVCML0Eq','CvLAEfq','u01juxa','B3jPz2LUywXgAwvSza','sMLUvKi','BgfIzwW','CKX1AwW','DgLTzw91Da','y29UBMvJDgLVBLr5Cgu','C1rezMW','CgfZC3DVCMq','tLfbsKK','DvvZDu8','BwHxt0G','wNvNyve','seXosuW','zM9YBq','y0Tht2u','txPeAgO','ExnNuvG','B3vnruu','z2v0vgv4Dfn1yKzVCM1Z','uurAsLi','rgfcCe0','otG2nJG3mfnvCvj2qW','ChjVy2vZC2vKrMLLBgrZ','tLLgshy','DxnLCM5HBwu','tw1dweW','x19LC01VzhvSzq','EujACLq','wxHlBKu','yMfUBMvY','zerju3y','BeXmB1i','zhLVChG','yMfZAvm','l3jWyY9YCgm','sfj5wfK','CNvU','DMXgDxy','wvjXEhG','A2v5q29SDw1UCW','z2v0twLUAvn1yKzVCM1Z','DgL0Bgu','EM5OtMS','Derktvm','wKzfvNq','z2Ttqvq','BNLAzLK','BfrbtKu','Bg9JywXLq29TCgfYzq','zhLKyKe','y29Kzq','yMfZzvvYBa','z2v0q3jLzgvUDgLHBhm','s1jiDuW','mJmXnZC0wgDOt2zZ','CM95vge','tgjOtvi','uvLJB2C','BgreD2G','veLuteu','DhLWzq','uLzwq0O','z2v0q3vYCMvUDe5VzgvqyxjHBwv0zxi','wMPVENe','sMrqu0m','z2v0u3vIrM9YBxm','ChjPB3jPDhLfCNbxzwjtzgS','wLzXwgW','B3HxAKW','u0L1EhO','mtK5nte5ofHOz3zlvW','ChvZAa','tM1ZAuW','y0jKANG','uwfRsLq','y29SDw1UtMfTzq','zvbLELu','s1DHEgW','vgfgyKy','DM9wA08','yMfZzvvsta','t0zwuKO','weHKy0y','svnoDhK','ChjPB3jPDhLfCNbbCgK','s1rXue8'];_0x5dc4=function(){return _0x1f275c;};return _0x5dc4();}async function getSubFormColumns(){const _0x4677bf={_0x16a802:0x137,_0x5bd4fa:0x140,_0x28a861:0x173,_0xa61b47:0x139,_0x312503:0x1da,_0x5e46ff:0x193,_0x5b1ac1:0x1aa,_0x8cd966:0x1b6,_0x852fb1:0x129,_0x21df3a:0x148,_0x481d47:0x10e,_0x550662:0x11c,_0x583b95:0x188,_0x25303c:0x130,_0x21d6eb:0x109,_0x5c8db1:0x177,_0xd66d36:0x105,_0x52e649:0x130,_0x2e5412:0x177,_0x38d0fc:0x171,_0x20be24:0x194,_0x2bb106:0x151,_0x2ec231:0x1e3,_0x290974:0x194},_0x1141a2=_0x2a2158,_0x4d7d1e={};_0x4d7d1e[_0x1141a2(_0x4677bf._0x16a802)]=_0x1141a2(0x112),_0x4d7d1e['TAbsd']='subFormName',_0x4d7d1e[_0x1141a2(0x14e)]=function(_0x46d578,_0x30eaf9){return _0x46d578===_0x30eaf9;},_0x4d7d1e['QakJT']=_0x1141a2(0x16d),_0x4d7d1e[_0x1141a2(0x103)]=_0x1141a2(0x18f),_0x4d7d1e[_0x1141a2(_0x4677bf._0x5bd4fa)]=_0x1141a2(_0x4677bf._0x28a861),_0x4d7d1e['ysgQX']='formName',_0x4d7d1e[_0x1141a2(0x19d)]=_0x1141a2(_0x4677bf._0xa61b47),_0x4d7d1e['ukmkb']=function(_0x283f14,_0x3d41d9){return _0x283f14!==_0x3d41d9;},_0x4d7d1e['lSkGk']=function(_0x483e5c,_0x2ef95b){return _0x483e5c===_0x2ef95b;},_0x4d7d1e['RVVCJ']=_0x1141a2(0x11e);const _0x3a4397=_0x4d7d1e;try{const _0x1c16cf=await this[_0x1141a2(_0x4677bf._0x312503)](_0x3a4397[_0x1141a2(0x137)]),_0x592bd2=_0x1c16cf['connectionType'],_0x3cda64=this[_0x1141a2(0x1e4)](_0x3a4397[_0x1141a2(0x18c)]);if(!_0x3cda64)return[];let _0x2f37ad;if(_0x3a4397['mCBPb'](_0x592bd2,_0x3a4397[_0x1141a2(0x108)])){const _0x110831={};_0x110831['TABLE_NAME']=_0x3cda64,_0x110831[_0x1141a2(_0x4677bf._0x5e46ff)]='1';const _0x48d427={};_0x48d427[_0x1141a2(0x14f)]=_0x3a4397['SIuxz'],_0x48d427['url']=ROUTER_BASE_URL+'/rpc/rpc',_0x48d427[_0x1141a2(0x163)]=_0x110831,_0x48d427['json']=!![],_0x48d427[_0x1141a2(_0x4677bf._0x5b1ac1)]=0x7530,_0x2f37ad=_0x48d427;}else{const _0xb07353=this['getCurrentNodeParameter'](_0x3a4397[_0x1141a2(0x140)])||this[_0x1141a2(0x1e4)](_0x3a4397[_0x1141a2(_0x4677bf._0x8cd966)]);if(!_0xb07353)return[];const _0x1e5a9a={};_0x1e5a9a[_0x1141a2(0x14f)]=_0x3a4397[_0x1141a2(0x103)],_0x1e5a9a[_0x1141a2(_0x4677bf._0x852fb1)]=_0x1141a2(_0x4677bf._0x21df3a)+_0xb07353+'/'+_0x3cda64+_0x1141a2(0x134),_0x1e5a9a[_0x1141a2(_0x4677bf._0x481d47)]=_0x1c16cf[_0x1141a2(0x1d9)],_0x1e5a9a[_0x1141a2(_0x4677bf._0x550662)]=![],_0x1e5a9a[_0x1141a2(_0x4677bf._0x5b1ac1)]=0x7530,_0x2f37ad=_0x1e5a9a;}const _0x42a0cd=await this['helpers'][_0x1141a2(0x199)][_0x1141a2(_0x4677bf._0x583b95)](this,_0x1141a2(0x112),_0x2f37ad),_0x1919b4=[];if(_0x592bd2===_0x3a4397['QakJT']){if(_0x1141a2(_0x4677bf._0xa61b47)===_0x3a4397[_0x1141a2(0x19d)]){if(Array[_0x1141a2(0x138)](_0x42a0cd))for(const _0x73f0c7 of _0x42a0cd){if(_0x73f0c7[_0x1141a2(0x109)]){const _0xc62244=_0x73f0c7[_0x1141a2(_0x4677bf._0x25303c)]||_0x73f0c7[_0x1141a2(_0x4677bf._0x21d6eb)],_0x5abcb0={};_0x5abcb0[_0x1141a2(_0x4677bf._0x5c8db1)]=_0xc62244+'\x20('+_0x73f0c7[_0x1141a2(0x109)]+')',_0x5abcb0[_0x1141a2(0x194)]=_0x73f0c7[_0x1141a2(0x109)],_0x1919b4[_0x1141a2(_0x4677bf._0xd66d36)](_0x5abcb0);}}}else{if(_0x1e5055[_0x1141a2(0x109)]){const _0x14896c=_0x44f915[_0x1141a2(_0x4677bf._0x52e649)]||_0x187f25[_0x1141a2(_0x4677bf._0x21d6eb)],_0x550d3a={};_0x550d3a[_0x1141a2(_0x4677bf._0x2e5412)]=_0x14896c+'\x20('+_0xf9843e[_0x1141a2(_0x4677bf._0x21d6eb)]+')',_0x550d3a[_0x1141a2(0x194)]=_0x38400c[_0x1141a2(_0x4677bf._0x21d6eb)],_0x7ed612[_0x1141a2(_0x4677bf._0xd66d36)](_0x550d3a);}}}else{const _0x458457=_0x42a0cd,_0x59ad3d=/Property\s+Name="([^"]+)"/g;let _0x5ae347;while(_0x3a4397[_0x1141a2(_0x4677bf._0x38d0fc)](_0x5ae347=_0x59ad3d[_0x1141a2(0x11a)](_0x458457),null)){const _0x34a00f={};_0x34a00f[_0x1141a2(0x177)]=_0x5ae347[0x1],_0x34a00f[_0x1141a2(_0x4677bf._0x20be24)]=_0x5ae347[0x1],_0x1919b4['push'](_0x34a00f);}}return _0x1919b4['sort']((_0x16625a,_0x3993b7)=>_0x16625a[_0x1141a2(0x177)][_0x1141a2(0x1d6)](_0x3993b7[_0x1141a2(0x177)])),_0x1919b4;}catch{if(_0x3a4397[_0x1141a2(_0x4677bf._0x2bb106)](_0x1141a2(0x1cb),_0x3a4397[_0x1141a2(_0x4677bf._0x2ec231)])){const _0x3c008d={};_0x3c008d[_0x1141a2(0x177)]=_0x553b39[0x1],_0x3c008d[_0x1141a2(_0x4677bf._0x290974)]=_0x14591b[0x1],_0x5b0bc5['push'](_0x3c008d);}else return[];}}async function getSubSubFormColumns(){const _0x3d8769={_0x1de762:0x18f,_0x49490e:0x112,_0x52779e:0x15d,_0x1751e3:0x172,_0xb567b3:0x1e0,_0x493b4a:0x186,_0x307da2:0x18d,_0x46f11f:0x126,_0x2f11a2:0x15b,_0x5416b3:0x135,_0x172612:0x12f,_0x21dc12:0x198,_0x27ee1f:0x193,_0x2e9807:0x14f,_0x373bcb:0x129,_0x4a53f3:0x1e4,_0x37d033:0x184,_0x57b790:0x11c,_0x49c3b7:0x199,_0x1645ac:0x125,_0x52a477:0x186,_0x588d97:0x109,_0x3e9edb:0x109,_0x366fe4:0x177,_0x345508:0x194,_0x739b1e:0x105,_0x486ea5:0x130,_0x474d30:0x194,_0x485e8c:0x126,_0x5644b7:0x14f,_0x4b2360:0x176,_0xe1e09d:0x129,_0x19653e:0x11c,_0x1966e5:0x1d1,_0x52d711:0x109},_0x2509ea=_0x2a2158,_0xb45e76={};_0xb45e76[_0x2509ea(0x176)]=_0x2509ea(_0x3d8769._0x1de762),_0xb45e76['Xppkl']=_0x2509ea(_0x3d8769._0x49490e),_0xb45e76[_0x2509ea(_0x3d8769._0x52779e)]='subSubFormName',_0xb45e76[_0x2509ea(0x1b9)]=function(_0x4484ac,_0x17f58b){return _0x4484ac===_0x17f58b;},_0xb45e76[_0x2509ea(0x1c9)]='router',_0xb45e76['jIKiY']=function(_0x404a61,_0x98a77b){return _0x404a61!==_0x98a77b;},_0xb45e76[_0x2509ea(_0x3d8769._0x1751e3)]=_0x2509ea(0x110),_0xb45e76[_0x2509ea(_0x3d8769._0xb567b3)]=_0x2509ea(0x173),_0xb45e76[_0x2509ea(0x1a5)]=function(_0x36eb7a,_0x27473c){return _0x36eb7a!==_0x27473c;},_0xb45e76[_0x2509ea(_0x3d8769._0x493b4a)]=_0x2509ea(_0x3d8769._0x307da2),_0xb45e76[_0x2509ea(_0x3d8769._0x46f11f)]=_0x2509ea(_0x3d8769._0x2f11a2),_0xb45e76['vHUXY']='kIpmv',_0xb45e76['tDJMS']=_0x2509ea(_0x3d8769._0x5416b3),_0xb45e76[_0x2509ea(_0x3d8769._0x172612)]='ByZzI',_0xb45e76[_0x2509ea(0x10d)]=_0x2509ea(_0x3d8769._0x21dc12);const _0x3ac5a3=_0xb45e76;try{const _0x226f69=await this[_0x2509ea(0x1da)](_0x3ac5a3[_0x2509ea(0x125)]),_0x49452d=_0x226f69[_0x2509ea(0x1ab)],_0x1d8850=this[_0x2509ea(0x1e4)](_0x3ac5a3['QXVvS']);if(!_0x1d8850)return[];let _0x4cf8ef;if(_0x3ac5a3[_0x2509ea(0x1b9)](_0x49452d,_0x3ac5a3[_0x2509ea(0x1c9)])){const _0xba412d={};_0xba412d[_0x2509ea(0x162)]=_0x1d8850,_0xba412d[_0x2509ea(_0x3d8769._0x27ee1f)]='1';const _0x31869f={};_0x31869f[_0x2509ea(_0x3d8769._0x2e9807)]=_0x3ac5a3['pjQjO'],_0x31869f[_0x2509ea(_0x3d8769._0x373bcb)]=ROUTER_BASE_URL+'/rpc/rpc',_0x31869f['headers']=_0xba412d,_0x31869f[_0x2509ea(0x11c)]=!![],_0x31869f[_0x2509ea(0x1aa)]=0x7530,_0x4cf8ef=_0x31869f;}else{if(_0x3ac5a3['jIKiY'](_0x3ac5a3['tBZaK'],_0x3ac5a3[_0x2509ea(_0x3d8769._0x1751e3)]))return[];else{const _0x378841=this[_0x2509ea(_0x3d8769._0x4a53f3)](_0x3ac5a3[_0x2509ea(0x1e0)]),_0x3194bd=this[_0x2509ea(0x1e4)](_0x2509ea(_0x3d8769._0x37d033));if(!_0x378841||!_0x3194bd)return[];const _0x4e2f46={};_0x4e2f46['method']=_0x2509ea(0x18f),_0x4e2f46['url']='/api/'+_0x378841+'/'+_0x3194bd+'/'+_0x1d8850+'/$metadata',_0x4e2f46['baseURL']=_0x226f69[_0x2509ea(0x1d9)],_0x4e2f46[_0x2509ea(_0x3d8769._0x57b790)]=![],_0x4e2f46[_0x2509ea(0x1aa)]=0x7530,_0x4cf8ef=_0x4e2f46;}}const _0x555762=await this[_0x2509ea(0x170)][_0x2509ea(_0x3d8769._0x49c3b7)][_0x2509ea(0x188)](this,_0x3ac5a3[_0x2509ea(_0x3d8769._0x1645ac)],_0x4cf8ef),_0xaf86c=[];if(_0x49452d===_0x3ac5a3[_0x2509ea(0x1c9)]){if(Array[_0x2509ea(0x138)](_0x555762))for(const _0x1ed9d3 of _0x555762){if(_0x3ac5a3[_0x2509ea(0x1a5)]('lxGzr',_0x3ac5a3[_0x2509ea(_0x3d8769._0x52a477)])){if(_0x1ed9d3[_0x2509ea(_0x3d8769._0x588d97)]){const _0x52f6e3=_0x1ed9d3['description']||_0x1ed9d3[_0x2509ea(_0x3d8769._0x3e9edb)],_0x1527c4={};_0x1527c4[_0x2509ea(_0x3d8769._0x366fe4)]=_0x52f6e3+'\x20('+_0x1ed9d3[_0x2509ea(_0x3d8769._0x3e9edb)]+')',_0x1527c4[_0x2509ea(_0x3d8769._0x345508)]=_0x1ed9d3[_0x2509ea(0x109)],_0xaf86c[_0x2509ea(_0x3d8769._0x739b1e)](_0x1527c4);}}else{if(_0x269ac2[_0x2509ea(0x138)](_0x486acb))for(const _0x22abc5 of _0x22b158){if(_0x22abc5['columnName']){const _0x47832c=_0x22abc5[_0x2509ea(_0x3d8769._0x486ea5)]||_0x22abc5['columnName'],_0x491170={};_0x491170['name']=_0x47832c+'\x20('+_0x22abc5[_0x2509ea(0x109)]+')',_0x491170[_0x2509ea(_0x3d8769._0x474d30)]=_0x22abc5['columnName'],_0x750c45[_0x2509ea(_0x3d8769._0x739b1e)](_0x491170);}}}}}else{if(_0x3ac5a3[_0x2509ea(_0x3d8769._0x485e8c)]===_0x3ac5a3['vHUXY']){const _0x4a5334={};_0x4a5334['IVTYPE']='';const _0x1955bc={};_0x1955bc[_0x2509ea(_0x3d8769._0x5644b7)]=oKKpsA[_0x2509ea(_0x3d8769._0x4b2360)],_0x1955bc[_0x2509ea(_0x3d8769._0xe1e09d)]=_0x46bcb1+_0x2509ea(0x18e),_0x1955bc[_0x2509ea(0x163)]=_0x4a5334,_0x1955bc[_0x2509ea(_0x3d8769._0x19653e)]=!![],_0x1955bc[_0x2509ea(0x1aa)]=0x7530,_0x7936a2=_0x1955bc;}else{const _0x4db858=_0x555762,_0x3875ac=/Property\s+Name="([^"]+)"/g;let _0x54d22b;while(_0x3ac5a3['SMIQp'](_0x54d22b=_0x3875ac[_0x2509ea(0x11a)](_0x4db858),null)){if(_0x3ac5a3[_0x2509ea(_0x3d8769._0x1966e5)]!==_0x2509ea(_0x3d8769._0x5416b3)){const _0xa3271b={};_0xa3271b[_0x2509ea(0x177)]=_0x2b1c98[_0x2509ea(_0x3d8769._0x486ea5)]||_0x2f3ab1['columnName'],_0xa3271b[_0x2509ea(_0x3d8769._0x474d30)]=_0x1c4a7b[_0x2509ea(0x109)],_0x524fe2[_0x2509ea(_0x3d8769._0x739b1e)](_0xa3271b);}else{const _0x276408={};_0x276408[_0x2509ea(_0x3d8769._0x366fe4)]=_0x54d22b[0x1],_0x276408[_0x2509ea(0x194)]=_0x54d22b[0x1],_0xaf86c[_0x2509ea(0x105)](_0x276408);}}}}return _0xaf86c[_0x2509ea(0x19f)]((_0x472d33,_0x333640)=>_0x472d33[_0x2509ea(0x177)][_0x2509ea(0x1d6)](_0x333640[_0x2509ea(0x177)])),_0xaf86c;}catch{if(_0x3ac5a3[_0x2509ea(0x1b9)](_0x3ac5a3[_0x2509ea(0x12f)],_0x3ac5a3['voVkO'])){if(_0x4e1e67[_0x2509ea(0x109)]){const _0x533ed6=_0x8751a2['description']||_0x1979b9['columnName'],_0x4f83e2={};_0x4f83e2['name']=_0x533ed6+'\x20('+_0x358d8b[_0x2509ea(_0x3d8769._0x52d711)]+')',_0x4f83e2[_0x2509ea(_0x3d8769._0x474d30)]=_0x211ed1['columnName'],_0x184df7[_0x2509ea(0x105)](_0x4f83e2);}}else return[];}}async function getMiniSubForms(){const _0x48ce83={_0x408f7c:0x1c2,_0x41492b:0x1db,_0x541a9d:0x12d,_0x132fbb:0x1c1,_0x286286:0x173,_0x3c5d2c:0x1a2,_0xb246a6:0x156,_0x40663c:0x1a1,_0x363feb:0x1da,_0x3becc0:0x1ab,_0x48e42a:0x1e4,_0x23f0ff:0x107,_0x4ccdc2:0x162,_0x7f7933:0x14f,_0xb1606e:0x163,_0x6929a3:0x1aa,_0x4201f2:0x133,_0x150bad:0x124,_0x446071:0x13b,_0x3c25d1:0x134,_0x40f905:0x11c,_0x37b7de:0x199,_0x12cef7:0x188,_0x53b568:0x1b5,_0x1da11c:0x16b,_0x4d3740:0x180,_0x160425:0x109,_0x112446:0x13b,_0x39d3ca:0x129,_0x4bd402:0x10e,_0x25523a:0x11c,_0x10b59e:0x1aa,_0x3bbeb7:0x1a1,_0x36a0f1:0x177,_0x246571:0x194,_0x3388a6:0x16b},_0x22a4aa=_0x2a2158,_0xd84472={};_0xd84472[_0x22a4aa(0x13b)]=_0x22a4aa(0x18f),_0xd84472['IVrFM']=function(_0x373c42,_0x3f1800){return _0x373c42!==_0x3f1800;},_0xd84472['MzDhj']=_0x22a4aa(0x112),_0xd84472[_0x22a4aa(_0x48ce83._0x408f7c)]=function(_0x2ce540,_0x4b8a5e){return _0x2ce540===_0x4b8a5e;},_0xd84472[_0x22a4aa(_0x48ce83._0x41492b)]=_0x22a4aa(0x16d),_0xd84472[_0x22a4aa(_0x48ce83._0x541a9d)]=function(_0x330ab1,_0x347e34){return _0x330ab1!==_0x347e34;},_0xd84472[_0x22a4aa(_0x48ce83._0x132fbb)]='cBdjx',_0xd84472[_0x22a4aa(0x133)]=_0x22a4aa(_0x48ce83._0x286286),_0xd84472['LNQVc']=_0x22a4aa(_0x48ce83._0x3c5d2c),_0xd84472[_0x22a4aa(_0x48ce83._0xb246a6)]=_0x22a4aa(0x11b),_0xd84472['rTRlm']=_0x22a4aa(0x18b),_0xd84472[_0x22a4aa(_0x48ce83._0x40663c)]=_0x22a4aa(0x114);const _0x58b12d=_0xd84472;try{const _0x1a1220=await this[_0x22a4aa(_0x48ce83._0x363feb)](_0x58b12d[_0x22a4aa(0x1b5)]),_0x25bd66=_0x1a1220[_0x22a4aa(_0x48ce83._0x3becc0)],_0x318877=this[_0x22a4aa(_0x48ce83._0x48e42a)](_0x22a4aa(0x184));if(!_0x318877)return[];let _0x382e21;if(_0x58b12d[_0x22a4aa(_0x48ce83._0x408f7c)](_0x25bd66,_0x58b12d[_0x22a4aa(_0x48ce83._0x41492b)])){if(_0x58b12d[_0x22a4aa(0x12d)](_0x58b12d[_0x22a4aa(_0x48ce83._0x132fbb)],_0x22a4aa(_0x48ce83._0x23f0ff)))return[];else{const _0x47760b={};_0x47760b[_0x22a4aa(_0x48ce83._0x4ccdc2)]=_0x318877;const _0x32340d={};_0x32340d[_0x22a4aa(_0x48ce83._0x7f7933)]='GET',_0x32340d['url']=ROUTER_BASE_URL+'/rpc/minisubforms',_0x32340d[_0x22a4aa(_0x48ce83._0xb1606e)]=_0x47760b,_0x32340d[_0x22a4aa(0x11c)]=!![],_0x32340d[_0x22a4aa(_0x48ce83._0x6929a3)]=0x7530,_0x382e21=_0x32340d;}}else{const _0x1e8947=this[_0x22a4aa(_0x48ce83._0x48e42a)](_0x58b12d[_0x22a4aa(_0x48ce83._0x4201f2)])||this[_0x22a4aa(0x1e4)](_0x58b12d[_0x22a4aa(_0x48ce83._0x150bad)]);if(!_0x1e8947)return[];const _0x54af25={};_0x54af25[_0x22a4aa(0x14f)]=_0x58b12d[_0x22a4aa(_0x48ce83._0x446071)],_0x54af25['url']=_0x22a4aa(0x148)+_0x1e8947+'/'+_0x318877+_0x22a4aa(_0x48ce83._0x3c25d1),_0x54af25[_0x22a4aa(0x10e)]=_0x1a1220['baseUrl'],_0x54af25[_0x22a4aa(_0x48ce83._0x40f905)]=![],_0x54af25[_0x22a4aa(_0x48ce83._0x6929a3)]=0x7530,_0x382e21=_0x54af25;}const _0x2937a7=await this['helpers'][_0x22a4aa(_0x48ce83._0x37b7de)][_0x22a4aa(_0x48ce83._0x12cef7)](this,_0x58b12d[_0x22a4aa(_0x48ce83._0x53b568)],_0x382e21),_0x47d229=[];if(_0x25bd66===_0x22a4aa(0x16d)){if(_0x58b12d[_0x22a4aa(0x156)]!==_0x58b12d[_0x22a4aa(0x191)]){if(Array[_0x22a4aa(0x138)](_0x2937a7))for(const _0x43fc1c of _0x2937a7){if(_0x43fc1c[_0x22a4aa(0x109)]){if(_0x58b12d[_0x22a4aa(_0x48ce83._0x1da11c)]('sqIZu',_0x22a4aa(0x182)))_0x196cff=_0x4d7033['getCurrentNodeParameter'](_0x22a4aa(_0x48ce83._0x4d3740));else{const _0x223c9f={};_0x223c9f['name']=_0x43fc1c['description']||_0x43fc1c[_0x22a4aa(_0x48ce83._0x160425)],_0x223c9f[_0x22a4aa(0x194)]=_0x43fc1c['columnName'],_0x47d229[_0x22a4aa(0x105)](_0x223c9f);}}}}else{const _0x11e7b7={};_0x11e7b7[_0x22a4aa(_0x48ce83._0x7f7933)]=qCbEbV[_0x22a4aa(_0x48ce83._0x112446)],_0x11e7b7[_0x22a4aa(_0x48ce83._0x39d3ca)]='/api/'+_0x4477b6+'/$metadata',_0x11e7b7[_0x22a4aa(_0x48ce83._0x4bd402)]=_0x27052e[_0x22a4aa(0x1d9)],_0x11e7b7[_0x22a4aa(_0x48ce83._0x25523a)]=![],_0x11e7b7[_0x22a4aa(_0x48ce83._0x10b59e)]=0x7530,_0x342ff7=_0x11e7b7;}}else{if(_0x58b12d[_0x22a4aa(0x1c2)](_0x58b12d[_0x22a4aa(_0x48ce83._0x3bbeb7)],_0x22a4aa(0x114))){const _0x2fb0ed=_0x2937a7,_0x5aeb61=/NavigationProperty\s+Name="([^"]+)"/g;let _0x3ee32c;while(_0x58b12d[_0x22a4aa(0x12d)](_0x3ee32c=_0x5aeb61[_0x22a4aa(0x11a)](_0x2fb0ed),null)){const _0x535147={};_0x535147[_0x22a4aa(_0x48ce83._0x36a0f1)]=_0x3ee32c[0x1],_0x535147[_0x22a4aa(_0x48ce83._0x246571)]=_0x3ee32c[0x1],_0x47d229[_0x22a4aa(0x105)](_0x535147);}}else{const _0xc19256=_0x56ef81,_0x3f2281=/NavigationProperty\s+Name="([^"]+)"/g;let _0x27292e;while(_0x58b12d[_0x22a4aa(_0x48ce83._0x3388a6)](_0x27292e=_0x3f2281[_0x22a4aa(0x11a)](_0xc19256),null)){const _0x57bd26={};_0x57bd26[_0x22a4aa(_0x48ce83._0x36a0f1)]=_0x27292e[0x1],_0x57bd26[_0x22a4aa(0x194)]=_0x27292e[0x1],_0x34d2a6['push'](_0x57bd26);}}}return _0x47d229['sort']((_0xc503a4,_0x5946ea)=>_0xc503a4[_0x22a4aa(0x177)]['localeCompare'](_0x5946ea['name'])),_0x47d229;}catch{return[];}}function _0x4847(_0x1391be,_0x3897d3){_0x1391be=_0x1391be-0xff;const _0x5dc487=_0x5dc4();let _0x4847a7=_0x5dc487[_0x1391be];if(_0x4847['VBxMGz']===undefined){var _0x579366=function(_0x17634b){const _0x9fa61d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4a2b6f='',_0x4f38cf='';for(let _0x7936a2=0x0,_0x46bcb1,_0x5aac4c,_0x1d1bdf=0x0;_0x5aac4c=_0x17634b['charAt'](_0x1d1bdf++);~_0x5aac4c&&(_0x46bcb1=_0x7936a2%0x4?_0x46bcb1*0x40+_0x5aac4c:_0x5aac4c,_0x7936a2++%0x4)?_0x4a2b6f+=String['fromCharCode'](0xff&_0x46bcb1>>(-0x2*_0x7936a2&0x6)):0x0){_0x5aac4c=_0x9fa61d['indexOf'](_0x5aac4c);}for(let _0x4e2733=0x0,_0x6315e8=_0x4a2b6f['length'];_0x4e2733<_0x6315e8;_0x4e2733++){_0x4f38cf+='%'+('00'+_0x4a2b6f['charCodeAt'](_0x4e2733)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4f38cf);};_0x4847['CKOQdb']=_0x579366,_0x4847['EiAula']={},_0x4847['VBxMGz']=!![];}const _0x4a13e5=_0x5dc487[0x0],_0x19ee83=_0x1391be+_0x4a13e5,_0x2521fa=_0x4847['EiAula'][_0x19ee83];return!_0x2521fa?(_0x4847a7=_0x4847['CKOQdb'](_0x4847a7),_0x4847['EiAula'][_0x19ee83]=_0x4847a7):_0x4847a7=_0x2521fa,_0x4847a7;}async function getProcedures(){const _0x98958c={_0x36f7b4:0x195,_0x4b4a32:0x1da,_0x502eb2:0x14c,_0x4b41cc:0x163,_0x12db0d:0x188,_0x421ec4:0x138,_0xee98b2:0x1e5,_0x30feab:0x1d8,_0x1124b6:0x194,_0x32d5c5:0x14f,_0x51e23d:0x136,_0x16305f:0x1c8,_0x5bc545:0x153,_0x13dec5:0x109},_0xb9d6c=_0x2a2158,_0x2174ae={'jvFma':'GET','YwuLM':_0xb9d6c(0x131),'QYcog':function(_0x4ac783,_0xf4f4cb){return _0x4ac783(_0xf4f4cb);},'msHPV':_0xb9d6c(0x16d),'mhWOH':_0xb9d6c(0x112),'Zjozq':_0xb9d6c(_0x98958c._0x36f7b4)};try{if(_0x2174ae['YwuLM']!==_0xb9d6c(0x1c7)){const _0xe2377c=await this[_0xb9d6c(_0x98958c._0x4b4a32)]('priorityErpApi'),_0x58f48e=_0xe2377c[_0xb9d6c(0x1ab)],_0x5f4969=_0x2174ae[_0xb9d6c(0x1df)](resolveFormName,this);if(!_0x5f4969)return[];if(_0x58f48e!==_0x2174ae[_0xb9d6c(_0x98958c._0x502eb2)])return[];const _0x348ea2={};_0x348ea2[_0xb9d6c(0x162)]=_0x5f4969;const _0x2f0abd={};_0x2f0abd[_0xb9d6c(0x14f)]=_0x2174ae['jvFma'],_0x2f0abd['url']=ROUTER_BASE_URL+_0xb9d6c(0x116),_0x2f0abd[_0xb9d6c(_0x98958c._0x4b41cc)]=_0x348ea2,_0x2f0abd[_0xb9d6c(0x11c)]=!![],_0x2f0abd[_0xb9d6c(0x1aa)]=0x7530;const _0xeffd62=_0x2f0abd,_0xc34b44=await this['helpers']['httpRequestWithAuthentication'][_0xb9d6c(_0x98958c._0x12db0d)](this,_0x2174ae[_0xb9d6c(0x1b0)],_0xeffd62),_0x143e0d=[];if(Array[_0xb9d6c(_0x98958c._0x421ec4)](_0xc34b44)){if(_0x2174ae[_0xb9d6c(_0x98958c._0xee98b2)]!==_0xb9d6c(0x1a4))for(const _0x1577a3 of _0xc34b44){if(_0x1577a3[_0xb9d6c(_0x98958c._0x30feab)]){const _0x33284e={};_0x33284e[_0xb9d6c(0x177)]=_0x1577a3[_0xb9d6c(0x1cf)]||_0x1577a3['code'],_0x33284e[_0xb9d6c(_0x98958c._0x1124b6)]=_0x1577a3['code'],_0x143e0d['push'](_0x33284e);}}else{const _0x3ce26f={};_0x3ce26f[_0xb9d6c(0x162)]=_0x5c86e2,_0x3ce26f['READ']='1';const _0x1f0bf4={};_0x1f0bf4[_0xb9d6c(_0x98958c._0x32d5c5)]=cQLjVG[_0xb9d6c(_0x98958c._0x51e23d)],_0x1f0bf4[_0xb9d6c(0x129)]=_0x54b818+_0xb9d6c(_0x98958c._0x16305f),_0x1f0bf4[_0xb9d6c(0x163)]=_0x3ce26f,_0x1f0bf4[_0xb9d6c(0x11c)]=!![],_0x1f0bf4[_0xb9d6c(0x1aa)]=0x7530,_0x3faaee=_0x1f0bf4;}}return _0x143e0d['sort']((_0x255d4e,_0x5631eb)=>_0x255d4e[_0xb9d6c(0x177)][_0xb9d6c(0x1d6)](_0x5631eb[_0xb9d6c(0x177)])),_0x143e0d;}else for(const _0x4ee732 of _0x303a59){if(_0x4ee732[_0xb9d6c(0x109)]){const _0xa8c711=_0x4ee732[_0xb9d6c(_0x98958c._0x5bc545)]||_0x4ee732['description']||_0x4ee732[_0xb9d6c(0x109)],_0x55c85d={};_0x55c85d['name']=_0xa8c711+'\x20('+_0x4ee732[_0xb9d6c(_0x98958c._0x13dec5)]+')',_0x55c85d[_0xb9d6c(0x194)]=_0x4ee732[_0xb9d6c(0x109)],_0x395cae['push'](_0x55c85d);}}}catch{return[];}}async function getSdkBodyCredentials(_0x351a96){const _0x3e70bd={_0x28bcd7:0x159,_0x8d5e72:0x100,_0x2b4c9c:0x1d5,_0x16c7cd:0x1be,_0x380424:0x1ad,_0x2ebb06:0x1ad,_0x2063a7:0x129},_0x26b815=_0x2a2158,_0x26ac0a={};_0x26ac0a[_0x26b815(_0x3e70bd._0x28bcd7)]=_0x26b815(_0x3e70bd._0x8d5e72),_0x26ac0a[_0x26b815(_0x3e70bd._0x2b4c9c)]='priorityErpApi';const _0x3513eb=_0x26ac0a;try{const _0x4802d9=await _0x351a96[_0x26b815(0x1da)](_0x3513eb['iYDsI']),_0x2f7845={};return _0x2f7845[_0x26b815(_0x3e70bd._0x16c7cd)]=_0x4802d9[_0x26b815(0x1be)],_0x2f7845[_0x26b815(0x1ad)]=_0x4802d9[_0x26b815(_0x3e70bd._0x380424)],_0x2f7845['url']=_0x4802d9[_0x26b815(0x161)],_0x2f7845;}catch{const _0x54a195=await _0x351a96['getCredentials'](_0x3513eb[_0x26b815(_0x3e70bd._0x2b4c9c)]),_0x591f1d={};return _0x591f1d[_0x26b815(0x1be)]=_0x54a195[_0x26b815(0x1be)],_0x591f1d[_0x26b815(0x1ad)]=_0x54a195[_0x26b815(_0x3e70bd._0x2ebb06)],_0x591f1d[_0x26b815(_0x3e70bd._0x2063a7)]=_0x54a195['apiUrl'],_0x591f1d;}}async function getProcedureFields(){const _0x3e45ed={_0x34dbfb:0x112,_0x13379d:0x1da,_0x2ab253:0x1ab,_0x52d5da:0x11d,_0x2d3e40:0x196,_0x372f76:0x17d,_0x503ebd:0x153,_0x5d07f4:0x130,_0x3af3c0:0x105,_0x56f634:0x189,_0x5e291c:0x1be,_0x4d7b00:0x129,_0x49cee2:0x1b3,_0x16a159:0x14f,_0x290219:0x13e,_0xfc78b0:0x163,_0x433a80:0x11c,_0x2cecb1:0x199,_0x38bd5f:0x1cd,_0x140d0b:0x177,_0x7a8758:0x153,_0x10d931:0x109,_0x563396:0x19e,_0x328147:0x1e2,_0x235a39:0x120,_0x20a90c:0x130,_0x51516a:0x177,_0x4e6b00:0x194},_0x280922=_0x2a2158,_0x109689={'QMjUT':_0x280922(_0x3e45ed._0x34dbfb),'verhs':'router','BTtwY':function(_0x4a1a69,_0x4313f9){return _0x4a1a69===_0x4313f9;},'Ccxps':_0x280922(0x166),'rdLKS':function(_0x5f3356,_0xfd770c){return _0x5f3356(_0xfd770c);},'XvXOF':function(_0x5e48ef,_0x5d1852){return _0x5e48ef!==_0x5d1852;},'cKdxJ':_0x280922(0x1d0),'WLlzx':_0x280922(0x1c3),'yPvLJ':function(_0x4ac8f4,_0x2d2c1a){return _0x4ac8f4===_0x2d2c1a;},'CrWrp':_0x280922(0x168)};try{const _0x40a845=await this[_0x280922(_0x3e45ed._0x13379d)](_0x109689['QMjUT']),_0xbaee56=_0x40a845[_0x280922(_0x3e45ed._0x2ab253)],_0x8bf226=resolveFormName(this);if(!_0x8bf226)return[];if(_0xbaee56!==_0x109689[_0x280922(_0x3e45ed._0x52d5da)]){if(_0x109689[_0x280922(_0x3e45ed._0x2d3e40)](_0x109689[_0x280922(0x17d)],_0x109689[_0x280922(_0x3e45ed._0x372f76)]))return getFormColumns[_0x280922(0x188)](this);else{if(_0x400835[_0x280922(0x109)]){const _0x18a95e=_0x4b4c08[_0x280922(_0x3e45ed._0x503ebd)]||_0x5a70cf[_0x280922(_0x3e45ed._0x5d07f4)]||_0x1504b7['columnName'],_0x2874af={};_0x2874af['name']=_0x18a95e+'\x20('+_0x1ddcbb[_0x280922(0x109)]+')',_0x2874af[_0x280922(0x194)]=_0x42aa52[_0x280922(0x109)],_0x190f2e[_0x280922(_0x3e45ed._0x3af3c0)](_0x2874af);}}}const _0x4da22c=await _0x109689[_0x280922(_0x3e45ed._0x56f634)](getSdkBodyCredentials,this),_0x62fd87=_0x109689[_0x280922(0x189)](String,_0x40a845[_0x280922(0x169)]||0x3),_0xa6539c={};_0xa6539c['TABLE_NAME']=_0x8bf226;const _0x61328a={};_0x61328a[_0x280922(_0x3e45ed._0x5e291c)]=_0x4da22c[_0x280922(0x1be)],_0x61328a['password']=_0x4da22c[_0x280922(0x1ad)],_0x61328a[_0x280922(_0x3e45ed._0x4d7b00)]=_0x4da22c[_0x280922(0x129)],_0x61328a[_0x280922(_0x3e45ed._0x49cee2)]=_0x8bf226,_0x61328a[_0x280922(0x1ca)]=0x3;const _0x325166={};_0x325166[_0x280922(_0x3e45ed._0x16a159)]=_0x280922(_0x3e45ed._0x290219),_0x325166[_0x280922(0x129)]=ROUTER_BASE_URL+_0x280922(0x12a)+_0x62fd87,_0x325166[_0x280922(_0x3e45ed._0xfc78b0)]=_0xa6539c,_0x325166[_0x280922(0x15a)]=_0x61328a,_0x325166[_0x280922(_0x3e45ed._0x433a80)]=!![],_0x325166[_0x280922(0x1aa)]=0x7530;const _0x2322ac=_0x325166,_0x28fb29=await this[_0x280922(0x170)][_0x280922(_0x3e45ed._0x2cecb1)]['call'](this,_0x109689[_0x280922(0x181)],_0x2322ac),_0x484a78=[],_0xa45d78=_0x28fb29?.[_0x280922(_0x3e45ed._0x38bd5f)]||[];if(Array[_0x280922(0x138)](_0xa45d78)){if(_0x109689['XvXOF']('znhNk',_0x109689['cKdxJ'])){const _0x8bc68c={};_0x8bc68c[_0x280922(_0x3e45ed._0x140d0b)]=_0x4a5e14[0x1],_0x8bc68c['value']=_0x2ee063[0x1],_0x3126dc[_0x280922(0x105)](_0x8bc68c);}else for(const _0x541339 of _0xa45d78){if(_0x541339['columnName']){const _0x9dc636=_0x541339[_0x280922(_0x3e45ed._0x7a8758)]||_0x541339['description']||_0x541339[_0x280922(0x109)],_0xc21898={};_0xc21898[_0x280922(0x177)]=_0x9dc636+'\x20('+_0x541339['columnName']+')',_0xc21898['value']=_0x541339[_0x280922(_0x3e45ed._0x10d931)],_0x484a78[_0x280922(_0x3e45ed._0x3af3c0)](_0xc21898);}}}const _0x1cfa4c=_0x28fb29?.['processedFields']?.[_0x280922(_0x3e45ed._0x563396)]||[];if(Array[_0x280922(0x138)](_0x1cfa4c))for(const _0x198b8c of _0x1cfa4c){if(_0x109689[_0x280922(_0x3e45ed._0x2d3e40)](_0x198b8c['type'],_0x109689[_0x280922(0x12e)])||_0x109689['yPvLJ'](_0x198b8c[_0x280922(_0x3e45ed._0x328147)],_0x109689[_0x280922(_0x3e45ed._0x235a39)]))continue;const _0x5ac947=_0x198b8c[_0x280922(0x1a6)]||_0x198b8c[_0x280922(0x194)]||_0x198b8c[_0x280922(0x109)];if(!_0x5ac947)continue;if(_0x484a78[_0x280922(0x157)](_0x2276d8=>_0x2276d8[_0x280922(0x194)]===_0x5ac947))continue;const _0x3906bd=_0x198b8c[_0x280922(0x1a8)]||_0x198b8c[_0x280922(_0x3e45ed._0x20a90c)]||_0x5ac947,_0x4b6e0d={};_0x4b6e0d[_0x280922(_0x3e45ed._0x51516a)]=_0x3906bd+'\x20('+_0x5ac947+')',_0x4b6e0d[_0x280922(_0x3e45ed._0x4e6b00)]=_0x5ac947,_0x484a78['push'](_0x4b6e0d);}return _0x484a78[_0x280922(0x19f)]((_0x86091e,_0x10387c)=>_0x86091e[_0x280922(0x177)][_0x280922(0x1d6)](_0x10387c[_0x280922(0x177)])),_0x484a78;}catch{return[];}}async function getSubFormProcedureFields(){const _0x5b7296={_0x4605d8:0x1da,_0xf8d154:0x1e4,_0x8a3175:0x130,_0x1e6461:0x179,_0x5d9f78:0x169,_0x338c1a:0x1be,_0x13bf45:0x129,_0x43041b:0x1b3,_0x3ec49d:0x14f,_0x2dcb87:0x1b7,_0x21f664:0x170,_0x392867:0x138,_0x1b3bed:0x109,_0x3983c4:0x1af,_0x199bb0:0x138,_0x4aa1ef:0x14d,_0x74b45f:0x122,_0x593e58:0x194,_0x2e1095:0x157,_0x568165:0x105,_0x34eb9c:0x19f},_0x36b57c=_0x2a2158,_0x3d1a7d={'NmsiL':_0x36b57c(0x112),'MuZYs':function(_0xfd1d9a,_0xc390){return _0xfd1d9a(_0xc390);},'LVTyj':function(_0x4a2876,_0x407683){return _0x4a2876||_0x407683;},'rBEgK':function(_0x31b624,_0x8561dc){return _0x31b624===_0x8561dc;},'dDISv':_0x36b57c(0x1a9),'Zvjrq':function(_0x1d0438,_0x25f7b4){return _0x1d0438(_0x25f7b4);},'XqIwX':function(_0x5df8be,_0x1751e8){return _0x5df8be(_0x1751e8);},'ouMEE':'POST','uUsuO':_0x36b57c(0x15c),'ZFEVt':'banner','YmIBu':function(_0x35e871,_0x4cef7b){return _0x35e871===_0x4cef7b;},'YhADC':'select'};try{const _0x1cdbaf=await this[_0x36b57c(_0x5b7296._0x4605d8)](_0x3d1a7d[_0x36b57c(0x106)]),_0x1b008d=_0x1cdbaf[_0x36b57c(0x1ab)],_0x4bab1e=_0x3d1a7d[_0x36b57c(0x13f)](resolveFormName,this),_0x1d607a=this[_0x36b57c(_0x5b7296._0xf8d154)](_0x36b57c(0x184));if(_0x3d1a7d[_0x36b57c(0x185)](!_0x4bab1e,!_0x1d607a))return[];if(_0x1b008d!==_0x36b57c(0x16d)){if(_0x3d1a7d['rBEgK'](_0x3d1a7d[_0x36b57c(0x1c4)],_0x3d1a7d['dDISv']))return getSubFormColumns[_0x36b57c(0x188)](this);else for(const _0x383e85 of _0x58f56b){if(_0x383e85['columnName']){const _0x32f1bc=_0x383e85[_0x36b57c(_0x5b7296._0x8a3175)]||_0x383e85['columnName'],_0x36cbb2={};_0x36cbb2[_0x36b57c(0x177)]=_0x32f1bc+'\x20('+_0x383e85[_0x36b57c(0x109)]+')',_0x36cbb2['value']=_0x383e85[_0x36b57c(0x109)],_0x4b32cc[_0x36b57c(0x105)](_0x36cbb2);}}}const _0x2980ff=await _0x3d1a7d[_0x36b57c(0x117)](getSdkBodyCredentials,this),_0x19f310=_0x3d1a7d[_0x36b57c(_0x5b7296._0x1e6461)](String,_0x1cdbaf[_0x36b57c(_0x5b7296._0x5d9f78)]||0x3),_0x368f68={};_0x368f68['TABLE_NAME']=_0x4bab1e;const _0x1d0bb7={};_0x1d0bb7[_0x36b57c(_0x5b7296._0x338c1a)]=_0x2980ff[_0x36b57c(0x1be)],_0x1d0bb7['password']=_0x2980ff[_0x36b57c(0x1ad)],_0x1d0bb7[_0x36b57c(_0x5b7296._0x13bf45)]=_0x2980ff[_0x36b57c(0x129)],_0x1d0bb7[_0x36b57c(_0x5b7296._0x43041b)]=_0x4bab1e,_0x1d0bb7[_0x36b57c(0x154)]=_0x1d607a,_0x1d0bb7['run']=0x4;const _0x29fb28={};_0x29fb28[_0x36b57c(_0x5b7296._0x3ec49d)]=_0x3d1a7d[_0x36b57c(_0x5b7296._0x2dcb87)],_0x29fb28[_0x36b57c(_0x5b7296._0x13bf45)]=ROUTER_BASE_URL+_0x36b57c(0x12a)+_0x19f310,_0x29fb28[_0x36b57c(0x163)]=_0x368f68,_0x29fb28[_0x36b57c(0x15a)]=_0x1d0bb7,_0x29fb28[_0x36b57c(0x11c)]=!![],_0x29fb28[_0x36b57c(0x1aa)]=0x7530;const _0x15f667=_0x29fb28,_0x325441=await this[_0x36b57c(_0x5b7296._0x21f664)][_0x36b57c(0x199)][_0x36b57c(0x188)](this,_0x3d1a7d[_0x36b57c(0x106)],_0x15f667),_0x560f73=[],_0xc97c2=_0x325441?.[_0x36b57c(0x1cd)]||[];if(Array[_0x36b57c(_0x5b7296._0x392867)](_0xc97c2))for(const _0x373b20 of _0xc97c2){if(_0x373b20[_0x36b57c(_0x5b7296._0x1b3bed)]){if(_0x3d1a7d[_0x36b57c(0x1af)]===_0x3d1a7d[_0x36b57c(_0x5b7296._0x3983c4)]){const _0x14012e=_0x373b20[_0x36b57c(0x153)]||_0x373b20['description']||_0x373b20[_0x36b57c(0x109)],_0x4a6916={};_0x4a6916['name']=_0x14012e+'\x20('+_0x373b20[_0x36b57c(0x109)]+')',_0x4a6916[_0x36b57c(0x194)]=_0x373b20[_0x36b57c(_0x5b7296._0x1b3bed)],_0x560f73[_0x36b57c(0x105)](_0x4a6916);}else{const _0x45de7a={};_0x45de7a[_0x36b57c(0x177)]=_0x2179aa[_0x36b57c(0x130)]||_0xa158ff[_0x36b57c(0x109)],_0x45de7a[_0x36b57c(0x194)]=_0x281a32[_0x36b57c(_0x5b7296._0x1b3bed)],_0x1cb31d[_0x36b57c(0x105)](_0x45de7a);}}}const _0x87e79e=_0x325441?.[_0x36b57c(0x1bc)]?.['fields']||[];if(Array[_0x36b57c(_0x5b7296._0x199bb0)](_0x87e79e))for(const _0x8840de of _0x87e79e){if(_0x3d1a7d[_0x36b57c(_0x5b7296._0x4aa1ef)](_0x8840de['type'],_0x3d1a7d[_0x36b57c(0x1d2)])||_0x3d1a7d[_0x36b57c(0x183)](_0x8840de['type'],_0x3d1a7d[_0x36b57c(_0x5b7296._0x74b45f)]))continue;const _0x2e2b85=_0x8840de['originalField']||_0x8840de[_0x36b57c(_0x5b7296._0x593e58)]||_0x8840de[_0x36b57c(0x109)];if(!_0x2e2b85)continue;if(_0x560f73[_0x36b57c(_0x5b7296._0x2e1095)](_0x1d43e1=>_0x1d43e1[_0x36b57c(0x194)]===_0x2e2b85))continue;const _0x384730=_0x8840de['label']||_0x8840de['description']||_0x2e2b85,_0x3244bf={};_0x3244bf['name']=_0x384730+'\x20('+_0x2e2b85+')',_0x3244bf['value']=_0x2e2b85,_0x560f73[_0x36b57c(_0x5b7296._0x568165)](_0x3244bf);}return _0x560f73[_0x36b57c(_0x5b7296._0x34eb9c)]((_0x11eb56,_0x3b8b89)=>_0x11eb56[_0x36b57c(0x177)][_0x36b57c(0x1d6)](_0x3b8b89['name'])),_0x560f73;}catch{return[];}}async function getTextSubForms(){const _0x35c087={_0x4e7d9c:0x16e,_0x32472c:0x184,_0x48b948:0x19a,_0x46823a:0x1de,_0x4616e7:0x167,_0x5bf54e:0x10a,_0x27f236:0x1ae,_0x7fda29:0x1ab,_0x383683:0x132,_0x2dd855:0x194,_0x59333b:0x105,_0x5759d4:0x1d3,_0x78016b:0x163,_0x202dbc:0x170,_0x2d9e0d:0x167,_0x300225:0x10a,_0x15b0f8:0x177,_0x1bc92b:0x109,_0x1f5897:0x192},_0x2b0504=_0x2a2158,_0x309d34={};_0x309d34['NQAJI']='priorityErpApi',_0x309d34[_0x2b0504(_0x35c087._0x4e7d9c)]=_0x2b0504(_0x35c087._0x32472c),_0x309d34['dAvBf']=function(_0x5216c1,_0x386b74){return _0x5216c1!==_0x386b74;},_0x309d34[_0x2b0504(_0x35c087._0x48b948)]=_0x2b0504(_0x35c087._0x46823a),_0x309d34['gkSAT']='GET',_0x309d34[_0x2b0504(_0x35c087._0x4616e7)]=function(_0x11dace,_0x97dd1){return _0x11dace===_0x97dd1;},_0x309d34[_0x2b0504(_0x35c087._0x5bf54e)]='vgqRf',_0x309d34['ZAIlp']=_0x2b0504(0x149);const _0x17b92b=_0x309d34;try{const _0x35d26f=await this['getCredentials'](_0x17b92b[_0x2b0504(_0x35c087._0x27f236)]),_0x4011fe=_0x35d26f[_0x2b0504(_0x35c087._0x7fda29)],_0x110a3d=this['getCurrentNodeParameter'](_0x17b92b[_0x2b0504(_0x35c087._0x4e7d9c)]);if(!_0x110a3d)return[];if(_0x17b92b[_0x2b0504(_0x35c087._0x383683)](_0x4011fe,'router')){if(_0x2b0504(0x15f)===_0x17b92b[_0x2b0504(0x19a)]){const _0x3ea90a={};_0x3ea90a[_0x2b0504(0x177)]=_0x591b9b[0x1],_0x3ea90a[_0x2b0504(_0x35c087._0x2dd855)]=_0x3d0f61[0x1],_0x481029[_0x2b0504(_0x35c087._0x59333b)](_0x3ea90a);}else return[];}const _0x254918={};_0x254918[_0x2b0504(0x162)]=_0x110a3d;const _0x46c79f={};_0x46c79f[_0x2b0504(0x14f)]=_0x17b92b[_0x2b0504(_0x35c087._0x5759d4)],_0x46c79f[_0x2b0504(0x129)]=ROUTER_BASE_URL+_0x2b0504(0x14b),_0x46c79f[_0x2b0504(_0x35c087._0x78016b)]=_0x254918,_0x46c79f['json']=!![],_0x46c79f[_0x2b0504(0x1aa)]=0x7530;const _0x23f37d=_0x46c79f,_0x3f9eef=await this[_0x2b0504(_0x35c087._0x202dbc)]['httpRequestWithAuthentication']['call'](this,_0x17b92b['NQAJI'],_0x23f37d),_0x54d80e=[];if(Array[_0x2b0504(0x138)](_0x3f9eef))for(const _0x6ff29 of _0x3f9eef){if(_0x17b92b[_0x2b0504(_0x35c087._0x2d9e0d)](_0x17b92b[_0x2b0504(_0x35c087._0x5bf54e)],_0x17b92b[_0x2b0504(_0x35c087._0x300225)])){if(_0x6ff29[_0x2b0504(0x109)]){const _0x3b39ba={};_0x3b39ba[_0x2b0504(_0x35c087._0x15b0f8)]=_0x6ff29[_0x2b0504(0x130)]||_0x6ff29[_0x2b0504(_0x35c087._0x1bc92b)],_0x3b39ba[_0x2b0504(_0x35c087._0x2dd855)]=_0x6ff29[_0x2b0504(0x109)],_0x54d80e[_0x2b0504(0x105)](_0x3b39ba);}}else _0xb82b40=_0x56cc2f;}return _0x54d80e[_0x2b0504(0x19f)]((_0x5c8288,_0x2e4e1e)=>_0x5c8288[_0x2b0504(0x177)]['localeCompare'](_0x2e4e1e[_0x2b0504(0x177)])),_0x54d80e;}catch{return _0x17b92b['dAvBf'](_0x17b92b['ZAIlp'],_0x2b0504(_0x35c087._0x1f5897))?[]:[];}}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getForms = getForms;
4
+ exports.getSubForms = getSubForms;
5
+ exports.getFormColumns = getFormColumns;
6
+ exports.getSubFormColumns = getSubFormColumns;
7
+ exports.getSubSubFormColumns = getSubSubFormColumns;
8
+ exports.getMiniSubForms = getMiniSubForms;
9
+ exports.getProcedures = getProcedures;
10
+ exports.getProcedureFields = getProcedureFields;
11
+ exports.getSubFormProcedureFields = getSubFormProcedureFields;
12
+ exports.getTextSubForms = getTextSubForms;
13
+ const ROUTER_BASE_URL = 'https://php-api-941574646138.me-west1.run.app/api/priority';
14
+ async function getForms() {
15
+ try {
16
+ const credentials = await this.getCredentials('priorityErpApi');
17
+ const connectionType = credentials.connectionType;
18
+ let requestOptions;
19
+ if (connectionType === 'router') {
20
+ requestOptions = {
21
+ method: 'GET',
22
+ url: `${ROUTER_BASE_URL}/rpc/forms`,
23
+ headers: {
24
+ IVTYPE: '',
25
+ },
26
+ json: true,
27
+ timeout: 30000,
28
+ };
29
+ }
30
+ else {
31
+ requestOptions = {
32
+ method: 'GET',
33
+ url: '/api/$metadata',
34
+ baseURL: credentials.baseUrl,
35
+ json: false,
36
+ timeout: 30000,
37
+ };
38
+ }
39
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
40
+ const forms = [];
41
+ if (connectionType === 'router') {
42
+ if (Array.isArray(response)) {
43
+ for (const item of response) {
44
+ if (item.tableName) {
45
+ forms.push({
46
+ name: item.TITLE || item.tableName,
47
+ value: item.tableName,
48
+ });
49
+ }
50
+ }
51
+ }
52
+ }
53
+ else {
54
+ const xmlResponse = response;
55
+ const entitySetRegex = /EntitySet\s+Name="([^"]+)"/g;
56
+ let match;
57
+ while ((match = entitySetRegex.exec(xmlResponse)) !== null) {
58
+ forms.push({
59
+ name: match[1],
60
+ value: match[1],
61
+ });
62
+ }
63
+ }
64
+ forms.sort((a, b) => a.name.localeCompare(b.name));
65
+ return forms;
66
+ }
67
+ catch {
68
+ return [];
69
+ }
70
+ }
71
+ async function getSubForms() {
72
+ try {
73
+ const credentials = await this.getCredentials('priorityErpApi');
74
+ const connectionType = credentials.connectionType;
75
+ const parentForm = resolveFormName(this);
76
+ if (!parentForm) {
77
+ return [];
78
+ }
79
+ let requestOptions;
80
+ if (connectionType === 'router') {
81
+ requestOptions = {
82
+ method: 'GET',
83
+ url: `${ROUTER_BASE_URL}/rpc/subforms`,
84
+ headers: {
85
+ TABLE_NAME: parentForm,
86
+ },
87
+ json: true,
88
+ timeout: 30000,
89
+ };
90
+ }
91
+ else {
92
+ requestOptions = {
93
+ method: 'GET',
94
+ url: `/api/${parentForm}/$metadata`,
95
+ baseURL: credentials.baseUrl,
96
+ json: false,
97
+ timeout: 30000,
98
+ };
99
+ }
100
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
101
+ const subForms = [];
102
+ if (connectionType === 'router') {
103
+ if (Array.isArray(response)) {
104
+ for (const item of response) {
105
+ if (item.columnName) {
106
+ subForms.push({
107
+ name: item.description || item.columnName,
108
+ value: item.columnName,
109
+ });
110
+ }
111
+ }
112
+ }
113
+ }
114
+ else {
115
+ const xmlResponse = response;
116
+ const navPropRegex = /NavigationProperty\s+Name="([^"]+)"/g;
117
+ let match;
118
+ while ((match = navPropRegex.exec(xmlResponse)) !== null) {
119
+ subForms.push({
120
+ name: match[1],
121
+ value: match[1],
122
+ });
123
+ }
124
+ }
125
+ subForms.sort((a, b) => a.name.localeCompare(b.name));
126
+ return subForms;
127
+ }
128
+ catch {
129
+ return [];
130
+ }
131
+ }
132
+ function resolveFormName(context) {
133
+ let form = '';
134
+ try {
135
+ form = context.getCurrentNodeParameter('formName');
136
+ }
137
+ catch { }
138
+ if (!form) {
139
+ try {
140
+ form = context.getCurrentNodeParameter('parentForm');
141
+ }
142
+ catch { }
143
+ }
144
+ if (!form) {
145
+ try {
146
+ const entityType = context.getCurrentNodeParameter('entityType');
147
+ if (entityType === 'custom') {
148
+ form = context.getCurrentNodeParameter('customEntityName');
149
+ }
150
+ else if (entityType) {
151
+ form = entityType;
152
+ }
153
+ }
154
+ catch { }
155
+ }
156
+ return form || '';
157
+ }
158
+ async function getFormColumns() {
159
+ try {
160
+ const credentials = await this.getCredentials('priorityErpApi');
161
+ const connectionType = credentials.connectionType;
162
+ const formName = resolveFormName(this);
163
+ if (!formName)
164
+ return [];
165
+ let requestOptions;
166
+ if (connectionType === 'router') {
167
+ requestOptions = {
168
+ method: 'GET',
169
+ url: `${ROUTER_BASE_URL}/rpc/rpc`,
170
+ headers: {
171
+ TABLE_NAME: formName,
172
+ READ: '1',
173
+ },
174
+ json: true,
175
+ timeout: 30000,
176
+ };
177
+ }
178
+ else {
179
+ requestOptions = {
180
+ method: 'GET',
181
+ url: `/api/${formName}/$metadata`,
182
+ baseURL: credentials.baseUrl,
183
+ json: false,
184
+ timeout: 30000,
185
+ };
186
+ }
187
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
188
+ const columns = [];
189
+ if (connectionType === 'router') {
190
+ if (Array.isArray(response)) {
191
+ for (const item of response) {
192
+ if (item.columnName) {
193
+ const desc = item.description || item.columnName;
194
+ columns.push({
195
+ name: `${desc} (${item.columnName})`,
196
+ value: item.columnName,
197
+ });
198
+ }
199
+ }
200
+ }
201
+ }
202
+ else {
203
+ const xmlResponse = response;
204
+ const propRegex = /Property\s+Name="([^"]+)"/g;
205
+ let match;
206
+ while ((match = propRegex.exec(xmlResponse)) !== null) {
207
+ columns.push({
208
+ name: match[1],
209
+ value: match[1],
210
+ });
211
+ }
212
+ }
213
+ columns.sort((a, b) => a.name.localeCompare(b.name));
214
+ return columns;
215
+ }
216
+ catch {
217
+ return [];
218
+ }
219
+ }
220
+ async function getSubFormColumns() {
221
+ try {
222
+ const credentials = await this.getCredentials('priorityErpApi');
223
+ const connectionType = credentials.connectionType;
224
+ const subFormName = this.getCurrentNodeParameter('subFormName');
225
+ if (!subFormName)
226
+ return [];
227
+ let requestOptions;
228
+ if (connectionType === 'router') {
229
+ requestOptions = {
230
+ method: 'GET',
231
+ url: `${ROUTER_BASE_URL}/rpc/rpc`,
232
+ headers: {
233
+ TABLE_NAME: subFormName,
234
+ READ: '1',
235
+ },
236
+ json: true,
237
+ timeout: 30000,
238
+ };
239
+ }
240
+ else {
241
+ const parentForm = this.getCurrentNodeParameter('parentForm')
242
+ || this.getCurrentNodeParameter('formName');
243
+ if (!parentForm)
244
+ return [];
245
+ requestOptions = {
246
+ method: 'GET',
247
+ url: `/api/${parentForm}/${subFormName}/$metadata`,
248
+ baseURL: credentials.baseUrl,
249
+ json: false,
250
+ timeout: 30000,
251
+ };
252
+ }
253
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
254
+ const columns = [];
255
+ if (connectionType === 'router') {
256
+ if (Array.isArray(response)) {
257
+ for (const item of response) {
258
+ if (item.columnName) {
259
+ const desc = item.description || item.columnName;
260
+ columns.push({
261
+ name: `${desc} (${item.columnName})`,
262
+ value: item.columnName,
263
+ });
264
+ }
265
+ }
266
+ }
267
+ }
268
+ else {
269
+ const xmlResponse = response;
270
+ const propRegex = /Property\s+Name="([^"]+)"/g;
271
+ let match;
272
+ while ((match = propRegex.exec(xmlResponse)) !== null) {
273
+ columns.push({
274
+ name: match[1],
275
+ value: match[1],
276
+ });
277
+ }
278
+ }
279
+ columns.sort((a, b) => a.name.localeCompare(b.name));
280
+ return columns;
281
+ }
282
+ catch {
283
+ return [];
284
+ }
285
+ }
286
+ async function getSubSubFormColumns() {
287
+ try {
288
+ const credentials = await this.getCredentials('priorityErpApi');
289
+ const connectionType = credentials.connectionType;
290
+ const subSubFormName = this.getCurrentNodeParameter('subSubFormName');
291
+ if (!subSubFormName)
292
+ return [];
293
+ let requestOptions;
294
+ if (connectionType === 'router') {
295
+ requestOptions = {
296
+ method: 'GET',
297
+ url: `${ROUTER_BASE_URL}/rpc/rpc`,
298
+ headers: {
299
+ TABLE_NAME: subSubFormName,
300
+ READ: '1',
301
+ },
302
+ json: true,
303
+ timeout: 30000,
304
+ };
305
+ }
306
+ else {
307
+ const parentForm = this.getCurrentNodeParameter('parentForm');
308
+ const subFormName = this.getCurrentNodeParameter('subFormName');
309
+ if (!parentForm || !subFormName)
310
+ return [];
311
+ requestOptions = {
312
+ method: 'GET',
313
+ url: `/api/${parentForm}/${subFormName}/${subSubFormName}/$metadata`,
314
+ baseURL: credentials.baseUrl,
315
+ json: false,
316
+ timeout: 30000,
317
+ };
318
+ }
319
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
320
+ const columns = [];
321
+ if (connectionType === 'router') {
322
+ if (Array.isArray(response)) {
323
+ for (const item of response) {
324
+ if (item.columnName) {
325
+ const desc = item.description || item.columnName;
326
+ columns.push({
327
+ name: `${desc} (${item.columnName})`,
328
+ value: item.columnName,
329
+ });
330
+ }
331
+ }
332
+ }
333
+ }
334
+ else {
335
+ const xmlResponse = response;
336
+ const propRegex = /Property\s+Name="([^"]+)"/g;
337
+ let match;
338
+ while ((match = propRegex.exec(xmlResponse)) !== null) {
339
+ columns.push({
340
+ name: match[1],
341
+ value: match[1],
342
+ });
343
+ }
344
+ }
345
+ columns.sort((a, b) => a.name.localeCompare(b.name));
346
+ return columns;
347
+ }
348
+ catch {
349
+ return [];
350
+ }
351
+ }
352
+ async function getMiniSubForms() {
353
+ try {
354
+ const credentials = await this.getCredentials('priorityErpApi');
355
+ const connectionType = credentials.connectionType;
356
+ const subFormName = this.getCurrentNodeParameter('subFormName');
357
+ if (!subFormName)
358
+ return [];
359
+ let requestOptions;
360
+ if (connectionType === 'router') {
361
+ requestOptions = {
362
+ method: 'GET',
363
+ url: `${ROUTER_BASE_URL}/rpc/minisubforms`,
364
+ headers: {
365
+ TABLE_NAME: subFormName,
366
+ },
367
+ json: true,
368
+ timeout: 30000,
369
+ };
370
+ }
371
+ else {
372
+ const parentForm = this.getCurrentNodeParameter('parentForm')
373
+ || this.getCurrentNodeParameter('formName');
374
+ if (!parentForm)
375
+ return [];
376
+ requestOptions = {
377
+ method: 'GET',
378
+ url: `/api/${parentForm}/${subFormName}/$metadata`,
379
+ baseURL: credentials.baseUrl,
380
+ json: false,
381
+ timeout: 30000,
382
+ };
383
+ }
384
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
385
+ const miniSubForms = [];
386
+ if (connectionType === 'router') {
387
+ if (Array.isArray(response)) {
388
+ for (const item of response) {
389
+ if (item.columnName) {
390
+ miniSubForms.push({
391
+ name: item.description || item.columnName,
392
+ value: item.columnName,
393
+ });
394
+ }
395
+ }
396
+ }
397
+ }
398
+ else {
399
+ const xmlResponse = response;
400
+ const navPropRegex = /NavigationProperty\s+Name="([^"]+)"/g;
401
+ let match;
402
+ while ((match = navPropRegex.exec(xmlResponse)) !== null) {
403
+ miniSubForms.push({
404
+ name: match[1],
405
+ value: match[1],
406
+ });
407
+ }
408
+ }
409
+ miniSubForms.sort((a, b) => a.name.localeCompare(b.name));
410
+ return miniSubForms;
411
+ }
412
+ catch {
413
+ return [];
414
+ }
415
+ }
416
+ async function getProcedures() {
417
+ try {
418
+ const credentials = await this.getCredentials('priorityErpApi');
419
+ const connectionType = credentials.connectionType;
420
+ const formName = resolveFormName(this);
421
+ if (!formName)
422
+ return [];
423
+ if (connectionType !== 'router') {
424
+ return [];
425
+ }
426
+ const requestOptions = {
427
+ method: 'GET',
428
+ url: `${ROUTER_BASE_URL}/rpc/proctable`,
429
+ headers: {
430
+ TABLE_NAME: formName,
431
+ },
432
+ json: true,
433
+ timeout: 30000,
434
+ };
435
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
436
+ const procedures = [];
437
+ if (Array.isArray(response)) {
438
+ for (const item of response) {
439
+ if (item.code) {
440
+ procedures.push({
441
+ name: item.title || item.code,
442
+ value: item.code,
443
+ });
444
+ }
445
+ }
446
+ }
447
+ procedures.sort((a, b) => a.name.localeCompare(b.name));
448
+ return procedures;
449
+ }
450
+ catch {
451
+ return [];
452
+ }
453
+ }
454
+ async function getSdkBodyCredentials(context) {
455
+ try {
456
+ const webSdk = await context.getCredentials('priorityErpWebSdk');
457
+ return {
458
+ username: webSdk.username,
459
+ password: webSdk.password,
460
+ url: webSdk.apiUrl,
461
+ };
462
+ }
463
+ catch {
464
+ const api = await context.getCredentials('priorityErpApi');
465
+ return {
466
+ username: api.username,
467
+ password: api.password,
468
+ url: api.apiUrl,
469
+ };
470
+ }
471
+ }
472
+ async function getProcedureFields() {
473
+ try {
474
+ const credentials = await this.getCredentials('priorityErpApi');
475
+ const connectionType = credentials.connectionType;
476
+ const formName = resolveFormName(this);
477
+ if (!formName)
478
+ return [];
479
+ if (connectionType !== 'router') {
480
+ return getFormColumns.call(this);
481
+ }
482
+ const sdkCreds = await getSdkBodyCredentials(this);
483
+ const language = String(credentials.language || 3);
484
+ const requestOptions = {
485
+ method: 'POST',
486
+ url: `${ROUTER_BASE_URL}/rpc/sdkapiv2?language=${language}`,
487
+ headers: {
488
+ TABLE_NAME: formName,
489
+ },
490
+ body: {
491
+ username: sdkCreds.username,
492
+ password: sdkCreds.password,
493
+ url: sdkCreds.url,
494
+ form: formName,
495
+ run: 3,
496
+ },
497
+ json: true,
498
+ timeout: 30000,
499
+ };
500
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
501
+ const fields = [];
502
+ const keyColumns = response?.keyColumns || [];
503
+ if (Array.isArray(keyColumns)) {
504
+ for (const item of keyColumns) {
505
+ if (item.columnName) {
506
+ const desc = item.descript || item.description || item.columnName;
507
+ fields.push({
508
+ name: `${desc} (${item.columnName})`,
509
+ value: item.columnName,
510
+ });
511
+ }
512
+ }
513
+ }
514
+ const procFields = response?.processedFields?.fields || [];
515
+ if (Array.isArray(procFields)) {
516
+ for (const item of procFields) {
517
+ if (item.type === 'banner' || item.type === 'select')
518
+ continue;
519
+ const fieldName = item.originalField || item.value || item.columnName;
520
+ if (!fieldName)
521
+ continue;
522
+ if (fields.some((f) => f.value === fieldName))
523
+ continue;
524
+ const label = item.label || item.description || fieldName;
525
+ fields.push({
526
+ name: `${label} (${fieldName})`,
527
+ value: fieldName,
528
+ });
529
+ }
530
+ }
531
+ fields.sort((a, b) => a.name.localeCompare(b.name));
532
+ return fields;
533
+ }
534
+ catch {
535
+ return [];
536
+ }
537
+ }
538
+ async function getSubFormProcedureFields() {
539
+ try {
540
+ const credentials = await this.getCredentials('priorityErpApi');
541
+ const connectionType = credentials.connectionType;
542
+ const formName = resolveFormName(this);
543
+ const subFormName = this.getCurrentNodeParameter('subFormName');
544
+ if (!formName || !subFormName)
545
+ return [];
546
+ if (connectionType !== 'router') {
547
+ return getSubFormColumns.call(this);
548
+ }
549
+ const sdkCreds = await getSdkBodyCredentials(this);
550
+ const language = String(credentials.language || 3);
551
+ const requestOptions = {
552
+ method: 'POST',
553
+ url: `${ROUTER_BASE_URL}/rpc/sdkapiv2?language=${language}`,
554
+ headers: {
555
+ TABLE_NAME: formName,
556
+ },
557
+ body: {
558
+ username: sdkCreds.username,
559
+ password: sdkCreds.password,
560
+ url: sdkCreds.url,
561
+ form: formName,
562
+ subform: subFormName,
563
+ run: 4,
564
+ },
565
+ json: true,
566
+ timeout: 30000,
567
+ };
568
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
569
+ const fields = [];
570
+ const keyColumns = response?.keyColumns || [];
571
+ if (Array.isArray(keyColumns)) {
572
+ for (const item of keyColumns) {
573
+ if (item.columnName) {
574
+ const desc = item.descript || item.description || item.columnName;
575
+ fields.push({
576
+ name: `${desc} (${item.columnName})`,
577
+ value: item.columnName,
578
+ });
579
+ }
580
+ }
581
+ }
582
+ const procFields = response?.processedFields?.fields || [];
583
+ if (Array.isArray(procFields)) {
584
+ for (const item of procFields) {
585
+ if (item.type === 'banner' || item.type === 'select')
586
+ continue;
587
+ const fieldName = item.originalField || item.value || item.columnName;
588
+ if (!fieldName)
589
+ continue;
590
+ if (fields.some((f) => f.value === fieldName))
591
+ continue;
592
+ const label = item.label || item.description || fieldName;
593
+ fields.push({
594
+ name: `${label} (${fieldName})`,
595
+ value: fieldName,
596
+ });
597
+ }
598
+ }
599
+ fields.sort((a, b) => a.name.localeCompare(b.name));
600
+ return fields;
601
+ }
602
+ catch {
603
+ return [];
604
+ }
605
+ }
606
+ async function getTextSubForms() {
607
+ try {
608
+ const credentials = await this.getCredentials('priorityErpApi');
609
+ const connectionType = credentials.connectionType;
610
+ const subFormName = this.getCurrentNodeParameter('subFormName');
611
+ if (!subFormName)
612
+ return [];
613
+ if (connectionType !== 'router') {
614
+ return [];
615
+ }
616
+ const requestOptions = {
617
+ method: 'GET',
618
+ url: `${ROUTER_BASE_URL}/rpc/subtext`,
619
+ headers: {
620
+ TABLE_NAME: subFormName,
621
+ },
622
+ json: true,
623
+ timeout: 30000,
624
+ };
625
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'priorityErpApi', requestOptions);
626
+ const textSubForms = [];
627
+ if (Array.isArray(response)) {
628
+ for (const item of response) {
629
+ if (item.columnName) {
630
+ textSubForms.push({
631
+ name: item.description || item.columnName,
632
+ value: item.columnName,
633
+ });
634
+ }
635
+ }
636
+ }
637
+ textSubForms.sort((a, b) => a.name.localeCompare(b.name));
638
+ return textSubForms;
639
+ }
640
+ catch {
641
+ return [];
642
+ }
643
+ }