@lovrabet/rabetbase-cli 2.3.4-beta.1 → 2.3.4-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 (219) hide show
  1. package/README.md +99 -560
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/discover.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/flags.js +1 -1
  48. package/lib/commands/common/validate.js +1 -1
  49. package/lib/commands/config/get.js +1 -1
  50. package/lib/commands/config/index.js +1 -1
  51. package/lib/commands/config/list.js +1 -1
  52. package/lib/commands/config/set.js +1 -1
  53. package/lib/commands/config/shared.js +1 -1
  54. package/lib/commands/data/filter.js +1 -1
  55. package/lib/commands/data/getOne.js +1 -1
  56. package/lib/commands/data/index.js +1 -1
  57. package/lib/commands/data/shared.js +1 -1
  58. package/lib/commands/dataset/business-group-update.js +1 -1
  59. package/lib/commands/dataset/capability.js +1 -1
  60. package/lib/commands/dataset/delete.js +1 -1
  61. package/lib/commands/dataset/detail.js +1 -1
  62. package/lib/commands/dataset/extend-update.js +1 -1
  63. package/lib/commands/dataset/field-update.js +1 -1
  64. package/lib/commands/dataset/generate.js +1 -1
  65. package/lib/commands/dataset/index.js +1 -1
  66. package/lib/commands/dataset/list.js +1 -1
  67. package/lib/commands/dataset/operations.js +1 -1
  68. package/lib/commands/dataset/relation-audit.js +1 -1
  69. package/lib/commands/dataset/relation-create.js +1 -1
  70. package/lib/commands/dataset/relation-delete.js +1 -1
  71. package/lib/commands/dataset/relation-shared.js +1 -1
  72. package/lib/commands/dataset/relation-update.js +1 -1
  73. package/lib/commands/dataset/relations.js +1 -1
  74. package/lib/commands/dataset/rename.js +1 -1
  75. package/lib/commands/dataset/restore.js +1 -1
  76. package/lib/commands/db/analyze-cancel.js +1 -1
  77. package/lib/commands/db/analyze-start.js +1 -1
  78. package/lib/commands/db/analyze-status.js +1 -1
  79. package/lib/commands/db/create.js +1 -1
  80. package/lib/commands/db/delete.js +1 -1
  81. package/lib/commands/db/detail.js +1 -1
  82. package/lib/commands/db/diff.js +1 -1
  83. package/lib/commands/db/index.js +1 -1
  84. package/lib/commands/db/list.js +1 -1
  85. package/lib/commands/db/shared.js +1 -1
  86. package/lib/commands/db/tables.js +1 -1
  87. package/lib/commands/db/test.js +1 -1
  88. package/lib/commands/db/update.js +1 -1
  89. package/lib/commands/doctor.js +1 -1
  90. package/lib/commands/init/index.js +1 -1
  91. package/lib/commands/issue/index.js +1 -1
  92. package/lib/commands/issue/nudge.js +1 -1
  93. package/lib/commands/issue/report.js +1 -1
  94. package/lib/commands/issue/shared.js +1 -1
  95. package/lib/commands/logs/index.js +1 -1
  96. package/lib/commands/menu/index.js +1 -1
  97. package/lib/commands/menu/list.js +1 -1
  98. package/lib/commands/menu/shared/compare-table.js +1 -1
  99. package/lib/commands/menu/shared/index.js +1 -1
  100. package/lib/commands/menu/shared/inquirer.js +1 -1
  101. package/lib/commands/menu/shared/local-pages.js +1 -1
  102. package/lib/commands/menu/shared/logic.js +1 -1
  103. package/lib/commands/menu/shared/service.js +1 -1
  104. package/lib/commands/menu/shared/sync-core.js +1 -1
  105. package/lib/commands/menu/shared/update-core.js +1 -1
  106. package/lib/commands/menu/shared/valid-url.js +1 -1
  107. package/lib/commands/menu/sync.js +1 -1
  108. package/lib/commands/menu/update.js +1 -1
  109. package/lib/commands/page/generate-start.js +1 -1
  110. package/lib/commands/page/generate-status.js +1 -1
  111. package/lib/commands/page/index.js +1 -1
  112. package/lib/commands/page/pull.js +1 -1
  113. package/lib/commands/page/push.js +1 -1
  114. package/lib/commands/page/relation-audit.js +1 -1
  115. package/lib/commands/page/shared.js +1 -1
  116. package/lib/commands/page/standard-page-status.js +1 -1
  117. package/lib/commands/page/sync.js +1 -1
  118. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  119. package/lib/commands/project/create/format-elapsed.js +1 -1
  120. package/lib/commands/project/create/main.js +1 -1
  121. package/lib/commands/project/create/non-interactive.js +1 -1
  122. package/lib/commands/project/create/project-template-path.js +1 -1
  123. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  124. package/lib/commands/project/create/use-format-code.js +1 -1
  125. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  126. package/lib/commands/project/index.js +1 -1
  127. package/lib/commands/project/init.js +1 -1
  128. package/lib/commands/project/upgrade.js +1 -1
  129. package/lib/commands/registry.js +1 -1
  130. package/lib/commands/run/index.js +1 -1
  131. package/lib/commands/schema.js +1 -1
  132. package/lib/commands/sql/create.js +1 -1
  133. package/lib/commands/sql/delete.js +1 -1
  134. package/lib/commands/sql/detail.js +1 -1
  135. package/lib/commands/sql/exec.js +1 -1
  136. package/lib/commands/sql/index.js +1 -1
  137. package/lib/commands/sql/list.js +1 -1
  138. package/lib/commands/sql/pull.js +1 -1
  139. package/lib/commands/sql/push.js +1 -1
  140. package/lib/commands/sql/save.js +1 -1
  141. package/lib/commands/sql/shared.js +1 -1
  142. package/lib/commands/sql/status.js +1 -1
  143. package/lib/commands/sql/validate.js +1 -1
  144. package/lib/commands/workspace/index.js +1 -1
  145. package/lib/config/schema.js +1 -1
  146. package/lib/constant/cdn.js +1 -1
  147. package/lib/constant/cli.js +1 -1
  148. package/lib/constant/defaults.js +1 -1
  149. package/lib/constant/domain.js +1 -1
  150. package/lib/constant/env.js +1 -1
  151. package/lib/constant/output.js +1 -1
  152. package/lib/constant/paths.js +1 -1
  153. package/lib/constant/risk.js +1 -1
  154. package/lib/context/app-resolver.js +1 -1
  155. package/lib/context/auth-resolver.js +1 -1
  156. package/lib/context/config-loader.js +1 -1
  157. package/lib/context.js +1 -1
  158. package/lib/core/alias-resolver.js +1 -1
  159. package/lib/core/api-client.js +1 -1
  160. package/lib/core/bff/config.js +1 -1
  161. package/lib/core/bff/file-system.js +1 -1
  162. package/lib/core/bff/hash.js +1 -1
  163. package/lib/core/bff/lock.js +1 -1
  164. package/lib/core/bff/utils.js +1 -1
  165. package/lib/core/db-resolver.js +1 -1
  166. package/lib/core/page/file-system.js +1 -1
  167. package/lib/core/page/hash.js +1 -1
  168. package/lib/core/page/lock.js +1 -1
  169. package/lib/core/sql-sync/config.js +1 -1
  170. package/lib/core/sql-sync/file-system.js +1 -1
  171. package/lib/core/sql-sync/hash.js +1 -1
  172. package/lib/core/sql-sync/lock.js +1 -1
  173. package/lib/core/sql-sync/utils.js +1 -1
  174. package/lib/core/sql-validator.js +1 -1
  175. package/lib/errors.js +1 -1
  176. package/lib/framework/build-all-flags.js +1 -1
  177. package/lib/framework/flags.js +1 -1
  178. package/lib/framework/help.js +1 -1
  179. package/lib/framework/index.js +1 -1
  180. package/lib/framework/output.js +1 -1
  181. package/lib/framework/response.js +1 -1
  182. package/lib/framework/runner-alias.js +1 -1
  183. package/lib/framework/runner.js +1 -1
  184. package/lib/framework/schema-export.js +1 -1
  185. package/lib/framework/types.js +1 -1
  186. package/lib/generated/build-info.js +1 -1
  187. package/lib/help.js +1 -1
  188. package/lib/skills/main.js +1 -1
  189. package/lib/skills/npx-skills-add.js +1 -1
  190. package/lib/telemetry/cli-command-trace.js +1 -1
  191. package/lib/telemetry/cli-help-trace.js +1 -1
  192. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  193. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  194. package/lib/telemetry/send-cli-trace-log.js +1 -1
  195. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  196. package/lib/utils/ai_config.js +1 -1
  197. package/lib/utils/apply-jq-filter.js +1 -1
  198. package/lib/utils/cdn-config.js +1 -1
  199. package/lib/utils/check-sdk-version.js +1 -1
  200. package/lib/utils/cli-version-check.js +1 -1
  201. package/lib/utils/cli-version-policy.js +1 -1
  202. package/lib/utils/config.js +1 -1
  203. package/lib/utils/copy-directory.js +1 -1
  204. package/lib/utils/entity-with-id.js +1 -1
  205. package/lib/utils/file-utils.js +1 -1
  206. package/lib/utils/guides-cdn.js +1 -1
  207. package/lib/utils/http-client.js +1 -1
  208. package/lib/utils/is-non-interactive.js +1 -1
  209. package/lib/utils/logger.js +1 -1
  210. package/lib/utils/params.js +1 -1
  211. package/lib/utils/platform.js +1 -1
  212. package/lib/utils/rules-cdn.js +1 -1
  213. package/lib/utils/sleep.js +1 -1
  214. package/lib/utils/template-replacer.js +1 -1
  215. package/lib/utils/update-notice.js +1 -1
  216. package/lib/utils/version.js +1 -1
  217. package/lib/utils/with-active-cookie.js +1 -1
  218. package/lib/utils/write-cli-side-channel.js +1 -1
  219. package/package.json +18 -2
@@ -1 +1 @@
1
- const a92_0x4a7ee3=a92_0x4dd7;function a92_0x4dd7(_0x2da8b8,_0x3f2ecd){_0x2da8b8=_0x2da8b8-0x13f;const _0x246f7=a92_0x246f();let _0x4dd7ae=_0x246f7[_0x2da8b8];return _0x4dd7ae;}(function(_0x21a360,_0x1ae544){const _0x4de538=a92_0x4dd7,_0x266b74=_0x21a360();while(!![]){try{const _0x5abe28=-parseInt(_0x4de538(0x158))/0x1*(-parseInt(_0x4de538(0x140))/0x2)+parseInt(_0x4de538(0x14e))/0x3*(-parseInt(_0x4de538(0x150))/0x4)+parseInt(_0x4de538(0x14d))/0x5+-parseInt(_0x4de538(0x145))/0x6*(-parseInt(_0x4de538(0x142))/0x7)+parseInt(_0x4de538(0x15b))/0x8*(-parseInt(_0x4de538(0x15a))/0x9)+parseInt(_0x4de538(0x14b))/0xa*(parseInt(_0x4de538(0x143))/0xb)+parseInt(_0x4de538(0x157))/0xc;if(_0x5abe28===_0x1ae544)break;else _0x266b74['push'](_0x266b74['shift']());}catch(_0x5d61f8){_0x266b74['push'](_0x266b74['shift']());}}}(a92_0x246f,0x82c59));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a92_0x4a7ee3(0x13f),REDACTION_RULES=[{'kind':'cookie','pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a92_0x4a7ee3(0x153)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a92_0x4a7ee3(0x152)},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a92_0x4a7ee3(0x148)},{'kind':a92_0x4a7ee3(0x14f),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':a92_0x4a7ee3(0x147),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a92_0x4a7ee3(0x151)},{'kind':'bearer-jwt','pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a92_0x4a7ee3(0x141)}];function a92_0x246f(){const _0x46eb94=['access-key','5360JxHMeT','REDACTED:password','REDACTED:authorization','REDACTED:cookie','utf8','from','kind','5240340DcHNaB','3xsovWV','byteLength','9kjZbJl','2326864UhyCjD','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','2108vWcioe','REDACTED:bearer-jwt','29617JZQaZG','205909sQlIJO','includes','102KjCeBh','max','password','REDACTED:private-key','push','pattern','110ltkJGe','string','3002930jDmTtv','1101UbzWgr'];a92_0x246f=function(){return _0x46eb94;};return a92_0x246f();}export function sanitizeIssueDescription(_0x463054){const _0x3097a1=a92_0x4a7ee3,_0x1dcaad=Buffer[_0x3097a1(0x159)](_0x463054,_0x3097a1(0x154)),_0x8b696c=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x46b03e=_0x463054,_0xc8de85=0x0;const _0x163d59=[];if(!_0x8b696c)for(const _0x277014 of REDACTION_RULES){let _0x3fac49=0x0;_0x46b03e=_0x46b03e['replace'](_0x277014[_0x3097a1(0x14a)],(_0x32860b,_0x1967a3)=>{const _0x1947b7=_0x3097a1;_0x3fac49+=0x1;const _0x78f48e=typeof _0x1967a3===_0x1947b7(0x14c)?_0x1967a3:'';return _0x78f48e+'['+_0x277014['label']+']';}),_0x3fac49>0x0&&(_0xc8de85+=_0x3fac49,!_0x163d59[_0x3097a1(0x144)](_0x277014[_0x3097a1(0x156)])&&_0x163d59[_0x3097a1(0x149)](_0x277014[_0x3097a1(0x156)]));}let _0x335741=![];if(Buffer['byteLength'](_0x46b03e,_0x3097a1(0x154))>ISSUE_DESCRIPTION_MAX_BYTES){_0x335741=!![];const _0x1fb221=Buffer[_0x3097a1(0x159)](TRUNCATION_NOTICE,_0x3097a1(0x154)),_0x3f4caa=Math[_0x3097a1(0x146)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x1fb221);_0x46b03e=sliceUtf8Bytes(_0x46b03e,_0x3f4caa)+TRUNCATION_NOTICE;}return{'description':_0x46b03e,'originalBytes':_0x1dcaad,'truncated':_0x335741,'redactionCount':_0xc8de85,'redactionKinds':_0x163d59};}function sliceUtf8Bytes(_0x236eb3,_0x2d72eb){const _0x4c9ca0=a92_0x4a7ee3;if(_0x2d72eb<=0x0)return'';const _0x526efd=Buffer[_0x4c9ca0(0x155)](_0x236eb3,_0x4c9ca0(0x154));if(_0x526efd[_0x4c9ca0(0x159)]<=_0x2d72eb)return _0x236eb3;let _0x390b33=_0x2d72eb;while(_0x390b33>0x0){const _0x17a18b=_0x526efd[_0x390b33];if(_0x17a18b===undefined||(_0x17a18b&0xc0)!==0x80)break;_0x390b33-=0x1;}return _0x526efd['subarray'](0x0,_0x390b33)['toString'](_0x4c9ca0(0x154));}
1
+ const a92_0x5b115f=a92_0xd557;(function(_0x142486,_0x1cc2e8){const _0x36c8e5=a92_0xd557,_0x2156bf=_0x142486();while(!![]){try{const _0x352f50=parseInt(_0x36c8e5(0x1a9))/0x1*(-parseInt(_0x36c8e5(0x1ac))/0x2)+parseInt(_0x36c8e5(0x1a5))/0x3+parseInt(_0x36c8e5(0x1a7))/0x4*(-parseInt(_0x36c8e5(0x1c2))/0x5)+parseInt(_0x36c8e5(0x1a6))/0x6+-parseInt(_0x36c8e5(0x1c1))/0x7*(parseInt(_0x36c8e5(0x1b4))/0x8)+-parseInt(_0x36c8e5(0x1b2))/0x9+parseInt(_0x36c8e5(0x1bd))/0xa;if(_0x352f50===_0x1cc2e8)break;else _0x2156bf['push'](_0x2156bf['shift']());}catch(_0x40f4c5){_0x2156bf['push'](_0x2156bf['shift']());}}}(a92_0x2b5a,0xad7a6));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a92_0x5b115f(0x1b9),REDACTION_RULES=[{'kind':a92_0x5b115f(0x1b8),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a92_0x5b115f(0x1ae)},{'kind':a92_0x5b115f(0x1ab),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a92_0x5b115f(0x1b6)},{'kind':a92_0x5b115f(0x1be),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a92_0x5b115f(0x1b1)},{'kind':a92_0x5b115f(0x1b7),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a92_0x5b115f(0x1b3)},{'kind':a92_0x5b115f(0x1c3),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a92_0x5b115f(0x1ad)},{'kind':a92_0x5b115f(0x1af),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a92_0x5b115f(0x1b0)}];export function sanitizeIssueDescription(_0x47437e){const _0x5c7a1e=a92_0x5b115f,_0x5b3435=Buffer[_0x5c7a1e(0x1aa)](_0x47437e,_0x5c7a1e(0x1b5)),_0xad0dfe=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x37a483=_0x47437e,_0x46e940=0x0;const _0x2a1192=[];if(!_0xad0dfe)for(const _0x4c67d3 of REDACTION_RULES){let _0x449700=0x0;_0x37a483=_0x37a483['replace'](_0x4c67d3['pattern'],(_0x2c7069,_0x2c53bf)=>{const _0x5684af=_0x5c7a1e;_0x449700+=0x1;const _0x560862=typeof _0x2c53bf===_0x5684af(0x1bf)?_0x2c53bf:'';return _0x560862+'['+_0x4c67d3[_0x5684af(0x1bb)]+']';}),_0x449700>0x0&&(_0x46e940+=_0x449700,!_0x2a1192['includes'](_0x4c67d3[_0x5c7a1e(0x1a8)])&&_0x2a1192['push'](_0x4c67d3[_0x5c7a1e(0x1a8)]));}let _0x19c4e0=![];if(Buffer[_0x5c7a1e(0x1aa)](_0x37a483,_0x5c7a1e(0x1b5))>ISSUE_DESCRIPTION_MAX_BYTES){_0x19c4e0=!![];const _0x423770=Buffer[_0x5c7a1e(0x1aa)](TRUNCATION_NOTICE,_0x5c7a1e(0x1b5)),_0x5b8649=Math[_0x5c7a1e(0x1ba)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x423770);_0x37a483=sliceUtf8Bytes(_0x37a483,_0x5b8649)+TRUNCATION_NOTICE;}return{'description':_0x37a483,'originalBytes':_0x5b3435,'truncated':_0x19c4e0,'redactionCount':_0x46e940,'redactionKinds':_0x2a1192};}function a92_0xd557(_0x308d53,_0x3fa720){_0x308d53=_0x308d53-0x1a5;const _0x2b5a43=a92_0x2b5a();let _0xd55733=_0x2b5a43[_0x308d53];return _0xd55733;}function a92_0x2b5a(){const _0x2e2e9b=['subarray','49alFShJ','15IaaNGv','password','3750438rquGoS','6737568KdaiHb','951352UWcpqT','kind','4DfyhBp','byteLength','authorization','502064rCTosg','REDACTED:password','REDACTED:cookie','bearer-jwt','REDACTED:bearer-jwt','REDACTED:private-key','10832382YCkwUK','REDACTED:access-key','234808gdkYGm','utf8','REDACTED:authorization','access-key','cookie','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','max','label','from','14641890ESFURZ','private-key','string'];a92_0x2b5a=function(){return _0x2e2e9b;};return a92_0x2b5a();}function sliceUtf8Bytes(_0x49a7b2,_0x3f207d){const _0x5d6bab=a92_0x5b115f;if(_0x3f207d<=0x0)return'';const _0x9514d2=Buffer[_0x5d6bab(0x1bc)](_0x49a7b2,_0x5d6bab(0x1b5));if(_0x9514d2['byteLength']<=_0x3f207d)return _0x49a7b2;let _0x37deae=_0x3f207d;while(_0x37deae>0x0){const _0x5cf766=_0x9514d2[_0x37deae];if(_0x5cf766===undefined||(_0x5cf766&0xc0)!==0x80)break;_0x37deae-=0x1;}return _0x9514d2[_0x5d6bab(0x1c0)](0x0,_0x37deae)['toString'](_0x5d6bab(0x1b5));}
@@ -1 +1 @@
1
- function a93_0x12d4(_0x389cd5,_0x1bca4b){_0x389cd5=_0x389cd5-0x1b8;const _0x39638d=a93_0x3963();let _0x12d41f=_0x39638d[_0x389cd5];return _0x12d41f;}const a93_0x489aa0=a93_0x12d4;(function(_0x2af633,_0x5843b3){const _0x172438=a93_0x12d4,_0x351644=_0x2af633();while(!![]){try{const _0x4a0f87=-parseInt(_0x172438(0x1c4))/0x1+parseInt(_0x172438(0x1d8))/0x2+parseInt(_0x172438(0x1c3))/0x3+parseInt(_0x172438(0x1d6))/0x4+parseInt(_0x172438(0x1c5))/0x5+parseInt(_0x172438(0x1c6))/0x6*(-parseInt(_0x172438(0x1d7))/0x7)+-parseInt(_0x172438(0x1d4))/0x8;if(_0x4a0f87===_0x5843b3)break;else _0x351644['push'](_0x351644['shift']());}catch(_0x35c5ec){_0x351644['push'](_0x351644['shift']());}}}(a93_0x3963,0xbdb28));function a93_0x3963(){const _0x37489b=['4251676yjhfvY','273658XqRBVg','316806uoKItP','readLogs','keys','success','forEach','timestamp','*\x20Lovrabet\x20CLI\x20logs:\x0a','View\x20command\x20history\x20logs','clear','\x20\x20\x20Details:\x20','\x20\x20\x20Time:\x20','details','command','logs','length','2783178EyZhmB','65840zjiuQY','6957360OxWlTf','174Cjoboy','*\x20No\x20logs\x20found','stringify','error','\x20\x20\x20Duration:\x20','warn','level','duration','clearLogs','Clear\x20command\x20history\x20logs','write','read','show','log','12511632NNNZZu','en-US'];a93_0x3963=function(){return _0x37489b;};return a93_0x3963();}import{logger}from'../../utils/logger.js';function printLogs(_0x16e173){const _0x5dd06f=a93_0x12d4;if(_0x16e173[_0x5dd06f(0x1c2)]===0x0){console['log'](_0x5dd06f(0x1c7));return;}console[_0x5dd06f(0x1d3)](_0x5dd06f(0x1ba)),_0x16e173[_0x5dd06f(0x1b8)]((_0x3434e0,_0x303417)=>{const _0x504162=_0x5dd06f,_0x364198=new Date(_0x3434e0[_0x504162(0x1b9)])['toLocaleString'](_0x504162(0x1d5)),_0x426413=_0x3434e0[_0x504162(0x1cc)]===_0x504162(0x1db)?'√':_0x3434e0['level']===_0x504162(0x1c9)?'×':_0x3434e0['level']===_0x504162(0x1cb)?'!':'i';console[_0x504162(0x1d3)](_0x303417+0x1+'.\x20'+_0x426413+'\x20['+_0x3434e0[_0x504162(0x1c0)]+']\x20'+_0x3434e0['message']),console['log'](_0x504162(0x1be)+_0x364198),_0x3434e0['duration']&&console['log'](_0x504162(0x1ca)+_0x3434e0[_0x504162(0x1cd)]+'ms'),_0x3434e0['details']&&Object[_0x504162(0x1da)](_0x3434e0[_0x504162(0x1bf)])[_0x504162(0x1c2)]>0x0&&console[_0x504162(0x1d3)](_0x504162(0x1bd)+JSON[_0x504162(0x1c8)](_0x3434e0[_0x504162(0x1bf)],null,0x2)),console[_0x504162(0x1d3)]('');});}export const logsDefinitions=[{'service':a93_0x489aa0(0x1c1),'command':a93_0x489aa0(0x1d2),'description':a93_0x489aa0(0x1bb),'risk':a93_0x489aa0(0x1d1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x499926){const _0x36a330=a93_0x489aa0;return printLogs(logger[_0x36a330(0x1d9)]()),{'ok':!![]};}},{'service':a93_0x489aa0(0x1c1),'command':a93_0x489aa0(0x1bc),'description':a93_0x489aa0(0x1cf),'risk':a93_0x489aa0(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5a6bc4){const _0x3d1c28=a93_0x489aa0;return logger[_0x3d1c28(0x1ce)](),console[_0x3d1c28(0x1d3)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
1
+ function a93_0x3579(){const _0x4d1931=['stringify','3vdYIvw','message','*\x20Lovrabet\x20CLI\x20logs:\x0a','*\x20Logs\x20cleared','show','91UzyYZm','5190iTzBuk','3131370VvRyiK','log','duration','command','clear','read','forEach','length','en-US','logs','\x20\x20\x20Duration:\x20','11pIrBxx','676168YjCsYC','7668696GsYPUq','View\x20command\x20history\x20logs','details','107816pLMmzL','915FcpmMg','level','toLocaleString','1608524DgRIRz','1cFKwlH','\x20\x20\x20Time:\x20','keys','314577LKnsfL','clearLogs','success'];a93_0x3579=function(){return _0x4d1931;};return a93_0x3579();}const a93_0x382d1c=a93_0x30d6;function a93_0x30d6(_0x2d63e8,_0x934ddd){_0x2d63e8=_0x2d63e8-0x1a6;const _0x35793f=a93_0x3579();let _0x30d6d9=_0x35793f[_0x2d63e8];return _0x30d6d9;}(function(_0x3fe1d4,_0xebc364){const _0x503ab6=a93_0x30d6,_0x794f17=_0x3fe1d4();while(!![]){try{const _0x155762=-parseInt(_0x503ab6(0x1b6))/0x1*(-parseInt(_0x503ab6(0x1ad))/0x2)+-parseInt(_0x503ab6(0x1bd))/0x3*(parseInt(_0x503ab6(0x1b5))/0x4)+parseInt(_0x503ab6(0x1b2))/0x5*(parseInt(_0x503ab6(0x1c3))/0x6)+parseInt(_0x503ab6(0x1c2))/0x7*(-parseInt(_0x503ab6(0x1b1))/0x8)+-parseInt(_0x503ab6(0x1b9))/0x9+parseInt(_0x503ab6(0x1c4))/0xa*(-parseInt(_0x503ab6(0x1ac))/0xb)+parseInt(_0x503ab6(0x1ae))/0xc;if(_0x155762===_0xebc364)break;else _0x794f17['push'](_0x794f17['shift']());}catch(_0x52e95f){_0x794f17['push'](_0x794f17['shift']());}}}(a93_0x3579,0x3345f));import{logger}from'../../utils/logger.js';function printLogs(_0x3803bc){const _0x914abc=a93_0x30d6;if(_0x3803bc[_0x914abc(0x1a8)]===0x0){console['log']('*\x20No\x20logs\x20found');return;}console[_0x914abc(0x1c5)](_0x914abc(0x1bf)),_0x3803bc[_0x914abc(0x1a7)]((_0x7f04ec,_0x256d15)=>{const _0x3c5298=_0x914abc,_0x3079a6=new Date(_0x7f04ec['timestamp'])[_0x3c5298(0x1b4)](_0x3c5298(0x1a9)),_0x49c360=_0x7f04ec['level']===_0x3c5298(0x1bb)?'√':_0x7f04ec[_0x3c5298(0x1b3)]==='error'?'×':_0x7f04ec[_0x3c5298(0x1b3)]==='warn'?'!':'i';console[_0x3c5298(0x1c5)](_0x256d15+0x1+'.\x20'+_0x49c360+'\x20['+_0x7f04ec[_0x3c5298(0x1c7)]+']\x20'+_0x7f04ec[_0x3c5298(0x1be)]),console[_0x3c5298(0x1c5)](_0x3c5298(0x1b7)+_0x3079a6),_0x7f04ec[_0x3c5298(0x1c6)]&&console[_0x3c5298(0x1c5)](_0x3c5298(0x1ab)+_0x7f04ec[_0x3c5298(0x1c6)]+'ms'),_0x7f04ec[_0x3c5298(0x1b0)]&&Object[_0x3c5298(0x1b8)](_0x7f04ec[_0x3c5298(0x1b0)])[_0x3c5298(0x1a8)]>0x0&&console[_0x3c5298(0x1c5)]('\x20\x20\x20Details:\x20'+JSON[_0x3c5298(0x1bc)](_0x7f04ec[_0x3c5298(0x1b0)],null,0x2)),console[_0x3c5298(0x1c5)]('');});}export const logsDefinitions=[{'service':a93_0x382d1c(0x1aa),'command':a93_0x382d1c(0x1c1),'description':a93_0x382d1c(0x1af),'risk':a93_0x382d1c(0x1a6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5e7679){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a93_0x382d1c(0x1aa),'command':a93_0x382d1c(0x1c8),'description':'Clear\x20command\x20history\x20logs','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1dd319){const _0x1d5e86=a93_0x382d1c;return logger[_0x1d5e86(0x1ba)](),console[_0x1d5e86(0x1c5)](_0x1d5e86(0x1c0)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x4afae0,_0x44527b){const _0x93ed5e=a94_0x1e5e,_0x60b029=_0x4afae0();while(!![]){try{const _0x1907ae=-parseInt(_0x93ed5e(0x1be))/0x1*(parseInt(_0x93ed5e(0x1c4))/0x2)+parseInt(_0x93ed5e(0x1c2))/0x3*(-parseInt(_0x93ed5e(0x1c5))/0x4)+parseInt(_0x93ed5e(0x1b9))/0x5*(-parseInt(_0x93ed5e(0x1ba))/0x6)+-parseInt(_0x93ed5e(0x1c3))/0x7*(parseInt(_0x93ed5e(0x1c0))/0x8)+parseInt(_0x93ed5e(0x1bb))/0x9*(parseInt(_0x93ed5e(0x1bc))/0xa)+-parseInt(_0x93ed5e(0x1bd))/0xb*(parseInt(_0x93ed5e(0x1c1))/0xc)+parseInt(_0x93ed5e(0x1bf))/0xd;if(_0x1907ae===_0x44527b)break;else _0x60b029['push'](_0x60b029['shift']());}catch(_0x2b8c2b){_0x60b029['push'](_0x60b029['shift']());}}}(a94_0x49da,0xcd631));import{menuList}from'../../commands/menu/list.js';import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a94_0x1e5e(_0x52f30f,_0x4d59c8){_0x52f30f=_0x52f30f-0x1b9;const _0x49dad3=a94_0x49da();let _0x1e5e68=_0x49dad3[_0x52f30f];return _0x1e5e68;}export const menuDefinitions=[menuList,menuSync,menuUpdate];function a94_0x49da(){const _0x57d044=['10mejfQm','231FoWcLh','2201nyqcAv','80435706TTmGvL','10628736BohUEI','540516JJyAdr','939SdJVZR','7qymMXg','1412NqBUpy','18632BNxEca','8175165puefKE','6gIrWDj','14177619CXZRGJ'];a94_0x49da=function(){return _0x57d044;};return a94_0x49da();}
1
+ (function(_0x5cb368,_0x5092b3){const _0x5edb6c=a94_0x356d,_0x335135=_0x5cb368();while(!![]){try{const _0xab7390=parseInt(_0x5edb6c(0x198))/0x1+parseInt(_0x5edb6c(0x196))/0x2+-parseInt(_0x5edb6c(0x18e))/0x3*(parseInt(_0x5edb6c(0x193))/0x4)+-parseInt(_0x5edb6c(0x18f))/0x5*(parseInt(_0x5edb6c(0x197))/0x6)+-parseInt(_0x5edb6c(0x191))/0x7*(parseInt(_0x5edb6c(0x190))/0x8)+parseInt(_0x5edb6c(0x192))/0x9+-parseInt(_0x5edb6c(0x194))/0xa*(-parseInt(_0x5edb6c(0x195))/0xb);if(_0xab7390===_0x5092b3)break;else _0x335135['push'](_0x335135['shift']());}catch(_0x38c342){_0x335135['push'](_0x335135['shift']());}}}(a94_0xa81f,0x548ba));import{menuList}from'../../commands/menu/list.js';function a94_0xa81f(){const _0x2a038e=['221034ElRIUM','270644ugnbTI','654efHTvL','70DaqKhr','8ooXZvm','2419319ndcijO','5676147YntdnL','10468lVcKjj','20XkLBaC','3466573pKWkZW','493108zMjAIc'];a94_0xa81f=function(){return _0x2a038e;};return a94_0xa81f();}import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a94_0x356d(_0x29cf95,_0x44e89e){_0x29cf95=_0x29cf95-0x18e;const _0xa81ffc=a94_0xa81f();let _0x356d33=_0xa81ffc[_0x29cf95];return _0x356d33;}export const menuDefinitions=[menuList,menuSync,menuUpdate];
@@ -1 +1 @@
1
- const a95_0x383802=a95_0x33f4;(function(_0x5795ae,_0x17c002){const _0x4b3054=a95_0x33f4,_0x60bfbb=_0x5795ae();while(!![]){try{const _0x434e7a=-parseInt(_0x4b3054(0x1cf))/0x1+parseInt(_0x4b3054(0x1cc))/0x2*(parseInt(_0x4b3054(0x1ca))/0x3)+parseInt(_0x4b3054(0x1c2))/0x4+-parseInt(_0x4b3054(0x1d6))/0x5*(parseInt(_0x4b3054(0x1b4))/0x6)+parseInt(_0x4b3054(0x1cb))/0x7+-parseInt(_0x4b3054(0x1b6))/0x8+parseInt(_0x4b3054(0x1c0))/0x9*(parseInt(_0x4b3054(0x1cd))/0xa);if(_0x434e7a===_0x17c002)break;else _0x60bfbb['push'](_0x60bfbb['shift']());}catch(_0x52754f){_0x60bfbb['push'](_0x60bfbb['shift']());}}}(a95_0x3c08,0x9f1d9));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getApiDomain}from'../../constant/domain.js';function a95_0x3c08(){const _0x277f71=['16978260eTucaU','path','650657urveEO','length','list','\x20menu(s)','Fetch\x20menu\x20list','depth','push','45qYWAxB','verbose','boolean','menu','index','/smartapi/menu/find?appCode=','extend','606210PBnbgg','cookie','9100232fLxKij','read','isArray','parentId','appCode','bool','children','sort','List\x20online\x20menu\x20facts\x20for\x20the\x20current\x20app','map','9YCyFYV','Found\x20','3808568sOcWrx','number','isFinite','item','type','visible','string','POSITIVE_INFINITY','364467hXVvMj','3194044cdclDD','4nUynTF'];a95_0x3c08=function(){return _0x277f71;};return a95_0x3c08();}import{platformFetch}from'../../core/api-client.js';export const menuList={'service':a95_0x383802(0x1b0),'command':a95_0x383802(0x1d1),'description':a95_0x383802(0x1be),'risk':a95_0x383802(0x1b7),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a95_0x383802(0x1ae),'type':'boolean','description':'Return\x20extend\x20field\x20for\x20troubleshooting\x20resource\x20parsing'}],async 'execute'(_0xb2c503){const _0x2b183c=a95_0x383802,_0x980ea9=_0xb2c503[_0x2b183c(0x1bb)]('verbose'),_0x571826=await platformFetch(getApiDomain()+_0x2b183c(0x1b2)+_0xb2c503[_0x2b183c(0x1ba)],{'cookie':_0xb2c503[_0x2b183c(0x1b5)],'label':_0x2b183c(0x1d3)}),_0x3d2b10=flattenMenuItems(Array[_0x2b183c(0x1b8)](_0x571826)?_0x571826:[],{'verbose':_0x980ea9,'parentId':null,'depth':0x0});return{'ok':!![],'data':{'total':_0x3d2b10[_0x2b183c(0x1d0)],'menus':_0x3d2b10},'message':_0x3d2b10[_0x2b183c(0x1d0)]===0x0?'No\x20menus\x20found.':_0x2b183c(0x1c1)+_0x3d2b10[_0x2b183c(0x1d0)]+_0x2b183c(0x1d2)};}};function flattenMenuItems(_0x37376a,_0x3329f3){const _0x479a63=a95_0x383802,_0x413561=sortMenuItems(_0x37376a),_0x4943c6=[];for(const _0x42a29a of _0x413561){_0x4943c6[_0x479a63(0x1d5)](toMenuListItem(_0x42a29a,_0x3329f3)),Array[_0x479a63(0x1b8)](_0x42a29a[_0x479a63(0x1bc)])&&_0x42a29a[_0x479a63(0x1bc)]['length']>0x0&&_0x4943c6['push'](...flattenMenuItems(_0x42a29a['children'],{'verbose':_0x3329f3[_0x479a63(0x1ae)],'parentId':_0x42a29a['id'],'depth':_0x3329f3['depth']+0x1}));}return _0x4943c6;}function a95_0x33f4(_0x1c67af,_0x1e4618){_0x1c67af=_0x1c67af-0x1ae;const _0x3c088a=a95_0x3c08();let _0x33f42c=_0x3c088a[_0x1c67af];return _0x33f42c;}function sortMenuItems(_0x55e8cd){const _0x3b8630=a95_0x383802;return _0x55e8cd[_0x3b8630(0x1bf)]((_0x1a9d69,_0x202db0)=>({'item':_0x1a9d69,'index':_0x202db0}))['sort']((_0x3f568d,_0x102d34)=>{const _0xa9705=_0x3b8630,_0x1071b1=normalizeSort(_0x3f568d['item'][_0xa9705(0x1bd)]),_0x47b9b3=normalizeSort(_0x102d34[_0xa9705(0x1c5)][_0xa9705(0x1bd)]);if(_0x1071b1!==_0x47b9b3)return _0x1071b1-_0x47b9b3;return _0x3f568d[_0xa9705(0x1b1)]-_0x102d34[_0xa9705(0x1b1)];})[_0x3b8630(0x1bf)](({item:_0x5dd9b2})=>_0x5dd9b2);}function toMenuListItem(_0x2a851c,_0x340b4d){const _0x5646b1=a95_0x383802,_0x2f75ab={'id':_0x2a851c['id'],'parentId':_0x340b4d[_0x5646b1(0x1b9)],'depth':_0x340b4d[_0x5646b1(0x1d4)],'label':normalizeString(_0x2a851c['label']),'path':normalizeString(_0x2a851c[_0x5646b1(0x1ce)]),'type':normalizeString(_0x2a851c[_0x5646b1(0x1c6)]),'visible':typeof _0x2a851c[_0x5646b1(0x1c7)]===_0x5646b1(0x1af)?_0x2a851c[_0x5646b1(0x1c7)]:null,'sort':typeof _0x2a851c[_0x5646b1(0x1bd)]===_0x5646b1(0x1c3)&&Number[_0x5646b1(0x1c4)](_0x2a851c['sort'])?_0x2a851c[_0x5646b1(0x1bd)]:null,'resources':normalizeResources(_0x2a851c['extend']?.['resources'])};return _0x340b4d['verbose']&&(_0x2f75ab[_0x5646b1(0x1b3)]=_0x2a851c[_0x5646b1(0x1b3)]??null),_0x2f75ab;}function normalizeSort(_0x223062){const _0x39fc49=a95_0x383802;return typeof _0x223062===_0x39fc49(0x1c3)&&Number[_0x39fc49(0x1c4)](_0x223062)?_0x223062:Number[_0x39fc49(0x1c9)];}function normalizeString(_0x2edbf8){const _0x28aa90=a95_0x383802;return typeof _0x2edbf8===_0x28aa90(0x1c8)?_0x2edbf8:'';}function normalizeResources(_0xce3804){const _0x402911=a95_0x383802;if(Array[_0x402911(0x1b8)](_0xce3804))return _0xce3804[_0x402911(0x1bf)](String);if(typeof _0xce3804!==_0x402911(0x1c8))return[];try{const _0x39dce8=JSON['parse'](_0xce3804);return Array['isArray'](_0x39dce8)?_0x39dce8[_0x402911(0x1bf)](String):[];}catch{return[];}}
1
+ const a95_0x603947=a95_0x5584;(function(_0x178958,_0x4cf7ba){const _0xa7ad6d=a95_0x5584,_0x10fd04=_0x178958();while(!![]){try{const _0x5af0c8=parseInt(_0xa7ad6d(0x1ad))/0x1*(parseInt(_0xa7ad6d(0x1a1))/0x2)+parseInt(_0xa7ad6d(0x19c))/0x3*(-parseInt(_0xa7ad6d(0x18e))/0x4)+parseInt(_0xa7ad6d(0x193))/0x5*(-parseInt(_0xa7ad6d(0x1af))/0x6)+parseInt(_0xa7ad6d(0x19f))/0x7*(parseInt(_0xa7ad6d(0x19e))/0x8)+-parseInt(_0xa7ad6d(0x1b1))/0x9+parseInt(_0xa7ad6d(0x1b0))/0xa*(parseInt(_0xa7ad6d(0x19d))/0xb)+parseInt(_0xa7ad6d(0x1ab))/0xc*(parseInt(_0xa7ad6d(0x1b3))/0xd);if(_0x5af0c8===_0x4cf7ba)break;else _0x10fd04['push'](_0x10fd04['shift']());}catch(_0x4da94a){_0x10fd04['push'](_0x10fd04['shift']());}}}(a95_0x2d57,0xc28fc));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getApiDomain}from'../../constant/domain.js';import{platformFetch}from'../../core/api-client.js';export const menuList={'service':a95_0x603947(0x189),'command':a95_0x603947(0x1b2),'description':a95_0x603947(0x1ac),'risk':a95_0x603947(0x1aa),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a95_0x603947(0x18b),'type':a95_0x603947(0x1a8),'description':a95_0x603947(0x190)}],async 'execute'(_0x47b2ca){const _0x5126b5=a95_0x603947,_0x303756=_0x47b2ca[_0x5126b5(0x198)](_0x5126b5(0x18b)),_0x1892e3=await platformFetch(getApiDomain()+_0x5126b5(0x1a4)+_0x47b2ca[_0x5126b5(0x18c)],{'cookie':_0x47b2ca[_0x5126b5(0x1a9)],'label':'Fetch\x20menu\x20list'}),_0x2f7f84=flattenMenuItems(Array[_0x5126b5(0x1ae)](_0x1892e3)?_0x1892e3:[],{'verbose':_0x303756,'parentId':null,'depth':0x0});return{'ok':!![],'data':{'total':_0x2f7f84[_0x5126b5(0x196)],'menus':_0x2f7f84},'message':_0x2f7f84[_0x5126b5(0x196)]===0x0?_0x5126b5(0x1a0):_0x5126b5(0x1a2)+_0x2f7f84[_0x5126b5(0x196)]+'\x20menu(s)'};}};function flattenMenuItems(_0x3b2a59,_0xd6b5e3){const _0x1a6042=a95_0x603947,_0x5044dc=sortMenuItems(_0x3b2a59),_0x1519fc=[];for(const _0x33ae9f of _0x5044dc){_0x1519fc[_0x1a6042(0x195)](toMenuListItem(_0x33ae9f,_0xd6b5e3)),Array[_0x1a6042(0x1ae)](_0x33ae9f['children'])&&_0x33ae9f[_0x1a6042(0x197)][_0x1a6042(0x196)]>0x0&&_0x1519fc['push'](...flattenMenuItems(_0x33ae9f['children'],{'verbose':_0xd6b5e3[_0x1a6042(0x18b)],'parentId':_0x33ae9f['id'],'depth':_0xd6b5e3[_0x1a6042(0x192)]+0x1}));}return _0x1519fc;}function sortMenuItems(_0x4dbb24){const _0x48548b=a95_0x603947;return _0x4dbb24[_0x48548b(0x18a)]((_0x58d073,_0x28d989)=>({'item':_0x58d073,'index':_0x28d989}))[_0x48548b(0x1a3)]((_0x28484d,_0xba00cf)=>{const _0x5a6bab=_0x48548b,_0x3c379f=normalizeSort(_0x28484d['item'][_0x5a6bab(0x1a3)]),_0x4b1b15=normalizeSort(_0xba00cf['item']['sort']);if(_0x3c379f!==_0x4b1b15)return _0x3c379f-_0x4b1b15;return _0x28484d[_0x5a6bab(0x1a5)]-_0xba00cf[_0x5a6bab(0x1a5)];})[_0x48548b(0x18a)](({item:_0x5c8a7a})=>_0x5c8a7a);}function toMenuListItem(_0x399509,_0x59f924){const _0x465b06=a95_0x603947,_0x5b8d67={'id':_0x399509['id'],'parentId':_0x59f924[_0x465b06(0x194)],'depth':_0x59f924[_0x465b06(0x192)],'label':normalizeString(_0x399509[_0x465b06(0x199)]),'path':normalizeString(_0x399509[_0x465b06(0x19a)]),'type':normalizeString(_0x399509[_0x465b06(0x191)]),'visible':typeof _0x399509[_0x465b06(0x1a6)]===_0x465b06(0x1a8)?_0x399509[_0x465b06(0x1a6)]:null,'sort':typeof _0x399509[_0x465b06(0x1a3)]===_0x465b06(0x18f)&&Number['isFinite'](_0x399509[_0x465b06(0x1a3)])?_0x399509[_0x465b06(0x1a3)]:null,'resources':normalizeResources(_0x399509['extend']?.[_0x465b06(0x187)])};return _0x59f924[_0x465b06(0x18b)]&&(_0x5b8d67[_0x465b06(0x1a7)]=_0x399509[_0x465b06(0x1a7)]??null),_0x5b8d67;}function normalizeSort(_0x736d85){const _0xc60e0f=a95_0x603947;return typeof _0x736d85===_0xc60e0f(0x18f)&&Number[_0xc60e0f(0x18d)](_0x736d85)?_0x736d85:Number[_0xc60e0f(0x188)];}function normalizeString(_0x1efec5){const _0x431dcb=a95_0x603947;return typeof _0x1efec5===_0x431dcb(0x19b)?_0x1efec5:'';}function a95_0x5584(_0x9a08c0,_0x4edc51){_0x9a08c0=_0x9a08c0-0x187;const _0x2d57aa=a95_0x2d57();let _0x558423=_0x2d57aa[_0x9a08c0];return _0x558423;}function a95_0x2d57(){const _0x4e4940=['17445909cZULvC','resources','POSITIVE_INFINITY','menu','map','verbose','appCode','isFinite','412feEzHV','number','Return\x20extend\x20field\x20for\x20troubleshooting\x20resource\x20parsing','type','depth','5mENXkQ','parentId','push','length','children','bool','label','path','string','40401QSnBip','869zSqCIj','4625528dNoKVG','14nVJkZT','No\x20menus\x20found.','6044IvqCaN','Found\x20','sort','/smartapi/menu/find?appCode=','index','visible','extend','boolean','cookie','read','12NYUrxC','List\x20online\x20menu\x20facts\x20for\x20the\x20current\x20app','293EeITQS','isArray','9369666arjHoL','138010mBBZPs','6556176rtzore','list'];a95_0x2d57=function(){return _0x4e4940;};return a95_0x2d57();}function normalizeResources(_0x25b4db){const _0xc5a607=a95_0x603947;if(Array[_0xc5a607(0x1ae)](_0x25b4db))return _0x25b4db['map'](String);if(typeof _0x25b4db!==_0xc5a607(0x19b))return[];try{const _0x5da50e=JSON['parse'](_0x25b4db);return Array[_0xc5a607(0x1ae)](_0x5da50e)?_0x5da50e[_0xc5a607(0x18a)](String):[];}catch{return[];}}
@@ -1 +1 @@
1
- (function(_0x45dcda,_0x1750e0){const _0x10e6ce=a96_0x5d79,_0x56295b=_0x45dcda();while(!![]){try{const _0x3fcfc3=parseInt(_0x10e6ce(0x1f0))/0x1+-parseInt(_0x10e6ce(0x1e9))/0x2*(parseInt(_0x10e6ce(0x1e6))/0x3)+-parseInt(_0x10e6ce(0x1ee))/0x4+-parseInt(_0x10e6ce(0x1e1))/0x5*(parseInt(_0x10e6ce(0x1f3))/0x6)+-parseInt(_0x10e6ce(0x1dd))/0x7*(parseInt(_0x10e6ce(0x1ec))/0x8)+parseInt(_0x10e6ce(0x1f6))/0x9+parseInt(_0x10e6ce(0x1ea))/0xa;if(_0x3fcfc3===_0x1750e0)break;else _0x56295b['push'](_0x56295b['shift']());}catch(_0x1137cc){_0x56295b['push'](_0x56295b['shift']());}}}(a96_0x9c5c,0xab118));function a96_0x5d79(_0x532a98,_0x1c4918){_0x532a98=_0x532a98-0x1dd;const _0x9c5c88=a96_0x9c5c();let _0x5d79e7=_0x9c5c88[_0x532a98];return _0x5d79e7;}function strWidth(_0x56446a){let _0x39caa6=0x0;for(const _0x247c79 of _0x56446a){_0x39caa6+=/[\u4e00-\u9fa5]/['test'](_0x247c79)?0x2:0x1;}return _0x39caa6;}function padRight(_0x381d13,_0x5dfb08){const _0x41dc11=a96_0x5d79,_0xc966f5=strWidth(_0x381d13);return _0x381d13+'\x20'[_0x41dc11(0x1f2)](Math[_0x41dc11(0x1f1)](0x0,_0x5dfb08-_0xc966f5));}function a96_0x9c5c(){const _0x561224=['1020318XpREJX','max','repeat','1362VLLAmQ','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','Local','445221IJCtmn','join','(unchanged)','\x20\x20Affected\x20menus:\x20','1484gtjtCT','label','Platform','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','29215ljFGZy','\x20\x20\x20\x20JS:\x20\x20','\x20\x20No\x20pages\x20to\x20sync.','length','online','9izMlds','local','push','919658qUaYTM','24116640BviZZC','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','2776geOUMm','\x20\x20\x20\x20•\x20','5372mqFIsy','Menu\x20Name'];a96_0x9c5c=function(){return _0x561224;};return a96_0x9c5c();}export function renderCompareTable(_0x4b8fb6,_0xa2d9cd={}){const _0x513564=a96_0x5d79;if(_0x4b8fb6['length']===0x0)return'';const _0x3e0ed4=_0xa2d9cd['showOnline']??!![],_0x985197=Math[_0x513564(0x1f1)](0x1e,..._0x4b8fb6['map'](_0x1ce689=>strWidth(_0x1ce689[_0x513564(0x1de)]))),_0x511112=0x4,_0x1cb971=[],_0x4f77b8='\x20\x20'+padRight(_0x513564(0x1ef),_0x985197),_0x238f60=padRight(_0x513564(0x1f5),_0x511112),_0x4d8e4b=_0x3e0ed4?'\x20\x20'+padRight(_0x513564(0x1df),_0x511112):'';_0x1cb971[_0x513564(0x1e8)](_0x4f77b8+'\x20\x20'+_0x238f60+(_0x3e0ed4?_0x4d8e4b:'')),_0x1cb971[_0x513564(0x1e8)]('\x20\x20'+'─'[_0x513564(0x1f2)](_0x985197)+'\x20\x20'+'─'[_0x513564(0x1f2)](_0x511112)+(_0x3e0ed4?'\x20\x20'+'─'[_0x513564(0x1f2)](_0x511112):''));for(const _0x1abd66 of _0x4b8fb6){const _0x403caf=padRight(_0x1abd66[_0x513564(0x1de)],_0x985197),_0x1ddbbd=_0x1abd66[_0x513564(0x1e7)]?'✓':'✗',_0x4cf5b1=padRight(_0x1ddbbd,_0x511112);let _0xe8da4e='\x20\x20'+_0x403caf+'\x20\x20'+_0x4cf5b1;if(_0x3e0ed4){const _0x59de9a=_0x1abd66[_0x513564(0x1e5)]?'✓':'✗';_0xe8da4e+='\x20\x20'+padRight(_0x59de9a,_0x511112);}_0x1cb971[_0x513564(0x1e8)](_0xe8da4e);}return _0x1cb971[_0x513564(0x1f7)]('\x0a');}export function renderSyncSummary(_0x2297ea,_0x1b9a5a){const _0x3c31a2=a96_0x5d79;if(_0x2297ea[_0x3c31a2(0x1e4)]===0x0)return _0x1b9a5a?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x3c31a2(0x1e3);const _0x6fc46d=['\x20\x20'+_0x2297ea[_0x3c31a2(0x1e4)]+_0x3c31a2(0x1f4)];for(const _0x447bc6 of _0x2297ea){_0x6fc46d[_0x3c31a2(0x1e8)](_0x3c31a2(0x1ed)+_0x447bc6['label']+'\x20('+_0x447bc6['path']+')');}return _0x6fc46d['join']('\x0a');}export function renderUpdateSummary(_0x20addc,_0x595889){const _0x33a295=a96_0x5d79;if(_0x20addc[_0x33a295(0x1e4)]===0x0)return _0x33a295(0x1eb);const _0x245fb4=['\x20\x20'+_0x20addc[_0x33a295(0x1e4)]+_0x33a295(0x1e0),_0x33a295(0x1e2)+(_0x595889[0x0]??_0x33a295(0x1f8)),'\x20\x20\x20\x20CSS:\x20'+(_0x595889[0x1]??_0x33a295(0x1f8)),'',_0x33a295(0x1f9)+_0x20addc[_0x33a295(0x1f7)](',\x20')];return _0x245fb4[_0x33a295(0x1f7)]('\x0a');}
1
+ (function(_0x53be07,_0x1981f1){const _0x579316=a96_0xd9e9,_0x52d02e=_0x53be07();while(!![]){try{const _0x443770=parseInt(_0x579316(0x163))/0x1*(parseInt(_0x579316(0x159))/0x2)+parseInt(_0x579316(0x158))/0x3+-parseInt(_0x579316(0x156))/0x4+parseInt(_0x579316(0x166))/0x5*(-parseInt(_0x579316(0x150))/0x6)+-parseInt(_0x579316(0x153))/0x7*(parseInt(_0x579316(0x169))/0x8)+-parseInt(_0x579316(0x168))/0x9+-parseInt(_0x579316(0x167))/0xa*(-parseInt(_0x579316(0x162))/0xb);if(_0x443770===_0x1981f1)break;else _0x52d02e['push'](_0x52d02e['shift']());}catch(_0x2185b7){_0x52d02e['push'](_0x52d02e['shift']());}}}(a96_0x350e,0xcd875));function a96_0x350e(){const _0x307b5f=['\x20\x20No\x20pages\x20to\x20sync.','path','8922669ndZhpt','push','label','3652840lWrRsN','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','2528346SbDNUO','6ghXxGc','length','max','showOnline','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','test','local','repeat','Platform','507617yYYlHW','472134nJJsDJ','join','\x20\x20\x20\x20CSS:\x20','405415MKsXTs','760XTEZAN','15142995WampYj','8DadYad','(unchanged)','78WZzQOl'];a96_0x350e=function(){return _0x307b5f;};return a96_0x350e();}function strWidth(_0xe20b5b){const _0xff7722=a96_0xd9e9;let _0x4a7d84=0x0;for(const _0x2a93db of _0xe20b5b){_0x4a7d84+=/[\u4e00-\u9fa5]/[_0xff7722(0x15e)](_0x2a93db)?0x2:0x1;}return _0x4a7d84;}function a96_0xd9e9(_0x52266e,_0x2cb546){_0x52266e=_0x52266e-0x150;const _0x350e84=a96_0x350e();let _0xd9e914=_0x350e84[_0x52266e];return _0xd9e914;}function padRight(_0x8a74dd,_0x367aa7){const _0x498bdd=a96_0xd9e9,_0x5b94da=strWidth(_0x8a74dd);return _0x8a74dd+'\x20'[_0x498bdd(0x160)](Math[_0x498bdd(0x15b)](0x0,_0x367aa7-_0x5b94da));}export function renderCompareTable(_0x58bcc3,_0x5b3408={}){const _0x51ed5f=a96_0xd9e9;if(_0x58bcc3[_0x51ed5f(0x15a)]===0x0)return'';const _0x4d9cdd=_0x5b3408[_0x51ed5f(0x15c)]??!![],_0x20c3d9=Math['max'](0x1e,..._0x58bcc3['map'](_0x47c835=>strWidth(_0x47c835[_0x51ed5f(0x155)]))),_0x3081e9=0x4,_0x1861a8=[],_0x5dd62c='\x20\x20'+padRight('Menu\x20Name',_0x20c3d9),_0xb161b0=padRight('Local',_0x3081e9),_0x2534c9=_0x4d9cdd?'\x20\x20'+padRight(_0x51ed5f(0x161),_0x3081e9):'';_0x1861a8[_0x51ed5f(0x154)](_0x5dd62c+'\x20\x20'+_0xb161b0+(_0x4d9cdd?_0x2534c9:'')),_0x1861a8[_0x51ed5f(0x154)]('\x20\x20'+'─'[_0x51ed5f(0x160)](_0x20c3d9)+'\x20\x20'+'─'[_0x51ed5f(0x160)](_0x3081e9)+(_0x4d9cdd?'\x20\x20'+'─'[_0x51ed5f(0x160)](_0x3081e9):''));for(const _0x15a022 of _0x58bcc3){const _0xa3b6af=padRight(_0x15a022[_0x51ed5f(0x155)],_0x20c3d9),_0x53e00f=_0x15a022[_0x51ed5f(0x15f)]?'✓':'✗',_0x5e5679=padRight(_0x53e00f,_0x3081e9);let _0x1e6702='\x20\x20'+_0xa3b6af+'\x20\x20'+_0x5e5679;if(_0x4d9cdd){const _0x2a08d8=_0x15a022['online']?'✓':'✗';_0x1e6702+='\x20\x20'+padRight(_0x2a08d8,_0x3081e9);}_0x1861a8[_0x51ed5f(0x154)](_0x1e6702);}return _0x1861a8[_0x51ed5f(0x164)]('\x0a');}export function renderSyncSummary(_0x444a81,_0x17816e){const _0x4bf94a=a96_0xd9e9;if(_0x444a81[_0x4bf94a(0x15a)]===0x0)return _0x17816e?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x4bf94a(0x151);const _0x3d9223=['\x20\x20'+_0x444a81[_0x4bf94a(0x15a)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x14acf1 of _0x444a81){_0x3d9223[_0x4bf94a(0x154)]('\x20\x20\x20\x20•\x20'+_0x14acf1[_0x4bf94a(0x155)]+'\x20('+_0x14acf1[_0x4bf94a(0x152)]+')');}return _0x3d9223[_0x4bf94a(0x164)]('\x0a');}export function renderUpdateSummary(_0x4566ac,_0x1327ae){const _0x5816e4=a96_0xd9e9;if(_0x4566ac[_0x5816e4(0x15a)]===0x0)return _0x5816e4(0x157);const _0x43ae5d=['\x20\x20'+_0x4566ac[_0x5816e4(0x15a)]+_0x5816e4(0x15d),'\x20\x20\x20\x20JS:\x20\x20'+(_0x1327ae[0x0]??_0x5816e4(0x16a)),_0x5816e4(0x165)+(_0x1327ae[0x1]??'(unchanged)'),'','\x20\x20Affected\x20menus:\x20'+_0x4566ac[_0x5816e4(0x164)](',\x20')];return _0x43ae5d[_0x5816e4(0x164)]('\x0a');}
@@ -1 +1 @@
1
- (function(_0x4d1f92,_0x4eada8){var _0x100a7f=a97_0x41ff,_0x40a454=_0x4d1f92();while(!![]){try{var _0x1e90d5=-parseInt(_0x100a7f(0x1d9))/0x1+parseInt(_0x100a7f(0x1da))/0x2*(-parseInt(_0x100a7f(0x1d6))/0x3)+parseInt(_0x100a7f(0x1dd))/0x4+parseInt(_0x100a7f(0x1dc))/0x5+-parseInt(_0x100a7f(0x1d8))/0x6+parseInt(_0x100a7f(0x1d4))/0x7*(parseInt(_0x100a7f(0x1db))/0x8)+parseInt(_0x100a7f(0x1d7))/0x9*(-parseInt(_0x100a7f(0x1d5))/0xa);if(_0x1e90d5===_0x4eada8)break;else _0x40a454['push'](_0x40a454['shift']());}catch(_0x5be286){_0x40a454['push'](_0x40a454['shift']());}}}(a97_0x3dfb,0x73677));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';function a97_0x3dfb(){var _0x27300c=['10BLHNUR','897LzjJjP','6534036COHVxc','566796DJyzxO','343471ChEdtX','2162uUVRda','48kgSETd','4522755nxHlLZ','1974888bGGdge','655179jFPThh'];a97_0x3dfb=function(){return _0x27300c;};return a97_0x3dfb();}export*from'../../../commands/menu/shared/local-pages.js';function a97_0x41ff(_0x45a53a,_0x26bc4c){_0x45a53a=_0x45a53a-0x1d4;var _0x3dfb5b=a97_0x3dfb();var _0x41ffe5=_0x3dfb5b[_0x45a53a];return _0x41ffe5;}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
1
+ (function(_0x576a0f,_0x20046c){var _0x4ab716=a97_0x3164,_0x4b975a=_0x576a0f();while(!![]){try{var _0x4af06f=-parseInt(_0x4ab716(0xbf))/0x1+-parseInt(_0x4ab716(0xbe))/0x2+parseInt(_0x4ab716(0xc4))/0x3*(-parseInt(_0x4ab716(0xbc))/0x4)+-parseInt(_0x4ab716(0xbb))/0x5*(parseInt(_0x4ab716(0xc5))/0x6)+parseInt(_0x4ab716(0xbd))/0x7*(-parseInt(_0x4ab716(0xba))/0x8)+-parseInt(_0x4ab716(0xc3))/0x9*(parseInt(_0x4ab716(0xc0))/0xa)+-parseInt(_0x4ab716(0xc2))/0xb*(-parseInt(_0x4ab716(0xc1))/0xc);if(_0x4af06f===_0x20046c)break;else _0x4b975a['push'](_0x4b975a['shift']());}catch(_0x510dca){_0x4b975a['push'](_0x4b975a['shift']());}}}(a97_0x123f,0x2c16b));export*from'../../../commands/menu/shared/types.js';function a97_0x123f(){var _0x2c3eef=['657164YkemnU','32993gEJSfn','70aiqnpN','13665972sdWJQR','11swFOSq','188883kQHXcV','9012VrtPLf','5286lTdQFU','112704bnGARa','1880tPllMw','64WjUVqk','35CZaUBc'];a97_0x123f=function(){return _0x2c3eef;};return a97_0x123f();}export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';function a97_0x3164(_0x23d4f7,_0x19948a){_0x23d4f7=_0x23d4f7-0xba;var _0x123f78=a97_0x123f();var _0x316475=_0x123f78[_0x23d4f7];return _0x316475;}export*from'../../../commands/menu/shared/update-core.js';
@@ -1 +1 @@
1
- (function(_0x47c443,_0x20de4d){const _0xb8b7af=a98_0x1068,_0x3cb601=_0x47c443();while(!![]){try{const _0x20168c=parseInt(_0xb8b7af(0x127))/0x1+-parseInt(_0xb8b7af(0x136))/0x2*(-parseInt(_0xb8b7af(0x13d))/0x3)+-parseInt(_0xb8b7af(0x14a))/0x4*(parseInt(_0xb8b7af(0x14c))/0x5)+parseInt(_0xb8b7af(0x14d))/0x6+parseInt(_0xb8b7af(0x150))/0x7+-parseInt(_0xb8b7af(0x13c))/0x8*(-parseInt(_0xb8b7af(0x152))/0x9)+-parseInt(_0xb8b7af(0x133))/0xa*(parseInt(_0xb8b7af(0x138))/0xb);if(_0x20168c===_0x20de4d)break;else _0x3cb601['push'](_0x3cb601['shift']());}catch(_0x4b44ef){_0x3cb601['push'](_0x3cb601['shift']());}}}(a98_0x3ade,0xb104b));import a98_0x1e8f00 from'chalk';function a98_0x1068(_0x2039fa,_0x2f9c21){_0x2039fa=_0x2039fa-0x125;const _0x3ade48=a98_0x3ade();let _0x10684b=_0x3ade48[_0x2039fa];return _0x10684b;}import{checkbox,input,confirm}from'@inquirer/prompts';import a98_0x544316 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x137c90){const _0x5f2e1a=a98_0x1068;return _0x137c90[_0x5f2e1a(0x131)](_0x5b9f1c=>{const _0x5ba39b=_0x5f2e1a;if(_0x5b9f1c?.[_0x5ba39b(0x13b)]==='ExitPromptError')throw CliErrors[_0x5ba39b(0x128)](_0x5ba39b(0x137));throw _0x5b9f1c;});}export function startSpinner(_0x4bbb35){const _0x2a4eb6=a98_0x1068;return a98_0x544316({'text':_0x4bbb35,'color':_0x2a4eb6(0x143)})[_0x2a4eb6(0x134)]();}function a98_0x3ade(){const _0x6d538f=['trim','\x20\x20Checking\x20JS\x20URL\x20reachability...','3012AHAdqV','length','5095Xwxbno','4987602ZXKPjp','No\x20menus\x20selected.','gray','8441741wSUdgm','[new]','209718yOfTmf','fail','red','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','CSS\x20URL\x20check\x20failed','380YjhUQw','cancelled','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','stdin','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','test','filter','map','\x20\x20JS\x20URL:','catch','green','40EywoWO','start','error','138RpNrWn','Cancelled.','1833249DIrLcg','JS\x20URL\x20check\x20failed','succeed','name','16PAhTZX','3252Lukivx','JS\x20URL\x20checked','isTTY','path','has','\x20\x20CSS\x20URL:','cyan','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','label','includes','CSS\x20URL\x20checked'];a98_0x3ade=function(){return _0x6d538f;};return a98_0x3ade();}export function stopSpinner(_0x1b2d58,_0x1a77a9,_0x2786f7){const _0x5ed58a=a98_0x1068;_0x2786f7?_0x1b2d58[_0x5ed58a(0x13a)](_0x1a77a9):_0x1b2d58[_0x5ed58a(0x153)](_0x1a77a9);}export async function askConfirm(_0x3f1547){return onCancel(confirm({'message':_0x3f1547,'theme':{'prefix':''}}));}export async function askJsUrl(_0x7f5aff){const _0x5a9db5=a98_0x1068;while(!![]){const _0x1274e3=await onCancel(input({'message':_0x5a9db5(0x130),'default':_0x7f5aff,'theme':{'prefix':''}}));if(_0x1274e3['trim']()==='')throw CliErrors['cancelled'](_0x5a9db5(0x137));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x5a9db5(0x12d)](_0x1274e3['trim']())){console[_0x5a9db5(0x135)](a98_0x1e8f00[_0x5a9db5(0x154)](_0x5a9db5(0x125)));continue;}const _0x568138=startSpinner(_0x5a9db5(0x149));try{const _0x5cea16=await isUrlReachable(_0x1274e3['trim']());stopSpinner(_0x568138,_0x5a9db5(0x13e),_0x5cea16);if(!_0x5cea16){console[_0x5a9db5(0x135)](a98_0x1e8f00[_0x5a9db5(0x154)](_0x5a9db5(0x12b)));continue;}return _0x1274e3['trim']();}catch(_0x17019e){stopSpinner(_0x568138,_0x5a9db5(0x139),![]);throw _0x17019e;}}}export async function askCssUrl(_0xbf8491){const _0x1569de=a98_0x1068;while(!![]){const _0x22ca90=await onCancel(input({'message':_0x1569de(0x142),'default':_0xbf8491,'theme':{'prefix':''}}));if(_0x22ca90[_0x1569de(0x148)]()==='')throw CliErrors[_0x1569de(0x128)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0x1569de(0x12d)](_0x22ca90[_0x1569de(0x148)]())){console[_0x1569de(0x135)](a98_0x1e8f00['red'](_0x1569de(0x144)));continue;}const _0x32feca=startSpinner('\x20\x20Checking\x20CSS\x20URL\x20reachability...');try{const _0x11825f=await isUrlReachable(_0x22ca90[_0x1569de(0x148)]());stopSpinner(_0x32feca,_0x1569de(0x147),_0x11825f);if(!_0x11825f){console[_0x1569de(0x135)](a98_0x1e8f00[_0x1569de(0x154)](_0x1569de(0x12c)));continue;}return _0x22ca90[_0x1569de(0x148)]();}catch(_0x285265){stopSpinner(_0x32feca,_0x1569de(0x126),![]);throw _0x285265;}}}export async function selectPages(_0x56ca93,_0x47ba33,_0x31d597){const _0x3df9ed=a98_0x1068,_0x5e0c6c=_0x56ca93[_0x3df9ed(0x12f)](_0x4c68cf=>({'name':_0x4c68cf[_0x3df9ed(0x145)]+'\x20\x20'+(_0x47ba33[_0x3df9ed(0x141)](_0x4c68cf[_0x3df9ed(0x140)])?a98_0x1e8f00[_0x3df9ed(0x14f)]('[already\x20on\x20platform]'):a98_0x1e8f00[_0x3df9ed(0x132)](_0x3df9ed(0x151))),'value':_0x4c68cf[_0x3df9ed(0x145)],'checked':_0x31d597?_0x31d597['includes'](_0x4c68cf[_0x3df9ed(0x145)]):!_0x47ba33[_0x3df9ed(0x141)](_0x4c68cf[_0x3df9ed(0x140)])}));if(_0x5e0c6c[_0x3df9ed(0x14b)]===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x916572=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x5e0c6c,'loop':![],'theme':{'prefix':''}}));if(_0x916572['length']===0x0)throw new Error(_0x3df9ed(0x14e));return _0x56ca93[_0x3df9ed(0x12e)](_0x5e6708=>_0x916572[_0x3df9ed(0x146)](_0x5e6708[_0x3df9ed(0x145)]));}export function isInteractive(){const _0x55ff61=a98_0x1068;return process[_0x55ff61(0x12a)][_0x55ff61(0x13f)]===!![];}export function requireInteractive(){const _0x5b7682=a98_0x1068;if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+_0x5b7682(0x129));}
1
+ (function(_0x5a8a66,_0x3e0a95){const _0x178fc7=a98_0x2f1a,_0x485b6b=_0x5a8a66();while(!![]){try{const _0x39de7b=-parseInt(_0x178fc7(0x169))/0x1*(parseInt(_0x178fc7(0x15f))/0x2)+-parseInt(_0x178fc7(0x172))/0x3+parseInt(_0x178fc7(0x155))/0x4+-parseInt(_0x178fc7(0x16e))/0x5+parseInt(_0x178fc7(0x14e))/0x6+-parseInt(_0x178fc7(0x159))/0x7+parseInt(_0x178fc7(0x152))/0x8*(parseInt(_0x178fc7(0x16c))/0x9);if(_0x39de7b===_0x3e0a95)break;else _0x485b6b['push'](_0x485b6b['shift']());}catch(_0x26e678){_0x485b6b['push'](_0x485b6b['shift']());}}}(a98_0x4550,0xedcbc));import a98_0xdc904b from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a98_0x5cf4b5 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a98_0x2f1a(_0x24e02d,_0x2d6625){_0x24e02d=_0x24e02d-0x148;const _0x455078=a98_0x4550();let _0x2f1af8=_0x455078[_0x24e02d];return _0x2f1af8;}function a98_0x4550(){const _0x2d027a=['fail','start','105513mtTqyy','JS\x20URL\x20check\x20failed','trim','filter','succeed','red','[already\x20on\x20platform]','CSS\x20URL\x20checked','green','262434ogTWEm','cyan','catch','\x20\x20Checking\x20CSS\x20URL\x20reachability...','936MqPtnf','includes','ExitPromptError','436736vgLIwn','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','\x20\x20Checking\x20JS\x20URL\x20reachability...','No\x20local\x20pages\x20found.','5987877WlGNQq','error','JS\x20URL\x20checked','Cancelled.','name','path','297146KtLpyH','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','gray','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','cancelled','No\x20menus\x20selected.','length','CSS\x20URL\x20check\x20failed','test','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','5GHcwhI','map','\x20\x20JS\x20URL:','285165mPFpay','label','6263045zKdkYL','has'];a98_0x4550=function(){return _0x2d027a;};return a98_0x4550();}import{CliErrors}from'../../../errors.js';function onCancel(_0x483672){const _0x40a02f=a98_0x2f1a;return _0x483672[_0x40a02f(0x150)](_0x413167=>{const _0x49ae04=_0x40a02f;if(_0x413167?.[_0x49ae04(0x15d)]===_0x49ae04(0x154))throw CliErrors[_0x49ae04(0x163)](_0x49ae04(0x15c));throw _0x413167;});}export function startSpinner(_0x71f3a1){const _0x2a55d3=a98_0x2f1a;return a98_0x5cf4b5({'text':_0x71f3a1,'color':_0x2a55d3(0x14f)})[_0x2a55d3(0x171)]();}export function stopSpinner(_0x311c2d,_0x37398f,_0x1fbe10){const _0x1912a2=a98_0x2f1a;_0x1fbe10?_0x311c2d[_0x1912a2(0x149)](_0x37398f):_0x311c2d[_0x1912a2(0x170)](_0x37398f);}export async function askConfirm(_0x5a29b9){return onCancel(confirm({'message':_0x5a29b9,'theme':{'prefix':''}}));}export async function askJsUrl(_0x5e3640){const _0x4eb753=a98_0x2f1a;while(!![]){const _0x35d2e6=await onCancel(input({'message':_0x4eb753(0x16b),'default':_0x5e3640,'theme':{'prefix':''}}));if(_0x35d2e6[_0x4eb753(0x174)]()==='')throw CliErrors[_0x4eb753(0x163)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/[_0x4eb753(0x167)](_0x35d2e6[_0x4eb753(0x174)]())){console['error'](a98_0xdc904b[_0x4eb753(0x14a)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x4760e9=startSpinner(_0x4eb753(0x157));try{const _0x2b434b=await isUrlReachable(_0x35d2e6['trim']());stopSpinner(_0x4760e9,_0x4eb753(0x15b),_0x2b434b);if(!_0x2b434b){console[_0x4eb753(0x15a)](a98_0xdc904b[_0x4eb753(0x14a)](_0x4eb753(0x162)));continue;}return _0x35d2e6[_0x4eb753(0x174)]();}catch(_0x4d0099){stopSpinner(_0x4760e9,_0x4eb753(0x173),![]);throw _0x4d0099;}}}export async function askCssUrl(_0x120d99){const _0x2ba2ad=a98_0x2f1a;while(!![]){const _0x3c06f2=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0x120d99,'theme':{'prefix':''}}));if(_0x3c06f2[_0x2ba2ad(0x174)]()==='')throw CliErrors['cancelled'](_0x2ba2ad(0x15c));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x2ba2ad(0x167)](_0x3c06f2[_0x2ba2ad(0x174)]())){console['error'](a98_0xdc904b['red'](_0x2ba2ad(0x156)));continue;}const _0x2bf1ab=startSpinner(_0x2ba2ad(0x151));try{const _0x1f4e2f=await isUrlReachable(_0x3c06f2[_0x2ba2ad(0x174)]());stopSpinner(_0x2bf1ab,_0x2ba2ad(0x14c),_0x1f4e2f);if(!_0x1f4e2f){console[_0x2ba2ad(0x15a)](a98_0xdc904b[_0x2ba2ad(0x14a)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x3c06f2['trim']();}catch(_0x5bef8d){stopSpinner(_0x2bf1ab,_0x2ba2ad(0x166),![]);throw _0x5bef8d;}}}export async function selectPages(_0x46c597,_0x430a93,_0x9cbcba){const _0x11a73b=a98_0x2f1a,_0x267d31=_0x46c597[_0x11a73b(0x16a)](_0x1d7dd6=>({'name':_0x1d7dd6[_0x11a73b(0x16d)]+'\x20\x20'+(_0x430a93[_0x11a73b(0x16f)](_0x1d7dd6[_0x11a73b(0x15e)])?a98_0xdc904b[_0x11a73b(0x161)](_0x11a73b(0x14b)):a98_0xdc904b[_0x11a73b(0x14d)]('[new]')),'value':_0x1d7dd6[_0x11a73b(0x16d)],'checked':_0x9cbcba?_0x9cbcba[_0x11a73b(0x153)](_0x1d7dd6[_0x11a73b(0x16d)]):!_0x430a93[_0x11a73b(0x16f)](_0x1d7dd6[_0x11a73b(0x15e)])}));if(_0x267d31[_0x11a73b(0x165)]===0x0)throw new Error(_0x11a73b(0x158));const _0x496ab2=await onCancel(checkbox({'message':_0x11a73b(0x160),'choices':_0x267d31,'loop':![],'theme':{'prefix':''}}));if(_0x496ab2['length']===0x0)throw new Error(_0x11a73b(0x164));return _0x46c597[_0x11a73b(0x148)](_0x4a9a1f=>_0x496ab2[_0x11a73b(0x153)](_0x4a9a1f[_0x11a73b(0x16d)]));}export function isInteractive(){return process['stdin']['isTTY']===!![];}export function requireInteractive(){const _0x4a4f1e=a98_0x2f1a;if(!isInteractive())throw new Error(_0x4a4f1e(0x168)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
@@ -1 +1 @@
1
- function a99_0x1876(){const _0x56d3c3=['.tsx','push','1436265QJyndF','src/pages','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','slice','endsWith','isDirectory','185jXWcJw','utf-8','trim','split','forEach','path','59874uOPZqI','106510ukswvy','7073840lPptBS','replace','113920JtiPzI','join','276ZhkkmD','379761bzJrVr','9108FMBdMg','7hxgkOR','cwd','match'];a99_0x1876=function(){return _0x56d3c3;};return a99_0x1876();}const a99_0x1135b4=a99_0x288d;(function(_0x2a982c,_0x4f1120){const _0xb94db3=a99_0x288d,_0x44e060=_0x2a982c();while(!![]){try{const _0x2037af=-parseInt(_0xb94db3(0x15e))/0x1+-parseInt(_0xb94db3(0x158))/0x2+parseInt(_0xb94db3(0x15f))/0x3*(-parseInt(_0xb94db3(0x15d))/0x4)+-parseInt(_0xb94db3(0x16b))/0x5*(-parseInt(_0xb94db3(0x157))/0x6)+parseInt(_0xb94db3(0x160))/0x7*(-parseInt(_0xb94db3(0x15b))/0x8)+-parseInt(_0xb94db3(0x165))/0x9+parseInt(_0xb94db3(0x159))/0xa;if(_0x2037af===_0x4f1120)break;else _0x44e060['push'](_0x44e060['shift']());}catch(_0x5784f0){_0x44e060['push'](_0x44e060['shift']());}}}(a99_0x1876,0x3f8ba));import{readdirSync,statSync,readFileSync}from'fs';function a99_0x288d(_0x5374c4,_0x24f92b){_0x5374c4=_0x5374c4-0x153;const _0x18762f=a99_0x1876();let _0x288df3=_0x18762f[_0x5374c4];return _0x288df3;}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a99_0x1135b4(0x161)](),a99_0x1135b4(0x166));export function extractTitleFromComment(_0x592447){const _0x4db581=a99_0x1135b4;try{const _0x2df65a=readFileSync(_0x592447,_0x4db581(0x16c)),_0x24ab3f=_0x2df65a[_0x4db581(0x162)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x24ab3f&&_0x24ab3f[0x1]){const _0x17ca2c=_0x24ab3f[0x1],_0x5b1cce=_0x17ca2c[_0x4db581(0x162)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5b1cce&&_0x5b1cce[0x1])return _0x5b1cce[0x1][_0x4db581(0x153)]();}let _0x2bd9dd=null;const _0x3dfb3f=_0x2df65a[_0x4db581(0x162)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x3dfb3f&&_0x3dfb3f[0x1]&&(_0x2bd9dd=_0x3dfb3f[0x1]);if(!_0x2bd9dd){const _0x6493c9=_0x2df65a[_0x4db581(0x162)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x6493c9&&_0x6493c9[0x1]&&(_0x2bd9dd=_0x6493c9[0x1]);}if(_0x2bd9dd){const _0x5d13d9=new RegExp('\x5cb'+_0x2bd9dd+_0x4db581(0x167)),_0x516719=_0x2df65a[_0x4db581(0x162)](_0x5d13d9);if(_0x516719&&_0x516719[0x1])return _0x516719[0x1];return _0x2bd9dd;}return null;}catch(_0x3b4df6){return null;}}export function getLocalPages(_0x5f3c34=pagesDir,_0x333be2=pagesDir){const _0x1db866=a99_0x1135b4;let _0x4253af=[];const _0x47391e=readdirSync(_0x5f3c34);return _0x47391e[_0x1db866(0x155)](_0xac4b08=>{const _0x17c984=_0x1db866,_0x22d7a5=join(_0x5f3c34,_0xac4b08),_0x1285cb=statSync(_0x22d7a5);if(_0x1285cb&&_0x1285cb[_0x17c984(0x16a)]())_0x4253af=_0x4253af['concat'](getLocalPages(_0x22d7a5,_0x333be2));else{if(_0xac4b08['endsWith'](_0x17c984(0x163))){let _0x1ee0ef=relative(_0x333be2,_0x22d7a5);_0x1ee0ef[_0x17c984(0x169)]('index.tsx')?_0x1ee0ef=_0x1ee0ef[_0x17c984(0x15a)](/index\.tsx$/,''):_0x1ee0ef=_0x1ee0ef['replace'](/\.tsx$/,'');_0x1ee0ef[_0x17c984(0x169)](sep)&&(_0x1ee0ef=_0x1ee0ef[_0x17c984(0x168)](0x0,-0x1));const _0x49e670=_0x1ee0ef[_0x17c984(0x154)](sep)[_0x17c984(0x15c)]('/'),_0x1baa8e=extractTitleFromComment(_0x22d7a5),_0x1b68a6=_0x1baa8e||_0x49e670;_0x4253af[_0x17c984(0x164)]({'path':_0x49e670['replaceAll']('$',':'),'label':_0x1b68a6});}}}),_0x4253af['filter'](_0x488a0d=>_0x488a0d[_0x1db866(0x156)]!=='');}
1
+ const a99_0x155d95=a99_0x5b99;(function(_0x271580,_0x16b43){const _0x390c26=a99_0x5b99,_0x26ccd1=_0x271580();while(!![]){try{const _0x58d063=-parseInt(_0x390c26(0x15f))/0x1+-parseInt(_0x390c26(0x15b))/0x2*(-parseInt(_0x390c26(0x14a))/0x3)+-parseInt(_0x390c26(0x14e))/0x4+parseInt(_0x390c26(0x159))/0x5*(-parseInt(_0x390c26(0x15e))/0x6)+parseInt(_0x390c26(0x157))/0x7+parseInt(_0x390c26(0x155))/0x8+parseInt(_0x390c26(0x160))/0x9*(parseInt(_0x390c26(0x154))/0xa);if(_0x58d063===_0x16b43)break;else _0x26ccd1['push'](_0x26ccd1['shift']());}catch(_0x215241){_0x26ccd1['push'](_0x26ccd1['shift']());}}}(a99_0x3138,0x7fcd7));import{readdirSync,statSync,readFileSync}from'fs';function a99_0x5b99(_0x55d583,_0xe896df){_0x55d583=_0x55d583-0x14a;const _0x313836=a99_0x3138();let _0x5b991f=_0x313836[_0x55d583];return _0x5b991f;}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a99_0x155d95(0x15d));export function extractTitleFromComment(_0xca16e6){const _0x212574=a99_0x155d95;try{const _0xb50226=readFileSync(_0xca16e6,'utf-8'),_0x126997=_0xb50226[_0x212574(0x14f)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x126997&&_0x126997[0x1]){const _0x1fff4e=_0x126997[0x1],_0x364379=_0x1fff4e[_0x212574(0x14f)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x364379&&_0x364379[0x1])return _0x364379[0x1][_0x212574(0x15c)]();}let _0x30efe6=null;const _0x5c8cea=_0xb50226[_0x212574(0x14f)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5c8cea&&_0x5c8cea[0x1]&&(_0x30efe6=_0x5c8cea[0x1]);if(!_0x30efe6){const _0x59080d=_0xb50226[_0x212574(0x14f)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x59080d&&_0x59080d[0x1]&&(_0x30efe6=_0x59080d[0x1]);}if(_0x30efe6){const _0x294054=new RegExp('\x5cb'+_0x30efe6+_0x212574(0x156)),_0x403b34=_0xb50226[_0x212574(0x14f)](_0x294054);if(_0x403b34&&_0x403b34[0x1])return _0x403b34[0x1];return _0x30efe6;}return null;}catch(_0x47ac21){return null;}}export function getLocalPages(_0x3de4a2=pagesDir,_0x5e03cc=pagesDir){const _0x163096=a99_0x155d95;let _0x3b8130=[];const _0x436f6d=readdirSync(_0x3de4a2);return _0x436f6d[_0x163096(0x158)](_0x270f2e=>{const _0x492e88=_0x163096,_0x44af6c=join(_0x3de4a2,_0x270f2e),_0x3cf80d=statSync(_0x44af6c);if(_0x3cf80d&&_0x3cf80d[_0x492e88(0x14b)]())_0x3b8130=_0x3b8130['concat'](getLocalPages(_0x44af6c,_0x5e03cc));else{if(_0x270f2e[_0x492e88(0x150)](_0x492e88(0x152))){let _0x621e37=relative(_0x5e03cc,_0x44af6c);_0x621e37[_0x492e88(0x150)](_0x492e88(0x161))?_0x621e37=_0x621e37[_0x492e88(0x151)](/index\.tsx$/,''):_0x621e37=_0x621e37[_0x492e88(0x151)](/\.tsx$/,'');_0x621e37[_0x492e88(0x150)](sep)&&(_0x621e37=_0x621e37[_0x492e88(0x15a)](0x0,-0x1));const _0x2409b5=_0x621e37[_0x492e88(0x162)](sep)['join']('/'),_0x20ce7e=extractTitleFromComment(_0x44af6c),_0x424403=_0x20ce7e||_0x2409b5;_0x3b8130[_0x492e88(0x153)]({'path':_0x2409b5[_0x492e88(0x14d)]('$',':'),'label':_0x424403});}}}),_0x3b8130[_0x163096(0x14c)](_0x3e39c8=>_0x3e39c8['path']!=='');}function a99_0x3138(){const _0x462ea6=['replaceAll','3069912EcqbLp','match','endsWith','replace','.tsx','push','10bItSvj','1423136YTLPRI','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','1141609tQtptz','forEach','6455TVdYmW','slice','76XeEzUw','trim','src/pages','1644rZnHKY','616680ZyogKn','12558114PCFLbt','index.tsx','split','41451qKMkrD','isDirectory','filter'];a99_0x3138=function(){return _0x462ea6;};return a99_0x3138();}
@@ -1 +1 @@
1
- (function(_0x4f0919,_0x1ce91a){const _0x761fb6=a100_0x8330,_0x56343e=_0x4f0919();while(!![]){try{const _0x3c13e4=-parseInt(_0x761fb6(0x177))/0x1+parseInt(_0x761fb6(0x185))/0x2+-parseInt(_0x761fb6(0x174))/0x3+parseInt(_0x761fb6(0x18d))/0x4*(parseInt(_0x761fb6(0x178))/0x5)+parseInt(_0x761fb6(0x180))/0x6+-parseInt(_0x761fb6(0x184))/0x7*(parseInt(_0x761fb6(0x183))/0x8)+parseInt(_0x761fb6(0x188))/0x9*(parseInt(_0x761fb6(0x18c))/0xa);if(_0x3c13e4===_0x1ce91a)break;else _0x56343e['push'](_0x56343e['shift']());}catch(_0x260662){_0x56343e['push'](_0x56343e['shift']());}}}(a100_0x1e9a,0x451f2));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a100_0x1e9a(){const _0x33c5ee=['91906DBQmxi','CSS\x20URL\x20is\x20unreachable','path','7389DzWgUT','allSettled','extend','No\x20local\x20pages\x20matched\x20labels:\x20','6190QttrdD','1016yPzNvU','join','trim','errors','map','length','852891Urqgto','label','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','550473POjYCb','9655EIGnOU','find','JS\x20URL\x20is\x20unreachable','push','value','has','status','resources','471678oABvEG','rejected','filter','8iJIgek','37429FkpTPP'];a100_0x1e9a=function(){return _0x33c5ee;};return a100_0x1e9a();}function a100_0x8330(_0x49e1f8,_0x63b5f3){_0x49e1f8=_0x49e1f8-0x171;const _0x1e9a1d=a100_0x1e9a();let _0x8330f8=_0x1e9a1d[_0x49e1f8];return _0x8330f8;}import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x45d45d){const _0x828e8d=a100_0x8330,_0x103106=[];return!isValidJsHttpsUrl(_0x45d45d)&&_0x103106[_0x828e8d(0x17b)](_0x828e8d(0x176)),{'ok':_0x103106[_0x828e8d(0x173)]===0x0,'errors':_0x103106};}export function validateCssUrl(_0x2cf3bb){const _0x1f19aa=a100_0x8330,_0x11202b=[];return!isValidCssHttpsUrl(_0x2cf3bb)&&_0x11202b[_0x1f19aa(0x17b)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x11202b[_0x1f19aa(0x173)]===0x0,'errors':_0x11202b};}export async function validateJsUrlReachable(_0xd7c295){const _0x14437a=a100_0x8330,_0x3ef4dd=validateJsUrl(_0xd7c295);if(!_0x3ef4dd['ok'])return _0x3ef4dd;const _0x2adb2e=await isUrlReachable(_0xd7c295);if(!_0x2adb2e)_0x3ef4dd[_0x14437a(0x171)][_0x14437a(0x17b)](_0x14437a(0x17a));return{'ok':_0x3ef4dd[_0x14437a(0x171)][_0x14437a(0x173)]===0x0,'errors':_0x3ef4dd[_0x14437a(0x171)]};}export async function validateCssUrlReachable(_0x4f3946){const _0x1e8a1b=a100_0x8330,_0x424989=validateCssUrl(_0x4f3946);if(!_0x424989['ok'])return _0x424989;const _0x1d7a1b=await isUrlReachable(_0x4f3946);if(!_0x1d7a1b)_0x424989[_0x1e8a1b(0x171)][_0x1e8a1b(0x17b)](_0x1e8a1b(0x186));return{'ok':_0x424989['errors'][_0x1e8a1b(0x173)]===0x0,'errors':_0x424989[_0x1e8a1b(0x171)]};}export function buildCompareRows(_0x3f6610,_0x5f3c9d){const _0x108502=a100_0x8330;return _0x3f6610[_0x108502(0x172)](_0x2813ba=>({'label':_0x2813ba[_0x108502(0x175)],'path':_0x2813ba[_0x108502(0x187)],'local':!![],'online':_0x5f3c9d[_0x108502(0x17d)](_0x2813ba[_0x108502(0x187)])}));}export function filterNewPages(_0x17b0d1,_0x31cee9,_0x399e74){const _0x22ccdc=a100_0x8330;if(_0x399e74&&_0x399e74[_0x22ccdc(0x173)]>0x0){const _0x1edd76=new Set(_0x399e74[_0x22ccdc(0x172)](_0x1d545c=>_0x1d545c[_0x22ccdc(0x18f)]())),_0x5229ec=_0x17b0d1[_0x22ccdc(0x182)](_0x42a065=>_0x1edd76['has'](_0x42a065[_0x22ccdc(0x175)]));if(_0x5229ec[_0x22ccdc(0x173)]===0x0)throw new Error(_0x22ccdc(0x18b)+[..._0x1edd76][_0x22ccdc(0x18e)](',\x20'));return _0x5229ec;}return _0x17b0d1[_0x22ccdc(0x182)](_0x1764c0=>!_0x31cee9['has'](_0x1764c0[_0x22ccdc(0x187)]));}export function filterPagesByLabels(_0x56b13b,_0xc03cc5){const _0x40068e=a100_0x8330,_0x236838=[],_0x25d78e=[];for(const _0xde5ed7 of _0xc03cc5){const _0x4a057f=_0xde5ed7[_0x40068e(0x18f)](),_0x2b4ff9=_0x56b13b[_0x40068e(0x179)](_0xbd9d6b=>_0xbd9d6b[_0x40068e(0x175)]===_0x4a057f);if(_0x2b4ff9)_0x236838['push'](_0x2b4ff9);else _0x25d78e[_0x40068e(0x17b)](_0xde5ed7);}return{'matched':_0x236838,'unmatched':_0x25d78e};}export async function doCreateMenus(_0x3718b7,_0x2d52f0,_0x3fa1a5,_0x71018b){const _0x4c879d=a100_0x8330,_0x51f5ec=await createMenus(_0x3718b7,_0x2d52f0,_0x3fa1a5,_0x71018b);return{'created':_0x51f5ec['length'],'failed':0x0,'labels':_0x3fa1a5['map'](_0x2e3737=>_0x2e3737[_0x4c879d(0x175)]),'menus':_0x51f5ec};}export function filterMenusWithResources(_0x1a8622){const _0x2ca32c=a100_0x8330;return _0x1a8622[_0x2ca32c(0x182)](_0x37ad8e=>_0x37ad8e[_0x2ca32c(0x17f)][_0x2ca32c(0x173)]>0x0);}export async function doUpdateCdnUrls(_0x2cae78,_0x85a13f,_0x2621c2,_0x41192a){const _0x18637e=a100_0x8330,_0x13e6d2=_0x2621c2[_0x18637e(0x182)](_0x4d812c=>_0x4d812c[_0x18637e(0x17f)]['length']>0x0),_0x1fbc30=await Promise[_0x18637e(0x189)](_0x13e6d2[_0x18637e(0x172)](_0x32308b=>updateMenuCdnUrl(_0x2cae78,_0x85a13f,{'id':_0x32308b['id'],'label':_0x32308b[_0x18637e(0x175)],'path':_0x32308b[_0x18637e(0x187)],'resources':_0x41192a,'extend':_0x32308b[_0x18637e(0x18a)]??null}))),_0x3a9e14=_0x1fbc30[_0x18637e(0x182)](_0xf09a8d=>_0xf09a8d[_0x18637e(0x17e)]==='fulfilled')[_0x18637e(0x172)](_0xfe4b09=>_0xfe4b09[_0x18637e(0x17c)]),_0x2abcc5=_0x1fbc30[_0x18637e(0x182)](_0x46f7b4=>_0x46f7b4[_0x18637e(0x17e)]===_0x18637e(0x181))[_0x18637e(0x173)];return{'updated':_0x3a9e14[_0x18637e(0x173)],'failed':_0x2abcc5,'menus':_0x3a9e14};}export async function fetchMenuData(_0x4fca7c,_0x5cf0b8){const _0x1a629f=a100_0x8330,_0x44bfc9=getLocalPages(),_0x1ce76e=await getOnlineMenuList(_0x4fca7c,_0x5cf0b8),_0x4721ca=new Set(_0x1ce76e[_0x1a629f(0x172)](_0x4ecf7e=>_0x4ecf7e['path']));return{'localPages':_0x44bfc9,'onlineMenuList':_0x1ce76e,'onlinePaths':_0x4721ca};}export async function fetchOnlineMenuList(_0x1a400c,_0x15dfaf){return getOnlineMenuList(_0x1a400c,_0x15dfaf);}
1
+ (function(_0x25e096,_0x29a492){const _0xa42606=a100_0x495a,_0x9e4a6e=_0x25e096();while(!![]){try{const _0x18bcee=parseInt(_0xa42606(0x18a))/0x1*(parseInt(_0xa42606(0x19a))/0x2)+-parseInt(_0xa42606(0x194))/0x3*(-parseInt(_0xa42606(0x199))/0x4)+parseInt(_0xa42606(0x189))/0x5+parseInt(_0xa42606(0x19e))/0x6+-parseInt(_0xa42606(0x19c))/0x7*(parseInt(_0xa42606(0x192))/0x8)+-parseInt(_0xa42606(0x190))/0x9*(parseInt(_0xa42606(0x198))/0xa)+-parseInt(_0xa42606(0x193))/0xb;if(_0x18bcee===_0x29a492)break;else _0x9e4a6e['push'](_0x9e4a6e['shift']());}catch(_0x3111f7){_0x9e4a6e['push'](_0x9e4a6e['shift']());}}}(a100_0x5e47,0xcf5e9));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a100_0x5e47(){const _0x4c14cd=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','rejected','errors','8216405SzUHEc','2550XPRPoi','push','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','trim','map','extend','629298bUXNwj','filter','30392KgMnqG','26176678lyDEIO','2401518fdysdi','No\x20local\x20pages\x20matched\x20labels:\x20','value','has','160gCUsKW','8ETGCAG','976hYPLPX','label','2541xmWlYi','path','7429074zOdloG','status','find','resources','length'];a100_0x5e47=function(){return _0x4c14cd;};return a100_0x5e47();}import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x415f32){const _0x342ab9=a100_0x495a,_0x487c34=[];return!isValidJsHttpsUrl(_0x415f32)&&_0x487c34[_0x342ab9(0x18b)](_0x342ab9(0x1a3)),{'ok':_0x487c34[_0x342ab9(0x1a2)]===0x0,'errors':_0x487c34};}export function validateCssUrl(_0x1addec){const _0x4817a7=a100_0x495a,_0x91b80c=[];return!isValidCssHttpsUrl(_0x1addec)&&_0x91b80c[_0x4817a7(0x18b)](_0x4817a7(0x18c)),{'ok':_0x91b80c['length']===0x0,'errors':_0x91b80c};}export async function validateJsUrlReachable(_0x21ea3f){const _0x42e834=a100_0x495a,_0x3d5f35=validateJsUrl(_0x21ea3f);if(!_0x3d5f35['ok'])return _0x3d5f35;const _0x20aba3=await isUrlReachable(_0x21ea3f);if(!_0x20aba3)_0x3d5f35['errors'][_0x42e834(0x18b)]('JS\x20URL\x20is\x20unreachable');return{'ok':_0x3d5f35[_0x42e834(0x188)][_0x42e834(0x1a2)]===0x0,'errors':_0x3d5f35[_0x42e834(0x188)]};}function a100_0x495a(_0x315bec,_0x3f633a){_0x315bec=_0x315bec-0x188;const _0x5e476f=a100_0x5e47();let _0x495ae1=_0x5e476f[_0x315bec];return _0x495ae1;}export async function validateCssUrlReachable(_0x13d174){const _0x4609fc=a100_0x495a,_0x34e054=validateCssUrl(_0x13d174);if(!_0x34e054['ok'])return _0x34e054;const _0x498135=await isUrlReachable(_0x13d174);if(!_0x498135)_0x34e054['errors'][_0x4609fc(0x18b)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x34e054[_0x4609fc(0x188)][_0x4609fc(0x1a2)]===0x0,'errors':_0x34e054[_0x4609fc(0x188)]};}export function buildCompareRows(_0x21d4a3,_0x383372){const _0x16e08e=a100_0x495a;return _0x21d4a3[_0x16e08e(0x18e)](_0x1bf288=>({'label':_0x1bf288[_0x16e08e(0x19b)],'path':_0x1bf288['path'],'local':!![],'online':_0x383372['has'](_0x1bf288['path'])}));}export function filterNewPages(_0x3c17ba,_0x3c3bc7,_0x39ef47){const _0x2e6178=a100_0x495a;if(_0x39ef47&&_0x39ef47['length']>0x0){const _0x549e2a=new Set(_0x39ef47[_0x2e6178(0x18e)](_0x1e98f5=>_0x1e98f5['trim']())),_0x2d12e5=_0x3c17ba[_0x2e6178(0x191)](_0x122b50=>_0x549e2a[_0x2e6178(0x197)](_0x122b50[_0x2e6178(0x19b)]));if(_0x2d12e5[_0x2e6178(0x1a2)]===0x0)throw new Error(_0x2e6178(0x195)+[..._0x549e2a]['join'](',\x20'));return _0x2d12e5;}return _0x3c17ba[_0x2e6178(0x191)](_0x381511=>!_0x3c3bc7[_0x2e6178(0x197)](_0x381511[_0x2e6178(0x19d)]));}export function filterPagesByLabels(_0xa56495,_0x57c176){const _0xf61e49=a100_0x495a,_0x3a4d99=[],_0x7ee4a3=[];for(const _0x3d50a3 of _0x57c176){const _0x17d9b7=_0x3d50a3[_0xf61e49(0x18d)](),_0x398644=_0xa56495[_0xf61e49(0x1a0)](_0x31ec9a=>_0x31ec9a['label']===_0x17d9b7);if(_0x398644)_0x3a4d99[_0xf61e49(0x18b)](_0x398644);else _0x7ee4a3['push'](_0x3d50a3);}return{'matched':_0x3a4d99,'unmatched':_0x7ee4a3};}export async function doCreateMenus(_0x4930bb,_0x15b2bd,_0x25c689,_0x519a7b){const _0x17a217=a100_0x495a,_0x120cbe=await createMenus(_0x4930bb,_0x15b2bd,_0x25c689,_0x519a7b);return{'created':_0x120cbe[_0x17a217(0x1a2)],'failed':0x0,'labels':_0x25c689[_0x17a217(0x18e)](_0xafe7d0=>_0xafe7d0[_0x17a217(0x19b)]),'menus':_0x120cbe};}export function filterMenusWithResources(_0x450f27){const _0xb959d7=a100_0x495a;return _0x450f27['filter'](_0x24a805=>_0x24a805[_0xb959d7(0x1a1)]['length']>0x0);}export async function doUpdateCdnUrls(_0x358293,_0x226f8f,_0x159812,_0x12cae2){const _0x5d069f=a100_0x495a,_0x44d414=_0x159812[_0x5d069f(0x191)](_0x41e97b=>_0x41e97b[_0x5d069f(0x1a1)][_0x5d069f(0x1a2)]>0x0),_0x3f2adb=await Promise['allSettled'](_0x44d414['map'](_0x386beb=>updateMenuCdnUrl(_0x358293,_0x226f8f,{'id':_0x386beb['id'],'label':_0x386beb[_0x5d069f(0x19b)],'path':_0x386beb[_0x5d069f(0x19d)],'resources':_0x12cae2,'extend':_0x386beb[_0x5d069f(0x18f)]??null}))),_0x5843e5=_0x3f2adb[_0x5d069f(0x191)](_0x3d5c14=>_0x3d5c14[_0x5d069f(0x19f)]==='fulfilled')['map'](_0xcbd4c=>_0xcbd4c[_0x5d069f(0x196)]),_0x1e3730=_0x3f2adb['filter'](_0x47fa50=>_0x47fa50['status']===_0x5d069f(0x1a4))['length'];return{'updated':_0x5843e5['length'],'failed':_0x1e3730,'menus':_0x5843e5};}export async function fetchMenuData(_0x45adcb,_0x297f06){const _0x52447e=a100_0x495a,_0x55c8a0=getLocalPages(),_0x2b3026=await getOnlineMenuList(_0x45adcb,_0x297f06),_0x5c0b40=new Set(_0x2b3026[_0x52447e(0x18e)](_0x139cb0=>_0x139cb0['path']));return{'localPages':_0x55c8a0,'onlineMenuList':_0x2b3026,'onlinePaths':_0x5c0b40};}export async function fetchOnlineMenuList(_0x291d91,_0x47418a){return getOnlineMenuList(_0x291d91,_0x47418a);}
@@ -1 +1 @@
1
- (function(_0x146fe9,_0x36c0e8){const _0x278a49=a101_0x455b,_0x28b59f=_0x146fe9();while(!![]){try{const _0x503c25=parseInt(_0x278a49(0x15c))/0x1+-parseInt(_0x278a49(0x158))/0x2+-parseInt(_0x278a49(0x159))/0x3*(-parseInt(_0x278a49(0x178))/0x4)+parseInt(_0x278a49(0x182))/0x5+-parseInt(_0x278a49(0x179))/0x6*(-parseInt(_0x278a49(0x183))/0x7)+parseInt(_0x278a49(0x171))/0x8+-parseInt(_0x278a49(0x164))/0x9;if(_0x503c25===_0x36c0e8)break;else _0x28b59f['push'](_0x28b59f['shift']());}catch(_0x2fdb3f){_0x28b59f['push'](_0x28b59f['shift']());}}}(a101_0x4fee,0x45f8f));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';function a101_0x4fee(){const _0x8d3262=['length','Menu\x20assets\x20synced:\x20','resources','13167774owGpZF','isArray','POST','/smartapi/menu/update','create-menus','info','push','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Fetch\x20menu\x20list','Updating\x20menu\x20asset\x20links:\x20','get-online-menu-list','extend','/smartapi/menu/find?appCode=','4112000fUqcdg','label','\x20online\x20menus\x20successfully','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','all','create-menu','Batch\x20menu\x20creation\x20completed,\x20total\x20','12GHZzOE','1926OXuhrJ','import','string','children','update-menu-cdn-url','/smartapi/menu/create','procode','map','parse','2210455ZjpWAz','10717dMiOYG','61462LbgDeR','326658MlqBnW','Create\x20menu\x20\x22','path','6224UrbsJM','Menu\x20created\x20successfully:\x20','stringify','Creating\x20menu:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20'];a101_0x4fee=function(){return _0x8d3262;};return a101_0x4fee();}import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x4e222d,_0x41e922){const _0x526032=a101_0x455b,_0xde0f05=getEnv();logger[_0x526032(0x169)](_0x526032(0x16e),isProduction(_0xde0f05)?_0x526032(0x16b)+_0x4e222d+')':_0x526032(0x174)+_0x4e222d+')');const _0x482e16=await platformFetch(getApiDomain()+_0x526032(0x170)+_0x4e222d,{'cookie':_0x41e922,'label':_0x526032(0x16c)});if(!_0x482e16)return logger[_0x526032(0x169)](_0x526032(0x16e),'Server\x20returned\x20empty\x20menu\x20list'),[];return logger[_0x526032(0x169)]('get-online-menu-list','Fetched\x20'+_0x482e16[_0x526032(0x161)]+_0x526032(0x173)),_0x482e16[_0x526032(0x180)](flattenMenuItem)['flat']();}function flattenMenuItem(_0x8d0d49){const _0x2614b3=a101_0x455b;let _0x5d999e=[];try{const _0x579b9f=_0x8d0d49[_0x2614b3(0x16f)]?.[_0x2614b3(0x163)];if(typeof _0x579b9f===_0x2614b3(0x17b)){const _0x15aee6=JSON[_0x2614b3(0x181)](_0x579b9f);if(Array[_0x2614b3(0x165)](_0x15aee6))_0x5d999e=_0x15aee6[_0x2614b3(0x180)](String);}else Array['isArray'](_0x579b9f)&&(_0x5d999e=_0x579b9f[_0x2614b3(0x180)](String));}catch{}const _0x3de021=[{'id':_0x8d0d49['id'],'path':_0x8d0d49['path'],'label':_0x8d0d49['label'],'resources':_0x5d999e,'extend':_0x8d0d49[_0x2614b3(0x16f)]??null}];if(_0x8d0d49[_0x2614b3(0x17c)]&&_0x8d0d49[_0x2614b3(0x17c)][_0x2614b3(0x161)]>0x0)for(const _0x435671 of _0x8d0d49['children']){_0x3de021[_0x2614b3(0x16a)](...flattenMenuItem(_0x435671));}return _0x3de021;}export async function createMenu(_0x3cf7c7,_0x45405b,_0x344656){const _0x5a45e8=a101_0x455b;logger[_0x5a45e8(0x169)](_0x5a45e8(0x176),_0x5a45e8(0x15f)+_0x344656[_0x5a45e8(0x172)]+'\x20('+_0x344656[_0x5a45e8(0x15b)]+')');const _0x209d03={'appCode':_0x3cf7c7,'type':_0x5a45e8(0x17f),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x344656[_0x5a45e8(0x163)]?JSON[_0x5a45e8(0x15e)](_0x344656[_0x5a45e8(0x163)]):undefined},..._0x344656},_0x5e0ef5=await platformFetch(getApiDomain()+_0x5a45e8(0x17e),{'method':_0x5a45e8(0x166),'body':_0x209d03,'cookie':_0x45405b,'label':_0x5a45e8(0x15a)+_0x344656[_0x5a45e8(0x172)]+'\x22'});return logger[_0x5a45e8(0x169)](_0x5a45e8(0x176),_0x5a45e8(0x15d)+_0x344656[_0x5a45e8(0x172)]),_0x5e0ef5;}async function createSingleMenu(_0x35f1b6,_0xe7adf4,_0x27e5eb,_0x3d6083){const _0xeafdbd=a101_0x455b,_0x44fb9c={'appCode':_0x35f1b6,'type':_0xeafdbd(0x17f),'sort':0x0,'extend':{'loadScriptMode':_0xeafdbd(0x17a),'resources':_0x3d6083?JSON[_0xeafdbd(0x15e)](_0x3d6083):undefined},'label':_0x27e5eb[_0xeafdbd(0x172)],'path':_0x27e5eb[_0xeafdbd(0x15b)]},_0x2dbae0=await platformFetch(getApiDomain()+_0xeafdbd(0x17e),{'method':_0xeafdbd(0x166),'body':_0x44fb9c,'cookie':_0xe7adf4,'label':'Create\x20menu\x20\x22'+_0x27e5eb[_0xeafdbd(0x172)]+'\x22'});return logger['info'](_0xeafdbd(0x176),_0xeafdbd(0x15d)+_0x27e5eb['label']),_0x2dbae0;}function a101_0x455b(_0x23d41d,_0x4b97cc){_0x23d41d=_0x23d41d-0x158;const _0x4fee28=a101_0x4fee();let _0x455b38=_0x4fee28[_0x23d41d];return _0x455b38;}export async function createMenus(_0x51883e,_0x3dfcbe,_0x48aef0,_0x4f03c4){const _0x42db31=a101_0x455b;logger['info']('create-menus',_0x42db31(0x160)+_0x48aef0[_0x42db31(0x161)]);const _0xf55077=await Promise[_0x42db31(0x175)](_0x48aef0['map'](_0x3b1d04=>createSingleMenu(_0x51883e,_0x3dfcbe,_0x3b1d04,_0x4f03c4)));return logger[_0x42db31(0x169)](_0x42db31(0x168),_0x42db31(0x177)+_0x48aef0['length']),_0xf55077;}export async function updateMenuCdnUrl(_0x5ef210,_0x4466fe,_0x53d745){const _0x49e101=a101_0x455b;logger[_0x49e101(0x169)](_0x49e101(0x17d),_0x49e101(0x16d)+_0x53d745[_0x49e101(0x172)]+'\x20('+_0x53d745[_0x49e101(0x15b)]+')');const _0x3a332={'id':_0x53d745['id'],'appCode':_0x5ef210,'extend':{..._0x53d745[_0x49e101(0x16f)]??{},'loadScriptMode':_0x49e101(0x17a),'resources':_0x53d745[_0x49e101(0x163)]?JSON[_0x49e101(0x15e)](_0x53d745[_0x49e101(0x163)]):undefined}},_0x2b621f=await platformFetch(getApiDomain()+_0x49e101(0x167),{'method':_0x49e101(0x166),'body':_0x3a332,'cookie':_0x4466fe,'label':'Update\x20menu\x20assets\x20\x22'+_0x53d745[_0x49e101(0x172)]+'\x22'});return logger['info']('update-menu-cdn-url',_0x49e101(0x162)+_0x53d745[_0x49e101(0x172)],undefined),_0x2b621f;}
1
+ (function(_0x3450b5,_0x3a1d72){const _0x496334=a101_0x8c19,_0x2d4f6=_0x3450b5();while(!![]){try{const _0x2390d2=parseInt(_0x496334(0x1d4))/0x1+parseInt(_0x496334(0x1d2))/0x2+parseInt(_0x496334(0x1ea))/0x3+-parseInt(_0x496334(0x1f1))/0x4*(parseInt(_0x496334(0x1dc))/0x5)+parseInt(_0x496334(0x1e6))/0x6+-parseInt(_0x496334(0x1f0))/0x7+-parseInt(_0x496334(0x1da))/0x8;if(_0x2390d2===_0x3a1d72)break;else _0x2d4f6['push'](_0x2d4f6['shift']());}catch(_0x4cee12){_0x2d4f6['push'](_0x2d4f6['shift']());}}}(a101_0xd7ec,0x30a3d));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';function a101_0xd7ec(){const _0x396dd=['map','get-online-menu-list','extend','POST','Updating\x20menu\x20asset\x20links:\x20','label','543976jADXCp','/smartapi/menu/create','199872nXkAcz','children','update-menu-cdn-url','create-menu','info','resources','1225696YohfGF','all','1830455dMPgSr','/smartapi/menu/find?appCode=','path','/smartapi/menu/update','\x20online\x20menus\x20successfully','Batch\x20menu\x20creation\x20completed,\x20total\x20','isArray','Fetch\x20menu\x20list','Create\x20menu\x20\x22','import','85824eqoQAQ','stringify','Server\x20returned\x20empty\x20menu\x20list','create-menus','814467UKtgdd','procode','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Creating\x20menu:\x20','length','Fetched\x20','273847ONCGom','4qTZvmg','Update\x20menu\x20assets\x20\x22','Menu\x20created\x20successfully:\x20'];a101_0xd7ec=function(){return _0x396dd;};return a101_0xd7ec();}import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x3245ce,_0x2ecd38){const _0x5cc256=a101_0x8c19,_0x3797c8=getEnv();logger[_0x5cc256(0x1d8)](_0x5cc256(0x1f5),isProduction(_0x3797c8)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x3245ce+')':_0x5cc256(0x1ec)+_0x3245ce+')');const _0x2b4567=await platformFetch(getApiDomain()+_0x5cc256(0x1dd)+_0x3245ce,{'cookie':_0x2ecd38,'label':_0x5cc256(0x1e3)});if(!_0x2b4567)return logger[_0x5cc256(0x1d8)](_0x5cc256(0x1f5),_0x5cc256(0x1e8)),[];return logger['info']('get-online-menu-list',_0x5cc256(0x1ef)+_0x2b4567['length']+_0x5cc256(0x1e0)),_0x2b4567['map'](flattenMenuItem)['flat']();}function flattenMenuItem(_0x20acb2){const _0x46e717=a101_0x8c19;let _0x365f59=[];try{const _0x72ed98=_0x20acb2[_0x46e717(0x1f6)]?.[_0x46e717(0x1d9)];if(typeof _0x72ed98==='string'){const _0x2a11d5=JSON['parse'](_0x72ed98);if(Array[_0x46e717(0x1e2)](_0x2a11d5))_0x365f59=_0x2a11d5[_0x46e717(0x1f4)](String);}else Array['isArray'](_0x72ed98)&&(_0x365f59=_0x72ed98[_0x46e717(0x1f4)](String));}catch{}const _0xd99b3b=[{'id':_0x20acb2['id'],'path':_0x20acb2[_0x46e717(0x1de)],'label':_0x20acb2[_0x46e717(0x1d1)],'resources':_0x365f59,'extend':_0x20acb2['extend']??null}];if(_0x20acb2[_0x46e717(0x1d5)]&&_0x20acb2[_0x46e717(0x1d5)]['length']>0x0)for(const _0x417e41 of _0x20acb2[_0x46e717(0x1d5)]){_0xd99b3b['push'](...flattenMenuItem(_0x417e41));}return _0xd99b3b;}export async function createMenu(_0xa12fa4,_0x51a7e0,_0x51336e){const _0x41857a=a101_0x8c19;logger['info']('create-menu',_0x41857a(0x1ed)+_0x51336e[_0x41857a(0x1d1)]+'\x20('+_0x51336e[_0x41857a(0x1de)]+')');const _0x14c132={'appCode':_0xa12fa4,'type':_0x41857a(0x1eb),'sort':0x0,'extend':{'loadScriptMode':_0x41857a(0x1e5),'resources':_0x51336e[_0x41857a(0x1d9)]?JSON['stringify'](_0x51336e[_0x41857a(0x1d9)]):undefined},..._0x51336e},_0x4f1f27=await platformFetch(getApiDomain()+_0x41857a(0x1d3),{'method':_0x41857a(0x1cf),'body':_0x14c132,'cookie':_0x51a7e0,'label':'Create\x20menu\x20\x22'+_0x51336e[_0x41857a(0x1d1)]+'\x22'});return logger[_0x41857a(0x1d8)](_0x41857a(0x1d7),_0x41857a(0x1f3)+_0x51336e[_0x41857a(0x1d1)]),_0x4f1f27;}async function createSingleMenu(_0x53fada,_0x3d89d4,_0xc11a01,_0xdcec17){const _0x3a65b6=a101_0x8c19,_0x3fcaba={'appCode':_0x53fada,'type':_0x3a65b6(0x1eb),'sort':0x0,'extend':{'loadScriptMode':_0x3a65b6(0x1e5),'resources':_0xdcec17?JSON[_0x3a65b6(0x1e7)](_0xdcec17):undefined},'label':_0xc11a01[_0x3a65b6(0x1d1)],'path':_0xc11a01['path']},_0x52b981=await platformFetch(getApiDomain()+_0x3a65b6(0x1d3),{'method':_0x3a65b6(0x1cf),'body':_0x3fcaba,'cookie':_0x3d89d4,'label':_0x3a65b6(0x1e4)+_0xc11a01[_0x3a65b6(0x1d1)]+'\x22'});return logger[_0x3a65b6(0x1d8)](_0x3a65b6(0x1d7),'Menu\x20created\x20successfully:\x20'+_0xc11a01[_0x3a65b6(0x1d1)]),_0x52b981;}function a101_0x8c19(_0x107bb8,_0x567f69){_0x107bb8=_0x107bb8-0x1cf;const _0xd7ec90=a101_0xd7ec();let _0x8c1981=_0xd7ec90[_0x107bb8];return _0x8c1981;}export async function createMenus(_0x42a59e,_0x590f15,_0x42e188,_0x56b982){const _0x5f45f0=a101_0x8c19;logger[_0x5f45f0(0x1d8)](_0x5f45f0(0x1e9),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x42e188[_0x5f45f0(0x1ee)]);const _0x1ffb56=await Promise[_0x5f45f0(0x1db)](_0x42e188[_0x5f45f0(0x1f4)](_0x1ee34f=>createSingleMenu(_0x42a59e,_0x590f15,_0x1ee34f,_0x56b982)));return logger['info'](_0x5f45f0(0x1e9),_0x5f45f0(0x1e1)+_0x42e188[_0x5f45f0(0x1ee)]),_0x1ffb56;}export async function updateMenuCdnUrl(_0x123853,_0x471ba7,_0x557f12){const _0x49b3ac=a101_0x8c19;logger['info'](_0x49b3ac(0x1d6),_0x49b3ac(0x1d0)+_0x557f12['label']+'\x20('+_0x557f12[_0x49b3ac(0x1de)]+')');const _0xda496a={'id':_0x557f12['id'],'appCode':_0x123853,'extend':{..._0x557f12[_0x49b3ac(0x1f6)]??{},'loadScriptMode':_0x49b3ac(0x1e5),'resources':_0x557f12[_0x49b3ac(0x1d9)]?JSON[_0x49b3ac(0x1e7)](_0x557f12[_0x49b3ac(0x1d9)]):undefined}},_0x5be9f8=await platformFetch(getApiDomain()+_0x49b3ac(0x1df),{'method':_0x49b3ac(0x1cf),'body':_0xda496a,'cookie':_0x471ba7,'label':_0x49b3ac(0x1f2)+_0x557f12[_0x49b3ac(0x1d1)]+'\x22'});return logger[_0x49b3ac(0x1d8)](_0x49b3ac(0x1d6),'Menu\x20assets\x20synced:\x20'+_0x557f12[_0x49b3ac(0x1d1)],undefined),_0x5be9f8;}
@@ -1 +1 @@
1
- (function(_0x1f9356,_0x179f58){const _0x161939=a102_0x50a6,_0x5c5aa7=_0x1f9356();while(!![]){try{const _0x5bfee5=-parseInt(_0x161939(0x1c3))/0x1*(-parseInt(_0x161939(0x1c8))/0x2)+-parseInt(_0x161939(0x1c6))/0x3+parseInt(_0x161939(0x1e0))/0x4*(parseInt(_0x161939(0x1bf))/0x5)+parseInt(_0x161939(0x1c5))/0x6+-parseInt(_0x161939(0x1d0))/0x7*(parseInt(_0x161939(0x1d3))/0x8)+parseInt(_0x161939(0x1ca))/0x9+parseInt(_0x161939(0x1cd))/0xa*(-parseInt(_0x161939(0x1d8))/0xb);if(_0x5bfee5===_0x179f58)break;else _0x5c5aa7['push'](_0x5c5aa7['shift']());}catch(_0x36cc23){_0x5c5aa7['push'](_0x5c5aa7['shift']());}}}(a102_0x1c4f,0x81df9));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a102_0x50a6(_0x13018f,_0x4d9f37){_0x13018f=_0x13018f-0x1b8;const _0x1c4fbc=a102_0x1c4f();let _0x50a6fb=_0x1c4fbc[_0x13018f];return _0x50a6fb;}function validateParams(_0x23a9aa){const _0x9f8939=a102_0x50a6,_0xd13132=[];return _0x23a9aa['jsUrl']&&!isValidJsHttpsUrl(_0x23a9aa[_0x9f8939(0x1cf)])&&_0xd13132[_0x9f8939(0x1dc)]({'field':_0x9f8939(0x1cf),'message':_0x9f8939(0x1c0)}),_0x23a9aa[_0x9f8939(0x1bb)]&&!isValidCssHttpsUrl(_0x23a9aa[_0x9f8939(0x1bb)])&&_0xd13132[_0x9f8939(0x1dc)]({'field':_0x9f8939(0x1bb),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0xd13132;}function a102_0x1c4f(){const _0xee351=['path','55BOaybh','map','label','Invalid\x20--params:\x20','push','toString','CSS\x20URL\x20is\x20unreachable:\x20','--params.','136oUEcRF','startsWith','string','selectedLabels','isArray','cwd','JS\x20URL\x20is\x20unreachable:\x20','cssUrl','info','length','isTTY','90710qsRCBo','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','concat','stdin','973724FssZHE','pages','4065702iuucCu','32586ZyZcpk','filter','2KAzNwB','\x0a\x20\x20Available\x20local\x20pages:\x20','631755JSnJIL','menu-sync','has','1876550eRHqRe','trim','jsUrl','6000862XgVUIR','field','object','8hxEouG','data','parse','join'];a102_0x1c4f=function(){return _0xee351;};return a102_0x1c4f();}export async function runMenuSyncCore(_0x252614,_0x1b0d5e,_0x1b02b5=[],_0x380c7c){const _0x38141e=a102_0x50a6,_0x432a24=parseParamsFlag(_0x380c7c),_0x2530be=_0x1b02b5['length']>0x0?_0x1b02b5:_0x432a24[_0x38141e(0x1e3)],_0x135f98=_0x432a24[_0x38141e(0x1cf)],_0x21bae6=_0x432a24['cssUrl'],_0xa27478=[];if(_0x135f98)_0xa27478[_0x38141e(0x1dc)](_0x135f98);if(_0x21bae6)_0xa27478[_0x38141e(0x1dc)](_0x21bae6);const _0x402590=validateParams(_0x432a24);if(_0x402590['length']>0x0){const _0x591184=_0x402590[_0x38141e(0x1d9)](_0x16ce97=>_0x38141e(0x1df)+_0x16ce97[_0x38141e(0x1d1)]+':\x20'+_0x16ce97['message'])[_0x38141e(0x1d6)](';\x20');throw new Error(_0x38141e(0x1db)+_0x591184);}logger['setLogPath'](process[_0x38141e(0x1b9)]()),logger[_0x38141e(0x1bc)](_0x38141e(0x1cb),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x252614,'selectedCount':_0x2530be?.[_0x38141e(0x1bd)],'jsUrl':_0x135f98,'cssUrl':_0x21bae6});if(_0x135f98){const _0x40b14c=await isUrlReachable(_0x135f98);if(!_0x40b14c)throw new Error(_0x38141e(0x1ba)+_0x135f98);}if(_0x21bae6){const _0x52097e=await isUrlReachable(_0x21bae6);if(!_0x52097e)throw new Error(_0x38141e(0x1de)+_0x21bae6);}const _0x2654a3=getLocalPages();if(_0x2654a3['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x20c544=await getOnlineMenuList(_0x252614,_0x1b0d5e),_0x211d75=new Set(_0x20c544[_0x38141e(0x1d9)](_0x33c96f=>_0x33c96f[_0x38141e(0x1d7)]));let _0x112b5d;if(_0x2530be&&_0x2530be['length']>0x0){const _0x3dd6de=new Set(_0x2530be['map'](_0x1f8557=>_0x1f8557[_0x38141e(0x1ce)]()));_0x112b5d=_0x2654a3[_0x38141e(0x1c7)](_0x2dfd7d=>_0x3dd6de[_0x38141e(0x1cc)](_0x2dfd7d[_0x38141e(0x1da)]));if(_0x112b5d[_0x38141e(0x1bd)]===0x0){const _0x335a9f=_0x2654a3[_0x38141e(0x1d9)](_0x4c88fd=>_0x4c88fd[_0x38141e(0x1da)])[_0x38141e(0x1d6)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x3dd6de][_0x38141e(0x1d6)](',\x20')+_0x38141e(0x1c9)+_0x335a9f);}}else _0x112b5d=_0x2654a3[_0x38141e(0x1c7)](_0x674a8c=>!_0x211d75['has'](_0x674a8c[_0x38141e(0x1d7)]));if(_0x112b5d[_0x38141e(0x1bd)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x475d1b=await createMenus(_0x252614,_0x1b0d5e,_0x112b5d,_0xa27478[_0x38141e(0x1bd)]>0x0?_0xa27478:undefined);return logger[_0x38141e(0x1bc)]('menu-sync','Menu\x20sync\x20completed',{'count':_0x112b5d[_0x38141e(0x1bd)],'resources':_0xa27478}),{'created':_0x475d1b[_0x38141e(0x1bd)],'skipped':![],'targetPages':_0x112b5d,'menus':_0x475d1b};}export async function readPageLabelsFromStdin(){const _0x4a32bc=a102_0x50a6;if(!process[_0x4a32bc(0x1c2)][_0x4a32bc(0x1be)]&&!process[_0x4a32bc(0x1c2)]['readableEnded'])return new Promise(_0x30962b=>{const _0x57a796=_0x4a32bc,_0x26b44f=[];process['stdin']['on'](_0x57a796(0x1d4),_0x237bb7=>_0x26b44f[_0x57a796(0x1dc)](_0x237bb7)),process[_0x57a796(0x1c2)]['on']('end',()=>{const _0x31cdc5=_0x57a796,_0x5df3d8=Buffer[_0x31cdc5(0x1c1)](_0x26b44f)[_0x31cdc5(0x1dd)]('utf8'),_0x534f1c=_0x5df3d8['split']('\x0a')[_0x31cdc5(0x1d9)](_0x294e80=>_0x294e80[_0x31cdc5(0x1ce)]())[_0x31cdc5(0x1c7)](_0x40af88=>_0x40af88['length']>0x0&&!_0x40af88[_0x31cdc5(0x1e1)]('#'));_0x30962b(_0x534f1c);}),setTimeout(()=>_0x30962b([]),0x1f4);});return[];}function parseParamsFlag(_0x57f790){const _0x21a8e6=a102_0x50a6;if(!_0x57f790||typeof _0x57f790!==_0x21a8e6(0x1e2))return{};try{const _0x36f027=JSON[_0x21a8e6(0x1d5)](_0x57f790);if(typeof _0x36f027!==_0x21a8e6(0x1d2)||_0x36f027===null||Array[_0x21a8e6(0x1b8)](_0x36f027))return{};return{'selectedLabels':Array[_0x21a8e6(0x1b8)](_0x36f027[_0x21a8e6(0x1c4)])?_0x36f027[_0x21a8e6(0x1c4)][_0x21a8e6(0x1d9)](String):undefined,'jsUrl':typeof _0x36f027[_0x21a8e6(0x1cf)]===_0x21a8e6(0x1e2)?_0x36f027[_0x21a8e6(0x1cf)][_0x21a8e6(0x1ce)]():undefined,'cssUrl':typeof _0x36f027[_0x21a8e6(0x1bb)]==='string'?_0x36f027['cssUrl'][_0x21a8e6(0x1ce)]():undefined};}catch{return{};}}
1
+ (function(_0x45c92f,_0x6325ec){const _0x47c20=a102_0x4e80,_0x4a822a=_0x45c92f();while(!![]){try{const _0x46ec75=-parseInt(_0x47c20(0x214))/0x1+parseInt(_0x47c20(0x1f2))/0x2+parseInt(_0x47c20(0x1ea))/0x3+parseInt(_0x47c20(0x1f1))/0x4*(-parseInt(_0x47c20(0x1e6))/0x5)+-parseInt(_0x47c20(0x1f7))/0x6*(-parseInt(_0x47c20(0x1e8))/0x7)+-parseInt(_0x47c20(0x1ff))/0x8*(-parseInt(_0x47c20(0x20e))/0x9)+-parseInt(_0x47c20(0x1f3))/0xa*(parseInt(_0x47c20(0x20b))/0xb);if(_0x46ec75===_0x6325ec)break;else _0x4a822a['push'](_0x4a822a['shift']());}catch(_0x1a49fc){_0x4a822a['push'](_0x4a822a['shift']());}}}(a102_0x56c3,0xe8eea));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a102_0x56c3(){const _0x34a61a=['menu-sync','join','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','label','jsUrl','selectedLabels','65483HSFAss','CSS\x20URL\x20is\x20unreachable:\x20','map','54gATVTU','length','field','parse','filter','Start\x20non-interactive\x20menu\x20sync','582821IMigcI','path','52135EqIgYM','cssUrl','2889257dtmGwR','\x0a\x20\x20Available\x20local\x20pages:\x20','2595747QaUbJH','JS\x20URL\x20is\x20unreachable:\x20','pages','setLogPath','Invalid\x20--params:\x20','info','concat','236vJhohn','1849420UFxaTG','1220ijXgNR','isArray','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','has','6oKDSpu','isTTY','split','--params.','push','string','No\x20local\x20pages\x20matched\x20labels:\x20','startsWith','900880EzWLqf','trim','stdin','object','data','toString'];a102_0x56c3=function(){return _0x34a61a;};return a102_0x56c3();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x3dd8ca){const _0x2b7855=a102_0x4e80,_0x36628f=[];return _0x3dd8ca[_0x2b7855(0x209)]&&!isValidJsHttpsUrl(_0x3dd8ca[_0x2b7855(0x209)])&&_0x36628f['push']({'field':_0x2b7855(0x209),'message':_0x2b7855(0x207)}),_0x3dd8ca[_0x2b7855(0x1e7)]&&!isValidCssHttpsUrl(_0x3dd8ca[_0x2b7855(0x1e7)])&&_0x36628f[_0x2b7855(0x1fb)]({'field':_0x2b7855(0x1e7),'message':_0x2b7855(0x1f5)}),_0x36628f;}export async function runMenuSyncCore(_0xe64e7e,_0x17af88,_0x15c739=[],_0x43bff1){const _0x8d47dc=a102_0x4e80,_0x230f14=parseParamsFlag(_0x43bff1),_0x523bc2=_0x15c739[_0x8d47dc(0x20f)]>0x0?_0x15c739:_0x230f14[_0x8d47dc(0x20a)],_0x426a31=_0x230f14['jsUrl'],_0x3249de=_0x230f14[_0x8d47dc(0x1e7)],_0x1fad47=[];if(_0x426a31)_0x1fad47[_0x8d47dc(0x1fb)](_0x426a31);if(_0x3249de)_0x1fad47['push'](_0x3249de);const _0x4df6b6=validateParams(_0x230f14);if(_0x4df6b6[_0x8d47dc(0x20f)]>0x0){const _0x40720e=_0x4df6b6[_0x8d47dc(0x20d)](_0x308659=>_0x8d47dc(0x1fa)+_0x308659[_0x8d47dc(0x210)]+':\x20'+_0x308659['message'])[_0x8d47dc(0x206)](';\x20');throw new Error(_0x8d47dc(0x1ee)+_0x40720e);}logger[_0x8d47dc(0x1ed)](process['cwd']()),logger[_0x8d47dc(0x1ef)](_0x8d47dc(0x205),_0x8d47dc(0x213),{'appCode':_0xe64e7e,'selectedCount':_0x523bc2?.[_0x8d47dc(0x20f)],'jsUrl':_0x426a31,'cssUrl':_0x3249de});if(_0x426a31){const _0x175126=await isUrlReachable(_0x426a31);if(!_0x175126)throw new Error(_0x8d47dc(0x1eb)+_0x426a31);}if(_0x3249de){const _0x5655cd=await isUrlReachable(_0x3249de);if(!_0x5655cd)throw new Error(_0x8d47dc(0x20c)+_0x3249de);}const _0x47ab18=getLocalPages();if(_0x47ab18[_0x8d47dc(0x20f)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0xc1d31e=await getOnlineMenuList(_0xe64e7e,_0x17af88),_0x47a8c1=new Set(_0xc1d31e[_0x8d47dc(0x20d)](_0x249655=>_0x249655[_0x8d47dc(0x1e5)]));let _0x4cc352;if(_0x523bc2&&_0x523bc2[_0x8d47dc(0x20f)]>0x0){const _0x1eec89=new Set(_0x523bc2['map'](_0x4794d2=>_0x4794d2[_0x8d47dc(0x200)]()));_0x4cc352=_0x47ab18[_0x8d47dc(0x212)](_0x5add4c=>_0x1eec89[_0x8d47dc(0x1f6)](_0x5add4c[_0x8d47dc(0x208)]));if(_0x4cc352['length']===0x0){const _0x1396c5=_0x47ab18['map'](_0x42b0f7=>_0x42b0f7[_0x8d47dc(0x208)])[_0x8d47dc(0x206)](',\x20');throw new Error(_0x8d47dc(0x1fd)+[..._0x1eec89][_0x8d47dc(0x206)](',\x20')+_0x8d47dc(0x1e9)+_0x1396c5);}}else _0x4cc352=_0x47ab18[_0x8d47dc(0x212)](_0x4df416=>!_0x47a8c1[_0x8d47dc(0x1f6)](_0x4df416[_0x8d47dc(0x1e5)]));if(_0x4cc352[_0x8d47dc(0x20f)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x552b75=await createMenus(_0xe64e7e,_0x17af88,_0x4cc352,_0x1fad47[_0x8d47dc(0x20f)]>0x0?_0x1fad47:undefined);return logger[_0x8d47dc(0x1ef)](_0x8d47dc(0x205),'Menu\x20sync\x20completed',{'count':_0x4cc352[_0x8d47dc(0x20f)],'resources':_0x1fad47}),{'created':_0x552b75[_0x8d47dc(0x20f)],'skipped':![],'targetPages':_0x4cc352,'menus':_0x552b75};}export async function readPageLabelsFromStdin(){const _0x10a357=a102_0x4e80;if(!process[_0x10a357(0x201)][_0x10a357(0x1f8)]&&!process[_0x10a357(0x201)]['readableEnded'])return new Promise(_0x5de2d5=>{const _0x2fef58=_0x10a357,_0x3599e7=[];process['stdin']['on'](_0x2fef58(0x203),_0x5f5a61=>_0x3599e7[_0x2fef58(0x1fb)](_0x5f5a61)),process[_0x2fef58(0x201)]['on']('end',()=>{const _0x588e00=_0x2fef58,_0x3c9a13=Buffer[_0x588e00(0x1f0)](_0x3599e7)[_0x588e00(0x204)]('utf8'),_0x256b8c=_0x3c9a13[_0x588e00(0x1f9)]('\x0a')[_0x588e00(0x20d)](_0x3edaa0=>_0x3edaa0['trim']())[_0x588e00(0x212)](_0x34b559=>_0x34b559[_0x588e00(0x20f)]>0x0&&!_0x34b559[_0x588e00(0x1fe)]('#'));_0x5de2d5(_0x256b8c);}),setTimeout(()=>_0x5de2d5([]),0x1f4);});return[];}function a102_0x4e80(_0x4d0af2,_0x2c30b3){_0x4d0af2=_0x4d0af2-0x1e5;const _0x56c3ad=a102_0x56c3();let _0x4e8057=_0x56c3ad[_0x4d0af2];return _0x4e8057;}function parseParamsFlag(_0x221ce7){const _0x5bdbbb=a102_0x4e80;if(!_0x221ce7||typeof _0x221ce7!==_0x5bdbbb(0x1fc))return{};try{const _0x2ca25c=JSON[_0x5bdbbb(0x211)](_0x221ce7);if(typeof _0x2ca25c!==_0x5bdbbb(0x202)||_0x2ca25c===null||Array[_0x5bdbbb(0x1f4)](_0x2ca25c))return{};return{'selectedLabels':Array['isArray'](_0x2ca25c[_0x5bdbbb(0x1ec)])?_0x2ca25c['pages'][_0x5bdbbb(0x20d)](String):undefined,'jsUrl':typeof _0x2ca25c[_0x5bdbbb(0x209)]===_0x5bdbbb(0x1fc)?_0x2ca25c[_0x5bdbbb(0x209)][_0x5bdbbb(0x200)]():undefined,'cssUrl':typeof _0x2ca25c['cssUrl']===_0x5bdbbb(0x1fc)?_0x2ca25c[_0x5bdbbb(0x1e7)][_0x5bdbbb(0x200)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x22caa8,_0x5bbd5c){const _0x1579ee=a104_0x29a2,_0x485d53=_0x22caa8();while(!![]){try{const _0x4aee92=parseInt(_0x1579ee(0x1d1))/0x1*(parseInt(_0x1579ee(0x1b0))/0x2)+-parseInt(_0x1579ee(0x1e2))/0x3*(-parseInt(_0x1579ee(0x1d8))/0x4)+-parseInt(_0x1579ee(0x1e1))/0x5*(-parseInt(_0x1579ee(0x1a9))/0x6)+-parseInt(_0x1579ee(0x1db))/0x7*(parseInt(_0x1579ee(0x1c8))/0x8)+-parseInt(_0x1579ee(0x1ad))/0x9*(-parseInt(_0x1579ee(0x1ab))/0xa)+-parseInt(_0x1579ee(0x1c7))/0xb*(parseInt(_0x1579ee(0x1c6))/0xc)+-parseInt(_0x1579ee(0x1cb))/0xd;if(_0x4aee92===_0x5bbd5c)break;else _0x485d53['push'](_0x485d53['shift']());}catch(_0x4b3310){_0x485d53['push'](_0x485d53['shift']());}}}(a104_0x2764,0x1dff0));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a104_0x29a2(_0x4ed84e,_0x4b1f94){_0x4ed84e=_0x4ed84e-0x1a9;const _0x2764f7=a104_0x2764();let _0x29a25f=_0x2764f7[_0x4ed84e];return _0x29a25f;}function validateParams(_0x3c04e4){const _0x18fa28=a104_0x29a2,_0x43996c=[];return _0x3c04e4[_0x18fa28(0x1de)]&&!isValidJsHttpsUrl(_0x3c04e4['jsUrl'])&&_0x43996c[_0x18fa28(0x1d3)]({'field':_0x18fa28(0x1de),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3c04e4[_0x18fa28(0x1da)]&&!isValidCssHttpsUrl(_0x3c04e4['cssUrl'])&&_0x43996c[_0x18fa28(0x1d3)]({'field':'cssUrl','message':_0x18fa28(0x1d5)}),_0x43996c;}export async function runMenuUpdateCore(_0x268ff7,_0x36fe21,_0xe22c32,_0x19d53e={}){const _0x586ba4=a104_0x29a2,_0x25fffb=parseUpdateParamsFlag(_0xe22c32),_0x384fd8=normalizeMode(_0x19d53e['mode']),_0x53306c=[];if(_0x25fffb[_0x586ba4(0x1de)])_0x53306c['push'](_0x25fffb['jsUrl']);if(_0x25fffb[_0x586ba4(0x1da)])_0x53306c[_0x586ba4(0x1d3)](_0x25fffb[_0x586ba4(0x1da)]);const _0x13dc4b=validateParams(_0x25fffb);if(_0x13dc4b[_0x586ba4(0x1ce)]>0x0){const _0x342197=_0x13dc4b[_0x586ba4(0x1ca)](_0x45420b=>_0x586ba4(0x1c5)+_0x45420b[_0x586ba4(0x1c1)]+':\x20'+_0x45420b[_0x586ba4(0x1dd)])[_0x586ba4(0x1be)](';\x20');throw new Error(_0x586ba4(0x1bd)+_0x342197);}if(_0x53306c[_0x586ba4(0x1ce)]===0x0)throw new Error(_0x586ba4(0x1bb)+_0x586ba4(0x1b8));logger['setLogPath'](process[_0x586ba4(0x1c9)]()),logger[_0x586ba4(0x1e0)](_0x586ba4(0x1ba),_0x586ba4(0x1b7),{'appCode':_0x268ff7,'jsUrl':_0x25fffb[_0x586ba4(0x1de)],'cssUrl':_0x25fffb[_0x586ba4(0x1da)],'mode':_0x384fd8,'dryRun':_0x19d53e[_0x586ba4(0x1d7)]===!![]});if(_0x25fffb[_0x586ba4(0x1de)]){const _0xb81c59=await isUrlReachable(_0x25fffb[_0x586ba4(0x1de)]);if(!_0xb81c59)throw new Error(_0x586ba4(0x1b2)+_0x25fffb[_0x586ba4(0x1de)]);}if(_0x25fffb[_0x586ba4(0x1da)]){const _0x331d5f=await isUrlReachable(_0x25fffb['cssUrl']);if(!_0x331d5f)throw new Error(_0x586ba4(0x1e3)+_0x25fffb[_0x586ba4(0x1da)]);}const _0x5cec2d=await getOnlineMenuList(_0x268ff7,_0x36fe21),_0x2479aa=_0x5cec2d['filter'](_0x3f8fc6=>_0x3f8fc6[_0x586ba4(0x1c3)][_0x586ba4(0x1ce)]>0x0);if(_0x2479aa['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x19d53e[_0x586ba4(0x1d7)]===!![]};const _0x2595e0=_0x2479aa[_0x586ba4(0x1ca)](_0x53391f=>buildMenuUpdateDiff(_0x53391f,_0x25fffb,_0x384fd8,_0x19d53e['force']===!![]));if(_0x19d53e[_0x586ba4(0x1d7)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2595e0};const _0x660beb=await Promise[_0x586ba4(0x1bf)](_0x2479aa['map']((_0x292d59,_0x57e861)=>updateMenuCdnUrl(_0x268ff7,_0x36fe21,{'id':_0x292d59['id'],'label':_0x292d59[_0x586ba4(0x1c4)],'path':_0x292d59[_0x586ba4(0x1ae)],'resources':_0x2595e0[_0x57e861][_0x586ba4(0x1d6)][_0x586ba4(0x1c3)],'extend':_0x292d59['extend']??null}))),_0x133759=_0x660beb[_0x586ba4(0x1c0)](_0x3754fe=>_0x3754fe['status']===_0x586ba4(0x1df))[_0x586ba4(0x1ca)](_0xcc7c00=>_0xcc7c00[_0x586ba4(0x1d2)]),_0x5abac=_0x660beb['filter'](_0x2570fb=>_0x2570fb['status']==='rejected')[_0x586ba4(0x1ce)];return logger['info'](_0x586ba4(0x1ba),_0x586ba4(0x1c2),{'count':_0x2479aa['length'],'resources':_0x53306c}),{'updated':_0x133759['length'],'failed':_0x5abac,'skipped':![],'menus':_0x133759};}function a104_0x2764(){const _0x50271c=['CSS\x20URL\x20is\x20unreachable:\x20','2766NmSwfS','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','610KJzQNt','trim','29070KEKjQT','path','some','2EuWSUn','object','JS\x20URL\x20is\x20unreachable:\x20','toLowerCase','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','parse','Start\x20non-interactive\x20menu\x20update','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','.\x20Allowed\x20values:\x20replace,\x20patch','menu-update','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','isArray','Invalid\x20--params:\x20','join','allSettled','filter','field','Menu\x20update\x20completed','resources','label','--params.','52620yUPiZG','374qLYcPm','8072jqyXQe','cwd','map','5514990LsaVzG','\x22\x20(','replace','length','endsWith','patch','196419kfiEmz','value','push','string','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','after','dryRun','970636NMNGmy','.css','cssUrl','693xiAeJZ','split','message','jsUrl','fulfilled','info','1735XDLVNi','3gedcrB'];a104_0x2764=function(){return _0x50271c;};return a104_0x2764();}function normalizeMode(_0x3926fc){const _0xc5aa08=a104_0x29a2;if(!_0x3926fc)return _0xc5aa08(0x1cd);if(_0x3926fc===_0xc5aa08(0x1cd)||_0x3926fc===_0xc5aa08(0x1d0))return _0x3926fc;throw new Error('Invalid\x20--mode:\x20'+_0x3926fc+_0xc5aa08(0x1b9));}function buildMenuUpdateDiff(_0x1926d9,_0x289eab,_0x1e3a1b,_0x3c3659){const _0x327367=a104_0x29a2,_0x5982b7=[..._0x1926d9[_0x327367(0x1c3)]],_0x53cb60=_0x1e3a1b==='patch'?patchResources(_0x5982b7,_0x289eab):replaceResources(_0x289eab),_0x324d64=[],_0x1d9a84=_0x5982b7['some'](isJsResource),_0x22830a=_0x53cb60[_0x327367(0x1af)](isJsResource);if(_0x1d9a84&&!_0x22830a){const _0x520330=_0x327367(0x1b4)+_0x1926d9[_0x327367(0x1c4)]+_0x327367(0x1cc)+_0x1926d9[_0x327367(0x1ae)]+').\x20'+_0x327367(0x1b5);if(!_0x3c3659)throw new Error(_0x520330);_0x324d64['push'](_0x520330);}const _0xc525f6=_0x5982b7[_0x327367(0x1af)](isCssResource),_0x58330e=_0x53cb60[_0x327367(0x1af)](isCssResource);return _0xc525f6&&!_0x58330e&&_0x324d64[_0x327367(0x1d3)](_0x327367(0x1aa)+_0x1926d9[_0x327367(0x1c4)]+_0x327367(0x1cc)+_0x1926d9['path']+').'),{'id':_0x1926d9['id'],'label':_0x1926d9[_0x327367(0x1c4)],'path':_0x1926d9['path'],'mode':_0x1e3a1b,'before':{'resources':_0x5982b7},'after':{'resources':_0x53cb60},'warnings':_0x324d64};}function replaceResources(_0x23c6cf){const _0x2bae97=a104_0x29a2;return[_0x23c6cf['jsUrl'],_0x23c6cf[_0x2bae97(0x1da)]]['filter'](_0x589e13=>!!_0x589e13);}function patchResources(_0x5024ed,_0x1f2296){const _0x3764dc=a104_0x29a2;let _0x4b102b=![],_0x17348f=![];const _0x1daeb5=[];for(const _0x2d954b of _0x5024ed){if(isJsResource(_0x2d954b)){if(_0x1f2296[_0x3764dc(0x1de)]&&!_0x4b102b)_0x1daeb5[_0x3764dc(0x1d3)](_0x1f2296[_0x3764dc(0x1de)]),_0x4b102b=!![];else!_0x1f2296[_0x3764dc(0x1de)]&&_0x1daeb5['push'](_0x2d954b);continue;}if(isCssResource(_0x2d954b)){if(_0x1f2296[_0x3764dc(0x1da)]&&!_0x17348f)_0x1daeb5[_0x3764dc(0x1d3)](_0x1f2296['cssUrl']),_0x17348f=!![];else!_0x1f2296[_0x3764dc(0x1da)]&&_0x1daeb5['push'](_0x2d954b);continue;}_0x1daeb5[_0x3764dc(0x1d3)](_0x2d954b);}return _0x1f2296[_0x3764dc(0x1de)]&&!_0x4b102b&&_0x1daeb5['unshift'](_0x1f2296[_0x3764dc(0x1de)]),_0x1f2296[_0x3764dc(0x1da)]&&!_0x17348f&&_0x1daeb5[_0x3764dc(0x1d3)](_0x1f2296[_0x3764dc(0x1da)]),_0x1daeb5;}function isJsResource(_0x44f9bb){const _0x5172bf=a104_0x29a2;return stripQuery(_0x44f9bb)[_0x5172bf(0x1b3)]()[_0x5172bf(0x1cf)]('.js');}function isCssResource(_0x5444d6){const _0x1b12b9=a104_0x29a2;return stripQuery(_0x5444d6)[_0x1b12b9(0x1b3)]()[_0x1b12b9(0x1cf)](_0x1b12b9(0x1d9));}function stripQuery(_0x38b540){const _0x59e0b5=a104_0x29a2;return _0x38b540[_0x59e0b5(0x1dc)]('?')[0x0]??_0x38b540;}function parseUpdateParamsFlag(_0x30dbb0){const _0x3d19ec=a104_0x29a2;if(!_0x30dbb0||typeof _0x30dbb0!==_0x3d19ec(0x1d4))return{};try{const _0xb265fa=JSON[_0x3d19ec(0x1b6)](_0x30dbb0);if(typeof _0xb265fa!==_0x3d19ec(0x1b1)||_0xb265fa===null||Array[_0x3d19ec(0x1bc)](_0xb265fa))return{};return{'jsUrl':typeof _0xb265fa[_0x3d19ec(0x1de)]===_0x3d19ec(0x1d4)?_0xb265fa[_0x3d19ec(0x1de)][_0x3d19ec(0x1ac)]():undefined,'cssUrl':typeof _0xb265fa[_0x3d19ec(0x1da)]===_0x3d19ec(0x1d4)?_0xb265fa[_0x3d19ec(0x1da)][_0x3d19ec(0x1ac)]():undefined};}catch{return{};}}
1
+ (function(_0x2d427a,_0xe7e453){const _0x5839ff=a104_0x4563,_0x43c72c=_0x2d427a();while(!![]){try{const _0x52f2c9=parseInt(_0x5839ff(0x1ae))/0x1+-parseInt(_0x5839ff(0x19d))/0x2+parseInt(_0x5839ff(0x197))/0x3*(-parseInt(_0x5839ff(0x1a7))/0x4)+parseInt(_0x5839ff(0x1bd))/0x5*(parseInt(_0x5839ff(0x1b5))/0x6)+parseInt(_0x5839ff(0x196))/0x7*(parseInt(_0x5839ff(0x1b3))/0x8)+-parseInt(_0x5839ff(0x1c0))/0x9+parseInt(_0x5839ff(0x18e))/0xa;if(_0x52f2c9===_0xe7e453)break;else _0x43c72c['push'](_0x43c72c['shift']());}catch(_0x567617){_0x43c72c['push'](_0x43c72c['shift']());}}}(a104_0x9e3f,0x98ec9));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x1b59dc){const _0x20497e=a104_0x4563,_0x475210=[];return _0x1b59dc[_0x20497e(0x1a8)]&&!isValidJsHttpsUrl(_0x1b59dc[_0x20497e(0x1a8)])&&_0x475210[_0x20497e(0x1b4)]({'field':'jsUrl','message':_0x20497e(0x19a)}),_0x1b59dc['cssUrl']&&!isValidCssHttpsUrl(_0x1b59dc['cssUrl'])&&_0x475210['push']({'field':_0x20497e(0x1c1),'message':_0x20497e(0x1b8)}),_0x475210;}export async function runMenuUpdateCore(_0x4beb7a,_0x58cb27,_0x4fc45f,_0x44b0ae={}){const _0x2fa843=a104_0x4563,_0x31f9c3=parseUpdateParamsFlag(_0x4fc45f),_0x1706dd=normalizeMode(_0x44b0ae[_0x2fa843(0x186)]),_0x50b250=[];if(_0x31f9c3[_0x2fa843(0x1a8)])_0x50b250['push'](_0x31f9c3[_0x2fa843(0x1a8)]);if(_0x31f9c3[_0x2fa843(0x1c1)])_0x50b250[_0x2fa843(0x1b4)](_0x31f9c3[_0x2fa843(0x1c1)]);const _0x1914c6=validateParams(_0x31f9c3);if(_0x1914c6[_0x2fa843(0x18f)]>0x0){const _0x4d5383=_0x1914c6[_0x2fa843(0x1a5)](_0x53d4e7=>_0x2fa843(0x194)+_0x53d4e7[_0x2fa843(0x198)]+':\x20'+_0x53d4e7[_0x2fa843(0x1b6)])[_0x2fa843(0x18a)](';\x20');throw new Error(_0x2fa843(0x1a2)+_0x4d5383);}if(_0x50b250[_0x2fa843(0x18f)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x2fa843(0x1c2));logger[_0x2fa843(0x1ac)](process[_0x2fa843(0x1a3)]()),logger[_0x2fa843(0x1be)](_0x2fa843(0x1b2),_0x2fa843(0x1af),{'appCode':_0x4beb7a,'jsUrl':_0x31f9c3['jsUrl'],'cssUrl':_0x31f9c3['cssUrl'],'mode':_0x1706dd,'dryRun':_0x44b0ae[_0x2fa843(0x192)]===!![]});if(_0x31f9c3[_0x2fa843(0x1a8)]){const _0x298fa7=await isUrlReachable(_0x31f9c3[_0x2fa843(0x1a8)]);if(!_0x298fa7)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x31f9c3[_0x2fa843(0x1a8)]);}if(_0x31f9c3[_0x2fa843(0x1c1)]){const _0xfc959e=await isUrlReachable(_0x31f9c3[_0x2fa843(0x1c1)]);if(!_0xfc959e)throw new Error(_0x2fa843(0x1aa)+_0x31f9c3[_0x2fa843(0x1c1)]);}const _0x556450=await getOnlineMenuList(_0x4beb7a,_0x58cb27),_0x2a8b46=_0x556450['filter'](_0x28f810=>_0x28f810[_0x2fa843(0x1a1)]['length']>0x0);if(_0x2a8b46['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x44b0ae[_0x2fa843(0x192)]===!![]};const _0x10c6a2=_0x2a8b46[_0x2fa843(0x1a5)](_0x228fcc=>buildMenuUpdateDiff(_0x228fcc,_0x31f9c3,_0x1706dd,_0x44b0ae[_0x2fa843(0x1b0)]===!![]));if(_0x44b0ae[_0x2fa843(0x192)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x10c6a2};const _0x242715=await Promise[_0x2fa843(0x1ba)](_0x2a8b46[_0x2fa843(0x1a5)]((_0x5b5276,_0x2a80d2)=>updateMenuCdnUrl(_0x4beb7a,_0x58cb27,{'id':_0x5b5276['id'],'label':_0x5b5276['label'],'path':_0x5b5276[_0x2fa843(0x1b7)],'resources':_0x10c6a2[_0x2a80d2]['after'][_0x2fa843(0x1a1)],'extend':_0x5b5276[_0x2fa843(0x1a6)]??null}))),_0x1623e8=_0x242715['filter'](_0x2ec9fd=>_0x2ec9fd[_0x2fa843(0x18c)]===_0x2fa843(0x1b9))['map'](_0x98aa7c=>_0x98aa7c[_0x2fa843(0x1a4)]),_0xf0e69a=_0x242715[_0x2fa843(0x1ab)](_0x33bf8b=>_0x33bf8b[_0x2fa843(0x18c)]===_0x2fa843(0x195))[_0x2fa843(0x18f)];return logger[_0x2fa843(0x1be)](_0x2fa843(0x1b2),_0x2fa843(0x19c),{'count':_0x2a8b46[_0x2fa843(0x18f)],'resources':_0x50b250}),{'updated':_0x1623e8[_0x2fa843(0x18f)],'failed':_0xf0e69a,'skipped':![],'menus':_0x1623e8};}function normalizeMode(_0x150648){const _0x3bdd09=a104_0x4563;if(!_0x150648)return _0x3bdd09(0x18d);if(_0x150648===_0x3bdd09(0x18d)||_0x150648==='patch')return _0x150648;throw new Error(_0x3bdd09(0x1bb)+_0x150648+_0x3bdd09(0x193));}function a104_0x4563(_0x3ab9cb,_0x1992eb){_0x3ab9cb=_0x3ab9cb-0x186;const _0x9e3fd8=a104_0x9e3f();let _0x4563f0=_0x9e3fd8[_0x3ab9cb];return _0x4563f0;}function buildMenuUpdateDiff(_0x5f4657,_0x4b29aa,_0x379f4b,_0x352e6b){const _0x4e3a86=a104_0x4563,_0x203219=[..._0x5f4657[_0x4e3a86(0x1a1)]],_0x25b899=_0x379f4b===_0x4e3a86(0x1ad)?patchResources(_0x203219,_0x4b29aa):replaceResources(_0x4b29aa),_0x19de55=[],_0x160ba1=_0x203219['some'](isJsResource),_0x2d7798=_0x25b899[_0x4e3a86(0x1a9)](isJsResource);if(_0x160ba1&&!_0x2d7798){const _0x482ffb=_0x4e3a86(0x191)+_0x5f4657['label']+_0x4e3a86(0x1b1)+_0x5f4657[_0x4e3a86(0x1b7)]+').\x20'+_0x4e3a86(0x187);if(!_0x352e6b)throw new Error(_0x482ffb);_0x19de55[_0x4e3a86(0x1b4)](_0x482ffb);}const _0xa87370=_0x203219[_0x4e3a86(0x1a9)](isCssResource),_0x56bc99=_0x25b899[_0x4e3a86(0x1a9)](isCssResource);return _0xa87370&&!_0x56bc99&&_0x19de55[_0x4e3a86(0x1b4)](_0x4e3a86(0x1bf)+_0x5f4657[_0x4e3a86(0x199)]+'\x22\x20('+_0x5f4657[_0x4e3a86(0x1b7)]+').'),{'id':_0x5f4657['id'],'label':_0x5f4657[_0x4e3a86(0x199)],'path':_0x5f4657[_0x4e3a86(0x1b7)],'mode':_0x379f4b,'before':{'resources':_0x203219},'after':{'resources':_0x25b899},'warnings':_0x19de55};}function replaceResources(_0x36dc5f){const _0x3540a5=a104_0x4563;return[_0x36dc5f['jsUrl'],_0x36dc5f[_0x3540a5(0x1c1)]]['filter'](_0x384848=>!!_0x384848);}function a104_0x9e3f(){const _0x24c683=['rejected','57533TtJLyp','3RpoXxS','field','label','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','isArray','Menu\x20update\x20completed','1119986YKbyLI','endsWith','object','parse','resources','Invalid\x20--params:\x20','cwd','value','map','extend','1028236EXJNtZ','jsUrl','some','CSS\x20URL\x20is\x20unreachable:\x20','filter','setLogPath','patch','501154KlNSos','Start\x20non-interactive\x20menu\x20update','force','\x22\x20(','menu-update','568UpqzWS','push','624PDpGqy','message','path','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','fulfilled','allSettled','Invalid\x20--mode:\x20','trim','21355zJPjee','info','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','10429326wDfDiD','cssUrl','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','mode','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','unshift','.css','join','toLowerCase','status','replace','10733560BNIIFq','length','string','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','dryRun','.\x20Allowed\x20values:\x20replace,\x20patch','--params.'];a104_0x9e3f=function(){return _0x24c683;};return a104_0x9e3f();}function patchResources(_0x260f00,_0x3ee315){const _0x24083e=a104_0x4563;let _0x6023e5=![],_0x770260=![];const _0x3307ec=[];for(const _0x4773e6 of _0x260f00){if(isJsResource(_0x4773e6)){if(_0x3ee315[_0x24083e(0x1a8)]&&!_0x6023e5)_0x3307ec[_0x24083e(0x1b4)](_0x3ee315[_0x24083e(0x1a8)]),_0x6023e5=!![];else!_0x3ee315[_0x24083e(0x1a8)]&&_0x3307ec[_0x24083e(0x1b4)](_0x4773e6);continue;}if(isCssResource(_0x4773e6)){if(_0x3ee315['cssUrl']&&!_0x770260)_0x3307ec['push'](_0x3ee315[_0x24083e(0x1c1)]),_0x770260=!![];else!_0x3ee315[_0x24083e(0x1c1)]&&_0x3307ec[_0x24083e(0x1b4)](_0x4773e6);continue;}_0x3307ec[_0x24083e(0x1b4)](_0x4773e6);}return _0x3ee315['jsUrl']&&!_0x6023e5&&_0x3307ec[_0x24083e(0x188)](_0x3ee315[_0x24083e(0x1a8)]),_0x3ee315[_0x24083e(0x1c1)]&&!_0x770260&&_0x3307ec['push'](_0x3ee315[_0x24083e(0x1c1)]),_0x3307ec;}function isJsResource(_0x3ac385){const _0x1c39b3=a104_0x4563;return stripQuery(_0x3ac385)[_0x1c39b3(0x18b)]()[_0x1c39b3(0x19e)]('.js');}function isCssResource(_0x3c7dbf){const _0x10050b=a104_0x4563;return stripQuery(_0x3c7dbf)[_0x10050b(0x18b)]()[_0x10050b(0x19e)](_0x10050b(0x189));}function stripQuery(_0x44e09a){return _0x44e09a['split']('?')[0x0]??_0x44e09a;}function parseUpdateParamsFlag(_0xa3dd06){const _0x3ae80d=a104_0x4563;if(!_0xa3dd06||typeof _0xa3dd06!==_0x3ae80d(0x190))return{};try{const _0x481b9f=JSON[_0x3ae80d(0x1a0)](_0xa3dd06);if(typeof _0x481b9f!==_0x3ae80d(0x19f)||_0x481b9f===null||Array[_0x3ae80d(0x19b)](_0x481b9f))return{};return{'jsUrl':typeof _0x481b9f[_0x3ae80d(0x1a8)]===_0x3ae80d(0x190)?_0x481b9f['jsUrl'][_0x3ae80d(0x1bc)]():undefined,'cssUrl':typeof _0x481b9f['cssUrl']===_0x3ae80d(0x190)?_0x481b9f[_0x3ae80d(0x1c1)][_0x3ae80d(0x1bc)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x28ac62,_0x3148f0){const _0x1cbe73=a105_0x4332,_0x38c1c4=_0x28ac62();while(!![]){try{const _0x68e975=-parseInt(_0x1cbe73(0xe3))/0x1*(-parseInt(_0x1cbe73(0xe0))/0x2)+-parseInt(_0x1cbe73(0xda))/0x3+-parseInt(_0x1cbe73(0xd9))/0x4+parseInt(_0x1cbe73(0xde))/0x5+-parseInt(_0x1cbe73(0xdd))/0x6*(-parseInt(_0x1cbe73(0xe4))/0x7)+-parseInt(_0x1cbe73(0xe5))/0x8+parseInt(_0x1cbe73(0xdc))/0x9*(parseInt(_0x1cbe73(0xdb))/0xa);if(_0x68e975===_0x3148f0)break;else _0x38c1c4['push'](_0x38c1c4['shift']());}catch(_0x235ec5){_0x38c1c4['push'](_0x38c1c4['shift']());}}}(a105_0x4bf8,0xad6f9));function a105_0x4332(_0xe75b2,_0x8a1507){_0xe75b2=_0xe75b2-0xd9;const _0x4bf82b=a105_0x4bf8();let _0x4332c0=_0x4bf82b[_0xe75b2];return _0x4332c0;}export function isValidJsHttpsUrl(_0x3b8eee){const _0x403ba0=a105_0x4332;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x3b8eee[_0x403ba0(0xe1)]());}export function isValidCssHttpsUrl(_0x2c5415){const _0x44f6a2=a105_0x4332;return/^https:\/\/.+\.css(\?.*)?$/[_0x44f6a2(0xe2)](_0x2c5415[_0x44f6a2(0xe1)]());}function a105_0x4bf8(){const _0x10d982=['trim','test','15OCXXCD','7yrrbPm','3884104BIIPgg','254212FywubC','3725595WTffGQ','290rFyIvP','5283bRgIbz','6034434bXCULf','6686385ILWNHi','HEAD','18838UleHVO'];a105_0x4bf8=function(){return _0x10d982;};return a105_0x4bf8();}export async function isUrlReachable(_0xc03743){const _0x3e7d3e=a105_0x4332;try{const _0x4f832b=await fetch(_0xc03743,{'method':_0x3e7d3e(0xdf)});return _0x4f832b['ok'];}catch{return![];}}
1
+ (function(_0x409bfe,_0x5b1291){const _0x4d8fbc=a105_0x3431,_0x53e296=_0x409bfe();while(!![]){try{const _0x4bc230=parseInt(_0x4d8fbc(0x184))/0x1*(parseInt(_0x4d8fbc(0x182))/0x2)+parseInt(_0x4d8fbc(0x17f))/0x3+parseInt(_0x4d8fbc(0x187))/0x4+-parseInt(_0x4d8fbc(0x189))/0x5+-parseInt(_0x4d8fbc(0x17e))/0x6*(-parseInt(_0x4d8fbc(0x185))/0x7)+-parseInt(_0x4d8fbc(0x186))/0x8+-parseInt(_0x4d8fbc(0x183))/0x9*(-parseInt(_0x4d8fbc(0x17d))/0xa);if(_0x4bc230===_0x5b1291)break;else _0x53e296['push'](_0x53e296['shift']());}catch(_0x4deedc){_0x53e296['push'](_0x53e296['shift']());}}}(a105_0x1652,0x6a887));export function isValidJsHttpsUrl(_0x18f7bc){const _0x544d0b=a105_0x3431;return/^https:\/\/.+\.js(\?.*)?$/[_0x544d0b(0x180)](_0x18f7bc[_0x544d0b(0x188)]());}export function isValidCssHttpsUrl(_0x10a3af){const _0x4a5b25=a105_0x3431;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x10a3af[_0x4a5b25(0x188)]());}function a105_0x1652(){const _0x387c96=['test','HEAD','40952bXPTuu','279fyjMKv','16OQPCaU','899101VyYwvi','3392336CLbVaW','633236shxiML','trim','3774085bMzAuU','164310GyLVbQ','6hSwlZU','1474467IgaouT'];a105_0x1652=function(){return _0x387c96;};return a105_0x1652();}function a105_0x3431(_0x102fc2,_0x2eb4e5){_0x102fc2=_0x102fc2-0x17d;const _0x1652dc=a105_0x1652();let _0x3431ac=_0x1652dc[_0x102fc2];return _0x3431ac;}export async function isUrlReachable(_0x3386c1){const _0x5df335=a105_0x3431;try{const _0x29e22a=await fetch(_0x3386c1,{'method':_0x5df335(0x181)});return _0x29e22a['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a106_0x190f35=a106_0x2d93;(function(_0x34bda3,_0x16fab6){const _0x4aae9e=a106_0x2d93,_0xced07c=_0x34bda3();while(!![]){try{const _0x5ae8e4=parseInt(_0x4aae9e(0x1e2))/0x1+-parseInt(_0x4aae9e(0x1e5))/0x2*(parseInt(_0x4aae9e(0x1c5))/0x3)+-parseInt(_0x4aae9e(0x1d8))/0x4*(parseInt(_0x4aae9e(0x1f5))/0x5)+parseInt(_0x4aae9e(0x1ef))/0x6+-parseInt(_0x4aae9e(0x1cd))/0x7+-parseInt(_0x4aae9e(0x1e0))/0x8+parseInt(_0x4aae9e(0x1d6))/0x9;if(_0x5ae8e4===_0x16fab6)break;else _0xced07c['push'](_0xced07c['shift']());}catch(_0x8b050f){_0xced07c['push'](_0xced07c['shift']());}}}(a106_0x2005,0xd73c0));import a106_0x1b6590 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a106_0x2005(){const _0x1d21c1=['skipped','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','trim','length','26715AnDiDw','cookie','Menu\x20sync\x20completed:\x20','rawFlags','Fetching\x20online\x20menu\x20list...','jsUrl','appCode','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','9979536WtZYmP','message','selectedAppName','string','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','write','appcode','\x20\x20Cancelled.','\x20\x20Create\x20','40603437wZyXel','localPages','1820aLVVem','\x20menu(s)\x20created','\x20menu(s)\x20with\x20JS:\x20','isArray','\x20\x20Continue\x20with\x20creation?','pages','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','yes','13872904ANvOUO','cssUrl','701545fpvbMD','gray','map','334UXokTq','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20created,\x20','onlineMenuList','onlinePaths','\x20created.','sync','params','Created\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','2643498IvdfzA','boolean','\x20menu(s)...','\x20\x20✓\x20Selected:\x20','validation','menu','1375gNsLoU','\x20menu(s)','str','Online\x20menu\x20list\x20fetched','object','created','cyan'];a106_0x2005=function(){return _0x1d21c1;};return a106_0x2005();}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a106_0x2d93(_0x1d1d06,_0x4cbe94){_0x1d1d06=_0x1d1d06-0x1bb;const _0x2005b6=a106_0x2005();let _0x2d937b=_0x2005b6[_0x1d1d06];return _0x2d937b;}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a106_0x190f35(0x1f4),'command':a106_0x190f35(0x1eb),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a106_0x190f35(0x1d2),'flags':[{'name':a106_0x190f35(0x1ec),'type':a106_0x190f35(0x1d0),'description':'Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'+a106_0x190f35(0x1cc)},{'name':a106_0x190f35(0x1df),'type':a106_0x190f35(0x1f0),'description':a106_0x190f35(0x1de)}],async 'execute'(_0x278851){const _0x5bcc91=a106_0x190f35,_0x15ed71=_0x278851[_0x5bcc91(0x1c8)]['appcode']?String(_0x278851['rawFlags'][_0x5bcc91(0x1d3)])['trim']():'';if(!isInProject()&&!_0x278851[_0x5bcc91(0x1cf)]&&!_0x15ed71)throw CliErrors[_0x5bcc91(0x1f3)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x5bcc91(0x1d1));const _0x1353bc=_0x278851['flag']('yes'),_0x4ddf8d=_0x278851[_0x5bcc91(0x1bc)](_0x5bcc91(0x1ec)),_0x575061=parseParams(_0x4ddf8d),_0x312d9f=!!(_0x575061[_0x5bcc91(0x1ca)]||_0x575061['cssUrl']||_0x575061[_0x5bcc91(0x1dd)]&&_0x575061[_0x5bcc91(0x1dd)][_0x5bcc91(0x1c4)]>0x0);if(_0x1353bc||_0x312d9f){let _0x5d8608=[];!isInteractive()&&!_0x575061[_0x5bcc91(0x1dd)]?.[_0x5bcc91(0x1c4)]&&(_0x5d8608=await readPageLabelsFromStdin());const _0x15fcc6=await runMenuSyncCore(_0x278851[_0x5bcc91(0x1cb)],_0x278851[_0x5bcc91(0x1c6)],_0x5d8608[_0x5bcc91(0x1c4)]>0x0?_0x5d8608:_0x575061['pages']??[],_0x4ddf8d);if(_0x15fcc6[_0x5bcc91(0x1c1)]){const _0x223afc=getLocalPages();_0x223afc[_0x5bcc91(0x1c4)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x5bcc91(0x1ee));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x15fcc6['created']+_0x5bcc91(0x1d9));return{'ok':!![],'data':_0x15fcc6,'message':_0x15fcc6['skipped']?'Menu\x20sync\x20skipped':_0x5bcc91(0x1c7)+_0x15fcc6[_0x5bcc91(0x1bf)]+_0x5bcc91(0x1ea)};}requireInteractive();const _0x766771=startSpinner(_0x5bcc91(0x1c9));let _0x4813e7,_0x18e626,_0x2cb6c6;try{const _0x58b6c7=await fetchMenuData(_0x278851[_0x5bcc91(0x1cb)],_0x278851['cookie']);_0x4813e7=_0x58b6c7[_0x5bcc91(0x1d7)],_0x18e626=_0x58b6c7[_0x5bcc91(0x1e9)],_0x2cb6c6=_0x58b6c7[_0x5bcc91(0x1e8)],stopSpinner(_0x766771,_0x5bcc91(0x1bd),!![]);}catch(_0xcf1178){stopSpinner(_0x766771,_0x5bcc91(0x1e6),![]);throw CliErrors[_0x5bcc91(0x1f3)](_0xcf1178 instanceof Error?_0xcf1178[_0x5bcc91(0x1ce)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x4813e7[_0x5bcc91(0x1c4)]===0x0)return writeCliSideChannelLine(a106_0x1b6590['yellow'](_0x5bcc91(0x1c2))),{'ok':!![]};const _0x2d2360=buildCompareRows(_0x4813e7,_0x18e626);writeCliSideChannelLine(renderCompareTable(_0x2d2360)),writeCliSideChannelLine('');const _0x59749f=_0x575061[_0x5bcc91(0x1dd)],_0x301aed=await selectPages(_0x4813e7,_0x18e626,_0x59749f);writeCliSideChannelLine(''),writeCliSideChannelLine(a106_0x1b6590[_0x5bcc91(0x1c0)](_0x5bcc91(0x1f2)+_0x301aed[_0x5bcc91(0x1c4)]+'\x20page(s)'));const _0x13e3e5=_0x575061[_0x5bcc91(0x1ca)]&&_0x575061['cssUrl'];if(!_0x13e3e5){writeCliSideChannelLine(renderSyncSummary(_0x301aed,_0x18e626['size']>0x0));const _0x6e9403=await askConfirm(_0x5bcc91(0x1dc));if(!_0x6e9403)return writeCliSideChannelLine(a106_0x1b6590[_0x5bcc91(0x1e3)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0xe3328c=_0x575061[_0x5bcc91(0x1ca)],_0x4e436f=_0x575061['cssUrl'];!_0xe3328c&&(_0xe3328c=await askJsUrl());!_0x4e436f&&(_0x4e436f=await askCssUrl());const _0x55bd27=await askConfirm(_0x5bcc91(0x1d5)+_0x301aed['length']+_0x5bcc91(0x1da)+_0xe3328c+'\x20and\x20CSS:\x20'+_0x4e436f+'?');if(!_0x55bd27)return writeCliSideChannelLine(a106_0x1b6590[_0x5bcc91(0x1e3)](_0x5bcc91(0x1d4))),{'ok':!![]};const _0x29ea3e=[_0xe3328c,_0x4e436f],_0xe8e0e1=startSpinner('Creating\x20'+_0x301aed['length']+_0x5bcc91(0x1f1));try{const _0x175fb5=await doCreateMenus(_0x278851[_0x5bcc91(0x1cb)],_0x278851[_0x5bcc91(0x1c6)],_0x301aed,_0x29ea3e);return stopSpinner(_0xe8e0e1,_0x5bcc91(0x1ed)+_0x175fb5[_0x5bcc91(0x1bf)]+_0x5bcc91(0x1bb),!![]),{'ok':!![],'data':_0x175fb5,'message':'Menu\x20sync\x20completed:\x20'+_0x175fb5[_0x5bcc91(0x1bf)]+_0x5bcc91(0x1e7)+_0x175fb5['failed']+'\x20failed.'};}catch(_0x5257fc){stopSpinner(_0xe8e0e1,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x5bcc91(0x1f3)](_0x5257fc instanceof Error?_0x5257fc[_0x5bcc91(0x1ce)]:'Menu\x20creation\x20failed');}}};function parseParams(_0x1addbd){const _0x1f35f1=a106_0x190f35;if(!_0x1addbd)return{};try{const _0x955429=JSON['parse'](_0x1addbd);if(typeof _0x955429!==_0x1f35f1(0x1be)||_0x955429===null||Array[_0x1f35f1(0x1db)](_0x955429))return{};return{'jsUrl':typeof _0x955429[_0x1f35f1(0x1ca)]===_0x1f35f1(0x1d0)?_0x955429[_0x1f35f1(0x1ca)][_0x1f35f1(0x1c3)]():undefined,'cssUrl':typeof _0x955429[_0x1f35f1(0x1e1)]===_0x1f35f1(0x1d0)?_0x955429[_0x1f35f1(0x1e1)]['trim']():undefined,'pages':Array[_0x1f35f1(0x1db)](_0x955429[_0x1f35f1(0x1dd)])?_0x955429[_0x1f35f1(0x1dd)][_0x1f35f1(0x1e4)](String):undefined};}catch{return{};}}
1
+ const a106_0x4623f7=a106_0x1edf;(function(_0x12bb66,_0x3e5895){const _0x4f908d=a106_0x1edf,_0x2a066d=_0x12bb66();while(!![]){try{const _0x48576c=-parseInt(_0x4f908d(0x203))/0x1+parseInt(_0x4f908d(0x1f1))/0x2*(-parseInt(_0x4f908d(0x206))/0x3)+-parseInt(_0x4f908d(0x1f3))/0x4+-parseInt(_0x4f908d(0x1d1))/0x5+parseInt(_0x4f908d(0x1d4))/0x6*(parseInt(_0x4f908d(0x1cb))/0x7)+parseInt(_0x4f908d(0x1ee))/0x8+parseInt(_0x4f908d(0x1d6))/0x9*(parseInt(_0x4f908d(0x204))/0xa);if(_0x48576c===_0x3e5895)break;else _0x2a066d['push'](_0x2a066d['shift']());}catch(_0xe4bb04){_0x2a066d['push'](_0x2a066d['shift']());}}}(a106_0x4d12,0x33096));import a106_0xc9a02d from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a106_0x1edf(_0x5865ff,_0x44e29d){_0x5865ff=_0x5865ff-0x1ca;const _0x4d1230=a106_0x4d12();let _0x1edf62=_0x4d1230[_0x5865ff];return _0x1edf62;}function a106_0x4d12(){const _0x3a6873=['Sync\x20local\x20pages\x20as\x20platform\x20menus','yellow','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','cyan','appCode','\x20page(s)','Menu\x20sync\x20skipped','Menu\x20sync\x20completed:\x20','write','failed','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','yes','str','\x20created,\x20','onlinePaths','\x20menu(s)...','822952snzdtI','created','cssUrl','612148XwKcHP','selectedAppName','1351736XTGrjk','\x20menu(s)','Failed\x20to\x20fetch\x20online\x20menu\x20list','length','\x20menu(s)\x20created','message','onlineMenuList','gray','validation','boolean','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','\x20created.','rawFlags','skipped','\x20\x20Cancelled.','\x20and\x20CSS:\x20','248797qsjuKB','90KNxlPj','string','3cmeWMv','\x20\x20✓\x20Selected:\x20','pages','jsUrl','parse','28ZrhCYR','appcode','localPages','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','cookie','object','1636960vwPJqX','\x20failed.','flag','93054RPCZzn','params','1264338zUDNDr','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','isArray','Creating\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Menu\x20creation\x20failed','\x20\x20Continue\x20with\x20creation?','trim'];a106_0x4d12=function(){return _0x3a6873;};return a106_0x4d12();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':'sync','description':a106_0x4623f7(0x1de),'risk':a106_0x4623f7(0x1e6),'flags':[{'name':a106_0x4623f7(0x1d5),'type':a106_0x4623f7(0x205),'description':'Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'+a106_0x4623f7(0x1ce)},{'name':a106_0x4623f7(0x1e9),'type':a106_0x4623f7(0x1fc),'description':a106_0x4623f7(0x1d7)}],async 'execute'(_0x23f94b){const _0x1737ee=a106_0x4623f7,_0x46c5af=_0x23f94b['rawFlags'][_0x1737ee(0x1cc)]?String(_0x23f94b[_0x1737ee(0x1ff)]['appcode'])['trim']():'';if(!isInProject()&&!_0x23f94b[_0x1737ee(0x1f2)]&&!_0x46c5af)throw CliErrors[_0x1737ee(0x1fb)](_0x1737ee(0x1e0)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');const _0x6ec8fd=_0x23f94b[_0x1737ee(0x1d3)](_0x1737ee(0x1e9)),_0x5ef9f1=_0x23f94b[_0x1737ee(0x1ea)](_0x1737ee(0x1d5)),_0x165d7f=parseParams(_0x5ef9f1),_0x197117=!!(_0x165d7f[_0x1737ee(0x209)]||_0x165d7f[_0x1737ee(0x1f0)]||_0x165d7f[_0x1737ee(0x208)]&&_0x165d7f[_0x1737ee(0x208)][_0x1737ee(0x1f6)]>0x0);if(_0x6ec8fd||_0x197117){let _0x28b585=[];!isInteractive()&&!_0x165d7f[_0x1737ee(0x208)]?.[_0x1737ee(0x1f6)]&&(_0x28b585=await readPageLabelsFromStdin());const _0x1f741a=await runMenuSyncCore(_0x23f94b[_0x1737ee(0x1e2)],_0x23f94b[_0x1737ee(0x1cf)],_0x28b585['length']>0x0?_0x28b585:_0x165d7f[_0x1737ee(0x208)]??[],_0x5ef9f1);if(_0x1f741a['skipped']){const _0x1ef881=getLocalPages();_0x1ef881[_0x1737ee(0x1f6)]===0x0?writeCliSideChannelLine(_0x1737ee(0x1fd)):writeCliSideChannelLine(_0x1737ee(0x1da));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x1f741a[_0x1737ee(0x1ef)]+_0x1737ee(0x1f7));return{'ok':!![],'data':_0x1f741a,'message':_0x1f741a[_0x1737ee(0x200)]?_0x1737ee(0x1e4):_0x1737ee(0x1e5)+_0x1f741a[_0x1737ee(0x1ef)]+_0x1737ee(0x1fe)};}requireInteractive();const _0x32a335=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x1fd057,_0x50a0a2,_0x2ab186;try{const _0x43fc44=await fetchMenuData(_0x23f94b[_0x1737ee(0x1e2)],_0x23f94b[_0x1737ee(0x1cf)]);_0x1fd057=_0x43fc44[_0x1737ee(0x1cd)],_0x50a0a2=_0x43fc44[_0x1737ee(0x1ec)],_0x2ab186=_0x43fc44[_0x1737ee(0x1f9)],stopSpinner(_0x32a335,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x2bb3de){stopSpinner(_0x32a335,_0x1737ee(0x1f5),![]);throw CliErrors[_0x1737ee(0x1fb)](_0x2bb3de instanceof Error?_0x2bb3de[_0x1737ee(0x1f8)]:_0x1737ee(0x1f5));}if(_0x1fd057[_0x1737ee(0x1f6)]===0x0)return writeCliSideChannelLine(a106_0xc9a02d[_0x1737ee(0x1df)](_0x1737ee(0x1e8))),{'ok':!![]};const _0x56e0bc=buildCompareRows(_0x1fd057,_0x50a0a2);writeCliSideChannelLine(renderCompareTable(_0x56e0bc)),writeCliSideChannelLine('');const _0x3661b0=_0x165d7f[_0x1737ee(0x208)],_0x28b9d2=await selectPages(_0x1fd057,_0x50a0a2,_0x3661b0);writeCliSideChannelLine(''),writeCliSideChannelLine(a106_0xc9a02d[_0x1737ee(0x1e1)](_0x1737ee(0x207)+_0x28b9d2['length']+_0x1737ee(0x1e3)));const _0x5833c3=_0x165d7f[_0x1737ee(0x209)]&&_0x165d7f[_0x1737ee(0x1f0)];if(!_0x5833c3){writeCliSideChannelLine(renderSyncSummary(_0x28b9d2,_0x50a0a2['size']>0x0));const _0x43a7be=await askConfirm(_0x1737ee(0x1dc));if(!_0x43a7be)return writeCliSideChannelLine(a106_0xc9a02d[_0x1737ee(0x1fa)](_0x1737ee(0x201))),{'ok':!![]};}let _0x5f6ab3=_0x165d7f['jsUrl'],_0x12bab7=_0x165d7f[_0x1737ee(0x1f0)];!_0x5f6ab3&&(_0x5f6ab3=await askJsUrl());!_0x12bab7&&(_0x12bab7=await askCssUrl());const _0x4f7b84=await askConfirm('\x20\x20Create\x20'+_0x28b9d2[_0x1737ee(0x1f6)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x5f6ab3+_0x1737ee(0x202)+_0x12bab7+'?');if(!_0x4f7b84)return writeCliSideChannelLine(a106_0xc9a02d[_0x1737ee(0x1fa)](_0x1737ee(0x201))),{'ok':!![]};const _0x1054e5=[_0x5f6ab3,_0x12bab7],_0x51edeb=startSpinner(_0x1737ee(0x1d9)+_0x28b9d2['length']+_0x1737ee(0x1ed));try{const _0x503ecb=await doCreateMenus(_0x23f94b[_0x1737ee(0x1e2)],_0x23f94b[_0x1737ee(0x1cf)],_0x28b9d2,_0x1054e5);return stopSpinner(_0x51edeb,'Created\x20'+_0x503ecb[_0x1737ee(0x1ef)]+_0x1737ee(0x1f4),!![]),{'ok':!![],'data':_0x503ecb,'message':'Menu\x20sync\x20completed:\x20'+_0x503ecb[_0x1737ee(0x1ef)]+_0x1737ee(0x1eb)+_0x503ecb[_0x1737ee(0x1e7)]+_0x1737ee(0x1d2)};}catch(_0x2d60f1){stopSpinner(_0x51edeb,_0x1737ee(0x1db),![]);throw CliErrors['validation'](_0x2d60f1 instanceof Error?_0x2d60f1[_0x1737ee(0x1f8)]:_0x1737ee(0x1db));}}};function parseParams(_0x15601a){const _0x4d9a49=a106_0x4623f7;if(!_0x15601a)return{};try{const _0xc05400=JSON[_0x4d9a49(0x1ca)](_0x15601a);if(typeof _0xc05400!==_0x4d9a49(0x1d0)||_0xc05400===null||Array[_0x4d9a49(0x1d8)](_0xc05400))return{};return{'jsUrl':typeof _0xc05400['jsUrl']===_0x4d9a49(0x205)?_0xc05400['jsUrl'][_0x4d9a49(0x1dd)]():undefined,'cssUrl':typeof _0xc05400['cssUrl']===_0x4d9a49(0x205)?_0xc05400['cssUrl'][_0x4d9a49(0x1dd)]():undefined,'pages':Array['isArray'](_0xc05400[_0x4d9a49(0x208)])?_0xc05400[_0x4d9a49(0x208)]['map'](String):undefined};}catch{return{};}}