@lovrabet/lovrabet-cli 2.3.6-beta.2 → 2.3.6-beta.3

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 (184) hide show
  1. package/README.md +33 -2
  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/kb/index.js +1 -1
  38. package/lib/commands/logs/index.js +1 -1
  39. package/lib/commands/notification/config-list.js +1 -1
  40. package/lib/commands/notification/index.js +1 -1
  41. package/lib/commands/notification/shared.js +1 -1
  42. package/lib/commands/ocr/index.js +1 -1
  43. package/lib/commands/permit/dataset-get.js +1 -1
  44. package/lib/commands/permit/dataset-set.js +1 -1
  45. package/lib/commands/permit/index.js +1 -1
  46. package/lib/commands/permit/page-get.js +1 -1
  47. package/lib/commands/permit/page-set.js +1 -1
  48. package/lib/commands/permit/role-menus-set.js +1 -1
  49. package/lib/commands/permit/role-menus.js +1 -1
  50. package/lib/commands/permit/shared.js +1 -1
  51. package/lib/commands/personal-bff/index.js +1 -1
  52. package/lib/commands/registry.js +1 -1
  53. package/lib/commands/role/create.js +1 -1
  54. package/lib/commands/role/delete.js +1 -1
  55. package/lib/commands/role/detail.js +1 -1
  56. package/lib/commands/role/index.js +1 -1
  57. package/lib/commands/role/list.js +1 -1
  58. package/lib/commands/role/shared.js +1 -1
  59. package/lib/commands/role/update.js +1 -1
  60. package/lib/commands/role/user-add.js +1 -1
  61. package/lib/commands/role/user-remove.js +1 -1
  62. package/lib/commands/schedule/index.js +1 -1
  63. package/lib/commands/schema.js +1 -1
  64. package/lib/commands/service/dynamic.js +1 -1
  65. package/lib/commands/service/function-name-adapter.js +1 -1
  66. package/lib/commands/service/index.js +1 -1
  67. package/lib/commands/service/registry.js +1 -1
  68. package/lib/commands/skill/commands/create.js +1 -1
  69. package/lib/commands/skill/commands/diagram.js +1 -1
  70. package/lib/commands/skill/commands/install.js +1 -1
  71. package/lib/commands/skill/commands/list.js +1 -1
  72. package/lib/commands/skill/commands/push.js +1 -1
  73. package/lib/commands/skill/commands/validate.js +1 -1
  74. package/lib/commands/skill/diagram.js +1 -1
  75. package/lib/commands/skill/flags.js +1 -1
  76. package/lib/commands/skill/index.js +1 -1
  77. package/lib/commands/skill/manifest-helpers.js +1 -1
  78. package/lib/commands/skill/push-execute.js +1 -1
  79. package/lib/commands/skill/push-flow-helpers.js +1 -1
  80. package/lib/commands/skill/push-retarget.js +1 -1
  81. package/lib/commands/skill/scopes.js +1 -1
  82. package/lib/commands/skill/summary.js +1 -1
  83. package/lib/commands/skill/templates.js +1 -1
  84. package/lib/commands/skill/validate.js +1 -1
  85. package/lib/commands/sql/detail.js +1 -1
  86. package/lib/commands/sql/exec.js +1 -1
  87. package/lib/commands/sql/index.js +1 -1
  88. package/lib/commands/update.js +1 -1
  89. package/lib/commands/user-account/bind.js +1 -1
  90. package/lib/commands/user-account/index.js +1 -1
  91. package/lib/commands/workspace/index.js +1 -1
  92. package/lib/config/domain-config.js +1 -1
  93. package/lib/config/schema.js +1 -1
  94. package/lib/constant/app.js +1 -1
  95. package/lib/constant/auth-mode.js +1 -1
  96. package/lib/constant/cli.js +1 -1
  97. package/lib/constant/defaults.js +1 -1
  98. package/lib/constant/distribution.js +1 -1
  99. package/lib/constant/domain.js +1 -1
  100. package/lib/constant/env.js +1 -1
  101. package/lib/constant/output.js +1 -1
  102. package/lib/constant/product.js +1 -1
  103. package/lib/constant/region.js +1 -1
  104. package/lib/constant/risk.js +1 -1
  105. package/lib/constant/url.js +1 -1
  106. package/lib/context.js +1 -1
  107. package/lib/core/api-client.d.ts +6 -6
  108. package/lib/core/api-client.js +1 -1
  109. package/lib/core/db-resolver.js +1 -1
  110. package/lib/core/kb-management-client.d.ts +17 -0
  111. package/lib/core/kb-management-client.js +1 -0
  112. package/lib/core/kb-search-client.js +1 -1
  113. package/lib/core/sdk-client.js +1 -1
  114. package/lib/errors.js +1 -1
  115. package/lib/framework/access-error.js +1 -1
  116. package/lib/framework/build-all-flags.js +1 -1
  117. package/lib/framework/dryrun.js +1 -1
  118. package/lib/framework/flags.js +1 -1
  119. package/lib/framework/help.js +1 -1
  120. package/lib/framework/index.js +1 -1
  121. package/lib/framework/output.js +1 -1
  122. package/lib/framework/preparse.js +1 -1
  123. package/lib/framework/rate-limit.js +1 -1
  124. package/lib/framework/raw-flags.js +1 -1
  125. package/lib/framework/response.js +1 -1
  126. package/lib/framework/runner-confirmation.js +1 -1
  127. package/lib/framework/runner-error.js +1 -1
  128. package/lib/framework/runner.js +1 -1
  129. package/lib/framework/schema-export.js +1 -1
  130. package/lib/framework/service-order.js +1 -1
  131. package/lib/framework/types.js +1 -1
  132. package/lib/generated/build-info.d.ts +4 -4
  133. package/lib/generated/build-info.js +1 -1
  134. package/lib/generated/official-routing.js +1 -1
  135. package/lib/generated/routing-contract.js +1 -1
  136. package/lib/help.js +1 -1
  137. package/lib/postinstall.js +1 -1
  138. package/lib/runtime/confirmation.js +1 -1
  139. package/lib/runtime/event.js +1 -1
  140. package/lib/runtime/index.js +1 -1
  141. package/lib/runtime/queue.js +1 -1
  142. package/lib/runtime/resolve.js +1 -1
  143. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  144. package/lib/services/dataset-import/excel-reader.js +1 -1
  145. package/lib/services/dataset-import/image-bytes.js +1 -1
  146. package/lib/services/dataset-import/image-ooxml.js +1 -1
  147. package/lib/services/dataset-import/image-runner.js +1 -1
  148. package/lib/services/dataset-import/metadata.js +1 -1
  149. package/lib/services/dataset-import/preview.js +1 -1
  150. package/lib/services/dataset-import/runner.js +1 -1
  151. package/lib/skills/builtin-skill.js +1 -1
  152. package/lib/skills/npx-skills-add.js +1 -1
  153. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  154. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  155. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  156. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  157. package/lib/skills/runtime-skill-sync/links.js +1 -1
  158. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  159. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  160. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  161. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  162. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  163. package/lib/skills/runtime-skill-sync/push.js +1 -1
  164. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  165. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  166. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  167. package/lib/skills/runtime-skill-sync.js +1 -1
  168. package/lib/skills/skill-presence.js +1 -1
  169. package/lib/utils/access-key-redaction.js +1 -1
  170. package/lib/utils/apply-jq-filter.js +1 -1
  171. package/lib/utils/cli-version-check.js +1 -1
  172. package/lib/utils/cli-version-policy.js +1 -1
  173. package/lib/utils/logger.js +1 -1
  174. package/lib/utils/lossless-json.js +1 -1
  175. package/lib/utils/params.js +1 -1
  176. package/lib/utils/positive-safe-integer.js +1 -1
  177. package/lib/utils/redaction.js +1 -1
  178. package/lib/utils/update-notice.js +1 -1
  179. package/lib/utils/version.js +1 -1
  180. package/lib/utils/write-cli-side-channel.js +1 -1
  181. package/package.json +1 -1
  182. package/skills/lovrabet/SKILL.md +1 -1
  183. package/skills/lovrabet/references/lovrabet-kb-workflow.md +7 -3
  184. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a141_0x5a3b95=a141_0x20ab;function a141_0x20ab(_0x2da9b5,_0x3b366e){_0x2da9b5=_0x2da9b5-0x193;const _0x252749=a141_0x2527();let _0x20ab2e=_0x252749[_0x2da9b5];return _0x20ab2e;}(function(_0x41c890,_0x2eaf8c){const _0x4269cd=a141_0x20ab,_0x26a222=_0x41c890();while(!![]){try{const _0x1f1852=parseInt(_0x4269cd(0x206))/0x1+-parseInt(_0x4269cd(0x1b5))/0x2*(-parseInt(_0x4269cd(0x1f5))/0x3)+parseInt(_0x4269cd(0x212))/0x4+parseInt(_0x4269cd(0x23f))/0x5+-parseInt(_0x4269cd(0x1d5))/0x6+parseInt(_0x4269cd(0x1ca))/0x7+-parseInt(_0x4269cd(0x1c5))/0x8*(parseInt(_0x4269cd(0x21d))/0x9);if(_0x1f1852===_0x2eaf8c)break;else _0x26a222['push'](_0x26a222['shift']());}catch(_0x1651b0){_0x26a222['push'](_0x26a222['shift']());}}}(a141_0x2527,0xe6caa));import a141_0x1ab275 from'node:path';import{SaxesParser}from'saxes';const SHEET=[a141_0x5a3b95(0x1a0),'http://purl.oclc.org/ooxml/spreadsheetml/main'],DRAWING=['http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing',a141_0x5a3b95(0x1ec)],DRAWING_MAIN=[a141_0x5a3b95(0x1fc),a141_0x5a3b95(0x1ab)],OFFICE_RELS=[a141_0x5a3b95(0x1a9),'http://purl.oclc.org/ooxml/officeDocument/relationships'],PACKAGE=[a141_0x5a3b95(0x241)],RICH=['http://schemas.microsoft.com/office/spreadsheetml/2017/richdata'],RICH_RELS=[a141_0x5a3b95(0x20f)],WPS=[a141_0x5a3b95(0x223)],DEFAULT_NS=Object[a141_0x5a3b95(0x20b)]([...[a141_0x5a3b95(0x1e1),'sheets','sheet',a141_0x5a3b95(0x197),a141_0x5a3b95(0x21f),'row','c','f','v','sheetFormatPr',a141_0x5a3b95(0x22b),a141_0x5a3b95(0x1d0),a141_0x5a3b95(0x19f),a141_0x5a3b95(0x199),'futureMetadata','valueMetadata','bk','rc',a141_0x5a3b95(0x1dd)][a141_0x5a3b95(0x1bb)](_0x327dc4=>[_0x327dc4,SHEET]),...[a141_0x5a3b95(0x23d),a141_0x5a3b95(0x21e),'twoCellAnchor',a141_0x5a3b95(0x1b0),a141_0x5a3b95(0x1ae),'to','col',a141_0x5a3b95(0x1b1),'rowOff','ext',a141_0x5a3b95(0x1da),a141_0x5a3b95(0x211),a141_0x5a3b95(0x228),a141_0x5a3b95(0x1e8)][a141_0x5a3b95(0x1bb)](_0x4abb5d=>[_0x4abb5d,DRAWING]),...[a141_0x5a3b95(0x1a4),'rvData','rv',a141_0x5a3b95(0x1d1),'s','k'][a141_0x5a3b95(0x1bb)](_0x2713a2=>[_0x2713a2,RICH]),[a141_0x5a3b95(0x240),DRAWING_MAIN],[a141_0x5a3b95(0x1c2),RICH_RELS],[a141_0x5a3b95(0x19e),RICH_RELS],[a141_0x5a3b95(0x22f),PACKAGE],[a141_0x5a3b95(0x1c1),PACKAGE],[a141_0x5a3b95(0x21c),WPS],[a141_0x5a3b95(0x222),WPS]]),matches=(_0x1f3722,_0x388325,_0x3b430b=DEFAULT_NS[_0x388325]??[])=>_0x1f3722['name']===_0x388325&&_0x3b430b[a141_0x5a3b95(0x194)](_0x1f3722[a141_0x5a3b95(0x19d)]),children=(_0x2d3f95,_0x1f6535,_0x226380=DEFAULT_NS[_0x1f6535])=>_0x2d3f95[a141_0x5a3b95(0x1fa)]['filter'](_0x2e4497=>matches(_0x2e4497,_0x1f6535,_0x226380)),chain=(_0xefa7e0,..._0x577891)=>_0x577891[a141_0x5a3b95(0x224)]((_0x3327e9,_0xcfc9cd)=>_0x3327e9[a141_0x5a3b95(0x21a)](_0x506754=>children(_0x506754,_0xcfc9cd)),[_0xefa7e0]),relationshipTypes=_0x31ee6a=>{const _0x1c6cef=a141_0x5a3b95;if([_0x1c6cef(0x1db),_0x1c6cef(0x1bf)][_0x1c6cef(0x194)](_0x31ee6a))return['http://schemas.microsoft.com/office/2017/06/relationships/'+_0x31ee6a];if(_0x31ee6a===_0x1c6cef(0x1bd))return['http://schemas.microsoft.com/office/2022/10/relationships/richValueRel'];if(_0x31ee6a===_0x1c6cef(0x222)||_0x31ee6a===_0x1c6cef(0x21c))return[_0x1c6cef(0x196)+_0x31ee6a];return OFFICE_RELS['map'](_0xec7125=>_0xec7125+'/'+_0x31ee6a);};function one(_0x3cf0e5,_0x45e2b6){const _0x3ef055=a141_0x5a3b95;if(_0x3cf0e5[_0x3ef055(0x1ac)]!==0x1)throw Error('Missing\x20or\x20ambiguous\x20'+_0x45e2b6+'.');return _0x3cf0e5[0x0];}function a141_0x2527(){const _0x4df8fa=['startsWith','filter','push','pic','rdRichValue','_rels','extLst','local','opentag','rowOff','workbook','future\x20metadata\x20index','name','Missing\x20value\x20metadata\x20block.','message','basename','attrs','blipFill','posix','rich\x20metadata\x20record','add','http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing','Unsupported\x20rich\x20value\x20namespace.','Missing\x20XLSX\x20part:\x20','Value\x20metadata\x20index\x20must\x20be\x20one-based.','rich\x20structure\x20index','isFinite','text','Unsupported\x20worksheet\x20namespace.','Unsupported\x20mapped\x20rich\x20value\x20structure.','75ohLLdf','Missing\x20rich\x20image\x20relationship.','r:id','{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}','WPS\x20image\x20name','children','has','http://schemas.openxmlformats.org/drawingml/2006/main','twoCellAnchor','WPS\x20image\x20blip','anchor\x20column','Ambiguous\x20XML\x20attribute.','Invalid\x20','_rvRel:LocalImageIdentifier','rvData','attributes','Unsupported\x20metadata\x20namespace.','1095468qCIJDb','type','MAX_SAFE_INTEGER','/xl/cellimages.xml','closetag','fromEntries','dirname','Unsupported\x20WPS\x20cell\x20image\x20namespace.','utf8','http://schemas.microsoft.com/office/spreadsheetml/2022/richvaluerel','r:link','nvPicPr','4748008FiNhQD','test','get','rich\x20value\x20binding','Unsupported\x20rich\x20image\x20relation\x20namespace.','Missing\x20future\x20metadata\x20block.','close','write','flatMap','Unsupported\x20relationship\x20namespace\x20in\x20','cellImages','9272511RAVKgy','oneCellAnchor','sheetData','shared','replace','cellImage','http://www.wps.cn/officeDocument/2017/etCustomData','reduce','Invalid\x20worksheet\x20row\x20height\x20for\x20image\x20anchor.','Absolute\x20image\x20anchor\x20cannot\x20be\x20mapped\x20in\x20worksheet\x20','Invalid\x20or\x20duplicate\x20relationship\x20in\x20','cNvPr','anchor\x20start\x20offset','External\x20image\x20links\x20are\x20not\x20supported.','drawing','.rels','\x20relationship\x20in\x20','r:embed','Relationships','Image\x20coordinate\x20exceeds\x20worksheet\x20bounds.','Image\x20XML\x20node\x20budget\x20exceeded.','anchor\x20row','exec','Image\x20anchor\x20has\x20invalid\x20or\x20reversed\x20row\x20offsets.','Invalid\x20relationship\x20target:\x20','ext','sheet','isSafeInteger','External\x20WPS\x20image\x20links\x20are\x20not\x20supported.','Duplicate\x20mapped\x20image\x20cell.','metadata\x20types','Shared\x20image\x20formulas\x20are\x20not\x20supported.','wsDr','Unsupported\x20mapped\x20cell\x20metadata\x20type.','6898410kHHZqZ','blip','http://schemas.openxmlformats.org/package/2006/relationships','rich\x20future\x20metadata','xl/workbook.xml','doctype','includes','sheetFormatPr','http://www.wps.cn/officeDocument/2017/relationships/','worksheet','Unsupported\x20drawing\x20image.','metadataType','xl/cellimages.xml','Unsupported\x20workbook\x20namespace.','Missing\x20or\x20ambiguous\x20','uri','rel','metadataTypes','http://schemas.openxmlformats.org/spreadsheetml/2006/main','Mixed\x20formula\x20and\x20rich\x20image\x20metadata\x20is\x20unsupported.','Missing\x20local\x20image\x20identifier\x20value.','pop','rvb','set','anchor\x20end','value\x20metadata\x20index','col','http://schemas.openxmlformats.org/officeDocument/2006/relationships','Missing\x20or\x20ambiguous\x20WPS\x20cell\x20image\x20part.','http://purl.oclc.org/ooxml/drawingml/main','length','Missing\x20rich\x20value.','from','Workbook\x20exceeds\x2010000\x20image\x20occurrences.','absoluteAnchor','colOff','Relationship\x20target\x20escapes\x20workbook:\x20','Image\x20XML\x20text\x20exceeds\x2064\x20KB.','hidden\x20image\x20row','1282jIgjvC','row','Image\x20anchor\x20spans\x20multiple\x20business\x20rows.','metadata\x20type\x20index','defaultRowHeight','../','map','normalize','richValueRel','Internal','rdRichValueStructure','hidden','Relationship','richValueRels','rich\x20image\x20relationship\x20index','value','8YnGEnp','anchor\x20start','join','anchor\x20end\x20offset','true','753627bDvsPb','XLRICHVALUE','_localImage','toLowerCase','sheetMetadata','slice','metadata','rvStructures','image\x20extent','Image\x20XML\x20event\x20budget\x20exceeded.','futureMetadata','10861422ouzlbl','valueMetadata'];a141_0x2527=function(){return _0x4df8fa;};return a141_0x2527();}function integer(_0x62cc95,_0x138f7b,_0x2a9cb2=0x186a0){const _0x3d8eff=a141_0x5a3b95;if(!_0x62cc95||!/^\d+$/[_0x3d8eff(0x213)](_0x62cc95)||!Number[_0x3d8eff(0x238)](Number(_0x62cc95))||Number(_0x62cc95)>_0x2a9cb2)throw Error(_0x3d8eff(0x201)+_0x138f7b+'.');return Number(_0x62cc95);}export function resolveWorksheetImages(_0x400f55,_0x4244f2,_0x2db3f9){const _0xd792e9=a141_0x5a3b95;let _0xf78330=0x0,_0xbee584=0x0,_0x5786da=0x0;const _0x5032fd=new Map(),_0x5e3695=_0x1a6372=>{const _0x567061=a141_0x20ab;if(_0x5032fd[_0x567061(0x1fb)](_0x1a6372))return _0x5032fd[_0x567061(0x214)](_0x1a6372);const _0x18ea0f=_0x400f55[_0x567061(0x214)](_0x1a6372);if(!_0x18ea0f)throw Error(_0x567061(0x1ee)+_0x1a6372+'.');const _0x458e21={'name':'','uri':'','attrs':{},'children':[],'text':''},_0x1a306a=[_0x458e21],_0x3fb2d7=new SaxesParser({'xmlns':!![]}),_0x35f850=()=>{const _0x370c14=_0x567061;if(++_0xbee584>0x1e8480)throw Error(_0x370c14(0x1d3));};_0x3fb2d7['on'](_0x567061(0x193),()=>{throw Error('XML\x20DTD/entities\x20are\x20not\x20supported.');}),_0x3fb2d7['on'](_0x567061(0x1df),_0x1c4264=>{const _0x17dfbd=_0x567061;_0x35f850();if(++_0xf78330>0x7a120||_0x1a306a[_0x17dfbd(0x1ac)]>0x40)throw Error(_0x17dfbd(0x231));const _0x2bc430={};for(const _0x4ab4dd of Object['values'](_0x1c4264[_0x17dfbd(0x204)])){const _0x4de4d7=OFFICE_RELS[_0x17dfbd(0x194)](_0x4ab4dd[_0x17dfbd(0x19d)])?'r:'+_0x4ab4dd[_0x17dfbd(0x1de)]:_0x4ab4dd['uri']?'{'+_0x4ab4dd['uri']+'}'+_0x4ab4dd[_0x17dfbd(0x1de)]:_0x4ab4dd[_0x17dfbd(0x1de)];if(_0x4de4d7 in _0x2bc430)throw Error(_0x17dfbd(0x200));_0x2bc430[_0x4de4d7]=_0x4ab4dd[_0x17dfbd(0x1c4)];}const _0x3ddd13={'name':_0x1c4264['local'],'uri':_0x1c4264['uri'],'attrs':_0x2bc430,'children':[],'text':''};_0x1a306a['at'](-0x1)[_0x17dfbd(0x1fa)][_0x17dfbd(0x1d9)](_0x3ddd13),_0x1a306a[_0x17dfbd(0x1d9)](_0x3ddd13);}),_0x3fb2d7['on'](_0x567061(0x1f2),_0x3b9e65=>{const _0x12aa7c=_0x567061;_0x35f850();const _0x4c01de=_0x1a306a['at'](-0x1);_0x4c01de['text']+=_0x3b9e65;if(_0x4c01de[_0x12aa7c(0x1f2)][_0x12aa7c(0x1ac)]>0x10000)throw Error(_0x12aa7c(0x1b3));}),_0x3fb2d7['on'](_0x567061(0x20a),()=>{const _0x201259=_0x567061;_0x35f850(),_0x1a306a[_0x201259(0x1a3)]();}),_0x3fb2d7['on']('error',_0x164da1=>{throw _0x164da1;}),_0x3fb2d7[_0x567061(0x219)](_0x18ea0f['toString'](_0x567061(0x20e)))[_0x567061(0x218)]();const _0x507cf5=one(_0x458e21[_0x567061(0x1fa)],_0x1a6372);return _0x5032fd[_0x567061(0x1a5)](_0x1a6372,_0x507cf5),_0x507cf5;},_0x12fe98=new Map(),_0xcc5412=_0x5a3808=>{const _0x27e957=a141_0x20ab;if(_0x12fe98['has'](_0x5a3808))return _0x12fe98[_0x27e957(0x214)](_0x5a3808);const _0x127ec1=a141_0x1ab275[_0x27e957(0x1e9)]['join'](a141_0x1ab275[_0x27e957(0x1e9)]['dirname'](_0x5a3808),_0x27e957(0x1dc),a141_0x1ab275[_0x27e957(0x1e9)][_0x27e957(0x1e6)](_0x5a3808)+_0x27e957(0x22c));if(!_0x400f55[_0x27e957(0x1fb)](_0x127ec1))return[];const _0x2e90bf=new Set(),_0x1ed8db=_0x5e3695(_0x127ec1);if(!matches(_0x1ed8db,_0x27e957(0x22f)))throw Error(_0x27e957(0x21b)+_0x127ec1+'.');const _0x3d53cb=children(_0x1ed8db,_0x27e957(0x1c1))[_0x27e957(0x1bb)](_0x3a74f9=>{const _0x3910b3=_0x27e957,{Id:_0x489678,Type:_0x4fc26e,Target:_0x22e8ce,TargetMode:_0x2a9ed2}=_0x3a74f9[_0x3910b3(0x1e7)];if(!_0x489678||_0x2e90bf['has'](_0x489678)||!_0x4fc26e)throw Error(_0x3910b3(0x227)+_0x127ec1+'.');return _0x2e90bf[_0x3910b3(0x1eb)](_0x489678),{'id':_0x489678,'type':_0x4fc26e,'target':_0x22e8ce??'','mode':_0x2a9ed2};});return _0x12fe98[_0x27e957(0x1a5)](_0x5a3808,_0x3d53cb),_0x3d53cb;},_0x2f3205=(_0x26eb11,_0x8583f4)=>{const _0x31bf80=a141_0x20ab,{target:_0x320244,mode:_0x560504}=_0x8583f4;if(_0x560504&&_0x560504!==_0x31bf80(0x1be))throw Error('External\x20image\x20relationship\x20is\x20not\x20supported:\x20'+_0x26eb11+'.');if(!_0x320244||_0x320244[_0x31bf80(0x194)]('\x5c')||/[?#%\x00-\x20]/[_0x31bf80(0x213)](_0x320244)||/^[a-z][a-z0-9+.-]*:/i['test'](_0x320244)||_0x320244[_0x31bf80(0x1d7)]('//'))throw Error(_0x31bf80(0x235)+_0x26eb11+'.');const _0x481040=_0x320244[_0x31bf80(0x1d7)]('/')?_0x320244[_0x31bf80(0x1cf)](0x1):a141_0x1ab275['posix'][_0x31bf80(0x1bc)](a141_0x1ab275[_0x31bf80(0x1e9)][_0x31bf80(0x1c7)](a141_0x1ab275['posix'][_0x31bf80(0x20c)](_0x26eb11),_0x320244));if(_0x481040[_0x31bf80(0x1d7)](_0x31bf80(0x1ba))||_0x481040==='..'||!_0x481040[_0x31bf80(0x1d7)]('xl/'))throw Error(_0x31bf80(0x1b2)+_0x26eb11+'.');return _0x481040;},_0x4c30f1=(_0x351a26,_0x4559f2,_0x28c557)=>{const _0x23fff0=a141_0x20ab,_0x39db44=_0xcc5412(_0x351a26)[_0x23fff0(0x1d8)](_0x4652fb=>_0x4652fb['id']===_0x4559f2&&relationshipTypes(_0x28c557)['includes'](_0x4652fb['type']));if(_0x39db44[_0x23fff0(0x1ac)]!==0x1)throw Error(_0x23fff0(0x19c)+_0x28c557+_0x23fff0(0x22d)+_0x351a26+'.');return _0x2f3205(_0x351a26,_0x39db44[0x0]);},_0x3ae0e1=(_0x47832d,_0x60d464)=>{const _0x54d1c4=a141_0x20ab,_0x84709b=_0xcc5412(_0x47832d)['filter'](_0x2614a6=>relationshipTypes(_0x60d464)[_0x54d1c4(0x194)](_0x2614a6[_0x54d1c4(0x207)]));if(_0x84709b[_0x54d1c4(0x1ac)]!==0x1)throw Error(_0x54d1c4(0x19c)+_0x60d464+'\x20relationship\x20in\x20'+_0x47832d+'.');return _0x2f3205(_0x47832d,_0x84709b[0x0]);},_0x32c262=_0xd792e9(0x243),_0x5a8fdf=_0x5e3695(_0x32c262);if(!matches(_0x5a8fdf,'workbook'))throw Error(_0xd792e9(0x19b));const _0x549f58=one(chain(_0x5a8fdf,'sheets',_0xd792e9(0x237))[_0xd792e9(0x1d8)](_0x5da45c=>_0x5da45c['attrs'][_0xd792e9(0x1e3)]===_0x4244f2),'worksheet'),_0x51e98d=_0x4c30f1(_0x32c262,_0x549f58[_0xd792e9(0x1e7)][_0xd792e9(0x1f7)],_0xd792e9(0x197)),_0x4787fb=_0x5e3695(_0x51e98d);if(!matches(_0x4787fb,_0xd792e9(0x197)))throw Error(_0xd792e9(0x1f3));const _0x74d6a8=chain(_0x4787fb,_0xd792e9(0x21f),_0xd792e9(0x1b6)),_0x4bf38f=new Map(),_0x5ee424=new Set(_0x74d6a8[_0xd792e9(0x1d8)](_0x4dbe81=>_0x4dbe81[_0xd792e9(0x1e7)][_0xd792e9(0x1c0)]==='1'||_0x4dbe81[_0xd792e9(0x1e7)][_0xd792e9(0x1c0)]===_0xd792e9(0x1c9))[_0xd792e9(0x1bb)](_0x5396f8=>integer(_0x5396f8[_0xd792e9(0x1e7)]['r'],_0xd792e9(0x1b4)))),_0x48006c=_0x1169fa=>{const _0x3acd8f=_0xd792e9,_0x11581d=_0x1169fa===undefined?0xf:Number(_0x1169fa);if(!Number[_0x3acd8f(0x1f1)](_0x11581d)||_0x11581d<=0x0||_0x11581d>409.5)throw Error(_0x3acd8f(0x225));return Math['round'](_0x11581d*0x319c);},_0x5bff08=_0x48006c(children(_0x4787fb,_0xd792e9(0x195))[0x0]?.[_0xd792e9(0x1e7)][_0xd792e9(0x1b9)]);for(const _0xf13b0 of _0x74d6a8)if(_0xf13b0[_0xd792e9(0x1e7)]['ht']!==undefined)_0x4bf38f['set'](integer(_0xf13b0[_0xd792e9(0x1e7)]['r'],'image\x20row\x20height\x20coordinate'),_0x48006c(_0xf13b0['attrs']['ht']));const _0x1fecec=[],_0x7fcbc1=_0x55beee=>{const _0x36c38b=_0xd792e9;if(!_0x2db3f9['has'](_0x55beee[_0x36c38b(0x1a8)]))return;if(++_0x5786da>0x2710)throw Error(_0x36c38b(0x1af));_0x1fecec[_0x36c38b(0x1d9)](_0x5ee424['has'](_0x55beee[_0x36c38b(0x1b6)])?{..._0x55beee,'hiddenRow':!![]}:_0x55beee);},_0x1f8757=_0x34e71a=>({'row':integer(one(children(_0x34e71a,_0xd792e9(0x1b6),DRAWING),'anchor\x20row')[_0xd792e9(0x1f2)],_0xd792e9(0x232),0x1869f)+0x1,'col':integer(one(children(_0x34e71a,_0xd792e9(0x1a8)),'anchor\x20column')[_0xd792e9(0x1f2)],_0xd792e9(0x1ff),0xff)+0x1});for(const _0x337841 of children(_0x4787fb,_0xd792e9(0x22b))){const _0x2db23e=_0x4c30f1(_0x51e98d,_0x337841[_0xd792e9(0x1e7)][_0xd792e9(0x1f7)],_0xd792e9(0x22b)),_0x331e86=_0x5e3695(_0x2db23e);if(!matches(_0x331e86,'wsDr'))throw Error('Unsupported\x20drawing\x20namespace.');for(const _0x4fe52d of _0x331e86[_0xd792e9(0x1fa)]){if(![_0xd792e9(0x21e),_0xd792e9(0x1fd),_0xd792e9(0x1b0)]['some'](_0x1dd954=>matches(_0x4fe52d,_0x1dd954)))continue;if(_0x4fe52d[_0xd792e9(0x1e3)]===_0xd792e9(0x1b0))throw Error(_0xd792e9(0x226)+_0x4244f2+'.');const _0x8f443f=_0x1f8757(one(children(_0x4fe52d,_0xd792e9(0x1ae)),_0xd792e9(0x1c6)));if(!_0x2db3f9[_0xd792e9(0x1fb)](_0x8f443f['col']))continue;let _0x2e7132;const _0x313bd8=one(children(_0x4fe52d,'from'),_0xd792e9(0x1c6)),_0xfe3dd5=integer(one(children(_0x313bd8,_0xd792e9(0x1e0)),_0xd792e9(0x229))['text'],_0xd792e9(0x229),Number[_0xd792e9(0x208)]),_0x135f33=_0x4bf38f[_0xd792e9(0x214)](_0x8f443f[_0xd792e9(0x1b6)])??_0x5bff08;if(_0xfe3dd5>=_0x135f33)throw Error('Invalid\x20image\x20start\x20offset\x20at\x20row\x20'+_0x8f443f[_0xd792e9(0x1b6)]+'.');if(_0x4fe52d[_0xd792e9(0x1e3)]===_0xd792e9(0x21e)){const _0x384af5=one(children(_0x4fe52d,_0xd792e9(0x236)),_0xd792e9(0x1d2)),_0x11b681=integer(_0x384af5[_0xd792e9(0x1e7)]['cy'],'image\x20height',Number['MAX_SAFE_INTEGER']);if(!_0x11b681||_0xfe3dd5+_0x11b681>_0x135f33)_0x2e7132=_0xd792e9(0x1b7);}if(_0x4fe52d[_0xd792e9(0x1e3)]===_0xd792e9(0x1fd)){const _0x2f9cdb=one(children(_0x4fe52d,'to'),_0xd792e9(0x1a6)),_0x4f7532=_0x1f8757(_0x2f9cdb),_0x54e22b=integer(one(children(_0x2f9cdb,_0xd792e9(0x1e0)),'anchor\x20end\x20offset')['text'],_0xd792e9(0x1c8),Number[_0xd792e9(0x208)]),_0x3f2bed=_0x4bf38f[_0xd792e9(0x214)](_0x4f7532[_0xd792e9(0x1b6)])??_0x5bff08;if(_0x54e22b>_0x3f2bed||_0x4f7532[_0xd792e9(0x1b6)]===_0x8f443f[_0xd792e9(0x1b6)]&&_0x54e22b<=_0xfe3dd5)_0x2e7132=_0xd792e9(0x234);if(_0x4f7532[_0xd792e9(0x1b6)]<_0x8f443f['row']||_0x4f7532[_0xd792e9(0x1b6)]>_0x8f443f[_0xd792e9(0x1b6)]+0x1||_0x4f7532[_0xd792e9(0x1b6)]===_0x8f443f[_0xd792e9(0x1b6)]+0x1&&_0x54e22b!==0x0)_0x2e7132=_0xd792e9(0x1b7);}const _0x20f57b=chain(_0x4fe52d,_0xd792e9(0x1da),_0xd792e9(0x1e8),'blip');for(const _0x97b119 of _0x20f57b){if(_0x97b119[_0xd792e9(0x1e7)][_0xd792e9(0x210)])throw Error(_0xd792e9(0x22a));_0x7fcbc1({..._0x8f443f,'media':[_0x4c30f1(_0x2db23e,_0x97b119['attrs'][_0xd792e9(0x22e)],'image')],..._0x2e7132?{'error':_0x2e7132}:{}});}if(!_0x20f57b[_0xd792e9(0x1ac)])_0x7fcbc1({..._0x8f443f,'media':[],'error':_0xd792e9(0x198)});}}const _0x393c36=_0x195b60=>{const _0x519443=_0xd792e9,_0x162f6a=_0x5e3695(_0x3ae0e1(_0x32c262,_0x519443(0x1ce)));if(!matches(_0x162f6a,_0x519443(0x1d0)))throw Error(_0x519443(0x205));const _0x3675a8=integer(_0x195b60['attrs']['vm'],_0x519443(0x1a7));if(!_0x3675a8)throw Error(_0x519443(0x1ef));const _0x3d1f81=children(one(children(_0x162f6a,_0x519443(0x1d6)),_0x519443(0x1d6)),'bk')[_0x3675a8-0x1];if(!_0x3d1f81)throw Error(_0x519443(0x1e4));const _0x4e4f16=one(children(_0x3d1f81,'rc'),_0x519443(0x1ea)),_0x17808d=integer(_0x4e4f16[_0x519443(0x1e7)]['t'],_0x519443(0x1b8)),_0x301711=children(one(children(_0x162f6a,_0x519443(0x19f)),_0x519443(0x23b)),_0x519443(0x199))[_0x17808d-0x1];if(!_0x17808d||_0x301711?.[_0x519443(0x1e7)][_0x519443(0x1e3)]!==_0x519443(0x1cb))throw Error(_0x519443(0x23e));const _0x569026=one(children(_0x162f6a,_0x519443(0x1d4))['filter'](_0x3fdf42=>_0x3fdf42[_0x519443(0x1e7)][_0x519443(0x1e3)]===_0x519443(0x1cb)),_0x519443(0x242)),_0x120406=children(_0x569026,'bk')[integer(_0x4e4f16[_0x519443(0x1e7)]['v'],_0x519443(0x1e2))];if(!_0x120406)throw Error(_0x519443(0x217));const _0x59c34e=chain(_0x120406,_0x519443(0x1dd))['flatMap'](_0x122b7f=>children(_0x122b7f,_0x519443(0x236),SHEET))[_0x519443(0x1d8)](_0x6cebcb=>_0x6cebcb[_0x519443(0x1e7)][_0x519443(0x19d)]?.[_0x519443(0x1cd)]()===_0x519443(0x1f8)),_0x5c62a5=integer(one(_0x59c34e[_0x519443(0x21a)](_0xac1a8e=>children(_0xac1a8e,_0x519443(0x1a4))),_0x519443(0x215))[_0x519443(0x1e7)]['i'],'rich\x20value\x20index'),_0x284cdf=_0x5e3695(_0x3ae0e1(_0x32c262,_0x519443(0x1db)));if(!matches(_0x284cdf,_0x519443(0x203)))throw Error(_0x519443(0x1ed));const _0x3fbc52=children(_0x284cdf,'rv')[_0x5c62a5];if(!_0x3fbc52)throw Error(_0x519443(0x1ad));const _0x3cc094=_0x5e3695(_0x3ae0e1(_0x32c262,'rdRichValueStructure'));if(!matches(_0x3cc094,_0x519443(0x1d1)))throw Error('Unsupported\x20rich\x20structure\x20namespace.');const _0x4bb1a6=children(_0x3cc094,'s')[integer(_0x3fbc52[_0x519443(0x1e7)]['s'],_0x519443(0x1f0))];if(!_0x4bb1a6||_0x4bb1a6[_0x519443(0x1e7)]['t']!==_0x519443(0x1cc))throw Error(_0x519443(0x1f4));const _0x54428e=children(_0x4bb1a6,'k'),_0x38e1e7=_0x54428e[_0x519443(0x1bb)]((_0x5b6826,_0x2f3bd7)=>_0x5b6826[_0x519443(0x1e7)]['n']===_0x519443(0x202)?_0x2f3bd7:-0x1)[_0x519443(0x1d8)](_0x21eb19=>_0x21eb19>=0x0);if(_0x38e1e7[_0x519443(0x1ac)]!==0x1)throw Error('Missing\x20or\x20ambiguous\x20local\x20image\x20identifier.');const _0x2a2e4b=children(_0x3fbc52,'v',RICH)[_0x38e1e7[0x0]];if(!_0x2a2e4b)throw Error(_0x519443(0x1a2));const _0x2227c1=_0x3ae0e1(_0x32c262,_0x519443(0x1bd)),_0x43ed46=_0x5e3695(_0x2227c1);if(!matches(_0x43ed46,_0x519443(0x1c2)))throw Error(_0x519443(0x216));const _0x29bf56=children(_0x43ed46,_0x519443(0x19e))[integer(_0x2a2e4b[_0x519443(0x1f2)],_0x519443(0x1c3))];if(!_0x29bf56)throw Error(_0x519443(0x1f6));return _0x4c30f1(_0x2227c1,_0x29bf56[_0x519443(0x1e7)][_0x519443(0x1f7)],'image');};let _0x1bb7aa;const _0x40ae5f=_0x1cfc90=>{const _0x25fd7a=_0xd792e9;if(!_0x1bb7aa){_0x1bb7aa=new Map();const _0x4aa8f3=_0xcc5412(_0x32c262)[_0x25fd7a(0x1d8)](_0x26c70a=>[...relationshipTypes('cellImage'),...relationshipTypes(_0x25fd7a(0x21c))]['includes'](_0x26c70a[_0x25fd7a(0x207)]));if(!_0x4aa8f3['length']&&_0x400f55[_0x25fd7a(0x1fb)](_0x25fd7a(0x19a)))_0x4aa8f3[_0x25fd7a(0x1d9)]({'id':'','type':'','target':_0x25fd7a(0x209)});if(_0x4aa8f3[_0x25fd7a(0x1ac)]!==0x1)throw Error(_0x25fd7a(0x1aa));const _0xf3e41c=_0x2f3205(_0x32c262,_0x4aa8f3[0x0]),_0x5d6203=_0x5e3695(_0xf3e41c);if(!matches(_0x5d6203,_0x25fd7a(0x21c)))throw Error(_0x25fd7a(0x20d));for(const _0x54201d of children(_0x5d6203,_0x25fd7a(0x222))){const _0x4b0cd5=one(chain(_0x54201d,_0x25fd7a(0x1da),_0x25fd7a(0x211),_0x25fd7a(0x228)),_0x25fd7a(0x1f9))['attrs'][_0x25fd7a(0x1e3)];if(!_0x4b0cd5||_0x1bb7aa[_0x25fd7a(0x1fb)](_0x4b0cd5))throw Error('Invalid\x20or\x20duplicate\x20WPS\x20image\x20ID.');const _0x2dee9b=one(chain(_0x54201d,_0x25fd7a(0x1da),_0x25fd7a(0x1e8),'blip'),_0x25fd7a(0x1fe));if(_0x2dee9b[_0x25fd7a(0x1e7)][_0x25fd7a(0x210)])throw Error(_0x25fd7a(0x239));_0x1bb7aa[_0x25fd7a(0x1a5)](_0x4b0cd5,_0x4c30f1(_0xf3e41c,_0x2dee9b[_0x25fd7a(0x1e7)][_0x25fd7a(0x22e)],'image'));}}const _0x48eb70=_0x1bb7aa['get'](_0x1cfc90);if(!_0x48eb70)throw Error('Missing\x20WPS\x20image\x20ID:\x20'+_0x1cfc90+'.');return _0x48eb70;},_0xfb56de=new Set();for(const _0x296f05 of _0x74d6a8[_0xd792e9(0x21a)](_0x2d5397=>children(_0x2d5397,'c'))){const _0x35544d=/^([A-Z]+)([1-9]\d*)$/[_0xd792e9(0x233)](_0x296f05[_0xd792e9(0x1e7)]['r']??'');if(!_0x35544d)continue;let _0x393d17=0x0;for(const _0x3219fb of _0x35544d[0x1])_0x393d17=_0x393d17*0x1a+_0x3219fb['charCodeAt'](0x0)-0x40;if(!_0x2db3f9[_0xd792e9(0x1fb)](_0x393d17))continue;const _0x3a8f71=integer(_0x35544d[0x2],'image\x20cell\x20row');if(_0xfb56de['has'](_0x296f05[_0xd792e9(0x1e7)]['r']))throw Error(_0xd792e9(0x23a));_0xfb56de[_0xd792e9(0x1eb)](_0x296f05[_0xd792e9(0x1e7)]['r']);const _0x4a3cf2=children(_0x296f05,'f');if(!_0x296f05[_0xd792e9(0x1e7)]['vm']&&!_0x4a3cf2[_0xd792e9(0x1ac)])continue;try{if(_0x3a8f71<0x1||_0x393d17>0x100)throw Error(_0xd792e9(0x230));let _0x1996a1;if(_0x296f05[_0xd792e9(0x1e7)]['vm']){if(_0x4a3cf2[_0xd792e9(0x1ac)])throw Error(_0xd792e9(0x1a1));if(_0x296f05['attrs']['t']!=='e'||children(_0x296f05,'v')[_0xd792e9(0x1ac)]!==0x1||children(_0x296f05,'v')[0x0][_0xd792e9(0x1f2)]!=='#VALUE!')throw Error('Rich\x20IMAGE\x20cell\x20contains\x20unexpected\x20scalar\x20or\x20mixed\x20content.');_0x1996a1=_0x393c36(_0x296f05);}else{const _0xaa0c9f=one(_0x4a3cf2,'image\x20formula');if(_0xaa0c9f['attrs']['t']===_0xd792e9(0x220)||_0xaa0c9f[_0xd792e9(0x1e7)]['si'])throw Error(_0xd792e9(0x23c));const _0x415c76=/^\s*=?\s*@?(?:_xlfn\.)?DISPIMG\(\s*"((?:[^"]|"")+)"\s*(?:,\s*[01]\s*)?\)\s*$/i[_0xd792e9(0x233)](_0xaa0c9f['text']);if(!_0x415c76)throw Error('Unsupported\x20image\x20formula;\x20expected\x20a\x20standalone\x20DISPIMG\x20literal.');_0x1996a1=_0x40ae5f(_0x415c76[0x1][_0xd792e9(0x221)](/""/g,'\x22'));}_0x7fcbc1({'row':_0x3a8f71,'col':_0x393d17,'media':[_0x1996a1],'nativeCell':!![]});}catch(_0x1d003c){_0x7fcbc1({'row':_0x3a8f71,'col':_0x393d17,'media':[],'nativeCell':!![],'error':_0x1d003c[_0xd792e9(0x1e5)]});}}return _0x1fecec;}
1
+ function a142_0x4eed(_0x10b728,_0x52ccc8){_0x10b728=_0x10b728-0x1d3;const _0x333632=a142_0x3336();let _0x4eeda3=_0x333632[_0x10b728];return _0x4eeda3;}const a142_0xe40a93=a142_0x4eed;(function(_0x5008bb,_0x47bdb6){const _0x538773=a142_0x4eed,_0x18dc50=_0x5008bb();while(!![]){try{const _0x45d47d=-parseInt(_0x538773(0x1f0))/0x1+-parseInt(_0x538773(0x202))/0x2*(parseInt(_0x538773(0x216))/0x3)+parseInt(_0x538773(0x252))/0x4*(parseInt(_0x538773(0x238))/0x5)+parseInt(_0x538773(0x21b))/0x6*(parseInt(_0x538773(0x22b))/0x7)+parseInt(_0x538773(0x274))/0x8+-parseInt(_0x538773(0x212))/0x9*(-parseInt(_0x538773(0x20b))/0xa)+parseInt(_0x538773(0x1fd))/0xb*(parseInt(_0x538773(0x291))/0xc);if(_0x45d47d===_0x47bdb6)break;else _0x18dc50['push'](_0x18dc50['shift']());}catch(_0x3a1719){_0x18dc50['push'](_0x18dc50['shift']());}}}(a142_0x3336,0xa0287));import a142_0x5bd18a from'node:path';function a142_0x3336(){const _0x97f961=['shared','XLRICHVALUE','http://schemas.microsoft.com/office/2022/10/relationships/richValueRel','rich\x20structure\x20index','push','WPS\x20image\x20name','372483MGMTyI','oneCellAnchor','anchor\x20start','Invalid\x20or\x20duplicate\x20WPS\x20image\x20ID.','11193zdnbVf','Image\x20coordinate\x20exceeds\x20worksheet\x20bounds.','rich\x20future\x20metadata','rich\x20metadata\x20record','Unsupported\x20mapped\x20cell\x20metadata\x20type.','14118OnEQkd','Unsupported\x20metadata\x20namespace.','colOff','slice','External\x20image\x20links\x20are\x20not\x20supported.','rdRichValueStructure','Invalid\x20or\x20duplicate\x20relationship\x20in\x20','anchor\x20row','valueMetadata','anchor\x20column','hidden\x20image\x20row','/xl/cellimages.xml','http://schemas.openxmlformats.org/spreadsheetml/2006/main','drawing','uri','name','3829lUCHEQ','Internal','exec','cellImage','http://purl.oclc.org/ooxml/drawingml/main','Duplicate\x20mapped\x20image\x20cell.','anchor\x20end','true','set','children','Mixed\x20formula\x20and\x20rich\x20image\x20metadata\x20is\x20unsupported.','includes','nvPicPr','197875LjVTJi','MAX_SAFE_INTEGER','Missing\x20WPS\x20image\x20ID:\x20','text','image','xl/','sheet','rvStructures','Unsupported\x20relationship\x20namespace\x20in\x20','sheetMetadata','rvData','_rvRel:LocalImageIdentifier','local','http://schemas.microsoft.com/office/2017/06/relationships/','error','Missing\x20rich\x20value.','r:embed','toLowerCase','Invalid\x20image\x20start\x20offset\x20at\x20row\x20','Missing\x20or\x20ambiguous\x20local\x20image\x20identifier.','rich\x20value\x20index','Unsupported\x20drawing\x20image.','r:link','sheets','some','dirname','8ZvRrva','value\x20metadata\x20index','metadataType','extLst','Image\x20anchor\x20spans\x20multiple\x20business\x20rows.','rel','blip','posix','closetag','opentag','Unsupported\x20rich\x20structure\x20namespace.','Missing\x20or\x20ambiguous\x20WPS\x20cell\x20image\x20part.','Rich\x20IMAGE\x20cell\x20contains\x20unexpected\x20scalar\x20or\x20mixed\x20content.','External\x20image\x20relationship\x20is\x20not\x20supported:\x20','map','Relationship\x20target\x20escapes\x20workbook:\x20','sheetFormatPr','Image\x20XML\x20text\x20exceeds\x2064\x20KB.','close','anchor\x20start\x20offset','Ambiguous\x20XML\x20attribute.','Missing\x20or\x20ambiguous\x20','reduce','metadataTypes','metadata','flatMap','ext','rdRichValue','Unsupported\x20rich\x20image\x20relation\x20namespace.','value','Absolute\x20image\x20anchor\x20cannot\x20be\x20mapped\x20in\x20worksheet\x20','http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing','http://schemas.microsoft.com/office/spreadsheetml/2022/richvaluerel','row','4415080MTxYjb','http://schemas.microsoft.com/office/spreadsheetml/2017/richdata','values','metadata\x20type\x20index','_rels','has','image\x20formula','Shared\x20image\x20formulas\x20are\x20not\x20supported.','Unsupported\x20drawing\x20namespace.','from','defaultRowHeight','Unsupported\x20rich\x20value\x20namespace.','image\x20cell\x20row','Image\x20XML\x20event\x20budget\x20exceeded.','attrs','Unsupported\x20mapped\x20rich\x20value\x20structure.','Invalid\x20','cellImages','worksheet','rich\x20value\x20binding','pic','Relationships','charCodeAt','Invalid\x20worksheet\x20row\x20height\x20for\x20image\x20anchor.','filter','Unsupported\x20workbook\x20namespace.','Relationship','test','rvb','2472JCGevu','XML\x20DTD/entities\x20are\x20not\x20supported.','Missing\x20future\x20metadata\x20block.','Value\x20metadata\x20index\x20must\x20be\x20one-based.','twoCellAnchor','Unsupported\x20WPS\x20cell\x20image\x20namespace.','type','utf8','cNvPr','WPS\x20image\x20blip','\x20relationship\x20in\x20','length','Missing\x20value\x20metadata\x20block.','xl/workbook.xml','richValueRels','Missing\x20local\x20image\x20identifier\x20value.','get','isFinite','../','Image\x20XML\x20node\x20budget\x20exceeded.','anchor\x20end\x20offset','basename','http://www.wps.cn/officeDocument/2017/etCustomData','r:id','image\x20row\x20height\x20coordinate','Unsupported\x20worksheet\x20namespace.','add','richValueRel','col','message','663282zosXTK','{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}','futureMetadata','join','absoluteAnchor','startsWith','http://schemas.openxmlformats.org/drawingml/2006/main','toString','Unsupported\x20image\x20formula;\x20expected\x20a\x20standalone\x20DISPIMG\x20literal.','normalize','image\x20extent','future\x20metadata\x20index','Missing\x20XLSX\x20part:\x20','6688yuXZap','http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing','blipFill','image\x20height','hidden','610dpHXlW','rowOff','_localImage','sheetData','replace','http://purl.oclc.org/ooxml/officeDocument/relationships','wsDr','attributes','rich\x20image\x20relationship\x20index','100JnnhEI'];a142_0x3336=function(){return _0x97f961;};return a142_0x3336();}import{SaxesParser}from'saxes';const SHEET=[a142_0xe40a93(0x227),'http://purl.oclc.org/ooxml/spreadsheetml/main'],DRAWING=[a142_0xe40a93(0x271),a142_0xe40a93(0x1fe)],DRAWING_MAIN=[a142_0xe40a93(0x1f6),a142_0xe40a93(0x22f)],OFFICE_RELS=['http://schemas.openxmlformats.org/officeDocument/2006/relationships',a142_0xe40a93(0x207)],PACKAGE=['http://schemas.openxmlformats.org/package/2006/relationships'],RICH=[a142_0xe40a93(0x275)],RICH_RELS=[a142_0xe40a93(0x272)],WPS=[a142_0xe40a93(0x1e8)],DEFAULT_NS=Object['fromEntries']([...['workbook',a142_0xe40a93(0x24f),a142_0xe40a93(0x23e),a142_0xe40a93(0x286),a142_0xe40a93(0x205),a142_0xe40a93(0x273),'c','f','v',a142_0xe40a93(0x262),a142_0xe40a93(0x228),a142_0xe40a93(0x26a),'metadataTypes',a142_0xe40a93(0x254),a142_0xe40a93(0x1f2),a142_0xe40a93(0x223),'bk','rc',a142_0xe40a93(0x255)][a142_0xe40a93(0x260)](_0xef58ea=>[_0xef58ea,SHEET]),...[a142_0xe40a93(0x208),'oneCellAnchor','twoCellAnchor',a142_0xe40a93(0x1f4),'from','to',a142_0xe40a93(0x1ee),a142_0xe40a93(0x21d),a142_0xe40a93(0x203),a142_0xe40a93(0x26c),'pic',a142_0xe40a93(0x237),a142_0xe40a93(0x1da),a142_0xe40a93(0x1ff)]['map'](_0x2f5c86=>[_0x2f5c86,DRAWING]),...[a142_0xe40a93(0x290),'rvData','rv','rvStructures','s','k'][a142_0xe40a93(0x260)](_0x42e18e=>[_0x42e18e,RICH]),[a142_0xe40a93(0x258),DRAWING_MAIN],['richValueRels',RICH_RELS],['rel',RICH_RELS],[a142_0xe40a93(0x289),PACKAGE],['Relationship',PACKAGE],[a142_0xe40a93(0x285),WPS],[a142_0xe40a93(0x22e),WPS]]),matches=(_0x5a1b56,_0x1c08a9,_0x12edea=DEFAULT_NS[_0x1c08a9]??[])=>_0x5a1b56[a142_0xe40a93(0x22a)]===_0x1c08a9&&_0x12edea[a142_0xe40a93(0x236)](_0x5a1b56[a142_0xe40a93(0x229)]),children=(_0x3e783c,_0x255fc3,_0x15ca43=DEFAULT_NS[_0x255fc3])=>_0x3e783c['children'][a142_0xe40a93(0x28c)](_0x1c42be=>matches(_0x1c42be,_0x255fc3,_0x15ca43)),chain=(_0x372214,..._0xc6ff1c)=>_0xc6ff1c[a142_0xe40a93(0x268)]((_0x42487a,_0x1bc33b)=>_0x42487a[a142_0xe40a93(0x26b)](_0x1466a4=>children(_0x1466a4,_0x1bc33b)),[_0x372214]),relationshipTypes=_0x5b92af=>{const _0xd062d4=a142_0xe40a93;if([_0xd062d4(0x26d),_0xd062d4(0x220)][_0xd062d4(0x236)](_0x5b92af))return[_0xd062d4(0x245)+_0x5b92af];if(_0x5b92af===_0xd062d4(0x1ed))return[_0xd062d4(0x20e)];if(_0x5b92af===_0xd062d4(0x22e)||_0x5b92af===_0xd062d4(0x285))return['http://www.wps.cn/officeDocument/2017/relationships/'+_0x5b92af];return OFFICE_RELS['map'](_0x19037c=>_0x19037c+'/'+_0x5b92af);};function one(_0x5a3216,_0x37d816){if(_0x5a3216['length']!==0x1)throw Error('Missing\x20or\x20ambiguous\x20'+_0x37d816+'.');return _0x5a3216[0x0];}function integer(_0x1ea3bf,_0x6e66b8,_0xc18f9d=0x186a0){const _0x5ae517=a142_0xe40a93;if(!_0x1ea3bf||!/^\d+$/[_0x5ae517(0x28f)](_0x1ea3bf)||!Number['isSafeInteger'](Number(_0x1ea3bf))||Number(_0x1ea3bf)>_0xc18f9d)throw Error(_0x5ae517(0x284)+_0x6e66b8+'.');return Number(_0x1ea3bf);}export function resolveWorksheetImages(_0x75cf70,_0xc16af1,_0xa2160c){const _0x146408=a142_0xe40a93;let _0x15fda9=0x0,_0x2029d4=0x0,_0x2b3638=0x0;const _0x317a88=new Map(),_0x299833=_0x459561=>{const _0x63bab7=a142_0x4eed;if(_0x317a88[_0x63bab7(0x279)](_0x459561))return _0x317a88[_0x63bab7(0x1e2)](_0x459561);const _0x10559f=_0x75cf70[_0x63bab7(0x1e2)](_0x459561);if(!_0x10559f)throw Error(_0x63bab7(0x1fc)+_0x459561+'.');const _0x57b661={'name':'','uri':'','attrs':{},'children':[],'text':''},_0x6d4903=[_0x57b661],_0xcd6120=new SaxesParser({'xmlns':!![]}),_0x19404f=()=>{const _0x54c8cc=_0x63bab7;if(++_0x2029d4>0x1e8480)throw Error(_0x54c8cc(0x281));};_0xcd6120['on']('doctype',()=>{const _0x3bf014=_0x63bab7;throw Error(_0x3bf014(0x1d3));}),_0xcd6120['on'](_0x63bab7(0x25b),_0x3e98cf=>{const _0x43c29d=_0x63bab7;_0x19404f();if(++_0x15fda9>0x7a120||_0x6d4903[_0x43c29d(0x1dd)]>0x40)throw Error(_0x43c29d(0x1e5));const _0x40707d={};for(const _0x65ad0d of Object[_0x43c29d(0x276)](_0x3e98cf[_0x43c29d(0x209)])){const _0x47c8fa=OFFICE_RELS[_0x43c29d(0x236)](_0x65ad0d[_0x43c29d(0x229)])?'r:'+_0x65ad0d['local']:_0x65ad0d['uri']?'{'+_0x65ad0d[_0x43c29d(0x229)]+'}'+_0x65ad0d[_0x43c29d(0x244)]:_0x65ad0d[_0x43c29d(0x244)];if(_0x47c8fa in _0x40707d)throw Error(_0x43c29d(0x266));_0x40707d[_0x47c8fa]=_0x65ad0d[_0x43c29d(0x26f)];}const _0x132b49={'name':_0x3e98cf['local'],'uri':_0x3e98cf['uri'],'attrs':_0x40707d,'children':[],'text':''};_0x6d4903['at'](-0x1)[_0x43c29d(0x234)][_0x43c29d(0x210)](_0x132b49),_0x6d4903[_0x43c29d(0x210)](_0x132b49);}),_0xcd6120['on'](_0x63bab7(0x23b),_0x2ec0f5=>{const _0x25d5fd=_0x63bab7;_0x19404f();const _0x34454f=_0x6d4903['at'](-0x1);_0x34454f[_0x25d5fd(0x23b)]+=_0x2ec0f5;if(_0x34454f[_0x25d5fd(0x23b)][_0x25d5fd(0x1dd)]>0x10000)throw Error(_0x25d5fd(0x263));}),_0xcd6120['on'](_0x63bab7(0x25a),()=>{_0x19404f(),_0x6d4903['pop']();}),_0xcd6120['on'](_0x63bab7(0x246),_0x6ab356=>{throw _0x6ab356;}),_0xcd6120['write'](_0x10559f[_0x63bab7(0x1f7)](_0x63bab7(0x1d9)))[_0x63bab7(0x264)]();const _0x15c110=one(_0x57b661[_0x63bab7(0x234)],_0x459561);return _0x317a88[_0x63bab7(0x233)](_0x459561,_0x15c110),_0x15c110;},_0x4c4460=new Map(),_0x5d0055=_0x50268e=>{const _0x1a2848=a142_0x4eed;if(_0x4c4460[_0x1a2848(0x279)](_0x50268e))return _0x4c4460[_0x1a2848(0x1e2)](_0x50268e);const _0x4d300e=a142_0x5bd18a['posix'][_0x1a2848(0x1f3)](a142_0x5bd18a['posix'][_0x1a2848(0x251)](_0x50268e),_0x1a2848(0x278),a142_0x5bd18a[_0x1a2848(0x259)][_0x1a2848(0x1e7)](_0x50268e)+'.rels');if(!_0x75cf70[_0x1a2848(0x279)](_0x4d300e))return[];const _0x32579c=new Set(),_0x356ffd=_0x299833(_0x4d300e);if(!matches(_0x356ffd,_0x1a2848(0x289)))throw Error(_0x1a2848(0x240)+_0x4d300e+'.');const _0x6407e3=children(_0x356ffd,_0x1a2848(0x28e))['map'](_0x4423f6=>{const _0x8a6e24=_0x1a2848,{Id:_0xee3883,Type:_0x49929c,Target:_0x328c63,TargetMode:_0x591e50}=_0x4423f6[_0x8a6e24(0x282)];if(!_0xee3883||_0x32579c['has'](_0xee3883)||!_0x49929c)throw Error(_0x8a6e24(0x221)+_0x4d300e+'.');return _0x32579c[_0x8a6e24(0x1ec)](_0xee3883),{'id':_0xee3883,'type':_0x49929c,'target':_0x328c63??'','mode':_0x591e50};});return _0x4c4460[_0x1a2848(0x233)](_0x50268e,_0x6407e3),_0x6407e3;},_0x419b9e=(_0x2b9758,_0x578369)=>{const _0x1a3cc6=a142_0x4eed,{target:_0x2bfc2d,mode:_0x5a241c}=_0x578369;if(_0x5a241c&&_0x5a241c!==_0x1a3cc6(0x22c))throw Error(_0x1a3cc6(0x25f)+_0x2b9758+'.');if(!_0x2bfc2d||_0x2bfc2d[_0x1a3cc6(0x236)]('\x5c')||/[?#%\x00-\x20]/[_0x1a3cc6(0x28f)](_0x2bfc2d)||/^[a-z][a-z0-9+.-]*:/i[_0x1a3cc6(0x28f)](_0x2bfc2d)||_0x2bfc2d['startsWith']('//'))throw Error('Invalid\x20relationship\x20target:\x20'+_0x2b9758+'.');const _0x52d044=_0x2bfc2d[_0x1a3cc6(0x1f5)]('/')?_0x2bfc2d[_0x1a3cc6(0x21e)](0x1):a142_0x5bd18a[_0x1a3cc6(0x259)][_0x1a3cc6(0x1f9)](a142_0x5bd18a['posix'][_0x1a3cc6(0x1f3)](a142_0x5bd18a['posix'][_0x1a3cc6(0x251)](_0x2b9758),_0x2bfc2d));if(_0x52d044[_0x1a3cc6(0x1f5)](_0x1a3cc6(0x1e4))||_0x52d044==='..'||!_0x52d044[_0x1a3cc6(0x1f5)](_0x1a3cc6(0x23d)))throw Error(_0x1a3cc6(0x261)+_0x2b9758+'.');return _0x52d044;},_0x531a8a=(_0xda07e7,_0x430dbb,_0x467894)=>{const _0xfcc88f=a142_0x4eed,_0x57f3f2=_0x5d0055(_0xda07e7)[_0xfcc88f(0x28c)](_0x514eb1=>_0x514eb1['id']===_0x430dbb&&relationshipTypes(_0x467894)[_0xfcc88f(0x236)](_0x514eb1[_0xfcc88f(0x1d8)]));if(_0x57f3f2[_0xfcc88f(0x1dd)]!==0x1)throw Error(_0xfcc88f(0x267)+_0x467894+_0xfcc88f(0x1dc)+_0xda07e7+'.');return _0x419b9e(_0xda07e7,_0x57f3f2[0x0]);},_0x163446=(_0x2229bb,_0x2f4013)=>{const _0x1874ce=a142_0x4eed,_0x2e3763=_0x5d0055(_0x2229bb)['filter'](_0x40e2b5=>relationshipTypes(_0x2f4013)[_0x1874ce(0x236)](_0x40e2b5[_0x1874ce(0x1d8)]));if(_0x2e3763[_0x1874ce(0x1dd)]!==0x1)throw Error(_0x1874ce(0x267)+_0x2f4013+_0x1874ce(0x1dc)+_0x2229bb+'.');return _0x419b9e(_0x2229bb,_0x2e3763[0x0]);},_0x156021=_0x146408(0x1df),_0x4b8165=_0x299833(_0x156021);if(!matches(_0x4b8165,'workbook'))throw Error(_0x146408(0x28d));const _0x5c17b1=one(chain(_0x4b8165,_0x146408(0x24f),_0x146408(0x23e))[_0x146408(0x28c)](_0x5cff01=>_0x5cff01[_0x146408(0x282)][_0x146408(0x22a)]===_0xc16af1),'worksheet'),_0x42772a=_0x531a8a(_0x156021,_0x5c17b1[_0x146408(0x282)]['r:id'],'worksheet'),_0x27d508=_0x299833(_0x42772a);if(!matches(_0x27d508,_0x146408(0x286)))throw Error(_0x146408(0x1eb));const _0x2cda3f=chain(_0x27d508,_0x146408(0x205),_0x146408(0x273)),_0x319406=new Map(),_0x9986bd=new Set(_0x2cda3f[_0x146408(0x28c)](_0xd28173=>_0xd28173[_0x146408(0x282)][_0x146408(0x201)]==='1'||_0xd28173[_0x146408(0x282)]['hidden']===_0x146408(0x232))[_0x146408(0x260)](_0x24a8c0=>integer(_0x24a8c0[_0x146408(0x282)]['r'],_0x146408(0x225)))),_0x11876b=_0x2ee222=>{const _0x420fca=_0x146408,_0x4cf087=_0x2ee222===undefined?0xf:Number(_0x2ee222);if(!Number[_0x420fca(0x1e3)](_0x4cf087)||_0x4cf087<=0x0||_0x4cf087>409.5)throw Error(_0x420fca(0x28b));return Math['round'](_0x4cf087*0x319c);},_0x279a83=_0x11876b(children(_0x27d508,_0x146408(0x262))[0x0]?.[_0x146408(0x282)][_0x146408(0x27e)]);for(const _0x103b74 of _0x2cda3f)if(_0x103b74[_0x146408(0x282)]['ht']!==undefined)_0x319406[_0x146408(0x233)](integer(_0x103b74['attrs']['r'],_0x146408(0x1ea)),_0x11876b(_0x103b74[_0x146408(0x282)]['ht']));const _0x3a7d0a=[],_0x5a96ea=_0x2e7d51=>{const _0x6d3587=_0x146408;if(!_0xa2160c[_0x6d3587(0x279)](_0x2e7d51[_0x6d3587(0x1ee)]))return;if(++_0x2b3638>0x2710)throw Error('Workbook\x20exceeds\x2010000\x20image\x20occurrences.');_0x3a7d0a[_0x6d3587(0x210)](_0x9986bd[_0x6d3587(0x279)](_0x2e7d51[_0x6d3587(0x273)])?{..._0x2e7d51,'hiddenRow':!![]}:_0x2e7d51);},_0x27c5a2=_0x48587e=>({'row':integer(one(children(_0x48587e,'row',DRAWING),_0x146408(0x222))[_0x146408(0x23b)],'anchor\x20row',0x1869f)+0x1,'col':integer(one(children(_0x48587e,_0x146408(0x1ee)),_0x146408(0x224))[_0x146408(0x23b)],_0x146408(0x224),0xff)+0x1});for(const _0x39d2a6 of children(_0x27d508,_0x146408(0x228))){const _0x18eb00=_0x531a8a(_0x42772a,_0x39d2a6[_0x146408(0x282)]['r:id'],_0x146408(0x228)),_0x2db65d=_0x299833(_0x18eb00);if(!matches(_0x2db65d,_0x146408(0x208)))throw Error(_0x146408(0x27c));for(const _0x4095c6 of _0x2db65d['children']){if(![_0x146408(0x213),_0x146408(0x1d6),_0x146408(0x1f4)][_0x146408(0x250)](_0x503563=>matches(_0x4095c6,_0x503563)))continue;if(_0x4095c6['name']===_0x146408(0x1f4))throw Error(_0x146408(0x270)+_0xc16af1+'.');const _0x47195f=_0x27c5a2(one(children(_0x4095c6,_0x146408(0x27d)),_0x146408(0x214)));if(!_0xa2160c[_0x146408(0x279)](_0x47195f['col']))continue;let _0x47e022;const _0x11e9f2=one(children(_0x4095c6,_0x146408(0x27d)),'anchor\x20start'),_0x34f69e=integer(one(children(_0x11e9f2,_0x146408(0x203)),_0x146408(0x265))['text'],'anchor\x20start\x20offset',Number[_0x146408(0x239)]),_0x5a7ca3=_0x319406[_0x146408(0x1e2)](_0x47195f[_0x146408(0x273)])??_0x279a83;if(_0x34f69e>=_0x5a7ca3)throw Error(_0x146408(0x24a)+_0x47195f[_0x146408(0x273)]+'.');if(_0x4095c6[_0x146408(0x22a)]==='oneCellAnchor'){const _0x59c494=one(children(_0x4095c6,_0x146408(0x26c)),_0x146408(0x1fa)),_0x923188=integer(_0x59c494[_0x146408(0x282)]['cy'],_0x146408(0x200),Number[_0x146408(0x239)]);if(!_0x923188||_0x34f69e+_0x923188>_0x5a7ca3)_0x47e022=_0x146408(0x256);}if(_0x4095c6[_0x146408(0x22a)]===_0x146408(0x1d6)){const _0x9fe7ee=one(children(_0x4095c6,'to'),_0x146408(0x231)),_0x30c4bf=_0x27c5a2(_0x9fe7ee),_0x34e6f5=integer(one(children(_0x9fe7ee,_0x146408(0x203)),_0x146408(0x1e6))['text'],_0x146408(0x1e6),Number[_0x146408(0x239)]),_0x19ffe8=_0x319406[_0x146408(0x1e2)](_0x30c4bf[_0x146408(0x273)])??_0x279a83;if(_0x34e6f5>_0x19ffe8||_0x30c4bf[_0x146408(0x273)]===_0x47195f['row']&&_0x34e6f5<=_0x34f69e)_0x47e022='Image\x20anchor\x20has\x20invalid\x20or\x20reversed\x20row\x20offsets.';if(_0x30c4bf[_0x146408(0x273)]<_0x47195f['row']||_0x30c4bf['row']>_0x47195f[_0x146408(0x273)]+0x1||_0x30c4bf[_0x146408(0x273)]===_0x47195f[_0x146408(0x273)]+0x1&&_0x34e6f5!==0x0)_0x47e022=_0x146408(0x256);}const _0x354f75=chain(_0x4095c6,_0x146408(0x288),_0x146408(0x1ff),'blip');for(const _0x1af197 of _0x354f75){if(_0x1af197[_0x146408(0x282)][_0x146408(0x24e)])throw Error(_0x146408(0x21f));_0x5a96ea({..._0x47195f,'media':[_0x531a8a(_0x18eb00,_0x1af197['attrs']['r:embed'],_0x146408(0x23c))],..._0x47e022?{'error':_0x47e022}:{}});}if(!_0x354f75[_0x146408(0x1dd)])_0x5a96ea({..._0x47195f,'media':[],'error':_0x146408(0x24d)});}}const _0x472ce2=_0x110445=>{const _0x349477=_0x146408,_0x25add3=_0x299833(_0x163446(_0x156021,_0x349477(0x241)));if(!matches(_0x25add3,'metadata'))throw Error(_0x349477(0x21c));const _0xd4cee1=integer(_0x110445[_0x349477(0x282)]['vm'],_0x349477(0x253));if(!_0xd4cee1)throw Error(_0x349477(0x1d5));const _0x3b9d17=children(one(children(_0x25add3,_0x349477(0x223)),_0x349477(0x223)),'bk')[_0xd4cee1-0x1];if(!_0x3b9d17)throw Error(_0x349477(0x1de));const _0x3550c3=one(children(_0x3b9d17,'rc'),_0x349477(0x219)),_0x3f82c1=integer(_0x3550c3['attrs']['t'],_0x349477(0x277)),_0x1c8933=children(one(children(_0x25add3,_0x349477(0x269)),'metadata\x20types'),_0x349477(0x254))[_0x3f82c1-0x1];if(!_0x3f82c1||_0x1c8933?.['attrs'][_0x349477(0x22a)]!==_0x349477(0x20d))throw Error(_0x349477(0x21a));const _0x5cd558=one(children(_0x25add3,_0x349477(0x1f2))['filter'](_0x2ef813=>_0x2ef813[_0x349477(0x282)][_0x349477(0x22a)]===_0x349477(0x20d)),_0x349477(0x218)),_0x202257=children(_0x5cd558,'bk')[integer(_0x3550c3[_0x349477(0x282)]['v'],_0x349477(0x1fb))];if(!_0x202257)throw Error(_0x349477(0x1d4));const _0x294b12=chain(_0x202257,_0x349477(0x255))[_0x349477(0x26b)](_0x53c57d=>children(_0x53c57d,_0x349477(0x26c),SHEET))['filter'](_0x2a10f3=>_0x2a10f3[_0x349477(0x282)][_0x349477(0x229)]?.[_0x349477(0x249)]()===_0x349477(0x1f1)),_0x147165=integer(one(_0x294b12[_0x349477(0x26b)](_0x35a670=>children(_0x35a670,_0x349477(0x290))),_0x349477(0x287))[_0x349477(0x282)]['i'],_0x349477(0x24c)),_0x702338=_0x299833(_0x163446(_0x156021,_0x349477(0x26d)));if(!matches(_0x702338,_0x349477(0x242)))throw Error(_0x349477(0x27f));const _0x5b96bb=children(_0x702338,'rv')[_0x147165];if(!_0x5b96bb)throw Error(_0x349477(0x247));const _0x587c=_0x299833(_0x163446(_0x156021,_0x349477(0x220)));if(!matches(_0x587c,_0x349477(0x23f)))throw Error(_0x349477(0x25c));const _0x2fc72f=children(_0x587c,'s')[integer(_0x5b96bb[_0x349477(0x282)]['s'],_0x349477(0x20f))];if(!_0x2fc72f||_0x2fc72f[_0x349477(0x282)]['t']!==_0x349477(0x204))throw Error(_0x349477(0x283));const _0x3920d1=children(_0x2fc72f,'k'),_0x289114=_0x3920d1[_0x349477(0x260)]((_0xbdaa77,_0x3f0779)=>_0xbdaa77[_0x349477(0x282)]['n']===_0x349477(0x243)?_0x3f0779:-0x1)['filter'](_0x40f9cc=>_0x40f9cc>=0x0);if(_0x289114['length']!==0x1)throw Error(_0x349477(0x24b));const _0xe156d4=children(_0x5b96bb,'v',RICH)[_0x289114[0x0]];if(!_0xe156d4)throw Error(_0x349477(0x1e1));const _0x2554e9=_0x163446(_0x156021,_0x349477(0x1ed)),_0x34b43a=_0x299833(_0x2554e9);if(!matches(_0x34b43a,_0x349477(0x1e0)))throw Error(_0x349477(0x26e));const _0x1612a5=children(_0x34b43a,_0x349477(0x257))[integer(_0xe156d4[_0x349477(0x23b)],_0x349477(0x20a))];if(!_0x1612a5)throw Error('Missing\x20rich\x20image\x20relationship.');return _0x531a8a(_0x2554e9,_0x1612a5[_0x349477(0x282)][_0x349477(0x1e9)],_0x349477(0x23c));};let _0x5555b6;const _0x23a413=_0x579cab=>{const _0x562469=_0x146408;if(!_0x5555b6){_0x5555b6=new Map();const _0x4e2ca2=_0x5d0055(_0x156021)['filter'](_0x8fa9e5=>[...relationshipTypes(_0x562469(0x22e)),...relationshipTypes('cellImages')][_0x562469(0x236)](_0x8fa9e5[_0x562469(0x1d8)]));if(!_0x4e2ca2[_0x562469(0x1dd)]&&_0x75cf70[_0x562469(0x279)]('xl/cellimages.xml'))_0x4e2ca2[_0x562469(0x210)]({'id':'','type':'','target':_0x562469(0x226)});if(_0x4e2ca2[_0x562469(0x1dd)]!==0x1)throw Error(_0x562469(0x25d));const _0x4e4825=_0x419b9e(_0x156021,_0x4e2ca2[0x0]),_0x1dde28=_0x299833(_0x4e4825);if(!matches(_0x1dde28,_0x562469(0x285)))throw Error(_0x562469(0x1d7));for(const _0x2e5bd8 of children(_0x1dde28,_0x562469(0x22e))){const _0xa3636b=one(chain(_0x2e5bd8,'pic',_0x562469(0x237),_0x562469(0x1da)),_0x562469(0x211))[_0x562469(0x282)][_0x562469(0x22a)];if(!_0xa3636b||_0x5555b6[_0x562469(0x279)](_0xa3636b))throw Error(_0x562469(0x215));const _0x518585=one(chain(_0x2e5bd8,_0x562469(0x288),_0x562469(0x1ff),'blip'),_0x562469(0x1db));if(_0x518585[_0x562469(0x282)][_0x562469(0x24e)])throw Error('External\x20WPS\x20image\x20links\x20are\x20not\x20supported.');_0x5555b6[_0x562469(0x233)](_0xa3636b,_0x531a8a(_0x4e4825,_0x518585['attrs'][_0x562469(0x248)],_0x562469(0x23c)));}}const _0x3b40d8=_0x5555b6[_0x562469(0x1e2)](_0x579cab);if(!_0x3b40d8)throw Error(_0x562469(0x23a)+_0x579cab+'.');return _0x3b40d8;},_0x2c32c7=new Set();for(const _0xfd1562 of _0x2cda3f['flatMap'](_0x4e975d=>children(_0x4e975d,'c'))){const _0x492c59=/^([A-Z]+)([1-9]\d*)$/[_0x146408(0x22d)](_0xfd1562[_0x146408(0x282)]['r']??'');if(!_0x492c59)continue;let _0x3691fc=0x0;for(const _0x1847ae of _0x492c59[0x1])_0x3691fc=_0x3691fc*0x1a+_0x1847ae[_0x146408(0x28a)](0x0)-0x40;if(!_0xa2160c[_0x146408(0x279)](_0x3691fc))continue;const _0x436d59=integer(_0x492c59[0x2],_0x146408(0x280));if(_0x2c32c7['has'](_0xfd1562['attrs']['r']))throw Error(_0x146408(0x230));_0x2c32c7['add'](_0xfd1562[_0x146408(0x282)]['r']);const _0x2261c7=children(_0xfd1562,'f');if(!_0xfd1562[_0x146408(0x282)]['vm']&&!_0x2261c7[_0x146408(0x1dd)])continue;try{if(_0x436d59<0x1||_0x3691fc>0x100)throw Error(_0x146408(0x217));let _0x7197d4;if(_0xfd1562[_0x146408(0x282)]['vm']){if(_0x2261c7[_0x146408(0x1dd)])throw Error(_0x146408(0x235));if(_0xfd1562[_0x146408(0x282)]['t']!=='e'||children(_0xfd1562,'v')[_0x146408(0x1dd)]!==0x1||children(_0xfd1562,'v')[0x0]['text']!=='#VALUE!')throw Error(_0x146408(0x25e));_0x7197d4=_0x472ce2(_0xfd1562);}else{const _0x565cf6=one(_0x2261c7,_0x146408(0x27a));if(_0x565cf6['attrs']['t']===_0x146408(0x20c)||_0x565cf6[_0x146408(0x282)]['si'])throw Error(_0x146408(0x27b));const _0x395cf4=/^\s*=?\s*@?(?:_xlfn\.)?DISPIMG\(\s*"((?:[^"]|"")+)"\s*(?:,\s*[01]\s*)?\)\s*$/i[_0x146408(0x22d)](_0x565cf6[_0x146408(0x23b)]);if(!_0x395cf4)throw Error(_0x146408(0x1f8));_0x7197d4=_0x23a413(_0x395cf4[0x1][_0x146408(0x206)](/""/g,'\x22'));}_0x5a96ea({'row':_0x436d59,'col':_0x3691fc,'media':[_0x7197d4],'nativeCell':!![]});}catch(_0x5347f4){_0x5a96ea({'row':_0x436d59,'col':_0x3691fc,'media':[],'nativeCell':!![],'error':_0x5347f4[_0x146408(0x1ef)]});}}return _0x3a7d0a;}
@@ -1 +1 @@
1
- (function(_0x2bdf76,_0xa41249){const _0x529ae0=a142_0x286d,_0x2fc54a=_0x2bdf76();while(!![]){try{const _0x575df7=-parseInt(_0x529ae0(0x115))/0x1*(parseInt(_0x529ae0(0x152))/0x2)+parseInt(_0x529ae0(0x160))/0x3*(parseInt(_0x529ae0(0x149))/0x4)+-parseInt(_0x529ae0(0x129))/0x5*(parseInt(_0x529ae0(0x102))/0x6)+parseInt(_0x529ae0(0x12f))/0x7+parseInt(_0x529ae0(0x125))/0x8+-parseInt(_0x529ae0(0x127))/0x9+parseInt(_0x529ae0(0x11b))/0xa;if(_0x575df7===_0xa41249)break;else _0x2fc54a['push'](_0x2fc54a['shift']());}catch(_0x56f46c){_0x2fc54a['push'](_0x2fc54a['shift']());}}}(a142_0x20fa,0xb6790));import{randomUUID,createHash}from'node:crypto';function a142_0x286d(_0x4c4e57,_0x4e2926){_0x4c4e57=_0x4c4e57-0xfd;const _0x20fa90=a142_0x20fa();let _0x286d26=_0x20fa90[_0x4c4e57];return _0x286d26;}import{lstat,readFile}from'node:fs/promises';import{acquireLock,assertImportContract,assertImportPaths,canonical,resolveImportOutputPath,runExcelImport,saveImportJson}from'./runner.js';function a142_0x20fa(){const _0x368a5f=['value','Image\x20cell\x20references\x20missing\x20media.','Completed\x20image\x20checkpoint\x20value\x20changed.','136PSGhiu','every','importId','batchSize','media','status','manifest','runtimeDomain','errors','phase','get','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','some','schemaVersion','3309IFquvz','rows','version','uploadFields','completed','entries','hash','strategy','rowNumber','3838122iRtdns','isInteger','pending','upload','png','checkpoint','field','inputPaths','hex','isSafeInteger','types','datasetCode','type','Invalid\x20image\x20media\x20descriptor.','bytes','fromEntries','contract','Invalid\x20image\x20readback\x20digest.','fileHash','1149VFkDkJ','imageApi','name','test','utf8','code','4225640IrLCEP','digest','schemaHash','succeeded','includes','sheet','update','dataset-import/','image/png','contentHash','10478600rVlBtd','imageCells','11283516wWwrZT','Image\x20checkpoint\x20does\x20not\x20match\x20the\x20source,\x20target\x20or\x20identity.','5osaDFq','size','map','reduce','Unexpected\x20row\x20checkpoint\x20during\x20image\x20upload\x20phase.','Row\x20phase\x20started\x20but\x20the\x20row\x20checkpoint\x20is\x20missing;\x20stop\x20to\x20avoid\x20duplicate\x20records.','5245919LJlMNJ','maxFileBytes','rows-started','key','length','sha256','Image\x20upload\x20outcome\x20is\x20unknown\x20or\x20missing.\x20Resume\x20to\x20reconcile\x20the\x20original\x20upload\x20identity.','missing','rows-preparing','maxBatchBytes','parserVersion','mappingHash','stringify','appCode','Excel\x20contains\x20invalid\x20or\x20no\x20data\x20rows;\x20no\x20images\x20were\x20uploaded.','fileName','.lock.recovery','isArray','resume','hashes','readback','Uploaded\x20image\x20is\x20not\x20visible.\x20Resume\x20to\x20reconcile\x20before\x20continuing.','00000000-0000-4000-8000-000000000000','report','Cannot\x20read\x20the\x20image\x20import\x20checkpoint.','.lock','860kHAugx','jpg','image/gif','all','imageFields','binding'];a142_0x20fa=function(){return _0x368a5f;};return a142_0x20fa();}import{runAutoIdExcelImport}from'./auto-id-runner.js';import{previewImportBatchCount}from'./preview.js';export function assertImageImportCapability(_0x48401a,_0x16a27e){const _0x8c710d=a142_0x286d;if(!_0x16a27e[_0x8c710d(0x156)]?.[_0x8c710d(0x133)])return;const _0x27edc5=_0x48401a['imageImport'];if(!_0x27edc5||_0x27edc5[_0x8c710d(0x162)]!==0x1||_0x27edc5['uploadId']!=='sha256'||_0x27edc5[_0x8c710d(0x130)]!==0xa00000||_0x27edc5['maxPixels']!==0x2625a00||!Array[_0x8c710d(0x140)](_0x27edc5[_0x8c710d(0x10c)])||![_0x8c710d(0x123),'image/jpeg',_0x8c710d(0x14b)][_0x8c710d(0x153)](_0x4819ac=>_0x27edc5[_0x8c710d(0x10c)]['includes'](_0x4819ac)))throw Error('The\x20server\x20does\x20not\x20support\x20this\x20image\x20import\x20capability.');}export function imageObjectValue(_0x271bfd,_0x585126,_0x166ac7){const _0x83b5a6=a142_0x286d,_0x551d2f=createHash(_0x83b5a6(0x134))[_0x83b5a6(0x121)](JSON[_0x83b5a6(0x13b)]([_0x271bfd['actorId'],_0x271bfd['appCode'],_0x271bfd[_0x83b5a6(0x10d)],_0x585126]))[_0x83b5a6(0x11c)](_0x83b5a6(0x10a)),_0x53216c={'image/png':_0x83b5a6(0x106),'image/jpeg':_0x83b5a6(0x14a),'image/gif':'gif'}[_0x166ac7['type']];if(!_0x53216c||!/^[0-9a-f]{64}$/[_0x83b5a6(0x118)](_0x166ac7[_0x83b5a6(0x124)])||!Number[_0x83b5a6(0x10b)](_0x166ac7['size'])||_0x166ac7[_0x83b5a6(0x12a)]<=0x0||_0x166ac7[_0x83b5a6(0x12a)]>0xa00000)throw Error(_0x83b5a6(0x10f));const _0x5258ba=_0x166ac7[_0x83b5a6(0x124)]+'.'+_0x53216c;return{'key':_0x83b5a6(0x122)+_0x551d2f+'/'+_0x5258ba,'name':_0x5258ba,'type':_0x166ac7[_0x83b5a6(0x10e)],'size':_0x166ac7[_0x83b5a6(0x12a)]};}export function bindImageManifest(_0x23857c,_0x216489,_0x1385b5){const _0x50d845=a142_0x286d,_0x111b0b=new Map(_0x23857c[_0x50d845(0x156)]?.[_0x50d845(0x12b)](_0x49aecb=>[_0x49aecb[_0x50d845(0x124)],_0x49aecb])),_0x4e1b2f=new Map(_0x23857c[_0x50d845(0x126)]?.[_0x50d845(0x12b)](_0x5439f6=>[_0x5439f6['rowNumber']+':'+_0x5439f6[_0x50d845(0x108)],_0x5439f6[_0x50d845(0x142)]]));return{..._0x23857c,'rows':_0x23857c['rows'][_0x50d845(0x12b)](_0x4e0b4c=>({..._0x4e0b4c,'values':Object[_0x50d845(0x111)](Object[_0x50d845(0xfe)](_0x4e0b4c['values'])['map'](([_0x58f11f,_0x58607e])=>{const _0x3c908a=_0x50d845,_0x4578b0=_0x4e1b2f[_0x3c908a(0x15c)](_0x4e0b4c[_0x3c908a(0x101)]+':'+_0x58f11f);return[_0x58f11f,_0x4578b0?_0x4578b0[_0x3c908a(0x12b)](_0x5d2812=>{const _0x29ad50=_0x3c908a,_0x1562e4=_0x111b0b['get'](_0x5d2812);if(!_0x1562e4)throw Error(_0x29ad50(0x150));const _0x4d33a1=imageObjectValue(_0x216489,_0x1385b5,_0x1562e4);return _0x23857c[_0x29ad50(0x163)]?.['includes'](_0x58f11f)?{'fileName':_0x4d33a1[_0x29ad50(0x117)],'filePath':_0x4d33a1['key']}:_0x4d33a1;}):_0x58607e];}))}))};}async function exists(_0x3fee88){const _0x4300b0=a142_0x286d;try{return await lstat(_0x3fee88),!![];}catch(_0x144961){if(_0x144961[_0x4300b0(0x11a)]==='ENOENT')return![];throw _0x144961;}}export async function runImageExcelImport(_0x117f0e){const _0x24451a=a142_0x286d;assertImportContract(_0x117f0e[_0x24451a(0x112)],_0x117f0e[_0x24451a(0x13c)],_0x117f0e[_0x24451a(0x10d)]),assertImageImportCapability(_0x117f0e[_0x24451a(0x112)],_0x117f0e[_0x24451a(0x158)]);if(!Number[_0x24451a(0x103)](_0x117f0e[_0x24451a(0x155)])||_0x117f0e[_0x24451a(0x155)]<0x1||_0x117f0e[_0x24451a(0x155)]>_0x117f0e['contract']['maxBatchSize'])throw Error('Invalid\x20import\x20batch\x20size.');if(_0x117f0e[_0x24451a(0x158)][_0x24451a(0x15a)][_0x24451a(0x133)]||!_0x117f0e[_0x24451a(0x158)]['rows'][_0x24451a(0x133)])throw Error(_0x24451a(0x13d));const _0x42c40d=await resolveImportOutputPath(_0x117f0e[_0x24451a(0x107)]),_0x52482c=await resolveImportOutputPath(_0x117f0e[_0x24451a(0x146)]),_0x2539c9=await resolveImportOutputPath(_0x42c40d+'.rows.json'),_0x5be684=await Promise[_0x24451a(0x14c)]([_0x2539c9,_0x2539c9+_0x24451a(0x148),_0x2539c9+_0x24451a(0x13f),..._0x117f0e[_0x24451a(0x109)]??[]][_0x24451a(0x12b)](resolveImportOutputPath));for(const _0x2da41c of[_0x42c40d,_0x52482c,_0x42c40d+_0x24451a(0x148),_0x42c40d+_0x24451a(0x13f)])await resolveImportOutputPath(_0x2da41c);assertImportPaths(_0x42c40d,_0x52482c,_0x5be684);const {contract:_0x3195ea,manifest:_0x45f936}=_0x117f0e,_0x141b6b=_0x45f936['media']??[];if(new Set(_0x141b6b[_0x24451a(0x12b)](_0x313b47=>_0x313b47[_0x24451a(0x124)]))[_0x24451a(0x12a)]!==_0x141b6b[_0x24451a(0x133)]||_0x141b6b['reduce']((_0x354680,_0xe12abb)=>_0x354680+_0xe12abb[_0x24451a(0x12a)],0x0)>0x32*0x400*0x400||(_0x45f936[_0x24451a(0x126)]??[])[_0x24451a(0x12c)]((_0x38f8a5,_0x4ee32f)=>_0x38f8a5+_0x4ee32f[_0x24451a(0x142)][_0x24451a(0x133)],0x0)>0x2710)throw Error('Invalid\x20image\x20manifest\x20limits.');for(const _0xf7438a of _0x141b6b)if(_0xf7438a['size']!==_0xf7438a[_0x24451a(0x110)]['length']||createHash(_0x24451a(0x134))[_0x24451a(0x121)](_0xf7438a[_0x24451a(0x110)])[_0x24451a(0x11c)]('hex')!==_0xf7438a[_0x24451a(0x124)])throw Error('Image\x20media\x20bytes\x20changed.');previewImportBatchCount(bindImageManifest(_0x45f936,_0x3195ea,_0x24451a(0x145)),_0x3195ea,_0x117f0e[_0x24451a(0x155)]);const _0x5d7b55={'appCode':_0x117f0e[_0x24451a(0x13c)],'datasetCode':_0x117f0e[_0x24451a(0x10d)],'runtimeDomain':_0x117f0e[_0x24451a(0x159)],'actorId':_0x3195ea['actorId'],'fileHash':_0x45f936[_0x24451a(0x114)],'mappingHash':_0x45f936[_0x24451a(0x13a)],'schemaHash':_0x45f936[_0x24451a(0x11d)],'remoteSchemaHash':_0x3195ea['schemaFingerprint'],'strategy':_0x3195ea[_0x24451a(0x100)],'schemaVersion':_0x3195ea[_0x24451a(0x15f)],'batchSize':_0x117f0e[_0x24451a(0x155)],'maxBatchBytes':_0x3195ea[_0x24451a(0x138)],'sheet':_0x45f936[_0x24451a(0x120)],'parserVersion':_0x45f936[_0x24451a(0x139)],'imageFields':_0x45f936[_0x24451a(0x14d)],'cells':_0x45f936['imageCells'],..._0x45f936['uploadFields']?.[_0x24451a(0x133)]?{'uploadFields':_0x45f936['uploadFields']}:{},'media':_0x141b6b['map'](({contentHash:_0x331a77,type:_0x2d11e8,size:_0x2a5fed})=>({'contentHash':_0x331a77,'type':_0x2d11e8,'size':_0x2a5fed})),'rows':_0x45f936[_0x24451a(0x161)]},_0x1c8201=await acquireLock(_0x42c40d);try{let _0x453f3e;if(_0x117f0e[_0x24451a(0x141)]){try{_0x453f3e=JSON['parse'](await readFile(_0x42c40d,_0x24451a(0x119)));}catch{throw Error(_0x24451a(0x147));}if(_0x453f3e[_0x24451a(0x162)]!==0x3||!/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/[_0x24451a(0x118)](_0x453f3e[_0x24451a(0x154)])||canonical(_0x453f3e[_0x24451a(0x14e)])!==canonical(_0x5d7b55)||![_0x24451a(0x156),_0x24451a(0x137),_0x24451a(0x131),_0x24451a(0xfd)]['includes'](_0x453f3e[_0x24451a(0x15b)])||!Array[_0x24451a(0x140)](_0x453f3e[_0x24451a(0x156)])||_0x453f3e[_0x24451a(0x156)][_0x24451a(0x133)]!==_0x141b6b['length']||_0x453f3e[_0x24451a(0x156)][_0x24451a(0x15e)]((_0x134c2e,_0x2e8588)=>_0x134c2e[_0x24451a(0xff)]!==_0x141b6b[_0x2e8588][_0x24451a(0x124)]||!['pending',_0x24451a(0x11e)][_0x24451a(0x11f)](_0x134c2e[_0x24451a(0x157)])))throw Error(_0x24451a(0x128));if(['rows-started',_0x24451a(0xfd)][_0x24451a(0x11f)](_0x453f3e['phase'])&&!await exists(_0x2539c9))throw Error(_0x24451a(0x12e));if(_0x453f3e[_0x24451a(0x15b)]===_0x24451a(0x156)&&await exists(_0x2539c9))throw Error(_0x24451a(0x12d));}else{if(await exists(_0x42c40d)||await exists(_0x2539c9))throw Error(_0x24451a(0x15d));_0x453f3e={'version':0x3,'importId':randomUUID(),'binding':_0x5d7b55,'phase':'media','media':_0x141b6b['map'](_0x968d41=>({'hash':_0x968d41[_0x24451a(0x124)],'status':_0x24451a(0x104)}))},await saveImportJson(_0x42c40d,_0x453f3e);}const _0x1eafd4=(_0x2a6c11,_0x43f31a)=>{const _0x420b89=_0x24451a;if(!_0x2a6c11||_0x2a6c11['contentHash']!==_0x43f31a[_0x420b89(0x124)])throw Error(_0x420b89(0x113));if(_0x2a6c11[_0x420b89(0x157)]===_0x420b89(0x136))return undefined;const _0x556594=imageObjectValue(_0x3195ea,_0x453f3e[_0x420b89(0x154)],_0x43f31a);if(_0x2a6c11[_0x420b89(0x157)]!==_0x420b89(0x11e)||_0x2a6c11['filePath']!==_0x556594[_0x420b89(0x132)]||_0x2a6c11[_0x420b89(0x13e)]!==_0x556594[_0x420b89(0x117)]||_0x2a6c11[_0x420b89(0x10e)]!==_0x556594[_0x420b89(0x10e)]||_0x2a6c11[_0x420b89(0x12a)]!==_0x556594['size'])throw Error('Uploaded\x20image\x20metadata\x20changed\x20or\x20is\x20corrupt.');return _0x556594;};for(let _0x38b877=0x0;_0x38b877<_0x141b6b[_0x24451a(0x133)];_0x38b877++){const _0xa77708=_0x141b6b[_0x38b877],_0x44f374=_0x453f3e[_0x24451a(0x156)][_0x38b877],_0x857962=imageObjectValue(_0x3195ea,_0x453f3e[_0x24451a(0x154)],_0xa77708);if(_0x44f374[_0x24451a(0x157)]===_0x24451a(0x11e)&&canonical(_0x44f374['value'])!==canonical(_0x857962))throw Error(_0x24451a(0x151));let _0x4a10c8;if(_0x117f0e[_0x24451a(0x141)]||_0x44f374['status']==='succeeded')_0x4a10c8=_0x1eafd4(await _0x117f0e[_0x24451a(0x116)]['readback'](_0x453f3e[_0x24451a(0x154)],_0xa77708),_0xa77708);if(!_0x4a10c8&&_0x44f374[_0x24451a(0x157)]==='succeeded')throw Error('Previously\x20uploaded\x20image\x20is\x20missing;\x20automatic\x20repair\x20is\x20disabled.');if(!_0x4a10c8){try{_0x1eafd4(await _0x117f0e['imageApi'][_0x24451a(0x105)](_0x453f3e[_0x24451a(0x154)],_0xa77708),_0xa77708);}catch(_0x22e4e0){_0x4a10c8=_0x1eafd4(await _0x117f0e[_0x24451a(0x116)][_0x24451a(0x143)](_0x453f3e['importId'],_0xa77708),_0xa77708);if(!_0x4a10c8)throw Error(_0x24451a(0x135));}if(!_0x4a10c8)_0x4a10c8=_0x1eafd4(await _0x117f0e[_0x24451a(0x116)][_0x24451a(0x143)](_0x453f3e[_0x24451a(0x154)],_0xa77708),_0xa77708);if(!_0x4a10c8)throw Error(_0x24451a(0x144));}_0x44f374['status']=_0x24451a(0x11e),_0x44f374[_0x24451a(0x14f)]=_0x4a10c8,await saveImportJson(_0x42c40d,_0x453f3e);}const _0x50c31f=bindImageManifest(_0x45f936,_0x3195ea,_0x453f3e[_0x24451a(0x154)]),_0xd8d928=_0x453f3e['phase']===_0x24451a(0x137)?await exists(_0x2539c9):_0x453f3e[_0x24451a(0x15b)]!=='media';_0x453f3e[_0x24451a(0x15b)]===_0x24451a(0x156)&&(_0x453f3e[_0x24451a(0x15b)]=_0x24451a(0x137),await saveImportJson(_0x42c40d,_0x453f3e));const _0x46a3c6={..._0x117f0e,'manifest':_0x50c31f,'checkpoint':_0x2539c9,'report':_0x52482c,'resume':_0xd8d928,'onCheckpointReady':async()=>{const _0x23e723=_0x24451a;_0x453f3e[_0x23e723(0x15b)]=_0x23e723(0x131),await saveImportJson(_0x42c40d,_0x453f3e);}},_0x255a38=_0x3195ea[_0x24451a(0x15f)]===0x2?await runAutoIdExcelImport({..._0x46a3c6,'reconcileImageConflicts':_0x117f0e['resume']===!![]&&_0xd8d928}):await runExcelImport(_0x46a3c6);return _0x453f3e[_0x24451a(0x15b)]=_0x24451a(0xfd),await saveImportJson(_0x42c40d,_0x453f3e),{..._0x255a38,'checkpoint':_0x42c40d,'imageCount':_0x45f936[_0x24451a(0x126)]?.[_0x24451a(0x12c)]((_0x42c69a,_0x192d13)=>_0x42c69a+_0x192d13['hashes'][_0x24451a(0x133)],0x0)??0x0,'uniqueImages':_0x141b6b[_0x24451a(0x133)]};}finally{await _0x1c8201();}}
1
+ (function(_0x56abe7,_0x4939b6){const _0x3e8cbd=a143_0x2837,_0x118f58=_0x56abe7();while(!![]){try{const _0x12b2ec=parseInt(_0x3e8cbd(0x1ce))/0x1+-parseInt(_0x3e8cbd(0x219))/0x2+-parseInt(_0x3e8cbd(0x206))/0x3*(-parseInt(_0x3e8cbd(0x1cf))/0x4)+-parseInt(_0x3e8cbd(0x213))/0x5+-parseInt(_0x3e8cbd(0x1c4))/0x6*(-parseInt(_0x3e8cbd(0x1ec))/0x7)+parseInt(_0x3e8cbd(0x20f))/0x8*(parseInt(_0x3e8cbd(0x1fb))/0x9)+-parseInt(_0x3e8cbd(0x1c3))/0xa;if(_0x12b2ec===_0x4939b6)break;else _0x118f58['push'](_0x118f58['shift']());}catch(_0x3f88de){_0x118f58['push'](_0x118f58['shift']());}}}(a143_0x1566,0xdf3ca));import{randomUUID,createHash}from'node:crypto';import{lstat,readFile}from'node:fs/promises';import{acquireLock,assertImportContract,assertImportPaths,canonical,resolveImportOutputPath,runExcelImport,saveImportJson}from'./runner.js';import{runAutoIdExcelImport}from'./auto-id-runner.js';import{previewImportBatchCount}from'./preview.js';function a143_0x2837(_0x4f2509,_0x4edf41){_0x4f2509=_0x4f2509-0x1c2;const _0x156647=a143_0x1566();let _0x2837d8=_0x156647[_0x4f2509];return _0x2837d8;}export function assertImageImportCapability(_0x2fc165,_0x21ffdd){const _0x38fa68=a143_0x2837;if(!_0x21ffdd[_0x38fa68(0x1f4)]?.[_0x38fa68(0x1fe)])return;const _0xfc872b=_0x2fc165[_0x38fa68(0x1ee)];if(!_0xfc872b||_0xfc872b['version']!==0x1||_0xfc872b[_0x38fa68(0x1e0)]!=='sha256'||_0xfc872b[_0x38fa68(0x1fa)]!==0xa00000||_0xfc872b[_0x38fa68(0x21f)]!==0x2625a00||!Array[_0x38fa68(0x1c2)](_0xfc872b[_0x38fa68(0x204)])||!['image/png',_0x38fa68(0x200),'image/gif']['every'](_0x474b3d=>_0xfc872b['types'][_0x38fa68(0x201)](_0x474b3d)))throw Error('The\x20server\x20does\x20not\x20support\x20this\x20image\x20import\x20capability.');}export function imageObjectValue(_0x185707,_0x1c5418,_0x1ead6c){const _0x25e002=a143_0x2837,_0x41d4c0=createHash(_0x25e002(0x1d1))[_0x25e002(0x20a)](JSON[_0x25e002(0x211)]([_0x185707[_0x25e002(0x20e)],_0x185707[_0x25e002(0x1d8)],_0x185707[_0x25e002(0x203)],_0x1c5418]))[_0x25e002(0x210)](_0x25e002(0x209)),_0x289f34={'image/png':_0x25e002(0x1c6),'image/jpeg':'jpg','image/gif':_0x25e002(0x205)}[_0x1ead6c[_0x25e002(0x1d9)]];if(!_0x289f34||!/^[0-9a-f]{64}$/[_0x25e002(0x1d3)](_0x1ead6c[_0x25e002(0x20d)])||!Number[_0x25e002(0x1e5)](_0x1ead6c[_0x25e002(0x1eb)])||_0x1ead6c['size']<=0x0||_0x1ead6c[_0x25e002(0x1eb)]>0xa00000)throw Error(_0x25e002(0x1d4));const _0x3cc1c4=_0x1ead6c[_0x25e002(0x20d)]+'.'+_0x289f34;return{'key':_0x25e002(0x1c8)+_0x41d4c0+'/'+_0x3cc1c4,'name':_0x3cc1c4,'type':_0x1ead6c['type'],'size':_0x1ead6c[_0x25e002(0x1eb)]};}export function bindImageManifest(_0x52e217,_0x3441c8,_0x53efaf){const _0x2b1d53=a143_0x2837,_0x992a1c=new Map(_0x52e217[_0x2b1d53(0x1f4)]?.[_0x2b1d53(0x1c7)](_0x421321=>[_0x421321[_0x2b1d53(0x20d)],_0x421321])),_0x566bd4=new Map(_0x52e217[_0x2b1d53(0x1cc)]?.[_0x2b1d53(0x1c7)](_0x3dd648=>[_0x3dd648['rowNumber']+':'+_0x3dd648[_0x2b1d53(0x1d7)],_0x3dd648[_0x2b1d53(0x220)]]));return{..._0x52e217,'rows':_0x52e217[_0x2b1d53(0x21b)]['map'](_0x225042=>({..._0x225042,'values':Object[_0x2b1d53(0x207)](Object[_0x2b1d53(0x20b)](_0x225042[_0x2b1d53(0x1e2)])['map'](([_0x9db321,_0x1150a6])=>{const _0x4313e2=_0x2b1d53,_0x34c524=_0x566bd4['get'](_0x225042[_0x4313e2(0x1e4)]+':'+_0x9db321);return[_0x9db321,_0x34c524?_0x34c524['map'](_0x98c208=>{const _0x4588b3=_0x4313e2,_0x391685=_0x992a1c['get'](_0x98c208);if(!_0x391685)throw Error(_0x4588b3(0x1e8));const _0x4b2465=imageObjectValue(_0x3441c8,_0x53efaf,_0x391685);return _0x52e217['uploadFields']?.[_0x4588b3(0x201)](_0x9db321)?{'fileName':_0x4b2465['name'],'filePath':_0x4b2465[_0x4588b3(0x1d5)]}:_0x4b2465;}):_0x1150a6];}))}))};}async function exists(_0xaecad7){const _0x50a9fb=a143_0x2837;try{return await lstat(_0xaecad7),!![];}catch(_0x2a3674){if(_0x2a3674[_0x50a9fb(0x1d2)]==='ENOENT')return![];throw _0x2a3674;}}function a143_0x1566(){const _0x1b85de=['key','checkpoint','field','appCode','type','batchSize','reduce','Image\x20media\x20bytes\x20changed.','Uploaded\x20image\x20is\x20not\x20visible.\x20Resume\x20to\x20reconcile\x20before\x20continuing.','name','Row\x20phase\x20started\x20but\x20the\x20row\x20checkpoint\x20is\x20missing;\x20stop\x20to\x20avoid\x20duplicate\x20records.','uploadId','uploadFields','values','importId','rowNumber','isSafeInteger','rows-preparing','.lock.recovery','Image\x20cell\x20references\x20missing\x20media.','missing','bytes','size','7RWfoTn','schemaVersion','imageImport','fileHash','Unexpected\x20row\x20checkpoint\x20during\x20image\x20upload\x20phase.','hash','succeeded','version','media','status','all','pending','manifest','runtimeDomain','maxFileBytes','1116198HGUNVw','imageApi','Image\x20checkpoint\x20does\x20not\x20match\x20the\x20source,\x20target\x20or\x20identity.','length','contract','image/jpeg','includes','.lock','datasetCode','types','gif','1452273SLQdNG','fromEntries','isInteger','hex','update','entries','phase','contentHash','actorId','64DlAsjC','digest','stringify','Uploaded\x20image\x20metadata\x20changed\x20or\x20is\x20corrupt.','7259700qkekkh','Excel\x20contains\x20invalid\x20or\x20no\x20data\x20rows;\x20no\x20images\x20were\x20uploaded.','completed','utf8','parserVersion','maxBatchBytes','406928jhDyAi','readback','rows','Invalid\x20image\x20manifest\x20limits.','resume','value','maxPixels','hashes','isArray','18255670smjQfi','8102058dsBZvt','parse','png','map','dataset-import/','schemaHash','inputPaths','Invalid\x20import\x20batch\x20size.','imageCells','report','1084648LGpEyX','8jTwYqK','rows-started','sha256','code','test','Invalid\x20image\x20media\x20descriptor.'];a143_0x1566=function(){return _0x1b85de;};return a143_0x1566();}export async function runImageExcelImport(_0x15814c){const _0x1f3aaf=a143_0x2837;assertImportContract(_0x15814c['contract'],_0x15814c['appCode'],_0x15814c[_0x1f3aaf(0x203)]),assertImageImportCapability(_0x15814c[_0x1f3aaf(0x1ff)],_0x15814c['manifest']);if(!Number[_0x1f3aaf(0x208)](_0x15814c[_0x1f3aaf(0x1da)])||_0x15814c[_0x1f3aaf(0x1da)]<0x1||_0x15814c[_0x1f3aaf(0x1da)]>_0x15814c['contract']['maxBatchSize'])throw Error(_0x1f3aaf(0x1cb));if(_0x15814c[_0x1f3aaf(0x1f8)]['errors'][_0x1f3aaf(0x1fe)]||!_0x15814c[_0x1f3aaf(0x1f8)][_0x1f3aaf(0x21b)][_0x1f3aaf(0x1fe)])throw Error(_0x1f3aaf(0x214));const _0x401bc5=await resolveImportOutputPath(_0x15814c[_0x1f3aaf(0x1d6)]),_0x5a2468=await resolveImportOutputPath(_0x15814c[_0x1f3aaf(0x1cd)]),_0x3a1707=await resolveImportOutputPath(_0x401bc5+'.rows.json'),_0x1b45e6=await Promise[_0x1f3aaf(0x1f6)]([_0x3a1707,_0x3a1707+'.lock',_0x3a1707+_0x1f3aaf(0x1e7),..._0x15814c[_0x1f3aaf(0x1ca)]??[]][_0x1f3aaf(0x1c7)](resolveImportOutputPath));for(const _0x55a20f of[_0x401bc5,_0x5a2468,_0x401bc5+_0x1f3aaf(0x202),_0x401bc5+_0x1f3aaf(0x1e7)])await resolveImportOutputPath(_0x55a20f);assertImportPaths(_0x401bc5,_0x5a2468,_0x1b45e6);const {contract:_0x2100d8,manifest:_0x4afc97}=_0x15814c,_0x98a896=_0x4afc97[_0x1f3aaf(0x1f4)]??[];if(new Set(_0x98a896[_0x1f3aaf(0x1c7)](_0x1fa771=>_0x1fa771[_0x1f3aaf(0x20d)]))[_0x1f3aaf(0x1eb)]!==_0x98a896[_0x1f3aaf(0x1fe)]||_0x98a896[_0x1f3aaf(0x1db)]((_0x166f14,_0x7bda7a)=>_0x166f14+_0x7bda7a[_0x1f3aaf(0x1eb)],0x0)>0x32*0x400*0x400||(_0x4afc97[_0x1f3aaf(0x1cc)]??[])[_0x1f3aaf(0x1db)]((_0x13c0af,_0x215725)=>_0x13c0af+_0x215725['hashes']['length'],0x0)>0x2710)throw Error(_0x1f3aaf(0x21c));for(const _0x2c28c4 of _0x98a896)if(_0x2c28c4[_0x1f3aaf(0x1eb)]!==_0x2c28c4[_0x1f3aaf(0x1ea)]['length']||createHash('sha256')[_0x1f3aaf(0x20a)](_0x2c28c4[_0x1f3aaf(0x1ea)])[_0x1f3aaf(0x210)](_0x1f3aaf(0x209))!==_0x2c28c4[_0x1f3aaf(0x20d)])throw Error(_0x1f3aaf(0x1dc));previewImportBatchCount(bindImageManifest(_0x4afc97,_0x2100d8,'00000000-0000-4000-8000-000000000000'),_0x2100d8,_0x15814c[_0x1f3aaf(0x1da)]);const _0x5b9ef7={'appCode':_0x15814c[_0x1f3aaf(0x1d8)],'datasetCode':_0x15814c[_0x1f3aaf(0x203)],'runtimeDomain':_0x15814c[_0x1f3aaf(0x1f9)],'actorId':_0x2100d8[_0x1f3aaf(0x20e)],'fileHash':_0x4afc97[_0x1f3aaf(0x1ef)],'mappingHash':_0x4afc97['mappingHash'],'schemaHash':_0x4afc97[_0x1f3aaf(0x1c9)],'remoteSchemaHash':_0x2100d8['schemaFingerprint'],'strategy':_0x2100d8['strategy'],'schemaVersion':_0x2100d8[_0x1f3aaf(0x1ed)],'batchSize':_0x15814c['batchSize'],'maxBatchBytes':_0x2100d8[_0x1f3aaf(0x218)],'sheet':_0x4afc97['sheet'],'parserVersion':_0x4afc97[_0x1f3aaf(0x217)],'imageFields':_0x4afc97['imageFields'],'cells':_0x4afc97[_0x1f3aaf(0x1cc)],..._0x4afc97[_0x1f3aaf(0x1e1)]?.[_0x1f3aaf(0x1fe)]?{'uploadFields':_0x4afc97[_0x1f3aaf(0x1e1)]}:{},'media':_0x98a896['map'](({contentHash:_0x4d3c9d,type:_0xc3fcc6,size:_0x46919f})=>({'contentHash':_0x4d3c9d,'type':_0xc3fcc6,'size':_0x46919f})),'rows':_0x4afc97['rows']},_0xd4b933=await acquireLock(_0x401bc5);try{let _0x59d0bf;if(_0x15814c[_0x1f3aaf(0x21d)]){try{_0x59d0bf=JSON[_0x1f3aaf(0x1c5)](await readFile(_0x401bc5,_0x1f3aaf(0x216)));}catch{throw Error('Cannot\x20read\x20the\x20image\x20import\x20checkpoint.');}if(_0x59d0bf[_0x1f3aaf(0x1f3)]!==0x3||!/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/[_0x1f3aaf(0x1d3)](_0x59d0bf['importId'])||canonical(_0x59d0bf['binding'])!==canonical(_0x5b9ef7)||!['media',_0x1f3aaf(0x1e6),_0x1f3aaf(0x1d0),_0x1f3aaf(0x215)][_0x1f3aaf(0x201)](_0x59d0bf['phase'])||!Array['isArray'](_0x59d0bf['media'])||_0x59d0bf['media']['length']!==_0x98a896[_0x1f3aaf(0x1fe)]||_0x59d0bf[_0x1f3aaf(0x1f4)]['some']((_0x76413c,_0x83a54c)=>_0x76413c[_0x1f3aaf(0x1f1)]!==_0x98a896[_0x83a54c][_0x1f3aaf(0x20d)]||![_0x1f3aaf(0x1f7),_0x1f3aaf(0x1f2)][_0x1f3aaf(0x201)](_0x76413c[_0x1f3aaf(0x1f5)])))throw Error(_0x1f3aaf(0x1fd));if([_0x1f3aaf(0x1d0),'completed']['includes'](_0x59d0bf[_0x1f3aaf(0x20c)])&&!await exists(_0x3a1707))throw Error(_0x1f3aaf(0x1df));if(_0x59d0bf['phase']===_0x1f3aaf(0x1f4)&&await exists(_0x3a1707))throw Error(_0x1f3aaf(0x1f0));}else{if(await exists(_0x401bc5)||await exists(_0x3a1707))throw Error('Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.');_0x59d0bf={'version':0x3,'importId':randomUUID(),'binding':_0x5b9ef7,'phase':_0x1f3aaf(0x1f4),'media':_0x98a896[_0x1f3aaf(0x1c7)](_0x1e7d01=>({'hash':_0x1e7d01[_0x1f3aaf(0x20d)],'status':_0x1f3aaf(0x1f7)}))},await saveImportJson(_0x401bc5,_0x59d0bf);}const _0xdddd0c=(_0x61975a,_0x41f1a8)=>{const _0x52d00f=_0x1f3aaf;if(!_0x61975a||_0x61975a[_0x52d00f(0x20d)]!==_0x41f1a8['contentHash'])throw Error('Invalid\x20image\x20readback\x20digest.');if(_0x61975a[_0x52d00f(0x1f5)]===_0x52d00f(0x1e9))return undefined;const _0x532076=imageObjectValue(_0x2100d8,_0x59d0bf['importId'],_0x41f1a8);if(_0x61975a[_0x52d00f(0x1f5)]!==_0x52d00f(0x1f2)||_0x61975a['filePath']!==_0x532076['key']||_0x61975a['fileName']!==_0x532076[_0x52d00f(0x1de)]||_0x61975a['type']!==_0x532076['type']||_0x61975a[_0x52d00f(0x1eb)]!==_0x532076[_0x52d00f(0x1eb)])throw Error(_0x52d00f(0x212));return _0x532076;};for(let _0x38978b=0x0;_0x38978b<_0x98a896[_0x1f3aaf(0x1fe)];_0x38978b++){const _0x31ab3f=_0x98a896[_0x38978b],_0x893b4=_0x59d0bf[_0x1f3aaf(0x1f4)][_0x38978b],_0x343969=imageObjectValue(_0x2100d8,_0x59d0bf['importId'],_0x31ab3f);if(_0x893b4[_0x1f3aaf(0x1f5)]===_0x1f3aaf(0x1f2)&&canonical(_0x893b4[_0x1f3aaf(0x21e)])!==canonical(_0x343969))throw Error('Completed\x20image\x20checkpoint\x20value\x20changed.');let _0x38e9b7;if(_0x15814c[_0x1f3aaf(0x21d)]||_0x893b4[_0x1f3aaf(0x1f5)]===_0x1f3aaf(0x1f2))_0x38e9b7=_0xdddd0c(await _0x15814c[_0x1f3aaf(0x1fc)]['readback'](_0x59d0bf[_0x1f3aaf(0x1e3)],_0x31ab3f),_0x31ab3f);if(!_0x38e9b7&&_0x893b4[_0x1f3aaf(0x1f5)]==='succeeded')throw Error('Previously\x20uploaded\x20image\x20is\x20missing;\x20automatic\x20repair\x20is\x20disabled.');if(!_0x38e9b7){try{_0xdddd0c(await _0x15814c[_0x1f3aaf(0x1fc)]['upload'](_0x59d0bf[_0x1f3aaf(0x1e3)],_0x31ab3f),_0x31ab3f);}catch(_0x7c44f5){_0x38e9b7=_0xdddd0c(await _0x15814c[_0x1f3aaf(0x1fc)][_0x1f3aaf(0x21a)](_0x59d0bf['importId'],_0x31ab3f),_0x31ab3f);if(!_0x38e9b7)throw Error('Image\x20upload\x20outcome\x20is\x20unknown\x20or\x20missing.\x20Resume\x20to\x20reconcile\x20the\x20original\x20upload\x20identity.');}if(!_0x38e9b7)_0x38e9b7=_0xdddd0c(await _0x15814c[_0x1f3aaf(0x1fc)][_0x1f3aaf(0x21a)](_0x59d0bf[_0x1f3aaf(0x1e3)],_0x31ab3f),_0x31ab3f);if(!_0x38e9b7)throw Error(_0x1f3aaf(0x1dd));}_0x893b4['status']=_0x1f3aaf(0x1f2),_0x893b4[_0x1f3aaf(0x21e)]=_0x38e9b7,await saveImportJson(_0x401bc5,_0x59d0bf);}const _0x523d55=bindImageManifest(_0x4afc97,_0x2100d8,_0x59d0bf['importId']),_0x38cc13=_0x59d0bf['phase']===_0x1f3aaf(0x1e6)?await exists(_0x3a1707):_0x59d0bf[_0x1f3aaf(0x20c)]!=='media';_0x59d0bf[_0x1f3aaf(0x20c)]===_0x1f3aaf(0x1f4)&&(_0x59d0bf[_0x1f3aaf(0x20c)]=_0x1f3aaf(0x1e6),await saveImportJson(_0x401bc5,_0x59d0bf));const _0x3512d4={..._0x15814c,'manifest':_0x523d55,'checkpoint':_0x3a1707,'report':_0x5a2468,'resume':_0x38cc13,'onCheckpointReady':async()=>{const _0x52cae0=_0x1f3aaf;_0x59d0bf[_0x52cae0(0x20c)]=_0x52cae0(0x1d0),await saveImportJson(_0x401bc5,_0x59d0bf);}},_0x1668b9=_0x2100d8[_0x1f3aaf(0x1ed)]===0x2?await runAutoIdExcelImport({..._0x3512d4,'reconcileImageConflicts':_0x15814c[_0x1f3aaf(0x21d)]===!![]&&_0x38cc13}):await runExcelImport(_0x3512d4);return _0x59d0bf['phase']=_0x1f3aaf(0x215),await saveImportJson(_0x401bc5,_0x59d0bf),{..._0x1668b9,'checkpoint':_0x401bc5,'imageCount':_0x4afc97['imageCells']?.[_0x1f3aaf(0x1db)]((_0x437c3b,_0x135c69)=>_0x437c3b+_0x135c69[_0x1f3aaf(0x220)]['length'],0x0)??0x0,'uniqueImages':_0x98a896['length']};}finally{await _0xd4b933();}}
@@ -1 +1 @@
1
- function a143_0xc122(){const _0x26a98d=['417FnRGns','5347880ivwxyP','source','Dataset\x20source\x20metadata\x20is\x20inconsistent.','1405bwOmIZ','34398914chEcst','23037RtUnyD','dataset','code','2948880HVGKQz','9qONKqq','appCode','1646jIJIif','48RuzKmK','modelCode','isArray','sourceType','some','6387456zNAchN','14996bLMECF'];a143_0xc122=function(){return _0x26a98d;};return a143_0xc122();}function a143_0xaaa4(_0x39e55c,_0xe3f6ca){_0x39e55c=_0x39e55c-0x181;const _0xc12224=a143_0xc122();let _0xaaa4eb=_0xc12224[_0x39e55c];return _0xaaa4eb;}(function(_0x319d45,_0x3bb415){const _0x544b09=a143_0xaaa4,_0x1e4361=_0x319d45();while(!![]){try{const _0x4e946f=parseInt(_0x544b09(0x18d))/0x1*(-parseInt(_0x544b09(0x181))/0x2)+-parseInt(_0x544b09(0x189))/0x3*(-parseInt(_0x544b09(0x188))/0x4)+-parseInt(_0x544b09(0x18a))/0x5+-parseInt(_0x544b09(0x187))/0x6+-parseInt(_0x544b09(0x18f))/0x7*(-parseInt(_0x544b09(0x182))/0x8)+parseInt(_0x544b09(0x193))/0x9*(parseInt(_0x544b09(0x192))/0xa)+parseInt(_0x544b09(0x18e))/0xb;if(_0x4e946f===_0x3bb415)break;else _0x1e4361['push'](_0x1e4361['shift']());}catch(_0x294283){_0x1e4361['push'](_0x1e4361['shift']());}}}(a143_0xc122,0xa42c4));export function assertDatasetImportTarget(_0x412ba0,_0x3a6df5,_0x3da1b7){const _0x1a4c64=a143_0xaaa4;if(!_0x412ba0||typeof _0x412ba0!=='object'||Array[_0x1a4c64(0x184)](_0x412ba0))throw Error('Dataset\x20metadata\x20is\x20missing.');const _0x40bc90=[_0x412ba0[_0x1a4c64(0x191)],_0x412ba0[_0x1a4c64(0x183)],_0x412ba0[_0x1a4c64(0x190)]?.['datasetCode']]['filter'](_0x14a7c1=>_0x14a7c1!=null);if(!_0x40bc90['length']||_0x40bc90[_0x1a4c64(0x186)](_0x4d1602=>_0x4d1602!==_0x3da1b7)||_0x412ba0['appCode']!=null&&_0x412ba0[_0x1a4c64(0x194)]!==_0x3a6df5||_0x412ba0['dataset']?.['appCode']!=null&&_0x412ba0[_0x1a4c64(0x190)][_0x1a4c64(0x194)]!==_0x3a6df5)throw Error('Dataset\x20metadata\x20does\x20not\x20match\x20the\x20requested\x20target.');const _0x4deaaf=[_0x412ba0[_0x1a4c64(0x18b)],_0x412ba0['dataset']?.[_0x1a4c64(0x185)]]['filter'](_0x278f5c=>_0x278f5c!=null);if(_0x4deaaf[_0x1a4c64(0x186)](_0xdc4e56=>typeof _0xdc4e56!=='string'||_0xdc4e56!==_0x4deaaf[0x0]))throw Error(_0x1a4c64(0x18c));return _0x4deaaf[0x0];}
1
+ function a144_0x29c0(_0x39e308,_0x27b4a4){_0x39e308=_0x39e308-0xd9;const _0x46c590=a144_0x46c5();let _0x29c0f5=_0x46c590[_0x39e308];return _0x29c0f5;}(function(_0xbc9c1f,_0x3fcf51){const _0x2473be=a144_0x29c0,_0x7dd5dd=_0xbc9c1f();while(!![]){try{const _0x4f5c75=-parseInt(_0x2473be(0xe7))/0x1+-parseInt(_0x2473be(0xdf))/0x2*(-parseInt(_0x2473be(0xda))/0x3)+-parseInt(_0x2473be(0xe8))/0x4*(-parseInt(_0x2473be(0xd9))/0x5)+parseInt(_0x2473be(0xdb))/0x6+parseInt(_0x2473be(0xed))/0x7*(-parseInt(_0x2473be(0xdd))/0x8)+-parseInt(_0x2473be(0xef))/0x9+parseInt(_0x2473be(0xdc))/0xa;if(_0x4f5c75===_0x3fcf51)break;else _0x7dd5dd['push'](_0x7dd5dd['shift']());}catch(_0xd660a9){_0x7dd5dd['push'](_0x7dd5dd['shift']());}}}(a144_0x46c5,0x4091e));function a144_0x46c5(){const _0x2bf5ee=['object','datasetCode','code','215981OsgDXB','860YAHTDY','dataset','string','length','Dataset\x20source\x20metadata\x20is\x20inconsistent.','266qRAiXv','Dataset\x20metadata\x20is\x20missing.','1338021ywDqkg','1720gVSret','3QNvTBj','2339874VKdAMF','5538800StVVka','98288EtTKsb','filter','156354eRSole','appCode','source','some','modelCode'];a144_0x46c5=function(){return _0x2bf5ee;};return a144_0x46c5();}export function assertDatasetImportTarget(_0x3793a0,_0x2804fc,_0x4e7be0){const _0x5c7bec=a144_0x29c0;if(!_0x3793a0||typeof _0x3793a0!==_0x5c7bec(0xe4)||Array['isArray'](_0x3793a0))throw Error(_0x5c7bec(0xee));const _0x44aeb1=[_0x3793a0[_0x5c7bec(0xe6)],_0x3793a0[_0x5c7bec(0xe3)],_0x3793a0[_0x5c7bec(0xe9)]?.[_0x5c7bec(0xe5)]][_0x5c7bec(0xde)](_0x3189ed=>_0x3189ed!=null);if(!_0x44aeb1[_0x5c7bec(0xeb)]||_0x44aeb1[_0x5c7bec(0xe2)](_0x34587f=>_0x34587f!==_0x4e7be0)||_0x3793a0[_0x5c7bec(0xe0)]!=null&&_0x3793a0['appCode']!==_0x2804fc||_0x3793a0[_0x5c7bec(0xe9)]?.['appCode']!=null&&_0x3793a0[_0x5c7bec(0xe9)][_0x5c7bec(0xe0)]!==_0x2804fc)throw Error('Dataset\x20metadata\x20does\x20not\x20match\x20the\x20requested\x20target.');const _0x282ce6=[_0x3793a0[_0x5c7bec(0xe1)],_0x3793a0['dataset']?.['sourceType']][_0x5c7bec(0xde)](_0x393623=>_0x393623!=null);if(_0x282ce6[_0x5c7bec(0xe2)](_0x186c7a=>typeof _0x186c7a!==_0x5c7bec(0xea)||_0x186c7a!==_0x282ce6[0x0]))throw Error(_0x5c7bec(0xec));return _0x282ce6[0x0];}
@@ -1 +1 @@
1
- (function(_0x359ee4,_0x290fd8){const _0xb82ef8=a144_0x317c,_0x51f7a1=_0x359ee4();while(!![]){try{const _0x515c3d=-parseInt(_0xb82ef8(0x1d1))/0x1*(parseInt(_0xb82ef8(0x1dc))/0x2)+-parseInt(_0xb82ef8(0x1da))/0x3+-parseInt(_0xb82ef8(0x1d2))/0x4+parseInt(_0xb82ef8(0x1cf))/0x5*(-parseInt(_0xb82ef8(0x1d7))/0x6)+-parseInt(_0xb82ef8(0x1e0))/0x7+parseInt(_0xb82ef8(0x1db))/0x8*(-parseInt(_0xb82ef8(0x1e1))/0x9)+parseInt(_0xb82ef8(0x1d5))/0xa;if(_0x515c3d===_0x290fd8)break;else _0x51f7a1['push'](_0x51f7a1['shift']());}catch(_0x46ee14){_0x51f7a1['push'](_0x51f7a1['shift']());}}}(a144_0x2275,0x5c5ea));function a144_0x2275(){const _0x3df52f=['\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','utf8','byteLength','75ZshAtg','map','235PlcLJm','1190088EELjEN','length','rows','28797800ASYPZc','rowNumber','213750snxOhB','push','schemaVersion','1068444nLWzKx','1184rdqozr','3450QbDODb','maxBatchBytes','Excel\x20row\x20','schemaFingerprint','1174026fgHBuC','45018YBxssI'];a144_0x2275=function(){return _0x3df52f;};return a144_0x2275();}function a144_0x317c(_0x3921a1,_0x18885c){_0x3921a1=_0x3921a1-0x1cc;const _0x227594=a144_0x2275();let _0x317cf5=_0x227594[_0x3921a1];return _0x317cf5;}export function previewImportBatchCount(_0x2ba595,_0x363d89,_0x59d762){const _0x55d53e=a144_0x317c,_0x2c253d=_0xfa20e2=>_0xfa20e2[_0x55d53e(0x1d0)](_0x9c345d=>_0x363d89['schemaVersion']===0x1?{..._0x2ba595[_0x55d53e(0x1d4)][_0x9c345d]['values'],'id':-0x1fffffffffffff}:_0x2ba595['rows'][_0x9c345d]['values']),_0x1e1095=_0x58d1bb=>Buffer[_0x55d53e(0x1ce)](JSON['stringify']({'schemaFingerprint':_0x363d89[_0x55d53e(0x1df)],..._0x363d89[_0x55d53e(0x1d9)]===0x2?{'taskId':0x2**0x34}:{},'items':_0x2c253d(_0x58d1bb)}),_0x55d53e(0x1cd));let _0x5473cf=0x0,_0x3afa91=[];for(let _0x50ced4=0x0;_0x50ced4<_0x2ba595['rows'][_0x55d53e(0x1d3)];_0x50ced4++){if(_0x1e1095([_0x50ced4])>_0x363d89[_0x55d53e(0x1dd)])throw Error(_0x55d53e(0x1de)+_0x2ba595['rows'][_0x50ced4][_0x55d53e(0x1d6)]+_0x55d53e(0x1cc));_0x3afa91['length']&&(_0x3afa91['length']===_0x59d762||_0x1e1095([..._0x3afa91,_0x50ced4])>_0x363d89[_0x55d53e(0x1dd)])&&(_0x5473cf++,_0x3afa91=[]),_0x3afa91[_0x55d53e(0x1d8)](_0x50ced4);}return _0x5473cf+Number(_0x3afa91[_0x55d53e(0x1d3)]>0x0);}
1
+ (function(_0x5bfe44,_0x1abf8e){const _0x1cce9d=a145_0x1297,_0x1a3160=_0x5bfe44();while(!![]){try{const _0x3b4cfb=-parseInt(_0x1cce9d(0x132))/0x1*(-parseInt(_0x1cce9d(0x12e))/0x2)+-parseInt(_0x1cce9d(0x128))/0x3*(-parseInt(_0x1cce9d(0x120))/0x4)+parseInt(_0x1cce9d(0x11d))/0x5*(-parseInt(_0x1cce9d(0x130))/0x6)+parseInt(_0x1cce9d(0x131))/0x7+parseInt(_0x1cce9d(0x11c))/0x8*(parseInt(_0x1cce9d(0x124))/0x9)+-parseInt(_0x1cce9d(0x11e))/0xa+-parseInt(_0x1cce9d(0x11f))/0xb;if(_0x3b4cfb===_0x1abf8e)break;else _0x1a3160['push'](_0x1a3160['shift']());}catch(_0x72fa4e){_0x1a3160['push'](_0x1a3160['shift']());}}}(a145_0x29a5,0xc64cd));function a145_0x1297(_0x411c7b,_0x16daf7){_0x411c7b=_0x411c7b-0x11c;const _0x29a57e=a145_0x29a5();let _0x1297d3=_0x29a57e[_0x411c7b];return _0x1297d3;}function a145_0x29a5(){const _0x15200d=['push','rows','3EmvlRA','stringify','maxBatchBytes','schemaVersion','Excel\x20row\x20','\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','7494gBZoeJ','length','6NWLMBl','1197959HztAfd','433PPlosW','43944QqVNLk','386445SKowSJ','8839100ZoeWLE','8372210voqVcj','1337904MkRlgU','utf8','rowNumber','values','666dWDVbO','map'];a145_0x29a5=function(){return _0x15200d;};return a145_0x29a5();}export function previewImportBatchCount(_0x5eed83,_0x4af627,_0x4140d1){const _0x591689=a145_0x1297,_0x134efe=_0x4f0cf2=>_0x4f0cf2[_0x591689(0x125)](_0x1a80cf=>_0x4af627[_0x591689(0x12b)]===0x1?{..._0x5eed83[_0x591689(0x127)][_0x1a80cf][_0x591689(0x123)],'id':-0x1fffffffffffff}:_0x5eed83[_0x591689(0x127)][_0x1a80cf][_0x591689(0x123)]),_0x3cedf2=_0x4d1773=>Buffer['byteLength'](JSON[_0x591689(0x129)]({'schemaFingerprint':_0x4af627['schemaFingerprint'],..._0x4af627[_0x591689(0x12b)]===0x2?{'taskId':0x2**0x34}:{},'items':_0x134efe(_0x4d1773)}),_0x591689(0x121));let _0x31a069=0x0,_0x570d8f=[];for(let _0x149561=0x0;_0x149561<_0x5eed83[_0x591689(0x127)][_0x591689(0x12f)];_0x149561++){if(_0x3cedf2([_0x149561])>_0x4af627[_0x591689(0x12a)])throw Error(_0x591689(0x12c)+_0x5eed83[_0x591689(0x127)][_0x149561][_0x591689(0x122)]+_0x591689(0x12d));_0x570d8f[_0x591689(0x12f)]&&(_0x570d8f[_0x591689(0x12f)]===_0x4140d1||_0x3cedf2([..._0x570d8f,_0x149561])>_0x4af627[_0x591689(0x12a)])&&(_0x31a069++,_0x570d8f=[]),_0x570d8f[_0x591689(0x126)](_0x149561);}return _0x31a069+Number(_0x570d8f[_0x591689(0x12f)]>0x0);}
@@ -1 +1 @@
1
- const a145_0x2b92c0=a145_0x549e;(function(_0x50a5cd,_0x20b3b2){const _0x17a2ec=a145_0x549e,_0x34f3b7=_0x50a5cd();while(!![]){try{const _0x587d31=-parseInt(_0x17a2ec(0x1a8))/0x1*(-parseInt(_0x17a2ec(0x194))/0x2)+-parseInt(_0x17a2ec(0x18a))/0x3+-parseInt(_0x17a2ec(0x1e2))/0x4+-parseInt(_0x17a2ec(0x1aa))/0x5*(-parseInt(_0x17a2ec(0x1c0))/0x6)+-parseInt(_0x17a2ec(0x185))/0x7*(parseInt(_0x17a2ec(0x1da))/0x8)+-parseInt(_0x17a2ec(0x17a))/0x9*(parseInt(_0x17a2ec(0x198))/0xa)+-parseInt(_0x17a2ec(0x1a2))/0xb*(-parseInt(_0x17a2ec(0x1c4))/0xc);if(_0x587d31===_0x20b3b2)break;else _0x34f3b7['push'](_0x34f3b7['shift']());}catch(_0x48de27){_0x34f3b7['push'](_0x34f3b7['shift']());}}}(a145_0x305c,0xe2c21));import{randomBytes,randomUUID}from'node:crypto';import{lstat,open,readFile,realpath,rename,unlink}from'node:fs/promises';import{resolve,dirname,basename}from'node:path';function a145_0x305c(){const _0x2422a6=['netType','createUserName','size','join','maxBatchSize','runtimeDomain','object','Import\x20input,\x20output\x20and\x20lock\x20paths\x20must\x20be\x20different\x20files.','values','isInteger','.tmp-','Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20stopped.','status','code','110277dOJOtg','completed','binding','type','stringify','districtAdcode','rowNumber','datasetCode','imageFields','.lock','countryCode','914333VjBGhC','streetNumber','The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20fixed\x20IDs\x20before\x20continuing.','ENOENT','createUserId','4267761HyMxNv','add','filter','Invalid\x20write\x20result.','Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.','unsent','fileHash','rows','accuracy','catch','2NUVIWc','errorMessage','The\x20server\x20import\x20contract\x20is\x20unsupported\x20or\x20incomplete.','lbswuaCacheId','1130WGCyFn','mappingHash','keys','hex','.lock.recovery','slice','isArray','Invalid\x20import\x20batch\x20size.','Import\x20output\x20must\x20not\x20be\x20a\x20symbolic\x20link.','Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.','44TgLTPe','succeeded','.recovery','pending','Import\x20lock\x20recovery\x20is\x20active\x20or\x20interrupted;\x20inspect\x20the\x20recovery\x20guard\x20before\x20retrying.','dingTalkUrl','1132061BfSKAS','pid','525FLOnuD','road','close','entries','schemaFingerprint','The\x20import\x20checkpoint\x20is\x20locked\x20by\x20a\x20running\x20process.','elapsedMs','maxBatchBytes','Import\x20primary\x20key\x20collision;\x20stop\x20without\x20replacing\x20the\x20fixed\x20IDs.','push','every','report','resume','byteLength','geolocation','actorId','has','pois','address','undefined','latitude','ESRCH','75342pgXepO','Excel\x20row\x20','writeFile','now','8603100kCwGLh','conflict','message','get','uploadFields','forEach','version','Invalid\x20or\x20duplicate\x20import\x20readback\x20ID.','Invalid\x20import\x20readback\x20response.','province','source','sort','schemaVersion','importId','fixed-negative-id','errors','readback','ids','map','set','string','time','56VsQScp','appCode','district','length','checkpoint','unknown','batchSize','kill','2671744nBbjmz','resultCode','Invalid\x20import\x20lock;\x20inspect\x20it\x20before\x20recovery.','isSafeInteger','strategy','isSymbolicLink','parse','country','EEXIST','write','\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','auto-id-task-marker','sheet','some','Import\x20lock\x20changed;\x20retry\x20recovery.','sync','utf8','toString','cityAdcode','includes'];a145_0x305c=function(){return _0x2422a6;};return a145_0x305c();}export function canonical(_0x2400d7){const _0x4991e0=a145_0x549e;if(Array[_0x4991e0(0x19e)](_0x2400d7))return'['+_0x2400d7[_0x4991e0(0x1d6)](canonical)['join'](',')+']';if(_0x2400d7&&typeof _0x2400d7==='object')return'{'+Object['keys'](_0x2400d7)[_0x4991e0(0x1cf)]()['map'](_0x2e2b5a=>JSON[_0x4991e0(0x17e)](_0x2e2b5a)+':'+canonical(_0x2400d7[_0x2e2b5a]))[_0x4991e0(0x16f)](',')+'}';return JSON[_0x4991e0(0x17e)](_0x2400d7)??_0x4991e0(0x1bd);}const EMPTY_IMAGE_LOCATION_FIELDS=new Set([a145_0x2b92c0(0x1d9),'operatorType',a145_0x2b92c0(0x17f),a145_0x2b92c0(0x1dc),a145_0x2b92c0(0x1bb),a145_0x2b92c0(0x1ab),a145_0x2b92c0(0x15f),a145_0x2b92c0(0x184),a145_0x2b92c0(0x1cd),a145_0x2b92c0(0x1be),'city',a145_0x2b92c0(0x16c),a145_0x2b92c0(0x1e3),a145_0x2b92c0(0x186),a145_0x2b92c0(0x192),'longitude',a145_0x2b92c0(0x16a),a145_0x2b92c0(0x195),a145_0x2b92c0(0x1bc),a145_0x2b92c0(0x197)]);export function sameImportValue(_0x52709e,_0x3de059,_0x18811d=![]){const _0x12eb59=a145_0x2b92c0;if(_0x18811d){const _0x162e0b=_0x158588=>Array[_0x12eb59(0x19e)](_0x158588)?_0x158588[_0x12eb59(0x1d6)](_0x458b61=>{const _0x5b1409=_0x12eb59;if(!_0x458b61||typeof _0x458b61!==_0x5b1409(0x172)||Array[_0x5b1409(0x19e)](_0x458b61))return _0x458b61;const _0x4c473a={..._0x458b61};delete _0x4c473a['url'],delete _0x4c473a['previewUrl'];if(_0x4c473a[_0x5b1409(0x1a7)]==='')delete _0x4c473a[_0x5b1409(0x1a7)];if(_0x4c473a[_0x5b1409(0x189)]==null)delete _0x4c473a[_0x5b1409(0x189)];if(_0x4c473a[_0x5b1409(0x16d)]==null)delete _0x4c473a['createUserName'];if(_0x4c473a['geolocation']==null||typeof _0x4c473a[_0x5b1409(0x1b8)]===_0x5b1409(0x172)&&!Array['isArray'](_0x4c473a['geolocation'])&&Object[_0x5b1409(0x1ad)](_0x4c473a[_0x5b1409(0x1b8)])[_0x5b1409(0x1b4)](([_0x5a8059,_0x1a7d96])=>EMPTY_IMAGE_LOCATION_FIELDS[_0x5b1409(0x1ba)](_0x5a8059)&&_0x1a7d96===null))delete _0x4c473a[_0x5b1409(0x1b8)];for(const _0x3bd8aa of['name',_0x5b1409(0x17d),'key'])if(!(_0x3bd8aa in _0x4c473a))_0x4c473a[_0x3bd8aa]='';if(_0x4c473a[_0x5b1409(0x16e)]==null)_0x4c473a[_0x5b1409(0x16e)]=0x0;return _0x4c473a;}):_0x158588;return canonical(_0x162e0b(_0x52709e))===canonical(_0x162e0b(_0x3de059));}return _0x52709e===null?_0x3de059===null||_0x3de059===undefined:canonical(_0x3de059)===canonical(_0x52709e);}async function rejectSymlink(_0x19138c){const _0x4e40f0=a145_0x2b92c0;try{if((await lstat(_0x19138c))[_0x4e40f0(0x1e7)]())throw Error(_0x4e40f0(0x1a0));}catch(_0x4c2970){if(_0x4c2970[_0x4e40f0(0x179)]!==_0x4e40f0(0x188))throw _0x4c2970;}}export async function resolveImportOutputPath(_0x4ba588){return await rejectSymlink(_0x4ba588),resolve(await realpath(dirname(resolve(_0x4ba588))),basename(_0x4ba588));}export function assertImportPaths(_0x1242f2,_0x32f018,_0x396116=[]){const _0x401ad4=a145_0x2b92c0,_0x14fd46=[..._0x396116,_0x1242f2,_0x32f018,_0x1242f2+_0x401ad4(0x183),_0x1242f2+_0x401ad4(0x19c)]['map'](_0x3d4daa=>resolve(_0x3d4daa));if(new Set(_0x14fd46)['size']!==_0x14fd46[_0x401ad4(0x1dd)])throw Error(_0x401ad4(0x173));}export async function saveImportJson(_0x33e2c7,_0x4b763b){const _0x115b00=a145_0x2b92c0;await rejectSymlink(_0x33e2c7);const _0xfd93c8=_0x33e2c7+_0x115b00(0x176)+randomUUID(),_0x385fcc=await open(_0xfd93c8,'wx',0x180);try{await _0x385fcc[_0x115b00(0x1c2)](JSON[_0x115b00(0x17e)](_0x4b763b,null,0x2)),await _0x385fcc[_0x115b00(0x167)]();}finally{await _0x385fcc[_0x115b00(0x1ac)]();}try{await rename(_0xfd93c8,_0x33e2c7);}catch(_0x402821){await unlink(_0xfd93c8)[_0x115b00(0x193)](()=>{});throw _0x402821;}}function a145_0x549e(_0x283a92,_0x4b1958){_0x283a92=_0x283a92-0x15e;const _0x305cec=a145_0x305c();let _0x549ec3=_0x305cec[_0x283a92];return _0x549ec3;}export async function acquireLock(_0x224547){const _0x58b0b3=a145_0x2b92c0,_0x23b3dc=_0x224547+_0x58b0b3(0x183),_0x2e5406=randomUUID();await rejectSymlink(_0x23b3dc);const _0x19916b=_0x23b3dc+_0x58b0b3(0x1a4);let _0x476e00,_0x4253e2;try{try{_0x476e00=await open(_0x23b3dc,'wx',0x180);}catch(_0x99cf67){if(_0x99cf67[_0x58b0b3(0x179)]!==_0x58b0b3(0x160))throw _0x99cf67;try{_0x4253e2=await open(_0x19916b,'wx',0x180);}catch(_0x4de316){if(_0x4de316[_0x58b0b3(0x179)]==='EEXIST')throw Error(_0x58b0b3(0x1a6));throw _0x4de316;}await _0x4253e2[_0x58b0b3(0x1c2)](JSON[_0x58b0b3(0x17e)]({'pid':process['pid'],'token':_0x2e5406})),await _0x4253e2[_0x58b0b3(0x167)](),await rejectSymlink(_0x23b3dc);let _0x57f05b;try{_0x57f05b=await readFile(_0x23b3dc,_0x58b0b3(0x168));}catch(_0x4e3f86){if(_0x4e3f86[_0x58b0b3(0x179)]!==_0x58b0b3(0x188))throw _0x4e3f86;}if(_0x57f05b!==undefined){let _0x43351c;try{_0x43351c=JSON[_0x58b0b3(0x15e)](_0x57f05b);}catch{throw Error(_0x58b0b3(0x1e4));}if(!_0x43351c||!Number['isSafeInteger'](_0x43351c['pid'])||_0x43351c['pid']<=0x0)throw Error('Invalid\x20import\x20lock\x20owner.');try{process[_0x58b0b3(0x1e1)](_0x43351c[_0x58b0b3(0x1a9)],0x0);throw Error(_0x58b0b3(0x1af));}catch(_0x436d10){if(_0x436d10[_0x58b0b3(0x179)]!==_0x58b0b3(0x1bf))throw _0x436d10;}if(await readFile(_0x23b3dc,_0x58b0b3(0x168))!==_0x57f05b)throw Error(_0x58b0b3(0x166));await unlink(_0x23b3dc);}_0x476e00=await open(_0x23b3dc,'wx',0x180);}await _0x476e00['writeFile'](JSON[_0x58b0b3(0x17e)]({'pid':process[_0x58b0b3(0x1a9)],'token':_0x2e5406})),await _0x476e00[_0x58b0b3(0x167)]();}finally{try{await _0x476e00?.[_0x58b0b3(0x1ac)]();}finally{if(_0x4253e2)try{await _0x4253e2['close']();}finally{await unlink(_0x19916b);}}}return async()=>{const _0x94e2ce=_0x58b0b3;if(JSON[_0x94e2ce(0x15e)](await readFile(_0x23b3dc,_0x94e2ce(0x168)))['token']===_0x2e5406)await unlink(_0x23b3dc);};}export function assertImportContract(_0x444e88,_0x58564c,_0x5bc793){const _0x5049a9=a145_0x2b92c0;if(!_0x444e88||!(_0x444e88[_0x5049a9(0x1d0)]===0x1&&_0x444e88[_0x5049a9(0x1e6)]===_0x5049a9(0x1d2)||_0x444e88[_0x5049a9(0x1d0)]===0x2&&_0x444e88[_0x5049a9(0x1e6)]===_0x5049a9(0x163))||_0x444e88[_0x5049a9(0x1ce)]!=='METADATA'||_0x444e88[_0x5049a9(0x1db)]!==_0x58564c||_0x444e88[_0x5049a9(0x181)]!==_0x5bc793||typeof _0x444e88[_0x5049a9(0x1b9)]!==_0x5049a9(0x1d8)||!_0x444e88[_0x5049a9(0x1b9)]||typeof _0x444e88['schemaFingerprint']!==_0x5049a9(0x1d8)||!_0x444e88[_0x5049a9(0x1ae)]||!Number[_0x5049a9(0x1e5)](_0x444e88['maxBatchSize'])||_0x444e88[_0x5049a9(0x170)]<0x1||_0x444e88[_0x5049a9(0x170)]>0x3e8||!Number['isSafeInteger'](_0x444e88[_0x5049a9(0x1b1)])||_0x444e88[_0x5049a9(0x1b1)]<0x1||_0x444e88[_0x5049a9(0x1b1)]>0x14*0x400*0x400)throw Error(_0x5049a9(0x196));}export async function runExcelImport(_0x510a38){const _0x4a55f0=a145_0x2b92c0;_0x510a38={..._0x510a38,'checkpoint':await resolveImportOutputPath(_0x510a38[_0x4a55f0(0x1de)]),'report':await resolveImportOutputPath(_0x510a38[_0x4a55f0(0x1b5)])};const {manifest:_0x1588f8,contract:_0x412e92,api:_0x2f2884}=_0x510a38;assertImportContract(_0x412e92,_0x510a38['appCode'],_0x510a38[_0x4a55f0(0x181)]);if(_0x412e92[_0x4a55f0(0x1d0)]!==0x1)throw Error('The\x20fixed-ID\x20runner\x20requires\x20the\x20v1\x20import\x20contract.');if(_0x1588f8[_0x4a55f0(0x1d3)][_0x4a55f0(0x1dd)])throw Error(_0x4a55f0(0x18e));if(!_0x1588f8[_0x4a55f0(0x191)]['length'])throw Error('Excel\x20contains\x20no\x20valid\x20data\x20rows.');if(!Number[_0x4a55f0(0x175)](_0x510a38['batchSize'])||_0x510a38['batchSize']<0x1||_0x510a38['batchSize']>_0x412e92[_0x4a55f0(0x170)])throw Error(_0x4a55f0(0x19f));for(const _0x5ab527 of _0x1588f8[_0x4a55f0(0x191)]){if(Buffer[_0x4a55f0(0x1b7)](JSON[_0x4a55f0(0x17e)]({'schemaFingerprint':_0x412e92['schemaFingerprint'],'items':[{..._0x5ab527[_0x4a55f0(0x174)],'id':-0x1fffffffffffff}]}),_0x4a55f0(0x168))>_0x412e92[_0x4a55f0(0x1b1)])throw Error(_0x4a55f0(0x1c1)+_0x5ab527[_0x4a55f0(0x180)]+_0x4a55f0(0x162));}assertImportPaths(_0x510a38[_0x4a55f0(0x1de)],_0x510a38['report']);const _0x4aae7a={'appCode':_0x510a38['appCode'],'datasetCode':_0x510a38[_0x4a55f0(0x181)],'runtimeDomain':_0x510a38[_0x4a55f0(0x171)],'actorId':_0x412e92[_0x4a55f0(0x1b9)],'fileHash':_0x1588f8[_0x4a55f0(0x190)],'mappingHash':_0x1588f8[_0x4a55f0(0x199)],'schemaHash':_0x1588f8['schemaHash'],'remoteSchemaHash':_0x412e92['schemaFingerprint'],'batchSize':_0x510a38[_0x4a55f0(0x1e0)],'sheet':_0x1588f8[_0x4a55f0(0x164)]},_0x477381=await acquireLock(_0x510a38[_0x4a55f0(0x1de)]);let _0x38f387;const _0x9e4ec8=Date[_0x4a55f0(0x1c3)]();let _0xe8e6da=0x0;const _0x29600a=[],_0x3fb38b=()=>({'importId':_0x38f387?.['importId'],'sourceRows':_0x1588f8[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)],'emptyRows':_0x1588f8['emptyRows'][_0x4a55f0(0x1dd)],'succeeded':_0x38f387?.['rows'][_0x4a55f0(0x18c)](_0x1f68c2=>_0x1f68c2['status']==='succeeded')[_0x4a55f0(0x1dd)]??0x0,'unknown':_0x38f387?.[_0x4a55f0(0x191)][_0x4a55f0(0x18c)](_0x4cf7aa=>_0x4cf7aa['status']===_0x4a55f0(0x1a5))[_0x4a55f0(0x1dd)]??0x0,'conflicts':_0x38f387?.[_0x4a55f0(0x191)][_0x4a55f0(0x18c)](_0x153c6d=>_0x153c6d['status']===_0x4a55f0(0x1c5))[_0x4a55f0(0x1dd)]??0x0,'notAttempted':_0x38f387?.['rows'][_0x4a55f0(0x18c)](_0x39c4a2=>_0x39c4a2[_0x4a55f0(0x178)]===_0x4a55f0(0x18f))[_0x4a55f0(0x1dd)]??_0x1588f8[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)],'batches':_0xe8e6da,'batchResults':_0x29600a,'elapsedMs':Date[_0x4a55f0(0x1c3)]()-_0x9e4ec8,'checkpoint':resolve(_0x510a38['checkpoint']),'report':resolve(_0x510a38[_0x4a55f0(0x1b5)]),'warnings':_0x1588f8['warnings']});try{await rejectSymlink(_0x510a38['checkpoint']);if(_0x510a38[_0x4a55f0(0x1b6)]){try{_0x38f387=JSON[_0x4a55f0(0x15e)](await readFile(_0x510a38[_0x4a55f0(0x1de)],_0x4a55f0(0x168)));}catch{throw Error('Cannot\x20read\x20the\x20import\x20checkpoint.');}if(!_0x38f387||_0x38f387[_0x4a55f0(0x1ca)]!==0x1||typeof _0x38f387[_0x4a55f0(0x1d1)]!==_0x4a55f0(0x1d8)||canonical(_0x38f387[_0x4a55f0(0x17c)])!==canonical(_0x4aae7a)||!Array[_0x4a55f0(0x19e)](_0x38f387[_0x4a55f0(0x191)])||_0x38f387['rows'][_0x4a55f0(0x1dd)]!==_0x1588f8[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)]||new Set(_0x38f387[_0x4a55f0(0x191)][_0x4a55f0(0x1d6)](_0x15b6ca=>_0x15b6ca['id']))[_0x4a55f0(0x16e)]!==_0x38f387[_0x4a55f0(0x191)]['length']||_0x38f387[_0x4a55f0(0x191)][_0x4a55f0(0x165)]((_0x4cf9df,_0x12c9db)=>!Number[_0x4a55f0(0x1e5)](_0x4cf9df['id'])||_0x4cf9df['id']>=0x0||_0x4cf9df[_0x4a55f0(0x180)]!==_0x1588f8[_0x4a55f0(0x191)][_0x12c9db]['rowNumber']||![_0x4a55f0(0x18f),_0x4a55f0(0x1a5),'succeeded','conflict'][_0x4a55f0(0x16b)](_0x4cf9df['status'])))throw Error('Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.');}else{try{await lstat(_0x510a38['checkpoint']);throw Error('Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.');}catch(_0x400c98){if(_0x400c98[_0x4a55f0(0x179)]!==_0x4a55f0(0x188))throw _0x400c98;}const _0x412c1f=new Set();_0x38f387={'version':0x1,'importId':randomUUID(),'binding':_0x4aae7a,'rows':_0x1588f8['rows']['map'](_0x3eeb8d=>{const _0x129699=_0x4a55f0;let _0x57d2ea;do{_0x57d2ea=-(Number(BigInt('0x'+randomBytes(0x7)[_0x129699(0x169)](_0x129699(0x19b)))&(0x1n<<0x34n)-0x1n)+0x1);}while(_0x412c1f[_0x129699(0x1ba)](_0x57d2ea));return _0x412c1f[_0x129699(0x18b)](_0x57d2ea),{'id':_0x57d2ea,'rowNumber':_0x3eeb8d[_0x129699(0x180)],'status':_0x129699(0x18f)};})},await saveImportJson(_0x510a38['checkpoint'],_0x38f387);}await _0x510a38['onCheckpointReady']?.();const _0x3eeca4=_0x38f387;if(_0x3eeca4[_0x4a55f0(0x191)][_0x4a55f0(0x165)](_0x3269df=>_0x3269df[_0x4a55f0(0x178)]===_0x4a55f0(0x1c5)))throw Error(_0x4a55f0(0x1a1));const _0x59ba92=async _0x422fd8=>{const _0xe62bf1=_0x4a55f0,_0x33761d=await _0x2f2884[_0xe62bf1(0x1d4)](_0x422fd8['map'](_0x2c4577=>_0x3eeca4[_0xe62bf1(0x191)][_0x2c4577]['id']));if(!Array['isArray'](_0x33761d))throw Error(_0xe62bf1(0x1cc));const _0x2fc4bc=new Set(_0x422fd8[_0xe62bf1(0x1d6)](_0x5b3a97=>_0x3eeca4['rows'][_0x5b3a97]['id'])),_0x389083=new Map();for(const _0x1d6578 of _0x33761d){const _0x3556c3=Number(_0x1d6578?.['id']);if(!_0x2fc4bc[_0xe62bf1(0x1ba)](_0x3556c3)||_0x389083[_0xe62bf1(0x1ba)](_0x3556c3))throw Error(_0xe62bf1(0x1cb));_0x389083[_0xe62bf1(0x1d7)](_0x3556c3,_0x1d6578);}for(const _0x42e280 of _0x422fd8){const _0x19fe87=_0x389083[_0xe62bf1(0x1c7)](_0x3eeca4[_0xe62bf1(0x191)][_0x42e280]['id']);if(!_0x19fe87)continue;if(_0x3eeca4[_0xe62bf1(0x191)][_0x42e280][_0xe62bf1(0x178)]===_0xe62bf1(0x18f)){_0x3eeca4[_0xe62bf1(0x191)][_0x42e280][_0xe62bf1(0x178)]=_0xe62bf1(0x1c5),await saveImportJson(_0x510a38[_0xe62bf1(0x1de)],_0x3eeca4);throw Error('Import\x20primary\x20key\x20collision;\x20stop\x20without\x20replacing\x20the\x20fixed\x20IDs.');}const _0x11173f=_0x1588f8[_0xe62bf1(0x191)][_0x42e280][_0xe62bf1(0x174)];if(Object[_0xe62bf1(0x19a)](_0x11173f)['some'](_0x1c201d=>!sameImportValue(_0x11173f[_0x1c201d],_0x19fe87[_0x1c201d],_0x1588f8[_0xe62bf1(0x182)]?.[_0xe62bf1(0x16b)](_0x1c201d)&&!_0x1588f8[_0xe62bf1(0x1c8)]?.[_0xe62bf1(0x16b)](_0x1c201d)))){_0x3eeca4[_0xe62bf1(0x191)][_0x42e280][_0xe62bf1(0x178)]=_0xe62bf1(0x1c5),await saveImportJson(_0x510a38[_0xe62bf1(0x1de)],_0x3eeca4);throw Error('Import\x20content\x20conflict\x20at\x20Excel\x20row\x20'+_0x3eeca4['rows'][_0x42e280]['rowNumber']+'.');}_0x3eeca4[_0xe62bf1(0x191)][_0x42e280]['status']=_0xe62bf1(0x1a3);}return await saveImportJson(_0x510a38[_0xe62bf1(0x1de)],_0x3eeca4),_0x389083;};if(_0x510a38[_0x4a55f0(0x1b6)])for(let _0x2d557b=0x0;_0x2d557b<_0x3eeca4[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)];_0x2d557b+=_0x510a38[_0x4a55f0(0x1e0)]){const _0x53c327=_0x3eeca4['rows'][_0x4a55f0(0x19d)](_0x2d557b,_0x2d557b+_0x510a38[_0x4a55f0(0x1e0)])['map']((_0x423a2b,_0x325ae3)=>_0x2d557b+_0x325ae3),_0x4a6e9b=_0x53c327[_0x4a55f0(0x18c)](_0xbdc063=>_0x3eeca4[_0x4a55f0(0x191)][_0xbdc063]['status']===_0x4a55f0(0x1a3)),_0x337831=await _0x59ba92(_0x53c327),_0x3bdf56=_0x4a6e9b['filter'](_0x4ee835=>!_0x337831[_0x4a55f0(0x1ba)](_0x3eeca4[_0x4a55f0(0x191)][_0x4ee835]['id']));if(_0x3bdf56[_0x4a55f0(0x1dd)]){_0x3bdf56[_0x4a55f0(0x1c9)](_0x53edfb=>{const _0x135c69=_0x4a55f0;_0x3eeca4[_0x135c69(0x191)][_0x53edfb][_0x135c69(0x178)]=_0x135c69(0x1c5);}),await saveImportJson(_0x510a38[_0x4a55f0(0x1de)],_0x3eeca4);throw Error(_0x4a55f0(0x177));}}for(let _0x433f9e=0x0;_0x433f9e<_0x3eeca4[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)];){const _0x463fb0=[],_0x34274c=[];while(_0x433f9e<_0x3eeca4[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)]&&_0x34274c[_0x4a55f0(0x1dd)]<_0x510a38['batchSize']){const _0x442188=_0x433f9e++;if(_0x3eeca4['rows'][_0x442188][_0x4a55f0(0x178)]===_0x4a55f0(0x1a3))continue;const _0x1c45d1={..._0x1588f8[_0x4a55f0(0x191)][_0x442188][_0x4a55f0(0x174)],'id':_0x3eeca4[_0x4a55f0(0x191)][_0x442188]['id']};if(Buffer[_0x4a55f0(0x1b7)](JSON[_0x4a55f0(0x17e)]({'schemaFingerprint':_0x412e92[_0x4a55f0(0x1ae)],'items':[..._0x34274c,_0x1c45d1]}),_0x4a55f0(0x168))>_0x412e92['maxBatchBytes']){if(!_0x34274c[_0x4a55f0(0x1dd)])throw Error('Excel\x20row\x20'+_0x3eeca4[_0x4a55f0(0x191)][_0x442188][_0x4a55f0(0x180)]+_0x4a55f0(0x162));_0x433f9e--;break;}_0x463fb0[_0x4a55f0(0x1b3)](_0x442188),_0x34274c[_0x4a55f0(0x1b3)](_0x1c45d1);}if(!_0x34274c[_0x4a55f0(0x1dd)])continue;const _0x553491=_0x463fb0[_0x4a55f0(0x18c)](_0x44a69e=>_0x3eeca4[_0x4a55f0(0x191)][_0x44a69e][_0x4a55f0(0x178)]===_0x4a55f0(0x18f));if(_0x553491['length']){const _0x73df3f=await _0x2f2884[_0x4a55f0(0x1d4)](_0x553491[_0x4a55f0(0x1d6)](_0x197e3b=>_0x3eeca4[_0x4a55f0(0x191)][_0x197e3b]['id']));if(!Array['isArray'](_0x73df3f))throw Error(_0x4a55f0(0x1cc));if(_0x73df3f[_0x4a55f0(0x1dd)])throw Error(_0x4a55f0(0x1b2));}_0x463fb0[_0x4a55f0(0x1c9)](_0x333ba7=>{const _0x7e0cbc=_0x4a55f0;_0x3eeca4[_0x7e0cbc(0x191)][_0x333ba7]['status']=_0x7e0cbc(0x1a5);}),await saveImportJson(_0x510a38['checkpoint'],_0x3eeca4),_0xe8e6da++;const _0x23d4d6=Date[_0x4a55f0(0x1c3)](),_0x52c1ab={'batch':_0xe8e6da,'rowStart':_0x3eeca4['rows'][_0x463fb0[0x0]][_0x4a55f0(0x180)],'rowEnd':_0x3eeca4['rows'][_0x463fb0[_0x463fb0[_0x4a55f0(0x1dd)]-0x1]][_0x4a55f0(0x180)],'count':_0x34274c[_0x4a55f0(0x1dd)],'bytes':Buffer[_0x4a55f0(0x1b7)](JSON[_0x4a55f0(0x17e)]({'schemaFingerprint':_0x412e92[_0x4a55f0(0x1ae)],'items':_0x34274c}),'utf8'),'elapsedMs':0x0,'status':_0x4a55f0(0x1df)};_0x29600a[_0x4a55f0(0x1b3)](_0x52c1ab);try{const _0x5a7af2=await _0x2f2884[_0x4a55f0(0x161)](_0x34274c);if(!_0x5a7af2||_0x5a7af2['count']!==_0x34274c[_0x4a55f0(0x1dd)]||!Array['isArray'](_0x5a7af2[_0x4a55f0(0x1d5)])||_0x5a7af2[_0x4a55f0(0x1d5)][_0x4a55f0(0x1dd)]!==_0x34274c[_0x4a55f0(0x1dd)]||_0x5a7af2['ids'][_0x4a55f0(0x165)]((_0x3d26b6,_0x2d0596)=>Number(_0x3d26b6)!==_0x3eeca4[_0x4a55f0(0x191)][_0x463fb0[_0x2d0596]]['id']))throw Error(_0x4a55f0(0x18d));await _0x59ba92(_0x463fb0);if(_0x463fb0['some'](_0x14b140=>_0x3eeca4[_0x4a55f0(0x191)][_0x14b140][_0x4a55f0(0x178)]!=='succeeded'))throw Error('Incomplete\x20readback.');}catch(_0x267061){if(_0x3eeca4['rows'][_0x4a55f0(0x165)](_0x35ffa4=>_0x35ffa4[_0x4a55f0(0x178)]===_0x4a55f0(0x1c5)))throw _0x267061;try{await _0x59ba92(_0x463fb0);}catch(_0x1542b7){if(_0x3eeca4[_0x4a55f0(0x191)]['some'](_0xe6300e=>_0xe6300e[_0x4a55f0(0x178)]===_0x4a55f0(0x1c5)))throw _0x1542b7;}if(_0x463fb0[_0x4a55f0(0x165)](_0xe9f326=>_0x3eeca4[_0x4a55f0(0x191)][_0xe9f326][_0x4a55f0(0x178)]!==_0x4a55f0(0x1a3)))throw Error(_0x4a55f0(0x187));}finally{_0x52c1ab[_0x4a55f0(0x1b0)]=Date[_0x4a55f0(0x1c3)]()-_0x23d4d6;if(_0x463fb0[_0x4a55f0(0x1b4)](_0x4ab6a1=>_0x3eeca4[_0x4a55f0(0x191)][_0x4ab6a1][_0x4a55f0(0x178)]==='succeeded'))_0x52c1ab['status']=_0x4a55f0(0x1a3);else{if(_0x463fb0[_0x4a55f0(0x165)](_0x3941c9=>_0x3eeca4[_0x4a55f0(0x191)][_0x3941c9][_0x4a55f0(0x178)]===_0x4a55f0(0x1c5)))_0x52c1ab[_0x4a55f0(0x178)]=_0x4a55f0(0x1c5);}}}const _0x29f996={'status':_0x4a55f0(0x17b),..._0x3fb38b()};return await saveImportJson(_0x510a38['report'],_0x29f996),_0x29f996;}catch(_0x46ddc9){if(_0x38f387)await saveImportJson(_0x510a38['report'],{'status':'incomplete',..._0x3fb38b(),'message':_0x46ddc9[_0x4a55f0(0x1c6)]});throw _0x46ddc9;}finally{await _0x477381();}}
1
+ const a146_0x3beb1d=a146_0x550c;(function(_0x246b5c,_0x2c14d7){const _0x12979d=a146_0x550c,_0x563acc=_0x246b5c();while(!![]){try{const _0x1ba35e=-parseInt(_0x12979d(0x1f6))/0x1*(parseInt(_0x12979d(0x1d5))/0x2)+parseInt(_0x12979d(0x1b9))/0x3+-parseInt(_0x12979d(0x213))/0x4+-parseInt(_0x12979d(0x1df))/0x5*(-parseInt(_0x12979d(0x1a7))/0x6)+parseInt(_0x12979d(0x1d7))/0x7+-parseInt(_0x12979d(0x216))/0x8+parseInt(_0x12979d(0x214))/0x9*(parseInt(_0x12979d(0x1ab))/0xa);if(_0x1ba35e===_0x2c14d7)break;else _0x563acc['push'](_0x563acc['shift']());}catch(_0x33d81e){_0x563acc['push'](_0x563acc['shift']());}}}(a146_0x30b2,0xb6e90));import{randomBytes,randomUUID}from'node:crypto';import{lstat,open,readFile,realpath,rename,unlink}from'node:fs/promises';import{resolve,dirname,basename}from'node:path';export function canonical(_0x46527f){const _0x305782=a146_0x550c;if(Array['isArray'](_0x46527f))return'['+_0x46527f[_0x305782(0x1d3)](canonical)[_0x305782(0x201)](',')+']';if(_0x46527f&&typeof _0x46527f==='object')return'{'+Object[_0x305782(0x209)](_0x46527f)['sort']()[_0x305782(0x1d3)](_0xfb32ec=>JSON['stringify'](_0xfb32ec)+':'+canonical(_0x46527f[_0xfb32ec]))[_0x305782(0x201)](',')+'}';return JSON[_0x305782(0x1d1)](_0x46527f)??_0x305782(0x205);}const EMPTY_IMAGE_LOCATION_FIELDS=new Set(['time',a146_0x3beb1d(0x211),a146_0x3beb1d(0x221),a146_0x3beb1d(0x20c),a146_0x3beb1d(0x1eb),a146_0x3beb1d(0x1cb),a146_0x3beb1d(0x1a4),a146_0x3beb1d(0x1a0),a146_0x3beb1d(0x1a9),'latitude','city',a146_0x3beb1d(0x1a8),a146_0x3beb1d(0x206),'streetNumber',a146_0x3beb1d(0x215),'longitude',a146_0x3beb1d(0x1e4),a146_0x3beb1d(0x1e3),'address',a146_0x3beb1d(0x1fb)]);export function sameImportValue(_0x3910ab,_0x4fd75b,_0x51ba86=![]){const _0x19fc68=a146_0x3beb1d;if(_0x51ba86){const _0x2ac391=_0x58c14c=>Array[_0x19fc68(0x208)](_0x58c14c)?_0x58c14c['map'](_0x256bca=>{const _0x2fedfa=_0x19fc68;if(!_0x256bca||typeof _0x256bca!=='object'||Array[_0x2fedfa(0x208)](_0x256bca))return _0x256bca;const _0xdb8862={..._0x256bca};delete _0xdb8862['url'],delete _0xdb8862[_0x2fedfa(0x19f)];if(_0xdb8862[_0x2fedfa(0x1ae)]==='')delete _0xdb8862[_0x2fedfa(0x1ae)];if(_0xdb8862[_0x2fedfa(0x1c9)]==null)delete _0xdb8862[_0x2fedfa(0x1c9)];if(_0xdb8862[_0x2fedfa(0x210)]==null)delete _0xdb8862['createUserName'];if(_0xdb8862[_0x2fedfa(0x1bd)]==null||typeof _0xdb8862[_0x2fedfa(0x1bd)]===_0x2fedfa(0x1a5)&&!Array[_0x2fedfa(0x208)](_0xdb8862['geolocation'])&&Object[_0x2fedfa(0x1e7)](_0xdb8862[_0x2fedfa(0x1bd)])[_0x2fedfa(0x1ed)](([_0xe1fc04,_0x3721d1])=>EMPTY_IMAGE_LOCATION_FIELDS[_0x2fedfa(0x1ea)](_0xe1fc04)&&_0x3721d1===null))delete _0xdb8862[_0x2fedfa(0x1bd)];for(const _0x712f4 of[_0x2fedfa(0x1d0),_0x2fedfa(0x1fa),_0x2fedfa(0x1ca)])if(!(_0x712f4 in _0xdb8862))_0xdb8862[_0x712f4]='';if(_0xdb8862[_0x2fedfa(0x1f2)]==null)_0xdb8862['size']=0x0;return _0xdb8862;}):_0x58c14c;return canonical(_0x2ac391(_0x3910ab))===canonical(_0x2ac391(_0x4fd75b));}return _0x3910ab===null?_0x4fd75b===null||_0x4fd75b===undefined:canonical(_0x4fd75b)===canonical(_0x3910ab);}async function rejectSymlink(_0x18d4b4){const _0x4de913=a146_0x3beb1d;try{if((await lstat(_0x18d4b4))[_0x4de913(0x1ef)]())throw Error('Import\x20output\x20must\x20not\x20be\x20a\x20symbolic\x20link.');}catch(_0x4ba446){if(_0x4ba446[_0x4de913(0x219)]!=='ENOENT')throw _0x4ba446;}}export async function resolveImportOutputPath(_0x572cee){return await rejectSymlink(_0x572cee),resolve(await realpath(dirname(resolve(_0x572cee))),basename(_0x572cee));}export function assertImportPaths(_0x4a7185,_0x56b3de,_0x111e12=[]){const _0x17db95=a146_0x3beb1d,_0x18a42f=[..._0x111e12,_0x4a7185,_0x56b3de,_0x4a7185+_0x17db95(0x1b2),_0x4a7185+_0x17db95(0x1cc)][_0x17db95(0x1d3)](_0x35afaa=>resolve(_0x35afaa));if(new Set(_0x18a42f)[_0x17db95(0x1f2)]!==_0x18a42f['length'])throw Error(_0x17db95(0x1ec));}export async function saveImportJson(_0x4b6039,_0x2dc5a3){const _0x530353=a146_0x3beb1d;await rejectSymlink(_0x4b6039);const _0xdba0a0=_0x4b6039+'.tmp-'+randomUUID(),_0x17868f=await open(_0xdba0a0,'wx',0x180);try{await _0x17868f[_0x530353(0x1c0)](JSON[_0x530353(0x1d1)](_0x2dc5a3,null,0x2)),await _0x17868f[_0x530353(0x1f7)]();}finally{await _0x17868f[_0x530353(0x1e0)]();}try{await rename(_0xdba0a0,_0x4b6039);}catch(_0x1e95bb){await unlink(_0xdba0a0)['catch'](()=>{});throw _0x1e95bb;}}function a146_0x550c(_0x2c3ca3,_0x5616c5){_0x2c3ca3=_0x2c3ca3-0x19e;const _0x30b201=a146_0x30b2();let _0x550c19=_0x30b201[_0x2c3ca3];return _0x550c19;}export async function acquireLock(_0x4d733a){const _0x22c982=a146_0x3beb1d,_0x25407c=_0x4d733a+_0x22c982(0x1b2),_0x3f3c59=randomUUID();await rejectSymlink(_0x25407c);const _0x131609=_0x25407c+'.recovery';let _0x4a2493,_0x3e0687;try{try{_0x4a2493=await open(_0x25407c,'wx',0x180);}catch(_0x3137b4){if(_0x3137b4[_0x22c982(0x219)]!==_0x22c982(0x1e6))throw _0x3137b4;try{_0x3e0687=await open(_0x131609,'wx',0x180);}catch(_0x1937be){if(_0x1937be[_0x22c982(0x219)]===_0x22c982(0x1e6))throw Error('Import\x20lock\x20recovery\x20is\x20active\x20or\x20interrupted;\x20inspect\x20the\x20recovery\x20guard\x20before\x20retrying.');throw _0x1937be;}await _0x3e0687[_0x22c982(0x1c0)](JSON['stringify']({'pid':process[_0x22c982(0x1cd)],'token':_0x3f3c59})),await _0x3e0687['sync'](),await rejectSymlink(_0x25407c);let _0x2ad565;try{_0x2ad565=await readFile(_0x25407c,_0x22c982(0x1c8));}catch(_0x301eee){if(_0x301eee['code']!=='ENOENT')throw _0x301eee;}if(_0x2ad565!==undefined){let _0x5bb235;try{_0x5bb235=JSON[_0x22c982(0x212)](_0x2ad565);}catch{throw Error(_0x22c982(0x1e9));}if(!_0x5bb235||!Number['isSafeInteger'](_0x5bb235[_0x22c982(0x1cd)])||_0x5bb235[_0x22c982(0x1cd)]<=0x0)throw Error(_0x22c982(0x1aa));try{process[_0x22c982(0x207)](_0x5bb235[_0x22c982(0x1cd)],0x0);throw Error(_0x22c982(0x20e));}catch(_0x398365){if(_0x398365[_0x22c982(0x219)]!=='ESRCH')throw _0x398365;}if(await readFile(_0x25407c,_0x22c982(0x1c8))!==_0x2ad565)throw Error(_0x22c982(0x1fe));await unlink(_0x25407c);}_0x4a2493=await open(_0x25407c,'wx',0x180);}await _0x4a2493['writeFile'](JSON['stringify']({'pid':process['pid'],'token':_0x3f3c59})),await _0x4a2493[_0x22c982(0x1f7)]();}finally{try{await _0x4a2493?.[_0x22c982(0x1e0)]();}finally{if(_0x3e0687)try{await _0x3e0687[_0x22c982(0x1e0)]();}finally{await unlink(_0x131609);}}}return async()=>{const _0x231aaf=_0x22c982;if(JSON[_0x231aaf(0x212)](await readFile(_0x25407c,_0x231aaf(0x1c8)))[_0x231aaf(0x1c4)]===_0x3f3c59)await unlink(_0x25407c);};}export function assertImportContract(_0x29fa0e,_0x37536e,_0x134dbb){const _0x3f7ba1=a146_0x3beb1d;if(!_0x29fa0e||!(_0x29fa0e[_0x3f7ba1(0x1de)]===0x1&&_0x29fa0e[_0x3f7ba1(0x1dd)]===_0x3f7ba1(0x1bc)||_0x29fa0e[_0x3f7ba1(0x1de)]===0x2&&_0x29fa0e[_0x3f7ba1(0x1dd)]===_0x3f7ba1(0x20f))||_0x29fa0e[_0x3f7ba1(0x1f8)]!=='METADATA'||_0x29fa0e[_0x3f7ba1(0x1b1)]!==_0x37536e||_0x29fa0e['datasetCode']!==_0x134dbb||typeof _0x29fa0e[_0x3f7ba1(0x1f1)]!==_0x3f7ba1(0x20d)||!_0x29fa0e[_0x3f7ba1(0x1f1)]||typeof _0x29fa0e[_0x3f7ba1(0x1d9)]!==_0x3f7ba1(0x20d)||!_0x29fa0e[_0x3f7ba1(0x1d9)]||!Number[_0x3f7ba1(0x1af)](_0x29fa0e[_0x3f7ba1(0x1be)])||_0x29fa0e[_0x3f7ba1(0x1be)]<0x1||_0x29fa0e['maxBatchSize']>0x3e8||!Number[_0x3f7ba1(0x1af)](_0x29fa0e['maxBatchBytes'])||_0x29fa0e[_0x3f7ba1(0x20b)]<0x1||_0x29fa0e['maxBatchBytes']>0x14*0x400*0x400)throw Error(_0x3f7ba1(0x1ba));}function a146_0x30b2(){const _0x4a4eca=['source','now','type','lbswuaCacheId','rowNumber','Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20stopped.','Import\x20lock\x20changed;\x20retry\x20recovery.','filter','Cannot\x20read\x20the\x20import\x20checkpoint.','join','status','Invalid\x20write\x20result.','version','undefined','resultCode','kill','isArray','keys','Import\x20content\x20conflict\x20at\x20Excel\x20row\x20','maxBatchBytes','district','string','The\x20import\x20checkpoint\x20is\x20locked\x20by\x20a\x20running\x20process.','auto-id-task-marker','createUserName','operatorType','parse','4618056mlRWit','297qYPWwx','accuracy','5384024BRZemX','some','Incomplete\x20readback.','code','get','rows','Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.','\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','fileHash','forEach','values','districtAdcode','slice','previewUrl','countryCode','message','mappingHash','toString','country','object','onCheckpointReady','108aqOzUe','netType','province','Invalid\x20import\x20lock\x20owner.','184910ucQlkU','Import\x20primary\x20key\x20collision;\x20stop\x20without\x20replacing\x20the\x20fixed\x20IDs.','Invalid\x20import\x20batch\x20size.','dingTalkUrl','isSafeInteger','set','appCode','.lock','runtimeDomain','Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.','importId','checkpoint','includes','push','972825AOiouH','The\x20server\x20import\x20contract\x20is\x20unsupported\x20or\x20incomplete.','uploadFields','fixed-negative-id','geolocation','maxBatchSize','isInteger','writeFile','schemaHash','write','datasetCode','token','readback','count','binding','utf8','createUserId','key','road','.lock.recovery','pid','conflict','resume','name','stringify','The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20fixed\x20IDs\x20before\x20continuing.','map','report','2TNWHOE','Excel\x20row\x20','7532350Adorzw','unsent','schemaFingerprint','completed','length','elapsedMs','strategy','schemaVersion','230410ubvVAI','close','imageFields','succeeded','errorMessage','cityAdcode','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','EEXIST','entries','byteLength','Invalid\x20import\x20lock;\x20inspect\x20it\x20before\x20recovery.','has','pois','Import\x20input,\x20output\x20and\x20lock\x20paths\x20must\x20be\x20different\x20files.','every','Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.','isSymbolicLink','pending','actorId','size','ids','ENOENT','batchSize','263287jbRRRT','sync'];a146_0x30b2=function(){return _0x4a4eca;};return a146_0x30b2();}export async function runExcelImport(_0x332138){const _0x46ce75=a146_0x3beb1d;_0x332138={..._0x332138,'checkpoint':await resolveImportOutputPath(_0x332138[_0x46ce75(0x1b6)]),'report':await resolveImportOutputPath(_0x332138[_0x46ce75(0x1d4)])};const {manifest:_0x85885e,contract:_0x806bfb,api:_0x4143de}=_0x332138;assertImportContract(_0x806bfb,_0x332138[_0x46ce75(0x1b1)],_0x332138[_0x46ce75(0x1c3)]);if(_0x806bfb[_0x46ce75(0x1de)]!==0x1)throw Error('The\x20fixed-ID\x20runner\x20requires\x20the\x20v1\x20import\x20contract.');if(_0x85885e['errors'][_0x46ce75(0x1db)])throw Error(_0x46ce75(0x1ee));if(!_0x85885e[_0x46ce75(0x21b)]['length'])throw Error('Excel\x20contains\x20no\x20valid\x20data\x20rows.');if(!Number[_0x46ce75(0x1bf)](_0x332138[_0x46ce75(0x1f5)])||_0x332138[_0x46ce75(0x1f5)]<0x1||_0x332138[_0x46ce75(0x1f5)]>_0x806bfb[_0x46ce75(0x1be)])throw Error(_0x46ce75(0x1ad));for(const _0x50be0b of _0x85885e['rows']){if(Buffer[_0x46ce75(0x1e8)](JSON[_0x46ce75(0x1d1)]({'schemaFingerprint':_0x806bfb[_0x46ce75(0x1d9)],'items':[{..._0x50be0b[_0x46ce75(0x220)],'id':-0x1fffffffffffff}]}),'utf8')>_0x806bfb[_0x46ce75(0x20b)])throw Error(_0x46ce75(0x1d6)+_0x50be0b[_0x46ce75(0x1fc)]+_0x46ce75(0x21d));}assertImportPaths(_0x332138[_0x46ce75(0x1b6)],_0x332138[_0x46ce75(0x1d4)]);const _0x3dbe91={'appCode':_0x332138[_0x46ce75(0x1b1)],'datasetCode':_0x332138[_0x46ce75(0x1c3)],'runtimeDomain':_0x332138[_0x46ce75(0x1b3)],'actorId':_0x806bfb['actorId'],'fileHash':_0x85885e[_0x46ce75(0x21e)],'mappingHash':_0x85885e[_0x46ce75(0x1a2)],'schemaHash':_0x85885e[_0x46ce75(0x1c1)],'remoteSchemaHash':_0x806bfb[_0x46ce75(0x1d9)],'batchSize':_0x332138['batchSize'],'sheet':_0x85885e['sheet']},_0x159c17=await acquireLock(_0x332138[_0x46ce75(0x1b6)]);let _0x6e7a9;const _0x5d6270=Date[_0x46ce75(0x1f9)]();let _0x4ec7c4=0x0;const _0x3c7d77=[],_0x93d091=()=>({'importId':_0x6e7a9?.['importId'],'sourceRows':_0x85885e[_0x46ce75(0x21b)][_0x46ce75(0x1db)],'emptyRows':_0x85885e['emptyRows'][_0x46ce75(0x1db)],'succeeded':_0x6e7a9?.[_0x46ce75(0x21b)][_0x46ce75(0x1ff)](_0x2aef39=>_0x2aef39['status']===_0x46ce75(0x1e2))[_0x46ce75(0x1db)]??0x0,'unknown':_0x6e7a9?.[_0x46ce75(0x21b)][_0x46ce75(0x1ff)](_0x333fd0=>_0x333fd0[_0x46ce75(0x202)]===_0x46ce75(0x1f0))[_0x46ce75(0x1db)]??0x0,'conflicts':_0x6e7a9?.['rows'][_0x46ce75(0x1ff)](_0xa963aa=>_0xa963aa[_0x46ce75(0x202)]===_0x46ce75(0x1ce))[_0x46ce75(0x1db)]??0x0,'notAttempted':_0x6e7a9?.['rows'][_0x46ce75(0x1ff)](_0x44fa9d=>_0x44fa9d[_0x46ce75(0x202)]===_0x46ce75(0x1d8))['length']??_0x85885e[_0x46ce75(0x21b)][_0x46ce75(0x1db)],'batches':_0x4ec7c4,'batchResults':_0x3c7d77,'elapsedMs':Date[_0x46ce75(0x1f9)]()-_0x5d6270,'checkpoint':resolve(_0x332138[_0x46ce75(0x1b6)]),'report':resolve(_0x332138[_0x46ce75(0x1d4)]),'warnings':_0x85885e['warnings']});try{await rejectSymlink(_0x332138[_0x46ce75(0x1b6)]);if(_0x332138[_0x46ce75(0x1cf)]){try{_0x6e7a9=JSON[_0x46ce75(0x212)](await readFile(_0x332138[_0x46ce75(0x1b6)],_0x46ce75(0x1c8)));}catch{throw Error(_0x46ce75(0x200));}if(!_0x6e7a9||_0x6e7a9[_0x46ce75(0x204)]!==0x1||typeof _0x6e7a9[_0x46ce75(0x1b5)]!==_0x46ce75(0x20d)||canonical(_0x6e7a9[_0x46ce75(0x1c7)])!==canonical(_0x3dbe91)||!Array['isArray'](_0x6e7a9['rows'])||_0x6e7a9[_0x46ce75(0x21b)][_0x46ce75(0x1db)]!==_0x85885e[_0x46ce75(0x21b)][_0x46ce75(0x1db)]||new Set(_0x6e7a9[_0x46ce75(0x21b)]['map'](_0x5a2716=>_0x5a2716['id']))[_0x46ce75(0x1f2)]!==_0x6e7a9['rows'][_0x46ce75(0x1db)]||_0x6e7a9[_0x46ce75(0x21b)][_0x46ce75(0x217)]((_0x58ffaf,_0x3f9cf6)=>!Number[_0x46ce75(0x1af)](_0x58ffaf['id'])||_0x58ffaf['id']>=0x0||_0x58ffaf[_0x46ce75(0x1fc)]!==_0x85885e[_0x46ce75(0x21b)][_0x3f9cf6][_0x46ce75(0x1fc)]||![_0x46ce75(0x1d8),_0x46ce75(0x1f0),_0x46ce75(0x1e2),_0x46ce75(0x1ce)][_0x46ce75(0x1b7)](_0x58ffaf['status'])))throw Error(_0x46ce75(0x1b4));}else{try{await lstat(_0x332138[_0x46ce75(0x1b6)]);throw Error(_0x46ce75(0x1e5));}catch(_0x2e71ee){if(_0x2e71ee[_0x46ce75(0x219)]!==_0x46ce75(0x1f4))throw _0x2e71ee;}const _0x18144f=new Set();_0x6e7a9={'version':0x1,'importId':randomUUID(),'binding':_0x3dbe91,'rows':_0x85885e[_0x46ce75(0x21b)][_0x46ce75(0x1d3)](_0x5ecc87=>{const _0x2d04f1=_0x46ce75;let _0x4bee8c;do{_0x4bee8c=-(Number(BigInt('0x'+randomBytes(0x7)[_0x2d04f1(0x1a3)]('hex'))&(0x1n<<0x34n)-0x1n)+0x1);}while(_0x18144f['has'](_0x4bee8c));return _0x18144f['add'](_0x4bee8c),{'id':_0x4bee8c,'rowNumber':_0x5ecc87[_0x2d04f1(0x1fc)],'status':_0x2d04f1(0x1d8)};})},await saveImportJson(_0x332138[_0x46ce75(0x1b6)],_0x6e7a9);}await _0x332138[_0x46ce75(0x1a6)]?.();const _0x1de2f1=_0x6e7a9;if(_0x1de2f1[_0x46ce75(0x21b)]['some'](_0xb77d82=>_0xb77d82[_0x46ce75(0x202)]==='conflict'))throw Error(_0x46ce75(0x21c));const _0x423ff1=async _0x292fae=>{const _0x19018d=_0x46ce75,_0x4a3c02=await _0x4143de[_0x19018d(0x1c5)](_0x292fae[_0x19018d(0x1d3)](_0x1e7607=>_0x1de2f1[_0x19018d(0x21b)][_0x1e7607]['id']));if(!Array['isArray'](_0x4a3c02))throw Error('Invalid\x20import\x20readback\x20response.');const _0x517b14=new Set(_0x292fae[_0x19018d(0x1d3)](_0x29de46=>_0x1de2f1[_0x19018d(0x21b)][_0x29de46]['id'])),_0x3ba94c=new Map();for(const _0x1c832d of _0x4a3c02){const _0x1e037c=Number(_0x1c832d?.['id']);if(!_0x517b14['has'](_0x1e037c)||_0x3ba94c[_0x19018d(0x1ea)](_0x1e037c))throw Error('Invalid\x20or\x20duplicate\x20import\x20readback\x20ID.');_0x3ba94c[_0x19018d(0x1b0)](_0x1e037c,_0x1c832d);}for(const _0x46c0ab of _0x292fae){const _0x19e1ad=_0x3ba94c[_0x19018d(0x21a)](_0x1de2f1[_0x19018d(0x21b)][_0x46c0ab]['id']);if(!_0x19e1ad)continue;if(_0x1de2f1[_0x19018d(0x21b)][_0x46c0ab][_0x19018d(0x202)]===_0x19018d(0x1d8)){_0x1de2f1[_0x19018d(0x21b)][_0x46c0ab]['status']=_0x19018d(0x1ce),await saveImportJson(_0x332138[_0x19018d(0x1b6)],_0x1de2f1);throw Error(_0x19018d(0x1ac));}const _0x338e9f=_0x85885e[_0x19018d(0x21b)][_0x46c0ab][_0x19018d(0x220)];if(Object[_0x19018d(0x209)](_0x338e9f)[_0x19018d(0x217)](_0x13f7b5=>!sameImportValue(_0x338e9f[_0x13f7b5],_0x19e1ad[_0x13f7b5],_0x85885e[_0x19018d(0x1e1)]?.[_0x19018d(0x1b7)](_0x13f7b5)&&!_0x85885e[_0x19018d(0x1bb)]?.[_0x19018d(0x1b7)](_0x13f7b5)))){_0x1de2f1['rows'][_0x46c0ab][_0x19018d(0x202)]=_0x19018d(0x1ce),await saveImportJson(_0x332138[_0x19018d(0x1b6)],_0x1de2f1);throw Error(_0x19018d(0x20a)+_0x1de2f1[_0x19018d(0x21b)][_0x46c0ab][_0x19018d(0x1fc)]+'.');}_0x1de2f1[_0x19018d(0x21b)][_0x46c0ab][_0x19018d(0x202)]=_0x19018d(0x1e2);}return await saveImportJson(_0x332138[_0x19018d(0x1b6)],_0x1de2f1),_0x3ba94c;};if(_0x332138[_0x46ce75(0x1cf)])for(let _0x54d927=0x0;_0x54d927<_0x1de2f1[_0x46ce75(0x21b)][_0x46ce75(0x1db)];_0x54d927+=_0x332138[_0x46ce75(0x1f5)]){const _0x163231=_0x1de2f1[_0x46ce75(0x21b)][_0x46ce75(0x19e)](_0x54d927,_0x54d927+_0x332138[_0x46ce75(0x1f5)])[_0x46ce75(0x1d3)]((_0x2e1983,_0x1d4a52)=>_0x54d927+_0x1d4a52),_0x4d826e=_0x163231[_0x46ce75(0x1ff)](_0x382001=>_0x1de2f1[_0x46ce75(0x21b)][_0x382001][_0x46ce75(0x202)]===_0x46ce75(0x1e2)),_0x20bd0a=await _0x423ff1(_0x163231),_0x22f8cd=_0x4d826e['filter'](_0x93c8c1=>!_0x20bd0a[_0x46ce75(0x1ea)](_0x1de2f1[_0x46ce75(0x21b)][_0x93c8c1]['id']));if(_0x22f8cd['length']){_0x22f8cd[_0x46ce75(0x21f)](_0x29c56a=>{const _0x238302=_0x46ce75;_0x1de2f1[_0x238302(0x21b)][_0x29c56a][_0x238302(0x202)]=_0x238302(0x1ce);}),await saveImportJson(_0x332138[_0x46ce75(0x1b6)],_0x1de2f1);throw Error(_0x46ce75(0x1fd));}}for(let _0x15333b=0x0;_0x15333b<_0x1de2f1['rows'][_0x46ce75(0x1db)];){const _0x3d0160=[],_0x45ae16=[];while(_0x15333b<_0x1de2f1['rows']['length']&&_0x45ae16[_0x46ce75(0x1db)]<_0x332138[_0x46ce75(0x1f5)]){const _0x4695b5=_0x15333b++;if(_0x1de2f1['rows'][_0x4695b5][_0x46ce75(0x202)]==='succeeded')continue;const _0x3111fc={..._0x85885e[_0x46ce75(0x21b)][_0x4695b5][_0x46ce75(0x220)],'id':_0x1de2f1[_0x46ce75(0x21b)][_0x4695b5]['id']};if(Buffer['byteLength'](JSON['stringify']({'schemaFingerprint':_0x806bfb[_0x46ce75(0x1d9)],'items':[..._0x45ae16,_0x3111fc]}),'utf8')>_0x806bfb[_0x46ce75(0x20b)]){if(!_0x45ae16[_0x46ce75(0x1db)])throw Error(_0x46ce75(0x1d6)+_0x1de2f1['rows'][_0x4695b5][_0x46ce75(0x1fc)]+_0x46ce75(0x21d));_0x15333b--;break;}_0x3d0160[_0x46ce75(0x1b8)](_0x4695b5),_0x45ae16[_0x46ce75(0x1b8)](_0x3111fc);}if(!_0x45ae16['length'])continue;const _0x1d9c08=_0x3d0160[_0x46ce75(0x1ff)](_0xf62950=>_0x1de2f1[_0x46ce75(0x21b)][_0xf62950][_0x46ce75(0x202)]===_0x46ce75(0x1d8));if(_0x1d9c08[_0x46ce75(0x1db)]){const _0xaf15e8=await _0x4143de[_0x46ce75(0x1c5)](_0x1d9c08[_0x46ce75(0x1d3)](_0x29ee82=>_0x1de2f1['rows'][_0x29ee82]['id']));if(!Array[_0x46ce75(0x208)](_0xaf15e8))throw Error('Invalid\x20import\x20readback\x20response.');if(_0xaf15e8[_0x46ce75(0x1db)])throw Error('Import\x20primary\x20key\x20collision;\x20stop\x20without\x20replacing\x20the\x20fixed\x20IDs.');}_0x3d0160[_0x46ce75(0x21f)](_0x5af2a0=>{const _0x2e54e8=_0x46ce75;_0x1de2f1[_0x2e54e8(0x21b)][_0x5af2a0][_0x2e54e8(0x202)]=_0x2e54e8(0x1f0);}),await saveImportJson(_0x332138['checkpoint'],_0x1de2f1),_0x4ec7c4++;const _0x3792d7=Date[_0x46ce75(0x1f9)](),_0x15d98c={'batch':_0x4ec7c4,'rowStart':_0x1de2f1['rows'][_0x3d0160[0x0]][_0x46ce75(0x1fc)],'rowEnd':_0x1de2f1[_0x46ce75(0x21b)][_0x3d0160[_0x3d0160[_0x46ce75(0x1db)]-0x1]]['rowNumber'],'count':_0x45ae16['length'],'bytes':Buffer[_0x46ce75(0x1e8)](JSON[_0x46ce75(0x1d1)]({'schemaFingerprint':_0x806bfb['schemaFingerprint'],'items':_0x45ae16}),_0x46ce75(0x1c8)),'elapsedMs':0x0,'status':'unknown'};_0x3c7d77['push'](_0x15d98c);try{const _0x1d6e48=await _0x4143de[_0x46ce75(0x1c2)](_0x45ae16);if(!_0x1d6e48||_0x1d6e48[_0x46ce75(0x1c6)]!==_0x45ae16['length']||!Array[_0x46ce75(0x208)](_0x1d6e48[_0x46ce75(0x1f3)])||_0x1d6e48[_0x46ce75(0x1f3)]['length']!==_0x45ae16[_0x46ce75(0x1db)]||_0x1d6e48[_0x46ce75(0x1f3)][_0x46ce75(0x217)]((_0x35af13,_0x3daf0a)=>Number(_0x35af13)!==_0x1de2f1[_0x46ce75(0x21b)][_0x3d0160[_0x3daf0a]]['id']))throw Error(_0x46ce75(0x203));await _0x423ff1(_0x3d0160);if(_0x3d0160[_0x46ce75(0x217)](_0x15fa83=>_0x1de2f1[_0x46ce75(0x21b)][_0x15fa83][_0x46ce75(0x202)]!==_0x46ce75(0x1e2)))throw Error(_0x46ce75(0x218));}catch(_0x4e33e6){if(_0x1de2f1[_0x46ce75(0x21b)][_0x46ce75(0x217)](_0x3f8b90=>_0x3f8b90[_0x46ce75(0x202)]==='conflict'))throw _0x4e33e6;try{await _0x423ff1(_0x3d0160);}catch(_0x2384be){if(_0x1de2f1[_0x46ce75(0x21b)][_0x46ce75(0x217)](_0x5b73f5=>_0x5b73f5[_0x46ce75(0x202)]==='conflict'))throw _0x2384be;}if(_0x3d0160[_0x46ce75(0x217)](_0x2d7e5f=>_0x1de2f1[_0x46ce75(0x21b)][_0x2d7e5f][_0x46ce75(0x202)]!==_0x46ce75(0x1e2)))throw Error(_0x46ce75(0x1d2));}finally{_0x15d98c[_0x46ce75(0x1dc)]=Date[_0x46ce75(0x1f9)]()-_0x3792d7;if(_0x3d0160[_0x46ce75(0x1ed)](_0x151269=>_0x1de2f1[_0x46ce75(0x21b)][_0x151269][_0x46ce75(0x202)]===_0x46ce75(0x1e2)))_0x15d98c['status']='succeeded';else{if(_0x3d0160[_0x46ce75(0x217)](_0x425e85=>_0x1de2f1['rows'][_0x425e85][_0x46ce75(0x202)]==='conflict'))_0x15d98c[_0x46ce75(0x202)]=_0x46ce75(0x1ce);}}}const _0x2dda11={'status':_0x46ce75(0x1da),..._0x93d091()};return await saveImportJson(_0x332138[_0x46ce75(0x1d4)],_0x2dda11),_0x2dda11;}catch(_0x59d7ea){if(_0x6e7a9)await saveImportJson(_0x332138[_0x46ce75(0x1d4)],{'status':'incomplete',..._0x93d091(),'message':_0x59d7ea[_0x46ce75(0x1a1)]});throw _0x59d7ea;}finally{await _0x159c17();}}
@@ -1 +1 @@
1
- const a147_0x495b24=a147_0x7ea9;function a147_0x3c3f(){const _0x32ce5d=['missing','sort','CLI\x20Built-in\x20Skill\x20','1185663hgqWEA','Unsupported\x20Skill\x20entry:\x20','match','655032OhiTvj','Installed\x20Skill\x20state\x20is\x20','isDirectory','Symbolic\x20link\x20is\x20not\x20allowed:\x20','absent','4898362vFWZPU','count','skipped','reason','packageRoot',':\x5cs*(.+)$','117124dogOEM','name','path','isFile','present','VERIFY_FAILED','join','output','skillVersion','files','INSTALL_FAILED','log','root','577384ESUhHe','update','home','current','30LXjQoy','lovrabet-skills','message','schemaVersion','installedPath','split','digest','279709uKXtIu','lovrabet\x20cli-skill\x20install','trim','flatMap','skills','parse','hex','unknown','every','version_mismatch','isSymbolicLink','21364256hDVlBt','package.json','unverifiable','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','packageVersion','manifest','state','Unsafe\x20manifest\x20path:\x20','skills@latest\x20exited\x20','SKILL.md','SOURCE_INVALID','includes','sha256','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','\x20verified;\x20','version','utf8','lovrabet','error','stdio','pipe','partialFailure'];a147_0x3c3f=function(){return _0x32ce5d;};return a147_0x3c3f();}function a147_0x7ea9(_0x422465,_0x4876af){_0x422465=_0x422465-0x180;const _0x3c3f0a=a147_0x3c3f();let _0x7ea90b=_0x3c3f0a[_0x422465];return _0x7ea90b;}(function(_0x2b6dbf,_0x5ad0c5){const _0x2ba1bd=a147_0x7ea9,_0x45298e=_0x2b6dbf();while(!![]){try{const _0x13fcb7=-parseInt(_0x2ba1bd(0x18c))/0x1+-parseInt(_0x2ba1bd(0x1be))/0x2+-parseInt(_0x2ba1bd(0x1b0))/0x3+parseInt(_0x2ba1bd(0x181))/0x4*(-parseInt(_0x2ba1bd(0x185))/0x5)+parseInt(_0x2ba1bd(0x1b3))/0x6+-parseInt(_0x2ba1bd(0x1b8))/0x7+parseInt(_0x2ba1bd(0x197))/0x8;if(_0x13fcb7===_0x5ad0c5)break;else _0x45298e['push'](_0x45298e['shift']());}catch(_0x535d2b){_0x45298e['push'](_0x45298e['shift']());}}}(a147_0x3c3f,0x75472));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a147_0x495b24(0x18d),SKILL_NAME=a147_0x495b24(0x1a8),debug=debuglog(a147_0x495b24(0x186));function frontmatterValue(_0x3fc55c,_0x3aadee){const _0x4796bb=a147_0x495b24;return _0x3fc55c[_0x4796bb(0x1b2)](new RegExp('^'+_0x3aadee+_0x4796bb(0x1bd),'m'))?.[0x1]?.[_0x4796bb(0x18e)]()??'';}function listFiles(_0x2f33a3,_0x4886fd=_0x2f33a3){const _0x20db45=a147_0x495b24;return readdirSync(_0x4886fd,{'withFileTypes':!![]})[_0x20db45(0x18f)](_0x495841=>{const _0x2f0151=_0x20db45,_0x3114d8=join(_0x4886fd,_0x495841['name']),_0x5e388e=lstatSync(_0x3114d8);if(_0x5e388e[_0x2f0151(0x196)]())throw new Error(_0x2f0151(0x1b6)+_0x3114d8);if(_0x5e388e[_0x2f0151(0x1b5)]())return listFiles(_0x2f33a3,_0x3114d8);if(!_0x5e388e[_0x2f0151(0x1c1)]())throw new Error(_0x2f0151(0x1b1)+_0x3114d8);return[relative(_0x2f33a3,_0x3114d8)[_0x2f0151(0x18a)](sep)[_0x2f0151(0x1c4)]('/')];})[_0x20db45(0x1ae)]((_0x5bf1e6,_0x5f213f)=>_0x5bf1e6<_0x5f213f?-0x1:_0x5bf1e6>_0x5f213f?0x1:0x0);}function digestFiles(_0x39e381,_0x4db77a){const _0x2234cf=a147_0x495b24,_0x1e0aa9=createHash(_0x2234cf(0x1a3));for(const _0x3a9403 of _0x4db77a){if(_0x3a9403['startsWith']('/')||_0x3a9403[_0x2234cf(0x18a)]('/')[_0x2234cf(0x1a2)]('..')||_0x3a9403[_0x2234cf(0x1a2)]('\x5c'))throw new Error(_0x2234cf(0x19e)+_0x3a9403);_0x1e0aa9[_0x2234cf(0x182)](_0x3a9403),_0x1e0aa9[_0x2234cf(0x182)]('\x00'),_0x1e0aa9['update'](readFileSync(join(_0x39e381,..._0x3a9403[_0x2234cf(0x18a)]('/')))),_0x1e0aa9['update']('\x00');}return _0x1e0aa9[_0x2234cf(0x18b)](_0x2234cf(0x192));}function sameFiles(_0x358c1a,_0x3f2503){const _0xa71f25=a147_0x495b24;return _0x358c1a['length']===_0x3f2503['length']&&_0x358c1a[_0xa71f25(0x194)]((_0x32d1eb,_0x2b5e94)=>_0x32d1eb===_0x3f2503[_0x2b5e94]);}function readSource(_0x699c33){const _0x11c81c=a147_0x495b24,_0x1e0152=JSON[_0x11c81c(0x191)](readFileSync(join(_0x699c33,_0x11c81c(0x198)),_0x11c81c(0x1a7))),_0x3aa8c9=JSON[_0x11c81c(0x191)](readFileSync(join(_0x699c33,_0x11c81c(0x190),'lovrabet.manifest.json'),_0x11c81c(0x1a7))),_0x1b3a44=join(_0x699c33,_0x11c81c(0x190),SKILL_NAME),_0x41c2fd=frontmatterValue(readFileSync(join(_0x1b3a44,_0x11c81c(0x1a0)),_0x11c81c(0x1a7)),'version'),_0x2f8519=listFiles(_0x1b3a44);if(_0x3aa8c9[_0x11c81c(0x188)]!==0x1||_0x3aa8c9[_0x11c81c(0x1bf)]!==SKILL_NAME||!_0x1e0152[_0x11c81c(0x1a6)]||_0x3aa8c9[_0x11c81c(0x19b)]!==_0x1e0152[_0x11c81c(0x1a6)]||_0x3aa8c9[_0x11c81c(0x1c6)]!==_0x1e0152[_0x11c81c(0x1a6)]||_0x41c2fd!==_0x1e0152[_0x11c81c(0x1a6)]||!sameFiles(_0x2f8519,_0x3aa8c9[_0x11c81c(0x1c7)])||digestFiles(_0x1b3a44,_0x2f8519)!==_0x3aa8c9[_0x11c81c(0x18b)])throw new Error(_0x11c81c(0x1a4));return{'packageVersion':_0x1e0152[_0x11c81c(0x1a6)],'skillVersion':_0x41c2fd,'root':_0x1b3a44,'manifest':_0x3aa8c9};}function installedSkillPath(_0x5aea55){const _0x1f764c=a147_0x495b24,_0x50fafb=resolveInstalledSkill(SKILL_NAME,{'home':_0x5aea55});if(_0x50fafb[_0x1f764c(0x19d)]===_0x1f764c(0x1c2))return{'state':_0x1f764c(0x1c2),'path':dirname(_0x50fafb[_0x1f764c(0x1c0)])};if(_0x50fafb['state']===_0x1f764c(0x1b7))return{'state':'missing'};return{'state':_0x1f764c(0x199),'reason':_0x50fafb[_0x1f764c(0x1bb)]};}export function inspectInstalledBuiltinSkillVersion(_0x1a9234,_0x17c709={}){const _0x39988f=a147_0x495b24,_0x2130dc=installedSkillPath(_0x17c709[_0x39988f(0x183)]??homedir());if(_0x2130dc[_0x39988f(0x19d)]===_0x39988f(0x1ad))return{'state':_0x39988f(0x1ad),'expectedVersion':_0x1a9234,'repairCommand':REPAIR_COMMAND};if(_0x2130dc[_0x39988f(0x19d)]===_0x39988f(0x199))return{'state':'unverifiable','expectedVersion':_0x1a9234,'reason':_0x2130dc[_0x39988f(0x1bb)],'repairCommand':REPAIR_COMMAND};try{const _0x54dbfc=frontmatterValue(readFileSync(join(_0x2130dc['path'],'SKILL.md'),_0x39988f(0x1a7)),_0x39988f(0x1a6));return{'state':_0x54dbfc===_0x1a9234?_0x39988f(0x184):_0x39988f(0x195),'expectedVersion':_0x1a9234,'skillVersion':_0x54dbfc,'installedPath':_0x2130dc[_0x39988f(0x1c0)],'repairCommand':REPAIR_COMMAND};}catch(_0x1600dc){return{'state':_0x39988f(0x199),'expectedVersion':_0x1a9234,'installedPath':_0x2130dc[_0x39988f(0x1c0)],'reason':_0x1600dc instanceof Error?_0x1600dc['message']:String(_0x1600dc),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x4d032a={}){const _0x2ae602=a147_0x495b24,_0x2a80d0=_0x4d032a['packageRoot']??DEFAULT_PACKAGE_ROOT;let _0x3f20eb;try{_0x3f20eb=readSource(_0x2a80d0);}catch(_0x2d796d){return{'state':'unverifiable','packageVersion':_0x2ae602(0x193),'reason':_0x2d796d instanceof Error?_0x2d796d['message']:String(_0x2d796d),'repairCommand':REPAIR_COMMAND};}const _0x10eb68=installedSkillPath(_0x4d032a[_0x2ae602(0x183)]??homedir());if(_0x10eb68[_0x2ae602(0x19d)]===_0x2ae602(0x1ad))return{'state':_0x2ae602(0x1ad),'packageVersion':_0x3f20eb['packageVersion'],'repairCommand':REPAIR_COMMAND};if(_0x10eb68[_0x2ae602(0x19d)]==='unverifiable')return{'state':_0x2ae602(0x199),'packageVersion':_0x3f20eb[_0x2ae602(0x19b)],'reason':_0x10eb68[_0x2ae602(0x1bb)],'repairCommand':REPAIR_COMMAND};try{const _0x1dd68f=frontmatterValue(readFileSync(join(_0x10eb68[_0x2ae602(0x1c0)],_0x2ae602(0x1a0)),_0x2ae602(0x1a7)),_0x2ae602(0x1a6));if(_0x1dd68f!==_0x3f20eb[_0x2ae602(0x1c6)])return{'state':_0x2ae602(0x195),'packageVersion':_0x3f20eb['packageVersion'],'skillVersion':_0x1dd68f,'installedPath':_0x10eb68['path'],'repairCommand':REPAIR_COMMAND};const _0x3edc37=listFiles(_0x10eb68['path']),_0x35c26b=digestFiles(_0x10eb68[_0x2ae602(0x1c0)],_0x3edc37);return{'state':sameFiles(_0x3edc37,_0x3f20eb[_0x2ae602(0x19c)][_0x2ae602(0x1c7)])&&_0x35c26b===_0x3f20eb['manifest'][_0x2ae602(0x18b)]?_0x2ae602(0x184):'content_mismatch','packageVersion':_0x3f20eb[_0x2ae602(0x19b)],'skillVersion':_0x1dd68f,'installedPath':_0x10eb68['path'],'digest':_0x35c26b,'repairCommand':REPAIR_COMMAND};}catch(_0x45bae0){return{'state':_0x2ae602(0x199),'packageVersion':_0x3f20eb[_0x2ae602(0x19b)],'installedPath':_0x10eb68[_0x2ae602(0x1c0)],'reason':_0x45bae0 instanceof Error?_0x45bae0[_0x2ae602(0x187)]:String(_0x45bae0),'repairCommand':REPAIR_COMMAND};}}function failure(_0x276b33,_0xb302d7,_0x379453,_0x29d066){const _0x41bfe5=a147_0x495b24;return{'ok':![],'code':_0x276b33,'packageVersion':_0xb302d7[_0x41bfe5(0x19b)],'skillVersion':_0xb302d7[_0x41bfe5(0x1c6)],'installedPath':_0x29d066,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x379453 instanceof Error?_0x379453['message']:String(_0x379453)};}export function installBuiltinSkill(_0x55e590={}){const _0x1ff3c1=a147_0x495b24,_0x45cdee=_0x55e590[_0x1ff3c1(0x1bc)]??DEFAULT_PACKAGE_ROOT,_0x35bea3=_0x55e590[_0x1ff3c1(0x183)]??homedir();let _0x6b7033;try{_0x6b7033=readSource(_0x45cdee);}catch(_0x3834ba){return failure(_0x1ff3c1(0x1a1),{'packageVersion':_0x1ff3c1(0x193),'skillVersion':'unknown'},_0x3834ba);}const _0xefe50f=inspectBuiltinSkill({'packageRoot':_0x45cdee,'home':_0x35bea3}),_0x3c3868=runNpxSkillsAddGlobal(_0x45cdee,_0x6b7033[_0x1ff3c1(0x180)],{'stdio':_0x55e590[_0x1ff3c1(0x1aa)]??_0x1ff3c1(0x1ab),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x35bea3}});if(_0x3c3868[_0x1ff3c1(0x1ba)])return{'ok':!![],'packageVersion':_0x6b7033[_0x1ff3c1(0x19b)],'skillVersion':_0x6b7033[_0x1ff3c1(0x1c6)],'installedPath':_0xefe50f[_0x1ff3c1(0x189)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3c3868['ok'])return failure(_0x1ff3c1(0x1c8),_0x6b7033,_0x3c3868[_0x1ff3c1(0x1a9)]??_0x1ff3c1(0x19f)+_0x3c3868['status']);const _0x285b83=inspectBuiltinSkill({'packageRoot':_0x45cdee,'home':_0x35bea3});if(_0x285b83[_0x1ff3c1(0x19d)]!==_0x1ff3c1(0x184)){const _0x4d09c1=_0x285b83[_0x1ff3c1(0x1bb)]??_0x1ff3c1(0x1b4)+_0x285b83[_0x1ff3c1(0x19d)];return failure(_0x1ff3c1(0x1c3),_0x6b7033,_0x3c3868[_0x1ff3c1(0x1ac)]?_0x4d09c1+'\x0a'+_0x3c3868[_0x1ff3c1(0x1ac)][_0x1ff3c1(0x1c5)]:_0x4d09c1,_0x285b83[_0x1ff3c1(0x189)]);}return _0x3c3868[_0x1ff3c1(0x1ac)]&&(debug(_0x1ff3c1(0x19a),_0x3c3868[_0x1ff3c1(0x1ac)][_0x1ff3c1(0x1c5)]),console[_0x1ff3c1(0x1c9)](_0x1ff3c1(0x1af)+_0x6b7033[_0x1ff3c1(0x1c6)]+_0x1ff3c1(0x1a5)+_0x3c3868[_0x1ff3c1(0x1ac)][_0x1ff3c1(0x1b9)]+'\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.')),{'ok':!![],'packageVersion':_0x6b7033[_0x1ff3c1(0x19b)],'skillVersion':_0x6b7033[_0x1ff3c1(0x1c6)],'installedPath':_0x285b83['installedPath'],'changed':_0xefe50f[_0x1ff3c1(0x19d)]!==_0x1ff3c1(0x184),'repairCommand':REPAIR_COMMAND};}
1
+ const a148_0x119fdc=a148_0x4b2b;(function(_0x4cd3f3,_0x55085d){const _0x562d5e=a148_0x4b2b,_0x3a8edf=_0x4cd3f3();while(!![]){try{const _0x463822=-parseInt(_0x562d5e(0x1df))/0x1*(-parseInt(_0x562d5e(0x1e7))/0x2)+parseInt(_0x562d5e(0x1f7))/0x3+-parseInt(_0x562d5e(0x1ef))/0x4+-parseInt(_0x562d5e(0x1fb))/0x5*(parseInt(_0x562d5e(0x1f9))/0x6)+-parseInt(_0x562d5e(0x1cb))/0x7+parseInt(_0x562d5e(0x20b))/0x8*(parseInt(_0x562d5e(0x204))/0x9)+parseInt(_0x562d5e(0x1dc))/0xa*(parseInt(_0x562d5e(0x1ce))/0xb);if(_0x463822===_0x55085d)break;else _0x3a8edf['push'](_0x3a8edf['shift']());}catch(_0x9dc046){_0x3a8edf['push'](_0x3a8edf['shift']());}}}(a148_0x1ffe,0xdceb8));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';function a148_0x1ffe(){const _0xeb0bf4=['missing','home','\x20verified;\x20','present','length','20ALaQSd','SKILL.md','status','22878BJwvMg','unverifiable','reason','startsWith','lovrabet.manifest.json','packageRoot','isDirectory','sort','110fzvxlQ','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','partialFailure','every','isFile','match','installedPath','absent','3354428aKbHLh','pipe','INSTALL_FAILED','message','lovrabet','path','skills','lovrabet\x20cli-skill\x20install','2411517ZwkfOC','lovrabet-skills','534ruOZRe','version_mismatch','26155DmBBws','VERIFY_FAILED','skillVersion','root','state','package.json','name','hex','Unsupported\x20Skill\x20entry:\x20','81ZlJEnO','output','log','sha256','update','count','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','989208cwGlUO','packageVersion','manifest','current','content_mismatch','join','skipped','schemaVersion','Installed\x20Skill\x20state\x20is\x20','7143472hVNURJ','version','files','300091bgOHAk','unknown','digest','includes','parse','Symbolic\x20link\x20is\x20not\x20allowed:\x20','skills@latest\x20exited\x20','split','utf8'];a148_0x1ffe=function(){return _0xeb0bf4;};return a148_0x1ffe();}import{fileURLToPath}from'node:url';import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a148_0x119fdc(0x1f6),SKILL_NAME=a148_0x119fdc(0x1f3),debug=debuglog(a148_0x119fdc(0x1f8));function frontmatterValue(_0x3089ff,_0xfc3719){const _0x4f965b=a148_0x119fdc;return _0x3089ff[_0x4f965b(0x1ec)](new RegExp('^'+_0xfc3719+':\x5cs*(.+)$','m'))?.[0x1]?.['trim']()??'';}function a148_0x4b2b(_0x239686,_0x3cb9be){_0x239686=_0x239686-0x1c4;const _0x1ffee8=a148_0x1ffe();let _0x4b2b18=_0x1ffee8[_0x239686];return _0x4b2b18;}function listFiles(_0x4e899d,_0x1f6053=_0x4e899d){const _0x3be9f5=a148_0x119fdc;return readdirSync(_0x1f6053,{'withFileTypes':!![]})['flatMap'](_0x419655=>{const _0x3a626b=a148_0x4b2b,_0x3ca538=join(_0x1f6053,_0x419655[_0x3a626b(0x201)]),_0x14f003=lstatSync(_0x3ca538);if(_0x14f003['isSymbolicLink']())throw new Error(_0x3a626b(0x1d3)+_0x3ca538);if(_0x14f003[_0x3a626b(0x1e5)]())return listFiles(_0x4e899d,_0x3ca538);if(!_0x14f003[_0x3a626b(0x1eb)]())throw new Error(_0x3a626b(0x203)+_0x3ca538);return[relative(_0x4e899d,_0x3ca538)[_0x3a626b(0x1d5)](sep)[_0x3a626b(0x1c7)]('/')];})[_0x3be9f5(0x1e6)]((_0x3e2ecc,_0x1519f5)=>_0x3e2ecc<_0x1519f5?-0x1:_0x3e2ecc>_0x1519f5?0x1:0x0);}function digestFiles(_0x2e6b53,_0x312e40){const _0xf13264=a148_0x119fdc,_0x5b27fa=createHash(_0xf13264(0x207));for(const _0x23eef of _0x312e40){if(_0x23eef[_0xf13264(0x1e2)]('/')||_0x23eef['split']('/')[_0xf13264(0x1d1)]('..')||_0x23eef['includes']('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x23eef);_0x5b27fa[_0xf13264(0x208)](_0x23eef),_0x5b27fa['update']('\x00'),_0x5b27fa[_0xf13264(0x208)](readFileSync(join(_0x2e6b53,..._0x23eef[_0xf13264(0x1d5)]('/')))),_0x5b27fa['update']('\x00');}return _0x5b27fa[_0xf13264(0x1d0)](_0xf13264(0x202));}function sameFiles(_0x9f9c5f,_0x512d2a){const _0x3cf681=a148_0x119fdc;return _0x9f9c5f[_0x3cf681(0x1db)]===_0x512d2a[_0x3cf681(0x1db)]&&_0x9f9c5f[_0x3cf681(0x1ea)]((_0x4412b8,_0x4ed57e)=>_0x4412b8===_0x512d2a[_0x4ed57e]);}function readSource(_0x582d88){const _0xf2a769=a148_0x119fdc,_0x24f517=JSON[_0xf2a769(0x1d2)](readFileSync(join(_0x582d88,_0xf2a769(0x200)),_0xf2a769(0x1d6))),_0x3da240=JSON['parse'](readFileSync(join(_0x582d88,_0xf2a769(0x1f5),_0xf2a769(0x1e3)),_0xf2a769(0x1d6))),_0x5d58a2=join(_0x582d88,_0xf2a769(0x1f5),SKILL_NAME),_0x227795=frontmatterValue(readFileSync(join(_0x5d58a2,_0xf2a769(0x1dd)),_0xf2a769(0x1d6)),_0xf2a769(0x1cc)),_0x35d0d1=listFiles(_0x5d58a2);if(_0x3da240[_0xf2a769(0x1c9)]!==0x1||_0x3da240[_0xf2a769(0x201)]!==SKILL_NAME||!_0x24f517[_0xf2a769(0x1cc)]||_0x3da240[_0xf2a769(0x20c)]!==_0x24f517[_0xf2a769(0x1cc)]||_0x3da240[_0xf2a769(0x1fd)]!==_0x24f517[_0xf2a769(0x1cc)]||_0x227795!==_0x24f517[_0xf2a769(0x1cc)]||!sameFiles(_0x35d0d1,_0x3da240[_0xf2a769(0x1cd)])||digestFiles(_0x5d58a2,_0x35d0d1)!==_0x3da240[_0xf2a769(0x1d0)])throw new Error(_0xf2a769(0x20a));return{'packageVersion':_0x24f517[_0xf2a769(0x1cc)],'skillVersion':_0x227795,'root':_0x5d58a2,'manifest':_0x3da240};}function installedSkillPath(_0x5242ec){const _0xb22b65=a148_0x119fdc,_0x4ff354=resolveInstalledSkill(SKILL_NAME,{'home':_0x5242ec});if(_0x4ff354[_0xb22b65(0x1ff)]===_0xb22b65(0x1da))return{'state':_0xb22b65(0x1da),'path':dirname(_0x4ff354[_0xb22b65(0x1f4)])};if(_0x4ff354[_0xb22b65(0x1ff)]===_0xb22b65(0x1ee))return{'state':_0xb22b65(0x1d7)};return{'state':_0xb22b65(0x1e0),'reason':_0x4ff354['reason']};}export function inspectInstalledBuiltinSkillVersion(_0x2d8ef3,_0x2ee935={}){const _0x3793ab=a148_0x119fdc,_0x91110e=installedSkillPath(_0x2ee935[_0x3793ab(0x1d8)]??homedir());if(_0x91110e[_0x3793ab(0x1ff)]===_0x3793ab(0x1d7))return{'state':_0x3793ab(0x1d7),'expectedVersion':_0x2d8ef3,'repairCommand':REPAIR_COMMAND};if(_0x91110e[_0x3793ab(0x1ff)]==='unverifiable')return{'state':_0x3793ab(0x1e0),'expectedVersion':_0x2d8ef3,'reason':_0x91110e['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x3b7353=frontmatterValue(readFileSync(join(_0x91110e['path'],_0x3793ab(0x1dd)),'utf8'),_0x3793ab(0x1cc));return{'state':_0x3b7353===_0x2d8ef3?_0x3793ab(0x1c5):_0x3793ab(0x1fa),'expectedVersion':_0x2d8ef3,'skillVersion':_0x3b7353,'installedPath':_0x91110e[_0x3793ab(0x1f4)],'repairCommand':REPAIR_COMMAND};}catch(_0x18cda7){return{'state':_0x3793ab(0x1e0),'expectedVersion':_0x2d8ef3,'installedPath':_0x91110e['path'],'reason':_0x18cda7 instanceof Error?_0x18cda7['message']:String(_0x18cda7),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x20bd16={}){const _0x3af81b=a148_0x119fdc,_0x54eabb=_0x20bd16[_0x3af81b(0x1e4)]??DEFAULT_PACKAGE_ROOT;let _0x900d7f;try{_0x900d7f=readSource(_0x54eabb);}catch(_0x3792d9){return{'state':_0x3af81b(0x1e0),'packageVersion':'unknown','reason':_0x3792d9 instanceof Error?_0x3792d9[_0x3af81b(0x1f2)]:String(_0x3792d9),'repairCommand':REPAIR_COMMAND};}const _0x1772f8=installedSkillPath(_0x20bd16[_0x3af81b(0x1d8)]??homedir());if(_0x1772f8[_0x3af81b(0x1ff)]===_0x3af81b(0x1d7))return{'state':_0x3af81b(0x1d7),'packageVersion':_0x900d7f['packageVersion'],'repairCommand':REPAIR_COMMAND};if(_0x1772f8[_0x3af81b(0x1ff)]===_0x3af81b(0x1e0))return{'state':_0x3af81b(0x1e0),'packageVersion':_0x900d7f['packageVersion'],'reason':_0x1772f8[_0x3af81b(0x1e1)],'repairCommand':REPAIR_COMMAND};try{const _0x41c853=frontmatterValue(readFileSync(join(_0x1772f8[_0x3af81b(0x1f4)],_0x3af81b(0x1dd)),'utf8'),_0x3af81b(0x1cc));if(_0x41c853!==_0x900d7f[_0x3af81b(0x1fd)])return{'state':'version_mismatch','packageVersion':_0x900d7f[_0x3af81b(0x20c)],'skillVersion':_0x41c853,'installedPath':_0x1772f8[_0x3af81b(0x1f4)],'repairCommand':REPAIR_COMMAND};const _0x17db0a=listFiles(_0x1772f8[_0x3af81b(0x1f4)]),_0x3b5ffb=digestFiles(_0x1772f8[_0x3af81b(0x1f4)],_0x17db0a);return{'state':sameFiles(_0x17db0a,_0x900d7f[_0x3af81b(0x1c4)][_0x3af81b(0x1cd)])&&_0x3b5ffb===_0x900d7f[_0x3af81b(0x1c4)][_0x3af81b(0x1d0)]?_0x3af81b(0x1c5):_0x3af81b(0x1c6),'packageVersion':_0x900d7f[_0x3af81b(0x20c)],'skillVersion':_0x41c853,'installedPath':_0x1772f8[_0x3af81b(0x1f4)],'digest':_0x3b5ffb,'repairCommand':REPAIR_COMMAND};}catch(_0x34cc5f){return{'state':_0x3af81b(0x1e0),'packageVersion':_0x900d7f['packageVersion'],'installedPath':_0x1772f8[_0x3af81b(0x1f4)],'reason':_0x34cc5f instanceof Error?_0x34cc5f[_0x3af81b(0x1f2)]:String(_0x34cc5f),'repairCommand':REPAIR_COMMAND};}}function failure(_0xcd93be,_0x2d2ee4,_0xe93d27,_0x19afee){const _0x13e3de=a148_0x119fdc;return{'ok':![],'code':_0xcd93be,'packageVersion':_0x2d2ee4[_0x13e3de(0x20c)],'skillVersion':_0x2d2ee4[_0x13e3de(0x1fd)],'installedPath':_0x19afee,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0xe93d27 instanceof Error?_0xe93d27['message']:String(_0xe93d27)};}export function installBuiltinSkill(_0x51230a={}){const _0x278348=a148_0x119fdc,_0x45e88d=_0x51230a[_0x278348(0x1e4)]??DEFAULT_PACKAGE_ROOT,_0xad5aec=_0x51230a[_0x278348(0x1d8)]??homedir();let _0x2bbc15;try{_0x2bbc15=readSource(_0x45e88d);}catch(_0x52763d){return failure('SOURCE_INVALID',{'packageVersion':_0x278348(0x1cf),'skillVersion':_0x278348(0x1cf)},_0x52763d);}const _0x2f9ec3=inspectBuiltinSkill({'packageRoot':_0x45e88d,'home':_0xad5aec}),_0x3968f0=runNpxSkillsAddGlobal(_0x45e88d,_0x2bbc15[_0x278348(0x1fe)],{'stdio':_0x51230a['stdio']??_0x278348(0x1f0),'expectedSkillName':SKILL_NAME,'presence':{'home':_0xad5aec}});if(_0x3968f0[_0x278348(0x1c8)])return{'ok':!![],'packageVersion':_0x2bbc15['packageVersion'],'skillVersion':_0x2bbc15['skillVersion'],'installedPath':_0x2f9ec3['installedPath'],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3968f0['ok'])return failure(_0x278348(0x1f1),_0x2bbc15,_0x3968f0['error']??_0x278348(0x1d4)+_0x3968f0[_0x278348(0x1de)]);const _0xcd5e72=inspectBuiltinSkill({'packageRoot':_0x45e88d,'home':_0xad5aec});if(_0xcd5e72['state']!==_0x278348(0x1c5)){const _0x3b96d9=_0xcd5e72[_0x278348(0x1e1)]??_0x278348(0x1ca)+_0xcd5e72[_0x278348(0x1ff)];return failure(_0x278348(0x1fc),_0x2bbc15,_0x3968f0[_0x278348(0x1e9)]?_0x3b96d9+'\x0a'+_0x3968f0[_0x278348(0x1e9)][_0x278348(0x205)]:_0x3b96d9,_0xcd5e72[_0x278348(0x1ed)]);}return _0x3968f0['partialFailure']&&(debug(_0x278348(0x1e8),_0x3968f0[_0x278348(0x1e9)][_0x278348(0x205)]),console[_0x278348(0x206)]('CLI\x20Built-in\x20Skill\x20'+_0x2bbc15[_0x278348(0x1fd)]+_0x278348(0x1d9)+_0x3968f0[_0x278348(0x1e9)][_0x278348(0x209)]+'\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.')),{'ok':!![],'packageVersion':_0x2bbc15[_0x278348(0x20c)],'skillVersion':_0x2bbc15[_0x278348(0x1fd)],'installedPath':_0xcd5e72['installedPath'],'changed':_0x2f9ec3[_0x278348(0x1ff)]!==_0x278348(0x1c5),'repairCommand':REPAIR_COMMAND};}
@@ -1 +1 @@
1
- const a148_0x537a0f=a148_0x31d5;(function(_0x4bcfc3,_0x28ed2a){const _0x3c8982=a148_0x31d5,_0x3784c8=_0x4bcfc3();while(!![]){try{const _0x594c04=-parseInt(_0x3c8982(0x150))/0x1*(parseInt(_0x3c8982(0x12a))/0x2)+-parseInt(_0x3c8982(0x122))/0x3+parseInt(_0x3c8982(0x146))/0x4+parseInt(_0x3c8982(0x11d))/0x5*(-parseInt(_0x3c8982(0x127))/0x6)+-parseInt(_0x3c8982(0x11f))/0x7+-parseInt(_0x3c8982(0x135))/0x8*(parseInt(_0x3c8982(0x123))/0x9)+-parseInt(_0x3c8982(0x128))/0xa*(-parseInt(_0x3c8982(0x14c))/0xb);if(_0x594c04===_0x28ed2a)break;else _0x3784c8['push'](_0x3784c8['shift']());}catch(_0x507cee){_0x3784c8['push'](_0x3784c8['shift']());}}}(a148_0x1045,0x9d2d3));import{execaSync}from'execa';import{LOVRABET_SKILL_SOURCE as a148_0x45dc3f}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a148_0x31d5(_0x29cf5a,_0x273585){_0x29cf5a=_0x29cf5a-0x11a;const _0x1045ab=a148_0x1045();let _0x31d5ee=_0x1045ab[_0x29cf5a];return _0x31d5ee;}function a148_0x1045(){const _0x3678e8=['absent','NPX_NOT_FOUND','INSTALL_PARTIAL','state','unknown','Skill\x20\x22','13270SGiVdN','EPERM','2065658PRDNEy','ENOENT','\x20failed\x20target(s)','1990482gkeaZZ','5126049YlgKvI','expectedSkillName','stdout','message','1482YYViCn','1252870xyPAVi','npx\x20terminated\x20by\x20signal\x20','302SnQMTq','exitCode','code','npx\x20failed\x20to\x20start','PERMISSION_DENIED','signal','NPM_CONFIG_GLOBAL','skills@latest','CHILD_EXIT_NONZERO','partialFailure','exit\x20','8aSoYoI','log','failed','CHILD_TERMINATED','unverifiable','EACCES','SPAWN_FAILED','internalSkillSource','match','presence','filter','present','!\x20Could\x20not\x20verify\x20\x22','npx','stderr','join','SKILL_NOT_INSTALLED','1433136OifORq','trim','shortMessage','\x22\x20install\x20state:\x20','checked','pipe','220XENBXU','skipNpxSkillsEnvSuffix','npm_config_global','stdio','242ZBjzAX'];a148_0x1045=function(){return _0x3678e8;};return a148_0x1045();}import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a148_0x45dc3f;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a148_0x537a0f(0x13c)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG['globalSkillName'];export function resolveGlobalSkillName(_0x4e778a){const _0x1b36ce=a148_0x537a0f;switch(_0x4e778a[_0x1b36ce(0x147)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a148_0x537a0f(0x14d)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x21dc83,_0x3bff82,_0x256af3){return{'ok':![],'status':_0x3bff82,'code':_0x21dc83,'error':'['+_0x21dc83+']\x20'+_0x256af3};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x5310a9,_0x548ea3=LOVRABET_SKILL_SOURCE,_0x14dc3a){const _0x21849d=a148_0x537a0f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x8fa515=['-y',_0x21849d(0x131),'add',_0x548ea3,'-g','-y'],_0x9e5990=[_0x21849d(0x142),..._0x8fa515][_0x21849d(0x144)]('\x20');console[_0x21849d(0x136)]('*\x20'+_0x9e5990);const _0x3f841a={...process.env};delete _0x3f841a[_0x21849d(0x14e)],delete _0x3f841a[_0x21849d(0x130)];const _0x3bed8e=execaSync('npx',_0x8fa515,{'cwd':_0x5310a9,'stdio':'pipe','env':_0x3f841a,'extendEnv':![],'shell':![],'reject':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x183c74=[_0x3bed8e[_0x21849d(0x125)]?String(_0x3bed8e[_0x21849d(0x125)]):'',_0x3bed8e[_0x21849d(0x143)]?String(_0x3bed8e['stderr']):''][_0x21849d(0x13f)](Boolean)[_0x21849d(0x144)]('\x0a')[_0x21849d(0x147)](),_0x490f20=_0x3bed8e[_0x21849d(0x12b)]??null,_0x4ffc4b=_0x51eb77=>{const _0x39ed1f=_0x21849d;return _0x14dc3a?.[_0x39ed1f(0x14f)]!==_0x39ed1f(0x14b)&&!_0x51eb77[_0x39ed1f(0x133)]&&_0x183c74&&console['log'](_0x183c74),_0x51eb77;};if(_0x3bed8e[_0x21849d(0x12c)]){const _0x50ab41=_0x3bed8e[_0x21849d(0x12c)]===_0x21849d(0x120)?_0x21849d(0x152):_0x3bed8e['code']===_0x21849d(0x11e)||_0x3bed8e['code']===_0x21849d(0x13a)?_0x21849d(0x12e):_0x21849d(0x13b);return _0x4ffc4b(failure(_0x50ab41,_0x490f20,_0x3bed8e['shortMessage']??_0x3bed8e[_0x21849d(0x126)]??_0x3bed8e[_0x21849d(0x12c)]));}if(_0x3bed8e['signal'])return _0x4ffc4b(failure(_0x21849d(0x138),_0x490f20,_0x21849d(0x129)+_0x3bed8e[_0x21849d(0x12f)]));if(_0x3bed8e[_0x21849d(0x137)]&&_0x490f20===null)return _0x4ffc4b(failure(_0x21849d(0x13b),_0x490f20,_0x3bed8e['shortMessage']??_0x3bed8e[_0x21849d(0x126)]??_0x21849d(0x12d)));if(_0x490f20!==0x0)return _0x4ffc4b(failure(_0x21849d(0x132),_0x490f20,_0x183c74||_0x3bed8e[_0x21849d(0x148)]||_0x21849d(0x134)+(_0x490f20??_0x21849d(0x11b))));const _0x46fa2f=_0x14dc3a?.[_0x21849d(0x124)]??resolveGlobalSkillName(_0x548ea3),_0xa25289=_0x46fa2f?resolveInstalledSkill(_0x46fa2f,_0x14dc3a?.[_0x21849d(0x13e)]):undefined,_0x2ca603=_0x183c74[_0x21849d(0x13d)](/Failed to install\s+(\d+)/i);if(_0x2ca603&&Number(_0x2ca603[0x1])>0x0){const _0x40f98f='Installer\x20reported\x20'+_0x2ca603[0x1]+_0x21849d(0x121)+(_0x183c74?':\x0a'+_0x183c74:'');if(_0xa25289?.['state']===_0x21849d(0x140))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x2ca603[0x1]),'output':_0x183c74}};return _0x4ffc4b(failure(_0x21849d(0x153),0x0,_0x40f98f));}if(_0x46fa2f&&_0xa25289){if(_0xa25289[_0x21849d(0x11a)]===_0x21849d(0x151))return _0x4ffc4b(failure(_0x21849d(0x145),0x0,_0x21849d(0x11c)+_0x46fa2f+'\x22\x20not\x20found\x20after\x20install\x20(checked\x20'+_0xa25289[_0x21849d(0x14a)]['join'](',\x20')+')'));_0xa25289[_0x21849d(0x11a)]===_0x21849d(0x139)&&console['warn'](_0x21849d(0x141)+_0x46fa2f+_0x21849d(0x149)+_0xa25289['reason']);}return _0x4ffc4b({'ok':!![],'status':0x0});}
1
+ const a149_0x3c9449=a149_0x4603;(function(_0x4029f3,_0x46dcd1){const _0x487f32=a149_0x4603,_0x3947d6=_0x4029f3();while(!![]){try{const _0x48fee9=parseInt(_0x487f32(0x10c))/0x1+-parseInt(_0x487f32(0x122))/0x2+-parseInt(_0x487f32(0x12b))/0x3*(-parseInt(_0x487f32(0x139))/0x4)+-parseInt(_0x487f32(0x132))/0x5+-parseInt(_0x487f32(0x115))/0x6+-parseInt(_0x487f32(0x137))/0x7+parseInt(_0x487f32(0x113))/0x8*(parseInt(_0x487f32(0x11f))/0x9);if(_0x48fee9===_0x46dcd1)break;else _0x3947d6['push'](_0x3947d6['shift']());}catch(_0x269808){_0x3947d6['push'](_0x3947d6['shift']());}}}(a149_0x3a60,0xb628b));import{execaSync}from'execa';import{LOVRABET_SKILL_SOURCE as a149_0x348f5f}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';function a149_0x4603(_0x2b69ea,_0x170dff){_0x2b69ea=_0x2b69ea-0x10a;const _0x3a6065=a149_0x3a60();let _0x460302=_0x3a6065[_0x2b69ea];return _0x460302;}export const LOVRABET_SKILL_SOURCE=a149_0x348f5f;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a149_0x3c9449(0x11a)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a149_0x3c9449(0x119)];export function resolveGlobalSkillName(_0x51398f){const _0x590e6a=a149_0x3c9449;switch(_0x51398f[_0x590e6a(0x116)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a149_0x3c9449(0x128)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0xf41f03,_0x7bf1b2,_0x392967){return{'ok':![],'status':_0x7bf1b2,'code':_0xf41f03,'error':'['+_0xf41f03+']\x20'+_0x392967};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a149_0x3a60(){const _0x52e15a=['globalSkillName','internalSkillSource','code','EPERM','SKILL_NOT_INSTALLED','npm_config_global','369eHeojo','exit\x20','Skill\x20\x22','495790BXeBYK','failed','Installer\x20reported\x20','stdout','shortMessage','filter','skipNpxSkillsEnvSuffix','npx\x20terminated\x20by\x20signal\x20','pipe','366AQNZjH','absent','unknown','expectedSkillName','npx','SPAWN_FAILED','log','99540urDHRR','warn','message','NPM_CONFIG_GLOBAL','PERMISSION_DENIED','6030787oRkpOe','add','9900gKGCZn','exitCode','ENOENT','stderr','EACCES','present','partialFailure','state','signal','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','\x22\x20install\x20state:\x20','CHILD_EXIT_NONZERO','unverifiable','374198fAybXS','presence','join','CHILD_TERMINATED','checked','INSTALL_PARTIAL','match','257064KzHuAv','skills@latest','708804FWGRGi','trim','reason','stdio'];a149_0x3a60=function(){return _0x52e15a;};return a149_0x3a60();}export function runNpxSkillsAddGlobal(_0x354ff1,_0x45e900=LOVRABET_SKILL_SOURCE,_0x5a725c){const _0x37e2f9=a149_0x3c9449;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1c044b=['-y',_0x37e2f9(0x114),_0x37e2f9(0x138),_0x45e900,'-g','-y'],_0x253fc6=[_0x37e2f9(0x12f),..._0x1c044b][_0x37e2f9(0x10e)]('\x20');console['log']('*\x20'+_0x253fc6);const _0x5b28fb={...process.env};delete _0x5b28fb[_0x37e2f9(0x11e)],delete _0x5b28fb[_0x37e2f9(0x135)];const _0x58ae91=execaSync(_0x37e2f9(0x12f),_0x1c044b,{'cwd':_0x354ff1,'stdio':_0x37e2f9(0x12a),'env':_0x5b28fb,'extendEnv':![],'shell':![],'reject':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x38d82c=[_0x58ae91[_0x37e2f9(0x125)]?String(_0x58ae91[_0x37e2f9(0x125)]):'',_0x58ae91[_0x37e2f9(0x13c)]?String(_0x58ae91[_0x37e2f9(0x13c)]):''][_0x37e2f9(0x127)](Boolean)[_0x37e2f9(0x10e)]('\x0a')[_0x37e2f9(0x116)](),_0x5d7b09=_0x58ae91[_0x37e2f9(0x13a)]??null,_0x2905fd=_0x1725e4=>{const _0x2e2125=_0x37e2f9;return _0x5a725c?.[_0x2e2125(0x118)]!==_0x2e2125(0x12a)&&!_0x1725e4[_0x2e2125(0x13f)]&&_0x38d82c&&console[_0x2e2125(0x131)](_0x38d82c),_0x1725e4;};if(_0x58ae91[_0x37e2f9(0x11b)]){const _0x590233=_0x58ae91['code']===_0x37e2f9(0x13b)?'NPX_NOT_FOUND':_0x58ae91[_0x37e2f9(0x11b)]===_0x37e2f9(0x11c)||_0x58ae91[_0x37e2f9(0x11b)]===_0x37e2f9(0x13d)?_0x37e2f9(0x136):_0x37e2f9(0x130);return _0x2905fd(failure(_0x590233,_0x5d7b09,_0x58ae91['shortMessage']??_0x58ae91[_0x37e2f9(0x134)]??_0x58ae91[_0x37e2f9(0x11b)]));}if(_0x58ae91[_0x37e2f9(0x141)])return _0x2905fd(failure(_0x37e2f9(0x10f),_0x5d7b09,_0x37e2f9(0x129)+_0x58ae91[_0x37e2f9(0x141)]));if(_0x58ae91[_0x37e2f9(0x123)]&&_0x5d7b09===null)return _0x2905fd(failure(_0x37e2f9(0x130),_0x5d7b09,_0x58ae91[_0x37e2f9(0x126)]??_0x58ae91[_0x37e2f9(0x134)]??'npx\x20failed\x20to\x20start'));if(_0x5d7b09!==0x0)return _0x2905fd(failure(_0x37e2f9(0x10a),_0x5d7b09,_0x38d82c||_0x58ae91[_0x37e2f9(0x126)]||_0x37e2f9(0x120)+(_0x5d7b09??_0x37e2f9(0x12d))));const _0x4843a7=_0x5a725c?.[_0x37e2f9(0x12e)]??resolveGlobalSkillName(_0x45e900),_0x36bb73=_0x4843a7?resolveInstalledSkill(_0x4843a7,_0x5a725c?.[_0x37e2f9(0x10d)]):undefined,_0x36bba2=_0x38d82c[_0x37e2f9(0x112)](/Failed to install\s+(\d+)/i);if(_0x36bba2&&Number(_0x36bba2[0x1])>0x0){const _0x289e3f=_0x37e2f9(0x124)+_0x36bba2[0x1]+'\x20failed\x20target(s)'+(_0x38d82c?':\x0a'+_0x38d82c:'');if(_0x36bb73?.[_0x37e2f9(0x140)]===_0x37e2f9(0x13e))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x36bba2[0x1]),'output':_0x38d82c}};return _0x2905fd(failure(_0x37e2f9(0x111),0x0,_0x289e3f));}if(_0x4843a7&&_0x36bb73){if(_0x36bb73['state']===_0x37e2f9(0x12c))return _0x2905fd(failure(_0x37e2f9(0x11d),0x0,_0x37e2f9(0x121)+_0x4843a7+_0x37e2f9(0x142)+_0x36bb73[_0x37e2f9(0x110)][_0x37e2f9(0x10e)](',\x20')+')'));_0x36bb73['state']===_0x37e2f9(0x10b)&&console[_0x37e2f9(0x133)]('!\x20Could\x20not\x20verify\x20\x22'+_0x4843a7+_0x37e2f9(0x143)+_0x36bb73[_0x37e2f9(0x117)]);}return _0x2905fd({'ok':!![],'status':0x0});}
@@ -1 +1 @@
1
- function a149_0x2fcc(_0x16da18,_0x4ce62a){_0x16da18=_0x16da18-0x166;const _0x5b7675=a149_0x5b76();let _0x2fcc19=_0x5b7675[_0x16da18];return _0x2fcc19;}const a149_0x715426=a149_0x2fcc;(function(_0xedf0d,_0x5aef5c){const _0x396f2b=a149_0x2fcc,_0x2c6011=_0xedf0d();while(!![]){try{const _0x4de691=parseInt(_0x396f2b(0x172))/0x1+parseInt(_0x396f2b(0x16c))/0x2+parseInt(_0x396f2b(0x16d))/0x3*(parseInt(_0x396f2b(0x16a))/0x4)+-parseInt(_0x396f2b(0x170))/0x5+parseInt(_0x396f2b(0x16b))/0x6*(parseInt(_0x396f2b(0x176))/0x7)+-parseInt(_0x396f2b(0x171))/0x8*(parseInt(_0x396f2b(0x177))/0x9)+parseInt(_0x396f2b(0x166))/0xa*(-parseInt(_0x396f2b(0x174))/0xb);if(_0x4de691===_0x5aef5c)break;else _0x2c6011['push'](_0x2c6011['shift']());}catch(_0x5f0a9d){_0x2c6011['push'](_0x2c6011['shift']());}}}(a149_0x5b76,0x7dfd2));export const METADATA_FILE=a149_0x715426(0x167);export const SKILL_FILE=a149_0x715426(0x173);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a149_0x715426(0x169)]);export const IGNORED_DIR_NAMES=new Set(['.git',a149_0x715426(0x178),a149_0x715426(0x175),'node_modules',a149_0x715426(0x16f),a149_0x715426(0x179),a149_0x715426(0x16e),a149_0x715426(0x168),'.turbo','.cache']);function a149_0x5b76(){const _0x5888cc=['.hg','dist','10yNfbwp','lovrabet.skill.json','coverage','.DS_Store','100icFnsS','1002zmGsVb','532334YcgrGj','46233gHQWJp','build','.next','40445Ksixae','808bdWxpK','739393TsMYlB','SKILL.md','8588382hCyors','.svn','32963glMRUW','77733SzhelJ'];a149_0x5b76=function(){return _0x5888cc;};return a149_0x5b76();}
1
+ const a150_0x3e948c=a150_0x2963;(function(_0x375af6,_0x2b58e0){const _0xa7302b=a150_0x2963,_0x185144=_0x375af6();while(!![]){try{const _0xfb4028=-parseInt(_0xa7302b(0xd8))/0x1+-parseInt(_0xa7302b(0xd3))/0x2*(-parseInt(_0xa7302b(0xca))/0x3)+parseInt(_0xa7302b(0xd6))/0x4+-parseInt(_0xa7302b(0xd9))/0x5*(parseInt(_0xa7302b(0xce))/0x6)+parseInt(_0xa7302b(0xda))/0x7*(-parseInt(_0xa7302b(0xc9))/0x8)+-parseInt(_0xa7302b(0xc7))/0x9+parseInt(_0xa7302b(0xd7))/0xa*(parseInt(_0xa7302b(0xd4))/0xb);if(_0xfb4028===_0x2b58e0)break;else _0x185144['push'](_0x185144['shift']());}catch(_0x4e14b3){_0x185144['push'](_0x185144['shift']());}}}(a150_0xc916,0x7d184));export const METADATA_FILE=a150_0x3e948c(0xcc);export const SKILL_FILE=a150_0x3e948c(0xd1);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);function a150_0x2963(_0xbf50d7,_0x4215bf){_0xbf50d7=_0xbf50d7-0xc7;const _0xc916f7=a150_0xc916();let _0x296348=_0xc916f7[_0xbf50d7];return _0x296348;}function a150_0xc916(){const _0xbb0f6d=['6gcofcb','.next','.turbo','SKILL.md','node_modules','18158VuvFBp','360019FJWvLi','.cache','3934928vleVSp','230GVTpvE','463668UQwqoK','3806290JKxcmb','3325VdMJjc','200511jbFXia','.git','16584gWtOFt','333CHMQvy','.hg','lovrabet.skill.json','build'];a150_0xc916=function(){return _0xbb0f6d;};return a150_0xc916();}export const IGNORED_DIR_NAMES=new Set([a150_0x3e948c(0xc8),a150_0x3e948c(0xcb),'.svn',a150_0x3e948c(0xd2),a150_0x3e948c(0xcf),'dist',a150_0x3e948c(0xcd),'coverage',a150_0x3e948c(0xd0),a150_0x3e948c(0xd5)]);
@@ -1 +1 @@
1
- (function(_0x3e93e9,_0x4cbebe){const _0x2826f2=a150_0x4c4a,_0x4a7b63=_0x3e93e9();while(!![]){try{const _0x47be03=parseInt(_0x2826f2(0x171))/0x1*(parseInt(_0x2826f2(0x172))/0x2)+-parseInt(_0x2826f2(0x174))/0x3+-parseInt(_0x2826f2(0x16a))/0x4+parseInt(_0x2826f2(0x16d))/0x5+-parseInt(_0x2826f2(0x16b))/0x6+parseInt(_0x2826f2(0x163))/0x7*(-parseInt(_0x2826f2(0x168))/0x8)+-parseInt(_0x2826f2(0x167))/0x9*(-parseInt(_0x2826f2(0x165))/0xa);if(_0x47be03===_0x4cbebe)break;else _0x4a7b63['push'](_0x4a7b63['shift']());}catch(_0x12db84){_0x4a7b63['push'](_0x4a7b63['shift']());}}}(a150_0x3144,0xda5c9));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x2d1891,_0x37ae3d){const _0x515024=a150_0x4c4a,_0x11d5e3=normalizeSkillRelativePath(_0x37ae3d),_0x400f1e=realOrResolved(_0x2d1891),_0x35599c=resolve(_0x400f1e,..._0x11d5e3[_0x515024(0x166)]('/'));if(!isPathInside(_0x35599c,_0x400f1e))throw CliErrors[_0x515024(0x169)](_0x515024(0x161)+_0x37ae3d);return ensureNoSymlinkInManagedPath(_0x400f1e,_0x11d5e3),_0x35599c;}export function ensureNoSymlinkInManagedPath(_0x2190e8,_0x5d1e3f){const _0xe5c0ac=a150_0x4c4a;let _0x4bedd3=_0x2190e8;for(const _0xf3372e of _0x5d1e3f[_0xe5c0ac(0x166)]('/')){_0x4bedd3=resolve(_0x4bedd3,_0xf3372e);const _0x16a7d3=lstatIfPresent(_0x4bedd3);if(_0x16a7d3?.['isSymbolicLink']())throw CliErrors[_0xe5c0ac(0x169)](_0xe5c0ac(0x170)+_0x5d1e3f);}}export function isDanglingSymlink(_0xb54288){const _0x456981=a150_0x4c4a;try{return lstatSync(_0xb54288)[_0x456981(0x173)]();}catch{return![];}}export function resolveSymlinkTarget(_0x1c0878){const _0x6df33=readlinkSync(_0x1c0878);return isAbsolute(_0x6df33)?_0x6df33:resolve(dirname(_0x1c0878),_0x6df33);}function a150_0x3144(){const _0x56b341=['6696380LyePsU','.tmp','from','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','4QPTJAw','108872KRFgAc','isSymbolicLink','2100777onzEFX','startsWith','Unsafe\x20Skill\x20file\x20path:\x20','stringify','14cTJENo','utf8','40JWCTPd','split','6405606HbbyHD','5323048lrqgzL','validation','1561456Fiosso','6528972tvXAnI','endsWith'];a150_0x3144=function(){return _0x56b341;};return a150_0x3144();}export function isPathInside(_0x5b2d15,_0x1727f8){const _0x5733ba=a150_0x4c4a,_0x2c7948=_0x5b2d15[_0x5733ba(0x16c)](sep)?_0x5b2d15:''+_0x5b2d15+sep,_0x4f3a82=_0x1727f8['endsWith'](sep)?_0x1727f8:''+_0x1727f8+sep;return _0x5b2d15===_0x1727f8||_0x2c7948[_0x5733ba(0x160)](_0x4f3a82);}export function realOrResolved(_0x102731){try{return realpathSync(_0x102731);}catch{return resolve(_0x102731);}}function a150_0x4c4a(_0x3bc8bf,_0x374d8e){_0x3bc8bf=_0x3bc8bf-0x160;const _0x314456=a150_0x3144();let _0x4c4a49=_0x314456[_0x3bc8bf];return _0x4c4a49;}export function lstatIfPresent(_0x50b9dd){try{return lstatSync(_0x50b9dd);}catch{return undefined;}}export function writeTextAtomic(_0x4ae29c,_0x446d2a,_0x4ece65){const _0x4c1ec5=a150_0x4c4a;writeBytesAtomic(_0x4ae29c,Buffer[_0x4c1ec5(0x16f)](_0x446d2a,_0x4c1ec5(0x164)),_0x4ece65);}export function writeBytesAtomic(_0x58469b,_0x10fb3e,_0x30c15c){const _0x52f0ca=a150_0x4c4a,_0x567406=_0x58469b+_0x52f0ca(0x16e);try{writeFileSync(_0x567406,_0x10fb3e,{'mode':_0x30c15c}),renameSync(_0x567406,_0x58469b);}catch(_0x3096e9){try{rmSync(_0x567406,{'force':!![]});}catch{}throw _0x3096e9;}}export function writeJsonAtomic(_0x3c7607,_0x58e8f5){const _0x50b40c=a150_0x4c4a;writeTextAtomic(_0x3c7607,JSON[_0x50b40c(0x162)](_0x58e8f5,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x2c4c3f,_0x451a84){const _0x4bbdcd=a151_0x3aac,_0x10800c=_0x2c4c3f();while(!![]){try{const _0x100dff=parseInt(_0x4bbdcd(0x14a))/0x1+-parseInt(_0x4bbdcd(0x13d))/0x2+parseInt(_0x4bbdcd(0x14d))/0x3*(parseInt(_0x4bbdcd(0x147))/0x4)+-parseInt(_0x4bbdcd(0x140))/0x5*(-parseInt(_0x4bbdcd(0x14c))/0x6)+-parseInt(_0x4bbdcd(0x142))/0x7+parseInt(_0x4bbdcd(0x148))/0x8*(-parseInt(_0x4bbdcd(0x143))/0x9)+parseInt(_0x4bbdcd(0x14b))/0xa*(parseInt(_0x4bbdcd(0x146))/0xb);if(_0x100dff===_0x451a84)break;else _0x10800c['push'](_0x10800c['shift']());}catch(_0xe58772){_0x10800c['push'](_0x10800c['shift']());}}}(a151_0x2c8e,0xe9c02));function a151_0x3aac(_0x4e9009,_0x46992d){_0x4e9009=_0x4e9009-0x13d;const _0x2c8e82=a151_0x2c8e();let _0x3aac70=_0x2c8e82[_0x4e9009];return _0x3aac70;}import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x42d9f4,_0x4904bc){const _0x353e92=a151_0x3aac,_0x5694eb=normalizeSkillRelativePath(_0x4904bc),_0x3a2d8e=realOrResolved(_0x42d9f4),_0x454a99=resolve(_0x3a2d8e,..._0x5694eb['split']('/'));if(!isPathInside(_0x454a99,_0x3a2d8e))throw CliErrors[_0x353e92(0x13f)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x4904bc);return ensureNoSymlinkInManagedPath(_0x3a2d8e,_0x5694eb),_0x454a99;}function a151_0x2c8e(){const _0x5a9a1b=['isSymbolicLink','validation','5342050CUnHOl','startsWith','3486714Golvzm','207jlNRpU','.tmp','endsWith','11FkHATD','33736oyodcm','153592nntfjs','utf8','557254UcuITL','4902620DnoisN','6GFCSFe','402KMMFOB','stringify','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','2697922ATDpvj'];a151_0x2c8e=function(){return _0x5a9a1b;};return a151_0x2c8e();}export function ensureNoSymlinkInManagedPath(_0x2690a3,_0x42080c){const _0xac24bb=a151_0x3aac;let _0x5686d4=_0x2690a3;for(const _0x2d0c67 of _0x42080c['split']('/')){_0x5686d4=resolve(_0x5686d4,_0x2d0c67);const _0x30d48d=lstatIfPresent(_0x5686d4);if(_0x30d48d?.[_0xac24bb(0x13e)]())throw CliErrors[_0xac24bb(0x13f)](_0xac24bb(0x14f)+_0x42080c);}}export function isDanglingSymlink(_0x23e8c5){const _0x2bac70=a151_0x3aac;try{return lstatSync(_0x23e8c5)[_0x2bac70(0x13e)]();}catch{return![];}}export function resolveSymlinkTarget(_0x384590){const _0x199086=readlinkSync(_0x384590);return isAbsolute(_0x199086)?_0x199086:resolve(dirname(_0x384590),_0x199086);}export function isPathInside(_0x8f6266,_0x4030c8){const _0x6040fc=a151_0x3aac,_0x2296e4=_0x8f6266['endsWith'](sep)?_0x8f6266:''+_0x8f6266+sep,_0x5963cd=_0x4030c8[_0x6040fc(0x145)](sep)?_0x4030c8:''+_0x4030c8+sep;return _0x8f6266===_0x4030c8||_0x2296e4[_0x6040fc(0x141)](_0x5963cd);}export function realOrResolved(_0x17cf30){try{return realpathSync(_0x17cf30);}catch{return resolve(_0x17cf30);}}export function lstatIfPresent(_0x6f1019){try{return lstatSync(_0x6f1019);}catch{return undefined;}}export function writeTextAtomic(_0x45b2ab,_0x483b85,_0x42bd46){const _0x1735a4=a151_0x3aac;writeBytesAtomic(_0x45b2ab,Buffer['from'](_0x483b85,_0x1735a4(0x149)),_0x42bd46);}export function writeBytesAtomic(_0x5b87c8,_0xacf93c,_0x7047f3){const _0x62caf4=a151_0x3aac,_0x456bc8=_0x5b87c8+_0x62caf4(0x144);try{writeFileSync(_0x456bc8,_0xacf93c,{'mode':_0x7047f3}),renameSync(_0x456bc8,_0x5b87c8);}catch(_0x2bf3e3){try{rmSync(_0x456bc8,{'force':!![]});}catch{}throw _0x2bf3e3;}}export function writeJsonAtomic(_0xb8133e,_0x3e49c4){const _0x3e8330=a151_0x3aac;writeTextAtomic(_0xb8133e,JSON[_0x3e8330(0x14e)](_0x3e49c4,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x5e8d6f,_0x1be30f){const _0x5c3b1d=a151_0x2862,_0x1ef553=_0x5e8d6f();while(!![]){try{const _0x586512=parseInt(_0x5c3b1d(0x127))/0x1*(-parseInt(_0x5c3b1d(0x125))/0x2)+-parseInt(_0x5c3b1d(0x12a))/0x3*(-parseInt(_0x5c3b1d(0x12b))/0x4)+-parseInt(_0x5c3b1d(0x120))/0x5+-parseInt(_0x5c3b1d(0x126))/0x6*(-parseInt(_0x5c3b1d(0x122))/0x7)+parseInt(_0x5c3b1d(0x129))/0x8+parseInt(_0x5c3b1d(0x11d))/0x9+-parseInt(_0x5c3b1d(0x121))/0xa;if(_0x586512===_0x1be30f)break;else _0x1ef553['push'](_0x1ef553['shift']());}catch(_0x4886b4){_0x1ef553['push'](_0x1ef553['shift']());}}}(a151_0x6d94,0x766ff));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x591776){const _0x39ae37=a151_0x2862;return createHash(_0x39ae37(0x12c))[_0x39ae37(0x11e)](_0x591776)[_0x39ae37(0x123)](_0x39ae37(0x11f));}export function fileHash(_0x292efc){return bufferSha256(fileContent(_0x292efc));}function a151_0x6d94(){const _0x136870=['8evBfJC','sha256','6846867boeKVB','update','hex','3194510xXlJEh','5123810bKyYyB','441PIYVRa','digest','size','531820xNNrLw','15528dnvNSE','3XlRZRh','path','4599192DyZczA','1403139MmgggE'];a151_0x6d94=function(){return _0x136870;};return a151_0x6d94();}export function bufferSha256(_0x4e89e2){const _0x373a60=a151_0x2862;return createHash('sha256')[_0x373a60(0x11e)](_0x4e89e2)[_0x373a60(0x123)](_0x373a60(0x11f));}function a151_0x2862(_0x33dac0,_0x10a7b2){_0x33dac0=_0x33dac0-0x11d;const _0x6d9434=a151_0x6d94();let _0x2862a2=_0x6d9434[_0x33dac0];return _0x2862a2;}export function fileTreeHash(_0x2e8126){const _0x4a585d=a151_0x2862,_0xb8af32=createHash(_0x4a585d(0x12c));for(const _0x2f68d9 of normalizeManifestFiles(_0x2e8126)){_0xb8af32[_0x4a585d(0x11e)](_0x2f68d9[_0x4a585d(0x128)]),_0xb8af32[_0x4a585d(0x11e)]('\x00'),_0xb8af32[_0x4a585d(0x11e)](_0x2f68d9[_0x4a585d(0x12c)]),_0xb8af32[_0x4a585d(0x11e)]('\x00'),_0xb8af32['update'](String(_0x2f68d9[_0x4a585d(0x124)])),_0xb8af32[_0x4a585d(0x11e)]('\x00');}return _0xb8af32[_0x4a585d(0x123)](_0x4a585d(0x11f));}
1
+ function a152_0x2f67(_0x4bddb,_0x2164e2){_0x4bddb=_0x4bddb-0xba;const _0x403bf2=a152_0x403b();let _0x2f6762=_0x403bf2[_0x4bddb];return _0x2f6762;}(function(_0x4d7413,_0x431d00){const _0x126102=a152_0x2f67,_0x781295=_0x4d7413();while(!![]){try{const _0x959602=parseInt(_0x126102(0xc6))/0x1*(parseInt(_0x126102(0xc9))/0x2)+parseInt(_0x126102(0xc2))/0x3*(-parseInt(_0x126102(0xc4))/0x4)+parseInt(_0x126102(0xba))/0x5+-parseInt(_0x126102(0xbd))/0x6+-parseInt(_0x126102(0xc3))/0x7*(parseInt(_0x126102(0xc8))/0x8)+-parseInt(_0x126102(0xca))/0x9*(-parseInt(_0x126102(0xbb))/0xa)+-parseInt(_0x126102(0xbc))/0xb*(-parseInt(_0x126102(0xbf))/0xc);if(_0x959602===_0x431d00)break;else _0x781295['push'](_0x781295['shift']());}catch(_0x3703e9){_0x781295['push'](_0x781295['shift']());}}}(a152_0x403b,0xcfa4c));function a152_0x403b(){const _0x46c73a=['3340WOEpcq','11Gorlbp','8652120aSrqFV','path','27775116HvQRwS','hex','digest','3ZDQXIr','4893tUknEQ','3057308ugFQeW','update','2ARWlor','sha256','18632oqCjIP','485104uskUbN','17676VZluca','6145765bMUrVU'];a152_0x403b=function(){return _0x46c73a;};return a152_0x403b();}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x1cda67){const _0x43dfd1=a152_0x2f67;return createHash(_0x43dfd1(0xc7))[_0x43dfd1(0xc5)](_0x1cda67)[_0x43dfd1(0xc1)](_0x43dfd1(0xc0));}export function fileHash(_0x4cdda3){return bufferSha256(fileContent(_0x4cdda3));}export function bufferSha256(_0x232f5c){const _0x5d7cb5=a152_0x2f67;return createHash(_0x5d7cb5(0xc7))[_0x5d7cb5(0xc5)](_0x232f5c)['digest'](_0x5d7cb5(0xc0));}export function fileTreeHash(_0x8c6df1){const _0x4397dd=a152_0x2f67,_0x5bf957=createHash(_0x4397dd(0xc7));for(const _0x572aa5 of normalizeManifestFiles(_0x8c6df1)){_0x5bf957['update'](_0x572aa5[_0x4397dd(0xbe)]),_0x5bf957[_0x4397dd(0xc5)]('\x00'),_0x5bf957['update'](_0x572aa5[_0x4397dd(0xc7)]),_0x5bf957[_0x4397dd(0xc5)]('\x00'),_0x5bf957[_0x4397dd(0xc5)](String(_0x572aa5['size'])),_0x5bf957[_0x4397dd(0xc5)]('\x00');}return _0x5bf957[_0x4397dd(0xc1)](_0x4397dd(0xc0));}
@@ -1 +1 @@
1
- (function(_0x84279f,_0x532616){const _0x1d95f5=a152_0x2653,_0x527ff2=_0x84279f();while(!![]){try{const _0x4b06dc=parseInt(_0x1d95f5(0x118))/0x1*(-parseInt(_0x1d95f5(0x119))/0x2)+-parseInt(_0x1d95f5(0x115))/0x3*(-parseInt(_0x1d95f5(0x11a))/0x4)+-parseInt(_0x1d95f5(0x113))/0x5*(parseInt(_0x1d95f5(0x11b))/0x6)+-parseInt(_0x1d95f5(0x10c))/0x7+parseInt(_0x1d95f5(0x11c))/0x8+-parseInt(_0x1d95f5(0x117))/0x9*(parseInt(_0x1d95f5(0x111))/0xa)+parseInt(_0x1d95f5(0x10b))/0xb*(parseInt(_0x1d95f5(0x116))/0xc);if(_0x4b06dc===_0x532616)break;else _0x527ff2['push'](_0x527ff2['shift']());}catch(_0x59c299){_0x527ff2['push'](_0x527ff2['shift']());}}}(a152_0x2845,0xaaa26));import{resolve}from'node:path';function a152_0x2845(){const _0x13107e=['1087146fydNGM','273mzdHWU','7696NDSaOK','1809308ExbaqQ','10980MRnkWe','9394480JGuRQP','skills','14648425akilMg','1186052fMhLWO','cwd','.agents','managedRoot','freeze','10xbxQRJ','appCode','2510jiZfex','project','3IGoEAb','12NzlAus'];a152_0x2845=function(){return _0x13107e;};return a152_0x2845();}function a152_0x2653(_0x509135,_0xdef196){_0x509135=_0x509135-0x10b;const _0x2845a1=a152_0x2845();let _0x265318=_0x2845a1[_0x509135];return _0x265318;}import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x175e59,_0x37ec0e='global',_0x3b9503={}){const _0x4c7c64=a152_0x2653,_0xdb0a94=resolveSkillSyncPaths(_0x3b9503),_0x59fb78=safePathSegment(_0x175e59,_0x4c7c64(0x112)),_0x1be098=_0x37ec0e===_0x4c7c64(0x114)?[resolve(_0x3b9503[_0x4c7c64(0x10d)]??process[_0x4c7c64(0x10d)](),_0x4c7c64(0x10e),_0x4c7c64(0x11d))]:runtimeAgentSkillRoots(_0xdb0a94);return Object[_0x4c7c64(0x110)]({'scope':_0x37ec0e,'appCode':_0x59fb78,'skillRoots':Object[_0x4c7c64(0x110)](_0x1be098),'managedRoot':_0xdb0a94[_0x4c7c64(0x10f)]});}
1
+ function a153_0x3b8a(){const _0x22d8fb=['159gNIjZt','3877699FGSQVA','appCode','project','1wHyMYh','5282220xayNhw','10OOWHHZ','4005036VDuALu','cwd','skills','9754407JwwoEc','.agents','5208880towHTF','freeze','24956idKknV','2275036ggyNwO'];a153_0x3b8a=function(){return _0x22d8fb;};return a153_0x3b8a();}(function(_0x40d457,_0x36cad3){const _0x1ab71b=a153_0x4a5d,_0x3c034c=_0x40d457();while(!![]){try{const _0x5dde30=-parseInt(_0x1ab71b(0x1fc))/0x1*(-parseInt(_0x1ab71b(0x1f7))/0x2)+parseInt(_0x1ab71b(0x1f8))/0x3*(parseInt(_0x1ab71b(0x1f6))/0x4)+parseInt(_0x1ab71b(0x1fd))/0x5+-parseInt(_0x1ab71b(0x1ef))/0x6+-parseInt(_0x1ab71b(0x1f9))/0x7+parseInt(_0x1ab71b(0x1f4))/0x8+parseInt(_0x1ab71b(0x1f2))/0x9*(-parseInt(_0x1ab71b(0x1ee))/0xa);if(_0x5dde30===_0x36cad3)break;else _0x3c034c['push'](_0x3c034c['shift']());}catch(_0x429944){_0x3c034c['push'](_0x3c034c['shift']());}}}(a153_0x3b8a,0xd4835));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a153_0x4a5d(_0x25f7b5,_0x524e51){_0x25f7b5=_0x25f7b5-0x1ee;const _0x3b8a5b=a153_0x3b8a();let _0x4a5d99=_0x3b8a5b[_0x25f7b5];return _0x4a5d99;}export function resolveRuntimeSkillInstallTarget(_0x1aa414,_0x12c7c6='global',_0x5e1750={}){const _0x3ab7e5=a153_0x4a5d,_0x4d9ffb=resolveSkillSyncPaths(_0x5e1750),_0x3115b9=safePathSegment(_0x1aa414,_0x3ab7e5(0x1fa)),_0x55a073=_0x12c7c6===_0x3ab7e5(0x1fb)?[resolve(_0x5e1750['cwd']??process[_0x3ab7e5(0x1f0)](),_0x3ab7e5(0x1f3),_0x3ab7e5(0x1f1))]:runtimeAgentSkillRoots(_0x4d9ffb);return Object[_0x3ab7e5(0x1f5)]({'scope':_0x12c7c6,'appCode':_0x3115b9,'skillRoots':Object[_0x3ab7e5(0x1f5)](_0x55a073),'managedRoot':_0x4d9ffb['managedRoot']});}