@lovrabet/rabetbase-cli 2.1.14-beta.2 → 2.2.0-beta.1

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 (209) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -0
  60. package/lib/commands/dataset/relation-delete.js +1 -0
  61. package/lib/commands/dataset/relation-shared.js +1 -0
  62. package/lib/commands/dataset/relation-update.js +1 -0
  63. package/lib/commands/dataset/relations.js +1 -0
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/shared/compare-table.js +1 -1
  87. package/lib/commands/menu/shared/index.js +1 -1
  88. package/lib/commands/menu/shared/inquirer.js +1 -1
  89. package/lib/commands/menu/shared/local-pages.js +1 -1
  90. package/lib/commands/menu/shared/logic.js +1 -1
  91. package/lib/commands/menu/shared/service.js +1 -1
  92. package/lib/commands/menu/shared/sync-core.js +1 -1
  93. package/lib/commands/menu/shared/update-core.js +1 -1
  94. package/lib/commands/menu/shared/valid-url.js +1 -1
  95. package/lib/commands/menu/sync.js +1 -1
  96. package/lib/commands/menu/update.js +1 -1
  97. package/lib/commands/page/generate-start.js +1 -1
  98. package/lib/commands/page/generate-status.js +1 -1
  99. package/lib/commands/page/index.js +1 -1
  100. package/lib/commands/page/pull.js +1 -1
  101. package/lib/commands/page/push.js +1 -1
  102. package/lib/commands/page/relation-audit.js +1 -0
  103. package/lib/commands/page/shared.js +1 -1
  104. package/lib/commands/page/standard-page-status.js +1 -1
  105. package/lib/commands/page/sync.js +1 -1
  106. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  107. package/lib/commands/project/create/format-elapsed.js +1 -1
  108. package/lib/commands/project/create/main.js +1 -1
  109. package/lib/commands/project/create/non-interactive.js +1 -1
  110. package/lib/commands/project/create/project-template-path.js +1 -1
  111. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  112. package/lib/commands/project/create/use-format-code.js +1 -1
  113. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  114. package/lib/commands/project/index.js +1 -1
  115. package/lib/commands/project/init.js +1 -1
  116. package/lib/commands/project/upgrade.js +1 -1
  117. package/lib/commands/registry.js +1 -1
  118. package/lib/commands/run/index.js +1 -1
  119. package/lib/commands/schema.js +1 -1
  120. package/lib/commands/skill/index.js +1 -1
  121. package/lib/commands/sql/create.js +1 -1
  122. package/lib/commands/sql/delete.js +1 -1
  123. package/lib/commands/sql/detail.js +1 -1
  124. package/lib/commands/sql/exec.js +1 -1
  125. package/lib/commands/sql/index.js +1 -1
  126. package/lib/commands/sql/list.js +1 -1
  127. package/lib/commands/sql/pull.js +1 -1
  128. package/lib/commands/sql/push.js +1 -1
  129. package/lib/commands/sql/save.js +1 -1
  130. package/lib/commands/sql/shared.js +1 -1
  131. package/lib/commands/sql/status.js +1 -1
  132. package/lib/commands/sql/validate.js +1 -1
  133. package/lib/config/schema.js +1 -1
  134. package/lib/constant/cdn.js +1 -1
  135. package/lib/constant/cli.js +1 -1
  136. package/lib/constant/defaults.js +1 -1
  137. package/lib/constant/domain.js +1 -1
  138. package/lib/constant/env.js +1 -1
  139. package/lib/constant/output.js +1 -1
  140. package/lib/constant/paths.js +1 -1
  141. package/lib/constant/risk.js +1 -1
  142. package/lib/context.js +1 -1
  143. package/lib/core/alias-resolver.js +1 -1
  144. package/lib/core/api-client.js +1 -1
  145. package/lib/core/bff/config.js +1 -1
  146. package/lib/core/bff/file-system.js +1 -1
  147. package/lib/core/bff/hash.js +1 -1
  148. package/lib/core/bff/lock.js +1 -1
  149. package/lib/core/bff/utils.js +1 -1
  150. package/lib/core/db-resolver.js +1 -1
  151. package/lib/core/page/file-system.js +1 -1
  152. package/lib/core/page/hash.js +1 -1
  153. package/lib/core/page/lock.js +1 -1
  154. package/lib/core/sql-sync/config.js +1 -1
  155. package/lib/core/sql-sync/file-system.js +1 -1
  156. package/lib/core/sql-sync/hash.js +1 -1
  157. package/lib/core/sql-sync/lock.js +1 -1
  158. package/lib/core/sql-sync/utils.js +1 -1
  159. package/lib/core/sql-validator.js +1 -1
  160. package/lib/errors.js +1 -1
  161. package/lib/framework/build-all-flags.js +1 -1
  162. package/lib/framework/flags.js +1 -1
  163. package/lib/framework/help.js +1 -1
  164. package/lib/framework/index.js +1 -1
  165. package/lib/framework/output.js +1 -1
  166. package/lib/framework/response.js +1 -1
  167. package/lib/framework/runner-alias.js +1 -1
  168. package/lib/framework/runner.js +1 -1
  169. package/lib/framework/schema-export.js +1 -1
  170. package/lib/framework/types.js +1 -1
  171. package/lib/generated/build-info.js +1 -1
  172. package/lib/help.js +1 -1
  173. package/lib/skills/main.js +1 -1
  174. package/lib/skills/npx-skills-add.js +1 -1
  175. package/lib/telemetry/cli-command-trace.js +1 -1
  176. package/lib/telemetry/cli-help-trace.js +1 -1
  177. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  178. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  179. package/lib/telemetry/send-cli-trace-log.js +1 -1
  180. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  181. package/lib/utils/ai_config.js +1 -1
  182. package/lib/utils/apply-jq-filter.js +1 -1
  183. package/lib/utils/cdn-config.js +1 -1
  184. package/lib/utils/check-sdk-version.js +1 -1
  185. package/lib/utils/cli-version-check.js +1 -1
  186. package/lib/utils/cli-version-policy.js +1 -1
  187. package/lib/utils/config.js +1 -1
  188. package/lib/utils/copy-directory.js +1 -1
  189. package/lib/utils/entity-with-id.js +1 -1
  190. package/lib/utils/file-utils.js +1 -1
  191. package/lib/utils/guides-cdn.js +1 -1
  192. package/lib/utils/http-client.js +1 -1
  193. package/lib/utils/is-non-interactive.js +1 -1
  194. package/lib/utils/logger.js +1 -1
  195. package/lib/utils/params.js +1 -1
  196. package/lib/utils/platform.js +1 -1
  197. package/lib/utils/rules-cdn.js +1 -1
  198. package/lib/utils/sleep.js +1 -1
  199. package/lib/utils/template-replacer.js +1 -1
  200. package/lib/utils/update-notice.js +1 -0
  201. package/lib/utils/version.js +1 -1
  202. package/lib/utils/with-active-cookie.js +1 -1
  203. package/lib/utils/write-cli-side-channel.js +1 -1
  204. package/package.json +1 -1
  205. package/lib/commands/dataset/link-create.js +0 -1
  206. package/lib/commands/dataset/link-delete.js +0 -1
  207. package/lib/commands/dataset/link-shared.js +0 -1
  208. package/lib/commands/dataset/link-update.js +0 -1
  209. package/lib/commands/dataset/links.js +0 -1
@@ -1 +1 @@
1
- const a83_0x39d162=a83_0x4eba;function a83_0x4eba(_0x5c2030,_0x205ef1){_0x5c2030=_0x5c2030-0xa2;const _0x2ad34d=a83_0x2ad3();let _0x4ebafe=_0x2ad34d[_0x5c2030];return _0x4ebafe;}(function(_0x204ae3,_0x452964){const _0x1f78c8=a83_0x4eba,_0x4ccc00=_0x204ae3();while(!![]){try{const _0x274b15=parseInt(_0x1f78c8(0xb2))/0x1*(parseInt(_0x1f78c8(0xb7))/0x2)+-parseInt(_0x1f78c8(0xa9))/0x3*(-parseInt(_0x1f78c8(0xa3))/0x4)+parseInt(_0x1f78c8(0xac))/0x5*(-parseInt(_0x1f78c8(0xb8))/0x6)+parseInt(_0x1f78c8(0xb9))/0x7*(parseInt(_0x1f78c8(0xab))/0x8)+parseInt(_0x1f78c8(0xaa))/0x9*(parseInt(_0x1f78c8(0xc3))/0xa)+parseInt(_0x1f78c8(0xb3))/0xb*(parseInt(_0x1f78c8(0xa6))/0xc)+-parseInt(_0x1f78c8(0xc2))/0xd;if(_0x274b15===_0x452964)break;else _0x4ccc00['push'](_0x4ccc00['shift']());}catch(_0x2059e9){_0x4ccc00['push'](_0x4ccc00['shift']());}}}(a83_0x2ad3,0xeba71));function a83_0x2ad3(){const _0x5bda0c=['command','error','stringify','details','20601230eaeHoU','40ZmSena','log','logs','470804ADLfwv','read','\x20\x20\x20Time:\x20','36KrsRXY','timestamp','toLocaleString','33SVjiyw','18405NEDlYq','3800576eGwcZz','5JvheSf','message','readLogs','\x20\x20\x20Duration:\x20','success','duration','1dFxKoS','2876632VTXjTE','length','warn','en-US','739430YnNgUi','10844922RpqyrX','28JCAfiG','level','keys','write','*\x20No\x20logs\x20found'];a83_0x2ad3=function(){return _0x5bda0c;};return a83_0x2ad3();}import{logger}from'../../utils/logger.js';function printLogs(_0x76b4b9){const _0x4da5f7=a83_0x4eba;if(_0x76b4b9[_0x4da5f7(0xb4)]===0x0){console[_0x4da5f7(0xc4)](_0x4da5f7(0xbd));return;}console[_0x4da5f7(0xc4)]('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x76b4b9['forEach']((_0x5277c1,_0x368b0d)=>{const _0x307e87=_0x4da5f7,_0x41b41e=new Date(_0x5277c1[_0x307e87(0xa7)])[_0x307e87(0xa8)](_0x307e87(0xb6)),_0x10acc2=_0x5277c1[_0x307e87(0xba)]===_0x307e87(0xb0)?'√':_0x5277c1[_0x307e87(0xba)]===_0x307e87(0xbf)?'×':_0x5277c1[_0x307e87(0xba)]===_0x307e87(0xb5)?'!':'i';console[_0x307e87(0xc4)](_0x368b0d+0x1+'.\x20'+_0x10acc2+'\x20['+_0x5277c1[_0x307e87(0xbe)]+']\x20'+_0x5277c1[_0x307e87(0xad)]),console[_0x307e87(0xc4)](_0x307e87(0xa5)+_0x41b41e),_0x5277c1['duration']&&console['log'](_0x307e87(0xaf)+_0x5277c1[_0x307e87(0xb1)]+'ms'),_0x5277c1[_0x307e87(0xc1)]&&Object[_0x307e87(0xbb)](_0x5277c1[_0x307e87(0xc1)])['length']>0x0&&console[_0x307e87(0xc4)]('\x20\x20\x20Details:\x20'+JSON[_0x307e87(0xc0)](_0x5277c1[_0x307e87(0xc1)],null,0x2)),console[_0x307e87(0xc4)]('');});}export const logsDefinitions=[{'service':a83_0x39d162(0xa2),'command':'show','description':'View\x20command\x20history\x20logs','risk':a83_0x39d162(0xa4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2b19f3){const _0xfff3ec=a83_0x39d162;return printLogs(logger[_0xfff3ec(0xae)]()),{'ok':!![]};}},{'service':'logs','command':'clear','description':'Clear\x20command\x20history\x20logs','risk':a83_0x39d162(0xbc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x114efe){const _0x1e10b4=a83_0x39d162;return logger['clearLogs'](),console[_0x1e10b4(0xc4)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
1
+ const a83_0x2681d2=a83_0x5dfc;function a83_0x5dfc(_0x5bd585,_0x321c20){_0x5bd585=_0x5bd585-0xf7;const _0x53154a=a83_0x5315();let _0x5dfc6a=_0x53154a[_0x5bd585];return _0x5dfc6a;}(function(_0xa9c11,_0xa87a7a){const _0x51dc2a=a83_0x5dfc,_0x1793a4=_0xa9c11();while(!![]){try{const _0x44d135=-parseInt(_0x51dc2a(0x105))/0x1*(-parseInt(_0x51dc2a(0x113))/0x2)+parseInt(_0x51dc2a(0x117))/0x3*(parseInt(_0x51dc2a(0x10d))/0x4)+-parseInt(_0x51dc2a(0x107))/0x5*(parseInt(_0x51dc2a(0xff))/0x6)+parseInt(_0x51dc2a(0x110))/0x7+parseInt(_0x51dc2a(0x109))/0x8*(parseInt(_0x51dc2a(0x119))/0x9)+parseInt(_0x51dc2a(0xfa))/0xa+-parseInt(_0x51dc2a(0xfc))/0xb;if(_0x44d135===_0xa87a7a)break;else _0x1793a4['push'](_0x1793a4['shift']());}catch(_0x2e3ceb){_0x1793a4['push'](_0x1793a4['shift']());}}}(a83_0x5315,0x5dfa6));import{logger}from'../../utils/logger.js';function a83_0x5315(){const _0xb50e6d=['*\x20Logs\x20cleared','write','45reurab','length','9IRyjCK','View\x20command\x20history\x20logs','read','details','toLocaleString','3185720YhCVIg','en-US','10611997rqEsLh','success','stringify','188850ZtJTBq','readLogs','log','\x20\x20\x20Details:\x20','duration','level','519051RleeZC','show','5HkhoZC','*\x20No\x20logs\x20found','2409448tGYeAb','\x20\x20\x20Time:\x20','logs','\x20\x20\x20Duration:\x20','57308vfAddg','message','keys','191989LaFMsG','*\x20Lovrabet\x20CLI\x20logs:\x0a','timestamp','2fJBEdc','forEach'];a83_0x5315=function(){return _0xb50e6d;};return a83_0x5315();}function printLogs(_0x435a6b){const _0x2361ab=a83_0x5dfc;if(_0x435a6b[_0x2361ab(0x118)]===0x0){console[_0x2361ab(0x101)](_0x2361ab(0x108));return;}console[_0x2361ab(0x101)](_0x2361ab(0x111)),_0x435a6b[_0x2361ab(0x114)]((_0x399bc2,_0x5e5703)=>{const _0x3a82b4=_0x2361ab,_0x465d6e=new Date(_0x399bc2[_0x3a82b4(0x112)])[_0x3a82b4(0xf9)](_0x3a82b4(0xfb)),_0x365650=_0x399bc2['level']===_0x3a82b4(0xfd)?'√':_0x399bc2[_0x3a82b4(0x104)]==='error'?'×':_0x399bc2['level']==='warn'?'!':'i';console[_0x3a82b4(0x101)](_0x5e5703+0x1+'.\x20'+_0x365650+'\x20['+_0x399bc2['command']+']\x20'+_0x399bc2[_0x3a82b4(0x10e)]),console['log'](_0x3a82b4(0x10a)+_0x465d6e),_0x399bc2[_0x3a82b4(0x103)]&&console['log'](_0x3a82b4(0x10c)+_0x399bc2[_0x3a82b4(0x103)]+'ms'),_0x399bc2[_0x3a82b4(0xf8)]&&Object[_0x3a82b4(0x10f)](_0x399bc2[_0x3a82b4(0xf8)])[_0x3a82b4(0x118)]>0x0&&console[_0x3a82b4(0x101)](_0x3a82b4(0x102)+JSON[_0x3a82b4(0xfe)](_0x399bc2['details'],null,0x2)),console[_0x3a82b4(0x101)]('');});}export const logsDefinitions=[{'service':a83_0x2681d2(0x10b),'command':a83_0x2681d2(0x106),'description':a83_0x2681d2(0x11a),'risk':a83_0x2681d2(0xf7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x54f09d){const _0xf5f243=a83_0x2681d2;return printLogs(logger[_0xf5f243(0x100)]()),{'ok':!![]};}},{'service':a83_0x2681d2(0x10b),'command':'clear','description':'Clear\x20command\x20history\x20logs','risk':a83_0x2681d2(0x116),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x108518){const _0x146fdc=a83_0x2681d2;return logger['clearLogs'](),console[_0x146fdc(0x101)](_0x146fdc(0x115)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x4fbd9f,_0x3df1ae){const _0x599ce1=a84_0x4571,_0x5168e2=_0x4fbd9f();while(!![]){try{const _0x1a92db=-parseInt(_0x599ce1(0x122))/0x1+parseInt(_0x599ce1(0x121))/0x2*(-parseInt(_0x599ce1(0x11d))/0x3)+-parseInt(_0x599ce1(0x11a))/0x4+parseInt(_0x599ce1(0x11c))/0x5*(parseInt(_0x599ce1(0x120))/0x6)+parseInt(_0x599ce1(0x119))/0x7+parseInt(_0x599ce1(0x11f))/0x8*(parseInt(_0x599ce1(0x11e))/0x9)+parseInt(_0x599ce1(0x11b))/0xa*(parseInt(_0x599ce1(0x123))/0xb);if(_0x1a92db===_0x3df1ae)break;else _0x5168e2['push'](_0x5168e2['shift']());}catch(_0x1c9927){_0x5168e2['push'](_0x5168e2['shift']());}}}(a84_0x19c6,0x251ef));import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a84_0x4571(_0x920552,_0x4468c7){_0x920552=_0x920552-0x119;const _0x19c69b=a84_0x19c6();let _0x45718e=_0x19c69b[_0x920552];return _0x45718e;}function a84_0x19c6(){const _0xac373=['36311jqseTh','879221ARmLoj','615456zBtiUe','530dLfBUx','10CYdSNJ','37029OfYFWP','343755ZfmHPQ','16cjFSnN','542838TJwGHC','2VGsMaE','239638ReoIvV'];a84_0x19c6=function(){return _0xac373;};return a84_0x19c6();}export const menuDefinitions=[menuSync,menuUpdate];
1
+ function a84_0x2858(){const _0x50f95c=['1348739ezVmOs','1618400vhJibO','87342bGItyy','496348LdJOTO','3gZdPyD','367350svLFye','6pHgQmp','138198ChHDmw','1529019qZAFIT'];a84_0x2858=function(){return _0x50f95c;};return a84_0x2858();}(function(_0x15a398,_0xb35b13){const _0x13e593=a84_0xdfee,_0x5badcb=_0x15a398();while(!![]){try{const _0xc224ce=parseInt(_0x13e593(0x83))/0x1+parseInt(_0x13e593(0x7f))/0x2+parseInt(_0x13e593(0x85))/0x3*(parseInt(_0x13e593(0x84))/0x4)+parseInt(_0x13e593(0x7d))/0x5+-parseInt(_0x13e593(0x7e))/0x6*(parseInt(_0x13e593(0x81))/0x7)+-parseInt(_0x13e593(0x82))/0x8+parseInt(_0x13e593(0x80))/0x9;if(_0xc224ce===_0xb35b13)break;else _0x5badcb['push'](_0x5badcb['shift']());}catch(_0x3660f2){_0x5badcb['push'](_0x5badcb['shift']());}}}(a84_0x2858,0x1f790));function a84_0xdfee(_0x5aa4f4,_0x480a5d){_0x5aa4f4=_0x5aa4f4-0x7d;const _0x2858a6=a84_0x2858();let _0xdfee4=_0x2858a6[_0x5aa4f4];return _0xdfee4;}import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
@@ -1 +1 @@
1
- (function(_0x4b9466,_0x50ce83){const _0x2d871f=a85_0x4880,_0x1c1d00=_0x4b9466();while(!![]){try{const _0xe2ed7=-parseInt(_0x2d871f(0x19f))/0x1*(-parseInt(_0x2d871f(0x1a7))/0x2)+parseInt(_0x2d871f(0x1b1))/0x3*(-parseInt(_0x2d871f(0x1b2))/0x4)+-parseInt(_0x2d871f(0x1ac))/0x5*(parseInt(_0x2d871f(0x19c))/0x6)+parseInt(_0x2d871f(0x1b0))/0x7*(parseInt(_0x2d871f(0x1a5))/0x8)+-parseInt(_0x2d871f(0x1a9))/0x9+parseInt(_0x2d871f(0x197))/0xa*(parseInt(_0x2d871f(0x1a3))/0xb)+parseInt(_0x2d871f(0x194))/0xc;if(_0xe2ed7===_0x50ce83)break;else _0x1c1d00['push'](_0x1c1d00['shift']());}catch(_0x1c0f06){_0x1c1d00['push'](_0x1c1d00['shift']());}}}(a85_0x303a,0x45676));function strWidth(_0x388446){const _0x557068=a85_0x4880;let _0x2b5212=0x0;for(const _0xfd130b of _0x388446){_0x2b5212+=/[\u4e00-\u9fa5]/[_0x557068(0x1aa)](_0xfd130b)?0x2:0x1;}return _0x2b5212;}function padRight(_0x475204,_0x29804d){const _0x3c5c21=a85_0x4880,_0x313e44=strWidth(_0x475204);return _0x475204+'\x20'[_0x3c5c21(0x195)](Math[_0x3c5c21(0x1a4)](0x0,_0x29804d-_0x313e44));}function a85_0x4880(_0x147984,_0x5b0f49){_0x147984=_0x147984-0x191;const _0x303a30=a85_0x303a();let _0x4880a0=_0x303a30[_0x147984];return _0x4880a0;}export function renderCompareTable(_0x7c56c6,_0x300c12={}){const _0x3c2b22=a85_0x4880;if(_0x7c56c6['length']===0x0)return'';const _0x227749=_0x300c12[_0x3c2b22(0x1a1)]??!![],_0x421439=Math[_0x3c2b22(0x1a4)](0x1e,..._0x7c56c6[_0x3c2b22(0x19e)](_0x5c03dd=>strWidth(_0x5c03dd[_0x3c2b22(0x191)]))),_0x5b6dd6=0x4,_0x1482a6=[],_0x2a10ea='\x20\x20'+padRight(_0x3c2b22(0x19b),_0x421439),_0x46d6c2=padRight(_0x3c2b22(0x1a2),_0x5b6dd6),_0x21bc02=_0x227749?'\x20\x20'+padRight(_0x3c2b22(0x196),_0x5b6dd6):'';_0x1482a6[_0x3c2b22(0x193)](_0x2a10ea+'\x20\x20'+_0x46d6c2+(_0x227749?_0x21bc02:'')),_0x1482a6[_0x3c2b22(0x193)]('\x20\x20'+'─'[_0x3c2b22(0x195)](_0x421439)+'\x20\x20'+'─'[_0x3c2b22(0x195)](_0x5b6dd6)+(_0x227749?'\x20\x20'+'─'[_0x3c2b22(0x195)](_0x5b6dd6):''));for(const _0x3413b5 of _0x7c56c6){const _0x346300=padRight(_0x3413b5[_0x3c2b22(0x191)],_0x421439),_0x33ae4c=_0x3413b5[_0x3c2b22(0x198)]?'✓':'✗',_0x16cfb5=padRight(_0x33ae4c,_0x5b6dd6);let _0x49cbad='\x20\x20'+_0x346300+'\x20\x20'+_0x16cfb5;if(_0x227749){const _0x4079da=_0x3413b5['online']?'✓':'✗';_0x49cbad+='\x20\x20'+padRight(_0x4079da,_0x5b6dd6);}_0x1482a6[_0x3c2b22(0x193)](_0x49cbad);}return _0x1482a6['join']('\x0a');}export function renderSyncSummary(_0x4a1fd4,_0x3bd96e){const _0x2addbd=a85_0x4880;if(_0x4a1fd4['length']===0x0)return _0x3bd96e?_0x2addbd(0x1ab):_0x2addbd(0x19d);const _0x1d04b6=['\x20\x20'+_0x4a1fd4[_0x2addbd(0x1a0)]+_0x2addbd(0x1ae)];for(const _0x55818d of _0x4a1fd4){_0x1d04b6[_0x2addbd(0x193)](_0x2addbd(0x1af)+_0x55818d[_0x2addbd(0x191)]+'\x20('+_0x55818d[_0x2addbd(0x1ad)]+')');}return _0x1d04b6[_0x2addbd(0x19a)]('\x0a');}export function renderUpdateSummary(_0x4fab56,_0x482dfb){const _0x7fb861=a85_0x4880;if(_0x4fab56[_0x7fb861(0x1a0)]===0x0)return _0x7fb861(0x192);const _0x4f41f5=['\x20\x20'+_0x4fab56['length']+'\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:',_0x7fb861(0x199)+(_0x482dfb[0x0]??_0x7fb861(0x1a8)),'\x20\x20\x20\x20CSS:\x20'+(_0x482dfb[0x1]??_0x7fb861(0x1a8)),'',_0x7fb861(0x1a6)+_0x4fab56[_0x7fb861(0x19a)](',\x20')];return _0x4f41f5['join']('\x0a');}function a85_0x303a(){const _0x258539=['1969lYWZfd','max','4068384uWlwoE','\x20\x20Affected\x20menus:\x20','103196HgBfsU','(unchanged)','3081834GUgpxn','test','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','236285kpFsaC','path','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','\x20\x20\x20\x20•\x20','7AGIXuT','486885sqxnCx','12fRjPFM','label','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','push','7226148NQxvcH','repeat','Platform','7110UCkGLu','local','\x20\x20\x20\x20JS:\x20\x20','join','Menu\x20Name','42NDztoN','\x20\x20No\x20pages\x20to\x20sync.','map','4CvRpxs','length','showOnline','Local'];a85_0x303a=function(){return _0x258539;};return a85_0x303a();}
1
+ (function(_0x154c16,_0x4564ea){const _0x2cecf=a85_0x25ee,_0x4711f8=_0x154c16();while(!![]){try{const _0x25b986=-parseInt(_0x2cecf(0xe3))/0x1*(-parseInt(_0x2cecf(0xec))/0x2)+parseInt(_0x2cecf(0xf8))/0x3*(parseInt(_0x2cecf(0xee))/0x4)+parseInt(_0x2cecf(0xfc))/0x5*(parseInt(_0x2cecf(0xe1))/0x6)+-parseInt(_0x2cecf(0xe8))/0x7*(parseInt(_0x2cecf(0xf1))/0x8)+-parseInt(_0x2cecf(0xf2))/0x9+-parseInt(_0x2cecf(0xf4))/0xa*(parseInt(_0x2cecf(0xfa))/0xb)+-parseInt(_0x2cecf(0xf0))/0xc;if(_0x25b986===_0x4564ea)break;else _0x4711f8['push'](_0x4711f8['shift']());}catch(_0x59b9e3){_0x4711f8['push'](_0x4711f8['shift']());}}}(a85_0x5db0,0x35a0a));function a85_0x5db0(){const _0x357760=['\x20\x20No\x20pages\x20to\x20sync.','7IpHpKQ','Local','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','(unchanged)','2EiDoIS','path','64308yNfObv','push','2032884hvCyGO','255336IVCHTQ','1567143iSbMbj','\x20\x20\x20\x20CSS:\x20','20AkOzQd','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','\x20\x20Affected\x20menus:\x20','repeat','33OmFDxJ','\x20\x20\x20\x20JS:\x20\x20','633974uKSrVs','join','310nQAPoP','max','length','map','41724FmGtIT','online','102382lEFcSR','label','test','local'];a85_0x5db0=function(){return _0x357760;};return a85_0x5db0();}function strWidth(_0x28c06d){const _0x50ec6a=a85_0x25ee;let _0x158ae8=0x0;for(const _0x150506 of _0x28c06d){_0x158ae8+=/[\u4e00-\u9fa5]/[_0x50ec6a(0xe5)](_0x150506)?0x2:0x1;}return _0x158ae8;}function padRight(_0x3dccad,_0x2a8bde){const _0x202f3c=a85_0x25ee,_0x2ecb95=strWidth(_0x3dccad);return _0x3dccad+'\x20'['repeat'](Math[_0x202f3c(0xfd)](0x0,_0x2a8bde-_0x2ecb95));}function a85_0x25ee(_0xa25442,_0x1b7607){_0xa25442=_0xa25442-0xe1;const _0x5db0a7=a85_0x5db0();let _0x25ee96=_0x5db0a7[_0xa25442];return _0x25ee96;}export function renderCompareTable(_0x4d8c4c,_0x1ffa07={}){const _0x40ed3e=a85_0x25ee;if(_0x4d8c4c[_0x40ed3e(0xfe)]===0x0)return'';const _0x2d2a95=_0x1ffa07['showOnline']??!![],_0x1504e1=Math['max'](0x1e,..._0x4d8c4c[_0x40ed3e(0xff)](_0x30ece6=>strWidth(_0x30ece6['label']))),_0x2a0d51=0x4,_0x6ea8f1=[],_0x126a7a='\x20\x20'+padRight('Menu\x20Name',_0x1504e1),_0x487115=padRight(_0x40ed3e(0xe9),_0x2a0d51),_0x491022=_0x2d2a95?'\x20\x20'+padRight('Platform',_0x2a0d51):'';_0x6ea8f1[_0x40ed3e(0xef)](_0x126a7a+'\x20\x20'+_0x487115+(_0x2d2a95?_0x491022:'')),_0x6ea8f1[_0x40ed3e(0xef)]('\x20\x20'+'─'[_0x40ed3e(0xf7)](_0x1504e1)+'\x20\x20'+'─'[_0x40ed3e(0xf7)](_0x2a0d51)+(_0x2d2a95?'\x20\x20'+'─'['repeat'](_0x2a0d51):''));for(const _0x2e401a of _0x4d8c4c){const _0x1f1f5c=padRight(_0x2e401a[_0x40ed3e(0xe4)],_0x1504e1),_0x30d614=_0x2e401a[_0x40ed3e(0xe6)]?'✓':'✗',_0x5bf276=padRight(_0x30d614,_0x2a0d51);let _0x26004b='\x20\x20'+_0x1f1f5c+'\x20\x20'+_0x5bf276;if(_0x2d2a95){const _0x4757f1=_0x2e401a[_0x40ed3e(0xe2)]?'✓':'✗';_0x26004b+='\x20\x20'+padRight(_0x4757f1,_0x2a0d51);}_0x6ea8f1[_0x40ed3e(0xef)](_0x26004b);}return _0x6ea8f1[_0x40ed3e(0xfb)]('\x0a');}export function renderSyncSummary(_0x403772,_0x241c42){const _0x202a1b=a85_0x25ee;if(_0x403772[_0x202a1b(0xfe)]===0x0)return _0x241c42?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x202a1b(0xe7);const _0x1d6084=['\x20\x20'+_0x403772[_0x202a1b(0xfe)]+_0x202a1b(0xf5)];for(const _0x5b870e of _0x403772){_0x1d6084[_0x202a1b(0xef)]('\x20\x20\x20\x20•\x20'+_0x5b870e['label']+'\x20('+_0x5b870e[_0x202a1b(0xed)]+')');}return _0x1d6084[_0x202a1b(0xfb)]('\x0a');}export function renderUpdateSummary(_0x1376bb,_0xfc0d33){const _0x4674ce=a85_0x25ee;if(_0x1376bb[_0x4674ce(0xfe)]===0x0)return _0x4674ce(0xea);const _0x1f9244=['\x20\x20'+_0x1376bb[_0x4674ce(0xfe)]+'\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:',_0x4674ce(0xf9)+(_0xfc0d33[0x0]??_0x4674ce(0xeb)),_0x4674ce(0xf3)+(_0xfc0d33[0x1]??_0x4674ce(0xeb)),'',_0x4674ce(0xf6)+_0x1376bb['join'](',\x20')];return _0x1f9244[_0x4674ce(0xfb)]('\x0a');}
@@ -1 +1 @@
1
- (function(_0x4e99d0,_0x869533){var _0x1664c7=a86_0x3aee,_0x2a79f3=_0x4e99d0();while(!![]){try{var _0x497875=parseInt(_0x1664c7(0x128))/0x1*(-parseInt(_0x1664c7(0x126))/0x2)+-parseInt(_0x1664c7(0x123))/0x3*(parseInt(_0x1664c7(0x121))/0x4)+-parseInt(_0x1664c7(0x127))/0x5+parseInt(_0x1664c7(0x129))/0x6*(parseInt(_0x1664c7(0x120))/0x7)+parseInt(_0x1664c7(0x124))/0x8+-parseInt(_0x1664c7(0x11f))/0x9+parseInt(_0x1664c7(0x125))/0xa*(parseInt(_0x1664c7(0x122))/0xb);if(_0x497875===_0x869533)break;else _0x2a79f3['push'](_0x2a79f3['shift']());}catch(_0x50bfb7){_0x2a79f3['push'](_0x2a79f3['shift']());}}}(a86_0x3f1b,0xbef09));function a86_0x3aee(_0x243f5f,_0x3be0c0){_0x243f5f=_0x243f5f-0x11f;var _0x3f1b03=a86_0x3f1b();var _0x3aeef4=_0x3f1b03[_0x243f5f];return _0x3aeef4;}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';function a86_0x3f1b(){var _0x34b83b=['2956482JxFvUl','777keICJN','3291724LIFpOL','8257051GjwqhV','3ssjZwe','8249144lXGFoF','20QrwCns','2zBXeSL','1070090HzRCdV','1482346DSFFQM','59322mZdqkM'];a86_0x3f1b=function(){return _0x34b83b;};return a86_0x3f1b();}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';export*from'../../../commands/menu/shared/update-core.js';
1
+ (function(_0x14e135,_0x10f706){var _0x9a8689=a86_0x27be,_0x11c6d8=_0x14e135();while(!![]){try{var _0x1cb509=-parseInt(_0x9a8689(0x1f7))/0x1+-parseInt(_0x9a8689(0x1f6))/0x2*(-parseInt(_0x9a8689(0x1fc))/0x3)+parseInt(_0x9a8689(0x1f9))/0x4*(parseInt(_0x9a8689(0x1f4))/0x5)+-parseInt(_0x9a8689(0x1fb))/0x6*(-parseInt(_0x9a8689(0x1f5))/0x7)+-parseInt(_0x9a8689(0x1f3))/0x8+-parseInt(_0x9a8689(0x1f8))/0x9+parseInt(_0x9a8689(0x1fa))/0xa;if(_0x1cb509===_0x10f706)break;else _0x11c6d8['push'](_0x11c6d8['shift']());}catch(_0x38a3c3){_0x11c6d8['push'](_0x11c6d8['shift']());}}}(a86_0xa7c5,0x1998c));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 a86_0x27be(_0x36881e,_0x7bec2c){_0x36881e=_0x36881e-0x1f3;var _0xa7c592=a86_0xa7c5();var _0x27befb=_0xa7c592[_0x36881e];return _0x27befb;}export*from'../../../commands/menu/shared/local-pages.js';function a86_0xa7c5(){var _0x3f4d66=['74535lWtWEH','34013IhuElo','1108KQikMU','129160PoIDbr','342873JYONhs','4nMPWjq','3515740XxmSiO','18wmcatc','174sXnSnS','1128712Uglslu'];a86_0xa7c5=function(){return _0x3f4d66;};return a86_0xa7c5();}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
@@ -1 +1 @@
1
- (function(_0x362164,_0x50c627){const _0x5bdef7=a87_0xfd37,_0x49ae70=_0x362164();while(!![]){try{const _0xbd8c76=-parseInt(_0x5bdef7(0xe1))/0x1+parseInt(_0x5bdef7(0xe7))/0x2+parseInt(_0x5bdef7(0xdd))/0x3+parseInt(_0x5bdef7(0xe2))/0x4*(parseInt(_0x5bdef7(0xbc))/0x5)+parseInt(_0x5bdef7(0xe4))/0x6*(-parseInt(_0x5bdef7(0xd6))/0x7)+parseInt(_0x5bdef7(0xd1))/0x8+-parseInt(_0x5bdef7(0xbd))/0x9*(parseInt(_0x5bdef7(0xd4))/0xa);if(_0xbd8c76===_0x50c627)break;else _0x49ae70['push'](_0x49ae70['shift']());}catch(_0x104c0e){_0x49ae70['push'](_0x49ae70['shift']());}}}(a87_0x48e1,0x34d23));import a87_0x3e28e4 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a87_0x5d2ed3 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x987741){return _0x987741['catch'](_0x164bd2=>{const _0x333ac9=a87_0xfd37;if(_0x164bd2?.[_0x333ac9(0xd7)]===_0x333ac9(0xcb))throw CliErrors['cancelled']('Cancelled.');throw _0x164bd2;});}function a87_0xfd37(_0x4ee41c,_0xd6096b){_0x4ee41c=_0x4ee41c-0xb8;const _0x48e1e3=a87_0x48e1();let _0xfd37fa=_0x48e1e3[_0x4ee41c];return _0xfd37fa;}function a87_0x48e1(){const _0x215aab=['filter','Cancelled.','948985MEuqAo','564831ZXWVET','CSS\x20URL\x20check\x20failed','cancelled','green','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','path','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','[already\x20on\x20platform]','fail','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20Checking\x20CSS\x20URL\x20reachability...','map','start','ExitPromptError','JS\x20URL\x20checked','length','includes','stdin','gray','3318544kbSSVk','\x20\x20JS\x20URL:','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','100ROKsFk','cyan','241605wNXlnB','name','succeed','label','red','trim','No\x20menus\x20selected.','541596FHqyTZ','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','has','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','267007jntNBZ','4nfYssG','CSS\x20URL\x20checked','18cxaCJS','[new]','error','858700ZhacWy','\x20\x20CSS\x20URL:','No\x20local\x20pages\x20found.','isTTY'];a87_0x48e1=function(){return _0x215aab;};return a87_0x48e1();}export function startSpinner(_0x3e13e8){const _0x599772=a87_0xfd37;return a87_0x5d2ed3({'text':_0x3e13e8,'color':_0x599772(0xd5)})[_0x599772(0xca)]();}export function stopSpinner(_0x5ac266,_0x35def2,_0x1c1cb4){const _0xa124cd=a87_0xfd37;_0x1c1cb4?_0x5ac266[_0xa124cd(0xd8)](_0x35def2):_0x5ac266[_0xa124cd(0xc6)](_0x35def2);}export async function askConfirm(_0x4bae89){return onCancel(confirm({'message':_0x4bae89,'theme':{'prefix':''}}));}export async function askJsUrl(_0x1141f2){const _0x1d8e63=a87_0xfd37;while(!![]){const _0x68eae1=await onCancel(input({'message':_0x1d8e63(0xd2),'default':_0x1141f2,'theme':{'prefix':''}}));if(_0x68eae1['trim']()==='')throw CliErrors[_0x1d8e63(0xbf)](_0x1d8e63(0xbb));if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x68eae1[_0x1d8e63(0xdb)]())){console['error'](a87_0x3e28e4[_0x1d8e63(0xda)](_0x1d8e63(0xc1)));continue;}const _0x1a3f5d=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x41ece3=await isUrlReachable(_0x68eae1[_0x1d8e63(0xdb)]());stopSpinner(_0x1a3f5d,_0x1d8e63(0xcc),_0x41ece3);if(!_0x41ece3){console['error'](a87_0x3e28e4[_0x1d8e63(0xda)](_0x1d8e63(0xc7)));continue;}return _0x68eae1[_0x1d8e63(0xdb)]();}catch(_0x4a159d){stopSpinner(_0x1a3f5d,'JS\x20URL\x20check\x20failed',![]);throw _0x4a159d;}}}export async function askCssUrl(_0x4534a4){const _0x116060=a87_0xfd37;while(!![]){const _0x2e64e0=await onCancel(input({'message':_0x116060(0xe8),'default':_0x4534a4,'theme':{'prefix':''}}));if(_0x2e64e0[_0x116060(0xdb)]()==='')throw CliErrors[_0x116060(0xbf)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x2e64e0[_0x116060(0xdb)]())){console[_0x116060(0xe6)](a87_0x3e28e4[_0x116060(0xda)](_0x116060(0xc4)));continue;}const _0x461370=startSpinner(_0x116060(0xc8));try{const _0x47a04c=await isUrlReachable(_0x2e64e0[_0x116060(0xdb)]());stopSpinner(_0x461370,_0x116060(0xe3),_0x47a04c);if(!_0x47a04c){console[_0x116060(0xe6)](a87_0x3e28e4[_0x116060(0xda)](_0x116060(0xde)));continue;}return _0x2e64e0[_0x116060(0xdb)]();}catch(_0x534bdb){stopSpinner(_0x461370,_0x116060(0xbe),![]);throw _0x534bdb;}}}export async function selectPages(_0xbe5163,_0x2fdd56,_0x133d62){const _0xaab100=a87_0xfd37,_0x2cafd2=_0xbe5163[_0xaab100(0xc9)](_0x4dc928=>({'name':_0x4dc928[_0xaab100(0xd9)]+'\x20\x20'+(_0x2fdd56[_0xaab100(0xdf)](_0x4dc928[_0xaab100(0xc3)])?a87_0x3e28e4[_0xaab100(0xd0)](_0xaab100(0xc5)):a87_0x3e28e4[_0xaab100(0xc0)](_0xaab100(0xe5))),'value':_0x4dc928[_0xaab100(0xd9)],'checked':_0x133d62?_0x133d62[_0xaab100(0xce)](_0x4dc928['label']):!_0x2fdd56[_0xaab100(0xdf)](_0x4dc928['path'])}));if(_0x2cafd2['length']===0x0)throw new Error(_0xaab100(0xb8));const _0x1b61d0=await onCancel(checkbox({'message':_0xaab100(0xc2),'choices':_0x2cafd2,'loop':![],'theme':{'prefix':''}}));if(_0x1b61d0[_0xaab100(0xcd)]===0x0)throw new Error(_0xaab100(0xdc));return _0xbe5163[_0xaab100(0xba)](_0x3152c1=>_0x1b61d0[_0xaab100(0xce)](_0x3152c1[_0xaab100(0xd9)]));}export function isInteractive(){const _0x304e9c=a87_0xfd37;return process[_0x304e9c(0xcf)][_0x304e9c(0xb9)]===!![];}export function requireInteractive(){const _0x2b64b9=a87_0xfd37;if(!isInteractive())throw new Error(_0x2b64b9(0xe0)+_0x2b64b9(0xd3));}
1
+ (function(_0x4f9d65,_0x16dd25){const _0x55dbd6=a87_0x13e7,_0x4e46e6=_0x4f9d65();while(!![]){try{const _0x516e06=-parseInt(_0x55dbd6(0x1c9))/0x1*(-parseInt(_0x55dbd6(0x1dc))/0x2)+parseInt(_0x55dbd6(0x1d5))/0x3+parseInt(_0x55dbd6(0x1de))/0x4*(-parseInt(_0x55dbd6(0x1d6))/0x5)+parseInt(_0x55dbd6(0x1d1))/0x6*(parseInt(_0x55dbd6(0x1cc))/0x7)+-parseInt(_0x55dbd6(0x1c6))/0x8*(parseInt(_0x55dbd6(0x1df))/0x9)+parseInt(_0x55dbd6(0x1d0))/0xa+parseInt(_0x55dbd6(0x1cd))/0xb;if(_0x516e06===_0x16dd25)break;else _0x4e46e6['push'](_0x4e46e6['shift']());}catch(_0x459448){_0x4e46e6['push'](_0x4e46e6['shift']());}}}(a87_0xf378,0x2739d));import a87_0x2cf000 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';function a87_0xf378(){const _0x1d757c=['red','catch','939220vQVnlu','1902VhERub','has','name','No\x20local\x20pages\x20found.','197331uWTCcj','435BsYqyW','length','includes','gray','green','CSS\x20URL\x20checked','228HxGUSl','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','4564XtDtUM','84231IGUtjk','Cancelled.','path','fail','cyan','\x20\x20Checking\x20CSS\x20URL\x20reachability...','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','[already\x20on\x20platform]','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','[new]','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','trim','start','error','stdin','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','cancelled','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','label','test','200kMGAVB','isTTY','filter','1799ogrlHw','\x20\x20JS\x20URL:','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','1897puDzoe','475409Ynqlmb'];a87_0xf378=function(){return _0x1d757c;};return a87_0xf378();}import a87_0x35df74 from'ora';function a87_0x13e7(_0x2612cd,_0x1d861c){_0x2612cd=_0x2612cd-0x1bd;const _0xf37843=a87_0xf378();let _0x13e78a=_0xf37843[_0x2612cd];return _0x13e78a;}import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x23ecd1){const _0x4456b8=a87_0x13e7;return _0x23ecd1[_0x4456b8(0x1cf)](_0x5075fa=>{const _0x3b4576=_0x4456b8;if(_0x5075fa?.[_0x3b4576(0x1d3)]==='ExitPromptError')throw CliErrors['cancelled'](_0x3b4576(0x1e0));throw _0x5075fa;});}export function startSpinner(_0x12c2e1){const _0x3b6ab9=a87_0x13e7;return a87_0x35df74({'text':_0x12c2e1,'color':_0x3b6ab9(0x1e3)})[_0x3b6ab9(0x1be)]();}export function stopSpinner(_0x13fcbe,_0x5edf84,_0x852c42){const _0x5016a5=a87_0x13e7;_0x852c42?_0x13fcbe['succeed'](_0x5edf84):_0x13fcbe[_0x5016a5(0x1e2)](_0x5edf84);}export async function askConfirm(_0xcb4ff2){return onCancel(confirm({'message':_0xcb4ff2,'theme':{'prefix':''}}));}export async function askJsUrl(_0x1d15a8){const _0x31ef9b=a87_0x13e7;while(!![]){const _0xcf8169=await onCancel(input({'message':_0x31ef9b(0x1ca),'default':_0x1d15a8,'theme':{'prefix':''}}));if(_0xcf8169[_0x31ef9b(0x1bd)]()==='')throw CliErrors[_0x31ef9b(0x1c2)](_0x31ef9b(0x1e0));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x31ef9b(0x1c5)](_0xcf8169[_0x31ef9b(0x1bd)]())){console[_0x31ef9b(0x1bf)](a87_0x2cf000[_0x31ef9b(0x1ce)](_0x31ef9b(0x1dd)));continue;}const _0x42e253=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x272d63=await isUrlReachable(_0xcf8169[_0x31ef9b(0x1bd)]());stopSpinner(_0x42e253,'JS\x20URL\x20checked',_0x272d63);if(!_0x272d63){console[_0x31ef9b(0x1bf)](a87_0x2cf000[_0x31ef9b(0x1ce)](_0x31ef9b(0x1c1)));continue;}return _0xcf8169[_0x31ef9b(0x1bd)]();}catch(_0x472258){stopSpinner(_0x42e253,'JS\x20URL\x20check\x20failed',![]);throw _0x472258;}}}export async function askCssUrl(_0x3f7900){const _0x4db9a4=a87_0x13e7;while(!![]){const _0x5570e2=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0x3f7900,'theme':{'prefix':''}}));if(_0x5570e2['trim']()==='')throw CliErrors[_0x4db9a4(0x1c2)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0x4db9a4(0x1c5)](_0x5570e2['trim']())){console[_0x4db9a4(0x1bf)](a87_0x2cf000[_0x4db9a4(0x1ce)](_0x4db9a4(0x1e7)));continue;}const _0x58d054=startSpinner(_0x4db9a4(0x1e4));try{const _0x5e158c=await isUrlReachable(_0x5570e2[_0x4db9a4(0x1bd)]());stopSpinner(_0x58d054,_0x4db9a4(0x1db),_0x5e158c);if(!_0x5e158c){console[_0x4db9a4(0x1bf)](a87_0x2cf000[_0x4db9a4(0x1ce)](_0x4db9a4(0x1c3)));continue;}return _0x5570e2[_0x4db9a4(0x1bd)]();}catch(_0x5447dd){stopSpinner(_0x58d054,'CSS\x20URL\x20check\x20failed',![]);throw _0x5447dd;}}}export async function selectPages(_0x21caa3,_0x2ba80a,_0x328ee6){const _0x5d46e5=a87_0x13e7,_0x174c72=_0x21caa3['map'](_0x138b92=>({'name':_0x138b92[_0x5d46e5(0x1c4)]+'\x20\x20'+(_0x2ba80a[_0x5d46e5(0x1d2)](_0x138b92['path'])?a87_0x2cf000[_0x5d46e5(0x1d9)](_0x5d46e5(0x1e6)):a87_0x2cf000[_0x5d46e5(0x1da)](_0x5d46e5(0x1e8))),'value':_0x138b92[_0x5d46e5(0x1c4)],'checked':_0x328ee6?_0x328ee6[_0x5d46e5(0x1d8)](_0x138b92['label']):!_0x2ba80a[_0x5d46e5(0x1d2)](_0x138b92[_0x5d46e5(0x1e1)])}));if(_0x174c72[_0x5d46e5(0x1d7)]===0x0)throw new Error(_0x5d46e5(0x1d4));const _0x5f5cef=await onCancel(checkbox({'message':_0x5d46e5(0x1cb),'choices':_0x174c72,'loop':![],'theme':{'prefix':''}}));if(_0x5f5cef[_0x5d46e5(0x1d7)]===0x0)throw new Error('No\x20menus\x20selected.');return _0x21caa3[_0x5d46e5(0x1c8)](_0x54a52f=>_0x5f5cef['includes'](_0x54a52f[_0x5d46e5(0x1c4)]));}export function isInteractive(){const _0x117cf0=a87_0x13e7;return process[_0x117cf0(0x1c0)][_0x117cf0(0x1c7)]===!![];}export function requireInteractive(){const _0x2f1b9e=a87_0x13e7;if(!isInteractive())throw new Error(_0x2f1b9e(0x1e9)+_0x2f1b9e(0x1e5));}
@@ -1 +1 @@
1
- (function(_0x281996,_0xbe01c5){const _0x51ca23=a88_0x1bfd,_0x46acd4=_0x281996();while(!![]){try{const _0x45c84e=-parseInt(_0x51ca23(0xc2))/0x1+parseInt(_0x51ca23(0xc3))/0x2+-parseInt(_0x51ca23(0xc5))/0x3+parseInt(_0x51ca23(0xcb))/0x4*(-parseInt(_0x51ca23(0xd3))/0x5)+-parseInt(_0x51ca23(0xd0))/0x6+-parseInt(_0x51ca23(0xca))/0x7*(parseInt(_0x51ca23(0xd2))/0x8)+parseInt(_0x51ca23(0xcc))/0x9*(parseInt(_0x51ca23(0xbe))/0xa);if(_0x45c84e===_0xbe01c5)break;else _0x46acd4['push'](_0x46acd4['shift']());}catch(_0x4c6430){_0x46acd4['push'](_0x46acd4['shift']());}}}(a88_0x133c,0x8e4c6));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';function a88_0x1bfd(_0x4fbf21,_0x37ce85){_0x4fbf21=_0x4fbf21-0xbe;const _0x133cda=a88_0x133c();let _0x1bfdde=_0x133cda[_0x4fbf21];return _0x1bfdde;}function a88_0x133c(){const _0x2d2799=['filter','push','143767IdeBWS','793112AsLpbK','isDirectory','1216851iNUgDI','index.tsx','.tsx','split','replaceAll','280259vHuber','24ZJxGek','18RKbWGF','utf-8','concat','match','1036014mlSdtL','slice','24kvVYph','359510Uoxovt','endsWith','replace','7299370pVYJwV','path'];a88_0x133c=function(){return _0x2d2799;};return a88_0x133c();}const pagesDir=resolve(process['cwd'](),'src/pages');export function extractTitleFromComment(_0x35181e){const _0x33f2c7=a88_0x1bfd;try{const _0x13267e=readFileSync(_0x35181e,_0x33f2c7(0xcd)),_0xee2f53=_0x13267e[_0x33f2c7(0xcf)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0xee2f53&&_0xee2f53[0x1]){const _0x2232cb=_0xee2f53[0x1],_0x2928c2=_0x2232cb[_0x33f2c7(0xcf)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2928c2&&_0x2928c2[0x1])return _0x2928c2[0x1]['trim']();}let _0x4d2206=null;const _0x35856e=_0x13267e[_0x33f2c7(0xcf)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x35856e&&_0x35856e[0x1]&&(_0x4d2206=_0x35856e[0x1]);if(!_0x4d2206){const _0x5de73d=_0x13267e[_0x33f2c7(0xcf)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x5de73d&&_0x5de73d[0x1]&&(_0x4d2206=_0x5de73d[0x1]);}if(_0x4d2206){const _0x3bd1dc=new RegExp('\x5cb'+_0x4d2206+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x9dd9c7=_0x13267e['match'](_0x3bd1dc);if(_0x9dd9c7&&_0x9dd9c7[0x1])return _0x9dd9c7[0x1];return _0x4d2206;}return null;}catch(_0x1840db){return null;}}export function getLocalPages(_0x4111a1=pagesDir,_0x57973b=pagesDir){const _0x5e4622=a88_0x1bfd;let _0x180eca=[];const _0x1ce456=readdirSync(_0x4111a1);return _0x1ce456['forEach'](_0x5c1f37=>{const _0x42ca21=a88_0x1bfd,_0x100b76=join(_0x4111a1,_0x5c1f37),_0x2dd68d=statSync(_0x100b76);if(_0x2dd68d&&_0x2dd68d[_0x42ca21(0xc4)]())_0x180eca=_0x180eca[_0x42ca21(0xce)](getLocalPages(_0x100b76,_0x57973b));else{if(_0x5c1f37[_0x42ca21(0xd4)](_0x42ca21(0xc7))){let _0x229bec=relative(_0x57973b,_0x100b76);_0x229bec[_0x42ca21(0xd4)](_0x42ca21(0xc6))?_0x229bec=_0x229bec['replace'](/index\.tsx$/,''):_0x229bec=_0x229bec[_0x42ca21(0xd5)](/\.tsx$/,'');_0x229bec[_0x42ca21(0xd4)](sep)&&(_0x229bec=_0x229bec[_0x42ca21(0xd1)](0x0,-0x1));const _0x2b3064=_0x229bec[_0x42ca21(0xc8)](sep)['join']('/'),_0x4e788b=extractTitleFromComment(_0x100b76),_0x32a809=_0x4e788b||_0x2b3064;_0x180eca[_0x42ca21(0xc1)]({'path':_0x2b3064[_0x42ca21(0xc9)]('$',':'),'label':_0x32a809});}}}),_0x180eca[_0x5e4622(0xc0)](_0x1ad6ff=>_0x1ad6ff[_0x5e4622(0xbf)]!=='');}
1
+ function a88_0x3787(){const _0x16a88f=['endsWith','isDirectory','3UqideG','16464972KPVeCL','utf-8','26iXfgKy','153908AEFNLy','11217897hUDifq','8PeGAoV','slice','match','replaceAll','10iBlfOB','src/pages','2eJGxza','index.tsx','486QLjTgJ','push','2505041hXfJGX','6292506HFjjiV','concat','replace','98225PuGNkB','forEach','1026647BFyUqI'];a88_0x3787=function(){return _0x16a88f;};return a88_0x3787();}function a88_0x4b38(_0x4d98ad,_0x1bcc7b){_0x4d98ad=_0x4d98ad-0xbf;const _0x378745=a88_0x3787();let _0x4b3840=_0x378745[_0x4d98ad];return _0x4b3840;}const a88_0x3319ce=a88_0x4b38;(function(_0x5f5596,_0x150b34){const _0x5f2700=a88_0x4b38,_0x2a2768=_0x5f5596();while(!![]){try{const _0x5d3fdb=parseInt(_0x5f2700(0xd6))/0x1*(parseInt(_0x5f2700(0xcc))/0x2)+parseInt(_0x5f2700(0xc0))/0x3*(parseInt(_0x5f2700(0xc4))/0x4)+parseInt(_0x5f2700(0xd4))/0x5*(parseInt(_0x5f2700(0xce))/0x6)+parseInt(_0x5f2700(0xd0))/0x7+-parseInt(_0x5f2700(0xc6))/0x8*(-parseInt(_0x5f2700(0xc5))/0x9)+-parseInt(_0x5f2700(0xca))/0xa*(parseInt(_0x5f2700(0xd1))/0xb)+parseInt(_0x5f2700(0xc1))/0xc*(-parseInt(_0x5f2700(0xc3))/0xd);if(_0x5d3fdb===_0x150b34)break;else _0x2a2768['push'](_0x2a2768['shift']());}catch(_0x46e6ac){_0x2a2768['push'](_0x2a2768['shift']());}}}(a88_0x3787,0xe6949));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a88_0x3319ce(0xcb));export function extractTitleFromComment(_0x21cf37){const _0x239041=a88_0x3319ce;try{const _0x4978a4=readFileSync(_0x21cf37,_0x239041(0xc2)),_0x1ec7e4=_0x4978a4[_0x239041(0xc8)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1ec7e4&&_0x1ec7e4[0x1]){const _0xf243d9=_0x1ec7e4[0x1],_0x501ff2=_0xf243d9['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x501ff2&&_0x501ff2[0x1])return _0x501ff2[0x1]['trim']();}let _0x8e64f8=null;const _0x13c3b2=_0x4978a4[_0x239041(0xc8)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x13c3b2&&_0x13c3b2[0x1]&&(_0x8e64f8=_0x13c3b2[0x1]);if(!_0x8e64f8){const _0x11ad16=_0x4978a4['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x11ad16&&_0x11ad16[0x1]&&(_0x8e64f8=_0x11ad16[0x1]);}if(_0x8e64f8){const _0x2bf405=new RegExp('\x5cb'+_0x8e64f8+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x3c33e7=_0x4978a4[_0x239041(0xc8)](_0x2bf405);if(_0x3c33e7&&_0x3c33e7[0x1])return _0x3c33e7[0x1];return _0x8e64f8;}return null;}catch(_0x19ba1e){return null;}}export function getLocalPages(_0x4010af=pagesDir,_0x4ade27=pagesDir){const _0xe7fe9c=a88_0x3319ce;let _0xb8f478=[];const _0x10d9f4=readdirSync(_0x4010af);return _0x10d9f4[_0xe7fe9c(0xd5)](_0x30acfd=>{const _0x1f2d78=_0xe7fe9c,_0x2c0a7e=join(_0x4010af,_0x30acfd),_0x311fcb=statSync(_0x2c0a7e);if(_0x311fcb&&_0x311fcb[_0x1f2d78(0xbf)]())_0xb8f478=_0xb8f478[_0x1f2d78(0xd2)](getLocalPages(_0x2c0a7e,_0x4ade27));else{if(_0x30acfd[_0x1f2d78(0xd7)]('.tsx')){let _0x46993a=relative(_0x4ade27,_0x2c0a7e);_0x46993a[_0x1f2d78(0xd7)](_0x1f2d78(0xcd))?_0x46993a=_0x46993a[_0x1f2d78(0xd3)](/index\.tsx$/,''):_0x46993a=_0x46993a[_0x1f2d78(0xd3)](/\.tsx$/,'');_0x46993a[_0x1f2d78(0xd7)](sep)&&(_0x46993a=_0x46993a[_0x1f2d78(0xc7)](0x0,-0x1));const _0x4c59a4=_0x46993a['split'](sep)['join']('/'),_0x517cb1=extractTitleFromComment(_0x2c0a7e),_0x23e493=_0x517cb1||_0x4c59a4;_0xb8f478[_0x1f2d78(0xcf)]({'path':_0x4c59a4[_0x1f2d78(0xc9)]('$',':'),'label':_0x23e493});}}}),_0xb8f478['filter'](_0x7cbcb1=>_0x7cbcb1['path']!=='');}
@@ -1 +1 @@
1
- (function(_0x9cf1da,_0x10a12c){const _0x3643d6=a89_0x4988,_0x58e3cb=_0x9cf1da();while(!![]){try{const _0x50bbd2=-parseInt(_0x3643d6(0xef))/0x1*(-parseInt(_0x3643d6(0xf8))/0x2)+parseInt(_0x3643d6(0xee))/0x3+-parseInt(_0x3643d6(0xed))/0x4*(parseInt(_0x3643d6(0x104))/0x5)+-parseInt(_0x3643d6(0xe7))/0x6+parseInt(_0x3643d6(0xf1))/0x7+-parseInt(_0x3643d6(0xf5))/0x8*(parseInt(_0x3643d6(0xf2))/0x9)+parseInt(_0x3643d6(0xe9))/0xa*(parseInt(_0x3643d6(0xe6))/0xb);if(_0x50bbd2===_0x10a12c)break;else _0x58e3cb['push'](_0x58e3cb['shift']());}catch(_0x17aa30){_0x58e3cb['push'](_0x58e3cb['shift']());}}}(a89_0x548d,0x520a7));function a89_0x548d(){const _0x3e0c12=['41585XhXcBq','map','6303HVKkqR','1166544GDndtj','No\x20local\x20pages\x20matched\x20labels:\x20','1450xCZAhe','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','length','292PFyhNB','1008870MxPWud','1omaFcf','path','1678376ysJZTQ','81gqKcEc','errors','fulfilled','21256fvHQvw','filter','allSettled','1004748yXEMsq','has','status','label','JS\x20URL\x20is\x20unreachable','resources','trim','push','value','rejected','find','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'];a89_0x548d=function(){return _0x3e0c12;};return a89_0x548d();}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x13369e){const _0x4c381d=a89_0x4988,_0x2057b7=[];return!isValidJsHttpsUrl(_0x13369e)&&_0x2057b7['push'](_0x4c381d(0x103)),{'ok':_0x2057b7[_0x4c381d(0xec)]===0x0,'errors':_0x2057b7};}export function validateCssUrl(_0xddaf6a){const _0x458318=a89_0x4988,_0x4f4943=[];return!isValidCssHttpsUrl(_0xddaf6a)&&_0x4f4943['push'](_0x458318(0xeb)),{'ok':_0x4f4943[_0x458318(0xec)]===0x0,'errors':_0x4f4943};}export async function validateJsUrlReachable(_0x5dc428){const _0x279eca=a89_0x4988,_0x487393=validateJsUrl(_0x5dc428);if(!_0x487393['ok'])return _0x487393;const _0x3a41fc=await isUrlReachable(_0x5dc428);if(!_0x3a41fc)_0x487393[_0x279eca(0xf3)][_0x279eca(0xff)](_0x279eca(0xfc));return{'ok':_0x487393[_0x279eca(0xf3)][_0x279eca(0xec)]===0x0,'errors':_0x487393[_0x279eca(0xf3)]};}export async function validateCssUrlReachable(_0x2ce26b){const _0x45cbdf=a89_0x4988,_0x86e099=validateCssUrl(_0x2ce26b);if(!_0x86e099['ok'])return _0x86e099;const _0x3c4a77=await isUrlReachable(_0x2ce26b);if(!_0x3c4a77)_0x86e099[_0x45cbdf(0xf3)][_0x45cbdf(0xff)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x86e099[_0x45cbdf(0xf3)][_0x45cbdf(0xec)]===0x0,'errors':_0x86e099['errors']};}export function buildCompareRows(_0x3bcd02,_0x2c7d93){const _0x17e6e4=a89_0x4988;return _0x3bcd02['map'](_0xeeacb2=>({'label':_0xeeacb2[_0x17e6e4(0xfb)],'path':_0xeeacb2[_0x17e6e4(0xf0)],'local':!![],'online':_0x2c7d93[_0x17e6e4(0xf9)](_0xeeacb2[_0x17e6e4(0xf0)])}));}export function filterNewPages(_0x32ee8f,_0x3b9eb0,_0x3760f8){const _0x26a376=a89_0x4988;if(_0x3760f8&&_0x3760f8[_0x26a376(0xec)]>0x0){const _0x52696b=new Set(_0x3760f8['map'](_0x25ef80=>_0x25ef80[_0x26a376(0xfe)]())),_0x174382=_0x32ee8f[_0x26a376(0xf6)](_0x598a53=>_0x52696b['has'](_0x598a53[_0x26a376(0xfb)]));if(_0x174382['length']===0x0)throw new Error(_0x26a376(0xe8)+[..._0x52696b][_0x26a376(0xea)](',\x20'));return _0x174382;}return _0x32ee8f[_0x26a376(0xf6)](_0x583e65=>!_0x3b9eb0[_0x26a376(0xf9)](_0x583e65[_0x26a376(0xf0)]));}export function filterPagesByLabels(_0x7655b9,_0x2077f6){const _0x57254c=a89_0x4988,_0x4dce5a=[],_0x115f0b=[];for(const _0x40763f of _0x2077f6){const _0x4636ab=_0x40763f[_0x57254c(0xfe)](),_0x222efd=_0x7655b9[_0x57254c(0x102)](_0x116636=>_0x116636[_0x57254c(0xfb)]===_0x4636ab);if(_0x222efd)_0x4dce5a[_0x57254c(0xff)](_0x222efd);else _0x115f0b[_0x57254c(0xff)](_0x40763f);}return{'matched':_0x4dce5a,'unmatched':_0x115f0b};}export async function doCreateMenus(_0x574c2c,_0x3db4b5,_0x274019,_0x4970db){const _0x16d08b=a89_0x4988,_0x2bf009=await createMenus(_0x574c2c,_0x3db4b5,_0x274019,_0x4970db);return{'created':_0x2bf009[_0x16d08b(0xec)],'failed':0x0,'labels':_0x274019[_0x16d08b(0xe5)](_0x547002=>_0x547002[_0x16d08b(0xfb)]),'menus':_0x2bf009};}export function filterMenusWithResources(_0x473fe6){const _0x3a52e1=a89_0x4988;return _0x473fe6['filter'](_0x49e959=>_0x49e959[_0x3a52e1(0xfd)][_0x3a52e1(0xec)]>0x0);}export async function doUpdateCdnUrls(_0x4064e3,_0x4de9c3,_0x57abd8,_0x47916d){const _0x172347=a89_0x4988,_0x59cba0=_0x57abd8['filter'](_0x100dfc=>_0x100dfc['resources']['length']>0x0),_0x1a1e12=await Promise[_0x172347(0xf7)](_0x59cba0['map'](_0x1bc266=>updateMenuCdnUrl(_0x4064e3,_0x4de9c3,{'id':_0x1bc266['id'],'label':_0x1bc266[_0x172347(0xfb)],'path':_0x1bc266[_0x172347(0xf0)],'resources':_0x47916d,'extend':_0x1bc266['extend']??null}))),_0x35f6d9=_0x1a1e12['filter'](_0x249f95=>_0x249f95['status']===_0x172347(0xf4))[_0x172347(0xe5)](_0x45a1bb=>_0x45a1bb[_0x172347(0x100)]),_0x20fe9f=_0x1a1e12[_0x172347(0xf6)](_0x1e09fb=>_0x1e09fb[_0x172347(0xfa)]===_0x172347(0x101))[_0x172347(0xec)];return{'updated':_0x35f6d9[_0x172347(0xec)],'failed':_0x20fe9f,'menus':_0x35f6d9};}function a89_0x4988(_0x5c8c08,_0x2c68d3){_0x5c8c08=_0x5c8c08-0xe5;const _0x548d10=a89_0x548d();let _0x498809=_0x548d10[_0x5c8c08];return _0x498809;}export async function fetchMenuData(_0x30930a,_0x49455e){const _0x61267d=a89_0x4988,_0x1b98c2=getLocalPages(),_0x5b4a03=await getOnlineMenuList(_0x30930a,_0x49455e),_0x3942fa=new Set(_0x5b4a03[_0x61267d(0xe5)](_0x2d52a3=>_0x2d52a3['path']));return{'localPages':_0x1b98c2,'onlineMenuList':_0x5b4a03,'onlinePaths':_0x3942fa};}export async function fetchOnlineMenuList(_0x1af9d7,_0x416762){return getOnlineMenuList(_0x1af9d7,_0x416762);}
1
+ (function(_0x3fec6f,_0x49c0d8){const _0x259ac7=a89_0x350e,_0x50fa7e=_0x3fec6f();while(!![]){try{const _0x232d76=parseInt(_0x259ac7(0x18a))/0x1*(-parseInt(_0x259ac7(0x199))/0x2)+-parseInt(_0x259ac7(0x188))/0x3+-parseInt(_0x259ac7(0x184))/0x4+-parseInt(_0x259ac7(0x193))/0x5*(parseInt(_0x259ac7(0x196))/0x6)+parseInt(_0x259ac7(0x185))/0x7+-parseInt(_0x259ac7(0x18e))/0x8+parseInt(_0x259ac7(0x19d))/0x9*(parseInt(_0x259ac7(0x1a0))/0xa);if(_0x232d76===_0x49c0d8)break;else _0x50fa7e['push'](_0x50fa7e['shift']());}catch(_0x39ac34){_0x50fa7e['push'](_0x50fa7e['shift']());}}}(a89_0x5de2,0x58e01));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x1dee0f){const _0xc473be=a89_0x350e,_0x1aa66d=[];return!isValidJsHttpsUrl(_0x1dee0f)&&_0x1aa66d['push']('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x1aa66d[_0xc473be(0x198)]===0x0,'errors':_0x1aa66d};}export function validateCssUrl(_0x305734){const _0x339542=a89_0x350e,_0x38443b=[];return!isValidCssHttpsUrl(_0x305734)&&_0x38443b[_0x339542(0x197)](_0x339542(0x18b)),{'ok':_0x38443b[_0x339542(0x198)]===0x0,'errors':_0x38443b};}export async function validateJsUrlReachable(_0x42dd08){const _0x55c820=a89_0x350e,_0x27fd1f=validateJsUrl(_0x42dd08);if(!_0x27fd1f['ok'])return _0x27fd1f;const _0x3022ce=await isUrlReachable(_0x42dd08);if(!_0x3022ce)_0x27fd1f[_0x55c820(0x19c)][_0x55c820(0x197)](_0x55c820(0x191));return{'ok':_0x27fd1f[_0x55c820(0x19c)]['length']===0x0,'errors':_0x27fd1f[_0x55c820(0x19c)]};}export async function validateCssUrlReachable(_0x96da0a){const _0x101be8=a89_0x350e,_0x73b28b=validateCssUrl(_0x96da0a);if(!_0x73b28b['ok'])return _0x73b28b;const _0x2ce91b=await isUrlReachable(_0x96da0a);if(!_0x2ce91b)_0x73b28b[_0x101be8(0x19c)][_0x101be8(0x197)](_0x101be8(0x19a));return{'ok':_0x73b28b[_0x101be8(0x19c)]['length']===0x0,'errors':_0x73b28b['errors']};}export function buildCompareRows(_0x2403af,_0x43bcc0){const _0x3bab41=a89_0x350e;return _0x2403af[_0x3bab41(0x190)](_0x18bbea=>({'label':_0x18bbea['label'],'path':_0x18bbea[_0x3bab41(0x18c)],'local':!![],'online':_0x43bcc0[_0x3bab41(0x18d)](_0x18bbea[_0x3bab41(0x18c)])}));}function a89_0x350e(_0x22fae8,_0x45d201){_0x22fae8=_0x22fae8-0x184;const _0x5de269=a89_0x5de2();let _0x350ef4=_0x5de269[_0x22fae8];return _0x350ef4;}function a89_0x5de2(){const _0x279d4f=['840801YfEOVI','value','7030OwAfwe','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','path','has','1725256KUcPAP','status','map','JS\x20URL\x20is\x20unreachable','extend','5LmjqDP','No\x20local\x20pages\x20matched\x20labels:\x20','rejected','1122612lWAyhS','push','length','142yzxrPw','CSS\x20URL\x20is\x20unreachable','find','errors','1125fNSJGv','label','resources','90230WrKuqS','898984fLIbYq','4501420hZjVHz','trim','filter'];a89_0x5de2=function(){return _0x279d4f;};return a89_0x5de2();}export function filterNewPages(_0x13deb9,_0x325713,_0xa8a001){const _0xda813f=a89_0x350e;if(_0xa8a001&&_0xa8a001[_0xda813f(0x198)]>0x0){const _0x40b0ab=new Set(_0xa8a001['map'](_0x138e93=>_0x138e93['trim']())),_0x3f507a=_0x13deb9['filter'](_0xb9367e=>_0x40b0ab['has'](_0xb9367e[_0xda813f(0x19e)]));if(_0x3f507a['length']===0x0)throw new Error(_0xda813f(0x194)+[..._0x40b0ab]['join'](',\x20'));return _0x3f507a;}return _0x13deb9[_0xda813f(0x187)](_0x547fe8=>!_0x325713[_0xda813f(0x18d)](_0x547fe8[_0xda813f(0x18c)]));}export function filterPagesByLabels(_0x52f5e6,_0x3515c6){const _0x1d87da=a89_0x350e,_0xdd75c1=[],_0x2cfbbe=[];for(const _0x3c3927 of _0x3515c6){const _0x3c288c=_0x3c3927[_0x1d87da(0x186)](),_0x47aa78=_0x52f5e6[_0x1d87da(0x19b)](_0x2324ac=>_0x2324ac[_0x1d87da(0x19e)]===_0x3c288c);if(_0x47aa78)_0xdd75c1[_0x1d87da(0x197)](_0x47aa78);else _0x2cfbbe[_0x1d87da(0x197)](_0x3c3927);}return{'matched':_0xdd75c1,'unmatched':_0x2cfbbe};}export async function doCreateMenus(_0x3ff074,_0x51ada6,_0x4a0ffd,_0x1a27a1){const _0x523f47=a89_0x350e,_0x5c2149=await createMenus(_0x3ff074,_0x51ada6,_0x4a0ffd,_0x1a27a1);return{'created':_0x5c2149['length'],'failed':0x0,'labels':_0x4a0ffd[_0x523f47(0x190)](_0x4d6aa4=>_0x4d6aa4[_0x523f47(0x19e)]),'menus':_0x5c2149};}export function filterMenusWithResources(_0x1de37e){const _0x2deb69=a89_0x350e;return _0x1de37e[_0x2deb69(0x187)](_0x423cad=>_0x423cad[_0x2deb69(0x19f)]['length']>0x0);}export async function doUpdateCdnUrls(_0x48d052,_0x53a064,_0x3ee38a,_0x14e2a8){const _0x348d1a=a89_0x350e,_0x588dc2=_0x3ee38a['filter'](_0x49747f=>_0x49747f['resources'][_0x348d1a(0x198)]>0x0),_0x5a487e=await Promise['allSettled'](_0x588dc2[_0x348d1a(0x190)](_0x4f7a56=>updateMenuCdnUrl(_0x48d052,_0x53a064,{'id':_0x4f7a56['id'],'label':_0x4f7a56[_0x348d1a(0x19e)],'path':_0x4f7a56[_0x348d1a(0x18c)],'resources':_0x14e2a8,'extend':_0x4f7a56[_0x348d1a(0x192)]??null}))),_0x474034=_0x5a487e[_0x348d1a(0x187)](_0x50a0e1=>_0x50a0e1['status']==='fulfilled')['map'](_0x5eb5af=>_0x5eb5af[_0x348d1a(0x189)]),_0x1c4802=_0x5a487e[_0x348d1a(0x187)](_0x241cd7=>_0x241cd7[_0x348d1a(0x18f)]===_0x348d1a(0x195))[_0x348d1a(0x198)];return{'updated':_0x474034['length'],'failed':_0x1c4802,'menus':_0x474034};}export async function fetchMenuData(_0x56f71e,_0x24ab27){const _0xcc1b05=a89_0x350e,_0x289ffe=getLocalPages(),_0x50c950=await getOnlineMenuList(_0x56f71e,_0x24ab27),_0x587165=new Set(_0x50c950[_0xcc1b05(0x190)](_0x2824a1=>_0x2824a1['path']));return{'localPages':_0x289ffe,'onlineMenuList':_0x50c950,'onlinePaths':_0x587165};}export async function fetchOnlineMenuList(_0x40c09,_0x27be31){return getOnlineMenuList(_0x40c09,_0x27be31);}
@@ -1 +1 @@
1
- (function(_0x363d9a,_0x558bf9){const _0x55bcb5=a90_0x4875,_0x1ecceb=_0x363d9a();while(!![]){try{const _0x532d13=parseInt(_0x55bcb5(0x1dc))/0x1*(-parseInt(_0x55bcb5(0x1d2))/0x2)+-parseInt(_0x55bcb5(0x1cc))/0x3*(-parseInt(_0x55bcb5(0x1cf))/0x4)+parseInt(_0x55bcb5(0x1d3))/0x5*(parseInt(_0x55bcb5(0x1b5))/0x6)+-parseInt(_0x55bcb5(0x1b2))/0x7+parseInt(_0x55bcb5(0x1b3))/0x8+-parseInt(_0x55bcb5(0x1ce))/0x9+-parseInt(_0x55bcb5(0x1d9))/0xa*(-parseInt(_0x55bcb5(0x1c9))/0xb);if(_0x532d13===_0x558bf9)break;else _0x1ecceb['push'](_0x1ecceb['shift']());}catch(_0x4920d5){_0x1ecceb['push'](_0x1ecceb['shift']());}}}(a90_0x312d,0x9479f));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';function a90_0x4875(_0x38da91,_0xc9902d){_0x38da91=_0x38da91-0x1b1;const _0x312dc1=a90_0x312d();let _0x4875e4=_0x312dc1[_0x38da91];return _0x4875e4;}import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x3995f7,_0x35be54){const _0x40e3d1=a90_0x4875,_0x321a2a=getEnv();logger[_0x40e3d1(0x1be)](_0x40e3d1(0x1cb),isProduction(_0x321a2a)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x3995f7+')':_0x40e3d1(0x1c3)+_0x3995f7+')');const _0x5695d9=await platformFetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x3995f7,{'cookie':_0x35be54,'label':'Fetch\x20menu\x20list'});if(!_0x5695d9)return logger[_0x40e3d1(0x1be)](_0x40e3d1(0x1cb),_0x40e3d1(0x1d1)),[];return logger[_0x40e3d1(0x1be)](_0x40e3d1(0x1cb),_0x40e3d1(0x1b8)+_0x5695d9[_0x40e3d1(0x1b6)]+_0x40e3d1(0x1b1)),_0x5695d9['map'](flattenMenuItem)[_0x40e3d1(0x1c4)]();}function flattenMenuItem(_0x44dff5){const _0x58fadf=a90_0x4875;let _0x11d323=[];try{const _0x40d19b=_0x44dff5['extend']?.[_0x58fadf(0x1b9)];if(typeof _0x40d19b===_0x58fadf(0x1c6)){const _0x43d82a=JSON[_0x58fadf(0x1c8)](_0x40d19b);if(Array[_0x58fadf(0x1b7)](_0x43d82a))_0x11d323=_0x43d82a[_0x58fadf(0x1d7)](String);}else Array[_0x58fadf(0x1b7)](_0x40d19b)&&(_0x11d323=_0x40d19b[_0x58fadf(0x1d7)](String));}catch{}const _0x5cd078=[{'id':_0x44dff5['id'],'path':_0x44dff5[_0x58fadf(0x1d6)],'label':_0x44dff5[_0x58fadf(0x1c5)],'resources':_0x11d323,'extend':_0x44dff5[_0x58fadf(0x1d4)]??null}];if(_0x44dff5[_0x58fadf(0x1bd)]&&_0x44dff5['children'][_0x58fadf(0x1b6)]>0x0)for(const _0x1b1726 of _0x44dff5['children']){_0x5cd078[_0x58fadf(0x1d5)](...flattenMenuItem(_0x1b1726));}return _0x5cd078;}export async function createMenu(_0x1c4915,_0x3a430c,_0x3581dc){const _0x48966f=a90_0x4875;logger[_0x48966f(0x1be)](_0x48966f(0x1d0),_0x48966f(0x1c7)+_0x3581dc[_0x48966f(0x1c5)]+'\x20('+_0x3581dc[_0x48966f(0x1d6)]+')');const _0x3f6e3e={'appCode':_0x1c4915,'type':_0x48966f(0x1c2),'sort':0x0,'extend':{'loadScriptMode':_0x48966f(0x1d8),'resources':_0x3581dc[_0x48966f(0x1b9)]?JSON[_0x48966f(0x1cd)](_0x3581dc[_0x48966f(0x1b9)]):undefined},..._0x3581dc},_0x4e87bc=await platformFetch(getApiDomain()+_0x48966f(0x1b4),{'method':_0x48966f(0x1ba),'body':_0x3f6e3e,'cookie':_0x3a430c,'label':'Create\x20menu\x20\x22'+_0x3581dc[_0x48966f(0x1c5)]+'\x22'});return logger[_0x48966f(0x1be)](_0x48966f(0x1d0),_0x48966f(0x1db)+_0x3581dc[_0x48966f(0x1c5)]),_0x4e87bc;}function a90_0x312d(){const _0x3e36e1=['3287172GqJnQH','1840128tqIgnl','/smartapi/menu/create','54288ZXGfUs','length','isArray','Fetched\x20','resources','POST','update-menu-cdn-url','Start\x20batch\x20menu\x20creation,\x20total\x20','children','info','Batch\x20menu\x20creation\x20completed,\x20total\x20','Create\x20menu\x20\x22','all','procode','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','flat','label','string','Creating\x20menu:\x20','parse','19810879NxlbwB','Menu\x20assets\x20synced:\x20','get-online-menu-list','6iyffvn','stringify','10774575POcbaf','361276uZygzy','create-menu','Server\x20returned\x20empty\x20menu\x20list','542978srpbet','185LiroDt','extend','push','path','map','import','10BCVHiT','Updating\x20menu\x20asset\x20links:\x20','Menu\x20created\x20successfully:\x20','1ZYZCVB','\x20online\x20menus\x20successfully'];a90_0x312d=function(){return _0x3e36e1;};return a90_0x312d();}async function createSingleMenu(_0x329ca1,_0x518486,_0x2704c5,_0x253906){const _0x101265=a90_0x4875,_0x33b194={'appCode':_0x329ca1,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x101265(0x1d8),'resources':_0x253906?JSON[_0x101265(0x1cd)](_0x253906):undefined},'label':_0x2704c5['label'],'path':_0x2704c5[_0x101265(0x1d6)]},_0x381c83=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x101265(0x1ba),'body':_0x33b194,'cookie':_0x518486,'label':_0x101265(0x1c0)+_0x2704c5[_0x101265(0x1c5)]+'\x22'});return logger[_0x101265(0x1be)](_0x101265(0x1d0),_0x101265(0x1db)+_0x2704c5[_0x101265(0x1c5)]),_0x381c83;}export async function createMenus(_0x101ab8,_0x9a67a4,_0x4c633d,_0x5d1a15){const _0x1ada73=a90_0x4875;logger[_0x1ada73(0x1be)]('create-menus',_0x1ada73(0x1bc)+_0x4c633d[_0x1ada73(0x1b6)]);const _0x1a7179=await Promise[_0x1ada73(0x1c1)](_0x4c633d[_0x1ada73(0x1d7)](_0x34e60b=>createSingleMenu(_0x101ab8,_0x9a67a4,_0x34e60b,_0x5d1a15)));return logger['info']('create-menus',_0x1ada73(0x1bf)+_0x4c633d[_0x1ada73(0x1b6)]),_0x1a7179;}export async function updateMenuCdnUrl(_0xebfe6f,_0x928d72,_0x3ba981){const _0x4fc1c7=a90_0x4875;logger['info']('update-menu-cdn-url',_0x4fc1c7(0x1da)+_0x3ba981[_0x4fc1c7(0x1c5)]+'\x20('+_0x3ba981['path']+')');const _0x43639c={'id':_0x3ba981['id'],'appCode':_0xebfe6f,'extend':{..._0x3ba981[_0x4fc1c7(0x1d4)]??{},'loadScriptMode':_0x4fc1c7(0x1d8),'resources':_0x3ba981[_0x4fc1c7(0x1b9)]?JSON[_0x4fc1c7(0x1cd)](_0x3ba981['resources']):undefined}},_0x220b14=await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':'POST','body':_0x43639c,'cookie':_0x928d72,'label':'Update\x20menu\x20assets\x20\x22'+_0x3ba981[_0x4fc1c7(0x1c5)]+'\x22'});return logger[_0x4fc1c7(0x1be)](_0x4fc1c7(0x1bb),_0x4fc1c7(0x1ca)+_0x3ba981[_0x4fc1c7(0x1c5)],undefined),_0x220b14;}
1
+ (function(_0x4e6cce,_0x1011c3){const _0x19d3bc=a90_0x4927,_0x4937c0=_0x4e6cce();while(!![]){try{const _0x12f329=-parseInt(_0x19d3bc(0xe1))/0x1*(parseInt(_0x19d3bc(0xe3))/0x2)+-parseInt(_0x19d3bc(0xda))/0x3*(parseInt(_0x19d3bc(0xd6))/0x4)+parseInt(_0x19d3bc(0xca))/0x5*(-parseInt(_0x19d3bc(0xc9))/0x6)+parseInt(_0x19d3bc(0xef))/0x7+parseInt(_0x19d3bc(0xeb))/0x8*(parseInt(_0x19d3bc(0xf8))/0x9)+parseInt(_0x19d3bc(0xf2))/0xa*(-parseInt(_0x19d3bc(0xe5))/0xb)+parseInt(_0x19d3bc(0xcc))/0xc;if(_0x12f329===_0x1011c3)break;else _0x4937c0['push'](_0x4937c0['shift']());}catch(_0x3c5a3a){_0x4937c0['push'](_0x4937c0['shift']());}}}(a90_0x5ccc,0x42c4b));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x732de7,_0x236271){const _0x5877a1=a90_0x4927,_0x52a0e2=getEnv();logger[_0x5877a1(0xea)](_0x5877a1(0xee),isProduction(_0x52a0e2)?_0x5877a1(0xe2)+_0x732de7+')':_0x5877a1(0xdb)+_0x732de7+')');const _0x509758=await platformFetch(getApiDomain()+_0x5877a1(0xf1)+_0x732de7,{'cookie':_0x236271,'label':'Fetch\x20menu\x20list'});if(!_0x509758)return logger[_0x5877a1(0xea)](_0x5877a1(0xee),_0x5877a1(0xed)),[];return logger[_0x5877a1(0xea)](_0x5877a1(0xee),_0x5877a1(0xd9)+_0x509758['length']+_0x5877a1(0xd2)),_0x509758[_0x5877a1(0xdc)](flattenMenuItem)[_0x5877a1(0xcd)]();}function a90_0x4927(_0x43bfd9,_0x3448df){_0x43bfd9=_0x43bfd9-0xc8;const _0x5ccc3b=a90_0x5ccc();let _0x49275d=_0x5ccc3b[_0x43bfd9];return _0x49275d;}function flattenMenuItem(_0x5770c1){const _0x5bce85=a90_0x4927;let _0x57d39d=[];try{const _0x236944=_0x5770c1[_0x5bce85(0xd8)]?.[_0x5bce85(0xd4)];if(typeof _0x236944===_0x5bce85(0xe9)){const _0x254e00=JSON[_0x5bce85(0xde)](_0x236944);if(Array[_0x5bce85(0xe6)](_0x254e00))_0x57d39d=_0x254e00[_0x5bce85(0xdc)](String);}else Array[_0x5bce85(0xe6)](_0x236944)&&(_0x57d39d=_0x236944['map'](String));}catch{}const _0x355468=[{'id':_0x5770c1['id'],'path':_0x5770c1['path'],'label':_0x5770c1[_0x5bce85(0xec)],'resources':_0x57d39d,'extend':_0x5770c1['extend']??null}];if(_0x5770c1[_0x5bce85(0xd5)]&&_0x5770c1['children']['length']>0x0)for(const _0x264cae of _0x5770c1['children']){_0x355468[_0x5bce85(0xcb)](...flattenMenuItem(_0x264cae));}return _0x355468;}export async function createMenu(_0x4f06c7,_0x4c147d,_0x155a45){const _0x1b8c84=a90_0x4927;logger[_0x1b8c84(0xea)](_0x1b8c84(0xf0),'Creating\x20menu:\x20'+_0x155a45['label']+'\x20('+_0x155a45[_0x1b8c84(0xd7)]+')');const _0x436cce={'appCode':_0x4f06c7,'type':_0x1b8c84(0xce),'sort':0x0,'extend':{'loadScriptMode':_0x1b8c84(0xf4),'resources':_0x155a45[_0x1b8c84(0xd4)]?JSON[_0x1b8c84(0xdf)](_0x155a45[_0x1b8c84(0xd4)]):undefined},..._0x155a45},_0x347118=await platformFetch(getApiDomain()+_0x1b8c84(0xf5),{'method':_0x1b8c84(0xd0),'body':_0x436cce,'cookie':_0x4c147d,'label':_0x1b8c84(0xe7)+_0x155a45[_0x1b8c84(0xec)]+'\x22'});return logger[_0x1b8c84(0xea)]('create-menu',_0x1b8c84(0xf7)+_0x155a45[_0x1b8c84(0xec)]),_0x347118;}function a90_0x5ccc(){const _0x46b8dc=['isArray','Create\x20menu\x20\x22','Start\x20batch\x20menu\x20creation,\x20total\x20','string','info','908104cNwnMa','label','Server\x20returned\x20empty\x20menu\x20list','get-online-menu-list','167272VjrwmO','create-menu','/smartapi/menu/find?appCode=','920GhRKMo','length','import','/smartapi/menu/create','update-menu-cdn-url','Menu\x20created\x20successfully:\x20','9ZSJfnG','Menu\x20assets\x20synced:\x20','486PZlQKy','14205qKqKCY','push','19779888CFycLA','flat','procode','/smartapi/menu/update','POST','all','\x20online\x20menus\x20successfully','create-menus','resources','children','1699636PdATdl','path','extend','Fetched\x20','3CwqnUY','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','map','Batch\x20menu\x20creation\x20completed,\x20total\x20','parse','stringify','Updating\x20menu\x20asset\x20links:\x20','54626SWKkyC','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','20AvEFIO','Update\x20menu\x20assets\x20\x22','37180YGbEbs'];a90_0x5ccc=function(){return _0x46b8dc;};return a90_0x5ccc();}async function createSingleMenu(_0x4fee01,_0x39208d,_0x9e6926,_0x562190){const _0x8bacf7=a90_0x4927,_0x1e8518={'appCode':_0x4fee01,'type':_0x8bacf7(0xce),'sort':0x0,'extend':{'loadScriptMode':_0x8bacf7(0xf4),'resources':_0x562190?JSON[_0x8bacf7(0xdf)](_0x562190):undefined},'label':_0x9e6926[_0x8bacf7(0xec)],'path':_0x9e6926[_0x8bacf7(0xd7)]},_0x3c73e2=await platformFetch(getApiDomain()+_0x8bacf7(0xf5),{'method':_0x8bacf7(0xd0),'body':_0x1e8518,'cookie':_0x39208d,'label':_0x8bacf7(0xe7)+_0x9e6926[_0x8bacf7(0xec)]+'\x22'});return logger['info'](_0x8bacf7(0xf0),'Menu\x20created\x20successfully:\x20'+_0x9e6926[_0x8bacf7(0xec)]),_0x3c73e2;}export async function createMenus(_0x33afbf,_0x210531,_0x3ed22f,_0x41b276){const _0x1120bd=a90_0x4927;logger[_0x1120bd(0xea)](_0x1120bd(0xd3),_0x1120bd(0xe8)+_0x3ed22f['length']);const _0x448a53=await Promise[_0x1120bd(0xd1)](_0x3ed22f[_0x1120bd(0xdc)](_0x104370=>createSingleMenu(_0x33afbf,_0x210531,_0x104370,_0x41b276)));return logger[_0x1120bd(0xea)]('create-menus',_0x1120bd(0xdd)+_0x3ed22f[_0x1120bd(0xf3)]),_0x448a53;}export async function updateMenuCdnUrl(_0x749c81,_0x24e01b,_0x3a8f10){const _0x37279b=a90_0x4927;logger['info']('update-menu-cdn-url',_0x37279b(0xe0)+_0x3a8f10[_0x37279b(0xec)]+'\x20('+_0x3a8f10[_0x37279b(0xd7)]+')');const _0x4c978b={'id':_0x3a8f10['id'],'appCode':_0x749c81,'extend':{..._0x3a8f10[_0x37279b(0xd8)]??{},'loadScriptMode':_0x37279b(0xf4),'resources':_0x3a8f10[_0x37279b(0xd4)]?JSON['stringify'](_0x3a8f10[_0x37279b(0xd4)]):undefined}},_0x35fb83=await platformFetch(getApiDomain()+_0x37279b(0xcf),{'method':_0x37279b(0xd0),'body':_0x4c978b,'cookie':_0x24e01b,'label':_0x37279b(0xe4)+_0x3a8f10[_0x37279b(0xec)]+'\x22'});return logger[_0x37279b(0xea)](_0x37279b(0xf6),_0x37279b(0xc8)+_0x3a8f10['label'],undefined),_0x35fb83;}
@@ -1 +1 @@
1
- (function(_0x2e0ef2,_0x1e96dc){const _0x1612f9=a91_0x3c10,_0x4ecc6e=_0x2e0ef2();while(!![]){try{const _0x48bdd0=parseInt(_0x1612f9(0x19c))/0x1+-parseInt(_0x1612f9(0x1ad))/0x2+parseInt(_0x1612f9(0x197))/0x3*(parseInt(_0x1612f9(0x1a9))/0x4)+-parseInt(_0x1612f9(0x1a1))/0x5+parseInt(_0x1612f9(0x19a))/0x6*(-parseInt(_0x1612f9(0x19d))/0x7)+parseInt(_0x1612f9(0x1b6))/0x8+-parseInt(_0x1612f9(0x1b2))/0x9*(-parseInt(_0x1612f9(0x1c4))/0xa);if(_0x48bdd0===_0x1e96dc)break;else _0x4ecc6e['push'](_0x4ecc6e['shift']());}catch(_0x4f809e){_0x4ecc6e['push'](_0x4ecc6e['shift']());}}}(a91_0x4015,0x9f929));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';function a91_0x4015(){const _0x6c7098=['1078446WhDdUP','21bSMoZI','\x0a\x20\x20Available\x20local\x20pages:\x20','toString','data','1132855hqhpJM','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','pages','field','push','object','label','isArray','7916GwlpQh','cssUrl','cwd','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','2079624KgdfsN','--params.','map','JS\x20URL\x20is\x20unreachable:\x20','join','19962zOrYkC','end','readableEnded','concat','4132536fsQsNH','Invalid\x20--params:\x20','stdin','Menu\x20sync\x20completed','path','info','has','isTTY','jsUrl','menu-sync','message','trim','setLogPath','filter','2770QYfyVa','startsWith','split','length','1413GfcDsN','selectedLabels','Start\x20non-interactive\x20menu\x20sync','2443032lhDEBG','utf8'];a91_0x4015=function(){return _0x6c7098;};return a91_0x4015();}import{logger}from'../../../utils/logger.js';function validateParams(_0x4a0076){const _0x25e9ad=a91_0x3c10,_0x95ef3b=[];return _0x4a0076[_0x25e9ad(0x1be)]&&!isValidJsHttpsUrl(_0x4a0076['jsUrl'])&&_0x95ef3b['push']({'field':_0x25e9ad(0x1be),'message':_0x25e9ad(0x1ac)}),_0x4a0076[_0x25e9ad(0x1aa)]&&!isValidCssHttpsUrl(_0x4a0076[_0x25e9ad(0x1aa)])&&_0x95ef3b['push']({'field':'cssUrl','message':_0x25e9ad(0x1a2)}),_0x95ef3b;}export async function runMenuSyncCore(_0x516e4a,_0x30f877,_0x5e510a=[],_0x33dfd2){const _0x12cd12=a91_0x3c10,_0x11db35=parseParamsFlag(_0x33dfd2),_0x578f96=_0x5e510a[_0x12cd12(0x196)]>0x0?_0x5e510a:_0x11db35[_0x12cd12(0x198)],_0x5385bc=_0x11db35['jsUrl'],_0x916c38=_0x11db35[_0x12cd12(0x1aa)],_0x2dc010=[];if(_0x5385bc)_0x2dc010['push'](_0x5385bc);if(_0x916c38)_0x2dc010['push'](_0x916c38);const _0x448b12=validateParams(_0x11db35);if(_0x448b12[_0x12cd12(0x196)]>0x0){const _0x1a6f20=_0x448b12[_0x12cd12(0x1af)](_0x452d94=>_0x12cd12(0x1ae)+_0x452d94[_0x12cd12(0x1a4)]+':\x20'+_0x452d94[_0x12cd12(0x1c0)])[_0x12cd12(0x1b1)](';\x20');throw new Error(_0x12cd12(0x1b7)+_0x1a6f20);}logger[_0x12cd12(0x1c2)](process[_0x12cd12(0x1ab)]()),logger[_0x12cd12(0x1bb)](_0x12cd12(0x1bf),_0x12cd12(0x199),{'appCode':_0x516e4a,'selectedCount':_0x578f96?.['length'],'jsUrl':_0x5385bc,'cssUrl':_0x916c38});if(_0x5385bc){const _0x57227b=await isUrlReachable(_0x5385bc);if(!_0x57227b)throw new Error(_0x12cd12(0x1b0)+_0x5385bc);}if(_0x916c38){const _0x15c5cb=await isUrlReachable(_0x916c38);if(!_0x15c5cb)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x916c38);}const _0x38a567=getLocalPages();if(_0x38a567['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x45f68f=await getOnlineMenuList(_0x516e4a,_0x30f877),_0x398fe6=new Set(_0x45f68f[_0x12cd12(0x1af)](_0x1a3520=>_0x1a3520[_0x12cd12(0x1ba)]));let _0x179cea;if(_0x578f96&&_0x578f96[_0x12cd12(0x196)]>0x0){const _0x263599=new Set(_0x578f96[_0x12cd12(0x1af)](_0x3d86ad=>_0x3d86ad['trim']()));_0x179cea=_0x38a567['filter'](_0x2b0301=>_0x263599['has'](_0x2b0301[_0x12cd12(0x1a7)]));if(_0x179cea['length']===0x0){const _0x1c3b83=_0x38a567[_0x12cd12(0x1af)](_0x5a8af1=>_0x5a8af1['label'])[_0x12cd12(0x1b1)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x263599]['join'](',\x20')+_0x12cd12(0x19e)+_0x1c3b83);}}else _0x179cea=_0x38a567['filter'](_0x596c02=>!_0x398fe6[_0x12cd12(0x1bc)](_0x596c02[_0x12cd12(0x1ba)]));if(_0x179cea[_0x12cd12(0x196)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x43d8a1=await createMenus(_0x516e4a,_0x30f877,_0x179cea,_0x2dc010[_0x12cd12(0x196)]>0x0?_0x2dc010:undefined);return logger[_0x12cd12(0x1bb)](_0x12cd12(0x1bf),_0x12cd12(0x1b9),{'count':_0x179cea[_0x12cd12(0x196)],'resources':_0x2dc010}),{'created':_0x43d8a1[_0x12cd12(0x196)],'skipped':![],'targetPages':_0x179cea,'menus':_0x43d8a1};}function a91_0x3c10(_0x5051f6,_0x51a424){_0x5051f6=_0x5051f6-0x195;const _0x401577=a91_0x4015();let _0x3c1024=_0x401577[_0x5051f6];return _0x3c1024;}export async function readPageLabelsFromStdin(){const _0x475f18=a91_0x3c10;if(!process['stdin'][_0x475f18(0x1bd)]&&!process[_0x475f18(0x1b8)][_0x475f18(0x1b4)])return new Promise(_0x486e09=>{const _0x5b3b71=_0x475f18,_0x39215a=[];process[_0x5b3b71(0x1b8)]['on'](_0x5b3b71(0x1a0),_0x1c5b97=>_0x39215a[_0x5b3b71(0x1a5)](_0x1c5b97)),process[_0x5b3b71(0x1b8)]['on'](_0x5b3b71(0x1b3),()=>{const _0x50133c=_0x5b3b71,_0x3e42fd=Buffer[_0x50133c(0x1b5)](_0x39215a)[_0x50133c(0x19f)](_0x50133c(0x19b)),_0x502d90=_0x3e42fd[_0x50133c(0x195)]('\x0a')[_0x50133c(0x1af)](_0x25d296=>_0x25d296[_0x50133c(0x1c1)]())[_0x50133c(0x1c3)](_0x1d0b5b=>_0x1d0b5b[_0x50133c(0x196)]>0x0&&!_0x1d0b5b[_0x50133c(0x1c5)]('#'));_0x486e09(_0x502d90);}),setTimeout(()=>_0x486e09([]),0x1f4);});return[];}function parseParamsFlag(_0x4916d5){const _0x183f3f=a91_0x3c10;if(!_0x4916d5||typeof _0x4916d5!=='string')return{};try{const _0x4e17b4=JSON['parse'](_0x4916d5);if(typeof _0x4e17b4!==_0x183f3f(0x1a6)||_0x4e17b4===null||Array['isArray'](_0x4e17b4))return{};return{'selectedLabels':Array[_0x183f3f(0x1a8)](_0x4e17b4[_0x183f3f(0x1a3)])?_0x4e17b4[_0x183f3f(0x1a3)][_0x183f3f(0x1af)](String):undefined,'jsUrl':typeof _0x4e17b4[_0x183f3f(0x1be)]==='string'?_0x4e17b4['jsUrl']['trim']():undefined,'cssUrl':typeof _0x4e17b4[_0x183f3f(0x1aa)]==='string'?_0x4e17b4[_0x183f3f(0x1aa)][_0x183f3f(0x1c1)]():undefined};}catch{return{};}}
1
+ (function(_0x1c5a58,_0x377616){const _0xce67cb=a91_0x4bca,_0x5b7f89=_0x1c5a58();while(!![]){try{const _0xbbb4c8=-parseInt(_0xce67cb(0x7f))/0x1*(-parseInt(_0xce67cb(0x77))/0x2)+-parseInt(_0xce67cb(0x7b))/0x3+parseInt(_0xce67cb(0x85))/0x4*(-parseInt(_0xce67cb(0x71))/0x5)+-parseInt(_0xce67cb(0x6a))/0x6+parseInt(_0xce67cb(0x81))/0x7+-parseInt(_0xce67cb(0x87))/0x8+-parseInt(_0xce67cb(0x73))/0x9*(-parseInt(_0xce67cb(0x6c))/0xa);if(_0xbbb4c8===_0x377616)break;else _0x5b7f89['push'](_0x5b7f89['shift']());}catch(_0x4027cf){_0x5b7f89['push'](_0x5b7f89['shift']());}}}(a91_0x514e,0x7fa28));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 validateParams(_0x2a2e73){const _0x4853ff=a91_0x4bca,_0xd6f2c5=[];return _0x2a2e73[_0x4853ff(0x78)]&&!isValidJsHttpsUrl(_0x2a2e73[_0x4853ff(0x78)])&&_0xd6f2c5[_0x4853ff(0x70)]({'field':_0x4853ff(0x78),'message':_0x4853ff(0x69)}),_0x2a2e73[_0x4853ff(0x88)]&&!isValidCssHttpsUrl(_0x2a2e73[_0x4853ff(0x88)])&&_0xd6f2c5[_0x4853ff(0x70)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0xd6f2c5;}function a91_0x514e(){const _0xb3edb9=['3008936yocjEa','\x0a\x20\x20Available\x20local\x20pages:\x20','No\x20local\x20pages\x20matched\x20labels:\x20','field','540796siArUc','end','7296808ezySFO','cssUrl','parse','label','trim','JS\x20URL\x20is\x20unreachable:\x20','pages','info','path','stdin','string','Start\x20non-interactive\x20menu\x20sync','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','5038764deEHgW','data','20871610cPeKel','menu-sync','CSS\x20URL\x20is\x20unreachable:\x20','isTTY','push','5PCFMvN','setLogPath','9zuVGPA','toString','--params.','filter','2YfjCLm','jsUrl','map','length','2423286oOMbtq','cwd','startsWith','join','700639KYzyWO','split'];a91_0x514e=function(){return _0xb3edb9;};return a91_0x514e();}function a91_0x4bca(_0x315bf2,_0x5ad84a){_0x315bf2=_0x315bf2-0x64;const _0x514e0f=a91_0x514e();let _0x4bca1b=_0x514e0f[_0x315bf2];return _0x4bca1b;}export async function runMenuSyncCore(_0x456170,_0x42c5c4,_0x39626b=[],_0x414df6){const _0x5ef567=a91_0x4bca,_0x322f89=parseParamsFlag(_0x414df6),_0x4c289f=_0x39626b[_0x5ef567(0x7a)]>0x0?_0x39626b:_0x322f89['selectedLabels'],_0x210663=_0x322f89[_0x5ef567(0x78)],_0x28717b=_0x322f89[_0x5ef567(0x88)],_0x2db390=[];if(_0x210663)_0x2db390[_0x5ef567(0x70)](_0x210663);if(_0x28717b)_0x2db390[_0x5ef567(0x70)](_0x28717b);const _0x9dc153=validateParams(_0x322f89);if(_0x9dc153[_0x5ef567(0x7a)]>0x0){const _0x6a2599=_0x9dc153[_0x5ef567(0x79)](_0x56ee83=>_0x5ef567(0x75)+_0x56ee83[_0x5ef567(0x84)]+':\x20'+_0x56ee83['message'])[_0x5ef567(0x7e)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x6a2599);}logger[_0x5ef567(0x72)](process[_0x5ef567(0x7c)]()),logger[_0x5ef567(0x64)](_0x5ef567(0x6d),_0x5ef567(0x68),{'appCode':_0x456170,'selectedCount':_0x4c289f?.[_0x5ef567(0x7a)],'jsUrl':_0x210663,'cssUrl':_0x28717b});if(_0x210663){const _0x20769d=await isUrlReachable(_0x210663);if(!_0x20769d)throw new Error(_0x5ef567(0x8c)+_0x210663);}if(_0x28717b){const _0x196fa4=await isUrlReachable(_0x28717b);if(!_0x196fa4)throw new Error(_0x5ef567(0x6e)+_0x28717b);}const _0x3fd1eb=getLocalPages();if(_0x3fd1eb[_0x5ef567(0x7a)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x72dd02=await getOnlineMenuList(_0x456170,_0x42c5c4),_0x3ccdfd=new Set(_0x72dd02['map'](_0x16b113=>_0x16b113[_0x5ef567(0x65)]));let _0x4fab81;if(_0x4c289f&&_0x4c289f[_0x5ef567(0x7a)]>0x0){const _0x17afb5=new Set(_0x4c289f[_0x5ef567(0x79)](_0x1f499d=>_0x1f499d[_0x5ef567(0x8b)]()));_0x4fab81=_0x3fd1eb[_0x5ef567(0x76)](_0x2103a3=>_0x17afb5['has'](_0x2103a3[_0x5ef567(0x8a)]));if(_0x4fab81['length']===0x0){const _0x6499d4=_0x3fd1eb['map'](_0x5cd72d=>_0x5cd72d['label'])[_0x5ef567(0x7e)](',\x20');throw new Error(_0x5ef567(0x83)+[..._0x17afb5][_0x5ef567(0x7e)](',\x20')+_0x5ef567(0x82)+_0x6499d4);}}else _0x4fab81=_0x3fd1eb[_0x5ef567(0x76)](_0x49cad7=>!_0x3ccdfd['has'](_0x49cad7[_0x5ef567(0x65)]));if(_0x4fab81['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x3db646=await createMenus(_0x456170,_0x42c5c4,_0x4fab81,_0x2db390[_0x5ef567(0x7a)]>0x0?_0x2db390:undefined);return logger[_0x5ef567(0x64)]('menu-sync','Menu\x20sync\x20completed',{'count':_0x4fab81[_0x5ef567(0x7a)],'resources':_0x2db390}),{'created':_0x3db646[_0x5ef567(0x7a)],'skipped':![],'targetPages':_0x4fab81,'menus':_0x3db646};}export async function readPageLabelsFromStdin(){const _0x1842b3=a91_0x4bca;if(!process['stdin'][_0x1842b3(0x6f)]&&!process[_0x1842b3(0x66)]['readableEnded'])return new Promise(_0x4bc048=>{const _0x19068f=_0x1842b3,_0x535e19=[];process[_0x19068f(0x66)]['on'](_0x19068f(0x6b),_0x3345bb=>_0x535e19['push'](_0x3345bb)),process['stdin']['on'](_0x19068f(0x86),()=>{const _0x2c688d=_0x19068f,_0x12fe43=Buffer['concat'](_0x535e19)[_0x2c688d(0x74)]('utf8'),_0x149722=_0x12fe43[_0x2c688d(0x80)]('\x0a')[_0x2c688d(0x79)](_0x25df49=>_0x25df49['trim']())[_0x2c688d(0x76)](_0x2e75b6=>_0x2e75b6[_0x2c688d(0x7a)]>0x0&&!_0x2e75b6[_0x2c688d(0x7d)]('#'));_0x4bc048(_0x149722);}),setTimeout(()=>_0x4bc048([]),0x1f4);});return[];}function parseParamsFlag(_0x230b01){const _0x58cfc7=a91_0x4bca;if(!_0x230b01||typeof _0x230b01!==_0x58cfc7(0x67))return{};try{const _0x544e74=JSON[_0x58cfc7(0x89)](_0x230b01);if(typeof _0x544e74!=='object'||_0x544e74===null||Array['isArray'](_0x544e74))return{};return{'selectedLabels':Array['isArray'](_0x544e74[_0x58cfc7(0x8d)])?_0x544e74['pages'][_0x58cfc7(0x79)](String):undefined,'jsUrl':typeof _0x544e74[_0x58cfc7(0x78)]===_0x58cfc7(0x67)?_0x544e74[_0x58cfc7(0x78)][_0x58cfc7(0x8b)]():undefined,'cssUrl':typeof _0x544e74[_0x58cfc7(0x88)]===_0x58cfc7(0x67)?_0x544e74[_0x58cfc7(0x88)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a93_0x5edd(){const _0x28eee9=['120rtekcN','trim','push','endsWith','JS\x20URL\x20is\x20unreachable:\x20','.js','Invalid\x20--mode:\x20','3780434TqPMhX','extend','17088038EhReLc','field','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu-update','Invalid\x20--params:\x20','after','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','string','596fLaMvF',').\x20','isArray','map','length','mode','2145625EyResK','245277XMLDza','allSettled','CSS\x20URL\x20is\x20unreachable:\x20','parse','setLogPath','force','some','info','object','path','toLowerCase','value','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','status','unshift','label','jsUrl','patch','cssUrl','48qUNREX','Start\x20non-interactive\x20menu\x20update','resources','10pNdJgN','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','1378kkGgpt','split','filter','--params.','dryRun','fulfilled','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','\x22\x20(','4290NHeHSi','8167938FjJwRN'];a93_0x5edd=function(){return _0x28eee9;};return a93_0x5edd();}(function(_0x5aba88,_0x35615d){const _0x11bac7=a93_0x2952,_0x574ab0=_0x5aba88();while(!![]){try{const _0x145a10=-parseInt(_0x11bac7(0xbb))/0x1*(-parseInt(_0x11bac7(0xf1))/0x2)+parseInt(_0x11bac7(0xc4))/0x3*(parseInt(_0x11bac7(0xd7))/0x4)+parseInt(_0x11bac7(0xdd))/0x5+-parseInt(_0x11bac7(0xc5))/0x6+parseInt(_0x11bac7(0xcd))/0x7+parseInt(_0x11bac7(0xc6))/0x8*(-parseInt(_0x11bac7(0xde))/0x9)+parseInt(_0x11bac7(0xf4))/0xa*(parseInt(_0x11bac7(0xcf))/0xb);if(_0x145a10===_0x35615d)break;else _0x574ab0['push'](_0x574ab0['shift']());}catch(_0x49841e){_0x574ab0['push'](_0x574ab0['shift']());}}}(a93_0x5edd,0xf3d0d));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(_0x11a612){const _0x5b0da7=a93_0x2952,_0x54105c=[];return _0x11a612['jsUrl']&&!isValidJsHttpsUrl(_0x11a612['jsUrl'])&&_0x54105c[_0x5b0da7(0xc8)]({'field':_0x5b0da7(0xee),'message':_0x5b0da7(0xd5)}),_0x11a612['cssUrl']&&!isValidCssHttpsUrl(_0x11a612[_0x5b0da7(0xf0)])&&_0x54105c[_0x5b0da7(0xc8)]({'field':_0x5b0da7(0xf0),'message':_0x5b0da7(0xc2)}),_0x54105c;}export async function runMenuUpdateCore(_0x153602,_0x5e0bd5,_0xed4187,_0x11b7d7={}){const _0xd7c97e=a93_0x2952,_0x13d0a8=parseUpdateParamsFlag(_0xed4187),_0x22666d=normalizeMode(_0x11b7d7[_0xd7c97e(0xdc)]),_0x3cf5b8=[];if(_0x13d0a8[_0xd7c97e(0xee)])_0x3cf5b8[_0xd7c97e(0xc8)](_0x13d0a8['jsUrl']);if(_0x13d0a8[_0xd7c97e(0xf0)])_0x3cf5b8['push'](_0x13d0a8['cssUrl']);const _0x477513=validateParams(_0x13d0a8);if(_0x477513[_0xd7c97e(0xdb)]>0x0){const _0x435e5f=_0x477513['map'](_0x21ccea=>_0xd7c97e(0xbe)+_0x21ccea[_0xd7c97e(0xd0)]+':\x20'+_0x21ccea['message'])[_0xd7c97e(0xc1)](';\x20');throw new Error(_0xd7c97e(0xd3)+_0x435e5f);}if(_0x3cf5b8[_0xd7c97e(0xdb)]===0x0)throw new Error(_0xd7c97e(0xd1)+_0xd7c97e(0xea));logger[_0xd7c97e(0xe2)](process['cwd']()),logger[_0xd7c97e(0xe5)](_0xd7c97e(0xd2),_0xd7c97e(0xf2),{'appCode':_0x153602,'jsUrl':_0x13d0a8['jsUrl'],'cssUrl':_0x13d0a8[_0xd7c97e(0xf0)],'mode':_0x22666d,'dryRun':_0x11b7d7[_0xd7c97e(0xbf)]===!![]});if(_0x13d0a8[_0xd7c97e(0xee)]){const _0x4eeb80=await isUrlReachable(_0x13d0a8[_0xd7c97e(0xee)]);if(!_0x4eeb80)throw new Error(_0xd7c97e(0xca)+_0x13d0a8[_0xd7c97e(0xee)]);}if(_0x13d0a8[_0xd7c97e(0xf0)]){const _0x10269f=await isUrlReachable(_0x13d0a8[_0xd7c97e(0xf0)]);if(!_0x10269f)throw new Error(_0xd7c97e(0xe0)+_0x13d0a8[_0xd7c97e(0xf0)]);}const _0x46a21d=await getOnlineMenuList(_0x153602,_0x5e0bd5),_0x15185b=_0x46a21d[_0xd7c97e(0xbd)](_0x587490=>_0x587490['resources']['length']>0x0);if(_0x15185b[_0xd7c97e(0xdb)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x11b7d7[_0xd7c97e(0xbf)]===!![]};const _0x500e36=_0x15185b[_0xd7c97e(0xda)](_0xee3b7e=>buildMenuUpdateDiff(_0xee3b7e,_0x13d0a8,_0x22666d,_0x11b7d7[_0xd7c97e(0xe3)]===!![]));if(_0x11b7d7['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x500e36};const _0x4e6fbc=await Promise[_0xd7c97e(0xdf)](_0x15185b[_0xd7c97e(0xda)]((_0x35df81,_0x1c38f1)=>updateMenuCdnUrl(_0x153602,_0x5e0bd5,{'id':_0x35df81['id'],'label':_0x35df81['label'],'path':_0x35df81[_0xd7c97e(0xe7)],'resources':_0x500e36[_0x1c38f1][_0xd7c97e(0xd4)][_0xd7c97e(0xf3)],'extend':_0x35df81[_0xd7c97e(0xce)]??null}))),_0x71856f=_0x4e6fbc[_0xd7c97e(0xbd)](_0xd0f9c9=>_0xd0f9c9[_0xd7c97e(0xeb)]===_0xd7c97e(0xc0))['map'](_0x2930d8=>_0x2930d8[_0xd7c97e(0xe9)]),_0x13594b=_0x4e6fbc[_0xd7c97e(0xbd)](_0x2f0762=>_0x2f0762[_0xd7c97e(0xeb)]==='rejected')[_0xd7c97e(0xdb)];return logger[_0xd7c97e(0xe5)](_0xd7c97e(0xd2),'Menu\x20update\x20completed',{'count':_0x15185b[_0xd7c97e(0xdb)],'resources':_0x3cf5b8}),{'updated':_0x71856f[_0xd7c97e(0xdb)],'failed':_0x13594b,'skipped':![],'menus':_0x71856f};}function normalizeMode(_0xf6e9d0){const _0x320aec=a93_0x2952;if(!_0xf6e9d0)return'replace';if(_0xf6e9d0==='replace'||_0xf6e9d0===_0x320aec(0xef))return _0xf6e9d0;throw new Error(_0x320aec(0xcc)+_0xf6e9d0+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x59bab4,_0x2b3854,_0x2855fd,_0x5df3f4){const _0x24e5a0=a93_0x2952,_0x491367=[..._0x59bab4[_0x24e5a0(0xf3)]],_0x2ee080=_0x2855fd===_0x24e5a0(0xef)?patchResources(_0x491367,_0x2b3854):replaceResources(_0x2b3854),_0x3056fb=[],_0x5b0aa0=_0x491367[_0x24e5a0(0xe4)](isJsResource),_0x5789cc=_0x2ee080[_0x24e5a0(0xe4)](isJsResource);if(_0x5b0aa0&&!_0x5789cc){const _0x1fcad4='menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x59bab4['label']+_0x24e5a0(0xc3)+_0x59bab4[_0x24e5a0(0xe7)]+_0x24e5a0(0xd8)+_0x24e5a0(0xf5);if(!_0x5df3f4)throw new Error(_0x1fcad4);_0x3056fb[_0x24e5a0(0xc8)](_0x1fcad4);}const _0x2c5808=_0x491367['some'](isCssResource),_0x35d142=_0x2ee080[_0x24e5a0(0xe4)](isCssResource);return _0x2c5808&&!_0x35d142&&_0x3056fb[_0x24e5a0(0xc8)]('menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x59bab4['label']+_0x24e5a0(0xc3)+_0x59bab4[_0x24e5a0(0xe7)]+').'),{'id':_0x59bab4['id'],'label':_0x59bab4[_0x24e5a0(0xed)],'path':_0x59bab4[_0x24e5a0(0xe7)],'mode':_0x2855fd,'before':{'resources':_0x491367},'after':{'resources':_0x2ee080},'warnings':_0x3056fb};}function replaceResources(_0x440517){const _0x5be23b=a93_0x2952;return[_0x440517[_0x5be23b(0xee)],_0x440517[_0x5be23b(0xf0)]][_0x5be23b(0xbd)](_0x1d06c2=>!!_0x1d06c2);}function a93_0x2952(_0xe2d54,_0x923118){_0xe2d54=_0xe2d54-0xbb;const _0x5edd7a=a93_0x5edd();let _0x2952fd=_0x5edd7a[_0xe2d54];return _0x2952fd;}function patchResources(_0x4c8150,_0x6c4d72){const _0x59505c=a93_0x2952;let _0x5a2b71=![],_0x2f0f8f=![];const _0x16f533=[];for(const _0x537411 of _0x4c8150){if(isJsResource(_0x537411)){if(_0x6c4d72['jsUrl']&&!_0x5a2b71)_0x16f533['push'](_0x6c4d72[_0x59505c(0xee)]),_0x5a2b71=!![];else!_0x6c4d72[_0x59505c(0xee)]&&_0x16f533[_0x59505c(0xc8)](_0x537411);continue;}if(isCssResource(_0x537411)){if(_0x6c4d72['cssUrl']&&!_0x2f0f8f)_0x16f533[_0x59505c(0xc8)](_0x6c4d72[_0x59505c(0xf0)]),_0x2f0f8f=!![];else!_0x6c4d72[_0x59505c(0xf0)]&&_0x16f533[_0x59505c(0xc8)](_0x537411);continue;}_0x16f533[_0x59505c(0xc8)](_0x537411);}return _0x6c4d72[_0x59505c(0xee)]&&!_0x5a2b71&&_0x16f533[_0x59505c(0xec)](_0x6c4d72[_0x59505c(0xee)]),_0x6c4d72[_0x59505c(0xf0)]&&!_0x2f0f8f&&_0x16f533[_0x59505c(0xc8)](_0x6c4d72[_0x59505c(0xf0)]),_0x16f533;}function isJsResource(_0xfc33e5){const _0x4c663b=a93_0x2952;return stripQuery(_0xfc33e5)[_0x4c663b(0xe8)]()['endsWith'](_0x4c663b(0xcb));}function isCssResource(_0x32cf23){const _0x58ff7d=a93_0x2952;return stripQuery(_0x32cf23)['toLowerCase']()[_0x58ff7d(0xc9)]('.css');}function stripQuery(_0x5f5ab4){const _0x1de855=a93_0x2952;return _0x5f5ab4[_0x1de855(0xbc)]('?')[0x0]??_0x5f5ab4;}function parseUpdateParamsFlag(_0x4c4410){const _0x809f7f=a93_0x2952;if(!_0x4c4410||typeof _0x4c4410!=='string')return{};try{const _0xdd6b00=JSON[_0x809f7f(0xe1)](_0x4c4410);if(typeof _0xdd6b00!==_0x809f7f(0xe6)||_0xdd6b00===null||Array[_0x809f7f(0xd9)](_0xdd6b00))return{};return{'jsUrl':typeof _0xdd6b00[_0x809f7f(0xee)]==='string'?_0xdd6b00[_0x809f7f(0xee)][_0x809f7f(0xc7)]():undefined,'cssUrl':typeof _0xdd6b00['cssUrl']===_0x809f7f(0xd6)?_0xdd6b00[_0x809f7f(0xf0)][_0x809f7f(0xc7)]():undefined};}catch{return{};}}
1
+ (function(_0x105092,_0x11ef6f){const _0x964e44=a93_0x1306,_0x1b731c=_0x105092();while(!![]){try{const _0xf34b27=-parseInt(_0x964e44(0xfc))/0x1+-parseInt(_0x964e44(0xff))/0x2+-parseInt(_0x964e44(0x108))/0x3*(parseInt(_0x964e44(0x116))/0x4)+-parseInt(_0x964e44(0x113))/0x5*(parseInt(_0x964e44(0xf9))/0x6)+parseInt(_0x964e44(0x128))/0x7*(-parseInt(_0x964e44(0xf5))/0x8)+parseInt(_0x964e44(0x103))/0x9+parseInt(_0x964e44(0xf0))/0xa;if(_0xf34b27===_0x11ef6f)break;else _0x1b731c['push'](_0x1b731c['shift']());}catch(_0x33f6b5){_0x1b731c['push'](_0x1b731c['shift']());}}}(a93_0x3b32,0xb680a));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(_0x3437d5){const _0x32dbd2=a93_0x1306,_0x25c373=[];return _0x3437d5['jsUrl']&&!isValidJsHttpsUrl(_0x3437d5[_0x32dbd2(0xf8)])&&_0x25c373[_0x32dbd2(0xf6)]({'field':_0x32dbd2(0xf8),'message':_0x32dbd2(0x11a)}),_0x3437d5['cssUrl']&&!isValidCssHttpsUrl(_0x3437d5[_0x32dbd2(0xec)])&&_0x25c373[_0x32dbd2(0xf6)]({'field':_0x32dbd2(0xec),'message':_0x32dbd2(0x107)}),_0x25c373;}export async function runMenuUpdateCore(_0x5b510f,_0x4562d1,_0xb4f372,_0x2fa4d1={}){const _0x403f0f=a93_0x1306,_0x1652af=parseUpdateParamsFlag(_0xb4f372),_0x506bb6=normalizeMode(_0x2fa4d1[_0x403f0f(0x126)]),_0x30707a=[];if(_0x1652af[_0x403f0f(0xf8)])_0x30707a[_0x403f0f(0xf6)](_0x1652af[_0x403f0f(0xf8)]);if(_0x1652af['cssUrl'])_0x30707a[_0x403f0f(0xf6)](_0x1652af[_0x403f0f(0xec)]);const _0x5008b5=validateParams(_0x1652af);if(_0x5008b5['length']>0x0){const _0x41d1cc=_0x5008b5[_0x403f0f(0x11f)](_0x1c5600=>_0x403f0f(0x127)+_0x1c5600[_0x403f0f(0x105)]+':\x20'+_0x1c5600[_0x403f0f(0x110)])[_0x403f0f(0x10b)](';\x20');throw new Error(_0x403f0f(0xfa)+_0x41d1cc);}if(_0x30707a[_0x403f0f(0x120)]===0x0)throw new Error(_0x403f0f(0xf4)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x403f0f(0x117)](process[_0x403f0f(0x119)]()),logger[_0x403f0f(0x101)](_0x403f0f(0x10c),_0x403f0f(0xf7),{'appCode':_0x5b510f,'jsUrl':_0x1652af[_0x403f0f(0xf8)],'cssUrl':_0x1652af[_0x403f0f(0xec)],'mode':_0x506bb6,'dryRun':_0x2fa4d1['dryRun']===!![]});if(_0x1652af['jsUrl']){const _0x1829e4=await isUrlReachable(_0x1652af[_0x403f0f(0xf8)]);if(!_0x1829e4)throw new Error(_0x403f0f(0x106)+_0x1652af[_0x403f0f(0xf8)]);}if(_0x1652af['cssUrl']){const _0x558417=await isUrlReachable(_0x1652af['cssUrl']);if(!_0x558417)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x1652af[_0x403f0f(0xec)]);}const _0x6a9c9f=await getOnlineMenuList(_0x5b510f,_0x4562d1),_0x275694=_0x6a9c9f[_0x403f0f(0xf1)](_0x1d9444=>_0x1d9444[_0x403f0f(0x11c)][_0x403f0f(0x120)]>0x0);if(_0x275694['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x2fa4d1['dryRun']===!![]};const _0x2f7e85=_0x275694[_0x403f0f(0x11f)](_0x15568e=>buildMenuUpdateDiff(_0x15568e,_0x1652af,_0x506bb6,_0x2fa4d1[_0x403f0f(0x111)]===!![]));if(_0x2fa4d1[_0x403f0f(0xfd)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2f7e85};const _0x1c9e57=await Promise[_0x403f0f(0x10a)](_0x275694[_0x403f0f(0x11f)]((_0x181700,_0x264de4)=>updateMenuCdnUrl(_0x5b510f,_0x4562d1,{'id':_0x181700['id'],'label':_0x181700[_0x403f0f(0x122)],'path':_0x181700[_0x403f0f(0x10f)],'resources':_0x2f7e85[_0x264de4][_0x403f0f(0x11b)][_0x403f0f(0x11c)],'extend':_0x181700['extend']??null}))),_0x19d7ea=_0x1c9e57['filter'](_0x4b610a=>_0x4b610a['status']===_0x403f0f(0x10d))[_0x403f0f(0x11f)](_0x20d3e1=>_0x20d3e1[_0x403f0f(0xf3)]),_0x564fda=_0x1c9e57[_0x403f0f(0xf1)](_0x550ba3=>_0x550ba3['status']===_0x403f0f(0x10e))[_0x403f0f(0x120)];return logger[_0x403f0f(0x101)](_0x403f0f(0x10c),_0x403f0f(0x104),{'count':_0x275694['length'],'resources':_0x30707a}),{'updated':_0x19d7ea['length'],'failed':_0x564fda,'skipped':![],'menus':_0x19d7ea};}function normalizeMode(_0x4279ed){const _0x1f34d5=a93_0x1306;if(!_0x4279ed)return _0x1f34d5(0x112);if(_0x4279ed===_0x1f34d5(0x112)||_0x4279ed===_0x1f34d5(0xee))return _0x4279ed;throw new Error(_0x1f34d5(0x11d)+_0x4279ed+_0x1f34d5(0x125));}function a93_0x1306(_0x33cb1c,_0x15c0e2){_0x33cb1c=_0x33cb1c-0xec;const _0x3b3222=a93_0x3b32();let _0x1306d8=_0x3b3222[_0x33cb1c];return _0x1306d8;}function buildMenuUpdateDiff(_0x6d7aff,_0x1a766c,_0x3ea9fd,_0x143f5b){const _0x253c3c=a93_0x1306,_0x2955b5=[..._0x6d7aff['resources']],_0xf79788=_0x3ea9fd===_0x253c3c(0xee)?patchResources(_0x2955b5,_0x1a766c):replaceResources(_0x1a766c),_0xb72a7=[],_0x31163a=_0x2955b5['some'](isJsResource),_0x3f7595=_0xf79788[_0x253c3c(0x118)](isJsResource);if(_0x31163a&&!_0x3f7595){const _0x21682f=_0x253c3c(0x115)+_0x6d7aff[_0x253c3c(0x122)]+_0x253c3c(0xed)+_0x6d7aff[_0x253c3c(0x10f)]+_0x253c3c(0xef)+_0x253c3c(0x102);if(!_0x143f5b)throw new Error(_0x21682f);_0xb72a7['push'](_0x21682f);}const _0x3f3afe=_0x2955b5['some'](isCssResource),_0x2ceebd=_0xf79788['some'](isCssResource);return _0x3f3afe&&!_0x2ceebd&&_0xb72a7[_0x253c3c(0xf6)](_0x253c3c(0xfe)+_0x6d7aff['label']+_0x253c3c(0xed)+_0x6d7aff['path']+').'),{'id':_0x6d7aff['id'],'label':_0x6d7aff[_0x253c3c(0x122)],'path':_0x6d7aff[_0x253c3c(0x10f)],'mode':_0x3ea9fd,'before':{'resources':_0x2955b5},'after':{'resources':_0xf79788},'warnings':_0xb72a7};}function replaceResources(_0x3352b3){const _0x308bf1=a93_0x1306;return[_0x3352b3[_0x308bf1(0xf8)],_0x3352b3[_0x308bf1(0xec)]][_0x308bf1(0xf1)](_0x250ecc=>!!_0x250ecc);}function patchResources(_0x19577d,_0x67d301){const _0x54d682=a93_0x1306;let _0x138875=![],_0x43a54c=![];const _0x5d3705=[];for(const _0x2bc9a2 of _0x19577d){if(isJsResource(_0x2bc9a2)){if(_0x67d301[_0x54d682(0xf8)]&&!_0x138875)_0x5d3705[_0x54d682(0xf6)](_0x67d301[_0x54d682(0xf8)]),_0x138875=!![];else!_0x67d301['jsUrl']&&_0x5d3705[_0x54d682(0xf6)](_0x2bc9a2);continue;}if(isCssResource(_0x2bc9a2)){if(_0x67d301[_0x54d682(0xec)]&&!_0x43a54c)_0x5d3705[_0x54d682(0xf6)](_0x67d301['cssUrl']),_0x43a54c=!![];else!_0x67d301[_0x54d682(0xec)]&&_0x5d3705[_0x54d682(0xf6)](_0x2bc9a2);continue;}_0x5d3705['push'](_0x2bc9a2);}return _0x67d301[_0x54d682(0xf8)]&&!_0x138875&&_0x5d3705['unshift'](_0x67d301['jsUrl']),_0x67d301[_0x54d682(0xec)]&&!_0x43a54c&&_0x5d3705['push'](_0x67d301[_0x54d682(0xec)]),_0x5d3705;}function isJsResource(_0x2149a7){const _0x27e7f4=a93_0x1306;return stripQuery(_0x2149a7)[_0x27e7f4(0x121)]()[_0x27e7f4(0x124)](_0x27e7f4(0x123));}function isCssResource(_0x1f0a14){const _0x2a2218=a93_0x1306;return stripQuery(_0x1f0a14)[_0x2a2218(0x121)]()[_0x2a2218(0x124)](_0x2a2218(0x114));}function stripQuery(_0x29aeea){const _0x4629d2=a93_0x1306;return _0x29aeea[_0x4629d2(0x109)]('?')[0x0]??_0x29aeea;}function parseUpdateParamsFlag(_0x36f22b){const _0x58f767=a93_0x1306;if(!_0x36f22b||typeof _0x36f22b!==_0x58f767(0x100))return{};try{const _0x472d06=JSON['parse'](_0x36f22b);if(typeof _0x472d06!==_0x58f767(0xf2)||_0x472d06===null||Array[_0x58f767(0xfb)](_0x472d06))return{};return{'jsUrl':typeof _0x472d06[_0x58f767(0xf8)]===_0x58f767(0x100)?_0x472d06[_0x58f767(0xf8)][_0x58f767(0x11e)]():undefined,'cssUrl':typeof _0x472d06['cssUrl']==='string'?_0x472d06['cssUrl'][_0x58f767(0x11e)]():undefined};}catch{return{};}}function a93_0x3b32(){const _0x4c4276=['cwd','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','after','resources','Invalid\x20--mode:\x20','trim','map','length','toLowerCase','label','.js','endsWith','.\x20Allowed\x20values:\x20replace,\x20patch','mode','--params.','42qUPqHU','cssUrl','\x22\x20(','patch',').\x20','34805240NsyjCW','filter','object','value','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','1574008TKuubv','push','Start\x20non-interactive\x20menu\x20update','jsUrl','30EMuipN','Invalid\x20--params:\x20','isArray','639357YqzZPM','dryRun','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','2938064KcLLwq','string','info','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','11902824SaXWdX','Menu\x20update\x20completed','field','JS\x20URL\x20is\x20unreachable:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','3oPFVoY','split','allSettled','join','menu-update','fulfilled','rejected','path','message','force','replace','691140iBoJrF','.css','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','301980dtDZqG','setLogPath','some'];a93_0x3b32=function(){return _0x4c4276;};return a93_0x3b32();}
@@ -1 +1 @@
1
- function a94_0x4cf8(){const _0x505cd3=['40128htkZcS','test','2227974lnqlrs','9hilsvf','3176jkSaLx','16axjReD','1678605RQkUBG','100KWUnfW','2538650LauwlC','528KwtcMb','trim','3746134JWlkih','173084cVYJDP','14lBwsnK'];a94_0x4cf8=function(){return _0x505cd3;};return a94_0x4cf8();}function a94_0x470c(_0x1fc40b,_0x1139ea){_0x1fc40b=_0x1fc40b-0x12d;const _0x4cf89a=a94_0x4cf8();let _0x470cc7=_0x4cf89a[_0x1fc40b];return _0x470cc7;}(function(_0x57dfcb,_0x744bc9){const _0x5143bc=a94_0x470c,_0x16a227=_0x57dfcb();while(!![]){try{const _0xec569a=parseInt(_0x5143bc(0x139))/0x1*(parseInt(_0x5143bc(0x138))/0x2)+parseInt(_0x5143bc(0x132))/0x3+-parseInt(_0x5143bc(0x130))/0x4*(-parseInt(_0x5143bc(0x133))/0x5)+parseInt(_0x5143bc(0x12e))/0x6+parseInt(_0x5143bc(0x137))/0x7*(-parseInt(_0x5143bc(0x131))/0x8)+parseInt(_0x5143bc(0x12f))/0x9*(-parseInt(_0x5143bc(0x134))/0xa)+-parseInt(_0x5143bc(0x135))/0xb*(parseInt(_0x5143bc(0x13a))/0xc);if(_0xec569a===_0x744bc9)break;else _0x16a227['push'](_0x16a227['shift']());}catch(_0x47b145){_0x16a227['push'](_0x16a227['shift']());}}}(a94_0x4cf8,0xa475f));export function isValidJsHttpsUrl(_0x3144f4){const _0x46de58=a94_0x470c;return/^https:\/\/.+\.js(\?.*)?$/[_0x46de58(0x12d)](_0x3144f4[_0x46de58(0x136)]());}export function isValidCssHttpsUrl(_0x3df162){const _0x39392e=a94_0x470c;return/^https:\/\/.+\.css(\?.*)?$/[_0x39392e(0x12d)](_0x3df162['trim']());}export async function isUrlReachable(_0x1fc0ca){try{const _0x46096d=await fetch(_0x1fc0ca,{'method':'HEAD'});return _0x46096d['ok'];}catch{return![];}}
1
+ function a94_0x23dd(){const _0x181713=['8680730jyZlZE','106350LoXkwM','559340QGdAui','15cwcQxS','1848BPuoAY','279796StvqWg','3kOAYsu','14953323rSKgdp','test','34074LINapP','140uukrMi','trim','63649HPTTBq','HEAD'];a94_0x23dd=function(){return _0x181713;};return a94_0x23dd();}function a94_0x5ebc(_0x4ba4d4,_0x1053e4){_0x4ba4d4=_0x4ba4d4-0x1d1;const _0x23ddf2=a94_0x23dd();let _0x5ebcf3=_0x23ddf2[_0x4ba4d4];return _0x5ebcf3;}(function(_0x3753de,_0x26103b){const _0x50ef80=a94_0x5ebc,_0xa4171f=_0x3753de();while(!![]){try{const _0xc2d961=-parseInt(_0x50ef80(0x1da))/0x1+parseInt(_0x50ef80(0x1de))/0x2*(-parseInt(_0x50ef80(0x1d4))/0x3)+-parseInt(_0x50ef80(0x1d3))/0x4*(parseInt(_0x50ef80(0x1d1))/0x5)+parseInt(_0x50ef80(0x1dd))/0x6*(-parseInt(_0x50ef80(0x1d8))/0x7)+-parseInt(_0x50ef80(0x1d2))/0x8*(parseInt(_0x50ef80(0x1d7))/0x9)+parseInt(_0x50ef80(0x1dc))/0xa+parseInt(_0x50ef80(0x1d5))/0xb;if(_0xc2d961===_0x26103b)break;else _0xa4171f['push'](_0xa4171f['shift']());}catch(_0x352f3c){_0xa4171f['push'](_0xa4171f['shift']());}}}(a94_0x23dd,0x6cb32));export function isValidJsHttpsUrl(_0xe70303){const _0x4b2d21=a94_0x5ebc;return/^https:\/\/.+\.js(\?.*)?$/[_0x4b2d21(0x1d6)](_0xe70303[_0x4b2d21(0x1d9)]());}export function isValidCssHttpsUrl(_0x2cb6ae){return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x2cb6ae['trim']());}export async function isUrlReachable(_0xaae226){const _0x3094d4=a94_0x5ebc;try{const _0x2631b8=await fetch(_0xaae226,{'method':_0x3094d4(0x1db)});return _0x2631b8['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a95_0x1c0e95=a95_0x1098;(function(_0x298450,_0x26b7c7){const _0x3d46be=a95_0x1098,_0x1a3bbd=_0x298450();while(!![]){try{const _0x515441=-parseInt(_0x3d46be(0x12c))/0x1+-parseInt(_0x3d46be(0x10a))/0x2*(-parseInt(_0x3d46be(0x114))/0x3)+parseInt(_0x3d46be(0x137))/0x4*(-parseInt(_0x3d46be(0x108))/0x5)+parseInt(_0x3d46be(0x124))/0x6+parseInt(_0x3d46be(0x121))/0x7*(-parseInt(_0x3d46be(0x115))/0x8)+parseInt(_0x3d46be(0x136))/0x9+parseInt(_0x3d46be(0xfe))/0xa*(-parseInt(_0x3d46be(0x104))/0xb);if(_0x515441===_0x26b7c7)break;else _0x1a3bbd['push'](_0x1a3bbd['shift']());}catch(_0x365468){_0x1a3bbd['push'](_0x1a3bbd['shift']());}}}(a95_0x3159,0xb82a4));import a95_0x47e45c 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';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a95_0x1098(_0xc80d79,_0x22b7a6){_0xc80d79=_0xc80d79-0xf9;const _0x315996=a95_0x3159();let _0x1098ba=_0x315996[_0xc80d79];return _0x1098ba;}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':a95_0x1c0e95(0x12f),'command':a95_0x1c0e95(0x134),'description':a95_0x1c0e95(0x102),'risk':a95_0x1c0e95(0x101),'flags':[{'name':a95_0x1c0e95(0xf9),'type':a95_0x1c0e95(0x100),'description':a95_0x1c0e95(0x109)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}'},{'name':a95_0x1c0e95(0xfa),'type':a95_0x1c0e95(0x10c),'description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x12f6ff){const _0x141d00=a95_0x1c0e95,_0x243a36=_0x12f6ff[_0x141d00(0x120)]['appcode']?String(_0x12f6ff[_0x141d00(0x120)][_0x141d00(0x130)])[_0x141d00(0x131)]():'';if(!isInProject()&&!_0x12f6ff[_0x141d00(0x10d)]&&!_0x243a36)throw CliErrors[_0x141d00(0x119)](_0x141d00(0x128)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');const _0x368a73=_0x12f6ff[_0x141d00(0x10b)](_0x141d00(0xfa)),_0x179a2c=_0x12f6ff['str'](_0x141d00(0xf9)),_0xe91484=parseParams(_0x179a2c),_0x450f2f=!!(_0xe91484[_0x141d00(0x123)]||_0xe91484[_0x141d00(0x132)]||_0xe91484[_0x141d00(0x11e)]&&_0xe91484[_0x141d00(0x11e)][_0x141d00(0x122)]>0x0);if(_0x368a73||_0x450f2f){let _0x26e34a=[];!isInteractive()&&!_0xe91484[_0x141d00(0x11e)]?.[_0x141d00(0x122)]&&(_0x26e34a=await readPageLabelsFromStdin());const _0x2dbec7=await runMenuSyncCore(_0x12f6ff[_0x141d00(0xfd)],_0x12f6ff[_0x141d00(0xfb)],_0x26e34a[_0x141d00(0x122)]>0x0?_0x26e34a:_0xe91484[_0x141d00(0x11e)]??[],_0x179a2c);if(_0x2dbec7[_0x141d00(0x127)]){const _0x4283e1=getLocalPages();_0x4283e1[_0x141d00(0x122)]===0x0?writeCliSideChannelLine(_0x141d00(0x111)):writeCliSideChannelLine(_0x141d00(0x13a));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x2dbec7[_0x141d00(0x107)]+_0x141d00(0x11b));return{'ok':!![],'data':_0x2dbec7,'message':_0x2dbec7[_0x141d00(0x127)]?_0x141d00(0x105):_0x141d00(0x139)+_0x2dbec7['created']+_0x141d00(0x135)};}requireInteractive();const _0x354ffc=startSpinner(_0x141d00(0x103));let _0x14f58d,_0x432cbc,_0x317d5e;try{const _0x5ca988=await fetchMenuData(_0x12f6ff[_0x141d00(0xfd)],_0x12f6ff[_0x141d00(0xfb)]);_0x14f58d=_0x5ca988[_0x141d00(0x11f)],_0x432cbc=_0x5ca988['onlinePaths'],_0x317d5e=_0x5ca988[_0x141d00(0x118)],stopSpinner(_0x354ffc,_0x141d00(0x12d),!![]);}catch(_0x16ed62){stopSpinner(_0x354ffc,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x141d00(0x119)](_0x16ed62 instanceof Error?_0x16ed62['message']:_0x141d00(0x12e));}if(_0x14f58d[_0x141d00(0x122)]===0x0)return writeCliSideChannelLine(a95_0x47e45c[_0x141d00(0x129)](_0x141d00(0x116))),{'ok':!![]};const _0x49ff91=buildCompareRows(_0x14f58d,_0x432cbc);writeCliSideChannelLine(renderCompareTable(_0x49ff91)),writeCliSideChannelLine('');const _0xf2e8d=_0xe91484['pages'],_0x584577=await selectPages(_0x14f58d,_0x432cbc,_0xf2e8d);writeCliSideChannelLine(''),writeCliSideChannelLine(a95_0x47e45c[_0x141d00(0x106)](_0x141d00(0x11c)+_0x584577[_0x141d00(0x122)]+_0x141d00(0x12a)));const _0x1a5d2c=_0xe91484[_0x141d00(0x123)]&&_0xe91484[_0x141d00(0x132)];if(!_0x1a5d2c){writeCliSideChannelLine(renderSyncSummary(_0x584577,_0x432cbc[_0x141d00(0x133)]>0x0));const _0x354245=await askConfirm(_0x141d00(0x11d));if(!_0x354245)return writeCliSideChannelLine(a95_0x47e45c[_0x141d00(0xfc)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x566dc8=_0xe91484[_0x141d00(0x123)],_0x43722c=_0xe91484[_0x141d00(0x132)];!_0x566dc8&&(_0x566dc8=await askJsUrl());!_0x43722c&&(_0x43722c=await askCssUrl());const _0x5a0161=await askConfirm('\x20\x20Create\x20'+_0x584577[_0x141d00(0x122)]+_0x141d00(0x112)+_0x566dc8+_0x141d00(0x126)+_0x43722c+'?');if(!_0x5a0161)return writeCliSideChannelLine(a95_0x47e45c[_0x141d00(0xfc)](_0x141d00(0x117))),{'ok':!![]};const _0x5eddeb=[_0x566dc8,_0x43722c],_0x49c809=startSpinner(_0x141d00(0x138)+_0x584577[_0x141d00(0x122)]+'\x20menu(s)...');try{const _0x333714=await doCreateMenus(_0x12f6ff[_0x141d00(0xfd)],_0x12f6ff[_0x141d00(0xfb)],_0x584577,_0x5eddeb);return stopSpinner(_0x49c809,_0x141d00(0x10f)+_0x333714['created']+_0x141d00(0xff),!![]),{'ok':!![],'data':_0x333714,'message':_0x141d00(0x139)+_0x333714[_0x141d00(0x107)]+'\x20created,\x20'+_0x333714[_0x141d00(0x113)]+_0x141d00(0x10e)};}catch(_0x51088e){stopSpinner(_0x49c809,_0x141d00(0x110),![]);throw CliErrors[_0x141d00(0x119)](_0x51088e instanceof Error?_0x51088e[_0x141d00(0x11a)]:_0x141d00(0x110));}}};function a95_0x3159(){const _0x518af2=['4370013DUHaka','178724KSUqkt','Creating\x20','Menu\x20sync\x20completed:\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','isArray','params','yes','cookie','gray','appCode','4331720xHnhHZ','\x20menu(s)','string','write','Sync\x20local\x20pages\x20as\x20platform\x20menus','Fetching\x20online\x20menu\x20list...','11vEYaYs','Menu\x20sync\x20skipped','cyan','created','95QNxFFG','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','250606QSrIxD','flag','boolean','selectedAppName','\x20failed.','Created\x20','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','\x20menu(s)\x20with\x20JS:\x20','failed','33HpKiDu','6065384zvGUqt','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20\x20Cancelled.','onlineMenuList','validation','message','\x20menu(s)\x20created','\x20\x20✓\x20Selected:\x20','\x20\x20Continue\x20with\x20creation?','pages','localPages','rawFlags','7ozVqZa','length','jsUrl','6794178HFCYkl','parse','\x20and\x20CSS:\x20','skipped','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','yellow','\x20page(s)','object','201629ewpirQ','Online\x20menu\x20list\x20fetched','Failed\x20to\x20fetch\x20online\x20menu\x20list','menu','appcode','trim','cssUrl','size','sync','\x20created.'];a95_0x3159=function(){return _0x518af2;};return a95_0x3159();}function parseParams(_0x2ef121){const _0x173fad=a95_0x1c0e95;if(!_0x2ef121)return{};try{const _0xd2e29e=JSON[_0x173fad(0x125)](_0x2ef121);if(typeof _0xd2e29e!==_0x173fad(0x12b)||_0xd2e29e===null||Array['isArray'](_0xd2e29e))return{};return{'jsUrl':typeof _0xd2e29e[_0x173fad(0x123)]==='string'?_0xd2e29e[_0x173fad(0x123)][_0x173fad(0x131)]():undefined,'cssUrl':typeof _0xd2e29e[_0x173fad(0x132)]==='string'?_0xd2e29e['cssUrl'][_0x173fad(0x131)]():undefined,'pages':Array[_0x173fad(0x13b)](_0xd2e29e['pages'])?_0xd2e29e[_0x173fad(0x11e)]['map'](String):undefined};}catch{return{};}}
1
+ const a95_0x361e3b=a95_0x4c19;(function(_0x33ab8a,_0x59e656){const _0x5d9681=a95_0x4c19,_0xa734cf=_0x33ab8a();while(!![]){try{const _0x158ba9=parseInt(_0x5d9681(0xa0))/0x1+parseInt(_0x5d9681(0x97))/0x2*(-parseInt(_0x5d9681(0x94))/0x3)+parseInt(_0x5d9681(0x78))/0x4*(parseInt(_0x5d9681(0x7a))/0x5)+-parseInt(_0x5d9681(0x7c))/0x6*(-parseInt(_0x5d9681(0x93))/0x7)+-parseInt(_0x5d9681(0xb1))/0x8*(parseInt(_0x5d9681(0xae))/0x9)+-parseInt(_0x5d9681(0x77))/0xa+-parseInt(_0x5d9681(0x8b))/0xb*(parseInt(_0x5d9681(0xab))/0xc);if(_0x158ba9===_0x59e656)break;else _0xa734cf['push'](_0xa734cf['shift']());}catch(_0x628d65){_0xa734cf['push'](_0xa734cf['shift']());}}}(a95_0x4bf9,0x22c4d));import a95_0x17af47 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';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';function a95_0x4c19(_0x4bb768,_0xf0d1c){_0x4bb768=_0x4bb768-0x6f;const _0x4bf91b=a95_0x4bf9();let _0x4c19b5=_0x4bf91b[_0x4bb768];return _0x4c19b5;}function a95_0x4bf9(){const _0x3a7a90=['7BqrhGt','3SHcIRD','str','trim','161574VJIoGK','\x20\x20Create\x20','boolean','\x20created,\x20','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','flag','sync','appcode','yellow','276351EIgZDO','\x20page(s)','cookie','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','map','\x20\x20Cancelled.','skipped','Fetching\x20online\x20menu\x20list...','appCode','rawFlags','menu','52764krKWiT','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Online\x20menu\x20list\x20fetched','3897llYwCK','validation','write','3512VLBKiG','localPages','created','length','message','\x20menu(s)\x20with\x20JS:\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','isArray','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','yes','1036160raPOnE','477220UYggCr','Menu\x20sync\x20completed:\x20','10okVYGQ','pages','776730NEnjLT','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','Menu\x20creation\x20failed','\x20menu(s)','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','object','Failed\x20to\x20fetch\x20online\x20menu\x20list','jsUrl','onlinePaths','\x20menu(s)...','Created\x20','size','failed','cssUrl','Sync\x20local\x20pages\x20as\x20platform\x20menus','319SVjVws','Menu\x20sync\x20skipped','params','cyan','gray','✓\x20Menu\x20sync\x20completed:\x20','string','Creating\x20'];a95_0x4bf9=function(){return _0x3a7a90;};return a95_0x4bf9();}export const menuSync={'service':a95_0x361e3b(0xaa),'command':a95_0x361e3b(0x9d),'description':a95_0x361e3b(0x8a),'risk':a95_0x361e3b(0xb0),'flags':[{'name':a95_0x361e3b(0x8d),'type':a95_0x361e3b(0x91),'description':a95_0x361e3b(0x9b)+a95_0x361e3b(0x75)},{'name':'yes','type':a95_0x361e3b(0x99),'description':a95_0x361e3b(0x7d)}],async 'execute'(_0x221a13){const _0x6ddd46=a95_0x361e3b,_0x412762=_0x221a13[_0x6ddd46(0xa9)][_0x6ddd46(0x9e)]?String(_0x221a13[_0x6ddd46(0xa9)][_0x6ddd46(0x9e)])['trim']():'';if(!isInProject()&&!_0x221a13['selectedAppName']&&!_0x412762)throw CliErrors[_0x6ddd46(0xaf)](_0x6ddd46(0x73)+_0x6ddd46(0xa3));const _0x408dbb=_0x221a13[_0x6ddd46(0x9c)](_0x6ddd46(0x76)),_0x4913b2=_0x221a13[_0x6ddd46(0x95)](_0x6ddd46(0x8d)),_0x502a13=parseParams(_0x4913b2),_0x4f1876=!!(_0x502a13[_0x6ddd46(0x83)]||_0x502a13['cssUrl']||_0x502a13[_0x6ddd46(0x7b)]&&_0x502a13['pages'][_0x6ddd46(0x70)]>0x0);if(_0x408dbb||_0x4f1876){let _0x3f7bce=[];!isInteractive()&&!_0x502a13[_0x6ddd46(0x7b)]?.[_0x6ddd46(0x70)]&&(_0x3f7bce=await readPageLabelsFromStdin());const _0x14f1de=await runMenuSyncCore(_0x221a13[_0x6ddd46(0xa8)],_0x221a13[_0x6ddd46(0xa2)],_0x3f7bce[_0x6ddd46(0x70)]>0x0?_0x3f7bce:_0x502a13[_0x6ddd46(0x7b)]??[],_0x4913b2);if(_0x14f1de[_0x6ddd46(0xa6)]){const _0x52ab55=getLocalPages();_0x52ab55[_0x6ddd46(0x70)]===0x0?writeCliSideChannelLine(_0x6ddd46(0xac)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x6ddd46(0x90)+_0x14f1de[_0x6ddd46(0x6f)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x14f1de,'message':_0x14f1de['skipped']?_0x6ddd46(0x8c):_0x6ddd46(0x79)+_0x14f1de[_0x6ddd46(0x6f)]+'\x20created.'};}requireInteractive();const _0xe5aad1=startSpinner(_0x6ddd46(0xa7));let _0x244304,_0x58c820,_0x1229d4;try{const _0x477076=await fetchMenuData(_0x221a13[_0x6ddd46(0xa8)],_0x221a13[_0x6ddd46(0xa2)]);_0x244304=_0x477076[_0x6ddd46(0xb2)],_0x58c820=_0x477076[_0x6ddd46(0x84)],_0x1229d4=_0x477076['onlineMenuList'],stopSpinner(_0xe5aad1,_0x6ddd46(0xad),!![]);}catch(_0x4975c8){stopSpinner(_0xe5aad1,_0x6ddd46(0x82),![]);throw CliErrors[_0x6ddd46(0xaf)](_0x4975c8 instanceof Error?_0x4975c8[_0x6ddd46(0x71)]:_0x6ddd46(0x82));}if(_0x244304[_0x6ddd46(0x70)]===0x0)return writeCliSideChannelLine(a95_0x17af47[_0x6ddd46(0x9f)](_0x6ddd46(0x80))),{'ok':!![]};const _0x43bff7=buildCompareRows(_0x244304,_0x58c820);writeCliSideChannelLine(renderCompareTable(_0x43bff7)),writeCliSideChannelLine('');const _0x5df764=_0x502a13['pages'],_0x5b4734=await selectPages(_0x244304,_0x58c820,_0x5df764);writeCliSideChannelLine(''),writeCliSideChannelLine(a95_0x17af47[_0x6ddd46(0x8e)]('\x20\x20✓\x20Selected:\x20'+_0x5b4734[_0x6ddd46(0x70)]+_0x6ddd46(0xa1)));const _0x1af6e3=_0x502a13['jsUrl']&&_0x502a13[_0x6ddd46(0x89)];if(!_0x1af6e3){writeCliSideChannelLine(renderSyncSummary(_0x5b4734,_0x58c820[_0x6ddd46(0x87)]>0x0));const _0x45355d=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x45355d)return writeCliSideChannelLine(a95_0x17af47['gray'](_0x6ddd46(0xa5))),{'ok':!![]};}let _0x3e9688=_0x502a13[_0x6ddd46(0x83)],_0x192a02=_0x502a13[_0x6ddd46(0x89)];!_0x3e9688&&(_0x3e9688=await askJsUrl());!_0x192a02&&(_0x192a02=await askCssUrl());const _0x18b076=await askConfirm(_0x6ddd46(0x98)+_0x5b4734['length']+_0x6ddd46(0x72)+_0x3e9688+'\x20and\x20CSS:\x20'+_0x192a02+'?');if(!_0x18b076)return writeCliSideChannelLine(a95_0x17af47[_0x6ddd46(0x8f)](_0x6ddd46(0xa5))),{'ok':!![]};const _0x4e7eae=[_0x3e9688,_0x192a02],_0x3981d1=startSpinner(_0x6ddd46(0x92)+_0x5b4734[_0x6ddd46(0x70)]+_0x6ddd46(0x85));try{const _0x370fc8=await doCreateMenus(_0x221a13[_0x6ddd46(0xa8)],_0x221a13[_0x6ddd46(0xa2)],_0x5b4734,_0x4e7eae);return stopSpinner(_0x3981d1,_0x6ddd46(0x86)+_0x370fc8[_0x6ddd46(0x6f)]+_0x6ddd46(0x7f),!![]),{'ok':!![],'data':_0x370fc8,'message':_0x6ddd46(0x79)+_0x370fc8[_0x6ddd46(0x6f)]+_0x6ddd46(0x9a)+_0x370fc8[_0x6ddd46(0x88)]+'\x20failed.'};}catch(_0x327c96){stopSpinner(_0x3981d1,'Menu\x20creation\x20failed',![]);throw CliErrors['validation'](_0x327c96 instanceof Error?_0x327c96[_0x6ddd46(0x71)]:_0x6ddd46(0x7e));}}};function parseParams(_0x2ea1ec){const _0x55c28d=a95_0x361e3b;if(!_0x2ea1ec)return{};try{const _0x11c44d=JSON['parse'](_0x2ea1ec);if(typeof _0x11c44d!==_0x55c28d(0x81)||_0x11c44d===null||Array[_0x55c28d(0x74)](_0x11c44d))return{};return{'jsUrl':typeof _0x11c44d[_0x55c28d(0x83)]===_0x55c28d(0x91)?_0x11c44d[_0x55c28d(0x83)][_0x55c28d(0x96)]():undefined,'cssUrl':typeof _0x11c44d[_0x55c28d(0x89)]===_0x55c28d(0x91)?_0x11c44d[_0x55c28d(0x89)][_0x55c28d(0x96)]():undefined,'pages':Array[_0x55c28d(0x74)](_0x11c44d['pages'])?_0x11c44d[_0x55c28d(0x7b)][_0x55c28d(0xa4)](String):undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a96_0x464fa7=a96_0x517d;(function(_0x5b0609,_0x3bbf43){const _0x2fbd0d=a96_0x517d,_0x1d9c50=_0x5b0609();while(!![]){try{const _0x2de2a6=parseInt(_0x2fbd0d(0x1ed))/0x1+-parseInt(_0x2fbd0d(0x1f4))/0x2*(parseInt(_0x2fbd0d(0x1e8))/0x3)+-parseInt(_0x2fbd0d(0x1b3))/0x4+-parseInt(_0x2fbd0d(0x1d2))/0x5+parseInt(_0x2fbd0d(0x1de))/0x6+parseInt(_0x2fbd0d(0x1e7))/0x7+-parseInt(_0x2fbd0d(0x1eb))/0x8;if(_0x2de2a6===_0x3bbf43)break;else _0x1d9c50['push'](_0x1d9c50['shift']());}catch(_0x2cfed1){_0x1d9c50['push'](_0x1d9c50['shift']());}}}(a96_0x1b69,0x1dcea));import a96_0x13b9f9 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';function a96_0x1b69(){const _0x487959=['jsUrl','str','patch','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','bool','yes','yellow','Failed\x20to\x20fetch\x20online\x20menu\x20list','diffs','Fetching\x20online\x20menu\x20list...','\x20updated,\x20','cssUrl','length','Menu\x20update\x20skipped','\x20updated.','replace','Menu\x20update\x20failed','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','updated','boolean','appcode','Would\x20update\x20','253080FwPHRq','\x20menu\x20resource\x20set(s).','appCode','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','high-risk-write','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','Updated\x20','trim','\x20failed.','params','isArray','517422FaKIbx','\x20menu(s)\x20with\x20existing\x20resources','cyan','\x20\x20Found\x20','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','validation','mode','\x20menu(s)...','force','1608229tPifrj','338787gAweRH','\x20menu(s)\x20with\x20JS:\x20','Updating\x20','19008viTTOn','flag','93253DYJyWB','string','object','\x20menu(s)\x20updated','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','rawFlags','parse','2HTndLQ','Menu\x20update\x20completed:\x20','selectedAppName','Online\x20menu\x20list\x20fetched','\x20menu(s)\x20failed','\x20\x20Update\x20','failed','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','/smartapi/menu/update','message','484904AUrgGZ','skipped','gray','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','update','✓\x20Menu\x20update\x20completed:\x20','map','cookie','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources'];a96_0x1b69=function(){return _0x487959;};return a96_0x1b69();}import{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{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuUpdate={'service':'menu','command':a96_0x464fa7(0x1b7),'description':a96_0x464fa7(0x1f1),'risk':a96_0x464fa7(0x1d6),'flags':[{'name':a96_0x464fa7(0x1dc),'type':'string','description':a96_0x464fa7(0x1b6)+a96_0x464fa7(0x1d8)},{'name':a96_0x464fa7(0x1c1),'type':a96_0x464fa7(0x1cf),'description':a96_0x464fa7(0x1e2)},{'name':'mode','type':'string','description':a96_0x464fa7(0x1bf),'enum':[a96_0x464fa7(0x1cb),'patch'],'default':'replace'},{'name':'force','type':'boolean','description':a96_0x464fa7(0x1bb)}],async 'dryRun'(_0x4dea87){const _0x32fd1f=a96_0x464fa7;ensureRunnableContext(_0x4dea87[_0x32fd1f(0x1f2)],_0x4dea87[_0x32fd1f(0x1f6)]);const _0x136e17=await runMenuUpdateCore(_0x4dea87[_0x32fd1f(0x1d4)],_0x4dea87[_0x32fd1f(0x1ba)],_0x4dea87['str'](_0x32fd1f(0x1dc)),{'mode':parseMode(_0x4dea87['str'](_0x32fd1f(0x1e4))),'dryRun':!![],'force':_0x4dea87[_0x32fd1f(0x1c0)](_0x32fd1f(0x1e6))});return{'method':'POST','url':_0x32fd1f(0x1fc),'body':_0x136e17,'description':_0x136e17[_0x32fd1f(0x1b4)]?_0x32fd1f(0x1d5):_0x32fd1f(0x1d1)+(_0x136e17[_0x32fd1f(0x1c4)]?.[_0x32fd1f(0x1c8)]??0x0)+_0x32fd1f(0x1d3)};},async 'execute'(_0x10987c){const _0x45d746=a96_0x464fa7;ensureRunnableContext(_0x10987c['rawFlags'],_0x10987c[_0x45d746(0x1f6)]);const _0x5d48cb=_0x10987c[_0x45d746(0x1ec)](_0x45d746(0x1c1)),_0x5a954e=_0x10987c[_0x45d746(0x1bd)](_0x45d746(0x1dc)),_0x1bd360=parseMode(_0x10987c[_0x45d746(0x1bd)](_0x45d746(0x1e4))),_0x32c981=_0x10987c['bool']('force'),_0x4ecf6a=parseParams(_0x5a954e),_0x45d87b=!!(_0x4ecf6a[_0x45d746(0x1bc)]||_0x4ecf6a['cssUrl']);if(_0x5d48cb||_0x45d87b&&!isInteractive()){const _0x381b2c=await runMenuUpdateCore(_0x10987c[_0x45d746(0x1d4)],_0x10987c[_0x45d746(0x1ba)],_0x5a954e,{'mode':_0x1bd360,'force':_0x32c981});return _0x381b2c['skipped']?writeCliSideChannelLine(_0x45d746(0x1cd)):(writeCliSideChannelLine(_0x45d746(0x1b8)+_0x381b2c[_0x45d746(0x1ce)]+_0x45d746(0x1f0)),_0x381b2c['failed']>0x0&&writeCliSideChannelLine('!\x20'+_0x381b2c['failed']+_0x45d746(0x1f8))),{'ok':_0x381b2c[_0x45d746(0x1fa)]===0x0,'data':_0x381b2c,'message':_0x381b2c[_0x45d746(0x1b4)]?_0x45d746(0x1c9):_0x45d746(0x1f5)+_0x381b2c['updated']+_0x45d746(0x1c6)+_0x381b2c[_0x45d746(0x1fa)]+_0x45d746(0x1db)};}requireInteractive();const _0x4d6102=startSpinner(_0x45d746(0x1c5));let _0x2c2511;try{_0x2c2511=await fetchOnlineMenuList(_0x10987c[_0x45d746(0x1d4)],_0x10987c['cookie']),stopSpinner(_0x4d6102,_0x45d746(0x1f7),!![]);}catch(_0xed49d3){stopSpinner(_0x4d6102,_0x45d746(0x1c3),![]);throw CliErrors[_0x45d746(0x1e3)](_0xed49d3 instanceof Error?_0xed49d3[_0x45d746(0x1fd)]:_0x45d746(0x1c3));}const _0x1b43e7=filterMenusWithResources(_0x2c2511);if(_0x1b43e7[_0x45d746(0x1c8)]===0x0)return writeCliSideChannelLine(a96_0x13b9f9[_0x45d746(0x1c2)](_0x45d746(0x1fb))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a96_0x13b9f9[_0x45d746(0x1e0)](_0x45d746(0x1e1)+_0x1b43e7[_0x45d746(0x1c8)]+_0x45d746(0x1df))),writeCliSideChannelLine(renderUpdateSummary(_0x1b43e7[_0x45d746(0x1b9)](_0x337c5d=>_0x337c5d['label']),[_0x4ecf6a[_0x45d746(0x1bc)],_0x4ecf6a[_0x45d746(0x1c7)]])),writeCliSideChannelLine('');let _0x41f196=_0x4ecf6a[_0x45d746(0x1bc)],_0x16d87b=_0x4ecf6a[_0x45d746(0x1c7)];!_0x41f196&&(_0x41f196=await askJsUrl());!_0x16d87b&&(_0x16d87b=await askCssUrl());const _0x542a4f=await askConfirm(_0x45d746(0x1f9)+_0x1b43e7[_0x45d746(0x1c8)]+_0x45d746(0x1e9)+_0x41f196+'\x20and\x20CSS:\x20'+_0x16d87b+'?');if(!_0x542a4f)return writeCliSideChannelLine(a96_0x13b9f9[_0x45d746(0x1b5)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x244dd4=[_0x41f196,_0x16d87b],_0x405ba4=startSpinner(_0x45d746(0x1ea)+_0x1b43e7[_0x45d746(0x1c8)]+_0x45d746(0x1e5));try{const _0x273ebe=await doUpdateCdnUrls(_0x10987c[_0x45d746(0x1d4)],_0x10987c[_0x45d746(0x1ba)],_0x1b43e7,_0x244dd4);return stopSpinner(_0x405ba4,_0x45d746(0x1d9)+_0x273ebe['updated']+'\x20menu(s)',_0x273ebe[_0x45d746(0x1fa)]===0x0),{'ok':_0x273ebe[_0x45d746(0x1fa)]===0x0,'data':_0x273ebe,'message':_0x273ebe[_0x45d746(0x1fa)]>0x0?_0x45d746(0x1f5)+_0x273ebe[_0x45d746(0x1ce)]+_0x45d746(0x1c6)+_0x273ebe[_0x45d746(0x1fa)]+_0x45d746(0x1db):'Menu\x20update\x20completed:\x20'+_0x273ebe[_0x45d746(0x1ce)]+_0x45d746(0x1ca)};}catch(_0x78b0d4){stopSpinner(_0x405ba4,_0x45d746(0x1cc),![]);throw CliErrors[_0x45d746(0x1e3)](_0x78b0d4 instanceof Error?_0x78b0d4[_0x45d746(0x1fd)]:_0x45d746(0x1cc));}}};function ensureRunnableContext(_0x11dcc5,_0x3f3d49){const _0x34321c=a96_0x464fa7,_0x56ef57=_0x11dcc5[_0x34321c(0x1d0)]?String(_0x11dcc5[_0x34321c(0x1d0)])[_0x34321c(0x1da)]():'';if(!isInProject()&&!_0x3f3d49&&!_0x56ef57)throw CliErrors[_0x34321c(0x1e3)]('menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function a96_0x517d(_0x2f670c,_0x33c4b5){_0x2f670c=_0x2f670c-0x1b3;const _0x1b6960=a96_0x1b69();let _0x517d51=_0x1b6960[_0x2f670c];return _0x517d51;}function parseMode(_0x31fe0b){const _0x337aaa=a96_0x464fa7;if(!_0x31fe0b)return'replace';if(_0x31fe0b===_0x337aaa(0x1cb)||_0x31fe0b===_0x337aaa(0x1be))return _0x31fe0b;throw CliErrors['validation'](_0x337aaa(0x1d7));}function parseParams(_0x3abf0e){const _0x3f6158=a96_0x464fa7;if(!_0x3abf0e)return{};try{const _0x2586b3=JSON[_0x3f6158(0x1f3)](_0x3abf0e);if(typeof _0x2586b3!==_0x3f6158(0x1ef)||_0x2586b3===null||Array[_0x3f6158(0x1dd)](_0x2586b3))return{};return{'jsUrl':typeof _0x2586b3[_0x3f6158(0x1bc)]==='string'?_0x2586b3[_0x3f6158(0x1bc)][_0x3f6158(0x1da)]():undefined,'cssUrl':typeof _0x2586b3['cssUrl']===_0x3f6158(0x1ee)?_0x2586b3['cssUrl'][_0x3f6158(0x1da)]():undefined};}catch{return{};}}
1
+ const a96_0x7aae7=a96_0x597e;function a96_0x39ab(){const _0x4e9234=['1692KKAuuo','replace','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','appCode','high-risk-write','Fetching\x20online\x20menu\x20list...','\x20menu(s)\x20failed','2142395pXIFoH','\x20menu\x20resource\x20set(s).','rawFlags','mode','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','Menu\x20update\x20skipped','params','selectedAppName','18sQsLcz','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','appcode','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','jsUrl','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','message','force','\x20failed.','string','1141784GAwUFG','\x20updated,\x20','Menu\x20update\x20completed:\x20','Updating\x20','object','cyan','trim','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','19856sadaGO','\x20menu(s)\x20with\x20JS:\x20','cookie','parse','Menu\x20update\x20failed','4098DNIypF','failed','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','bool','3249950ivBqsn','\x20menu(s)...','yellow','\x20menu(s)\x20with\x20existing\x20resources','flag','menu','cssUrl','str','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','map','\x20\x20Found\x20','Online\x20menu\x20list\x20fetched','boolean','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','skipped','522988mXgRNO','validation','yes','length','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20menu(s)','update','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','updated','POST','1701ymMVSS','859934CUsVDo'];a96_0x39ab=function(){return _0x4e9234;};return a96_0x39ab();}(function(_0x1b62b1,_0x56500d){const _0x382250=a96_0x597e,_0x36ab3e=_0x1b62b1();while(!![]){try{const _0x3747ce=-parseInt(_0x382250(0x13b))/0x1+parseInt(_0x382250(0x146))/0x2+-parseInt(_0x382250(0x128))/0x3*(-parseInt(_0x382250(0x147))/0x4)+-parseInt(_0x382250(0x14e))/0x5+-parseInt(_0x382250(0x156))/0x6*(parseInt(_0x382250(0x160))/0x7)+parseInt(_0x382250(0x123))/0x8*(parseInt(_0x382250(0x145))/0x9)+parseInt(_0x382250(0x12c))/0xa;if(_0x3747ce===_0x56500d)break;else _0x36ab3e['push'](_0x36ab3e['shift']());}catch(_0x4f7257){_0x36ab3e['push'](_0x36ab3e['shift']());}}}(a96_0x39ab,0x58273));import a96_0x50d856 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a96_0x597e(_0x19dbd5,_0x7f1047){_0x19dbd5=_0x19dbd5-0x11e;const _0x39abc3=a96_0x39ab();let _0x597e0d=_0x39abc3[_0x19dbd5];return _0x597e0d;}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuUpdate={'service':a96_0x7aae7(0x131),'command':a96_0x7aae7(0x141),'description':a96_0x7aae7(0x15b),'risk':a96_0x7aae7(0x14b),'flags':[{'name':a96_0x7aae7(0x154),'type':a96_0x7aae7(0x15f),'description':a96_0x7aae7(0x122)+a96_0x7aae7(0x152)},{'name':'yes','type':'boolean','description':a96_0x7aae7(0x149)},{'name':a96_0x7aae7(0x151),'type':a96_0x7aae7(0x15f),'description':'Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','enum':[a96_0x7aae7(0x148),'patch'],'default':a96_0x7aae7(0x148)},{'name':a96_0x7aae7(0x15d),'type':a96_0x7aae7(0x138),'description':a96_0x7aae7(0x134)}],async 'dryRun'(_0x1f7c06){const _0x4cd3ee=a96_0x7aae7;ensureRunnableContext(_0x1f7c06[_0x4cd3ee(0x150)],_0x1f7c06[_0x4cd3ee(0x155)]);const _0x225ef7=await runMenuUpdateCore(_0x1f7c06['appCode'],_0x1f7c06[_0x4cd3ee(0x125)],_0x1f7c06[_0x4cd3ee(0x133)](_0x4cd3ee(0x154)),{'mode':parseMode(_0x1f7c06[_0x4cd3ee(0x133)](_0x4cd3ee(0x151))),'dryRun':!![],'force':_0x1f7c06[_0x4cd3ee(0x12b)](_0x4cd3ee(0x15d))});return{'method':_0x4cd3ee(0x144),'url':'/smartapi/menu/update','body':_0x225ef7,'description':_0x225ef7[_0x4cd3ee(0x13a)]?'No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.':'Would\x20update\x20'+(_0x225ef7['diffs']?.['length']??0x0)+_0x4cd3ee(0x14f)};},async 'execute'(_0x5d5657){const _0x18c766=a96_0x7aae7;ensureRunnableContext(_0x5d5657[_0x18c766(0x150)],_0x5d5657[_0x18c766(0x155)]);const _0x54fc7f=_0x5d5657[_0x18c766(0x130)](_0x18c766(0x13d)),_0x1b77b2=_0x5d5657[_0x18c766(0x133)](_0x18c766(0x154)),_0xc0f4f=parseMode(_0x5d5657[_0x18c766(0x133)](_0x18c766(0x151))),_0x29798a=_0x5d5657[_0x18c766(0x12b)](_0x18c766(0x15d)),_0x205467=parseParams(_0x1b77b2),_0xb4c100=!!(_0x205467['jsUrl']||_0x205467[_0x18c766(0x132)]);if(_0x54fc7f||_0xb4c100&&!isInteractive()){const _0xe2093f=await runMenuUpdateCore(_0x5d5657[_0x18c766(0x14a)],_0x5d5657[_0x18c766(0x125)],_0x1b77b2,{'mode':_0xc0f4f,'force':_0x29798a});return _0xe2093f[_0x18c766(0x13a)]?writeCliSideChannelLine(_0x18c766(0x139)):(writeCliSideChannelLine('✓\x20Menu\x20update\x20completed:\x20'+_0xe2093f[_0x18c766(0x143)]+'\x20menu(s)\x20updated'),_0xe2093f[_0x18c766(0x129)]>0x0&&writeCliSideChannelLine('!\x20'+_0xe2093f['failed']+_0x18c766(0x14d))),{'ok':_0xe2093f[_0x18c766(0x129)]===0x0,'data':_0xe2093f,'message':_0xe2093f[_0x18c766(0x13a)]?_0x18c766(0x153):_0x18c766(0x162)+_0xe2093f[_0x18c766(0x143)]+_0x18c766(0x161)+_0xe2093f[_0x18c766(0x129)]+'\x20failed.'};}requireInteractive();const _0x39b40c=startSpinner(_0x18c766(0x14c));let _0x25b8e6;try{_0x25b8e6=await fetchOnlineMenuList(_0x5d5657['appCode'],_0x5d5657[_0x18c766(0x125)]),stopSpinner(_0x39b40c,_0x18c766(0x137),!![]);}catch(_0x366cb6){stopSpinner(_0x39b40c,_0x18c766(0x13f),![]);throw CliErrors[_0x18c766(0x13c)](_0x366cb6 instanceof Error?_0x366cb6[_0x18c766(0x15c)]:_0x18c766(0x13f));}const _0x120c33=filterMenusWithResources(_0x25b8e6);if(_0x120c33[_0x18c766(0x13e)]===0x0)return writeCliSideChannelLine(a96_0x50d856[_0x18c766(0x12e)](_0x18c766(0x12a))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a96_0x50d856[_0x18c766(0x120)](_0x18c766(0x136)+_0x120c33[_0x18c766(0x13e)]+_0x18c766(0x12f))),writeCliSideChannelLine(renderUpdateSummary(_0x120c33[_0x18c766(0x135)](_0x1810a5=>_0x1810a5['label']),[_0x205467[_0x18c766(0x15a)],_0x205467['cssUrl']])),writeCliSideChannelLine('');let _0x407af7=_0x205467['jsUrl'],_0x259f75=_0x205467[_0x18c766(0x132)];!_0x407af7&&(_0x407af7=await askJsUrl());!_0x259f75&&(_0x259f75=await askCssUrl());const _0x4481d8=await askConfirm('\x20\x20Update\x20'+_0x120c33[_0x18c766(0x13e)]+_0x18c766(0x124)+_0x407af7+'\x20and\x20CSS:\x20'+_0x259f75+'?');if(!_0x4481d8)return writeCliSideChannelLine(a96_0x50d856['gray']('\x20\x20Cancelled.')),{'ok':!![]};const _0x34993b=[_0x407af7,_0x259f75],_0x2c48a7=startSpinner(_0x18c766(0x11e)+_0x120c33[_0x18c766(0x13e)]+_0x18c766(0x12d));try{const _0x1b20fe=await doUpdateCdnUrls(_0x5d5657['appCode'],_0x5d5657[_0x18c766(0x125)],_0x120c33,_0x34993b);return stopSpinner(_0x2c48a7,'Updated\x20'+_0x1b20fe[_0x18c766(0x143)]+_0x18c766(0x140),_0x1b20fe[_0x18c766(0x129)]===0x0),{'ok':_0x1b20fe['failed']===0x0,'data':_0x1b20fe,'message':_0x1b20fe[_0x18c766(0x129)]>0x0?_0x18c766(0x162)+_0x1b20fe[_0x18c766(0x143)]+_0x18c766(0x161)+_0x1b20fe[_0x18c766(0x129)]+_0x18c766(0x15e):'Menu\x20update\x20completed:\x20'+_0x1b20fe[_0x18c766(0x143)]+'\x20updated.'};}catch(_0xdb482d){stopSpinner(_0x2c48a7,_0x18c766(0x127),![]);throw CliErrors[_0x18c766(0x13c)](_0xdb482d instanceof Error?_0xdb482d['message']:_0x18c766(0x127));}}};function ensureRunnableContext(_0x396bd6,_0x105a18){const _0x43b732=a96_0x7aae7,_0x3ac930=_0x396bd6[_0x43b732(0x158)]?String(_0x396bd6[_0x43b732(0x158)])[_0x43b732(0x121)]():'';if(!isInProject()&&!_0x105a18&&!_0x3ac930)throw CliErrors[_0x43b732(0x13c)](_0x43b732(0x157)+_0x43b732(0x159));}function parseMode(_0x467761){const _0x331c5b=a96_0x7aae7;if(!_0x467761)return _0x331c5b(0x148);if(_0x467761===_0x331c5b(0x148)||_0x467761==='patch')return _0x467761;throw CliErrors[_0x331c5b(0x13c)](_0x331c5b(0x142));}function parseParams(_0x30f4b5){const _0xbba5d6=a96_0x7aae7;if(!_0x30f4b5)return{};try{const _0x36dc37=JSON[_0xbba5d6(0x126)](_0x30f4b5);if(typeof _0x36dc37!==_0xbba5d6(0x11f)||_0x36dc37===null||Array['isArray'](_0x36dc37))return{};return{'jsUrl':typeof _0x36dc37['jsUrl']===_0xbba5d6(0x15f)?_0x36dc37[_0xbba5d6(0x15a)][_0xbba5d6(0x121)]():undefined,'cssUrl':typeof _0x36dc37[_0xbba5d6(0x132)]==='string'?_0x36dc37[_0xbba5d6(0x132)][_0xbba5d6(0x121)]():undefined};}catch{return{};}}