@happyvertical/smrt-planner 0.57.4 → 0.57.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (487) hide show
  1. package/app/404.html +21 -21
  2. package/app/_app/immutable/assets/AppShell.DrL8T9I9.css +1 -0
  3. package/app/_app/immutable/assets/labels.AVmg4hBz.css +1 -0
  4. package/app/_app/immutable/chunks/{ukqw0V0Z.js → 0as86J1A.js} +1 -1
  5. package/app/_app/immutable/chunks/{B6GaAylQ.js → B7d7dGCP.js} +1 -1
  6. package/app/_app/immutable/chunks/{VCg3x54j.js → BPsie9Wr.js} +1 -1
  7. package/app/_app/immutable/chunks/{CztFAhpp.js → BSYvnYu8.js} +1 -1
  8. package/app/_app/immutable/chunks/{CVcfTI5P.js → C3nKLKKd.js} +1 -1
  9. package/app/_app/immutable/chunks/CXKa_xdk.js +4 -0
  10. package/app/_app/immutable/chunks/CdBvpdnq.js +4 -0
  11. package/app/_app/immutable/chunks/{BhsxCKaI.js → CdlkzC7D.js} +1 -1
  12. package/app/_app/immutable/chunks/{gnVUq1Tr.js → CoXf-L_3.js} +22 -22
  13. package/app/_app/immutable/chunks/{h1rof478.js → CwNhmq3e.js} +1 -1
  14. package/app/_app/immutable/chunks/{XlsfHlOd.js → D2Ykv2Y3.js} +1 -1
  15. package/app/_app/immutable/chunks/{Burj9UYU.js → D31rqKs1.js} +1 -1
  16. package/app/_app/immutable/chunks/{CdPJK-gf.js → D8rEUyzO.js} +1 -1
  17. package/app/_app/immutable/chunks/{D76yH9OO.js → DBp81N-t.js} +1 -1
  18. package/app/_app/immutable/chunks/DIE02RSm.js +1 -0
  19. package/app/_app/immutable/chunks/{BvRNePGN.js → DrjdLb0M.js} +1 -1
  20. package/app/_app/immutable/chunks/{8vF2REci.js → Dyf3Cj8R.js} +1 -1
  21. package/app/_app/immutable/chunks/{Ckc_1feF.js → DypPefJO.js} +1 -1
  22. package/app/_app/immutable/chunks/DzRTyOpH.js +1 -0
  23. package/app/_app/immutable/chunks/{CQ13lq7J.js → Dzh-1KQR.js} +1 -1
  24. package/app/_app/immutable/chunks/GVQNHDp5.js +1 -0
  25. package/app/_app/immutable/chunks/{DCr75fDJ.js → ORlJSBRk.js} +1 -1
  26. package/app/_app/immutable/chunks/{CUAfmRua.js → PsiVGwJV.js} +1 -1
  27. package/app/_app/immutable/chunks/{DEwvWTFM.js → eNZ3ToP2.js} +1 -1
  28. package/app/_app/immutable/chunks/{D8D_RStZ.js → exPME6UK.js} +1 -1
  29. package/app/_app/immutable/chunks/{A_IpJrNN.js → jol435F5.js} +1 -1
  30. package/app/_app/immutable/entry/{app.C-mGsUDb.js → app.C_C191oT.js} +2 -2
  31. package/app/_app/immutable/entry/start.C01jT-Kj.js +1 -0
  32. package/app/_app/immutable/nodes/{0.CG8nFTeW.js → 0._tbUx7Ky.js} +1 -1
  33. package/app/_app/immutable/nodes/{1.BY2zPWBD.js → 1.CTatAlE5.js} +1 -1
  34. package/app/_app/immutable/nodes/{10.y59vLZOY.js → 10.DHnK3kbB.js} +1 -1
  35. package/app/_app/immutable/nodes/{11.HBRO8fTE.js → 11.Ck1kcQLu.js} +1 -1
  36. package/app/_app/immutable/nodes/{12.DiV3I_fX.js → 12.oK17D56_.js} +1 -1
  37. package/app/_app/immutable/nodes/{13.f4cxyt4f.js → 13.DlEsuw6F.js} +1 -1
  38. package/app/_app/immutable/nodes/{14.DnBBJxxq.js → 14.sDZ3z4Zh.js} +1 -1
  39. package/app/_app/immutable/nodes/{2.DR5lKFBV.js → 2.GYBHfqdI.js} +3 -3
  40. package/app/_app/immutable/nodes/{3.gu2TJwhp.js → 3.DOL1VeVM.js} +1 -1
  41. package/app/_app/immutable/nodes/{4.CU9BPw5o.js → 4.CiKq5-ek.js} +1 -1
  42. package/app/_app/immutable/nodes/{5.CD78hESs.js → 5.nKUg_W9L.js} +1 -1
  43. package/app/_app/immutable/nodes/{6.B5LspHdV.js → 6.CVGw-hLa.js} +1 -1
  44. package/app/_app/immutable/nodes/{7.lSo_04_4.js → 7.Clo6kG4w.js} +1 -1
  45. package/app/_app/immutable/nodes/{8.OVIZi4uJ.js → 8.C3moca98.js} +1 -1
  46. package/app/_app/immutable/nodes/{9.BLNgntah.js → 9.BnVJx5kW.js} +1 -1
  47. package/app/_app/version.json +1 -1
  48. package/app/advanced-styles/index.html +26 -26
  49. package/app/ai/index.html +30 -30
  50. package/app/blueprint/index.html +23 -23
  51. package/app/cookbook/index.html +23 -23
  52. package/app/index.html +32 -32
  53. package/app/m/ads/AdDeliveryTier/index.html +26 -26
  54. package/app/m/ads/AdEvent/index.html +26 -26
  55. package/app/m/ads/AdFormat/index.html +26 -26
  56. package/app/m/ads/AdGroup/index.html +26 -26
  57. package/app/m/ads/AdVariation/index.html +26 -26
  58. package/app/m/analytics/AnalyticsDataStream/index.html +26 -26
  59. package/app/m/analytics/AnalyticsEvent/index.html +26 -26
  60. package/app/m/analytics/AnalyticsProperty/index.html +26 -26
  61. package/app/m/analytics/AnalyticsReport/index.html +26 -26
  62. package/app/m/approvals/ApprovalEvent/index.html +26 -26
  63. package/app/m/approvals/ApprovalPolicy/index.html +26 -26
  64. package/app/m/approvals/ApprovalRequest/index.html +26 -26
  65. package/app/m/assets/Asset/attachments/index.html +27 -27
  66. package/app/m/assets/Asset/index.html +26 -26
  67. package/app/m/assets/AssetAssociation/index.html +26 -26
  68. package/app/m/assets/AssetMetafield/index.html +26 -26
  69. package/app/m/assets/AssetStatus/index.html +26 -26
  70. package/app/m/assets/AssetType/index.html +26 -26
  71. package/app/m/assets/Folder/index.html +26 -26
  72. package/app/m/chat/AgentSession/index.html +26 -26
  73. package/app/m/chat/ChatMessage/index.html +26 -26
  74. package/app/m/chat/ChatParticipant/index.html +26 -26
  75. package/app/m/chat/ChatReaction/index.html +26 -26
  76. package/app/m/chat/ChatRoom/index.html +26 -26
  77. package/app/m/chat/ChatThread/index.html +26 -26
  78. package/app/m/chat/VoiceGatewayTurn/index.html +26 -26
  79. package/app/m/chat/VoiceSession/index.html +26 -26
  80. package/app/m/commerce/Agreement/index.html +26 -26
  81. package/app/m/commerce/Cart/index.html +26 -26
  82. package/app/m/commerce/Contract/index.html +26 -26
  83. package/app/m/commerce/ContractLineItem/index.html +26 -26
  84. package/app/m/commerce/Customer/index.html +26 -26
  85. package/app/m/commerce/DocumentTax/index.html +26 -26
  86. package/app/m/commerce/Estimate/index.html +26 -26
  87. package/app/m/commerce/Fulfillment/index.html +26 -26
  88. package/app/m/commerce/FulfillmentLineItem/index.html +26 -26
  89. package/app/m/commerce/HistoricalCustomerFunds/index.html +26 -26
  90. package/app/m/commerce/HistoricalCustomerFundsAllocation/index.html +26 -26
  91. package/app/m/commerce/HistoricalSalesLine/index.html +26 -26
  92. package/app/m/commerce/Invoice/index.html +26 -26
  93. package/app/m/commerce/InvoiceLineItem/index.html +26 -26
  94. package/app/m/commerce/Lease/index.html +26 -26
  95. package/app/m/commerce/LicenseSale/index.html +26 -26
  96. package/app/m/commerce/Order/index.html +26 -26
  97. package/app/m/commerce/Payment/index.html +26 -26
  98. package/app/m/commerce/PaymentAllocation/index.html +26 -26
  99. package/app/m/commerce/PaymentInstrument/index.html +26 -26
  100. package/app/m/commerce/PaymentIntent/index.html +26 -26
  101. package/app/m/commerce/Payout/index.html +26 -26
  102. package/app/m/commerce/ProductionOrder/index.html +26 -26
  103. package/app/m/commerce/PurchaseContract/index.html +26 -26
  104. package/app/m/commerce/PurchaseOrder/index.html +26 -26
  105. package/app/m/commerce/SalesContract/index.html +26 -26
  106. package/app/m/commerce/SupplierQuote/index.html +26 -26
  107. package/app/m/commerce/TaxCode/index.html +26 -26
  108. package/app/m/commerce/TaxComponent/index.html +26 -26
  109. package/app/m/commerce/TaxSettings/index.html +26 -26
  110. package/app/m/commerce/TaxSummaryReport/index.html +26 -26
  111. package/app/m/commerce/Vendor/index.html +26 -26
  112. package/app/m/commerce/WholesaleOrder/index.html +26 -26
  113. package/app/m/content/Content/index.html +26 -26
  114. package/app/m/content/ContentContribution/index.html +26 -26
  115. package/app/m/content/ContentContributionAttachment/index.html +26 -26
  116. package/app/m/content/ContentContributionRevision/index.html +26 -26
  117. package/app/m/content/ContentContributionType/index.html +26 -26
  118. package/app/m/content/ContentContributor/index.html +26 -26
  119. package/app/m/content/ContentCorrection/index.html +26 -26
  120. package/app/m/content/ContentFeedSource/index.html +26 -26
  121. package/app/m/content/ContentGovernanceAssignment/index.html +26 -26
  122. package/app/m/content/ContentGovernancePolicy/index.html +26 -26
  123. package/app/m/content/ContentGovernanceProfile/index.html +26 -26
  124. package/app/m/content/ContentReference/index.html +26 -26
  125. package/app/m/content/ContentReview/index.html +26 -26
  126. package/app/m/content/ContentVersion/index.html +26 -26
  127. package/app/m/events/Event/index.html +26 -26
  128. package/app/m/events/EventParticipant/index.html +26 -26
  129. package/app/m/events/EventSeries/index.html +26 -26
  130. package/app/m/events/EventType/index.html +26 -26
  131. package/app/m/expenses/Expense/index.html +26 -26
  132. package/app/m/facts/Fact/index.html +26 -26
  133. package/app/m/facts/FactContent/index.html +26 -26
  134. package/app/m/facts/FactEvidence/index.html +26 -26
  135. package/app/m/facts/FactSource/index.html +26 -26
  136. package/app/m/facts/FactSubject/index.html +26 -26
  137. package/app/m/facts/FactTag/index.html +26 -26
  138. package/app/m/fields/FieldPolicy/index.html +26 -26
  139. package/app/m/fields/FieldPolicySuggestion/index.html +26 -26
  140. package/app/m/fields/FieldUsageCounter/index.html +26 -26
  141. package/app/m/images/Image/index.html +26 -26
  142. package/app/m/inventory/InventoryLocation/index.html +26 -26
  143. package/app/m/inventory/StockLevel/index.html +26 -26
  144. package/app/m/inventory/StockMovement/index.html +26 -26
  145. package/app/m/ledgers/Account/index.html +26 -26
  146. package/app/m/ledgers/Journal/index.html +26 -26
  147. package/app/m/ledgers/JournalEntry/index.html +26 -26
  148. package/app/m/ledgers/Ledger/index.html +26 -26
  149. package/app/m/manufacturing/Assembly/index.html +26 -26
  150. package/app/m/manufacturing/BillOfMaterials/index.html +26 -26
  151. package/app/m/manufacturing/BomLine/index.html +26 -26
  152. package/app/m/manufacturing/Operation/index.html +26 -26
  153. package/app/m/manufacturing/ProductionRun/index.html +26 -26
  154. package/app/m/manufacturing/ProductionRunCompletion/index.html +26 -26
  155. package/app/m/manufacturing/RoutingStep/index.html +26 -26
  156. package/app/m/marketing/Campaign/index.html +26 -26
  157. package/app/m/marketing/CampaignChannel/index.html +26 -26
  158. package/app/m/marketing/CampaignMetricSnapshot/index.html +26 -26
  159. package/app/m/messages/Account/index.html +26 -26
  160. package/app/m/messages/Attachment/index.html +26 -26
  161. package/app/m/messages/Blacklist/index.html +26 -26
  162. package/app/m/messages/Email/failed-sends/index.html +27 -27
  163. package/app/m/messages/Email/index.html +26 -26
  164. package/app/m/messages/Email/mailbox/index.html +27 -27
  165. package/app/m/messages/EmailAccount/index.html +26 -26
  166. package/app/m/messages/EmailAttachment/index.html +26 -26
  167. package/app/m/messages/EmailFolder/index.html +26 -26
  168. package/app/m/messages/Message/index.html +26 -26
  169. package/app/m/messages/MessagingEndpoint/index.html +26 -26
  170. package/app/m/messages/PersonaMessageRoute/index.html +26 -26
  171. package/app/m/messages/SlackAccount/index.html +26 -26
  172. package/app/m/messages/SlackMessage/index.html +26 -26
  173. package/app/m/messages/TelegramAccount/index.html +26 -26
  174. package/app/m/messages/Tweet/index.html +26 -26
  175. package/app/m/messages/TwitterAccount/index.html +26 -26
  176. package/app/m/messages/Whitelist/index.html +26 -26
  177. package/app/m/messages/ZulipAccount/index.html +26 -26
  178. package/app/m/places/Place/index.html +26 -26
  179. package/app/m/places/PlaceType/index.html +26 -26
  180. package/app/m/products/Category/index.html +26 -26
  181. package/app/m/products/Material/index.html +26 -26
  182. package/app/m/products/Product/index.html +26 -26
  183. package/app/m/products/Product/ingredients/index.html +27 -27
  184. package/app/m/products/ProductVariant/index.html +26 -26
  185. package/app/m/products/Sku/index.html +26 -26
  186. package/app/m/profiles/ApiKey/index.html +26 -26
  187. package/app/m/profiles/Bot/index.html +26 -26
  188. package/app/m/profiles/MagicLinkToken/index.html +26 -26
  189. package/app/m/profiles/NostrIdentity/index.html +26 -26
  190. package/app/m/profiles/OidcIdentity/index.html +26 -26
  191. package/app/m/profiles/Organization/index.html +26 -26
  192. package/app/m/profiles/Person/index.html +26 -26
  193. package/app/m/profiles/Profile/index.html +26 -26
  194. package/app/m/profiles/ProfileMetadata/index.html +26 -26
  195. package/app/m/profiles/ProfileMetafield/index.html +26 -26
  196. package/app/m/profiles/ProfileRelationship/index.html +26 -26
  197. package/app/m/profiles/ProfileRelationshipTerm/index.html +26 -26
  198. package/app/m/profiles/ProfileRelationshipType/index.html +26 -26
  199. package/app/m/profiles/ProfileType/index.html +26 -26
  200. package/app/m/projects/Comment/index.html +26 -26
  201. package/app/m/projects/Issue/index.html +26 -26
  202. package/app/m/projects/Label/index.html +26 -26
  203. package/app/m/projects/Project/index.html +26 -26
  204. package/app/m/projects/ProjectIntegration/index.html +26 -26
  205. package/app/m/projects/PullRequest/index.html +26 -26
  206. package/app/m/projects/Repository/index.html +26 -26
  207. package/app/m/properties/Property/index.html +26 -26
  208. package/app/m/properties/Zone/index.html +26 -26
  209. package/app/m/reports/RuntimeReport/index.html +26 -26
  210. package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +26 -26
  211. package/app/m/reports/SmrtReportLock/index.html +26 -26
  212. package/app/m/reports/SmrtReportRefreshTask/index.html +26 -26
  213. package/app/m/reports/SmrtReportRun/index.html +26 -26
  214. package/app/m/reports/SmrtReportSchedule/index.html +26 -26
  215. package/app/m/reports/SmrtReportWatermark/index.html +26 -26
  216. package/app/m/sales/Agreement/index.html +26 -26
  217. package/app/m/sales/AttributionException/index.html +26 -26
  218. package/app/m/sales/AttributionPolicy/index.html +26 -26
  219. package/app/m/sales/Commission/index.html +26 -26
  220. package/app/m/sales/CommissionAdjustment/index.html +26 -26
  221. package/app/m/sales/CommissionPayout/index.html +26 -26
  222. package/app/m/sales/CommissionPlan/index.html +26 -26
  223. package/app/m/sales/Earner/index.html +26 -26
  224. package/app/m/sales/EarnerSourceAttribution/index.html +26 -26
  225. package/app/m/sales/EarningEvent/index.html +26 -26
  226. package/app/m/sales/ExecutedAgreement/index.html +26 -26
  227. package/app/m/sales/Lead/index.html +26 -26
  228. package/app/m/sales/Opportunity/index.html +26 -26
  229. package/app/m/sales/OpportunityConversion/index.html +26 -26
  230. package/app/m/sales/PipelineDefinition/index.html +26 -26
  231. package/app/m/sales/PipelineStage/index.html +26 -26
  232. package/app/m/sales/Referral/index.html +26 -26
  233. package/app/m/sales/ReferralAgreement/index.html +26 -26
  234. package/app/m/sales/ReferralLink/index.html +26 -26
  235. package/app/m/sales/ReferralProgram/index.html +26 -26
  236. package/app/m/sales/ReferralTermSnapshot/index.html +26 -26
  237. package/app/m/sales/ReferralTouch/index.html +26 -26
  238. package/app/m/sales/Referrer/index.html +26 -26
  239. package/app/m/sales/SalesActivity/index.html +26 -26
  240. package/app/m/sales/SalesRepresentative/index.html +26 -26
  241. package/app/m/sites/Site/index.html +26 -26
  242. package/app/m/sites/SiteAgentBinding/index.html +26 -26
  243. package/app/m/social/OAuthState/index.html +26 -26
  244. package/app/m/social/SocialAccount/index.html +26 -26
  245. package/app/m/social/SocialPost/index.html +26 -26
  246. package/app/m/social/SocialPostAnalyticsSnapshot/index.html +26 -26
  247. package/app/m/subscriptions/BillingAdjustment/index.html +26 -26
  248. package/app/m/subscriptions/ClientCharge/index.html +26 -26
  249. package/app/m/subscriptions/CreditGrant/index.html +26 -26
  250. package/app/m/subscriptions/PricingRule/index.html +26 -26
  251. package/app/m/subscriptions/RetailCharge/index.html +26 -26
  252. package/app/m/subscriptions/SpendingPolicy/index.html +26 -26
  253. package/app/m/subscriptions/SubscriptionPlan/index.html +26 -26
  254. package/app/m/subscriptions/TenantSubscription/index.html +26 -26
  255. package/app/m/subscriptions/TenantUsageMetric/index.html +26 -26
  256. package/app/m/support/ServiceTimeEntry/index.html +26 -26
  257. package/app/m/support/SupportAiRun/index.html +26 -26
  258. package/app/m/support/SupportAvailability/index.html +26 -26
  259. package/app/m/support/SupportCase/index.html +26 -26
  260. package/app/m/support/SupportCaseEvent/index.html +26 -26
  261. package/app/m/support/SupportChannelBinding/index.html +26 -26
  262. package/app/m/support/SupportCharge/index.html +26 -26
  263. package/app/m/support/SupportCompensation/index.html +26 -26
  264. package/app/m/support/SupportCompensationPlan/index.html +26 -26
  265. package/app/m/support/SupportEscalation/index.html +26 -26
  266. package/app/m/support/SupportInteraction/index.html +26 -26
  267. package/app/m/support/SupportPlan/index.html +26 -26
  268. package/app/m/support/SupportPolicy/index.html +26 -26
  269. package/app/m/support/SupportQualification/index.html +26 -26
  270. package/app/m/support/SupportServiceTarget/index.html +26 -26
  271. package/app/m/support/SupportSpecialist/index.html +26 -26
  272. package/app/m/support/SupportWorkLink/index.html +26 -26
  273. package/app/m/tags/Tag/index.html +26 -26
  274. package/app/m/tags/TagAlias/index.html +26 -26
  275. package/app/m/timesheets/AttendanceBreak/index.html +26 -26
  276. package/app/m/timesheets/AttendancePunch/index.html +26 -26
  277. package/app/m/timesheets/AttendanceSegment/index.html +26 -26
  278. package/app/m/timesheets/ServiceChargeSnapshot/index.html +26 -26
  279. package/app/m/timesheets/ServiceCompensationSnapshot/index.html +26 -26
  280. package/app/m/timesheets/ServiceTimeEntry/index.html +26 -26
  281. package/app/m/users/Group/index.html +26 -26
  282. package/app/m/users/GroupMember/index.html +26 -26
  283. package/app/m/users/GroupRole/index.html +26 -26
  284. package/app/m/users/Membership/index.html +26 -26
  285. package/app/m/users/MembershipOverride/index.html +26 -26
  286. package/app/m/users/Permission/index.html +26 -26
  287. package/app/m/users/Role/index.html +26 -26
  288. package/app/m/users/RolePermission/index.html +26 -26
  289. package/app/m/users/Session/index.html +26 -26
  290. package/app/m/users/Tenant/index.html +26 -26
  291. package/app/m/users/TenantIntegration/index.html +26 -26
  292. package/app/m/users/TenantPermissionOverride/index.html +26 -26
  293. package/app/m/users/User/index.html +26 -26
  294. package/app/m/video/Character/index.html +26 -26
  295. package/app/m/video/CharacterAsset/index.html +26 -26
  296. package/app/m/video/CompositeJob/index.html +26 -26
  297. package/app/m/video/Performer/index.html +26 -26
  298. package/app/m/video/PerformerAsset/index.html +26 -26
  299. package/app/m/video/Scene/index.html +26 -26
  300. package/app/m/video/SceneAsset/index.html +26 -26
  301. package/app/m/video/VideoComposition/index.html +26 -26
  302. package/app/m/video/VideoCompositionAsset/index.html +26 -26
  303. package/app/m/video/VideoSequence/index.html +26 -26
  304. package/app/m/video/VideoSequenceAsset/index.html +26 -26
  305. package/app/m/video/VideoShot/index.html +26 -26
  306. package/app/m/video/VideoShotAsset/index.html +26 -26
  307. package/app/m/video/VideoShotCharacter/index.html +26 -26
  308. package/app/m/video/VideoWorkflow/index.html +26 -26
  309. package/app/m/voice/VoiceOutput/index.html +26 -26
  310. package/app/m/voice/VoiceProfile/index.html +26 -26
  311. package/app/m/voice/VoiceSample/index.html +26 -26
  312. package/app/mcp.html +2 -2
  313. package/app/packages/ads/index.html +24 -24
  314. package/app/packages/analytics/index.html +24 -24
  315. package/app/packages/approvals/index.html +24 -24
  316. package/app/packages/assets/index.html +24 -24
  317. package/app/packages/chat/index.html +24 -24
  318. package/app/packages/comments/index.html +24 -24
  319. package/app/packages/commerce/index.html +24 -24
  320. package/app/packages/content/index.html +24 -24
  321. package/app/packages/events/index.html +24 -24
  322. package/app/packages/expenses/index.html +24 -24
  323. package/app/packages/facts/index.html +24 -24
  324. package/app/packages/fields/index.html +24 -24
  325. package/app/packages/human-resources/index.html +24 -24
  326. package/app/packages/images/index.html +24 -24
  327. package/app/packages/index.html +24 -24
  328. package/app/packages/ingestion/index.html +24 -24
  329. package/app/packages/inventory/index.html +24 -24
  330. package/app/packages/ledgers/index.html +24 -24
  331. package/app/packages/manufacturing/index.html +24 -24
  332. package/app/packages/marketing/index.html +24 -24
  333. package/app/packages/messages/index.html +24 -24
  334. package/app/packages/places/index.html +24 -24
  335. package/app/packages/preferences/index.html +24 -24
  336. package/app/packages/products/index.html +24 -24
  337. package/app/packages/profiles/index.html +24 -24
  338. package/app/packages/projects/index.html +24 -24
  339. package/app/packages/properties/index.html +24 -24
  340. package/app/packages/reports/index.html +24 -24
  341. package/app/packages/sales/index.html +24 -24
  342. package/app/packages/sites/index.html +24 -24
  343. package/app/packages/social/index.html +24 -24
  344. package/app/packages/subscriptions/index.html +24 -24
  345. package/app/packages/support/index.html +24 -24
  346. package/app/packages/tags/index.html +24 -24
  347. package/app/packages/timesheets/index.html +24 -24
  348. package/app/packages/users/index.html +24 -24
  349. package/app/packages/video/index.html +24 -24
  350. package/app/packages/voice/index.html +24 -24
  351. package/app/packages/webhooks/index.html +24 -24
  352. package/app/recipes/account-access/help/index.html +25 -25
  353. package/app/recipes/account-access/index.html +28 -28
  354. package/app/recipes/activity/help/index.html +25 -25
  355. package/app/recipes/activity/index.html +28 -28
  356. package/app/recipes/agreements/help/index.html +25 -25
  357. package/app/recipes/agreements/index.html +28 -28
  358. package/app/recipes/analytics.reports/help/index.html +25 -25
  359. package/app/recipes/analytics.reports/index.html +28 -28
  360. package/app/recipes/assets/help/index.html +25 -25
  361. package/app/recipes/assets/index.html +28 -28
  362. package/app/recipes/billing/help/index.html +25 -25
  363. package/app/recipes/billing/index.html +28 -28
  364. package/app/recipes/chat.assistant/help/index.html +25 -25
  365. package/app/recipes/chat.assistant/index.html +28 -28
  366. package/app/recipes/comments/help/index.html +25 -25
  367. package/app/recipes/comments/index.html +28 -28
  368. package/app/recipes/commerce.customers/help/index.html +25 -25
  369. package/app/recipes/commerce.customers/index.html +28 -28
  370. package/app/recipes/commerce.estimates/help/index.html +25 -25
  371. package/app/recipes/commerce.estimates/index.html +28 -28
  372. package/app/recipes/commerce.purchases/help/index.html +25 -25
  373. package/app/recipes/commerce.purchases/index.html +28 -28
  374. package/app/recipes/commerce.sales/help/index.html +25 -25
  375. package/app/recipes/commerce.sales/index.html +28 -28
  376. package/app/recipes/commerce.vendors/help/index.html +25 -25
  377. package/app/recipes/commerce.vendors/index.html +28 -28
  378. package/app/recipes/commerce.wholesale/help/index.html +25 -25
  379. package/app/recipes/commerce.wholesale/index.html +28 -28
  380. package/app/recipes/events.calendar/help/index.html +25 -25
  381. package/app/recipes/events.calendar/index.html +28 -28
  382. package/app/recipes/expenses.tracking/help/index.html +25 -25
  383. package/app/recipes/expenses.tracking/index.html +28 -28
  384. package/app/recipes/fields.form-customization/help/index.html +25 -25
  385. package/app/recipes/fields.form-customization/index.html +28 -28
  386. package/app/recipes/ingestion/help/index.html +25 -25
  387. package/app/recipes/ingestion/index.html +28 -28
  388. package/app/recipes/integrations/help/index.html +25 -25
  389. package/app/recipes/integrations/index.html +28 -28
  390. package/app/recipes/inventory.stock/help/index.html +25 -25
  391. package/app/recipes/inventory.stock/index.html +28 -28
  392. package/app/recipes/ledgers.bookkeeping/help/index.html +25 -25
  393. package/app/recipes/ledgers.bookkeeping/index.html +28 -28
  394. package/app/recipes/messages/help/index.html +25 -25
  395. package/app/recipes/messages/index.html +28 -28
  396. package/app/recipes/products/help/index.html +25 -25
  397. package/app/recipes/products/index.html +28 -28
  398. package/app/recipes/projects.tracker/help/index.html +25 -25
  399. package/app/recipes/projects.tracker/index.html +28 -28
  400. package/app/recipes/reports.materialized/help/index.html +25 -25
  401. package/app/recipes/reports.materialized/index.html +28 -28
  402. package/app/recipes/reports.runtime/help/index.html +25 -25
  403. package/app/recipes/reports.runtime/index.html +28 -28
  404. package/app/recipes/sales.pipeline/help/index.html +25 -25
  405. package/app/recipes/sales.pipeline/index.html +28 -28
  406. package/app/recipes/tags.taxonomy/help/index.html +25 -25
  407. package/app/recipes/tags.taxonomy/index.html +28 -28
  408. package/app/recipes/team-collaboration/help/index.html +25 -25
  409. package/app/recipes/team-collaboration/index.html +28 -28
  410. package/app/recipes/timesheets.time-entries/help/index.html +25 -25
  411. package/app/recipes/timesheets.time-entries/index.html +28 -28
  412. package/app/s/custom-accounts/index.html +23 -23
  413. package/app/s/custom-appointments/index.html +23 -23
  414. package/app/s/custom-billing/index.html +23 -23
  415. package/app/s/custom-bookings/index.html +82 -0
  416. package/app/s/custom-buying/index.html +23 -23
  417. package/app/s/custom-checkout/index.html +23 -23
  418. package/app/s/custom-classes/index.html +23 -23
  419. package/app/s/custom-clients/index.html +23 -23
  420. package/app/s/custom-events/index.html +23 -23
  421. package/app/s/custom-fleet/index.html +23 -23
  422. package/app/s/custom-gigs/index.html +82 -0
  423. package/app/s/custom-giving/index.html +23 -23
  424. package/app/s/custom-instruments/index.html +82 -0
  425. package/app/s/custom-jobs/index.html +23 -23
  426. package/app/s/custom-kitchen/index.html +23 -23
  427. package/app/s/custom-lessons/index.html +82 -0
  428. package/app/s/custom-material/index.html +23 -23
  429. package/app/s/custom-meetings/index.html +23 -23
  430. package/app/s/custom-members/index.html +23 -23
  431. package/app/s/custom-merch/index.html +82 -0
  432. package/app/s/custom-money/index.html +82 -0
  433. package/app/s/custom-paint/index.html +23 -23
  434. package/app/s/custom-parts/index.html +23 -23
  435. package/app/s/custom-rentals/index.html +23 -23
  436. package/app/s/custom-roastery/index.html +23 -23
  437. package/app/s/custom-schedule/index.html +23 -23
  438. package/app/s/custom-shelf/index.html +23 -23
  439. package/app/s/custom-shop/index.html +23 -23
  440. package/app/s/custom-students/index.html +82 -0
  441. package/app/s/custom-wholesale/index.html +23 -23
  442. package/app/s/custom-work/index.html +23 -23
  443. package/app/s/custom-yard/index.html +23 -23
  444. package/app/s/section-access-control/index.html +23 -23
  445. package/app/s/section-account-security/index.html +23 -23
  446. package/app/s/section-accounting/index.html +23 -23
  447. package/app/s/section-activity/index.html +23 -23
  448. package/app/s/section-agreements/index.html +23 -23
  449. package/app/s/section-analytics/index.html +23 -23
  450. package/app/s/section-assets/index.html +23 -23
  451. package/app/s/section-billing/index.html +23 -23
  452. package/app/s/section-calendar/index.html +23 -23
  453. package/app/s/section-catalog/index.html +23 -23
  454. package/app/s/section-chat.assistant/index.html +23 -23
  455. package/app/s/section-comments/index.html +23 -23
  456. package/app/s/section-fields.form-customization/index.html +23 -23
  457. package/app/s/section-ingestion/index.html +23 -23
  458. package/app/s/section-integrations/index.html +23 -23
  459. package/app/s/section-messages/index.html +23 -23
  460. package/app/s/section-more/index.html +23 -23
  461. package/app/s/section-operations/index.html +23 -23
  462. package/app/s/section-projects/index.html +23 -23
  463. package/app/s/section-purchasing/index.html +23 -23
  464. package/app/s/section-reports.materialized/index.html +23 -23
  465. package/app/s/section-reports.runtime/index.html +23 -23
  466. package/app/s/section-sales/index.html +23 -23
  467. package/app/s/section-taxonomy/index.html +23 -23
  468. package/app/s/section-team/index.html +23 -23
  469. package/app/s/section-work/index.html +23 -23
  470. package/dist/catalog/catalog.json +50 -38
  471. package/dist/components/ThemeBridge.svelte +2 -2
  472. package/dist/data/packs.d.ts.map +1 -1
  473. package/dist/data/packs.js +415 -0
  474. package/dist/library/icons.d.ts.map +1 -1
  475. package/dist/library/icons.js +10 -0
  476. package/dist/library/library.json +506 -0
  477. package/dist/smrt-version.d.ts +1 -1
  478. package/dist/smrt-version.js +1 -1
  479. package/package.json +56 -56
  480. package/app/_app/immutable/assets/AppShell.Dnc9PAvY.css +0 -1
  481. package/app/_app/immutable/assets/labels.DrQMsG17.css +0 -1
  482. package/app/_app/immutable/chunks/9pRTae44.js +0 -1
  483. package/app/_app/immutable/chunks/BMRtN-eN.js +0 -4
  484. package/app/_app/immutable/chunks/Bc_SIIIS.js +0 -1
  485. package/app/_app/immutable/chunks/C7z2g6fG.js +0 -1
  486. package/app/_app/immutable/chunks/D7t4xFw6.js +0 -4
  487. package/app/_app/immutable/entry/start.DnB4rZdO.js +0 -1
@@ -0,0 +1,4 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DrjdLb0M.js","./COiEfhsA.js","./uBIymjUX.js","./C7zBd-pD.js","./D7hhQvDO.js","./CA-A9Ngs.js","./GdHEbDDH.js","./gMSmS-_y.js","./DG3qFFTE.js","./xihTtKlq.js","./YUSKx8_q.js","./DK8Blf1Y.js","../assets/currency-metadata.ksbBA8-C.css","./M-CuJzQN.js","../assets/SegmentedControl.DMqHG5fn.css","../assets/forms.DXOeP4wZ.css","./DBp81N-t.js","./CoXf-L_3.js","../assets/app.4ScdTV_S.css","./BQxY8kkL.js","./C3nKLKKd.js","./DIE02RSm.js","../assets/webmcp-ui-context.hO24Ni5w.css","./eNZ3ToP2.js","../assets/data.CVlX_W0i.css","./CXKa_xdk.js","./Bv5jGtB8.js","../assets/feedback.qFktqYFY.css","./B7d7dGCP.js","../assets/state.CkVocVUJ.css","../assets/labels.AVmg4hBz.css","./Dzh-1KQR.js","./Cn2mA3wh.js","./BYcBM-fh.js","./DTWraE40.js","./CUyVrfsu.js"])))=>i.map(i=>d[i]);
2
+ import{$ as e,B as t,Ct as n,Dt as r,E as i,Et as a,F as o,Ft as s,G as c,H as l,It as u,J as d,K as f,L as p,Lt as m,M as h,N as g,Ot as _,P as v,Pt as y,R as b,St as x,T as S,U as C,V as w,W as T,X as E,Y as D,Z as O,a as k,bt as A,ct as j,d as ee,dt as te,ft as M,gt as N,ht as P,k as F,kt as ne,mt as I,n as L,nt as R,pt as z,q as re,r as ie,st as B,tt as ae,v as V,vt as H,z as oe}from"./DG3qFFTE.js";import{t as U}from"./uBIymjUX.js";import"./xihTtKlq.js";import{r as se,s as W}from"./Bv5jGtB8.js";import{a as ce,n as le,r as ue,t as de}from"./YUSKx8_q.js";import{St as fe,xt as pe}from"./CoXf-L_3.js";import{n as G}from"./DK8Blf1Y.js";import{t as me}from"./M-CuJzQN.js";import{_ as he,a as ge,c as K,d as q,f as _e,g as ve,h as ye,i as be,l as xe,n as Se,o as Ce,r as we,s as Te,t as Ee,u as De,v as Oe,y as ke}from"./DIE02RSm.js";import{a as Ae,h as je,l as J,m as Y,r as Me}from"./eNZ3ToP2.js";import{n as X,t as Ne}from"./CUyVrfsu.js";import{g as Pe}from"./gMSmS-_y.js";import{a as Fe,i as Ie,t as Le}from"./BYcBM-fh.js";var Re=Symbol(`smrt-admin-shell`);function ze(e){return ne(Re,e),e}function Be(){let e=a(Re);if(!e)throw Error(`[useAdminShell] No AdminShell state found on Svelte context.`);return e}function Ve(){return a(Re)??null}function He(i,a){_(a,!0);let o=k(a,`label`,3,`Running activities`),s=Be(),c=n(()=>s.activityBadge(a.edge));var u=T(),f=z(u),p=t=>{{let r=n(()=>e(c).hasFailed?`error`:`primary`),i=n(()=>`${o()}: ${e(c).count}`);pe(t,{get variant(){return e(r)},size:`sm`,get title(){return o()},get"aria-label"(){return e(i)},children:(t,n)=>{y();var r=d();B(e=>l(r,e),[()=>e(c).progress===null?e(c).count:`${Math.round(e(c).progress)}%`]),C(t,r)},$$slots:{default:!0}})}};t(f,t=>{(e(c).count>0||e(c).hasFailed)&&t(p)}),C(i,u),r()}var Z=ce({"ui.stt_test.heading":`STT Adapter Test`,"ui.stt_test.adapter_browser":`Browser (Web Speech API)`,"ui.stt_test.adapter_whisper_wasm":`Whisper WASM (v2)`,"ui.stt_test.adapter_whisper_cpp":`Whisper CPP`,"ui.stt_test.status_initializing":`Initializing...`,"ui.stt_test.status_ready":`Ready`,"ui.stt_test.status_not_initialized":`Not initialized`,"ui.workspace_shell.close_navigation":`Close navigation`,"ui.workspace_shell.close_inspector":`Close inspector`,"ui.workspace_shell.primary_navigation":`Primary navigation`,"ui.workspace_shell.workspace_navigation":`Workspace navigation`,"ui.workspace_shell.inspector_tools":`Inspector tools`,"ui.tools_dock.no_tools_available":`No tools available`,"ui.tools_dock.no_tools_context":`No tools are available for the current context.`,"ui.tools_dock.select_tool":`Select a tool to begin.`,"ui.tools_dock.workspace_tools":`Workspace tools`,"ui.admin_shell.no_focus_tools":`No focus tools`,"ui.admin_shell.focus_tools":`Focus tools`,"ui.admin_shell.no_app_panel":`No app panel`,"ui.admin_shell.no_system_panel":`No system panel`,"ui.admin_shell.shell_shortcuts":`Shell shortcuts`,"ui.admin_shell.close_shortcuts":`Close shortcuts`,"ui.admin_shell.shortcuts":`Shortcuts`,"ui.admin_shell.close":`Close`,"ui.admin_shell.home":`Home`,"ui.admin_shell.menu":`Menu`,"ui.admin_shell.close_menu":`Close menu`,"ui.admin_shell.tools":`Tools`,"ui.admin_shell.close_tools":`Close tools`,"ui.admin_shell.expand_sidebar":`Expand sidebar`,"ui.admin_shell.collapse_sidebar":`Collapse sidebar`,"ui.admin_shell.close_sidebar":`Close sidebar`,"ui.admin_shell.expand_panel":`Expand {panel}`,"ui.admin_shell.collapse_panel":`Collapse {panel}`,"ui.admin_shell.close_panel":`Close {label}`,"ui.admin_shell.open_panel":`Open {label}`,"ui.admin_shell.resize_panel":`Resize {label}`,"ui.shell_nav_toggle.collapse":`Collapse {label}`,"ui.shell_nav_toggle.expand":`Expand {label}`,"ui.shell_nav_toggle.navigation":`navigation`,"ui.phone_top_bar.back":`Back to {label}`,"ui.phone_bottom_bar.label":`Main`,"ui.phone_bottom_bar.unread":`{count} unread`,"ui.phone_bottom_bar.new":`new`,"ui.activity_toasts.dismiss":`Dismiss activity notification`,"ui.activity_toasts.dismiss_action":`Dismiss`,"ui.activity_item.view":`View`,"ui.activity_item.cancel":`Cancel`,"ui.activity_list.empty":`No activities`,"ui.activity_ticker.label":`Running processes`,"ui.activity_ticker.empty":`No active processes`,"ui.activity_ticker.pause":`Pause scrolling activities`,"ui.activity_ticker.resume":`Resume scrolling activities`,"ui.activity_ticker.queued":`Queued`,"ui.app_scope_panel.app_scope":`App scope`,"ui.app_shell.settings_link":`Shell settings`,"ui.app_shell.navigation":`Application navigation`,"ui.app_shell.slot_content":`{slot} content`,"ui.shell_slot.header_start":`Header, left`,"ui.shell_slot.header_center":`Header, middle`,"ui.shell_slot.header_end":`Header, right`,"ui.shell_slot.footer_start":`Footer, left`,"ui.shell_slot.footer_center":`Footer, middle`,"ui.shell_slot.footer_end":`Footer, right`,"ui.shell_slot.left_sidebar_header":`Left sidebar, header`,"ui.shell_slot.left_sidebar_footer":`Left sidebar, footer`,"ui.shell_slot.right_sidebar_header":`Right sidebar, header`,"ui.shell_slot.right_sidebar_footer":`Right sidebar, footer`,"ui.shell_slot.short_header_start":`Left`,"ui.shell_slot.short_header_center":`Middle`,"ui.shell_slot.short_header_end":`Right`,"ui.shell_slot.short_footer_start":`Left`,"ui.shell_slot.short_footer_center":`Middle`,"ui.shell_slot.short_footer_end":`Right`,"ui.shell_slot.short_sidebar_header":`Header`,"ui.shell_slot.short_sidebar_footer":`Footer`,"ui.owner_setup.heading":`Set up your local application`,"ui.owner_setup.unavailable":`Local owner setup is unavailable or has already been completed.`,"ui.owner_setup.intro":`Create the real local owner account. This invitation works once and stays on this device.`,"ui.owner_setup.name":`Name`,"ui.owner_setup.email":`Email`,"ui.owner_setup.tenant_name":`Workspace name (optional)`,"ui.owner_setup.submit":`Create owner`,"ui.shell_settings_page.heading":`Settings`,"ui.shell_settings_page.description":`Adjust appearance, your account, and the workspace layout.`,"ui.hotkey_input.capture_title":`Press a key to capture it`,"ui.hotkey_input.conflicts_with":`Conflicts with`,"ui.shell_settings_panel.shell_settings":`Shell settings`,"ui.shell_settings_panel.description":`Show or hide the workspace areas and reset the layout.`,"ui.shell_settings_panel.disable_hotkeys":`Disable hotkeys`,"ui.shell_settings_panel.enable_hotkeys":`Enable hotkeys`,"ui.shell_settings_panel.collapse":`Collapse`,"ui.shell_settings_panel.expand":`Expand`,"ui.owner_setup.link_missing_heading":`This setup link is missing or has expired`,"ui.owner_setup.link_missing_body":`Setup links work once and only for a short time. Run one of these in the terminal where the app runs.`,"ui.owner_setup.recovery_open":`Open a fresh setup link`,"ui.owner_setup.recovery_recover":`Recover the setup invitation`,"ui.shell_settings.appearance":`Appearance`,"ui.shell_settings.theme":`Theme`,"ui.shell_settings.color_scheme":`Color scheme`,"ui.shell_settings.account":`Account`,"ui.shell_settings.account_name":`Name`,"ui.shell_settings.account_email":`Email`,"ui.shell_settings.account_signed_out":`You are not signed in.`,"ui.shell_settings.sign_out":`Sign out`,"ui.shell_settings.sign_out_failed":`Couldn't sign out. Try again.`,"ui.shell_settings.layout":`Layout`,"ui.shell_settings.hide":`Hide`,"ui.shell_settings.show":`Show`,"ui.shell_settings.edit_layout_on":`Editing layout`,"ui.shell_settings.edit_layout_off":`Edit layout`,"ui.shell_settings.reset_layout":`Reset layout`,"ui.shell_settings.panels":`Shown areas`,"ui.shell_settings.show_region":`Show {region}`,"ui.shell_settings.hide_region":`Hide {region}`,"ui.shell_settings.region_shown":`Shown`,"ui.shell_settings.region_hidden":`Hidden`,"ui.shell_settings.shortcuts":`Keyboard shortcuts`,"ui.shell_layout_editor.heading":`Shell layout`,"ui.shell_layout_editor.description":`Choose which panels appear and arrange the navigation. Drag a handle, or focus it, press Space, and use the arrow keys.`,"ui.shell_layout_editor.reset":`Reset to defaults`,"ui.shell_layout_editor.panels":`Panels`,"ui.shell_layout_editor.show_panel":`Show {panel} panel`,"ui.shell_layout_editor.start_expanded":`Start {panel} panel expanded`,"ui.shell_layout_editor.panel_unavailable":`The {panel} panel is not available in this app.`,"ui.shell_layout_editor.navigation":`Navigation`,"ui.shell_layout_editor.top_level":`Top level`,"ui.shell_layout_editor.show_entry":`Show {label} in navigation`,"ui.shell_layout_editor.new_section":`New section`,"ui.shell_layout_editor.new_section_label":`New section`,"ui.shell_layout_editor.section_name":`Name of section {label}`,"ui.shell_layout_editor.rename_item":`Rename {label}`,"ui.shell_layout_editor.item_name":`Name of item {label}`,"ui.shell_layout_editor.reset_item":`Reset {label} to {original}`,"ui.shell_layout_editor.section_icon":`Icon of {label}`,"ui.shell_layout_editor.icon_option":`Use {icon} icon`,"ui.section_menu.label":`{label} entries`,"ui.section_menu.empty":`No entries in this section.`,"ui.shell_layout_editor.show_title_for":`Show title of {label}`,"ui.shell_layout_editor.delete":`Delete`,"ui.shell_layout_editor.delete_section":`Delete section {label}`,"ui.shell_layout_editor.delete_confirm":`Delete {label}? Its items return to their default sections.`,"ui.shell_layout_editor.preview":`Preview`,"ui.shell_layout_editor.preview_label":`Navigation preview`,"ui.shell_layout_editor.sortable_label":`Navigation sections and items`,"ui.layout_edit.toggle":`Edit layout`,"ui.layout_edit.announce_on":`Layout editing on. Drag items between zones, or focus a grip, press Space, and use the arrow keys.`,"ui.layout_edit.announce_off":`Layout editing off.`,"ui.layout_edit.zone":`{region} · {slot}`,"ui.layout_edit.region_hidden":`{region} · hidden`,"ui.layout_edit.show_region":`Show {region}`,"ui.layout_edit.hide_region":`Hide {region}`,"ui.layout_edit.hide_last_region":`Cannot hide {region}: at least one region must stay visible`,"ui.app_shell.brand_item":`App title`,"ui.layout_edit.section_options":`Options for section {label}`,"ui.layout_edit.edit_section":`Edit section {label}`,"ui.shell_region.header":`Header`,"ui.shell_region.left_sidebar":`Left sidebar`,"ui.shell_region.right_sidebar":`Right sidebar`,"ui.shell_region.footer":`Footer`,"ui.shortcuts_overlay.open_shortcuts":`Open shortcuts`,"ui.shortcuts_overlay.close_drawer":`Close drawer`,"ui.shortcuts_overlay.close":`Close`,"ui.shortcuts_overlay.escape":`Esc`,"ui.system_scope_panel.system_scope":`System scope`,"ui.system_scope_panel.activities":`Activities`,"ui.system_scope_panel.no_running_work":`No running work`,"ui.system_status_chips.system_status":`System status`,"ui.tenant_nav.tenant_navigation":`Tenant navigation`,"ui.tenant_nav.needs_attention":`Needs attention`,"ui.workspace_account_menu.open":`Open account menu`,"ui.workspace_account_menu.current_tenant":`{tenant} — current`,"ui.workspace_account_menu.sign_out":`Sign out`,"ui.activity_feed.title":`Live activity feed`,"ui.activity_feed.description":`A smrt-web live collection reconciled into the shell activity registry.`,"ui.activity_feed.enqueue_job":`Enqueue job`,"ui.activity_feed.advance_job":`Advance job`,"ui.activity_feed.complete_job":`Complete job`,"ui.activity_feed.fail_job":`Fail job`,"ui.activity_feed.clear_finished":`Clear finished`,"ui.activity_feed.rows_heading":`Backing collection rows`,"ui.activity_feed.no_rows":`No rows yet`,"ui.activity_feed.job_label":`Render job`,"ui.system_feed.title":`System feed`,"ui.system_feed.description":`Polls an app-provided status endpoint and maps it into the system-scope panels and status chips.`,"ui.system_feed.pause":`Pause polling`,"ui.system_feed.resume":`Resume polling`,"ui.system_feed.refresh":`Refresh now`,"ui.system_feed.fail_next":`Fail next fetch`,"ui.system_feed.status_label":`Feed status`,"ui.system_feed.tick_label":`Ticks`,"ui.system_feed.error_label":`Last error`,"ui.system_feed.jobs_panel":`Jobs`,"ui.system_feed.schedules_panel":`Schedules`,"ui.system_feed.dispatch_panel":`Dispatch`,"ui.system_feed.chip_workers":`Workers`,"ui.system_feed.chip_running":`Running`,"ui.system_feed.chip_queued":`Queued`,"ui.system_feed.chip_failed":`Failed`,"ui.phone_tab_bar.label":`Main`,"ui.phone_tab_bar.more":`More`,"ui.app_shell.account_item":`Account menu`,"ui.app_shell.color_scheme_item":`Color scheme`,"ui.app_shell.color_scheme_dark":`Dark mode`,"ui.app_shell.color_scheme_to_dark":`Switch to dark mode`,"ui.app_shell.color_scheme_to_light":`Switch to light mode`,"ui.app_shell.command_palette_item":`Search`,"ui.app_shell.account_settings":`Settings`,"ui.dock_toggles.set_up":`Set up {label}`}),Ue=c(`<img class="smrt-admin-shell__logo svelte-r3uxsf"/>`),We=c(`<span aria-hidden="true" class="svelte-r3uxsf"> </span>`),Ge=c(`<span class="svelte-r3uxsf"> </span>`),Ke=c(`<div><strong class="svelte-r3uxsf"> </strong><!></div>`),qe=c(`<!> <!>`,1),Je=c(`<a><!></a>`),Ye=c(`<div><!></div>`);function Xe(e,n){_(n,!0);let a=e=>{var r=T(),a=z(r),p=e=>{var t=T(),r=z(t);o(r,()=>n.brand,()=>({compact:f()})),C(e,t)},m=e=>{var r=qe(),a=z(r),o=e=>{var t=Ue();B(()=>{V(t,`src`,n.logoSrc),V(t,`alt`,d())}),C(e,t)};t(a,e=>{n.logoSrc&&e(o)});var p=P(a,2),m=e=>{var r=T(),i=z(r),a=e=>{var t=We(),n=I(t,!0);B(e=>l(n,e),[()=>c().charAt(0)]),C(e,t)};t(i,e=>{n.logoSrc||e(a)}),C(e,r)},h=e=>{var r=Ke();let a;var o=M(r),d=I(o,!0),f=P(o),p=e=>{var t=Ge(),n=I(t,!0);B(()=>l(n,u())),C(e,t)};t(f,e=>{u()&&e(p)}),s(r),B(e=>{a=i(r,1,`smrt-admin-shell__brand-text svelte-r3uxsf`,null,a,{wordmark:e}),l(d,c())},[()=>!!n.logoSrc&&!u()]),C(e,r)};t(p,e=>{f()?e(m):e(h,-1)}),C(e,r)};t(a,e=>{n.brand?e(p):e(m,-1)}),C(e,r)},c=k(n,`title`,3,`SMRT`),u=k(n,`subtitle`,3,``),d=k(n,`logoAlt`,3,``),f=k(n,`compact`,3,!1),{t:p}=de();var m=T(),h=z(m),g=e=>{var t=Je();let r;var o=M(t);a(o),s(t),B(e=>{r=i(t,1,`smrt-admin-shell__brand smrt-admin-shell__brand-link svelte-r3uxsf`,null,r,{compact:f()}),V(t,`href`,n.homeHref),V(t,`aria-label`,e)},[()=>c()||p(Z[`ui.admin_shell.home`])]),C(e,t)},v=e=>{var t=Ye();let n;var r=M(t);a(r),s(t),B(()=>n=i(t,1,`smrt-admin-shell__brand svelte-r3uxsf`,null,n,{compact:f()})),C(e,t)};t(h,e=>{n.homeHref?e(g):e(v,-1)}),C(e,m),r()}var Ze=[`header.start`,`header.center`,`header.end`,`footer.start`,`footer.center`,`footer.end`,`leftSidebar.header`,`leftSidebar.footer`,`rightSidebar.header`,`rightSidebar.footer`];function Qe(e){return e.split(`.`)[0]}function $e(e){let[t,n]=e.split(`.`);switch(t){case`header`:return[`leftSidebar.header`,`rightSidebar.header`,`footer.${n}`];case`footer`:return[`leftSidebar.footer`,`rightSidebar.footer`,`header.${n}`];case`leftSidebar`:return n===`header`?[`header.start`,`rightSidebar.header`,`footer.start`]:[`footer.start`,`header.start`,`rightSidebar.footer`];case`rightSidebar`:return n===`header`?[`header.end`,`leftSidebar.header`,`footer.end`]:[`footer.end`,`header.end`,`leftSidebar.footer`]}}function et(e,t){for(let n of[e,...$e(e)])if(t(Qe(n)))return n;return null}var tt=`dock:`,nt=`slot:`;function rt(e){return`${tt}${e}`}function it(e){return`${nt}${e}`}function at(e){return typeof e==`string`&&Ze.includes(e)}var ot=`@root`,st=[`top`,`left`,`right`,`bottom`],ct=`custom:`;function lt(){return{version:1}}function ut(e){return!e||!e.sectionOrder?.length&&!Q(e.itemOrder)&&!e.hidden?.length&&!Q(e.moved)&&!Q(e.sections)&&!Q(e.items)&&!e.customSections?.length&&!Q(e.panels)&&!Q(e.placements)}function Q(e){return typeof e==`object`&&!!e&&Object.keys(e).length>0}function dt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ft(e){if(!Array.isArray(e))return;let t=new Set;for(let n of e)typeof n==`string`&&n!==``&&t.add(n);return t.size>0?[...t]:void 0}function pt(e){if(typeof e!=`string`)return;let t=e.trim();return t===``?void 0:t}function mt(e){if(!dt(e))return;let t={},n=pt(e.label);n&&(t.label=n),typeof e.showTitle==`boolean`&&(t.showTitle=e.showTitle);let r=pt(e.icon);return r&&(t.icon=r),Q(t)?t:void 0}function ht(e){if(!dt(e))return;let t={},n=pt(e.label);n&&(t.label=n);let r=pt(e.description);return r&&(t.description=r),Q(t)?t:void 0}function gt(e){if(!dt(e))return;let t={};for(let[n,r]of Object.entries(e)){let e=n===``?void 0:ht(r);e&&(t[n]=e)}return Q(t)?t:void 0}function _t(e){if(!Array.isArray(e))return[];let t=new Set,n=[];for(let r of e){if(!dt(r)||typeof r.id!=`string`)continue;let e=pt(r.label);r.id.startsWith(`custom:`)&&e&&(t.has(r.id)||(t.add(r.id),n.push({id:r.id,label:e})))}return n}function vt(e){let t=lt();if(!dt(e)||e.version!==1)return t;let n=ft(e.sectionOrder);if(n&&(t.sectionOrder=n),dt(e.itemOrder)){let n={};for(let[t,r]of Object.entries(e.itemOrder)){let e=ft(r);e&&(n[t]=e)}Q(n)&&(t.itemOrder=n)}let r=ft(e.hidden);if(r&&(t.hidden=r),dt(e.moved)){let n={};for(let[t,r]of Object.entries(e.moved))typeof r==`string`&&r!==``&&(n[t]=r);Q(n)&&(t.moved=n)}if(dt(e.sections)){let n={};for(let[t,r]of Object.entries(e.sections)){let e=mt(r);e&&(n[t]=e)}Q(n)&&(t.sections=n)}let i=gt(e.items);i&&(t.items=i);let a=_t(e.customSections);if(a.length>0&&(t.customSections=a),dt(e.panels)){let n={};for(let t of st){let r=e.panels[t];if(!dt(r))continue;let i={};typeof r.visible==`boolean`&&(i.visible=r.visible),(r.initial===`collapsed`||r.initial===`expanded`)&&(i.initial=r.initial),Q(i)&&(n[t]=i)}Q(n)&&(t.panels=n)}let o=Ht(e.placements);return o&&(t.placements=o),t}function yt(e){return e.id??e.heading}function bt(e){return e.id??e.href}function xt(e,t){if(!t||t.length===0)return[...e];let n=new Set(e),r=[],i=new Set;for(let e of t)n.has(e)&&!i.has(e)&&(i.add(e),r.push(e));if(r.length===0)return[...e];let a=0;return e.map(e=>i.has(e)?r[a++]:e)}function St(e=[],t=[],n){let r=new Set([ot]),i=e=>{let t=e;for(let n=2;r.has(t);n+=1)t=`${e}#${n}`;return r.add(t),t},a=[{id:ot,group:null,items:e.map(e=>({id:i(bt(e)),item:e}))}];for(let e of t){let t=i(yt(e));a.push({id:t,group:e,items:e.items.map(e=>({id:i(bt(e)),item:e}))})}for(let e of _t(n?.customSections))r.has(e.id)||(r.add(e.id),a.push({id:e.id,group:{id:e.id,heading:e.label,items:[]},items:[],custom:!0}));let o=dt(n?.sections)?n.sections:{},s=gt(n?.items)??{},c=new Set(ft(n?.hidden)??[]),l=dt(n?.moved)?n?.moved:{},u=new Set(a.map(e=>e.id)),d=new Set(a.flatMap(e=>e.items.map(e=>e.id))),f=(e,t)=>{let n=d.has(e)?l[e]:void 0;return typeof n==`string`&&u.has(n)?n:t},p=xt(a.slice(1).map(e=>e.id),ft(n?.sectionOrder)),m=new Map(a.map(e=>[e.id,e])),h=[a[0],...p.map(e=>m.get(e))],g=dt(n?.itemOrder)?n?.itemOrder:{};return h.map(e=>{let t=[];for(let n of a)for(let r of n.items)f(r.id,n.id)===e.id&&t.push({id:r.id,item:s[r.id]?.description?{...r.item,description:s[r.id]?.description}:r.item,nativeSectionId:n.id,sectionId:e.id,hidden:c.has(r.id),label:s[r.id]?.label??r.item.label,defaultLabel:r.item.label});t.sort((t,n)=>Number(t.nativeSectionId!==e.id)-Number(n.nativeSectionId!==e.id));let n=new Map(t.map(e=>[e.id,e])),r=xt(t.map(e=>e.id),ft(g[e.id])),i=e.group?mt(o[e.id]):void 0,l=e.custom===!0;return{id:e.id,group:e.group,heading:e.group?(l?void 0:i?.label)??e.group.heading:null,defaultHeading:e.group&&!l?e.group.heading:null,custom:l,titleVisible:e.group?i?.showTitle??e.group.showTitle!==!1:!1,icon:e.group?i?.icon??e.group.icon??null:null,defaultIcon:e.group?.icon??null,hidden:e.group?c.has(e.id):!1,items:r.map(e=>n.get(e))}})}function Ct(e,t){return!t||e===!1||e?.initial===`hidden`?e:t.visible===!1?!1:t.initial===`collapsed`||t.initial===`expanded`?{...e,initial:t.initial}:e}function wt(e,t,n,r){let i=n??{};if(ut(r))return{nav:e,groups:t,panels:i};let a=St(e,t,r),o=e=>e.hidden?[]:e.items.filter(e=>!e.hidden).map(e=>e.label===e.defaultLabel?e.item:{...e.item,label:e.label,defaultLabel:e.defaultLabel}),[s,...c]=a,l=[];for(let e of c){let t=o(e),n=e.group;if(e.hidden||t.length===0&&(e.custom||n.items.length>0))continue;let r={...n,items:t};e.heading!==n.heading&&(r.id=yt(n),r.heading=e.heading),e.titleVisible?delete r.showTitle:r.showTitle=!1,e.icon&&(r.icon=e.icon),l.push(r)}let u={...i},d=dt(r?.panels)?r?.panels:void 0;for(let e of st){let t=d?.[e];if(!dt(t))continue;let n=Ct(i[e],t);n!==void 0&&(u[e]=n)}return{nav:o(s),groups:l,panels:u}}function Tt(e){let t={version:1};return e.sectionOrder?.length&&(t.sectionOrder=e.sectionOrder),Q(e.itemOrder)&&(t.itemOrder=e.itemOrder),e.hidden?.length&&(t.hidden=e.hidden),Q(e.moved)&&(t.moved=e.moved),Q(e.sections)&&(t.sections=e.sections),Q(e.items)&&(t.items=e.items),e.customSections?.length&&(t.customSections=e.customSections),Q(e.panels)&&(t.panels=e.panels),Q(e.placements)&&(t.placements=e.placements),t}function Et(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Dt(e,t){return Number.isFinite(e)?Math.max(0,Math.min(Math.trunc(e),t)):t}function Ot(e,t,n,r,i){let a=vt(n??lt()),o=St(e,t,a).slice(1).map(e=>e.id);if(!o.includes(r))return a;let s=o.filter(e=>e!==r);s.splice(Dt(i,s.length),0,r);let c=Et(s,St(e,t,{version:1,customSections:a.customSections}).slice(1).map(e=>e.id))?void 0:s;return Tt({...a,sectionOrder:c})}function kt(e,t,n,r,i,a){let o=vt(n??lt()),s=St(e,t,o),c=s.find(e=>e.items.some(e=>e.id===r)),l=s.find(e=>e.id===i);if(!c||!l)return o;let u=c.items.find(e=>e.id===r);if(!u)return o;let d=new Map(s.map(e=>[e.id,e.items.map(e=>e.id)]));d.set(c.id,(d.get(c.id)??[]).filter(e=>e!==r));let f=[...d.get(l.id)??[]];f.splice(Dt(a??f.length,f.length),0,r),d.set(l.id,f);let p={...o.moved??{}};l.id===u.nativeSectionId?delete p[r]:p[r]=l.id;let m={...o,moved:p},h=St(e,t,{version:1,moved:p,sectionOrder:o.sectionOrder,customSections:o.customSections}),g={...o.itemOrder??{}};for(let e of new Set([c.id,l.id])){let t=h.find(t=>t.id===e)?.items.map(e=>e.id),n=d.get(e)??[];t&&Et(n,t)?delete g[e]:g[e]=n}return Tt({...m,itemOrder:g})}function At(e,t,n,r){let i=vt(n??lt());return!$(e,t,i,r)||i.hidden?.includes(r)?i:Tt({...i,hidden:[...i.hidden??[],r]})}function jt(e,t){let n=vt(e??lt());return n.hidden?.includes(t)?Tt({...n,hidden:n.hidden.filter(e=>e!==t)}):n}function $(e,t,n,r){return St(e,t,{version:1,customSections:n.customSections}).some(e=>e.group!==null&&e.id===r||e.items.some(e=>e.id===r))}function Mt(e,t,n,r){let i=vt(e??lt());if(!st.includes(t))return i;let a={...i.panels?.[t]??{}};`visible`in n&&(n.visible===!1?a.visible=!1:delete a.visible),`initial`in n&&(n.initial===`collapsed`||n.initial===`expanded`?a.initial=n.initial:delete a.initial);let o=r?.[t];a.initial!==void 0&&o!==!1&&a.initial===(o?.initial??`collapsed`)&&delete a.initial;let s={...i.panels??{}};return Q(a)?s[t]=a:delete s[t],Tt({...i,panels:s})}function Nt(e,t,n){let r={...e.sections??{}},i={...r[t]??{},...n};return i.label===void 0&&delete i.label,i.showTitle===void 0&&delete i.showTitle,i.icon===void 0&&delete i.icon,Q(i)?r[t]=i:delete r[t],Tt({...e,sections:r})}function Pt(e,t,n,r){return St(e,t,n).find(e=>e.group!==null&&e.id===r)}function Ft(e,t,n,r,i){let a=vt(n??lt()),o=Pt(e,t,a,r);if(!o)return a;let s=pt(i);return o.custom?s?Tt({...a,customSections:a.customSections?.map(e=>e.id===r?{...e,label:s}:e)}):a:Nt(a,r,{label:!s||s===o.defaultHeading?void 0:s})}function It(e,t,n,r,i){let a=vt(n??lt()),o=St(e,t,a).flatMap(e=>e.items).find(e=>e.id===r);if(!o)return a;let s=pt(i),c={...a.items??{}},l=c[r]?.description,u={...s&&s!==o.defaultLabel?{label:s}:{},...l?{description:l}:{}};return Q(u)?c[r]=u:delete c[r],Tt({...a,items:c})}function Lt(e,t,n,r,i){let a=vt(n??lt()),o=Pt(e,t,a,r);return o?Nt(a,r,{showTitle:i===(o.custom?!0:o.group?.showTitle!==!1)?void 0:i}):a}function Rt(e,t,n,r,i){let a=vt(n??lt()),o=Pt(e,t,a,r);if(!o)return a;let s=pt(i);return Nt(a,r,{icon:!s||s===o.defaultIcon?void 0:s})}function zt(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`section`}function Bt(e,t,n,r){let i=vt(n??lt()),a=pt(r);if(!a)return i;let o=new Set(St(e,t,i).flatMap(e=>[e.id,...e.items.map(e=>e.id)])),s=`${ct}${zt(a)}`,c=s;for(let e=2;o.has(c);e+=1)c=`${s}-${e}`;return Tt({...i,customSections:[...i.customSections??[],{id:c,label:a}]})}function Vt(e,t){let n=vt(e??lt());if(!n.customSections?.some(e=>e.id===t))return n;let r=e=>{if(!e)return;let n={...e};return delete n[t],n},i=Object.fromEntries(Object.entries(n.moved??{}).filter(([,e])=>e!==t));return Tt({...n,customSections:n.customSections.filter(e=>e.id!==t),sectionOrder:n.sectionOrder?.filter(e=>e!==t),itemOrder:r(n.itemOrder),hidden:n.hidden?.filter(e=>e!==t),sections:r(n.sections),moved:i})}function Ht(e){if(!dt(e))return;let t={};for(let[n,r]of Object.entries(e))n!==``&&at(r)&&(t[n]=r);return Q(t)?t:void 0}function Ut(e,t){let n=Object.fromEntries(Ze.map(e=>[e,[]])),r=Ht(t?.placements)??{},i=new Set;for(let t of e)i.has(t.id)||(i.add(t.id),r[t.id]===void 0&&n[t.slot]?.push(t.id));for(let[e,t]of Object.entries(r))i.has(e)&&n[t].push(e);return n}function Wt(e,t,n,r){let i=vt(e??lt());if(t===``||!at(n))return i;let a={...i.placements??{}};return delete a[t],n!==r&&(a[t]=n),Tt({...i,placements:a})}function Gt(e,t){let n=vt(e??lt());if(!n.placements||!(t in n.placements))return n;let r={...n.placements};return delete r[t],Tt({...n,placements:r})}var Kt=[`top`,`left`,`right`,`bottom`],qt={top:`app`,left:`tenant`,right:`focus`,bottom:`system`},Jt={app:`top`,tenant:`left`,focus:`right`,system:`bottom`},Yt={top:{code:`KeyW`},left:{code:`KeyA`},bottom:{code:`KeyS`},right:{code:`KeyD`}},Xt={top:{edge:`top`,scope:`app`,label:`Header`,initial:`collapsed`,presentation:`overlay`,hotkey:Yt.top,collapsedSize:`3.5rem`,expandedSize:`18rem`},left:{edge:`left`,scope:`tenant`,label:`Left sidebar`,initial:`collapsed`,presentation:`push`,hotkey:Yt.left,collapsedSize:`4.25rem`,expandedSize:`16rem`},right:{edge:`right`,scope:`focus`,label:`Right sidebar`,initial:`collapsed`,presentation:`push`,hotkey:Yt.right,collapsedSize:`4.25rem`,expandedSize:`20rem`},bottom:{edge:`bottom`,scope:`system`,label:`Footer`,initial:`collapsed`,presentation:`overlay`,hotkey:Yt.bottom,collapsedSize:`2.75rem`,expandedSize:`18rem`}};function Zt(e={}){return{panels:Object.fromEntries(Kt.map(t=>{let n=e[t];return n===!1?[t,{...Xt[t],initial:`hidden`,hotkey:null}]:[t,{...Xt[t],...n,edge:t,scope:n?.scope??qt[t]}]}))}}function Qt(e,t,n={},r,i){return t.initial===`hidden`||i?.visible===!1?`hidden`:n.panels?.[e]??(r?t.viewportDefaults?.[r]:void 0)??i?.initial??t.initial}var $t={min:240,max:720,step:16};function en(e,t){if(e!==`left`&&e!==`right`||!t.resizable||t.initial===`hidden`)return null;let n=t.resizable===!0?{}:t.resizable,r=Math.max(0,n.min??$t.min);return{min:r,max:Math.max(r,n.max??$t.max),step:Math.max(1,n.step??$t.step)}}function tn(e,t){return Math.round(Math.min(t.max,Math.max(t.min,e)))}function nn(e,t){if(t===`state`&&e.viewportDefaults)return!1;let n=e.persist??!0;return typeof n==`boolean`?n:n[t]??!0}function rn(e,t){let n={...e};for(let r of[`panels`,`sizes`]){let i=e[r];if(!i)continue;let a={};for(let e of Kt)e in i&&nn(t.panels[e],r===`panels`?`state`:`size`)&&(a[e]=i[e]);Object.keys(a).length>0?n[r]=a:delete n[r]}return n}function an(e,t,n={}){return t.initial===`hidden`?null:n.keymap&&e in n.keymap?n.keymap[e]??null:t.hotkey}function on(e,t){return{...e,...t,keymap:e.keymap||t.keymap?{...e.keymap??{},...t.keymap??{}}:void 0,panels:e.panels||t.panels?{...e.panels??{},...t.panels??{}}:void 0,sizes:e.sizes||t.sizes?{...e.sizes??{},...t.sizes??{}}:void 0}}function sn(e){let t={};if(e.hotkeysEnabled!==void 0&&(t.hotkeysEnabled=e.hotkeysEnabled),e.activeFocusToolId!==void 0&&(t.activeFocusToolId=e.activeFocusToolId),e.layout!==void 0){let n=vt(e.layout);ut(n)||(t.layout=n)}if(e.keymap&&Object.keys(e.keymap).length>0&&(t.keymap=e.keymap),e.panels&&Object.keys(e.panels).length>0&&(t.panels=e.panels),e.sizes){let n=Object.fromEntries(Object.entries(e.sizes).filter(([,e])=>typeof e==`number`&&Number.isFinite(e)));Object.keys(n).length>0&&(t.sizes=n)}return t}var cn=class{key;constructor(e){this.key=e}read(){if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(this.key);return e?JSON.parse(e):null}catch{return null}}write(e){typeof window<`u`&&window.localStorage.setItem(this.key,JSON.stringify(sn(e)))}};function ln(e,t,n={}){if(un(e,n))return null;if(fn(e))return{type:`show-shortcuts`};for(let r of Kt){let i=an(r,t[r],n);if(i&&dn(i,e))return{type:`toggle-panel`,edge:r}}return null}function un(e,t={}){return t.hotkeysEnabled===!1||e.isComposing||pn(e.target)?!0:e.altKey||e.ctrlKey||e.metaKey||e.shiftKey?!fn(e):!1}function dn(e,t){return e.code===t.code&&!!e.altKey===t.altKey&&!!e.ctrlKey===t.ctrlKey&&!!e.metaKey===t.metaKey&&!!e.shiftKey===t.shiftKey}function fn(e){return e.key===`?`||e.code===`Slash`&&e.shiftKey}function pn(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||t===`select`||e.isContentEditable?!0:!!e.closest(`[contenteditable="true"]`)}function mn(e){return e?[e.ctrlKey?`Ctrl`:``,e.altKey?`Alt`:``,e.shiftKey?`Shift`:``,e.metaKey?`Meta`:``,e.code.replace(/^Key/,``).replace(/^Digit/,``)].filter(Boolean).join(`+`):`Off`}function hn(e){return e.phone?`phone`:e.desktop?`desktop`:`tablet`}var gn=class{hidden=!1;#e=0;#t=0;#n;#r;#i;constructor(e={}){this.#n=e.revealWithin??56,this.#r=e.hideAfter??12,this.#i=e.showAfter??4}update(e){let t=e.maxY??1/0,n=Math.min(Math.max(e.y,0),Math.max(t,0));if(e.pinned||n<=this.#n)return this.hidden=!1,this.#e=n,this.#t=0,this.hidden;let r=n-this.#e;return this.#e=n,r===0||(this.#t=Math.sign(r)===Math.sign(this.#t)?this.#t+r:r,this.#t>=this.#r?this.hidden=!0:-this.#t>=this.#i&&(this.hidden=!1)),this.hidden}reset(){this.hidden=!1,this.#e=0,this.#t=0}};function _n(e){let t=e.visualHeight*(e.scale??1);return e.layoutHeight-t>(e.threshold??150)}function vn(e){return e.keyboardOpen?`none`:e.formActions?`form`:`nav`}var yn=`[data-form-action-bar]`,bn=`(max-width: 48rem)`,xn=`(min-width: 64rem)`;function Sn(){return typeof window>`u`||typeof window.matchMedia!=`function`?`desktop`:window.matchMedia(`(max-width: 48rem)`).matches?`phone`:window.matchMedia(`(min-width: 64rem)`).matches?`desktop`:`tablet`}var Cn=class{config;adapter;#e=A(N({}));get settings(){return e(this.#e)}set settings(e){H(this.#e,e,!0)}revealed=new Set;#t=A(N({top:`collapsed`,left:`collapsed`,right:`collapsed`,bottom:`collapsed`}));get panels(){return e(this.#t)}set panels(e){H(this.#t,e,!0)}#n=A(`desktop`);get viewport(){return e(this.#n)}set viewport(e){H(this.#n,e,!0)}#r=A(N([]));get focusTools(){return e(this.#r)}set focusTools(e){H(this.#r,e,!0)}#i=A(null);get activeFocusToolId(){return e(this.#i)}set activeFocusToolId(e){H(this.#i,e,!0)}#a=A(0);get dockFocusRequest(){return e(this.#a)}set dockFocusRequest(e){H(this.#a,e,!0)}dockReturnFocus=null;#o=A(N([]));get activities(){return e(this.#o)}set activities(e){H(this.#o,e,!0)}#s=A(N({}));get overlayMatches(){return e(this.#s)}set overlayMatches(e){H(this.#s,e,!0)}#c=A(N({}));get layoutPanels(){return e(this.#c)}set layoutPanels(e){H(this.#c,e,!0)}#l=A(N({}));get inlineEdges(){return e(this.#l)}set inlineEdges(e){H(this.#l,e,!0)}#u=A(!1);get hotkeysAvailable(){return e(this.#u)}set hotkeysAvailable(e){H(this.#u,e,!0)}#d=A(N({top:!0,left:!0,right:!0,bottom:!0}));get regionsRendered(){return e(this.#d)}set regionsRendered(e){H(this.#d,e,!0)}activityListeners=new Set;constructor(e={}){this.config=Zt(e.config),this.adapter=e.settingsAdapter??(e.storageKey?new cn(e.storageKey):null),this.viewport=e.viewport??Sn(),this.layoutPanels={...e.layoutPanels??{}},this.applySettings(e.settings??{},{persist:!1})}async hydrate(){if(!this.adapter)return;let e=await this.adapter.read();e&&this.applySettings(rn(e,this.config),{persist:!1})}setViewport(e){R(()=>{if(e===this.viewport)return;this.viewport=e;let t=!1,n={...this.settings.panels??{}};for(let r of Kt){let i=this.config.panels[r],a=i.viewportDefaults?.[e];a&&i.initial!==`hidden`&&this.layoutPanels[r]?.visible!==!1&&(delete n[r],t=!0,a===`expanded`&&this.closeExclusivePeers(r),this.panels[r]=a)}t&&(this.settings={...this.settings,panels:n}),e===`phone`&&this.inlineEdges.left&&this.panels.left===`expanded`&&(this.panels.left=`collapsed`),this.applyInline()})}phonePresentation(e){return this.config.panels[e].phone??`drawer`}presentationFor(e){let t=this.config.panels[e];return this.isInline(e)?t.presentation:(e===`left`||e===`right`)&&this.viewport!==`phone`&&t.overlayMedia&&this.overlayMatches[e]?`overlay`:t.presentation}closeOverlaidEdges(){R(()=>{for(let e of[`left`,`right`])this.panels[e]===`expanded`&&this.presentationFor(e)===`overlay`&&(this.panels[e]=`collapsed`)})}isInline(e){return e===`right`||!this.inlineEdges[e]?!1:e!==`left`||this.viewport!==`phone`}setInlineEdges(e){R(()=>{Kt.every(t=>!!this.inlineEdges[t]==!!e[t])||(this.inlineEdges={...e},this.applyInline())})}applyInline(){this.isInline(`left`)&&this.panels.left===`collapsed`&&(this.panels.left=`expanded`);for(let e of[`top`,`bottom`])this.isInline(e)&&this.panels[e]===`expanded`&&(this.panels[e]=`collapsed`)}setOverlayMatch(e,t){R(()=>{!!this.overlayMatches[e]!==t&&(this.overlayMatches={...this.overlayMatches,[e]:t})})}isEdgeShown(e){return this.panels[e]===`hidden`?!1:this.viewport!==`phone`||this.phonePresentation(e)!==`hidden`}isRegionVisible(e){switch(e){case`header`:return this.panels.top!==`hidden`;case`footer`:return this.panels.bottom!==`hidden`;case`leftSidebar`:return this.isEdgeShown(`left`)&&this.panels.left===`expanded`;case`rightSidebar`:return this.isEdgeShown(`right`)&&this.panels.right===`expanded`}}resizeLimits(e){return en(e,this.config.panels[e])}panelSize(e){if(!this.resizeLimits(e))return null;let t=this.settings.sizes?.[e];return typeof t==`number`&&Number.isFinite(t)?t:null}setPanelSize(e,t,n={}){R(()=>{let r=this.resizeLimits(e);if(!r)return;let i=t===null||!Number.isFinite(t)?null:tn(t,r);this.settings=on(this.settings,{sizes:{[e]:i}}),n.persist!==!1&&this.persistSettings()})}snapshot(){return{panels:{...this.panels},viewport:this.viewport,activeFocusToolId:this.activeFocusToolId,settings:{...this.settings,keymap:this.settings.keymap?{...this.settings.keymap}:void 0,panels:this.settings.panels?{...this.settings.panels}:void 0,sizes:this.settings.sizes?{...this.settings.sizes}:void 0}}}applySettings(e,t={}){let n=On(e),r=t.persist;R(()=>{this.settings=on(this.settings,n);for(let e of Kt)this.revealed.delete(e),this.panels[e]=Qt(e,this.config.panels[e],this.settings,this.viewport,this.layoutPanels[e]);this.applyInline(),this.activeFocusToolId=this.settings.activeFocusToolId??this.activeFocusToolId,r!==!1&&this.persistSettings()})}setLayoutPanels(e={}){R(()=>{let t=this.layoutPanels;this.layoutPanels={...e};for(let n of Kt){let r=t[n],i=e[n];if(r?.visible===i?.visible&&r?.initial===i?.initial)continue;let a=this.config.panels[n];a.initial!==`hidden`&&(this.revealed.delete(n),this.panels[n]=Qt(n,a,this.settings,this.viewport,i),this.panels[n]===`expanded`&&this.closeExclusivePeers(n))}this.applyInline()})}setPanelStart(e,t){R(()=>{let n=this.config.panels[e];if(!(n.initial===`hidden`||n.viewportDefaults||this.layoutPanels[e]?.visible===!1)){if(this.settings.panels&&e in this.settings.panels){let{[e]:t,...n}=this.settings.panels;this.settings={...this.settings,panels:n}}t===`expanded`&&this.closeExclusivePeers(e),this.revealed.delete(e),this.panels[e]=t,this.applyInline(),this.persistSettings()}})}setLayout(e){R(()=>{let{layout:t,...n}=this.settings;this.settings=e&&!ut(e)?{...n,layout:e}:n,this.persistSettings()})}setHotkeysEnabled(e){R(()=>this.applySettings({hotkeysEnabled:e}))}setHotkey(e,t){R(()=>{this.applySettings({keymap:{[e]:t?{code:t}:null}})})}setPanel(e,t){this.setPanelState(e,t)}setPanelState(e,t){Kt.includes(e)&&[`hidden`,`collapsed`,`expanded`].includes(t)&&R(()=>{if(this.config.panels[e].initial===`hidden`||this.layoutPanels[e]?.visible===!1)this.panels[e]=`hidden`;else{if(this.isInline(e)){let n=e===`left`;n&&t===`collapsed`&&(t=`expanded`),!n&&t===`expanded`&&(t=`collapsed`)}t===`expanded`&&this.closeExclusivePeers(e),this.revealed.delete(e),this.panels[e]=t,this.settings=on(this.settings,{panels:{[e]:t}}),this.persistSettings()}})}revealPanelTemporarily(e){return R(()=>!this.isEdgeShown(e)||this.panels[e]!==`collapsed`?!1:(this.panels[e]=`expanded`,this.revealed.add(e),!0))}endTemporaryReveal(e){R(()=>{this.revealed.delete(e)&&this.panels[e]===`expanded`&&(this.panels[e]=`collapsed`)})}togglePanel(e){R(()=>{this.panels[e]!==`hidden`&&this.setPanel(e,this.panels[e]===`expanded`?`collapsed`:`expanded`)})}expandPanel(e){R(()=>this.setPanel(e,`expanded`))}collapsePanel(e){R(()=>this.setPanel(e,`collapsed`))}closeTopmostExpanded(){return R(()=>{for(let e of[...Kt].reverse())if(!this.isInline(e)&&this.panels[e]===`expanded`&&this.isEdgeShown(e))return this.collapsePanel(e),!0;return!1})}registerFocusTool(e){let t=An(e);return R(()=>(this.focusTools=[...this.focusTools.filter(e=>e.id!==t.id),t].sort((e,t)=>(e.order??0)-(t.order??0)),this.activeFocusToolId||=t.id,()=>this.unregisterFocusTool(t.id)))}unregisterFocusTool(e){R(()=>{this.focusTools=this.focusTools.filter(t=>t.id!==e),this.activeFocusToolId===e&&(this.activeFocusToolId=this.focusTools[0]?.id??null)})}openFocusTool(e){R(()=>{this.focusTools.some(t=>t.id===e)&&(this.activeFocusToolId=e,this.settings=on(this.settings,{activeFocusToolId:e}),this.expandPanel(`right`),this.persistSettings())})}toggleFocusTool(e){R(()=>{this.focusTools.some(t=>t.id===e)&&(this.activeFocusToolId===e&&this.panels.right===`expanded`?this.collapsePanel(`right`):this.openFocusTool(e))})}get openFocusToolId(){return this.panels.right===`expanded`&&this.isEdgeShown(`right`)?this.activeFocusToolId:null}get dockAvailable(){return this.config.panels.right.initial!==`hidden`&&this.layoutPanels.right?.visible!==!1&&(this.viewport!==`phone`||this.phonePresentation(`right`)!==`hidden`)}closeFocusTool(){this.collapsePanel(`right`)}openDockTool(e,t={}){return R(()=>{if(!this.focusTools.some(t=>t.id===e)||!this.dockAvailable)return!1;if(this.openFocusTool(e),t.focus===!1)return!0;let n=typeof document>`u`?null:document.activeElement;return this.dockReturnFocus=t.returnFocus??(n instanceof HTMLElement&&n!==document.body?n:null),this.dockFocusRequest+=1,!0})}toggleDockTool(e,t={}){return R(()=>!this.focusTools.some(t=>t.id===e)||!this.dockAvailable?!1:this.openFocusToolId===e?(this.closeFocusTool(),!0):this.openDockTool(e,t))}upsertActivity(e){let t=jn(e);R(()=>{let e=new Date().toISOString(),n={...t,edge:t.edge??this.homeEdgeForScope(t.scope),createdAt:t.createdAt??e,updatedAt:t.updatedAt??e},r=this.activities.find(e=>e.id===t.id);this.activities=[...this.activities.filter(e=>e.id!==t.id),n],this.emitActivity({type:r&&r.status!==n.status?`transition`:`upsert`,activity:n,previous:r})})}updateActivity(e,t){let n=Mn(t);R(()=>{let t=this.activities.find(t=>t.id===e);t&&this.upsertActivity({...t,...n,id:e,updatedAt:new Date().toISOString()})})}removeActivity(e){R(()=>{let t=this.activities.find(t=>t.id===e);t&&(this.activities=this.activities.filter(t=>t.id!==e),this.emitActivity({type:`remove`,activity:t}))})}watchActivities(e){return this.activityListeners.add(e),()=>this.activityListeners.delete(e)}listActivities(e={}){return this.activities.map(e=>({...e,edge:e.edge??this.homeEdgeForScope(e.scope)})).filter(t=>Tn(t,e))}activityBadge(e){let t=this.listActivities({edge:e}).filter(e=>Dn(e.status)),n=t.map(e=>e.progress).filter(e=>typeof e==`number`);return{count:t.length,running:t.filter(e=>e.status===`running`).length,hasFailed:this.listActivities({edge:e}).some(e=>e.status===`failed`),progress:n.length===0?null:n.reduce((e,t)=>e+t,0)/n.length}}homeEdgeForScope(e){let t=Jt[e];return this.panels[t]===`hidden`?this.panels.bottom===`hidden`?Kt.find(e=>this.panels[e]!==`hidden`)??t:`bottom`:t}closeExclusivePeers(e){if(this.viewport===`phone`&&(e===`left`||e===`right`)){let t=e===`left`?`right`:`left`;this.panels[t]===`expanded`&&this.isEdgeShown(t)&&(this.panels[t]=`collapsed`)}let t=this.config.panels[e].exclusiveGroup;if(t)for(let n of Kt)n!==e&&this.config.panels[n].exclusiveGroup===t&&this.panels[n]===`expanded`&&(this.panels[n]=`collapsed`,this.settings=on(this.settings,{panels:{[n]:`collapsed`}}))}async persistSettings(){this.adapter&&await this.adapter.write(rn(this.settings,this.config))}emitActivity(e){for(let t of this.activityListeners)t(e)}};function wn(e={}){return new Cn(e)}function Tn(e,t){return t.edge&&e.edge!==t.edge||t.scope&&e.scope!==t.scope||t.kind&&!En(e.kind,t.kind)||t.status&&!En(e.status,t.status)?!1:!t.subject||e.subject?.type===t.subject.type&&e.subject.id===t.subject.id}function En(e,t){return Array.isArray(t)?t.includes(e):e===t}function Dn(e){return e===`queued`||e===`running`}function On(e){let t={...e};return`keymap`in e&&(t.keymap=kn(e.keymap)),`panels`in e&&(t.panels=e.panels?{...e.panels}:e.panels),`sizes`in e&&(t.sizes=e.sizes?{...e.sizes}:e.sizes),t}function kn(e){if(!e)return e;let t={};for(let n of Kt)if(n in e){let r=e[n];t[n]=r&&{...r}}return t}function An(e){let t={...e};return`subject`in e&&(t.subject=e.subject?{...e.subject}:e.subject),`activityKinds`in e&&(t.activityKinds=e.activityKinds?[...e.activityKinds]:e.activityKinds),t}function jn(e){let t={...e};return`subject`in e&&(t.subject=e.subject?{...e.subject}:e.subject),t}function Mn(e){let t={...e};return`subject`in e&&(t.subject=e.subject?{...e.subject}:e.subject),t}function Nn(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(bn),n=window.matchMedia(xn),r=()=>e.setViewport(hn({phone:t.matches,desktop:n.matches}));return r(),t.addEventListener(`change`,r),n.addEventListener(`change`,r),()=>{t.removeEventListener(`change`,r),n.removeEventListener(`change`,r)}}function Pn(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=[];for(let n of[`left`,`right`]){let r=e.config.panels[n].overlayMedia;if(!r)continue;let i=window.matchMedia(r),a=()=>e.setOverlayMatch(n,i.matches);a(),i.addEventListener(`change`,a),t.push(()=>i.removeEventListener(`change`,a))}return()=>{for(let e of t)e()}}function Fn(e,t){let n=new gn(t.tuning),r=0,i=!1;function a(){r=0;let a=n.update({y:e.scrollTop,maxY:e.scrollHeight-e.clientHeight,pinned:t.isPinned()});a!==i&&(i=a,t.onChange(a))}function o(){r||=requestAnimationFrame(a)}return e.addEventListener(`scroll`,o,{passive:!0}),{recheck:a,reset(){n.reset(),i&&(i=!1,t.onChange(!1))},destroy(){r&&cancelAnimationFrame(r),e.removeEventListener(`scroll`,o)}}}function In(e){if(typeof window>`u`||!window.visualViewport)return()=>{};let t=window.visualViewport,n=!1;function r(){let r=_n({layoutHeight:window.innerHeight,visualHeight:t.height,scale:t.scale});if(r===n)return;n=r,n?document.documentElement.dataset.keyboardOpen=``:delete document.documentElement.dataset.keyboardOpen,e(n);let i=document.activeElement;n&&i instanceof HTMLElement&&pn(i)&&i.scrollIntoView({block:`center`})}return t.addEventListener(`resize`,r),()=>{t.removeEventListener(`resize`,r),delete document.documentElement.dataset.keyboardOpen}}function Ln(e,t){let n=!!e.querySelector(yn);if(t(n),typeof MutationObserver>`u`)return()=>{};let r=new MutationObserver(()=>{let r=!!e.querySelector(yn);r!==n&&(n=r,t(n))});return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function Rn(e,t){let n=e.panelSize(t);return n===null?e.config.panels[t].expandedSize:`${n}px`}function zn(e,t){let n=e.panels[t];return n===`hidden`?`0rem`:n===`collapsed`||e.presentationFor(t)===`overlay`?Bn(e,t):Rn(e,t)}function Bn(e,t){if(e.panels[t]===`hidden`)return`0rem`;let n=e.config.panels[t];return n.rail===!1?`0rem`:n.collapsedSize}function Vn(e){return[`--smrt-admin-shell-left-track: ${zn(e,`left`)}`,`--smrt-admin-shell-right-track: ${zn(e,`right`)}`,`--smrt-admin-shell-top-track: ${zn(e,`top`)}`,`--smrt-admin-shell-bottom-track: ${zn(e,`bottom`)}`,`--smrt-admin-shell-left-collapsed: ${Bn(e,`left`)}`,`--smrt-admin-shell-right-collapsed: ${Bn(e,`right`)}`,`--smrt-admin-shell-left-expanded: ${Rn(e,`left`)}`,`--smrt-admin-shell-right-expanded: ${Rn(e,`right`)}`,`--smrt-admin-shell-top-expanded: ${Rn(e,`top`)}`,`--smrt-admin-shell-bottom-expanded: ${Rn(e,`bottom`)}`].join(`; `)}var Hn=f(`<svg class="smrt-admin-shell__edge-toggle-chevron" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg><!>`,1),Un=c(`<kbd class="smrt-admin-shell__edge-toggle-kbd svelte-1ifuk0b"> </kbd>`),Wn=c(`<span class="svelte-1ifuk0b"> </span> <!> <!>`,1),Gn=c(`<div class="smrt-admin-shell__tenant-utilities svelte-1ifuk0b" data-smrt-part="utilities"><!> <!></div>`),Kn=c(`<button type="button" class="smrt-admin-shell__chrome-button svelte-1ifuk0b" data-smrt-part="trigger" aria-controls="smrt-admin-shell-left-panel"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button>`),qn=c(`<button type="button" class="smrt-admin-shell__chrome-button smrt-admin-shell__tools-opener svelte-1ifuk0b" data-smrt-part="trigger" aria-controls="smrt-admin-shell-right-panel"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button>`),Jn=c(`<div role="separator" aria-orientation="vertical" tabindex="0"></div>`),Yn=c(`<p class="smrt-admin-shell__empty svelte-1ifuk0b"> </p>`),Xn=c(`<div><!></div>`),Zn=c(`<div></div>`),Qn=c(`<div class="smrt-admin-shell__region-edit svelte-1ifuk0b"><!></div>`),$n=c(`<div id="smrt-admin-shell-header" class="smrt-admin-shell__header svelte-1ifuk0b" data-testid="admin-shell-header"><!></div>`),er=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--top-left svelte-1ifuk0b"><!></div>`),tr=c(`<!> <!>`,1),nr=c(`<div class="smrt-admin-shell__account svelte-1ifuk0b"><!></div>`),rr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--top-right svelte-1ifuk0b"><!></div>`),ir=c(`<section class="smrt-admin-shell__drawer smrt-admin-shell__drawer--top svelte-1ifuk0b"><!></section>`),ar=c(`<header id="smrt-admin-shell-top-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--top svelte-1ifuk0b"><!> <div class="smrt-admin-shell__band smrt-admin-shell__band--top svelte-1ifuk0b"><!> <!> <!> <!> <!> <!> <!> <!></div> <!> <!></header>`),or=c(`<div class="smrt-admin-shell__drawer-head svelte-1ifuk0b" data-smrt-part="header"><div class="smrt-admin-shell__drawer-title svelte-1ifuk0b"><!></div> <button type="button" class="smrt-admin-shell__chrome-button svelte-1ifuk0b" data-smrt-part="close"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button></div>`),sr=c(`<div class="smrt-admin-shell__tenant-footer svelte-1ifuk0b"><!></div>`),cr=c(`<div class="smrt-admin-shell__tenant-stack svelte-1ifuk0b"><!> <div class="smrt-admin-shell__tenant-content svelte-1ifuk0b"><!></div> <!> <!> <!></div>`),lr=c(`<div class="smrt-admin-shell__tenant-rail-footer svelte-1ifuk0b"><!></div>`),ur=c(`<div class="smrt-admin-shell__tenant-rail-stack svelte-1ifuk0b"><div class="smrt-admin-shell__tenant-rail-content svelte-1ifuk0b"><!></div> <!> <!></div>`),dr=c(`<aside id="smrt-admin-shell-left-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--left svelte-1ifuk0b"><!> <div class="smrt-admin-shell__rail svelte-1ifuk0b"><!> <!> <!> <!> <!></div></aside>`),fr=c(`<span class="smrt-admin-shell__phone-default-end svelte-1ifuk0b"><!></span>`),pr=c(`<div class="smrt-admin-shell__phone-default-top svelte-1ifuk0b"><!> <!></div>`),mr=c(`<div class="smrt-admin-shell__phone-top svelte-1ifuk0b" data-testid="admin-shell-phone-top"><!></div>`),hr=c(`<button type="button" class="smrt-admin-shell__scrim svelte-1ifuk0b" tabindex="-1" data-testid="admin-shell-scrim"></button>`),gr=c(`<button type="button" class="smrt-admin-shell__overlay-scrim svelte-1ifuk0b" tabindex="-1" data-testid="admin-shell-overlay-scrim"></button>`),_r=c(`<div class="smrt-admin-shell__sheet-grabber svelte-1ifuk0b" aria-hidden="true"><span class="svelte-1ifuk0b"></span></div>`),vr=c(`<button type="button" class="smrt-admin-shell__chrome-button smrt-admin-shell__rail-close svelte-1ifuk0b" data-smrt-part="close"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button>`),yr=f(`<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg>`),br=c(`<span class="smrt-admin-shell__focus-tool-badge svelte-1ifuk0b"> </span>`),xr=c(`<button type="button"><!> <!></button>`),Sr=c(`<nav class="smrt-admin-shell__focus-rail svelte-1ifuk0b"></nav>`),Cr=c(`<div class="smrt-admin-shell__panel smrt-admin-shell__panel--right svelte-1ifuk0b" tabindex="-1"><!> <!> <!></div>`),wr=c(`<aside id="smrt-admin-shell-right-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--right svelte-1ifuk0b"><!> <!> <div class="smrt-admin-shell__rail svelte-1ifuk0b"><!> <!> <!></div> <!></aside>`),Tr=c(`<button type="button" class="smrt-admin-shell__edit-indicator svelte-1ifuk0b" data-edit-indicator="right" aria-expanded="false" aria-controls="smrt-admin-shell-right-panel"><!> <span class="smrt-admin-shell__edit-indicator-label"> </span></button>`),Er=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--bottom-left svelte-1ifuk0b"><!></div>`),Dr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--bottom-right svelte-1ifuk0b"><!></div>`),Or=c(`<section class="smrt-admin-shell__drawer smrt-admin-shell__drawer--bottom svelte-1ifuk0b"><!></section>`),kr=c(`<footer id="smrt-admin-shell-bottom-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--bottom svelte-1ifuk0b"><!> <div class="smrt-admin-shell__band smrt-admin-shell__band--bottom svelte-1ifuk0b"><!> <!> <!> <!> <!> <!></div> <!> <!></footer>`),Ar=c(`<div class="smrt-admin-shell__overlays svelte-1ifuk0b"><!></div>`),jr=c(`<div class="smrt-admin-shell__phone-bar svelte-1ifuk0b" data-testid="admin-shell-phone-bar"><!></div>`),Mr=c(`<div class="svelte-1ifuk0b"><dt> </dt> <dd class="svelte-1ifuk0b"> </dd></div>`),Nr=c(`<header class="svelte-1ifuk0b"><h2 class="svelte-1ifuk0b"> </h2> <!></header> <dl class="svelte-1ifuk0b"><!> <div class="svelte-1ifuk0b"><dt> </dt> <dd class="svelte-1ifuk0b">?</dd></div></dl>`,1),Pr=c(`<div class="smrt-admin-shell__shortcuts svelte-1ifuk0b" role="dialog" aria-modal="true" tabindex="-1"><div class="smrt-admin-shell__shortcuts-panel svelte-1ifuk0b"><!></div></div>`),Fr=c(`<div class="smrt-admin-shell svelte-1ifuk0b" data-smrt-component="AdminShell"><!> <!> <!> <!> <!> <main id="smrt-admin-shell-main" class="smrt-admin-shell__main svelte-1ifuk0b"><!></main> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div>`);function Ir(a,c){_(c,!0);let f=(r,i=m)=>{var a=T(),o=z(a),s=t=>{let r=n(Rt);{let i=n(()=>Kt(`left`)?`${e(r)} (${Vt(`left`)})`:e(r)),a=n(()=>$(`left`));G(t,{variant:`ghost`,size:`sm`,class:`smrt-admin-shell__edge-toggle smrt-admin-shell__edge-toggle--left`,get"aria-label"(){return e(r)},get title(){return e(i)},get"aria-expanded"(){return e(a)},"aria-controls":`smrt-admin-shell-left-panel`,onclick:()=>q.togglePanel(`left`),children:(e,t)=>{var n=Hn(),r=z(n),i=I(r);He(P(r),{edge:`left`}),B(()=>V(i,`d`,ve.chevronRight)),C(e,n)},$$slots:{default:!0}})}},c=r=>{{let a=n(()=>$(i())),o=n(()=>`smrt-admin-shell-${i()}-panel`);G(r,{variant:`ghost`,size:`sm`,class:`smrt-admin-shell__edge-toggle`,get"aria-expanded"(){return e(a)},get"aria-controls"(){return e(o)},onclick:()=>q.togglePanel(i()),children:(r,a)=>{var o=Wn(),s=z(o),c=I(s,!0),u=P(s,2),d=e=>{var t=Un(),n=I(t,!0);B(e=>l(n,e),[()=>Vt(i())]),C(e,t)},f=n(()=>Kt(i()));t(u,t=>{e(f)&&t(d)}),He(P(u,2),{get edge(){return i()}}),B(e=>l(c,e),[()=>Lt(i())]),C(r,o)},$$slots:{default:!0}})}};t(o,e=>{i()===`left`?e(s):e(c,-1)}),C(r,a)},h=r=>{var i=Gn(),a=M(i),l=e=>{var t=T(),n=z(t);o(n,()=>c.tenantUtilities),C(e,t)};t(a,e=>{c.tenantUtilities&&e(l)});var u=P(a,2),d=e=>{f(e,()=>`left`)},p=n(()=>Ut(`left`));t(u,t=>{e(p)&&t(d)}),s(i),C(r,i)},g=e=>{var t=Kn(),n=M(t),r=I(n);s(t),B((e,n,i)=>{V(t,`aria-label`,e),V(t,`title`,n),V(t,`aria-expanded`,i),V(r,`d`,ve.menu)},[()=>K(Z[`ui.admin_shell.menu`]),()=>K(Z[`ui.admin_shell.menu`]),()=>$(`left`)]),E(`click`,t,zt),C(e,t)},w=e=>{var t=qn(),n=M(t),r=I(n);s(t),B((e,n,i)=>{V(t,`aria-label`,e),V(t,`title`,n),V(t,`aria-expanded`,i),V(r,`d`,ve[ye])},[()=>K(Z[`ui.admin_shell.tools`]),()=>K(Z[`ui.admin_shell.tools`]),()=>$(`right`)]),E(`click`,t,Bt),C(e,t)},D=(r,a=m)=>{var o=T(),s=z(o),c=t=>{let r=n(()=>q.resizeLimits(a()));var o=Jn();B((t,n)=>{i(o,1,`smrt-admin-shell__resizer smrt-admin-shell__resizer--${a()??``}`,`svelte-1ifuk0b`),V(o,`aria-controls`,`smrt-admin-shell-${a()}-panel`),V(o,`aria-label`,t),V(o,`aria-valuemin`,e(r)?.min),V(o,`aria-valuemax`,e(r)?.max),V(o,`aria-valuenow`,n),V(o,`data-testid`,`admin-shell-resizer-${a()}`)},[()=>K(Z[`ui.admin_shell.resize_panel`],{label:Lt(a())}),()=>lt(a())]),E(`pointerdown`,o,e=>ft(e,a())),E(`keydown`,o,e=>Q(e,a())),E(`dblclick`,o,()=>q.setPanelSize(a(),null)),C(t,o)},l=n(()=>ut(a()));t(s,t=>{e(l)&&t(c)}),C(r,o)},te=(r,i=m)=>{var a=T(),s=z(a),u=e=>{var t=T(),n=z(t);o(n,()=>c.focusPanel,()=>({tool:i()})),C(e,t)},d=e=>{var t=T(),n=z(t);o(n,()=>i().render,()=>({tool:i()})),C(e,t)},f=t=>{let r=n(()=>i().component);var a=T(),o=z(a);v(o,()=>e(r),(e,t)=>{t(e,{get tool(){return i()},get shell(){return q}})}),C(t,a)},p=e=>{var t=Yn(),n=I(t,!0);B(e=>l(n,e),[()=>K(Z[`ui.admin_shell.no_focus_tools`])]),C(e,t)};t(s,e=>{c.focusPanel?e(u):i()?.render?e(d,1):i()?.component?e(f,2):e(p,-1)}),C(r,a)},ne=(t,n)=>{let r=x(()=>u(n?.(),!1));Xe(t,{get title(){return se()},get subtitle(){return fe()},get homeHref(){return c.homeHref},get logoSrc(){return c.logoSrc},get logoAlt(){return ue()},get brand(){return c.brand},get compact(){return e(r)}})},L=(r,a=m)=>{var l=T(),u=z(l),d=r=>{var l=T(),u=z(l),d=e=>{var t=Xn(),n=M(t);o(n,()=>c.layoutEdit.zone,a),s(t),B(e=>{i(t,1,`smrt-admin-shell__slot smrt-admin-shell__slot--${e??``} smrt-admin-shell__slot--editing`,`svelte-1ifuk0b`),V(t,`data-slot`,a()),V(t,`data-smrt-edit-zone`,a()),V(t,`data-drop-target`,c.layoutEdit.highlight===a()?``:void 0)},[()=>a().replace(`.`,`-`)]),C(e,t)},f=n(()=>mt(Qe(a())));t(u,t=>{e(f)&&t(d)}),C(r,l)},f=t=>{var n=Zn();p(n,21,()=>e(gt)[a()]??[],b,(t,n)=>{var r=T(),i=z(r);o(i,()=>e(n)),C(t,r)}),s(n),B(e=>{i(n,1,`smrt-admin-shell__slot smrt-admin-shell__slot--${e??``}`,`svelte-1ifuk0b`),V(n,`data-slot`,a())},[()=>a().replace(`.`,`-`)]),C(t,n)};t(u,t=>{c.layoutEdit?.active?t(d):e(gt)[a()]?.length&&t(f,1)}),C(r,l)},re=(r,i=m)=>{var a=T(),l=z(a),u=e=>{var t=Qn(),n=M(t);o(n,()=>c.layoutEdit.regionControl,i),s(t),B(()=>V(t,`data-region-edit`,i())),C(e,t)},d=n(()=>c.layoutEdit?.active&&c.layoutEdit.regionControl&&ht(i()));t(l,t=>{e(d)&&t(u)}),C(r,a)},U=(r,a=m)=>{var l=T(),u=z(l),d=e=>{var t=Xn(),n=M(t);o(n,()=>c.layoutEdit?.strip??m,a),s(t),B(()=>{i(t,1,`smrt-admin-shell__strip smrt-admin-shell__strip--${a()??``}`,`svelte-1ifuk0b`),V(t,`data-region-strip`,a())}),C(e,t)},f=n(()=>e(vt).includes(a()));t(u,t=>{e(f)&&t(d)}),C(r,l)},se=k(c,`title`,3,`SMRT`),ce=k(c,`edgeToggles`,3,!1),le=k(c,`brandInSlot`,3,!1),ue=k(c,`logoAlt`,3,``),fe=k(c,`subtitle`,3,``),pe=k(c,`storageKey`,3,`smrt-admin-shell`),me=k(c,`rootElement`,15),he=k(c,`phoneDockOpener`,3,!0),ge=k(c,`pinChrome`,3,!1),{t:K}=de(),q=R(()=>c.state??wn({config:c.config,settings:c.settings,settingsAdapter:c.settingsAdapter,storageKey:pe()}));ze(q);let be=A(!1);function xe(){return q.focusTools.find(e=>e.id===q.activeFocusToolId)??q.focusTools[0]??null}let Se=[`top`,`left`,`bottom`,`right`],Ce=[`left`,`right`],we=A(void 0),Te=A(!1),Ee=A(!1),De=A(!1),Oe=A(null),ke=A(!1),Ae=N({}),je=null,J=n(()=>q.viewport),Y=n(()=>e(J)===`phone`),Me=n(()=>q.viewport===`phone`);j(()=>{let t=Ae.left;if(!e(Me)||!$(`left`)||!t)return;let n=document.activeElement instanceof HTMLElement?document.activeElement:null,r=!1;return ae().then(async()=>{let n=t.getAnimations?.({subtree:!0})??[];await Promise.all(n.filter(e=>e.playState!==`paused`&&Number.isFinite(e.effect?.getComputedTiming().endTime??0)).map(e=>e.finished.catch(()=>{}))),!r&&e(Me)&&$(`left`)&&t.isConnected&&t.querySelector(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)?.focus()}),()=>{r=!0,queueMicrotask(()=>{n?.isConnected&&n.focus()})}});let X=n(()=>c.phone?.scrim!==!1),Ne=n(()=>c.phone?.swipeToClose!==!1),Pe=n(()=>e(Y)&&he()&&q.isEdgeShown(`right`)&&(q.focusTools.length>0||!!c.focusRail)),Fe=n(()=>e(Y)&&q.isEdgeShown(`left`)&&q.phonePresentation(`left`)!==`hidden`),Ie=n(()=>!!c.header&&!(e(Y)&&c.phoneTopBar)),Le=n(()=>e(Y)&&c.phoneBottomBar?vn({formActions:e(Ee),keyboardOpen:e(Te)}):`none`),Re=n(()=>e(Y)&&Ce.some(e=>jt(e)===`expanded`&&q.isEdgeShown(e))),Be=!1;j(()=>{let e=!!c.layoutEdit?.active;R(()=>{e&&!Be&&q.viewport===`phone`&&at(),Be=e})});let Ve=n(()=>[`--smrt-shell-floating-reserve-inline: ${c.floatingReserve?.inline??`0px`}`,`--smrt-shell-floating-reserve-block: ${c.floatingReserve?.block??`0px`}`,`--smrt-shell-floating-reserve-main: ${c.floatingReserve?.main??`0px`}`].join(`; `)),Ue=n(()=>[`--smrt-admin-shell-header-track: ${e(Ie)?`var(--smrt-admin-shell-header-size)`:`0rem`}`,`--smrt-admin-shell-phone-bar-track: ${e(Le)===`nav`?`var(--smrt-admin-shell-phone-bar-size)`:`0rem`}`].join(`; `)),We=n(()=>e(Y)?null:Ce.find(e=>jt(e)===`expanded`&&q.isEdgeShown(e)&&q.presentationFor(e)===`overlay`)??null),Ge=null,Ke=null,qe=A(null),Je=null;function Ye(){Je&&clearTimeout(Je),Je=null,H(qe,null)}function Ze(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function $e(t){return $(t)||e(qe)===t}j(()=>{let t=e(We);R(()=>{if(t===Ke)return;let n=Ke;if(Ke=t,typeof document>`u`)return;if(t){Ye();let e=document.activeElement;Ge=e instanceof HTMLElement&&e!==document.body?e:null;let n=Ae[t];n&&!n.contains(document.activeElement)&&n.focus({preventScroll:!0});return}let r=n?Ae[n]:void 0,i=document.activeElement;(!i||i===document.body||r?.contains(i))&&Ge?.isConnected&&Ge.focus({preventScroll:!0}),Ge=null,n&&jt(n)!==`expanded`&&q.presentationFor(n)===`overlay`&&!e(Y)&&!Ze()&&(Ye(),H(qe,n,!0),Je=setTimeout(Ye,600))})});let tt=0;j(()=>{let e=q.dockFocusRequest;R(()=>{e!==tt&&(tt=e,ae().then(nt))})});function nt(){let e=Ae.right?.querySelector(`.smrt-admin-shell__panel--right`);e&&!e.hidden&&$(`right`)&&(e.contains(document.activeElement)||(e.querySelector(`a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])`)??e).focus({preventScroll:!0}))}let rt=!1;j(()=>{let e=$(`right`);R(()=>{let t=rt;if(rt=e,!t||e)return;let n=q.dockReturnFocus;if(q.dockReturnFocus=null,!n?.isConnected||typeof document>`u`)return;let r=document.activeElement;(!r||r===document.body||Ae.right?.contains(r))&&n.focus({preventScroll:!0})})});function it(t,n){e(qe)===n&&t.target===t.currentTarget&&Ye()}function at(){for(let e of Ce)jt(e)===`expanded`&&q.isEdgeShown(e)&&q.collapsePanel(e)}ie(()=>{let t=Nn(q),n=Pn(q),r=q.hydrate().then(()=>q.closeOverlaidEdges()),i=!1,a=0,o=null,s=null;function l(){let e=me();if(!e||typeof MutationObserver>`u`)return;let t=e.closest(`[data-color-scheme]`)??document.documentElement;o=new MutationObserver(()=>{Ze()||(e.setAttribute(`data-smrt-theme-changing`,``),s&&clearTimeout(s),s=setTimeout(()=>e.removeAttribute(`data-smrt-theme-changing`),_e(`--smrt-duration-medium1`,e)+100))}),o.observe(t,{attributes:!0,attributeFilter:[`data-color-scheme`,`class`]})}r.then(()=>{a=requestAnimationFrame(()=>{a=requestAnimationFrame(()=>{i||(H(ke,!0),l())})})});let u=c.phoneBottomBar?In(e=>H(Te,e,!0)):()=>{},d=c.phoneBottomBar&&e(we)?Ln(e(we),e=>H(Ee,e,!0)):()=>{};je=c.phoneTopBar&&c.phone?.hideOnScroll!==!1&&e(we)?Fn(e(we),{onChange:e=>H(De,e,!0),isPinned:()=>ge()||e(Re)||q.viewport!==`phone`}):null;function f(t){if(t.key===`Escape`){if(e(be)){H(be,!1),t.preventDefault();return}if(c.layoutEdit?.active)return;q.closeTopmostExpanded()&&t.preventDefault();return}let n=ln(t,q.config.panels,q.settings);if(n){if(n.type===`show-shortcuts`){if(!Se.some(Gt))return;t.preventDefault(),H(be,!0)}else{if(!Gt(n.edge))return;t.preventDefault(),q.togglePanel(n.edge)}}}return window.addEventListener(`keydown`,f),()=>{window.removeEventListener(`keydown`,f),i=!0,cancelAnimationFrame(a),o?.disconnect(),s&&clearTimeout(s),t(),n(),Je&&clearTimeout(Je),u(),d(),je?.destroy(),je=null}}),j(()=>{(ge()||e(Re)||!e(Y))&&H(De,!1)});let ot;j(()=>{let e=c.path;R(()=>{ot!==void 0&&e!==ot&&(q.viewport===`phone`&&at(),je?.reset(),H(De,!1)),ot=e})});function st(){if(typeof window>`u`)return 16;let e=Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize);return Number.isFinite(e)&&e>0?e:16}function ct(e){let t=/^\s*(-?\d*\.?\d+)(px|rem|em)?\s*$/.exec(e);if(!t)return null;let n=Number.parseFloat(t[1]);return t[2]===`rem`||t[2]===`em`?n*st():n}function lt(e){let t=q.resizeLimits(e),n=q.panelSize(e);if(n!==null)return n;let r=ct(q.config.panels[e].expandedSize)??Ae[e]?.getBoundingClientRect().width??0;return t?tn(r,t):Math.round(r)}function ut(t){return!e(Y)&&$(t)&&q.presentationFor(t)===`push`&&q.resizeLimits(t)!==null}function Q(e,t){let n=q.resizeLimits(t);if(!n)return;let r=n.step*(e.shiftKey?4:1),i=t===`left`?`ArrowRight`:`ArrowLeft`,a=t===`left`?`ArrowLeft`:`ArrowRight`,o;if(e.key===i)o=lt(t)+r;else if(e.key===a)o=lt(t)-r;else if(e.key===`Home`)o=n.min;else if(e.key===`End`)o=n.max;else if(e.key===`Enter`)o=null;else return;e.preventDefault(),q.setPanelSize(t,o)}let dt=null;j(()=>()=>dt?.(!1));function ft(e,t){if(e.button!==0||!q.resizeLimits(t))return;e.preventDefault(),dt?.(!0);let n=e.currentTarget,r=e.pointerId;r!==void 0&&n.setPointerCapture?.(r);let i=e.clientX,a=lt(t),o=a;H(Oe,t,!0);function s(e){let n=e.clientX-i;o=a+(t===`left`?n:-n),q.setPanelSize(t,o,{persist:!1})}function c(e){dt===c&&(dt=null,n.removeEventListener(`pointermove`,s),n.removeEventListener(`pointerup`,l),n.removeEventListener(`pointercancel`,l),n.removeEventListener(`lostpointercapture`,l),r!==void 0&&n.hasPointerCapture?.(r)&&n.releasePointerCapture(r),H(Oe,null),e&&o!==a&&q.setPanelSize(t,o))}function l(){c(!0)}dt=c,n.addEventListener(`pointermove`,s),n.addEventListener(`pointerup`,l),n.addEventListener(`pointercancel`,l),n.addEventListener(`lostpointercapture`,l)}let pt=n(()=>!c.account&&!!c.tenantFooter&&(!q.isEdgeShown(`left`)||!$(`left`)&&!c.tenantRailFooter));function mt(e){return q.isRegionVisible(e)}function ht(e){return e===`leftSidebar`?q.isEdgeShown(`left`):e===`rightSidebar`?q.isEdgeShown(`right`):mt(e)}let gt=n(()=>{let e={};for(let[t,n]of Object.entries(c.slots??{})){if(!n)continue;let r=et(t,mt);r&&(e[r]??=[]).push(n)}return e}),_t={header:`top`,footer:`bottom`,leftSidebar:`left`,rightSidebar:`right`},vt=n(()=>c.layoutEdit?.active&&c.layoutEdit.strip?c.layoutEdit.hiddenRegions??[]:[]);function yt(...t){return t.some(t=>(e(gt)[t]?.length??0)>0)}let bt=n(()=>!!c.layoutEdit?.active),xt=n(()=>!(e(bt)&&!e(Y))&&q.config.panels.left.initial!==`hidden`&&q.layoutPanels.left?.visible!==!1&&(!e(Y)||q.phonePresentation(`left`)!==`hidden`)&&(e(Y)||jt(`left`)===`hidden`)),St=n(()=>jt(`top`)!==`hidden`&&(e(bt)||!!c.appBar||!le()||Ut(`top`)||e(xt)||e(Pe)||!!c.account||e(pt)||!!c.topLeftCorner||!!c.topRightCorner||yt(`header.start`,`header.center`,`header.end`)||It(`top`))),Ct=n(()=>jt(`bottom`)!==`hidden`&&(e(bt)||!!c.systemBar||!!c.bottomLeftCorner||!!c.bottomRightCorner||Ut(`bottom`)&&!(!c.systemPanel&&c.systemBar)||yt(`footer.start`,`footer.center`,`footer.end`)||It(`bottom`))),wt=n(()=>q.isEdgeShown(`right`)&&(e(bt)||q.focusTools.length>0||!!c.focusRail||!!c.focusPanel||Ut(`right`)||yt(`rightSidebar.header`,`rightSidebar.footer`)||It(`right`))),Tt=n(()=>e(Y)&&!c.phoneTopBar&&!e(St)&&(e(Fe)||e(Pe))),Et=n(()=>e(Y)&&(!!c.phoneTopBar||e(Tt))),Dt=n(()=>[Vn(q),...e(St)?[]:[`--smrt-admin-shell-top-track: 0rem`],...e(Ct)?[]:[`--smrt-admin-shell-bottom-track: 0rem`],...e(wt)?[]:[`--smrt-admin-shell-right-track: 0rem`],...e(vt).map(e=>`--smrt-admin-shell-${_t[e]}-track: 1.75rem`)].join(`; `));function Ot(e,t){return`${e?`var(--smrt-admin-shell-left-collapsed)`:`0px`} minmax(0, 1fr) ${t?`var(--smrt-admin-shell-right-collapsed)`:`0px`}`}let kt=n(()=>Ot(c.topLeftCorner,c.topRightCorner)),At=n(()=>Ot(c.bottomLeftCorner,c.bottomRightCorner));function jt(e){return q.panels[e]}function $(e){return jt(e)===`expanded`}function Mt(e){return jt(e)===`collapsed`&&q.config.panels[e].keepMounted===!0&&(e!==`top`&&e!==`bottom`||!q.isInline(e))}let Nt=n(()=>c.layoutEdit?.active&&!e(Y)&&q.config.panels.right.rail===!1&&q.isEdgeShown(`right`)&&jt(`right`)===`collapsed`&&q.focusTools.length>0?q.focusTools:null),Pt=!1;function Ft(){let e=q.focusTools;if(e.length===0)return;let t=e.find(e=>e.id===q.activeFocusToolId)??e[0];q.openFocusTool(t.id),Pt=!0}j(()=>{c.layoutEdit?.active||R(()=>{Pt&&q.panels.right===`expanded`&&q.collapsePanel(`right`),Pt=!1})});function It(e){return $e(e)||Mt(e)}function Lt(e){return q.config.panels[e].label}function Rt(){let e=Lt(`left`),t=$(`left`);return e&&e!==Xt.left.label?K(Z[t?`ui.admin_shell.collapse_panel`:`ui.admin_shell.expand_panel`],{panel:e}):K(Z[t?`ui.admin_shell.collapse_sidebar`:`ui.admin_shell.expand_sidebar`])}function zt(){q.setPanelState(`left`,$(`left`)?`collapsed`:`expanded`)}function Bt(){if($(`right`)){q.collapsePanel(`right`);return}let e=xe();e?q.openFocusTool(e.id):q.expandPanel(`right`)}function Vt(e){return mn(an(e,q.config.panels[e],q.settings))}function Ht(e){return typeof ce()==`boolean`?ce():ce()[e]===!0}function Ut(e){let t=Ht(e);return e===`left`&&(c.showTenantToggle===!1?t=!1:c.showTenantToggle===!0&&(t=!0)),t}let Wt=n(()=>({top:Ut(`top`)||Ht(`top`)||c.hotkeys===!0,left:Ut(`left`)||Ht(`left`)||c.hotkeys===!0,right:Ut(`right`)||Ht(`right`)||c.hotkeys===!0,bottom:Ut(`bottom`)||Ht(`bottom`)||c.hotkeys===!0}));q.setInlineEdges(R(()=>({top:!e(Wt).top,left:!e(Wt).left,right:!e(Wt).right,bottom:!e(Wt).bottom}))),j(()=>{let t=e(Wt);q.setInlineEdges({top:!t.top,left:!t.left,right:!t.right,bottom:!t.bottom})});function Gt(e){return c.hotkeys===void 0?Ht(e)||Ut(e):c.hotkeys}j(()=>{let t={top:e(St),left:q.isEdgeShown(`left`),right:e(wt),bottom:e(Ct)},n=R(()=>q.regionsRendered);Object.keys(t).some(e=>t[e]!==n[e])&&(q.regionsRendered=t)}),j(()=>{q.hotkeysAvailable=[`top`,`left`,`right`,`bottom`].some(Gt)});function Kt(e){return Gt(e)&&q.settings.hotkeysEnabled!==!1&&an(e,q.config.panels[e],q.settings)!==null}function qt(e){let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n=()=>Array.from(e.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>e.offsetParent!==null);(n()[0]??e).focus();function r(t){if(t.key!==`Tab`)return;let r=n();if(r.length===0){t.preventDefault(),e.focus();return}let i=r[0],a=r[r.length-1];t.shiftKey&&document.activeElement===i?(t.preventDefault(),a.focus()):!t.shiftKey&&document.activeElement===a&&(t.preventDefault(),i.focus())}return e.addEventListener(`keydown`,r),{destroy(){e.removeEventListener(`keydown`,r),t?.focus()}}}var Jt=Fr(),Yt=M(Jt),Zt=t=>{var n=$n(),r=M(n);o(r,()=>c.header??m,()=>({viewport:e(J)})),s(n),C(t,n)};t(Yt,t=>{e(Ie)&&t(Zt)});var Qt=P(Yt,2);U(Qt,()=>`header`);var $t=P(Qt,2),en=r=>{var a=ar();let u;var d=M(a),p=e=>{var t=er(),n=M(t);o(n,()=>c.topLeftCorner),s(t),C(e,t)};t(d,e=>{c.topLeftCorner&&e(p)});var m=P(d,2);S(m,``,{},{"--smrt-admin-shell-band-column":2});var h=M(m),_=e=>{var t=T(),n=z(t);o(n,()=>c.appBar),C(e,t)},v=r=>{var i=tr(),a=z(i),o=e=>{ne(e)};t(a,e=>{le()||e(o)});var s=P(a,2),c=e=>{f(e,()=>`top`)},l=n(()=>Ut(`top`));t(s,t=>{e(l)&&t(c)}),C(r,i)};t(h,e=>{c.appBar?e(_):e(v,-1)});var y=P(h,2),b=e=>{var t=Xn();let n;var r=M(t);g(r),s(t),B(e=>n=i(t,1,`smrt-admin-shell__tenant-opener svelte-1ifuk0b`,null,n,{"restore-hidden":e}),[()=>jt(`left`)===`hidden`]),C(e,t)},x=n(()=>!(c.layoutEdit?.active&&!e(Y))&&q.config.panels.left.initial!==`hidden`&&q.layoutPanels.left?.visible!==!1&&(!e(Y)||q.phonePresentation(`left`)!==`hidden`));t(y,t=>{e(x)&&t(b)});var E=P(y,2);L(E,()=>`header.start`);var D=P(E,2);L(D,()=>`header.center`);var O=P(D,2),k=e=>{var n=nr(),r=M(n),i=e=>{var t=T(),n=z(t);o(n,()=>c.account),C(e,t)},a=e=>{var t=T(),n=z(t);o(n,()=>c.tenantFooter),C(e,t)};t(r,e=>{c.account?e(i):c.tenantFooter&&e(a,1)}),s(n),C(e,n)};t(O,t=>{(c.account||e(pt))&&t(k)});var A=P(O,2);L(A,()=>`header.end`);var j=P(A,2),ee=e=>{w(e)};t(j,t=>{e(Pe)&&t(ee)});var te=P(j,2);re(te,()=>`header`),s(m);var N=P(m,2),F=e=>{var t=rr(),n=M(t);o(n,()=>c.topRightCorner),s(t),C(e,t)};t(N,e=>{c.topRightCorner&&e(F)});var R=P(N,2),ie=e=>{var n=ir(),r=M(n),i=e=>{var t=T(),n=z(t);o(n,()=>c.appPanel),C(e,t)},a=e=>{var t=Yn(),n=I(t,!0);B(e=>l(n,e),[()=>K(Z[`ui.admin_shell.no_app_panel`])]),C(e,t)};t(r,e=>{c.appPanel?e(i):e(a,-1)}),s(n),B((e,t)=>{V(n,`aria-label`,e),V(n,`hidden`,t)},[()=>Lt(`top`),()=>!$(`top`)]),C(e,n)},ae=n(()=>It(`top`));t(R,t=>{e(ae)&&t(ie)}),s(a),B(t=>{V(a,`data-state`,t),V(a,`data-presentation`,q.config.panels.top.presentation),u=S(a,``,u,{"--smrt-admin-shell-edge-columns":e(kt)})},[()=>jt(`top`)]),C(r,a)};t($t,t=>{e(St)&&t(en)});var nn=P($t,2);U(nn,()=>`leftSidebar`);var rn=P(nn,2),on=r=>{var i=dr(),a=M(i);D(a,()=>`left`);var l=P(a,2),u=M(l);re(u,()=>`leftSidebar`);var d=P(u,2),p=e=>{var t=or(),n=M(t),r=M(n);ne(r),s(n);var i=P(n,2),a=M(i),o=I(a);s(i),s(t),B((e,t)=>{V(i,`aria-label`,e),V(i,`title`,t),V(o,`d`,ve.close)},[()=>K(Z[`ui.admin_shell.close_menu`]),()=>K(Z[`ui.admin_shell.close_menu`])]),E(`click`,i,()=>q.collapsePanel(`left`)),C(e,t)},m=t=>{{let r=n(()=>!$(`left`));ne(t,()=>e(r))}};t(d,t=>{e(Y)?t(p):!e(St)&&(c.homeHref||c.logoSrc||c.brand)&&t(m,1)});var g=P(d,2),_=r=>{var i=cr(),a=M(i);L(a,()=>`leftSidebar.header`);var l=P(a,2),u=M(l),d=e=>{var t=T(),n=z(t);o(n,()=>c.tenantPanel),C(e,t)},f=e=>{var t=T(),n=z(t);o(n,()=>c.tenantRail),C(e,t)};t(u,e=>{c.tenantPanel?e(d):c.tenantRail&&e(f,1)}),s(l);var p=P(l,2),m=e=>{h(e)},g=n(()=>$e(`left`)&&!e(Y)&&(c.tenantUtilities||Ut(`left`)));t(p,t=>{e(g)&&t(m)});var _=P(p,2),v=e=>{var t=sr(),n=M(t);o(n,()=>c.tenantFooter),s(t),C(e,t)};t(_,t=>{c.tenantFooter&&!e(pt)&&t(v)});var y=P(_,2);L(y,()=>`leftSidebar.footer`),s(i),B(e=>V(i,`hidden`,e),[()=>!$e(`left`)]),C(r,i)},v=n(()=>$e(`left`)||c.tenantPanel&&Mt(`left`));t(g,t=>{e(v)&&t(_)});var y=P(g,2),b=r=>{var i=ur(),a=M(i),l=M(a),u=e=>{var t=T(),n=z(t);o(n,()=>c.tenantRail),C(e,t)};t(l,e=>{c.tenantRail&&e(u)}),s(a);var d=P(a,2),f=e=>{h(e)},p=n(()=>!e(Y)&&(c.tenantUtilities||Ut(`left`)));t(d,t=>{e(p)&&t(f)});var m=P(d,2),g=e=>{var t=lr(),n=M(t);o(n,()=>c.tenantRailFooter),s(t),C(e,t)};t(m,e=>{c.tenantRailFooter&&e(g)}),s(i),C(r,i)},x=n(()=>!$e(`left`)&&(c.tenantRail||c.tenantRailFooter||c.tenantUtilities));t(y,t=>{e(x)&&t(b)});var S=P(y,2),w=e=>{f(e,()=>`left`)},k=n(()=>Ut(`left`)&&!e(Y)&&!$e(`left`)&&!(c.tenantRail||c.tenantRailFooter||c.tenantUtilities));t(S,t=>{e(k)&&t(w)}),s(l),s(i),ee(i,e=>Ae.left=e,()=>Ae?.left),F(i,(e,t)=>W?.(e,t),()=>({direction:`left`,onDismiss:()=>q.collapsePanel(`left`),enabled:e(Y)&&e(Ne)&&$(`left`)})),B((t,n,r,a)=>{V(i,`data-state`,t),V(i,`data-closing`,e(qe)===`left`?``:void 0),V(i,`data-presentation`,n),V(i,`aria-label`,r),V(i,`tabindex`,e(We)===`left`?-1:void 0),i.inert=a},[()=>e(qe)===`left`?`expanded`:jt(`left`),()=>q.presentationFor(`left`),()=>Lt(`left`),()=>e(Y)&&!$(`left`)||e(We)===`right`||e(qe)===`left`]),O(`animationend`,i,e=>it(e,`left`)),C(r,i)},sn=n(()=>q.isEdgeShown(`left`));t(rn,t=>{e(sn)&&t(on)});var cn=P(rn,2),un=M(cn);o(un,()=>c.children),s(cn),ee(cn,e=>H(we,e),()=>e(we));var dn=P(cn,2),fn=n=>{var r=mr(),i=M(r),a=t=>{var n=T(),r=z(n);o(r,()=>c.phoneTopBar,()=>({hidden:e(De)})),C(t,n)},l=n=>{var r=pr(),i=M(r),a=e=>{g(e)};t(i,t=>{e(Fe)&&t(a)});var o=P(i,2),c=e=>{var t=fr(),n=M(t);w(n),s(t),C(e,t)};t(o,t=>{e(Pe)&&t(c)}),s(r),C(n,r)};t(i,t=>{c.phoneTopBar?t(a):e(Tt)&&t(l,1)}),s(r),C(n,r)};t(dn,t=>{e(Et)&&t(fn)});var pn=P(dn,2),hn=e=>{var t=hr();B(e=>V(t,`aria-label`,e),[()=>K(Z[$(`left`)&&q.isEdgeShown(`left`)?`ui.admin_shell.close_menu`:`ui.admin_shell.close_tools`])]),E(`click`,t,at),C(e,t)};t(pn,t=>{e(Y)&&e(X)&&e(Re)&&t(hn)});var gn=P(pn,2),_n=t=>{let r=n(()=>e(We)??e(qe));var i=gr();B(t=>{V(i,`aria-label`,t),V(i,`data-closing`,e(We)?void 0:``)},[()=>K(Z[e(r)===`left`?`ui.admin_shell.close_sidebar`:`ui.admin_shell.close_tools`])]),E(`click`,i,()=>{e(We)&&q.collapsePanel(e(r))}),C(t,i)};t(gn,t=>{(e(We)||e(qe))&&t(_n)});var yn=P(gn,2);U(yn,()=>`rightSidebar`);var bn=P(yn,2),xn=r=>{let a=n(()=>e(Y)?q.phonePresentation(`right`):void 0);var u=wr(),d=M(u);D(d,()=>`right`);var m=P(d,2),h=e=>{var t=_r();F(t,(e,t)=>W?.(e,t),()=>({direction:`down`,onDismiss:()=>q.collapsePanel(`right`),enabled:$(`right`)})),C(e,t)};t(m,t=>{e(a)===`sheet`&&t(h)});var g=P(m,2),_=M(g);re(_,()=>`rightSidebar`);var y=P(_,2),b=e=>{var t=vr(),n=M(t),r=I(n);s(t),B((e,n)=>{V(t,`aria-label`,e),V(t,`title`,n),V(r,`d`,ve.close)},[()=>K(Z[`ui.admin_shell.close_tools`]),()=>K(Z[`ui.admin_shell.close_tools`])]),E(`click`,t,()=>q.collapsePanel(`right`)),C(e,t)};t(y,t=>{e(a)===`drawer`&&t(b)});var x=P(y,2),S=e=>{},w=e=>{var t=T(),n=z(t);o(n,()=>c.focusRail),C(e,t)},k=n=>{var r=Sr();p(r,21,()=>q.focusTools,e=>e.id,(n,r)=>{var a=xr();let o;var c=M(a),u=t=>{var n=T(),i=z(n);v(i,()=>e(r).icon,(e,t)=>{t(e,{})}),C(t,n)},d=e=>{var t=yr(),n=I(t);B(()=>V(n,`d`,ve[ye])),C(e,t)};t(c,t=>{e(r).icon?t(u):t(d,-1)});var f=P(c,2),p=t=>{var n=br(),i=I(n,!0);B(()=>l(i,e(r).badge)),C(t,n)};t(f,t=>{e(r).badge!=null&&t(p)}),s(a),B((t,n)=>{o=i(a,1,`smrt-admin-shell__focus-tool svelte-1ifuk0b`,null,o,{active:t}),V(a,`aria-pressed`,n),V(a,`aria-label`,e(r).label),V(a,`title`,e(r).label)},[()=>q.activeFocusToolId===e(r).id&&$(`right`),()=>q.activeFocusToolId===e(r).id&&$(`right`)]),E(`click`,a,()=>q.toggleFocusTool(e(r).id)),C(n,a)}),s(r),B(e=>V(r,`aria-label`,e),[()=>K(Z[`ui.admin_shell.focus_tools`])]),C(n,r)},A=e=>{f(e,()=>`right`)},j=n(()=>Ut(`right`));t(x,t=>{q.config.panels.right.rail===!1?t(S):c.focusRail?t(w,1):q.focusTools.length>0?t(k,2):e(j)&&t(A,3)}),s(g);var N=P(g,2),ne=t=>{var r=Cr(),i=M(r);L(i,()=>`rightSidebar.header`);var a=P(i,2);oe(a,()=>q.activeFocusToolId,t=>{{let r=n(xe);te(t,()=>e(r))}});var o=P(a,2);L(o,()=>`rightSidebar.footer`),s(r),B(e=>V(r,`hidden`,e),[()=>!$e(`right`)]),C(t,r)},R=n(()=>It(`right`));t(N,t=>{e(R)&&t(ne)}),s(u),ee(u,e=>Ae.right=e,()=>Ae?.right),F(u,(e,t)=>W?.(e,t),()=>({direction:`right`,onDismiss:()=>q.collapsePanel(`right`),enabled:e(a)===`drawer`&&e(Ne)&&$(`right`)})),B((t,n,r,i)=>{V(u,`data-state`,t),V(u,`data-closing`,e(qe)===`right`?``:void 0),V(u,`data-presentation`,n),V(u,`data-phone`,e(a)),V(u,`aria-label`,r),V(u,`tabindex`,e(We)===`right`?-1:void 0),u.inert=i},[()=>e(qe)===`right`?`expanded`:jt(`right`),()=>q.presentationFor(`right`),()=>Lt(`right`),()=>e(Y)&&!$(`right`)||e(We)===`left`||e(qe)===`right`]),O(`animationend`,u,e=>it(e,`right`)),C(r,u)};t(bn,t=>{e(wt)&&t(xn)});var Sn=P(bn,2),Cn=r=>{var i=Tr(),a=M(i),o=t=>{let r=n(()=>e(Nt)[0].icon);var i=T(),a=z(i);v(a,()=>e(r),(e,t)=>{t(e,{})}),C(t,i)};t(a,t=>{e(Nt)[0].icon&&t(o)});var c=P(a,2),u=I(c,!0);s(i),B((e,t)=>{V(i,`aria-label`,e),l(u,t)},[()=>K(Z[`ui.admin_shell.open_panel`],{label:e(Nt).map(e=>e.label).join(`, `)}),()=>e(Nt).map(e=>e.label).join(`, `)]),E(`click`,i,Ft),C(r,i)};t(Sn,t=>{e(Nt)&&t(Cn)});var Tn=P(Sn,2);U(Tn,()=>`footer`);var En=P(Tn,2),Dn=r=>{var i=kr();let a;var u=M(i),d=e=>{var t=Er(),n=M(t);o(n,()=>c.bottomLeftCorner),s(t),C(e,t)};t(u,e=>{c.bottomLeftCorner&&e(d)});var p=P(u,2);S(p,``,{},{"--smrt-admin-shell-band-column":2});var m=M(p);L(m,()=>`footer.start`);var h=P(m,2);L(h,()=>`footer.center`);var g=P(h,2),_=e=>{var t=T(),n=z(t);o(n,()=>c.systemBar),C(e,t)};t(g,e=>{c.systemBar&&e(_)});var v=P(g,2);L(v,()=>`footer.end`);var y=P(v,2);re(y,()=>`footer`);var b=P(y,2),x=e=>{f(e,()=>`bottom`)},w=n(()=>Ut(`bottom`)&&(c.systemPanel||!c.systemBar));t(b,t=>{e(w)&&t(x)}),s(p);var E=P(p,2),D=e=>{var t=Dr(),n=M(t);o(n,()=>c.bottomRightCorner),s(t),C(e,t)};t(E,e=>{c.bottomRightCorner&&e(D)});var O=P(E,2),k=e=>{var n=Or(),r=M(n),i=e=>{var t=T(),n=z(t);o(n,()=>c.systemPanel),C(e,t)},a=e=>{var t=Yn(),n=I(t,!0);B(e=>l(n,e),[()=>K(Z[`ui.admin_shell.no_system_panel`])]),C(e,t)};t(r,e=>{c.systemPanel?e(i):e(a,-1)}),s(n),B((e,t)=>{V(n,`aria-label`,e),V(n,`hidden`,t)},[()=>Lt(`bottom`),()=>!$(`bottom`)]),C(e,n)},A=n(()=>It(`bottom`));t(O,t=>{e(A)&&t(k)}),s(i),B(t=>{V(i,`data-state`,t),V(i,`data-presentation`,q.config.panels.bottom.presentation),a=S(i,``,a,{"--smrt-admin-shell-edge-columns":e(At)})},[()=>jt(`bottom`)]),C(r,i)};t(En,t=>{e(Ct)&&t(Dn)});var On=P(En,2),kn=t=>{var n=Ar(),r=M(n);o(r,()=>c.overlays,()=>({viewport:e(J),bottomBar:e(Le)})),s(n),C(t,n)};t(On,e=>{c.overlays&&e(kn)});var An=P(On,2),jn=e=>{var t=jr(),n=M(t);o(n,()=>c.phoneBottomBar??m),s(t),C(e,t)};t(An,t=>{e(Le)===`nav`&&t(jn)});var Mn=P(An,2),Rn=r=>{var i=Pr(),a=M(i),u=M(a),f=e=>{var t=T(),n=z(t);o(n,()=>c.shortcutsOverlay),C(e,t)},m=t=>{var r=Nr(),i=z(r),a=M(i),o=I(a,!0),c=P(a,2);{let t=n(()=>K(Z[`ui.admin_shell.close_shortcuts`]));G(c,{variant:`ghost`,size:`sm`,get"aria-label"(){return e(t)},onclick:()=>H(be,!1),children:(e,t)=>{y();var n=d();B(e=>l(n,e),[()=>K(Z[`ui.admin_shell.close`])]),C(e,n)},$$slots:{default:!0}})}s(i);var u=P(i,2),f=M(u);p(f,17,()=>Se,b,(t,n)=>{var r=Mr(),i=M(r),a=I(i,!0),o=P(i,2),c=I(o,!0);s(r),B((e,t)=>{l(a,e),l(c,t)},[()=>Lt(e(n)),()=>Vt(e(n))]),C(t,r)});var m=P(f,2),h=M(m),g=I(h,!0);y(2),s(m),s(u),B((e,t)=>{l(o,e),l(g,t)},[()=>K(Z[`ui.admin_shell.shell_shortcuts`]),()=>K(Z[`ui.admin_shell.shortcuts`])]),C(t,r)};t(u,e=>{c.shortcutsOverlay?e(f):e(m,-1)}),s(a),s(i),F(i,e=>qt?.(e)),B(e=>V(i,`aria-label`,e),[()=>K(Z[`ui.admin_shell.shell_shortcuts`])]),C(r,i)};t(Mn,t=>{e(be)&&t(Rn)}),s(Jt),ee(Jt,e=>me(e),()=>me()),B((t,n,r,i)=>{V(Jt,`data-top-state`,t),V(Jt,`data-left-state`,n),V(Jt,`data-right-state`,r),V(Jt,`data-bottom-state`,i),V(Jt,`data-viewport`,e(J)),V(Jt,`data-bottom-bar`,e(Le)),V(Jt,`data-phone-top`,e(Et)?``:void 0),V(Jt,`data-chrome-hidden`,e(De)?``:void 0),V(Jt,`data-resizing`,e(Oe)??void 0),V(Jt,`data-motion`,e(ke)?``:void 0),S(Jt,`${e(Dt)}; ${e(Ue)}; ${e(Ve)}`),cn.inert=e(We)!==null},[()=>jt(`top`),()=>jt(`left`),()=>jt(`right`),()=>jt(`bottom`)]),C(a,Jt),r()}D([`click`,`pointerdown`,`keydown`,`dblclick`]);function Lr(){let e=Ne();return{get user(){return e.state.session.user},get isAuthenticated(){return e.state.session.isAuthenticated},get permissions(){return e.state.session.permissions},hasPermission:t=>e.hasPermission(t),hasAllPermissions:t=>e.hasAllPermissions(t),hasAnyPermission:t=>e.hasAnyPermission(t)}}var Rr=c(`<span class="smrt-hotkey-input__conflict svelte-98l5qo"> </span>`),zr=c(`<div class="smrt-hotkey-input svelte-98l5qo" data-smrt-component="HotkeyInput"><!> <!></div>`);function Br(i,a){_(a,!0);let o=k(a,`value`,3,null),c=k(a,`disabled`,3,!1),u=k(a,`conflictsWith`,3,null),{t:f}=de();function p(e){c()||e.key!==`Tab`&&(e.preventDefault(),e.key===`Backspace`||e.key===`Delete`?a.oncapture?.(null):e.code&&a.oncapture?.({code:e.code,altKey:e.altKey||void 0,ctrlKey:e.ctrlKey||void 0,metaKey:e.metaKey||void 0,shiftKey:e.shiftKey||void 0}))}var m=zr(),h=M(m);{let t=n(()=>f(Z[`ui.hotkey_input.capture_title`]));G(h,{variant:`secondary`,size:`sm`,get disabled(){return c()},onkeydown:p,get title(){return e(t)},children:(e,t)=>{y();var n=d();B(e=>l(n,e),[()=>mn(o())]),C(e,n)},$$slots:{default:!0}})}var g=P(h,2),v=e=>{var t=Rr(),n=I(t);B(e=>l(n,`${e??``} ${u()??``}`),[()=>f(Z[`ui.hotkey_input.conflicts_with`])]),C(e,t)};t(g,e=>{u()&&e(v)}),s(m),C(i,m),r()}var Vr={"header.start":Z[`ui.shell_slot.header_start`],"header.center":Z[`ui.shell_slot.header_center`],"header.end":Z[`ui.shell_slot.header_end`],"footer.start":Z[`ui.shell_slot.footer_start`],"footer.center":Z[`ui.shell_slot.footer_center`],"footer.end":Z[`ui.shell_slot.footer_end`],"leftSidebar.header":Z[`ui.shell_slot.left_sidebar_header`],"leftSidebar.footer":Z[`ui.shell_slot.left_sidebar_footer`],"rightSidebar.header":Z[`ui.shell_slot.right_sidebar_header`],"rightSidebar.footer":Z[`ui.shell_slot.right_sidebar_footer`]},Hr={"header.start":Z[`ui.shell_slot.short_header_start`],"header.center":Z[`ui.shell_slot.short_header_center`],"header.end":Z[`ui.shell_slot.short_header_end`],"footer.start":Z[`ui.shell_slot.short_footer_start`],"footer.center":Z[`ui.shell_slot.short_footer_center`],"footer.end":Z[`ui.shell_slot.short_footer_end`],"leftSidebar.header":Z[`ui.shell_slot.short_sidebar_header`],"leftSidebar.footer":Z[`ui.shell_slot.short_sidebar_footer`],"rightSidebar.header":Z[`ui.shell_slot.short_sidebar_header`],"rightSidebar.footer":Z[`ui.shell_slot.short_sidebar_footer`]},Ur={header:Z[`ui.shell_region.header`],leftSidebar:Z[`ui.shell_region.left_sidebar`],rightSidebar:Z[`ui.shell_region.right_sidebar`],footer:Z[`ui.shell_region.footer`]},Wr=c(`<section data-smrt-part="appearance" aria-labelledby="smrt-shell-settings-appearance" class="svelte-qs6iav"><h3 id="smrt-shell-settings-appearance" class="svelte-qs6iav"> </h3> <div class="smrt-shell-settings-panel__controls svelte-qs6iav"><!> <!></div></section>`),Gr=c(`<dt> </dt> <dd class="svelte-qs6iav"> </dd>`,1),Kr=c(`<dl class="svelte-qs6iav"><!> <dt> </dt> <dd class="svelte-qs6iav"> </dd></dl>`),qr=c(`<p class="svelte-qs6iav"> </p>`),Jr=c(`<p role="alert" data-smrt-part="error" class="svelte-qs6iav"> </p>`),Yr=c(`<!> <!>`,1),Xr=c(`<section data-smrt-part="account" aria-labelledby="smrt-shell-settings-account" class="svelte-qs6iav"><h3 id="smrt-shell-settings-account" class="svelte-qs6iav"> </h3> <!> <!></section>`),Zr=c(`<div class="smrt-shell-settings-panel__controls svelte-qs6iav"><!> <!></div>`),Qr=c(`<div class="smrt-shell-settings-panel__controls svelte-qs6iav"><!></div>`),$r=c(`<div class="smrt-shell-settings-panel__row svelte-qs6iav"><div class="svelte-qs6iav"><strong> </strong> <span class="svelte-qs6iav"> </span></div> <div class="smrt-shell-settings-panel__actions svelte-qs6iav"><!> <!></div></div>`),ei=c(`<div class="smrt-shell-settings-panel__row svelte-qs6iav"><strong> </strong> <!></div>`),ti=c(`<section data-smrt-part="shortcuts" aria-labelledby="smrt-shell-settings-shortcuts" class="svelte-qs6iav"><header class="svelte-qs6iav"><h3 id="smrt-shell-settings-shortcuts" class="svelte-qs6iav"> </h3> <!></header> <div class="smrt-shell-settings-panel__grid svelte-qs6iav"></div></section>`),ni=c(`<section class="smrt-shell-settings-panel svelte-qs6iav" data-smrt-component="ShellSettingsPanel"><!> <!> <section data-smrt-part="layout" aria-labelledby="smrt-shell-settings-layout" class="svelte-qs6iav"><h3 id="smrt-shell-settings-layout" class="svelte-qs6iav"> </h3> <p class="svelte-qs6iav"> </p> <!> <div class="smrt-shell-settings-panel__grid svelte-qs6iav"></div></section> <!></section>`);function ri(i,a){_(a,!0);let o=k(a,`appearance`,3,!1),c=k(a,`account`,3,!1),{t:u}=de(),f=Be(),m=xe(),h=c()?Lr():null,g=[`top`,`left`,`bottom`,`right`],v=n(()=>{let e=h?.user?.name;return typeof e==`string`&&e?e:null}),b={top:`header`,bottom:`footer`,left:`leftSidebar`,right:`rightSidebar`},x=e=>u(Ur[b[e]]),S=n(()=>m?m.panels.filter(e=>e.available&&(!e.visible||f.regionsRendered[e.edge])).map(e=>({edge:e.edge,visible:e.visible})):g.filter(e=>f.panels[e]!==`hidden`&&f.regionsRendered[e]).map(e=>({edge:e,visible:!0}))),w=n(()=>m?m.panels.filter(e=>e.available&&e.visible).length:e(S).length),E=n(()=>e(S).filter(e=>e.visible)),D=A(!1),O=A(!1);async function j(){if(!e(D)&&a.onSignOut){H(D,!0),H(O,!1);try{await a.onSignOut()}catch{H(O,!0)}finally{H(D,!1)}}}let ee=n(()=>!!(a.signOutHref||a.onSignOut)),te=n(()=>f.settings.hotkeysEnabled!==!1);function N(e){return an(e,f.config.panels[e],f.settings)}function F(e){let t=N(e);if(!t)return null;let n=g.find(n=>n!==e&&N(n)?.code===t.code&&N(n)?.altKey===t.altKey&&N(n)?.ctrlKey===t.ctrlKey&&N(n)?.metaKey===t.metaKey&&N(n)?.shiftKey===t.shiftKey);return n?f.config.panels[n].label:null}var ne=ni(),L=M(ne),R=t=>{var r=Wr(),i=M(r),a=I(i,!0),o=P(i,2),c=M(o);{let t=n(()=>u(Z[`ui.shell_settings.theme`]));J(c,{get label(){return e(t)}})}var d=P(c,2);{let t=n(()=>u(Z[`ui.shell_settings.color_scheme`]));Y(d,{get ariaLabel(){return e(t)}})}s(o),s(r),B(e=>l(a,e),[()=>u(Z[`ui.shell_settings.appearance`])]),C(t,r)};t(L,e=>{o()&&e(R)});var re=P(L,2),ie=n=>{var r=Xr(),i=M(r),o=I(i,!0),c=P(i,2),f=n=>{var r=Kr(),i=M(r),a=t=>{var n=Gr(),r=z(n),i=I(r,!0),a=P(r,2),o=I(a,!0);B(t=>{l(i,t),l(o,e(v))},[()=>u(Z[`ui.shell_settings.account_name`])]),C(t,n)};t(i,t=>{e(v)&&t(a)});var o=P(i,2),c=I(o,!0),d=P(o,2),f=I(d,!0);s(r),B(e=>{l(c,e),l(f,h.user.email)},[()=>u(Z[`ui.shell_settings.account_email`])]),C(n,r)},p=e=>{var t=qr(),n=I(t,!0);B(e=>l(n,e),[()=>u(Z[`ui.shell_settings.account_signed_out`])]),C(e,t)};t(c,e=>{h.user?e(f):e(p,-1)});var m=P(c,2),g=n=>{var r=T(),i=z(r),o=n=>{var r=Yr(),i=z(r);G(i,{variant:`secondary`,size:`sm`,get loading(){return e(D)},onclick:j,children:(e,t)=>{y();var n=d();B(e=>l(n,e),[()=>u(Z[`ui.shell_settings.sign_out`])]),C(e,n)},$$slots:{default:!0}});var a=P(i,2),o=e=>{var t=Jr(),n=I(t,!0);B(e=>l(n,e),[()=>u(Z[`ui.shell_settings.sign_out_failed`])]),C(e,t)};t(a,t=>{e(O)&&t(o)}),C(n,r)},s=e=>{G(e,{variant:`secondary`,size:`sm`,get href(){return a.signOutHref},children:(e,t)=>{y();var n=d();B(e=>l(n,e),[()=>u(Z[`ui.shell_settings.sign_out`])]),C(e,n)},$$slots:{default:!0}})};t(i,e=>{a.onSignOut?e(o):e(s,-1)}),C(n,r)};t(m,t=>{e(ee)&&t(g)}),s(r),B(e=>l(o,e),[()=>u(Z[`ui.shell_settings.account`])]),C(n,r)};t(re,e=>{h&&e(ie)});var ae=P(re,2),oe=M(ae),U=I(oe,!0),se=P(oe,2),W=I(se,!0),ce=P(se,2),le=t=>{var r=Zr(),i=M(r);{let t=n(()=>m.editing?`primary`:`secondary`);G(i,{get variant(){return e(t)},size:`sm`,get"aria-pressed"(){return m.editing},onclick:()=>m.setEditing(!m.editing),children:(e,t)=>{y();var n=d();B(e=>l(n,e),[()=>m.editing?u(Z[`ui.shell_settings.edit_layout_on`]):u(Z[`ui.shell_settings.edit_layout_off`])]),C(e,n)},$$slots:{default:!0}})}var a=P(i,2);{let t=n(()=>!m.customized);G(a,{variant:`ghost`,size:`sm`,get disabled(){return e(t)},onclick:()=>m.reset(),children:(e,t)=>{y();var n=d();B(e=>l(n,e),[()=>u(Z[`ui.shell_settings.reset_layout`])]),C(e,n)},$$slots:{default:!0}})}s(r),C(t,r)},ue=t=>{var r=Qr(),i=M(r);{let t=n(()=>!m.customized);G(i,{variant:`ghost`,size:`sm`,get disabled(){return e(t)},onclick:()=>m.reset(),children:(e,t)=>{y();var n=d();B(e=>l(n,e),[()=>u(Z[`ui.shell_settings.reset_layout`])]),C(e,n)},$$slots:{default:!0}})}s(r),C(t,r)};t(ce,e=>{m?.editable?e(le):m&&e(ue,1)});var fe=P(ce,2);p(fe,21,()=>e(S),e=>e.edge,(r,i)=>{let a=n(()=>x(e(i).edge));var o=$r(),c=M(o),p=M(c),h=I(p,!0),g=P(p,2),_=I(g,!0);s(c);var v=P(c,2),b=M(v),S=t=>{{let r=n(()=>e(i).visible&&e(w)<=1),o=n(()=>e(i).visible?u(Z[`ui.shell_settings.hide_region`],{region:e(a)}):u(Z[`ui.shell_settings.show_region`],{region:e(a)}));G(t,{variant:`ghost`,size:`sm`,get disabled(){return e(r)},get"aria-label"(){return e(o)},onclick:()=>m.setPanel(e(i).edge,{visible:!e(i).visible}),children:(t,n)=>{y();var r=d();B(e=>l(r,e),[()=>e(i).visible?u(Z[`ui.shell_settings.hide`]):u(Z[`ui.shell_settings.show`])]),C(t,r)},$$slots:{default:!0}})}};t(b,e=>{m&&e(S)});var T=P(b,2),E=t=>{G(t,{variant:`ghost`,size:`sm`,onclick:()=>f.setPanel(e(i).edge,f.panels[e(i).edge]===`expanded`?`collapsed`:`expanded`),children:(t,n)=>{y();var r=d();B(e=>l(r,e),[()=>f.panels[e(i).edge]===`expanded`?u(Z[`ui.shell_settings_panel.collapse`]):u(Z[`ui.shell_settings_panel.expand`])]),C(t,r)},$$slots:{default:!0}})},D=n(()=>e(i).visible&&!f.isInline(e(i).edge));t(T,t=>{e(D)&&t(E)}),s(v),s(o),B(t=>{V(o,`data-edge`,e(i).edge),l(h,e(a)),l(_,t)},[()=>e(i).visible?u(Z[`ui.shell_settings.region_shown`]):u(Z[`ui.shell_settings.region_hidden`])]),C(r,o)}),s(fe),s(ae);var pe=P(ae,2),me=t=>{var r=ti(),i=M(r),a=M(i),o=I(a,!0),c=P(a,2);{let t=n(()=>e(te)?`secondary`:`primary`);G(c,{get variant(){return e(t)},size:`sm`,onclick:()=>f.setHotkeysEnabled(!e(te)),children:(t,n)=>{y();var r=d();B(e=>l(r,e),[()=>e(te)?u(Z[`ui.shell_settings_panel.disable_hotkeys`]):u(Z[`ui.shell_settings_panel.enable_hotkeys`])]),C(t,r)},$$slots:{default:!0}})}s(i);var m=P(i,2);p(m,21,()=>e(E),e=>e.edge,(t,r)=>{var i=ei(),a=M(i),o=I(a,!0),c=P(a,2);{let t=n(()=>N(e(r).edge)),i=n(()=>!e(te)),a=n(()=>F(e(r).edge));Br(c,{get value(){return e(t)},get disabled(){return e(i)},get conflictsWith(){return e(a)},oncapture:t=>f.setHotkey(e(r).edge,t?.code??null)})}s(i),B(t=>{V(i,`data-edge`,e(r).edge),l(o,t)},[()=>x(e(r).edge)]),C(t,i)}),s(m),s(r),B(e=>l(o,e),[()=>u(Z[`ui.shell_settings.shortcuts`])]),C(t,r)};t(pe,e=>{f.hotkeysAvailable&&e(me)}),s(ne),B((e,t,n)=>{V(ne,`aria-label`,e),l(U,t),l(W,n)},[()=>u(Z[`ui.shell_settings_panel.shell_settings`]),()=>u(Z[`ui.shell_settings.layout`]),()=>u(Z[`ui.shell_settings_panel.description`])]),C(i,ne),r()}var ii=c(`<p class="svelte-upgvjj"> </p>`),ai=c(`<span class="smrt-app-scope-panel__environment svelte-upgvjj"> </span>`),oi=c(`<div class="smrt-app-scope-panel__section svelte-upgvjj"><!></div>`),si=c(`<section class="smrt-app-scope-panel svelte-upgvjj" data-smrt-component="AppScopePanel"><header class="svelte-upgvjj"><div class="svelte-upgvjj"><h2 class="svelte-upgvjj"> </h2> <!></div> <!></header> <!> <!> <!> <!></section>`);function ci(e,n){_(n,!0);let i=k(n,`tenantName`,3,``),a=k(n,`environment`,3,``),c=k(n,`showSettings`,3,!0),{t:u}=de();var d=si(),f=M(d),p=M(f),m=M(p),h=I(m,!0),g=P(m,2),v=e=>{var t=ii(),n=I(t,!0);B(()=>l(n,i())),C(e,t)};t(g,e=>{i()&&e(v)}),s(p);var y=P(p,2),b=e=>{pe(e,{variant:`info`,size:`sm`,children:(e,t)=>{var n=ai(),r=I(n,!0);B(()=>l(r,a())),C(e,n)},$$slots:{default:!0}})};t(y,e=>{a()&&e(b)}),s(f);var x=P(f,2),S=e=>{var t=oi(),r=M(t);o(r,()=>n.switcher),s(t),C(e,t)};t(x,e=>{n.switcher&&e(S)});var w=P(x,2),T=e=>{var t=oi(),r=M(t);o(r,()=>n.search),s(t),C(e,t)};t(w,e=>{n.search&&e(T)});var E=P(w,2),D=e=>{var t=oi(),r=M(t);o(r,()=>n.docs),s(t),C(e,t)};t(E,e=>{n.docs&&e(D)});var O=P(E,2),A=e=>{ri(e,{})};t(O,e=>{c()&&e(A)}),s(d),B(e=>{V(d,`aria-label`,e),l(h,n.appName)},[()=>u(Z[`ui.app_scope_panel.app_scope`])]),C(e,d),r()}function li(){let e=Be();return{get active(){return e.openFocusToolId},get tools(){return e.focusTools.map(e=>e.id)},get available(){return e.dockAvailable},has:t=>e.focusTools.some(e=>e.id===t),isOpen:t=>e.openFocusToolId===t,open:(t,n)=>e.openDockTool(t,n),close:()=>e.closeFocusTool(),toggle:(t,n)=>e.toggleDockTool(t,n)}}var ui={header:`top`,footer:`bottom`,leftSidebar:`left`,rightSidebar:`right`},di=class{options;#e=A(!1);get editingState(){return e(this.#e)}set editingState(e){H(this.#e,e,!0)}constructor(e){this.options=e}get editable(){return this.options.editable?.()??!1}get editing(){return this.editable&&this.editingState}setEditing(e){return e&&!this.editable||this.editingState===e?!1:(this.editingState=e,!0)}get layout(){return vt(this.options.layout()??{version:1})}get sections(){return St(this.options.nav(),this.options.groups(),this.layout)}get applied(){let{nav:e,groups:t}=wt(this.options.nav(),this.options.groups(),this.options.panels(),this.layout);return{nav:e,groups:t}}get panels(){let e=Zt(this.options.panels()).panels,t=this.layout;return Kt.map(n=>{let r=e[n],i=t.panels?.[n];return{edge:n,label:r.label,available:r.initial!==`hidden`,visible:r.initial!==`hidden`&&i?.visible!==!1,initial:i?.initial??(r.initial===`expanded`?`expanded`:`collapsed`)}})}get placementItems(){let e=this.options.items?.()??[],t=Ut(e,this.layout),n=new Map;for(let[e,r]of Object.entries(t))for(let t of r)n.set(t,e);let r=new Set,i=[];for(let t of e){if(r.has(t.id))continue;r.add(t.id);let e=n.get(t.id)??t.slot;i.push({id:t.id,label:t.label,defaultSlot:t.slot,slot:e,moved:e!==t.slot})}return i}get placements(){let e=new Map(this.placementItems.map(e=>[e.id,e])),t=Ut(this.options.items?.()??[],this.layout);return Object.fromEntries(Object.entries(t).map(([t,n])=>[t,n.flatMap(t=>e.get(t)??[])]))}isRegionVisible(e){let t=ui[e];return this.panels.find(e=>e.edge===t)?.visible??!1}get customized(){return!ut(this.layout)}isHidden(e){return this.layout.hidden?.includes(e)??!1}apply(e){let t=this.layout;return JSON.stringify(e)!==JSON.stringify(t)&&(this.options.commit(e),!0)}moveSection(e,t){return this.apply(Ot(this.options.nav(),this.options.groups(),this.layout,e,t))}moveItem(e,t,n){return this.apply(kt(this.options.nav(),this.options.groups(),this.layout,e,t,n))}hide(e){return this.apply(At(this.options.nav(),this.options.groups(),this.layout,e))}show(e){return this.apply(jt(this.layout,e))}setPanel(e,t){return this.panels.find(t=>t.edge===e)?.available?this.apply(Mt(this.layout,e,t,this.options.panels())):!1}renameSection(e,t){return this.apply(Ft(this.options.nav(),this.options.groups(),this.layout,e,t))}renameItem(e,t){return this.apply(It(this.options.nav(),this.options.groups(),this.layout,e,t))}setSectionIcon(e,t){return this.apply(Rt(this.options.nav(),this.options.groups(),this.layout,e,t))}setSectionTitleVisible(e,t){return this.apply(Lt(this.options.nav(),this.options.groups(),this.layout,e,t))}createSection(e){let t=this.layout.customSections?.length??0,n=Bt(this.options.nav(),this.options.groups(),this.layout,e);if(!this.apply(n))return null;let r=n.customSections??[];return r.length>t?r[r.length-1]?.id??null:null}deleteSection(e){return this.apply(Vt(this.layout,e))}placeItem(e,t){if(!at(t))return!1;let n=this.placementItems.find(t=>t.id===e);return!n||n.slot===t?!1:this.apply(Wt(this.layout,e,t,n.defaultSlot))}resetItem(e){return this.apply(Gt(this.layout,e))}reset(){return this.apply({version:1})}},fi=c(`<span class="smrt-phone-bottom-bar__badge svelte-zvfnw6"> </span>`),pi=c(`<span class="smrt-phone-bottom-bar__dot svelte-zvfnw6"></span>`),mi=c(`<span class="smrt-phone-bottom-bar__icon svelte-zvfnw6" aria-hidden="true"><!> <!></span> <span class="smrt-phone-bottom-bar__label svelte-zvfnw6" aria-hidden="true"> </span>`,1),hi=c(`<a><!></a>`),gi=c(`<button type="button"><!></button>`),_i=c(`<nav class="smrt-phone-bottom-bar svelte-zvfnw6" data-testid="phone-bottom-bar" data-smrt-component="PhoneBottomBar"></nav>`);function vi(a,o){_(o,!0);let c=(r,i=m)=>{var a=mi(),c=z(a),u=M(c),d=e=>{var t=T(),n=z(t);v(n,()=>i().icon,(e,t)=>{t(e,{size:22})}),C(e,t)},f=t=>{{let r=n(()=>i().iconName??`placeholder`);Te(t,{get name(){return e(r)},size:22,get iconComponent(){return o.iconComponent}})}};t(u,e=>{i().icon?e(d):e(f,-1)});var p=P(u,2),h=e=>{var t=fi(),n=I(t,!0);B(()=>l(n,i().badge>9?`9+`:i().badge)),C(e,t)},g=e=>{var t=pi();C(e,t)};t(p,e=>{i().badge?e(h):i().dot&&e(g,1)}),s(c);var _=P(c,2),y=I(_,!0);B(()=>l(y,i().label)),C(r,a)},{t:u}=de();function d(e){let t=[e.label];return e.badge&&t.push(u(Z[`ui.phone_bottom_bar.unread`],{count:String(e.badge)})),e.dot&&t.push(e.dotLabel??u(Z[`ui.phone_bottom_bar.new`])),t.join(`, `)}var f=_i();p(f,21,()=>o.items,e=>e.id,(n,r)=>{var a=T(),o=z(a),l=t=>{var n=hi();let a;var o=M(n);c(o,()=>e(r)),s(n),B(t=>{a=i(n,1,`smrt-phone-bottom-bar__item svelte-zvfnw6`,null,a,{active:e(r).active}),V(n,`href`,e(r).href),V(n,`aria-label`,t),V(n,`aria-current`,e(r).active?`page`:void 0),V(n,`data-item`,e(r).id)},[()=>d(e(r))]),E(`click`,n,function(...t){e(r).onclick?.apply(this,t)}),C(t,n)},u=t=>{var n=gi();let a;var o=M(n);c(o,()=>e(r)),s(n),B(t=>{a=i(n,1,`smrt-phone-bottom-bar__item svelte-zvfnw6`,null,a,{active:e(r).active}),V(n,`aria-label`,t),V(n,`aria-expanded`,e(r).expanded),V(n,`aria-controls`,e(r).controls),V(n,`data-item`,e(r).id)},[()=>d(e(r))]),E(`click`,n,function(...t){e(r).onclick?.apply(this,t)}),C(t,n)};t(o,t=>{e(r).href?t(l):t(u,-1)}),C(n,a)}),s(f),B(e=>V(f,`aria-label`,e),[()=>o.label??u(Z[`ui.phone_bottom_bar.label`])]),C(a,f),r()}D([`click`]);var yi=ce({"ui.sortable.label":`Sortable list`,"ui.sortable.move":`Move {item}`,"ui.sortable.group":`{label}, {count} items`,"ui.sortable.empty":`No items in {container}.`,"ui.sortable.pickup":`Picked up {item}. Available destinations: {destinations}. Use the up and down arrow keys to choose a position, then Space or Enter to drop. Escape cancels.`,"ui.sortable.position":`{item}, position {position} of {count} in {container}.`,"ui.sortable.drop":`Moved {item} to {container}, position {position} of {count}.`,"ui.sortable.failed":`Could not move {item}. The list was restored.`,"ui.sortable.cancel":`Cancelled moving {item}.`,"ui.sortable.unavailable":`{container} is unavailable.`});function bi(e,t){switch(t.type){case`pickup`:return e(yi[`ui.sortable.pickup`],{item:t.item,destinations:t.destinations.join(`, `)});case`position`:return e(yi[`ui.sortable.position`],{item:t.item,container:t.container,position:t.position,count:t.count});case`drop`:return e(yi[`ui.sortable.drop`],{item:t.item,container:t.container,position:t.position,count:t.count});case`unavailable`:return e(yi[`ui.sortable.unavailable`],{container:t.container});case`failed`:return e(yi[`ui.sortable.failed`],{item:t.item});case`cancel`:return e(yi[`ui.sortable.cancel`],{item:t.item})}}var xi=c(`<div class="smrt-sortable__marker smrt-sortable__marker--before svelte-1tr29x6" aria-hidden="true"></div>`),Si=c(`<div role="listitem"><!> <button type="button" class="smrt-sortable__handle svelte-1tr29x6" data-smrt-sortable-handle="item"><span aria-hidden="true">⠿</span></button> <div class="smrt-sortable__content svelte-1tr29x6"><!></div></div>`),Ci=c(`<div role="listitem" class="smrt-sortable__empty svelte-1tr29x6"> </div>`),wi=c(`<div class="smrt-sortable__marker svelte-1tr29x6" aria-hidden="true"></div>`),Ti=c(`<div class="smrt-sortable__items svelte-1tr29x6" role="list"><!> <!></div>`),Ei=c(`<button type="button" class="smrt-sortable__handle svelte-1tr29x6" data-smrt-sortable-handle="container"><span aria-hidden="true">⠿</span></button>`),Di=c(`<strong> </strong>`),Oi=c(`<section><header class="smrt-sortable__header svelte-1tr29x6"><!> <div class="smrt-sortable__content svelte-1tr29x6"><!></div></header> <!></section>`),ki=c(`<!> <div role="listitem" class="smrt-sortable__container-slot"><!></div>`,1),Ai=c(`<div class="smrt-sortable__containers svelte-1tr29x6" role="list"><!> <!></div>`),ji=c(`<div class="smrt-sortable svelte-1tr29x6" role="group" data-smrt-component="Sortable"><!> <!> <div class="smrt-sortable__live svelte-1tr29x6" aria-live="assertive" aria-atomic="true"> </div> <div class="smrt-sortable__live svelte-1tr29x6" aria-live="assertive" aria-atomic="true"> </div></div>`);function Mi(a,c){let u=re();_(c,!0);let d=(r,a=m)=>{let u=n(()=>e(te).get(a().id)??[]),d=n(()=>L.drag?.itemId),f=n(()=>e(u).length);var g=Ti(),_=M(g);p(_,27,()=>e(u),e=>e.id,(r,l,f)=>{var p=Si();let m;var g=M(p),_=e=>{var t=xi();C(e,t)},v=n(()=>ie(a().id,ae(e(u),e(f)))&&e(l).id!==e(d));t(g,t=>{e(v)&&t(_)});var x=P(g,2),S=P(x,2),w=M(S);o(w,()=>c.item,()=>({item:e(l),container:a(),index:e(f),isDragging:e(d)===e(l).id})),s(S),s(p),B(t=>{m=i(p,1,`smrt-sortable__item svelte-1tr29x6`,null,m,{"smrt-sortable__item--dragging":e(d)===e(l).id}),V(p,`data-smrt-sortable-item-id`,e(l).id),V(x,`draggable`,L.nativeDraggable),V(x,`aria-label`,t),V(x,`aria-pressed`,e(d)===e(l).id),V(x,`aria-describedby`,e(d)===e(l).id?b:void 0)},[()=>y(yi[`ui.sortable.move`],{item:e(l).label})]),O(`dragover`,p,e=>e.preventDefault()),O(`drop`,p,t=>{L.drag&&(t.stopPropagation(),L.dropOnItem(t,a().id,e(f)))}),E(`click`,x,()=>L.consumeClick(e(l).id)),E(`keydown`,x,t=>L.keydown(t,e(l).id)),O(`blur`,x,t=>L.blur(t,e(l).id)),E(`pointerdown`,x,t=>L.pointerDown(t,e(l).id)),E(`pointermove`,x,e=>L.pointerMove(e)),E(`pointerup`,x,e=>L.pointerUp(e)),O(`pointercancel`,x,e=>L.pointerCancel(e)),O(`dragstart`,x,t=>L.dragStart(t,e(l).id)),O(`dragend`,x,()=>L.dragEnd()),h(p,()=>q,null),C(r,p)},e=>{var t=Ci(),n=I(t,!0);B(e=>l(n,e),[()=>y(yi[`ui.sortable.empty`],{container:a().label})]),C(e,t)});var v=P(_,2),x=e=>{var t=wi();C(e,t)},S=n(()=>ie(a().id,e(u).filter(t=>t.id!==e(d)).length));t(v,t=>{e(S)&&t(x)}),s(g),B(e=>V(g,`aria-label`,e),[()=>y(yi[`ui.sortable.group`],{label:a().label,count:e(f)})]),C(r,g)},f=(r,a=m,u=m)=>{let f=n(()=>(e(te).get(a().id)??[]).length),p=n(()=>R.drag?.itemId===a().id);var h=Oi();let g;var _=M(h),v=M(_),b=t=>{var n=Ei();B(t=>{V(n,`draggable`,R.nativeDraggable),V(n,`aria-label`,t),V(n,`aria-pressed`,e(p)),V(n,`aria-describedby`,e(p)?x:void 0)},[()=>y(yi[`ui.sortable.move`],{item:a().label})]),E(`click`,n,()=>R.consumeClick(a().id)),E(`keydown`,n,e=>R.keydown(e,a().id)),O(`blur`,n,e=>R.blur(e,a().id)),E(`pointerdown`,n,e=>R.pointerDown(e,a().id)),E(`pointermove`,n,e=>R.pointerMove(e)),E(`pointerup`,n,e=>R.pointerUp(e)),O(`pointercancel`,n,e=>R.pointerCancel(e)),O(`dragstart`,n,e=>R.dragStart(e,a().id)),O(`dragend`,n,()=>R.dragEnd()),C(t,n)};t(v,e=>{u()&&e(b)});var w=P(v,2),D=M(w),k=t=>{var n=T(),r=z(n);o(r,()=>c.containerHeader,()=>({container:a(),count:e(f),isDragging:e(p)})),C(t,n)},j=e=>{var t=Di(),n=I(t,!0);B(()=>l(n,a().label)),C(e,t)};t(D,e=>{c.containerHeader?e(k):e(j,-1)}),s(w),s(_);var ee=P(_,2);d(ee,a),s(h),B(()=>{g=i(h,1,`smrt-sortable__container svelte-1tr29x6`,null,g,{"smrt-sortable__container--disabled":a().disabled,"smrt-sortable__container--dragging":e(p)}),V(h,`data-smrt-sortable-container-id`,a().id),V(h,`data-smrt-sortable-container-item`,u()?a().id:void 0),V(h,`aria-label`,a().label)}),O(`dragover`,h,e=>e.preventDefault()),O(`drop`,h,t=>{L.drag?L.dropOnContainer(t,a().id):u()&&R.dropOnItem(t,S,e(A).findIndex(e=>e.id===a().id))}),C(r,h)},g=k(c,`reorderContainers`,3,!1),v=k(c,`allowSameContainerReorder`,3,!0),{t:y}=de(),b=`${u}-item-live`,x=`${u}-container-live`,S=`__smrt-sortable-containers__`,w,D=n(()=>g()?c.containers.filter(e=>e.fixed):[]),A=n(()=>g()?c.containers.filter(e=>!e.fixed):c.containers),j=n(()=>[...e(D),...e(A)]),te=n(()=>{let e=new Map;for(let t of c.containers)e.set(t.id,[]);for(let t of c.items)e.get(t.containerId)?.push(t);return e}),N=n(()=>new Map(c.items.map(e=>[e.id,e]))),F=n(()=>new Map(c.containers.map(e=>[e.id,e])));function ne(e){return bi(y,e)}let L=ge({root:()=>w,selectors:{container:`[data-smrt-sortable-container-id]`,containerKey:`smrtSortableContainerId`,item:`[data-smrt-sortable-item-id]`,itemKey:`smrtSortableItemId`},containers:()=>e(j),itemIds:t=>(e(te).get(t)??[]).map(e=>e.id),itemLabel:t=>e(N).get(t)?.label,allowSameContainerReorder:()=>v(),enabled:()=>c.onmove!==void 0,orientation:()=>`vertical`,announce:ne,focusTarget:e=>e.querySelector(`[data-smrt-sortable-handle="item"]`),async commit(t){let n=e(N).get(t.itemId),r=e(F).get(t.source.containerId),i=e(F).get(t.target.containerId);n&&r&&i&&await c.onmove?.({item:n,source:t.source,target:t.target,sourceContainer:r,targetContainer:i})}}),R=ge({root:()=>w,selectors:{container:`[data-smrt-sortable-container-list]`,containerKey:`smrtSortableContainerList`,item:`[data-smrt-sortable-container-item]`,itemKey:`smrtSortableContainerItem`},containers:()=>[{id:S,label:c.label??y(yi[`ui.sortable.label`])}],itemIds:()=>e(A).map(e=>e.id),itemLabel:t=>e(F).get(t)?.label,allowSameContainerReorder:()=>!0,enabled:()=>g()&&c.oncontainermove!==void 0,orientation:()=>`vertical`,announce:ne,focusTarget:e=>Array.from(e.children).find(e=>e.tagName===`HEADER`)?.querySelector(`[data-smrt-sortable-handle="container"]`)??null,async commit(t){let n=e(F).get(t.itemId);n&&await c.oncontainermove?.({container:n,source:t.source.index,target:t.target.index})}});function ie(e,t){let n=L.drag?.target;return n?.containerId===e&&n.index===t}function ae(e,t){let n=L.drag?.itemId,r=0;for(let i=0;i<t;i+=1)e[i].id!==n&&(r+=1);return r}function H(e){return R.drag?.target.index===e}function oe(t){let n=R.drag?.itemId,r=0;for(let i of e(A)){if(i.id===t)break;i.id!==n&&(r+=1)}return r}var U=ji(),se=M(U);p(se,17,()=>e(D),e=>e.id,(t,n)=>{f(t,()=>e(n),()=>!1)});var W=P(se,2),ce=r=>{var i=Ai();V(i,`data-smrt-sortable-container-list`,S);var a=M(i);p(a,17,()=>e(A),e=>e.id,(r,i)=>{var a=ki(),o=z(a),c=e=>{var t=wi();C(e,t)},l=n(()=>H(oe(e(i).id))&&R.drag?.itemId!==e(i).id);t(o,t=>{e(l)&&t(c)});var u=P(o,2),d=M(u);f(d,()=>e(i),()=>!0),s(u),C(r,a)});var o=P(a,2),c=e=>{var t=wi();C(e,t)},l=n(()=>H(e(A).filter(e=>e.id!==R.drag?.itemId).length));t(o,t=>{e(l)&&t(c)}),s(i),C(r,i)},le=t=>{var n=T(),r=z(n);p(r,17,()=>e(A),e=>e.id,(t,n)=>{f(t,()=>e(n),()=>!1)}),C(t,n)};t(W,e=>{g()?e(ce):e(le,-1)});var ue=P(W,2),fe=I(ue,!0),pe=P(ue,2),G=I(pe,!0);s(U),ee(U,e=>w=e,()=>w),B(e=>{V(U,`aria-label`,e),V(ue,`id`,b),l(fe,L.announcement),V(pe,`id`,x),l(G,R.announcement)},[()=>c.label??y(yi[`ui.sortable.label`])]),C(a,U),r()}D([`click`,`keydown`,`pointerdown`,`pointermove`,`pointerup`]);function Ni(e){let t=e-1;return t*t*t+1}function Pi(e){let t=typeof e==`string`&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||`px`]:[e,`px`]}function Fi(e,{delay:t=0,duration:n=400,easing:r=Ni,x:i=0,y:a=0,opacity:o=0}={}){let s=getComputedStyle(e),c=+s.opacity,l=s.transform===`none`?``:s.transform,u=c*(1-o),[d,f]=Pi(i),[p,m]=Pi(a);return{delay:t,duration:n,easing:r,css:(e,t)=>`
3
+ transform: ${l} translate(${(1-e)*d}${f}, ${(1-e)*p}${m});
4
+ opacity: ${c-u*t}`}}var Ii=c(`<span class="smrt-tenant-nav__attention svelte-jpnndf" data-attention="" aria-hidden="true"></span> <span class="smrt-tenant-nav__sr-only svelte-jpnndf"> </span>`,1),Li=c(`<span class="smrt-tenant-nav__icon svelte-jpnndf" aria-hidden="true"><!></span>`),Ri=c(`<span class="smrt-tenant-nav__icon smrt-tenant-nav__icon--placeholder svelte-jpnndf" aria-hidden="true"><!></span>`),zi=c(`<span class="smrt-tenant-nav__sr-only svelte-jpnndf"> </span>`),Bi=c(`<small class="svelte-jpnndf"> </small>`),Vi=c(`<strong class="svelte-jpnndf"> </strong> <!>`,1),Hi=c(`<a class="smrt-tenant-nav__action svelte-jpnndf"><span class="smrt-tenant-nav__icon svelte-jpnndf" aria-hidden="true"><!></span></a>`),Ui=c(`<a class="svelte-jpnndf"><!> <span class="svelte-jpnndf"> </span> <!> <!></a>`),Wi=c(`<div class="smrt-tenant-nav__children svelte-jpnndf"></div>`),Gi=c(`<div class="smrt-tenant-nav__section svelte-jpnndf"><div class="smrt-tenant-nav__row svelte-jpnndf"><a><!> <!> <!></a> <!></div> <!></div>`),Ki=c(`<strong class="svelte-jpnndf"> </strong>`),qi=c(`<div class="smrt-tenant-nav__subnav svelte-jpnndf"><!></div>`),Ji=c(`<div class="smrt-tenant-nav__section svelte-jpnndf"><div class="smrt-tenant-nav__row svelte-jpnndf"><a><span class="smrt-tenant-nav__icon svelte-jpnndf" aria-hidden="true"><!></span> <!></a></div> <!></div>`),Yi=c(`<div class="smrt-tenant-nav__group smrt-tenant-nav__group--flat" role="group"><div class="smrt-tenant-nav__group-items svelte-jpnndf"><!></div></div>`),Xi=c(`<span aria-hidden="true" class="svelte-jpnndf"> </span> <span class="smrt-tenant-nav__sr-only svelte-jpnndf"> </span>`,1),Zi=c(`<span class="svelte-jpnndf"> </span>`),Qi=c(`<details class="smrt-tenant-nav__group" open=""><summary class="smrt-tenant-nav__heading svelte-jpnndf"><!></summary> <div class="smrt-tenant-nav__group-items svelte-jpnndf"><!></div></details>`),$i=c(`<nav data-smrt-component="TenantNav"><!> <!></nav>`);function ea(a,o){_(o,!0);let c=(e,n=m,r=m)=>{var i=T(),a=z(i),s=e=>{var t=T(),i=z(t);v(i,()=>o.iconComponent,(e,t)=>{t(e,{get name(){return n()},get size(){return r()}})}),C(e,t)},c=e=>{Te(e,{get name(){return n()},get size(){return r()}})};t(a,e=>{o.iconComponent?e(s):e(c,-1)}),C(e,i)},u=(r,i=m)=>{let a=n(()=>ae(i()));var o=T(),s=z(o),c=t=>{var n=Ii(),r=P(z(n),2),i=I(r);B(()=>l(i,`(${e(a)??``})`)),C(t,n)};t(s,t=>{e(a)&&t(c)}),C(r,o)},d=(r,a=m,d=m)=>{var _=T(),v=z(_);p(v,25,a,e=>e.href,(r,a)=>{let m=n(()=>R(e(a),d()??te(e(a)))?e(a).action:void 0);var _=Gi(),v=M(_),y=M(v);let b;var x=M(y),w=t=>{var n=Li(),r=M(n);c(r,()=>e(a).icon,()=>18),s(n),C(t,n)},T=e=>{var t=Ri(),n=M(t);Te(n,{get name(){return he},size:18}),s(t),C(e,t)};t(x,t=>{e(a).icon?t(w):S()&&t(T,1)});var D=P(x,2),O=t=>{var n=zi(),r=I(n,!0);B(()=>l(r,e(a).label)),C(t,n)},k=n=>{var r=Vi(),i=z(r),o=I(i,!0),s=P(i,2),c=t=>{var n=Bi(),r=I(n,!0);B(()=>l(r,e(a).badge)),C(t,n)};t(s,t=>{e(a).badge!==null&&e(a).badge!==void 0&&t(c)}),B(()=>l(o,e(a).label)),C(n,r)};t(D,e=>{S()?e(O):e(k,-1)});var A=P(D,2);u(A,()=>e(a)),s(y);var N=P(y,2),F=t=>{var n=Hi(),r=M(n),i=M(r);c(i,()=>e(m).icon??f,()=>16),s(r),s(n),B(t=>{V(n,`href`,e(m).href),V(n,`aria-label`,e(m).label),V(n,`aria-current`,t),V(n,`title`,e(m).label)},[()=>ee(e(m))?`page`:void 0]),E(`click`,n,function(...e){o.onNavigate?.apply(this,e)}),C(t,n)};t(N,t=>{e(m)&&t(F)}),s(v);var ne=P(v,2),L=n=>{var r=Wi();p(r,21,()=>e(a).children,e=>e.href,(n,r)=>{var i=Ui(),a=M(i),d=t=>{var n=Li(),i=M(n);c(i,()=>e(r).icon,()=>16),s(n),C(t,n)};t(a,t=>{e(r).icon&&t(d)});var f=P(a,2),p=I(f,!0),m=P(f,2),h=t=>{var n=Bi(),i=I(n,!0);B(()=>l(i,e(r).badge)),C(t,n)};t(m,t=>{e(r).badge!==null&&e(r).badge!==void 0&&t(h)});var g=P(m,2);u(g,()=>e(r)),s(i),B(t=>{V(i,`href`,e(r).href),V(i,`aria-current`,t),l(p,e(r).label)},[()=>ee(e(r))?`page`:void 0]),E(`click`,i,function(...e){o.onNavigate?.apply(this,e)}),C(n,i)}),s(r),C(n,r)};t(ne,t=>{e(a).children?.length&&!S()&&t(L)}),s(_),B((t,n)=>{V(y,`href`,e(a).href),V(y,`aria-current`,t),V(y,`title`,S()?e(a).label:e(a).description),b=i(y,1,`svelte-jpnndf`,null,b,{"smrt-tenant-nav__link--visible-active":n})},[()=>ee(e(a))?`page`:void 0,()=>re(e(a))]),E(`click`,y,function(...e){o.onNavigate?.apply(this,e)}),g(1,_,()=>Fi,j),h(_,()=>q,null),C(r,_)}),C(r,_)},f=`settings`,y=k(o,`items`,19,()=>[]),b=k(o,`groups`,19,()=>[]),x=k(o,`currentHref`,3,``),S=k(o,`collapsed`,3,!1),w=k(o,`navMode`,3,`items`),{t:D}=de(),O=A(!1);ie(()=>{H(O,!0)});function j(){let t=typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,n=typeof Element<`u`&&typeof Element.prototype.animate==`function`;return{x:12,duration:e(O)&&!t&&n?260:0}}function ee(e){return e.href===x()||x().startsWith(`${e.href}/`)}function te(e){return ee(e)||!!e.children?.some(e=>ee(e))||!!e.action&&ee(e.action)}function N(e){return e.items.some(te)}function F(e){return e.id??e.heading}function ne(e){return e.href??o.sectionHref?.(F(e))??e.items[0]?.href}function L(e){let t=ne(e);return!!t&&(t===x()||x().startsWith(`${t}/`))||N(e)}function R(e,t){return S()||!e.action?!1:e.action.visibility!==`active`||t}function re(e){return ee(e)?!0:S()&&te(e)}function ae(e){return e.attention?typeof e.attention==`string`&&e.attention.trim()?e.attention.trim():D(Z[`ui.tenant_nav.needs_attention`]):null}function oe(e){return e.trim().charAt(0).toLocaleUpperCase()||`?`}var U=$i();let se;var W=M(U);d(W,y);var ce=P(W,2);p(ce,17,b,e=>F(e),(r,a)=>{var c=T(),u=z(c),f=r=>{let c=n(()=>ne(e(a)));var u=T(),f=z(u),p=r=>{var u=Ji(),f=M(u),p=M(f);let m;var h=M(p),_=M(h);{let t=n(()=>e(a).icon??`folder`);Te(_,{get name(){return e(t)},size:18,get iconComponent(){return o.iconComponent}})}s(h);var v=P(h,2),y=t=>{var n=zi(),r=I(n,!0);B(()=>l(r,e(a).heading)),C(t,n)},b=t=>{var n=Ki(),r=I(n,!0);B(()=>l(r,e(a).heading)),C(t,n)};t(v,e=>{S()?e(y):e(b,-1)}),s(p),s(f);var T=P(f,2),D=t=>{var r=qi(),i=M(r);{let t=n(()=>N(e(a)));d(i,()=>e(a).items,()=>e(t))}s(r),C(t,r)};t(T,t=>{w()===`sections-with-items`&&!S()&&e(a).items.length&&t(D)}),s(u),B((t,n,r)=>{V(u,`data-nav-section`,t),V(p,`href`,e(c)),m=i(p,1,`smrt-tenant-nav__section-link svelte-jpnndf`,null,m,{"smrt-tenant-nav__link--visible-active":n}),V(p,`aria-current`,r),V(p,`title`,S()?e(a).heading:void 0)},[()=>F(e(a)),()=>L(e(a)),()=>e(c)===x()?`page`:L(e(a))?`true`:void 0]),E(`click`,p,function(...e){o.onNavigate?.apply(this,e)}),g(1,u,()=>Fi,j),C(r,u)};t(f,t=>{e(c)&&t(p)}),C(r,u)},p=t=>{var r=Yi(),i=M(r),o=M(i);{let t=n(()=>N(e(a)));d(o,()=>e(a).items,()=>e(t))}s(i),s(r),B(()=>V(r,`aria-label`,e(a).heading)),C(t,r)},m=r=>{var i=Qi(),o=M(i),c=M(o),u=t=>{var n=Xi(),r=z(n),i=I(r,!0),o=P(r,2),s=I(o,!0);B(t=>{l(i,t),l(s,e(a).heading)},[()=>oe(e(a).heading)]),C(t,n)},f=t=>{var n=Zi(),r=I(n,!0);B(()=>l(r,e(a).heading)),C(t,n)};t(c,e=>{S()?e(u):e(f,-1)}),s(o);var p=P(o,2),m=M(p);{let t=n(()=>N(e(a)));d(m,()=>e(a).items,()=>e(t))}s(p),s(i),B(()=>V(i,`aria-label`,e(a).heading)),C(r,i)};t(u,t=>{w()===`sections`||w()===`sections-with-items`?t(f):e(a).showTitle===!1?t(p,1):t(m,-1)}),C(r,c)}),s(U),B(e=>{se=i(U,1,`smrt-tenant-nav svelte-jpnndf`,null,se,{"smrt-tenant-nav--collapsed":S()}),V(U,`data-density`,o.density),V(U,`aria-label`,e)},[()=>o[`aria-label`]||D(Z[`ui.tenant_nav.tenant_navigation`])]),C(a,U),r()}D([`click`]);var ta=c(`<!> <!>`,1),na=c(`<strong class="svelte-vi5c2s"> </strong>`),ra=c(`<span class="smrt-nav-editor__top svelte-vi5c2s"> </span>`),ia=c(`<span class="smrt-nav-editor__section-icon svelte-vi5c2s"><!></span>`),aa=c(`<div class="smrt-nav-editor__icons svelte-vi5c2s" role="group"></div>`),oa=c(`<div class="smrt-nav-editor__toolbar svelte-vi5c2s" role="group" data-testid="section-toolbar"><!> <!> <!> <!> <!> <!></div>`),sa=c(`<div class="smrt-nav-editor__head svelte-vi5c2s"><button type="button" data-section-title="" aria-haspopup="true"><!> </button> <span class="smrt-nav-editor__overlay svelte-vi5c2s"><!> <!></span> <!></div>`),ca=c(`<span class="smrt-nav-editor__icon svelte-vi5c2s" aria-hidden="true"><!></span>`),la=c(`<span><!> <!></span> <!> <!> <!>`,1),ua=c(`<nav class="smrt-nav-editor svelte-vi5c2s" data-layout-editing="" data-smrt-component="ShellNavEditor"><!> <!></nav>`);function da(a,c){_(c,!0);let u=(r,i=m)=>{var a=ta(),o=z(a);{let t=n(()=>i().hidden?`eyeOff`:`eye`),r=n(()=>!i().hidden),a=n(()=>g(Z[`ui.shell_layout_editor.show_entry`],{label:i().label}));Ce(o,{get icon(){return e(t)},get pressed(){return e(r)},get label(){return e(a)},onclick:()=>K(i().id,i().hidden)})}var s=P(o,2),c=t=>{{let r=n(()=>i().titleVisible?`heading`:`headingOff`),a=n(()=>g(Z[`ui.shell_layout_editor.show_title_for`],{label:i().label}));Ce(t,{get icon(){return e(r)},get pressed(){return i().titleVisible},get label(){return e(a)},onclick:()=>b.setSectionTitleVisible(i().id,!i().titleVisible)})}};t(s,e=>{h()!==`sections`&&e(c)}),C(r,a)},f=(e,t=m)=>{var n=T(),r=z(n);o(r,()=>c.sectionActions??m,()=>({sectionId:t().id,label:t().label,custom:t().custom,editing:!0})),C(e,n)},h=k(c,`navMode`,3,`items`),{t:g}=de(),b=R(()=>c.controller??De()),x=n(()=>b.sections),S=n(()=>e(x).map(e=>({id:e.id,label:e.heading??g(Z[`ui.shell_layout_editor.top_level`]),fixed:e.group===null,root:e.group===null,hidden:e.hidden,custom:e.custom,titleVisible:e.titleVisible,count:e.items.length,icon:e.icon??`folder`}))),w=n(()=>(h()===`sections`?[]:e(x)).flatMap(e=>e.items.map(t=>({id:t.id,containerId:e.id,label:t.label})))),D=n(()=>new Map(e(x).flatMap(e=>e.items.map(e=>[e.id,e.defaultLabel])))),te=n(()=>new Map(e(x).flatMap(e=>e.items.map(e=>[e.id,e.item.icon])))),N=A(void 0),F=A(null);function ne(){return typeof window<`u`&&window.matchMedia?.(`(hover: hover) and (pointer: fine)`).matches===!0}function L(t){return e(N)?.querySelector(`[data-nav-section="${CSS.escape(t)}"]`)??null}function re(t,n){n.pointerType!==`touch`&&ne()&&(e(F)?.pinned||H(F,{id:t,pinned:!1},!0))}async function ie(t){if(e(F)?.id===t&&e(F).pinned){H(F,null);return}H(F,{id:t,pinned:!0},!0),await ae();let n=L(t)?.querySelector(`input[data-section-name]`);n?.focus(),n?.select()}function oe(t){e(F)?.id===t&&!e(F).pinned&&H(F,null)}function U(t,n){n.key===`Escape`&&e(F)?.id===t&&(n.preventDefault(),n.stopPropagation(),e(W)===t?(H(W,null),ce(t)?.focus()):(H(F,null),L(t)?.querySelector(`button[data-section-title]`)?.focus()))}function se(t,n){if(e(F)?.id!==t||!e(F).pinned)return;let r=n.relatedTarget;r instanceof Node&&!L(t)?.contains(r)&&H(F,null)}j(()=>{let t=e(F);if(!t?.pinned||typeof document>`u`)return;let n=e=>{e.target instanceof Node&&!L(t.id)?.contains(e.target)&&H(F,null)};return document.addEventListener(`pointerdown`,n,!0),()=>document.removeEventListener(`pointerdown`,n,!0)});let W=A(null);function ce(e){return L(e)?.querySelector(`button[data-section-icon]`)??null}function le(e,t){b.setSectionIcon(e,t),H(W,null),ce(e)?.focus()}j(()=>{e(W)!==null&&e(F)?.id!==e(W)&&H(W,null)});function ue(e){return e.replace(/([A-Z])/g,` $1`).toLowerCase()}let fe=A(null);async function pe(t){H(fe,t,!0),await ae();let n=e(N)?.querySelector(`input[data-item-name="${CSS.escape(t)}"]`);n?.focus(),n?.select()}function he(t,n){e(fe)===t&&(H(fe,null),b.renameItem(t,n))}function ge(t){H(fe,null),e(N)?.querySelector(`button[data-item-rename="${CSS.escape(t)}"]`)?.focus()}function K(e,t){t?b.show(e):b.hide(e)}function q(t,n){b.renameSection(t,n.value),n.value=e(S).find(e=>e.id===t)?.label??``}async function _e(){let e=b.createSection(g(Z[`ui.shell_layout_editor.new_section_label`]));e&&(await ae(),await ie(e))}function ve(e,t,n){n>0&&!globalThis.confirm?.(g(Z[`ui.shell_layout_editor.delete_confirm`],{label:t}))||(H(F,null),b.deleteSection(e))}function ye(e){b.moveItem(e.item.id,e.target.containerId,e.target.index)}function be(e){b.moveSection(e.container.id,e.target)}var xe=ua(),Se=M(xe);{let r=(r,a)=>{let o=()=>(a?.()).container,d=n(()=>e(S).find(e=>e.id===o().id));var m=T(),_=z(m),v=e=>{var t=na(),n=I(t,!0);B(()=>l(n,o().label)),C(e,t)},y=e=>{var t=ra(),n=I(t,!0);B(()=>l(n,o().label)),C(e,t)},b=r=>{var a=sa(),o=M(a);let m;var _=M(o),v=t=>{var n=ia(),r=M(n);Te(r,{get name(){return e(d).icon},get iconComponent(){return c.iconComponent}}),s(n),C(t,n)};t(_,e=>{h()!==`items`&&e(v)});var y=P(_,1,!0);s(o);var b=P(o,2),x=M(b);u(x,()=>e(d));var S=P(x,2);f(S,()=>e(d)),s(b);var w=P(b,2),T=r=>{var i=oa(),a=M(i);{let t=n(()=>g(Z[`ui.shell_layout_editor.section_name`],{label:e(d).label}));me(a,{class:`smrt-nav-editor__name`,interaction:!1,get"data-section-name"(){return e(d).id},get"aria-label"(){return e(t)},get value(){return e(d).label},onchange:t=>q(e(d).id,t.currentTarget),onkeydown:t=>{t.key===`Enter`&&(t.preventDefault(),q(e(d).id,t.currentTarget))}})}var o=P(a,2);u(o,()=>e(d));var l=P(o,2),m=t=>{{let r=n(()=>e(W)===e(d).id),i=n(()=>g(Z[`ui.shell_layout_editor.section_icon`],{label:e(d).label}));Ce(t,{get"data-section-icon"(){return e(d).id},"aria-haspopup":`true`,get"aria-expanded"(){return e(r)},get label(){return e(i)},onclick:()=>H(W,e(W)===e(d).id?null:e(d).id,!0),children:(t,n)=>{Te(t,{get name(){return e(d).icon},get iconComponent(){return c.iconComponent}})},$$slots:{default:!0}})}};t(l,e=>{h()!==`items`&&e(m)});var _=P(l,2),v=t=>{{let r=n(()=>g(Z[`ui.shell_layout_editor.delete_section`],{label:e(d).label}));Ce(t,{icon:`trash`,get label(){return e(r)},onclick:()=>ve(e(d).id,e(d).label,e(d).count)})}};t(_,t=>{e(d).custom&&t(v)});var y=P(_,2);f(y,()=>e(d));var b=P(y,2),x=t=>{var r=aa();p(r,20,()=>Oe,e=>e,(t,r)=>{{let i=n(()=>e(d).icon===r),a=n(()=>g(Z[`ui.shell_layout_editor.icon_option`],{icon:ue(r)}));Ce(t,{get"data-icon-option"(){return r},get pressed(){return e(i)},get label(){return e(a)},onclick:()=>le(e(d).id,r),children:(e,t)=>{Te(e,{get name(){return r}})},$$slots:{default:!0}})}}),s(r),B(e=>V(r,`aria-label`,e),[()=>g(Z[`ui.shell_layout_editor.section_icon`],{label:e(d).label})]),C(t,r)};t(b,t=>{h()!==`items`&&e(W)===e(d).id&&t(x)}),s(i),B(e=>V(i,`aria-label`,e),[()=>g(Z[`ui.layout_edit.section_options`],{label:e(d).label})]),C(r,i)};t(w,t=>{e(F)?.id===e(d).id&&t(T)}),s(a),B(t=>{V(a,`data-nav-section`,e(d).id),V(a,`data-toolbar-open`,e(F)?.id===e(d).id?``:void 0),m=i(o,1,`smrt-nav-editor__title svelte-vi5c2s`,null,m,{"smrt-nav-editor__title--off":!e(d).titleVisible,"smrt-nav-editor__title--hidden":e(d).hidden}),V(o,`aria-expanded`,e(F)?.id===e(d).id),V(o,`aria-label`,t),l(y,e(d).label)},[()=>g(Z[`ui.layout_edit.edit_section`],{label:e(d).label})]),O(`pointerleave`,a,()=>oe(e(d).id)),E(`keydown`,a,t=>U(e(d).id,t)),E(`focusout`,a,t=>se(e(d).id,t)),O(`pointerenter`,o,t=>re(e(d).id,t)),E(`click`,o,()=>ie(e(d).id)),C(r,a)};t(_,t=>{e(d)?e(d).root?t(y,1):t(b,-1):t(v)}),C(r,m)},a=(r,a)=>{let o=()=>(a?.()).item,u=()=>(a?.()).container,d=n(()=>b.isHidden(o().id)),f=n(()=>e(te).get(o().id)),p=n(()=>e(D).get(o().id));var m=la(),h=z(m);let _;var y=M(h),x=n=>{var r=ca(),i=M(r),a=t=>{var n=T(),r=z(n);v(r,()=>c.iconComponent,(t,n)=>{n(t,{get name(){return e(f)},size:18})}),C(t,n)},o=t=>{Te(t,{get name(){return e(f)},size:18})};t(i,e=>{c.iconComponent?e(a):e(o,-1)}),s(r),C(n,r)};t(y,t=>{e(f)&&t(x)});var S=P(y,2),w=t=>{{let r=n(()=>g(Z[`ui.shell_layout_editor.item_name`],{label:o().label}));me(t,{class:`smrt-nav-editor__item-name`,interaction:!1,get"data-item-name"(){return o().id},get"aria-label"(){return e(r)},get value(){return o().label},onblur:e=>he(o().id,e.currentTarget.value),onkeydown:e=>{if(e.key===`Enter`){e.preventDefault(),e.stopPropagation();let t=e.currentTarget.value;he(o().id,t),ge(o().id)}else e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),ge(o().id))}})}},E=t=>{var n=na(),r=I(n,!0);B(()=>{V(n,`title`,e(p)===o().label?void 0:e(p)),l(r,o().label)}),C(t,n)};t(S,t=>{e(fe)===o().id?t(w):t(E,-1)}),s(h);var O=P(h,2);{let t=n(()=>g(Z[`ui.shell_layout_editor.rename_item`],{label:o().label}));Ce(O,{icon:`edit`,get"data-item-rename"(){return o().id},get label(){return e(t)},onclick:()=>pe(o().id)})}var k=P(O,2),A=t=>{{let r=n(()=>g(Z[`ui.shell_layout_editor.reset_item`],{label:o().label,original:e(p)}));Ce(t,{icon:`undo`,get label(){return e(r)},onclick:()=>b.renameItem(o().id,null)})}};t(k,t=>{e(p)!==void 0&&e(p)!==o().label&&t(A)});var j=P(k,2);{let t=n(()=>e(d)?`eyeOff`:`eye`),r=n(()=>!e(d)),i=n(()=>g(Z[`ui.shell_layout_editor.show_entry`],{label:o().label}));Ce(j,{get icon(){return e(t)},get pressed(){return e(r)},get label(){return e(i)},onclick:()=>K(o().id,e(d))})}B(e=>_=i(h,1,`smrt-nav-editor__row svelte-vi5c2s`,null,_,{"smrt-nav-editor__row--muted":e}),[()=>e(d)||b.isHidden(u().id)]),C(r,m)},o=n(()=>g(Z[`ui.shell_layout_editor.sortable_label`]));Mi(Se,{get containers(){return e(S)},get items(){return e(w)},get label(){return e(o)},reorderContainers:!0,onmove:ye,oncontainermove:be,containerHeader:r,item:a,$$slots:{containerHeader:!0,item:!0}})}var we=P(Se,2);G(we,{variant:`secondary`,size:`sm`,class:`smrt-nav-editor__new`,onclick:_e,children:(e,t)=>{y();var n=d();B(e=>l(n,e),[()=>g(Z[`ui.shell_layout_editor.new_section`])]),C(e,n)},$$slots:{default:!0}}),s(xe),ee(xe,e=>H(N,e),()=>e(N)),B(e=>{V(xe,`data-nav-mode`,h()),V(xe,`aria-label`,e)},[()=>c[`aria-label`]||g(Z[`ui.shell_layout_editor.sortable_label`])]),C(a,xe),r()}D([`keydown`,`focusout`,`click`]);var fa=c(`<strong class="svelte-nwjioo"> </strong>`),pa=c(`<span class="smrt-section-menu__desc svelte-nwjioo"> </span>`),ma=c(`<span><!> <!> <!> <!></span> <!> <!> <!>`,1),ha=c(`<p class="smrt-section-menu__empty svelte-nwjioo"> </p>`),ga=c(`<span class="smrt-section-menu__meta svelte-nwjioo"><!></span>`),_a=c(`<span class="smrt-section-menu__actions svelte-nwjioo"><!></span>`),va=c(`<div class="smrt-section-menu__card-foot svelte-nwjioo"><!> <!></div>`),ya=c(`<li class="smrt-section-menu__card svelte-nwjioo"><a class="smrt-section-menu__card-link svelte-nwjioo"><span class="smrt-section-menu__card-heading svelte-nwjioo"><span class="smrt-section-menu__card-icon svelte-nwjioo"><!></span> <span class="smrt-section-menu__card-title svelte-nwjioo"> </span></span> <!></a> <!></li>`),ba=c(`<ul class="smrt-section-menu__cards svelte-nwjioo"></ul>`),xa=c(`<li class="smrt-section-menu__item svelte-nwjioo"><a class="smrt-section-menu__link svelte-nwjioo"><!> <span class="smrt-section-menu__label svelte-nwjioo"> </span></a> <!> <!> <svg class="smrt-section-menu__chevron svelte-nwjioo" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></li>`),Sa=c(`<ul class="smrt-section-menu__list svelte-nwjioo"></ul>`),Ca=c(`<div data-smrt-component="ShellSectionMenu"><!></div>`);function wa(a,c){_(c,!0);let u=k(c,`layout`,3,`list`),{t:d}=de(),f=R(()=>c.controller??De()),g=n(()=>f.sections.find(e=>e.id===c.sectionId)),v=n(()=>f.editing),y=n(()=>e(g)?.heading??c.sectionId),b=n(()=>(e(g)?.items??[]).filter(t=>e(v)||!t.hidden).map(e=>({id:e.id,href:e.item.href,label:e.label,defaultLabel:e.defaultLabel,icon:e.item.icon,hidden:e.hidden,item:e.item}))),x=n(()=>c[`aria-label`]||d(Z[`ui.section_menu.label`],{label:e(y)})),S=n(()=>[{id:c.sectionId,label:e(x)}]),w=n(()=>e(b).map(e=>({id:e.id,containerId:c.sectionId,label:e.label}))),D=n(()=>new Map(e(b).map(e=>[e.id,e]))),O=A(void 0),j=A(null);async function te(t){H(j,t,!0),await ae();let n=e(O)?.querySelector(`input[data-item-name="${CSS.escape(t)}"]`);n?.focus(),n?.select()}function N(t,n){e(j)===t&&(H(j,null),f.renameItem(t,n))}function F(t){H(j,null),e(O)?.querySelector(`button[data-item-rename="${CSS.escape(t)}"]`)?.focus()}function ne(e,t){t?f.show(e):f.hide(e)}function L(e){f.moveItem(e.item.id,c.sectionId,e.target.index)}var re=Ca();let ie;var oe=M(re),U=r=>{Mi(r,{get containers(){return e(S)},get items(){return e(w)},get label(){return e(x)},onmove:L,item:(r,a)=>{let p=()=>(a?.()).item,h=n(()=>e(D).get(p().id));var g=T(),_=z(g),v=r=>{var a=ma(),p=z(a);let g;var _=M(p),v=t=>{Te(t,{get name(){return e(h).icon},get iconComponent(){return c.iconComponent}})};t(_,t=>{e(h).icon&&t(v)});var y=P(_,2),b=t=>{{let r=n(()=>d(Z[`ui.shell_layout_editor.item_name`],{label:e(h).label}));me(t,{class:`smrt-section-menu__name`,interaction:!1,get"data-item-name"(){return e(h).id},get"aria-label"(){return e(r)},get value(){return e(h).label},onblur:t=>N(e(h).id,t.currentTarget.value),onkeydown:t=>{if(t.key===`Enter`){t.preventDefault(),t.stopPropagation();let n=t.currentTarget.value;N(e(h).id,n),F(e(h).id)}else t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),F(e(h).id))}})}},x=t=>{var n=fa(),r=I(n,!0);B(()=>{V(n,`title`,e(h).defaultLabel===e(h).label?void 0:e(h).defaultLabel),l(r,e(h).label)}),C(t,n)};t(y,t=>{e(j)===e(h).id?t(b):t(x,-1)});var S=P(y,2);o(S,()=>c.meta??m,()=>e(h));var w=P(S,2),T=t=>{var n=pa(),r=I(n,!0);B(()=>l(r,e(h).item.description)),C(t,n)};t(w,t=>{u()===`cards`&&e(h).item.description&&t(T)}),s(p);var E=P(p,2);{let t=n(()=>d(Z[`ui.shell_layout_editor.rename_item`],{label:e(h).label}));Ce(E,{icon:`edit`,get"data-item-rename"(){return e(h).id},get label(){return e(t)},onclick:()=>te(e(h).id)})}var D=P(E,2),O=t=>{{let r=n(()=>d(Z[`ui.shell_layout_editor.reset_item`],{label:e(h).label,original:e(h).defaultLabel}));Ce(t,{icon:`undo`,get label(){return e(r)},onclick:()=>f.renameItem(e(h).id,null)})}};t(D,t=>{e(h).defaultLabel!==e(h).label&&t(O)});var k=P(D,2);{let t=n(()=>e(h).hidden?`eyeOff`:`eye`),r=n(()=>!e(h).hidden),i=n(()=>d(Z[`ui.shell_layout_editor.show_entry`],{label:e(h).label}));Ce(k,{get icon(){return e(t)},get pressed(){return e(r)},get label(){return e(i)},onclick:()=>ne(e(h).id,e(h).hidden)})}B(()=>g=i(p,1,`smrt-section-menu__row svelte-nwjioo`,null,g,{"smrt-section-menu__row--muted":e(h).hidden})),C(r,a)};t(_,t=>{e(h)&&t(v)}),C(r,g)},$$slots:{item:!0}})},se=e=>{var t=ha(),n=I(t,!0);B(e=>l(n,e),[()=>d(Z[`ui.section_menu.empty`])]),C(e,t)},W=r=>{var i=ba();p(i,29,()=>e(b),e=>e.id,(r,i)=>{var a=ya(),u=M(a),d=M(u),f=M(d),p=M(f);{let t=n(()=>e(i).icon??`folder`);Te(p,{get name(){return e(t)},size:28,get iconComponent(){return c.iconComponent}})}s(f);var m=P(f,2),g=I(m,!0);s(d);var _=P(d,2),v=t=>{var n=pa(),r=I(n,!0);B(()=>l(r,e(i).item.description)),C(t,n)};t(_,t=>{e(i).item.description&&t(v)}),s(u);var y=P(u,2),b=n=>{var r=va(),a=M(r),l=t=>{var n=ga(),r=M(n);o(r,()=>c.meta,()=>e(i)),s(n),C(t,n)};t(a,e=>{c.meta&&e(l)});var u=P(a,2),d=t=>{var n=_a(),r=M(n);o(r,()=>c.actions,()=>e(i)),s(n),C(t,n)};t(u,e=>{c.actions&&e(d)}),s(r),C(n,r)};t(y,e=>{(c.meta||c.actions)&&e(b)}),s(a),B(()=>{V(u,`href`,e(i).href),l(g,e(i).label)}),E(`click`,u,function(...e){c.onNavigate?.apply(this,e)}),h(a,()=>q,null),C(r,a)}),s(i),B(()=>V(i,`aria-label`,e(x))),C(r,i)},ce=n=>{var r=Sa();p(r,29,()=>e(b),e=>e.id,(n,r)=>{var i=xa(),a=M(i),u=M(a),d=t=>{Te(t,{get name(){return e(r).icon},get iconComponent(){return c.iconComponent}})};t(u,t=>{e(r).icon&&t(d)});var f=P(u,2),p=I(f,!0);s(a);var m=P(a,2),g=t=>{var n=ga(),i=M(n);o(i,()=>c.meta,()=>e(r)),s(n),C(t,n)};t(m,e=>{c.meta&&e(g)});var _=P(m,2),v=t=>{var n=_a(),i=M(n);o(i,()=>c.actions,()=>e(r)),s(n),C(t,n)};t(_,e=>{c.actions&&e(v)});var y=P(_,2),b=I(y);s(i),B(()=>{V(a,`href`,e(r).href),l(p,e(r).label),V(b,`d`,ve.chevronRight)}),E(`click`,a,function(...e){c.onNavigate?.apply(this,e)}),h(i,()=>q,null),C(n,i)}),s(r),B(()=>V(r,`aria-label`,e(x))),C(n,r)};t(oe,t=>{e(v)?t(U):e(b).length===0?t(se,1):u()===`cards`?t(W,2):t(ce,-1)}),s(re),ee(re,e=>H(O,e),()=>e(O)),B(()=>{ie=i(re,1,`smrt-section-menu svelte-nwjioo`,null,ie,{"smrt-section-menu--cards":u()===`cards`}),V(re,`data-editing`,e(v)?``:void 0)}),C(a,re),r()}D([`click`]);var Ta=c(`<span class="smrt-workspace-account-menu__context svelte-1703h4r"> </span>`),Ea=c(`<span class="smrt-workspace-account-menu__email svelte-1703h4r"> </span>`),Da=c(`<div class="smrt-workspace-account-menu__header svelte-1703h4r"><span class="smrt-workspace-account-menu__name svelte-1703h4r"> </span> <!></div>`),Oa=c(`<a role="menuitem" class="smrt-workspace-account-menu__item svelte-1703h4r" tabindex="-1"> </a>`),ka=c(`<button type="button" role="menuitem" class="smrt-workspace-account-menu__item svelte-1703h4r" tabindex="-1"> </button>`),Aa=c(`<p class="smrt-workspace-account-menu__error svelte-1703h4r" role="alert" data-smrt-part="error"> </p>`),ja=c(`<div data-smrt-part="panel"><!> <div role="menu" tabindex="-1" class="smrt-workspace-account-menu__menu svelte-1703h4r"><!> <!></div></div>`),Ma=c(`<div class="smrt-workspace-account-menu svelte-1703h4r" data-smrt-component="WorkspaceAccountMenu"><button type="button" class="smrt-workspace-account-menu__trigger svelte-1703h4r" data-smrt-part="trigger" aria-haspopup="menu"><span class="smrt-workspace-account-menu__open svelte-1703h4r"> </span> <!> <span class="smrt-workspace-account-menu__identity svelte-1703h4r"><span class="smrt-workspace-account-menu__summary svelte-1703h4r"> </span> <!></span> <span class="smrt-workspace-account-menu__indicator svelte-1703h4r" aria-hidden="true">•••</span></button> <!></div>`);function Na(a,o){let c=re();_(o,!0);let u=`workspace-account:sign-out`,d=`workspace-account:tenant:`,f=k(o,`compact`,3,!1),m=k(o,`userLabel`,3,``),h=k(o,`email`,3,``),g=k(o,`tenantLabel`,3,``),v=k(o,`roleLabel`,3,``),b=k(o,`tenants`,19,()=>[]),x=k(o,`currentTenantId`,3,null),S=k(o,`placement`,3,`top-start`),w=k(o,`disabled`,3,!1),{t:D}=de(),O=`smrt-account-menu-${c}`,te=n(()=>m()||o.userName),F=n(()=>g()||b().find(e=>e.id===x())?.label||``),ne=n(()=>[e(F),v()].filter(Boolean).join(` · `)),L=n(()=>[e(te),e(F),v()].filter(Boolean).join(` · `)),R=n(()=>!!h()&&h()!==e(te)),ie=n(()=>{let e=[];if(b().length>1&&o.onTenantSelect)for(let t of b()){let n=t.id===x(),r=t.roleLabel?` — ${t.roleLabel}`:``;e.push({id:`${d}${t.id}`,label:n?`${D(Z[`ui.workspace_account_menu.current_tenant`],{tenant:t.label})}${r}`:`${t.label}${r}`,disabled:t.disabled||n})}return o.settingsHref&&e.push({id:`workspace-account:settings`,label:D(Z[`ui.app_shell.account_settings`]),href:o.settingsHref}),(o.onSignOut||o.signOutHref)&&e.push({id:u,label:D(Z[`ui.workspace_account_menu.sign_out`]),href:o.onSignOut?void 0:o.signOutHref}),e}),oe=A(!1),U=A(!1),se=A(!1),W=A(null),ce=A(null),le=N([]),ue=n(()=>e(ie).map((e,t)=>e.disabled?-1:t).filter(e=>e>=0));async function pe(t=!1){H(oe,!0),await ae();let n=t?e(ue)[e(ue).length-1]:e(ue)[0];n!=null&&le[n]?.focus()}function G(t=!0){H(oe,!1),t&&e(ce)?.focus()}async function me(){if(!e(U)&&o.onSignOut){H(U,!0),H(se,!1);try{let e=o.onSignOut();typeof e==`object`&&e&&typeof e.then==`function`&&await e}catch{H(se,!0),H(U,!1);return}H(U,!1),G()}}function he(e){e.disabled||(e.id===u&&o.onSignOut?me():(e.id.startsWith(d)&&o.onTenantSelect?.(e.id.slice(25)),G(!e.href)))}function ge(t){if(e(ue).length===0)return;let n=le.indexOf(document.activeElement),r=e(ue).indexOf(n);le[e(ue)[(r+t+e(ue).length)%e(ue).length]]?.focus()}function K(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),pe(e.key===`ArrowUp`))}function q(t){switch(t.key){case`ArrowDown`:t.preventDefault(),ge(1);break;case`ArrowUp`:t.preventDefault(),ge(-1);break;case`Home`:t.preventDefault(),le[e(ue)[0]]?.focus();break;case`End`:t.preventDefault(),le[e(ue)[e(ue).length-1]]?.focus();break;case`Escape`:t.preventDefault(),t.stopPropagation(),G();break;case`Tab`:G(!1)}}j(()=>{if(!e(oe))return;let t=t=>{e(W)&&!e(W).contains(t.target)&&G(!1)};return document.addEventListener(`click`,t,!0),()=>document.removeEventListener(`click`,t,!0)});var _e=Ma(),ve=M(_e),ye=M(ve),be=I(ye,!0),xe=P(ye,2);fe(xe,{get src(){return o.avatarUrl},get name(){return o.userName},size:`sm`,"aria-hidden":`true`});var Se=P(xe,2),Ce=M(Se),we=I(Ce,!0),Te=P(Ce,2),Ee=t=>{var n=Ta(),r=I(n,!0);B(()=>l(r,e(ne))),C(t,n)};t(Te,t=>{e(ne)&&t(Ee)}),s(Se),y(2),s(ve),ee(ve,e=>H(ce,e),()=>e(ce));var De=P(ve,2),Oe=n=>{var r=ja(),a=M(r),o=n=>{var r=Da(),i=M(r),a=I(i,!0),o=P(i,2),c=e=>{var t=Ea(),n=I(t,!0);B(()=>l(n,h())),C(e,t)};t(o,t=>{e(R)&&t(c)}),s(r),B(()=>l(a,e(te))),C(n,r)};t(a,t=>{(e(te)||e(R))&&t(o)});var c=P(a,2),d=M(c);p(d,19,()=>e(ie),e=>e.id,(n,r,i)=>{var a=T(),o=z(a),s=t=>{var n=Oa(),a=I(n,!0);ee(n,(e,t)=>le[t]=e,e=>le?.[e],()=>[e(i)]),B(()=>{V(n,`href`,e(r).href),l(a,e(r).label)}),E(`click`,n,()=>he(e(r))),C(t,n)},c=t=>{var n=ka(),a=I(n,!0);ee(n,(e,t)=>le[t]=e,e=>le?.[e],()=>[e(i)]),B(()=>{n.disabled=e(r).disabled||e(r).id===u&&e(U),V(n,`aria-busy`,e(r).id===u&&e(U)?`true`:void 0),l(a,e(r).label)}),E(`click`,n,()=>he(e(r))),C(t,n)};t(o,t=>{e(r).href?t(s):t(c,-1)}),C(n,a)});var f=P(d,2),m=e=>{var t=Aa(),n=I(t,!0);B(e=>l(n,e),[()=>D(Z[`ui.shell_settings.sign_out_failed`])]),C(e,t)};t(f,t=>{e(se)&&t(m)}),s(c),s(r),B(e=>{i(r,1,`smrt-workspace-account-menu__popover smrt-workspace-account-menu__popover--${S()??``}`,`svelte-1703h4r`),V(c,`id`,O),V(c,`aria-label`,e)},[()=>D(Z[`ui.app_shell.account_item`])]),E(`keydown`,c,q),C(n,r)};t(De,t=>{e(oe)&&t(Oe)}),s(_e),ee(_e,e=>H(W,e),()=>e(W)),B((t,n)=>{V(_e,`data-density`,o.density),V(_e,`data-compact`,f()?``:void 0),V(_e,`title`,e(L)),V(ve,`aria-label`,t),V(ve,`aria-expanded`,e(oe)),V(ve,`aria-controls`,e(oe)?O:void 0),ve.disabled=w()||e(ie).length===0,l(be,n),l(we,e(te))},[()=>f()?`${D(Z[`ui.workspace_account_menu.open`])} ${e(L)}`:void 0,()=>D(Z[`ui.workspace_account_menu.open`])]),E(`click`,ve,()=>e(oe)?G(!1):pe()),E(`keydown`,ve,K),C(a,_e),r()}D([`click`,`keydown`]);function Pa(){let e=Fa();return{stt:La(e),tts:Ra(e),llm:za(e),browser:e}}function Fa(){return typeof window>`u`?{sharedArrayBuffer:!1,webWorkers:!1,indexedDB:!1,wasmSupport:!1,wasmSimd:!1}:{sharedArrayBuffer:typeof SharedArrayBuffer<`u`,webWorkers:typeof Worker<`u`,indexedDB:typeof indexedDB<`u`,wasmSupport:typeof WebAssembly<`u`,wasmSimd:Ia()}}function Ia(){if(typeof WebAssembly>`u`)return!1;try{let e=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11]);return WebAssembly.validate(e)}catch{return!1}}function La(e){return{browserSpeechAPI:typeof window<`u`&&(`SpeechRecognition`in window||`webkitSpeechRecognition`in window),whisperWasm:e.wasmSupport}}function Ra(e){return{browserSynthesisAPI:typeof window<`u`&&`speechSynthesis`in window,transformersTTS:e.wasmSupport}}function za(e){let t=typeof window<`u`&&`gpu`in navigator;return{webllm:t||e.wasmSupport,transformersLLM:e.wasmSupport,webgpu:t}}function Ba(e){return e.stt.browserSpeechAPI||e.stt.whisperWasm}function Va(e){return e.tts.browserSynthesisAPI||e.tts.transformersTTS}function Ha(e){return e.llm.webllm||e.llm.transformersLLM}function Ua(e){return Ba(e)||Va(e)||Ha(e)}function Wa(){return{mode:`default`,modeSource:`auto`,session:{user:null,isAuthenticated:!1,permissions:[],preferences:{}},capabilities:null,ai:{stt:{adapter:null,initState:`uninitialized`,downloadProgress:null,isListening:!1,lastResult:``,interimResult:``,error:null},tts:{adapter:null,initState:`uninitialized`,downloadProgress:null,isSpeaking:!1,isPaused:!1,error:null},llm:{adapter:null,initState:`uninitialized`,downloadProgress:null,currentModel:null,isGenerating:!1,error:null}},aiLoading:{phase:`idle`,currentAdapter:null,overallProgress:0,message:``,loaded:[],failed:[],error:null},socket:{status:`disconnected`,reconnectAttempts:0,lastError:null},error:null,initialized:!1}}var Ga=new Map,Ka=new Map,qa=new Map;function Ja(e){return Ga.get(e)}function Ya(e,t,n=`ready`,r=null){Ga.set(e,{adapter:t,cachedAt:Date.now(),initState:n,downloadProgress:null,error:r,type:e})}function Xa(e,t){let n=Ga.get(e);n&&Object.assign(n,t)}function Za(e){return Ka.get(e)}function Qa(e,t,n=`ready`,r=null){Ka.set(e,{adapter:t,cachedAt:Date.now(),initState:n,downloadProgress:null,error:r,type:e})}function $a(e,t){let n=Ka.get(e);n&&Object.assign(n,t)}function eo(e,t){let n=t?`${e}:${t}`:e;return qa.get(n)}function to(e,t,n,r=`ready`,i=null){let a=n?`${e}:${n}`:e;qa.set(a,{adapter:t,cachedAt:Date.now(),initState:r,downloadProgress:null,error:i,type:e})}function no(e,t,n){let r=t?`${e}:${t}`:e,i=qa.get(r);i&&Object.assign(i,n)}var ro=new WeakMap,io=new WeakMap;function ao(e,t){if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}var oo=class{#e=A(N(Wa()));get _state(){return e(this.#e)}set _state(e){H(this.#e,e,!0)}options;_aiConfig=null;_preloadScheduled=!1;_idleCallbackId=null;_preloadInFlight=!1;_socket=null;_socketConfig=null;_reconnectTimeout=null;_sttSubscriptions=new Map;_ttsSubscriptions=new Map;constructor(e={}){this.options=e,this._aiConfig=e.ai??null}get socketConfig(){return this._socketConfig}get state(){return this._state}get aiConfig(){return this._aiConfig}get aiLoading(){return this._state.aiLoading}async initialize(){if(this._state.initialized)return;if(typeof window>`u`){this._state.initialized=!0;return}let e=Pa();this._state.capabilities=e,this.options.onCapabilitiesDetected?.(e),this.options.session&&(this._state.session={...this._state.session,...this.options.session}),this.options.initialMode?(this._state.mode=this.options.initialMode,this._state.modeSource=`explicit`):(this._state.session.preferences.autoEnableSmrt??!1)&&Ua(e)&&(this._state.mode=`smrt`,this._state.modeSource=`auto`),this._state.initialized=!0,this.schedulePreload()}setAIConfig(e){this._aiConfig&&ao(this._aiConfig,e)?this._aiConfig=e:(this._aiConfig=e,this._idleCallbackId!==null&&typeof cancelIdleCallback<`u`&&(cancelIdleCallback(this._idleCallbackId),this._idleCallbackId=null),this._preloadScheduled=!1,this.schedulePreload())}schedulePreload(){if(!this._aiConfig||this._preloadScheduled)return;let e=this._aiConfig.preload??`idle`;e!==`none`&&(e===`eager`?(this._preloadScheduled=!0,this.executePreload()):e===`idle`&&(this._preloadScheduled=!0,typeof requestIdleCallback<`u`?this._idleCallbackId=requestIdleCallback(()=>this.executePreload(),{timeout:5e3}):setTimeout(()=>this.executePreload(),100)))}triggerPreload(){this._aiConfig&&!this._preloadScheduled&&this._aiConfig.preload===`on-visible`&&(this._preloadScheduled=!0,this.executePreload())}async executePreload(){if(this._aiConfig&&!this._preloadInFlight){this._preloadInFlight=!0;try{await this.runPreload()}finally{this._preloadInFlight=!1}}}async runPreload(){if(!this._aiConfig)return;let e=[];if(this._aiConfig.stt?.enabled!==!1&&this._aiConfig.stt?.type&&e.push(`stt:${this._aiConfig.stt.type}`),this._aiConfig.tts?.enabled!==!1&&this._aiConfig.tts?.type&&e.push(`tts:${this._aiConfig.tts.type}`),this._aiConfig.llm?.enabled!==!1&&this._aiConfig.llm?.type){let t=this._aiConfig.llm.model?`${this._aiConfig.llm.type}:${this._aiConfig.llm.model}`:this._aiConfig.llm.type;e.push(`llm:${t}`)}if(e.length===0){this.updateLoadingState({phase:`idle`,loaded:[],failed:[]});return}this.updateLoadingState({phase:`checking`,message:`Checking AI capabilities...`,loaded:[],failed:[]});for(let t of e){let[e,n]=t.split(`:`);this.updateLoadingState({phase:`downloading`,currentAdapter:n,message:`Loading ${n}...`});try{if(e===`stt`){let e=this._aiConfig.stt;await this.initializeSTT({type:n,allowLocalModels:e?.allowLocalModels})}else if(e===`tts`)await this.initializeTTS({type:n});else if(e===`llm`){let e=this._aiConfig.llm;e&&await this.initializeLLM(e.model,{type:e.type})}this.updateLoadingState({loaded:[...this._state.aiLoading.loaded,n]})}catch(e){console.error(`Failed to preload ${n}:`,e),this.updateLoadingState({failed:[...this._state.aiLoading.failed,n]})}}let t=this._state.aiLoading.failed.length>0;this._state.aiLoading.loaded.length===e.length?this.updateLoadingState({phase:`ready`,currentAdapter:null,overallProgress:100,message:`AI ready`}):t&&this._state.aiLoading.loaded.length===0?this.updateLoadingState({phase:`error`,currentAdapter:null,message:`Failed to load AI models`,error:Error(`All AI adapters failed to load`)}):this.updateLoadingState({phase:`ready`,currentAdapter:null,message:`Loaded with ${this._state.aiLoading.failed.length} failure(s)`}),this.options.onAILoadingChange?.(this._state.aiLoading)}updateLoadingState(e){this._state.aiLoading={...this._state.aiLoading,...e}}setMode(e,t=`toggled`){this._state.mode!==e&&(this._state.mode=e,this._state.modeSource=t,this.options.onModeChange?.(e,t),e===`smrt`&&this.initializeSTT({type:`whisper-cpp`,allowLocalModels:this._aiConfig?.stt?.allowLocalModels}).catch(()=>{}))}toggleMode(){let e=this._state.mode==="default"?`smrt`:`default`;this.setMode(e,`toggled`)}updateSession(e){this._state.session={...this._state.session,...e}}setPermissions(e){this._state.session.permissions=e}hasPermission(e){return this._state.session.permissions.includes(e)}hasAllPermissions(e){return e.every(e=>this._state.session.permissions.includes(e))}hasAnyPermission(e){return e.some(e=>this._state.session.permissions.includes(e))}setUser(e,t=[]){this._state.session.user=e,this._state.session.isAuthenticated=e!==null,this._state.session.permissions=t}connectSocket(e){this.disconnectSocket(),this._socketConfig=e,this._state.socket.status=`connecting`,this._state.socket.lastError=null;try{this._socket=new WebSocket(e.url),this._socket.onopen=()=>{this._state.socket.status=`connected`,this._state.socket.reconnectAttempts=0,e.onOpen?.()},this._socket.onmessage=t=>{try{let n=JSON.parse(t.data);e.onMessage?.(n)}catch{e.onMessage?.(t.data)}},this._socket.onclose=t=>{this._state.socket.status=`disconnected`,e.onClose?.(t),!t.wasClean&&e.reconnect?.enabled!==!1&&this.scheduleReconnect()},this._socket.onerror=t=>{this._state.socket.lastError=t,e.onError?.(t)}}catch(e){this._state.socket.status=`disconnected`,this._state.socket.lastError=e}}disconnectSocket(){this._reconnectTimeout&&=(clearTimeout(this._reconnectTimeout),null),this._socket&&=(this._socket.close(),null),this._state.socket.status=`disconnected`}sendMessage(e){this._socket?.readyState===WebSocket.OPEN?this._socket.send(JSON.stringify(e)):console.warn(`[Socket] Cannot send message - socket not connected`)}scheduleReconnect(){if(!this._socketConfig)return;let{reconnect:e}=this._socketConfig,t=e?.maxAttempts??5,n=e?.baseDelay??1e3;if(this._state.socket.reconnectAttempts>=t){console.warn(`[Socket] Max reconnection attempts reached`);return}this._state.socket.status=`reconnecting`,this._state.socket.reconnectAttempts++;let r=Math.min(n*2**(this._state.socket.reconnectAttempts-1),3e4);console.log(`[Socket] Reconnecting in ${r}ms (attempt ${this._state.socket.reconnectAttempts}/${t})`),this._reconnectTimeout=setTimeout(()=>{this._socketConfig&&this.connectSocket(this._socketConfig)},r)}async initializeSTT(e){let t=e?.type??`browser-speech`,n=Ja(t);if(n&&n.initState===`ready`)return this._state.ai.stt.adapter=n.adapter,this._state.ai.stt.initState=`ready`,this._state.ai.stt.error=null,this.subscribeToSTTEvents(n.adapter),n.adapter;let r=this._state.ai.stt.adapter;if(r&&this._state.ai.stt.initState===`ready`){if(r.type===t)return r;console.log(`[STT] Switching adapter from ${r.type} to ${t}`),await r.dispose?.()}this._state.ai.stt.initState=`initializing`,this._state.ai.stt.error=null,Xa(t,{initState:`initializing`});let i=e=>{this._state.ai.stt.downloadProgress=e,Xa(t,{downloadProgress:e}),e.percent>0&&this.updateLoadingState({overallProgress:e.percent})};try{let{getSTT:n}=await U(async()=>{let{getSTT:e}=await import(`./DrjdLb0M.js`).then(e=>e.t);return{getSTT:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]),import.meta.url),r=await n(e);return await r.ensureInitialized(i),Ya(t,r,`ready`),this._state.ai.stt.adapter=r,this._state.ai.stt.initState=`ready`,this._state.ai.stt.downloadProgress=null,this.subscribeToSTTEvents(r),r}catch(e){let n=e instanceof Error?e:Error(String(e));throw this._state.ai.stt.initState=`error`,this._state.ai.stt.error=n,Xa(t,{initState:`error`,error:n}),e}}subscribeToSTTEvents(e){if(this._sttSubscriptions.has(e))return;ro.get(e)?.();let t=[e.onResult(e=>{if(e.isFinal){let t=this._state.ai.stt.lastResult;t?this._state.ai.stt.lastResult=`${t} ${e.text}`:this._state.ai.stt.lastResult=e.text,this._state.ai.stt.interimResult=``}else this._state.ai.stt.interimResult=e.text}),e.onStart(()=>{this._state.ai.stt.isListening=!0}),e.onEnd(()=>{this._state.ai.stt.isListening=!1}),e.onError(e=>{this._state.ai.stt.error=e})],n=()=>{for(let e of t)e();this._sttSubscriptions.delete(e),ro.get(e)===n&&ro.delete(e)};this._sttSubscriptions.set(e,n),ro.set(e,n)}async startListening(e){let t=await this.initializeSTT();this._state.ai.stt.lastResult=``,this._state.ai.stt.interimResult=``,await t.start(e)}async stopListening(){await this._state.ai.stt.adapter?.stop(),this._state.ai.stt.interimResult=``}async initializeTTS(e){let t=e?.type??`browser-synthesis`,n=Za(t);if(n&&n.initState===`ready`)return this._state.ai.tts.adapter=n.adapter,this._state.ai.tts.initState=`ready`,this._state.ai.tts.error=null,this.subscribeToTTSEvents(n.adapter),n.adapter;if(this._state.ai.tts.adapter&&this._state.ai.tts.initState===`ready`)return this._state.ai.tts.adapter;this._state.ai.tts.initState=`initializing`,this._state.ai.tts.error=null,$a(t,{initState:`initializing`});let r=e=>{this._state.ai.tts.downloadProgress=e,$a(t,{downloadProgress:e})};try{let{getTTS:n}=await U(async()=>{let{getTTS:e}=await import(`./DrjdLb0M.js`).then(e=>e.t);return{getTTS:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]),import.meta.url),i=await n(e);return await i.ensureInitialized(r),Qa(t,i,`ready`),this._state.ai.tts.adapter=i,this._state.ai.tts.initState=`ready`,this._state.ai.tts.downloadProgress=null,this.subscribeToTTSEvents(i),i}catch(e){let n=e instanceof Error?e:Error(String(e));throw this._state.ai.tts.initState=`error`,this._state.ai.tts.error=n,$a(t,{initState:`error`,error:n}),e}}subscribeToTTSEvents(e){if(this._ttsSubscriptions.has(e))return;io.get(e)?.();let t=[e.onStart(()=>{this._state.ai.tts.isSpeaking=!0,this._state.ai.tts.isPaused=!1}),e.onEnd(()=>{this._state.ai.tts.isSpeaking=!1,this._state.ai.tts.isPaused=!1}),e.onError(e=>{this._state.ai.tts.error=e,this._state.ai.tts.isSpeaking=!1})],n=()=>{for(let e of t)e();this._ttsSubscriptions.delete(e),io.get(e)===n&&io.delete(e)};this._ttsSubscriptions.set(e,n),io.set(e,n)}async speak(e,t){await(await this.initializeTTS()).speak(e,t)}stopSpeaking(){this._state.ai.tts.adapter?.stop()}pauseSpeaking(){this._state.ai.tts.adapter?.pause(),this._state.ai.tts.isSpeaking&&(this._state.ai.tts.isPaused=!0)}resumeSpeaking(){this._state.ai.tts.adapter?.resume(),this._state.ai.tts.isPaused&&(this._state.ai.tts.isPaused=!1)}getTTSVoices(){return this._state.ai.tts.adapter?.getVoices()??[]}async initializeLLM(e,t){let n=t?.type??`webllm`,r=eo(n,e);if(r&&r.initState===`ready`)return this._state.ai.llm.adapter=r.adapter,this._state.ai.llm.initState=`ready`,this._state.ai.llm.currentModel=r.adapter.currentModel,this._state.ai.llm.error=null,r.adapter;if(this._state.ai.llm.adapter&&this._state.ai.llm.initState===`ready`&&(!e||this._state.ai.llm.currentModel===e))return this._state.ai.llm.adapter;this._state.ai.llm.initState=`initializing`,this._state.ai.llm.error=null,no(n,e,{initState:`initializing`});let i=t=>{this._state.ai.llm.downloadProgress=t,no(n,e,{downloadProgress:t}),t.percent>0&&this.updateLoadingState({overallProgress:t.percent})};try{let{getLLM:r}=await U(async()=>{let{getLLM:e}=await import(`./DrjdLb0M.js`).then(e=>e.t);return{getLLM:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]),import.meta.url),a=await r(t);return await a.ensureInitialized(e,i),to(n,a,e,`ready`),this._state.ai.llm.adapter=a,this._state.ai.llm.initState=`ready`,this._state.ai.llm.currentModel=a.currentModel,this._state.ai.llm.downloadProgress=null,a}catch(t){let r=t instanceof Error?t:Error(String(t));throw this._state.ai.llm.initState=`error`,this._state.ai.llm.error=r,no(n,e,{initState:`error`,error:r}),t}}async chat(e,t){let n=await this.initializeLLM();this._state.ai.llm.isGenerating=!0;try{return await n.message(e,{systemPrompt:t?.systemPrompt,onToken:t?.onToken})}finally{this._state.ai.llm.isGenerating=!1}}async unloadLLM(){let e=this._state.ai.llm.adapter,t=e?.currentModel??void 0;await e?.unloadModel(),e&&no(e.type,t,{initState:`uninitialized`,downloadProgress:null,error:null}),this._state.ai.llm.adapter=null,this._state.ai.llm.initState=`uninitialized`,this._state.ai.llm.currentModel=null}unsubscribeAllAdapterEvents(){for(let e of[...this._sttSubscriptions.values()])e();for(let e of[...this._ttsSubscriptions.values()])e();this._sttSubscriptions.clear(),this._ttsSubscriptions.clear()}async dispose(){this._idleCallbackId!==null&&typeof cancelIdleCallback<`u`&&(cancelIdleCallback(this._idleCallbackId),this._idleCallbackId=null),this._preloadInFlight=!1,this.disconnectSocket(),this.unsubscribeAllAdapterEvents();let e=this._state.ai.stt.adapter;e&&!Ja(e.type)&&await e.dispose?.();let t=this._state.ai.tts.adapter;t&&!Za(t.type)&&await t.dispose?.();let n=this._state.ai.llm.adapter;n&&!eo(n.type,n.currentModel??void 0)&&await n.dispose?.(),this._state=Wa()}get isAIReady(){return this._state.aiLoading.phase===`ready`||this._state.aiLoading.phase===`idle`}get isAILoading(){return this._state.aiLoading.phase===`checking`||this._state.aiLoading.phase===`downloading`||this._state.aiLoading.phase===`initializing`}};function so(e){return new oo(e)}var co=new Set([`focus`,`reveal`,`highlight`,`explain`,`validate`,`stage`,`apply`,`clear`,`undo`]),lo=`smrt_ui_`,uo=/^[A-Za-z][A-Za-z0-9_-]{0,63}$/,fo=new Set([`invalid_request`,`invalid_identifier`,`limit_exceeded`,`not_found`]),po=new Set([`not_found`,`consent_required`,`human_confirmation_required`,`sensitive_control`,`control_not_writable`,`control_not_editable`,`nothing_to_undo`,`denied`]),mo=new WeakMap,ho=class extends Error{reason;details;constructor(e,t){super(e),this.reason=e,this.details=t}};function go(e,t){return new ho(e,t)}function _o(e){return JSON.stringify({ok:!0,result:e})}function vo(e,t){return JSON.stringify({ok:!1,reason:e,...t?{details:t}:{}})}function yo(e){return new TextEncoder().encode(JSON.stringify(e)).byteLength}function bo(e){if(yo(e)>1e5)throw go(`limit_exceeded`)}function xo(e,t,n=256){if(typeof e!=`string`||e.length===0||e.length>n||Array.from(e).some(e=>{let t=e.charCodeAt(0);return t<32||t===127}))throw go(`invalid_identifier`,t);return e}function So(e,t){return e===void 0?void 0:xo(e,t)}function Co(e){if(!e||typeof e!=`object`||Array.isArray(e))throw go(`invalid_request`);return e}function wo(e){let t=Co(e),n=t.subject,r=n===void 0?void 0:(()=>{let e=Co(n);return{type:xo(e.type,`subject.type`),id:xo(e.id,`subject.id`),...e.label===void 0?{}:{label:xo(e.label,`subject.label`)}}})();return{formId:xo(t.formId,`formId`),controlId:xo(t.controlId,`controlId`),...r?{subject:r}:{}}}function To(e){let t=Co(e),n=t.kind;if(![`table`,`list`,`report`,`custom`].includes(String(n)))throw go(`invalid_request`,`identity.kind`);let r=t.subject,i=r===void 0?void 0:(()=>{let e=Co(r);return{type:xo(e.type,`subject.type`),id:xo(e.id,`subject.id`),...e.label===void 0?{}:{label:xo(e.label,`subject.label`)}}})();return{surfaceId:xo(t.surfaceId,`surfaceId`),kind:n,...i?{subject:i}:{}}}function Eo(e){let t=e.metadata.sensitivity===`sensitive`||e.metadata.sensitivity===`secret`,n=t||e.state.valueRedacted,r=t||e.state.stagedValueRedacted||e.state.staged?.valueRedacted===!0,i=e.state.staged?{...e.state.staged,...r?{value:void 0,valueRedacted:!0}:{},validationMessage:void 0}:void 0;return{...e,identity:{...e.identity},metadata:{...e.metadata,constraints:e.metadata.constraints?{...e.metadata.constraints}:void 0,options:e.metadata.options?.map(e=>({...e}))},state:{...e.state,...n?{value:void 0,valueRedacted:!0}:{},...r?{stagedValue:void 0,stagedValueRedacted:!0}:{},...i?{staged:i}:{},validationMessage:void 0}}}function Do(e){let t=e.reason?po.has(e.reason)?e.reason:`execution_failed`:void 0;return{ok:e.ok,action:e.action,identity:{...e.identity},...t?{reason:t}:{},...e.snapshot?{snapshot:Eo(e.snapshot)}:{}}}function Oo(e,t,n,r){if(Array.isArray(e))return e.filter(e=>r!==`columnOrder`||typeof e!=`string`||!t.has(e)).map(e=>Oo(e,t,n,r)).filter(e=>e!==void 0);if(!e||typeof e!=`object`)return e;let i=e;if(!(typeof i.columnId==`string`&&t.has(i.columnId)))return Object.fromEntries(Object.entries(i).flatMap(([e,r])=>{if(t.has(e)||n&&(e===`selection`||e===`selectedRowIds`||e===`expandedRowIds`))return[];let i=Oo(r,t,n,e);return i===void 0?[]:[[e,i]]}))}function ko(e){let t=e.columns.filter(e=>e.visibility!==`hidden`),n=new Set(t.map(e=>e.id)),{rowKey:r,...i}=e;return{...i,identity:{...e.identity},...n.has(r)?{rowKey:r}:{},columns:t,query:{...e.query,projectableColumnIds:e.query.projectableColumnIds.filter(e=>n.has(e)),searchableColumnIds:e.query.searchableColumnIds?.filter(e=>n.has(e)),filterableColumnIds:e.query.filterableColumnIds?.filter(e=>n.has(e)),sortableColumnIds:e.query.sortableColumnIds?.filter(e=>n.has(e))},actions:e.actions.filter(e=>(e.columnIds??[]).every(e=>n.has(e)))}}function Ao(e){let t=new Set(e.descriptor.columns.filter(e=>e.visibility===`hidden`).map(e=>e.id)),n=t.has(e.descriptor.rowKey),r=Oo(e.state,t,n);return{...e,descriptor:ko(e.descriptor),state:r,selection:n?null:e.selection}}function jo(e){return Promise.resolve().then(e).then(_o).catch(e=>e instanceof ho&&fo.has(e.reason)?vo(e.reason,e.details):vo(`execution_failed`))}function Mo(e,t,n,r){return{name:e,description:t,inputSchema:n,annotations:{readOnlyHint:!0,untrustedContentHint:!0},execute:r}}function No(e,t,n){let r={type:`object`,required:[`formId`,`controlId`],additionalProperties:!1,properties:{formId:{type:`string`,minLength:1,maxLength:256},controlId:{type:`string`,minLength:1,maxLength:256},subject:{type:`object`}}},i={type:`object`,required:[`surfaceId`,`kind`],additionalProperties:!1,properties:{surfaceId:{type:`string`,minLength:1,maxLength:256},kind:{type:`string`,enum:[`table`,`list`,`report`,`custom`]},subject:{type:`object`}}};return[Mo(`${e}list_form_controls`,`List the controls currently mounted in SMRT forms.`,{type:`object`,additionalProperties:!1,properties:{formId:{type:`string`,minLength:1,maxLength:256}}},e=>jo(()=>{bo(e);let n=So(Co(e).formId,`formId`);return t.list(n).map(Eo)})),Mo(`${e}inspect_form_control`,`Inspect one currently mounted SMRT form control.`,{type:`object`,required:[`identity`],additionalProperties:!1,properties:{identity:r}},e=>jo(()=>{bo(e);let n=Co(e),r=t.get(wo(n.identity));if(!r)throw go(`not_found`);return Eo(r)})),{name:`${e}execute_form_control`,description:"Execute an allowed command on a mounted SMRT form control. Agent mutations are consent-gated. An agent never moves keyboard focus: `focus` scrolls the control into view and highlights it.",inputSchema:{type:`object`,required:[`action`,`identity`],additionalProperties:!1,properties:{action:{type:`string`,enum:[...co]},identity:r,value:{},durationMs:{type:`number`,minimum:0,maximum:6e4}}},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:e=>jo(async()=>{bo(e);let n=Co(e);if(`confirmed`in n)throw go(`invalid_request`,`confirmed`);if(!co.has(n.action))throw go(`invalid_request`,`action`);let r=n.action,i=wo(n.identity),a;if(r===`stage`){if(!(`value`in n))throw go(`invalid_request`,`value`);a={action:r,identity:i,value:n.value}}else if(r===`apply`)a=`value`in n?{action:r,identity:i,value:n.value}:{action:r,identity:i};else if(r===`highlight`){if(n.durationMs!==void 0&&(typeof n.durationMs!=`number`||n.durationMs<0||n.durationMs>6e4))throw go(`invalid_request`,`durationMs`);a={action:r,identity:i,durationMs:n.durationMs}}else a={action:r,identity:i};return Do(await t.execute(a,{source:`agent`}))})},Mo(`${e}list_data_surfaces`,`List the data surfaces currently mounted in this SMRT Provider.`,{type:`object`,additionalProperties:!1,properties:{}},e=>jo(()=>(bo(e),Co(e),n.list().map(ko)))),Mo(`${e}inspect_data_surface`,`Inspect one currently mounted SMRT data surface.`,{type:`object`,required:[`identity`],additionalProperties:!1,properties:{identity:i}},e=>jo(()=>{bo(e);let t=Co(e),r=n.inspect(To(t.identity));if(!r)throw go(`not_found`);return Ao(r)})),{name:`${e}execute_data_surface_control`,description:`Execute a bounded visible-state command on a mounted SMRT data surface.`,inputSchema:{type:`object`,required:[`version`,`commandId`,`identity`,`expectedRevision`,`controlId`],additionalProperties:!1,properties:{version:{type:`number`,const:1},commandId:{type:`string`,minLength:1,maxLength:256},identity:i,expectedRevision:{type:`number`,minimum:0},controlId:{type:`string`,minLength:1,maxLength:256},payload:{}}},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:e=>jo(async()=>{bo(e);let t=Co(e);if(t.version!==1)throw go(`invalid_request`,`version`);if(typeof t.expectedRevision!=`number`||!Number.isSafeInteger(t.expectedRevision)||t.expectedRevision<0)throw go(`invalid_request`,`expectedRevision`);let r={version:1,commandId:xo(t.commandId,`commandId`),identity:To(t.identity),expectedRevision:t.expectedRevision,controlId:xo(t.controlId,`controlId`),...`payload`in t?{payload:t.payload}:{}},i=await n.execute(r);return i.snapshot?{...i,snapshot:Ao(i.snapshot)}:i})}]}function Po(e){let t=e.prefix??lo;if(!uo.test(t))throw TypeError(`Invalid WebMCP UI tool prefix`);let n=e.document??globalThis.document,r=n?.modelContext;if(!r||typeof r.registerTool!=`function`)return()=>{};let i=mo.get(n),a;if(i&&i.modelContext===r?a=i.prefixes:(a=new Set,mo.set(n,{modelContext:r,prefixes:a})),a.has(t))throw Error(`WebMCP UI prefix is already registered: ${t}`);a.add(t);let o=No(t,e.controlRegistry,e.dataSurfaceRegistry),s;try{s=Fe(o.map(e=>e.name),`ui`,{document:n})}catch(e){throw a.delete(t),e}let c=new AbortController,l=!1,u=()=>{l||(l=!0,c.abort(),a.delete(t),s.release())};try{for(let e of o){let t=Object.assign({[Le]:e.annotations?.readOnlyHint?`read`:`write`},e,{execute:Ie(e.execute)}),n=r.registerTool(t,{signal:c.signal});n&&Promise.resolve(n).catch(u)}}catch(e){throw u(),e}return u}var Fo=c(`<!> <!>`,1);function Io(i,a){_(a,!0);let s=k(a,`autoEnableSmrt`,3,!1),c=k(a,`user`,3,null),l=k(a,`permissions`,19,()=>[]),u=n(()=>a.ai?.showLoadingOverlay??!0),d=R(()=>so({initialMode:a.mode,session:{preferences:{autoEnableSmrt:s()}},onCapabilitiesDetected:()=>{a.onReady?.()},onModeChange:e=>{a.onModeChange?.(e)},onAILoadingChange:e=>{a.onAILoadingChange?.(e)}})),f=Pe(),p=Me(),m=n(()=>typeof a.webmcp==`object`?a.webmcp:void 0),h=n(()=>a.webmcp===!0?{}:typeof e(m)?.ui==`object`?e(m).ui:void 0),g=n(()=>e(h)?.controlRegistry??f),y=n(()=>e(h)?.dataSurfaceRegistry??p);Ee({get enabled(){return e(h)!==void 0},get controlRegistry(){return e(g)},get dataSurfaceRegistry(){return e(y)}}),we({get effects(){return e(m)?.effects}}),j(()=>{let e=R(()=>d.state.session.preferences);e.autoEnableSmrt!==s()&&d.updateSession({preferences:{...e,autoEnableSmrt:s()}})}),j(()=>{if(typeof window<`u`&&a.webmcp&&e(h))try{return Po({controlRegistry:e(g),dataSurfaceRegistry:e(y),...e(h).prefix?{prefix:e(h).prefix}:{}})}catch(e){be.warn(`Provider: WebMCP UI tool registration rejected`,{error:e})}}),j(()=>{if(typeof window>`u`||!a.webmcp)return;let e=typeof a.webmcp==`object`?a.webmcp:{},t=!1,n=()=>{};return U(async()=>{let{registerWebMcpTools:e}=await import(`./Cn2mA3wh.js`).then(e=>e.t);return{registerWebMcpTools:e}},__vite__mapDeps([32,1,33]),import.meta.url).then(({registerWebMcpTools:r})=>{if(t)return;let i=r(e.definitions??[],{client:e.client,basePath:e.basePath,fetchFn:e.fetchFn,scope:e.scope,filter:e.filter,filterTool:e.filterTool,resolveFetchers:e.resolveFetchers,resolveToolFetchers:e.resolveToolFetchers,effects:e.effects,namespace:e.namespace,maxTools:e.maxTools});n=i,i.ready.catch(e=>{t||be.warn(`Provider: WebMCP data tool registration rejected`,{error:e})})}).catch(e=>{t||be.warn(`Provider: WebMCP data tool registration rejected`,{error:e})}),()=>{t=!0,n()}}),j(()=>{a.mode&&d.setMode(a.mode,`explicit`)}),X(d);let b=R(()=>le(a.i18n));ue(b),j(()=>{a.i18n&&(b.snapshot=a.i18n)}),j(()=>{typeof window<`u`&&R(()=>{d.initialize()})}),j(()=>{d.setUser(c(),l())}),j(()=>{if(typeof window<`u`&&a.socket)return d.connectSocket(a.socket),()=>{d.disconnectSocket()}}),j(()=>{typeof window<`u`&&a.ai&&R(()=>{d.setAIConfig(a.ai)})}),L(()=>{d.dispose().catch(e=>{be.error(`AppState dispose failed during Provider teardown`,{error:e})})});var x=Fo(),S=z(x),E=t=>{var n=T(),r=z(n);w(r,()=>U(()=>import(`./DTWraE40.js`),__vite__mapDeps([34,8,1,9,26,10,27,35]),import.meta.url),null,(t,n)=>{var r=T(),i=z(r);v(i,()=>e(n).default,(e,t)=>{t(e,{get message(){return a.ai.loadingMessage},dismissible:!0})}),C(t,r)}),C(t,n)};t(S,t=>{a.ai&&e(u)&&t(E)});var D=P(S,2);o(D,()=>a.children),C(i,x),r()}var Lo=ce({"ui.command_palette.title":`Command palette`,"ui.command_palette.input_label":`Search or run a command`,"ui.command_palette.placeholder":`Search or run a command`,"ui.command_palette.results":`Results`,"ui.command_palette.trigger":`Search`,"ui.command_palette.empty":`No results for "{query}".`,"ui.command_palette.nothing":`Nothing to show yet.`,"ui.command_palette.searching":`Searching`,"ui.command_palette.partial":`Some results could not be loaded.`,"ui.command_palette.status_one":`1 result. Use the up and down arrow keys to choose, Enter to select.`,"ui.command_palette.status_many":`{count} results. Use the up and down arrow keys to choose, Enter to select.`,"ui.command_palette.unavailable":`Unavailable`,"ui.command_palette.hint_move":`to move`,"ui.command_palette.hint_select":`to select`,"ui.command_palette.hint_close":`to close`}),Ro=Symbol(`smrt-command-palette`);function zo(){return a(Ro)??null}function Bo(e){let t=zo();return()=>{let n=e()??t;if(!n)throw Error("[command palette] Pass a `palette` prop or call setCommandPalette() in a parent layout.");return n}}var Vo=[`Mod+K`];function Ho(e){let t=e.split(`+`).map(e=>e.trim()).filter(e=>e.length>0),n=t.pop();if(!n)return null;let r={key:n.toLowerCase(),mod:!1,ctrl:!1,meta:!1,alt:!1,shift:!1};for(let e of t)switch(e.toLowerCase()){case`mod`:r.mod=!0;break;case`ctrl`:case`control`:r.ctrl=!0;break;case`meta`:case`cmd`:case`command`:r.meta=!0;break;case`alt`:case`option`:r.alt=!0;break;case`shift`:r.shift=!0;break;default:return null}return r}function Uo(e,t){return t.key.toLowerCase()===e.key||/^[a-z]$/.test(e.key)&&t.code===`Key${e.key.toUpperCase()}`}function Wo(e,t){if(!Uo(e,t))return!1;if(e.mod){if(!(t.ctrlKey||t.metaKey))return!1}else if(t.ctrlKey!==e.ctrl||t.metaKey!==e.meta)return!1;if(t.altKey!==e.alt)return!1;let n=!/^[a-z0-9]$/.test(e.key),r=e.mod||e.ctrl||e.meta||e.alt;return n&&!r&&!e.shift?!0:t.shiftKey===e.shift}function Go(e,t){if(e.isComposing||e.defaultPrevented||e.repeat)return!1;for(let n of t)if(Wo(n,e)&&(n.mod||n.ctrl||n.meta||n.alt||!pn(e.target)))return!0;return!1}function Ko(){if(typeof navigator>`u`)return!1;let e=navigator,t=e.userAgentData?.platform??e.platform??``;return/mac|iphone|ipad|ipod/i.test(t)}function qo(e,t=Ko()){let n=typeof e==`string`?Ho(e):e;if(!n)return typeof e==`string`?e:``;let r=n.key.length===1?n.key.toUpperCase():n.key;return t?(n.ctrl?`⌃`:``)+(n.alt?`⌥`:``)+(n.shift?`⇧`:``)+(n.mod||n.meta?`⌘`:``)+r:[n.mod||n.ctrl?`Ctrl`:``,n.meta?`Meta`:``,n.alt?`Alt`:``,n.shift?`Shift`:``,r].filter(Boolean).join(`+`)}function Jo(e){let t=[];for(let n of e){let e=Ho(n);if(!e)continue;let r=e.key.length===1?e.key.toUpperCase():e.key,i=[e.alt?`Alt`:``,e.shift?`Shift`:``].filter(Boolean);e.mod?(t.push([...i,`Control`,r].join(`+`)),t.push([...i,`Meta`,r].join(`+`))):t.push([e.ctrl?`Control`:``,e.meta?`Meta`:``,...i,r].filter(Boolean).join(`+`))}return t.length>0?t.join(` `):void 0}var Yo=/\p{M}/gu;function Xo(e){return e.normalize(`NFD`).replace(Yo,``).toLowerCase()}function Zo(e){let t=``,n=[],r=[],i=0;for(let a of e){let e=Xo(a);for(let t=0;t<e.length;t+=1)n.push(i),r.push(i+a.length);t+=e,i+=a.length}return{text:t,origin:n,originEnd:r}}function Qo(e){return Zo(e).text}function $o(e){let t=Qo(e).split(/\s+/).filter(e=>e.length>0);return[...new Set(t)]}var es=/[\p{L}\p{N}]/u;function ts(e){return e!==void 0&&es.test(e)}function ns(e,t){let n=null,r=t.indexOf(e);for(;r!==-1;){let i=r===0||!ts(t[r-1])?r===0?150:100:60;(!n||i>n.score)&&(n={score:i,ranges:[[r,r+e.length]]}),r=t.indexOf(e,r+1)}if(n)return n;if(e.length<2)return null;let i=[],a=0;for(let n of e){let e=t.indexOf(n,a);if(e===-1)return null;i.push(e),a=e+1}let o=i[i.length-1]-i[0]+1;if(o>e.length*4)return null;let s=[];for(let e of i){let t=s[s.length-1];t&&t[1]===e?t[1]=e+1:s.push([e,e+1])}let c=i[0]===0||!ts(t[i[0]-1]);return{score:Math.max(5,30-(o-e.length)+(c?10:0)),ranges:s}}function rs(e){let t=[...e].sort((e,t)=>e[0]-t[0]||e[1]-t[1]),n=[];for(let e of t){let t=n[n.length-1];t&&e[0]<=t[1]?t[1]=Math.max(t[1],e[1]):n.push([e[0],e[1]])}return n}function is(e,t){return rs(t.map(([t,n])=>[e.origin[t],e.originEnd[n-1]]))}function as(e,t){let n=$o(e);if(n.length===0)return{score:0,ranges:[]};let r=Zo(t),i=0,a=[];for(let e of n){let t=ns(e,r.text);if(!t)return null;i+=t.score,a.push(...t.ranges)}let o=Qo(e).trim();return r.text===o?i+=200:r.text.startsWith(o)&&(i+=50),i-=Math.min(r.text.length,100)*.1,{score:i,ranges:is(r,a)}}function os(e,t){let n=$o(e);if(n.length===0)return{score:0,titleRanges:[]};let r=Zo(t.title),i=Qo([t.subtitle??``,...t.keywords??[]].join(` `)),a=0,o=[];for(let e of n){let t=ns(e,r.text);if(t){a+=t.score,o.push(...t.ranges);continue}let n=ns(e,i);if(!n)return null;a+=n.score*.5}let s=Qo(e).trim();return r.text===s?a+=200:r.text.startsWith(s)&&(a+=50),a-=Math.min(r.text.length,100)*.1,{score:a,titleRanges:is(r,o)}}function ss(e,t){let n=[],r=0;for(let[i,a]of t)i>r&&n.push({text:e.slice(r,i),match:!1}),a>i&&n.push({text:e.slice(i,a),match:!0}),r=Math.max(r,a);return r<e.length&&n.push({text:e.slice(r),match:!1}),n}var cs=f(`<svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor" focusable="false"><path></path></svg>`),ls=c(`<mark class="svelte-c516pr"> </mark>`),us=c(`<span class="smrt-command-palette__subtitle svelte-c516pr"> </span>`),ds=c(`<span class="smrt-command-palette__note svelte-c516pr"> </span>`),fs=c(`<kbd class="smrt-command-palette__shortcut svelte-c516pr"> </kbd>`),ps=c(`<div class="smrt-command-palette__option svelte-c516pr" role="option" tabindex="-1"><span class="smrt-command-palette__icon svelte-c516pr" aria-hidden="true"><!></span> <span class="smrt-command-palette__text svelte-c516pr"><span class="smrt-command-palette__title svelte-c516pr"></span> <!></span> <!></div>`),ms=c(`<div class="smrt-command-palette__group" role="group"><div class="smrt-command-palette__heading svelte-c516pr"> </div> <!></div>`),hs=c(`<p class="smrt-command-palette__empty svelte-c516pr"> </p>`),gs=c(`<div class="smrt-command-palette svelte-c516pr"><div class="smrt-command-palette__field svelte-c516pr"><svg class="smrt-command-palette__search-icon svelte-c516pr" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.5-3.5"></path></svg> <!></div> <div class="smrt-command-palette__list svelte-c516pr" role="listbox"></div> <!> <div class="smrt-command-palette__hints svelte-c516pr" aria-hidden="true"><span><kbd class="svelte-c516pr">↑</kbd><kbd class="svelte-c516pr">↓</kbd> </span> <span><kbd class="svelte-c516pr">↵</kbd> </span> <span><kbd class="svelte-c516pr">Esc</kbd> </span></div> <div class="smrt-command-palette__live svelte-c516pr" role="status" aria-live="polite"> </div></div>`);function _s(i,a){let o=re();_(a,!0);let c=k(a,`hotkeys`,3,Vo),{t:u}=de(),f=Bo(()=>a.palette),m=n(f),h=`smrt-palette-list-${o}`,g=e=>`smrt-palette-opt-${o}-${e.key.replace(/[^a-zA-Z0-9_-]/g,`_`)}`,v=n(()=>c()===!1?[]:c().flatMap(e=>{let t=Ho(e);return t?[t]:[]})),y=A(!1);ie(()=>{H(y,Ko(),!0)});let x=A(void 0);function S(t){Go(t,e(v))&&(t.preventDefault(),e(m).toggle())}j(()=>{e(m).isOpen&&ae().then(()=>e(x)?.focus())});let w=n(()=>e(m).active),D=n(()=>e(m).results.length>0);j(()=>{if(!e(w)||typeof document>`u`)return;let t=document.getElementById(g(e(w)));t&&typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})});function N(t){if(!t.isComposing)switch(t.key){case`ArrowDown`:t.preventDefault(),e(m).moveActive(1);break;case`ArrowUp`:t.preventDefault(),e(m).moveActive(-1);break;case`Enter`:t.preventDefault(),e(m).activate();break;case`PageDown`:t.preventDefault(),e(m).moveActive(5);break;case`PageUp`:t.preventDefault(),e(m).moveActive(-5)}}let F=n(()=>{if(!e(m).isOpen)return``;let t=e(m).query.trim();if(e(m).busy&&!e(D))return u(Lo[`ui.command_palette.searching`]);if(!e(D))return t?u(Lo[`ui.command_palette.empty`],{query:t}):u(Lo[`ui.command_palette.nothing`]);let n=e(m).results.length,r=n===1?u(Lo[`ui.command_palette.status_one`]):u(Lo[`ui.command_palette.status_many`],{count:n});return e(m).failedProviders.size>0?`${r} ${u(Lo[`ui.command_palette.partial`])}`:r});function ne(e){return e&&ke(e)?ve[e]:null}let L=n(()=>a.label??u(Lo[`ui.command_palette.input_label`]));O(`keydown`,te,S);var R=()=>e(m).isOpen,oe=t=>{t||e(m).close()};{let r=n(()=>a.label??u(Lo[`ui.command_palette.title`]));se(i,{get open(){return R()},set open(e){oe(e)},get ariaLabel(){return e(r)},showClose:!1,size:`md`,children:(r,i)=>{var o=gs(),c=M(o),f=P(M(c),2),_=()=>e(m).query,v=t=>e(m).setQuery(String(t));{let t=n(()=>e(w)?g(e(w)):void 0),r=n(()=>a.placeholder??u(Lo[`ui.command_palette.placeholder`]));ee(me(f,{type:`text`,role:`combobox`,get"aria-label"(){return e(L)},get"aria-expanded"(){return e(D)},get"aria-controls"(){return h},"aria-autocomplete":`list`,get"aria-activedescendant"(){return e(t)},autocomplete:`off`,autocapitalize:`off`,spellcheck:!1,enterkeyhint:`go`,get placeholder(){return e(r)},interaction:!1,class:`smrt-command-palette__input`,get value(){return _()},set value(e){v(e)},onkeydown:N}),e=>H(x,e,!0),()=>e(x))}s(c);var S=P(c,2);p(S,23,()=>e(m).sections,e=>e.id,(r,i,a)=>{var o=ms(),c=M(o),f=I(c,!0),_=P(c,2);p(_,17,()=>e(i).results,e=>e.key,(r,i)=>{let a=n(()=>ne(e(i).item.icon)),o=n(()=>e(i).item.shortcut?qo(e(i).item.shortcut,e(y)):``);var c=ps(),f=M(c),h=M(f),_=t=>{var n=cs(),r=I(n);B(()=>V(r,`d`,e(a))),C(t,n)};t(h,t=>{e(a)&&t(_)}),s(f);var v=P(f,2),x=M(v);p(x,21,()=>ss(e(i).item.title,e(i).titleRanges),b,(n,r)=>{var i=T(),a=z(i),o=t=>{var n=ls(),i=I(n,!0);B(()=>l(i,e(r).text)),C(t,n)},s=t=>{var n=d();B(()=>l(n,e(r).text)),C(t,n)};t(a,t=>{e(r).match?t(o):t(s,-1)}),C(n,i)}),s(x);var S=P(x,2),D=t=>{var n=us(),r=I(n,!0);B(()=>l(r,e(i).item.subtitle)),C(t,n)};t(S,t=>{e(i).item.subtitle&&t(D)}),s(v);var O=P(v,2),k=e=>{var t=ds(),n=I(t,!0);B(e=>l(n,e),[()=>u(Lo[`ui.command_palette.unavailable`])]),C(e,t)},A=t=>{var n=fs(),r=I(n,!0);B(()=>l(r,e(o))),C(t,n)};t(O,t=>{typeof e(i).item.disabled==`string`?t(k):e(o)&&t(A,1)}),s(c),B(t=>{V(c,`id`,t),V(c,`aria-selected`,e(w)?.key===e(i).key),V(c,`aria-disabled`,!e(i).selectable||void 0),V(c,`data-kind`,e(i).item.kind),V(c,`data-active`,e(w)?.key===e(i).key?``:void 0),V(c,`title`,typeof e(i).item.disabled==`string`?e(i).item.disabled:void 0)},[()=>g(e(i))]),E(`mousedown`,c,e=>e.preventDefault()),E(`pointermove`,c,()=>e(m).setActive(e(i).key)),E(`click`,c,()=>void e(m).activate(e(i))),C(r,c)}),s(o),B(()=>{V(o,`aria-labelledby`,`${h}-g${e(a)}`),V(c,`id`,`${h}-g${e(a)}`),l(f,e(i).label)}),C(r,o)}),s(S);var O=P(S,2),k=t=>{var n=hs(),r=I(n,!0);B(()=>l(r,e(F))),C(t,n)};t(O,t=>{e(D)||t(k)});var A=P(O,2),j=M(A),te=P(M(j),2);s(j);var R=P(j,2),re=P(M(R));s(R);var ie=P(R,2),ae=P(M(ie));s(ie),s(A);var oe=P(A,2),U=I(oe,!0);s(o),B((t,n,r,i)=>{V(S,`id`,h),V(S,`aria-label`,t),V(S,`aria-busy`,e(m).busy),l(te,` ${n??``}`),l(re,` ${r??``}`),l(ae,` ${i??``}`),l(U,e(F))},[()=>u(Lo[`ui.command_palette.results`]),()=>u(Lo[`ui.command_palette.hint_move`]),()=>u(Lo[`ui.command_palette.hint_select`]),()=>u(Lo[`ui.command_palette.hint_close`])]),C(r,o)},$$slots:{default:!0}})}r()}D([`mousedown`,`pointermove`,`click`]);var vs=c(`<kbd class="smrt-command-palette-trigger__hint svelte-122kczf"> </kbd>`),ys=c(`<span class="smrt-command-palette-trigger__label svelte-122kczf"> </span> <!>`,1),bs=c(`<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.5-3.5"></path></svg> <!>`,1);function xs(i,a){_(a,!0);let o=k(a,`hotkeys`,3,Vo),s=k(a,`compact`,3,!1),c=k(a,`class`,3,``),{t:u}=de(),d=Bo(()=>a.palette),f=n(d),p=n(()=>a.label??u(Lo[`ui.command_palette.trigger`])),m=A(!1);ie(()=>{H(m,Ko(),!0)});let h=n(()=>o()[0]?qo(o()[0],e(m)):``);{let r=n(()=>`smrt-command-palette-trigger ${c()}`),a=n(()=>Jo(o()));G(i,{variant:`ghost`,size:`sm`,get class(){return e(r)},get"aria-label"(){return e(p)},"aria-haspopup":`dialog`,get"aria-expanded"(){return e(f).isOpen},get"aria-keyshortcuts"(){return e(a)},onclick:()=>e(f).open(),children:(n,r)=>{var i=bs(),a=P(z(i),2),o=n=>{var r=ys(),i=z(r),a=I(i,!0),o=P(i,2),s=t=>{var n=vs(),r=I(n,!0);B(()=>l(r,e(h))),C(t,n)};t(o,t=>{e(h)&&t(s)}),B(()=>l(a,e(p))),C(n,r)};t(a,e=>{s()||e(o)}),C(n,i)},$$slots:{default:!0}})}r()}function Ss(e,t,n,r){return{key:`${e.id}:${t.id}`,providerId:e.id,group:t.group??e.label,item:t,score:n,titleRanges:r,selectable:!t.disabled}}function Cs(e){return e.map((e,t)=>({provider:e,index:t})).sort((e,t)=>(e.provider.order??0)-(t.provider.order??0)||e.index-t.index).map(({provider:e})=>e)}function ws(e){let t=e.query.trim(),n=e.maxPerGroup??8,r=[],i=e=>{let t=r.find(t=>t.id===e);return t||(t={id:e,label:e,results:[]},r.push(t)),t},a=new Set;for(let r of Cs(e.providers)){let o=r.limit??n,s=[];for(let n of e.local[r.id]??[]){let e=os(t,n);e&&s.push(Ss(r,n,e.score+(n.boost??0),e.titleRanges))}s.sort((e,t)=>t.score-e.score);let c=[];if(t.length>0)for(let n of e.remote[r.id]??[])c.push(Ss(r,n,n.boost??0,as(t,n.title)?.ranges??[]));let l=0;for(let e of[...s,...c]){if(l>=o)break;a.has(e.key)||(a.add(e.key),i(e.group).results.push(e),l+=1)}}return r.filter(e=>e.results.length>0)}function Ts(e){return e.flatMap(e=>[...e.results])}function Es(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}var Ds=class{#e;#t=A([]);#n=A({});#r=A({});#i=A(new Set);#a=A(0);#o=A(0);#s=0;#c=A(null);#l=A(!1);#u=A(``);#d=null;#f=null;#p=null;#m=0;constructor(e={}){this.#e=e,H(this.#t,[...e.providers??[]])}get isOpen(){return e(this.#l)}get query(){return e(this.#u)}get providers(){return e(this.#t)}get busy(){return e(this.#a)+e(this.#o)>0}get failedProviders(){return e(this.#i)}#h=n(()=>ws({providers:e(this.#t),local:e(this.#n),remote:e(this.#r),query:e(this.#u),maxPerGroup:this.#e.maxPerGroup}));get sections(){return e(this.#h)}set sections(e){H(this.#h,e)}#g=n(()=>Ts(this.sections));get results(){return e(this.#g)}set results(e){H(this.#g,e)}#_=n(()=>this.results.find(t=>t.key===e(this.#c)&&t.selectable)??this.results.find(e=>e.selectable)??null);get active(){return e(this.#_)}set active(e){H(this.#_,e)}registerProvider(t){let n=e(this.#t).findIndex(e=>e.id===t.id);if(n===-1)H(this.#t,[...e(this.#t),t]);else{let r=e(this.#t)[n];H(this.#t,e(this.#t).map((e,r)=>r===n?t:e)),H(this.#n,Os(e(this.#n),r.id)),H(this.#r,Os(e(this.#r),r.id)),this.#b(r.id,!1)}return e(this.#l)&&(this.#x(t,this.#v()),e(this.#u).trim()&&this.#C(0)),()=>{e(this.#t).includes(t)&&(H(this.#t,e(this.#t).filter(e=>e!==t)),H(this.#n,Os(e(this.#n),t.id)),H(this.#r,Os(e(this.#r),t.id)))}}open(){if(!e(this.#l)){H(this.#l,!0),H(this.#u,``),H(this.#c,null),H(this.#r,{}),H(this.#i,new Set),this.#m+=1,this.#d?.abort(),this.#d=new AbortController;for(let t of Cs(e(this.#t)))this.#x(t,this.#d.signal)}}close(){e(this.#l)&&(H(this.#l,!1),H(this.#u,``),H(this.#c,null),this.#m+=1,this.#S(),this.#d?.abort(),this.#d=null,H(this.#a,0),H(this.#o,0),H(this.#r,{}))}toggle(){e(this.#l)?this.close():this.open()}setQuery(t){t!==e(this.#u)&&(H(this.#u,t,!0),H(this.#c,null),this.#C(this.#e.searchDebounceMs??150))}moveActive(e){let t=this.results.filter(e=>e.selectable);if(t.length===0)return;let n=this.active?t.findIndex(e=>e.key===this.active?.key):-1,r=n===-1?e>0?0:t.length-1:((n+e)%t.length+t.length)%t.length;H(this.#c,t[r].key,!0)}moveActiveTo(e){let t=this.results.filter(e=>e.selectable);t.length!==0&&H(this.#c,(e===`first`?t[0]:t[t.length-1]).key,!0)}setActive(e){this.results.find(t=>t.key===e)?.selectable&&H(this.#c,e,!0)}async activate(t=this.active){if(!t?.selectable)return;let{item:n,providerId:r}=t,i=e(this.#u);this.close();try{n.run?await n.run({query:i,providerId:r,navigate:e=>this.navigate(e,n)}):n.href&&await this.navigate(n.href,n)}catch(e){this.#y(e,{providerId:r,phase:`run`,item:n})}}navigate(e,t){if(this.#e.navigate)return this.#e.navigate(e,t);typeof window<`u`&&window.location.assign(e)}destroy(){H(this.#l,!1),this.#m+=1,this.#S(),this.#d?.abort(),this.#d=null}#v(){return this.#d||=new AbortController,this.#d.signal}#y(e,t){this.#e.onError?this.#e.onError(e,t):be.warn(`[smrt-svelte] command palette provider failed`,{...t,item:t.item?.id,error:e instanceof Error?e.message:String(e)})}#b(t,n){if(e(this.#i).has(t)===n)return;let r=new Set(e(this.#i));n?r.add(t):r.delete(t),H(this.#i,r)}#x(t,n){if(!t.items)return Promise.resolve();let r=this.#m,i=()=>r===this.#m&&!n.aborted&&e(this.#t).includes(t),a=n=>{i()&&(H(this.#n,{...e(this.#n),[t.id]:n}),this.#b(t.id,!1))},o;try{o=t.items({signal:n})}catch(e){return this.#b(t.id,!0),this.#y(e,{providerId:t.id,phase:`items`}),Promise.resolve()}if(!Es(o))return a(o),Promise.resolve();H(this.#a,e(this.#a)+1);let s=()=>{r===this.#m&&H(this.#a,Math.max(0,e(this.#a)-1),!0)};return Promise.resolve(o).then(e=>{s(),a(e)},e=>{s(),i()&&(this.#b(t.id,!0),this.#y(e,{providerId:t.id,phase:`items`}))})}#S(){this.#p&&clearTimeout(this.#p),this.#p=null,this.#f?.abort(),this.#f=null,this.#s+=1,H(this.#o,0)}#C(t){this.#p&&clearTimeout(this.#p),this.#p=null,this.#f?.abort(),this.#f=null,this.#s+=1,H(this.#o,0);let n=e(this.#u).trim();n.length===0?H(this.#r,{}):e(this.#l)&&(this.#p=setTimeout(()=>{this.#p=null,this.#w(n)},t))}#w(t){let n=this.#m,r=new AbortController;this.#f=r;let i=++this.#s;H(this.#o,0);let a=t=>n!==this.#m||r.signal.aborted||!e(this.#t).includes(t),o=()=>{i===this.#s&&H(this.#o,Math.max(0,e(this.#o)-1),!0)};for(let n of e(this.#t)){if(!n.search)continue;if(t.length<(n.minQueryLength??2)){e(this.#r)[n.id]&&H(this.#r,Os(e(this.#r),n.id));continue}let i=n.limit??this.#e.maxPerGroup??8,s;try{s=n.search(t,{signal:r.signal,limit:i})}catch(e){this.#b(n.id,!0),this.#y(e,{providerId:n.id,phase:`search`});continue}H(this.#o,e(this.#o)+1),Promise.resolve(s).then(t=>{o(),!a(n)&&(H(this.#r,{...e(this.#r),[n.id]:t}),this.#b(n.id,!1))},t=>{o(),!a(n)&&(H(this.#r,Os(e(this.#r),n.id)),this.#b(n.id,!0),this.#y(t,{providerId:n.id,phase:`search`}))})}}};function Os(e,t){if(!(t in e))return e;let{[t]:n,...r}=e;return r}var ks=c(`<!> <!>`,1);function As(i,a){_(a,!0);let o=k(a,`providers`,19,()=>[]),s=k(a,`hotkeys`,3,Vo),c=k(a,`compact`,3,!1),l=k(a,`hideTrigger`,3,!1),u=zo(),d=R(()=>a.palette||u?null:new Ds({providers:o(),navigate:a.navigate}));L(()=>d?.destroy());let f=n(()=>a.palette??u??d);var p=ks(),m=z(p),h=t=>{{let r=n(()=>s()===!1?[]:s());xs(t,{get palette(){return e(f)},get label(){return a.label},get compact(){return c()},get hotkeys(){return e(r)}})}};t(m,e=>{l()||e(h)}),_s(P(m,2),{get palette(){return e(f)},get hotkeys(){return s()},get label(){return a.label},get placeholder(){return a.placeholder}}),C(i,p),r()}function js(i,a){_(a,!0);let s=Se(),c=n(()=>s?.dataSurfaceRegistry);var l=T(),u=z(l),d=t=>{var n=T(),r=z(n);o(r,()=>a.dock,()=>e(c)),C(t,n)};t(u,t=>{e(c)&&t(d)}),C(i,l),r()}function Ms(e,t){let n=e.ready!==!1,r=t&&n?`toggle`:e.href?`link`:`inert`;return{mode:r,registered:t,ready:n,notReady:!n||r===`link`}}function Ns(e,t,n){return e.onpress?.(t,{registered:n.registered,ready:n.ready})===!1||t.defaultPrevented?(t.preventDefault(),!1):!0}var Ps=(r,i=m)=>{var a=T(),o=z(a),s=e=>{var t=Fs();C(e,t)},c=e=>{var t=Is(),n=I(t);B(()=>V(n,`d`,ve[i()===void 0?ye:i()])),C(e,t)},u=n(()=>i()===void 0||ke(i())),d=e=>{var t=Ls(),n=I(t,!0);B(()=>l(n,i())),C(e,t)};t(o,t=>{i()===`chat`?t(s):e(u)?t(c,1):t(d,-1)}),C(r,a)},Fs=f(`<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 11.5a8.5 8.5 0 0 1-12.4 7.5L3 20.5l1.6-5A8.5 8.5 0 1 1 21 11.5z"></path></svg>`),Is=f(`<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg>`),Ls=c(`<span aria-hidden="true"> </span>`),Rs=c(`<a class="smrt-dock-toggles__button svelte-1u9e85z"><!></a>`),zs=c(`<button type="button" aria-controls="smrt-admin-shell-right-panel"><!></button>`),Bs=c(`<div class="smrt-dock-toggles svelte-1u9e85z" data-testid="dock-toggles"></div>`);function Vs(a,o){_(o,!0);let c=li(),{t:l}=de();function u(e){return e.icon??(e.tool===`assistant`?`chat`:void 0)}function d(e){return Ms(e,c.has(e.tool)&&c.available)}function f(e,t){return t?e.labelNotReady??l(Z[`ui.dock_toggles.set_up`],{label:e.label}):e.label}function m(e,t){let n=d(t);Ns(t,e,n)&&n.mode===`toggle`&&c.toggle(t.tool,{returnFocus:e.currentTarget})}var h=Bs();p(h,21,()=>o.toggles,e=>e.tool,(r,a)=>{let o=n(()=>d(e(a))),l=n(()=>e(o).mode===`toggle`),p=n(()=>e(l)&&c.isOpen(e(a).tool)),h=n(()=>u(e(a))),g=n(()=>f(e(a),e(o).notReady));var _=T(),v=z(_),y=t=>{var n=Rs();Ps(M(n),()=>e(h)),s(n),B(()=>{V(n,`href`,e(a).href),V(n,`data-dock-tool`,e(a).tool),V(n,`aria-label`,e(g)),V(n,`title`,e(g))}),E(`click`,n,t=>m(t,e(a))),C(t,n)},b=t=>{var n=zs();let r;Ps(M(n),()=>e(h)),s(n),B(()=>{r=i(n,1,`smrt-dock-toggles__button svelte-1u9e85z`,null,r,{active:e(p)}),V(n,`data-dock-tool`,e(a).tool),V(n,`aria-label`,e(g)),V(n,`title`,e(g)),V(n,`aria-pressed`,e(p)),V(n,`aria-expanded`,e(p)),V(n,`aria-disabled`,!e(l)||void 0)}),E(`click`,n,t=>m(t,e(a))),C(t,n)};t(v,t=>{e(o).mode===`link`?t(y):t(b,-1)}),C(r,_)}),s(h),C(a,h),r()}D([`click`]);function Hs(e){if(!e)return null;let t=typeof e==`object`?e.items:void 0;return{items:Math.max(1,Number.isFinite(t)?Math.floor(t):4)}}function Us(e,t,n=`items`,r){let i=[],a=e=>{i.some(t=>t.id===e.id)||i.push(e)};for(let t of e)a({id:t.id??t.href,label:t.label,href:t.href,icon:t.icon});for(let e of t){if(n===`items`){for(let t of e.items)a({id:t.id??t.href,label:t.label,href:t.href,icon:t.icon});continue}let t=e.id??e.heading,i=e.href??r?.(t)??e.items[0]?.href;i&&a({id:t,label:e.heading,href:i,icon:e.icon})}return i}function Ws(e,t,n){let r=Math.max(0,t-+!!n);return{nav:e.slice(0,r),more:e.length>r}}function Gs(e,t){return e===t||t.startsWith(`${e}/`)}function Ks(t,i){_(i,!0);let a=k(i,`currentHref`,3,``),{t:o}=de(),s=Be(),c=li(),l=n(()=>!i.dockToggle&&s.isEdgeShown(`right`)&&s.focusTools.length>0),u=n(()=>!!i.dockToggle||e(l)),d=n(()=>Ws(i.entries,i.budget,e(u)));function f(e){let t=e.icon??(e.tool===`assistant`?`chat`:void 0);return t&&(ke(t)||i.iconComponent)?t:ye}function p(){if(s.panels.right===`expanded`){s.collapsePanel(`right`);return}let e=s.focusTools.find(e=>e.id===s.activeFocusToolId)??s.focusTools[0];e?s.openFocusTool(e.id):s.expandPanel(`right`)}function m(){s.setPanelState(`left`,s.panels.left===`expanded`?`collapsed`:`expanded`)}let h=n(()=>{let t=e(d).nav.map(e=>({id:e.id,label:e.label,href:e.href,iconName:e.icon??`placeholder`,active:Gs(e.href,a())}));if(i.dockToggle){let e=i.dockToggle.tool,n=Ms(i.dockToggle,c.has(e)&&c.available),r=n.mode===`toggle`,a=n.notReady?i.dockToggle.labelNotReady??o(Z[`ui.dock_toggles.set_up`],{label:i.dockToggle.label}):i.dockToggle.label,s=t=>{Ns(i.dockToggle,t,n)&&r&&c.toggle(e)};t.push(n.mode===`link`?{id:`dock:${e}`,label:a,iconName:f(i.dockToggle),href:i.dockToggle.href,onclick:s}:{id:`dock:${e}`,label:a,iconName:f(i.dockToggle),active:r&&c.isOpen(e),expanded:r?c.isOpen(e):void 0,controls:r?`smrt-admin-shell-right-panel`:void 0,onclick:s})}else e(l)&&t.push({id:`tools`,label:o(Z[`ui.admin_shell.tools`]),iconName:ye,active:s.panels.right===`expanded`,expanded:s.panels.right===`expanded`,controls:`smrt-admin-shell-right-panel`,onclick:p});return e(d).more&&t.push({id:`more`,label:o(Z[`ui.phone_tab_bar.more`]),iconName:`more`,expanded:s.panels.left===`expanded`,controls:`smrt-admin-shell-left-panel`,onclick:m}),t});{let r=n(()=>o(Z[`ui.phone_tab_bar.label`]));vi(t,{get items(){return e(h)},get iconComponent(){return i.iconComponent},get label(){return e(r)}})}r()}var qs=`smrt.runtime.diagnostics.read`,Js=`/api/_runtime/diagnostics`;function Ys(e={}){let t=e.modelContext??globalThis.document?.modelContext;if(!t||typeof t.registerTool!=`function`)return null;let n=new AbortController,r=Xs(e.fetchFn??fetch,e.endpoint);try{let e=t.registerTool(r,{signal:n.signal});Promise.resolve(e).catch(()=>n.abort())}catch{n.abort()}return Object.freeze({dispose:()=>n.abort()})}function Xs(e,t=Js){return Object.freeze({name:qs,description:`Read the authenticated, redacted application runtime diagnostics.`,inputSchema:Object.freeze({type:`object`,properties:Object.freeze({}),additionalProperties:!1}),annotations:Object.freeze({readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}),async execute(){let n;try{n=await e(t,{method:`GET`,credentials:`same-origin`,headers:{accept:`application/json`}})}catch{return Zs(`diagnostics_unavailable`)}if(!n.ok)return Zs(n.status===401?`authentication_required`:n.status===403?`authorization_denied`:`diagnostics_unavailable`);try{return JSON.stringify(await n.json())}catch{return Zs(`diagnostics_unavailable`)}}})}function Zs(e){return JSON.stringify({ok:!1,error:{code:e}})}function Qs(e,t){_(t,!0);let n=k(t,`enabled`,3,!0);j(()=>{if(!n())return;let e=Ys({endpoint:t.endpoint});return()=>e?.dispose()}),r()}var $s=c(`<span class="smrt-app-shell-color-scheme svelte-1dzfp19" data-smrt-component="ShellColorSchemeToggle"><!></span>`);function ec(t,i){_(i,!0);let a=je(),{t:o}=de(),c=n(()=>a.state.isDark);var l=$s(),u=M(l);{let t=n(()=>e(c)?`lightMode`:`darkMode`),r=n(()=>o(Z[`ui.app_shell.color_scheme_dark`])),i=n(()=>o(e(c)?Z[`ui.app_shell.color_scheme_to_light`]:Z[`ui.app_shell.color_scheme_to_dark`]));Ce(u,{get icon(){return e(t)},get label(){return e(r)},get pressed(){return e(c)},get tooltip(){return e(i)},onclick:()=>a.toggleColorScheme()})}s(l),C(t,l),r()}var tc=`data-smrt-view-transition`,nc=0;function rc(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}async function ic(e,t={}){let n=typeof document>`u`?void 0:document,r=n?.startViewTransition;if(!n||t.skip||typeof r!=`function`||rc()){await e();return}let i;nc+=1,n.documentElement.setAttribute(tc,``);let a=()=>{nc=Math.max(0,nc-1),nc===0&&n.documentElement.removeAttribute(tc)};try{i=r.call(n,e)}catch{a(),await e();return}i.ready?.catch(()=>{}),Promise.resolve(i.finished).then(a,a),await i.updateCallbackDone}function ac(e={}){return t=>{if(!(t.willUnload||t.type===`leave`))return new Promise(n=>{ic(async()=>{n(),await t.complete},e).then(n,n)})}}var oc=(r,i=m)=>{var a=T(),s=z(a),c=t=>{{let r=n(()=>[i().toggle]);Vs(t,{get toggles(){return e(r)}})}},l=e=>{var t=T(),n=z(t);o(n,()=>i().render),C(e,t)};t(s,e=>{i().toggle?e(c):i().render&&e(l,1)}),C(r,a)},sc=e=>{ec(e,{})},cc=c(`<span data-testid="layout-edit-toggle"><!></span>`),lc=c(`<span><button type="button" class="smrt-edit-item__grip svelte-1pgtgoi" data-smrt-edit-handle=""><span aria-hidden="true">⠿</span></button> <span class="smrt-edit-item__body svelte-1pgtgoi" inert=""><!></span></span>`),uc=c(`<span class="smrt-edit-zone__label svelte-1pgtgoi"> </span> <!>`,1),dc=c(`<span class="smrt-app-shell-palette svelte-1pgtgoi"><!></span>`),fc=c(`<span> </span> <!>`,1),pc=c(`<a class="svelte-1pgtgoi"> </a>`),mc=c(`<!> <!>`,1),hc=c(`<div class="smrt-layout-live svelte-1pgtgoi" aria-live="assertive" aria-atomic="true"> </div>`),gc=c(`<div class="smrt-layout-live svelte-1pgtgoi" role="status" aria-live="polite"> </div> <!> <!> <!> <!>`,1);function _c(a,c){_(c,!0);let u=(r,i=m)=>{var a=T(),s=z(a);p(s,17,()=>Ue(i()),e=>e.id,(r,i)=>{var a=T(),s=z(a),c=r=>{var a=T(),o=z(a),s=t=>{{let r=n(()=>[e(i).toggle]);Vs(t,{get toggles(){return e(r)}})}};t(o,t=>{(e(Ve)?.tool!==e(i).toggle.tool||X.viewport!==`phone`)&&t(s)}),C(r,a)},l=t=>{var n=T(),r=z(n);o(r,()=>e(i).render),C(t,n)};t(s,t=>{e(i).toggle?t(c):e(i).render&&t(l,1)}),C(r,a)}),C(r,a)},d=e=>{u(e,()=>`header.start`)},f=e=>{u(e,()=>`header.center`)},h=e=>{u(e,()=>`header.end`)},g=e=>{u(e,()=>`footer.start`)},v=e=>{u(e,()=>`footer.center`)},y=e=>{u(e,()=>`footer.end`)},b=e=>{u(e,()=>`leftSidebar.header`)},x=e=>{u(e,()=>`leftSidebar.footer`)},S=e=>{u(e,()=>`rightSidebar.header`)},w=e=>{u(e,()=>`rightSidebar.footer`)},D=t=>{var r=cc();let a;var o=M(r);{let t=n(()=>J(Z[`ui.layout_edit.toggle`])),r=n(()=>J(Z[`ui.layout_edit.toggle`]));Ce(o,{icon:`edit`,get pressed(){return e(Je)},get label(){return e(t)},get tooltip(){return e(r)},onclick:Tt})}s(r),B(()=>a=i(r,1,`smrt-layout-toggle svelte-1pgtgoi`,null,a,{"smrt-layout-toggle--floating":e(je)})),C(t,r)},ee=(r,a=m)=>{var o=uc(),c=z(o),u=I(c,!0),d=P(c,2);p(d,17,()=>ht(a()),e=>e.id,(r,a)=>{var o=T(),c=z(o),l=t=>{oc(t,()=>e(a))},u=t=>{let r=n(()=>_t.drag?.itemId===e(a).id);var o=lc();let c;var l=M(o),u=P(l,2);oc(M(u),()=>e(a)),s(u),s(o),B((t,n)=>{c=i(o,1,`smrt-edit-item svelte-1pgtgoi`,null,c,{"smrt-edit-item--dragging":e(r)}),V(o,`data-smrt-edit-item`,e(a).id),V(l,`draggable`,_t.nativeDraggable),V(l,`aria-label`,t),V(l,`title`,n),V(l,`aria-pressed`,e(r))},[()=>J(yi[`ui.sortable.move`],{item:e(a).label}),()=>J(yi[`ui.sortable.move`],{item:e(a).label})]),E(`click`,l,()=>_t.consumeClick(e(a).id)),E(`keydown`,l,t=>_t.keydown(t,e(a).id)),O(`blur`,l,t=>_t.blur(t,e(a).id)),E(`pointerdown`,l,t=>_t.pointerDown(t,e(a).id)),E(`pointermove`,l,e=>_t.pointerMove(e)),E(`pointerup`,l,e=>_t.pointerUp(e)),O(`pointercancel`,l,e=>_t.pointerCancel(e)),O(`dragstart`,l,t=>_t.dragStart(t,e(a).id)),O(`dragend`,l,()=>_t.dragEnd()),C(t,o)};t(c,t=>{e(a).fixed?t(l):t(u,-1)}),C(r,o)}),B(e=>l(u,e),[()=>mt(a())]),C(r,o)},te=(t,r=m,i=m)=>{{let a=n(()=>e(st).name||e(st).email),o=n(()=>ot(e($e),i()));Na(t,{get userName(){return e(a)},get email(){return e(st).email},get avatarUrl(){return e(st).avatarUrl},get compact(){return r()},get tenantLabel(){return ue()},get onSignOut(){return c.onSignOut},get signOutHref(){return c.signOutHref},get settingsHref(){return c.settingsHref},get placement(){return e(o)}})}},N=t=>{te(t,()=>e(at),()=>!1)},F=n=>{var r=T(),i=z(r),a=e=>{te(e,()=>!0,()=>!0)};t(i,t=>{e(tt)&&t(a)}),C(n,r)},ne=r=>{var i=T(),a=z(i),o=t=>{var r=dc(),i=M(r);{let t=n(()=>X.viewport===`phone`);As(i,{get providers(){return c.commandPalette.providers},get placeholder(){return c.commandPalette.placeholder},get compact(){return e(t)}})}s(r),B(()=>V(r,`data-search`,X.viewport===`phone`?void 0:``)),C(t,r)};t(a,e=>{c.commandPalette&&e(o)}),C(r,i)},L=e=>{Xe(e,{get title(){return U()},get subtitle(){return c.subtitle},get logoSrc(){return c.logoSrc},get logoAlt(){return c.logoAlt},get homeHref(){return c.homeHref}})},re=(t,r=m)=>{let i=n(()=>J(Ur[r()])),a=n(()=>e(St)<=1);{let o=n(()=>J(Z[`ui.layout_edit.hide_region`],{region:e(i)})),s=n(()=>e(a)?J(Z[`ui.layout_edit.hide_last_region`],{region:e(i)}):J(Z[`ui.layout_edit.hide_region`],{region:e(i)}));Ce(t,{icon:`eyeOff`,size:16,get disabled(){return e(a)},get label(){return e(o)},get tooltip(){return e(s)},onclick:()=>qe.setPanel(Et[r()],{visible:!1})})}},ie=(t,r=m)=>{let i=n(()=>J(Ur[r()]));var a=fc(),o=z(a),s=I(o,!0),c=P(o,2);{let t=n(()=>J(Z[`ui.layout_edit.show_region`],{region:e(i)}));Ce(c,{icon:`eye`,size:16,get label(){return e(t)},onclick:()=>qe.setPanel(Et[r()],{visible:!0})})}B(e=>l(s,e),[()=>J(Z[`ui.layout_edit.region_hidden`],{region:e(i)})]),C(t,a)},oe=t=>{Ks(t,{get entries(){return e(ze)},get currentHref(){return le()},get budget(){return e(Re)},get dockToggle(){return e(Ve)},get iconComponent(){return c.iconComponent}})},U=k(c,`title`,3,`SMRT`),se=k(c,`storageKey`,3,`smrt-app-shell`),W=k(c,`nav`,19,()=>[]),ce=k(c,`navGroups`,19,()=>[]),le=k(c,`currentHref`,3,``),ue=k(c,`tenantLabel`,3,``),fe=k(c,`environment`,3,`local`),pe=k(c,`accountMenu`,3,!0),G=k(c,`colorSchemeToggle`,3,!0),me=k(c,`webmcp`,3,!1),he=k(c,`user`,3,null),q=k(c,`permissions`,19,()=>[]),_e=k(c,`runtimeDiagnostics`,3,!1),ve=k(c,`preset`,3,`smrt`),ye=k(c,`colorScheme`,3,`system`),be=k(c,`dockToggles`,19,()=>[]),xe=k(c,`slotItems`,19,()=>[]),Se=k(c,`layoutEditing`,3,!1),we=k(c,`navMode`,3,`items`),Te=k(c,`edgeToggles`,3,!1),Ee=k(c,`phoneTabBar`,3,!1),De=k(c,`chrome`,3,!0),Oe=`item:account`,ke=`item:color-scheme`,je=n(()=>typeof Se()==`object`&&Se().floating===!0),{t:J}=de(),Y=n(()=>{let t=[],n=new Set,r=e=>{n.has(e.id)||(n.add(e.id),t.push(e))};r({id:`item:brand`,label:J(Z[`ui.app_shell.brand_item`]),slot:`header.start`,render:L});for(let e of Ze){let t=c.slots?.[e];t&&r({id:it(e),label:J(Z[`ui.app_shell.slot_content`],{slot:J(Vr[e])}),slot:e,render:t})}for(let e of xe())r({...e});for(let e of be())r({id:rt(e.tool),label:e.label,slot:e.slot??`header.end`,toggle:e});return Se()&&!e(je)&&r({id:`item:layout-edit`,label:J(Z[`ui.layout_edit.toggle`]),slot:typeof Se()==`object`?Se().slot??`header.end`:`header.end`,render:D,fixed:!0}),G()!==!1&&r({id:ke,label:J(Z[`ui.app_shell.color_scheme_item`]),slot:(typeof G()==`object`?G().slot:void 0)??(X.viewport===`phone`?`header.end`:`leftSidebar.footer`),render:sc}),c.commandPalette&&r({id:`item:command-palette`,label:J(Z[`ui.app_shell.command_palette_item`]),slot:`header.center`,render:ne}),he()&&pe()!==!1&&r({id:Oe,label:J(Z[`ui.app_shell.account_item`]),slot:(typeof pe()==`object`?pe().slot:void 0)??(X.viewport===`phone`?`header.end`:`leftSidebar.footer`),render:N}),t});function Me(e){let t=c.phoneDock??(Hs(Ee())?`sheet`:void 0),n=e?.right;return!t||n===!1||!c.phoneDock&&n?.phone!==void 0?e:{...e,right:{...n,phone:t}}}let X=R(()=>wn({config:Me(c.config),storageKey:se(),layoutPanels:vt(c.layout).panels})),Ne=A(void 0),Pe=n(()=>c.layout!==void 0),Fe=n(()=>vt(e(Pe)?c.layout:c.onlayoutchange?e(Ne):X.settings.layout)),Ie=n(()=>wt(W(),ce(),c.config,e(Fe))),Le=n(()=>e(Ie).nav.length>0||e(Ie).groups.length>0),Re=n(()=>Hs(Ee())?.items??0),ze=n(()=>Us(e(Ie).nav,e(Ie).groups,we(),c.sectionHref)),Be=n(()=>e(Re)>0&&(e(ze).length>0||be().length>0)),Ve=n(()=>e(Be)?be()[0]:void 0),He=n(()=>Ut(e(Y),e(Fe))),Ue=t=>{let n=new Map(e(Y).map(e=>[e.id,e]));return e(He)[t].flatMap(t=>t===Oe&&e(tt)||t===ke&&e(nt)?[]:n.get(t)??[])},We={"header.start":d,"header.center":f,"header.end":h,"footer.start":g,"footer.center":v,"footer.end":y,"leftSidebar.header":b,"leftSidebar.footer":x,"rightSidebar.header":S,"rightSidebar.footer":w},Ge=n(()=>{let e={};for(let t of Ze)Ue(t).length>0&&(e[t]=We[t]);return e}),Ke=new Map;j(()=>{let t=e(Fe).panels??{};X.setLayoutPanels(t);for(let[e,n]of Ke)(t[e]?.initial??Zt(c.config).panels[e].initial)===n&&X.setPanelStart(e,n);Ke.clear()});let qe=new di({editable:()=>!!Se(),nav:()=>W(),groups:()=>ce(),panels:()=>c.config,layout:()=>e(Fe),items:()=>e(Y).map(({id:e,label:t,slot:n})=>({id:e,label:t,slot:n})),commit(t){for(let n of Kt){let r=e(Fe).panels?.[n]?.initial,i=t.panels?.[n]?.initial;if(r===i)continue;let a=i??Zt(c.config).panels[n].initial;(a===`collapsed`||a===`expanded`)&&Ke.set(n,a)}e(Pe)||(c.onlayoutchange?H(Ne,t,!0):X.setLayout(t)),c.onlayoutchange?.(t)}});K(qe);let Je=n(()=>qe.editing),Ye=A(void 0),$e=n(()=>Ze.find(t=>e(He)[t].includes(Oe))),tt=n(()=>e($e)===`leftSidebar.footer`&&!e(Je)&&X.viewport!==`phone`&&X.isEdgeShown(`left`)&&X.panels.left===`collapsed`),nt=n(()=>e(He)[`leftSidebar.footer`].includes(ke)&&!e(Je)&&X.viewport!==`phone`&&X.isEdgeShown(`left`)),at=n(()=>{if(X.viewport===`phone`||!e($e))return!0;let t=Qe(e($e));return t!==`leftSidebar`&&t!==`rightSidebar`||!X.isRegionVisible(t)});function ot(e,t){if(t)return`inline-end`;if(!e)return`bottom-end`;let n=et(e,e=>X.isRegionVisible(e))??e,r=Qe(n),i=r===`footer`||n.endsWith(`.footer`),a=n.endsWith(`.start`)||r===`leftSidebar`;return i?a?`top-start`:`top-end`:a?`bottom-start`:`bottom-end`}let st=n(()=>{let e=he()??{};return{name:typeof e.name==`string`?e.name.trim():``,email:typeof e.email==`string`?e.email.trim():``,avatarUrl:typeof e.avatarUrl==`string`&&e.avatarUrl?e.avatarUrl:void 0}}),ct=n(he),lt=n(()=>{if(!e(je))return;let t=`calc(2.75rem + var(--smrt-spacing-3))`,n=X.isRegionVisible(`header`),r=X.isEdgeShown(`right`);return{inline:n?t:`0px`,block:!n&&r?t:`0px`,main:!n&&!r?t:`0px`}}),ut=A(``),Q=!1;j(()=>{let t=e(Je);t!==Q&&(Q=t,H(ut,J(t?Z[`ui.layout_edit.announce_on`]:Z[`ui.layout_edit.announce_off`]),!0))});let dt=[`header.start`,`header.center`,`header.end`,`leftSidebar.header`,`rightSidebar.header`,`leftSidebar.footer`,`rightSidebar.footer`,`footer.start`,`footer.center`,`footer.end`],ft=e=>X.isRegionVisible(e),pt=n(()=>dt.filter(e=>ft(Qe(e))));function mt(e){return J(Z[`ui.layout_edit.zone`],{region:J(Ur[Qe(e)]),slot:J(Hr[e])})}function ht(e){let t=Ue(e),n=Ze.filter(t=>t!==e&&et(t,ft)===e).flatMap(e=>Ue(e));return[...t,...n]}let gt=e=>ht(e).filter(e=>!e.fixed),_t=ge({root:()=>e(Ye),selectors:{container:`[data-smrt-edit-zone]`,containerKey:`smrtEditZone`,item:`[data-smrt-edit-item]`,itemKey:`smrtEditItem`},containers:()=>e(pt).map(e=>({id:e,label:mt(e)})),itemIds:e=>gt(e).map(e=>e.id),itemLabel:t=>e(Y).find(e=>e.id===t&&!e.fixed)?.label,allowSameContainerReorder:()=>!1,enabled:()=>e(Je),orientation:()=>`vertical`,announce:e=>bi(J,e),focusTarget:e=>e.querySelector(`[data-smrt-edit-handle]`),commit(e){qe.placeItem(e.itemId,e.target.containerId)}});j(()=>{let t=e(Ye);if(!t||!e(Je))return;let n=e=>{_t.drag&&e.preventDefault()},r=e=>{if(!_t.drag||!(e.target instanceof Element))return;let t=e.target.closest(`[data-smrt-edit-zone]`);t?.dataset.smrtEditZone&&_t.dropOnContainer(e,t.dataset.smrtEditZone)};return t.addEventListener(`dragover`,n),t.addEventListener(`drop`,r),()=>{t.removeEventListener(`dragover`,n),t.removeEventListener(`drop`,r)}});let yt={top:`header`,bottom:`footer`,left:`leftSidebar`,right:`rightSidebar`},bt=n(()=>qe.panels.filter(e=>e.available&&!e.visible).map(e=>yt[e.edge])),xt=n(()=>({active:e(Je),highlight:_t.drag?.target.containerId??null,zone:ee,hiddenRegions:e(bt),strip:ie,regionControl:re})),St=n(()=>qe.panels.filter(e=>e.available&&e.visible).length),Ct=[];j(()=>{e(Je)?R(()=>{if(X.viewport!==`phone`)for(let e of[`left`,`right`])X.config.panels[e].rail!==!1&&X.revealPanelTemporarily(e)&&Ct.push(e)}):R(()=>{for(let e of Ct)X.endTemporaryReveal(e);Ct=[]})}),j(()=>{if(!e(Je))return;let t=t=>{t.key!==`Escape`||t.defaultPrevented||_t.drag||e(Ye)?.querySelector(`[data-toolbar-open]`)||qe.setEditing(!1)};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)});async function Tt(){await ic(async()=>{qe.setEditing(!qe.editing),await ae()})}let Et={header:`top`,footer:`bottom`,leftSidebar:`left`,rightSidebar:`right`};Io(a,{get webmcp(){return me()},get user(){return e(ct)},get permissions(){return q()},children:(r,i)=>{var a=mc(),s=z(a);Qs(s,{get enabled(){return _e()}});var u=P(s,2);Ae(u,{get preset(){return ve()},get colorScheme(){return ye()},get borderRadius(){return c.borderRadius},get density(){return c.density},get contrast(){return c.contrast},persist:!0,children:(r,i)=>{var a=T(),s=z(a),u=e=>{var t=T(),n=z(t);o(n,()=>c.children),C(e,t)},d=r=>{{let i=e=>{ci(e,{get appName(){return U()},get tenantName(){return ue()},get environment(){return fe()},showSettings:!1,docs:e=>{var n=mc(),r=z(n);o(r,()=>c.appPanelDocs??m);var i=P(r,2),a=e=>{var t=pc(),n=I(t,!0);B(e=>{V(t,`href`,c.settingsHref),l(n,e)},[()=>J(Z[`ui.app_shell.settings_link`])]),C(e,t)};t(i,e=>{c.settingsHref&&e(a)}),C(e,n)},$$slots:{docs:!0}})},a=r=>{var i=T(),a=z(i),o=t=>{{let r=n(()=>J(Z[`ui.app_shell.navigation`]));ea(t,{collapsed:!0,get items(){return e(Ie).nav},get groups(){return e(Ie).groups},get currentHref(){return le()},get navMode(){return we()},get sectionHref(){return c.sectionHref},get iconComponent(){return c.iconComponent},get"aria-label"(){return e(r)}})}};t(a,t=>{!e(Je)&&e(Le)&&t(o)}),C(r,i)},s=r=>{var i=T(),a=z(i),o=t=>{{let r=n(()=>J(Z[`ui.app_shell.navigation`]));da(t,{get"aria-label"(){return e(r)},get sectionActions(){return c.sectionActions},get navMode(){return we()},get iconComponent(){return c.iconComponent}})}},s=t=>{{let r=n(()=>J(Z[`ui.app_shell.navigation`]));ea(t,{get items(){return e(Ie).nav},get groups(){return e(Ie).groups},get currentHref(){return le()},get navMode(){return we()},get sectionHref(){return c.sectionHref},get iconComponent(){return c.iconComponent},get"aria-label"(){return e(r)}})}};t(a,t=>{e(Je)?t(o):e(Le)&&t(s,1)}),C(r,i)},u=n(()=>be().length===0&&!e(Be)),d=n(()=>e(Be)?oe:void 0),f=n(()=>e(tt)?F:void 0),p=n(()=>e(nt)?sc:void 0);Ir(r,{get title(){return U()},get subtitle(){return c.subtitle},get logoSrc(){return c.logoSrc},get logoAlt(){return c.logoAlt},get homeHref(){return c.homeHref},get state(){return X},get path(){return le()},get slots(){return e(Ge)},get layoutEdit(){return e(xt)},get edgeToggles(){return Te()},get hotkeys(){return c.hotkeys},brandInSlot:!0,get phoneDockOpener(){return e(u)},get phoneBottomBar(){return e(d)},get tenantRailFooter(){return e(f)},get tenantUtilities(){return e(p)},get floatingReserve(){return e(lt)},get rootElement(){return e(Ye)},set rootElement(e){H(Ye,e,!0)},appPanel:i,tenantRail:a,tenantPanel:s,children:(n,r)=>{var i=gc(),a=z(i),s=I(a,!0),u=P(a,2),d=e=>{var t=hc(),n=I(t,!0);B(()=>l(n,_t.announcement)),C(e,t)};t(u,t=>{e(Je)&&t(d)});var f=P(u,2),p=e=>{D(e)};t(f,t=>{e(je)&&t(p)});var m=P(f,2),h=e=>{js(e,{get dock(){return c.dock}})};t(m,e=>{c.dock&&e(h)});var g=P(m,2);o(g,()=>c.children),B(()=>l(s,e(ut))),C(n,i)},$$slots:{appPanel:!0,tenantRail:!0,tenantPanel:!0,default:!0}})}};t(s,e=>{De()?e(d,-1):e(u)}),C(r,a)},$$slots:{default:!0}}),C(r,a)},$$slots:{default:!0}}),r()}D([`click`,`keydown`,`pointerdown`,`pointermove`,`pointerup`]);export{Z as _,Io as a,Ha as c,wa as d,ea as f,ut as g,wt as h,As as i,Ba as l,di as m,ac as n,Ua as o,Mi as p,ic as r,Pa as s,_c as t,Va as u,Ve as v,Be as y};