@lovrabet/lovrabet-cli 2.3.8-beta.4 → 2.3.8-beta.6

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 (191) hide show
  1. package/README.md +12 -0
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/approval/index.js +1 -1
  13. package/lib/commands/artifact/index.js +1 -1
  14. package/lib/commands/auth/device.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/import-excel.js +1 -1
  29. package/lib/commands/data/index.js +1 -1
  30. package/lib/commands/dataset/detail.js +1 -1
  31. package/lib/commands/dataset/index.js +1 -1
  32. package/lib/commands/dataset/list.js +1 -1
  33. package/lib/commands/dataset/sdk-doc.js +1 -1
  34. package/lib/commands/doctor.js +1 -1
  35. package/lib/commands/file/index.js +1 -1
  36. package/lib/commands/init.js +1 -1
  37. package/lib/commands/issue/context.d.ts +3 -0
  38. package/lib/commands/issue/context.js +1 -0
  39. package/lib/commands/issue/index.d.ts +2 -0
  40. package/lib/commands/issue/index.js +1 -0
  41. package/lib/commands/issue/report.d.ts +2 -0
  42. package/lib/commands/issue/report.js +1 -0
  43. package/lib/commands/kb/index.js +1 -1
  44. package/lib/commands/logs/index.js +1 -1
  45. package/lib/commands/notification/config-list.js +1 -1
  46. package/lib/commands/notification/index.js +1 -1
  47. package/lib/commands/notification/shared.js +1 -1
  48. package/lib/commands/ocr/index.js +1 -1
  49. package/lib/commands/permit/dataset-get.js +1 -1
  50. package/lib/commands/permit/dataset-set.js +1 -1
  51. package/lib/commands/permit/index.js +1 -1
  52. package/lib/commands/permit/page-get.js +1 -1
  53. package/lib/commands/permit/page-set.js +1 -1
  54. package/lib/commands/permit/role-menus-set.js +1 -1
  55. package/lib/commands/permit/role-menus.js +1 -1
  56. package/lib/commands/permit/shared.js +1 -1
  57. package/lib/commands/personal-bff/index.js +1 -1
  58. package/lib/commands/registry.js +1 -1
  59. package/lib/commands/role/create.js +1 -1
  60. package/lib/commands/role/delete.js +1 -1
  61. package/lib/commands/role/detail.js +1 -1
  62. package/lib/commands/role/index.js +1 -1
  63. package/lib/commands/role/list.js +1 -1
  64. package/lib/commands/role/shared.js +1 -1
  65. package/lib/commands/role/update.js +1 -1
  66. package/lib/commands/role/user-add.js +1 -1
  67. package/lib/commands/role/user-remove.js +1 -1
  68. package/lib/commands/schedule/index.js +1 -1
  69. package/lib/commands/schema.js +1 -1
  70. package/lib/commands/service/dynamic.js +1 -1
  71. package/lib/commands/service/function-name-adapter.js +1 -1
  72. package/lib/commands/service/index.js +1 -1
  73. package/lib/commands/service/registry.js +1 -1
  74. package/lib/commands/skill/commands/create.js +1 -1
  75. package/lib/commands/skill/commands/diagram.js +1 -1
  76. package/lib/commands/skill/commands/install.js +1 -1
  77. package/lib/commands/skill/commands/list.js +1 -1
  78. package/lib/commands/skill/commands/push.js +1 -1
  79. package/lib/commands/skill/commands/validate.js +1 -1
  80. package/lib/commands/skill/diagram.js +1 -1
  81. package/lib/commands/skill/flags.js +1 -1
  82. package/lib/commands/skill/index.js +1 -1
  83. package/lib/commands/skill/manifest-helpers.js +1 -1
  84. package/lib/commands/skill/push-execute.js +1 -1
  85. package/lib/commands/skill/push-flow-helpers.js +1 -1
  86. package/lib/commands/skill/push-retarget.js +1 -1
  87. package/lib/commands/skill/scopes.js +1 -1
  88. package/lib/commands/skill/summary.js +1 -1
  89. package/lib/commands/skill/templates.js +1 -1
  90. package/lib/commands/skill/validate.js +1 -1
  91. package/lib/commands/sql/detail.js +1 -1
  92. package/lib/commands/sql/exec.js +1 -1
  93. package/lib/commands/sql/index.js +1 -1
  94. package/lib/commands/update.js +1 -1
  95. package/lib/commands/user-account/bind.js +1 -1
  96. package/lib/commands/user-account/index.js +1 -1
  97. package/lib/commands/workspace/index.js +1 -1
  98. package/lib/config/domain-config.js +1 -1
  99. package/lib/config/schema.js +1 -1
  100. package/lib/constant/app.js +1 -1
  101. package/lib/constant/auth-mode.js +1 -1
  102. package/lib/constant/cli.js +1 -1
  103. package/lib/constant/defaults.js +1 -1
  104. package/lib/constant/distribution.js +1 -1
  105. package/lib/constant/domain.js +1 -1
  106. package/lib/constant/env.js +1 -1
  107. package/lib/constant/output.js +1 -1
  108. package/lib/constant/product.js +1 -1
  109. package/lib/constant/region.js +1 -1
  110. package/lib/constant/risk.js +1 -1
  111. package/lib/constant/url.js +1 -1
  112. package/lib/context.js +1 -1
  113. package/lib/core/api-client.js +1 -1
  114. package/lib/core/db-resolver.js +1 -1
  115. package/lib/core/kb-management-client.js +1 -1
  116. package/lib/core/kb-sdk-errors.js +1 -1
  117. package/lib/core/kb-search-client.js +1 -1
  118. package/lib/core/sdk-client.js +1 -1
  119. package/lib/errors.js +1 -1
  120. package/lib/framework/access-error.js +1 -1
  121. package/lib/framework/build-all-flags.js +1 -1
  122. package/lib/framework/dryrun.js +1 -1
  123. package/lib/framework/flags.js +1 -1
  124. package/lib/framework/help.js +1 -1
  125. package/lib/framework/index.js +1 -1
  126. package/lib/framework/output.js +1 -1
  127. package/lib/framework/preparse.js +1 -1
  128. package/lib/framework/rate-limit.js +1 -1
  129. package/lib/framework/raw-flags.js +1 -1
  130. package/lib/framework/response.js +1 -1
  131. package/lib/framework/runner-confirmation.js +1 -1
  132. package/lib/framework/runner-error.js +1 -1
  133. package/lib/framework/runner.js +1 -1
  134. package/lib/framework/schema-export.js +1 -1
  135. package/lib/framework/service-order.js +1 -1
  136. package/lib/framework/types.js +1 -1
  137. package/lib/generated/build-info.d.ts +4 -4
  138. package/lib/generated/build-info.js +1 -1
  139. package/lib/generated/official-routing.js +1 -1
  140. package/lib/generated/routing-contract.js +1 -1
  141. package/lib/help.js +1 -1
  142. package/lib/postinstall.js +1 -1
  143. package/lib/runtime/confirmation.js +1 -1
  144. package/lib/runtime/event.js +1 -1
  145. package/lib/runtime/index.js +1 -1
  146. package/lib/runtime/queue.js +1 -1
  147. package/lib/runtime/resolve.js +1 -1
  148. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  149. package/lib/services/dataset-import/excel-reader.js +1 -1
  150. package/lib/services/dataset-import/image-bytes.js +1 -1
  151. package/lib/services/dataset-import/image-ooxml.js +1 -1
  152. package/lib/services/dataset-import/image-runner.js +1 -1
  153. package/lib/services/dataset-import/metadata.js +1 -1
  154. package/lib/services/dataset-import/preview.js +1 -1
  155. package/lib/services/dataset-import/runner.js +1 -1
  156. package/lib/skills/builtin-skill.js +1 -1
  157. package/lib/skills/npx-skills-add.js +1 -1
  158. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  159. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  160. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  161. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  162. package/lib/skills/runtime-skill-sync/links.js +1 -1
  163. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  164. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  165. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  166. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  167. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  168. package/lib/skills/runtime-skill-sync/push.js +1 -1
  169. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  170. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  171. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  172. package/lib/skills/runtime-skill-sync.js +1 -1
  173. package/lib/skills/skill-presence.js +1 -1
  174. package/lib/utils/access-key-redaction.js +1 -1
  175. package/lib/utils/apply-jq-filter.js +1 -1
  176. package/lib/utils/cli-version-check.js +1 -1
  177. package/lib/utils/cli-version-policy.js +1 -1
  178. package/lib/utils/logger.js +1 -1
  179. package/lib/utils/lossless-json.js +1 -1
  180. package/lib/utils/params.js +1 -1
  181. package/lib/utils/positive-safe-integer.js +1 -1
  182. package/lib/utils/redaction.js +1 -1
  183. package/lib/utils/runtime-user-id.js +1 -1
  184. package/lib/utils/update-notice.js +1 -1
  185. package/lib/utils/version.js +1 -1
  186. package/lib/utils/write-cli-side-channel.js +1 -1
  187. package/package.json +2 -2
  188. package/skills/lovrabet/SKILL.md +12 -2
  189. package/skills/lovrabet/guides/development-intent-handoff.md +58 -0
  190. package/skills/lovrabet/references/lovrabet-issue-report.md +24 -0
  191. package/skills/lovrabet.manifest.json +5 -3
@@ -1 +1 @@
1
- (function(_0xd80d5,_0x512b7a){const _0x323927=a137_0x4eae,_0x5bc680=_0xd80d5();while(!![]){try{const _0x27be85=-parseInt(_0x323927(0x170))/0x1*(-parseInt(_0x323927(0x16d))/0x2)+parseInt(_0x323927(0x173))/0x3*(parseInt(_0x323927(0x172))/0x4)+-parseInt(_0x323927(0x176))/0x5+parseInt(_0x323927(0x175))/0x6*(-parseInt(_0x323927(0x16f))/0x7)+-parseInt(_0x323927(0x16b))/0x8+-parseInt(_0x323927(0x171))/0x9*(parseInt(_0x323927(0x16c))/0xa)+parseInt(_0x323927(0x174))/0xb;if(_0x27be85===_0x512b7a)break;else _0x5bc680['push'](_0x5bc680['shift']());}catch(_0x31d36b){_0x5bc680['push'](_0x5bc680['shift']());}}}(a137_0xa43b,0x23936));function a137_0xa43b(){const _0x4814b8=['734592BZucsZ','637210ytIHmg','11182HjqJRl','catch','7ZyXiAn','39iAkPJU','18tmHYVk','4IJoNxJ','552822ylDGWA','2638251mRBRoN','438078SgyKfM','1020835VgNZXB'];a137_0xa43b=function(){return _0x4814b8;};return a137_0xa43b();}function a137_0x4eae(_0xdf2514,_0x313cfc){_0xdf2514=_0xdf2514-0x16b;const _0xa43b2b=a137_0xa43b();let _0x4eae93=_0xa43b2b[_0xdf2514];return _0x4eae93;}let tail=Promise['resolve']();export async function runSerialized(_0x408da6){const _0x3c501d=a137_0x4eae,_0x2adc71=tail;let _0x43bd88;tail=new Promise(_0x2cd3ce=>{_0x43bd88=_0x2cd3ce;}),await _0x2adc71[_0x3c501d(0x16e)](()=>undefined);try{return await _0x408da6();}finally{_0x43bd88();}}
1
+ const a140_0x7cd888=a140_0x314a;(function(_0x221853,_0x1968a4){const _0xcf134=a140_0x314a,_0x4a5d1d=_0x221853();while(!![]){try{const _0x32bbd0=-parseInt(_0xcf134(0x111))/0x1*(-parseInt(_0xcf134(0x114))/0x2)+-parseInt(_0xcf134(0x109))/0x3*(parseInt(_0xcf134(0x110))/0x4)+parseInt(_0xcf134(0x10a))/0x5*(parseInt(_0xcf134(0x112))/0x6)+parseInt(_0xcf134(0x115))/0x7*(-parseInt(_0xcf134(0x113))/0x8)+-parseInt(_0xcf134(0x10c))/0x9+parseInt(_0xcf134(0x10b))/0xa+parseInt(_0xcf134(0x10e))/0xb;if(_0x32bbd0===_0x1968a4)break;else _0x4a5d1d['push'](_0x4a5d1d['shift']());}catch(_0x1579df){_0x4a5d1d['push'](_0x4a5d1d['shift']());}}}(a140_0x436d,0x59fec));let tail=Promise[a140_0x7cd888(0x10f)]();function a140_0x314a(_0x19b9ca,_0x41b225){_0x19b9ca=_0x19b9ca-0x109;const _0x436d17=a140_0x436d();let _0x314a71=_0x436d17[_0x19b9ca];return _0x314a71;}export async function runSerialized(_0x4c379b){const _0x9aecd=a140_0x7cd888,_0x599e14=tail;let _0xb9c729;tail=new Promise(_0x1bc7bb=>{_0xb9c729=_0x1bc7bb;}),await _0x599e14[_0x9aecd(0x10d)](()=>undefined);try{return await _0x4c379b();}finally{_0xb9c729();}}function a140_0x436d(){const _0x4e8759=['617290cbHneh','1475298TuPEzk','catch','9118846VjnSJJ','resolve','4WyGSDy','3mVISck','5562ntWcgf','173080MRXGbi','297722vrDSGl','196ZOGkWx','1712109OufjBb','2005hnQoMm'];a140_0x436d=function(){return _0x4e8759;};return a140_0x436d();}
@@ -1 +1 @@
1
- (function(_0xe5e9af,_0x5c5bde){const _0x32b495=a138_0x60a3,_0x199308=_0xe5e9af();while(!![]){try{const _0x1a07c0=-parseInt(_0x32b495(0xdd))/0x1+parseInt(_0x32b495(0xd6))/0x2+-parseInt(_0x32b495(0xe0))/0x3*(parseInt(_0x32b495(0xd0))/0x4)+parseInt(_0x32b495(0xd3))/0x5+-parseInt(_0x32b495(0xd8))/0x6*(parseInt(_0x32b495(0xd1))/0x7)+parseInt(_0x32b495(0xe3))/0x8*(parseInt(_0x32b495(0xde))/0x9)+parseInt(_0x32b495(0xe4))/0xa*(parseInt(_0x32b495(0xce))/0xb);if(_0x1a07c0===_0x5c5bde)break;else _0x199308['push'](_0x199308['shift']());}catch(_0x5a0487){_0x199308['push'](_0x199308['shift']());}}}(a138_0x59bd,0x5f0e1));import a138_0xb518ef from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';function a138_0x60a3(_0x98c68d,_0x4eeeb1){_0x98c68d=_0x98c68d-0xce;const _0x59bd88=a138_0x59bd();let _0x60a3a2=_0x59bd88[_0x98c68d];return _0x60a3a2;}import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';function a138_0x59bd(){const _0x1e04c1=['163512ihtZxl','75080IRPtwf','assign','unknownCommand','flatMap','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','1386jwIpjb','hint','621652GKXHXc','220122bNpOGc','args','2717075XcPElN','definition','join','391020vDoIEQ','flags','6SbnIWD','message','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','validation','input','671028GXCbBL','81TKvUhj','slice','15Eubyux','../framework/preparse.js','../commands/registry.js'];a138_0x59bd=function(){return _0x1e04c1;};return a138_0x59bd();}import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x48bf81){const _0x5d632b=a138_0x60a3,_0x5cd209=a138_0xb518ef('',{'importMeta':import.meta,'argv':_0x48bf81,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x52f691=[..._0x5cd209[_0x5d632b(0xdc)]],_0x319ae7=_0x5cd209[_0x5d632b(0xd7)];await correctFlags(_0x319ae7);const _0xb7b4f3=_0x52f691[0x0];if(!_0xb7b4f3)throw CliErrors[_0x5d632b(0xdb)](_0x5d632b(0xe8));const _0x469471=resolveRemovedCommand(_0xb7b4f3,_0x52f691[0x1]);if(_0x469471)throw CliErrors[_0x5d632b(0xdb)](_0x469471[_0x5d632b(0xd9)],_0x469471[_0x5d632b(0xcf)]);if(!isKnownService(_0xb7b4f3)){const _0x46fa23=resolveDynamicServiceCommand(_0x52f691,_0x319ae7);if(!_0x46fa23)throw CliErrors[_0x5d632b(0xe6)](_0x52f691[_0x5d632b(0xd5)]('\x20'));return Object[_0x5d632b(0xe5)](_0x319ae7,_0x46fa23[_0x5d632b(0xd7)]),{'definition':_0x46fa23[_0x5d632b(0xd4)],'rawFlags':_0x319ae7,'args':_0x46fa23[_0x5d632b(0xd2)]};}const _0x2818be=getServiceEntry(_0xb7b4f3),_0x24512c=_0x52f691[0x1]||_0x2818be['defaultCommand'];if(!_0x24512c)throw CliErrors[_0x5d632b(0xdb)](_0x5d632b(0xda)+_0xb7b4f3+'\x22.');const _0x1cd046=findDefinition(_0xb7b4f3,_0x24512c);if(!_0x1cd046)throw CliErrors[_0x5d632b(0xe6)](_0xb7b4f3+'\x20'+_0x24512c);return{'definition':_0x1cd046,'rawFlags':_0x319ae7,'args':_0x52f691[_0x5d632b(0xdf)](0x2)};}async function correctFlags(_0x31e516){const _0x586075=a138_0x60a3;try{const {correctFlags:_0x4289cc}=await import(_0x586075(0xe1)),{getAllDefinitions:_0x173876}=await import(_0x586075(0xe2)),_0x3d8a81=_0x173876()[_0x586075(0xe7)](_0x5e9887=>_0x5e9887['flags']??[]),_0x6086c0=_0x4289cc(_0x31e516,_0x3d8a81);Object[_0x586075(0xe5)](_0x31e516,_0x6086c0[_0x586075(0xd7)]);}catch{}}
1
+ (function(_0xc8c8ab,_0x3b63f5){const _0x11b4c9=a141_0x4d7d,_0x2b0edf=_0xc8c8ab();while(!![]){try{const _0x1a422b=-parseInt(_0x11b4c9(0xf1))/0x1*(-parseInt(_0x11b4c9(0xea))/0x2)+parseInt(_0x11b4c9(0xee))/0x3*(-parseInt(_0x11b4c9(0xf8))/0x4)+parseInt(_0x11b4c9(0xf9))/0x5*(parseInt(_0x11b4c9(0xf6))/0x6)+parseInt(_0x11b4c9(0x100))/0x7*(parseInt(_0x11b4c9(0x101))/0x8)+parseInt(_0x11b4c9(0xf5))/0x9+parseInt(_0x11b4c9(0xff))/0xa+-parseInt(_0x11b4c9(0xf2))/0xb;if(_0x1a422b===_0x3b63f5)break;else _0x2b0edf['push'](_0x2b0edf['shift']());}catch(_0x3ad237){_0x2b0edf['push'](_0x2b0edf['shift']());}}}(a141_0x4f8d,0x411a5));function a141_0x4f8d(){const _0x2b926b=['args','../commands/registry.js','3TdfNrB','defaultCommand','validation','60693QyXJeJ','10464751hiTjnw','unknownCommand','join','812646zWiDwH','48VhoRuS','assign','1708156EDyjso','321815PBjZSL','flatMap','flags','hint','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','1662030MdVrTU','77fBbVNz','326392gpEnFA','14BsYErx','input'];a141_0x4f8d=function(){return _0x2b926b;};return a141_0x4f8d();}import a141_0x57f4a5 from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a141_0x4d7d(_0xb0fb1c,_0x16fe53){_0xb0fb1c=_0xb0fb1c-0xea;const _0x4f8d4c=a141_0x4f8d();let _0x4d7d12=_0x4f8d4c[_0xb0fb1c];return _0x4d7d12;}export async function resolveLovrabetInvocation(_0x35e278){const _0x27bae5=a141_0x4d7d,_0x5363b2=a141_0x57f4a5('',{'importMeta':import.meta,'argv':_0x35e278,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x326750=[..._0x5363b2[_0x27bae5(0xeb)]],_0x32f9d3=_0x5363b2[_0x27bae5(0xfb)];await correctFlags(_0x32f9d3);const _0x3e9649=_0x326750[0x0];if(!_0x3e9649)throw CliErrors['validation'](_0x27bae5(0xfd));const _0x1a6b8c=resolveRemovedCommand(_0x3e9649,_0x326750[0x1]);if(_0x1a6b8c)throw CliErrors[_0x27bae5(0xf0)](_0x1a6b8c['message'],_0x1a6b8c[_0x27bae5(0xfc)]);if(!isKnownService(_0x3e9649)){const _0x20959e=resolveDynamicServiceCommand(_0x326750,_0x32f9d3);if(!_0x20959e)throw CliErrors['unknownCommand'](_0x326750[_0x27bae5(0xf4)]('\x20'));return Object[_0x27bae5(0xf7)](_0x32f9d3,_0x20959e[_0x27bae5(0xfb)]),{'definition':_0x20959e['definition'],'rawFlags':_0x32f9d3,'args':_0x20959e[_0x27bae5(0xec)]};}const _0xcf1313=getServiceEntry(_0x3e9649),_0xc663d7=_0x326750[0x1]||_0xcf1313[_0x27bae5(0xef)];if(!_0xc663d7)throw CliErrors[_0x27bae5(0xf0)](_0x27bae5(0xfe)+_0x3e9649+'\x22.');const _0x2062c2=findDefinition(_0x3e9649,_0xc663d7);if(!_0x2062c2)throw CliErrors[_0x27bae5(0xf3)](_0x3e9649+'\x20'+_0xc663d7);return{'definition':_0x2062c2,'rawFlags':_0x32f9d3,'args':_0x326750['slice'](0x2)};}async function correctFlags(_0x549631){const _0x2eafb6=a141_0x4d7d;try{const {correctFlags:_0x3d11b3}=await import('../framework/preparse.js'),{getAllDefinitions:_0x4a4fbe}=await import(_0x2eafb6(0xed)),_0x546de3=_0x4a4fbe()[_0x2eafb6(0xfa)](_0x285ceb=>_0x285ceb[_0x2eafb6(0xfb)]??[]),_0x1ddfb9=_0x3d11b3(_0x549631,_0x546de3);Object[_0x2eafb6(0xf7)](_0x549631,_0x1ddfb9[_0x2eafb6(0xfb)]);}catch{}}
@@ -1 +1 @@
1
- const a140_0x24e0c1=a140_0x3255;(function(_0x3fe475,_0x2cc8e4){const _0x2d4ffb=a140_0x3255,_0xcd0acf=_0x3fe475();while(!![]){try{const _0x84f11e=-parseInt(_0x2d4ffb(0x154))/0x1*(parseInt(_0x2d4ffb(0x120))/0x2)+parseInt(_0x2d4ffb(0x100))/0x3*(-parseInt(_0x2d4ffb(0x144))/0x4)+parseInt(_0x2d4ffb(0x13d))/0x5+parseInt(_0x2d4ffb(0x11b))/0x6+parseInt(_0x2d4ffb(0x13f))/0x7*(-parseInt(_0x2d4ffb(0x150))/0x8)+-parseInt(_0x2d4ffb(0x10b))/0x9+parseInt(_0x2d4ffb(0x12a))/0xa;if(_0x84f11e===_0x2cc8e4)break;else _0xcd0acf['push'](_0xcd0acf['shift']());}catch(_0xee5de7){_0xcd0acf['push'](_0xcd0acf['shift']());}}}(a140_0x26ed,0x5e1a9));import{randomBytes,randomUUID}from'node:crypto';import{lstat,readFile}from'node:fs/promises';import{acquireLock,assertImportContract,assertImportPaths,canonical,sameImportValue,resolveImportOutputPath,saveImportJson}from'./runner.js';function a140_0x3255(_0x4e66f7,_0x2732bb){_0x4e66f7=_0x4e66f7-0xfd;const _0x26ed61=a140_0x26ed();let _0x32552b=_0x26ed61[_0x4e66f7];return _0x32552b;}function a140_0x26ed(){const _0x9d85f4=['maxBatchBytes','Invalid\x20import\x20batch\x20size.','mappingHash','14328040okIeVh','count','byteLength','pending','write','push','The\x20auto-ID\x20runner\x20requires\x20the\x20v2\x20task\x20readback\x20contract.','hasOwn','reduce','length','size','sheet','batchSize','checkpoint','version','readTask','stringify','fileHash','string','3055190BWjFlg','report','553VbGVWT','emptyRows','schemaHash','Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.','Cannot\x20read\x20the\x20import\x20checkpoint.','2932108PZrwNp','The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20original\x20task\x20marker\x20before\x20continuing.','Auto-ID\x20import\x20items\x20cannot\x20contain\x20a\x20primary\x20key.','toString','uploadFields','Import\x20generated\x20ID\x20conflict.','\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','isArray','importId','filter','imageFields','message','39896ONuxss','unknown','Excel\x20contains\x20no\x20valid\x20data\x20rows.','succeeded','856oDnMZh','completed','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','strategy','Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.','errors','taskId','batches','3fOPHxy','status','values','appCode','rows','Incomplete\x20readback.','isSafeInteger','hex','ENOENT','incomplete','unsent','6056073IREdsx','onCheckpointReady','code','includes','some','ids','Invalid\x20import\x20task\x20readback\x20response.','warnings','Invalid\x20write\x20result.','conflict','Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.','Partial\x20import\x20task\x20readback\x20conflict.','elapsedMs','runtimeDomain','keys','reconcileImageConflicts','2148432GtNMYI','flatMap','map','rowIndexes','schemaFingerprint','506gbmfwE','resume','Excel\x20row\x20','utf8','rowNumber','now','has'];a140_0x26ed=function(){return _0x9d85f4;};return a140_0x26ed();}const validId=_0x4563ca=>typeof _0x4563ca==='number'&&Number[a140_0x24e0c1(0x106)](_0x4563ca)&&_0x4563ca>0x0;export async function runAutoIdExcelImport(_0x339f45){const _0x1140e9=a140_0x24e0c1,_0x24994d={..._0x339f45,'checkpoint':await resolveImportOutputPath(_0x339f45[_0x1140e9(0x137)]),'report':await resolveImportOutputPath(_0x339f45['report'])},{manifest:_0xe4c835,contract:_0x3fa686,api:_0x286070}=_0x24994d;assertImportContract(_0x3fa686,_0x24994d[_0x1140e9(0x103)],_0x24994d['datasetCode']);if(_0x3fa686['schemaVersion']!==0x2||!_0x286070[_0x1140e9(0x139)])throw Error(_0x1140e9(0x130));if(_0xe4c835[_0x1140e9(0xfd)]['length'])throw Error(_0x1140e9(0x158));if(!_0xe4c835[_0x1140e9(0x104)][_0x1140e9(0x133)])throw Error(_0x1140e9(0x152));if(!Number['isInteger'](_0x24994d[_0x1140e9(0x136)])||_0x24994d['batchSize']<0x1||_0x24994d[_0x1140e9(0x136)]>_0x3fa686['maxBatchSize'])throw Error(_0x1140e9(0x128));assertImportPaths(_0x24994d[_0x1140e9(0x137)],_0x24994d[_0x1140e9(0x13e)]);if(_0xe4c835[_0x1140e9(0x104)][_0x1140e9(0x10f)](_0x114b59=>Object[_0x1140e9(0x131)](_0x114b59[_0x1140e9(0x102)],'id')))throw Error(_0x1140e9(0x146));const _0x2e36c1=(_0x40381d,_0x528e9f)=>Buffer[_0x1140e9(0x12c)](JSON[_0x1140e9(0x13a)]({'schemaFingerprint':_0x3fa686['schemaFingerprint'],'taskId':_0x528e9f,'items':_0x40381d[_0x1140e9(0x11d)](_0x549589=>_0xe4c835[_0x1140e9(0x104)][_0x549589][_0x1140e9(0x102)])}),_0x1140e9(0x123)),_0x48462b=[];let _0x2186f2=[];for(let _0x4db70c=0x0;_0x4db70c<_0xe4c835[_0x1140e9(0x104)][_0x1140e9(0x133)];_0x4db70c++){if(_0x2e36c1([_0x4db70c],0x2**0x34)>_0x3fa686[_0x1140e9(0x127)])throw Error(_0x1140e9(0x122)+_0xe4c835['rows'][_0x4db70c][_0x1140e9(0x124)]+_0x1140e9(0x14a));_0x2186f2['length']&&(_0x2186f2[_0x1140e9(0x133)]===_0x24994d[_0x1140e9(0x136)]||_0x2e36c1([..._0x2186f2,_0x4db70c],0x2**0x34)>_0x3fa686[_0x1140e9(0x127)])&&(_0x48462b['push'](_0x2186f2),_0x2186f2=[]),_0x2186f2[_0x1140e9(0x12f)](_0x4db70c);}if(_0x2186f2['length'])_0x48462b[_0x1140e9(0x12f)](_0x2186f2);const _0xf243af={'appCode':_0x24994d[_0x1140e9(0x103)],'datasetCode':_0x24994d['datasetCode'],'runtimeDomain':_0x24994d[_0x1140e9(0x118)],'actorId':_0x3fa686['actorId'],'fileHash':_0xe4c835[_0x1140e9(0x13b)],'mappingHash':_0xe4c835[_0x1140e9(0x129)],'schemaHash':_0xe4c835[_0x1140e9(0x141)],'remoteSchemaHash':_0x3fa686[_0x1140e9(0x11f)],'batchSize':_0x24994d['batchSize'],'maxBatchBytes':_0x3fa686[_0x1140e9(0x127)],'sheet':_0xe4c835[_0x1140e9(0x135)],'strategy':_0x3fa686[_0x1140e9(0x157)]},_0x2b12e8=await acquireLock(_0x24994d['checkpoint']);let _0x39263c;const _0x5e0679=Date[_0x1140e9(0x125)]();let _0x44c1b7=0x0;const _0x5288ff=[],_0x31d586=_0x158617=>_0x39263c?.[_0x1140e9(0xff)][_0x1140e9(0x14d)](_0x4b624a=>_0x4b624a[_0x1140e9(0x101)]===_0x158617)[_0x1140e9(0x132)]((_0x433263,_0x2bd7cd)=>_0x433263+_0x2bd7cd['rowIndexes'][_0x1140e9(0x133)],0x0)??0x0,_0x3bfdf1=()=>({'importId':_0x39263c?.[_0x1140e9(0x14c)],'sourceRows':_0xe4c835['rows'][_0x1140e9(0x133)],'emptyRows':_0xe4c835[_0x1140e9(0x140)][_0x1140e9(0x133)],'succeeded':_0x31d586(_0x1140e9(0x153)),'unknown':_0x31d586(_0x1140e9(0x12d)),'conflicts':_0x31d586('conflict'),'notAttempted':_0x31d586('unsent'),'batches':_0x44c1b7,'batchResults':_0x5288ff,'elapsedMs':Date[_0x1140e9(0x125)]()-_0x5e0679,'checkpoint':_0x24994d['checkpoint'],'report':_0x24994d[_0x1140e9(0x13e)],'warnings':_0xe4c835[_0x1140e9(0x112)]});try{if(_0x24994d[_0x1140e9(0x121)]){try{_0x39263c=JSON['parse'](await readFile(_0x24994d['checkpoint'],'utf8'));}catch{throw Error(_0x1140e9(0x143));}if(!_0x39263c||_0x39263c[_0x1140e9(0x138)]!==0x2||typeof _0x39263c[_0x1140e9(0x14c)]!==_0x1140e9(0x13c)||!_0x39263c[_0x1140e9(0x14c)]||canonical(_0x39263c['binding'])!==canonical(_0xf243af)||!Array[_0x1140e9(0x14b)](_0x39263c[_0x1140e9(0xff)])||_0x39263c[_0x1140e9(0xff)][_0x1140e9(0x133)]!==_0x48462b[_0x1140e9(0x133)]||new Set(_0x39263c[_0x1140e9(0xff)][_0x1140e9(0x11d)](_0x3bd91f=>_0x3bd91f[_0x1140e9(0xfe)]))[_0x1140e9(0x134)]!==_0x48462b['length']||_0x39263c[_0x1140e9(0xff)][_0x1140e9(0x10f)]((_0x107a4e,_0x518bab)=>!validId(_0x107a4e[_0x1140e9(0xfe)])||_0x107a4e[_0x1140e9(0xfe)]>0x2**0x34||canonical(_0x107a4e['rowIndexes'])!==canonical(_0x48462b[_0x518bab])||![_0x1140e9(0x10a),_0x1140e9(0x12d),_0x1140e9(0x153),_0x1140e9(0x114)][_0x1140e9(0x10e)](_0x107a4e[_0x1140e9(0x101)])||!Array[_0x1140e9(0x14b)](_0x107a4e[_0x1140e9(0x110)])||_0x107a4e['ids'][_0x1140e9(0x10f)](_0x4ba851=>!validId(_0x4ba851))||new Set(_0x107a4e[_0x1140e9(0x110)])[_0x1140e9(0x134)]!==_0x107a4e[_0x1140e9(0x110)]['length']||_0x107a4e[_0x1140e9(0x110)][_0x1140e9(0x133)]!==0x0&&_0x107a4e['ids'][_0x1140e9(0x133)]!==_0x107a4e[_0x1140e9(0x11e)][_0x1140e9(0x133)]||_0x107a4e['status']===_0x1140e9(0x153)&&_0x107a4e[_0x1140e9(0x110)]['length']!==_0x107a4e['rowIndexes'][_0x1140e9(0x133)]||_0x107a4e[_0x1140e9(0x101)]===_0x1140e9(0x10a)&&_0x107a4e[_0x1140e9(0x110)][_0x1140e9(0x133)]!==0x0))throw Error(_0x1140e9(0x142));const _0x287179=_0x39263c[_0x1140e9(0xff)][_0x1140e9(0x11c)](_0x44890b=>_0x44890b[_0x1140e9(0x110)]);if(new Set(_0x287179)['size']!==_0x287179['length'])throw Error('Import\x20checkpoint\x20contains\x20duplicate\x20generated\x20IDs.');}else{try{await lstat(_0x24994d[_0x1140e9(0x137)]);throw Error(_0x1140e9(0x156));}catch(_0x352a7c){if(_0x352a7c[_0x1140e9(0x10d)]!==_0x1140e9(0x108))throw _0x352a7c;}const _0x9d318c=new Set();_0x39263c={'version':0x2,'importId':randomUUID(),'binding':_0xf243af,'batches':_0x48462b['map'](_0x53680c=>{const _0x61c5f6=_0x1140e9;let _0x2d4d2a;do{_0x2d4d2a=Number(BigInt('0x'+randomBytes(0x7)[_0x61c5f6(0x147)](_0x61c5f6(0x107)))&(0x1n<<0x34n)-0x1n)+0x1;}while(_0x9d318c['has'](_0x2d4d2a));return _0x9d318c['add'](_0x2d4d2a),{'taskId':_0x2d4d2a,'rowIndexes':_0x53680c,'ids':[],'status':_0x61c5f6(0x10a)};})},await saveImportJson(_0x24994d['checkpoint'],_0x39263c);}await _0x24994d[_0x1140e9(0x10c)]?.();const _0x1cc583=_0x39263c,_0x297d27=async(_0x3a7ea6,_0x1403c8)=>{const _0xf978be=_0x1140e9;_0x3a7ea6['status']=_0xf978be(0x114),await saveImportJson(_0x24994d[_0xf978be(0x137)],_0x1cc583);throw Error(_0x1403c8);},_0x1b3a97=async _0x11b99f=>{const _0x2b5f31=_0x1140e9,_0xc3d0fc=await _0x286070[_0x2b5f31(0x139)](_0x11b99f[_0x2b5f31(0xfe)]);if(!Array['isArray'](_0xc3d0fc))throw Error(_0x2b5f31(0x111));if(_0x11b99f[_0x2b5f31(0x101)]===_0x2b5f31(0x10a)&&_0xc3d0fc['length'])return _0x297d27(_0x11b99f,'Import\x20task\x20marker\x20collision;\x20stop\x20without\x20replacing\x20the\x20marker.');if(!_0xc3d0fc[_0x2b5f31(0x133)]){if(_0x11b99f[_0x2b5f31(0x101)]===_0x2b5f31(0x153)||_0x11b99f[_0x2b5f31(0x110)]['length'])return _0x297d27(_0x11b99f,'Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20conflict.');return![];}if(_0xc3d0fc[_0x2b5f31(0x133)]!==_0x11b99f[_0x2b5f31(0x11e)][_0x2b5f31(0x133)])return _0x297d27(_0x11b99f,_0x2b5f31(0x116));const _0x2e8706=_0xc3d0fc[_0x2b5f31(0x11d)](_0x1a5122=>_0x1a5122?.['id']);if(_0x2e8706[_0x2b5f31(0x10f)](_0x48e65a=>!validId(_0x48e65a)))return _0x297d27(_0x11b99f,'Import\x20generated\x20ID\x20conflict.');const _0x4a763b=_0x2e8706;if(_0x4a763b[_0x2b5f31(0x10f)](_0x37ef1f=>!validId(_0x37ef1f))||_0x4a763b[_0x2b5f31(0x10f)]((_0x3ac184,_0x31f5e3)=>_0x31f5e3>0x0&&_0x3ac184<=_0x4a763b[_0x31f5e3-0x1])||_0x11b99f[_0x2b5f31(0x110)][_0x2b5f31(0x133)]&&canonical(_0x4a763b)!==canonical(_0x11b99f[_0x2b5f31(0x110)]))return _0x297d27(_0x11b99f,_0x2b5f31(0x149));const _0x2117da=new Set(_0x1cc583['batches'][_0x2b5f31(0x14d)](_0x5bae59=>_0x5bae59!==_0x11b99f)['flatMap'](_0x14a5b2=>_0x14a5b2['ids']));if(_0x4a763b['some'](_0x58ad28=>_0x2117da[_0x2b5f31(0x126)](_0x58ad28)))return _0x297d27(_0x11b99f,'Import\x20generated\x20ID\x20collision.');for(let _0x4a014f=0x0;_0x4a014f<_0xc3d0fc[_0x2b5f31(0x133)];_0x4a014f++){const _0x51e76a=_0xe4c835[_0x2b5f31(0x104)][_0x11b99f[_0x2b5f31(0x11e)][_0x4a014f]][_0x2b5f31(0x102)];if(Object[_0x2b5f31(0x119)](_0x51e76a)[_0x2b5f31(0x10f)](_0x3a7e46=>!sameImportValue(_0x51e76a[_0x3a7e46],_0xc3d0fc[_0x4a014f][_0x3a7e46],_0xe4c835[_0x2b5f31(0x14e)]?.[_0x2b5f31(0x10e)](_0x3a7e46)&&!_0xe4c835[_0x2b5f31(0x148)]?.[_0x2b5f31(0x10e)](_0x3a7e46))))return _0x297d27(_0x11b99f,'Import\x20content\x20conflict\x20at\x20Excel\x20row\x20'+_0xe4c835[_0x2b5f31(0x104)][_0x11b99f[_0x2b5f31(0x11e)][_0x4a014f]]['rowNumber']+'.');}return _0x11b99f[_0x2b5f31(0x110)]=_0x4a763b,_0x11b99f[_0x2b5f31(0x101)]='succeeded',await saveImportJson(_0x24994d['checkpoint'],_0x1cc583),!![];};if(_0x1cc583['batches']['some'](_0x47e500=>_0x47e500['status']===_0x1140e9(0x114)&&!(_0x24994d[_0x1140e9(0x121)]&&_0x24994d[_0x1140e9(0x11a)]&&_0xe4c835[_0x1140e9(0x14e)]?.[_0x1140e9(0x133)]&&_0x47e500[_0x1140e9(0x110)]['length']===_0x47e500[_0x1140e9(0x11e)][_0x1140e9(0x133)])))throw Error(_0x1140e9(0x115));if(_0x24994d[_0x1140e9(0x121)]){for(const _0x292de4 of _0x1cc583['batches'])await _0x1b3a97(_0x292de4);}for(const _0x6f3ebe of _0x1cc583[_0x1140e9(0xff)]){if(_0x6f3ebe[_0x1140e9(0x101)]===_0x1140e9(0x153))continue;if(!_0x24994d[_0x1140e9(0x121)])await _0x1b3a97(_0x6f3ebe);_0x6f3ebe['status']=_0x1140e9(0x12d),await saveImportJson(_0x24994d[_0x1140e9(0x137)],_0x1cc583),_0x44c1b7++;const _0x271895=_0x6f3ebe[_0x1140e9(0x11e)][_0x1140e9(0x11d)](_0x4b54be=>_0xe4c835[_0x1140e9(0x104)][_0x4b54be][_0x1140e9(0x102)]),_0x2688a9=Date[_0x1140e9(0x125)](),_0xb1281b={'batch':_0x44c1b7,'rowStart':_0xe4c835['rows'][_0x6f3ebe[_0x1140e9(0x11e)][0x0]][_0x1140e9(0x124)],'rowEnd':_0xe4c835['rows'][_0x6f3ebe[_0x1140e9(0x11e)]['at'](-0x1)][_0x1140e9(0x124)],'count':_0x271895[_0x1140e9(0x133)],'bytes':_0x2e36c1(_0x6f3ebe[_0x1140e9(0x11e)],_0x6f3ebe['taskId']),'elapsedMs':0x0,'status':_0x1140e9(0x151)};_0x5288ff[_0x1140e9(0x12f)](_0xb1281b);try{const _0xaa3735=await _0x286070[_0x1140e9(0x12e)](_0x271895,_0x6f3ebe[_0x1140e9(0xfe)]);if(!_0xaa3735||_0xaa3735[_0x1140e9(0x12b)]!==_0x271895[_0x1140e9(0x133)]||!Array['isArray'](_0xaa3735[_0x1140e9(0x110)])||_0xaa3735['ids'][_0x1140e9(0x133)]!==_0x271895[_0x1140e9(0x133)]||_0xaa3735[_0x1140e9(0x110)][_0x1140e9(0x10f)](_0x5a02e3=>!validId(_0x5a02e3))||new Set(_0xaa3735[_0x1140e9(0x110)])[_0x1140e9(0x134)]!==_0xaa3735[_0x1140e9(0x110)][_0x1140e9(0x133)])throw Error(_0x1140e9(0x113));_0x6f3ebe[_0x1140e9(0x110)]=_0xaa3735['ids'],await saveImportJson(_0x24994d[_0x1140e9(0x137)],_0x1cc583);if(!await _0x1b3a97(_0x6f3ebe))throw Error(_0x1140e9(0x105));}catch(_0x4c57e3){if(_0x6f3ebe['status']==='conflict')throw _0x4c57e3;try{await _0x1b3a97(_0x6f3ebe);}catch(_0x34b8aa){if(_0x6f3ebe[_0x1140e9(0x101)]==='conflict')throw _0x34b8aa;}if(_0x6f3ebe[_0x1140e9(0x101)]!==_0x1140e9(0x153))throw Error(_0x1140e9(0x145));}finally{_0xb1281b[_0x1140e9(0x117)]=Date[_0x1140e9(0x125)]()-_0x2688a9,_0xb1281b[_0x1140e9(0x101)]=_0x6f3ebe[_0x1140e9(0x101)]==='succeeded'?_0x1140e9(0x153):_0x6f3ebe[_0x1140e9(0x101)]===_0x1140e9(0x114)?'conflict':_0x1140e9(0x151);}}const _0x2b63e6={'status':_0x1140e9(0x155),..._0x3bfdf1()};return await saveImportJson(_0x24994d[_0x1140e9(0x13e)],_0x2b63e6),_0x2b63e6;}catch(_0x9f61d8){if(_0x39263c)await saveImportJson(_0x24994d[_0x1140e9(0x13e)],{'status':_0x1140e9(0x109),..._0x3bfdf1(),'message':_0x9f61d8[_0x1140e9(0x14f)]});throw _0x9f61d8;}finally{await _0x2b12e8();}}
1
+ const a143_0x1edcab=a143_0x28d2;function a143_0x31c8(){const _0x438fb4=['hex','length','5033568DurBRW','get','Invalid\x20import\x20batch\x20size.','887012OpSFvO','Import\x20task\x20marker\x20collision;\x20stop\x20without\x20replacing\x20the\x20marker.','includes','rowNumber','rowIndexes','values','maxBatchSize','code','pending','number','some','readTask','batches','parse','schemaHash','isInteger','ids','fileHash','status','datasetCode','now','runtimeDomain','Import\x20generated\x20ID\x20conflict.','keys','flatMap','1210332pmgbQQ','size','checkpoint','has','Cannot\x20read\x20the\x20import\x20checkpoint.','2661764uXyIgX','The\x20auto-ID\x20runner\x20requires\x20the\x20v2\x20task\x20readback\x20contract.','onCheckpointReady','string','imageFields','incomplete','message','Auto-ID\x20import\x20items\x20cannot\x20contain\x20a\x20primary\x20key.','taskId','utf8','15904600PeYjZE','actorId','reduce','Import\x20generated\x20ID\x20collision.','add','Import\x20checkpoint\x20contains\x20duplicate\x20generated\x20IDs.','elapsedMs','isArray','6425680GusLAQ','byteLength','batchSize','schemaFingerprint','ENOENT','map','version','count','warnings','maxBatchBytes','unsent','Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.','uploadFields','9918629WhddLs','filter','write','Partial\x20import\x20task\x20readback\x20conflict.','rows','Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20conflict.','reconcileImageConflicts','hasOwn','push','conflict','6VwPbrd','appCode','Incomplete\x20readback.','Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.','importId','resume','binding','report','succeeded'];a143_0x31c8=function(){return _0x438fb4;};return a143_0x31c8();}(function(_0x1e51a8,_0xccda8){const _0x4fa113=a143_0x28d2,_0x4cd7ea=_0x1e51a8();while(!![]){try{const _0x4bb1c2=parseInt(_0x4fa113(0x150))/0x1+-parseInt(_0x4fa113(0x137))/0x2+parseInt(_0x4fa113(0x134))/0x3+parseInt(_0x4fa113(0x155))/0x4+parseInt(_0x4fa113(0x167))/0x5+-parseInt(_0x4fa113(0x17e))/0x6*(parseInt(_0x4fa113(0x174))/0x7)+-parseInt(_0x4fa113(0x15f))/0x8;if(_0x4bb1c2===_0xccda8)break;else _0x4cd7ea['push'](_0x4cd7ea['shift']());}catch(_0xa77f0){_0x4cd7ea['push'](_0x4cd7ea['shift']());}}}(a143_0x31c8,0xf1c1d));import{randomBytes,randomUUID}from'node:crypto';function a143_0x28d2(_0x1d58ba,_0x2f552f){_0x1d58ba=_0x1d58ba-0x133;const _0x31c8b7=a143_0x31c8();let _0x28d209=_0x31c8b7[_0x1d58ba];return _0x28d209;}import{lstat,readFile}from'node:fs/promises';import{acquireLock,assertImportContract,assertImportPaths,canonical,sameImportValue,resolveImportOutputPath,saveImportJson}from'./runner.js';const validId=_0x2afa47=>typeof _0x2afa47===a143_0x1edcab(0x140)&&Number['isSafeInteger'](_0x2afa47)&&_0x2afa47>0x0;export async function runAutoIdExcelImport(_0x1ca829){const _0x4ae577=a143_0x1edcab,_0x61109d={..._0x1ca829,'checkpoint':await resolveImportOutputPath(_0x1ca829[_0x4ae577(0x152)]),'report':await resolveImportOutputPath(_0x1ca829['report'])},{manifest:_0x24d64c,contract:_0x4ae28c,api:_0x187aa4}=_0x61109d;assertImportContract(_0x4ae28c,_0x61109d[_0x4ae577(0x17f)],_0x61109d['datasetCode']);if(_0x4ae28c['schemaVersion']!==0x2||!_0x187aa4[_0x4ae577(0x142)])throw Error(_0x4ae577(0x156));if(_0x24d64c['errors'][_0x4ae577(0x133)])throw Error('Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.');if(!_0x24d64c[_0x4ae577(0x178)][_0x4ae577(0x133)])throw Error('Excel\x20contains\x20no\x20valid\x20data\x20rows.');if(!Number[_0x4ae577(0x146)](_0x61109d[_0x4ae577(0x169)])||_0x61109d[_0x4ae577(0x169)]<0x1||_0x61109d[_0x4ae577(0x169)]>_0x4ae28c[_0x4ae577(0x13d)])throw Error(_0x4ae577(0x136));assertImportPaths(_0x61109d[_0x4ae577(0x152)],_0x61109d[_0x4ae577(0x185)]);if(_0x24d64c[_0x4ae577(0x178)]['some'](_0x260dac=>Object[_0x4ae577(0x17b)](_0x260dac[_0x4ae577(0x13c)],'id')))throw Error(_0x4ae577(0x15c));const _0xc72524=(_0x1896d8,_0x4cb8c8)=>Buffer[_0x4ae577(0x168)](JSON['stringify']({'schemaFingerprint':_0x4ae28c[_0x4ae577(0x16a)],'taskId':_0x4cb8c8,'items':_0x1896d8[_0x4ae577(0x16c)](_0x3203dd=>_0x24d64c[_0x4ae577(0x178)][_0x3203dd]['values'])}),_0x4ae577(0x15e)),_0x438da4=[];let _0x3b133d=[];for(let _0x419fe9=0x0;_0x419fe9<_0x24d64c[_0x4ae577(0x178)]['length'];_0x419fe9++){if(_0xc72524([_0x419fe9],0x2**0x34)>_0x4ae28c[_0x4ae577(0x170)])throw Error('Excel\x20row\x20'+_0x24d64c[_0x4ae577(0x178)][_0x419fe9]['rowNumber']+'\x20exceeds\x20the\x20import\x20request\x20size\x20limit.');_0x3b133d[_0x4ae577(0x133)]&&(_0x3b133d[_0x4ae577(0x133)]===_0x61109d[_0x4ae577(0x169)]||_0xc72524([..._0x3b133d,_0x419fe9],0x2**0x34)>_0x4ae28c[_0x4ae577(0x170)])&&(_0x438da4[_0x4ae577(0x17c)](_0x3b133d),_0x3b133d=[]),_0x3b133d[_0x4ae577(0x17c)](_0x419fe9);}if(_0x3b133d[_0x4ae577(0x133)])_0x438da4['push'](_0x3b133d);const _0x1285a7={'appCode':_0x61109d[_0x4ae577(0x17f)],'datasetCode':_0x61109d[_0x4ae577(0x14a)],'runtimeDomain':_0x61109d[_0x4ae577(0x14c)],'actorId':_0x4ae28c[_0x4ae577(0x160)],'fileHash':_0x24d64c[_0x4ae577(0x148)],'mappingHash':_0x24d64c['mappingHash'],'schemaHash':_0x24d64c[_0x4ae577(0x145)],'remoteSchemaHash':_0x4ae28c[_0x4ae577(0x16a)],'batchSize':_0x61109d[_0x4ae577(0x169)],'maxBatchBytes':_0x4ae28c[_0x4ae577(0x170)],'sheet':_0x24d64c['sheet'],'strategy':_0x4ae28c['strategy']},_0x3c42ee=await acquireLock(_0x61109d[_0x4ae577(0x152)]);let _0x545572;const _0x565857=Date[_0x4ae577(0x14b)]();let _0x7ff474=0x0;const _0x20ceae=[],_0x20fd1b=_0x912c8b=>_0x545572?.[_0x4ae577(0x143)][_0x4ae577(0x175)](_0x4e03f1=>_0x4e03f1['status']===_0x912c8b)[_0x4ae577(0x161)]((_0x347552,_0x2a64ea)=>_0x347552+_0x2a64ea['rowIndexes'][_0x4ae577(0x133)],0x0)??0x0,_0x1f64e1=()=>({'importId':_0x545572?.[_0x4ae577(0x182)],'sourceRows':_0x24d64c['rows'][_0x4ae577(0x133)],'emptyRows':_0x24d64c['emptyRows']['length'],'succeeded':_0x20fd1b(_0x4ae577(0x186)),'unknown':_0x20fd1b(_0x4ae577(0x13f)),'conflicts':_0x20fd1b(_0x4ae577(0x17d)),'notAttempted':_0x20fd1b('unsent'),'batches':_0x7ff474,'batchResults':_0x20ceae,'elapsedMs':Date['now']()-_0x565857,'checkpoint':_0x61109d[_0x4ae577(0x152)],'report':_0x61109d[_0x4ae577(0x185)],'warnings':_0x24d64c[_0x4ae577(0x16f)]});try{if(_0x61109d[_0x4ae577(0x183)]){try{_0x545572=JSON[_0x4ae577(0x144)](await readFile(_0x61109d[_0x4ae577(0x152)],_0x4ae577(0x15e)));}catch{throw Error(_0x4ae577(0x154));}if(!_0x545572||_0x545572[_0x4ae577(0x16d)]!==0x2||typeof _0x545572[_0x4ae577(0x182)]!==_0x4ae577(0x158)||!_0x545572['importId']||canonical(_0x545572[_0x4ae577(0x184)])!==canonical(_0x1285a7)||!Array[_0x4ae577(0x166)](_0x545572[_0x4ae577(0x143)])||_0x545572[_0x4ae577(0x143)]['length']!==_0x438da4[_0x4ae577(0x133)]||new Set(_0x545572[_0x4ae577(0x143)][_0x4ae577(0x16c)](_0x893be8=>_0x893be8['taskId']))[_0x4ae577(0x151)]!==_0x438da4['length']||_0x545572[_0x4ae577(0x143)][_0x4ae577(0x141)]((_0x11d79f,_0x488cd6)=>!validId(_0x11d79f['taskId'])||_0x11d79f[_0x4ae577(0x15d)]>0x2**0x34||canonical(_0x11d79f['rowIndexes'])!==canonical(_0x438da4[_0x488cd6])||![_0x4ae577(0x171),'pending',_0x4ae577(0x186),'conflict']['includes'](_0x11d79f[_0x4ae577(0x149)])||!Array[_0x4ae577(0x166)](_0x11d79f[_0x4ae577(0x147)])||_0x11d79f[_0x4ae577(0x147)][_0x4ae577(0x141)](_0x49a9c3=>!validId(_0x49a9c3))||new Set(_0x11d79f[_0x4ae577(0x147)])['size']!==_0x11d79f[_0x4ae577(0x147)][_0x4ae577(0x133)]||_0x11d79f[_0x4ae577(0x147)]['length']!==0x0&&_0x11d79f[_0x4ae577(0x147)]['length']!==_0x11d79f['rowIndexes'][_0x4ae577(0x133)]||_0x11d79f['status']===_0x4ae577(0x186)&&_0x11d79f[_0x4ae577(0x147)]['length']!==_0x11d79f[_0x4ae577(0x13b)][_0x4ae577(0x133)]||_0x11d79f[_0x4ae577(0x149)]===_0x4ae577(0x171)&&_0x11d79f['ids'][_0x4ae577(0x133)]!==0x0))throw Error(_0x4ae577(0x181));const _0xc1a7d5=_0x545572[_0x4ae577(0x143)][_0x4ae577(0x14f)](_0x1b8e4c=>_0x1b8e4c[_0x4ae577(0x147)]);if(new Set(_0xc1a7d5)[_0x4ae577(0x151)]!==_0xc1a7d5[_0x4ae577(0x133)])throw Error(_0x4ae577(0x164));}else{try{await lstat(_0x61109d[_0x4ae577(0x152)]);throw Error('Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.');}catch(_0x5bc9d4){if(_0x5bc9d4[_0x4ae577(0x13e)]!==_0x4ae577(0x16b))throw _0x5bc9d4;}const _0x3de994=new Set();_0x545572={'version':0x2,'importId':randomUUID(),'binding':_0x1285a7,'batches':_0x438da4[_0x4ae577(0x16c)](_0xd41431=>{const _0x423dce=_0x4ae577;let _0xe24549;do{_0xe24549=Number(BigInt('0x'+randomBytes(0x7)['toString'](_0x423dce(0x187)))&(0x1n<<0x34n)-0x1n)+0x1;}while(_0x3de994['has'](_0xe24549));return _0x3de994[_0x423dce(0x163)](_0xe24549),{'taskId':_0xe24549,'rowIndexes':_0xd41431,'ids':[],'status':_0x423dce(0x171)};})},await saveImportJson(_0x61109d[_0x4ae577(0x152)],_0x545572);}await _0x61109d[_0x4ae577(0x157)]?.();const _0x6e1963=_0x545572,_0x2e23f7=async(_0xe88e58,_0x660b98)=>{const _0x482058=_0x4ae577;_0xe88e58[_0x482058(0x149)]=_0x482058(0x17d),await saveImportJson(_0x61109d[_0x482058(0x152)],_0x6e1963);throw Error(_0x660b98);},_0x74fa3f=async _0x2cb600=>{const _0x15a179=_0x4ae577;let _0x1abef3=await _0x187aa4[_0x15a179(0x142)](_0x2cb600['taskId']);if(!Array['isArray'](_0x1abef3))throw Error('Invalid\x20import\x20task\x20readback\x20response.');if(_0x2cb600['status']==='unsent'&&_0x1abef3[_0x15a179(0x133)])return _0x2e23f7(_0x2cb600,_0x15a179(0x138));if(!_0x1abef3[_0x15a179(0x133)]){if(_0x2cb600[_0x15a179(0x149)]==='succeeded'||_0x2cb600[_0x15a179(0x147)][_0x15a179(0x133)])return _0x2e23f7(_0x2cb600,_0x15a179(0x179));return![];}if(_0x1abef3[_0x15a179(0x133)]!==_0x2cb600[_0x15a179(0x13b)][_0x15a179(0x133)])return _0x2e23f7(_0x2cb600,_0x15a179(0x177));const _0x29fd9c=_0x1abef3[_0x15a179(0x16c)](_0x43a5f1=>_0x43a5f1?.['id']);if(_0x29fd9c[_0x15a179(0x141)](_0x252187=>!validId(_0x252187)))return _0x2e23f7(_0x2cb600,'Import\x20generated\x20ID\x20conflict.');if(new Set(_0x29fd9c)[_0x15a179(0x151)]!==_0x29fd9c[_0x15a179(0x133)])return _0x2e23f7(_0x2cb600,_0x15a179(0x14d));const _0x150441=new Map(_0x1abef3[_0x15a179(0x16c)](_0x52f947=>[_0x52f947['id'],_0x52f947])),_0x292d29=_0x2cb600[_0x15a179(0x147)][_0x15a179(0x133)]?[..._0x2cb600[_0x15a179(0x147)]]:[..._0x29fd9c]['sort']((_0x56509c,_0x49a235)=>_0x56509c-_0x49a235);if(_0x292d29[_0x15a179(0x141)](_0x4f3dfb=>!validId(_0x4f3dfb))||_0x292d29[_0x15a179(0x141)]((_0x404c69,_0x5c2f6b)=>_0x5c2f6b>0x0&&_0x404c69<=_0x292d29[_0x5c2f6b-0x1])||_0x292d29[_0x15a179(0x141)](_0x13119a=>!_0x150441[_0x15a179(0x153)](_0x13119a)))return _0x2e23f7(_0x2cb600,_0x15a179(0x14d));_0x1abef3=_0x292d29['map'](_0x3ab3a6=>_0x150441[_0x15a179(0x135)](_0x3ab3a6));const _0x253ba0=new Set(_0x6e1963['batches'][_0x15a179(0x175)](_0x2f70a7=>_0x2f70a7!==_0x2cb600)['flatMap'](_0x22e39e=>_0x22e39e[_0x15a179(0x147)]));if(_0x292d29[_0x15a179(0x141)](_0x2e6ba1=>_0x253ba0[_0x15a179(0x153)](_0x2e6ba1)))return _0x2e23f7(_0x2cb600,_0x15a179(0x162));for(let _0x4a5b87=0x0;_0x4a5b87<_0x1abef3[_0x15a179(0x133)];_0x4a5b87++){const _0x157873=_0x24d64c[_0x15a179(0x178)][_0x2cb600[_0x15a179(0x13b)][_0x4a5b87]][_0x15a179(0x13c)];if(Object[_0x15a179(0x14e)](_0x157873)[_0x15a179(0x141)](_0x353928=>!sameImportValue(_0x157873[_0x353928],_0x1abef3[_0x4a5b87][_0x353928],_0x24d64c[_0x15a179(0x159)]?.[_0x15a179(0x139)](_0x353928)&&!_0x24d64c[_0x15a179(0x173)]?.[_0x15a179(0x139)](_0x353928))))return _0x2e23f7(_0x2cb600,'Import\x20content\x20conflict\x20at\x20Excel\x20row\x20'+_0x24d64c[_0x15a179(0x178)][_0x2cb600['rowIndexes'][_0x4a5b87]][_0x15a179(0x13a)]+'.');}return _0x2cb600[_0x15a179(0x147)]=_0x292d29,_0x2cb600[_0x15a179(0x149)]='succeeded',await saveImportJson(_0x61109d['checkpoint'],_0x6e1963),!![];};if(_0x6e1963[_0x4ae577(0x143)][_0x4ae577(0x141)](_0x4eca5a=>_0x4eca5a['status']===_0x4ae577(0x17d)&&!(_0x61109d[_0x4ae577(0x183)]&&_0x61109d[_0x4ae577(0x17a)]&&_0x24d64c[_0x4ae577(0x159)]?.[_0x4ae577(0x133)]&&_0x4eca5a[_0x4ae577(0x147)][_0x4ae577(0x133)]===_0x4eca5a[_0x4ae577(0x13b)]['length'])))throw Error(_0x4ae577(0x172));if(_0x61109d['resume']){for(const _0x51933c of _0x6e1963[_0x4ae577(0x143)])await _0x74fa3f(_0x51933c);}for(const _0xcecc1c of _0x6e1963[_0x4ae577(0x143)]){if(_0xcecc1c[_0x4ae577(0x149)]===_0x4ae577(0x186))continue;if(!_0x61109d[_0x4ae577(0x183)])await _0x74fa3f(_0xcecc1c);_0xcecc1c['status']=_0x4ae577(0x13f),await saveImportJson(_0x61109d[_0x4ae577(0x152)],_0x6e1963),_0x7ff474++;const _0x17d11d=_0xcecc1c['rowIndexes']['map'](_0x2147cd=>_0x24d64c[_0x4ae577(0x178)][_0x2147cd]['values']),_0x5847e5=Date[_0x4ae577(0x14b)](),_0x47ada7={'batch':_0x7ff474,'rowStart':_0x24d64c[_0x4ae577(0x178)][_0xcecc1c[_0x4ae577(0x13b)][0x0]][_0x4ae577(0x13a)],'rowEnd':_0x24d64c['rows'][_0xcecc1c[_0x4ae577(0x13b)]['at'](-0x1)][_0x4ae577(0x13a)],'count':_0x17d11d[_0x4ae577(0x133)],'bytes':_0xc72524(_0xcecc1c[_0x4ae577(0x13b)],_0xcecc1c[_0x4ae577(0x15d)]),'elapsedMs':0x0,'status':'unknown'};_0x20ceae[_0x4ae577(0x17c)](_0x47ada7);try{const _0xd91db2=await _0x187aa4[_0x4ae577(0x176)](_0x17d11d,_0xcecc1c['taskId']);if(!_0xd91db2||_0xd91db2[_0x4ae577(0x16e)]!==_0x17d11d[_0x4ae577(0x133)]||!Array[_0x4ae577(0x166)](_0xd91db2[_0x4ae577(0x147)])||_0xd91db2['ids'][_0x4ae577(0x133)]!==_0x17d11d[_0x4ae577(0x133)]||_0xd91db2[_0x4ae577(0x147)][_0x4ae577(0x141)](_0x11268c=>!validId(_0x11268c))||new Set(_0xd91db2['ids'])[_0x4ae577(0x151)]!==_0xd91db2[_0x4ae577(0x147)][_0x4ae577(0x133)])throw Error('Invalid\x20write\x20result.');_0xcecc1c[_0x4ae577(0x147)]=_0xd91db2[_0x4ae577(0x147)],await saveImportJson(_0x61109d[_0x4ae577(0x152)],_0x6e1963);if(!await _0x74fa3f(_0xcecc1c))throw Error(_0x4ae577(0x180));}catch(_0x4007e2){if(_0xcecc1c[_0x4ae577(0x149)]===_0x4ae577(0x17d))throw _0x4007e2;try{await _0x74fa3f(_0xcecc1c);}catch(_0x1ed193){if(_0xcecc1c[_0x4ae577(0x149)]===_0x4ae577(0x17d))throw _0x1ed193;}if(_0xcecc1c[_0x4ae577(0x149)]!=='succeeded')throw Error('The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20original\x20task\x20marker\x20before\x20continuing.');}finally{_0x47ada7[_0x4ae577(0x165)]=Date[_0x4ae577(0x14b)]()-_0x5847e5,_0x47ada7[_0x4ae577(0x149)]=_0xcecc1c[_0x4ae577(0x149)]===_0x4ae577(0x186)?_0x4ae577(0x186):_0xcecc1c[_0x4ae577(0x149)]===_0x4ae577(0x17d)?_0x4ae577(0x17d):'unknown';}}const _0x2f4e88={'status':'completed',..._0x1f64e1()};return await saveImportJson(_0x61109d['report'],_0x2f4e88),_0x2f4e88;}catch(_0x5ca705){if(_0x545572)await saveImportJson(_0x61109d[_0x4ae577(0x185)],{'status':_0x4ae577(0x15a),..._0x1f64e1(),'message':_0x5ca705[_0x4ae577(0x15b)]});throw _0x5ca705;}finally{await _0x3c42ee();}}
@@ -1 +1 @@
1
- function a141_0x1188(){const _0x5aea6b=['original','jszip','stringify','Invalid\x20worksheet\x20column\x20range.','date','Invalid\x20worksheet\x20cell\x20or\x20merge\x20reference.','unixPermissions','string','File\x20is\x20not\x20an\x20XLSX\x20workbook.','add','before','Dataset\x20field\x20metadata\x20is\x20missing.','hex','readUInt16LE','ranges','write','Invalid\x20worksheet\x20coordinate.','Worksheet\x20exceeds\x2016384\x20columns.','Image\x20XML\x20node\x20budget\x20exceeded.','entries','merges','exceljs/lib/utils/col-cache.js','Expected\x20a\x20text\x20cell.','includes','address','left','processAttributes','cells','dataValidations','generated','object','charCodeAt','trim','localeCompare','Only\x20.xlsx\x20files\x20are\x20supported.','dataset','Workbook','end','396108UGzMaW','set','entry','formula','Unsupported\x20field\x20type:\x20','getCell','errors','datetime','error','integer','uploadFields','Invalid\x20XLSX\x20entry.','./zipEntry','update','exceljs/lib/xlsx/xform/book/defined-name-xform.js','4InLaXL','close','fields','1367730VAVfQO','fileComment','27128jVIzAn','Duplicate\x20mapping\x20target:\x20','text','destroy','Required\x20field\x20is\x20not\x20mapped:\x20','XML\x20DTD/entities\x20are\x20not\x20supported.','jpg','autoIncrement','split','Duplicate\x20ZIP64\x20extended\x20information\x20fields\x20are\x20not\x20supported.','fileNameRaw','parseText','code','./reader/readerFor','size','getRow','upload','bitFlag','Invalid\x20ZIP\x20central\x20directory\x20layout.','media','545KAzwHE','MAX_SAFE_INTEGER','message','push','slice','modifierName','isSafeInteger','Worksheet\x20exceeds\x20','image','rowCount','exceljs','bottom','concat','Non-canonical\x20workbook\x20or\x20worksheet\x20ZIP\x20entry.','Invalid\x20defined\x20name\x20coordinate.','result','reference','XLSX\x20file\x20must\x20be\x20a\x20regular\x20file\x20no\x20larger\x20than\x2020\x20MB.','Cell\x20exceeds\x2064\x20KB.','decodeEx','byteLength','readUInt32LE','eachCell','emptyRows','value','extend','parserVersion','Unsupported\x20dataset\x20field\x20type:\x20serial_number.','Required\x20image\x20value\x20is\x20missing.','file','Sheet\x20index\x20must\x20be\x20a\x20positive\x20one-based\x20integer.','Workbook\x20defined\x20name\x20work\x20exceeds\x20100000.','readBigUInt64LE','isInteger','Duplicate\x20header:\x20','contentHash','Invalid\x20worksheet\x20merge\x20reference.','Invalid\x20worksheet\x20cell\x20without\x20an\x20initial\x20reference.','Non-canonical\x20or\x20duplicate\x20image\x20archive\x20entry.','abs','Worksheet\x20coordinate\x20exceeds\x20','rows','imageCells','top','xlsx','Invalid\x20worksheet\x20hyperlink\x20reference.','deleted','equals','Invalid\x20XLSX\x20archive.','readEntry','filter','extraFieldRaw','clear','./utf8','extname','Headers\x20must\x20be\x20non-empty\x20text\x20cells\x20no\x20larger\x20than\x2064\x20KB.','creatorId','[Content_Types].xml','every','values','Invalid\x20worksheet\x20XML:\x20','isArray','Invalid\x20or\x20duplicate\x20dataset\x20field\x20metadata.','Unique\x20image\x20bytes\x20exceed\x2050\x20MB.','fileName','model','right','attributes','utf8decode','dir','parse','Duplicate\x20workbook\x20ZIP\x20entry.','lastIndexOf','Invalid\x20dataset\x20field\x20extension\x20metadata.','versionMadeBy','mergeCell','batchSize\x20must\x20be\x20between\x201\x20and\x201000.','\x20hidden\x20row(s)\x20are\x20included\x20in\x20the\x20import.','ZIP\x20local\x20and\x20central\x20entry\x20names\x20must\x20match.','fileNameStr','Worksheet\x20merge\x20work\x20exceeds\x20100000.','Image\x20cell\x20contains\x20scalar\x20or\x20mixed\x20content.','worksheets','name','parseInt','mapping','max','from','startsWith','directory','createTime','10156yKttXs','required','isBuffer','Invalid\x20worksheet\x20XML.','datasetId','hidden','map','Unknown\x20Excel\x20header:\x20','sourceType','imageFields','data','batchSize','resolve','doctype','subarray','Excel\x20import\x20only\x20supports\x20METADATA\x20datasets.','closetag','externalFileAttributes','get','22140fVzVdL','modifierId','fileCommentRaw','tenantCode','find','length','hiddenRow','row','getTime','sha256','image/jpeg','compressedSize','opentag','_xlnm.Print_Area','287OxQJDc','sort','Invalid\x20ZIP\x20local\x20file\x20header.','_xlnm.Print_Titles','sheet','handleUTF8','materialized','isFinite','decimal','dataset-import/','test','Duplicate\x20dataset\x20field\x20codes.','has','23666bvEQMN','number','headerRow','extraFields','toLowerCase','parseClose','Image\x20XML\x20event\x20budget\x20exceeded.','dataType','creatorName','Required\x20value\x20is\x20missing.','updateTime','generalPurposeBitFlag','Mapping\x20must\x20contain\x20at\x20least\x20one\x20field.','create','load','readEntryCursor','extraFieldsLength','XLSX\x20expanded\x20content\x20exceeds\x20100\x20MB.','type','hyperlink','warnings','METADATA','textarea','isFile','entryCount','Worksheet\x20deferred\x20cell\x20events\x20exceed\x201000000.','Non-canonical\x20worksheet\x20ZIP\x20entry.','repeat','col','doType','some','2061250lVOCkP','serial_number','boolean','sharedFormula','columnCount'];a141_0x1188=function(){return _0x5aea6b;};return a141_0x1188();}const a141_0x925568=a141_0x42bf;(function(_0x5286ed,_0x343665){const _0x518a38=a141_0x42bf,_0x116d35=_0x5286ed();while(!![]){try{const _0x436d2a=-parseInt(_0x518a38(0x20e))/0x1*(parseInt(_0x518a38(0x267))/0x2)+parseInt(_0x518a38(0x258))/0x3+-parseInt(_0x518a38(0x2db))/0x4*(-parseInt(_0x518a38(0x280))/0x5)+parseInt(_0x518a38(0x1f3))/0x6+parseInt(_0x518a38(0x201))/0x7*(-parseInt(_0x518a38(0x26c))/0x8)+parseInt(_0x518a38(0x26a))/0x9+-parseInt(_0x518a38(0x22d))/0xa;if(_0x436d2a===_0x343665)break;else _0x116d35['push'](_0x116d35['shift']());}catch(_0x4575c1){_0x116d35['push'](_0x116d35['shift']());}}}(a141_0x1188,0x29fb7));import{readFile,stat}from'node:fs/promises';import{createHash}from'node:crypto';import a141_0x4a9a16 from'node:path';import{StringDecoder}from'node:string_decoder';import{createRequire}from'node:module';import{SaxesParser}from'saxes';import a141_0x1ddc8b from'exceljs';import a141_0x46d9de from'yauzl';import{resolveWorksheetImages}from'./image-ooxml.js';function a141_0x42bf(_0x78a8d2,_0xd7c05a){_0x78a8d2=_0x78a8d2-0x1e4;const _0x11881d=a141_0x1188();let _0x42bf70=_0x11881d[_0x78a8d2];return _0x42bf70;}import{validateImageBytes}from'./image-bytes.js';const MAX_FILE=0x14*0x400*0x400,MAX_EXPANDED=0x64*0x400*0x400,MAX_ROWS=0x186a0,MAX_COLUMNS=0x100,MAX_XML_ROWS=0x100000,MAX_XML_COLUMNS=0x4000,MAX_CELL=0x40*0x400,RESERVED=new Set(['id',a141_0x925568(0x1f6),'appCode',a141_0x925568(0x1e4),a141_0x925568(0x2b8),a141_0x925568(0x216),a141_0x925568(0x1f4),a141_0x925568(0x285),a141_0x925568(0x2da),a141_0x925568(0x218),a141_0x925568(0x2ae)]),TYPES=new Set(['string',a141_0x925568(0x26e),a141_0x925568(0x224),a141_0x925568(0x20f),a141_0x925568(0x209),a141_0x925568(0x261),'boolean',a141_0x925568(0x236),a141_0x925568(0x25f),a141_0x925568(0x288),a141_0x925568(0x27c)]),isImageContainer=_0x1b04d1=>[a141_0x925568(0x288),a141_0x925568(0x27c)][a141_0x925568(0x249)](_0x1b04d1[a141_0x925568(0x212)]()),hash=_0x1a9b43=>createHash(a141_0x925568(0x1fc))[a141_0x925568(0x265)](_0x1a9b43)['digest'](a141_0x925568(0x23e)),require=createRequire(import.meta.url),DefinedNameXform=require(a141_0x925568(0x266)),nameCoordinates=require(a141_0x925568(0x247)),ABSOLUTE_NAME_RANGE=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/,excelRequire=createRequire(require[a141_0x925568(0x1ec)](a141_0x925568(0x28a))),zipRequire=createRequire(excelRequire[a141_0x925568(0x1ec)](a141_0x925568(0x233))),ZipEntry=zipRequire(a141_0x925568(0x264)),zipReader=zipRequire(a141_0x925568(0x279)),zipUtf8=zipRequire(a141_0x925568(0x2b5)),zipPaths=zipRequire('./utils');function centralDirectoryEnd(_0x13698d,_0x2de87e){const _0x4768ab=a141_0x925568,_0x1c210e=()=>new Error(_0x4768ab(0x27e)),_0x1eb581=_0x13698d[_0x4768ab(0x2c8)](Buffer['from']([0x50,0x4b,0x5,0x6]));if(_0x1eb581<0x0||_0x1eb581+0x16>_0x13698d[_0x4768ab(0x1f8)]||_0x1eb581+0x16+_0x13698d[_0x4768ab(0x23f)](_0x1eb581+0x14)!==_0x13698d[_0x4768ab(0x1f8)])throw _0x1c210e();let _0x38970e=_0x13698d[_0x4768ab(0x23f)](_0x1eb581+0xa),_0x4c67e3=_0x13698d['readUInt32LE'](_0x1eb581+0xc),_0x7a8c33=_0x13698d[_0x4768ab(0x295)](_0x1eb581+0x10),_0x21f1d1=_0x1eb581;const _0x52bbdf=_0x1eb581-0x14,_0x14f4a1=_0x52bbdf>=0x0&&_0x13698d[_0x4768ab(0x295)](_0x52bbdf)===0x7064b50,_0xa4fe6a=[0x4,0x6,0x8,0xa][_0x4768ab(0x22c)](_0x337a6b=>_0x13698d[_0x4768ab(0x23f)](_0x1eb581+_0x337a6b)===0xffff)||_0x4c67e3===0xffffffff||_0x7a8c33===0xffffffff;if(_0x14f4a1!==_0xa4fe6a)throw _0x1c210e();if(_0x14f4a1){if(_0x13698d['lastIndexOf'](Buffer[_0x4768ab(0x2d7)]([0x50,0x4b,0x6,0x7]))!==_0x52bbdf)throw _0x1c210e();const _0x5f4d14=_0x16fade=>{const _0xaf891b=_0x4768ab,_0x5d0e07=Number(_0x13698d[_0xaf891b(0x2a0)](_0x16fade));if(!Number[_0xaf891b(0x286)](_0x5d0e07))throw _0x1c210e();return _0x5d0e07;};_0x21f1d1=_0x5f4d14(_0x52bbdf+0x8);if(_0x13698d[_0x4768ab(0x295)](_0x52bbdf+0x4)!==0x0||_0x13698d[_0x4768ab(0x295)](_0x52bbdf+0x10)!==0x1||_0x21f1d1>_0x52bbdf-0x38||_0x13698d[_0x4768ab(0x295)](_0x21f1d1)!==0x6064b50||_0x5f4d14(_0x21f1d1+0x4)!==0x2c||_0x21f1d1+0x38!==_0x52bbdf||_0x13698d[_0x4768ab(0x295)](_0x21f1d1+0x10)!==0x0||_0x13698d[_0x4768ab(0x295)](_0x21f1d1+0x14)!==0x0)throw _0x1c210e();_0x38970e=_0x5f4d14(_0x21f1d1+0x20),_0x4c67e3=_0x5f4d14(_0x21f1d1+0x28),_0x7a8c33=_0x5f4d14(_0x21f1d1+0x30);if(_0x5f4d14(_0x21f1d1+0x18)!==_0x38970e)throw _0x1c210e();}else{if(_0x13698d[_0x4768ab(0x23f)](_0x1eb581+0x4)!==0x0||_0x13698d['readUInt16LE'](_0x1eb581+0x6)!==0x0||_0x13698d[_0x4768ab(0x23f)](_0x1eb581+0x8)!==_0x38970e)throw _0x1c210e();}const _0x5d5799=_0x2de87e[_0x4768ab(0x21d)];if(_0x7a8c33!==_0x5d5799||_0x38970e!==_0x2de87e[_0x4768ab(0x226)]||_0x7a8c33+_0x4c67e3!==_0x21f1d1)throw _0x1c210e();return _0x21f1d1;}function consumerEntryName(_0x2bb4f2,_0xd65877){const _0x2ae1d9=a141_0x925568;if(_0xd65877[_0x2ae1d9(0x211)][_0x2ae1d9(0x2b2)](_0x246283=>_0x246283['id']===0x1)['length']>0x1)throw new Error(_0x2ae1d9(0x275));const _0x5c34a1=_0xd65877,_0x250438=_0xd65877['relativeOffsetOfLocalHeader'];if(!Buffer['isBuffer'](_0x5c34a1[_0x2ae1d9(0x276)])||!Buffer[_0x2ae1d9(0x2dd)](_0x5c34a1[_0x2ae1d9(0x2b3)])||!Buffer[_0x2ae1d9(0x2dd)](_0x5c34a1[_0x2ae1d9(0x1f5)])||!Number[_0x2ae1d9(0x286)](_0x250438)||_0x250438<0x0||_0x250438>_0x2bb4f2[_0x2ae1d9(0x1f8)]-0x1e||_0x2bb4f2[_0x2ae1d9(0x295)](_0x250438)!==0x4034b50)throw new Error(_0x2ae1d9(0x203));const _0x2a8eb1=_0x250438+0x1e+_0x2bb4f2[_0x2ae1d9(0x23f)](_0x250438+0x1a),_0x2c41b9=_0x2a8eb1+_0x2bb4f2[_0x2ae1d9(0x23f)](_0x250438+0x1c)+_0xd65877[_0x2ae1d9(0x1fe)];if(!Number[_0x2ae1d9(0x286)](_0x2c41b9)||_0x2c41b9>_0x2bb4f2[_0x2ae1d9(0x1f8)])throw new Error(_0x2ae1d9(0x203));if(_0x2a8eb1>_0x2bb4f2[_0x2ae1d9(0x1f8)]||!_0x2bb4f2[_0x2ae1d9(0x1ee)](_0x250438+0x1e,_0x2a8eb1)[_0x2ae1d9(0x2af)](_0x5c34a1['fileNameRaw']))throw new Error(_0x2ae1d9(0x2ce));const _0x5a5262=new ZipEntry({},{'decodeFileName':zipUtf8[_0x2ae1d9(0x2c4)]});_0x5a5262[_0x2ae1d9(0x27d)]=_0xd65877[_0x2ae1d9(0x219)],_0x5a5262[_0x2ae1d9(0x2c0)]=_0x5c34a1[_0x2ae1d9(0x276)],_0x5a5262[_0x2ae1d9(0x26b)]=_0x5c34a1[_0x2ae1d9(0x1f5)],_0x5a5262[_0x2ae1d9(0x21e)]=_0x5c34a1[_0x2ae1d9(0x2b3)][_0x2ae1d9(0x1f8)],_0x5a5262['readExtraFields'](zipReader(_0x5c34a1[_0x2ae1d9(0x2b3)])),_0x5a5262[_0x2ae1d9(0x206)](),_0x5a5262[_0x2ae1d9(0x2ca)]=_0xd65877['versionMadeBy'],_0x5a5262['externalFileAttributes']=_0xd65877[_0x2ae1d9(0x1f1)],_0x5a5262[_0x2ae1d9(0x24c)]();const _0x4f697b=_0x5a5262[_0x2ae1d9(0x2c5)]||Boolean((_0x5a5262[_0x2ae1d9(0x238)]??0x0)&0x4000),_0x19f72c=zipPaths[_0x2ae1d9(0x1ec)](_0x5a5262[_0x2ae1d9(0x2cf)]),_0x8c538a=_0x19f72c[_0x2ae1d9(0x2d8)]('/')?_0x19f72c[_0x2ae1d9(0x284)](0x1):_0x19f72c;return{'name':_0x8c538a,'original':_0x5a5262[_0x2ae1d9(0x2cf)],'directory':_0x4f697b};}export function normalizeImportFields(_0x94c00e){const _0xd76b62=a141_0x925568;if(!_0x94c00e||(_0x94c00e['source']??_0x94c00e[_0xd76b62(0x255)]?.[_0xd76b62(0x1e8)])!==_0xd76b62(0x223))throw new Error(_0xd76b62(0x1ef));const _0x2193b0=Array['isArray'](_0x94c00e['fields']),_0x40624d=_0x2193b0?_0x94c00e[_0xd76b62(0x269)]:_0x94c00e['properties'];if(!Array[_0xd76b62(0x2bd)](_0x40624d)||_0x40624d[_0xd76b62(0x1f8)]===0x0)throw new Error(_0xd76b62(0x23d));const _0x41a649=[],_0x183e34=new Set();for(const _0x4ec0fe of _0x40624d){if(_0x4ec0fe[_0xd76b62(0x2ae)]===!![])continue;let _0x270069=_0x4ec0fe[_0xd76b62(0x299)]??{};if(!_0x2193b0&&typeof _0x270069==='string'){try{_0x270069=JSON[_0xd76b62(0x2c6)](_0x270069);}catch{throw new Error(_0xd76b62(0x2c9));}if(!_0x270069||typeof _0x270069!==_0xd76b62(0x250)||Array[_0xd76b62(0x2bd)](_0x270069))throw new Error(_0xd76b62(0x2c9));}const _0xf6e3b6=_0x2193b0?_0x4ec0fe[_0xd76b62(0x2d3)]:_0x4ec0fe[_0xd76b62(0x278)],_0x3986a8=_0x2193b0?_0x4ec0fe[_0xd76b62(0x22b)]:_0x4ec0fe['type']??_0x4ec0fe[_0xd76b62(0x215)];if(typeof _0xf6e3b6!=='string'||!_0xf6e3b6||typeof _0x3986a8!==_0xd76b62(0x239)||_0x183e34[_0xd76b62(0x20d)](_0xf6e3b6))throw new Error(_0xd76b62(0x2be));if(_0x3986a8[_0xd76b62(0x212)]()===_0xd76b62(0x22e))throw new Error(_0xd76b62(0x29b));_0x183e34[_0xd76b62(0x23b)](_0xf6e3b6);const _0x1f9fcc=_0x2193b0?_0x4ec0fe:_0x270069,_0x4eca51={'code':_0xf6e3b6,'type':_0x3986a8,'required':_0x1f9fcc['required']===!![]};if(RESERVED['has'](_0xf6e3b6)||_0x1f9fcc[_0xd76b62(0x24f)]===!![]||_0x1f9fcc[_0xd76b62(0x273)]===!![])_0x4eca51['generated']=!![];_0x41a649['push'](_0x4eca51);}return _0x41a649;}async function checkArchive(_0x4fd783,_0x436c84){await new Promise((_0x4574b3,_0x32d46)=>{a141_0x46d9de['fromBuffer'](_0x4fd783,{'lazyEntries':!![],'validateEntrySizes':!![]},(_0x32d424,_0x5f4d06)=>{const _0x5005dc=a141_0x42bf;if(_0x32d424||!_0x5f4d06){_0x32d46(_0x32d424??new Error(_0x5005dc(0x2b0)));return;}let _0x268250;try{_0x268250=centralDirectoryEnd(_0x4fd783,_0x5f4d06);}catch(_0x2fe621){_0x5f4d06[_0x5005dc(0x268)](),_0x32d46(_0x2fe621);return;}let _0x85f579=0x0,_0x5172fa=0x0,_0x2cfeb8=0x0,_0x53961a=0x0,_0x2a4d2d=0x0,_0x46f71d=0x0,_0xc9e65=0x0,_0x3894e2=0x0,_0x148759=0x0,_0x2a59d2=![],_0x5f3d3e;const _0x555d93=new Set(),_0x46c28f=_0x5d2b76=>{if(_0x2a59d2)return;_0x2a59d2=!![],_0x5f3d3e?.['destroy'](),_0x5f4d06['close'](),_0x32d46(_0x5d2b76);},_0x49c10f=(_0x4b6d6a,_0x12e204)=>{const _0x28546f=_0x5005dc;if(!_0x4b6d6a||!/^\d+$/[_0x28546f(0x20b)](_0x4b6d6a))throw new Error(_0x28546f(0x242));const _0x39aa51=Number(_0x4b6d6a);if(!Number[_0x28546f(0x286)](_0x39aa51)||_0x39aa51<0x1||_0x39aa51>_0x12e204)throw new Error(_0x28546f(0x2a8)+_0x12e204+'.');return _0x39aa51;},_0x349bdb=(_0x497c19,_0x314a12=MAX_XML_COLUMNS)=>{const _0x2705b8=_0x5005dc,_0x266df8=/^\$?([A-Z]{1,3})\$?(\d+)$/['exec'](_0x497c19);if(!_0x266df8)throw new Error(_0x2705b8(0x237));let _0x44182d=0x0;for(const _0x105c2c of _0x266df8[0x1])_0x44182d=_0x44182d*0x1a+_0x105c2c[_0x2705b8(0x251)](0x0)-0x40;if(_0x44182d>_0x314a12)throw new Error(_0x2705b8(0x287)+_0x314a12+'\x20columns.');return{'row':_0x49c10f(_0x266df8[0x2],MAX_XML_ROWS),'col':_0x44182d};},_0x5e2071=_0x5c49bf=>{const _0x5b0be6=_0x5005dc;if(_0x5c49bf[_0x5b0be6(0x2d3)]===_0x5b0be6(0x200)||_0x5c49bf[_0x5b0be6(0x2d3)]===_0x5b0be6(0x204))return;for(const _0x42e64c of _0x5c49bf[_0x5b0be6(0x240)]){if(!ABSOLUTE_NAME_RANGE['test'](_0x42e64c[_0x5b0be6(0x274)]('!')['pop']()||''))continue;const _0x11ceff=nameCoordinates[_0x5b0be6(0x293)](_0x42e64c),_0x2c62ab=_0x5b0be6(0x2ab)in _0x11ceff,_0x1f0343=_0x2c62ab?[_0x11ceff[_0x5b0be6(0x2ab)],_0x11ceff[_0x5b0be6(0x28b)]]:[_0x11ceff[_0x5b0be6(0x1fa)]],_0xe9a0db=_0x2c62ab?[_0x11ceff[_0x5b0be6(0x24b)],_0x11ceff[_0x5b0be6(0x2c2)]]:[_0x11ceff[_0x5b0be6(0x22a)]],_0x1a92f6=(_0xc99f80,_0x3aa20a)=>Number[_0x5b0be6(0x286)](_0xc99f80)&&_0xc99f80>=0x1&&_0xc99f80<=_0x3aa20a;if(!_0x1f0343['every'](_0x2a4e05=>_0x1a92f6(_0x2a4e05,MAX_XML_ROWS))||!_0xe9a0db[_0x5b0be6(0x2ba)](_0x249c5c=>_0x1a92f6(_0x249c5c,MAX_XML_COLUMNS)))throw new Error(_0x5b0be6(0x28e));_0xc9e65+=_0x2c62ab?(_0x11ceff['bottom']-_0x11ceff['top']+0x1)*(_0x11ceff[_0x5b0be6(0x2c2)]-_0x11ceff[_0x5b0be6(0x24b)]+0x1):0x1;if(_0xc9e65>MAX_ROWS)throw new Error(_0x5b0be6(0x29f));}};_0x5f4d06['on']('error',_0x46c28f),_0x5f4d06['on'](_0x5005dc(0x25a),_0x342644=>{const _0xa22ec6=_0x5005dc;if(_0x2a59d2)return;if(++_0x2cfeb8>0x2710||(_0x85f579+=_0x342644['uncompressedSize'])>MAX_EXPANDED){_0x46c28f(new Error(_0xa22ec6(0x21f)));return;}let _0x1f5993;try{_0x1f5993=consumerEntryName(_0x4fd783,_0x342644);}catch(_0xdba623){_0x46c28f(_0xdba623);return;}if(_0x1f5993[_0xa22ec6(0x2d9)]){_0x5f4d06[_0xa22ec6(0x2b1)]();return;}const _0x118d5e=_0x1f5993['name'];if(_0x436c84&&(_0x118d5e!==_0x1f5993[_0xa22ec6(0x232)]||_0x555d93[_0xa22ec6(0x20d)](_0x118d5e)||_0x118d5e[_0xa22ec6(0x2d8)]('/')||_0x118d5e[_0xa22ec6(0x249)]('\x5c'))){_0x46c28f(new Error(_0xa22ec6(0x2a6)));return;}if(_0x118d5e!==_0x1f5993[_0xa22ec6(0x232)]&&(_0x118d5e==='xl/workbook.xml'||/xl\/worksheets\/sheet(\d+)[.]xml/[_0xa22ec6(0x20b)](_0x118d5e))){_0x46c28f(new Error(_0xa22ec6(0x28d)));return;}const _0x54ab99=_0x118d5e==='xl/workbook.xml';if(_0x54ab99&&_0x555d93[_0xa22ec6(0x20d)](_0x118d5e)){_0x46c28f(new Error(_0xa22ec6(0x2c7)));return;}_0x555d93[_0xa22ec6(0x23b)](_0x118d5e);const _0x4907b0=/xl\/worksheets\/sheet(\d+)[.]xml/[_0xa22ec6(0x20b)](_0x118d5e);if(_0x4907b0&&!/^xl\/worksheets\/sheet\d+[.]xml$/[_0xa22ec6(0x20b)](_0x118d5e)){_0x46c28f(new Error(_0xa22ec6(0x228)));return;}_0x5f4d06['openReadStream'](_0x342644,(_0x289f24,_0xad7790)=>{const _0x4396a7=_0xa22ec6;if(_0x2a59d2){_0xad7790?.[_0x4396a7(0x26f)]();return;}if(_0x289f24||!_0xad7790){_0x46c28f(_0x289f24??new Error(_0x4396a7(0x263)));return;}_0x5f3d3e=_0xad7790;const _0xb23393=_0x436c84?[]:undefined,_0x1b3fe2=_0x436c84&&/[.](xml|rels)$/[_0x4396a7(0x20b)](_0x118d5e)?new StringDecoder('utf8'):undefined,_0x22cb57=_0x1b3fe2?new SaxesParser({'xmlns':![]}):undefined,_0x275e21=()=>{const _0x296d7c=_0x4396a7;if(++_0x148759>0x1e8480)throw Error(_0x296d7c(0x214));};_0x22cb57?.['on'](_0x4396a7(0x1ed),()=>{const _0x202cc5=_0x4396a7;throw Error(_0x202cc5(0x271));}),_0x22cb57?.['on'](_0x4396a7(0x1ff),()=>{const _0x35bf49=_0x4396a7;_0x275e21();if(++_0x3894e2>0x7a120)throw Error(_0x35bf49(0x244));}),_0x22cb57?.['on']('text',_0x275e21),_0x22cb57?.['on'](_0x4396a7(0x1f0),_0x275e21),_0x22cb57?.['on'](_0x4396a7(0x260),_0x2cd26c=>{throw _0x2cd26c;});const _0xecb906=_0x4907b0||_0x54ab99?new StringDecoder('utf8'):undefined,_0x187c3a=_0x4907b0||_0x54ab99?new SaxesParser({'xmlns':![]}):undefined;let _0x549e08,_0x371226=0x0,_0x26f665=0x0,_0x5e1a22,_0x409810,_0x1a7bfc=![],_0x41c280=![],_0x540c8a,_0x16ef54,_0x78170,_0x50d7d4=![];const _0x4c439c=[],_0x1bad3f=new Set();let _0x2d88b1;const _0x3e9e82=(_0x12ebb2,_0x36ac96=0x0)=>{const _0x5bf5f9=_0x4396a7;_0x2a4d2d+=_0x36ac96+Math[_0x5bf5f9(0x2d6)](0x0,_0x12ebb2-_0x26f665),_0x26f665=Math['max'](_0x26f665,_0x12ebb2);if(_0x2a4d2d>MAX_ROWS)throw new Error('Worksheet\x20column\x20objects\x20exceed\x20100000.');};_0x187c3a?.['on'](_0x4396a7(0x1ff),_0x45f225=>{const _0x4edbf5=_0x4396a7;if(_0x54ab99){if(!_0x549e08&&_0x45f225['name']==='definedName')_0x549e08=new DefinedNameXform();_0x549e08?.['parseOpen'](_0x45f225);return;}if(_0x45f225[_0x4edbf5(0x2d3)]==='row'){if(_0x41c280)throw new Error('Invalid\x20worksheet\x20nested\x20row.');_0x49c10f(_0x45f225[_0x4edbf5(0x2c3)]['r'],MAX_XML_ROWS),_0x5e1a22=undefined,_0x78170=undefined,_0x50d7d4=![];}else{if(_0x45f225[_0x4edbf5(0x2d3)]==='c'){if(_0x41c280)throw new Error('Invalid\x20worksheet\x20nested\x20cell.');_0x41c280=!![],_0x1a7bfc=Boolean(Number[_0x4edbf5(0x2d4)](_0x45f225[_0x4edbf5(0x2c3)]['s']??'',0xa)),_0x2d88b1=undefined,_0x540c8a=_0x45f225[_0x4edbf5(0x2c3)]['r']||undefined,_0x16ef54=_0x540c8a?_0x349bdb(_0x540c8a):undefined;if(_0x16ef54)_0x409810=_0x16ef54;else _0x409810=_0x5e1a22?{'row':_0x5e1a22[_0x4edbf5(0x1fa)],'col':_0x5e1a22[_0x4edbf5(0x22a)]+0x1}:undefined;}else{if(_0x41c280&&['f','v','t'][_0x4edbf5(0x249)](_0x45f225[_0x4edbf5(0x2d3)])){_0x2d88b1=_0x45f225['name'];if(_0x45f225[_0x4edbf5(0x2d3)]==='f'&&_0x45f225[_0x4edbf5(0x2c3)]['t'])_0x1a7bfc=!![];}else{if(_0x41c280&&_0x45f225['name']==='r')_0x1a7bfc=!![];else{if(_0x45f225[_0x4edbf5(0x2d3)]===_0x4edbf5(0x221)){const _0x332918=_0x45f225[_0x4edbf5(0x2c3)]['ref'];if(!_0x332918)throw new Error(_0x4edbf5(0x2ad));const _0x24f0c2=_0x332918['split'](':');if(_0x24f0c2[_0x4edbf5(0x1f8)]>0x2)throw new Error(_0x4edbf5(0x2ad));const _0x4f1c61=_0x349bdb(_0x24f0c2[0x0]),_0x345099=_0x349bdb(_0x24f0c2[0x1]??_0x24f0c2[0x0]);_0x1bad3f[_0x4edbf5(0x23b)](_0x332918),_0x3e9e82(Math[_0x4edbf5(0x2d6)](_0x4f1c61['col'],_0x345099[_0x4edbf5(0x22a)]),0x1);}else{if(_0x45f225['name']===_0x4edbf5(0x22a)){const _0x9a9968=_0x49c10f(_0x45f225[_0x4edbf5(0x2c3)]['min'],0x4000),_0x232f52=_0x49c10f(_0x45f225[_0x4edbf5(0x2c3)][_0x4edbf5(0x2d6)],0x4000);if(_0x9a9968>_0x232f52)throw new Error(_0x4edbf5(0x235));_0x3e9e82(_0x232f52,0x1);}else{if(_0x45f225[_0x4edbf5(0x2d3)]===_0x4edbf5(0x2cb)){const _0xe8045b=_0x45f225['attributes']['ref'];if(!_0xe8045b)throw new Error(_0x4edbf5(0x2a4));const _0x5b835a=_0xe8045b[_0x4edbf5(0x274)](':');if(_0x5b835a[_0x4edbf5(0x1f8)]>0x2)throw new Error(_0x4edbf5(0x2a4));const _0x5b82be=_0x349bdb(_0x5b835a[0x0]),_0x137002=_0x349bdb(_0x5b835a[0x1]??_0x5b835a[0x0]);_0x3e9e82(Math[_0x4edbf5(0x2d6)](_0x5b82be['col'],_0x137002[_0x4edbf5(0x22a)]));const _0x702428=(Math[_0x4edbf5(0x2a7)](_0x137002[_0x4edbf5(0x1fa)]-_0x5b82be[_0x4edbf5(0x1fa)])+0x1)*(Math[_0x4edbf5(0x2a7)](_0x137002[_0x4edbf5(0x22a)]-_0x5b82be[_0x4edbf5(0x22a)])+0x1);_0x53961a+=_0x702428+_0x371226++;if(_0x53961a>MAX_ROWS)throw new Error(_0x4edbf5(0x2d0));}}}}}}}}),_0x187c3a?.['on'](_0x4396a7(0x26e),_0x27d8ff=>{const _0x3370ad=_0x4396a7;if(_0x54ab99){_0x549e08?.[_0x3370ad(0x277)](_0x27d8ff);return;}if(_0x41c280&&_0x2d88b1&&_0x27d8ff)_0x1a7bfc=!![];}),_0x187c3a?.['on'](_0x4396a7(0x1f0),_0x287447=>{const _0x30bc2f=_0x4396a7;if(_0x54ab99){_0x549e08&&!_0x549e08[_0x30bc2f(0x213)]()&&(_0x5e2071(_0x549e08[_0x30bc2f(0x2c1)]),_0x549e08=undefined);return;}if(_0x287447[_0x30bc2f(0x2d3)]==='c'){!_0x1a7bfc&&_0x540c8a&&!_0x78170&&(_0x78170={'before':_0x5e1a22,'cells':[]});if(_0x78170){if(++_0x46f71d>0xf4240)throw new Error(_0x30bc2f(0x227));_0x78170[_0x30bc2f(0x24d)][_0x30bc2f(0x283)]({'reference':_0x540c8a,'address':_0x16ef54,'materialized':_0x1a7bfc});if(!_0x540c8a&&_0x1a7bfc)_0x50d7d4=!![];}if(_0x1a7bfc){if(!_0x78170||_0x540c8a){if(!_0x409810)throw new Error(_0x30bc2f(0x2a5));if(_0x409810[_0x30bc2f(0x22a)]>MAX_XML_COLUMNS)throw new Error(_0x30bc2f(0x243));_0x3e9e82(_0x409810[_0x30bc2f(0x22a)]);}_0x5e1a22=_0x409810;}_0x41c280=![],_0x409810=undefined,_0x540c8a=undefined,_0x16ef54=undefined,_0x2d88b1=undefined;}else{if(_0x287447[_0x30bc2f(0x2d3)]==='row'){if(_0x78170&&_0x50d7d4)_0x4c439c['push'](_0x78170);_0x78170=undefined,_0x50d7d4=![];}else{if(_0x287447[_0x30bc2f(0x2d3)]===_0x2d88b1)_0x2d88b1=undefined;}}}),_0x187c3a?.['on'](_0x4396a7(0x260),_0x81b28e=>{const _0x4b2f68=_0x4396a7;throw new Error(_0x4b2f68(0x2bc)+_0x81b28e[_0x4b2f68(0x282)]);}),_0xad7790['on'](_0x4396a7(0x260),_0x46c28f),_0xad7790['on'](_0x4396a7(0x1ea),_0x451c7e=>{const _0x113b6b=_0x4396a7;if(_0x2a59d2)return;_0x5172fa+=_0x451c7e['length'],_0xb23393?.['push'](_0x451c7e);if(_0x5172fa>MAX_EXPANDED){_0x46c28f(new Error(_0x113b6b(0x21f)));return;}try{if(_0x22cb57&&_0x1b3fe2)_0x22cb57[_0x113b6b(0x241)](_0x1b3fe2['write'](_0x451c7e));if(_0x187c3a&&_0xecb906)_0x187c3a[_0x113b6b(0x241)](_0xecb906[_0x113b6b(0x241)](_0x451c7e));}catch(_0x4f5214){_0x46c28f(_0x4f5214 instanceof Error?_0x4f5214:new Error('Invalid\x20worksheet\x20XML.'));}}),_0xad7790['on']('end',()=>{const _0x505d29=_0x4396a7;if(_0x2a59d2)return;try{if(_0x22cb57&&_0x1b3fe2)_0x22cb57['write'](_0x1b3fe2[_0x505d29(0x257)]())['close']();if(_0x187c3a&&_0xecb906)_0x187c3a['write'](_0xecb906['end']())[_0x505d29(0x268)]();for(const _0x34ff36 of _0x4c439c){let _0x118938=_0x34ff36[_0x505d29(0x23c)];for(const _0x11915c of _0x34ff36[_0x505d29(0x24d)]){if(!_0x11915c[_0x505d29(0x207)]&&!(_0x11915c[_0x505d29(0x290)]&&_0x1bad3f[_0x505d29(0x20d)](_0x11915c[_0x505d29(0x290)])))continue;const _0x459a17=_0x11915c[_0x505d29(0x24a)]??(_0x118938?{'row':_0x118938[_0x505d29(0x1fa)],'col':_0x118938[_0x505d29(0x22a)]+0x1}:undefined);if(!_0x459a17)throw new Error(_0x505d29(0x2a5));if(_0x459a17[_0x505d29(0x22a)]>MAX_XML_COLUMNS)throw new Error(_0x505d29(0x243));_0x3e9e82(_0x459a17['col']),_0x118938=_0x459a17;}}_0x4c439c['length']=0x0,_0x1bad3f[_0x505d29(0x2b4)]();}catch(_0x3bb8fe){_0x46c28f(_0x3bb8fe instanceof Error?_0x3bb8fe:new Error(_0x505d29(0x2de)));return;}if(_0xb23393)_0x436c84['set'](_0x118d5e,Buffer[_0x505d29(0x28c)](_0xb23393));_0x5f3d3e=undefined,_0x5f4d06[_0x505d29(0x2b1)]();});});}),_0x5f4d06['on'](_0x5005dc(0x257),()=>{const _0x1b33f6=_0x5005dc;if(_0x2a59d2)return;if(_0x5f4d06[_0x1b33f6(0x21d)]!==_0x268250){_0x32d46(new Error('ZIP\x20central\x20directory\x20entry\x20count\x20does\x20not\x20match\x20its\x20contents.'));return;}if(!_0x555d93[_0x1b33f6(0x20d)](_0x1b33f6(0x2b9))||!_0x555d93[_0x1b33f6(0x20d)]('xl/workbook.xml'))_0x32d46(new Error(_0x1b33f6(0x23a)));else _0x4574b3();}),_0x5f4d06['readEntry']();});});}function valueOf(_0x55eba3){const _0x57a9cb=a141_0x925568,_0x1cde10=_0x55eba3[_0x57a9cb(0x298)];if(_0x1cde10&&typeof _0x1cde10===_0x57a9cb(0x250)&&(_0x57a9cb(0x25b)in _0x1cde10||_0x57a9cb(0x230)in _0x1cde10)){if(!(_0x57a9cb(0x28f)in _0x1cde10)||_0x1cde10[_0x57a9cb(0x28f)]===undefined)throw new Error('Formula\x20has\x20no\x20cached\x20result.');return _0x1cde10[_0x57a9cb(0x28f)];}return _0x1cde10;}function convert(_0x36a0fa,_0x49b8a2){const _0x4302f1=a141_0x925568;if(_0x36a0fa===null||_0x36a0fa===undefined||_0x36a0fa===''){if(_0x49b8a2[_0x4302f1(0x2dc)]&&!_0x49b8a2[_0x4302f1(0x24f)])throw new Error(_0x4302f1(0x217));return null;}if(typeof _0x36a0fa==='string'&&Buffer[_0x4302f1(0x294)](_0x36a0fa,'utf8')>MAX_CELL)throw new Error(_0x4302f1(0x292));switch(_0x49b8a2[_0x4302f1(0x220)][_0x4302f1(0x212)]()){case _0x4302f1(0x239):case _0x4302f1(0x26e):case _0x4302f1(0x224):if(typeof _0x36a0fa!=='string')throw new Error(_0x4302f1(0x248));return _0x36a0fa;case _0x4302f1(0x20f):case _0x4302f1(0x209):case'integer':if(typeof _0x36a0fa!=='number'||!Number[_0x4302f1(0x208)](_0x36a0fa)||Math['abs'](_0x36a0fa)>Number[_0x4302f1(0x281)]||_0x49b8a2['type'][_0x4302f1(0x212)]()===_0x4302f1(0x261)&&!Number[_0x4302f1(0x2a1)](_0x36a0fa))throw new Error('Expected\x20a\x20finite\x20safe\x20numeric\x20cell.');return _0x36a0fa;case _0x4302f1(0x22f):if(typeof _0x36a0fa!==_0x4302f1(0x22f))throw new Error('Expected\x20a\x20boolean\x20cell.');return _0x36a0fa;case _0x4302f1(0x236):case _0x4302f1(0x25f):if(!(_0x36a0fa instanceof Date)||!Number[_0x4302f1(0x208)](_0x36a0fa[_0x4302f1(0x1fb)]()))throw new Error('Expected\x20an\x20Excel\x20date\x20cell.');return _0x36a0fa[_0x4302f1(0x1fb)]();default:throw new Error(_0x4302f1(0x25c)+_0x49b8a2['type']+'.');}}export async function buildExcelManifest(_0x4d7ae0){const _0x2ebc3f=a141_0x925568,_0xf9c08=_0x4d7ae0[_0x2ebc3f(0x210)]??0x1;if(!Number['isInteger'](_0xf9c08)||_0xf9c08<0x1||_0xf9c08>MAX_ROWS)throw new Error('headerRow\x20must\x20be\x20between\x201\x20and\x20100000.');if(_0x4d7ae0[_0x2ebc3f(0x1eb)]!==undefined&&(!Number[_0x2ebc3f(0x2a1)](_0x4d7ae0['batchSize'])||_0x4d7ae0['batchSize']<0x1||_0x4d7ae0['batchSize']>0x3e8))throw new Error(_0x2ebc3f(0x2cc));if(a141_0x4a9a16[_0x2ebc3f(0x2b6)](_0x4d7ae0[_0x2ebc3f(0x29d)])['toLowerCase']()!=='.xlsx')throw new Error(_0x2ebc3f(0x254));const _0xe0b0bb=await stat(_0x4d7ae0[_0x2ebc3f(0x29d)]);if(!_0xe0b0bb[_0x2ebc3f(0x225)]()||_0xe0b0bb[_0x2ebc3f(0x27a)]>MAX_FILE)throw new Error(_0x2ebc3f(0x291));const _0x424d5a=await readFile(_0x4d7ae0['file']);if(_0x424d5a[_0x2ebc3f(0x1f8)]>MAX_FILE)throw new Error('XLSX\x20file\x20exceeds\x2020\x20MB.');const _0x3639ab=_0x4d7ae0[_0x2ebc3f(0x269)][_0x2ebc3f(0x22c)](_0x2ede79=>isImageContainer(_0x2ede79[_0x2ebc3f(0x220)])&&Object[_0x2ebc3f(0x2bb)](_0x4d7ae0['mapping'])['includes'](_0x2ede79[_0x2ebc3f(0x278)]))?new Map():undefined;await checkArchive(_0x424d5a,_0x3639ab);const _0x343691=new a141_0x1ddc8b[(_0x2ebc3f(0x256))]();await _0x343691[_0x2ebc3f(0x2ac)][_0x2ebc3f(0x21c)](_0x424d5a,{'ignoreNodes':[_0x2ebc3f(0x24e)]});const _0x429169=_0x4d7ae0[_0x2ebc3f(0x205)];let _0x4e68ca;if(_0x429169===undefined)_0x4e68ca=_0x343691[_0x2ebc3f(0x2d2)][0x0];else{if(typeof _0x429169===_0x2ebc3f(0x239)&&_0x343691[_0x2ebc3f(0x2d2)]['some'](_0x2f1d1=>_0x2f1d1[_0x2ebc3f(0x2d3)]===_0x429169))_0x4e68ca=_0x343691[_0x2ebc3f(0x2d2)][_0x2ebc3f(0x1f7)](_0x570cc7=>_0x570cc7[_0x2ebc3f(0x2d3)]===_0x429169);else{if(typeof _0x429169===_0x2ebc3f(0x20f)||/^\d+$/[_0x2ebc3f(0x20b)](_0x429169)){const _0x516270=Number(_0x429169);if(!Number[_0x2ebc3f(0x2a1)](_0x516270)||_0x516270<0x1)throw new Error(_0x2ebc3f(0x29e));_0x4e68ca=_0x343691[_0x2ebc3f(0x2d2)][_0x516270-0x1];}else _0x4e68ca=_0x343691[_0x2ebc3f(0x2d2)][_0x2ebc3f(0x1f7)](_0x8ede70=>_0x8ede70[_0x2ebc3f(0x2d3)]===_0x429169);}}if(!_0x4e68ca)throw new Error('Requested\x20worksheet\x20does\x20not\x20exist.');if(_0x4e68ca[_0x2ebc3f(0x289)]>MAX_ROWS||_0x4e68ca[_0x2ebc3f(0x231)]>MAX_COLUMNS)throw new Error('Worksheet\x20exceeds\x20100000\x20rows\x20or\x20256\x20columns.');if((_0x4e68ca[_0x2ebc3f(0x2c1)][_0x2ebc3f(0x246)]??[])[_0x2ebc3f(0x1f8)])throw new Error('Merged\x20cells\x20are\x20not\x20supported.');const _0x4ddd39=new Map();_0x4e68ca[_0x2ebc3f(0x27b)](_0xf9c08)['eachCell']((_0x1cf6cb,_0xcfbf8a)=>{const _0x136827=_0x2ebc3f,_0x34def9=valueOf(_0x1cf6cb);if(typeof _0x34def9!==_0x136827(0x239)||!_0x34def9[_0x136827(0x252)]()||Buffer['byteLength'](_0x34def9)>MAX_CELL)throw new Error(_0x136827(0x2b7));if(_0x4ddd39['has'](_0x34def9))throw new Error(_0x136827(0x2a2)+_0x34def9+'.');_0x4ddd39[_0x136827(0x259)](_0x34def9,_0xcfbf8a);});const _0x59c053=Object[_0x2ebc3f(0x245)](_0x4d7ae0[_0x2ebc3f(0x2d5)]);if(!_0x59c053[_0x2ebc3f(0x1f8)])throw new Error(_0x2ebc3f(0x21a));const _0x5a2aaf=new Map(_0x4d7ae0[_0x2ebc3f(0x269)][_0x2ebc3f(0x1e6)](_0x4476e2=>[_0x4476e2[_0x2ebc3f(0x278)],_0x4476e2]));if(_0x5a2aaf[_0x2ebc3f(0x27a)]!==_0x4d7ae0[_0x2ebc3f(0x269)][_0x2ebc3f(0x1f8)])throw new Error(_0x2ebc3f(0x20c));if(_0x4d7ae0[_0x2ebc3f(0x269)][_0x2ebc3f(0x22c)](_0x5cc587=>_0x5cc587[_0x2ebc3f(0x220)][_0x2ebc3f(0x212)]()===_0x2ebc3f(0x22e)))throw new Error('Unsupported\x20dataset\x20field\x20type:\x20serial_number.');const _0x31789c=new Set();for(const [_0x2330ba,_0x5cf69b]of _0x59c053){const _0x971ddb=_0x5a2aaf[_0x2ebc3f(0x1f2)](_0x5cf69b);if(!_0x4ddd39[_0x2ebc3f(0x20d)](_0x2330ba))throw new Error(_0x2ebc3f(0x1e7)+_0x2330ba+'.');if(!_0x971ddb||RESERVED['has'](_0x5cf69b)||_0x971ddb[_0x2ebc3f(0x24f)])throw new Error('Unknown\x20or\x20generated\x20mapping\x20field:\x20'+_0x5cf69b+'.');if(_0x31789c['has'](_0x5cf69b))throw new Error(_0x2ebc3f(0x26d)+_0x5cf69b+'.');if(!TYPES[_0x2ebc3f(0x20d)](_0x971ddb[_0x2ebc3f(0x220)][_0x2ebc3f(0x212)]()))throw new Error('Unsupported\x20field\x20type:\x20'+_0x971ddb['type']+'.');_0x31789c[_0x2ebc3f(0x23b)](_0x5cf69b);}for(const _0x300290 of _0x4d7ae0[_0x2ebc3f(0x269)]){if(_0x300290[_0x2ebc3f(0x2dc)]&&!_0x300290[_0x2ebc3f(0x24f)]&&!RESERVED[_0x2ebc3f(0x20d)](_0x300290['code'])&&!_0x31789c[_0x2ebc3f(0x20d)](_0x300290[_0x2ebc3f(0x278)]))throw new Error(_0x2ebc3f(0x270)+_0x300290[_0x2ebc3f(0x278)]+'.');}const _0x27efa2={'fileHash':hash(_0x424d5a),'mappingHash':hash(JSON['stringify']([..._0x59c053][_0x2ebc3f(0x202)](([_0x300dbf],[_0x284284])=>_0x300dbf[_0x2ebc3f(0x253)](_0x284284)))),'schemaHash':hash(JSON[_0x2ebc3f(0x234)]([..._0x4d7ae0[_0x2ebc3f(0x269)]][_0x2ebc3f(0x202)]((_0x4d40d8,_0x42acaa)=>_0x4d40d8[_0x2ebc3f(0x278)][_0x2ebc3f(0x253)](_0x42acaa[_0x2ebc3f(0x278)])))),'sheet':_0x4e68ca[_0x2ebc3f(0x2d3)],'rows':[],'emptyRows':[],'errors':[],'warnings':[]},_0x3558ce=_0x59c053[_0x2ebc3f(0x2b2)](([,_0x435c8e])=>isImageContainer(_0x5a2aaf[_0x2ebc3f(0x1f2)](_0x435c8e)[_0x2ebc3f(0x220)])),_0x42f99b=_0x3558ce['filter'](([,_0x455b5c])=>_0x5a2aaf[_0x2ebc3f(0x1f2)](_0x455b5c)[_0x2ebc3f(0x220)][_0x2ebc3f(0x212)]()===_0x2ebc3f(0x27c))[_0x2ebc3f(0x1e6)](([,_0x236db1])=>_0x236db1);if(_0x42f99b['length'])_0x27efa2[_0x2ebc3f(0x262)]=_0x42f99b;const _0x2ef08c=_0x3639ab?resolveWorksheetImages(_0x3639ab,_0x4e68ca['name'],new Set(_0x3558ce[_0x2ebc3f(0x1e6)](([_0x57b335])=>_0x4ddd39[_0x2ebc3f(0x1f2)](_0x57b335)))):[],_0x4d6259=new Map();for(const _0x16d57b of _0x2ef08c){const _0x36c0fe=_0x16d57b[_0x2ebc3f(0x1fa)]+':'+_0x16d57b['col'],_0x268d6f=_0x4d6259[_0x2ebc3f(0x1f2)](_0x36c0fe)??[];_0x268d6f[_0x2ebc3f(0x283)](_0x16d57b),_0x4d6259[_0x2ebc3f(0x259)](_0x36c0fe,_0x268d6f);}const _0x1b573c=new Map();let _0x5b27ba=0x0;_0x3558ce[_0x2ebc3f(0x1f8)]&&(_0x27efa2[_0x2ebc3f(0x1e9)]=_0x3558ce[_0x2ebc3f(0x1e6)](([,_0x330514])=>_0x330514),_0x27efa2[_0x2ebc3f(0x2aa)]=[],_0x27efa2[_0x2ebc3f(0x29a)]=0x1,_0x27efa2[_0x2ebc3f(0x27f)]=[]);const _0x1119ad=Math[_0x2ebc3f(0x2d6)](0x0,..._0x2ef08c[_0x2ebc3f(0x1e6)](_0x16ab55=>_0x16ab55[_0x2ebc3f(0x1fa)]));let _0x360b22=0x0;const _0x107466=new Set(_0x59c053['map'](([_0x52d02d])=>_0x4ddd39[_0x2ebc3f(0x1f2)](_0x52d02d)));for(let _0x281e5c=_0xf9c08+0x1;_0x281e5c<=Math['max'](_0x4e68ca[_0x2ebc3f(0x289)],_0x1119ad);_0x281e5c++){const _0x3ea7dd=_0x4e68ca[_0x2ebc3f(0x27b)](_0x281e5c);if(_0x3ea7dd[_0x2ebc3f(0x1e5)]||_0x2ef08c[_0x2ebc3f(0x22c)](_0x11a651=>_0x11a651[_0x2ebc3f(0x1fa)]===_0x281e5c&&_0x11a651[_0x2ebc3f(0x1f9)]))_0x360b22++;let _0x5df93a=_0x2ef08c['some'](_0x30b964=>_0x30b964['row']===_0x281e5c);_0x3ea7dd[_0x2ebc3f(0x296)](_0x57fabb=>{const _0x1eb64f=_0x2ebc3f;if(_0x57fabb['value']!==null&&_0x57fabb[_0x1eb64f(0x298)]!==undefined&&_0x57fabb['value']!=='')_0x5df93a=!![];});if(!_0x5df93a){_0x27efa2[_0x2ebc3f(0x297)][_0x2ebc3f(0x283)](_0x281e5c);continue;}const _0x4bc930=Object[_0x2ebc3f(0x21b)](null);_0x3ea7dd['eachCell']((_0x385592,_0x48aea7)=>{const _0x1584f1=_0x2ebc3f;if(_0x107466[_0x1584f1(0x20d)](_0x48aea7))return;try{const _0x104676=valueOf(_0x385592);if(typeof _0x104676===_0x1584f1(0x239)&&Buffer[_0x1584f1(0x294)](_0x104676,'utf8')>MAX_CELL)throw new Error('Cell\x20exceeds\x2064\x20KB.');}catch(_0x2f5007){_0x27efa2[_0x1584f1(0x25e)][_0x1584f1(0x283)]({'rowNumber':_0x281e5c,'field':_0x385592[_0x1584f1(0x24a)],'message':_0x2f5007[_0x1584f1(0x282)]});}});for(const [_0x36ffbd,_0x455a25]of _0x59c053){try{const _0x512bdd=_0x3ea7dd[_0x2ebc3f(0x25d)](_0x4ddd39['get'](_0x36ffbd)),_0x590090=_0x5a2aaf[_0x2ebc3f(0x1f2)](_0x455a25);if(!isImageContainer(_0x590090['type'])){_0x4bc930[_0x455a25]=convert(valueOf(_0x512bdd),_0x590090);continue;}const _0x1d4f75=_0x4d6259[_0x2ebc3f(0x1f2)](_0x281e5c+':'+_0x4ddd39[_0x2ebc3f(0x1f2)](_0x36ffbd))??[];if(_0x1d4f75[_0x2ebc3f(0x22c)](_0x5c6741=>_0x5c6741[_0x2ebc3f(0x260)]))throw Error(_0x1d4f75['find'](_0x24f42f=>_0x24f42f['error'])[_0x2ebc3f(0x260)]);if(_0x512bdd[_0x2ebc3f(0x298)]!=null&&_0x512bdd[_0x2ebc3f(0x298)]!==''&&!_0x1d4f75[_0x2ebc3f(0x22c)](_0x5b6705=>_0x5b6705['nativeCell']))throw Error(_0x2ebc3f(0x2d1));const _0x20d2f7=[];for(const _0x44e03b of _0x1d4f75)for(const _0x301409 of _0x44e03b[_0x2ebc3f(0x27f)]){const _0x37b573=_0x3639ab[_0x2ebc3f(0x1f2)](_0x301409);if(!_0x37b573)throw Error('Missing\x20image\x20media:\x20'+_0x301409+'.');const _0x2af2aa=hash(_0x37b573),_0x285b12=_0x1b573c[_0x2ebc3f(0x1f2)](_0x2af2aa)??validateImageBytes(_0x37b573);if(!_0x1b573c[_0x2ebc3f(0x20d)](_0x285b12['contentHash'])){_0x5b27ba+=_0x285b12['size'];if(_0x5b27ba>0x32*0x400*0x400)throw Error(_0x2ebc3f(0x2bf));_0x1b573c[_0x2ebc3f(0x259)](_0x285b12[_0x2ebc3f(0x2a3)],_0x285b12);}_0x20d2f7[_0x2ebc3f(0x283)](_0x285b12[_0x2ebc3f(0x2a3)]);}if(!_0x20d2f7[_0x2ebc3f(0x1f8)]&&_0x590090[_0x2ebc3f(0x2dc)])throw Error(_0x2ebc3f(0x29c));if(_0x20d2f7[_0x2ebc3f(0x1f8)])_0x27efa2['imageCells'][_0x2ebc3f(0x283)]({'rowNumber':_0x281e5c,'field':_0x455a25,'hashes':_0x20d2f7});_0x4bc930[_0x455a25]=_0x20d2f7['map'](_0x326c62=>{const _0x14e450=_0x2ebc3f,_0x6ad74d=_0x1b573c[_0x14e450(0x1f2)](_0x326c62),_0x5d923a=_0x6ad74d[_0x14e450(0x220)]===_0x14e450(0x1fd)?_0x14e450(0x272):_0x6ad74d[_0x14e450(0x220)][_0x14e450(0x284)](0x6),_0x440bcc=_0x326c62+'.'+_0x5d923a,_0xeaa770=_0x14e450(0x20a)+'0'[_0x14e450(0x229)](0x40)+'/'+_0x440bcc;return _0x590090[_0x14e450(0x220)][_0x14e450(0x212)]()===_0x14e450(0x27c)?{'fileName':_0x440bcc,'filePath':_0xeaa770}:{'key':_0xeaa770,'name':_0x440bcc,'type':_0x6ad74d['type'],'size':_0x6ad74d[_0x14e450(0x27a)]};});}catch(_0xeeb780){_0x27efa2[_0x2ebc3f(0x25e)][_0x2ebc3f(0x283)]({'rowNumber':_0x281e5c,'field':_0x455a25,'message':_0xeeb780['message']});}}_0x27efa2[_0x2ebc3f(0x2a9)][_0x2ebc3f(0x283)]({'rowNumber':_0x281e5c,'values':_0x4bc930});}if(_0x27efa2['media'])_0x27efa2[_0x2ebc3f(0x27f)]=[..._0x1b573c[_0x2ebc3f(0x2bb)]()];if(_0x360b22)_0x27efa2[_0x2ebc3f(0x222)][_0x2ebc3f(0x283)](_0x360b22+_0x2ebc3f(0x2cd));return _0x27efa2;}
1
+ const a144_0x182a22=a144_0x5e9d;(function(_0x1729d2,_0x182c1e){const _0x1a4e80=a144_0x5e9d,_0x50bdc8=_0x1729d2();while(!![]){try{const _0xfd3ebb=-parseInt(_0x1a4e80(0xc6))/0x1+-parseInt(_0x1a4e80(0x14a))/0x2+parseInt(_0x1a4e80(0x10a))/0x3*(-parseInt(_0x1a4e80(0x1a6))/0x4)+parseInt(_0x1a4e80(0xcb))/0x5*(parseInt(_0x1a4e80(0x126))/0x6)+-parseInt(_0x1a4e80(0xc1))/0x7*(parseInt(_0x1a4e80(0x1b2))/0x8)+-parseInt(_0x1a4e80(0x14d))/0x9*(parseInt(_0x1a4e80(0xec))/0xa)+parseInt(_0x1a4e80(0x189))/0xb;if(_0xfd3ebb===_0x182c1e)break;else _0x50bdc8['push'](_0x50bdc8['shift']());}catch(_0x185f6){_0x50bdc8['push'](_0x50bdc8['shift']());}}}(a144_0x8f2d,0x23c30));import{readFile,stat}from'node:fs/promises';import{createHash}from'node:crypto';import a144_0x3425f4 from'node:path';import{StringDecoder}from'node:string_decoder';import{createRequire}from'node:module';import{SaxesParser}from'saxes';import a144_0x579a8e from'exceljs';import a144_0x207229 from'yauzl';import{resolveWorksheetImages}from'./image-ooxml.js';function a144_0x5e9d(_0x1c9cbd,_0xf6afc1){_0x1c9cbd=_0x1c9cbd-0xc0;const _0x8f2d60=a144_0x8f2d();let _0x5e9df3=_0x8f2d60[_0x1c9cbd];return _0x5e9df3;}import{validateImageBytes}from'./image-bytes.js';const MAX_FILE=0x14*0x400*0x400,MAX_EXPANDED=0x64*0x400*0x400,MAX_ROWS=0x186a0,MAX_COLUMNS=0x100,MAX_XML_ROWS=0x100000,MAX_XML_COLUMNS=0x4000,MAX_CELL=0x40*0x400,RESERVED=new Set(['id',a144_0x182a22(0x19e),a144_0x182a22(0x15e),a144_0x182a22(0x188),a144_0x182a22(0x17b),'creatorName',a144_0x182a22(0x1ac),a144_0x182a22(0x157),'createTime','updateTime',a144_0x182a22(0x171)]),TYPES=new Set(['string','text',a144_0x182a22(0xf2),'number',a144_0x182a22(0x13b),a144_0x182a22(0xc0),'boolean',a144_0x182a22(0x1a5),a144_0x182a22(0x141),'image',a144_0x182a22(0x185)]),isImageContainer=_0x46523b=>[a144_0x182a22(0xe4),a144_0x182a22(0x185)][a144_0x182a22(0xe5)](_0x46523b[a144_0x182a22(0x10c)]()),hash=_0x101952=>createHash('sha256')[a144_0x182a22(0x167)](_0x101952)[a144_0x182a22(0xdf)](a144_0x182a22(0x198)),require=createRequire(import.meta.url),DefinedNameXform=require(a144_0x182a22(0xf6)),nameCoordinates=require(a144_0x182a22(0x15c)),ABSOLUTE_NAME_RANGE=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/,excelRequire=createRequire(require[a144_0x182a22(0x158)](a144_0x182a22(0x1a4))),zipRequire=createRequire(excelRequire['resolve'](a144_0x182a22(0x11b))),ZipEntry=zipRequire('./zipEntry'),zipReader=zipRequire(a144_0x182a22(0x13a)),zipUtf8=zipRequire(a144_0x182a22(0x135)),zipPaths=zipRequire(a144_0x182a22(0x130));function centralDirectoryEnd(_0x48ade1,_0x28e7fb){const _0xe34a02=a144_0x182a22,_0x5ae612=()=>new Error(_0xe34a02(0x12a)),_0x486d37=_0x48ade1['lastIndexOf'](Buffer['from']([0x50,0x4b,0x5,0x6]));if(_0x486d37<0x0||_0x486d37+0x16>_0x48ade1[_0xe34a02(0xd7)]||_0x486d37+0x16+_0x48ade1[_0xe34a02(0x17a)](_0x486d37+0x14)!==_0x48ade1['length'])throw _0x5ae612();let _0x936d95=_0x48ade1[_0xe34a02(0x17a)](_0x486d37+0xa),_0x2fcaf6=_0x48ade1[_0xe34a02(0x111)](_0x486d37+0xc),_0x5dfbfb=_0x48ade1[_0xe34a02(0x111)](_0x486d37+0x10),_0x57453d=_0x486d37;const _0x2f8cac=_0x486d37-0x14,_0x205d72=_0x2f8cac>=0x0&&_0x48ade1['readUInt32LE'](_0x2f8cac)===0x7064b50,_0x16b3f5=[0x4,0x6,0x8,0xa][_0xe34a02(0x108)](_0x4ec568=>_0x48ade1['readUInt16LE'](_0x486d37+_0x4ec568)===0xffff)||_0x2fcaf6===0xffffffff||_0x5dfbfb===0xffffffff;if(_0x205d72!==_0x16b3f5)throw _0x5ae612();if(_0x205d72){if(_0x48ade1[_0xe34a02(0x105)](Buffer[_0xe34a02(0xfe)]([0x50,0x4b,0x6,0x7]))!==_0x2f8cac)throw _0x5ae612();const _0x16fb92=_0x17eb0e=>{const _0x3f1b1b=_0xe34a02,_0x4a98ba=Number(_0x48ade1[_0x3f1b1b(0xde)](_0x17eb0e));if(!Number['isSafeInteger'](_0x4a98ba))throw _0x5ae612();return _0x4a98ba;};_0x57453d=_0x16fb92(_0x2f8cac+0x8);if(_0x48ade1[_0xe34a02(0x111)](_0x2f8cac+0x4)!==0x0||_0x48ade1[_0xe34a02(0x111)](_0x2f8cac+0x10)!==0x1||_0x57453d>_0x2f8cac-0x38||_0x48ade1['readUInt32LE'](_0x57453d)!==0x6064b50||_0x16fb92(_0x57453d+0x4)!==0x2c||_0x57453d+0x38!==_0x2f8cac||_0x48ade1['readUInt32LE'](_0x57453d+0x10)!==0x0||_0x48ade1[_0xe34a02(0x111)](_0x57453d+0x14)!==0x0)throw _0x5ae612();_0x936d95=_0x16fb92(_0x57453d+0x20),_0x2fcaf6=_0x16fb92(_0x57453d+0x28),_0x5dfbfb=_0x16fb92(_0x57453d+0x30);if(_0x16fb92(_0x57453d+0x18)!==_0x936d95)throw _0x5ae612();}else{if(_0x48ade1[_0xe34a02(0x17a)](_0x486d37+0x4)!==0x0||_0x48ade1[_0xe34a02(0x17a)](_0x486d37+0x6)!==0x0||_0x48ade1[_0xe34a02(0x17a)](_0x486d37+0x8)!==_0x936d95)throw _0x5ae612();}const _0x42e5c0=_0x28e7fb[_0xe34a02(0x137)];if(_0x5dfbfb!==_0x42e5c0||_0x936d95!==_0x28e7fb[_0xe34a02(0x15b)]||_0x5dfbfb+_0x2fcaf6!==_0x57453d)throw _0x5ae612();return _0x57453d;}function consumerEntryName(_0x40b638,_0xc7b849){const _0x48e48f=a144_0x182a22;if(_0xc7b849['extraFields'][_0x48e48f(0x1aa)](_0x3dcabb=>_0x3dcabb['id']===0x1)[_0x48e48f(0xd7)]>0x1)throw new Error(_0x48e48f(0x168));const _0x54c748=_0xc7b849,_0x29bb22=_0xc7b849[_0x48e48f(0x143)];if(!Buffer['isBuffer'](_0x54c748[_0x48e48f(0x18c)])||!Buffer[_0x48e48f(0x1af)](_0x54c748[_0x48e48f(0x184)])||!Buffer[_0x48e48f(0x1af)](_0x54c748[_0x48e48f(0x181)])||!Number[_0x48e48f(0x153)](_0x29bb22)||_0x29bb22<0x0||_0x29bb22>_0x40b638[_0x48e48f(0xd7)]-0x1e||_0x40b638[_0x48e48f(0x111)](_0x29bb22)!==0x4034b50)throw new Error(_0x48e48f(0x146));const _0x5d0c6d=_0x29bb22+0x1e+_0x40b638[_0x48e48f(0x17a)](_0x29bb22+0x1a),_0x416536=_0x5d0c6d+_0x40b638[_0x48e48f(0x17a)](_0x29bb22+0x1c)+_0xc7b849['compressedSize'];if(!Number[_0x48e48f(0x153)](_0x416536)||_0x416536>_0x40b638[_0x48e48f(0xd7)])throw new Error(_0x48e48f(0x146));if(_0x5d0c6d>_0x40b638[_0x48e48f(0xd7)]||!_0x40b638[_0x48e48f(0xe7)](_0x29bb22+0x1e,_0x5d0c6d)['equals'](_0x54c748[_0x48e48f(0x18c)]))throw new Error(_0x48e48f(0xc4));const _0x47dc24=new ZipEntry({},{'decodeFileName':zipUtf8['utf8decode']});_0x47dc24[_0x48e48f(0xfb)]=_0xc7b849[_0x48e48f(0x178)],_0x47dc24[_0x48e48f(0x1b0)]=_0x54c748[_0x48e48f(0x18c)],_0x47dc24[_0x48e48f(0x1ae)]=_0x54c748[_0x48e48f(0x181)],_0x47dc24[_0x48e48f(0x11f)]=_0x54c748['extraFieldRaw'][_0x48e48f(0xd7)],_0x47dc24['readExtraFields'](zipReader(_0x54c748['extraFieldRaw'])),_0x47dc24[_0x48e48f(0x16b)](),_0x47dc24[_0x48e48f(0x190)]=_0xc7b849[_0x48e48f(0x190)],_0x47dc24[_0x48e48f(0x14e)]=_0xc7b849['externalFileAttributes'],_0x47dc24[_0x48e48f(0x103)]();const _0x50401c=_0x47dc24[_0x48e48f(0x138)]||Boolean((_0x47dc24[_0x48e48f(0x1a9)]??0x0)&0x4000),_0x3b657b=zipPaths[_0x48e48f(0x158)](_0x47dc24[_0x48e48f(0x195)]),_0x12dbf1=_0x3b657b['startsWith']('/')?_0x3b657b[_0x48e48f(0x19f)](0x1):_0x3b657b;return{'name':_0x12dbf1,'original':_0x47dc24[_0x48e48f(0x195)],'directory':_0x50401c};}export function normalizeImportFields(_0x5519ec){const _0x1286e2=a144_0x182a22;if(!_0x5519ec||(_0x5519ec['source']??_0x5519ec[_0x1286e2(0xfd)]?.['sourceType'])!==_0x1286e2(0x18f))throw new Error('Excel\x20import\x20only\x20supports\x20METADATA\x20datasets.');const _0x1e57d2=Array[_0x1286e2(0xcc)](_0x5519ec[_0x1286e2(0x1a8)]),_0x5800d8=_0x1e57d2?_0x5519ec[_0x1286e2(0x1a8)]:_0x5519ec['properties'];if(!Array[_0x1286e2(0xcc)](_0x5800d8)||_0x5800d8['length']===0x0)throw new Error(_0x1286e2(0x100));const _0x3e1474=[],_0x3b9efc=new Set();for(const _0x15bd85 of _0x5800d8){if(_0x15bd85[_0x1286e2(0x171)]===!![])continue;let _0x197600=_0x15bd85[_0x1286e2(0x175)]??{};if(!_0x1e57d2&&typeof _0x197600===_0x1286e2(0xeb)){try{_0x197600=JSON['parse'](_0x197600);}catch{throw new Error('Invalid\x20dataset\x20field\x20extension\x20metadata.');}if(!_0x197600||typeof _0x197600!==_0x1286e2(0x11e)||Array[_0x1286e2(0xcc)](_0x197600))throw new Error('Invalid\x20dataset\x20field\x20extension\x20metadata.');}const _0x17d88c=_0x1e57d2?_0x15bd85['name']:_0x15bd85[_0x1286e2(0x162)],_0x454abf=_0x1e57d2?_0x15bd85['doType']:_0x15bd85[_0x1286e2(0x173)]??_0x15bd85['dataType'];if(typeof _0x17d88c!==_0x1286e2(0xeb)||!_0x17d88c||typeof _0x454abf!==_0x1286e2(0xeb)||_0x3b9efc['has'](_0x17d88c))throw new Error(_0x1286e2(0xe1));if(_0x454abf[_0x1286e2(0x10c)]()==='serial_number')throw new Error(_0x1286e2(0xc5));_0x3b9efc[_0x1286e2(0xc2)](_0x17d88c);const _0x2a9f1c=_0x1e57d2?_0x15bd85:_0x197600,_0x375e05={'code':_0x17d88c,'type':_0x454abf,'required':_0x2a9f1c[_0x1286e2(0x13f)]===!![]};if(RESERVED[_0x1286e2(0x148)](_0x17d88c)||_0x2a9f1c[_0x1286e2(0xe3)]===!![]||_0x2a9f1c['autoIncrement']===!![])_0x375e05[_0x1286e2(0xe3)]=!![];_0x3e1474['push'](_0x375e05);}return _0x3e1474;}async function checkArchive(_0x42634c,_0x4b736f){await new Promise((_0x37798e,_0x4c37f4)=>{a144_0x207229['fromBuffer'](_0x42634c,{'lazyEntries':!![],'validateEntrySizes':!![]},(_0x71f443,_0x2feecd)=>{const _0x344b0e=a144_0x5e9d;if(_0x71f443||!_0x2feecd){_0x4c37f4(_0x71f443??new Error(_0x344b0e(0x101)));return;}let _0x49793c;try{_0x49793c=centralDirectoryEnd(_0x42634c,_0x2feecd);}catch(_0xdaf800){_0x2feecd[_0x344b0e(0x13c)](),_0x4c37f4(_0xdaf800);return;}let _0x3d1a98=0x0,_0x4ce930=0x0,_0x3a957c=0x0,_0x1f34e1=0x0,_0x207c5b=0x0,_0x33abb1=0x0,_0x392309=0x0,_0x58d65d=0x0,_0x542756=0x0,_0x3ae962=![],_0x34f66d;const _0x174b57=new Set(),_0x20fce0=_0x13ceb7=>{const _0x12d70c=_0x344b0e;if(_0x3ae962)return;_0x3ae962=!![],_0x34f66d?.['destroy'](),_0x2feecd[_0x12d70c(0x13c)](),_0x4c37f4(_0x13ceb7);},_0x425f34=(_0x440a54,_0x51c2ab)=>{const _0x1ac0a4=_0x344b0e;if(!_0x440a54||!/^\d+$/[_0x1ac0a4(0x107)](_0x440a54))throw new Error('Invalid\x20worksheet\x20coordinate.');const _0x5eef23=Number(_0x440a54);if(!Number[_0x1ac0a4(0x153)](_0x5eef23)||_0x5eef23<0x1||_0x5eef23>_0x51c2ab)throw new Error(_0x1ac0a4(0x120)+_0x51c2ab+'.');return _0x5eef23;},_0x3ce588=(_0x2acc2d,_0x3a0317=MAX_XML_COLUMNS)=>{const _0x4e9410=_0x344b0e,_0x43cae9=/^\$?([A-Z]{1,3})\$?(\d+)$/[_0x4e9410(0x196)](_0x2acc2d);if(!_0x43cae9)throw new Error(_0x4e9410(0x176));let _0x20bda4=0x0;for(const _0x532e7f of _0x43cae9[0x1])_0x20bda4=_0x20bda4*0x1a+_0x532e7f[_0x4e9410(0xff)](0x0)-0x40;if(_0x20bda4>_0x3a0317)throw new Error('Worksheet\x20exceeds\x20'+_0x3a0317+_0x4e9410(0x170));return{'row':_0x425f34(_0x43cae9[0x2],MAX_XML_ROWS),'col':_0x20bda4};},_0x33641f=_0x17b2b3=>{const _0x3bd266=_0x344b0e;if(_0x17b2b3['name']===_0x3bd266(0x15a)||_0x17b2b3[_0x3bd266(0x192)]===_0x3bd266(0x129))return;for(const _0x35fe0a of _0x17b2b3[_0x3bd266(0xef)]){if(!ABSOLUTE_NAME_RANGE[_0x3bd266(0x107)](_0x35fe0a[_0x3bd266(0x144)]('!')[_0x3bd266(0xd0)]()||''))continue;const _0x3e2add=nameCoordinates[_0x3bd266(0xfc)](_0x35fe0a),_0x2d81fa=_0x3bd266(0xd3)in _0x3e2add,_0x369422=_0x2d81fa?[_0x3e2add[_0x3bd266(0xd3)],_0x3e2add[_0x3bd266(0x102)]]:[_0x3e2add[_0x3bd266(0x193)]],_0x3b97ba=_0x2d81fa?[_0x3e2add[_0x3bd266(0x11d)],_0x3e2add[_0x3bd266(0x19b)]]:[_0x3e2add[_0x3bd266(0x163)]],_0x59b957=(_0x1e721c,_0x6d0375)=>Number[_0x3bd266(0x153)](_0x1e721c)&&_0x1e721c>=0x1&&_0x1e721c<=_0x6d0375;if(!_0x369422[_0x3bd266(0x116)](_0x39dc8b=>_0x59b957(_0x39dc8b,MAX_XML_ROWS))||!_0x3b97ba[_0x3bd266(0x116)](_0x5c6cb0=>_0x59b957(_0x5c6cb0,MAX_XML_COLUMNS)))throw new Error(_0x3bd266(0x12c));_0x392309+=_0x2d81fa?(_0x3e2add[_0x3bd266(0x102)]-_0x3e2add[_0x3bd266(0xd3)]+0x1)*(_0x3e2add[_0x3bd266(0x19b)]-_0x3e2add[_0x3bd266(0x11d)]+0x1):0x1;if(_0x392309>MAX_ROWS)throw new Error(_0x3bd266(0x13e));}};_0x2feecd['on']('error',_0x20fce0),_0x2feecd['on'](_0x344b0e(0xf8),_0x1e24c2=>{const _0x118def=_0x344b0e;if(_0x3ae962)return;if(++_0x3a957c>0x2710||(_0x3d1a98+=_0x1e24c2[_0x118def(0xe0)])>MAX_EXPANDED){_0x20fce0(new Error(_0x118def(0x124)));return;}let _0x353c4e;try{_0x353c4e=consumerEntryName(_0x42634c,_0x1e24c2);}catch(_0x77ee42){_0x20fce0(_0x77ee42);return;}if(_0x353c4e[_0x118def(0x1a1)]){_0x2feecd[_0x118def(0x125)]();return;}const _0x1f7ae1=_0x353c4e[_0x118def(0x192)];if(_0x4b736f&&(_0x1f7ae1!==_0x353c4e[_0x118def(0x17e)]||_0x174b57[_0x118def(0x148)](_0x1f7ae1)||_0x1f7ae1[_0x118def(0x11c)]('/')||_0x1f7ae1[_0x118def(0xe5)]('\x5c'))){_0x20fce0(new Error('Non-canonical\x20or\x20duplicate\x20image\x20archive\x20entry.'));return;}if(_0x1f7ae1!==_0x353c4e['original']&&(_0x1f7ae1==='xl/workbook.xml'||/xl\/worksheets\/sheet(\d+)[.]xml/['test'](_0x1f7ae1))){_0x20fce0(new Error(_0x118def(0x117)));return;}const _0x561c3d=_0x1f7ae1===_0x118def(0x194);if(_0x561c3d&&_0x174b57[_0x118def(0x148)](_0x1f7ae1)){_0x20fce0(new Error(_0x118def(0x12f)));return;}_0x174b57[_0x118def(0xc2)](_0x1f7ae1);const _0x1794c3=/xl\/worksheets\/sheet(\d+)[.]xml/[_0x118def(0x107)](_0x1f7ae1);if(_0x1794c3&&!/^xl\/worksheets\/sheet\d+[.]xml$/[_0x118def(0x107)](_0x1f7ae1)){_0x20fce0(new Error(_0x118def(0x110)));return;}_0x2feecd[_0x118def(0x179)](_0x1e24c2,(_0x4ff45e,_0x36aa5f)=>{const _0x2643f5=_0x118def;if(_0x3ae962){_0x36aa5f?.[_0x2643f5(0x152)]();return;}if(_0x4ff45e||!_0x36aa5f){_0x20fce0(_0x4ff45e??new Error(_0x2643f5(0x199)));return;}_0x34f66d=_0x36aa5f;const _0x443ed1=_0x4b736f?[]:undefined,_0x154ced=_0x4b736f&&/[.](xml|rels)$/['test'](_0x1f7ae1)?new StringDecoder(_0x2643f5(0x150)):undefined,_0x1a451e=_0x154ced?new SaxesParser({'xmlns':![]}):undefined,_0x56518a=()=>{const _0x496413=_0x2643f5;if(++_0x542756>0x1e8480)throw Error(_0x496413(0xe8));};_0x1a451e?.['on'](_0x2643f5(0x16f),()=>{const _0x4339d0=_0x2643f5;throw Error(_0x4339d0(0xe9));}),_0x1a451e?.['on']('opentag',()=>{const _0x5e28a5=_0x2643f5;_0x56518a();if(++_0x58d65d>0x7a120)throw Error(_0x5e28a5(0xe2));}),_0x1a451e?.['on'](_0x2643f5(0x115),_0x56518a),_0x1a451e?.['on'](_0x2643f5(0xd2),_0x56518a),_0x1a451e?.['on'](_0x2643f5(0xd5),_0x3ff7fc=>{throw _0x3ff7fc;});const _0x4419a8=_0x1794c3||_0x561c3d?new StringDecoder(_0x2643f5(0x150)):undefined,_0x2528c6=_0x1794c3||_0x561c3d?new SaxesParser({'xmlns':![]}):undefined;let _0x443ecc,_0x1e67e2=0x0,_0x440105=0x0,_0x387400,_0x3d2bcb,_0x57ee3c=![],_0x463f40=![],_0x49619f,_0x46f60c,_0x7fce0c,_0x49f8d4=![];const _0x34a8b5=[],_0x394e8b=new Set();let _0x257ef4;const _0x2284f9=(_0x3c93b3,_0x487c45=0x0)=>{const _0x5afe40=_0x2643f5;_0x207c5b+=_0x487c45+Math[_0x5afe40(0x12b)](0x0,_0x3c93b3-_0x440105),_0x440105=Math['max'](_0x440105,_0x3c93b3);if(_0x207c5b>MAX_ROWS)throw new Error(_0x5afe40(0x114));};_0x2528c6?.['on'](_0x2643f5(0x104),_0x1ed781=>{const _0x29f63e=_0x2643f5;if(_0x561c3d){if(!_0x443ecc&&_0x1ed781[_0x29f63e(0x192)]===_0x29f63e(0x113))_0x443ecc=new DefinedNameXform();_0x443ecc?.['parseOpen'](_0x1ed781);return;}if(_0x1ed781[_0x29f63e(0x192)]===_0x29f63e(0x193)){if(_0x463f40)throw new Error('Invalid\x20worksheet\x20nested\x20row.');_0x425f34(_0x1ed781[_0x29f63e(0x180)]['r'],MAX_XML_ROWS),_0x387400=undefined,_0x7fce0c=undefined,_0x49f8d4=![];}else{if(_0x1ed781['name']==='c'){if(_0x463f40)throw new Error('Invalid\x20worksheet\x20nested\x20cell.');_0x463f40=!![],_0x57ee3c=Boolean(Number[_0x29f63e(0x174)](_0x1ed781['attributes']['s']??'',0xa)),_0x257ef4=undefined,_0x49619f=_0x1ed781[_0x29f63e(0x180)]['r']||undefined,_0x46f60c=_0x49619f?_0x3ce588(_0x49619f):undefined;if(_0x46f60c)_0x3d2bcb=_0x46f60c;else _0x3d2bcb=_0x387400?{'row':_0x387400[_0x29f63e(0x193)],'col':_0x387400[_0x29f63e(0x163)]+0x1}:undefined;}else{if(_0x463f40&&['f','v','t']['includes'](_0x1ed781['name'])){_0x257ef4=_0x1ed781[_0x29f63e(0x192)];if(_0x1ed781['name']==='f'&&_0x1ed781[_0x29f63e(0x180)]['t'])_0x57ee3c=!![];}else{if(_0x463f40&&_0x1ed781['name']==='r')_0x57ee3c=!![];else{if(_0x1ed781['name']===_0x29f63e(0xf4)){const _0x16d5df=_0x1ed781[_0x29f63e(0x180)][_0x29f63e(0x127)];if(!_0x16d5df)throw new Error('Invalid\x20worksheet\x20hyperlink\x20reference.');const _0x41e3db=_0x16d5df[_0x29f63e(0x144)](':');if(_0x41e3db[_0x29f63e(0xd7)]>0x2)throw new Error(_0x29f63e(0x18e));const _0x34d19e=_0x3ce588(_0x41e3db[0x0]),_0x1ee9c4=_0x3ce588(_0x41e3db[0x1]??_0x41e3db[0x0]);_0x394e8b[_0x29f63e(0xc2)](_0x16d5df),_0x2284f9(Math[_0x29f63e(0x12b)](_0x34d19e['col'],_0x1ee9c4['col']),0x1);}else{if(_0x1ed781['name']===_0x29f63e(0x163)){const _0xfce66c=_0x425f34(_0x1ed781[_0x29f63e(0x180)][_0x29f63e(0xee)],0x4000),_0x174d04=_0x425f34(_0x1ed781['attributes'][_0x29f63e(0x12b)],0x4000);if(_0xfce66c>_0x174d04)throw new Error(_0x29f63e(0x1a0));_0x2284f9(_0x174d04,0x1);}else{if(_0x1ed781[_0x29f63e(0x192)]===_0x29f63e(0xea)){const _0x566794=_0x1ed781[_0x29f63e(0x180)][_0x29f63e(0x127)];if(!_0x566794)throw new Error(_0x29f63e(0x14c));const _0xc3b541=_0x566794['split'](':');if(_0xc3b541['length']>0x2)throw new Error(_0x29f63e(0x14c));const _0xbddad9=_0x3ce588(_0xc3b541[0x0]),_0xad37d4=_0x3ce588(_0xc3b541[0x1]??_0xc3b541[0x0]);_0x2284f9(Math[_0x29f63e(0x12b)](_0xbddad9[_0x29f63e(0x163)],_0xad37d4[_0x29f63e(0x163)]));const _0x4cfe22=(Math[_0x29f63e(0xdb)](_0xad37d4[_0x29f63e(0x193)]-_0xbddad9[_0x29f63e(0x193)])+0x1)*(Math[_0x29f63e(0xdb)](_0xad37d4['col']-_0xbddad9[_0x29f63e(0x163)])+0x1);_0x1f34e1+=_0x4cfe22+_0x1e67e2++;if(_0x1f34e1>MAX_ROWS)throw new Error(_0x29f63e(0x17f));}}}}}}}}),_0x2528c6?.['on']('text',_0x5a4cd0=>{const _0x1de8d9=_0x2643f5;if(_0x561c3d){_0x443ecc?.[_0x1de8d9(0x147)](_0x5a4cd0);return;}if(_0x463f40&&_0x257ef4&&_0x5a4cd0)_0x57ee3c=!![];}),_0x2528c6?.['on']('closetag',_0x17f81d=>{const _0x539c0c=_0x2643f5;if(_0x561c3d){_0x443ecc&&!_0x443ecc[_0x539c0c(0xd4)]()&&(_0x33641f(_0x443ecc[_0x539c0c(0x19a)]),_0x443ecc=undefined);return;}if(_0x17f81d[_0x539c0c(0x192)]==='c'){!_0x57ee3c&&_0x49619f&&!_0x7fce0c&&(_0x7fce0c={'before':_0x387400,'cells':[]});if(_0x7fce0c){if(++_0x33abb1>0xf4240)throw new Error(_0x539c0c(0x19c));_0x7fce0c[_0x539c0c(0x16c)][_0x539c0c(0x136)]({'reference':_0x49619f,'address':_0x46f60c,'materialized':_0x57ee3c});if(!_0x49619f&&_0x57ee3c)_0x49f8d4=!![];}if(_0x57ee3c){if(!_0x7fce0c||_0x49619f){if(!_0x3d2bcb)throw new Error('Invalid\x20worksheet\x20cell\x20without\x20an\x20initial\x20reference.');if(_0x3d2bcb[_0x539c0c(0x163)]>MAX_XML_COLUMNS)throw new Error(_0x539c0c(0xfa));_0x2284f9(_0x3d2bcb[_0x539c0c(0x163)]);}_0x387400=_0x3d2bcb;}_0x463f40=![],_0x3d2bcb=undefined,_0x49619f=undefined,_0x46f60c=undefined,_0x257ef4=undefined;}else{if(_0x17f81d[_0x539c0c(0x192)]===_0x539c0c(0x193)){if(_0x7fce0c&&_0x49f8d4)_0x34a8b5['push'](_0x7fce0c);_0x7fce0c=undefined,_0x49f8d4=![];}else{if(_0x17f81d['name']===_0x257ef4)_0x257ef4=undefined;}}}),_0x2528c6?.['on'](_0x2643f5(0xd5),_0x485c92=>{const _0x424312=_0x2643f5;throw new Error('Invalid\x20worksheet\x20XML:\x20'+_0x485c92[_0x424312(0x16a)]);}),_0x36aa5f['on']('error',_0x20fce0),_0x36aa5f['on'](_0x2643f5(0x182),_0x4622d5=>{const _0x5958e5=_0x2643f5;if(_0x3ae962)return;_0x4ce930+=_0x4622d5[_0x5958e5(0xd7)],_0x443ed1?.[_0x5958e5(0x136)](_0x4622d5);if(_0x4ce930>MAX_EXPANDED){_0x20fce0(new Error('XLSX\x20expanded\x20content\x20exceeds\x20100\x20MB.'));return;}try{if(_0x1a451e&&_0x154ced)_0x1a451e[_0x5958e5(0x10b)](_0x154ced[_0x5958e5(0x10b)](_0x4622d5));if(_0x2528c6&&_0x4419a8)_0x2528c6['write'](_0x4419a8['write'](_0x4622d5));}catch(_0x2f9620){_0x20fce0(_0x2f9620 instanceof Error?_0x2f9620:new Error('Invalid\x20worksheet\x20XML.'));}}),_0x36aa5f['on'](_0x2643f5(0x119),()=>{const _0x16ff9d=_0x2643f5;if(_0x3ae962)return;try{if(_0x1a451e&&_0x154ced)_0x1a451e[_0x16ff9d(0x10b)](_0x154ced['end']())['close']();if(_0x2528c6&&_0x4419a8)_0x2528c6[_0x16ff9d(0x10b)](_0x4419a8['end']())[_0x16ff9d(0x13c)]();for(const _0x5cd88a of _0x34a8b5){let _0x32a23f=_0x5cd88a[_0x16ff9d(0x18a)];for(const _0x411315 of _0x5cd88a['cells']){if(!_0x411315[_0x16ff9d(0x1a3)]&&!(_0x411315['reference']&&_0x394e8b[_0x16ff9d(0x148)](_0x411315[_0x16ff9d(0x109)])))continue;const _0xb6e186=_0x411315[_0x16ff9d(0x17c)]??(_0x32a23f?{'row':_0x32a23f[_0x16ff9d(0x193)],'col':_0x32a23f['col']+0x1}:undefined);if(!_0xb6e186)throw new Error('Invalid\x20worksheet\x20cell\x20without\x20an\x20initial\x20reference.');if(_0xb6e186[_0x16ff9d(0x163)]>MAX_XML_COLUMNS)throw new Error('Worksheet\x20exceeds\x2016384\x20columns.');_0x2284f9(_0xb6e186[_0x16ff9d(0x163)]),_0x32a23f=_0xb6e186;}}_0x34a8b5[_0x16ff9d(0xd7)]=0x0,_0x394e8b['clear']();}catch(_0x1d60d6){_0x20fce0(_0x1d60d6 instanceof Error?_0x1d60d6:new Error(_0x16ff9d(0xda)));return;}if(_0x443ed1)_0x4b736f[_0x16ff9d(0xf5)](_0x1f7ae1,Buffer['concat'](_0x443ed1));_0x34f66d=undefined,_0x2feecd[_0x16ff9d(0x125)]();});});}),_0x2feecd['on'](_0x344b0e(0x119),()=>{const _0x24b5a3=_0x344b0e;if(_0x3ae962)return;if(_0x2feecd[_0x24b5a3(0x137)]!==_0x49793c){_0x4c37f4(new Error(_0x24b5a3(0x10d)));return;}if(!_0x174b57[_0x24b5a3(0x148)]('[Content_Types].xml')||!_0x174b57[_0x24b5a3(0x148)]('xl/workbook.xml'))_0x4c37f4(new Error(_0x24b5a3(0xf0)));else _0x37798e();}),_0x2feecd[_0x344b0e(0x125)]();});});}function valueOf(_0x4c335f){const _0x49df75=a144_0x182a22,_0xe4462f=_0x4c335f['value'];if(_0xe4462f&&typeof _0xe4462f===_0x49df75(0x11e)&&(_0x49df75(0x151)in _0xe4462f||_0x49df75(0xf3)in _0xe4462f)){if(!(_0x49df75(0xcd)in _0xe4462f)||_0xe4462f['result']===undefined)throw new Error('Formula\x20has\x20no\x20cached\x20result.');return _0xe4462f[_0x49df75(0xcd)];}return _0xe4462f;}function convert(_0xb8efe9,_0x43e82d){const _0x24e2e3=a144_0x182a22;if(_0xb8efe9===null||_0xb8efe9===undefined||_0xb8efe9===''){if(_0x43e82d[_0x24e2e3(0x13f)]&&!_0x43e82d[_0x24e2e3(0xe3)])throw new Error(_0x24e2e3(0xf9));return null;}if(typeof _0xb8efe9===_0x24e2e3(0xeb)&&Buffer[_0x24e2e3(0x154)](_0xb8efe9,_0x24e2e3(0x150))>MAX_CELL)throw new Error(_0x24e2e3(0x133));switch(_0x43e82d[_0x24e2e3(0x173)][_0x24e2e3(0x10c)]()){case _0x24e2e3(0xeb):case'text':case'textarea':if(typeof _0xb8efe9!=='string')throw new Error(_0x24e2e3(0x10f));return _0xb8efe9;case _0x24e2e3(0x132):case _0x24e2e3(0x13b):case _0x24e2e3(0xc0):if(typeof _0xb8efe9!=='number'||!Number[_0x24e2e3(0x18d)](_0xb8efe9)||Math[_0x24e2e3(0xdb)](_0xb8efe9)>Number['MAX_SAFE_INTEGER']||_0x43e82d['type'][_0x24e2e3(0x10c)]()===_0x24e2e3(0xc0)&&!Number[_0x24e2e3(0xc8)](_0xb8efe9))throw new Error(_0x24e2e3(0x19d));return _0xb8efe9;case _0x24e2e3(0x16d):if(typeof _0xb8efe9!==_0x24e2e3(0x16d))throw new Error(_0x24e2e3(0x139));return _0xb8efe9;case _0x24e2e3(0x1a5):case'datetime':if(!(_0xb8efe9 instanceof Date)||!Number[_0x24e2e3(0x18d)](_0xb8efe9['getTime']()))throw new Error(_0x24e2e3(0x15d));return _0xb8efe9[_0x24e2e3(0xcf)]();default:throw new Error(_0x24e2e3(0x164)+_0x43e82d['type']+'.');}}function a144_0x8f2d(){const _0x572132=['Image\x20XML\x20event\x20budget\x20exceeded.','XML\x20DTD/entities\x20are\x20not\x20supported.','mergeCell','string','22010npgQEU','Headers\x20must\x20be\x20non-empty\x20text\x20cells\x20no\x20larger\x20than\x2064\x20KB.','min','ranges','File\x20is\x20not\x20an\x20XLSX\x20workbook.','nativeCell','textarea','sharedFormula','hyperlink','set','exceljs/lib/xlsx/xform/book/defined-name-xform.js','XLSX\x20file\x20exceeds\x2020\x20MB.','entry','Required\x20value\x20is\x20missing.','Worksheet\x20exceeds\x2016384\x20columns.','bitFlag','decodeEx','dataset','from','charCodeAt','Dataset\x20field\x20metadata\x20is\x20missing.','Invalid\x20XLSX\x20archive.','bottom','processAttributes','opentag','lastIndexOf','getRow','test','some','reference','10173gVLYCa','write','toLowerCase','ZIP\x20central\x20directory\x20entry\x20count\x20does\x20not\x20match\x20its\x20contents.','imageFields','Expected\x20a\x20text\x20cell.','Non-canonical\x20worksheet\x20ZIP\x20entry.','readUInt32LE','Requested\x20worksheet\x20does\x20not\x20exist.','definedName','Worksheet\x20column\x20objects\x20exceed\x20100000.','text','every','Non-canonical\x20workbook\x20or\x20worksheet\x20ZIP\x20entry.','extname','end','XLSX\x20file\x20must\x20be\x20a\x20regular\x20file\x20no\x20larger\x20than\x2020\x20MB.','jszip','startsWith','left','object','extraFieldsLength','Worksheet\x20coordinate\x20exceeds\x20','contentHash','Merged\x20cells\x20are\x20not\x20supported.','image/jpeg','XLSX\x20expanded\x20content\x20exceeds\x20100\x20MB.','readEntry','72TqvoYh','ref','dataset-import/','_xlnm.Print_Titles','Invalid\x20ZIP\x20central\x20directory\x20layout.','max','Invalid\x20defined\x20name\x20coordinate.','Workbook','Missing\x20image\x20media:\x20','Duplicate\x20workbook\x20ZIP\x20entry.','./utils','entries','number','Cell\x20exceeds\x2064\x20KB.','Duplicate\x20dataset\x20field\x20codes.','./utf8','push','readEntryCursor','dir','Expected\x20a\x20boolean\x20cell.','./reader/readerFor','decimal','close','eachCell','Workbook\x20defined\x20name\x20work\x20exceeds\x20100000.','required','map','datetime','merges','relativeOffsetOfLocalHeader','split','jpg','Invalid\x20ZIP\x20local\x20file\x20header.','parseText','has','errors','332172cAVCgX','Sheet\x20index\x20must\x20be\x20a\x20positive\x20one-based\x20integer.','Invalid\x20worksheet\x20merge\x20reference.','477TvKMyL','externalFileAttributes','hidden','utf8','formula','destroy','isSafeInteger','byteLength','batchSize','\x20hidden\x20row(s)\x20are\x20included\x20in\x20the\x20import.','modifierName','resolve','trim','_xlnm.Print_Area','entryCount','exceljs/lib/utils/col-cache.js','Expected\x20an\x20Excel\x20date\x20cell.','appCode','getCell','worksheets','media','code','col','Unsupported\x20field\x20type:\x20','get','Unknown\x20or\x20generated\x20mapping\x20field:\x20','update','Duplicate\x20ZIP64\x20extended\x20information\x20fields\x20are\x20not\x20supported.','headerRow','message','handleUTF8','cells','boolean','sheet','doctype','\x20columns.','deleted','size','type','parseInt','extend','Invalid\x20worksheet\x20cell\x20or\x20merge\x20reference.','.xlsx','generalPurposeBitFlag','openReadStream','readUInt16LE','creatorId','address','hiddenRow','original','Worksheet\x20merge\x20work\x20exceeds\x20100000.','attributes','fileCommentRaw','data','localeCompare','extraFieldRaw','upload','file','mapping','datasetId','10856615ktfhEj','before','stringify','fileNameRaw','isFinite','Invalid\x20worksheet\x20hyperlink\x20reference.','METADATA','versionMadeBy','Mapping\x20must\x20contain\x20at\x20least\x20one\x20field.','name','row','xl/workbook.xml','fileNameStr','exec','xlsx','hex','Invalid\x20XLSX\x20entry.','model','right','Worksheet\x20deferred\x20cell\x20events\x20exceed\x201000000.','Expected\x20a\x20finite\x20safe\x20numeric\x20cell.','tenantCode','slice','Invalid\x20worksheet\x20column\x20range.','directory','value','materialized','exceljs','date','172bzIdmb','batchSize\x20must\x20be\x20between\x201\x20and\x201000.','fields','unixPermissions','filter','isFile','modifierId','rows','fileComment','isBuffer','fileName','columnCount','2036408WSMvxj','create','integer','7LxBRSW','add','Duplicate\x20mapping\x20target:\x20','ZIP\x20local\x20and\x20central\x20entry\x20names\x20must\x20match.','Unsupported\x20dataset\x20field\x20type:\x20serial_number.','235058vQiBpb','values','isInteger','Unique\x20image\x20bytes\x20exceed\x2050\x20MB.','Required\x20image\x20value\x20is\x20missing.','32365AsFRRZ','isArray','result','find','getTime','pop','headerRow\x20must\x20be\x20between\x201\x20and\x20100000.','closetag','top','parseClose','error','Unknown\x20Excel\x20header:\x20','length','Duplicate\x20header:\x20','rowCount','Invalid\x20worksheet\x20XML.','abs','Worksheet\x20exceeds\x20100000\x20rows\x20or\x20256\x20columns.','Required\x20field\x20is\x20not\x20mapped:\x20','readBigUInt64LE','digest','uncompressedSize','Invalid\x20or\x20duplicate\x20dataset\x20field\x20metadata.','Image\x20XML\x20node\x20budget\x20exceeded.','generated','image','includes','parserVersion','subarray'];a144_0x8f2d=function(){return _0x572132;};return a144_0x8f2d();}export async function buildExcelManifest(_0x23e156){const _0x3acd7e=a144_0x182a22,_0x34e273=_0x23e156[_0x3acd7e(0x169)]??0x1;if(!Number[_0x3acd7e(0xc8)](_0x34e273)||_0x34e273<0x1||_0x34e273>MAX_ROWS)throw new Error(_0x3acd7e(0xd1));if(_0x23e156[_0x3acd7e(0x155)]!==undefined&&(!Number['isInteger'](_0x23e156[_0x3acd7e(0x155)])||_0x23e156['batchSize']<0x1||_0x23e156[_0x3acd7e(0x155)]>0x3e8))throw new Error(_0x3acd7e(0x1a7));if(a144_0x3425f4[_0x3acd7e(0x118)](_0x23e156['file'])[_0x3acd7e(0x10c)]()!==_0x3acd7e(0x177))throw new Error('Only\x20.xlsx\x20files\x20are\x20supported.');const _0x153647=await stat(_0x23e156[_0x3acd7e(0x186)]);if(!_0x153647[_0x3acd7e(0x1ab)]()||_0x153647['size']>MAX_FILE)throw new Error(_0x3acd7e(0x11a));const _0x1c1a84=await readFile(_0x23e156[_0x3acd7e(0x186)]);if(_0x1c1a84[_0x3acd7e(0xd7)]>MAX_FILE)throw new Error(_0x3acd7e(0xf7));const _0x3b0c2a=_0x23e156[_0x3acd7e(0x1a8)][_0x3acd7e(0x108)](_0x2cc0d9=>isImageContainer(_0x2cc0d9['type'])&&Object[_0x3acd7e(0xc7)](_0x23e156[_0x3acd7e(0x187)])[_0x3acd7e(0xe5)](_0x2cc0d9['code']))?new Map():undefined;await checkArchive(_0x1c1a84,_0x3b0c2a);const _0x507498=new a144_0x579a8e[(_0x3acd7e(0x12d))]();await _0x507498[_0x3acd7e(0x197)]['load'](_0x1c1a84,{'ignoreNodes':['dataValidations']});const _0x525f16=_0x23e156[_0x3acd7e(0x16e)];let _0x16e386;if(_0x525f16===undefined)_0x16e386=_0x507498[_0x3acd7e(0x160)][0x0];else{if(typeof _0x525f16===_0x3acd7e(0xeb)&&_0x507498[_0x3acd7e(0x160)][_0x3acd7e(0x108)](_0x18f199=>_0x18f199['name']===_0x525f16))_0x16e386=_0x507498['worksheets'][_0x3acd7e(0xce)](_0x55b1ef=>_0x55b1ef[_0x3acd7e(0x192)]===_0x525f16);else{if(typeof _0x525f16===_0x3acd7e(0x132)||/^\d+$/[_0x3acd7e(0x107)](_0x525f16)){const _0xbb05fb=Number(_0x525f16);if(!Number[_0x3acd7e(0xc8)](_0xbb05fb)||_0xbb05fb<0x1)throw new Error(_0x3acd7e(0x14b));_0x16e386=_0x507498[_0x3acd7e(0x160)][_0xbb05fb-0x1];}else _0x16e386=_0x507498['worksheets'][_0x3acd7e(0xce)](_0x3d33a3=>_0x3d33a3['name']===_0x525f16);}}if(!_0x16e386)throw new Error(_0x3acd7e(0x112));if(_0x16e386[_0x3acd7e(0xd9)]>MAX_ROWS||_0x16e386[_0x3acd7e(0x1b1)]>MAX_COLUMNS)throw new Error(_0x3acd7e(0xdc));if((_0x16e386['model'][_0x3acd7e(0x142)]??[])[_0x3acd7e(0xd7)])throw new Error(_0x3acd7e(0x122));const _0x34a369=new Map();_0x16e386[_0x3acd7e(0x106)](_0x34e273)['eachCell']((_0x46538d,_0x55ffb2)=>{const _0x4b19c1=_0x3acd7e,_0x3351bf=valueOf(_0x46538d);if(typeof _0x3351bf!==_0x4b19c1(0xeb)||!_0x3351bf[_0x4b19c1(0x159)]()||Buffer['byteLength'](_0x3351bf)>MAX_CELL)throw new Error(_0x4b19c1(0xed));if(_0x34a369[_0x4b19c1(0x148)](_0x3351bf))throw new Error(_0x4b19c1(0xd8)+_0x3351bf+'.');_0x34a369[_0x4b19c1(0xf5)](_0x3351bf,_0x55ffb2);});const _0x212054=Object[_0x3acd7e(0x131)](_0x23e156[_0x3acd7e(0x187)]);if(!_0x212054[_0x3acd7e(0xd7)])throw new Error(_0x3acd7e(0x191));const _0x1e8b58=new Map(_0x23e156[_0x3acd7e(0x1a8)]['map'](_0x39f6ec=>[_0x39f6ec[_0x3acd7e(0x162)],_0x39f6ec]));if(_0x1e8b58[_0x3acd7e(0x172)]!==_0x23e156[_0x3acd7e(0x1a8)][_0x3acd7e(0xd7)])throw new Error(_0x3acd7e(0x134));if(_0x23e156[_0x3acd7e(0x1a8)][_0x3acd7e(0x108)](_0x578602=>_0x578602['type'][_0x3acd7e(0x10c)]()==='serial_number'))throw new Error('Unsupported\x20dataset\x20field\x20type:\x20serial_number.');const _0x2512c6=new Set();for(const [_0x2be918,_0x5d3441]of _0x212054){const _0x3f9e48=_0x1e8b58[_0x3acd7e(0x165)](_0x5d3441);if(!_0x34a369[_0x3acd7e(0x148)](_0x2be918))throw new Error(_0x3acd7e(0xd6)+_0x2be918+'.');if(!_0x3f9e48||RESERVED['has'](_0x5d3441)||_0x3f9e48[_0x3acd7e(0xe3)])throw new Error(_0x3acd7e(0x166)+_0x5d3441+'.');if(_0x2512c6[_0x3acd7e(0x148)](_0x5d3441))throw new Error(_0x3acd7e(0xc3)+_0x5d3441+'.');if(!TYPES[_0x3acd7e(0x148)](_0x3f9e48[_0x3acd7e(0x173)][_0x3acd7e(0x10c)]()))throw new Error(_0x3acd7e(0x164)+_0x3f9e48['type']+'.');_0x2512c6[_0x3acd7e(0xc2)](_0x5d3441);}for(const _0x1b9482 of _0x23e156['fields']){if(_0x1b9482[_0x3acd7e(0x13f)]&&!_0x1b9482[_0x3acd7e(0xe3)]&&!RESERVED[_0x3acd7e(0x148)](_0x1b9482[_0x3acd7e(0x162)])&&!_0x2512c6[_0x3acd7e(0x148)](_0x1b9482[_0x3acd7e(0x162)]))throw new Error(_0x3acd7e(0xdd)+_0x1b9482[_0x3acd7e(0x162)]+'.');}const _0x351763={'fileHash':hash(_0x1c1a84),'mappingHash':hash(JSON['stringify']([..._0x212054]['sort'](([_0x59c64b],[_0x15fab8])=>_0x59c64b[_0x3acd7e(0x183)](_0x15fab8)))),'schemaHash':hash(JSON[_0x3acd7e(0x18b)]([..._0x23e156[_0x3acd7e(0x1a8)]]['sort']((_0x57beb2,_0x1fc3a1)=>_0x57beb2['code']['localeCompare'](_0x1fc3a1[_0x3acd7e(0x162)])))),'sheet':_0x16e386[_0x3acd7e(0x192)],'rows':[],'emptyRows':[],'errors':[],'warnings':[]},_0x109819=_0x212054[_0x3acd7e(0x1aa)](([,_0x15eead])=>isImageContainer(_0x1e8b58['get'](_0x15eead)['type'])),_0x43a3fc=_0x109819[_0x3acd7e(0x1aa)](([,_0x48338c])=>_0x1e8b58[_0x3acd7e(0x165)](_0x48338c)['type']['toLowerCase']()===_0x3acd7e(0x185))[_0x3acd7e(0x140)](([,_0x4e541b])=>_0x4e541b);if(_0x43a3fc['length'])_0x351763['uploadFields']=_0x43a3fc;const _0x43c0a3=_0x3b0c2a?resolveWorksheetImages(_0x3b0c2a,_0x16e386[_0x3acd7e(0x192)],new Set(_0x109819['map'](([_0x581114])=>_0x34a369[_0x3acd7e(0x165)](_0x581114)))):[],_0x35be11=new Map();for(const _0x4b346f of _0x43c0a3){const _0x4799e9=_0x4b346f[_0x3acd7e(0x193)]+':'+_0x4b346f[_0x3acd7e(0x163)],_0x207616=_0x35be11['get'](_0x4799e9)??[];_0x207616[_0x3acd7e(0x136)](_0x4b346f),_0x35be11[_0x3acd7e(0xf5)](_0x4799e9,_0x207616);}const _0x3717d2=new Map();let _0x3430f2=0x0;_0x109819[_0x3acd7e(0xd7)]&&(_0x351763[_0x3acd7e(0x10e)]=_0x109819['map'](([,_0x3010f3])=>_0x3010f3),_0x351763['imageCells']=[],_0x351763[_0x3acd7e(0xe6)]=0x1,_0x351763[_0x3acd7e(0x161)]=[]);const _0x5e9fda=Math['max'](0x0,..._0x43c0a3['map'](_0xd33af5=>_0xd33af5[_0x3acd7e(0x193)]));let _0x4219aa=0x0;const _0x4ca81f=new Set(_0x212054[_0x3acd7e(0x140)](([_0x4c7a02])=>_0x34a369['get'](_0x4c7a02)));for(let _0x1cbf7f=_0x34e273+0x1;_0x1cbf7f<=Math[_0x3acd7e(0x12b)](_0x16e386[_0x3acd7e(0xd9)],_0x5e9fda);_0x1cbf7f++){const _0x42c04f=_0x16e386[_0x3acd7e(0x106)](_0x1cbf7f);if(_0x42c04f[_0x3acd7e(0x14f)]||_0x43c0a3[_0x3acd7e(0x108)](_0x919bb8=>_0x919bb8[_0x3acd7e(0x193)]===_0x1cbf7f&&_0x919bb8[_0x3acd7e(0x17d)]))_0x4219aa++;let _0xd21a05=_0x43c0a3[_0x3acd7e(0x108)](_0x14c61e=>_0x14c61e[_0x3acd7e(0x193)]===_0x1cbf7f);_0x42c04f[_0x3acd7e(0x13d)](_0x2e0dcc=>{const _0x4eb3dd=_0x3acd7e;if(_0x2e0dcc[_0x4eb3dd(0x1a2)]!==null&&_0x2e0dcc[_0x4eb3dd(0x1a2)]!==undefined&&_0x2e0dcc[_0x4eb3dd(0x1a2)]!=='')_0xd21a05=!![];});if(!_0xd21a05){_0x351763['emptyRows'][_0x3acd7e(0x136)](_0x1cbf7f);continue;}const _0x4b502e=Object[_0x3acd7e(0x1b3)](null);_0x42c04f['eachCell']((_0x1e2b74,_0x1497fc)=>{const _0x394b47=_0x3acd7e;if(_0x4ca81f[_0x394b47(0x148)](_0x1497fc))return;try{const _0x240dfa=valueOf(_0x1e2b74);if(typeof _0x240dfa==='string'&&Buffer['byteLength'](_0x240dfa,_0x394b47(0x150))>MAX_CELL)throw new Error(_0x394b47(0x133));}catch(_0x49180d){_0x351763[_0x394b47(0x149)][_0x394b47(0x136)]({'rowNumber':_0x1cbf7f,'field':_0x1e2b74[_0x394b47(0x17c)],'message':_0x49180d[_0x394b47(0x16a)]});}});for(const [_0x219c02,_0x19464c]of _0x212054){try{const _0xf0f632=_0x42c04f[_0x3acd7e(0x15f)](_0x34a369[_0x3acd7e(0x165)](_0x219c02)),_0x4eb4db=_0x1e8b58[_0x3acd7e(0x165)](_0x19464c);if(!isImageContainer(_0x4eb4db['type'])){_0x4b502e[_0x19464c]=convert(valueOf(_0xf0f632),_0x4eb4db);continue;}const _0x158a53=_0x35be11['get'](_0x1cbf7f+':'+_0x34a369[_0x3acd7e(0x165)](_0x219c02))??[];if(_0x158a53[_0x3acd7e(0x108)](_0x469889=>_0x469889[_0x3acd7e(0xd5)]))throw Error(_0x158a53['find'](_0x1dc5ab=>_0x1dc5ab[_0x3acd7e(0xd5)])[_0x3acd7e(0xd5)]);if(_0xf0f632[_0x3acd7e(0x1a2)]!=null&&_0xf0f632[_0x3acd7e(0x1a2)]!==''&&!_0x158a53[_0x3acd7e(0x108)](_0x104160=>_0x104160[_0x3acd7e(0xf1)]))throw Error('Image\x20cell\x20contains\x20scalar\x20or\x20mixed\x20content.');const _0x1a27a9=[];for(const _0xf88a85 of _0x158a53)for(const _0x58df77 of _0xf88a85[_0x3acd7e(0x161)]){const _0x5b3484=_0x3b0c2a[_0x3acd7e(0x165)](_0x58df77);if(!_0x5b3484)throw Error(_0x3acd7e(0x12e)+_0x58df77+'.');const _0x19501c=hash(_0x5b3484),_0x418d77=_0x3717d2[_0x3acd7e(0x165)](_0x19501c)??validateImageBytes(_0x5b3484);if(!_0x3717d2[_0x3acd7e(0x148)](_0x418d77[_0x3acd7e(0x121)])){_0x3430f2+=_0x418d77[_0x3acd7e(0x172)];if(_0x3430f2>0x32*0x400*0x400)throw Error(_0x3acd7e(0xc9));_0x3717d2['set'](_0x418d77[_0x3acd7e(0x121)],_0x418d77);}_0x1a27a9[_0x3acd7e(0x136)](_0x418d77[_0x3acd7e(0x121)]);}if(!_0x1a27a9[_0x3acd7e(0xd7)]&&_0x4eb4db['required'])throw Error(_0x3acd7e(0xca));if(_0x1a27a9[_0x3acd7e(0xd7)])_0x351763['imageCells']['push']({'rowNumber':_0x1cbf7f,'field':_0x19464c,'hashes':_0x1a27a9});_0x4b502e[_0x19464c]=_0x1a27a9[_0x3acd7e(0x140)](_0x5eee95=>{const _0x141408=_0x3acd7e,_0x224ac3=_0x3717d2['get'](_0x5eee95),_0x5f320f=_0x224ac3['type']===_0x141408(0x123)?_0x141408(0x145):_0x224ac3['type'][_0x141408(0x19f)](0x6),_0x2c9310=_0x5eee95+'.'+_0x5f320f,_0x44f2d2=_0x141408(0x128)+'0'['repeat'](0x40)+'/'+_0x2c9310;return _0x4eb4db['type'][_0x141408(0x10c)]()===_0x141408(0x185)?{'fileName':_0x2c9310,'filePath':_0x44f2d2}:{'key':_0x44f2d2,'name':_0x2c9310,'type':_0x224ac3[_0x141408(0x173)],'size':_0x224ac3['size']};});}catch(_0x585624){_0x351763[_0x3acd7e(0x149)][_0x3acd7e(0x136)]({'rowNumber':_0x1cbf7f,'field':_0x19464c,'message':_0x585624['message']});}}_0x351763[_0x3acd7e(0x1ad)][_0x3acd7e(0x136)]({'rowNumber':_0x1cbf7f,'values':_0x4b502e});}if(_0x351763[_0x3acd7e(0x161)])_0x351763[_0x3acd7e(0x161)]=[..._0x3717d2[_0x3acd7e(0xc7)]()];if(_0x4219aa)_0x351763['warnings']['push'](_0x4219aa+_0x3acd7e(0x156));return _0x351763;}
@@ -1 +1 @@
1
- (function(_0x1ec0b6,_0x4a31f0){const _0x222352=a142_0x423b,_0x532885=_0x1ec0b6();while(!![]){try{const _0x32463e=-parseInt(_0x222352(0x10f))/0x1+parseInt(_0x222352(0x14f))/0x2*(parseInt(_0x222352(0x11f))/0x3)+-parseInt(_0x222352(0x117))/0x4*(-parseInt(_0x222352(0x14c))/0x5)+parseInt(_0x222352(0x13b))/0x6*(parseInt(_0x222352(0x123))/0x7)+-parseInt(_0x222352(0x149))/0x8*(-parseInt(_0x222352(0x111))/0x9)+-parseInt(_0x222352(0x14a))/0xa+-parseInt(_0x222352(0x115))/0xb*(parseInt(_0x222352(0x142))/0xc);if(_0x32463e===_0x4a31f0)break;else _0x532885['push'](_0x532885['shift']());}catch(_0x4f131d){_0x532885['push'](_0x532885['shift']());}}}(a142_0xed89,0xe06ff));import{createRequire}from'node:module';import{createHash}from'node:crypto';function a142_0x423b(_0x551b08,_0x3acbbf){_0x551b08=_0x551b08-0x10f;const _0xed89c7=a142_0xed89();let _0x423be7=_0xed89c7[_0x551b08];return _0x423be7;}import{inflateSync}from'node:zlib';const require=createRequire(import.meta.url),MAX_PIXELS=0x2625a00;function dimensions(_0x28c077,_0x417ad8){const _0x5ec453=a142_0x423b;if(!Number[_0x5ec453(0x132)](_0x28c077)||!Number[_0x5ec453(0x132)](_0x417ad8)||_0x28c077<0x1||_0x417ad8<0x1||_0x28c077*_0x417ad8>MAX_PIXELS)throw Error('Image\x20dimensions\x20exceed\x2040\x20million\x20pixels.');}function a142_0xed89(){const _0x29b0d1=['Invalid\x20GIF\x20block.','332647ptTbes','readUInt32BE','Invalid\x20GIF\x20LZW\x20code\x20size.','Invalid\x20PNG\x20end.','Missing\x20PNG\x20data/end.','concat','max','Truncated\x20GIF.','readUInt16LE','push','pngjs','numFrames','IDAT','toString','Invalid\x20GIF\x20trailer.','isSafeInteger','Invalid\x20PNG\x20color/depth/interlace.','decodeAndBlitFrameRGBA','Invalid\x20PNG\x20decoded\x20scanline\x20size.','Truncated\x20PNG\x20data.','GIF\x20image\x20has\x20no\x20palette.','Invalid\x20PNG\x20header.','digest','Truncated\x20PNG\x20chunk.','222oFQQGW','omggif','Truncated\x20GIF\x20data.','subarray','update','GIF87a','from','60dNYPGv','decode','ascii','hex','acTL','GIF\x20cumulative\x20frame\x20pixels\x20exceed\x2040\x20million.','Missing\x20GIF\x20trailer.','13304qqkZeL','7662570MfPOXw','frameInfo','6595zTfcaN','GIF89a','sha256','138KwlutZ','message','1370398sQtvPp','Invalid\x20GIF\x20LZW\x20dictionary\x20reference.','8037hXrlzp','image/png','width','includes','4329215zPXNNm','Truncated\x20or\x20incomplete\x20GIF\x20LZW\x20pixels.','292sHoafO','length','equals','image/jpeg','ceil','IHDR','height','IEND','73224GDqwDI','Unsupported\x20image\x20format;\x20only\x20PNG,\x20JPEG\x20and\x20GIF\x20are\x20supported.\x20WebP\x20is\x20not\x20supported.','read'];a142_0xed89=function(){return _0x29b0d1;};return a142_0xed89();}function validateGif(_0x20a341){const _0x2ee6cb=a142_0x423b;let _0x1a360b=0xd,_0x57da15=0x0,_0x5e9788=0x0;const _0x1664c3=_0x20a341[_0x2ee6cb(0x12b)](0x6),_0x300c94=_0x20a341[_0x2ee6cb(0x12b)](0x8),_0x54801c=_0x20a341[0xa]&0x80?0x1<<(_0x20a341[0xa]&0x7)+0x1:0x0,_0x5c6566=_0x168d2d=>{const _0x22e0ee=_0x2ee6cb;if(_0x1a360b+_0x168d2d>_0x20a341[_0x22e0ee(0x118)])throw Error(_0x22e0ee(0x13d));};_0x1a360b+=_0x54801c*0x3,_0x5c6566(0x0);const _0x234e90=()=>{const _0x15257d=_0x2ee6cb,_0x33a102=[];while(!![]){_0x5c6566(0x1);const _0xae94aa=_0x20a341[_0x1a360b++];if(!_0xae94aa)break;_0x5c6566(_0xae94aa),_0x33a102[_0x15257d(0x12c)](_0x20a341[_0x15257d(0x13e)](_0x1a360b,_0x1a360b+_0xae94aa)),_0x1a360b+=_0xae94aa;}return Buffer[_0x15257d(0x128)](_0x33a102);};while(_0x1a360b<_0x20a341[_0x2ee6cb(0x118)]){const _0x57c1cc=_0x20a341[_0x1a360b++];if(_0x57c1cc===0x3b){if(!_0x57da15||_0x1a360b!==_0x20a341[_0x2ee6cb(0x118)])throw Error(_0x2ee6cb(0x131));return;}if(_0x57c1cc===0x21){_0x5c6566(0x1),_0x1a360b++,_0x234e90();continue;}if(_0x57c1cc!==0x2c)throw Error(_0x2ee6cb(0x122));_0x5c6566(0x9);const _0x4853d4=_0x20a341[_0x2ee6cb(0x12b)](_0x1a360b),_0x3a5c32=_0x20a341[_0x2ee6cb(0x12b)](_0x1a360b+0x2),_0x11a3e1=_0x20a341[_0x2ee6cb(0x12b)](_0x1a360b+0x4),_0x30d2ef=_0x20a341[_0x2ee6cb(0x12b)](_0x1a360b+0x6),_0x1180a3=_0x20a341[_0x1a360b+0x8];_0x1a360b+=0x9,dimensions(_0x11a3e1,_0x30d2ef);if(_0x4853d4+_0x11a3e1>_0x1664c3||_0x3a5c32+_0x30d2ef>_0x300c94||++_0x57da15>0x2710||(_0x5e9788+=_0x1664c3*_0x300c94)>MAX_PIXELS)throw Error(_0x2ee6cb(0x147));const _0x56e452=_0x1180a3&0x80?0x1<<(_0x1180a3&0x7)+0x1:_0x54801c;if(!_0x56e452)throw Error(_0x2ee6cb(0x137));_0x1180a3&0x80&&(_0x5c6566(_0x56e452*0x3),_0x1a360b+=_0x56e452*0x3);_0x5c6566(0x1);const _0x336985=_0x20a341[_0x1a360b++];if(_0x336985<0x2||_0x336985>0x8)throw Error(_0x2ee6cb(0x125));const _0x48a205=_0x234e90(),_0x5a46dd=0x1<<_0x336985,_0x5eaea4=_0x5a46dd+0x1;let _0x2d79b8=_0x336985+0x1,_0x378f7e=_0x5eaea4+0x1,_0x2b7098=0x0,_0x525475=-0x1,_0x4cd6ef=0x0,_0xa426f0=![];const _0x3b09c5=new Uint32Array(0x1000),_0x2364c1=new Uint16Array(0x1000);for(let _0x434c33=0x0;_0x434c33<_0x5a46dd;_0x434c33++){_0x3b09c5[_0x434c33]=0x1,_0x2364c1[_0x434c33]=_0x434c33;}while(_0x2b7098+_0x2d79b8<=_0x48a205[_0x2ee6cb(0x118)]*0x8){let _0x571740=0x0;for(let _0x55d757=0x0;_0x55d757<_0x2d79b8;_0x55d757++,_0x2b7098++)_0x571740|=(_0x48a205[_0x2b7098>>0x3]>>(_0x2b7098&0x7)&0x1)<<_0x55d757;if(_0x571740===_0x5a46dd){_0x2d79b8=_0x336985+0x1,_0x378f7e=_0x5eaea4+0x1,_0x525475=-0x1;continue;}if(_0x571740===_0x5eaea4){_0xa426f0=!![];break;}if(_0x571740>_0x378f7e||_0x571740===_0x378f7e&&_0x525475<0x0||_0x525475<0x0&&_0x571740>=_0x5a46dd)throw Error(_0x2ee6cb(0x110));const _0x7fd2fe=_0x571740===_0x378f7e?_0x3b09c5[_0x525475]+0x1:_0x3b09c5[_0x571740],_0x21d14e=_0x571740===_0x378f7e?_0x2364c1[_0x525475]:_0x2364c1[_0x571740];if(!_0x7fd2fe||_0x21d14e>=_0x56e452||(_0x4cd6ef+=_0x7fd2fe)>_0x11a3e1*_0x30d2ef)throw Error('Invalid\x20GIF\x20LZW\x20pixel\x20data.');if(_0x525475>=0x0&&_0x378f7e<0x1000){_0x3b09c5[_0x378f7e]=_0x3b09c5[_0x525475]+0x1,_0x2364c1[_0x378f7e]=Math[_0x2ee6cb(0x129)](_0x2364c1[_0x525475],_0x21d14e),_0x378f7e++;if(_0x378f7e===0x1<<_0x2d79b8&&_0x2d79b8<0xc)_0x2d79b8++;}_0x525475=_0x571740;}if(!_0xa426f0||_0x4cd6ef!==_0x11a3e1*_0x30d2ef)throw Error(_0x2ee6cb(0x116));}throw Error(_0x2ee6cb(0x148));}export function validateImageBytes(_0x60987e){const _0x2c493c=a142_0x423b;if(!_0x60987e[_0x2c493c(0x118)]||_0x60987e[_0x2c493c(0x118)]>0xa*0x400*0x400)throw Error('Image\x20must\x20be\x20non-empty\x20and\x20no\x20larger\x20than\x2010\x20MB.');let _0x27e8c9;try{if(_0x60987e[_0x2c493c(0x13e)](0x0,0x8)[_0x2c493c(0x119)](Buffer[_0x2c493c(0x141)]([0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa]))){if(_0x60987e['length']<0x21||_0x60987e['toString']('ascii',0xc,0x10)!==_0x2c493c(0x11c))throw Error(_0x2c493c(0x138));dimensions(_0x60987e[_0x2c493c(0x124)](0x10),_0x60987e['readUInt32BE'](0x14));const _0x4e1bc5=_0x60987e[_0x2c493c(0x124)](0x10),_0x14ea91=_0x60987e[_0x2c493c(0x124)](0x14),_0x3b9087=_0x60987e[0x18],_0x1f1c9f=_0x60987e[0x19],_0x3bddb7=_0x60987e[0x1c],_0x10f91f={0x0:0x1,0x2:0x3,0x3:0x1,0x4:0x2,0x6:0x4}[_0x1f1c9f];if(!_0x10f91f||![0x1,0x2,0x4,0x8,0x10][_0x2c493c(0x114)](_0x3b9087)||_0x3bddb7>0x1)throw Error(_0x2c493c(0x133));const _0x269b7d=_0x33e3ed=>Math[_0x2c493c(0x11b)](_0x33e3ed*_0x10f91f*_0x3b9087/0x8)+0x1;let _0x323bba=_0x269b7d(_0x4e1bc5)*_0x14ea91;if(_0x3bddb7){_0x323bba=0x0;for(const [_0x51db7a,_0x50660d,_0x36ea34,_0x2801a5]of[[0x0,0x0,0x8,0x8],[0x4,0x0,0x8,0x8],[0x0,0x4,0x4,0x8],[0x2,0x0,0x4,0x4],[0x0,0x2,0x2,0x4],[0x1,0x0,0x2,0x2],[0x0,0x1,0x1,0x2]]){const _0x46d4d2=Math[_0x2c493c(0x129)](0x0,Math[_0x2c493c(0x11b)]((_0x4e1bc5-_0x51db7a)/_0x36ea34)),_0x22c498=Math[_0x2c493c(0x129)](0x0,Math[_0x2c493c(0x11b)]((_0x14ea91-_0x50660d)/_0x2801a5));if(_0x46d4d2&&_0x22c498)_0x323bba+=_0x269b7d(_0x46d4d2)*_0x22c498;}}let _0x49d7c3=0x8,_0x59d38d=![];const _0x2578ff=[];while(_0x49d7c3<_0x60987e[_0x2c493c(0x118)]){if(_0x49d7c3+0xc>_0x60987e[_0x2c493c(0x118)])throw Error(_0x2c493c(0x13a));const _0x3a7072=_0x60987e['readUInt32BE'](_0x49d7c3),_0x43ed16=_0x60987e[_0x2c493c(0x130)]('ascii',_0x49d7c3+0x4,_0x49d7c3+0x8);if(_0x43ed16===_0x2c493c(0x146))throw Error('Animated\x20PNG\x20is\x20not\x20supported.');if(_0x49d7c3+_0x3a7072+0xc>_0x60987e[_0x2c493c(0x118)])throw Error(_0x2c493c(0x136));if(_0x43ed16===_0x2c493c(0x12f))_0x2578ff[_0x2c493c(0x12c)](_0x60987e[_0x2c493c(0x13e)](_0x49d7c3+0x8,_0x49d7c3+0x8+_0x3a7072));_0x49d7c3+=_0x3a7072+0xc;if(_0x43ed16===_0x2c493c(0x11e)){if(_0x3a7072||_0x49d7c3!==_0x60987e[_0x2c493c(0x118)])throw Error(_0x2c493c(0x126));_0x59d38d=!![];break;}}if(!_0x59d38d||!_0x2578ff[_0x2c493c(0x118)])throw Error(_0x2c493c(0x127));if(inflateSync(Buffer[_0x2c493c(0x128)](_0x2578ff),{'maxOutputLength':_0x323bba+0x1})[_0x2c493c(0x118)]!==_0x323bba)throw Error(_0x2c493c(0x135));const {PNG:_0x44bc30}=require(_0x2c493c(0x12d)),_0x230aaf=_0x44bc30['sync'][_0x2c493c(0x121)](_0x60987e,{'checkCRC':!![]});dimensions(_0x230aaf['width'],_0x230aaf[_0x2c493c(0x11d)]),_0x27e8c9=_0x2c493c(0x112);}else{if(_0x60987e[0x0]===0xff&&_0x60987e[0x1]===0xd8){if(_0x60987e['at'](-0x2)!==0xff||_0x60987e['at'](-0x1)!==0xd9)throw Error('Truncated\x20JPEG.');const _0x1b08dd=require('jpeg-js'),_0x2d3a04=_0x1b08dd[_0x2c493c(0x143)](_0x60987e,{'useTArray':!![],'formatAsRGBA':![],'tolerantDecoding':![],'maxResolutionInMP':0x28,'maxMemoryUsageInMB':0x100});dimensions(_0x2d3a04[_0x2c493c(0x113)],_0x2d3a04[_0x2c493c(0x11d)]),_0x27e8c9=_0x2c493c(0x11a);}else{if([_0x2c493c(0x140),_0x2c493c(0x14d)]['includes'](_0x60987e['toString'](_0x2c493c(0x144),0x0,0x6))){if(_0x60987e[_0x2c493c(0x118)]<0xe||_0x60987e['at'](-0x1)!==0x3b)throw Error(_0x2c493c(0x12a));dimensions(_0x60987e['readUInt16LE'](0x6),_0x60987e[_0x2c493c(0x12b)](0x8)),validateGif(_0x60987e);const {GifReader:_0x2bc4fd}=require(_0x2c493c(0x13c)),_0x495147=new _0x2bc4fd(_0x60987e);dimensions(_0x495147['width'],_0x495147[_0x2c493c(0x11d)]);const _0x196b68=_0x495147[_0x2c493c(0x12e)]();if(!_0x196b68||_0x196b68>0x2710||_0x196b68*_0x495147['width']*_0x495147['height']>MAX_PIXELS)throw Error(_0x2c493c(0x147));const _0x4198eb=new Uint8Array(_0x495147['width']*_0x495147['height']*0x4);for(let _0x51dcb3=0x0;_0x51dcb3<_0x196b68;_0x51dcb3++){const _0x1dda44=_0x495147[_0x2c493c(0x14b)](_0x51dcb3);if(_0x1dda44['x']+_0x1dda44[_0x2c493c(0x113)]>_0x495147[_0x2c493c(0x113)]||_0x1dda44['y']+_0x1dda44[_0x2c493c(0x11d)]>_0x495147[_0x2c493c(0x11d)])throw Error('GIF\x20frame\x20exceeds\x20canvas.');_0x495147[_0x2c493c(0x134)](_0x51dcb3,_0x4198eb);}_0x27e8c9='image/gif';}else throw Error(_0x2c493c(0x120));}}}catch(_0x505077){throw Error('Invalid\x20image:\x20'+_0x505077[_0x2c493c(0x150)]);}return{'contentHash':createHash(_0x2c493c(0x14e))[_0x2c493c(0x13f)](_0x60987e)[_0x2c493c(0x139)](_0x2c493c(0x145)),'type':_0x27e8c9,'size':_0x60987e[_0x2c493c(0x118)],'bytes':_0x60987e};}
1
+ function a145_0xf6db(_0x2cacbc,_0x498b7e){_0x2cacbc=_0x2cacbc-0x87;const _0x54a7db=a145_0x54a7();let _0xf6db04=_0x54a7db[_0x2cacbc];return _0xf6db04;}(function(_0x5466db,_0x163456){const _0x50c3c7=a145_0xf6db,_0xbc9d8f=_0x5466db();while(!![]){try{const _0x34c15b=parseInt(_0x50c3c7(0xb8))/0x1*(parseInt(_0x50c3c7(0xaf))/0x2)+parseInt(_0x50c3c7(0xb7))/0x3+parseInt(_0x50c3c7(0x8c))/0x4+-parseInt(_0x50c3c7(0xb9))/0x5*(parseInt(_0x50c3c7(0x8b))/0x6)+parseInt(_0x50c3c7(0xa8))/0x7*(-parseInt(_0x50c3c7(0xc2))/0x8)+parseInt(_0x50c3c7(0x98))/0x9+-parseInt(_0x50c3c7(0x8f))/0xa;if(_0x34c15b===_0x163456)break;else _0xbc9d8f['push'](_0xbc9d8f['shift']());}catch(_0x407db9){_0xbc9d8f['push'](_0xbc9d8f['shift']());}}}(a145_0x54a7,0x753a6));import{createRequire}from'node:module';import{createHash}from'node:crypto';import{inflateSync}from'node:zlib';const require=createRequire(import.meta.url),MAX_PIXELS=0x2625a00;function a145_0x54a7(){const _0x419a6d=['Image\x20must\x20be\x20non-empty\x20and\x20no\x20larger\x20than\x2010\x20MB.','message','7779789yrslYa','Invalid\x20GIF\x20trailer.','decode','Invalid\x20PNG\x20color/depth/interlace.','isSafeInteger','image/gif','Invalid\x20image:\x20','hex','Invalid\x20PNG\x20end.','Invalid\x20GIF\x20block.','includes','toString','Invalid\x20GIF\x20LZW\x20code\x20size.','readUInt16LE','ascii','IEND','395143GSmHuK','update','IDAT','Invalid\x20PNG\x20header.','omggif','Animated\x20PNG\x20is\x20not\x20supported.','GIF\x20frame\x20exceeds\x20canvas.','81820zmnDkt','pngjs','Truncated\x20PNG\x20data.','frameInfo','Invalid\x20PNG\x20decoded\x20scanline\x20size.','equals','height','acTL','1949151VcfxFz','11kDwXLK','65ThhZZV','width','GIF89a','Truncated\x20JPEG.','subarray','sync','Missing\x20PNG\x20data/end.','length','Missing\x20GIF\x20trailer.','88KSACrl','readUInt32BE','Truncated\x20PNG\x20chunk.','concat','jpeg-js','309300lHDjVm','3146456McLzDt','image/jpeg','from','9795070TyKKbD','Unsupported\x20image\x20format;\x20only\x20PNG,\x20JPEG\x20and\x20GIF\x20are\x20supported.\x20WebP\x20is\x20not\x20supported.','GIF87a','Truncated\x20or\x20incomplete\x20GIF\x20LZW\x20pixels.','max','Invalid\x20GIF\x20LZW\x20pixel\x20data.','ceil'];a145_0x54a7=function(){return _0x419a6d;};return a145_0x54a7();}function dimensions(_0x492466,_0xdf23f7){const _0x586cc6=a145_0xf6db;if(!Number[_0x586cc6(0x9c)](_0x492466)||!Number[_0x586cc6(0x9c)](_0xdf23f7)||_0x492466<0x1||_0xdf23f7<0x1||_0x492466*_0xdf23f7>MAX_PIXELS)throw Error('Image\x20dimensions\x20exceed\x2040\x20million\x20pixels.');}function validateGif(_0x4fc75d){const _0x19d38a=a145_0xf6db;let _0x3c2e7e=0xd,_0x1f4a4d=0x0,_0x4ac6f8=0x0;const _0x1b3447=_0x4fc75d['readUInt16LE'](0x6),_0x1fafb4=_0x4fc75d[_0x19d38a(0xa5)](0x8),_0x397f4d=_0x4fc75d[0xa]&0x80?0x1<<(_0x4fc75d[0xa]&0x7)+0x1:0x0,_0x226b06=_0x5ae2d9=>{if(_0x3c2e7e+_0x5ae2d9>_0x4fc75d['length'])throw Error('Truncated\x20GIF\x20data.');};_0x3c2e7e+=_0x397f4d*0x3,_0x226b06(0x0);const _0x2d5026=()=>{const _0x11df6b=_0x19d38a,_0x59db24=[];while(!![]){_0x226b06(0x1);const _0x9eabb4=_0x4fc75d[_0x3c2e7e++];if(!_0x9eabb4)break;_0x226b06(_0x9eabb4),_0x59db24['push'](_0x4fc75d[_0x11df6b(0xbd)](_0x3c2e7e,_0x3c2e7e+_0x9eabb4)),_0x3c2e7e+=_0x9eabb4;}return Buffer[_0x11df6b(0x89)](_0x59db24);};while(_0x3c2e7e<_0x4fc75d[_0x19d38a(0xc0)]){const _0x515dfa=_0x4fc75d[_0x3c2e7e++];if(_0x515dfa===0x3b){if(!_0x1f4a4d||_0x3c2e7e!==_0x4fc75d[_0x19d38a(0xc0)])throw Error(_0x19d38a(0x99));return;}if(_0x515dfa===0x21){_0x226b06(0x1),_0x3c2e7e++,_0x2d5026();continue;}if(_0x515dfa!==0x2c)throw Error(_0x19d38a(0xa1));_0x226b06(0x9);const _0x4b9ca1=_0x4fc75d[_0x19d38a(0xa5)](_0x3c2e7e),_0x4f8471=_0x4fc75d[_0x19d38a(0xa5)](_0x3c2e7e+0x2),_0x4c887b=_0x4fc75d[_0x19d38a(0xa5)](_0x3c2e7e+0x4),_0x936800=_0x4fc75d[_0x19d38a(0xa5)](_0x3c2e7e+0x6),_0x363303=_0x4fc75d[_0x3c2e7e+0x8];_0x3c2e7e+=0x9,dimensions(_0x4c887b,_0x936800);if(_0x4b9ca1+_0x4c887b>_0x1b3447||_0x4f8471+_0x936800>_0x1fafb4||++_0x1f4a4d>0x2710||(_0x4ac6f8+=_0x1b3447*_0x1fafb4)>MAX_PIXELS)throw Error('GIF\x20cumulative\x20frame\x20pixels\x20exceed\x2040\x20million.');const _0x48993b=_0x363303&0x80?0x1<<(_0x363303&0x7)+0x1:_0x397f4d;if(!_0x48993b)throw Error('GIF\x20image\x20has\x20no\x20palette.');_0x363303&0x80&&(_0x226b06(_0x48993b*0x3),_0x3c2e7e+=_0x48993b*0x3);_0x226b06(0x1);const _0x2bf8e1=_0x4fc75d[_0x3c2e7e++];if(_0x2bf8e1<0x2||_0x2bf8e1>0x8)throw Error(_0x19d38a(0xa4));const _0x194ec5=_0x2d5026(),_0xea3e5c=0x1<<_0x2bf8e1,_0x556a29=_0xea3e5c+0x1;let _0x427c3e=_0x2bf8e1+0x1,_0x38a3a7=_0x556a29+0x1,_0x255810=0x0,_0x495068=-0x1,_0x30c946=0x0,_0x5c36aa=![];const _0x30339c=new Uint32Array(0x1000),_0x4393f5=new Uint16Array(0x1000);for(let _0x1888d1=0x0;_0x1888d1<_0xea3e5c;_0x1888d1++){_0x30339c[_0x1888d1]=0x1,_0x4393f5[_0x1888d1]=_0x1888d1;}while(_0x255810+_0x427c3e<=_0x194ec5[_0x19d38a(0xc0)]*0x8){let _0x12c849=0x0;for(let _0x1d20a6=0x0;_0x1d20a6<_0x427c3e;_0x1d20a6++,_0x255810++)_0x12c849|=(_0x194ec5[_0x255810>>0x3]>>(_0x255810&0x7)&0x1)<<_0x1d20a6;if(_0x12c849===_0xea3e5c){_0x427c3e=_0x2bf8e1+0x1,_0x38a3a7=_0x556a29+0x1,_0x495068=-0x1;continue;}if(_0x12c849===_0x556a29){_0x5c36aa=!![];break;}if(_0x12c849>_0x38a3a7||_0x12c849===_0x38a3a7&&_0x495068<0x0||_0x495068<0x0&&_0x12c849>=_0xea3e5c)throw Error('Invalid\x20GIF\x20LZW\x20dictionary\x20reference.');const _0x1ec8ff=_0x12c849===_0x38a3a7?_0x30339c[_0x495068]+0x1:_0x30339c[_0x12c849],_0x457710=_0x12c849===_0x38a3a7?_0x4393f5[_0x495068]:_0x4393f5[_0x12c849];if(!_0x1ec8ff||_0x457710>=_0x48993b||(_0x30c946+=_0x1ec8ff)>_0x4c887b*_0x936800)throw Error(_0x19d38a(0x94));if(_0x495068>=0x0&&_0x38a3a7<0x1000){_0x30339c[_0x38a3a7]=_0x30339c[_0x495068]+0x1,_0x4393f5[_0x38a3a7]=Math[_0x19d38a(0x93)](_0x4393f5[_0x495068],_0x457710),_0x38a3a7++;if(_0x38a3a7===0x1<<_0x427c3e&&_0x427c3e<0xc)_0x427c3e++;}_0x495068=_0x12c849;}if(!_0x5c36aa||_0x30c946!==_0x4c887b*_0x936800)throw Error(_0x19d38a(0x92));}throw Error(_0x19d38a(0xc1));}export function validateImageBytes(_0x21d733){const _0x139d51=a145_0xf6db;if(!_0x21d733[_0x139d51(0xc0)]||_0x21d733[_0x139d51(0xc0)]>0xa*0x400*0x400)throw Error(_0x139d51(0x96));let _0x3b97c7;try{if(_0x21d733['subarray'](0x0,0x8)[_0x139d51(0xb4)](Buffer[_0x139d51(0x8e)]([0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa]))){if(_0x21d733[_0x139d51(0xc0)]<0x21||_0x21d733[_0x139d51(0xa3)]('ascii',0xc,0x10)!=='IHDR')throw Error(_0x139d51(0xab));dimensions(_0x21d733['readUInt32BE'](0x10),_0x21d733[_0x139d51(0x87)](0x14));const _0x5f1807=_0x21d733[_0x139d51(0x87)](0x10),_0x1e7950=_0x21d733[_0x139d51(0x87)](0x14),_0x3b9a6e=_0x21d733[0x18],_0x5894e5=_0x21d733[0x19],_0x50fd8c=_0x21d733[0x1c],_0x596cb6={0x0:0x1,0x2:0x3,0x3:0x1,0x4:0x2,0x6:0x4}[_0x5894e5];if(!_0x596cb6||![0x1,0x2,0x4,0x8,0x10][_0x139d51(0xa2)](_0x3b9a6e)||_0x50fd8c>0x1)throw Error(_0x139d51(0x9b));const _0x22213d=_0x3ddd9a=>Math[_0x139d51(0x95)](_0x3ddd9a*_0x596cb6*_0x3b9a6e/0x8)+0x1;let _0x377471=_0x22213d(_0x5f1807)*_0x1e7950;if(_0x50fd8c){_0x377471=0x0;for(const [_0x264478,_0x241687,_0x3a447a,_0x1758ce]of[[0x0,0x0,0x8,0x8],[0x4,0x0,0x8,0x8],[0x0,0x4,0x4,0x8],[0x2,0x0,0x4,0x4],[0x0,0x2,0x2,0x4],[0x1,0x0,0x2,0x2],[0x0,0x1,0x1,0x2]]){const _0x1fd6d0=Math[_0x139d51(0x93)](0x0,Math[_0x139d51(0x95)]((_0x5f1807-_0x264478)/_0x3a447a)),_0x3febe1=Math['max'](0x0,Math[_0x139d51(0x95)]((_0x1e7950-_0x241687)/_0x1758ce));if(_0x1fd6d0&&_0x3febe1)_0x377471+=_0x22213d(_0x1fd6d0)*_0x3febe1;}}let _0x3bf85e=0x8,_0x36d7b6=![];const _0x5a2d34=[];while(_0x3bf85e<_0x21d733[_0x139d51(0xc0)]){if(_0x3bf85e+0xc>_0x21d733[_0x139d51(0xc0)])throw Error(_0x139d51(0x88));const _0x5383c0=_0x21d733[_0x139d51(0x87)](_0x3bf85e),_0x201d37=_0x21d733[_0x139d51(0xa3)](_0x139d51(0xa6),_0x3bf85e+0x4,_0x3bf85e+0x8);if(_0x201d37===_0x139d51(0xb6))throw Error(_0x139d51(0xad));if(_0x3bf85e+_0x5383c0+0xc>_0x21d733['length'])throw Error(_0x139d51(0xb1));if(_0x201d37===_0x139d51(0xaa))_0x5a2d34['push'](_0x21d733[_0x139d51(0xbd)](_0x3bf85e+0x8,_0x3bf85e+0x8+_0x5383c0));_0x3bf85e+=_0x5383c0+0xc;if(_0x201d37===_0x139d51(0xa7)){if(_0x5383c0||_0x3bf85e!==_0x21d733[_0x139d51(0xc0)])throw Error(_0x139d51(0xa0));_0x36d7b6=!![];break;}}if(!_0x36d7b6||!_0x5a2d34[_0x139d51(0xc0)])throw Error(_0x139d51(0xbf));if(inflateSync(Buffer[_0x139d51(0x89)](_0x5a2d34),{'maxOutputLength':_0x377471+0x1})['length']!==_0x377471)throw Error(_0x139d51(0xb3));const {PNG:_0x38da8e}=require(_0x139d51(0xb0)),_0xa96440=_0x38da8e[_0x139d51(0xbe)]['read'](_0x21d733,{'checkCRC':!![]});dimensions(_0xa96440['width'],_0xa96440[_0x139d51(0xb5)]),_0x3b97c7='image/png';}else{if(_0x21d733[0x0]===0xff&&_0x21d733[0x1]===0xd8){if(_0x21d733['at'](-0x2)!==0xff||_0x21d733['at'](-0x1)!==0xd9)throw Error(_0x139d51(0xbc));const _0x45f26b=require(_0x139d51(0x8a)),_0x340376=_0x45f26b[_0x139d51(0x9a)](_0x21d733,{'useTArray':!![],'formatAsRGBA':![],'tolerantDecoding':![],'maxResolutionInMP':0x28,'maxMemoryUsageInMB':0x100});dimensions(_0x340376[_0x139d51(0xba)],_0x340376['height']),_0x3b97c7=_0x139d51(0x8d);}else{if([_0x139d51(0x91),_0x139d51(0xbb)][_0x139d51(0xa2)](_0x21d733[_0x139d51(0xa3)](_0x139d51(0xa6),0x0,0x6))){if(_0x21d733[_0x139d51(0xc0)]<0xe||_0x21d733['at'](-0x1)!==0x3b)throw Error('Truncated\x20GIF.');dimensions(_0x21d733[_0x139d51(0xa5)](0x6),_0x21d733['readUInt16LE'](0x8)),validateGif(_0x21d733);const {GifReader:_0x11008c}=require(_0x139d51(0xac)),_0x1f9174=new _0x11008c(_0x21d733);dimensions(_0x1f9174[_0x139d51(0xba)],_0x1f9174['height']);const _0x34477f=_0x1f9174['numFrames']();if(!_0x34477f||_0x34477f>0x2710||_0x34477f*_0x1f9174['width']*_0x1f9174[_0x139d51(0xb5)]>MAX_PIXELS)throw Error('GIF\x20cumulative\x20frame\x20pixels\x20exceed\x2040\x20million.');const _0xdd3500=new Uint8Array(_0x1f9174[_0x139d51(0xba)]*_0x1f9174[_0x139d51(0xb5)]*0x4);for(let _0x941957=0x0;_0x941957<_0x34477f;_0x941957++){const _0x52f1f5=_0x1f9174[_0x139d51(0xb2)](_0x941957);if(_0x52f1f5['x']+_0x52f1f5[_0x139d51(0xba)]>_0x1f9174[_0x139d51(0xba)]||_0x52f1f5['y']+_0x52f1f5[_0x139d51(0xb5)]>_0x1f9174['height'])throw Error(_0x139d51(0xae));_0x1f9174['decodeAndBlitFrameRGBA'](_0x941957,_0xdd3500);}_0x3b97c7=_0x139d51(0x9d);}else throw Error(_0x139d51(0x90));}}}catch(_0x89c8d5){throw Error(_0x139d51(0x9e)+_0x89c8d5[_0x139d51(0x97)]);}return{'contentHash':createHash('sha256')[_0x139d51(0xa9)](_0x21d733)['digest'](_0x139d51(0x9f)),'type':_0x3b97c7,'size':_0x21d733[_0x139d51(0xc0)],'bytes':_0x21d733};}
@@ -1 +1 @@
1
- function a143_0x5881(){const _0x54a6c5=['XLRICHVALUE','Image\x20anchor\x20has\x20invalid\x20or\x20reversed\x20row\x20offsets.','basename','absoluteAnchor','External\x20image\x20relationship\x20is\x20not\x20supported:\x20','map','sheetData','future\x20metadata\x20index','175575CjyOcL','rdRichValue','true','attrs','r:embed','row','Relationships','value','Image\x20anchor\x20spans\x20multiple\x20business\x20rows.','http://schemas.microsoft.com/office/spreadsheetml/2017/richdata','anchor\x20start\x20offset','http://schemas.microsoft.com/office/spreadsheetml/2022/richvaluerel','error','fromEntries','_localImage','http://schemas.openxmlformats.org/package/2006/relationships','rdRichValueStructure','rvData','posix','Missing\x20or\x20ambiguous\x20','http://schemas.microsoft.com/office/2017/06/relationships/','http://www.wps.cn/officeDocument/2017/relationships/','rvb','startsWith','children','dirname','anchor\x20end','hidden\x20image\x20row','Unsupported\x20image\x20formula;\x20expected\x20a\x20standalone\x20DISPIMG\x20literal.','reduce','_rels','Unsupported\x20workbook\x20namespace.','Relationship\x20target\x20escapes\x20workbook:\x20','metadata','charCodeAt','Unsupported\x20worksheet\x20namespace.','rich\x20structure\x20index','blipFill','valueMetadata','uri','Unsupported\x20rich\x20image\x20relation\x20namespace.','anchor\x20end\x20offset','message','{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}','WPS\x20image\x20blip','drawing','Mixed\x20formula\x20and\x20rich\x20image\x20metadata\x20is\x20unsupported.','pic','flatMap','values','image\x20height','159545vihzhJ','anchor\x20column','anchor\x20start','futureMetadata','http://purl.oclc.org/ooxml/officeDocument/relationships','sheet','9WgHVTo','twoCellAnchor','Image\x20coordinate\x20exceeds\x20worksheet\x20bounds.','isSafeInteger','join','External\x20WPS\x20image\x20links\x20are\x20not\x20supported.','Unsupported\x20mapped\x20rich\x20value\x20structure.','Shared\x20image\x20formulas\x20are\x20not\x20supported.','replace','Unsupported\x20WPS\x20cell\x20image\x20namespace.','length','sheetMetadata','push','12pNgCfj','shared','rel','filter','xl/cellimages.xml','Image\x20XML\x20text\x20exceeds\x2064\x20KB.','col','.rels','rvStructures','includes','\x20relationship\x20in\x20','cellImages','../','Unsupported\x20mapped\x20cell\x20metadata\x20type.','Workbook\x20exceeds\x2010000\x20image\x20occurrences.','#VALUE!','Rich\x20IMAGE\x20cell\x20contains\x20unexpected\x20scalar\x20or\x20mixed\x20content.','Missing\x20rich\x20image\x20relationship.','http://purl.oclc.org/ooxml/spreadsheetml/main','value\x20metadata\x20index','Invalid\x20relationship\x20target:\x20','Ambiguous\x20XML\x20attribute.','1951147ITeovo','name','richValueRels','hidden','utf8','302230bugQwL','wsDr','Absolute\x20image\x20anchor\x20cannot\x20be\x20mapped\x20in\x20worksheet\x20','blip','xl/workbook.xml','test','slice','isFinite','nvPicPr','1603YfFPIy','Unsupported\x20rich\x20structure\x20namespace.','text','metadataTypes','Missing\x20rich\x20value.','colOff','get','image\x20cell\x20row','http://schemas.openxmlformats.org/officeDocument/2006/relationships','Duplicate\x20mapped\x20image\x20cell.','sheetFormatPr','attributes','local','set','oneCellAnchor','anchor\x20row','metadata\x20types','normalize','toString','close','ext','sheets','has','Unsupported\x20rich\x20value\x20namespace.','http://purl.oclc.org/ooxml/drawingml/main','4ErkvPD','workbook','r:link','XML\x20DTD/entities\x20are\x20not\x20supported.','2ebUAdE','add','some','exec','closetag','Missing\x20XLSX\x20part:\x20','image\x20formula','worksheet','rich\x20metadata\x20record','9736umiXOC','rich\x20image\x20relationship\x20index','defaultRowHeight','image','Unsupported\x20drawing\x20image.','409434AhQqOJ','rowOff','extLst','Missing\x20future\x20metadata\x20block.','Unsupported\x20drawing\x20namespace.','richValueRel','cellImage','round','32751KxZYgx','Internal','from','MAX_SAFE_INTEGER','Image\x20XML\x20node\x20budget\x20exceeded.','pop','WPS\x20image\x20name','type','http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing','Missing\x20or\x20ambiguous\x20WPS\x20cell\x20image\x20part.','r:id'];a143_0x5881=function(){return _0x54a6c5;};return a143_0x5881();}const a143_0x6b3a21=a143_0x56b7;(function(_0x37f51a,_0x254232){const _0x38028e=a143_0x56b7,_0x9ad846=_0x37f51a();while(!![]){try{const _0x5db4f4=-parseInt(_0x38028e(0x118))/0x1*(-parseInt(_0x38028e(0xbc))/0x2)+-parseInt(_0x38028e(0xd2))/0x3*(parseInt(_0x38028e(0xb8))/0x4)+-parseInt(_0x38028e(0xe5))/0x5+-parseInt(_0x38028e(0xca))/0x6+parseInt(_0x38028e(0x14f))/0x7*(parseInt(_0x38028e(0xc5))/0x8)+-parseInt(_0x38028e(0x11e))/0x9*(-parseInt(_0x38028e(0x146))/0xa)+-parseInt(_0x38028e(0x141))/0xb*(parseInt(_0x38028e(0x12b))/0xc);if(_0x5db4f4===_0x254232)break;else _0x9ad846['push'](_0x9ad846['shift']());}catch(_0x14a5c7){_0x9ad846['push'](_0x9ad846['shift']());}}}(a143_0x5881,0x2b2ad));import a143_0x20caf2 from'node:path';import{SaxesParser}from'saxes';const SHEET=['http://schemas.openxmlformats.org/spreadsheetml/2006/main',a143_0x6b3a21(0x13d)],DRAWING=[a143_0x6b3a21(0xda),'http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing'],DRAWING_MAIN=['http://schemas.openxmlformats.org/drawingml/2006/main',a143_0x6b3a21(0xb7)],OFFICE_RELS=[a143_0x6b3a21(0x157),a143_0x6b3a21(0x11c)],PACKAGE=[a143_0x6b3a21(0xf4)],RICH=[a143_0x6b3a21(0xee)],RICH_RELS=[a143_0x6b3a21(0xf0)],WPS=['http://www.wps.cn/officeDocument/2017/etCustomData'],DEFAULT_NS=Object[a143_0x6b3a21(0xf2)]([...[a143_0x6b3a21(0xb9),a143_0x6b3a21(0xb4),'sheet',a143_0x6b3a21(0xc3),a143_0x6b3a21(0xe3),a143_0x6b3a21(0xea),'c','f','v','sheetFormatPr','drawing',a143_0x6b3a21(0x106),a143_0x6b3a21(0x152),'metadataType',a143_0x6b3a21(0x11b),'valueMetadata','bk','rc',a143_0x6b3a21(0xcc)]['map'](_0x48ab46=>[_0x48ab46,SHEET]),...[a143_0x6b3a21(0x147),'oneCellAnchor','twoCellAnchor',a143_0x6b3a21(0xe0),a143_0x6b3a21(0xd4),'to',a143_0x6b3a21(0x131),a143_0x6b3a21(0x154),'rowOff',a143_0x6b3a21(0x163),a143_0x6b3a21(0x114),a143_0x6b3a21(0x14e),'cNvPr',a143_0x6b3a21(0x10a)][a143_0x6b3a21(0xe2)](_0x4bd4a1=>[_0x4bd4a1,DRAWING]),...[a143_0x6b3a21(0xfb),a143_0x6b3a21(0xf6),'rv',a143_0x6b3a21(0x133),'s','k'][a143_0x6b3a21(0xe2)](_0x359aa1=>[_0x359aa1,RICH]),[a143_0x6b3a21(0x149),DRAWING_MAIN],['richValueRels',RICH_RELS],[a143_0x6b3a21(0x12d),RICH_RELS],[a143_0x6b3a21(0xeb),PACKAGE],['Relationship',PACKAGE],[a143_0x6b3a21(0x136),WPS],[a143_0x6b3a21(0xd0),WPS]]),matches=(_0x508fa6,_0xcc2a53,_0x2ffc8b=DEFAULT_NS[_0xcc2a53]??[])=>_0x508fa6[a143_0x6b3a21(0x142)]===_0xcc2a53&&_0x2ffc8b['includes'](_0x508fa6[a143_0x6b3a21(0x10c)]),children=(_0x31b2dd,_0x275fba,_0x130fb7=DEFAULT_NS[_0x275fba])=>_0x31b2dd[a143_0x6b3a21(0xfd)][a143_0x6b3a21(0x12e)](_0x692655=>matches(_0x692655,_0x275fba,_0x130fb7)),chain=(_0x52d7dd,..._0x4bf6a5)=>_0x4bf6a5[a143_0x6b3a21(0x102)]((_0x3e1910,_0x3912b8)=>_0x3e1910[a143_0x6b3a21(0x115)](_0x2f9862=>children(_0x2f9862,_0x3912b8)),[_0x52d7dd]),relationshipTypes=_0x1c2ad7=>{const _0x4f64b2=a143_0x6b3a21;if([_0x4f64b2(0xe6),_0x4f64b2(0xf5)][_0x4f64b2(0x134)](_0x1c2ad7))return[_0x4f64b2(0xf9)+_0x1c2ad7];if(_0x1c2ad7===_0x4f64b2(0xcf))return['http://schemas.microsoft.com/office/2022/10/relationships/richValueRel'];if(_0x1c2ad7===_0x4f64b2(0xd0)||_0x1c2ad7===_0x4f64b2(0x136))return[_0x4f64b2(0xfa)+_0x1c2ad7];return OFFICE_RELS[_0x4f64b2(0xe2)](_0x4a8722=>_0x4a8722+'/'+_0x1c2ad7);};function one(_0x1560da,_0x1fb3a8){const _0x944f46=a143_0x6b3a21;if(_0x1560da[_0x944f46(0x128)]!==0x1)throw Error(_0x944f46(0xf8)+_0x1fb3a8+'.');return _0x1560da[0x0];}function integer(_0x4d8348,_0x1edf03,_0x101c59=0x186a0){const _0x21bea2=a143_0x6b3a21;if(!_0x4d8348||!/^\d+$/[_0x21bea2(0x14b)](_0x4d8348)||!Number[_0x21bea2(0x121)](Number(_0x4d8348))||Number(_0x4d8348)>_0x101c59)throw Error('Invalid\x20'+_0x1edf03+'.');return Number(_0x4d8348);}function a143_0x56b7(_0x3eecc5,_0x15821a){_0x3eecc5=_0x3eecc5-0xb4;const _0x588153=a143_0x5881();let _0x56b764=_0x588153[_0x3eecc5];return _0x56b764;}export function resolveWorksheetImages(_0x3ee9c3,_0x3b04bc,_0x223a01){const _0x20546a=a143_0x6b3a21;let _0x1a1977=0x0,_0x481fae=0x0,_0x370a14=0x0;const _0x5e5f4d=new Map(),_0x58b242=_0x5073e2=>{const _0x8bf13b=a143_0x56b7;if(_0x5e5f4d[_0x8bf13b(0xb5)](_0x5073e2))return _0x5e5f4d['get'](_0x5073e2);const _0x435e91=_0x3ee9c3[_0x8bf13b(0x155)](_0x5073e2);if(!_0x435e91)throw Error(_0x8bf13b(0xc1)+_0x5073e2+'.');const _0x35983e={'name':'','uri':'','attrs':{},'children':[],'text':''},_0xc54d34=[_0x35983e],_0x4a635f=new SaxesParser({'xmlns':!![]}),_0x9401b=()=>{if(++_0x481fae>0x1e8480)throw Error('Image\x20XML\x20event\x20budget\x20exceeded.');};_0x4a635f['on']('doctype',()=>{const _0xda4b21=_0x8bf13b;throw Error(_0xda4b21(0xbb));}),_0x4a635f['on']('opentag',_0x3ff5e5=>{const _0x4e25ac=_0x8bf13b;_0x9401b();if(++_0x1a1977>0x7a120||_0xc54d34[_0x4e25ac(0x128)]>0x40)throw Error(_0x4e25ac(0xd6));const _0x3357f6={};for(const _0x5b2288 of Object[_0x4e25ac(0x116)](_0x3ff5e5[_0x4e25ac(0x15a)])){const _0x58909a=OFFICE_RELS[_0x4e25ac(0x134)](_0x5b2288[_0x4e25ac(0x10c)])?'r:'+_0x5b2288[_0x4e25ac(0x15b)]:_0x5b2288['uri']?'{'+_0x5b2288[_0x4e25ac(0x10c)]+'}'+_0x5b2288[_0x4e25ac(0x15b)]:_0x5b2288[_0x4e25ac(0x15b)];if(_0x58909a in _0x3357f6)throw Error(_0x4e25ac(0x140));_0x3357f6[_0x58909a]=_0x5b2288[_0x4e25ac(0xec)];}const _0x57d67d={'name':_0x3ff5e5[_0x4e25ac(0x15b)],'uri':_0x3ff5e5[_0x4e25ac(0x10c)],'attrs':_0x3357f6,'children':[],'text':''};_0xc54d34['at'](-0x1)[_0x4e25ac(0xfd)][_0x4e25ac(0x12a)](_0x57d67d),_0xc54d34[_0x4e25ac(0x12a)](_0x57d67d);}),_0x4a635f['on'](_0x8bf13b(0x151),_0x3cb8b2=>{const _0x4fcc21=_0x8bf13b;_0x9401b();const _0x22f68b=_0xc54d34['at'](-0x1);_0x22f68b[_0x4fcc21(0x151)]+=_0x3cb8b2;if(_0x22f68b['text'][_0x4fcc21(0x128)]>0x10000)throw Error(_0x4fcc21(0x130));}),_0x4a635f['on'](_0x8bf13b(0xc0),()=>{const _0x17b18d=_0x8bf13b;_0x9401b(),_0xc54d34[_0x17b18d(0xd7)]();}),_0x4a635f['on'](_0x8bf13b(0xf1),_0x598fd6=>{throw _0x598fd6;}),_0x4a635f['write'](_0x435e91[_0x8bf13b(0x161)](_0x8bf13b(0x145)))[_0x8bf13b(0x162)]();const _0x2e9545=one(_0x35983e[_0x8bf13b(0xfd)],_0x5073e2);return _0x5e5f4d['set'](_0x5073e2,_0x2e9545),_0x2e9545;},_0x5e74a0=new Map(),_0x180d3d=_0x55e414=>{const _0x5f4a73=a143_0x56b7;if(_0x5e74a0[_0x5f4a73(0xb5)](_0x55e414))return _0x5e74a0[_0x5f4a73(0x155)](_0x55e414);const _0x48da99=a143_0x20caf2['posix'][_0x5f4a73(0x122)](a143_0x20caf2[_0x5f4a73(0xf7)][_0x5f4a73(0xfe)](_0x55e414),_0x5f4a73(0x103),a143_0x20caf2['posix'][_0x5f4a73(0xdf)](_0x55e414)+_0x5f4a73(0x132));if(!_0x3ee9c3[_0x5f4a73(0xb5)](_0x48da99))return[];const _0x355ba4=new Set(),_0x4a1533=_0x58b242(_0x48da99);if(!matches(_0x4a1533,_0x5f4a73(0xeb)))throw Error('Unsupported\x20relationship\x20namespace\x20in\x20'+_0x48da99+'.');const _0x42055e=children(_0x4a1533,'Relationship')[_0x5f4a73(0xe2)](_0x383808=>{const _0x3e1f14=_0x5f4a73,{Id:_0xcf1301,Type:_0x3d98c2,Target:_0x199128,TargetMode:_0x12dd95}=_0x383808[_0x3e1f14(0xe8)];if(!_0xcf1301||_0x355ba4[_0x3e1f14(0xb5)](_0xcf1301)||!_0x3d98c2)throw Error('Invalid\x20or\x20duplicate\x20relationship\x20in\x20'+_0x48da99+'.');return _0x355ba4[_0x3e1f14(0xbd)](_0xcf1301),{'id':_0xcf1301,'type':_0x3d98c2,'target':_0x199128??'','mode':_0x12dd95};});return _0x5e74a0[_0x5f4a73(0x15c)](_0x55e414,_0x42055e),_0x42055e;},_0x563d11=(_0x32f854,_0x4de983)=>{const _0xf95ebb=a143_0x56b7,{target:_0x193187,mode:_0x452638}=_0x4de983;if(_0x452638&&_0x452638!==_0xf95ebb(0xd3))throw Error(_0xf95ebb(0xe1)+_0x32f854+'.');if(!_0x193187||_0x193187[_0xf95ebb(0x134)]('\x5c')||/[?#%\x00-\x20]/[_0xf95ebb(0x14b)](_0x193187)||/^[a-z][a-z0-9+.-]*:/i[_0xf95ebb(0x14b)](_0x193187)||_0x193187['startsWith']('//'))throw Error(_0xf95ebb(0x13f)+_0x32f854+'.');const _0x257e7b=_0x193187['startsWith']('/')?_0x193187[_0xf95ebb(0x14c)](0x1):a143_0x20caf2[_0xf95ebb(0xf7)][_0xf95ebb(0x160)](a143_0x20caf2[_0xf95ebb(0xf7)][_0xf95ebb(0x122)](a143_0x20caf2[_0xf95ebb(0xf7)][_0xf95ebb(0xfe)](_0x32f854),_0x193187));if(_0x257e7b[_0xf95ebb(0xfc)](_0xf95ebb(0x137))||_0x257e7b==='..'||!_0x257e7b[_0xf95ebb(0xfc)]('xl/'))throw Error(_0xf95ebb(0x105)+_0x32f854+'.');return _0x257e7b;},_0x402320=(_0x1bbb8c,_0x136c7d,_0x75f927)=>{const _0xffea60=a143_0x56b7,_0x11cd75=_0x180d3d(_0x1bbb8c)[_0xffea60(0x12e)](_0x30806f=>_0x30806f['id']===_0x136c7d&&relationshipTypes(_0x75f927)[_0xffea60(0x134)](_0x30806f[_0xffea60(0xd9)]));if(_0x11cd75['length']!==0x1)throw Error(_0xffea60(0xf8)+_0x75f927+'\x20relationship\x20in\x20'+_0x1bbb8c+'.');return _0x563d11(_0x1bbb8c,_0x11cd75[0x0]);},_0x3bfdc5=(_0xd39f3b,_0x3a582b)=>{const _0x7f4c30=a143_0x56b7,_0x31486a=_0x180d3d(_0xd39f3b)[_0x7f4c30(0x12e)](_0x221661=>relationshipTypes(_0x3a582b)[_0x7f4c30(0x134)](_0x221661[_0x7f4c30(0xd9)]));if(_0x31486a[_0x7f4c30(0x128)]!==0x1)throw Error(_0x7f4c30(0xf8)+_0x3a582b+_0x7f4c30(0x135)+_0xd39f3b+'.');return _0x563d11(_0xd39f3b,_0x31486a[0x0]);},_0x1b90e7=_0x20546a(0x14a),_0x370582=_0x58b242(_0x1b90e7);if(!matches(_0x370582,_0x20546a(0xb9)))throw Error(_0x20546a(0x104));const _0x29fd4d=one(chain(_0x370582,_0x20546a(0xb4),_0x20546a(0x11d))[_0x20546a(0x12e)](_0x29d1d7=>_0x29d1d7[_0x20546a(0xe8)][_0x20546a(0x142)]===_0x3b04bc),_0x20546a(0xc3)),_0x3956c1=_0x402320(_0x1b90e7,_0x29fd4d['attrs']['r:id'],'worksheet'),_0xdee79a=_0x58b242(_0x3956c1);if(!matches(_0xdee79a,_0x20546a(0xc3)))throw Error(_0x20546a(0x108));const _0x36fa54=chain(_0xdee79a,'sheetData',_0x20546a(0xea)),_0xd4dcd1=new Map(),_0x3613af=new Set(_0x36fa54['filter'](_0x2c2637=>_0x2c2637[_0x20546a(0xe8)][_0x20546a(0x144)]==='1'||_0x2c2637['attrs']['hidden']===_0x20546a(0xe7))[_0x20546a(0xe2)](_0x3d6f90=>integer(_0x3d6f90[_0x20546a(0xe8)]['r'],_0x20546a(0x100)))),_0xf0e3f3=_0x3ff477=>{const _0x49cc15=_0x20546a,_0x4f28a0=_0x3ff477===undefined?0xf:Number(_0x3ff477);if(!Number[_0x49cc15(0x14d)](_0x4f28a0)||_0x4f28a0<=0x0||_0x4f28a0>409.5)throw Error('Invalid\x20worksheet\x20row\x20height\x20for\x20image\x20anchor.');return Math[_0x49cc15(0xd1)](_0x4f28a0*0x319c);},_0x62aeeb=_0xf0e3f3(children(_0xdee79a,_0x20546a(0x159))[0x0]?.[_0x20546a(0xe8)][_0x20546a(0xc7)]);for(const _0xd19d57 of _0x36fa54)if(_0xd19d57[_0x20546a(0xe8)]['ht']!==undefined)_0xd4dcd1['set'](integer(_0xd19d57['attrs']['r'],'image\x20row\x20height\x20coordinate'),_0xf0e3f3(_0xd19d57[_0x20546a(0xe8)]['ht']));const _0x425e79=[],_0x511310=_0x4e8ee2=>{const _0x59d347=_0x20546a;if(!_0x223a01['has'](_0x4e8ee2[_0x59d347(0x131)]))return;if(++_0x370a14>0x2710)throw Error(_0x59d347(0x139));_0x425e79[_0x59d347(0x12a)](_0x3613af[_0x59d347(0xb5)](_0x4e8ee2['row'])?{..._0x4e8ee2,'hiddenRow':!![]}:_0x4e8ee2);},_0x534219=_0x51fc1a=>({'row':integer(one(children(_0x51fc1a,_0x20546a(0xea),DRAWING),_0x20546a(0x15e))[_0x20546a(0x151)],_0x20546a(0x15e),0x1869f)+0x1,'col':integer(one(children(_0x51fc1a,'col'),_0x20546a(0x119))['text'],'anchor\x20column',0xff)+0x1});for(const _0x349e7b of children(_0xdee79a,'drawing')){const _0x588e1a=_0x402320(_0x3956c1,_0x349e7b['attrs']['r:id'],_0x20546a(0x112)),_0x11be4b=_0x58b242(_0x588e1a);if(!matches(_0x11be4b,_0x20546a(0x147)))throw Error(_0x20546a(0xce));for(const _0xf0a202 of _0x11be4b[_0x20546a(0xfd)]){if(![_0x20546a(0x15d),_0x20546a(0x11f),_0x20546a(0xe0)][_0x20546a(0xbe)](_0x288ab7=>matches(_0xf0a202,_0x288ab7)))continue;if(_0xf0a202[_0x20546a(0x142)]==='absoluteAnchor')throw Error(_0x20546a(0x148)+_0x3b04bc+'.');const _0x2349fe=_0x534219(one(children(_0xf0a202,_0x20546a(0xd4)),'anchor\x20start'));if(!_0x223a01['has'](_0x2349fe[_0x20546a(0x131)]))continue;let _0x5ad59c;const _0x2f96f3=one(children(_0xf0a202,'from'),_0x20546a(0x11a)),_0x1f8b0f=integer(one(children(_0x2f96f3,_0x20546a(0xcb)),_0x20546a(0xef))[_0x20546a(0x151)],_0x20546a(0xef),Number['MAX_SAFE_INTEGER']),_0x48bb92=_0xd4dcd1[_0x20546a(0x155)](_0x2349fe[_0x20546a(0xea)])??_0x62aeeb;if(_0x1f8b0f>=_0x48bb92)throw Error('Invalid\x20image\x20start\x20offset\x20at\x20row\x20'+_0x2349fe[_0x20546a(0xea)]+'.');if(_0xf0a202[_0x20546a(0x142)]===_0x20546a(0x15d)){const _0xb76fe2=one(children(_0xf0a202,'ext'),'image\x20extent'),_0x2a0e7f=integer(_0xb76fe2['attrs']['cy'],_0x20546a(0x117),Number[_0x20546a(0xd5)]);if(!_0x2a0e7f||_0x1f8b0f+_0x2a0e7f>_0x48bb92)_0x5ad59c=_0x20546a(0xed);}if(_0xf0a202['name']===_0x20546a(0x11f)){const _0xd944bd=one(children(_0xf0a202,'to'),_0x20546a(0xff)),_0x2518ba=_0x534219(_0xd944bd),_0x24f1d7=integer(one(children(_0xd944bd,'rowOff'),_0x20546a(0x10e))[_0x20546a(0x151)],_0x20546a(0x10e),Number[_0x20546a(0xd5)]),_0x3c389=_0xd4dcd1['get'](_0x2518ba[_0x20546a(0xea)])??_0x62aeeb;if(_0x24f1d7>_0x3c389||_0x2518ba['row']===_0x2349fe[_0x20546a(0xea)]&&_0x24f1d7<=_0x1f8b0f)_0x5ad59c=_0x20546a(0xde);if(_0x2518ba[_0x20546a(0xea)]<_0x2349fe[_0x20546a(0xea)]||_0x2518ba['row']>_0x2349fe['row']+0x1||_0x2518ba['row']===_0x2349fe[_0x20546a(0xea)]+0x1&&_0x24f1d7!==0x0)_0x5ad59c='Image\x20anchor\x20spans\x20multiple\x20business\x20rows.';}const _0x1f2319=chain(_0xf0a202,_0x20546a(0x114),_0x20546a(0x10a),_0x20546a(0x149));for(const _0x10d671 of _0x1f2319){if(_0x10d671[_0x20546a(0xe8)][_0x20546a(0xba)])throw Error('External\x20image\x20links\x20are\x20not\x20supported.');_0x511310({..._0x2349fe,'media':[_0x402320(_0x588e1a,_0x10d671['attrs'][_0x20546a(0xe9)],_0x20546a(0xc8))],..._0x5ad59c?{'error':_0x5ad59c}:{}});}if(!_0x1f2319[_0x20546a(0x128)])_0x511310({..._0x2349fe,'media':[],'error':_0x20546a(0xc9)});}}const _0xe33e97=_0x270572=>{const _0x4e894b=_0x20546a,_0x30f796=_0x58b242(_0x3bfdc5(_0x1b90e7,_0x4e894b(0x129)));if(!matches(_0x30f796,'metadata'))throw Error('Unsupported\x20metadata\x20namespace.');const _0x5ca5f4=integer(_0x270572[_0x4e894b(0xe8)]['vm'],_0x4e894b(0x13e));if(!_0x5ca5f4)throw Error('Value\x20metadata\x20index\x20must\x20be\x20one-based.');const _0x53a3e5=children(one(children(_0x30f796,_0x4e894b(0x10b)),_0x4e894b(0x10b)),'bk')[_0x5ca5f4-0x1];if(!_0x53a3e5)throw Error('Missing\x20value\x20metadata\x20block.');const _0x37811e=one(children(_0x53a3e5,'rc'),_0x4e894b(0xc4)),_0x2c9adb=integer(_0x37811e[_0x4e894b(0xe8)]['t'],'metadata\x20type\x20index'),_0x276859=children(one(children(_0x30f796,_0x4e894b(0x152)),_0x4e894b(0x15f)),'metadataType')[_0x2c9adb-0x1];if(!_0x2c9adb||_0x276859?.[_0x4e894b(0xe8)]['name']!==_0x4e894b(0xdd))throw Error(_0x4e894b(0x138));const _0x5d0d06=one(children(_0x30f796,'futureMetadata')[_0x4e894b(0x12e)](_0x5a04e1=>_0x5a04e1[_0x4e894b(0xe8)][_0x4e894b(0x142)]===_0x4e894b(0xdd)),'rich\x20future\x20metadata'),_0x499192=children(_0x5d0d06,'bk')[integer(_0x37811e[_0x4e894b(0xe8)]['v'],_0x4e894b(0xe4))];if(!_0x499192)throw Error(_0x4e894b(0xcd));const _0x3b248d=chain(_0x499192,'extLst')[_0x4e894b(0x115)](_0x1851f3=>children(_0x1851f3,'ext',SHEET))[_0x4e894b(0x12e)](_0x1914f3=>_0x1914f3[_0x4e894b(0xe8)]['uri']?.['toLowerCase']()===_0x4e894b(0x110)),_0x272f10=integer(one(_0x3b248d[_0x4e894b(0x115)](_0x20cb7b=>children(_0x20cb7b,_0x4e894b(0xfb))),'rich\x20value\x20binding')['attrs']['i'],'rich\x20value\x20index'),_0x556fe0=_0x58b242(_0x3bfdc5(_0x1b90e7,'rdRichValue'));if(!matches(_0x556fe0,_0x4e894b(0xf6)))throw Error(_0x4e894b(0xb6));const _0x1fa27b=children(_0x556fe0,'rv')[_0x272f10];if(!_0x1fa27b)throw Error(_0x4e894b(0x153));const _0xc0b486=_0x58b242(_0x3bfdc5(_0x1b90e7,_0x4e894b(0xf5)));if(!matches(_0xc0b486,_0x4e894b(0x133)))throw Error(_0x4e894b(0x150));const _0x38743b=children(_0xc0b486,'s')[integer(_0x1fa27b['attrs']['s'],_0x4e894b(0x109))];if(!_0x38743b||_0x38743b['attrs']['t']!==_0x4e894b(0xf3))throw Error(_0x4e894b(0x124));const _0x4006f5=children(_0x38743b,'k'),_0x49ec4b=_0x4006f5['map']((_0xe944f5,_0x42ce24)=>_0xe944f5[_0x4e894b(0xe8)]['n']==='_rvRel:LocalImageIdentifier'?_0x42ce24:-0x1)[_0x4e894b(0x12e)](_0x14c8d5=>_0x14c8d5>=0x0);if(_0x49ec4b[_0x4e894b(0x128)]!==0x1)throw Error('Missing\x20or\x20ambiguous\x20local\x20image\x20identifier.');const _0xebc36a=children(_0x1fa27b,'v',RICH)[_0x49ec4b[0x0]];if(!_0xebc36a)throw Error('Missing\x20local\x20image\x20identifier\x20value.');const _0x8c339e=_0x3bfdc5(_0x1b90e7,'richValueRel'),_0x4b6985=_0x58b242(_0x8c339e);if(!matches(_0x4b6985,_0x4e894b(0x143)))throw Error(_0x4e894b(0x10d));const _0x24e8dc=children(_0x4b6985,'rel')[integer(_0xebc36a[_0x4e894b(0x151)],_0x4e894b(0xc6))];if(!_0x24e8dc)throw Error(_0x4e894b(0x13c));return _0x402320(_0x8c339e,_0x24e8dc[_0x4e894b(0xe8)][_0x4e894b(0xdc)],_0x4e894b(0xc8));};let _0x23a3b3;const _0x2f7bfb=_0x17da80=>{const _0x2c4c15=_0x20546a;if(!_0x23a3b3){_0x23a3b3=new Map();const _0x22e441=_0x180d3d(_0x1b90e7)['filter'](_0x1c235f=>[...relationshipTypes(_0x2c4c15(0xd0)),...relationshipTypes(_0x2c4c15(0x136))][_0x2c4c15(0x134)](_0x1c235f[_0x2c4c15(0xd9)]));if(!_0x22e441[_0x2c4c15(0x128)]&&_0x3ee9c3['has'](_0x2c4c15(0x12f)))_0x22e441[_0x2c4c15(0x12a)]({'id':'','type':'','target':'/xl/cellimages.xml'});if(_0x22e441[_0x2c4c15(0x128)]!==0x1)throw Error(_0x2c4c15(0xdb));const _0x30e697=_0x563d11(_0x1b90e7,_0x22e441[0x0]),_0x56fac4=_0x58b242(_0x30e697);if(!matches(_0x56fac4,_0x2c4c15(0x136)))throw Error(_0x2c4c15(0x127));for(const _0x11d49a of children(_0x56fac4,_0x2c4c15(0xd0))){const _0x4e82a0=one(chain(_0x11d49a,_0x2c4c15(0x114),_0x2c4c15(0x14e),'cNvPr'),_0x2c4c15(0xd8))[_0x2c4c15(0xe8)]['name'];if(!_0x4e82a0||_0x23a3b3[_0x2c4c15(0xb5)](_0x4e82a0))throw Error('Invalid\x20or\x20duplicate\x20WPS\x20image\x20ID.');const _0x181e67=one(chain(_0x11d49a,_0x2c4c15(0x114),'blipFill',_0x2c4c15(0x149)),_0x2c4c15(0x111));if(_0x181e67[_0x2c4c15(0xe8)][_0x2c4c15(0xba)])throw Error(_0x2c4c15(0x123));_0x23a3b3['set'](_0x4e82a0,_0x402320(_0x30e697,_0x181e67[_0x2c4c15(0xe8)][_0x2c4c15(0xe9)],'image'));}}const _0x53f4ee=_0x23a3b3[_0x2c4c15(0x155)](_0x17da80);if(!_0x53f4ee)throw Error('Missing\x20WPS\x20image\x20ID:\x20'+_0x17da80+'.');return _0x53f4ee;},_0x47597d=new Set();for(const _0x321249 of _0x36fa54[_0x20546a(0x115)](_0x13b94d=>children(_0x13b94d,'c'))){const _0x12d137=/^([A-Z]+)([1-9]\d*)$/[_0x20546a(0xbf)](_0x321249[_0x20546a(0xe8)]['r']??'');if(!_0x12d137)continue;let _0x2e5ddc=0x0;for(const _0x1132b8 of _0x12d137[0x1])_0x2e5ddc=_0x2e5ddc*0x1a+_0x1132b8[_0x20546a(0x107)](0x0)-0x40;if(!_0x223a01[_0x20546a(0xb5)](_0x2e5ddc))continue;const _0x576ae9=integer(_0x12d137[0x2],_0x20546a(0x156));if(_0x47597d[_0x20546a(0xb5)](_0x321249[_0x20546a(0xe8)]['r']))throw Error(_0x20546a(0x158));_0x47597d[_0x20546a(0xbd)](_0x321249['attrs']['r']);const _0x1571e3=children(_0x321249,'f');if(!_0x321249[_0x20546a(0xe8)]['vm']&&!_0x1571e3[_0x20546a(0x128)])continue;try{if(_0x576ae9<0x1||_0x2e5ddc>0x100)throw Error(_0x20546a(0x120));let _0x42cc6d;if(_0x321249['attrs']['vm']){if(_0x1571e3[_0x20546a(0x128)])throw Error(_0x20546a(0x113));if(_0x321249['attrs']['t']!=='e'||children(_0x321249,'v')['length']!==0x1||children(_0x321249,'v')[0x0]['text']!==_0x20546a(0x13a))throw Error(_0x20546a(0x13b));_0x42cc6d=_0xe33e97(_0x321249);}else{const _0x2cac2e=one(_0x1571e3,_0x20546a(0xc2));if(_0x2cac2e[_0x20546a(0xe8)]['t']===_0x20546a(0x12c)||_0x2cac2e[_0x20546a(0xe8)]['si'])throw Error(_0x20546a(0x125));const _0x209c80=/^\s*=?\s*@?(?:_xlfn\.)?DISPIMG\(\s*"((?:[^"]|"")+)"\s*(?:,\s*[01]\s*)?\)\s*$/i['exec'](_0x2cac2e[_0x20546a(0x151)]);if(!_0x209c80)throw Error(_0x20546a(0x101));_0x42cc6d=_0x2f7bfb(_0x209c80[0x1][_0x20546a(0x126)](/""/g,'\x22'));}_0x511310({'row':_0x576ae9,'col':_0x2e5ddc,'media':[_0x42cc6d],'nativeCell':!![]});}catch(_0xc13a0f){_0x511310({'row':_0x576ae9,'col':_0x2e5ddc,'media':[],'nativeCell':!![],'error':_0xc13a0f[_0x20546a(0x10f)]});}}return _0x425e79;}
1
+ const a146_0x353b79=a146_0x2f92;(function(_0x2a6571,_0x1e1eaa){const _0x104bb8=a146_0x2f92,_0x16052e=_0x2a6571();while(!![]){try{const _0x3a505e=parseInt(_0x104bb8(0x165))/0x1+parseInt(_0x104bb8(0x103))/0x2+parseInt(_0x104bb8(0x14a))/0x3*(parseInt(_0x104bb8(0x146))/0x4)+parseInt(_0x104bb8(0x13f))/0x5+parseInt(_0x104bb8(0x130))/0x6+parseInt(_0x104bb8(0xfa))/0x7+-parseInt(_0x104bb8(0x120))/0x8*(parseInt(_0x104bb8(0x16f))/0x9);if(_0x3a505e===_0x1e1eaa)break;else _0x16052e['push'](_0x16052e['shift']());}catch(_0x58e471){_0x16052e['push'](_0x16052e['shift']());}}}(a146_0x4775,0x7c6b4));import a146_0x2b391c from'node:path';import{SaxesParser}from'saxes';const SHEET=[a146_0x353b79(0x136),a146_0x353b79(0xe5)],DRAWING=['http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing',a146_0x353b79(0x176)],DRAWING_MAIN=[a146_0x353b79(0x10d),a146_0x353b79(0xd0)],OFFICE_RELS=['http://schemas.openxmlformats.org/officeDocument/2006/relationships','http://purl.oclc.org/ooxml/officeDocument/relationships'],PACKAGE=[a146_0x353b79(0xd8)],RICH=[a146_0x353b79(0x172)],RICH_RELS=['http://schemas.microsoft.com/office/spreadsheetml/2022/richvaluerel'],WPS=[a146_0x353b79(0x12a)],DEFAULT_NS=Object[a146_0x353b79(0x118)]([...[a146_0x353b79(0xfb),a146_0x353b79(0xd4),a146_0x353b79(0x14e),'worksheet',a146_0x353b79(0x153),a146_0x353b79(0x11c),'c','f','v',a146_0x353b79(0x116),a146_0x353b79(0xe9),a146_0x353b79(0x14f),'metadataTypes',a146_0x353b79(0x115),a146_0x353b79(0xfe),a146_0x353b79(0x12e),'bk','rc',a146_0x353b79(0x13a)][a146_0x353b79(0x13b)](_0x5192cc=>[_0x5192cc,SHEET]),...['wsDr','oneCellAnchor',a146_0x353b79(0x17e),a146_0x353b79(0x168),a146_0x353b79(0xe1),'to',a146_0x353b79(0x145),a146_0x353b79(0x17b),a146_0x353b79(0xfc),'ext',a146_0x353b79(0x10b),a146_0x353b79(0xd6),a146_0x353b79(0x144),a146_0x353b79(0x164)][a146_0x353b79(0x13b)](_0x1fcaaa=>[_0x1fcaaa,DRAWING]),...[a146_0x353b79(0x11b),'rvData','rv',a146_0x353b79(0x125),'s','k'][a146_0x353b79(0x13b)](_0x56804a=>[_0x56804a,RICH]),[a146_0x353b79(0x16c),DRAWING_MAIN],[a146_0x353b79(0x156),RICH_RELS],[a146_0x353b79(0xea),RICH_RELS],[a146_0x353b79(0x12f),PACKAGE],[a146_0x353b79(0x162),PACKAGE],[a146_0x353b79(0xff),WPS],['cellImage',WPS]]),matches=(_0xd8b9e6,_0x514c79,_0x23cadf=DEFAULT_NS[_0x514c79]??[])=>_0xd8b9e6[a146_0x353b79(0x131)]===_0x514c79&&_0x23cadf[a146_0x353b79(0x14d)](_0xd8b9e6[a146_0x353b79(0x13d)]),children=(_0x529a54,_0x3c49b8,_0x5e7e0b=DEFAULT_NS[_0x3c49b8])=>_0x529a54[a146_0x353b79(0xeb)][a146_0x353b79(0x16b)](_0x1ba5b7=>matches(_0x1ba5b7,_0x3c49b8,_0x5e7e0b)),chain=(_0x424695,..._0x266cc6)=>_0x266cc6[a146_0x353b79(0x110)]((_0x5c00e1,_0x3a9bb3)=>_0x5c00e1['flatMap'](_0x59f6e1=>children(_0x59f6e1,_0x3a9bb3)),[_0x424695]),relationshipTypes=_0x15f2be=>{const _0xd94bfc=a146_0x353b79;if([_0xd94bfc(0x147),_0xd94bfc(0xdb)][_0xd94bfc(0x14d)](_0x15f2be))return[_0xd94bfc(0x155)+_0x15f2be];if(_0x15f2be==='richValueRel')return['http://schemas.microsoft.com/office/2022/10/relationships/richValueRel'];if(_0x15f2be===_0xd94bfc(0x150)||_0x15f2be===_0xd94bfc(0xff))return[_0xd94bfc(0x113)+_0x15f2be];return OFFICE_RELS['map'](_0x346a79=>_0x346a79+'/'+_0x15f2be);};function one(_0x2aed41,_0x1b6e70){const _0x59a203=a146_0x353b79;if(_0x2aed41[_0x59a203(0x171)]!==0x1)throw Error(_0x59a203(0xf5)+_0x1b6e70+'.');return _0x2aed41[0x0];}function integer(_0x386bb8,_0x6bec6d,_0x13923c=0x186a0){const _0x690198=a146_0x353b79;if(!_0x386bb8||!/^\d+$/['test'](_0x386bb8)||!Number['isSafeInteger'](Number(_0x386bb8))||Number(_0x386bb8)>_0x13923c)throw Error(_0x690198(0x163)+_0x6bec6d+'.');return Number(_0x386bb8);}function a146_0x4775(){const _0x4323d5=['Workbook\x20exceeds\x2010000\x20image\x20occurrences.','Unsupported\x20metadata\x20namespace.','rvb','row','Ambiguous\x20XML\x20attribute.','Rich\x20IMAGE\x20cell\x20contains\x20unexpected\x20scalar\x20or\x20mixed\x20content.','charCodeAt','16DBLKyM','has','xl/workbook.xml','Invalid\x20worksheet\x20row\x20height\x20for\x20image\x20anchor.','sheetMetadata','rvStructures','Shared\x20image\x20formulas\x20are\x20not\x20supported.','Unsupported\x20mapped\x20rich\x20value\x20structure.','Unsupported\x20mapped\x20cell\x20metadata\x20type.','#VALUE!','http://www.wps.cn/officeDocument/2017/etCustomData','set','MAX_SAFE_INTEGER','Missing\x20XLSX\x20part:\x20','valueMetadata','Relationships','661140ztLjBE','name','r:id','future\x20metadata\x20index','XML\x20DTD/entities\x20are\x20not\x20supported.','image\x20formula','http://schemas.openxmlformats.org/spreadsheetml/2006/main','rich\x20value\x20binding','attrs','Image\x20XML\x20node\x20budget\x20exceeded.','extLst','map','shared','uri','add','3221890rIidmB','image\x20cell\x20row','value\x20metadata\x20index','posix','Internal','cNvPr','col','16jofSIB','rdRichValue','join','Missing\x20local\x20image\x20identifier\x20value.','379047AJXNpD','round','.rels','includes','sheet','metadata','cellImage','Unsupported\x20rich\x20image\x20relation\x20namespace.','Unsupported\x20drawing\x20image.','sheetData','External\x20WPS\x20image\x20links\x20are\x20not\x20supported.','http://schemas.microsoft.com/office/2017/06/relationships/','richValueRels','error','Image\x20anchor\x20spans\x20multiple\x20business\x20rows.','doctype','defaultRowHeight','Unsupported\x20workbook\x20namespace.','_rvRel:LocalImageIdentifier','image\x20height','Image\x20anchor\x20has\x20invalid\x20or\x20reversed\x20row\x20offsets.','anchor\x20start\x20offset','anchor\x20start','flatMap','Relationship','Invalid\x20','blipFill','644778xrGrDr','Mixed\x20formula\x20and\x20rich\x20image\x20metadata\x20is\x20unsupported.','test','absoluteAnchor','rich\x20structure\x20index','metadata\x20types','filter','blip','wsDr','pop','11494863OAbliL','r:embed','length','http://schemas.microsoft.com/office/spreadsheetml/2017/richdata','Value\x20metadata\x20index\x20must\x20be\x20one-based.','../','closetag','http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing','local','push','get','write','colOff','Missing\x20rich\x20image\x20relationship.','Image\x20coordinate\x20exceeds\x20worksheet\x20bounds.','twoCellAnchor','value','_rels','anchor\x20column','http://purl.oclc.org/ooxml/drawingml/main','Invalid\x20relationship\x20target:\x20','_localImage','\x20relationship\x20in\x20','sheets','metadata\x20type\x20index','nvPicPr','exec','http://schemas.openxmlformats.org/package/2006/relationships','r:link','XLRICHVALUE','rdRichValueStructure','image','utf8','replace','xl/cellimages.xml','opentag','from','slice','rich\x20value\x20index','worksheet','http://purl.oclc.org/ooxml/spreadsheetml/main','Unsupported\x20rich\x20value\x20namespace.','normalize','text','drawing','rel','children','External\x20image\x20relationship\x20is\x20not\x20supported:\x20','anchor\x20end','toLowerCase','External\x20image\x20links\x20are\x20not\x20supported.','WPS\x20image\x20blip','Duplicate\x20mapped\x20image\x20cell.','basename','Unsupported\x20relationship\x20namespace\x20in\x20','Unsupported\x20rich\x20structure\x20namespace.','Missing\x20or\x20ambiguous\x20','anchor\x20row','isFinite','Relationship\x20target\x20escapes\x20workbook:\x20','toString','6533772GdWWqF','workbook','rowOff','Invalid\x20image\x20start\x20offset\x20at\x20row\x20','futureMetadata','cellImages','type','xl/','Missing\x20rich\x20value.','451792CYsDIv','Unsupported\x20worksheet\x20namespace.','some','rich\x20image\x20relationship\x20index','oneCellAnchor','richValueRel','Missing\x20WPS\x20image\x20ID:\x20','/xl/cellimages.xml','pic','Absolute\x20image\x20anchor\x20cannot\x20be\x20mapped\x20in\x20worksheet\x20','http://schemas.openxmlformats.org/drawingml/2006/main','rich\x20metadata\x20record','image\x20row\x20height\x20coordinate','reduce','startsWith','hidden\x20image\x20row','http://www.wps.cn/officeDocument/2017/relationships/','ext','metadataType','sheetFormatPr','dirname','fromEntries'];a146_0x4775=function(){return _0x4323d5;};return a146_0x4775();}function a146_0x2f92(_0x38693b,_0x44d73b){_0x38693b=_0x38693b-0xd0;const _0x47756d=a146_0x4775();let _0x2f9252=_0x47756d[_0x38693b];return _0x2f9252;}export function resolveWorksheetImages(_0xb82792,_0x20332c,_0x46aa0f){const _0x4439d3=a146_0x353b79;let _0x5f4d93=0x0,_0x1d7a9e=0x0,_0x448b9d=0x0;const _0x52142c=new Map(),_0x565ec7=_0x569df7=>{const _0x4fc0ed=a146_0x2f92;if(_0x52142c[_0x4fc0ed(0x121)](_0x569df7))return _0x52142c[_0x4fc0ed(0x179)](_0x569df7);const _0x547de4=_0xb82792[_0x4fc0ed(0x179)](_0x569df7);if(!_0x547de4)throw Error(_0x4fc0ed(0x12d)+_0x569df7+'.');const _0x4ef1f0={'name':'','uri':'','attrs':{},'children':[],'text':''},_0xe7bb59=[_0x4ef1f0],_0x1da35f=new SaxesParser({'xmlns':!![]}),_0x1fb083=()=>{if(++_0x1d7a9e>0x1e8480)throw Error('Image\x20XML\x20event\x20budget\x20exceeded.');};_0x1da35f['on'](_0x4fc0ed(0x159),()=>{const _0x14cd49=_0x4fc0ed;throw Error(_0x14cd49(0x134));}),_0x1da35f['on'](_0x4fc0ed(0xe0),_0x150202=>{const _0x115986=_0x4fc0ed;_0x1fb083();if(++_0x5f4d93>0x7a120||_0xe7bb59[_0x115986(0x171)]>0x40)throw Error(_0x115986(0x139));const _0x160217={};for(const _0x339941 of Object['values'](_0x150202['attributes'])){const _0x5c7c5f=OFFICE_RELS[_0x115986(0x14d)](_0x339941[_0x115986(0x13d)])?'r:'+_0x339941['local']:_0x339941[_0x115986(0x13d)]?'{'+_0x339941[_0x115986(0x13d)]+'}'+_0x339941[_0x115986(0x177)]:_0x339941['local'];if(_0x5c7c5f in _0x160217)throw Error(_0x115986(0x11d));_0x160217[_0x5c7c5f]=_0x339941[_0x115986(0x17f)];}const _0x4721c6={'name':_0x150202[_0x115986(0x177)],'uri':_0x150202[_0x115986(0x13d)],'attrs':_0x160217,'children':[],'text':''};_0xe7bb59['at'](-0x1)[_0x115986(0xeb)][_0x115986(0x178)](_0x4721c6),_0xe7bb59[_0x115986(0x178)](_0x4721c6);}),_0x1da35f['on'](_0x4fc0ed(0xe8),_0x3a465c=>{const _0x4d9e32=_0x4fc0ed;_0x1fb083();const _0x35b4d9=_0xe7bb59['at'](-0x1);_0x35b4d9['text']+=_0x3a465c;if(_0x35b4d9[_0x4d9e32(0xe8)][_0x4d9e32(0x171)]>0x10000)throw Error('Image\x20XML\x20text\x20exceeds\x2064\x20KB.');}),_0x1da35f['on'](_0x4fc0ed(0x175),()=>{const _0x334488=_0x4fc0ed;_0x1fb083(),_0xe7bb59[_0x334488(0x16e)]();}),_0x1da35f['on'](_0x4fc0ed(0x157),_0x10dfa7=>{throw _0x10dfa7;}),_0x1da35f[_0x4fc0ed(0x17a)](_0x547de4[_0x4fc0ed(0xf9)](_0x4fc0ed(0xdd)))['close']();const _0x38d068=one(_0x4ef1f0['children'],_0x569df7);return _0x52142c[_0x4fc0ed(0x12b)](_0x569df7,_0x38d068),_0x38d068;},_0x1c1b97=new Map(),_0x5a7048=_0x1097eb=>{const _0x64e5ec=a146_0x2f92;if(_0x1c1b97[_0x64e5ec(0x121)](_0x1097eb))return _0x1c1b97[_0x64e5ec(0x179)](_0x1097eb);const _0x304ed1=a146_0x2b391c['posix'][_0x64e5ec(0x148)](a146_0x2b391c[_0x64e5ec(0x142)][_0x64e5ec(0x117)](_0x1097eb),_0x64e5ec(0x180),a146_0x2b391c[_0x64e5ec(0x142)][_0x64e5ec(0xf2)](_0x1097eb)+_0x64e5ec(0x14c));if(!_0xb82792[_0x64e5ec(0x121)](_0x304ed1))return[];const _0x3326cb=new Set(),_0x217ad7=_0x565ec7(_0x304ed1);if(!matches(_0x217ad7,_0x64e5ec(0x12f)))throw Error(_0x64e5ec(0xf3)+_0x304ed1+'.');const _0x2f9910=children(_0x217ad7,_0x64e5ec(0x162))[_0x64e5ec(0x13b)](_0x5baa70=>{const _0x24ebde=_0x64e5ec,{Id:_0x3b5f59,Type:_0x3f364a,Target:_0x326832,TargetMode:_0x367dc9}=_0x5baa70[_0x24ebde(0x138)];if(!_0x3b5f59||_0x3326cb[_0x24ebde(0x121)](_0x3b5f59)||!_0x3f364a)throw Error('Invalid\x20or\x20duplicate\x20relationship\x20in\x20'+_0x304ed1+'.');return _0x3326cb[_0x24ebde(0x13e)](_0x3b5f59),{'id':_0x3b5f59,'type':_0x3f364a,'target':_0x326832??'','mode':_0x367dc9};});return _0x1c1b97['set'](_0x1097eb,_0x2f9910),_0x2f9910;},_0x428b50=(_0x1dc3e5,_0x40f07e)=>{const _0x9d20f1=a146_0x2f92,{target:_0x15c725,mode:_0x27fdf8}=_0x40f07e;if(_0x27fdf8&&_0x27fdf8!==_0x9d20f1(0x143))throw Error(_0x9d20f1(0xec)+_0x1dc3e5+'.');if(!_0x15c725||_0x15c725['includes']('\x5c')||/[?#%\x00-\x20]/[_0x9d20f1(0x167)](_0x15c725)||/^[a-z][a-z0-9+.-]*:/i[_0x9d20f1(0x167)](_0x15c725)||_0x15c725[_0x9d20f1(0x111)]('//'))throw Error(_0x9d20f1(0xd1)+_0x1dc3e5+'.');const _0x4c5275=_0x15c725[_0x9d20f1(0x111)]('/')?_0x15c725[_0x9d20f1(0xe2)](0x1):a146_0x2b391c['posix'][_0x9d20f1(0xe7)](a146_0x2b391c['posix'][_0x9d20f1(0x148)](a146_0x2b391c[_0x9d20f1(0x142)][_0x9d20f1(0x117)](_0x1dc3e5),_0x15c725));if(_0x4c5275[_0x9d20f1(0x111)](_0x9d20f1(0x174))||_0x4c5275==='..'||!_0x4c5275[_0x9d20f1(0x111)](_0x9d20f1(0x101)))throw Error(_0x9d20f1(0xf8)+_0x1dc3e5+'.');return _0x4c5275;},_0x1ca1ca=(_0x2d88f7,_0x473c47,_0x2fd857)=>{const _0xf57da8=a146_0x2f92,_0x5dd9b5=_0x5a7048(_0x2d88f7)[_0xf57da8(0x16b)](_0x1eda32=>_0x1eda32['id']===_0x473c47&&relationshipTypes(_0x2fd857)['includes'](_0x1eda32[_0xf57da8(0x100)]));if(_0x5dd9b5[_0xf57da8(0x171)]!==0x1)throw Error(_0xf57da8(0xf5)+_0x2fd857+_0xf57da8(0xd3)+_0x2d88f7+'.');return _0x428b50(_0x2d88f7,_0x5dd9b5[0x0]);},_0x177f52=(_0x595d93,_0x1f3d74)=>{const _0x196aaa=a146_0x2f92,_0x31ed54=_0x5a7048(_0x595d93)[_0x196aaa(0x16b)](_0x1df4c0=>relationshipTypes(_0x1f3d74)[_0x196aaa(0x14d)](_0x1df4c0[_0x196aaa(0x100)]));if(_0x31ed54[_0x196aaa(0x171)]!==0x1)throw Error(_0x196aaa(0xf5)+_0x1f3d74+'\x20relationship\x20in\x20'+_0x595d93+'.');return _0x428b50(_0x595d93,_0x31ed54[0x0]);},_0x1db33f=_0x4439d3(0x122),_0x1c1107=_0x565ec7(_0x1db33f);if(!matches(_0x1c1107,'workbook'))throw Error(_0x4439d3(0x15b));const _0x5bfc6a=one(chain(_0x1c1107,_0x4439d3(0xd4),_0x4439d3(0x14e))[_0x4439d3(0x16b)](_0x6687bb=>_0x6687bb[_0x4439d3(0x138)][_0x4439d3(0x131)]===_0x20332c),_0x4439d3(0xe4)),_0x354dfb=_0x1ca1ca(_0x1db33f,_0x5bfc6a[_0x4439d3(0x138)][_0x4439d3(0x132)],'worksheet'),_0x275bd9=_0x565ec7(_0x354dfb);if(!matches(_0x275bd9,_0x4439d3(0xe4)))throw Error(_0x4439d3(0x104));const _0x9cacdf=chain(_0x275bd9,'sheetData',_0x4439d3(0x11c)),_0x18843a=new Map(),_0x4b7c77=new Set(_0x9cacdf[_0x4439d3(0x16b)](_0x488140=>_0x488140[_0x4439d3(0x138)]['hidden']==='1'||_0x488140['attrs']['hidden']==='true')[_0x4439d3(0x13b)](_0x423ccf=>integer(_0x423ccf[_0x4439d3(0x138)]['r'],_0x4439d3(0x112)))),_0x4ed9d7=_0x126604=>{const _0x8625fe=_0x4439d3,_0x4dcfbf=_0x126604===undefined?0xf:Number(_0x126604);if(!Number[_0x8625fe(0xf7)](_0x4dcfbf)||_0x4dcfbf<=0x0||_0x4dcfbf>409.5)throw Error(_0x8625fe(0x123));return Math[_0x8625fe(0x14b)](_0x4dcfbf*0x319c);},_0x4d9b2c=_0x4ed9d7(children(_0x275bd9,_0x4439d3(0x116))[0x0]?.['attrs'][_0x4439d3(0x15a)]);for(const _0x21c652 of _0x9cacdf)if(_0x21c652[_0x4439d3(0x138)]['ht']!==undefined)_0x18843a[_0x4439d3(0x12b)](integer(_0x21c652['attrs']['r'],_0x4439d3(0x10f)),_0x4ed9d7(_0x21c652['attrs']['ht']));const _0x3da7fc=[],_0x2491ac=_0x2646ae=>{const _0x3a4116=_0x4439d3;if(!_0x46aa0f[_0x3a4116(0x121)](_0x2646ae[_0x3a4116(0x145)]))return;if(++_0x448b9d>0x2710)throw Error(_0x3a4116(0x119));_0x3da7fc[_0x3a4116(0x178)](_0x4b7c77[_0x3a4116(0x121)](_0x2646ae[_0x3a4116(0x11c)])?{..._0x2646ae,'hiddenRow':!![]}:_0x2646ae);},_0x436f80=_0x1990f4=>({'row':integer(one(children(_0x1990f4,'row',DRAWING),'anchor\x20row')['text'],_0x4439d3(0xf6),0x1869f)+0x1,'col':integer(one(children(_0x1990f4,_0x4439d3(0x145)),_0x4439d3(0x181))[_0x4439d3(0xe8)],_0x4439d3(0x181),0xff)+0x1});for(const _0x1d0fbc of children(_0x275bd9,_0x4439d3(0xe9))){const _0x5efb15=_0x1ca1ca(_0x354dfb,_0x1d0fbc[_0x4439d3(0x138)]['r:id'],'drawing'),_0x3b39f2=_0x565ec7(_0x5efb15);if(!matches(_0x3b39f2,_0x4439d3(0x16d)))throw Error('Unsupported\x20drawing\x20namespace.');for(const _0x37069d of _0x3b39f2['children']){if(![_0x4439d3(0x107),_0x4439d3(0x17e),'absoluteAnchor'][_0x4439d3(0x105)](_0x277aca=>matches(_0x37069d,_0x277aca)))continue;if(_0x37069d[_0x4439d3(0x131)]===_0x4439d3(0x168))throw Error(_0x4439d3(0x10c)+_0x20332c+'.');const _0x1a6b83=_0x436f80(one(children(_0x37069d,_0x4439d3(0xe1)),_0x4439d3(0x160)));if(!_0x46aa0f[_0x4439d3(0x121)](_0x1a6b83[_0x4439d3(0x145)]))continue;let _0x48ae8f;const _0x2b6a29=one(children(_0x37069d,_0x4439d3(0xe1)),_0x4439d3(0x160)),_0x12f686=integer(one(children(_0x2b6a29,_0x4439d3(0xfc)),'anchor\x20start\x20offset')[_0x4439d3(0xe8)],_0x4439d3(0x15f),Number[_0x4439d3(0x12c)]),_0x5bab28=_0x18843a[_0x4439d3(0x179)](_0x1a6b83[_0x4439d3(0x11c)])??_0x4d9b2c;if(_0x12f686>=_0x5bab28)throw Error(_0x4439d3(0xfd)+_0x1a6b83[_0x4439d3(0x11c)]+'.');if(_0x37069d[_0x4439d3(0x131)]===_0x4439d3(0x107)){const _0x3ad760=one(children(_0x37069d,_0x4439d3(0x114)),'image\x20extent'),_0x1089e8=integer(_0x3ad760[_0x4439d3(0x138)]['cy'],_0x4439d3(0x15d),Number['MAX_SAFE_INTEGER']);if(!_0x1089e8||_0x12f686+_0x1089e8>_0x5bab28)_0x48ae8f=_0x4439d3(0x158);}if(_0x37069d[_0x4439d3(0x131)]===_0x4439d3(0x17e)){const _0x250db4=one(children(_0x37069d,'to'),_0x4439d3(0xed)),_0x2d22c4=_0x436f80(_0x250db4),_0x4c6b96=integer(one(children(_0x250db4,'rowOff'),'anchor\x20end\x20offset')[_0x4439d3(0xe8)],'anchor\x20end\x20offset',Number[_0x4439d3(0x12c)]),_0x176d9b=_0x18843a[_0x4439d3(0x179)](_0x2d22c4['row'])??_0x4d9b2c;if(_0x4c6b96>_0x176d9b||_0x2d22c4['row']===_0x1a6b83[_0x4439d3(0x11c)]&&_0x4c6b96<=_0x12f686)_0x48ae8f=_0x4439d3(0x15e);if(_0x2d22c4[_0x4439d3(0x11c)]<_0x1a6b83[_0x4439d3(0x11c)]||_0x2d22c4['row']>_0x1a6b83[_0x4439d3(0x11c)]+0x1||_0x2d22c4[_0x4439d3(0x11c)]===_0x1a6b83[_0x4439d3(0x11c)]+0x1&&_0x4c6b96!==0x0)_0x48ae8f=_0x4439d3(0x158);}const _0x415b8c=chain(_0x37069d,_0x4439d3(0x10b),_0x4439d3(0x164),_0x4439d3(0x16c));for(const _0x91d87f of _0x415b8c){if(_0x91d87f['attrs'][_0x4439d3(0xd9)])throw Error(_0x4439d3(0xef));_0x2491ac({..._0x1a6b83,'media':[_0x1ca1ca(_0x5efb15,_0x91d87f['attrs']['r:embed'],_0x4439d3(0xdc))],..._0x48ae8f?{'error':_0x48ae8f}:{}});}if(!_0x415b8c[_0x4439d3(0x171)])_0x2491ac({..._0x1a6b83,'media':[],'error':_0x4439d3(0x152)});}}const _0x137c91=_0x526d1a=>{const _0x4cb350=_0x4439d3,_0x1ee91a=_0x565ec7(_0x177f52(_0x1db33f,_0x4cb350(0x124)));if(!matches(_0x1ee91a,_0x4cb350(0x14f)))throw Error(_0x4cb350(0x11a));const _0x5804b2=integer(_0x526d1a[_0x4cb350(0x138)]['vm'],_0x4cb350(0x141));if(!_0x5804b2)throw Error(_0x4cb350(0x173));const _0x5cd46e=children(one(children(_0x1ee91a,_0x4cb350(0x12e)),_0x4cb350(0x12e)),'bk')[_0x5804b2-0x1];if(!_0x5cd46e)throw Error('Missing\x20value\x20metadata\x20block.');const _0x1f520d=one(children(_0x5cd46e,'rc'),_0x4cb350(0x10e)),_0x34095b=integer(_0x1f520d['attrs']['t'],_0x4cb350(0xd5)),_0x41a9b1=children(one(children(_0x1ee91a,'metadataTypes'),_0x4cb350(0x16a)),'metadataType')[_0x34095b-0x1];if(!_0x34095b||_0x41a9b1?.['attrs']['name']!==_0x4cb350(0xda))throw Error(_0x4cb350(0x128));const _0x18427e=one(children(_0x1ee91a,_0x4cb350(0xfe))[_0x4cb350(0x16b)](_0x129104=>_0x129104[_0x4cb350(0x138)][_0x4cb350(0x131)]===_0x4cb350(0xda)),'rich\x20future\x20metadata'),_0x4c895b=children(_0x18427e,'bk')[integer(_0x1f520d[_0x4cb350(0x138)]['v'],_0x4cb350(0x133))];if(!_0x4c895b)throw Error('Missing\x20future\x20metadata\x20block.');const _0x1c3db7=chain(_0x4c895b,_0x4cb350(0x13a))[_0x4cb350(0x161)](_0xac3494=>children(_0xac3494,_0x4cb350(0x114),SHEET))['filter'](_0x4b370e=>_0x4b370e[_0x4cb350(0x138)][_0x4cb350(0x13d)]?.[_0x4cb350(0xee)]()==='{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}'),_0x5e9621=integer(one(_0x1c3db7[_0x4cb350(0x161)](_0x3fbae1=>children(_0x3fbae1,_0x4cb350(0x11b))),_0x4cb350(0x137))[_0x4cb350(0x138)]['i'],_0x4cb350(0xe3)),_0x1da376=_0x565ec7(_0x177f52(_0x1db33f,_0x4cb350(0x147)));if(!matches(_0x1da376,'rvData'))throw Error(_0x4cb350(0xe6));const _0x46052a=children(_0x1da376,'rv')[_0x5e9621];if(!_0x46052a)throw Error(_0x4cb350(0x102));const _0x2d1cf4=_0x565ec7(_0x177f52(_0x1db33f,_0x4cb350(0xdb)));if(!matches(_0x2d1cf4,'rvStructures'))throw Error(_0x4cb350(0xf4));const _0x2576e0=children(_0x2d1cf4,'s')[integer(_0x46052a[_0x4cb350(0x138)]['s'],_0x4cb350(0x169))];if(!_0x2576e0||_0x2576e0[_0x4cb350(0x138)]['t']!==_0x4cb350(0xd2))throw Error(_0x4cb350(0x127));const _0x296b9d=children(_0x2576e0,'k'),_0x5dbf6a=_0x296b9d['map']((_0x2a3e59,_0x48cb96)=>_0x2a3e59[_0x4cb350(0x138)]['n']===_0x4cb350(0x15c)?_0x48cb96:-0x1)[_0x4cb350(0x16b)](_0xd07599=>_0xd07599>=0x0);if(_0x5dbf6a['length']!==0x1)throw Error('Missing\x20or\x20ambiguous\x20local\x20image\x20identifier.');const _0x417a84=children(_0x46052a,'v',RICH)[_0x5dbf6a[0x0]];if(!_0x417a84)throw Error(_0x4cb350(0x149));const _0x76894a=_0x177f52(_0x1db33f,_0x4cb350(0x108)),_0x12bfc1=_0x565ec7(_0x76894a);if(!matches(_0x12bfc1,_0x4cb350(0x156)))throw Error(_0x4cb350(0x151));const _0x581851=children(_0x12bfc1,_0x4cb350(0xea))[integer(_0x417a84['text'],_0x4cb350(0x106))];if(!_0x581851)throw Error(_0x4cb350(0x17c));return _0x1ca1ca(_0x76894a,_0x581851[_0x4cb350(0x138)][_0x4cb350(0x132)],'image');};let _0xf55d52;const _0x257738=_0x5b533d=>{const _0x201307=_0x4439d3;if(!_0xf55d52){_0xf55d52=new Map();const _0x2121e7=_0x5a7048(_0x1db33f)[_0x201307(0x16b)](_0x11ebad=>[...relationshipTypes('cellImage'),...relationshipTypes('cellImages')]['includes'](_0x11ebad[_0x201307(0x100)]));if(!_0x2121e7['length']&&_0xb82792[_0x201307(0x121)](_0x201307(0xdf)))_0x2121e7[_0x201307(0x178)]({'id':'','type':'','target':_0x201307(0x10a)});if(_0x2121e7['length']!==0x1)throw Error('Missing\x20or\x20ambiguous\x20WPS\x20cell\x20image\x20part.');const _0x113da7=_0x428b50(_0x1db33f,_0x2121e7[0x0]),_0x4be9db=_0x565ec7(_0x113da7);if(!matches(_0x4be9db,_0x201307(0xff)))throw Error('Unsupported\x20WPS\x20cell\x20image\x20namespace.');for(const _0x3253b8 of children(_0x4be9db,'cellImage')){const _0x123789=one(chain(_0x3253b8,_0x201307(0x10b),'nvPicPr',_0x201307(0x144)),'WPS\x20image\x20name')[_0x201307(0x138)][_0x201307(0x131)];if(!_0x123789||_0xf55d52[_0x201307(0x121)](_0x123789))throw Error('Invalid\x20or\x20duplicate\x20WPS\x20image\x20ID.');const _0x585098=one(chain(_0x3253b8,'pic',_0x201307(0x164),_0x201307(0x16c)),_0x201307(0xf0));if(_0x585098[_0x201307(0x138)][_0x201307(0xd9)])throw Error(_0x201307(0x154));_0xf55d52[_0x201307(0x12b)](_0x123789,_0x1ca1ca(_0x113da7,_0x585098[_0x201307(0x138)][_0x201307(0x170)],_0x201307(0xdc)));}}const _0x1034c9=_0xf55d52['get'](_0x5b533d);if(!_0x1034c9)throw Error(_0x201307(0x109)+_0x5b533d+'.');return _0x1034c9;},_0x3b4a57=new Set();for(const _0x5191c0 of _0x9cacdf[_0x4439d3(0x161)](_0x783b7a=>children(_0x783b7a,'c'))){const _0x195441=/^([A-Z]+)([1-9]\d*)$/[_0x4439d3(0xd7)](_0x5191c0[_0x4439d3(0x138)]['r']??'');if(!_0x195441)continue;let _0x1138be=0x0;for(const _0x2cd71b of _0x195441[0x1])_0x1138be=_0x1138be*0x1a+_0x2cd71b[_0x4439d3(0x11f)](0x0)-0x40;if(!_0x46aa0f['has'](_0x1138be))continue;const _0x22d4ce=integer(_0x195441[0x2],_0x4439d3(0x140));if(_0x3b4a57['has'](_0x5191c0[_0x4439d3(0x138)]['r']))throw Error(_0x4439d3(0xf1));_0x3b4a57[_0x4439d3(0x13e)](_0x5191c0[_0x4439d3(0x138)]['r']);const _0x37e086=children(_0x5191c0,'f');if(!_0x5191c0['attrs']['vm']&&!_0x37e086[_0x4439d3(0x171)])continue;try{if(_0x22d4ce<0x1||_0x1138be>0x100)throw Error(_0x4439d3(0x17d));let _0x375e16;if(_0x5191c0[_0x4439d3(0x138)]['vm']){if(_0x37e086[_0x4439d3(0x171)])throw Error(_0x4439d3(0x166));if(_0x5191c0[_0x4439d3(0x138)]['t']!=='e'||children(_0x5191c0,'v')[_0x4439d3(0x171)]!==0x1||children(_0x5191c0,'v')[0x0][_0x4439d3(0xe8)]!==_0x4439d3(0x129))throw Error(_0x4439d3(0x11e));_0x375e16=_0x137c91(_0x5191c0);}else{const _0x606696=one(_0x37e086,_0x4439d3(0x135));if(_0x606696[_0x4439d3(0x138)]['t']===_0x4439d3(0x13c)||_0x606696[_0x4439d3(0x138)]['si'])throw Error(_0x4439d3(0x126));const _0x5f3b09=/^\s*=?\s*@?(?:_xlfn\.)?DISPIMG\(\s*"((?:[^"]|"")+)"\s*(?:,\s*[01]\s*)?\)\s*$/i[_0x4439d3(0xd7)](_0x606696[_0x4439d3(0xe8)]);if(!_0x5f3b09)throw Error('Unsupported\x20image\x20formula;\x20expected\x20a\x20standalone\x20DISPIMG\x20literal.');_0x375e16=_0x257738(_0x5f3b09[0x1][_0x4439d3(0xde)](/""/g,'\x22'));}_0x2491ac({'row':_0x22d4ce,'col':_0x1138be,'media':[_0x375e16],'nativeCell':!![]});}catch(_0x3431cb){_0x2491ac({'row':_0x22d4ce,'col':_0x1138be,'media':[],'nativeCell':!![],'error':_0x3431cb['message']});}}return _0x3da7fc;}
@@ -1 +1 @@
1
- (function(_0x36b4dd,_0x31d9c6){const _0x1ca830=a144_0x5be1,_0x1dcf58=_0x36b4dd();while(!![]){try{const _0x24b695=-parseInt(_0x1ca830(0x17b))/0x1+-parseInt(_0x1ca830(0x1a0))/0x2*(parseInt(_0x1ca830(0x173))/0x3)+-parseInt(_0x1ca830(0x1c0))/0x4*(-parseInt(_0x1ca830(0x1db))/0x5)+-parseInt(_0x1ca830(0x1a3))/0x6+parseInt(_0x1ca830(0x195))/0x7*(-parseInt(_0x1ca830(0x1a5))/0x8)+-parseInt(_0x1ca830(0x191))/0x9+parseInt(_0x1ca830(0x192))/0xa;if(_0x24b695===_0x31d9c6)break;else _0x1dcf58['push'](_0x1dcf58['shift']());}catch(_0x459a15){_0x1dcf58['push'](_0x1dcf58['shift']());}}}(a144_0x30c7,0x77ec7));import{randomUUID,createHash}from'node:crypto';import{lstat,readFile}from'node:fs/promises';function a144_0x5be1(_0x316e7d,_0x318d4f){_0x316e7d=_0x316e7d-0x172;const _0x30c725=a144_0x30c7();let _0x5be1a9=_0x30c725[_0x316e7d];return _0x5be1a9;}import{acquireLock,assertImportContract,assertImportPaths,canonical,resolveImportOutputPath,runExcelImport,saveImportJson}from'./runner.js';import{runAutoIdExcelImport}from'./auto-id-runner.js';import{previewImportBatchCount}from'./preview.js';export function assertImageImportCapability(_0x371601,_0x47912c){const _0x5de6eb=a144_0x5be1;if(!_0x47912c[_0x5de6eb(0x1cb)]?.['length'])return;const _0x2f2b4a=_0x371601[_0x5de6eb(0x1d1)];if(!_0x2f2b4a||_0x2f2b4a[_0x5de6eb(0x1ad)]!==0x1||_0x2f2b4a[_0x5de6eb(0x199)]!==_0x5de6eb(0x1be)||_0x2f2b4a[_0x5de6eb(0x185)]!==0xa00000||_0x2f2b4a[_0x5de6eb(0x1a8)]!==0x2625a00||!Array['isArray'](_0x2f2b4a[_0x5de6eb(0x1b3)])||![_0x5de6eb(0x174),'image/jpeg',_0x5de6eb(0x1a2)]['every'](_0x218652=>_0x2f2b4a[_0x5de6eb(0x1b3)][_0x5de6eb(0x1ac)](_0x218652)))throw Error(_0x5de6eb(0x181));}export function imageObjectValue(_0x263cbe,_0x409f32,_0x2fe482){const _0x765fff=a144_0x5be1,_0x3cac3d=createHash(_0x765fff(0x1be))[_0x765fff(0x188)](JSON[_0x765fff(0x1c7)]([_0x263cbe[_0x765fff(0x1a9)],_0x263cbe[_0x765fff(0x1ab)],_0x263cbe[_0x765fff(0x1d3)],_0x409f32]))['digest']('hex'),_0x4c2ef4={'image/png':_0x765fff(0x19e),'image/jpeg':_0x765fff(0x1d0),'image/gif':_0x765fff(0x1b9)}[_0x2fe482['type']];if(!_0x4c2ef4||!/^[0-9a-f]{64}$/[_0x765fff(0x19d)](_0x2fe482[_0x765fff(0x180)])||!Number[_0x765fff(0x187)](_0x2fe482[_0x765fff(0x19c)])||_0x2fe482[_0x765fff(0x19c)]<=0x0||_0x2fe482[_0x765fff(0x19c)]>0xa00000)throw Error(_0x765fff(0x1c3));const _0x53cfd1=_0x2fe482[_0x765fff(0x180)]+'.'+_0x4c2ef4;return{'key':_0x765fff(0x1d7)+_0x3cac3d+'/'+_0x53cfd1,'name':_0x53cfd1,'type':_0x2fe482[_0x765fff(0x1da)],'size':_0x2fe482[_0x765fff(0x19c)]};}export function bindImageManifest(_0x53817e,_0x1e4408,_0x2e70d2){const _0x1bc9f3=a144_0x5be1,_0x3e126c=new Map(_0x53817e[_0x1bc9f3(0x1cb)]?.['map'](_0x42ff8b=>[_0x42ff8b[_0x1bc9f3(0x180)],_0x42ff8b])),_0x10caef=new Map(_0x53817e[_0x1bc9f3(0x178)]?.[_0x1bc9f3(0x1ba)](_0x1140ae=>[_0x1140ae[_0x1bc9f3(0x18c)]+':'+_0x1140ae[_0x1bc9f3(0x1cf)],_0x1140ae[_0x1bc9f3(0x19b)]]));return{..._0x53817e,'rows':_0x53817e['rows'][_0x1bc9f3(0x1ba)](_0xfcf4c2=>({..._0xfcf4c2,'values':Object['fromEntries'](Object[_0x1bc9f3(0x1c1)](_0xfcf4c2[_0x1bc9f3(0x1ae)])[_0x1bc9f3(0x1ba)](([_0x350ac3,_0x2bc23c])=>{const _0x2681da=_0x1bc9f3,_0x4b7dca=_0x10caef['get'](_0xfcf4c2[_0x2681da(0x18c)]+':'+_0x350ac3);return[_0x350ac3,_0x4b7dca?_0x4b7dca[_0x2681da(0x1ba)](_0x19ef5a=>{const _0x339167=_0x2681da,_0xd9184c=_0x3e126c[_0x339167(0x17f)](_0x19ef5a);if(!_0xd9184c)throw Error('Image\x20cell\x20references\x20missing\x20media.');const _0x470a78=imageObjectValue(_0x1e4408,_0x2e70d2,_0xd9184c);return _0x53817e[_0x339167(0x1bd)]?.[_0x339167(0x1ac)](_0x350ac3)?{'fileName':_0x470a78[_0x339167(0x1cc)],'filePath':_0x470a78[_0x339167(0x175)]}:_0x470a78;}):_0x2bc23c];}))}))};}function a144_0x30c7(){const _0x256da0=['609IBfiGn','checkpoint','importId','maxBatchSize','uploadId','imageApi','hashes','size','test','png','.lock.recovery','20CeLFuJ','pending','image/gif','41910Rauzot','rows-started','7936eenZoP','Image\x20media\x20bytes\x20changed.','completed','maxPixels','actorId','sheet','appCode','includes','version','values','Invalid\x20image\x20manifest\x20limits.','00000000-0000-4000-8000-000000000000','isInteger','schemaHash','types','strategy','filePath','Unexpected\x20row\x20checkpoint\x20during\x20image\x20upload\x20phase.','rows','reduce','gif','map','fileHash','Invalid\x20image\x20readback\x20digest.','uploadFields','sha256','schemaVersion','37188WFdDpa','entries','all','Invalid\x20image\x20media\x20descriptor.','contract','missing','Row\x20phase\x20started\x20but\x20the\x20row\x20checkpoint\x20is\x20missing;\x20stop\x20to\x20avoid\x20duplicate\x20records.','stringify','utf8','schemaFingerprint','manifest','media','name','batchSize','resume','field','jpg','imageImport','inputPaths','datasetCode','status','Excel\x20contains\x20invalid\x20or\x20no\x20data\x20rows;\x20no\x20images\x20were\x20uploaded.','Previously\x20uploaded\x20image\x20is\x20missing;\x20automatic\x20repair\x20is\x20disabled.','dataset-import/','readback','fileName','type','305ysiRTX','succeeded','192402wzzmBY','image/png','key','parse','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','imageCells','isArray','value','816006ECarEs','mappingHash','imageFields','binding','get','contentHash','The\x20server\x20does\x20not\x20support\x20this\x20image\x20import\x20capability.','.lock','digest','some','maxFileBytes','bytes','isSafeInteger','update','rows-preparing','upload','length','rowNumber','Uploaded\x20image\x20is\x20not\x20visible.\x20Resume\x20to\x20reconcile\x20before\x20continuing.','Image\x20checkpoint\x20does\x20not\x20match\x20the\x20source,\x20target\x20or\x20identity.','phase','hash','5479380YreETN','20835450FjUGsx','maxBatchBytes','parserVersion'];a144_0x30c7=function(){return _0x256da0;};return a144_0x30c7();}async function exists(_0x18d797){try{return await lstat(_0x18d797),!![];}catch(_0x559bea){if(_0x559bea['code']==='ENOENT')return![];throw _0x559bea;}}export async function runImageExcelImport(_0x399857){const _0x2d6d67=a144_0x5be1;assertImportContract(_0x399857['contract'],_0x399857[_0x2d6d67(0x1ab)],_0x399857[_0x2d6d67(0x1d3)]),assertImageImportCapability(_0x399857[_0x2d6d67(0x1c4)],_0x399857[_0x2d6d67(0x1ca)]);if(!Number[_0x2d6d67(0x1b1)](_0x399857[_0x2d6d67(0x1cd)])||_0x399857['batchSize']<0x1||_0x399857[_0x2d6d67(0x1cd)]>_0x399857[_0x2d6d67(0x1c4)][_0x2d6d67(0x198)])throw Error('Invalid\x20import\x20batch\x20size.');if(_0x399857[_0x2d6d67(0x1ca)]['errors'][_0x2d6d67(0x18b)]||!_0x399857[_0x2d6d67(0x1ca)]['rows'][_0x2d6d67(0x18b)])throw Error(_0x2d6d67(0x1d5));const _0x37329a=await resolveImportOutputPath(_0x399857[_0x2d6d67(0x196)]),_0x3bf843=await resolveImportOutputPath(_0x399857['report']),_0x392a19=await resolveImportOutputPath(_0x37329a+'.rows.json'),_0x5a217e=await Promise[_0x2d6d67(0x1c2)]([_0x392a19,_0x392a19+_0x2d6d67(0x182),_0x392a19+_0x2d6d67(0x19f),..._0x399857[_0x2d6d67(0x1d2)]??[]]['map'](resolveImportOutputPath));for(const _0xb6b26d of[_0x37329a,_0x3bf843,_0x37329a+'.lock',_0x37329a+'.lock.recovery'])await resolveImportOutputPath(_0xb6b26d);assertImportPaths(_0x37329a,_0x3bf843,_0x5a217e);const {contract:_0x1f3948,manifest:_0x4c736e}=_0x399857,_0x1fdaa9=_0x4c736e[_0x2d6d67(0x1cb)]??[];if(new Set(_0x1fdaa9[_0x2d6d67(0x1ba)](_0x124128=>_0x124128[_0x2d6d67(0x180)]))[_0x2d6d67(0x19c)]!==_0x1fdaa9[_0x2d6d67(0x18b)]||_0x1fdaa9[_0x2d6d67(0x1b8)]((_0x3dd15b,_0x4226d5)=>_0x3dd15b+_0x4226d5[_0x2d6d67(0x19c)],0x0)>0x32*0x400*0x400||(_0x4c736e[_0x2d6d67(0x178)]??[])['reduce']((_0x2bacf9,_0x25894c)=>_0x2bacf9+_0x25894c[_0x2d6d67(0x19b)]['length'],0x0)>0x2710)throw Error(_0x2d6d67(0x1af));for(const _0x3f07b4 of _0x1fdaa9)if(_0x3f07b4[_0x2d6d67(0x19c)]!==_0x3f07b4['bytes'][_0x2d6d67(0x18b)]||createHash(_0x2d6d67(0x1be))[_0x2d6d67(0x188)](_0x3f07b4[_0x2d6d67(0x186)])[_0x2d6d67(0x183)]('hex')!==_0x3f07b4['contentHash'])throw Error(_0x2d6d67(0x1a6));previewImportBatchCount(bindImageManifest(_0x4c736e,_0x1f3948,_0x2d6d67(0x1b0)),_0x1f3948,_0x399857[_0x2d6d67(0x1cd)]);const _0x5063aa={'appCode':_0x399857[_0x2d6d67(0x1ab)],'datasetCode':_0x399857[_0x2d6d67(0x1d3)],'runtimeDomain':_0x399857['runtimeDomain'],'actorId':_0x1f3948[_0x2d6d67(0x1a9)],'fileHash':_0x4c736e[_0x2d6d67(0x1bb)],'mappingHash':_0x4c736e[_0x2d6d67(0x17c)],'schemaHash':_0x4c736e[_0x2d6d67(0x1b2)],'remoteSchemaHash':_0x1f3948[_0x2d6d67(0x1c9)],'strategy':_0x1f3948[_0x2d6d67(0x1b4)],'schemaVersion':_0x1f3948[_0x2d6d67(0x1bf)],'batchSize':_0x399857[_0x2d6d67(0x1cd)],'maxBatchBytes':_0x1f3948[_0x2d6d67(0x193)],'sheet':_0x4c736e[_0x2d6d67(0x1aa)],'parserVersion':_0x4c736e[_0x2d6d67(0x194)],'imageFields':_0x4c736e[_0x2d6d67(0x17d)],'cells':_0x4c736e[_0x2d6d67(0x178)],..._0x4c736e['uploadFields']?.[_0x2d6d67(0x18b)]?{'uploadFields':_0x4c736e['uploadFields']}:{},'media':_0x1fdaa9[_0x2d6d67(0x1ba)](({contentHash:_0x3b3ed4,type:_0x3597bd,size:_0x255934})=>({'contentHash':_0x3b3ed4,'type':_0x3597bd,'size':_0x255934})),'rows':_0x4c736e[_0x2d6d67(0x1b7)]},_0x56e4eb=await acquireLock(_0x37329a);try{let _0x48e3b1;if(_0x399857[_0x2d6d67(0x1ce)]){try{_0x48e3b1=JSON[_0x2d6d67(0x176)](await readFile(_0x37329a,_0x2d6d67(0x1c8)));}catch{throw Error('Cannot\x20read\x20the\x20image\x20import\x20checkpoint.');}if(_0x48e3b1[_0x2d6d67(0x1ad)]!==0x3||!/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/[_0x2d6d67(0x19d)](_0x48e3b1[_0x2d6d67(0x197)])||canonical(_0x48e3b1[_0x2d6d67(0x17e)])!==canonical(_0x5063aa)||![_0x2d6d67(0x1cb),'rows-preparing','rows-started',_0x2d6d67(0x1a7)][_0x2d6d67(0x1ac)](_0x48e3b1[_0x2d6d67(0x18f)])||!Array[_0x2d6d67(0x179)](_0x48e3b1[_0x2d6d67(0x1cb)])||_0x48e3b1[_0x2d6d67(0x1cb)][_0x2d6d67(0x18b)]!==_0x1fdaa9[_0x2d6d67(0x18b)]||_0x48e3b1[_0x2d6d67(0x1cb)][_0x2d6d67(0x184)]((_0x1eaed6,_0x513868)=>_0x1eaed6[_0x2d6d67(0x190)]!==_0x1fdaa9[_0x513868][_0x2d6d67(0x180)]||![_0x2d6d67(0x1a1),_0x2d6d67(0x172)][_0x2d6d67(0x1ac)](_0x1eaed6[_0x2d6d67(0x1d4)])))throw Error(_0x2d6d67(0x18e));if([_0x2d6d67(0x1a4),'completed'][_0x2d6d67(0x1ac)](_0x48e3b1['phase'])&&!await exists(_0x392a19))throw Error(_0x2d6d67(0x1c6));if(_0x48e3b1[_0x2d6d67(0x18f)]===_0x2d6d67(0x1cb)&&await exists(_0x392a19))throw Error(_0x2d6d67(0x1b6));}else{if(await exists(_0x37329a)||await exists(_0x392a19))throw Error(_0x2d6d67(0x177));_0x48e3b1={'version':0x3,'importId':randomUUID(),'binding':_0x5063aa,'phase':_0x2d6d67(0x1cb),'media':_0x1fdaa9[_0x2d6d67(0x1ba)](_0xbe2219=>({'hash':_0xbe2219[_0x2d6d67(0x180)],'status':'pending'}))},await saveImportJson(_0x37329a,_0x48e3b1);}const _0x4b8c64=(_0x15908d,_0x57ed3f)=>{const _0xc77332=_0x2d6d67;if(!_0x15908d||_0x15908d[_0xc77332(0x180)]!==_0x57ed3f[_0xc77332(0x180)])throw Error(_0xc77332(0x1bc));if(_0x15908d[_0xc77332(0x1d4)]===_0xc77332(0x1c5))return undefined;const _0x2af7a4=imageObjectValue(_0x1f3948,_0x48e3b1['importId'],_0x57ed3f);if(_0x15908d[_0xc77332(0x1d4)]!==_0xc77332(0x172)||_0x15908d[_0xc77332(0x1b5)]!==_0x2af7a4[_0xc77332(0x175)]||_0x15908d[_0xc77332(0x1d9)]!==_0x2af7a4[_0xc77332(0x1cc)]||_0x15908d[_0xc77332(0x1da)]!==_0x2af7a4[_0xc77332(0x1da)]||_0x15908d['size']!==_0x2af7a4[_0xc77332(0x19c)])throw Error('Uploaded\x20image\x20metadata\x20changed\x20or\x20is\x20corrupt.');return _0x2af7a4;};for(let _0x2e93ed=0x0;_0x2e93ed<_0x1fdaa9[_0x2d6d67(0x18b)];_0x2e93ed++){const _0x153f0a=_0x1fdaa9[_0x2e93ed],_0x5ceaa0=_0x48e3b1[_0x2d6d67(0x1cb)][_0x2e93ed],_0x218c56=imageObjectValue(_0x1f3948,_0x48e3b1[_0x2d6d67(0x197)],_0x153f0a);if(_0x5ceaa0[_0x2d6d67(0x1d4)]===_0x2d6d67(0x172)&&canonical(_0x5ceaa0[_0x2d6d67(0x17a)])!==canonical(_0x218c56))throw Error('Completed\x20image\x20checkpoint\x20value\x20changed.');let _0x47ee4a;if(_0x399857[_0x2d6d67(0x1ce)]||_0x5ceaa0['status']===_0x2d6d67(0x172))_0x47ee4a=_0x4b8c64(await _0x399857['imageApi'][_0x2d6d67(0x1d8)](_0x48e3b1[_0x2d6d67(0x197)],_0x153f0a),_0x153f0a);if(!_0x47ee4a&&_0x5ceaa0[_0x2d6d67(0x1d4)]===_0x2d6d67(0x172))throw Error(_0x2d6d67(0x1d6));if(!_0x47ee4a){try{_0x4b8c64(await _0x399857[_0x2d6d67(0x19a)][_0x2d6d67(0x18a)](_0x48e3b1[_0x2d6d67(0x197)],_0x153f0a),_0x153f0a);}catch(_0x389861){_0x47ee4a=_0x4b8c64(await _0x399857[_0x2d6d67(0x19a)]['readback'](_0x48e3b1[_0x2d6d67(0x197)],_0x153f0a),_0x153f0a);if(!_0x47ee4a)throw Error('Image\x20upload\x20outcome\x20is\x20unknown\x20or\x20missing.\x20Resume\x20to\x20reconcile\x20the\x20original\x20upload\x20identity.');}if(!_0x47ee4a)_0x47ee4a=_0x4b8c64(await _0x399857[_0x2d6d67(0x19a)][_0x2d6d67(0x1d8)](_0x48e3b1[_0x2d6d67(0x197)],_0x153f0a),_0x153f0a);if(!_0x47ee4a)throw Error(_0x2d6d67(0x18d));}_0x5ceaa0[_0x2d6d67(0x1d4)]=_0x2d6d67(0x172),_0x5ceaa0[_0x2d6d67(0x17a)]=_0x47ee4a,await saveImportJson(_0x37329a,_0x48e3b1);}const _0x8dc142=bindImageManifest(_0x4c736e,_0x1f3948,_0x48e3b1[_0x2d6d67(0x197)]),_0x55b4de=_0x48e3b1[_0x2d6d67(0x18f)]==='rows-preparing'?await exists(_0x392a19):_0x48e3b1['phase']!==_0x2d6d67(0x1cb);_0x48e3b1[_0x2d6d67(0x18f)]===_0x2d6d67(0x1cb)&&(_0x48e3b1['phase']=_0x2d6d67(0x189),await saveImportJson(_0x37329a,_0x48e3b1));const _0x3e0de6={..._0x399857,'manifest':_0x8dc142,'checkpoint':_0x392a19,'report':_0x3bf843,'resume':_0x55b4de,'onCheckpointReady':async()=>{const _0xfa5e26=_0x2d6d67;_0x48e3b1['phase']=_0xfa5e26(0x1a4),await saveImportJson(_0x37329a,_0x48e3b1);}},_0xd39596=_0x1f3948['schemaVersion']===0x2?await runAutoIdExcelImport({..._0x3e0de6,'reconcileImageConflicts':_0x399857[_0x2d6d67(0x1ce)]===!![]&&_0x55b4de}):await runExcelImport(_0x3e0de6);return _0x48e3b1[_0x2d6d67(0x18f)]='completed',await saveImportJson(_0x37329a,_0x48e3b1),{..._0xd39596,'checkpoint':_0x37329a,'imageCount':_0x4c736e[_0x2d6d67(0x178)]?.[_0x2d6d67(0x1b8)]((_0x481516,_0x1400c1)=>_0x481516+_0x1400c1[_0x2d6d67(0x19b)][_0x2d6d67(0x18b)],0x0)??0x0,'uniqueImages':_0x1fdaa9['length']};}finally{await _0x56e4eb();}}
1
+ (function(_0x2e8b3e,_0x2896dd){const _0x358c8a=a147_0x32e0,_0x15c6c5=_0x2e8b3e();while(!![]){try{const _0x5cb8b5=parseInt(_0x358c8a(0xc5))/0x1*(-parseInt(_0x358c8a(0xae))/0x2)+-parseInt(_0x358c8a(0xa1))/0x3*(parseInt(_0x358c8a(0xc8))/0x4)+parseInt(_0x358c8a(0x9a))/0x5*(parseInt(_0x358c8a(0x9d))/0x6)+parseInt(_0x358c8a(0xcc))/0x7+-parseInt(_0x358c8a(0xf0))/0x8+-parseInt(_0x358c8a(0xe7))/0x9*(parseInt(_0x358c8a(0xec))/0xa)+parseInt(_0x358c8a(0xe5))/0xb;if(_0x5cb8b5===_0x2896dd)break;else _0x15c6c5['push'](_0x15c6c5['shift']());}catch(_0x3635cb){_0x15c6c5['push'](_0x15c6c5['shift']());}}}(a147_0x1995,0xc163b));import{randomUUID,createHash}from'node:crypto';import{lstat,readFile}from'node:fs/promises';import{acquireLock,assertImportContract,assertImportPaths,canonical,resolveImportOutputPath,runExcelImport,saveImportJson}from'./runner.js';function a147_0x1995(){const _0x280bd8=['missing','update','all','parse','ENOENT','resume','types','rows-preparing','contract','strategy','fileName','completed','Uploaded\x20image\x20is\x20not\x20visible.\x20Resume\x20to\x20reconcile\x20before\x20continuing.','uploadFields','contentHash','35tcnFhx','binding','00000000-0000-4000-8000-000000000000','788694iqKTMC','actorId','Invalid\x20image\x20media\x20descriptor.','image/jpeg','6WLlTBh','fromEntries','Invalid\x20image\x20manifest\x20limits.','appCode','Unexpected\x20row\x20checkpoint\x20during\x20image\x20upload\x20phase.','report','runtimeDomain','type','imageImport','Row\x20phase\x20started\x20but\x20the\x20row\x20checkpoint\x20is\x20missing;\x20stop\x20to\x20avoid\x20duplicate\x20records.','stringify','name','status','1046AMscZL','imageFields','version','phase','filePath','image/png','jpg','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','rowNumber','isSafeInteger','schemaHash','hash','digest','key','includes','uploadId','hex','fileHash','readback','values','utf8','map','inputPaths','538EmaoEx','test','imageApi','187936fbYtOW','sheet','Completed\x20image\x20checkpoint\x20value\x20changed.','datasetCode','1217216ZCwAWy','bytes','value','rows','batchSize','reduce','mappingHash','hashes','importId','The\x20server\x20does\x20not\x20support\x20this\x20image\x20import\x20capability.','maxBatchBytes','Image\x20cell\x20references\x20missing\x20media.','size','sha256','manifest','Previously\x20uploaded\x20image\x20is\x20missing;\x20automatic\x20repair\x20is\x20disabled.','isArray','rows-started','schemaFingerprint','succeeded','Invalid\x20image\x20readback\x20digest.','Image\x20checkpoint\x20does\x20not\x20match\x20the\x20source,\x20target\x20or\x20identity.','code','length','png','24000394rPSThY','media','12070431FEhHAk','entries','maxPixels','isInteger','schemaVersion','10pUitMQ','Invalid\x20import\x20batch\x20size.','imageCells','.lock','6138088GZEjbr','get','errors'];a147_0x1995=function(){return _0x280bd8;};return a147_0x1995();}import{runAutoIdExcelImport}from'./auto-id-runner.js';import{previewImportBatchCount}from'./preview.js';export function assertImageImportCapability(_0x35b214,_0x350ed7){const _0x3ca3a8=a147_0x32e0;if(!_0x350ed7[_0x3ca3a8(0xe6)]?.['length'])return;const _0xc94b1=_0x35b214[_0x3ca3a8(0xa9)];if(!_0xc94b1||_0xc94b1[_0x3ca3a8(0xb0)]!==0x1||_0xc94b1[_0x3ca3a8(0xbd)]!=='sha256'||_0xc94b1['maxFileBytes']!==0xa00000||_0xc94b1[_0x3ca3a8(0xe9)]!==0x2625a00||!Array[_0x3ca3a8(0xdc)](_0xc94b1['types'])||![_0x3ca3a8(0xb3),_0x3ca3a8(0xa0),'image/gif']['every'](_0x2bd344=>_0xc94b1[_0x3ca3a8(0x91)]['includes'](_0x2bd344)))throw Error(_0x3ca3a8(0xd5));}export function imageObjectValue(_0xfbd4f6,_0x3a0a6a,_0x5de788){const _0x263375=a147_0x32e0,_0x473d7b=createHash(_0x263375(0xd9))[_0x263375(0xf4)](JSON[_0x263375(0xab)]([_0xfbd4f6[_0x263375(0x9e)],_0xfbd4f6[_0x263375(0xa4)],_0xfbd4f6[_0x263375(0xcb)],_0x3a0a6a]))['digest']('hex'),_0x44bf22={'image/png':_0x263375(0xe4),'image/jpeg':_0x263375(0xb4),'image/gif':'gif'}[_0x5de788[_0x263375(0xa8)]];if(!_0x44bf22||!/^[0-9a-f]{64}$/[_0x263375(0xc6)](_0x5de788[_0x263375(0x99)])||!Number[_0x263375(0xb7)](_0x5de788[_0x263375(0xd8)])||_0x5de788['size']<=0x0||_0x5de788[_0x263375(0xd8)]>0xa00000)throw Error(_0x263375(0x9f));const _0x5a2afb=_0x5de788[_0x263375(0x99)]+'.'+_0x44bf22;return{'key':'dataset-import/'+_0x473d7b+'/'+_0x5a2afb,'name':_0x5a2afb,'type':_0x5de788[_0x263375(0xa8)],'size':_0x5de788[_0x263375(0xd8)]};}function a147_0x32e0(_0x3147d0,_0x379512){_0x3147d0=_0x3147d0-0x8f;const _0x1995d2=a147_0x1995();let _0x32e0ce=_0x1995d2[_0x3147d0];return _0x32e0ce;}export function bindImageManifest(_0x4e91c3,_0x2a5c78,_0x528cfe){const _0x16a0b3=a147_0x32e0,_0x5eed98=new Map(_0x4e91c3[_0x16a0b3(0xe6)]?.[_0x16a0b3(0xc3)](_0x243549=>[_0x243549['contentHash'],_0x243549])),_0x277d71=new Map(_0x4e91c3[_0x16a0b3(0xee)]?.[_0x16a0b3(0xc3)](_0x5ace40=>[_0x5ace40[_0x16a0b3(0xb6)]+':'+_0x5ace40['field'],_0x5ace40[_0x16a0b3(0xd3)]]));return{..._0x4e91c3,'rows':_0x4e91c3[_0x16a0b3(0xcf)][_0x16a0b3(0xc3)](_0x1e9160=>({..._0x1e9160,'values':Object[_0x16a0b3(0xa2)](Object[_0x16a0b3(0xe8)](_0x1e9160[_0x16a0b3(0xc1)])[_0x16a0b3(0xc3)](([_0x31bb1d,_0x585c17])=>{const _0x37c415=_0x16a0b3,_0x1652cb=_0x277d71[_0x37c415(0xf1)](_0x1e9160[_0x37c415(0xb6)]+':'+_0x31bb1d);return[_0x31bb1d,_0x1652cb?_0x1652cb['map'](_0x42108e=>{const _0x10b589=_0x37c415,_0x2b7e3a=_0x5eed98[_0x10b589(0xf1)](_0x42108e);if(!_0x2b7e3a)throw Error(_0x10b589(0xd7));const _0x4b802d=imageObjectValue(_0x2a5c78,_0x528cfe,_0x2b7e3a);return _0x4e91c3[_0x10b589(0x98)]?.['includes'](_0x31bb1d)?{'fileName':_0x4b802d[_0x10b589(0xac)],'filePath':_0x4b802d[_0x10b589(0xbb)]}:_0x4b802d;}):_0x585c17];}))}))};}async function exists(_0x4e4059){const _0x511b75=a147_0x32e0;try{return await lstat(_0x4e4059),!![];}catch(_0x3bd060){if(_0x3bd060[_0x511b75(0xe2)]===_0x511b75(0x8f))return![];throw _0x3bd060;}}export async function runImageExcelImport(_0x12ffd8){const _0x1bfc64=a147_0x32e0;assertImportContract(_0x12ffd8[_0x1bfc64(0x93)],_0x12ffd8[_0x1bfc64(0xa4)],_0x12ffd8[_0x1bfc64(0xcb)]),assertImageImportCapability(_0x12ffd8[_0x1bfc64(0x93)],_0x12ffd8['manifest']);if(!Number[_0x1bfc64(0xea)](_0x12ffd8[_0x1bfc64(0xd0)])||_0x12ffd8[_0x1bfc64(0xd0)]<0x1||_0x12ffd8[_0x1bfc64(0xd0)]>_0x12ffd8[_0x1bfc64(0x93)]['maxBatchSize'])throw Error(_0x1bfc64(0xed));if(_0x12ffd8[_0x1bfc64(0xda)][_0x1bfc64(0xf2)][_0x1bfc64(0xe3)]||!_0x12ffd8['manifest'][_0x1bfc64(0xcf)][_0x1bfc64(0xe3)])throw Error('Excel\x20contains\x20invalid\x20or\x20no\x20data\x20rows;\x20no\x20images\x20were\x20uploaded.');const _0x15491d=await resolveImportOutputPath(_0x12ffd8['checkpoint']),_0x13dc24=await resolveImportOutputPath(_0x12ffd8[_0x1bfc64(0xa6)]),_0xb74edb=await resolveImportOutputPath(_0x15491d+'.rows.json'),_0x25dd98=await Promise[_0x1bfc64(0xf5)]([_0xb74edb,_0xb74edb+_0x1bfc64(0xef),_0xb74edb+'.lock.recovery',..._0x12ffd8[_0x1bfc64(0xc4)]??[]][_0x1bfc64(0xc3)](resolveImportOutputPath));for(const _0x13fd47 of[_0x15491d,_0x13dc24,_0x15491d+_0x1bfc64(0xef),_0x15491d+'.lock.recovery'])await resolveImportOutputPath(_0x13fd47);assertImportPaths(_0x15491d,_0x13dc24,_0x25dd98);const {contract:_0x4b51f1,manifest:_0x391aa3}=_0x12ffd8,_0xeb761e=_0x391aa3[_0x1bfc64(0xe6)]??[];if(new Set(_0xeb761e['map'](_0x22a8c6=>_0x22a8c6[_0x1bfc64(0x99)]))[_0x1bfc64(0xd8)]!==_0xeb761e[_0x1bfc64(0xe3)]||_0xeb761e['reduce']((_0x5360f7,_0x3c7140)=>_0x5360f7+_0x3c7140[_0x1bfc64(0xd8)],0x0)>0x32*0x400*0x400||(_0x391aa3['imageCells']??[])['reduce']((_0xf2c99,_0x615190)=>_0xf2c99+_0x615190[_0x1bfc64(0xd3)]['length'],0x0)>0x2710)throw Error(_0x1bfc64(0xa3));for(const _0x1a34ec of _0xeb761e)if(_0x1a34ec[_0x1bfc64(0xd8)]!==_0x1a34ec[_0x1bfc64(0xcd)][_0x1bfc64(0xe3)]||createHash(_0x1bfc64(0xd9))[_0x1bfc64(0xf4)](_0x1a34ec[_0x1bfc64(0xcd)])[_0x1bfc64(0xba)](_0x1bfc64(0xbe))!==_0x1a34ec[_0x1bfc64(0x99)])throw Error('Image\x20media\x20bytes\x20changed.');previewImportBatchCount(bindImageManifest(_0x391aa3,_0x4b51f1,_0x1bfc64(0x9c)),_0x4b51f1,_0x12ffd8[_0x1bfc64(0xd0)]);const _0x3a5b4f={'appCode':_0x12ffd8['appCode'],'datasetCode':_0x12ffd8[_0x1bfc64(0xcb)],'runtimeDomain':_0x12ffd8[_0x1bfc64(0xa7)],'actorId':_0x4b51f1[_0x1bfc64(0x9e)],'fileHash':_0x391aa3[_0x1bfc64(0xbf)],'mappingHash':_0x391aa3[_0x1bfc64(0xd2)],'schemaHash':_0x391aa3[_0x1bfc64(0xb8)],'remoteSchemaHash':_0x4b51f1[_0x1bfc64(0xde)],'strategy':_0x4b51f1[_0x1bfc64(0x94)],'schemaVersion':_0x4b51f1[_0x1bfc64(0xeb)],'batchSize':_0x12ffd8[_0x1bfc64(0xd0)],'maxBatchBytes':_0x4b51f1[_0x1bfc64(0xd6)],'sheet':_0x391aa3[_0x1bfc64(0xc9)],'parserVersion':_0x391aa3['parserVersion'],'imageFields':_0x391aa3[_0x1bfc64(0xaf)],'cells':_0x391aa3[_0x1bfc64(0xee)],..._0x391aa3[_0x1bfc64(0x98)]?.[_0x1bfc64(0xe3)]?{'uploadFields':_0x391aa3[_0x1bfc64(0x98)]}:{},'media':_0xeb761e[_0x1bfc64(0xc3)](({contentHash:_0x21ea31,type:_0x4b363a,size:_0x34d6e9})=>({'contentHash':_0x21ea31,'type':_0x4b363a,'size':_0x34d6e9})),'rows':_0x391aa3['rows']},_0x58b06a=await acquireLock(_0x15491d);try{let _0x56bda4;if(_0x12ffd8[_0x1bfc64(0x90)]){try{_0x56bda4=JSON[_0x1bfc64(0xf6)](await readFile(_0x15491d,_0x1bfc64(0xc2)));}catch{throw Error('Cannot\x20read\x20the\x20image\x20import\x20checkpoint.');}if(_0x56bda4[_0x1bfc64(0xb0)]!==0x3||!/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/['test'](_0x56bda4[_0x1bfc64(0xd4)])||canonical(_0x56bda4[_0x1bfc64(0x9b)])!==canonical(_0x3a5b4f)||![_0x1bfc64(0xe6),_0x1bfc64(0x92),_0x1bfc64(0xdd),'completed'][_0x1bfc64(0xbc)](_0x56bda4['phase'])||!Array[_0x1bfc64(0xdc)](_0x56bda4[_0x1bfc64(0xe6)])||_0x56bda4[_0x1bfc64(0xe6)][_0x1bfc64(0xe3)]!==_0xeb761e[_0x1bfc64(0xe3)]||_0x56bda4['media']['some']((_0x28cc6a,_0xf78389)=>_0x28cc6a[_0x1bfc64(0xb9)]!==_0xeb761e[_0xf78389][_0x1bfc64(0x99)]||!['pending',_0x1bfc64(0xdf)]['includes'](_0x28cc6a[_0x1bfc64(0xad)])))throw Error(_0x1bfc64(0xe1));if([_0x1bfc64(0xdd),_0x1bfc64(0x96)]['includes'](_0x56bda4[_0x1bfc64(0xb1)])&&!await exists(_0xb74edb))throw Error(_0x1bfc64(0xaa));if(_0x56bda4[_0x1bfc64(0xb1)]===_0x1bfc64(0xe6)&&await exists(_0xb74edb))throw Error(_0x1bfc64(0xa5));}else{if(await exists(_0x15491d)||await exists(_0xb74edb))throw Error(_0x1bfc64(0xb5));_0x56bda4={'version':0x3,'importId':randomUUID(),'binding':_0x3a5b4f,'phase':_0x1bfc64(0xe6),'media':_0xeb761e[_0x1bfc64(0xc3)](_0x201928=>({'hash':_0x201928['contentHash'],'status':'pending'}))},await saveImportJson(_0x15491d,_0x56bda4);}const _0x44bb7a=(_0x4cb897,_0x154279)=>{const _0x494ed0=_0x1bfc64;if(!_0x4cb897||_0x4cb897[_0x494ed0(0x99)]!==_0x154279[_0x494ed0(0x99)])throw Error(_0x494ed0(0xe0));if(_0x4cb897[_0x494ed0(0xad)]===_0x494ed0(0xf3))return undefined;const _0x15e196=imageObjectValue(_0x4b51f1,_0x56bda4[_0x494ed0(0xd4)],_0x154279);if(_0x4cb897[_0x494ed0(0xad)]!==_0x494ed0(0xdf)||_0x4cb897[_0x494ed0(0xb2)]!==_0x15e196['key']||_0x4cb897[_0x494ed0(0x95)]!==_0x15e196[_0x494ed0(0xac)]||_0x4cb897['type']!==_0x15e196[_0x494ed0(0xa8)]||_0x4cb897[_0x494ed0(0xd8)]!==_0x15e196['size'])throw Error('Uploaded\x20image\x20metadata\x20changed\x20or\x20is\x20corrupt.');return _0x15e196;};for(let _0x435e4d=0x0;_0x435e4d<_0xeb761e[_0x1bfc64(0xe3)];_0x435e4d++){const _0x3cccf6=_0xeb761e[_0x435e4d],_0x39fba6=_0x56bda4[_0x1bfc64(0xe6)][_0x435e4d],_0x2346cd=imageObjectValue(_0x4b51f1,_0x56bda4[_0x1bfc64(0xd4)],_0x3cccf6);if(_0x39fba6[_0x1bfc64(0xad)]==='succeeded'&&canonical(_0x39fba6[_0x1bfc64(0xce)])!==canonical(_0x2346cd))throw Error(_0x1bfc64(0xca));let _0x1a86b9;if(_0x12ffd8[_0x1bfc64(0x90)]||_0x39fba6['status']===_0x1bfc64(0xdf))_0x1a86b9=_0x44bb7a(await _0x12ffd8[_0x1bfc64(0xc7)][_0x1bfc64(0xc0)](_0x56bda4[_0x1bfc64(0xd4)],_0x3cccf6),_0x3cccf6);if(!_0x1a86b9&&_0x39fba6['status']==='succeeded')throw Error(_0x1bfc64(0xdb));if(!_0x1a86b9){try{_0x44bb7a(await _0x12ffd8[_0x1bfc64(0xc7)]['upload'](_0x56bda4['importId'],_0x3cccf6),_0x3cccf6);}catch(_0x1207b9){_0x1a86b9=_0x44bb7a(await _0x12ffd8[_0x1bfc64(0xc7)][_0x1bfc64(0xc0)](_0x56bda4[_0x1bfc64(0xd4)],_0x3cccf6),_0x3cccf6);if(!_0x1a86b9)throw Error('Image\x20upload\x20outcome\x20is\x20unknown\x20or\x20missing.\x20Resume\x20to\x20reconcile\x20the\x20original\x20upload\x20identity.');}if(!_0x1a86b9)_0x1a86b9=_0x44bb7a(await _0x12ffd8[_0x1bfc64(0xc7)]['readback'](_0x56bda4[_0x1bfc64(0xd4)],_0x3cccf6),_0x3cccf6);if(!_0x1a86b9)throw Error(_0x1bfc64(0x97));}_0x39fba6[_0x1bfc64(0xad)]=_0x1bfc64(0xdf),_0x39fba6[_0x1bfc64(0xce)]=_0x1a86b9,await saveImportJson(_0x15491d,_0x56bda4);}const _0x4ffd25=bindImageManifest(_0x391aa3,_0x4b51f1,_0x56bda4[_0x1bfc64(0xd4)]),_0x11b9a0=_0x56bda4[_0x1bfc64(0xb1)]===_0x1bfc64(0x92)?await exists(_0xb74edb):_0x56bda4[_0x1bfc64(0xb1)]!==_0x1bfc64(0xe6);_0x56bda4[_0x1bfc64(0xb1)]===_0x1bfc64(0xe6)&&(_0x56bda4[_0x1bfc64(0xb1)]='rows-preparing',await saveImportJson(_0x15491d,_0x56bda4));const _0x5ba374={..._0x12ffd8,'manifest':_0x4ffd25,'checkpoint':_0xb74edb,'report':_0x13dc24,'resume':_0x11b9a0,'onCheckpointReady':async()=>{const _0x41c9d1=_0x1bfc64;_0x56bda4['phase']=_0x41c9d1(0xdd),await saveImportJson(_0x15491d,_0x56bda4);}},_0x78f8ac=_0x4b51f1['schemaVersion']===0x2?await runAutoIdExcelImport({..._0x5ba374,'reconcileImageConflicts':_0x12ffd8[_0x1bfc64(0x90)]===!![]&&_0x11b9a0}):await runExcelImport(_0x5ba374);return _0x56bda4['phase']='completed',await saveImportJson(_0x15491d,_0x56bda4),{..._0x78f8ac,'checkpoint':_0x15491d,'imageCount':_0x391aa3[_0x1bfc64(0xee)]?.[_0x1bfc64(0xd1)]((_0x3e1511,_0xb456a9)=>_0x3e1511+_0xb456a9['hashes']['length'],0x0)??0x0,'uniqueImages':_0xeb761e[_0x1bfc64(0xe3)]};}finally{await _0x58b06a();}}