@eventcatalog/core 0.6.4 → 0.6.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.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +61 -70
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1bay4w0 +1 -1
- package/.next/cache/next-server.js.nft.json +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +4 -4
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/29.js +3 -2
- package/.next/server/chunks/{189.js → 362.js} +71 -2
- package/.next/server/chunks/944.js +11 -6
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderComplete/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderComplete/logs.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderComplete.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderComplete.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderConfirmed/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderConfirmed/logs.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderConfirmed.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderConfirmed.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderRequested/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderRequested/logs.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderRequested.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderRequested.json +1 -1
- package/.next/server/pages/domains/Orders/services/Orders Service.html +2 -2
- package/.next/server/pages/domains/Orders/services/Orders Service.json +1 -1
- package/.next/server/pages/domains/Orders.html +2 -2
- package/.next/server/pages/domains/Orders.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/logs.html +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/logs.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.1.html +2 -2
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.1.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.2.html +2 -2
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.2.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart.html +2 -2
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart.json +1 -1
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart/logs.html +1 -1
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart/logs.json +1 -1
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart.html +2 -2
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart.json +1 -1
- package/.next/server/pages/domains/Shopping.html +2 -2
- package/.next/server/pages/domains/Shopping.json +1 -1
- package/.next/server/pages/domains/[domain]/events/[name]/v/[version].js +1 -1
- package/.next/server/pages/domains/[domain]/events/[name]/v/[version].js.nft.json +1 -1
- package/.next/server/pages/domains/[domain]/events/[name].js +1 -1
- package/.next/server/pages/domains/[domain]/events/[name].js.nft.json +1 -1
- package/.next/server/pages/domains/[domain]/services/[name].js +1 -1
- package/.next/server/pages/domains/[domain]/services/[name].js.nft.json +1 -1
- package/.next/server/pages/domains/[domain].js +1 -1
- package/.next/server/pages/domains/[domain].js.nft.json +1 -1
- package/.next/server/pages/domains.html +2 -2
- package/.next/server/pages/domains.json +1 -1
- package/.next/server/pages/events/PaymentProcessed/logs.html +1 -1
- package/.next/server/pages/events/PaymentProcessed/logs.json +1 -1
- package/.next/server/pages/events/PaymentProcessed.html +2 -2
- package/.next/server/pages/events/PaymentProcessed.json +1 -1
- package/.next/server/pages/events/ShipmentDelivered/logs.html +1 -1
- package/.next/server/pages/events/ShipmentDelivered/logs.json +1 -1
- package/.next/server/pages/events/ShipmentDelivered.html +2 -2
- package/.next/server/pages/events/ShipmentDelivered.json +1 -1
- package/.next/server/pages/events/ShipmentDispatched/logs.html +1 -1
- package/.next/server/pages/events/ShipmentDispatched/logs.json +1 -1
- package/.next/server/pages/events/ShipmentDispatched.html +2 -2
- package/.next/server/pages/events/ShipmentDispatched.json +1 -1
- package/.next/server/pages/events/ShipmentPrepared/logs.html +1 -1
- package/.next/server/pages/events/ShipmentPrepared/logs.json +1 -1
- package/.next/server/pages/events/ShipmentPrepared.html +2 -2
- package/.next/server/pages/events/ShipmentPrepared.json +1 -1
- package/.next/server/pages/events/[name]/v/[version].js +1 -1
- package/.next/server/pages/events/[name]/v/[version].js.nft.json +1 -1
- package/.next/server/pages/events/[name].js +1 -1
- package/.next/server/pages/events/[name].js.nft.json +1 -1
- package/.next/server/pages/events.html +2 -2
- package/.next/server/pages/events.json +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/overview.json +1 -1
- package/.next/server/pages/services/Orders Service.html +1 -1
- package/.next/server/pages/services/Payment Service.html +2 -2
- package/.next/server/pages/services/Payment Service.json +1 -1
- package/.next/server/pages/services/Shipping Service.html +2 -2
- package/.next/server/pages/services/Shipping Service.json +1 -1
- package/.next/server/pages/services/[name].js +1 -1
- package/.next/server/pages/services/[name].js.nft.json +1 -1
- package/.next/server/pages/services.html +2 -2
- package/.next/server/pages/services.json +1 -1
- package/.next/server/pages/users/dboyne.html +2 -2
- package/.next/server/pages/users/dboyne.json +1 -1
- package/.next/server/pages/users/mSmith.html +2 -2
- package/.next/server/pages/users/mSmith.json +1 -1
- package/.next/server/pages/visualiser.html +2 -2
- package/.next/server/pages/visualiser.json +1 -1
- package/.next/server/pages-manifest.json +2 -2
- package/.next/static/chunks/146-c737b0e704703b2a.js +1 -0
- package/.next/static/chunks/176cb4e4-67d43b8f14a05371.js +1 -0
- package/.next/static/chunks/178-78d930ce964e8411.js +1 -0
- package/.next/static/chunks/{238.759fe985504715b6.js → 238.c050b1795bc61364.js} +1 -1
- package/.next/static/chunks/434-d3ed786e5ed5986a.js +1 -0
- package/{out/_next/static/chunks/169-842b4bee63c8d6f3.js → .next/static/chunks/493-1df1b4f8288c7124.js} +1 -1
- package/.next/static/chunks/57.0a6f5466e4087c4d.js +1 -0
- package/.next/static/chunks/{586.0639e54142b33dc7.js → 586.da43f27c00dd3d61.js} +1 -1
- package/.next/static/chunks/639-b8e1e1c3e370236e.js +1 -0
- package/.next/static/chunks/{839-08b84a92f631817b.js → 811-51ff2b850f52d428.js} +1 -1
- package/.next/static/chunks/pages/domains/[domain]/events/[name]/v/{[version]-3e6462ca32e0be58.js → [version]-05556ebcad9ae000.js} +1 -1
- package/.next/static/chunks/pages/domains/[domain]/events/{[name]-79a57e782e7c84e5.js → [name]-fa11d446706c2949.js} +1 -1
- package/.next/static/chunks/pages/domains/[domain]/services/{[name]-296caddae2d12a1a.js → [name]-ea2539b1dbee4586.js} +1 -1
- package/.next/static/chunks/pages/domains/[domain]-31c942126951a3af.js +1 -0
- package/.next/static/chunks/pages/events/[name]/v/{[version]-7755f313803e44ce.js → [version]-13cc9e190e15b774.js} +1 -1
- package/.next/static/chunks/pages/events/{[name]-c1ad9e814385d45e.js → [name]-7ceb1eb370b75fed.js} +1 -1
- package/.next/static/chunks/pages/events-634c972c10d7d4fa.js +1 -0
- package/{out/_next/static/chunks/pages/overview-39a9b04fa44518aa.js → .next/static/chunks/pages/overview-edd91cd051b5d6df.js} +1 -1
- package/.next/static/chunks/pages/services/{[name]-a905da8104f827fe.js → [name]-f22181ce37113a27.js} +1 -1
- package/.next/static/chunks/pages/services-9231149c854ea798.js +1 -0
- package/.next/static/chunks/pages/users/[id]-fe1d5cc960b430c7.js +1 -0
- package/.next/static/chunks/webpack-7c217f5007256cc6.js +1 -0
- package/.next/static/wpvNs-nDSTcrUYnkwB12E/_buildManifest.js +1 -0
- package/.next/trace +84 -106
- package/CHANGELOG.md +12 -0
- package/components/Sidebars/EventSidebar.tsx +3 -0
- package/lib/__tests__/assets/events/AddedItemToCart/index.md +5 -1
- package/lib/__tests__/domains.spec.ts +8 -0
- package/lib/__tests__/events.spec.ts +36 -0
- package/lib/__tests__/services.spec.ts +3 -0
- package/lib/events.ts +13 -1
- package/out/404/index.html +2 -2
- package/out/404.html +2 -2
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Orders/events/OrderComplete/logs.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Orders/events/OrderComplete.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Orders/events/OrderConfirmed/logs.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Orders/events/OrderConfirmed.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Orders/events/OrderRequested/logs.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Orders/events/OrderRequested.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Orders/services/Orders Service.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Orders.json +1 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → wpvNs-nDSTcrUYnkwB12E}/domains/Shopping/events/AddedItemToCart/logs.json +1 -1
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Shopping/events/AddedItemToCart/v/0.0.1.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Shopping/events/AddedItemToCart/v/0.0.2.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Shopping/events/AddedItemToCart.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Shopping/events/RemovedItemFromCart/logs.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Shopping/events/RemovedItemFromCart.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains/Shopping.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/domains.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/events/PaymentProcessed/logs.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/events/PaymentProcessed.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/events/ShipmentDelivered/logs.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/events/ShipmentDelivered.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/events/ShipmentDispatched/logs.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/events/ShipmentDispatched.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/events/ShipmentPrepared/logs.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/events/ShipmentPrepared.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/events.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/overview.json +1 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → wpvNs-nDSTcrUYnkwB12E}/services/Payment Service.json +1 -1
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/services/Shipping Service.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/services.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/users/dboyne.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/users/mSmith.json +1 -0
- package/out/_next/data/wpvNs-nDSTcrUYnkwB12E/visualiser.json +1 -0
- package/out/_next/static/chunks/146-c737b0e704703b2a.js +1 -0
- package/out/_next/static/chunks/176cb4e4-67d43b8f14a05371.js +1 -0
- package/out/_next/static/chunks/178-78d930ce964e8411.js +1 -0
- package/out/_next/static/chunks/{238.759fe985504715b6.js → 238.c050b1795bc61364.js} +1 -1
- package/out/_next/static/chunks/434-d3ed786e5ed5986a.js +1 -0
- package/{.next/static/chunks/169-842b4bee63c8d6f3.js → out/_next/static/chunks/493-1df1b4f8288c7124.js} +1 -1
- package/out/_next/static/chunks/57.0a6f5466e4087c4d.js +1 -0
- package/out/_next/static/chunks/{586.0639e54142b33dc7.js → 586.da43f27c00dd3d61.js} +1 -1
- package/out/_next/static/chunks/639-b8e1e1c3e370236e.js +1 -0
- package/out/_next/static/chunks/{839-08b84a92f631817b.js → 811-51ff2b850f52d428.js} +1 -1
- package/out/_next/static/chunks/pages/domains/[domain]/events/[name]/v/{[version]-3e6462ca32e0be58.js → [version]-05556ebcad9ae000.js} +1 -1
- package/out/_next/static/chunks/pages/domains/[domain]/events/{[name]-79a57e782e7c84e5.js → [name]-fa11d446706c2949.js} +1 -1
- package/out/_next/static/chunks/pages/domains/[domain]/services/{[name]-296caddae2d12a1a.js → [name]-ea2539b1dbee4586.js} +1 -1
- package/out/_next/static/chunks/pages/domains/[domain]-31c942126951a3af.js +1 -0
- package/out/_next/static/chunks/pages/events/[name]/v/{[version]-7755f313803e44ce.js → [version]-13cc9e190e15b774.js} +1 -1
- package/out/_next/static/chunks/pages/events/{[name]-c1ad9e814385d45e.js → [name]-7ceb1eb370b75fed.js} +1 -1
- package/out/_next/static/chunks/pages/events-634c972c10d7d4fa.js +1 -0
- package/{.next/static/chunks/pages/overview-39a9b04fa44518aa.js → out/_next/static/chunks/pages/overview-edd91cd051b5d6df.js} +1 -1
- package/out/_next/static/chunks/pages/services/{[name]-a905da8104f827fe.js → [name]-f22181ce37113a27.js} +1 -1
- package/out/_next/static/chunks/pages/services-9231149c854ea798.js +1 -0
- package/out/_next/static/chunks/pages/users/[id]-fe1d5cc960b430c7.js +1 -0
- package/out/_next/static/chunks/webpack-7c217f5007256cc6.js +1 -0
- package/out/_next/static/wpvNs-nDSTcrUYnkwB12E/_buildManifest.js +1 -0
- package/out/domains/Orders/events/OrderComplete/index.html +2 -2
- package/out/domains/Orders/events/OrderComplete/logs/index.html +1 -1
- package/out/domains/Orders/events/OrderConfirmed/index.html +2 -2
- package/out/domains/Orders/events/OrderConfirmed/logs/index.html +1 -1
- package/out/domains/Orders/events/OrderRequested/index.html +2 -2
- package/out/domains/Orders/events/OrderRequested/logs/index.html +1 -1
- package/out/domains/Orders/index.html +2 -2
- package/out/domains/Orders/services/Orders Service/index.html +2 -2
- package/out/domains/Shopping/events/AddedItemToCart/index.html +2 -2
- package/out/domains/Shopping/events/AddedItemToCart/logs/index.html +1 -1
- package/out/domains/Shopping/events/AddedItemToCart/v/0.0.1/index.html +2 -2
- package/out/domains/Shopping/events/AddedItemToCart/v/0.0.2/index.html +2 -2
- package/out/domains/Shopping/events/RemovedItemFromCart/index.html +2 -2
- package/out/domains/Shopping/events/RemovedItemFromCart/logs/index.html +1 -1
- package/out/domains/Shopping/index.html +2 -2
- package/out/domains/index.html +2 -2
- package/out/events/PaymentProcessed/index.html +2 -2
- package/out/events/PaymentProcessed/logs/index.html +1 -1
- package/out/events/ShipmentDelivered/index.html +2 -2
- package/out/events/ShipmentDelivered/logs/index.html +1 -1
- package/out/events/ShipmentDispatched/index.html +2 -2
- package/out/events/ShipmentDispatched/logs/index.html +1 -1
- package/out/events/ShipmentPrepared/index.html +2 -2
- package/out/events/ShipmentPrepared/logs/index.html +1 -1
- package/out/events/index.html +2 -2
- package/out/index.html +1 -1
- package/out/overview/index.html +1 -1
- package/out/services/Orders Service/index.html +1 -1
- package/out/services/Payment Service/index.html +2 -2
- package/out/services/Shipping Service/index.html +2 -2
- package/out/services/index.html +2 -2
- package/out/users/dboyne/index.html +2 -2
- package/out/users/mSmith/index.html +2 -2
- package/out/visualiser/index.html +2 -2
- package/package.json +3 -3
- package/.next/server/chunks/778.js +0 -76
- package/.next/static/chunks/226-454462990cd604b0.js +0 -1
- package/.next/static/chunks/288-e3ed06e784826495.js +0 -1
- package/.next/static/chunks/2e6ef0e3-0ae424029c3b4f45.js +0 -1
- package/.next/static/chunks/573.c9dc2cb5579f4bb9.js +0 -1
- package/.next/static/chunks/650-01c824b1bc28786b.js +0 -1
- package/.next/static/chunks/806-c89f87f1d2d47d2a.js +0 -1
- package/.next/static/chunks/853-190dbaf314630cbc.js +0 -1
- package/.next/static/chunks/pages/domains/[domain]-13e3deffff5f51f9.js +0 -1
- package/.next/static/chunks/pages/events-ea201dfa32df6bfc.js +0 -1
- package/.next/static/chunks/pages/services-472be0d0db2bd27d.js +0 -1
- package/.next/static/chunks/pages/users/[id]-98fca0e0212ff199.js +0 -1
- package/.next/static/chunks/webpack-e52859ed7813ba21.js +0 -1
- package/.next/static/dzGI06ebzOu6e1ZN7Y01r/_buildManifest.js +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Orders/events/OrderComplete/logs.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Orders/events/OrderComplete.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Orders/events/OrderConfirmed/logs.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Orders/events/OrderConfirmed.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Orders/events/OrderRequested/logs.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Orders/events/OrderRequested.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Orders/services/Orders Service.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Orders.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Shopping/events/AddedItemToCart/v/0.0.1.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Shopping/events/AddedItemToCart/v/0.0.2.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Shopping/events/AddedItemToCart.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Shopping/events/RemovedItemFromCart/logs.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Shopping/events/RemovedItemFromCart.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains/Shopping.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/domains.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/events/PaymentProcessed/logs.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/events/PaymentProcessed.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/events/ShipmentDelivered/logs.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/events/ShipmentDelivered.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/events/ShipmentDispatched/logs.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/events/ShipmentDispatched.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/events/ShipmentPrepared/logs.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/events/ShipmentPrepared.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/events.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/overview.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/services/Shipping Service.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/services.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/users/dboyne.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/users/mSmith.json +0 -1
- package/out/_next/data/dzGI06ebzOu6e1ZN7Y01r/visualiser.json +0 -1
- package/out/_next/static/chunks/226-454462990cd604b0.js +0 -1
- package/out/_next/static/chunks/288-e3ed06e784826495.js +0 -1
- package/out/_next/static/chunks/2e6ef0e3-0ae424029c3b4f45.js +0 -1
- package/out/_next/static/chunks/573.c9dc2cb5579f4bb9.js +0 -1
- package/out/_next/static/chunks/650-01c824b1bc28786b.js +0 -1
- package/out/_next/static/chunks/806-c89f87f1d2d47d2a.js +0 -1
- package/out/_next/static/chunks/853-190dbaf314630cbc.js +0 -1
- package/out/_next/static/chunks/pages/domains/[domain]-13e3deffff5f51f9.js +0 -1
- package/out/_next/static/chunks/pages/events-ea201dfa32df6bfc.js +0 -1
- package/out/_next/static/chunks/pages/services-472be0d0db2bd27d.js +0 -1
- package/out/_next/static/chunks/pages/users/[id]-98fca0e0212ff199.js +0 -1
- package/out/_next/static/chunks/webpack-e52859ed7813ba21.js +0 -1
- package/out/_next/static/dzGI06ebzOu6e1ZN7Y01r/_buildManifest.js +0 -1
- /package/.next/static/{dzGI06ebzOu6e1ZN7Y01r → wpvNs-nDSTcrUYnkwB12E}/_ssgManifest.js +0 -0
- /package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → wpvNs-nDSTcrUYnkwB12E}/services/Orders Service.json +0 -0
- /package/out/_next/static/{dzGI06ebzOu6e1ZN7Y01r → wpvNs-nDSTcrUYnkwB12E}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[347],{16531:function(t,e,i){i.d(e,{Z:function(){return kd}});var r=i(8475),n=i(18643),s=i(59229),a=i(35368),o=i(86342),l=i(33933),h=i(15459),d=i(71598),u=i(85177),p=i(77068),g=i(59452),y=i(41561),f=i(98348),m=i(91264),b=i(61936),x=i(20546),k=(i(90995),i(41822),i(12855)),_=(i(95292),i(53244),i(7279)),C=Object.defineProperty,T=(t,e,i)=>(((t,e,i)=>{e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!==typeof e?e+"":e,i),i);const E={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},v={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},S=function(t="fatal"){let e=E.fatal;"string"===typeof t?(t=t.toLowerCase())in E&&(e=E[t]):"number"===typeof t&&(e=t),v.trace=()=>{},v.debug=()=>{},v.info=()=>{},v.warn=()=>{},v.error=()=>{},v.fatal=()=>{},e<=E.fatal&&(v.fatal=console.error?console.error.bind(console,A("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",A("FATAL"))),e<=E.error&&(v.error=console.error?console.error.bind(console,A("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",A("ERROR"))),e<=E.warn&&(v.warn=console.warn?console.warn.bind(console,A("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",A("WARN"))),e<=E.info&&(v.info=console.info?console.info.bind(console,A("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",A("INFO"))),e<=E.debug&&(v.debug=console.debug?console.debug.bind(console,A("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",A("DEBUG"))),e<=E.trace&&(v.trace=console.debug?console.debug.bind(console,A("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",A("TRACE")))},A=t=>`%c${r().format("ss.SSS")} : ${t} : `,w=t=>a.sanitize(t),B=(t,e)=>{var i;if(!1!==(null==(i=e.flowchart)?void 0:i.htmlLabels)){const i=e.securityLevel;"antiscript"===i||"strict"===i?t=w(t):"loose"!==i&&(t=(t=(t=O(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=D(t))}return t},L=(t,e)=>t?t=e.dompurifyConfig?a.sanitize(B(t,e),e.dompurifyConfig).toString():a.sanitize(B(t,e),{FORBID_TAGS:["style"]}).toString():t,I=/<br\s*\/?>/gi,D=t=>t.replace(/#br#/g,"<br/>"),O=t=>t.replace(I,"#br#"),F=t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),N=function(t){let e=t;return t.includes("~")?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),N(e)):e},$={getRows:t=>{if(!t)return[""];return O(t).replace(/\\n/g,"#br#").split("#br#")},sanitizeText:L,sanitizeTextOrArray:(t,e)=>"string"===typeof t?L(t,e):t.flat().map((t=>L(t,e))),hasBreaks:t=>I.test(t),splitBreaks:t=>t.split(I),lineBreakRegex:I,removeScript:w,getUrl:t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},evaluate:F},R=(t,e)=>e?(0,o.Z)(t,{s:-40,l:10}):(0,o.Z)(t,{s:-40,l:-10}),M="#ffffff",P="#f2f2f2";class Y{constructor(){this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||(0,o.Z)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,o.Z)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||(0,l.Z)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,l.Z)(this.tertiaryColor),this.lineColor=this.lineColor||(0,l.Z)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,h.Z)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,h.Z)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,l.Z)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.Z)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,o.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,o.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,o.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,o.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,o.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,o.Z)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,o.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,o.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,o.Z)(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.Z)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.Z)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,l.Z)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.Z)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.Z)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||(0,o.Z)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||(0,o.Z)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||(0,o.Z)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||(0,o.Z)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||(0,o.Z)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||(0,o.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||(0,o.Z)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,o.Z)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||(0,o.Z)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||(0,o.Z)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,o.Z)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,o.Z)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,o.Z)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||(0,o.Z)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||(0,o.Z)(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.Z)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,o.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,o.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,o.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,o.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,o.Z)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.Z)(this.git0,25),this.git1=(0,d.Z)(this.git1,25),this.git2=(0,d.Z)(this.git2,25),this.git3=(0,d.Z)(this.git3,25),this.git4=(0,d.Z)(this.git4,25),this.git5=(0,d.Z)(this.git5,25),this.git6=(0,d.Z)(this.git6,25),this.git7=(0,d.Z)(this.git7,25)):(this.git0=(0,h.Z)(this.git0,25),this.git1=(0,h.Z)(this.git1,25),this.git2=(0,h.Z)(this.git2,25),this.git3=(0,h.Z)(this.git3,25),this.git4=(0,h.Z)(this.git4,25),this.git5=(0,h.Z)(this.git5,25),this.git6=(0,h.Z)(this.git6,25),this.git7=(0,h.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,l.Z)(this.git0),this.gitInv1=this.gitInv1||(0,l.Z)(this.git1),this.gitInv2=this.gitInv2||(0,l.Z)(this.git2),this.gitInv3=this.gitInv3||(0,l.Z)(this.git3),this.gitInv4=this.gitInv4||(0,l.Z)(this.git4),this.gitInv5=this.gitInv5||(0,l.Z)(this.git5),this.gitInv6=this.gitInv6||(0,l.Z)(this.git6),this.gitInv7=this.gitInv7||(0,l.Z)(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||M,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P}calculate(t){if("object"!==typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}class z{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.Z)(this.primaryColor,16),this.tertiaryColor=(0,o.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,l.Z)(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.Z)(this.primaryColor),this.secondaryTextColor=(0,l.Z)(this.secondaryColor),this.tertiaryTextColor=(0,l.Z)(this.tertiaryColor),this.lineColor=(0,l.Z)(this.background),this.textColor=(0,l.Z)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.Z)((0,l.Z)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=(0,u.Z)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,h.Z)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=(0,u.Z)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,u.Z)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,d.Z)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,d.Z)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,d.Z)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,o.Z)(this.primaryColor,{h:64}),this.fillType3=(0,o.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,o.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,o.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,o.Z)(this.primaryColor,{h:128}),this.fillType7=(0,o.Z)(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,o.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,o.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,o.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,o.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,o.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,o.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,o.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,o.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,o.Z)(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,l.Z)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.Z)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.Z)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,d.Z)(this.secondaryColor,20),this.git1=(0,d.Z)(this.pie2||this.secondaryColor,20),this.git2=(0,d.Z)(this.pie3||this.tertiaryColor,20),this.git3=(0,d.Z)(this.pie4||(0,o.Z)(this.primaryColor,{h:-30}),20),this.git4=(0,d.Z)(this.pie5||(0,o.Z)(this.primaryColor,{h:-60}),20),this.git5=(0,d.Z)(this.pie6||(0,o.Z)(this.primaryColor,{h:-90}),10),this.git6=(0,d.Z)(this.pie7||(0,o.Z)(this.primaryColor,{h:60}),10),this.git7=(0,d.Z)(this.pie8||(0,o.Z)(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||(0,l.Z)(this.git0),this.gitInv1=this.gitInv1||(0,l.Z)(this.git1),this.gitInv2=this.gitInv2||(0,l.Z)(this.git2),this.gitInv3=this.gitInv3||(0,l.Z)(this.git3),this.gitInv4=this.gitInv4||(0,l.Z)(this.git4),this.gitInv5=this.gitInv5||(0,l.Z)(this.git5),this.gitInv6=this.gitInv6||(0,l.Z)(this.git6),this.gitInv7=this.gitInv7||(0,l.Z)(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,d.Z)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,d.Z)(this.background,2)}calculate(t){if("object"!==typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}class j{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=(0,o.Z)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=(0,o.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.Z)(this.primaryColor),this.secondaryTextColor=(0,l.Z)(this.secondaryColor),this.tertiaryTextColor=(0,l.Z)(this.tertiaryColor),this.lineColor=(0,l.Z)(this.background),this.textColor=(0,l.Z)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,u.Z)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,o.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,o.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,o.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,o.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,o.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,o.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,o.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,o.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,o.Z)(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.Z)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.Z)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.Z)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.Z)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,o.Z)(this["cScale"+t],{h:180});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||(0,l.Z)(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||(0,l.Z)(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,d.Z)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,o.Z)(this.primaryColor,{h:64}),this.fillType3=(0,o.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,o.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,o.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,o.Z)(this.primaryColor,{h:128}),this.fillType7=(0,o.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||(0,o.Z)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||(0,o.Z)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,o.Z)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,o.Z)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||(0,o.Z)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||(0,o.Z)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||(0,o.Z)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||(0,o.Z)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||(0,o.Z)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||(0,o.Z)(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,o.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,o.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,o.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,o.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,o.Z)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.Z)(this.git0,25),this.git1=(0,d.Z)(this.git1,25),this.git2=(0,d.Z)(this.git2,25),this.git3=(0,d.Z)(this.git3,25),this.git4=(0,d.Z)(this.git4,25),this.git5=(0,d.Z)(this.git5,25),this.git6=(0,d.Z)(this.git6,25),this.git7=(0,d.Z)(this.git7,25)):(this.git0=(0,h.Z)(this.git0,25),this.git1=(0,h.Z)(this.git1,25),this.git2=(0,h.Z)(this.git2,25),this.git3=(0,h.Z)(this.git3,25),this.git4=(0,h.Z)(this.git4,25),this.git5=(0,h.Z)(this.git5,25),this.git6=(0,h.Z)(this.git6,25),this.git7=(0,h.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,h.Z)((0,l.Z)(this.git0),25),this.gitInv1=this.gitInv1||(0,l.Z)(this.git1),this.gitInv2=this.gitInv2||(0,l.Z)(this.git2),this.gitInv3=this.gitInv3||(0,l.Z)(this.git3),this.gitInv4=this.gitInv4||(0,l.Z)(this.git4),this.gitInv5=this.gitInv5||(0,l.Z)(this.git5),this.gitInv6=this.gitInv6||(0,l.Z)(this.git6),this.gitInv7=this.gitInv7||(0,l.Z)(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||(0,l.Z)(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||(0,l.Z)(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||M,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P}calculate(t){if("object"!==typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}class Z{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,d.Z)("#cde498",10),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.Z)(this.primaryColor),this.secondaryTextColor=(0,l.Z)(this.secondaryColor),this.tertiaryTextColor=(0,l.Z)(this.primaryColor),this.lineColor=(0,l.Z)(this.background),this.textColor=(0,l.Z)(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,o.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,o.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,o.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,o.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,o.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,o.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,o.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,o.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,o.Z)(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.Z)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.Z)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.Z)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.Z)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,o.Z)(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=(0,h.Z)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,o.Z)(this.primaryColor,{h:64}),this.fillType3=(0,o.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,o.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,o.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,o.Z)(this.primaryColor,{h:128}),this.fillType7=(0,o.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||(0,o.Z)(this.primaryColor,{l:-30}),this.pie5=this.pie5||(0,o.Z)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,o.Z)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||(0,o.Z)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,o.Z)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,o.Z)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,o.Z)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||(0,o.Z)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||(0,o.Z)(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,o.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,o.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,o.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,o.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,o.Z)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.Z)(this.git0,25),this.git1=(0,d.Z)(this.git1,25),this.git2=(0,d.Z)(this.git2,25),this.git3=(0,d.Z)(this.git3,25),this.git4=(0,d.Z)(this.git4,25),this.git5=(0,d.Z)(this.git5,25),this.git6=(0,d.Z)(this.git6,25),this.git7=(0,d.Z)(this.git7,25)):(this.git0=(0,h.Z)(this.git0,25),this.git1=(0,h.Z)(this.git1,25),this.git2=(0,h.Z)(this.git2,25),this.git3=(0,h.Z)(this.git3,25),this.git4=(0,h.Z)(this.git4,25),this.git5=(0,h.Z)(this.git5,25),this.git6=(0,h.Z)(this.git6,25),this.git7=(0,h.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,l.Z)(this.git0),this.gitInv1=this.gitInv1||(0,l.Z)(this.git1),this.gitInv2=this.gitInv2||(0,l.Z)(this.git2),this.gitInv3=this.gitInv3||(0,l.Z)(this.git3),this.gitInv4=this.gitInv4||(0,l.Z)(this.git4),this.gitInv5=this.gitInv5||(0,l.Z)(this.git5),this.gitInv6=this.gitInv6||(0,l.Z)(this.git6),this.gitInv7=this.gitInv7||(0,l.Z)(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||M,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P}calculate(t){if("object"!==typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}class W{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,d.Z)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=(0,o.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.Z)(this.primaryColor),this.secondaryTextColor=(0,l.Z)(this.secondaryColor),this.tertiaryTextColor=(0,l.Z)(this.tertiaryColor),this.lineColor=(0,l.Z)(this.background),this.textColor=(0,l.Z)(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,d.Z)(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,l.Z)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.Z)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.Z)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=(0,d.Z)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=(0,d.Z)(this.contrast,30),this.sectionBkgColor2=(0,d.Z)(this.contrast,30),this.taskBorderColor=(0,h.Z)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,d.Z)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,h.Z)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,o.Z)(this.primaryColor,{h:64}),this.fillType3=(0,o.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,o.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,o.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,o.Z)(this.primaryColor,{h:128}),this.fillType7=(0,o.Z)(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,h.Z)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||(0,o.Z)(this.primaryColor,{h:-30}),this.git4=this.pie5||(0,o.Z)(this.primaryColor,{h:-60}),this.git5=this.pie6||(0,o.Z)(this.primaryColor,{h:-90}),this.git6=this.pie7||(0,o.Z)(this.primaryColor,{h:60}),this.git7=this.pie8||(0,o.Z)(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||(0,l.Z)(this.git0),this.gitInv1=this.gitInv1||(0,l.Z)(this.git1),this.gitInv2=this.gitInv2||(0,l.Z)(this.git2),this.gitInv3=this.gitInv3||(0,l.Z)(this.git3),this.gitInv4=this.gitInv4||(0,l.Z)(this.git4),this.gitInv5=this.gitInv5||(0,l.Z)(this.git5),this.gitInv6=this.gitInv6||(0,l.Z)(this.git6),this.gitInv7=this.gitInv7||(0,l.Z)(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||M,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P}calculate(t){if("object"!==typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}const q={base:{getThemeVariables:t=>{const e=new Y;return e.calculate(t),e}},dark:{getThemeVariables:t=>{const e=new z;return e.calculate(t),e}},default:{getThemeVariables:t=>{const e=new j;return e.calculate(t),e}},forest:{getThemeVariables:t=>{const e=new Z;return e.calculate(t),e}},neutral:{getThemeVariables:t=>{const e=new W;return e.calculate(t),e}}},U={theme:"default",themeVariables:q.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};U.class&&(U.class.arrowMarkerAbsolute=U.arrowMarkerAbsolute),U.gitGraph&&(U.gitGraph.arrowMarkerAbsolute=U.arrowMarkerAbsolute);const V=(t,e="")=>Object.keys(t).reduce(((i,r)=>Array.isArray(t[r])?i:"object"===typeof t[r]&&null!==t[r]?[...i,e+r,...V(t[r],"")]:[...i,e+r]),[]),H=V(U,""),G=U;function X(t){return"undefined"===typeof t||null===t}var K={isNothing:X,isObject:function(t){return"object"===typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:X(t)?[]:[t]},repeat:function(t,e){var i,r="";for(i=0;i<e;i+=1)r+=t;return r},isNegativeZero:function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},extend:function(t,e){var i,r,n,s;if(e)for(i=0,r=(s=Object.keys(e)).length;i<r;i+=1)t[n=s[i]]=e[n];return t}};function Q(t,e){var i="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(i+="\n\n"+t.mark.snippet),r+" "+i):r}function J(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Q(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}J.prototype=Object.create(Error.prototype),J.prototype.constructor=J,J.prototype.toString=function(t){return this.name+": "+Q(this,t)};var tt=J;function et(t,e,i,r,n){var s="",a="",o=Math.floor(n/2)-1;return r-e>o&&(e=r-o+(s=" ... ").length),i-r>o&&(i=r+o-(a=" ...").length),{str:s+t.slice(e,i).replace(/\t/g,"\u2192")+a,pos:r-e+s.length}}function it(t,e){return K.repeat(" ",e-t.length)+t}var rt=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!==typeof e.indent&&(e.indent=1),"number"!==typeof e.linesBefore&&(e.linesBefore=3),"number"!==typeof e.linesAfter&&(e.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,n=[0],s=[],a=-1;i=r.exec(t.buffer);)s.push(i.index),n.push(i.index+i[0].length),t.position<=i.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var o,l,c="",h=Math.min(t.line+e.linesAfter,s.length).toString().length,d=e.maxLength-(e.indent+h+3);for(o=1;o<=e.linesBefore&&!(a-o<0);o++)l=et(t.buffer,n[a-o],s[a-o],t.position-(n[a]-n[a-o]),d),c=K.repeat(" ",e.indent)+it((t.line-o+1).toString(),h)+" | "+l.str+"\n"+c;for(l=et(t.buffer,n[a],s[a],t.position,d),c+=K.repeat(" ",e.indent)+it((t.line+1).toString(),h)+" | "+l.str+"\n",c+=K.repeat("-",e.indent+h+3+l.pos)+"^\n",o=1;o<=e.linesAfter&&!(a+o>=s.length);o++)l=et(t.buffer,n[a+o],s[a+o],t.position-(n[a]-n[a+o]),d),c+=K.repeat(" ",e.indent)+it((t.line+o+1).toString(),h)+" | "+l.str+"\n";return c.replace(/\n$/,"")},nt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],st=["scalar","sequence","mapping"];var at=function(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===nt.indexOf(e))throw new tt('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function(t){var e={};return null!==t&&Object.keys(t).forEach((function(i){t[i].forEach((function(t){e[String(t)]=i}))})),e}(e.styleAliases||null),-1===st.indexOf(this.kind))throw new tt('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function ot(t,e){var i=[];return t[e].forEach((function(t){var e=i.length;i.forEach((function(i,r){i.tag===t.tag&&i.kind===t.kind&&i.multi===t.multi&&(e=r)})),i[e]=t})),i}function lt(t){return this.extend(t)}lt.prototype.extend=function(t){var e=[],i=[];if(t instanceof at)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new tt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof at))throw new tt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new tt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new tt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(t){if(!(t instanceof at))throw new tt("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var r=Object.create(lt.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(i),r.compiledImplicit=ot(r,"implicit"),r.compiledExplicit=ot(r,"explicit"),r.compiledTypeMap=function(){var t,e,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(t){t.multi?(i.multi[t.kind].push(t),i.multi.fallback.push(t)):i[t.kind][t.tag]=i.fallback[t.tag]=t}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(r);return i}(r.compiledImplicit,r.compiledExplicit),r};var ct=new lt({explicit:[new at("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}}),new at("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}}),new at("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})]});var ht=new at("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var dt=new at("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return"true"===t||"True"===t||"TRUE"===t},predicate:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function ut(t){return 48<=t&&t<=55}function pt(t){return 48<=t&&t<=57}var gt=new at("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,i,r=t.length,n=0,s=!1;if(!r)return!1;if("-"!==(e=t[n])&&"+"!==e||(e=t[++n]),"0"===e){if(n+1===r)return!0;if("b"===(e=t[++n])){for(n++;n<r;n++)if("_"!==(e=t[n])){if("0"!==e&&"1"!==e)return!1;s=!0}return s&&"_"!==e}if("x"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!(48<=(i=t.charCodeAt(n))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;s=!0}return s&&"_"!==e}if("o"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!ut(t.charCodeAt(n)))return!1;s=!0}return s&&"_"!==e}}if("_"===e)return!1;for(;n<r;n++)if("_"!==(e=t[n])){if(!pt(t.charCodeAt(n)))return!1;s=!0}return!(!s||"_"===e)},construct:function(t){var e,i=t,r=1;if(-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),"-"!==(e=i[0])&&"+"!==e||("-"===e&&(r=-1),e=(i=i.slice(1))[0]),"0"===i)return 0;if("0"===e){if("b"===i[1])return r*parseInt(i.slice(2),2);if("x"===i[1])return r*parseInt(i.slice(2),16);if("o"===i[1])return r*parseInt(i.slice(2),8)}return r*parseInt(i,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1===0&&!K.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),yt=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var ft=/^[-+]?[0-9]+e/;var mt=new at("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!yt.test(t)||"_"===t[t.length-1])},construct:function(t){var e,i;return i="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:i*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!==0||K.isNegativeZero(t))},represent:function(t,e){var i;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(K.isNegativeZero(t))return"-0.0";return i=t.toString(10),ft.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),bt=ct.extend({implicit:[ht,dt,gt,mt]}),xt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var _t=new at("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==xt.exec(t)||null!==kt.exec(t))},construct:function(t){var e,i,r,n,s,a,o,l,c=0,h=null;if(null===(e=xt.exec(t))&&(e=kt.exec(t)),null===e)throw new Error("Date resolve error");if(i=+e[1],r=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(i,r,n));if(s=+e[4],a=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(i,r,n,s,a,o,c)),h&&l.setTime(l.getTime()-h),l},instanceOf:Date,represent:function(t){return t.toISOString()}});var Ct=new at("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),Tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Et=new at("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,i,r=0,n=t.length,s=Tt;for(i=0;i<n;i++)if(!((e=s.indexOf(t.charAt(i)))>64)){if(e<0)return!1;r+=6}return r%8===0},construct:function(t){var e,i,r=t.replace(/[\r\n=]/g,""),n=r.length,s=Tt,a=0,o=[];for(e=0;e<n;e++)e%4===0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(255&a)),a=a<<6|s.indexOf(r.charAt(e));return 0===(i=n%4*6)?(o.push(a>>16&255),o.push(a>>8&255),o.push(255&a)):18===i?(o.push(a>>10&255),o.push(a>>2&255)):12===i&&o.push(a>>4&255),new Uint8Array(o)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,i,r="",n=0,s=t.length,a=Tt;for(e=0;e<s;e++)e%3===0&&e&&(r+=a[n>>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]),n=(n<<8)+t[e];return 0===(i=s%3)?(r+=a[n>>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]):2===i?(r+=a[n>>10&63],r+=a[n>>4&63],r+=a[n<<2&63],r+=a[64]):1===i&&(r+=a[n>>2&63],r+=a[n<<4&63],r+=a[64],r+=a[64]),r}}),vt=Object.prototype.hasOwnProperty,St=Object.prototype.toString;var At=new at("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,i,r,n,s,a=[],o=t;for(e=0,i=o.length;e<i;e+=1){if(r=o[e],s=!1,"[object Object]"!==St.call(r))return!1;for(n in r)if(vt.call(r,n)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==a.indexOf(n))return!1;a.push(n)}return!0},construct:function(t){return null!==t?t:[]}}),wt=Object.prototype.toString;var Bt=new at("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,i,r,n,s,a=t;for(s=new Array(a.length),e=0,i=a.length;e<i;e+=1){if(r=a[e],"[object Object]"!==wt.call(r))return!1;if(1!==(n=Object.keys(r)).length)return!1;s[e]=[n[0],r[n[0]]]}return!0},construct:function(t){if(null===t)return[];var e,i,r,n,s,a=t;for(s=new Array(a.length),e=0,i=a.length;e<i;e+=1)r=a[e],n=Object.keys(r),s[e]=[n[0],r[n[0]]];return s}}),Lt=Object.prototype.hasOwnProperty;var It=new at("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(null===t)return!0;var e,i=t;for(e in i)if(Lt.call(i,e)&&null!==i[e])return!1;return!0},construct:function(t){return null!==t?t:{}}}),Dt=bt.extend({implicit:[_t,Ct],explicit:[Et,At,Bt,It]}),Ot=Object.prototype.hasOwnProperty,Ft=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Nt=/[\x85\u2028\u2029]/,$t=/[,\[\]\{\}]/,Rt=/^(?:!|!!|![a-z\-]+!)$/i,Mt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Pt(t){return Object.prototype.toString.call(t)}function Yt(t){return 10===t||13===t}function zt(t){return 9===t||32===t}function jt(t){return 9===t||32===t||10===t||13===t}function Zt(t){return 44===t||91===t||93===t||123===t||125===t}function Wt(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function qt(t){return 48===t?"\0":97===t?"\x07":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"\x1b":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"\x85":95===t?"\xa0":76===t?"\u2028":80===t?"\u2029":""}function Ut(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var Vt=new Array(256),Ht=new Array(256),Gt=0;Gt<256;Gt++)Vt[Gt]=qt(Gt)?1:0,Ht[Gt]=qt(Gt);function Xt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Dt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Kt(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=rt(i),new tt(e,i)}function Qt(t,e){throw Kt(t,e)}function Jt(t,e){t.onWarning&&t.onWarning.call(null,Kt(t,e))}var te={YAML:function(t,e,i){var r,n,s;null!==t.version&&Qt(t,"duplication of %YAML directive"),1!==i.length&&Qt(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&Qt(t,"ill-formed argument of the YAML directive"),n=parseInt(r[1],10),s=parseInt(r[2],10),1!==n&&Qt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,1!==s&&2!==s&&Jt(t,"unsupported YAML version of the document")},TAG:function(t,e,i){var r,n;2!==i.length&&Qt(t,"TAG directive accepts exactly two arguments"),r=i[0],n=i[1],Rt.test(r)||Qt(t,"ill-formed tag handle (first argument) of the TAG directive"),Ot.call(t.tagMap,r)&&Qt(t,'there is a previously declared suffix for "'+r+'" tag handle'),Mt.test(n)||Qt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(s){Qt(t,"tag prefix is malformed: "+n)}t.tagMap[r]=n}};function ee(t,e,i,r){var n,s,a,o;if(e<i){if(o=t.input.slice(e,i),r)for(n=0,s=o.length;n<s;n+=1)9===(a=o.charCodeAt(n))||32<=a&&a<=1114111||Qt(t,"expected valid JSON character");else Ft.test(o)&&Qt(t,"the stream contains non-printable characters");t.result+=o}}function ie(t,e,i,r){var n,s,a,o;for(K.isObject(i)||Qt(t,"cannot merge mappings; the provided source object is unacceptable"),a=0,o=(n=Object.keys(i)).length;a<o;a+=1)s=n[a],Ot.call(e,s)||(e[s]=i[s],r[s]=!0)}function re(t,e,i,r,n,s,a,o,l){var c,h;if(Array.isArray(n))for(c=0,h=(n=Array.prototype.slice.call(n)).length;c<h;c+=1)Array.isArray(n[c])&&Qt(t,"nested arrays are not supported inside keys"),"object"===typeof n&&"[object Object]"===Pt(n[c])&&(n[c]="[object Object]");if("object"===typeof n&&"[object Object]"===Pt(n)&&(n="[object Object]"),n=String(n),null===e&&(e={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)ie(t,e,s[c],i);else ie(t,e,s,i);else t.json||Ot.call(i,n)||!Ot.call(e,n)||(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Qt(t,"duplicated mapping key")),"__proto__"===n?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[n]=s,delete i[n];return e}function ne(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Qt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function se(t,e,i){for(var r=0,n=t.input.charCodeAt(t.position);0!==n;){for(;zt(n);)9===n&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&35===n)do{n=t.input.charCodeAt(++t.position)}while(10!==n&&13!==n&&0!==n);if(!Yt(n))break;for(ne(t),n=t.input.charCodeAt(t.position),r++,t.lineIndent=0;32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position)}return-1!==i&&0!==r&&t.lineIndent<i&&Jt(t,"deficient indentation"),r}function ae(t){var e,i=t.position;return!(45!==(e=t.input.charCodeAt(i))&&46!==e||e!==t.input.charCodeAt(i+1)||e!==t.input.charCodeAt(i+2)||(i+=3,0!==(e=t.input.charCodeAt(i))&&!jt(e)))}function oe(t,e){1===e?t.result+=" ":e>1&&(t.result+=K.repeat("\n",e-1))}function le(t,e){var i,r,n=t.tag,s=t.anchor,a=[],o=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),r=t.input.charCodeAt(t.position);0!==r&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Qt(t,"tab characters must not be used in indentation")),45===r)&&jt(t.input.charCodeAt(t.position+1));)if(o=!0,t.position++,se(t,!0,-1)&&t.lineIndent<=e)a.push(null),r=t.input.charCodeAt(t.position);else if(i=t.line,de(t,e,3,!1,!0),a.push(t.result),se(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&0!==r)Qt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!o&&(t.tag=n,t.anchor=s,t.kind="sequence",t.result=a,!0)}function ce(t){var e,i,r,n,s=!1,a=!1;if(33!==(n=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Qt(t,"duplication of a tag property"),60===(n=t.input.charCodeAt(++t.position))?(s=!0,n=t.input.charCodeAt(++t.position)):33===n?(a=!0,i="!!",n=t.input.charCodeAt(++t.position)):i="!",e=t.position,s){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&62!==n);t.position<t.length?(r=t.input.slice(e,t.position),n=t.input.charCodeAt(++t.position)):Qt(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==n&&!jt(n);)33===n&&(a?Qt(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),Rt.test(i)||Qt(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),n=t.input.charCodeAt(++t.position);r=t.input.slice(e,t.position),$t.test(r)&&Qt(t,"tag suffix cannot contain flow indicator characters")}r&&!Mt.test(r)&&Qt(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(o){Qt(t,"tag name is malformed: "+r)}return s?t.tag=r:Ot.call(t.tagMap,i)?t.tag=t.tagMap[i]+r:"!"===i?t.tag="!"+r:"!!"===i?t.tag="tag:yaml.org,2002:"+r:Qt(t,'undeclared tag handle "'+i+'"'),!0}function he(t){var e,i;if(38!==(i=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Qt(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!jt(i)&&!Zt(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Qt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function de(t,e,i,r,n){var s,a,o,l,c,h,d,u,p,g=1,y=!1,f=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=o=4===i||3===i,r&&se(t,!0,-1)&&(y=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;ce(t)||he(t);)se(t,!0,-1)?(y=!0,o=s,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):o=!1;if(o&&(o=y||n),1!==g&&4!==i||(u=1===i||2===i?e:e+1,p=t.position-t.lineStart,1===g?o&&(le(t,p)||function(t,e,i){var r,n,s,a,o,l,c,h=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,y=null,f=null,m=!1,b=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),c=t.input.charCodeAt(t.position);0!==c;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Qt(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),s=t.line,63!==c&&58!==c||!jt(r)){if(a=t.line,o=t.lineStart,l=t.position,!de(t,i,2,!1,!0))break;if(t.line===s){for(c=t.input.charCodeAt(t.position);zt(c);)c=t.input.charCodeAt(++t.position);if(58===c)jt(c=t.input.charCodeAt(++t.position))||Qt(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(re(t,u,p,g,y,null,a,o,l),g=y=f=null),b=!0,m=!1,n=!1,g=t.tag,y=t.result;else{if(!b)return t.tag=h,t.anchor=d,!0;Qt(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return t.tag=h,t.anchor=d,!0;Qt(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(m&&(re(t,u,p,g,y,null,a,o,l),g=y=f=null),b=!0,m=!0,n=!0):m?(m=!1,n=!0):Qt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=r;if((t.line===s||t.lineIndent>e)&&(m&&(a=t.line,o=t.lineStart,l=t.position),de(t,e,4,!0,n)&&(m?y=t.result:f=t.result),m||(re(t,u,p,g,y,f,a,o,l),g=y=f=null),se(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&0!==c)Qt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&re(t,u,p,g,y,null,a,o,l),b&&(t.tag=h,t.anchor=d,t.kind="mapping",t.result=u),b}(t,p,u))||function(t,e){var i,r,n,s,a,o,l,c,h,d,u,p,g=!0,y=t.tag,f=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))a=93,c=!1,s=[];else{if(123!==p)return!1;a=125,c=!0,s={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),p=t.input.charCodeAt(++t.position);0!==p;){if(se(t,!0,e),(p=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=y,t.anchor=f,t.kind=c?"mapping":"sequence",t.result=s,!0;g?44===p&&Qt(t,"expected the node content, but found ','"):Qt(t,"missed comma between flow collection entries"),u=null,o=l=!1,63===p&&jt(t.input.charCodeAt(t.position+1))&&(o=l=!0,t.position++,se(t,!0,e)),i=t.line,r=t.lineStart,n=t.position,de(t,e,1,!1,!0),d=t.tag,h=t.result,se(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==i||58!==p||(o=!0,p=t.input.charCodeAt(++t.position),se(t,!0,e),de(t,e,1,!1,!0),u=t.result),c?re(t,s,m,d,h,u,i,r,n):o?s.push(re(t,null,m,d,h,u,i,r,n)):s.push(h),se(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}Qt(t,"unexpected end of the stream within a flow collection")}(t,u)?f=!0:(a&&function(t,e){var i,r,n,s,a,o=1,l=!1,c=!1,h=e,d=0,u=!1;if(124===(s=t.input.charCodeAt(t.position)))r=!1;else{if(62!==s)return!1;r=!0}for(t.kind="scalar",t.result="";0!==s;)if(43===(s=t.input.charCodeAt(++t.position))||45===s)1===o?o=43===s?3:2:Qt(t,"repeat of a chomping mode identifier");else{if(!((n=48<=(a=s)&&a<=57?a-48:-1)>=0))break;0===n?Qt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Qt(t,"repeat of an indentation width identifier"):(h=e+n-1,c=!0)}if(zt(s)){do{s=t.input.charCodeAt(++t.position)}while(zt(s));if(35===s)do{s=t.input.charCodeAt(++t.position)}while(!Yt(s)&&0!==s)}for(;0!==s;){for(ne(t),t.lineIndent=0,s=t.input.charCodeAt(t.position);(!c||t.lineIndent<h)&&32===s;)t.lineIndent++,s=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>h&&(h=t.lineIndent),Yt(s))d++;else{if(t.lineIndent<h){3===o?t.result+=K.repeat("\n",l?1+d:d):1===o&&l&&(t.result+="\n");break}for(r?zt(s)?(u=!0,t.result+=K.repeat("\n",l?1+d:d)):u?(u=!1,t.result+=K.repeat("\n",d+1)):0===d?l&&(t.result+=" "):t.result+=K.repeat("\n",d):t.result+=K.repeat("\n",l?1+d:d),l=!0,c=!0,d=0,i=t.position;!Yt(s)&&0!==s;)s=t.input.charCodeAt(++t.position);ee(t,i,t.position,!1)}}return!0}(t,u)||function(t,e){var i,r,n;if(39!==(i=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(i=t.input.charCodeAt(t.position));)if(39===i){if(ee(t,r,t.position,!0),39!==(i=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,n=t.position}else Yt(i)?(ee(t,r,n,!0),oe(t,se(t,!1,e)),r=n=t.position):t.position===t.lineStart&&ae(t)?Qt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Qt(t,"unexpected end of the stream within a single quoted scalar")}(t,u)||function(t,e){var i,r,n,s,a,o,l;if(34!==(o=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=r=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return ee(t,i,t.position,!0),t.position++,!0;if(92===o){if(ee(t,i,t.position,!0),Yt(o=t.input.charCodeAt(++t.position)))se(t,!1,e);else if(o<256&&Vt[o])t.result+=Ht[o],t.position++;else if((a=120===(l=o)?2:117===l?4:85===l?8:0)>0){for(n=a,s=0;n>0;n--)(a=Wt(o=t.input.charCodeAt(++t.position)))>=0?s=(s<<4)+a:Qt(t,"expected hexadecimal character");t.result+=Ut(s),t.position++}else Qt(t,"unknown escape sequence");i=r=t.position}else Yt(o)?(ee(t,i,r,!0),oe(t,se(t,!1,e)),i=r=t.position):t.position===t.lineStart&&ae(t)?Qt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}Qt(t,"unexpected end of the stream within a double quoted scalar")}(t,u)?f=!0:!function(t){var e,i,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!jt(r)&&!Zt(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Qt(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),Ot.call(t.anchorMap,i)||Qt(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],se(t,!0,-1),!0}(t)?function(t,e,i){var r,n,s,a,o,l,c,h,d=t.kind,u=t.result;if(jt(h=t.input.charCodeAt(t.position))||Zt(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(jt(r=t.input.charCodeAt(t.position+1))||i&&Zt(r)))return!1;for(t.kind="scalar",t.result="",n=s=t.position,a=!1;0!==h;){if(58===h){if(jt(r=t.input.charCodeAt(t.position+1))||i&&Zt(r))break}else if(35===h){if(jt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&ae(t)||i&&Zt(h))break;if(Yt(h)){if(o=t.line,l=t.lineStart,c=t.lineIndent,se(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}t.position=s,t.line=o,t.lineStart=l,t.lineIndent=c;break}}a&&(ee(t,n,s,!1),oe(t,t.line-o),n=s=t.position,a=!1),zt(h)||(s=t.position+1),h=t.input.charCodeAt(++t.position)}return ee(t,n,s,!1),!!t.result||(t.kind=d,t.result=u,!1)}(t,u,1===i)&&(f=!0,null===t.tag&&(t.tag="?")):(f=!0,null===t.tag&&null===t.anchor||Qt(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(f=o&&le(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Qt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l<c;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Ot.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,c=(h=t.typeMap.multi[t.kind||"fallback"]).length;l<c;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){d=h[l];break}d||Qt(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&Qt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Qt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||f}function ue(t){var e,i,r,n,s=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(se(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(a=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!jt(n);)n=t.input.charCodeAt(++t.position);for(r=[],(i=t.input.slice(e,t.position)).length<1&&Qt(t,"directive name must not be less than one character in length");0!==n;){for(;zt(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!Yt(n));break}if(Yt(n))break;for(e=t.position;0!==n&&!jt(n);)n=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==n&&ne(t),Ot.call(te,i)?te[i](t,i,r):Jt(t,'unknown document directive "'+i+'"')}se(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,se(t,!0,-1)):a&&Qt(t,"directives end mark is expected"),de(t,t.lineIndent-1,4,!1,!0),se(t,!0,-1),t.checkLineBreaks&&Nt.test(t.input.slice(s,t.position))&&Jt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ae(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,se(t,!0,-1)):t.position<t.length-1&&Qt(t,"end of the stream or a document separator is expected")}function pe(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var i=new Xt(t,e),r=t.indexOf("\0");for(-1!==r&&(i.position=r,Qt(i,"null byte is not allowed in input")),i.input+="\0";32===i.input.charCodeAt(i.position);)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)ue(i);return i.documents}var ge=ct,ye={loadAll:function(t,e,i){null!==e&&"object"===typeof e&&"undefined"===typeof i&&(i=e,e=null);var r=pe(t,i);if("function"!==typeof e)return r;for(var n=0,s=r.length;n<s;n+=1)e(r[n])},load:function(t,e){var i=pe(t,e);if(0!==i.length){if(1===i.length)return i[0];throw new tt("expected a single document in the stream, but found more")}}}.load;const fe=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;const me=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,be=/\s*%%.*\n/gm,xe={},ke=function(t,e){t=t.replace(fe,"").replace(me,"").replace(be,"\n");for(const[i,{detector:r}]of Object.entries(xe)){if(r(t,e))return i}throw new Error(`No diagram type detected for text: ${t}`)},_e=(t,e,i)=>{if(xe[t])throw new Error(`Detector with key ${t} already exists`);xe[t]={detector:e,loader:i},v.debug(`Detector with key ${t} added${i?" with loader":""}`)},Ce=function(t,e,i){const{depth:r,clobber:n}=Object.assign({depth:2,clobber:!1},i);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Ce(t,e,i))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?void 0!==t&&null!==t&&"object"===typeof t&&"object"===typeof e?Object.assign(t,e):e:(void 0!==e&&"object"===typeof t&&"object"===typeof e&&Object.keys(e).forEach((i=>{"object"!==typeof e[i]||void 0!==t[i]&&"object"!==typeof t[i]?(n||"object"!==typeof t[i]&&"object"!==typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=Ce(t[i],e[i],{depth:r-1,clobber:n}))})),t)},Te=Ce,Ee={curveBasis:s.$0Z,curveBasisClosed:s.Dts,curveBasisOpen:s.WQY,curveLinear:s.c_6,curveLinearClosed:s.fxm,curveMonotoneX:s.FdL,curveMonotoneY:s.ak_,curveNatural:s.SxZ,curveStep:s.eA_,curveStepAfter:s.jsv,curveStepBefore:s.iJ},ve=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Se=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ae=function(t,e=null){try{const i=new RegExp(`[%]{2}(?![{]${Se.source})(?=[}][%]{2}).*\n`,"ig");let r;t=t.trim().replace(i,"").replace(/'/gm,'"'),v.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const n=[];for(;null!==(r=ve.exec(t));)if(r.index===ve.lastIndex&&ve.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){const t=r[1]?r[1]:r[2],e=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;n.push({type:t,args:e})}return 0===n.length&&n.push({type:t,args:null}),1===n.length?n[0]:n}catch(i){return v.error(`ERROR: ${i.message} - Unable to parse directive\n ${null!==e?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}};function we(t,e){if(!t)return e;const i=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Ee[i]||e}function Be(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function Le(t){let e="",i="";for(const r of t)void 0!==r&&(r.startsWith("color:")||r.startsWith("text-align:")?i=i+r+";":e=e+r+";");return{style:e,labelStyle:i}}let Ie=0;const De=()=>(Ie++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ie);const Oe=t=>function(t){let e="";const i="0123456789abcdef",r=i.length;for(let n=0;n<t;n++)e+=i.charAt(Math.floor(Math.random()*r));return e}(t.length),Fe=function(t,e){const i=e.text.replace($.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);const n=r.append("tspan");return n.attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(i),r},Ne=(0,p.Z)(((t,e,i)=>{if(!t)return t;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),$.lineBreakRegex.test(t))return t;const r=t.split(" "),n=[];let s="";return r.forEach(((t,a)=>{const o=Me(`${t} `,i),l=Me(s,i);if(o>e){const{hyphenatedStrings:r,remainingWord:a}=$e(t,e,"-",i);n.push(s,...r),s=a}else l+o>=e?(n.push(s),s=t):s=[s,t].filter(Boolean).join(" ");a+1===r.length&&n.push(s)})),n.filter((t=>""!==t)).join(i.joinWith)}),((t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`)),$e=(0,p.Z)(((t,e,i="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const n=[...t],s=[];let a="";return n.forEach(((t,o)=>{const l=`${a}${t}`;if(Me(l,r)>=e){const t=o+1,e=n.length===t,r=`${l}${i}`;s.push(e?l:r),a=""}else a=l})),{hyphenatedStrings:s,remainingWord:a}}),((t,e,i="-",r)=>`${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}`));function Re(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),Pe(t,e).height}function Me(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),Pe(t,e).width}const Pe=(0,p.Z)(((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:i,fontFamily:r,fontWeight:n}=e;if(!t)return{width:0,height:0};const a=["sans-serif",r],o=t.split($.lineBreakRegex),l=[],c=(0,s.Ys)("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const s of a){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of o){const a={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};a.text=r;const o=Fe(h,a).style("font-size",i).style("font-weight",n).style("font-family",s),l=(o._groups||o)[0][0].getBBox();e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}l.push(e)}h.remove();return l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`));let Ye;const ze=t=>{if(v.debug("directiveSanitizer called with",t),"object"===typeof t&&(t.length?t.forEach((t=>ze(t))):Object.keys(t).forEach((e=>{v.debug("Checking key",e),e.startsWith("__")&&(v.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(v.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(v.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(v.debug("sanitizing themeCss option"),t[e]=je(t[e])),e.includes("fontFamily")&&(v.debug("sanitizing fontFamily option"),t[e]=je(t[e])),e.includes("altFontFamily")&&(v.debug("sanitizing altFontFamily option"),t[e]=je(t[e])),H.includes(e)?"object"===typeof t[e]&&(v.debug("sanitize deleting object",e),ze(t[e])):(v.debug("sanitize deleting option",e),delete t[e])}))),t.themeVariables){const e=Object.keys(t.themeVariables);for(const i of e){const e=t.themeVariables[i];e&&e.match&&!e.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[i]="")}}v.debug("After sanitization",t)},je=t=>{let e=0,i=0;for(const r of t){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";"{"===r?e++:"}"===r&&i++}return e!==i?"{ /* ERROR: Unbalanced CSS */ }":t};function Ze(t){return"str"in t}const We={assignWithDepth:Te,wrapLabel:Ne,calculateTextHeight:Re,calculateTextWidth:Me,calculateTextDimensions:Pe,detectInit:function(t,e){const i=Ae(t,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(i)){const t=i.map((t=>t.args));ze(t),r=Te(r,[...t])}else r=i.args;if(r){let i=ke(t,e);["config"].forEach((t=>{void 0!==r[t]&&("flowchart-v2"===i&&(i="flowchart"),r[i]=r[t],delete r[t])}))}return r},detectDirective:Ae,isSubstringInArray:function(t,e){for(const[i,r]of e.entries())if(r.match(t))return i;return-1},interpolateToCurve:we,calcLabelPosition:function(t){return 1===t.length?t[0]:function(t){let e,i=0;t.forEach((t=>{i+=Be(t,e),e=t}));let r,n=i/2;return e=void 0,t.forEach((t=>{if(e&&!r){const i=Be(t,e);if(i<n)n-=i;else{const s=n/i;s<=0&&(r=e),s>=1&&(r={x:t.x,y:t.y}),s>0&&s<1&&(r={x:(1-s)*e.x+s*t.x,y:(1-s)*e.y+s*t.y})}}e=t})),r}(t)},calcCardinalityPosition:(t,e,i)=>{let r;v.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());let n,s=25;r=void 0,e.forEach((t=>{if(r&&!n){const e=Be(t,r);if(e<s)s-=e;else{const i=s/e;i<=0&&(n=r),i>=1&&(n={x:t.x,y:t.y}),i>0&&i<1&&(n={x:(1-i)*r.x+i*t.x,y:(1-i)*r.y+i*t.y})}}r=t}));const a=t?10:5,o=Math.atan2(e[0].y-n.y,e[0].x-n.x),l={x:0,y:0};return l.x=Math.sin(o)*a+(e[0].x+n.x)/2,l.y=-Math.cos(o)*a+(e[0].y+n.y)/2,l},calcTerminalLabelPosition:function(t,e,i){let r,n=JSON.parse(JSON.stringify(i));v.info("our points",n),"start_left"!==e&&"start_right"!==e&&(n=n.reverse()),n.forEach((t=>{r=t}));let s,a=25+t;r=void 0,n.forEach((t=>{if(r&&!s){const e=Be(t,r);if(e<a)a-=e;else{const i=a/e;i<=0&&(s=r),i>=1&&(s={x:t.x,y:t.y}),i>0&&i<1&&(s={x:(1-i)*r.x+i*t.x,y:(1-i)*r.y+i*t.y})}}r=t}));const o=10+.5*t,l=Math.atan2(n[0].y-s.y,n[0].x-s.x),c={x:0,y:0};return c.x=Math.sin(l)*o+(n[0].x+s.x)/2,c.y=-Math.cos(l)*o+(n[0].y+s.y)/2,"start_left"===e&&(c.x=Math.sin(l+Math.PI)*o+(n[0].x+s.x)/2,c.y=-Math.cos(l+Math.PI)*o+(n[0].y+s.y)/2),"end_right"===e&&(c.x=Math.sin(l-Math.PI)*o+(n[0].x+s.x)/2-5,c.y=-Math.cos(l-Math.PI)*o+(n[0].y+s.y)/2-5),"end_left"===e&&(c.x=Math.sin(l)*o+(n[0].x+s.x)/2-5,c.y=-Math.cos(l)*o+(n[0].y+s.y)/2-5),c},formatUrl:function(t,e){const i=t.trim();if(i)return"loose"!==e.securityLevel?(0,n.N)(i):i},getStylesFromArray:Le,generateId:De,random:Oe,runFunc:(t,...e)=>{const i=t.split("."),r=i.length-1,n=i[r];let s=window;for(let a=0;a<r;a++)if(s=s[i[a]],!s)return;s[n](...e)},entityDecode:function(t){return Ye=Ye||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ye.innerHTML=t,unescape(Ye.textContent)},initIdGenerator:class{constructor(t,e){this.deterministic=t,this.seed=e,this.count=e?e.length:0}next(){return this.deterministic?this.count++:Date.now()}},directiveSanitizer:ze,sanitizeCss:je,insertTitle:(t,e,i,r)=>{if(!r)return;const n=t.node().getBBox();t.append("text").text(r).attr("x",n.x+n.width/2).attr("y",-i).attr("class",e)}},qe="9.3.0",Ue=Object.freeze(G);let Ve,He=Te({},Ue),Ge=[],Xe=Te({},Ue);const Ke=(t,e)=>{let i=Te({},t),r={};for(const n of e)ei(n),r=Te(r,n);if(i=Te(i,r),r.theme&&r.theme in q){const t=Te({},Ve),e=Te(t.themeVariables||{},r.themeVariables);i.theme&&i.theme in q&&(i.themeVariables=q[i.theme].getThemeVariables(e))}return Xe=i,ai(Xe),Xe},Qe=()=>Te({},He),Je=t=>(ai(t),Te(Xe,t),ti()),ti=()=>Te({},Xe),ei=t=>{var e;["secure",...null!=(e=He.secure)?e:[]].forEach((e=>{void 0!==t[e]&&(v.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{0===e.indexOf("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"===typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"===typeof t[e]&&ei(t[e])}))},ii=t=>{t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),Ge.push(t),Ke(He,Ge)},ri=(t=He)=>{Ge=[],Ke(t,Ge)};var ni=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(ni||{});const si={},ai=t=>{var e;t&&((t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&(si[e="LAZY_LOAD_DEPRECATED"]||(v.warn(ni[e]),si[e]=!0)))},oi=function(t,e,i,r){const n=function(t,e,i){let r=new Map;return i?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r}(e,i,r);!function(t,e){for(let i of e)t.attr(i[0],i[1])}(t,n)},li=function(t,e,i,r){const n=e.node().getBBox(),s=n.width,a=n.height;v.info(`SVG bounds: ${s}x${a}`,n);let o=0,l=0;v.info(`Graph bounds: ${o}x${l}`,t),o=s+2*i,l=a+2*i,v.info(`Calculated bounds: ${o}x${l}`),oi(e,l,o,r);const c=`${n.x-i} ${n.y-i} ${n.width+2*i} ${n.height+2*i}`;e.attr("viewBox",c)},ci=t=>`g.classGroup text {\n fill: ${t.nodeBorder};\n fill: ${t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,hi=t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n`,di=()=>"",ui=t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`,pi=t=>`\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ${t.ganttFontSize};\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ${t.ganttFontSize};\n // }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n // font-size: ${t.ganttFontSize};\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n // font-size: ${t.ganttFontSize};\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor} ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n`,gi=()=>"",yi=t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,fi=t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 100%;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`,mi=t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`,bi=t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,xi=t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`,ki=t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,_i={flowchart:ui,"flowchart-v2":ui,sequence:mi,gantt:pi,classDiagram:ci,"classDiagram-v2":ci,class:ci,stateDiagram:bi,state:bi,info:gi,pie:yi,er:hi,error:di,journey:xi,requirement:fi,c4:ki},Ci=(t,e,i)=>{let r="";return t in _i&&_i[t]?r=_i[t](i):v.warn(`No theme found for ${t}`),` & {\n font-family: ${i.fontFamily};\n font-size: ${i.fontSize};\n fill: ${i.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${i.errorBkgColor};\n }\n & .error-text {\n fill: ${i.errorTextColor};\n stroke: ${i.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 2px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${i.lineColor};\n stroke: ${i.lineColor};\n }\n & .marker.cross {\n stroke: ${i.lineColor};\n }\n\n & svg {\n font-family: ${i.fontFamily};\n font-size: ${i.fontSize};\n }\n\n ${r}\n\n ${e}\n`},Ti=v,Ei=S,vi=ti,Si=t=>L(t,vi()),Ai=li,wi={},Bi=(t,e,i)=>{if(wi[t])throw new Error(`Diagram ${t} already registered.`);var r,n;wi[t]=e,i&&_e(t,i),r=t,n=e.styles,_i[r]=n,e.injectUtils&&e.injectUtils(Ti,Ei,vi,Si,Ai)},Li=t=>{if(t in wi)return wi[t];throw new Error(`Diagram ${t} not found.`)};var Ii=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,4],i=[1,7],r=[1,5],n=[1,9],s=[1,6],a=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],c=[8,14,20,22,24,25,27,29,32,37,40],h=[8,13,14,20,22,24,25,27,29,32,37,40],d=[1,26],u=[6,8,14,50,55],p=[8,14,55],g=[1,53],y=[1,52],f=[8,14,30,33,35,38,55],m=[1,67],b=[1,68],x=[1,69],k=[8,14,33,35,42,55],_={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 3:return s[o];case 4:return s[o-1];case 5:return r.setDirection(s[o-3]),s[o-1];case 7:r.setOptions(s[o-1]),this.$=s[o];break;case 8:s[o-1]+=s[o],this.$=s[o-1];break;case 10:this.$=[];break;case 11:s[o-1].push(s[o]),this.$=s[o-1];break;case 12:this.$=s[o-1];break;case 17:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 22:r.checkout(s[o]);break;case 23:r.branch(s[o]);break;case 24:r.branch(s[o-2],s[o]);break;case 25:r.cherryPick(s[o],"",void 0);break;case 26:r.cherryPick(s[o-2],"",s[o]);break;case 27:case 29:r.cherryPick(s[o-2],"","");break;case 28:r.cherryPick(s[o],"",s[o-2]);break;case 30:r.merge(s[o],"","","");break;case 31:r.merge(s[o-2],s[o],"","");break;case 32:r.merge(s[o-2],"",s[o],"");break;case 33:r.merge(s[o-2],"","",s[o]);break;case 34:r.merge(s[o-4],s[o],"",s[o-2]);break;case 35:r.merge(s[o-4],"",s[o],s[o-2]);break;case 36:r.merge(s[o-4],"",s[o-2],s[o]);break;case 37:r.merge(s[o-4],s[o-2],s[o],"");break;case 38:r.merge(s[o-4],s[o-2],"",s[o]);break;case 39:r.merge(s[o-4],s[o],s[o-2],"");break;case 40:r.merge(s[o-6],s[o-4],s[o-2],s[o]);break;case 41:r.merge(s[o-6],s[o],s[o-4],s[o-2]);break;case 42:r.merge(s[o-6],s[o-4],s[o],s[o-2]);break;case 43:r.merge(s[o-6],s[o-2],s[o-4],s[o]);break;case 44:r.merge(s[o-6],s[o],s[o-2],s[o-4]);break;case 45:r.merge(s[o-6],s[o-2],s[o],s[o-4]);break;case 46:r.commit(s[o]);break;case 47:r.commit("","",r.commitType.NORMAL,s[o]);break;case 48:r.commit("","",s[o],"");break;case 49:r.commit("","",s[o],s[o-2]);break;case 50:r.commit("","",s[o-2],s[o]);break;case 51:r.commit("",s[o],r.commitType.NORMAL,"");break;case 52:r.commit("",s[o-2],r.commitType.NORMAL,s[o]);break;case 53:r.commit("",s[o],r.commitType.NORMAL,s[o-2]);break;case 54:r.commit("",s[o-2],s[o],"");break;case 55:r.commit("",s[o],s[o-2],"");break;case 56:r.commit("",s[o-4],s[o-2],s[o]);break;case 57:r.commit("",s[o-4],s[o],s[o-2]);break;case 58:r.commit("",s[o-2],s[o-4],s[o]);break;case 59:r.commit("",s[o],s[o-4],s[o-2]);break;case 60:r.commit("",s[o],s[o-2],s[o-4]);break;case 61:r.commit("",s[o-2],s[o],s[o-4]);break;case 62:r.commit(s[o],"",r.commitType.NORMAL,"");break;case 63:r.commit(s[o],"",r.commitType.NORMAL,s[o-2]);break;case 64:r.commit(s[o-2],"",r.commitType.NORMAL,s[o]);break;case 65:r.commit(s[o-2],"",s[o],"");break;case 66:r.commit(s[o],"",s[o-2],"");break;case 67:r.commit(s[o],s[o-2],r.commitType.NORMAL,"");break;case 68:r.commit(s[o-2],s[o],r.commitType.NORMAL,"");break;case 69:r.commit(s[o-4],"",s[o-2],s[o]);break;case 70:r.commit(s[o-4],"",s[o],s[o-2]);break;case 71:r.commit(s[o-2],"",s[o-4],s[o]);break;case 72:r.commit(s[o],"",s[o-4],s[o-2]);break;case 73:r.commit(s[o],"",s[o-2],s[o-4]);break;case 74:r.commit(s[o-2],"",s[o],s[o-4]);break;case 75:r.commit(s[o-4],s[o],s[o-2],"");break;case 76:r.commit(s[o-4],s[o-2],s[o],"");break;case 77:r.commit(s[o-2],s[o],s[o-4],"");break;case 78:r.commit(s[o],s[o-2],s[o-4],"");break;case 79:r.commit(s[o],s[o-4],s[o-2],"");break;case 80:r.commit(s[o-2],s[o-4],s[o],"");break;case 81:r.commit(s[o-4],s[o],r.commitType.NORMAL,s[o-2]);break;case 82:r.commit(s[o-4],s[o-2],r.commitType.NORMAL,s[o]);break;case 83:r.commit(s[o-2],s[o],r.commitType.NORMAL,s[o-4]);break;case 84:r.commit(s[o],s[o-2],r.commitType.NORMAL,s[o-4]);break;case 85:r.commit(s[o],s[o-4],r.commitType.NORMAL,s[o-2]);break;case 86:r.commit(s[o-2],s[o-4],r.commitType.NORMAL,s[o]);break;case 87:r.commit(s[o-6],s[o-4],s[o-2],s[o]);break;case 88:r.commit(s[o-6],s[o-4],s[o],s[o-2]);break;case 89:r.commit(s[o-6],s[o-2],s[o-4],s[o]);break;case 90:r.commit(s[o-6],s[o],s[o-4],s[o-2]);break;case 91:r.commit(s[o-6],s[o-2],s[o],s[o-4]);break;case 92:r.commit(s[o-6],s[o],s[o-2],s[o-4]);break;case 93:r.commit(s[o-4],s[o-6],s[o-2],s[o]);break;case 94:r.commit(s[o-4],s[o-6],s[o],s[o-2]);break;case 95:r.commit(s[o-2],s[o-6],s[o-4],s[o]);break;case 96:r.commit(s[o],s[o-6],s[o-4],s[o-2]);break;case 97:r.commit(s[o-2],s[o-6],s[o],s[o-4]);break;case 98:r.commit(s[o],s[o-6],s[o-2],s[o-4]);break;case 99:r.commit(s[o],s[o-4],s[o-2],s[o-6]);break;case 100:r.commit(s[o-2],s[o-4],s[o],s[o-6]);break;case 101:r.commit(s[o],s[o-2],s[o-4],s[o-6]);break;case 102:r.commit(s[o-2],s[o],s[o-4],s[o-6]);break;case 103:r.commit(s[o-4],s[o-2],s[o],s[o-6]);break;case 104:r.commit(s[o-4],s[o],s[o-2],s[o-6]);break;case 105:r.commit(s[o-2],s[o-4],s[o-6],s[o]);break;case 106:r.commit(s[o],s[o-4],s[o-6],s[o-2]);break;case 107:r.commit(s[o-2],s[o],s[o-6],s[o-4]);break;case 108:r.commit(s[o],s[o-2],s[o-6],s[o-4]);break;case 109:r.commit(s[o-4],s[o-2],s[o-6],s[o]);break;case 110:r.commit(s[o-4],s[o],s[o-6],s[o-2]);break;case 111:this.$="";break;case 112:this.$=s[o];break;case 113:this.$=r.commitType.NORMAL;break;case 114:this.$=r.commitType.REVERSE;break;case 115:this.$=r.commitType.HIGHLIGHT;break;case 118:r.parseDirective("%%{","open_directive");break;case 119:r.parseDirective(s[o],"type_directive");break;case 120:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 121:r.parseDirective("}%%","close_directive","gitGraph")}},table:[{3:1,4:2,5:3,6:e,8:i,14:r,46:8,50:n,55:s},{1:[3]},{3:10,4:2,5:3,6:e,8:i,14:r,46:8,50:n,55:s},{3:11,4:2,5:3,6:e,8:i,14:r,46:8,50:n,55:s},{7:12,8:a,9:[1,13],10:[1,14],11:15,14:o},t(l,[2,124]),t(l,[2,125]),t(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:a,11:15,14:o},{9:[1,21]},t(c,[2,10],{12:22,13:[1,23]}),t(h,[2,9]),{9:[1,25],48:24,53:d},t([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:a,11:15,14:o},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},t(h,[2,8]),t(u,[2,116]),{49:45,52:[1,46]},t(u,[2,121]),{1:[2,4]},{8:[1,47]},t(c,[2,11]),{4:48,8:i,14:r,55:s},t(c,[2,13]),t(p,[2,14]),t(p,[2,15]),t(p,[2,16]),{21:[1,49]},{23:[1,50]},t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),{28:51,34:g,54:y},t(p,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:g,54:y},{33:[1,61],35:[1,62]},{28:63,34:g,54:y},{48:64,53:d},{53:[2,120]},{1:[2,5]},t(c,[2,12]),t(p,[2,17]),t(p,[2,18]),t(p,[2,22]),t(f,[2,122]),t(f,[2,123]),t(p,[2,46]),{34:[1,65]},{39:66,43:m,44:b,45:x},{34:[1,70]},{34:[1,71]},t(p,[2,112]),t(p,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},t(p,[2,23],{30:[1,78]}),t(u,[2,117]),t(p,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),t(p,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),t(k,[2,113]),t(k,[2,114]),t(k,[2,115]),t(p,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),t(p,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:m,44:b,45:x},{34:[1,93]},t(p,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:m,44:b,45:x},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:m,44:b,45:x},{34:[1,106]},{34:[1,107]},{39:108,43:m,44:b,45:x},{34:[1,109]},t(p,[2,31],{35:[1,111],38:[1,110]}),t(p,[2,32],{33:[1,113],35:[1,112]}),t(p,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},t(p,[2,24]),t(p,[2,49],{33:[1,120],42:[1,121]}),t(p,[2,53],{38:[1,122],42:[1,123]}),t(p,[2,63],{33:[1,125],38:[1,124]}),t(p,[2,50],{33:[1,126],42:[1,127]}),t(p,[2,55],{35:[1,128],42:[1,129]}),t(p,[2,66],{33:[1,131],35:[1,130]}),t(p,[2,52],{38:[1,132],42:[1,133]}),t(p,[2,54],{35:[1,134],42:[1,135]}),t(p,[2,67],{35:[1,137],38:[1,136]}),t(p,[2,64],{33:[1,139],38:[1,138]}),t(p,[2,65],{33:[1,141],35:[1,140]}),t(p,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:m,44:b,45:x},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:m,44:b,45:x},t(p,[2,26]),t(p,[2,27]),t(p,[2,28]),t(p,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:m,44:b,45:x},{34:[1,153]},{39:154,43:m,44:b,45:x},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:m,44:b,45:x},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:m,44:b,45:x},{34:[1,167]},{39:168,43:m,44:b,45:x},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:m,44:b,45:x},{34:[1,173]},t(p,[2,37],{35:[1,174]}),t(p,[2,38],{38:[1,175]}),t(p,[2,36],{33:[1,176]}),t(p,[2,39],{35:[1,177]}),t(p,[2,34],{38:[1,178]}),t(p,[2,35],{33:[1,179]}),t(p,[2,60],{42:[1,180]}),t(p,[2,73],{33:[1,181]}),t(p,[2,61],{42:[1,182]}),t(p,[2,84],{38:[1,183]}),t(p,[2,74],{33:[1,184]}),t(p,[2,83],{38:[1,185]}),t(p,[2,59],{42:[1,186]}),t(p,[2,72],{33:[1,187]}),t(p,[2,58],{42:[1,188]}),t(p,[2,78],{35:[1,189]}),t(p,[2,71],{33:[1,190]}),t(p,[2,77],{35:[1,191]}),t(p,[2,57],{42:[1,192]}),t(p,[2,85],{38:[1,193]}),t(p,[2,56],{42:[1,194]}),t(p,[2,79],{35:[1,195]}),t(p,[2,80],{35:[1,196]}),t(p,[2,86],{38:[1,197]}),t(p,[2,70],{33:[1,198]}),t(p,[2,81],{38:[1,199]}),t(p,[2,69],{33:[1,200]}),t(p,[2,75],{35:[1,201]}),t(p,[2,76],{35:[1,202]}),t(p,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:m,44:b,45:x},{34:[1,206]},{34:[1,207]},{39:208,43:m,44:b,45:x},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:m,44:b,45:x},{34:[1,214]},{39:215,43:m,44:b,45:x},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:m,44:b,45:x},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:m,44:b,45:x},{34:[1,228]},{39:229,43:m,44:b,45:x},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:m,44:b,45:x},t(p,[2,40]),t(p,[2,42]),t(p,[2,41]),t(p,[2,43]),t(p,[2,45]),t(p,[2,44]),t(p,[2,101]),t(p,[2,102]),t(p,[2,99]),t(p,[2,100]),t(p,[2,104]),t(p,[2,103]),t(p,[2,108]),t(p,[2,107]),t(p,[2,106]),t(p,[2,105]),t(p,[2,110]),t(p,[2,109]),t(p,[2,98]),t(p,[2,97]),t(p,[2,96]),t(p,[2,95]),t(p,[2,93]),t(p,[2,94]),t(p,[2,92]),t(p,[2,91]),t(p,[2,90]),t(p,[2,89]),t(p,[2,87]),t(p,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},C=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 34:case 38:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return t}();function T(){this.yy={}}return _.lexer=C,T.prototype=_,_.Parser=T,new T}();Ii.parser=Ii;const Di=Ii,Oi=t=>null!==t.match(/^\s*gitGraph/);let Fi="",Ni="",$i="";const Ri=t=>L(t,ti()),Mi=function(){Fi="",$i="",Ni=""},Pi=function(t){Fi=Ri(t).replace(/^\s+/g,"")},Yi=function(){return Fi||Ni},zi=function(t){$i=Ri(t).replace(/\n\s+/g,"\n")},ji=function(){return $i},Zi=function(t){Ni=Ri(t)},Wi=function(){return Ni};let qi=ti().gitGraph.mainBranchName,Ui=ti().gitGraph.mainBranchOrder,Vi={},Hi=null,Gi={};Gi[qi]={name:qi,order:Ui};let Xi={};Xi[qi]=Hi;let Ki=qi,Qi="LR",Ji=0;function tr(){return Oe({length:7})}let er={};const ir=function(t){if(t=$.sanitizeText(t,ti()),void 0===Xi[t]){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}{Ki=t;const e=Xi[Ki];Hi=Vi[e]}};function rr(t,e,i){const r=t.indexOf(e);-1===r?t.push(i):t.splice(r,1,i)}function nr(t){const e=t.reduce(((t,e)=>t.seq>e.seq?t:e),t[0]);let i="";t.forEach((function(t){i+=t===e?"\t*":"\t|"}));const r=[i,e.id,e.seq];for(let n in Xi)Xi[n]===e.id&&r.push(n);if(v.debug(r.join(" ")),e.parents&&2==e.parents.length){const i=Vi[e.parents[0]];rr(t,e,i),t.push(Vi[e.parents[1]])}else{if(0==e.parents.length)return;{const i=Vi[e.parents];rr(t,e,i)}}nr(t=function(t,e){const i=Object.create(null);return t.reduce(((t,r)=>{const n=e(r);return i[n]||(i[n]=!0,t.push(r)),t}),[])}(t,(t=>t.id)))}const sr=function(){const t=Object.keys(Vi).map((function(t){return Vi[t]}));return t.forEach((function(t){v.debug(t.id)})),t.sort(((t,e)=>t.seq-e.seq)),t},ar={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},or={parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},getConfig:()=>ti().gitGraph,setDirection:function(t){Qi=t},setOptions:function(t){v.debug("options str",t),t=(t=t&&t.trim())||"{}";try{er=JSON.parse(t)}catch(e){v.error("error while parsing gitGraph options",e.message)}},getOptions:function(){return er},commit:function(t,e,i,r){v.debug("Entering commit:",t,e,i,r),e=$.sanitizeText(e,ti()),t=$.sanitizeText(t,ti()),r=$.sanitizeText(r,ti());const n={id:e||Ji+"-"+tr(),message:t,seq:Ji++,type:i||ar.NORMAL,tag:r||"",parents:null==Hi?[]:[Hi.id],branch:Ki};Hi=n,Vi[n.id]=n,Xi[Ki]=n.id,v.debug("in pushCommit "+n.id)},branch:function(t,e){if(t=$.sanitizeText(t,ti()),void 0!==Xi[t]){let e=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw e.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},e}Xi[t]=null!=Hi?Hi.id:null,Gi[t]={name:t,order:e?parseInt(e,10):null},ir(t),v.debug("in createBranch")},merge:function(t,e,i,r){t=$.sanitizeText(t,ti()),e=$.sanitizeText(e,ti());const n=Vi[Xi[Ki]],s=Vi[Xi[t]];if(Ki===t){let e=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(void 0===n||!n){let e=new Error('Incorrect usage of "merge". Current branch ('+Ki+")has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},e}if(void 0===Xi[t]){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},e}if(void 0===s||!s){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},e}if(n===s){let e=new Error('Incorrect usage of "merge". Both branches have same head');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(e&&void 0!==Vi[e]){let n=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw n.hash={text:"merge "+t+e+i+r,token:"merge "+t+e+i+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+i+" "+r]},n}const a={id:e||Ji+"-"+tr(),message:"merged branch "+t+" into "+Ki,seq:Ji++,parents:[null==Hi?null:Hi.id,Xi[t]],branch:Ki,type:ar.MERGE,customType:i,customId:!!e,tag:r||""};Hi=a,Vi[a.id]=a,Xi[Ki]=a.id,v.debug(Xi),v.debug("in mergeBranch")},cherryPick:function(t,e,i){if(v.debug("Entering cherryPick:",t,e,i),t=$.sanitizeText(t,ti()),e=$.sanitizeText(e,ti()),i=$.sanitizeText(i,ti()),!t||void 0===Vi[t]){let i=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw i.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},i}let r=Vi[t],n=r.branch;if(r.type===ar.MERGE){let i=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw i.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},i}if(!e||void 0===Vi[e]){if(n===Ki){let i=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw i.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},i}const s=Vi[Xi[Ki]];if(void 0===s||!s){let i=new Error('Incorrect usage of "cherry-pick". Current branch ('+Ki+")has no commits");throw i.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},i}const a={id:Ji+"-"+tr(),message:"cherry-picked "+r+" into "+Ki,seq:Ji++,parents:[null==Hi?null:Hi.id,r.id],branch:Ki,type:ar.CHERRY_PICK,tag:null!=i?i:"cherry-pick:"+r.id};Hi=a,Vi[a.id]=a,Xi[Ki]=a.id,v.debug(Xi),v.debug("in cherryPick")}},checkout:ir,prettyPrint:function(){v.debug(Vi);nr([sr()[0]])},clear:function(){Vi={},Hi=null;let t=ti().gitGraph.mainBranchName,e=ti().gitGraph.mainBranchOrder;Xi={},Xi[t]=null,Gi={},Gi[t]={name:t,order:e},Ki=t,Ji=0,Mi()},getBranchesAsObjArray:function(){const t=Object.values(Gi).map(((t,e)=>null!==t.order?t:{...t,order:parseFloat(`0.${e}`,10)})).sort(((t,e)=>t.order-e.order)).map((({name:t})=>({name:t})));return t},getBranches:function(){return Xi},getCommits:function(){return Vi},getCommitsArray:sr,getCurrentBranch:function(){return Ki},getDirection:function(){return Qi},getHead:function(){return Hi},setAccTitle:Pi,getAccTitle:Yi,getAccDescription:ji,setAccDescription:zi,setDiagramTitle:Zi,getDiagramTitle:Wi,commitType:ar};let lr={};const cr=0,hr=1,dr=2,ur=3,pr=4;let gr={},yr={},fr=[],mr=0;const br=(t,e,i)=>{const r=vi().gitGraph,n=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort(((t,i)=>e[t].seq-e[i].seq)).forEach((t=>{const o=e[t],l=gr[o.branch].pos,c=a+10;if(i){let t,e=void 0!==o.customType&&""!==o.customType?o.customType:o.type;switch(e){case cr:t="commit-normal";break;case hr:t="commit-reverse";break;case dr:t="commit-highlight";break;case ur:t="commit-merge";break;case pr:t="commit-cherry-pick";break;default:t="commit-normal"}if(e===dr){const e=n.append("rect");e.attr("x",c-10),e.attr("y",l-10),e.attr("height",20),e.attr("width",20),e.attr("class",`commit ${o.id} commit-highlight${gr[o.branch].index%8} ${t}-outer`),n.append("rect").attr("x",c-6).attr("y",l-6).attr("height",12).attr("width",12).attr("class",`commit ${o.id} commit${gr[o.branch].index%8} ${t}-inner`)}else if(e===pr)n.append("circle").attr("cx",c).attr("cy",l).attr("r",10).attr("class",`commit ${o.id} ${t}`),n.append("circle").attr("cx",c-3).attr("cy",l+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${o.id} ${t}`),n.append("circle").attr("cx",c+3).attr("cy",l+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${o.id} ${t}`),n.append("line").attr("x1",c+3).attr("y1",l+1).attr("x2",c).attr("y2",l-5).attr("stroke","#fff").attr("class",`commit ${o.id} ${t}`),n.append("line").attr("x1",c-3).attr("y1",l+1).attr("x2",c).attr("y2",l-5).attr("stroke","#fff").attr("class",`commit ${o.id} ${t}`);else{const i=n.append("circle");if(i.attr("cx",c),i.attr("cy",l),i.attr("r",o.type===ur?9:10),i.attr("class",`commit ${o.id} commit${gr[o.branch].index%8}`),e===ur){const e=n.append("circle");e.attr("cx",c),e.attr("cy",l),e.attr("r",6),e.attr("class",`commit ${t} ${o.id} commit${gr[o.branch].index%8}`)}if(e===hr){n.append("path").attr("d",`M ${c-5},${l-5}L${c+5},${l+5}M${c-5},${l+5}L${c+5},${l-5}`).attr("class",`commit ${t} ${o.id} commit${gr[o.branch].index%8}`)}}}if(yr[o.id]={x:a+10,y:l},i){const t=4,e=2;if(o.type!==pr&&(o.customId&&o.type===ur||o.type!==ur)&&r.showCommitLabel){const t=s.append("g"),i=t.insert("rect").attr("class","commit-label-bkg"),n=t.append("text").attr("x",a).attr("y",l+25).attr("class","commit-label").text(o.id);let c=n.node().getBBox();if(i.attr("x",a+10-c.width/2-e).attr("y",l+13.5).attr("width",c.width+2*e).attr("height",c.height+2*e),n.attr("x",a+10-c.width/2),r.rotateCommitLabel){let e=-7.5-(c.width+10)/25*9.5,i=10+c.width/25*8.5;t.attr("transform","translate("+e+", "+i+") rotate("+"-45, "+a+", "+l+")")}}if(o.tag){const i=s.insert("polygon"),r=s.append("circle"),n=s.append("text").attr("y",l-16).attr("class","tag-label").text(o.tag);let c=n.node().getBBox();n.attr("x",a+10-c.width/2);const h=c.height/2,d=l-19.2;i.attr("class","tag-label-bkg").attr("points",`\n ${a-c.width/2-t/2},${d+e}\n ${a-c.width/2-t/2},${d-e}\n ${a+10-c.width/2-t},${d-h-e}\n ${a+10+c.width/2+t},${d-h-e}\n ${a+10+c.width/2+t},${d+h+e}\n ${a+10-c.width/2-t},${d+h+e}`),r.attr("cx",a-c.width/2+t/2).attr("cy",d).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>mr&&(mr=a)}))},xr=(t,e,i=0)=>{const r=t+Math.abs(t-e)/2;if(i>5)return r;if(fr.every((t=>Math.abs(t-r)>=10)))return fr.push(r),r;const n=Math.abs(t-e);return xr(t,e-n/5,i+1)},kr=(t,e,i,r)=>{const n=yr[e.id],s=yr[i.id],a=((t,e,i)=>Object.keys(i).filter((r=>i[r].branch===e.branch&&i[r].seq>t.seq&&i[r].seq<e.seq)).length>0)(e,i,r);let o,l="",c="",h=0,d=0,u=gr[i.branch].index;if(a){l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,d=10,u=gr[i.branch].index;const t=n.y<s.y?xr(n.y,s.y):xr(s.y,n.y);o=n.y<s.y?`M ${n.x} ${n.y} L ${n.x} ${t-h} ${l} ${n.x+d} ${t} L ${s.x-h} ${t} ${c} ${s.x} ${t+d} L ${s.x} ${s.y}`:`M ${n.x} ${n.y} L ${n.x} ${t+h} ${c} ${n.x+d} ${t} L ${s.x-h} ${t} ${l} ${s.x} ${t-d} L ${s.x} ${s.y}`}else n.y<s.y&&(l="A 20 20, 0, 0, 0,",h=20,d=20,u=gr[i.branch].index,o=`M ${n.x} ${n.y} L ${n.x} ${s.y-h} ${l} ${n.x+d} ${s.y} L ${s.x} ${s.y}`),n.y>s.y&&(l="A 20 20, 0, 0, 0,",h=20,d=20,u=gr[e.branch].index,o=`M ${n.x} ${n.y} L ${s.x-h} ${n.y} ${l} ${s.x} ${n.y-d} L ${s.x} ${s.y}`),n.y===s.y&&(u=gr[e.branch].index,o=`M ${n.x} ${n.y} L ${n.x} ${s.y-h} ${l} ${n.x+d} ${s.y} L ${s.x} ${s.y}`);t.append("path").attr("d",o).attr("class","arrow arrow"+u%8)},_r=(t,e)=>{const i=vi().gitGraph,r=t.append("g");e.forEach(((t,e)=>{const n=e%8,s=gr[t.name].pos,a=r.append("line");a.attr("x1",0),a.attr("y1",s),a.attr("x2",mr),a.attr("y2",s),a.attr("class","branch branch"+n),fr.push(s);const o=(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let i=[];i="string"===typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?t:[];for(const r of i){const t=document.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","0"),t.setAttribute("class","row"),t.textContent=r.trim(),e.appendChild(t)}return e})(t.name),l=r.insert("rect"),c=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);c.node().appendChild(o);let h=o.getBBox();l.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-h.width-4-(!0===i.rotateCommitLabel?30:0)).attr("y",-h.height/2+8).attr("width",h.width+18).attr("height",h.height+4),c.attr("transform","translate("+(-h.width-14-(!0===i.rotateCommitLabel?30:0))+", "+(s-h.height/2-1)+")"),l.attr("transform","translate(-19, "+(s-h.height/2)+")")}))},Cr={draw:function(t,e,i,r){var n;gr={},yr={},lr={},mr=0,fr=[];const a=vi(),o=a.gitGraph;v.debug("in gitgraph renderer",t+"\n","id:",e,i),lr=r.db.getCommits();const l=r.db.getBranchesAsObjArray();let c=0;l.forEach(((t,e)=>{gr[t.name]={pos:c,index:e},c+=50+(o.rotateCommitLabel?40:0)}));const h=(0,s.Ys)(`[id="${e}"]`);br(h,lr,!1),o.showBranches&&_r(h,l),((t,e)=>{const i=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((t=>{const r=e[t];r.parents&&r.parents.length>0&&r.parents.forEach((t=>{kr(i,e[t],r,e)}))}))})(h,lr),br(h,lr,!0),We.insertTitle(h,"gitTitleText",o.titleTopMargin,r.db.getDiagramTitle()),Ai(void 0,h,o.diagramPadding,null!=(n=o.useMaxWidth)?n:a.useMaxWidth)}},Tr=t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n }\n`;var Er=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,6],i=[1,7],r=[1,8],n=[1,9],s=[1,16],a=[1,11],o=[1,12],l=[1,13],h=[1,14],d=[1,15],u=[1,27],p=[1,33],g=[1,34],y=[1,35],f=[1,36],m=[1,37],b=[1,72],x=[1,73],k=[1,74],_=[1,75],C=[1,76],T=[1,77],E=[1,78],v=[1,38],S=[1,39],A=[1,40],w=[1,41],B=[1,42],L=[1,43],I=[1,44],D=[1,45],O=[1,46],F=[1,47],N=[1,48],$=[1,49],R=[1,50],M=[1,51],P=[1,52],Y=[1,53],z=[1,54],j=[1,55],Z=[1,56],W=[1,57],q=[1,59],U=[1,60],V=[1,61],H=[1,62],G=[1,63],X=[1,64],K=[1,65],Q=[1,66],J=[1,67],tt=[1,68],et=[1,69],it=[24,52],rt=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],nt=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],st=[1,94],at=[1,95],ot=[1,96],lt=[1,97],ct=[15,24,52],ht=[7,8,9,10,18,22,25,26,27,28],dt=[15,24,43,52],ut=[15,24,43,52,86,87,89,90],pt=[15,43],gt=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],yt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 4:r.setDirection("TB");break;case 5:r.setDirection("BT");break;case 6:r.setDirection("RL");break;case 7:r.setDirection("LR");break;case 11:r.parseDirective("%%{","open_directive");break;case 12:break;case 13:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 14:r.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:r.setC4Type(s[o-3]);break;case 26:r.setTitle(s[o].substring(6)),this.$=s[o].substring(6);break;case 27:r.setAccDescription(s[o].substring(15)),this.$=s[o].substring(15);break;case 28:this.$=s[o].trim(),r.setTitle(this.$);break;case 29:case 30:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 35:case 36:s[o].splice(2,0,"ENTERPRISE"),r.addPersonOrSystemBoundary(...s[o]),this.$=s[o];break;case 37:r.addPersonOrSystemBoundary(...s[o]),this.$=s[o];break;case 38:s[o].splice(2,0,"CONTAINER"),r.addContainerBoundary(...s[o]),this.$=s[o];break;case 39:r.addDeploymentNode("node",...s[o]),this.$=s[o];break;case 40:r.addDeploymentNode("nodeL",...s[o]),this.$=s[o];break;case 41:r.addDeploymentNode("nodeR",...s[o]),this.$=s[o];break;case 42:r.popBoundaryParseStack();break;case 46:r.addPersonOrSystem("person",...s[o]),this.$=s[o];break;case 47:r.addPersonOrSystem("external_person",...s[o]),this.$=s[o];break;case 48:r.addPersonOrSystem("system",...s[o]),this.$=s[o];break;case 49:r.addPersonOrSystem("system_db",...s[o]),this.$=s[o];break;case 50:r.addPersonOrSystem("system_queue",...s[o]),this.$=s[o];break;case 51:r.addPersonOrSystem("external_system",...s[o]),this.$=s[o];break;case 52:r.addPersonOrSystem("external_system_db",...s[o]),this.$=s[o];break;case 53:r.addPersonOrSystem("external_system_queue",...s[o]),this.$=s[o];break;case 54:r.addContainer("container",...s[o]),this.$=s[o];break;case 55:r.addContainer("container_db",...s[o]),this.$=s[o];break;case 56:r.addContainer("container_queue",...s[o]),this.$=s[o];break;case 57:r.addContainer("external_container",...s[o]),this.$=s[o];break;case 58:r.addContainer("external_container_db",...s[o]),this.$=s[o];break;case 59:r.addContainer("external_container_queue",...s[o]),this.$=s[o];break;case 60:r.addComponent("component",...s[o]),this.$=s[o];break;case 61:r.addComponent("component_db",...s[o]),this.$=s[o];break;case 62:r.addComponent("component_queue",...s[o]),this.$=s[o];break;case 63:r.addComponent("external_component",...s[o]),this.$=s[o];break;case 64:r.addComponent("external_component_db",...s[o]),this.$=s[o];break;case 65:r.addComponent("external_component_queue",...s[o]),this.$=s[o];break;case 67:r.addRel("rel",...s[o]),this.$=s[o];break;case 68:r.addRel("birel",...s[o]),this.$=s[o];break;case 69:r.addRel("rel_u",...s[o]),this.$=s[o];break;case 70:r.addRel("rel_d",...s[o]),this.$=s[o];break;case 71:r.addRel("rel_l",...s[o]),this.$=s[o];break;case 72:r.addRel("rel_r",...s[o]),this.$=s[o];break;case 73:r.addRel("rel_b",...s[o]),this.$=s[o];break;case 74:s[o].splice(0,1),r.addRel("rel",...s[o]),this.$=s[o];break;case 75:r.updateElStyle("update_el_style",...s[o]),this.$=s[o];break;case 76:r.updateRelStyle("update_rel_style",...s[o]),this.$=s[o];break;case 77:r.updateLayoutConfig("update_layout_config",...s[o]),this.$=s[o];break;case 78:this.$=[s[o]];break;case 79:s[o].unshift(s[o-1]),this.$=s[o];break;case 80:case 82:this.$=s[o].trim();break;case 81:let t={};t[s[o-1].trim()]=s[o].trim(),this.$=t;break;case 83:this.$=""}},table:[{3:1,4:2,5:3,6:4,7:e,8:i,9:r,10:n,11:5,12:10,18:s,22:a,25:o,26:l,27:h,28:d},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:e,8:i,9:r,10:n,11:5,12:10,18:s,22:a,25:o,26:l,27:h,28:d},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:u},t([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:p,33:g,34:y,36:f,38:m,39:58,40:70,42:71,44:b,46:x,47:k,48:_,49:C,50:T,51:E,53:32,54:v,55:S,56:A,57:w,58:B,59:L,60:I,61:D,62:O,63:F,64:N,65:$,66:R,67:M,68:P,69:Y,70:z,71:j,72:Z,73:W,74:q,75:U,76:V,77:H,78:G,79:X,80:K,81:Q,82:J,83:tt,84:et},{23:79,29:29,30:30,31:31,32:p,33:g,34:y,36:f,38:m,39:58,40:70,42:71,44:b,46:x,47:k,48:_,49:C,50:T,51:E,53:32,54:v,55:S,56:A,57:w,58:B,59:L,60:I,61:D,62:O,63:F,64:N,65:$,66:R,67:M,68:P,69:Y,70:z,71:j,72:Z,73:W,74:q,75:U,76:V,77:H,78:G,79:X,80:K,81:Q,82:J,83:tt,84:et},{23:80,29:29,30:30,31:31,32:p,33:g,34:y,36:f,38:m,39:58,40:70,42:71,44:b,46:x,47:k,48:_,49:C,50:T,51:E,53:32,54:v,55:S,56:A,57:w,58:B,59:L,60:I,61:D,62:O,63:F,64:N,65:$,66:R,67:M,68:P,69:Y,70:z,71:j,72:Z,73:W,74:q,75:U,76:V,77:H,78:G,79:X,80:K,81:Q,82:J,83:tt,84:et},{23:81,29:29,30:30,31:31,32:p,33:g,34:y,36:f,38:m,39:58,40:70,42:71,44:b,46:x,47:k,48:_,49:C,50:T,51:E,53:32,54:v,55:S,56:A,57:w,58:B,59:L,60:I,61:D,62:O,63:F,64:N,65:$,66:R,67:M,68:P,69:Y,70:z,71:j,72:Z,73:W,74:q,75:U,76:V,77:H,78:G,79:X,80:K,81:Q,82:J,83:tt,84:et},{23:82,29:29,30:30,31:31,32:p,33:g,34:y,36:f,38:m,39:58,40:70,42:71,44:b,46:x,47:k,48:_,49:C,50:T,51:E,53:32,54:v,55:S,56:A,57:w,58:B,59:L,60:I,61:D,62:O,63:F,64:N,65:$,66:R,67:M,68:P,69:Y,70:z,71:j,72:Z,73:W,74:q,75:U,76:V,77:H,78:G,79:X,80:K,81:Q,82:J,83:tt,84:et},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},t(it,[2,20],{53:32,39:58,40:70,42:71,30:87,44:b,46:x,47:k,48:_,49:C,50:T,51:E,54:v,55:S,56:A,57:w,58:B,59:L,60:I,61:D,62:O,63:F,64:N,65:$,66:R,67:M,68:P,69:Y,70:z,71:j,72:Z,73:W,74:q,75:U,76:V,77:H,78:G,79:X,80:K,81:Q,82:J,83:tt,84:et}),t(it,[2,21]),t(rt,[2,23],{15:[1,88]}),t(it,[2,43],{15:[1,89]}),t(nt,[2,26]),t(nt,[2,27]),{35:[1,90]},{37:[1,91]},t(nt,[2,30]),{45:92,85:93,86:st,87:at,89:ot,90:lt},{45:98,85:93,86:st,87:at,89:ot,90:lt},{45:99,85:93,86:st,87:at,89:ot,90:lt},{45:100,85:93,86:st,87:at,89:ot,90:lt},{45:101,85:93,86:st,87:at,89:ot,90:lt},{45:102,85:93,86:st,87:at,89:ot,90:lt},{45:103,85:93,86:st,87:at,89:ot,90:lt},{45:104,85:93,86:st,87:at,89:ot,90:lt},{45:105,85:93,86:st,87:at,89:ot,90:lt},{45:106,85:93,86:st,87:at,89:ot,90:lt},{45:107,85:93,86:st,87:at,89:ot,90:lt},{45:108,85:93,86:st,87:at,89:ot,90:lt},{45:109,85:93,86:st,87:at,89:ot,90:lt},{45:110,85:93,86:st,87:at,89:ot,90:lt},{45:111,85:93,86:st,87:at,89:ot,90:lt},{45:112,85:93,86:st,87:at,89:ot,90:lt},{45:113,85:93,86:st,87:at,89:ot,90:lt},{45:114,85:93,86:st,87:at,89:ot,90:lt},{45:115,85:93,86:st,87:at,89:ot,90:lt},{45:116,85:93,86:st,87:at,89:ot,90:lt},t(ct,[2,66]),{45:117,85:93,86:st,87:at,89:ot,90:lt},{45:118,85:93,86:st,87:at,89:ot,90:lt},{45:119,85:93,86:st,87:at,89:ot,90:lt},{45:120,85:93,86:st,87:at,89:ot,90:lt},{45:121,85:93,86:st,87:at,89:ot,90:lt},{45:122,85:93,86:st,87:at,89:ot,90:lt},{45:123,85:93,86:st,87:at,89:ot,90:lt},{45:124,85:93,86:st,87:at,89:ot,90:lt},{45:125,85:93,86:st,87:at,89:ot,90:lt},{45:126,85:93,86:st,87:at,89:ot,90:lt},{45:127,85:93,86:st,87:at,89:ot,90:lt},{30:128,39:58,40:70,42:71,44:b,46:x,47:k,48:_,49:C,50:T,51:E,53:32,54:v,55:S,56:A,57:w,58:B,59:L,60:I,61:D,62:O,63:F,64:N,65:$,66:R,67:M,68:P,69:Y,70:z,71:j,72:Z,73:W,74:q,75:U,76:V,77:H,78:G,79:X,80:K,81:Q,82:J,83:tt,84:et},{15:[1,130],43:[1,129]},{45:131,85:93,86:st,87:at,89:ot,90:lt},{45:132,85:93,86:st,87:at,89:ot,90:lt},{45:133,85:93,86:st,87:at,89:ot,90:lt},{45:134,85:93,86:st,87:at,89:ot,90:lt},{45:135,85:93,86:st,87:at,89:ot,90:lt},{45:136,85:93,86:st,87:at,89:ot,90:lt},{45:137,85:93,86:st,87:at,89:ot,90:lt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(ht,[2,9]),{14:142,21:u},{21:[2,13]},{1:[2,15]},t(it,[2,22]),t(rt,[2,24],{31:31,29:143,32:p,33:g,34:y,36:f,38:m}),t(it,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:p,33:g,34:y,36:f,38:m,44:b,46:x,47:k,48:_,49:C,50:T,51:E,54:v,55:S,56:A,57:w,58:B,59:L,60:I,61:D,62:O,63:F,64:N,65:$,66:R,67:M,68:P,69:Y,70:z,71:j,72:Z,73:W,74:q,75:U,76:V,77:H,78:G,79:X,80:K,81:Q,82:J,83:tt,84:et}),t(nt,[2,28]),t(nt,[2,29]),t(ct,[2,46]),t(dt,[2,78],{85:93,45:145,86:st,87:at,89:ot,90:lt}),t(ut,[2,80]),{88:[1,146]},t(ut,[2,82]),t(ut,[2,83]),t(ct,[2,47]),t(ct,[2,48]),t(ct,[2,49]),t(ct,[2,50]),t(ct,[2,51]),t(ct,[2,52]),t(ct,[2,53]),t(ct,[2,54]),t(ct,[2,55]),t(ct,[2,56]),t(ct,[2,57]),t(ct,[2,58]),t(ct,[2,59]),t(ct,[2,60]),t(ct,[2,61]),t(ct,[2,62]),t(ct,[2,63]),t(ct,[2,64]),t(ct,[2,65]),t(ct,[2,67]),t(ct,[2,68]),t(ct,[2,69]),t(ct,[2,70]),t(ct,[2,71]),t(ct,[2,72]),t(ct,[2,73]),t(ct,[2,74]),t(ct,[2,75]),t(ct,[2,76]),t(ct,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},t(pt,[2,35]),t(pt,[2,36]),t(pt,[2,37]),t(pt,[2,38]),t(pt,[2,39]),t(pt,[2,40]),t(pt,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(rt,[2,25]),t(it,[2,45]),t(dt,[2,79]),t(ut,[2,81]),t(ct,[2,31]),t(ct,[2,42]),t(gt,[2,32]),t(gt,[2,33],{15:[1,152]}),t(ht,[2,10]),t(gt,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},ft=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 78:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:case 21:case 75:break;case 19:c;break;case 20:return 15;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:case 58:return this.begin("rel_u"),76;case 59:case 60:return this.begin("rel_d"),77;case 61:case 62:return this.begin("rel_l"),78;case 63:case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:case 84:this.popState(),this.popState();break;case 74:case 76:return 90;case 77:this.begin("string");break;case 79:case 85:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}};return t}();function mt(){this.yy={}}return yt.lexer=ft,mt.prototype=yt,yt.Parser=mt,new mt}();Er.parser=Er;const vr=Er,Sr=t=>null!==t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/);let Ar=[],wr=[""],Br="global",Lr="",Ir=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Dr=[],Or="",Fr=!1,Nr=4,$r=2;var Rr;const Mr=function(t){return void 0===t||null===t?Ar:Ar.filter((e=>e.parentBoundary===t))},Pr=function(){return Fr},Yr={addPersonOrSystem:function(t,e,i,r,n,s,a){if(null===e||null===i)return;let o={};const l=Ar.find((t=>t.alias===e));if(l&&e===l.alias?o=l:(o.alias=e,Ar.push(o)),o.label=void 0===i||null===i?{text:""}:{text:i},void 0===r||null===r)o.descr={text:""};else if("object"===typeof r){let[t,e]=Object.entries(r)[0];o[t]={text:e}}else o.descr={text:r};if("object"===typeof n){let[t,e]=Object.entries(n)[0];o[t]=e}else o.sprite=n;if("object"===typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"===typeof a){let[t,e]=Object.entries(a)[0];o[t]=e}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=Br,o.wrap=Pr()},addPersonOrSystemBoundary:function(t,e,i,r,n){if(null===t||null===e)return;let s={};const a=Ir.find((e=>e.alias===t));if(a&&t===a.alias?s=a:(s.alias=t,Ir.push(s)),s.label=void 0===e||null===e?{text:""}:{text:e},void 0===i||null===i)s.type={text:"system"};else if("object"===typeof i){let[t,e]=Object.entries(i)[0];s[t]={text:e}}else s.type={text:i};if("object"===typeof r){let[t,e]=Object.entries(r)[0];s[t]=e}else s.tags=r;if("object"===typeof n){let[t,e]=Object.entries(n)[0];s[t]=e}else s.link=n;s.parentBoundary=Br,s.wrap=Pr(),Lr=Br,Br=t,wr.push(Lr)},addContainer:function(t,e,i,r,n,s,a,o){if(null===e||null===i)return;let l={};const c=Ar.find((t=>t.alias===e));if(c&&e===c.alias?l=c:(l.alias=e,Ar.push(l)),l.label=void 0===i||null===i?{text:""}:{text:i},void 0===r||null===r)l.techn={text:""};else if("object"===typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.techn={text:r};if(void 0===n||null===n)l.descr={text:""};else if("object"===typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"===typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.sprite=s;if("object"===typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.tags=a;if("object"===typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.wrap=Pr(),l.typeC4Shape={text:t},l.parentBoundary=Br},addContainerBoundary:function(t,e,i,r,n){if(null===t||null===e)return;let s={};const a=Ir.find((e=>e.alias===t));if(a&&t===a.alias?s=a:(s.alias=t,Ir.push(s)),s.label=void 0===e||null===e?{text:""}:{text:e},void 0===i||null===i)s.type={text:"container"};else if("object"===typeof i){let[t,e]=Object.entries(i)[0];s[t]={text:e}}else s.type={text:i};if("object"===typeof r){let[t,e]=Object.entries(r)[0];s[t]=e}else s.tags=r;if("object"===typeof n){let[t,e]=Object.entries(n)[0];s[t]=e}else s.link=n;s.parentBoundary=Br,s.wrap=Pr(),Lr=Br,Br=t,wr.push(Lr)},addComponent:function(t,e,i,r,n,s,a,o){if(null===e||null===i)return;let l={};const c=Ar.find((t=>t.alias===e));if(c&&e===c.alias?l=c:(l.alias=e,Ar.push(l)),l.label=void 0===i||null===i?{text:""}:{text:i},void 0===r||null===r)l.techn={text:""};else if("object"===typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.techn={text:r};if(void 0===n||null===n)l.descr={text:""};else if("object"===typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"===typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.sprite=s;if("object"===typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.tags=a;if("object"===typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.wrap=Pr(),l.typeC4Shape={text:t},l.parentBoundary=Br},addDeploymentNode:function(t,e,i,r,n,s,a,o){if(null===e||null===i)return;let l={};const c=Ir.find((t=>t.alias===e));if(c&&e===c.alias?l=c:(l.alias=e,Ir.push(l)),l.label=void 0===i||null===i?{text:""}:{text:i},void 0===r||null===r)l.type={text:"node"};else if("object"===typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.type={text:r};if(void 0===n||null===n)l.descr={text:""};else if("object"===typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"===typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.tags=a;if("object"===typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.nodeType=t,l.parentBoundary=Br,l.wrap=Pr(),Lr=Br,Br=e,wr.push(Lr)},popBoundaryParseStack:function(){Br=Lr,wr.pop(),Lr=wr.pop(),wr.push(Lr)},addRel:function(t,e,i,r,n,s,a,o,l){if(void 0===t||null===t||void 0===e||null===e||void 0===i||null===i||void 0===r||null===r)return;let c={};const h=Dr.find((t=>t.from===e&&t.to===i));if(h?c=h:Dr.push(c),c.type=t,c.from=e,c.to=i,c.label={text:r},void 0===n||null===n)c.techn={text:""};else if("object"===typeof n){let[t,e]=Object.entries(n)[0];c[t]={text:e}}else c.techn={text:n};if(void 0===s||null===s)c.descr={text:""};else if("object"===typeof s){let[t,e]=Object.entries(s)[0];c[t]={text:e}}else c.descr={text:s};if("object"===typeof a){let[t,e]=Object.entries(a)[0];c[t]=e}else c.sprite=a;if("object"===typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.tags=o;if("object"===typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.link=l;c.wrap=Pr()},updateElStyle:function(t,e,i,r,n,s,a,o,l,c,h){let d=Ar.find((t=>t.alias===e));if(void 0!==d||(d=Ir.find((t=>t.alias===e)),void 0!==d)){if(void 0!==i&&null!==i)if("object"===typeof i){let[t,e]=Object.entries(i)[0];d[t]=e}else d.bgColor=i;if(void 0!==r&&null!==r)if("object"===typeof r){let[t,e]=Object.entries(r)[0];d[t]=e}else d.fontColor=r;if(void 0!==n&&null!==n)if("object"===typeof n){let[t,e]=Object.entries(n)[0];d[t]=e}else d.borderColor=n;if(void 0!==s&&null!==s)if("object"===typeof s){let[t,e]=Object.entries(s)[0];d[t]=e}else d.shadowing=s;if(void 0!==a&&null!==a)if("object"===typeof a){let[t,e]=Object.entries(a)[0];d[t]=e}else d.shape=a;if(void 0!==o&&null!==o)if("object"===typeof o){let[t,e]=Object.entries(o)[0];d[t]=e}else d.sprite=o;if(void 0!==l&&null!==l)if("object"===typeof l){let[t,e]=Object.entries(l)[0];d[t]=e}else d.techn=l;if(void 0!==c&&null!==c)if("object"===typeof c){let[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(void 0!==h&&null!==h)if("object"===typeof h){let[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}},updateRelStyle:function(t,e,i,r,n,s,a){const o=Dr.find((t=>t.from===e&&t.to===i));if(void 0!==o){if(void 0!==r&&null!==r)if("object"===typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.textColor=r;if(void 0!==n&&null!==n)if("object"===typeof n){let[t,e]=Object.entries(n)[0];o[t]=e}else o.lineColor=n;if(void 0!==s&&null!==s)if("object"===typeof s){let[t,e]=Object.entries(s)[0];o[t]=parseInt(e)}else o.offsetX=parseInt(s);if(void 0!==a&&null!==a)if("object"===typeof a){let[t,e]=Object.entries(a)[0];o[t]=parseInt(e)}else o.offsetY=parseInt(a)}},updateLayoutConfig:function(t,e,i){let r=Nr,n=$r;if("object"===typeof e){const t=Object.values(e)[0];r=parseInt(t)}else r=parseInt(e);if("object"===typeof i){const t=Object.values(i)[0];n=parseInt(t)}else n=parseInt(i);r>=1&&(Nr=r),n>=1&&($r=n)},autoWrap:Pr,setWrap:function(t){Fr=t},getC4ShapeArray:Mr,getC4Shape:function(t){return Ar.find((e=>e.alias===t))},getC4ShapeKeys:function(t){return Object.keys(Mr(t))},getBoundarys:function(t){return void 0===t||null===t?Ir:Ir.filter((e=>e.parentBoundary===t))},getCurrentBoundaryParse:function(){return Br},getParentBoundaryParse:function(){return Lr},getRels:function(){return Dr},getTitle:function(){return Or},getC4Type:function(){return Rr},getC4ShapeInRow:function(){return Nr},getC4BoundaryInRow:function(){return $r},setAccTitle:Pi,getAccTitle:Yi,getAccDescription:ji,setAccDescription:zi,parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},getConfig:()=>ti().c4,clear:function(){Ar=[],Ir=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Lr="",Br="global",wr=[""],Dr=[],wr=[""],Or="",Fr=!1,Nr=4,$r=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){let e=L(t,ti());Or=e},setC4Type:function(t){let e=L(t,ti());Rr=e}},zr=function(t,e){const i=t.append("rect");if(i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),"undefined"!==e.attrs&&null!==e.attrs)for(let r in e.attrs)i.attr(r,e.attrs[r]);return"undefined"!==e.class&&i.attr("class",e.class),i},jr=function(t,e,i,r,s,a){const o=t.append("image");o.attr("width",e),o.attr("height",i),o.attr("x",r),o.attr("y",s);let l=a.startsWith("data:image/png;base64")?a:(0,n.N)(a);o.attr("xlink:href",l)},Zr=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Wr=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),qr=function(){function t(t,e,i,n,s,a,o){r(e.append("text").attr("x",i+s/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,i,n,s,a,o,l){const{fontSize:c,fontFamily:h,fontWeight:d}=l,u=t.split($.lineBreakRegex);for(let p=0;p<u.length;p++){const t=p*c-c*(u.length-1)/2,a=e.append("text").attr("x",i+s/2).attr("y",n).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",c).style("font-weight",d).style("font-family",h);a.append("tspan").attr("dy",t).text(u[p]).attr("alignment-baseline","mathematical"),r(a,o)}}function i(t,i,n,s,a,o,l,c){const h=i.append("switch"),d=h.append("foreignObject").attr("x",n).attr("y",s).attr("width",a).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,n,s,a,0,l,c),r(d,l)}function r(t,e){for(const i in e)e.hasOwnProperty(i)&&t.attr(i,e[i])}return function(r){return"fo"===r.textPlacement?i:"old"===r.textPlacement?t:e}}(),Ur=function(t,e,i){const r=t.append("g");let n=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",a=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:n,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};zr(r,l);let c=i.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,qr(i)(e.label.text,r,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=i.boundaryFont(),c.fontColor=a,qr(i)(e.type.text,r,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=i.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=a,qr(i)(e.descr.text,r,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))},Vr=function(t,e,i){let r=e.bgColor?e.bgColor:i[e.typeC4Shape.text+"_bg_color"],n=e.borderColor?e.borderColor:i[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const o=t.append("g");o.attr("class","person-man");const l=Zr();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=r,l.width=e.width,l.height=e.height,l.style="stroke:"+n+";stroke-width:0.5;",l.rx=2.5,l.ry=2.5,zr(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let c=Wr(i,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",c.fontFamily).attr("font-size",c.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":jr(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,a)}let h=i[e.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=s,qr(i)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},h),h=i[e.typeC4Shape.text+"Font"](),h.fontColor=s,e.thchn&&""!==e.thchn.text?qr(i)(e.thchn.text,o,e.x,e.y+e.thchn.Y,e.width,e.height,{fill:s,"font-style":"italic"},h):e.type&&""!==e.type.text&&qr(i)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},h),e.descr&&""!==e.descr.text&&(h=i.personFont(),h.fontColor=s,qr(i)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},h)),e.height},Hr=(t,e,i)=>{const r=t.append("g");let n=0;for(let s of e){let t=s.textColor?s.textColor:"#444444",e=s.lineColor?s.lineColor:"#444444",a=s.offsetX?parseInt(s.offsetX):0,o=s.offsetY?parseInt(s.offsetY):0,l="";if(0===n){let t=r.append("line");t.attr("x1",s.startPoint.x),t.attr("y1",s.startPoint.y),t.attr("x2",s.endPoint.x),t.attr("y2",s.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==s.type&&t.attr("marker-end","url("+l+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+l+"#arrowend)"),n=-1}else{let t=r.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),"rel_b"!==s.type&&t.attr("marker-end","url("+l+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+l+"#arrowend)")}let c=i.messageFont();qr(i)(s.label.text,r,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+a,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+o,s.label.width,s.label.height,{fill:t},c),s.techn&&""!==s.techn.text&&(c=i.messageFont(),qr(i)("["+s.techn.text+"]",r,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+a,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+i.messageFontSize+5+o,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:t,"font-style":"italic"},c))}},Gr=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},Xr=function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},Kr=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},Qr=function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},Jr=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},tn=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},en=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")};n.N;let rn=0,nn=0,sn=4,an=2;Er.yy=Yr;let on={};class ln{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,cn(t.db.getConfig())}setData(t,e,i,r){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=i,this.nextData.stopy=this.data.stopy=r}updateVal(t,e,i,r){void 0===t[e]?t[e]=i:t[e]=r(i,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,i=e+t.width,r=this.nextData.starty+2*t.margin,n=r+t.height;(e>=this.data.widthLimit||i>=this.data.widthLimit||this.nextData.cnt>sn)&&(e=this.nextData.startx+t.margin+on.nextLinePaddingX,r=this.nextData.stopy+2*t.margin,this.nextData.stopx=i=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=r+t.height,this.nextData.cnt=1),t.x=e,t.y=r,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",r,Math.min),this.updateVal(this.data,"stopx",i,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",r,Math.min),this.updateVal(this.nextData,"stopx",i,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},cn(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}}const cn=function(t){Te(on,t),t.fontFamily&&(on.personFontFamily=on.systemFontFamily=on.messageFontFamily=t.fontFamily),t.fontSize&&(on.personFontSize=on.systemFontSize=on.messageFontSize=t.fontSize),t.fontWeight&&(on.personFontWeight=on.systemFontWeight=on.messageFontWeight=t.fontWeight)},hn=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),dn=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight});function un(t,e,i,r,n){if(!e[t].width)if(i)e[t].text=Ne(e[t].text,n,r),e[t].textLines=e[t].text.split($.lineBreakRegex).length,e[t].width=n,e[t].height=Re(e[t].text,r);else{let i=e[t].text.split($.lineBreakRegex);e[t].textLines=i.length;let n=0;e[t].height=0,e[t].width=0;for(const s of i)e[t].width=Math.max(Me(s,r),e[t].width),n=Re(s,r),e[t].height=e[t].height+n}}const pn=function(t,e,i){e.x=i.data.startx,e.y=i.data.starty,e.width=i.data.stopx-i.data.startx,e.height=i.data.stopy-i.data.starty,e.label.y=on.c4ShapeMargin-35;let r=e.wrap&&on.wrap,n=dn(on);n.fontSize=n.fontSize+2,n.fontWeight="bold",un("label",e,r,n,Me(e.label.text,n)),Ur(t,e,on)},gn=function(t,e,i,r){let n=0;for(const s of r){n=0;const r=i[s];let a=hn(on,r.typeC4Shape.text);switch(a.fontSize=a.fontSize-2,r.typeC4Shape.width=Me("<<"+r.typeC4Shape.text+">>",a),r.typeC4Shape.height=a.fontSize+2,r.typeC4Shape.Y=on.c4ShapePadding,n=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=n,n=r.image.Y+r.image.height}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=n,n=r.image.Y+r.image.height);let o=r.wrap&&on.wrap,l=on.width-2*on.c4ShapePadding,c=hn(on,r.typeC4Shape.text);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",un("label",r,o,c,l),r.label.Y=n+8,n=r.label.Y+r.label.height,r.type&&""!==r.type.text){r.type.text="["+r.type.text+"]",un("type",r,o,hn(on,r.typeC4Shape.text),l),r.type.Y=n+5,n=r.type.Y+r.type.height}else if(r.techn&&""!==r.techn.text){r.techn.text="["+r.techn.text+"]",un("techn",r,o,hn(on,r.techn.text),l),r.techn.Y=n+5,n=r.techn.Y+r.techn.height}let h=n,d=r.label.width;if(r.descr&&""!==r.descr.text){un("descr",r,o,hn(on,r.typeC4Shape.text),l),r.descr.Y=n+20,n=r.descr.Y+r.descr.height,d=Math.max(r.label.width,r.descr.width),h=n-5*r.descr.textLines}d+=on.c4ShapePadding,r.width=Math.max(r.width||on.width,d,on.width),r.height=Math.max(r.height||on.height,h,on.height),r.margin=r.margin||on.c4ShapeMargin,t.insert(r),Vr(e,r,on)}t.bumpLastMargin(on.c4ShapeMargin)};class yn{constructor(t,e){this.x=t,this.y=e}}let fn=function(t,e){let i=t.x,r=t.y,n=e.x,s=e.y,a=i+t.width/2,o=r+t.height/2,l=Math.abs(i-n),c=Math.abs(r-s),h=c/l,d=t.height/t.width,u=null;return r==s&&i<n?u=new yn(i+t.width,o):r==s&&i>n?u=new yn(i,o):i==n&&r<s?u=new yn(a,r+t.height):i==n&&r>s&&(u=new yn(a,r)),i>n&&r<s?u=d>=h?new yn(i,o+h*t.width/2):new yn(a-l/c*t.height/2,r+t.height):i<n&&r<s?u=d>=h?new yn(i+t.width,o+h*t.width/2):new yn(a+l/c*t.height/2,r+t.height):i<n&&r>s?u=d>=h?new yn(i+t.width,o-h*t.width/2):new yn(a+t.height/2*l/c,r):i>n&&r>s&&(u=d>=h?new yn(i,o-t.width/2*h):new yn(a-t.height/2*l/c,r)),u},mn=function(t,e){let i={x:0,y:0};i.x=e.x+e.width/2,i.y=e.y+e.height/2;let r=fn(t,i);return i.x=t.x+t.width/2,i.y=t.y+t.height/2,{startPoint:r,endPoint:fn(e,i)}};function bn(t,e,i,r,n){let s=new ln(n);s.data.widthLimit=i.data.widthLimit/Math.min(an,r.length);for(let[a,o]of r.entries()){let r=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=r,r=o.image.Y+o.image.height);let l=o.wrap&&on.wrap,c=dn(on);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",un("label",o,l,c,s.data.widthLimit),o.label.Y=r+8,r=o.label.Y+o.label.height,o.type&&""!==o.type.text){o.type.text="["+o.type.text+"]",un("type",o,l,dn(on),s.data.widthLimit),o.type.Y=r+5,r=o.type.Y+o.type.height}if(o.descr&&""!==o.descr.text){let t=dn(on);t.fontSize=t.fontSize-2,un("descr",o,l,t,s.data.widthLimit),o.descr.Y=r+20,r=o.descr.Y+o.descr.height}if(0==a||a%an===0){let t=i.data.startx+on.diagramMarginX,e=i.data.stopy+on.diagramMarginY+r;s.setData(t,t,e,e)}else{let t=s.data.stopx!==s.data.startx?s.data.stopx+on.diagramMarginX:s.data.startx,e=s.data.starty;s.setData(t,t,e,e)}s.name=o.alias;let h=n.db.getC4ShapeArray(o.alias),d=n.db.getC4ShapeKeys(o.alias);d.length>0&&gn(s,t,h,d),e=o.alias;let u=n.db.getBoundarys(e);u.length>0&&bn(t,e,s,u,n),"global"!==o.alias&&pn(t,o,s),i.data.stopy=Math.max(s.data.stopy+on.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(s.data.stopx+on.c4ShapeMargin,i.data.stopx),rn=Math.max(rn,i.data.stopx),nn=Math.max(nn,i.data.stopy)}}const xn={drawPersonOrSystemArray:gn,drawBoundary:pn,setConf:cn,draw:function(t,e,i,r){on=ti().c4;const n=ti().securityLevel;let a;"sandbox"===n&&(a=(0,s.Ys)("#i"+e));const o="sandbox"===n?(0,s.Ys)(a.nodes()[0].contentDocument.body):(0,s.Ys)("body");let l=r.db;r.db.setWrap(on.wrap),sn=l.getC4ShapeInRow(),an=l.getC4BoundaryInRow(),v.debug(`C:${JSON.stringify(on,null,2)}`);const c="sandbox"===n?o.select(`[id="${e}"]`):(0,s.Ys)(`[id="${e}"]`);tn(c),Jr(c),en(c);let h=new ln(r);h.setData(on.diagramMarginX,on.diagramMarginX,on.diagramMarginY,on.diagramMarginY),h.data.widthLimit=screen.availWidth,rn=on.diagramMarginX,nn=on.diagramMarginY;const d=r.db.getTitle();bn(c,"",h,r.db.getBoundarys(""),r),Gr(c),Xr(c),Qr(c),Kr(c),function(t,e,i,r){let n=0;for(let a of e){n+=1;let t=a.wrap&&on.wrap,e={fontFamily:(s=on).messageFontFamily,fontSize:s.messageFontSize,fontWeight:s.messageFontWeight};"C4Dynamic"===r.db.getC4Type()&&(a.label.text=n+": "+a.label.text);let o=Me(a.label.text,e);un("label",a,t,e,o),a.techn&&""!==a.techn.text&&(o=Me(a.techn.text,e),un("techn",a,t,e,o)),a.descr&&""!==a.descr.text&&(o=Me(a.descr.text,e),un("descr",a,t,e,o));let l=i(a.from),c=i(a.to),h=mn(l,c);a.startPoint=h.startPoint,a.endPoint=h.endPoint}var s;Hr(t,e,on)}(c,r.db.getRels(),r.db.getC4Shape,r),h.data.stopx=rn,h.data.stopy=nn;const u=h.data;let p=u.stopy-u.starty+2*on.diagramMarginY;const g=u.stopx-u.startx+2*on.diagramMarginX;d&&c.append("text").text(d).attr("x",(u.stopx-u.startx)/2-4*on.diagramMarginX).attr("y",u.starty+on.diagramMarginY),oi(c,p,g,on.useMaxWidth);const y=d?60:0;c.attr("viewBox",u.startx-on.diagramMarginX+" -"+(on.diagramMarginY+y)+" "+g+" "+(p+y)),v.debug("models:",u)}};var kn=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,3],i=[1,7],r=[1,8],n=[1,9],s=[1,10],a=[1,13],o=[1,12],l=[1,16,25],c=[1,20],h=[1,32],d=[1,33],u=[1,34],p=[1,36],g=[1,39],y=[1,37],f=[1,38],m=[1,44],b=[1,45],x=[1,40],k=[1,41],_=[1,42],C=[1,43],T=[1,48],E=[1,49],v=[1,50],S=[1,51],A=[16,25],w=[1,65],B=[1,66],L=[1,67],I=[1,68],D=[1,69],O=[1,70],F=[1,71],N=[1,80],$=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],R=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],M=[5,8,9,10,11,16,19,23,25],P=[54,88,89,90,91],Y=[54,65,66,88,89,90,91],z=[54,60,61,62,63,64,88,89,90,91],j=[16,25,32],Z=[1,107],W={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 5:r.setDirection("TB");break;case 6:r.setDirection("BT");break;case 7:r.setDirection("RL");break;case 8:r.setDirection("LR");break;case 12:r.parseDirective("%%{","open_directive");break;case 13:r.parseDirective(s[o],"type_directive");break;case 14:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 15:r.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=s[o];break;case 22:this.$=s[o-1]+s[o];break;case 23:case 24:this.$=s[o-1]+"~"+s[o];break;case 25:r.addRelation(s[o]);break;case 26:s[o-1].title=r.cleanupLabel(s[o]),r.addRelation(s[o-1]);break;case 35:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 36:case 37:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 38:r.addClass(s[o]);break;case 39:r.addClass(s[o-2]),r.setCssClass(s[o-2],s[o]);break;case 40:r.addClass(s[o-3]),r.addMembers(s[o-3],s[o-1]);break;case 41:r.addClass(s[o-5]),r.setCssClass(s[o-5],s[o-3]),r.addMembers(s[o-5],s[o-1]);break;case 42:r.addAnnotation(s[o],s[o-2]);break;case 43:this.$=[s[o]];break;case 44:s[o].push(s[o-1]),this.$=s[o];break;case 45:case 47:case 48:break;case 46:r.addMember(s[o-1],r.cleanupLabel(s[o]));break;case 49:this.$={id1:s[o-2],id2:s[o],relation:s[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:s[o-3],id2:s[o],relation:s[o-1],relationTitle1:s[o-2],relationTitle2:"none"};break;case 51:this.$={id1:s[o-3],id2:s[o],relation:s[o-2],relationTitle1:"none",relationTitle2:s[o-1]};break;case 52:this.$={id1:s[o-4],id2:s[o],relation:s[o-2],relationTitle1:s[o-3],relationTitle2:s[o-1]};break;case 53:r.addNote(s[o],s[o-1]);break;case 54:r.addNote(s[o]);break;case 55:this.$={type1:s[o-2],type2:s[o],lineType:s[o-1]};break;case 56:this.$={type1:"none",type2:s[o],lineType:s[o-1]};break;case 57:this.$={type1:s[o-1],type2:"none",lineType:s[o]};break;case 58:this.$={type1:"none",type2:"none",lineType:s[o]};break;case 59:this.$=r.relationType.AGGREGATION;break;case 60:this.$=r.relationType.EXTENSION;break;case 61:this.$=r.relationType.COMPOSITION;break;case 62:this.$=r.relationType.DEPENDENCY;break;case 63:this.$=r.relationType.LOLLIPOP;break;case 64:this.$=r.lineType.LINE;break;case 65:this.$=r.lineType.DOTTED_LINE;break;case 66:case 72:this.$=s[o-2],r.setClickEvent(s[o-1],s[o]);break;case 67:case 73:this.$=s[o-3],r.setClickEvent(s[o-2],s[o-1]),r.setTooltip(s[o-2],s[o]);break;case 68:case 76:this.$=s[o-2],r.setLink(s[o-1],s[o]);break;case 69:case 77:this.$=s[o-3],r.setLink(s[o-2],s[o-1],s[o]);break;case 70:case 78:this.$=s[o-3],r.setLink(s[o-2],s[o-1]),r.setTooltip(s[o-2],s[o]);break;case 71:case 79:this.$=s[o-4],r.setLink(s[o-3],s[o-2],s[o]),r.setTooltip(s[o-3],s[o-1]);break;case 74:this.$=s[o-3],r.setClickEvent(s[o-2],s[o-1],s[o]);break;case 75:this.$=s[o-4],r.setClickEvent(s[o-3],s[o-2],s[o-1]),r.setTooltip(s[o-3],s[o]);break;case 80:r.setCssClass(s[o-1],s[o])}},table:[{3:1,4:2,5:e,6:4,7:5,8:i,9:r,10:n,11:s,12:6,13:11,19:a,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:i,9:r,10:n,11:s,12:6,13:11,19:a,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:c},t([17,22],[2,13]),{6:31,7:30,8:i,9:r,10:n,11:s,13:11,19:a,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:h,41:d,43:u,44:p,49:g,51:y,52:f,55:m,57:b,67:x,68:k,70:_,74:C,88:T,89:E,90:v,91:S},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(A,[2,25],{32:[1,57]}),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),t(A,[2,31]),t(A,[2,32]),t(A,[2,33]),t(A,[2,34]),{40:[1,58]},{42:[1,59]},t(A,[2,37]),t(A,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:w,61:B,62:L,63:I,64:D,65:O,66:F}),{27:72,28:46,29:47,88:T,89:E,90:v,91:S},t(A,[2,47]),t(A,[2,48]),{28:73,88:T,89:E,90:v},{27:74,28:46,29:47,88:T,89:E,90:v,91:S},{27:75,28:46,29:47,88:T,89:E,90:v,91:S},{27:76,28:46,29:47,88:T,89:E,90:v,91:S},{54:[1,77]},{27:78,28:46,29:47,88:T,89:E,90:v,91:S},{54:N,56:79},t($,[2,20],{28:46,29:47,27:81,30:[1,82],88:T,89:E,90:v,91:S}),t($,[2,21],{30:[1,83]}),t(R,[2,94]),t(R,[2,95]),t(R,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(M,[2,10]),{15:84,22:c},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:i,9:r,10:n,11:s,13:11,19:a,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:h,41:d,43:u,44:p,49:g,51:y,52:f,55:m,57:b,67:x,68:k,70:_,74:C,88:T,89:E,90:v,91:S},t(A,[2,26]),t(A,[2,35]),t(A,[2,36]),{27:86,28:46,29:47,54:[1,87],88:T,89:E,90:v,91:S},{53:88,58:63,59:64,60:w,61:B,62:L,63:I,64:D,65:O,66:F},t(A,[2,46]),{59:89,65:O,66:F},t(P,[2,58],{58:90,60:w,61:B,62:L,63:I,64:D}),t(Y,[2,59]),t(Y,[2,60]),t(Y,[2,61]),t(Y,[2,62]),t(Y,[2,63]),t(z,[2,64]),t(z,[2,65]),t(A,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:T,89:E,90:v},{54:N,56:99},t(A,[2,54]),t(A,[2,98]),t($,[2,22]),t($,[2,23]),t($,[2,24]),{16:[1,100]},{25:[2,19]},t(j,[2,49]),{27:101,28:46,29:47,88:T,89:E,90:v,91:S},{27:102,28:46,29:47,54:[1,103],88:T,89:E,90:v,91:S},t(P,[2,57],{58:104,60:w,61:B,62:L,63:I,64:D}),t(P,[2,56]),{28:105,88:T,89:E,90:v},{47:106,51:Z},{27:108,28:46,29:47,88:T,89:E,90:v,91:S},t(A,[2,66],{54:[1,109]}),t(A,[2,68],{54:[1,111],69:[1,110]}),t(A,[2,72],{54:[1,112],72:[1,113]}),t(A,[2,76],{54:[1,115],69:[1,114]}),t(A,[2,80]),t(A,[2,53]),t(M,[2,11]),t(j,[2,51]),t(j,[2,50]),{27:116,28:46,29:47,88:T,89:E,90:v,91:S},t(P,[2,55]),t(A,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:Z},t(A,[2,42]),t(A,[2,67]),t(A,[2,69]),t(A,[2,70],{69:[1,120]}),t(A,[2,73]),t(A,[2,74],{54:[1,121]}),t(A,[2,77]),t(A,[2,78],{69:[1,122]}),t(j,[2,52]),{47:123,51:Z},t(A,[2,40]),{48:[2,44]},t(A,[2,71]),t(A,[2,75]),t(A,[2,79]),{48:[1,124]},t(A,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},q=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 27:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 39:case 42:case 45:case 48:case 51:case 54:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 43:return"STR";case 44:this.begin("bqstring");break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 49:return 73;case 50:this.begin("callback_name");break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 55:return 72;case 56:case 57:case 58:case 59:return 69;case 60:case 61:return 61;case 62:case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}};return t}();function U(){this.yy={}}return W.lexer=q,U.prototype=W,W.Parser=U,new U}();kn.parser=kn;const _n=kn,Cn=(t,e)=>{var i;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.class)?void 0:i.defaultRenderer)&&null!==t.match(/^\s*classDiagram/)},Tn=(t,e)=>{var i;return null!==t.match(/^\s*classDiagram/)&&"dagre-wrapper"===(null==(i=null==e?void 0:e.class)?void 0:i.defaultRenderer)||null!==t.match(/^\s*classDiagram-v2/)},En="classid-";let vn=[],Sn={},An=[],wn=0,Bn=[];const Ln=t=>$.sanitizeText(t,ti()),In=function(t){let e="",i=t;if(t.indexOf("~")>0){let r=t.split("~");i=r[0],e=$.sanitizeText(r[1],ti())}return{className:i,type:e}},Dn=function(t){let e=In(t);void 0===Sn[e.className]&&(Sn[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:En+e.className+"-"+wn},wn++)},On=function(t){const e=Object.keys(Sn);for(const i of e)if(Sn[i].id===t)return Sn[i].domId},Fn=function(t,e){const i=In(t).className,r=Sn[i];if("string"===typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?r.annotations.push(Ln(t.substring(2,t.length-2))):t.indexOf(")")>0?r.methods.push(Ln(t)):t&&r.members.push(Ln(t))}},Nn=function(t,e){t.split(",").forEach((function(t){let i=t;t[0].match(/\d/)&&(i=En+i),void 0!==Sn[i]&&Sn[i].cssClasses.push(e)}))},$n=function(t,e,i){const r=ti();let n=t,s=On(n);if("loose"===r.securityLevel&&void 0!==e&&void 0!==Sn[n]){let t=[];if("string"===typeof i){t=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<t.length;e++){let i=t[e].trim();'"'===i.charAt(0)&&'"'===i.charAt(i.length-1)&&(i=i.substr(1,i.length-2)),t[e]=i}}0===t.length&&t.push(s),Bn.push((function(){const i=document.querySelector(`[id="${s}"]`);null!==i&&i.addEventListener("click",(function(){We.runFunc(e,...t)}),!1)}))}},Rn=function(t){let e=(0,s.Ys)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,s.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,s.Ys)(t).select("svg").selectAll("g.node").on("mouseover",(function(){const t=(0,s.Ys)(this);if(null===t.attr("title"))return;const i=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+i.left+(i.right-i.left)/2+"px").style("top",window.scrollY+i.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,s.Ys)(this).classed("hover",!1)}))};Bn.push(Rn);let Mn="TB";const Pn={parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},setAccTitle:Pi,getAccTitle:Yi,getAccDescription:ji,setAccDescription:zi,getConfig:()=>ti().class,addClass:Dn,bindFunctions:function(t){Bn.forEach((function(e){e(t)}))},clear:function(){vn=[],Sn={},An=[],Bn=[],Bn.push(Rn),Mi()},getClass:function(t){return Sn[t]},getClasses:function(){return Sn},getNotes:function(){return An},addAnnotation:function(t,e){const i=In(t).className;Sn[i].annotations.push(e)},addNote:function(t,e){const i={id:`note${An.length}`,class:e,text:t};An.push(i)},getRelations:function(){return vn},addRelation:function(t){v.debug("Adding relation: "+JSON.stringify(t)),Dn(t.id1),Dn(t.id2),t.id1=In(t.id1).className,t.id2=In(t.id2).className,t.relationTitle1=$.sanitizeText(t.relationTitle1.trim(),ti()),t.relationTitle2=$.sanitizeText(t.relationTitle2.trim(),ti()),vn.push(t)},getDirection:()=>Mn,setDirection:t=>{Mn=t},addMember:Fn,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>Fn(t,e))))},cleanupLabel:function(t){return":"===t.substring(0,1)?$.sanitizeText(t.substr(1).trim(),ti()):Ln(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:function(t,e,i){t.split(",").forEach((function(t){$n(t,e,i),Sn[t].haveCallback=!0})),Nn(t,"clickable")},setCssClass:Nn,setLink:function(t,e,i){const r=ti();t.split(",").forEach((function(t){let n=t;t[0].match(/\d/)&&(n=En+n),void 0!==Sn[n]&&(Sn[n].link=We.formatUrl(e,r),"sandbox"===r.securityLevel?Sn[n].linkTarget="_top":Sn[n].linkTarget="string"===typeof i?Ln(i):"_blank")})),Nn(t,"clickable")},getTooltip:function(t){return Sn[t].tooltip},setTooltip:function(t,e){const i=ti();t.split(",").forEach((function(t){void 0!==e&&(Sn[t].tooltip=$.sanitizeText(e,i))}))},lookUpDomId:On,setDiagramTitle:Zi,getDiagramTitle:Wi};let Yn=0;const zn=function(t){let e=t.match(/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/),i=t.match(/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/);return e&&!i?jn(e):i?Zn(i):Wn(t)},jn=function(t){let e="",i="";try{let r=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?N(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";i=r+n+s+" "+a,e=Un(o)}catch(r){i=t}return{displayText:i,cssStyle:e}},Zn=function(t){let e="",i="";try{let r=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?N(t[3].trim()):"",a=t[4]?t[4].trim():"";i=r+n+"("+s+")"+(t[5]?" : "+N(t[5]).trim():""),e=Un(a)}catch(r){i=t}return{displayText:i,cssStyle:e}},Wn=function(t){let e="",i="",r="",n=t.indexOf("("),s=t.indexOf(")");if(n>1&&s>n&&s<=t.length){let a="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,n).trim():(l.match(/[#+~-]/)&&(a=l),o=t.substring(1,n).trim());const c=t.substring(n+1,s);t.substring(s+1,1),i=Un(t.substring(s+1,s+2)),e=a+o+"("+N(c.trim())+")",s<t.length&&(r=t.substring(s+2).trim(),""!==r&&(r=" : "+N(r),e+=r))}else e=N(t);return{displayText:e,cssStyle:i}},qn=function(t,e,i,r){let n=zn(e);const s=t.append("tspan").attr("x",r.padding).text(n.displayText);""!==n.cssStyle&&s.attr("style",n.cssStyle),i||s.attr("dy",r.textHeight)},Un=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},Vn=function(t,e,i,r){v.debug("Rendering class ",e,i);const n=e.id,s={id:n,label:e.id,width:0,height:0},a=t.append("g").attr("id",r.db.lookUpDomId(n)).attr("class","classGroup");let o;o=e.link?a.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",i.textHeight+i.padding).attr("x",0):a.append("text").attr("y",i.textHeight+i.padding).attr("x",0);let l=!0;e.annotations.forEach((function(t){const e=o.append("tspan").text("\xab"+t+"\xbb");l||e.attr("dy",i.textHeight),l=!1}));let c=e.id;void 0!==e.type&&""!==e.type&&(c+="<"+e.type+">");const h=o.append("tspan").text(c).attr("class","title");l||h.attr("dy",i.textHeight);const d=o.node().getBBox().height,u=a.append("line").attr("x1",0).attr("y1",i.padding+d+i.dividerMargin/2).attr("y2",i.padding+d+i.dividerMargin/2),p=a.append("text").attr("x",i.padding).attr("y",d+i.dividerMargin+i.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach((function(t){qn(p,t,l,i),l=!1}));const g=p.node().getBBox(),y=a.append("line").attr("x1",0).attr("y1",i.padding+d+i.dividerMargin+g.height).attr("y2",i.padding+d+i.dividerMargin+g.height),f=a.append("text").attr("x",i.padding).attr("y",d+2*i.dividerMargin+g.height+i.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach((function(t){qn(f,t,l,i),l=!1}));const m=a.node().getBBox();var b=" ";e.cssClasses.length>0&&(b+=e.cssClasses.join(" "));const x=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*i.padding).attr("height",m.height+i.padding+.5*i.dividerMargin).attr("class",b).node().getBBox().width;return o.node().childNodes.forEach((function(t){t.setAttribute("x",(x-t.getBBox().width)/2)})),e.tooltip&&o.insert("title").text(e.tooltip),u.attr("x2",x),y.attr("x2",x),s.width=x,s.height=m.height+i.padding+.5*i.dividerMargin,s},Hn=function(t,e,i,r,n){const a=function(t){switch(t){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter((t=>!Number.isNaN(t.y)));const o=e.points,l=(0,s.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.$0Z),c=t.append("path").attr("d",l(o)).attr("id","edge"+Yn).attr("class","relation");let h,d,u="";r.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),1==i.relation.lineType&&c.attr("class","relation dashed-line"),10==i.relation.lineType&&c.attr("class","relation dotted-line"),"none"!==i.relation.type1&&c.attr("marker-start","url("+u+"#"+a(i.relation.type1)+"Start)"),"none"!==i.relation.type2&&c.attr("marker-end","url("+u+"#"+a(i.relation.type2)+"End)");const p=e.points.length;let g,y,f,m,b=We.calcLabelPosition(e.points);if(h=b.x,d=b.y,p%2!==0&&p>1){let t=We.calcCardinalityPosition("none"!==i.relation.type1,e.points,e.points[0]),r=We.calcCardinalityPosition("none"!==i.relation.type2,e.points,e.points[p-1]);v.debug("cardinality_1_point "+JSON.stringify(t)),v.debug("cardinality_2_point "+JSON.stringify(r)),g=t.x,y=t.y,f=r.x,m=r.y}if(void 0!==i.title){const e=t.append("g").attr("class","classLabel"),n=e.append("text").attr("class","label").attr("x",h).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(i.title);window.label=n;const s=n.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",s.x-r.padding/2).attr("y",s.y-r.padding/2).attr("width",s.width+r.padding).attr("height",s.height+r.padding)}if(v.info("Rendering relation "+JSON.stringify(i)),void 0!==i.relationTitle1&&"none"!==i.relationTitle1){t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",g).attr("y",y).attr("fill","black").attr("font-size","6").text(i.relationTitle1)}if(void 0!==i.relationTitle2&&"none"!==i.relationTitle2){t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",f).attr("y",m).attr("fill","black").attr("font-size","6").text(i.relationTitle2)}Yn++},Gn=function(t,e,i,r){v.debug("Rendering note ",e,i);const n=e.id,s={id:n,text:e.text,width:0,height:0},a=t.append("g").attr("id",n).attr("class","classGroup");let o=a.append("text").attr("y",i.textHeight+i.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split("\n");l.forEach((function(t){v.debug(`Adding line: ${t}`),o.append("tspan").text(t).attr("class","title").attr("dy",i.textHeight)}));const c=a.node().getBBox(),h=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",c.width+2*i.padding).attr("height",c.height+l.length*i.textHeight+i.padding+.5*i.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach((function(t){t.setAttribute("x",(h-t.getBBox().width)/2)})),s.width=h,s.height=c.height+l.length*i.textHeight+i.padding+.5*i.dividerMargin,s};let Xn={};const Kn=function(t){const e=Object.entries(Xn).find((e=>e[1].label===t));if(e)return e[0]},Qn={draw:function(t,e,i,r){const n=ti().class;Xn={},v.info("Rendering diagram "+t);const a=ti().securityLevel;let o;"sandbox"===a&&(o=(0,s.Ys)("#i"+e));const l="sandbox"===a?(0,s.Ys)(o.nodes()[0].contentDocument.body):(0,s.Ys)("body"),c=l.select(`[id='${e}']`);var h;(h=c).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),h.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),h.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),h.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),h.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),h.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),h.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),h.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");const d=new m.k({multigraph:!0});d.setGraph({isMultiGraph:!0}),d.setDefaultEdgeLabel((function(){return{}}));const u=r.db.getClasses(),p=Object.keys(u);for(const s of p){const t=u[s],e=Vn(c,t,n,r);Xn[e.id]=e,d.setNode(e.id,e),v.info("Org height: "+e.height)}r.db.getRelations().forEach((function(t){v.info("tjoho"+Kn(t.id1)+Kn(t.id2)+JSON.stringify(t)),d.setEdge(Kn(t.id1),Kn(t.id2),{relation:t},t.title||"DEFAULT")}));r.db.getNotes().forEach((function(t){v.debug(`Adding note: ${JSON.stringify(t)}`);const e=Gn(c,t,n,r);Xn[e.id]=e,d.setNode(e.id,e),t.class&&t.class in u&&d.setEdge(t.id,Kn(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),(0,f.bK)(d),d.nodes().forEach((function(t){void 0!==t&&void 0!==d.node(t)&&(v.debug("Node "+t+": "+JSON.stringify(d.node(t))),l.select("#"+(r.db.lookUpDomId(t)||t)).attr("transform","translate("+(d.node(t).x-d.node(t).width/2)+","+(d.node(t).y-d.node(t).height/2)+" )"))})),d.edges().forEach((function(t){void 0!==t&&void 0!==d.edge(t)&&(v.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(d.edge(t))),Hn(c,d.edge(t),d.edge(t).relation,n,r))}));const g=c.node().getBBox(),y=g.width+40,b=g.height+40;oi(c,b,y,n.useMaxWidth);const x=`${g.x-20} ${g.y-20} ${y} ${b}`;v.debug(`viewBox ${x}`),c.attr("viewBox",x)}},Jn={extension:(t,e,i)=>{v.trace("Making markers for ",i),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point:(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(t,e)=>{t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(t,e)=>{t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},ts=(t,e,i,r)=>{e.forEach((e=>{Jn[e](t,i,r)}))};const es=(t,e,i,r)=>{let n=t||"";if("object"===typeof n&&(n=n[0]),F(ti().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),v.info("vertexText"+n);let t=function(t){const e=(0,s.Ys)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=e.append("xhtml:div"),r=t.label,n=t.isNode?"nodeLabel":"edgeLabel";var a,o;return i.html('<span class="'+n+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>"),a=i,(o=t.labelStyle)&&a.attr("style",o),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}({isNode:r,label:td(n).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`)),labelStyle:e.replace("fill:","color:")});return t}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let r=[];r="string"===typeof n?n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?n:[];for(const e of r){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),i?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}},is=(t,e,i,r)=>{let n;n=i||"node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle);let l;l=void 0===e.labelText?"":"string"===typeof e.labelText?e.labelText:e.labelText[0];const c=o.node().appendChild(es(L(td(l),ti()),e.labelStyle,!1,r));let h=c.getBBox();if(F(ti().flowchart.htmlLabels)){const t=c.children[0],e=(0,s.Ys)(c);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}const d=e.padding/2;return o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),{shapeSvg:a,bbox:h,halfPadding:d,label:o}},rs=(t,e)=>{const i=e.node().getBBox();t.width=i.width,t.height=i.height};function ns(t,e,i,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}let ss={},as={},os={};const ls=(t,e)=>(v.trace("In isDecendant",e," ",t," = ",as[e].includes(t)),!!as[e].includes(t)),cs=(t,e,i,r)=>{v.warn("Copying children of ",t,"root",r,"data",e.node(t),r);const n=e.children(t)||[];t!==r&&n.push(t),v.warn("Copying (nodes) clusterId",t,"nodes",n),n.forEach((n=>{if(e.children(n).length>0)cs(n,e,i,r);else{const s=e.node(n);v.info("cp ",n," to ",r," with parent ",t),i.setNode(n,s),r!==e.parent(n)&&(v.warn("Setting parent",n,e.parent(n)),i.setParent(n,e.parent(n))),t!==r&&n!==t?(v.debug("Setting parent",n,t),i.setParent(n,t)):(v.info("In copy ",t,"root",r,"data",e.node(t),r),v.debug("Not Setting parent for node=",n,"cluster!==rootId",t!==r,"node!==clusterId",n!==t));const a=e.edges(n);v.debug("Copying Edges",a),a.forEach((n=>{v.info("Edge",n);const s=e.edge(n.v,n.w,n.name);v.info("Edge data",s,r);try{((t,e)=>(v.info("Decendants of ",e," is ",as[e]),v.info("Edge is ",t),t.v!==e&&t.w!==e&&(as[e]?as[e].includes(t.v)||ls(t.v,e)||ls(t.w,e)||as[e].includes(t.w):(v.debug("Tilt, ",e,",not in decendants"),!1))))(n,r)?(v.info("Copying as ",n.v,n.w,s,n.name),i.setEdge(n.v,n.w,s,n.name),v.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):v.info("Skipping copy of edge ",n.v,"--\x3e",n.w," rootId: ",r," clusterId:",t)}catch(a){v.error(a)}}))}v.debug("Removing node",n),e.removeNode(n)}))},hs=(t,e)=>{const i=e.children(t);let r=[...i];for(const n of i)os[n]=t,r=[...r,...hs(n,e)];return r},ds=(t,e)=>{v.trace("Searching",t);const i=e.children(t);if(v.trace("Searching children of id ",t,i),i.length<1)return v.trace("This is a valid node",t),t;for(const r of i){const i=ds(r,e);if(i)return v.trace("Found replacement for",t," => ",i),i}},us=t=>ss[t]&&ss[t].externalConnections&&ss[t]?ss[t].id:t,ps=(t,e)=>{if(v.warn("extractor - ",e,b.c(t),t.children("D")),e>10)return void v.error("Bailing out");let i=t.nodes(),r=!1;for(const n of i){const e=t.children(n);r=r||e.length>0}if(r){v.debug("Nodes = ",i,e);for(const r of i)if(v.debug("Extracting node",r,ss,ss[r]&&!ss[r].externalConnections,!t.parent(r),t.node(r),t.children("D")," Depth ",e),ss[r])if(!ss[r].externalConnections&&t.children(r)&&t.children(r).length>0){v.warn("Cluster without external connections, without a parent and with children",r,e);let i="TB"===t.graph().rankdir?"LR":"TB";ss[r]&&ss[r].clusterData&&ss[r].clusterData.dir&&(i=ss[r].clusterData.dir,v.warn("Fixing dir",ss[r].clusterData.dir,i));const n=new m.k({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));v.warn("Old graph before copy",b.c(t)),cs(r,t,n,r),t.setNode(r,{clusterNode:!0,id:r,clusterData:ss[r].clusterData,labelText:ss[r].labelText,graph:n}),v.warn("New graph after copy node: (",r,")",b.c(n)),v.debug("Old graph after copy",b.c(t))}else v.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!ss[r].externalConnections," no parent: ",!t.parent(r)," children ",t.children(r)&&t.children(r).length>0,t.children("D"),e),v.debug(ss);else v.debug("Not a cluster",r,e);i=t.nodes(),v.warn("New list of nodes",i);for(const r of i){const i=t.node(r);v.warn(" Now next level",r,i),i.clusterNode&&ps(i.graph,e+1)}}else v.debug("Done, no node has children",t.nodes())},gs=(t,e)=>{if(0===e.length)return[];let i=Object.assign(e);return e.forEach((e=>{const r=t.children(e),n=gs(t,r);i=[...i,...n]})),i};function ys(t,e,i,r){var n=t.x,s=t.y,a=n-r.x,o=s-r.y,l=Math.sqrt(e*e*o*o+i*i*a*a),c=Math.abs(e*i*a/l);r.x<n&&(c=-c);var h=Math.abs(e*i*o/l);return r.y<s&&(h=-h),{x:n+c,y:s+h}}function fs(t,e,i,r){var n,s,a,o,l,c,h,d,u,p,g,y,f;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,u=n*i.x+a*i.y+l,p=n*r.x+a*r.y+l,(0===u||0===p||!ms(u,p))&&(s=r.y-i.y,o=i.x-r.x,c=r.x*i.y-i.x*r.y,h=s*t.x+o*t.y+c,d=s*e.x+o*e.y+c,(0===h||0===d||!ms(h,d))&&0!==(g=n*o-s*a)))return y=Math.abs(g/2),{x:(f=a*c-o*l)<0?(f-y)/g:(f+y)/g,y:(f=s*l-n*c)<0?(f-y)/g:(f+y)/g}}function ms(t,e){return t*e>0}const bs=(t,e)=>{var i,r,n=t.x,s=t.y,a=e.x-n,o=e.y-s,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(a)*c?(o<0&&(c=-c),i=0===o?0:c*a/o,r=c):(a<0&&(l=-l),i=l,r=0===a?0:l*o/a),{x:n+i,y:s+r}},xs={node:function(t,e){return t.intersect(e)},circle:function(t,e,i){return ys(t,e,e,i)},ellipse:ys,polygon:function(t,e,i){var r=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"===typeof e.forEach?e.forEach((function(t){a=Math.min(a,t.x),o=Math.min(o,t.y)})):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-a,c=n-t.height/2-o,h=0;h<e.length;h++){var d=e[h],u=e[h<e.length-1?h+1:0],p=fs(t,i,{x:l+d.x,y:c+d.y},{x:l+u.x,y:c+u.y});p&&s.push(p)}return s.length?(s.length>1&&s.sort((function(t,e){var r=t.x-i.x,n=t.y-i.y,s=Math.sqrt(r*r+n*n),a=e.x-i.x,o=e.y-i.y,l=Math.sqrt(a*a+o*o);return s<l?-1:s===l?0:1})),s[0]):t},rect:bs};function ks(t,e,i,r){const n=[],s=t=>{n.push(t,0)},a=t=>{n.push(0,t)};e.includes("t")?(v.debug("add top border"),s(i)):a(i),e.includes("r")?(v.debug("add right border"),s(r)):a(r),e.includes("b")?(v.debug("add bottom border"),s(i)):a(i),e.includes("l")?(v.debug("add left border"),s(r)):a(r),t.attr("stroke-dasharray",n.join(" "))}const _s=(t,e,i)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,s=10;"LR"===i&&(n=10,s=70);const a=r.append("rect").attr("x",-1*n/2).attr("y",-1*s/2).attr("width",n).attr("height",s).attr("class","fork-join");return rs(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return xs.rect(e,t)},r},Cs={question:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.width+e.padding+(r.height+e.padding),s=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}];v.info("Question main (Circle)");const a=ns(i,n,n,s);return a.attr("style",e.style),rs(e,a),e.intersect=function(t){return v.warn("Intersect called"),xs.polygon(e,s,t)},i},rect:(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:n}=is(t,e,"node "+e.classes,!0);v.trace("Classes = ",e.classes);const s=i.insert("rect",":first-child"),a=r.width+e.padding,o=r.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",a).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ks(s,e.props.borders,a,o),t.delete("borders")),t.forEach((t=>{v.warn(`Unknown node property ${t}`)}))}return rs(e,s),e.intersect=function(t){return xs.rect(e,t)},i},labelRect:(t,e)=>{const{shapeSvg:i}=is(t,e,"label",!0);v.trace("Classes = ",e.classes);const r=i.insert("rect",":first-child");if(r.attr("width",0).attr("height",0),i.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ks(r,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{v.warn(`Unknown node property ${t}`)}))}return rs(e,r),e.intersect=function(t){return xs.rect(e,t)},i},rectWithTitle:(t,e)=>{let i;i=e.classes?"node "+e.classes:"node default";const r=t.insert("g").attr("class",i).attr("id",e.domId||e.id),n=r.insert("rect",":first-child"),a=r.insert("line"),o=r.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText;let c="";c="object"===typeof l?l[0]:l,v.info("Label text abc79",c,l,"object"===typeof l);const h=o.node().appendChild(es(c,e.labelStyle,!0,!0));let d={width:0,height:0};if(F(ti().flowchart.htmlLabels)){const t=h.children[0],e=(0,s.Ys)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}v.info("Text 2",l);const u=l.slice(1,l.length);let p=h.getBBox();const g=o.node().appendChild(es(u.join?u.join("<br/>"):u,e.labelStyle,!0,!0));if(F(ti().flowchart.htmlLabels)){const t=g.children[0],e=(0,s.Ys)(g);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}const y=e.padding/2;return(0,s.Ys)(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+y+5)+")"),(0,s.Ys)(h).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", 0)"),d=o.node().getBBox(),o.attr("transform","translate("+-d.width/2+", "+(-d.height/2-y+3)+")"),n.attr("class","outer title-state").attr("x",-d.width/2-y).attr("y",-d.height/2-y).attr("width",d.width+e.padding).attr("height",d.height+e.padding),a.attr("class","divider").attr("x1",-d.width/2-y).attr("x2",d.width/2+y).attr("y1",-d.height/2-y+p.height+y).attr("y2",-d.height/2-y+p.height+y),rs(e,n),e.intersect=function(t){return xs.rect(e,t)},r},choice:(t,e)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return i.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return xs.circle(e,14,t)},i},circle:(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:n}=is(t,e,void 0,!0),s=i.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+n).attr("width",r.width+e.padding).attr("height",r.height+e.padding),v.info("Circle main"),rs(e,s),e.intersect=function(t){return v.info("Circle intersect",e,r.width/2+n,t),xs.circle(e,r.width/2+n,t)},i},doublecircle:(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:n}=is(t,e,void 0,!0),s=i.insert("g",":first-child"),a=s.insert("circle"),o=s.insert("circle");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+n+5).attr("width",r.width+e.padding+10).attr("height",r.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+n).attr("width",r.width+e.padding).attr("height",r.height+e.padding),v.info("DoubleCircle main"),rs(e,a),e.intersect=function(t){return v.info("DoubleCircle intersect",e,r.width/2+n+5,t),xs.circle(e,r.width/2+n+5,t)},i},stadium:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.height+e.padding,s=r.width+n/4+e.padding,a=i.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-s/2).attr("y",-n/2).attr("width",s).attr("height",n);return rs(e,a),e.intersect=function(t){return xs.rect(e,t)},i},hexagon:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.height+e.padding,s=n/4,a=r.width+2*s+e.padding,o=[{x:s,y:0},{x:a-s,y:0},{x:a,y:-n/2},{x:a-s,y:-n},{x:s,y:-n},{x:0,y:-n/2}],l=ns(i,a,n,o);return l.attr("style",e.style),rs(e,l),e.intersect=function(t){return xs.polygon(e,o,t)},i},rect_left_inv_arrow:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.width+e.padding,s=r.height+e.padding,a=[{x:-s/2,y:0},{x:n,y:0},{x:n,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return ns(i,n,s,a).attr("style",e.style),e.width=n+s,e.height=s,e.intersect=function(t){return xs.polygon(e,a,t)},i},lean_right:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.width+e.padding,s=r.height+e.padding,a=[{x:-2*s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:s/6,y:-s}],o=ns(i,n,s,a);return o.attr("style",e.style),rs(e,o),e.intersect=function(t){return xs.polygon(e,a,t)},i},lean_left:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.width+e.padding,s=r.height+e.padding,a=[{x:2*s/6,y:0},{x:n+s/6,y:0},{x:n-2*s/6,y:-s},{x:-s/6,y:-s}],o=ns(i,n,s,a);return o.attr("style",e.style),rs(e,o),e.intersect=function(t){return xs.polygon(e,a,t)},i},trapezoid:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.width+e.padding,s=r.height+e.padding,a=[{x:-2*s/6,y:0},{x:n+2*s/6,y:0},{x:n-s/6,y:-s},{x:s/6,y:-s}],o=ns(i,n,s,a);return o.attr("style",e.style),rs(e,o),e.intersect=function(t){return xs.polygon(e,a,t)},i},inv_trapezoid:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.width+e.padding,s=r.height+e.padding,a=[{x:s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=ns(i,n,s,a);return o.attr("style",e.style),rs(e,o),e.intersect=function(t){return xs.polygon(e,a,t)},i},rect_right_inv_arrow:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.width+e.padding,s=r.height+e.padding,a=[{x:0,y:0},{x:n+s/2,y:0},{x:n,y:-s/2},{x:n+s/2,y:-s},{x:0,y:-s}],o=ns(i,n,s,a);return o.attr("style",e.style),rs(e,o),e.intersect=function(t){return xs.polygon(e,a,t)},i},cylinder:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.width+e.padding,s=n/2,a=s/(2.5+n/50),o=r.height+a+e.padding,l="M 0,"+a+" a "+s+","+a+" 0,0,0 "+n+" 0 a "+s+","+a+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+s+","+a+" 0,0,0 "+n+" 0 l 0,"+-o,c=i.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+a)+")");return rs(e,c),e.intersect=function(t){const i=xs.rect(e,t),r=i.x-e.x;if(0!=s&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(i.y-e.y)>e.height/2-a)){let n=a*a*(1-r*r/(s*s));0!=n&&(n=Math.sqrt(n)),n=a-n,t.y-e.y>0&&(n=-n),i.y+=n}return i},i},start:(t,e)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=i.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),rs(e,r),e.intersect=function(t){return xs.circle(e,7,t)},i},end:(t,e)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=i.insert("circle",":first-child"),n=i.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),rs(e,n),e.intersect=function(t){return xs.circle(e,7,t)},i},note:(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:n}=is(t,e,"node "+e.classes,!0);v.info("Classes = ",e.classes);const s=i.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",r.width+e.padding).attr("height",r.height+e.padding),rs(e,s),e.intersect=function(t){return xs.rect(e,t)},i},subroutine:(t,e)=>{const{shapeSvg:i,bbox:r}=is(t,e,void 0,!0),n=r.width+e.padding,s=r.height+e.padding,a=[{x:0,y:0},{x:n,y:0},{x:n,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=ns(i,n,s,a);return o.attr("style",e.style),rs(e,o),e.intersect=function(t){return xs.polygon(e,a,t)},i},fork:_s,join:_s,class_box:(t,e)=>{const i=e.padding/2;let r;r=e.classes?"node "+e.classes:"node default";const n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=n.insert("rect",":first-child"),o=n.insert("line"),l=n.insert("line");let c=0,h=4;const d=n.insert("g").attr("class","label");let u=0;const p=e.classData.annotations&&e.classData.annotations[0],g=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",y=d.node().appendChild(es(g,e.labelStyle,!0,!0));let f=y.getBBox();if(F(ti().flowchart.htmlLabels)){const t=y.children[0],e=(0,s.Ys)(y);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}e.classData.annotations[0]&&(h+=f.height+4,c+=f.width);let m=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(ti().flowchart.htmlLabels?m+="<"+e.classData.type+">":m+="<"+e.classData.type+">");const b=d.node().appendChild(es(m,e.labelStyle,!0,!0));(0,s.Ys)(b).attr("class","classTitle");let x=b.getBBox();if(F(ti().flowchart.htmlLabels)){const t=b.children[0],e=(0,s.Ys)(b);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h+=x.height+4,x.width>c&&(c=x.width);const k=[];e.classData.members.forEach((t=>{const i=zn(t);let r=i.displayText;ti().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">"));const n=d.node().appendChild(es(r,i.cssStyle?i.cssStyle:e.labelStyle,!0,!0));let a=n.getBBox();if(F(ti().flowchart.htmlLabels)){const t=n.children[0],e=(0,s.Ys)(n);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),h+=a.height+4,k.push(n)})),h+=8;const _=[];if(e.classData.methods.forEach((t=>{const i=zn(t);let r=i.displayText;ti().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">"));const n=d.node().appendChild(es(r,i.cssStyle?i.cssStyle:e.labelStyle,!0,!0));let a=n.getBBox();if(F(ti().flowchart.htmlLabels)){const t=n.children[0],e=(0,s.Ys)(n);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),h+=a.height+4,_.push(n)})),h+=8,p){let t=(c-f.width)/2;(0,s.Ys)(y).attr("transform","translate( "+(-1*c/2+t)+", "+-1*h/2+")"),u=f.height+4}let C=(c-x.width)/2;return(0,s.Ys)(b).attr("transform","translate( "+(-1*c/2+C)+", "+(-1*h/2+u)+")"),u+=x.height+4,o.attr("class","divider").attr("x1",-c/2-i).attr("x2",c/2+i).attr("y1",-h/2-i+8+u).attr("y2",-h/2-i+8+u),u+=8,k.forEach((t=>{(0,s.Ys)(t).attr("transform","translate( "+-c/2+", "+(-1*h/2+u+4)+")"),u+=x.height+4})),u+=8,l.attr("class","divider").attr("x1",-c/2-i).attr("x2",c/2+i).attr("y1",-h/2-i+8+u).attr("y2",-h/2-i+8+u),u+=8,_.forEach((t=>{(0,s.Ys)(t).attr("transform","translate( "+-c/2+", "+(-1*h/2+u)+")"),u+=x.height+4})),a.attr("class","outer title-state").attr("x",-c/2-i).attr("y",-h/2-i).attr("width",c+e.padding).attr("height",h+e.padding),rs(e,a),e.intersect=function(t){return xs.rect(e,t)},n}};let Ts={};const Es=t=>{const e=Ts[t.id];v.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},vs={rect:(t,e)=>{v.trace("Creating subgraph rect for ",e.id,e);const i=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=i.insert("rect",":first-child"),n=i.insert("g").attr("class","cluster-label"),a=n.node().appendChild(es(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(F(ti().flowchart.htmlLabels)){const t=a.children[0],e=(0,s.Ys)(a);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}const l=0*e.padding,c=l/2,h=e.width<=o.width+l?o.width+l:e.width;e.width<=o.width+l?e.diff=(o.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,v.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-h/2).attr("y",e.y-e.height/2-c).attr("width",h).attr("height",e.height+l),n.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2)+")");const d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return bs(e,t)},i},roundedWithTitle:(t,e)=>{const i=t.insert("g").attr("class",e.classes).attr("id",e.id),r=i.insert("rect",":first-child"),n=i.insert("g").attr("class","cluster-label"),a=i.append("rect"),o=n.node().appendChild(es(e.labelText,e.labelStyle,void 0,!0));let l=o.getBBox();if(F(ti().flowchart.htmlLabels)){const t=o.children[0],e=(0,s.Ys)(o);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}l=o.getBBox();const c=0*e.padding,h=c/2,d=e.width<=l.width+e.padding?l.width+e.padding:e.width;e.width<=l.width+e.padding?e.diff=(l.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,r.attr("class","outer").attr("x",e.x-d/2-h).attr("y",e.y-e.height/2-h).attr("width",d+c).attr("height",e.height+c),a.attr("class","inner").attr("x",e.x-d/2-h).attr("y",e.y-e.height/2-h+l.height-1).attr("width",d+c).attr("height",e.height+c-l.height-3),n.attr("transform","translate("+(e.x-l.width/2)+", "+(e.y-e.height/2-e.padding/3+(F(ti().flowchart.htmlLabels)?5:3))+")");const u=r.node().getBBox();return e.height=u.height,e.intersect=function(t){return bs(e,t)},i},noteGroup:(t,e)=>{const i=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=i.insert("rect",":first-child"),n=0*e.padding,s=n/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const a=r.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(t){return bs(e,t)},i},divider:(t,e)=>{const i=t.insert("g").attr("class",e.classes).attr("id",e.id),r=i.insert("rect",":first-child"),n=0*e.padding,s=n/2;r.attr("class","divider").attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2).attr("width",e.width+n).attr("height",e.height+n);const a=r.node().getBBox();return e.width=a.width,e.height=a.height,e.diff=-e.padding/2,e.intersect=function(t){return bs(e,t)},i}};let Ss={};let As={},ws={};function Bs(t,e){ti().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}const Ls=(t,e)=>{v.warn("abc88 cutPathAtIntersect",t,e);let i=[],r=t[0],n=!1;return t.forEach((t=>{if(v.info("abc88 checking point",t,e),((t,e)=>{const i=t.x,r=t.y,n=Math.abs(e.x-i),s=Math.abs(e.y-r),a=t.width/2,o=t.height/2;return n>=a||s>=o})(e,t)||n)v.warn("abc88 outside",t,r),r=t,n||i.push(t);else{const s=((t,e,i)=>{v.warn(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(i)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,n=t.y,s=Math.abs(r-i.x),a=t.width/2;let o=i.x<e.x?a-s:a+s;const l=t.height/2,c=Math.abs(e.y-i.y),h=Math.abs(e.x-i.x);if(Math.abs(n-e.y)*a>Math.abs(r-e.x)*l){let t=i.y<e.y?e.y-l-n:n-l-e.y;o=h*t/c;const r={x:i.x<e.x?i.x+o:i.x-h+o,y:i.y<e.y?i.y+c-t:i.y-c+t};return 0===o&&(r.x=e.x,r.y=e.y),0===h&&(r.x=e.x),0===c&&(r.y=e.y),v.warn(`abc89 topp/bott calc, Q ${c}, q ${t}, R ${h}, r ${o}`,r),r}{o=i.x<e.x?e.x-a-r:r-a-e.x;let t=c*o/h,n=i.x<e.x?i.x+h-o:i.x-h+o,s=i.y<e.y?i.y+t:i.y-t;return v.warn(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r ${o}`,{_x:n,_y:s}),0===o&&(n=e.x,s=e.y),0===h&&(n=e.x),0===c&&(s=e.y),{x:n,y:s}}})(e,r,t);v.warn("abc88 inside",t,r,s),v.warn("abc88 intersection",s);let a=!1;i.forEach((t=>{a=a||t.x===s.x&&t.y===s.y})),i.some((t=>t.x===s.x&&t.y===s.y))?v.warn("abc88 no intersect",s,i):i.push(s),n=!0}})),v.warn("abc88 returning points",i),i},Is=(t,e,i,r)=>{v.info("Graph in recursive render: XXX",b.c(e),r);const n=e.graph().rankdir;v.trace("Dir in recursive render - dir:",n);const a=t.insert("g").attr("class","root");e.nodes()?v.info("Recursive render XXX",e.nodes()):v.info("No nodes found for",e),e.edges().length>0&&v.trace("Recursive edges",e.edge(e.edges()[0]));const o=a.insert("g").attr("class","clusters"),l=a.insert("g").attr("class","edgePaths"),c=a.insert("g").attr("class","edgeLabels"),h=a.insert("g").attr("class","nodes");e.nodes().forEach((function(t){const s=e.node(t);if(void 0!==r){const i=JSON.parse(JSON.stringify(r.clusterData));v.info("Setting data for cluster XXX (",t,") ",i,r),e.setNode(r.id,i),e.parent(t)||(v.trace("Setting parent",t,r.id),e.setParent(t,r.id,i))}if(v.info("(Insert) Node XXX"+t+": "+JSON.stringify(e.node(t))),s&&s.clusterNode){v.info("Cluster identified",t,s.width,e.node(t));const r=Is(h,s.graph,i,e.node(t)),n=r.elem;rs(s,n),s.diff=r.diff||0,v.info("Node bounds (abc123)",t,s,s.width,s.x,s.y),((t,e)=>{Ts[e.id]=t})(n,s),v.warn("Recursive render complete ",n,s)}else e.children(t).length>0?(v.info("Cluster - the non recursive path XXX",t,s.id,s,e),v.info(ds(s.id,e)),ss[s.id]={id:ds(s.id,e),node:s}):(v.info("Node - the non recursive path",t,s.id,s),((t,e,i)=>{let r,n;if(e.link){let s;"sandbox"===ti().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),n=Cs[e.shape](r,e,i)}else n=Cs[e.shape](t,e,i),r=n;e.tooltip&&n.attr("title",e.tooltip),e.class&&n.attr("class","node default "+e.class),Ts[e.id]=r,e.haveCallback&&Ts[e.id].attr("class",Ts[e.id].attr("class")+" clickable")})(h,e.node(t),n))})),e.edges().forEach((function(t){const i=e.edge(t.v,t.w,t.name);v.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),v.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(e.edge(t))),v.info("Fix",ss,"ids:",t.v,t.w,"Translateing: ",ss[t.v],ss[t.w]),((t,e)=>{const i=es(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),n=r.insert("g").attr("class","label");n.node().appendChild(i);let a,o=i.getBBox();if(F(ti().flowchart.htmlLabels)){const t=i.children[0],e=(0,s.Ys)(i);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}if(n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),As[e.id]=r,e.width=o.width,e.height=o.height,e.startLabelLeft){const i=es(e.startLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");a=n.node().appendChild(i);const s=i.getBBox();n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),ws[e.id]||(ws[e.id]={}),ws[e.id].startLeft=r,Bs(a,e.startLabelLeft)}if(e.startLabelRight){const i=es(e.startLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");a=r.node().appendChild(i),n.node().appendChild(i);const s=i.getBBox();n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),ws[e.id]||(ws[e.id]={}),ws[e.id].startRight=r,Bs(a,e.startLabelRight)}if(e.endLabelLeft){const i=es(e.endLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");a=n.node().appendChild(i);const s=i.getBBox();n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),r.node().appendChild(i),ws[e.id]||(ws[e.id]={}),ws[e.id].endLeft=r,Bs(a,e.endLabelLeft)}if(e.endLabelRight){const i=es(e.endLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");a=n.node().appendChild(i);const s=i.getBBox();n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),r.node().appendChild(i),ws[e.id]||(ws[e.id]={}),ws[e.id].endRight=r,Bs(a,e.endLabelRight)}})(c,i)})),e.edges().forEach((function(t){v.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),v.info("#############################################"),v.info("### Layout ###"),v.info("#############################################"),v.info(e),(0,f.bK)(e),v.info("Graph after layout:",b.c(e));let d=0;return(t=>gs(t,t.children()))(e).forEach((function(t){const i=e.node(t);v.info("Position "+t+": "+JSON.stringify(e.node(t))),v.info("Position "+t+": ("+i.x,","+i.y,") width: ",i.width," height: ",i.height),i&&i.clusterNode?Es(i):e.children(t).length>0?(((t,e)=>{v.trace("Inserting cluster");const i=e.shape||"rect";Ss[e.id]=vs[i](t,e)})(o,i),ss[i.id].node=i):Es(i)})),e.edges().forEach((function(t){const r=e.edge(t);v.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(r),r);const n=function(t,e,i,r,n,a){let o=i.points,l=!1;const c=a.node(e.v);var h=a.node(e.w);v.info("abc88 InsertEdge: ",i),h.intersect&&c.intersect&&(o=o.slice(1,i.points.length-1),o.unshift(c.intersect(o[0])),v.info("Last point",o[o.length-1],h,h.intersect(o[o.length-1])),o.push(h.intersect(o[o.length-1]))),i.toCluster&&(v.info("to cluster abc88",r[i.toCluster]),o=Ls(i.points,r[i.toCluster].node),l=!0),i.fromCluster&&(v.info("from cluster abc88",r[i.fromCluster]),o=Ls(o.reverse(),r[i.fromCluster].node).reverse(),l=!0);const d=o.filter((t=>!Number.isNaN(t.y)));let u;u=("graph"===n||"flowchart"===n)&&i.curve||s.$0Z;const p=(0,s.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(u);let g;switch(i.thickness){case"normal":g="edge-thickness-normal";break;case"thick":g="edge-thickness-thick";break;default:g=""}switch(i.pattern){case"solid":g+=" edge-pattern-solid";break;case"dotted":g+=" edge-pattern-dotted";break;case"dashed":g+=" edge-pattern-dashed"}const y=t.append("path").attr("d",p(d)).attr("id",i.id).attr("class"," "+g+(i.classes?" "+i.classes:"")).attr("style",i.style);let f="";switch((ti().flowchart.arrowMarkerAbsolute||ti().state.arrowMarkerAbsolute)&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),v.info("arrowTypeStart",i.arrowTypeStart),v.info("arrowTypeEnd",i.arrowTypeEnd),i.arrowTypeStart){case"arrow_cross":y.attr("marker-start","url("+f+"#"+n+"-crossStart)");break;case"arrow_point":y.attr("marker-start","url("+f+"#"+n+"-pointStart)");break;case"arrow_barb":y.attr("marker-start","url("+f+"#"+n+"-barbStart)");break;case"arrow_circle":y.attr("marker-start","url("+f+"#"+n+"-circleStart)");break;case"aggregation":y.attr("marker-start","url("+f+"#"+n+"-aggregationStart)");break;case"extension":y.attr("marker-start","url("+f+"#"+n+"-extensionStart)");break;case"composition":y.attr("marker-start","url("+f+"#"+n+"-compositionStart)");break;case"dependency":y.attr("marker-start","url("+f+"#"+n+"-dependencyStart)");break;case"lollipop":y.attr("marker-start","url("+f+"#"+n+"-lollipopStart)")}switch(i.arrowTypeEnd){case"arrow_cross":y.attr("marker-end","url("+f+"#"+n+"-crossEnd)");break;case"arrow_point":y.attr("marker-end","url("+f+"#"+n+"-pointEnd)");break;case"arrow_barb":y.attr("marker-end","url("+f+"#"+n+"-barbEnd)");break;case"arrow_circle":y.attr("marker-end","url("+f+"#"+n+"-circleEnd)");break;case"aggregation":y.attr("marker-end","url("+f+"#"+n+"-aggregationEnd)");break;case"extension":y.attr("marker-end","url("+f+"#"+n+"-extensionEnd)");break;case"composition":y.attr("marker-end","url("+f+"#"+n+"-compositionEnd)");break;case"dependency":y.attr("marker-end","url("+f+"#"+n+"-dependencyEnd)");break;case"lollipop":y.attr("marker-end","url("+f+"#"+n+"-lollipopEnd)")}let m={};return l&&(m.updatedPath=o),m.originalPath=i.points,m}(l,t,r,ss,i,e);((t,e)=>{v.info("Moving label abc78 ",t.id,t.label,As[t.id]);let i=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const r=As[t.id];let n=t.x,s=t.y;if(i){const r=We.calcLabelPosition(i);v.info("Moving label "+t.label+" from (",n,",",s,") to (",r.x,",",r.y,") abc78"),e.updatedPath&&(n=r.x,s=r.y)}r.attr("transform","translate("+n+", "+s+")")}if(t.startLabelLeft){const e=ws[t.id].startLeft;let r=t.x,n=t.y;if(i){const e=We.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",i);r=e.x,n=e.y}e.attr("transform","translate("+r+", "+n+")")}if(t.startLabelRight){const e=ws[t.id].startRight;let r=t.x,n=t.y;if(i){const e=We.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",i);r=e.x,n=e.y}e.attr("transform","translate("+r+", "+n+")")}if(t.endLabelLeft){const e=ws[t.id].endLeft;let r=t.x,n=t.y;if(i){const e=We.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",i);r=e.x,n=e.y}e.attr("transform","translate("+r+", "+n+")")}if(t.endLabelRight){const e=ws[t.id].endRight;let r=t.x,n=t.y;if(i){const e=We.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",i);r=e.x,n=e.y}e.attr("transform","translate("+r+", "+n+")")}})(r,n)})),e.nodes().forEach((function(t){const i=e.node(t);v.info(t,i.type,i.diff),"group"===i.type&&(d=i.diff)})),{elem:a,diff:d}},Ds=(t,e,i,r,n)=>{ts(t,i,r,n),Ts={},As={},ws={},Ss={},as={},os={},ss={},v.warn("Graph at first:",b.c(e)),((t,e)=>{!t||e>10?v.debug("Opting out, no graph "):(v.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(v.warn("Cluster identified",e," Replacement id in edges: ",ds(e,t)),as[e]=hs(e,t),ss[e]={id:ds(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){const i=t.children(e),r=t.edges();i.length>0?(v.debug("Cluster identified",e,as),r.forEach((t=>{t.v!==e&&t.w!==e&&ls(t.v,e)^ls(t.w,e)&&(v.warn("Edge: ",t," leaves cluster ",e),v.warn("Decendants of XXX ",e,": ",as[e]),ss[e].externalConnections=!0)}))):v.debug("Not a cluster ",e,as)})),t.edges().forEach((function(e){const i=t.edge(e);v.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),v.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let r=e.v,n=e.w;if(v.warn("Fix XXX",ss,"ids:",e.v,e.w,"Translating: ",ss[e.v]," --- ",ss[e.w]),ss[e.v]&&ss[e.w]&&ss[e.v]===ss[e.w]){v.warn("Fixing and trixing link to self - removing XXX",e.v,e.w,e.name),v.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=us(e.v),n=us(e.w),t.removeEdge(e.v,e.w,e.name);const s=e.w+"---"+e.v;t.setNode(s,{domId:s,id:s,labelStyle:"",labelText:i.label,padding:0,shape:"labelRect",style:""});const a=JSON.parse(JSON.stringify(i)),o=JSON.parse(JSON.stringify(i));a.label="",a.arrowTypeEnd="none",o.label="",a.fromCluster=e.v,o.toCluster=e.v,t.setEdge(r,s,a,e.name+"-cyclic-special"),t.setEdge(s,n,o,e.name+"-cyclic-special")}else(ss[e.v]||ss[e.w])&&(v.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=us(e.v),n=us(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(i.fromCluster=e.v),n!==e.w&&(i.toCluster=e.w),v.warn("Fix Replacing with XXX",r,n,e.name),t.setEdge(r,n,i,e.name))})),v.warn("Adjusted Graph",b.c(t)),ps(t,0),v.trace(ss))})(e),v.warn("Graph after:",b.c(e)),Is(t,e,r)},Os=t=>$.sanitizeText(t,ti());let Fs={dividerMargin:10,padding:5,textHeight:10};function Ns(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const $s={setConf:function(t){Object.keys(t).forEach((function(e){Fs[e]=t[e]}))},draw:function(t,e,i,r){v.info("Drawing class - ",e);const n=ti().flowchart,a=ti().securityLevel;v.info("config:",n);const o=n.nodeSpacing||50,l=n.rankSpacing||50,c=new m.k({multigraph:!0,compound:!0}).setGraph({rankdir:r.db.getDirection(),nodesep:o,ranksep:l,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),h=r.db.getClasses(),d=r.db.getRelations(),u=r.db.getNotes();let p;v.info(d),function(t,e,i,r){const n=Object.keys(t);v.info("keys:",n),v.info(t),n.forEach((function(i){const n=t[i];let s="";n.cssClasses.length>0&&(s=s+" "+n.cssClasses.join(" "));const a={labelStyle:""};let o=void 0!==n.text?n.text:n.id,l="";n.type,l="class_box",e.setNode(n.id,{labelStyle:a.labelStyle,shape:l,labelText:Os(o),classData:n,rx:0,ry:0,class:s,style:a.style,id:n.id,domId:n.domId,tooltip:r.db.getTooltip(n.id)||"",haveCallback:n.haveCallback,link:n.link,width:"group"===n.type?500:void 0,type:n.type,padding:ti().flowchart.padding}),v.info("setNode",{labelStyle:a.labelStyle,shape:l,labelText:o,rx:0,ry:0,class:s,style:a.style,id:n.id,width:"group"===n.type?500:void 0,type:n.type,padding:ti().flowchart.padding})}))}(h,c,0,r),function(t,e){const i=ti().flowchart;let r=0;t.forEach((function(n){r++;const a={classes:"relation"};a.pattern=1==n.relation.lineType?"dashed":"solid",a.id="id"+r,"arrow_open"===n.type?a.arrowhead="none":a.arrowhead="normal",v.info(a,n),a.startLabelRight="none"===n.relationTitle1?"":n.relationTitle1,a.endLabelLeft="none"===n.relationTitle2?"":n.relationTitle2,a.arrowTypeStart=Ns(n.relation.type1),a.arrowTypeEnd=Ns(n.relation.type2);let o="",l="";if(void 0!==n.style){const t=Le(n.style);o=t.style,l=t.labelStyle}else o="fill:none";a.style=o,a.labelStyle=l,void 0!==n.interpolate?a.curve=we(n.interpolate,s.c_6):void 0!==t.defaultInterpolate?a.curve=we(t.defaultInterpolate,s.c_6):a.curve=we(i.curve,s.c_6),n.text=n.title,void 0===n.text?void 0!==n.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",ti().flowchart.htmlLabels?(a.labelType="html",a.label='<span class="edgeLabel">'+n.text+"</span>"):(a.labelType="text",a.label=n.text.replace($.lineBreakRegex,"\n"),void 0===n.style&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),e.setEdge(n.id1,n.id2,a,r)}))}(d,c),function(t,e,i,r){v.info(t),t.forEach((function(t,n){const a=t,o="",l="";let c=a.text,h="note";if(e.setNode(a.id,{labelStyle:o,shape:h,labelText:Os(c),noteData:a,rx:0,ry:0,class:"",style:l,id:a.id,domId:a.id,tooltip:"",type:"note",padding:ti().flowchart.padding}),v.info("setNode",{labelStyle:o,shape:h,labelText:c,rx:0,ry:0,style:l,id:a.id,type:"note",padding:ti().flowchart.padding}),!a.class||!(a.class in r))return;const d=i+n,u={classes:"relation",pattern:"dotted"};u.id=`edgeNote${d}`,u.arrowhead="none",v.info(`Note edge: ${JSON.stringify(u)}, ${JSON.stringify(a)}`),u.startLabelRight="",u.endLabelLeft="",u.arrowTypeStart="none",u.arrowTypeEnd="none",u.style="fill:none",u.labelStyle="",u.curve=we(Fs.curve,s.c_6),e.setEdge(a.id,a.class,u,d)}))}(u,c,d.length+1,h),"sandbox"===a&&(p=(0,s.Ys)("#i"+e));const g="sandbox"===a?(0,s.Ys)(p.nodes()[0].contentDocument.body):(0,s.Ys)("body"),y=g.select(`[id="${e}"]`),f=g.select("#"+e+" g");if(Ds(f,c,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),We.insertTitle(y,"classTitleText",n.titleTopMargin,r.db.getDiagramTitle()),li(c,y,n.diagramPadding,n.useMaxWidth),!n.htmlLabels){const t="sandbox"===a?p.nodes()[0].contentDocument:document,i=t.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const e of i){const i=e.getBBox(),r=t.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("rx",0),r.setAttribute("ry",0),r.setAttribute("width",i.width),r.setAttribute("height",i.height),e.insertBefore(r,e.firstChild)}}}};var Rs=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,2],i=[1,5],r=[6,9,11,23,25,27,29,30,31,49],n=[1,17],s=[1,18],a=[1,19],o=[1,20],l=[1,21],c=[1,22],h=[1,25],d=[1,30],u=[1,31],p=[1,32],g=[1,33],y=[6,9,11,15,20,23,25,27,29,30,31,42,43,44,45,49],f=[1,45],m=[30,31,46,47],b=[4,6,9,11,23,25,27,29,30,31,49],x=[42,43,44,45],k=[22,37],_=[1,64],C={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",38:"ATTRIBUTE_KEY",39:"COMMENT",42:"ZERO_OR_ONE",43:"ZERO_OR_MORE",44:"ONE_OR_MORE",45:"ONLY_ONE",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD",49:"open_directive",50:"type_directive",51:"arg_directive",52:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:s[o-1].push(s[o]),this.$=s[o-1];break;case 5:case 6:case 20:case 41:case 28:case 29:case 30:this.$=s[o];break;case 12:r.addEntity(s[o-4]),r.addEntity(s[o-2]),r.addRelationship(s[o-4],s[o],s[o-2],s[o-3]);break;case 13:r.addEntity(s[o-3]),r.addAttributes(s[o-3],s[o-1]);break;case 14:r.addEntity(s[o-2]);break;case 15:r.addEntity(s[o]);break;case 16:case 17:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 21:case 39:case 40:case 31:this.$=s[o].replace(/"/g,"");break;case 22:this.$=[s[o]];break;case 23:s[o].push(s[o-1]),this.$=s[o];break;case 24:this.$={attributeType:s[o-1],attributeName:s[o]};break;case 25:this.$={attributeType:s[o-2],attributeName:s[o-1],attributeKeyType:s[o]};break;case 26:this.$={attributeType:s[o-2],attributeName:s[o-1],attributeComment:s[o]};break;case 27:this.$={attributeType:s[o-3],attributeName:s[o-2],attributeKeyType:s[o-1],attributeComment:s[o]};break;case 32:this.$={cardA:s[o],relType:s[o-1],cardB:s[o-2]};break;case 33:this.$=r.Cardinality.ZERO_OR_ONE;break;case 34:this.$=r.Cardinality.ZERO_OR_MORE;break;case 35:this.$=r.Cardinality.ONE_OR_MORE;break;case 36:this.$=r.Cardinality.ONLY_ONE;break;case 37:this.$=r.Identification.NON_IDENTIFYING;break;case 38:this.$=r.Identification.IDENTIFYING;break;case 42:r.parseDirective("%%{","open_directive");break;case 43:r.parseDirective(s[o],"type_directive");break;case 44:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 45:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,49:i},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,49:i},{13:8,50:[1,9]},{50:[2,42]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:n,25:s,27:a,29:o,30:l,31:c,49:i},{1:[2,2]},{14:23,15:[1,24],52:h},t([15,52],[2,43]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:26,12:4,17:16,23:n,25:s,27:a,29:o,30:l,31:c,49:i},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:27,40:29,20:[1,28],42:d,43:u,44:p,45:g}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(r,[2,19]),t(y,[2,20]),t(y,[2,21]),{11:[1,37]},{16:38,51:[1,39]},{11:[2,45]},t(r,[2,5]),{17:40,30:l,31:c},{21:41,22:[1,42],32:43,33:44,37:f},{41:46,46:[1,47],47:[1,48]},t(m,[2,33]),t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(b,[2,9]),{14:49,52:h},{52:[2,44]},{15:[1,50]},{22:[1,51]},t(r,[2,14]),{21:52,22:[2,22],32:43,33:44,37:f},{34:53,37:[1,54]},{37:[2,28]},{40:55,42:d,43:u,44:p,45:g},t(x,[2,37]),t(x,[2,38]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],48:[1,58]},t(r,[2,13]),{22:[2,23]},t(k,[2,24],{35:61,36:62,38:[1,63],39:_}),t([22,37,38,39],[2,29]),t([30,31],[2,32]),t(b,[2,10]),t(r,[2,12]),t(r,[2,39]),t(r,[2,40]),t(r,[2,41]),t(k,[2,25],{36:65,39:_}),t(k,[2,26]),t([22,37,39],[2,30]),t(k,[2,31]),t(k,[2,27])],defaultActions:{5:[2,42],7:[2,2],25:[2,45],39:[2,44],45:[2,28],52:[2,23]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},T=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),49;case 8:return this.begin("type_directive"),50;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:case 13:case 15:case 21:case 26:break;case 14:return 11;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 22:return 38;case 23:case 24:return 37;case 25:return 39;case 27:return this.popState(),22;case 28:case 57:return e.yytext[0];case 29:case 33:case 34:case 47:return 42;case 30:case 31:case 32:case 40:case 42:case 49:return 44;case 35:case 36:case 37:case 38:case 39:case 41:case 48:return 43;case 43:case 44:case 45:case 46:return 45;case 50:case 53:case 54:case 55:return 46;case 51:case 52:return 47;case 56:return 30;case 58:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58],inclusive:!0}}};return t}();function E(){this.yy={}}return C.lexer=T,E.prototype=C,C.Parser=E,new E}();Rs.parser=Rs;const Ms=Rs,Ps=t=>null!==t.match(/^\s*erDiagram/);let Ys={},zs=[];const js=function(t){return void 0===Ys[t]&&(Ys[t]={attributes:[]},v.info("Added new entity :",t)),Ys[t]},Zs={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},getConfig:()=>ti().er,addEntity:js,addAttributes:function(t,e){let i,r=js(t);for(i=e.length-1;i>=0;i--)r.attributes.push(e[i]),v.debug("Added attribute ",e[i].attributeName)},getEntities:()=>Ys,addRelationship:function(t,e,i,r){let n={entityA:t,roleA:e,entityB:i,relSpec:r};zs.push(n),v.debug("Added new relationship :",n)},getRelationships:()=>zs,clear:function(){Ys={},zs=[],Mi()},setAccTitle:Pi,getAccTitle:Yi,setAccDescription:zi,getAccDescription:ji,setDiagramTitle:Zi,getDiagramTitle:Wi},Ws={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},qs=Ws,Us=function(t,e){let i;t.append("defs").append("marker").attr("id",Ws.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",Ws.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),i=t.append("defs").append("marker").attr("id",Ws.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),i=t.append("defs").append("marker").attr("id",Ws.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Ws.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",Ws.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),i=t.append("defs").append("marker").attr("id",Ws.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),i=t.append("defs").append("marker").attr("id",Ws.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},Vs=/[^\dA-Za-z](\W)*/g;let Hs={},Gs=new Map;const Xs=function(t,e,i){let r;return Object.keys(e).forEach((function(n){const s=function(t="",e=""){const i=t.replace(Vs,"");return`${Js(e)}${Js(i)}${(0,x.Z)()}`}(n,"entity");Gs.set(n,s);const a=t.append("g").attr("id",s);r=void 0===r?s:r;const o="text-"+s,l=a.append("text").classed("er entityLabel",!0).attr("id",o).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",ti().fontFamily).style("font-size",Hs.fontSize+"px").text(n),{width:c,height:h}=((t,e,i)=>{const r=Hs.entityPadding/3,n=Hs.entityPadding/3,s=.85*Hs.fontSize,a=e.node().getBBox(),o=[];let l=!1,c=!1,h=0,d=0,u=0,p=0,g=a.height+2*r,y=1;i.forEach((t=>{void 0!==t.attributeKeyType&&(l=!0),void 0!==t.attributeComment&&(c=!0)})),i.forEach((i=>{const n=`${e.node().id}-attr-${y}`;let a=0;const f=N(i.attributeType),m=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",ti().fontFamily).style("font-size",s+"px").text(f),b=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",ti().fontFamily).style("font-size",s+"px").text(i.attributeName),x={};x.tn=m,x.nn=b;const k=m.node().getBBox(),_=b.node().getBBox();if(h=Math.max(h,k.width),d=Math.max(d,_.width),a=Math.max(k.height,_.height),l){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",ti().fontFamily).style("font-size",s+"px").text(i.attributeKeyType||"");x.kn=e;const r=e.node().getBBox();u=Math.max(u,r.width),a=Math.max(a,r.height)}if(c){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",ti().fontFamily).style("font-size",s+"px").text(i.attributeComment||"");x.cn=e;const r=e.node().getBBox();p=Math.max(p,r.width),a=Math.max(a,r.height)}x.height=a,o.push(x),g+=a+2*r,y+=1}));let f=4;l&&(f+=2),c&&(f+=2);const m=h+d+u+p,b={width:Math.max(Hs.minEntityWidth,Math.max(a.width+2*Hs.entityPadding,m+n*f)),height:i.length>0?g:Math.max(Hs.minEntityHeight,a.height+2*Hs.entityPadding)};if(i.length>0){const i=Math.max(0,(b.width-m-n*f)/(f/2));e.attr("transform","translate("+b.width/2+","+(r+a.height/2)+")");let s=a.height+2*r,g="attributeBoxOdd";o.forEach((e=>{const a=s+r+e.height/2;e.tn.attr("transform","translate("+n+","+a+")");const o=t.insert("rect","#"+e.tn.node().id).classed(`er ${g}`,!0).attr("x",0).attr("y",s).attr("width",h+2*n+i).attr("height",e.height+2*r),y=parseFloat(o.attr("x"))+parseFloat(o.attr("width"));e.nn.attr("transform","translate("+(y+n)+","+a+")");const f=t.insert("rect","#"+e.nn.node().id).classed(`er ${g}`,!0).attr("x",y).attr("y",s).attr("width",d+2*n+i).attr("height",e.height+2*r);let m=parseFloat(f.attr("x"))+parseFloat(f.attr("width"));if(l){e.kn.attr("transform","translate("+(m+n)+","+a+")");const o=t.insert("rect","#"+e.kn.node().id).classed(`er ${g}`,!0).attr("x",m).attr("y",s).attr("width",u+2*n+i).attr("height",e.height+2*r);m=parseFloat(o.attr("x"))+parseFloat(o.attr("width"))}c&&(e.cn.attr("transform","translate("+(m+n)+","+a+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${g}`,"true").attr("x",m).attr("y",s).attr("width",p+2*n+i).attr("height",e.height+2*r)),s+=e.height+2*r,g="attributeBoxOdd"===g?"attributeBoxEven":"attributeBoxOdd"}))}else b.height=Math.max(Hs.minEntityHeight,g),e.attr("transform","translate("+b.width/2+","+b.height/2+")");return b})(a,l,e[n].attributes),d=a.insert("rect","#"+o).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",c).attr("height",h).node().getBBox();i.setNode(s,{width:d.width,height:d.height,shape:"rect",id:s})})),r},Ks=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")};let Qs=0;function Js(t=""){return t.length>0?`${t}-`:""}const ta={setConf:function(t){const e=Object.keys(t);for(const i of e)Hs[i]=t[i]},draw:function(t,e,i,r){Hs=ti().er,v.info("Drawing ER diagram");const n=ti().securityLevel;let a;"sandbox"===n&&(a=(0,s.Ys)("#i"+e));const o=("sandbox"===n?(0,s.Ys)(a.nodes()[0].contentDocument.body):(0,s.Ys)("body")).select(`[id='${e}']`);let l;Us(o,Hs),l=new m.k({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Hs.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const c=Xs(o,r.db.getEntities(),l),h=function(t,e){return t.forEach((function(t){e.setEdge(Gs.get(t.entityA),Gs.get(t.entityB),{relationship:t},Ks(t))})),t}(r.db.getRelationships(),l);var d,u;(0,f.bK)(l),d=o,(u=l).nodes().forEach((function(t){void 0!==t&&void 0!==u.node(t)&&d.select("#"+t).attr("transform","translate("+(u.node(t).x-u.node(t).width/2)+","+(u.node(t).y-u.node(t).height/2)+" )")})),h.forEach((function(t){!function(t,e,i,r,n){Qs++;const a=i.edge(Gs.get(e.entityA),Gs.get(e.entityB),Ks(e)),o=(0,s.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.$0Z),l=t.insert("path","#"+r).classed("er relationshipLine",!0).attr("d",o(a.points)).style("stroke",Hs.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let c="";switch(Hs.arrowMarkerAbsolute&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replace(/\(/g,"\\("),c=c.replace(/\)/g,"\\)")),e.relSpec.cardA){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+c+"#"+qs.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+c+"#"+qs.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+c+"#"+qs.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+c+"#"+qs.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+c+"#"+qs.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+c+"#"+qs.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+c+"#"+qs.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+c+"#"+qs.ONLY_ONE_START+")")}const h=l.node().getTotalLength(),d=l.node().getPointAtLength(.5*h),u="rel"+Qs,p=t.append("text").classed("er relationshipLabel",!0).attr("id",u).attr("x",d.x).attr("y",d.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",ti().fontFamily).style("font-size",Hs.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+u).classed("er relationshipLabelBox",!0).attr("x",d.x-p.width/2).attr("y",d.y-p.height/2).attr("width",p.width).attr("height",p.height)}(o,t,l,c,r)}));const p=Hs.diagramPadding;We.insertTitle(o,"entityTitleText",Hs.titleTopMargin,r.db.getDiagramTitle());const g=o.node().getBBox(),y=g.width+2*p,b=g.height+2*p;oi(o,b,y,Hs.useMaxWidth),o.attr("viewBox",`${g.x-p} ${g.y-p} ${y} ${b}`)}};var ea=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,9],i=[1,7],r=[1,6],n=[1,8],s=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],a=[2,10],o=[1,20],l=[1,21],c=[1,22],h=[1,23],d=[1,30],u=[1,32],p=[1,33],g=[1,34],y=[1,62],f=[1,48],m=[1,52],b=[1,36],x=[1,37],k=[1,38],_=[1,39],C=[1,40],T=[1,56],E=[1,63],v=[1,51],S=[1,53],A=[1,55],w=[1,59],B=[1,60],L=[1,41],I=[1,42],D=[1,43],O=[1,44],F=[1,61],N=[1,50],$=[1,54],R=[1,57],M=[1,58],P=[1,49],Y=[1,66],z=[1,71],j=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Z=[1,75],W=[1,74],q=[1,76],U=[20,21,23,81,82],V=[1,99],H=[1,104],G=[1,107],X=[1,108],K=[1,101],Q=[1,106],J=[1,109],tt=[1,102],et=[1,114],it=[1,113],rt=[1,103],nt=[1,105],st=[1,110],at=[1,111],ot=[1,112],lt=[1,115],ct=[20,21,22,23,81,82],ht=[20,21,22,23,53,81,82],dt=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],ut=[20,21,23],pt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],gt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],yt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],ft=[1,149],mt=[1,157],bt=[1,158],xt=[1,159],kt=[1,160],_t=[1,144],Ct=[1,145],Tt=[1,141],Et=[1,152],vt=[1,153],St=[1,154],At=[1,155],wt=[1,156],Bt=[1,161],Lt=[1,162],It=[1,147],Dt=[1,150],Ot=[1,146],Ft=[1,143],Nt=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],$t=[1,165],Rt=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Mt=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Pt=[12,21,22,24],Yt=[22,106],zt=[1,250],jt=[1,245],Zt=[1,246],Wt=[1,254],qt=[1,251],Ut=[1,248],Vt=[1,247],Ht=[1,249],Gt=[1,252],Xt=[1,253],Kt=[1,255],Qt=[1,273],Jt=[20,21,23,106],te=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ee={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(s[o],"type_directive");break;case 7:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:(!Array.isArray(s[o])||s[o].length>0)&&s[o-1].push(s[o]),this.$=s[o-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=s[o];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(s[o-1]),this.$=s[o-1];break;case 35:this.$=s[o-1].nodes;break;case 41:this.$=r.addSubGraph(s[o-6],s[o-1],s[o-4]);break;case 42:this.$=r.addSubGraph(s[o-3],s[o-1],s[o-3]);break;case 43:this.$=r.addSubGraph(void 0,s[o-1],void 0);break;case 45:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 46:case 47:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 51:r.addLink(s[o-2].stmt,s[o],s[o-1]),this.$={stmt:s[o],nodes:s[o].concat(s[o-2].nodes)};break;case 52:r.addLink(s[o-3].stmt,s[o-1],s[o-2]),this.$={stmt:s[o-1],nodes:s[o-1].concat(s[o-3].nodes)};break;case 53:this.$={stmt:s[o-1],nodes:s[o-1]};break;case 54:this.$={stmt:s[o],nodes:s[o]};break;case 55:case 123:case 125:this.$=[s[o]];break;case 56:this.$=s[o-4].concat(s[o]);break;case 57:this.$=[s[o-2]],r.setClass(s[o-2],s[o]);break;case 58:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"square");break;case 59:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"doublecircle");break;case 60:this.$=s[o-5],r.addVertex(s[o-5],s[o-2],"circle");break;case 61:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"ellipse");break;case 62:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"stadium");break;case 63:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"subroutine");break;case 64:this.$=s[o-7],r.addVertex(s[o-7],s[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[o-5],s[o-3]]]));break;case 65:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"cylinder");break;case 66:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"round");break;case 67:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"diamond");break;case 68:this.$=s[o-5],r.addVertex(s[o-5],s[o-2],"hexagon");break;case 69:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"odd");break;case 70:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"trapezoid");break;case 71:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"inv_trapezoid");break;case 72:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"lean_right");break;case 73:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"lean_left");break;case 74:this.$=s[o],r.addVertex(s[o]);break;case 75:s[o-1].text=s[o],this.$=s[o-1];break;case 76:case 77:s[o-2].text=s[o-1],this.$=s[o-2];break;case 79:var l=r.destructLink(s[o],s[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:s[o-1]};break;case 80:l=r.destructLink(s[o]);this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 81:this.$=s[o-1];break;case 83:case 97:case 153:case 151:this.$=s[o-1]+""+s[o];break;case 98:case 99:this.$=s[o-4],r.addClass(s[o-2],s[o]);break;case 100:this.$=s[o-4],r.setClass(s[o-2],s[o]);break;case 101:case 109:this.$=s[o-1],r.setClickEvent(s[o-1],s[o]);break;case 102:case 110:this.$=s[o-3],r.setClickEvent(s[o-3],s[o-2]),r.setTooltip(s[o-3],s[o]);break;case 103:this.$=s[o-2],r.setClickEvent(s[o-2],s[o-1],s[o]);break;case 104:this.$=s[o-4],r.setClickEvent(s[o-4],s[o-3],s[o-2]),r.setTooltip(s[o-4],s[o]);break;case 105:case 111:this.$=s[o-1],r.setLink(s[o-1],s[o]);break;case 106:case 112:this.$=s[o-3],r.setLink(s[o-3],s[o-2]),r.setTooltip(s[o-3],s[o]);break;case 107:case 113:this.$=s[o-3],r.setLink(s[o-3],s[o-2],s[o]);break;case 108:case 114:this.$=s[o-5],r.setLink(s[o-5],s[o-4],s[o]),r.setTooltip(s[o-5],s[o-2]);break;case 115:this.$=s[o-4],r.addVertex(s[o-2],void 0,void 0,s[o]);break;case 116:case 118:this.$=s[o-4],r.updateLink(s[o-2],s[o]);break;case 117:this.$=s[o-4],r.updateLink([s[o-2]],s[o]);break;case 119:this.$=s[o-8],r.updateLinkInterpolate([s[o-6]],s[o-2]),r.updateLink([s[o-6]],s[o]);break;case 120:this.$=s[o-8],r.updateLinkInterpolate(s[o-6],s[o-2]),r.updateLink(s[o-6],s[o]);break;case 121:this.$=s[o-6],r.updateLinkInterpolate([s[o-4]],s[o]);break;case 122:this.$=s[o-6],r.updateLinkInterpolate(s[o-4],s[o]);break;case 124:case 126:s[o-2].push(s[o]),this.$=s[o-2];break;case 128:this.$=s[o-1]+s[o];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:i,22:r,24:n},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:i,22:r,24:n},t(s,a,{17:11}),{7:12,13:[1,13]},{16:14,21:i,22:r,24:n},{16:15,21:i,22:r,24:n},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:o,21:l,22:c,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:d,43:31,44:u,46:p,48:g,50:35,51:45,52:y,54:46,66:f,67:m,86:b,87:x,88:k,89:_,90:C,91:T,95:E,105:v,106:S,109:A,111:w,112:B,116:47,118:L,119:I,120:D,121:O,122:F,123:N,124:$,125:R,126:M,127:P},{8:64,10:[1,65],15:Y},t([10,15],[2,6]),t(s,[2,17]),t(s,[2,18]),t(s,[2,19]),{20:[1,68],21:[1,69],22:z,27:67,30:70},t(j,[2,11]),t(j,[2,12]),t(j,[2,13]),t(j,[2,14]),t(j,[2,15]),t(j,[2,16]),{9:72,20:Z,21:W,23:q,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:Z,21:W,23:q},{9:81,20:Z,21:W,23:q},{9:82,20:Z,21:W,23:q},{9:83,20:Z,21:W,23:q},{9:84,20:Z,21:W,23:q},{9:86,20:Z,21:W,22:[1,85],23:q},t(j,[2,44]),{45:[1,87]},{47:[1,88]},t(j,[2,47]),t(U,[2,54],{30:89,22:z}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:V,52:H,66:G,67:X,84:[1,97],91:K,97:96,98:[1,94],100:[1,95],105:Q,106:J,109:tt,111:et,112:it,115:100,117:98,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(j,[2,158]),t(j,[2,159]),t(j,[2,160]),t(j,[2,161]),t(ct,[2,55],{53:[1,116]}),t(ht,[2,74],{116:129,40:[1,117],52:y,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:f,67:m,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:T,95:E,105:v,106:S,109:A,111:w,112:B,122:F,123:N,124:$,125:R,126:M,127:P}),t(dt,[2,150]),t(dt,[2,175]),t(dt,[2,176]),t(dt,[2,177]),t(dt,[2,178]),t(dt,[2,179]),t(dt,[2,180]),t(dt,[2,181]),t(dt,[2,182]),t(dt,[2,183]),t(dt,[2,184]),t(dt,[2,185]),t(dt,[2,186]),t(dt,[2,187]),t(dt,[2,188]),t(dt,[2,189]),t(dt,[2,190]),{9:130,20:Z,21:W,23:q},{11:131,14:[1,132]},t(ut,[2,8]),t(s,[2,20]),t(s,[2,26]),t(s,[2,27]),{21:[1,133]},t(pt,[2,34],{30:134,22:z}),t(j,[2,35]),{50:135,51:45,52:y,54:46,66:f,67:m,91:T,95:E,105:v,106:S,109:A,111:w,112:B,116:47,122:F,123:N,124:$,125:R,126:M,127:P},t(gt,[2,48]),t(gt,[2,49]),t(gt,[2,50]),t(yt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:ft,24:mt,26:bt,38:xt,39:139,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(j,[2,36]),t(j,[2,37]),t(j,[2,38]),t(j,[2,39]),t(j,[2,40]),{22:ft,24:mt,26:bt,38:xt,39:163,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(Nt,a,{17:164}),t(j,[2,45]),t(j,[2,46]),t(U,[2,53],{52:$t}),{26:V,52:H,66:G,67:X,91:K,97:166,102:[1,167],105:Q,106:J,109:tt,111:et,112:it,115:100,117:98,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{95:[1,168],103:169,105:[1,170]},{26:V,52:H,66:G,67:X,91:K,95:[1,171],97:172,105:Q,106:J,109:tt,111:et,112:it,115:100,117:98,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{26:V,52:H,66:G,67:X,91:K,97:173,105:Q,106:J,109:tt,111:et,112:it,115:100,117:98,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(ut,[2,101],{22:[1,174],99:[1,175]}),t(ut,[2,105],{22:[1,176]}),t(ut,[2,109],{115:100,117:178,22:[1,177],26:V,52:H,66:G,67:X,91:K,105:Q,106:J,109:tt,111:et,112:it,122:rt,123:nt,124:st,125:at,126:ot,127:lt}),t(ut,[2,111],{22:[1,179]}),t(Rt,[2,152]),t(Rt,[2,154]),t(Rt,[2,155]),t(Rt,[2,156]),t(Rt,[2,157]),t(Mt,[2,162]),t(Mt,[2,163]),t(Mt,[2,164]),t(Mt,[2,165]),t(Mt,[2,166]),t(Mt,[2,167]),t(Mt,[2,168]),t(Mt,[2,169]),t(Mt,[2,170]),t(Mt,[2,171]),t(Mt,[2,172]),t(Mt,[2,173]),t(Mt,[2,174]),{52:y,54:180,66:f,67:m,91:T,95:E,105:v,106:S,109:A,111:w,112:B,116:47,122:F,123:N,124:$,125:R,126:M,127:P},{22:ft,24:mt,26:bt,38:xt,39:181,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:182,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:184,42:kt,52:H,57:[1,183],66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:185,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:186,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:187,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{66:[1,188]},{22:ft,24:mt,26:bt,38:xt,39:189,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:190,42:kt,52:H,66:G,67:X,71:[1,191],73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:192,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:193,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:194,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(dt,[2,151]),t(Pt,[2,3]),{8:195,15:Y},{15:[2,7]},t(s,[2,28]),t(pt,[2,33]),t(U,[2,51],{30:196,22:z}),t(yt,[2,75],{22:[1,197]}),{22:[1,198]},{22:ft,24:mt,26:bt,38:xt,39:199,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,66:G,67:X,73:_t,81:Ct,82:[1,200],83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(Mt,[2,82]),t(Mt,[2,84]),t(Mt,[2,140]),t(Mt,[2,141]),t(Mt,[2,142]),t(Mt,[2,143]),t(Mt,[2,144]),t(Mt,[2,145]),t(Mt,[2,146]),t(Mt,[2,147]),t(Mt,[2,148]),t(Mt,[2,149]),t(Mt,[2,85]),t(Mt,[2,86]),t(Mt,[2,87]),t(Mt,[2,88]),t(Mt,[2,89]),t(Mt,[2,90]),t(Mt,[2,91]),t(Mt,[2,92]),t(Mt,[2,93]),t(Mt,[2,94]),t(Mt,[2,95]),{9:203,20:Z,21:W,22:ft,23:q,24:mt,26:bt,38:xt,40:[1,202],42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{18:18,19:19,20:o,21:l,22:c,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,204],43:31,44:u,46:p,48:g,50:35,51:45,52:y,54:46,66:f,67:m,86:b,87:x,88:k,89:_,90:C,91:T,95:E,105:v,106:S,109:A,111:w,112:B,116:47,118:L,119:I,120:D,121:O,122:F,123:N,124:$,125:R,126:M,127:P},{22:z,30:205},{22:[1,206],26:V,52:H,66:G,67:X,91:K,105:Q,106:J,109:tt,111:et,112:it,115:100,117:178,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(Yt,[2,123]),{22:[1,211]},{22:[1,212],26:V,52:H,66:G,67:X,91:K,105:Q,106:J,109:tt,111:et,112:it,115:100,117:178,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:[1,213],26:V,52:H,66:G,67:X,91:K,105:Q,106:J,109:tt,111:et,112:it,115:100,117:178,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{84:[1,214]},t(ut,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(Rt,[2,153]),{84:[1,219],101:[1,220]},t(ct,[2,57],{116:129,52:y,66:f,67:m,91:T,95:E,105:v,106:S,109:A,111:w,112:B,122:F,123:N,124:$,125:R,126:M,127:P}),{22:ft,24:mt,26:bt,38:xt,41:[1,221],42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,56:[1,222],66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:223,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,58:[1,224],66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,60:[1,225],66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,62:[1,226],66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,64:[1,227],66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{67:[1,228]},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,66:G,67:X,70:[1,229],73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,66:G,67:X,72:[1,230],73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,39:231,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,41:[1,232],42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,66:G,67:X,73:_t,75:[1,233],77:[1,234],81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,66:G,67:X,73:_t,75:[1,236],77:[1,235],81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{9:237,20:Z,21:W,23:q},t(U,[2,52],{52:$t}),t(yt,[2,77]),t(yt,[2,76]),{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,66:G,67:X,68:[1,238],73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(yt,[2,79]),t(Mt,[2,83]),{22:ft,24:mt,26:bt,38:xt,39:239,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(Nt,a,{17:240}),t(j,[2,43]),{51:241,52:y,54:46,66:f,67:m,91:T,95:E,105:v,106:S,109:A,111:w,112:B,116:47,122:F,123:N,124:$,125:R,126:M,127:P},{22:zt,66:jt,67:Zt,86:Wt,96:242,102:qt,105:Ut,107:243,108:244,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt},{22:zt,66:jt,67:Zt,86:Wt,96:256,102:qt,105:Ut,107:243,108:244,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt},{22:zt,66:jt,67:Zt,86:Wt,96:257,102:qt,104:[1,258],105:Ut,107:243,108:244,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt},{22:zt,66:jt,67:Zt,86:Wt,96:259,102:qt,104:[1,260],105:Ut,107:243,108:244,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt},{105:[1,261]},{22:zt,66:jt,67:Zt,86:Wt,96:262,102:qt,105:Ut,107:243,108:244,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt},{22:zt,66:jt,67:Zt,86:Wt,96:263,102:qt,105:Ut,107:243,108:244,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt},{26:V,52:H,66:G,67:X,91:K,97:264,105:Q,106:J,109:tt,111:et,112:it,115:100,117:98,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(ut,[2,102]),{84:[1,265]},t(ut,[2,106],{22:[1,266]}),t(ut,[2,107]),t(ut,[2,110]),t(ut,[2,112],{22:[1,267]}),t(ut,[2,113]),t(ht,[2,58]),t(ht,[2,59]),{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,58:[1,268],66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(ht,[2,66]),t(ht,[2,61]),t(ht,[2,62]),t(ht,[2,63]),{66:[1,269]},t(ht,[2,65]),t(ht,[2,67]),{22:ft,24:mt,26:bt,38:xt,42:kt,52:H,66:G,67:X,72:[1,270],73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(ht,[2,69]),t(ht,[2,70]),t(ht,[2,72]),t(ht,[2,71]),t(ht,[2,73]),t(Pt,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:ft,24:mt,26:bt,38:xt,41:[1,271],42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{18:18,19:19,20:o,21:l,22:c,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,272],43:31,44:u,46:p,48:g,50:35,51:45,52:y,54:46,66:f,67:m,86:b,87:x,88:k,89:_,90:C,91:T,95:E,105:v,106:S,109:A,111:w,112:B,116:47,118:L,119:I,120:D,121:O,122:F,123:N,124:$,125:R,126:M,127:P},t(ct,[2,56]),t(ut,[2,115],{106:Qt}),t(Jt,[2,125],{108:274,22:zt,66:jt,67:Zt,86:Wt,102:qt,105:Ut,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt}),t(te,[2,127]),t(te,[2,129]),t(te,[2,130]),t(te,[2,131]),t(te,[2,132]),t(te,[2,133]),t(te,[2,134]),t(te,[2,135]),t(te,[2,136]),t(te,[2,137]),t(te,[2,138]),t(te,[2,139]),t(ut,[2,116],{106:Qt}),t(ut,[2,117],{106:Qt}),{22:[1,275]},t(ut,[2,118],{106:Qt}),{22:[1,276]},t(Yt,[2,124]),t(ut,[2,98],{106:Qt}),t(ut,[2,99],{106:Qt}),t(ut,[2,100],{115:100,117:178,26:V,52:H,66:G,67:X,91:K,105:Q,106:J,109:tt,111:et,112:it,122:rt,123:nt,124:st,125:at,126:ot,127:lt}),t(ut,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:Z,21:W,23:q},t(j,[2,42]),{22:zt,66:jt,67:Zt,86:Wt,102:qt,105:Ut,107:283,108:244,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt},t(te,[2,128]),{26:V,52:H,66:G,67:X,91:K,97:284,105:Q,106:J,109:tt,111:et,112:it,115:100,117:98,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{26:V,52:H,66:G,67:X,91:K,97:285,105:Q,106:J,109:tt,111:et,112:it,115:100,117:98,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(ut,[2,108]),t(ut,[2,114]),t(ht,[2,60]),{22:ft,24:mt,26:bt,38:xt,39:286,42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:140,84:Tt,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},t(ht,[2,68]),t(Nt,a,{17:287}),t(Jt,[2,126],{108:274,22:zt,66:jt,67:Zt,86:Wt,102:qt,105:Ut,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt}),t(ut,[2,121],{115:100,117:178,22:[1,288],26:V,52:H,66:G,67:X,91:K,105:Q,106:J,109:tt,111:et,112:it,122:rt,123:nt,124:st,125:at,126:ot,127:lt}),t(ut,[2,122],{115:100,117:178,22:[1,289],26:V,52:H,66:G,67:X,91:K,105:Q,106:J,109:tt,111:et,112:it,122:rt,123:nt,124:st,125:at,126:ot,127:lt}),{22:ft,24:mt,26:bt,38:xt,41:[1,290],42:kt,52:H,66:G,67:X,73:_t,81:Ct,83:201,85:151,86:Et,87:vt,88:St,89:At,90:wt,91:Bt,92:Lt,94:142,95:It,105:Q,106:J,109:Dt,111:et,112:it,113:Ot,114:Ft,115:148,122:rt,123:nt,124:st,125:at,126:ot,127:lt},{18:18,19:19,20:o,21:l,22:c,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,291],43:31,44:u,46:p,48:g,50:35,51:45,52:y,54:46,66:f,67:m,86:b,87:x,88:k,89:_,90:C,91:T,95:E,105:v,106:S,109:A,111:w,112:B,116:47,118:L,119:I,120:D,121:O,122:F,123:N,124:$,125:R,126:M,127:P},{22:zt,66:jt,67:Zt,86:Wt,96:292,102:qt,105:Ut,107:243,108:244,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt},{22:zt,66:jt,67:Zt,86:Wt,96:293,102:qt,105:Ut,107:243,108:244,109:Vt,110:Ht,111:Gt,112:Xt,113:Kt},t(ht,[2,64]),t(j,[2,41]),t(ut,[2,119],{106:Qt}),t(ut,[2,120],{106:Qt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},ie=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 25:return 100;case 26:this.begin("callbackname");break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 31:return 99;case 32:this.begin("click");break;case 34:return 90;case 35:case 36:return t.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:case 40:case 41:case 42:return 101;case 43:return this.popState(),25;case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:case 67:case 68:return 82;case 69:case 70:case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return"SEP";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],inclusive:!0}}};return t}();function re(){this.yy={}}return ee.lexer=ie,re.prototype=ee,ee.Parser=re,new re}();ea.parser=ea;const ia=ea,ra=(t,e)=>{var i;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&null!==t.match(/^\s*graph/)},na=(t,e)=>{var i;return"dagre-wrapper"===(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&null!==t.match(/^\s*graph/)||null!==t.match(/^\s*flowchart/)};let sa,aa,oa=0,la=ti(),ca={},ha=[],da={},ua=[],pa={},ga={},ya=0,fa=!0,ma=[];const ba=t=>$.sanitizeText(t,la),xa=function(t){const e=Object.keys(ca);for(const i of e)if(ca[i].id===t)return ca[i].domId;return t},ka=function(t,e,i,r){const n={start:t,end:e,type:void 0,text:""};void 0!==(r=i.text)&&(n.text=ba(r.trim()),'"'===n.text[0]&&'"'===n.text[n.text.length-1]&&(n.text=n.text.substring(1,n.text.length-1))),void 0!==i&&(n.type=i.type,n.stroke=i.stroke,n.length=i.length),ha.push(n)},_a=function(t,e){t.split(",").forEach((function(t){let i=t;void 0!==ca[i]&&ca[i].classes.push(e),void 0!==pa[i]&&pa[i].classes.push(e)}))},Ca=function(t){let e=(0,s.Ys)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,s.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,s.Ys)(t).select("svg").selectAll("g.node").on("mouseover",(function(){const t=(0,s.Ys)(this);if(null===t.attr("title"))return;const i=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+i.left+(i.right-i.left)/2+"px").style("top",window.scrollY+i.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,s.Ys)(this).classed("hover",!1)}))};ma.push(Ca);const Ta=function(t){for(const[e,i]of ua.entries())if(i.id===t)return e;return-1};let Ea=-1;const va=[],Sa=function(t,e){const i=ua[e].nodes;if(Ea+=1,Ea>2e3)return;if(va[Ea]=e,ua[e].id===t)return{result:!0,count:0};let r=0,n=1;for(;r<i.length;){const e=Ta(i[r]);if(e>=0){const i=Sa(t,e);if(i.result)return{result:!0,count:n+i.count};n+=i.count}r+=1}return{result:!1,count:n}},Aa=(t,e)=>{let i=!1;return t.forEach((t=>{t.nodes.indexOf(e)>=0&&(i=!0)})),i},wa=(t,e)=>{const i=[];return t.nodes.forEach(((r,n)=>{Aa(e,r)||i.push(t.nodes[n])})),{nodes:i}},Ba={parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},defaultConfig:()=>Ue.flowchart,setAccTitle:Pi,getAccTitle:Yi,getAccDescription:ji,setAccDescription:zi,addVertex:function(t,e,i,r,n,s,a={}){let o,l=t;void 0!==l&&0!==l.trim().length&&(void 0===ca[l]&&(ca[l]={id:l,domId:"flowchart-"+l+"-"+oa,styles:[],classes:[]}),oa++,void 0!==e?(la=ti(),o=ba(e.trim()),'"'===o[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),ca[l].text=o):void 0===ca[l].text&&(ca[l].text=t),void 0!==i&&(ca[l].type=i),void 0!==r&&null!==r&&r.forEach((function(t){ca[l].styles.push(t)})),void 0!==n&&null!==n&&n.forEach((function(t){ca[l].classes.push(t)})),void 0!==s&&(ca[l].dir=s),void 0===ca[l].props?ca[l].props=a:void 0!==a&&Object.assign(ca[l].props,a))},lookUpDomId:xa,addLink:function(t,e,i,r){let n,s;for(n=0;n<t.length;n++)for(s=0;s<e.length;s++)ka(t[n],e[s],i,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?ha.defaultInterpolate=e:ha[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?ha.defaultStyle=e:(-1===We.isSubstringInArray("fill",e)&&e.push("fill:none"),ha[t].style=e)}))},addClass:function(t,e){void 0===da[t]&&(da[t]={id:t,styles:[],textStyles:[]}),void 0!==e&&null!==e&&e.forEach((function(e){if(e.match("color")){const i=e.replace("fill","bgFill").replace("color","fill");da[t].textStyles.push(i)}da[t].styles.push(e)}))},setDirection:function(t){sa=t,sa.match(/.*</)&&(sa="RL"),sa.match(/.*\^/)&&(sa="BT"),sa.match(/.*>/)&&(sa="LR"),sa.match(/.*v/)&&(sa="TB")},setClass:_a,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(ga["gen-1"===aa?xa(t):t]=ba(e))}))},getTooltip:function(t){return ga[t]},setClickEvent:function(t,e,i){t.split(",").forEach((function(t){!function(t,e,i){let r=xa(t);if("loose"!==ti().securityLevel)return;if(void 0===e)return;let n=[];if("string"===typeof i){n=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<n.length;t++){let e=n[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),n[t]=e}}0===n.length&&n.push(t),void 0!==ca[t]&&(ca[t].haveCallback=!0,ma.push((function(){const t=document.querySelector(`[id="${r}"]`);null!==t&&t.addEventListener("click",(function(){We.runFunc(e,...n)}),!1)})))}(t,e,i)})),_a(t,"clickable")},setLink:function(t,e,i){t.split(",").forEach((function(t){void 0!==ca[t]&&(ca[t].link=We.formatUrl(e,la),ca[t].linkTarget=i)})),_a(t,"clickable")},bindFunctions:function(t){ma.forEach((function(e){e(t)}))},getDirection:function(){return sa.trim()},getVertices:function(){return ca},getEdges:function(){return ha},getClasses:function(){return da},clear:function(t="gen-1"){ca={},da={},ha=[],ma=[Ca],ua=[],pa={},ya=0,ga=[],fa=!0,aa=t,Mi()},setGen:t=>{aa=t||"gen-1"},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,i){let r=t.trim(),n=i;t===i&&i.match(/\s/)&&(r=void 0);let s=[];const{nodeList:a,dir:o}=function(t){const e={boolean:{},number:{},string:{}},i=[];let r;return{nodeList:t.filter((function(t){const n=typeof t;return t.stmt&&"dir"===t.stmt?(r=t.value,!1):""!==t.trim()&&(n in e?!e[n].hasOwnProperty(t)&&(e[n][t]=!0):!i.includes(t)&&i.push(t))})),dir:r}}(s.concat.apply(s,e));if(s=a,"gen-1"===aa)for(let c=0;c<s.length;c++)s[c]=xa(s[c]);r=r||"subGraph"+ya,n=n||"",n=ba(n),ya+=1;const l={id:r,nodes:s,title:n.trim(),classes:[],dir:o};return v.info("Adding",l.id,l.nodes,l.dir),l.nodes=wa(l,ua).nodes,ua.push(l),pa[r]=l,r},getDepthFirstPos:function(t){return va[t]},indexNodes:function(){Ea=-1,ua.length>0&&Sa("none",ua.length-1)},getSubGraphs:function(){return ua},destructLink:(t,e)=>{const i=(t=>{const e=t.trim();let i=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,i=i.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,i=i.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,i=i.slice(1))}let n="normal",s=i.length-1;"="===i[0]&&(n="thick");let a=((t,e)=>{const i=e.length;let r=0;for(let n=0;n<i;++n)e[n]===t&&++r;return r})(".",i);return a&&(n="dotted",s=a),{type:r,stroke:n,length:s}})(t);let r;if(e){if(r=(t=>{let e=t.trim(),i="arrow_open";switch(e[0]){case"<":i="arrow_point",e=e.slice(1);break;case"x":i="arrow_cross",e=e.slice(1);break;case"o":i="arrow_circle",e=e.slice(1)}let r="normal";return e.includes("=")&&(r="thick"),e.includes(".")&&(r="dotted"),{type:i,stroke:r}})(e),r.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===r.type)r.type=i.type;else{if(r.type!==i.type)return{type:"INVALID",stroke:"INVALID"};r.type="double_"+r.type}return"double_arrow"===r.type&&(r.type="double_arrow_point"),r.length=i.length,r}return i},lex:{firstGraph:()=>!!fa&&(fa=!1,!0)},exists:Aa,makeUniq:wa,setDiagramTitle:Zi,getDiagramTitle:Wi};const La={},Ia=function(t){const e=Object.keys(t);for(const i of e)La[i]=t[i]},Da={},Oa=function(t,e,i,r,n,s){const a=r.select(`[id="${i}"]`);Object.keys(t).forEach((function(i){const r=t[i];let o="default";r.classes.length>0&&(o=r.classes.join(" "));const l=Le(r.styles);let c,h=void 0!==r.text?r.text:r.id;if(F(ti().flowchart.htmlLabels)){const t={label:h.replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`))};c=(0,k.a)(a,t).node(),c.parentNode.removeChild(c)}else{const t=n.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",l.labelStyle.replace("color:","fill:"));const e=h.split($.lineBreakRegex);for(const i of e){const e=n.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","1"),e.textContent=i,t.appendChild(e)}c=t}let d=0,u="";switch(r.type){case"round":d=5,u="rect";break;case"square":case"group":default:u="rect";break;case"diamond":u="question";break;case"hexagon":u="hexagon";break;case"odd":case"odd_right":u="rect_left_inv_arrow";break;case"lean_right":u="lean_right";break;case"lean_left":u="lean_left";break;case"trapezoid":u="trapezoid";break;case"inv_trapezoid":u="inv_trapezoid";break;case"circle":u="circle";break;case"ellipse":u="ellipse";break;case"stadium":u="stadium";break;case"subroutine":u="subroutine";break;case"cylinder":u="cylinder";break;case"doublecircle":u="doublecircle"}e.setNode(r.id,{labelStyle:l.labelStyle,shape:u,labelText:h,rx:d,ry:d,class:o,style:l.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:s.db.getTooltip(r.id)||"",domId:s.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:"group"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:ti().flowchart.padding}),v.info("setNode",{labelStyle:l.labelStyle,shape:u,labelText:h,rx:d,ry:d,class:o,style:l.style,id:r.id,domId:s.db.lookUpDomId(r.id),width:"group"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:ti().flowchart.padding})}))},Fa=function(t,e,i){v.info("abc78 edges = ",t);let r,n,a=0,o={};if(void 0!==t.defaultStyle){const e=Le(t.defaultStyle);r=e.style,n=e.labelStyle}t.forEach((function(i){a++;var l="L-"+i.start+"-"+i.end;void 0===o[l]?(o[l]=0,v.info("abc78 new entry",l,o[l])):(o[l]++,v.info("abc78 new entry",l,o[l]));let c=l+"-"+o[l];v.info("abc78 new link id to be used is",l,c,o[l]);var h="LS-"+i.start,d="LE-"+i.end;const u={style:"",labelStyle:""};switch(u.minlen=i.length||1,"arrow_open"===i.type?u.arrowhead="none":u.arrowhead="normal",u.arrowTypeStart="arrow_open",u.arrowTypeEnd="arrow_open",i.type){case"double_arrow_cross":u.arrowTypeStart="arrow_cross";case"arrow_cross":u.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":u.arrowTypeStart="arrow_point";case"arrow_point":u.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":u.arrowTypeStart="arrow_circle";case"arrow_circle":u.arrowTypeEnd="arrow_circle"}let p="",g="";switch(i.stroke){case"normal":p="fill:none;",void 0!==r&&(p=r),void 0!==n&&(g=n),u.thickness="normal",u.pattern="solid";break;case"dotted":u.thickness="normal",u.pattern="dotted",u.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":u.thickness="thick",u.pattern="solid",u.style="stroke-width: 3.5px;fill:none;"}if(void 0!==i.style){const t=Le(i.style);p=t.style,g=t.labelStyle}u.style=u.style+=p,u.labelStyle=u.labelStyle+=g,void 0!==i.interpolate?u.curve=we(i.interpolate,s.c_6):void 0!==t.defaultInterpolate?u.curve=we(t.defaultInterpolate,s.c_6):u.curve=we(Da.curve,s.c_6),void 0===i.text?void 0!==i.style&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c"),u.labelType="text",u.label=i.text.replace($.lineBreakRegex,"\n"),void 0===i.style&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),u.labelStyle=u.labelStyle.replace("color:","fill:"),u.id=c,u.classes="flowchart-link "+h+" "+d,e.setEdge(i.start,i.end,u,a)}))},Na={setConf:function(t){const e=Object.keys(t);for(const i of e)Da[i]=t[i]},addVertices:Oa,addEdges:Fa,getClasses:function(t,e){v.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(i){return}},draw:function(t,e,i,r){v.info("Drawing flowchart"),r.db.clear(),Ba.setGen("gen-2"),r.parser.parse(t);let n=r.db.getDirection();void 0===n&&(n="TD");const{securityLevel:a,flowchart:o}=ti(),l=o.nodeSpacing||50,c=o.rankSpacing||50;let h;"sandbox"===a&&(h=(0,s.Ys)("#i"+e));const d="sandbox"===a?(0,s.Ys)(h.nodes()[0].contentDocument.body):(0,s.Ys)("body"),u="sandbox"===a?h.nodes()[0].contentDocument:document,p=new m.k({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:l,ranksep:c,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let g;const y=r.db.getSubGraphs();v.info("Subgraphs - ",y);for(let s=y.length-1;s>=0;s--)g=y[s],v.info("Subgraph - ",g),r.db.addVertex(g.id,g.title,"group",void 0,g.classes,g.dir);const f=r.db.getVertices(),b=r.db.getEdges();v.info(b);let x=0;for(x=y.length-1;x>=0;x--){g=y[x],(0,s.td_)("cluster").append("text");for(let t=0;t<g.nodes.length;t++)v.info("Setting up subgraphs",g.nodes[t],g.id),p.setParent(g.nodes[t],g.id)}Oa(f,p,e,d,u,r),Fa(b,p);const k=d.select(`[id="${e}"]`),_=d.select("#"+e+" g");if(Ds(_,p,["point","circle","cross"],"flowchart",e),We.insertTitle(k,"flowchartTitleText",o.titleTopMargin,r.db.getDiagramTitle()),li(p,k,o.diagramPadding,o.useMaxWidth),r.db.indexNodes("subGraph"+x),!o.htmlLabels){const t=u.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const e of t){const t=e.getBBox(),i=u.createElementNS("http://www.w3.org/2000/svg","rect");i.setAttribute("rx",0),i.setAttribute("ry",0),i.setAttribute("width",t.width),i.setAttribute("height",t.height),e.insertBefore(i,e.firstChild)}}Object.keys(f).forEach((function(t){const i=f[t];if(i.link){const r=(0,s.Ys)("#"+e+' [id="'+t+'"]');if(r){const t=u.createElementNS("http://www.w3.org/2000/svg","a");t.setAttributeNS("http://www.w3.org/2000/svg","class",i.classes.join(" ")),t.setAttributeNS("http://www.w3.org/2000/svg","href",i.link),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===a?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):i.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",i.linkTarget);const e=r.insert((function(){return t}),":first-child"),n=r.select(".label-container");n&&e.append((function(){return n.node()}));const s=r.select(".label");s&&e.append((function(){return s.node()}))}}}))}};var $a=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,3],i=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],n=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],c=[1,20],h=[1,21],d=[1,22],u=[1,23],p=[1,24],g=[1,25],y=[1,26],f=[1,27],m=[1,29],b=[1,31],x=[1,34],k=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],_={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,tickInterval:16,excludes:17,includes:18,todayMarker:19,title:20,acc_title:21,acc_title_value:22,acc_descr:23,acc_descr_value:24,acc_descr_multiline_value:25,section:26,clickStatement:27,taskTxt:28,taskData:29,openDirective:30,typeDirective:31,closeDirective:32,":":33,argDirective:34,click:35,callbackname:36,callbackargs:37,href:38,clickStatementDebug:39,open_directive:40,type_directive:41,arg_directive:42,close_directive:43,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"tickInterval",17:"excludes",18:"includes",19:"todayMarker",20:"title",21:"acc_title",22:"acc_title_value",23:"acc_descr",24:"acc_descr_value",25:"acc_descr_multiline_value",26:"section",28:"taskTxt",29:"taskData",33:":",35:"click",36:"callbackname",37:"callbackargs",38:"href",40:"open_directive",41:"type_directive",42:"arg_directive",43:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[27,2],[27,3],[27,3],[27,4],[27,3],[27,4],[27,2],[39,2],[39,3],[39,3],[39,4],[39,3],[39,4],[39,2],[30,1],[31,1],[34,1],[32,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 2:return s[o-1];case 3:case 7:case 8:this.$=[];break;case 4:s[o-1].push(s[o]),this.$=s[o-1];break;case 5:case 6:this.$=s[o];break;case 9:r.setDateFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=s[o].substr(18);break;case 11:r.TopAxis(),this.$=s[o].substr(8);break;case 12:r.setAxisFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 13:r.setTickInterval(s[o].substr(13)),this.$=s[o].substr(13);break;case 14:r.setExcludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 15:r.setIncludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 16:r.setTodayMarker(s[o].substr(12)),this.$=s[o].substr(12);break;case 17:r.setDiagramTitle(s[o].substr(6)),this.$=s[o].substr(6);break;case 18:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 19:case 20:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 21:r.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 23:r.addTask(s[o-1],s[o]),this.$="task";break;case 27:this.$=s[o-1],r.setClickEvent(s[o-1],s[o],null);break;case 28:this.$=s[o-2],r.setClickEvent(s[o-2],s[o-1],s[o]);break;case 29:this.$=s[o-2],r.setClickEvent(s[o-2],s[o-1],null),r.setLink(s[o-2],s[o]);break;case 30:this.$=s[o-3],r.setClickEvent(s[o-3],s[o-2],s[o-1]),r.setLink(s[o-3],s[o]);break;case 31:this.$=s[o-2],r.setClickEvent(s[o-2],s[o],null),r.setLink(s[o-2],s[o-1]);break;case 32:this.$=s[o-3],r.setClickEvent(s[o-3],s[o-1],s[o]),r.setLink(s[o-3],s[o-2]);break;case 33:this.$=s[o-1],r.setLink(s[o-1],s[o]);break;case 34:case 40:this.$=s[o-1]+" "+s[o];break;case 35:case 36:case 38:this.$=s[o-2]+" "+s[o-1]+" "+s[o];break;case 37:case 39:this.$=s[o-3]+" "+s[o-2]+" "+s[o-1]+" "+s[o];break;case 41:r.parseDirective("%%{","open_directive");break;case 42:r.parseDirective(s[o],"type_directive");break;case 43:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 44:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,30:4,40:i},{1:[3]},{3:6,4:2,5:e,30:4,40:i},t(r,[2,3],{6:7}),{31:8,41:[1,9]},{41:[2,41]},{1:[2,1]},{4:30,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:n,13:s,14:a,15:o,16:l,17:c,18:h,19:d,20:u,21:p,23:g,25:y,26:f,27:28,28:m,30:4,35:b,40:i},{32:32,33:[1,33],43:x},t([33,43],[2,42]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:30,10:35,12:n,13:s,14:a,15:o,16:l,17:c,18:h,19:d,20:u,21:p,23:g,25:y,26:f,27:28,28:m,30:4,35:b,40:i},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),{22:[1,36]},{24:[1,37]},t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),{29:[1,38]},t(r,[2,24]),{36:[1,39],38:[1,40]},{11:[1,41]},{34:42,42:[1,43]},{11:[2,44]},t(r,[2,5]),t(r,[2,18]),t(r,[2,19]),t(r,[2,23]),t(r,[2,27],{37:[1,44],38:[1,45]}),t(r,[2,33],{36:[1,46]}),t(k,[2,25]),{32:47,43:x},{43:[2,43]},t(r,[2,28],{38:[1,48]}),t(r,[2,29]),t(r,[2,31],{37:[1,49]}),{11:[1,50]},t(r,[2,30]),t(r,[2,32]),t(k,[2,26])],defaultActions:{5:[2,41],6:[2,1],34:[2,44],43:[2,43]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},C=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin("href");break;case 21:return 38;case 22:this.begin("callbackname");break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 27:return 37;case 28:this.begin("click");break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};return t}();function T(){this.yy={}}return _.lexer=C,T.prototype=_,_.Parser=T,new T}();$a.parser=$a;const Ra=$a,Ma=t=>null!==t.match(/^\s*gantt/);let Pa,Ya="",za="",ja="",Za=[],Wa=[],qa={},Ua=[],Va=[],Ha="";const Ga=["active","done","crit","milestone"];let Xa=[],Ka=!1,Qa=!1,Ja=0;const to=function(t,e,i,r){return!r.includes(t.format(e.trim()))&&(!!(t.isoWeekday()>=6&&i.includes("weekends"))||(!!i.includes(t.format("dddd").toLowerCase())||i.includes(t.format(e.trim()))))},eo=function(t,e,i,n){if(!i.length||t.manualEndTime)return;let s=r(t.startTime,e,!0);s.add(1,"d");let a=r(t.endTime,e,!0),o=io(s,a,e,i,n);t.endTime=a.toDate(),t.renderEndTime=o},io=function(t,e,i,r,n){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=to(t,i,r,n),s&&e.add(1,"d"),t.add(1,"d");return a},ro=function(t,e,i){i=i.trim();const n=/^after\s+([\d\w- ]+)/.exec(i.trim());if(null!==n){let t=null;if(n[1].split(" ").forEach((function(e){let i=po(e);void 0!==i&&(t?i.endTime>t.endTime&&(t=i):t=i)})),t)return t.endTime;{const t=new Date;return t.setHours(0,0,0,0),t}}let s=r(i,e.trim(),!0);if(s.isValid())return s.toDate();{v.debug("Invalid date:"+i),v.debug("With date format:"+e.trim());const t=new Date(i);if(void 0===t||isNaN(t.getTime()))throw new Error("Invalid date:"+i);return t}},no=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?r.duration(Number.parseFloat(e[1]),e[2]):r.duration.invalid()},so=function(t,e,i,n=!1){i=i.trim();let s=r(i,e.trim(),!0);if(s.isValid())return n&&s.add(1,"d"),s.toDate();const a=r(t),o=no(i);return o.isValid()&&a.add(o),a.toDate()};let ao=0;const oo=function(t){return void 0===t?(ao+=1,"task"+ao):t};let lo,co,ho=[];const uo={},po=function(t){const e=uo[t];return ho[e]},go=function(){const t=function(t){const e=ho[t];let i="";switch(ho[t].raw.startTime.type){case"prevTaskEnd":{const t=po(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":i=ro(0,Ya,ho[t].raw.startTime.startData),i&&(ho[t].startTime=i)}return ho[t].startTime&&(ho[t].endTime=so(ho[t].startTime,Ya,ho[t].raw.endTime.data,Ka),ho[t].endTime&&(ho[t].processed=!0,ho[t].manualEndTime=r(ho[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),eo(ho[t],Ya,Wa,Za))),ho[t].processed};let e=!0;for(const[i,r]of ho.entries())t(i),e=e&&r.processed;return e},yo=function(t,e){t.split(",").forEach((function(t){let i=po(t);void 0!==i&&i.classes.push(e)}))},fo=function(t,e){Xa.push((function(){const i=document.querySelector(`[id="${t}"]`);null!==i&&i.addEventListener("click",(function(){e()}))}),(function(){const i=document.querySelector(`[id="${t}-text"]`);null!==i&&i.addEventListener("click",(function(){e()}))}))},mo={parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},getConfig:()=>ti().gantt,clear:function(){Ua=[],Va=[],Ha="",Xa=[],ao=0,lo=void 0,co=void 0,ho=[],Ya="",za="",Pa=void 0,ja="",Za=[],Wa=[],Ka=!1,Qa=!1,Ja=0,qa={},Mi()},setDateFormat:function(t){Ya=t},getDateFormat:function(){return Ya},enableInclusiveEndDates:function(){Ka=!0},endDatesAreInclusive:function(){return Ka},enableTopAxis:function(){Qa=!0},topAxisEnabled:function(){return Qa},setAxisFormat:function(t){za=t},getAxisFormat:function(){return za},setTickInterval:function(t){Pa=t},getTickInterval:function(){return Pa},setTodayMarker:function(t){ja=t},getTodayMarker:function(){return ja},setAccTitle:Pi,getAccTitle:Yi,setDiagramTitle:Zi,getDiagramTitle:Wi,setAccDescription:zi,getAccDescription:ji,addSection:function(t){Ha=t,Ua.push(t)},getSections:function(){return Ua},getTasks:function(){let t=go();let e=0;for(;!t&&e<10;)t=go(),e++;return Va=ho,Va},addTask:function(t,e){const i={section:Ha,type:Ha,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){let i;i=":"===e.substr(0,1)?e.substr(1,e.length):e;const r=i.split(","),n={};bo(r,n,Ga);for(let s=0;s<r.length;s++)r[s]=r[s].trim();switch(r.length){case 1:n.id=oo(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:r[0]};break;case 2:n.id=oo(),n.startTime={type:"getStartDate",startData:r[0]},n.endTime={data:r[1]};break;case 3:n.id=oo(r[0]),n.startTime={type:"getStartDate",startData:r[1]},n.endTime={data:r[2]}}return n}(co,e);i.raw.startTime=r.startTime,i.raw.endTime=r.endTime,i.id=r.id,i.prevTaskId=co,i.active=r.active,i.done=r.done,i.crit=r.crit,i.milestone=r.milestone,i.order=Ja,Ja++;const n=ho.push(i);co=i.id,uo[i.id]=n-1},findTaskById:po,addTaskOrg:function(t,e){const i={section:Ha,type:Ha,description:t,task:t,classes:[]},n=function(t,e){let i;i=":"===e.substr(0,1)?e.substr(1,e.length):e;const n=i.split(","),s={};bo(n,s,Ga);for(let r=0;r<n.length;r++)n[r]=n[r].trim();let a="";switch(n.length){case 1:s.id=oo(),s.startTime=t.endTime,a=n[0];break;case 2:s.id=oo(),s.startTime=ro(0,Ya,n[0]),a=n[1];break;case 3:s.id=oo(n[0]),s.startTime=ro(0,Ya,n[1]),a=n[2]}return a&&(s.endTime=so(s.startTime,Ya,a,Ka),s.manualEndTime=r(a,"YYYY-MM-DD",!0).isValid(),eo(s,Ya,Wa,Za)),s}(lo,e);i.startTime=n.startTime,i.endTime=n.endTime,i.id=n.id,i.active=n.active,i.done=n.done,i.crit=n.crit,i.milestone=n.milestone,lo=i,Va.push(i)},setIncludes:function(t){Za=t.toLowerCase().split(/[\s,]+/)},getIncludes:function(){return Za},setExcludes:function(t){Wa=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return Wa},setClickEvent:function(t,e,i){t.split(",").forEach((function(t){!function(t,e,i){if("loose"!==ti().securityLevel)return;if(void 0===e)return;let r=[];if("string"===typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(t),void 0!==po(t)&&fo(t,(()=>{We.runFunc(e,...r)}))}(t,e,i)})),yo(t,"clickable")},setLink:function(t,e){let i=e;"loose"!==ti().securityLevel&&(i=(0,n.N)(e)),t.split(",").forEach((function(t){void 0!==po(t)&&(fo(t,(()=>{window.open(i,"_self")})),qa[t]=i)})),yo(t,"clickable")},getLinks:function(){return qa},bindFunctions:function(t){Xa.forEach((function(e){e(t)}))},parseDuration:no,isInvalidDate:to};function bo(t,e,i){let r=!0;for(;r;)r=!1,i.forEach((function(i){const n=new RegExp("^\\s*"+i+"\\s*$");t[0].match(n)&&(e[i]=!0,t.shift(1),r=!0)}))}let xo;const ko={setConf:function(){v.debug("Something is calling, setConf, remove the call")},draw:function(t,e,i,n){const a=ti().gantt,o=ti().securityLevel;let l;"sandbox"===o&&(l=(0,s.Ys)("#i"+e));const c="sandbox"===o?(0,s.Ys)(l.nodes()[0].contentDocument.body):(0,s.Ys)("body"),h="sandbox"===o?l.nodes()[0].contentDocument:document,d=h.getElementById(e);xo=d.parentElement.offsetWidth,void 0===xo&&(xo=1200),void 0!==a.useWidth&&(xo=a.useWidth);const u=n.db.getTasks(),p=u.length*(a.barHeight+a.barGap)+2*a.topPadding;d.setAttribute("viewBox","0 0 "+xo+" "+p);const g=c.select(`[id="${e}"]`),y=(0,s.Xf)().domain([(0,s.VV$)(u,(function(t){return t.startTime})),(0,s.Fp7)(u,(function(t){return t.endTime}))]).rangeRound([0,xo-a.leftPadding-a.rightPadding]);let f=[];for(const r of u)f.push(r.type);const m=f;function b(t,e){return function(t){let e=t.length;const i={};for(;e;)i[t[--e]]=(i[t[e]]||0)+1;return i}(e)[t]||0}f=function(t){const e={},i=[];for(let r=0,n=t.length;r<n;++r)Object.prototype.hasOwnProperty.call(e,t[r])||(e[t[r]]=!0,i.push(t[r]));return i}(f),u.sort((function(t,e){const i=t.startTime,r=e.startTime;let n=0;return i>r?n=1:i<r&&(n=-1),n})),function(t,i,o){const l=a.barHeight,c=l+a.barGap,d=a.topPadding,u=a.leftPadding;(0,s.BYU)().domain([0,f.length]).range(["#00B9FA","#F95002"]).interpolate(s.JHv);(function(t,e,i,s,o,l,c,h){const d=l.reduce(((t,{startTime:e})=>t?Math.min(t,e):e),0),u=l.reduce(((t,{endTime:e})=>t?Math.max(t,e):e),0),p=n.db.getDateFormat();if(!d||!u)return;const f=[];let m=null,b=r(d);for(;b.valueOf()<=u;)n.db.isInvalidDate(b,p,c,h)?m?m.end=b.clone():m={start:b.clone(),end:b.clone()}:m&&(f.push(m),m=null),b.add(1,"d");g.append("g").selectAll("rect").data(f).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return y(t.start)+i})).attr("y",a.gridLineStartPadding).attr("width",(function(t){const e=t.end.clone().add(1,"day");return y(e)-y(t.start)})).attr("height",o-e-a.gridLineStartPadding).attr("transform-origin",(function(e,r){return(y(e.start)+i+.5*(y(e.end)-y(e.start))).toString()+"px "+(r*t+.5*o).toString()+"px"})).attr("class","exclude-range")})(c,d,u,0,o,t,n.db.getExcludes(),n.db.getIncludes()),function(t,e,i,r){let o=(0,s.LLu)(y).tickSize(-r+e+a.gridLineStartPadding).tickFormat((0,s.i$Z)(n.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));const l=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||a.tickInterval);if(null!==l){const t=l[1];switch(l[2]){case"minute":o.ticks(s.Z_i.every(t));break;case"hour":o.ticks(s.WQD.every(t));break;case"day":o.ticks(s.rr1.every(t));break;case"week":o.ticks(s.NGh.every(t));break;case"month":o.ticks(s.F0B.every(t))}}if(g.append("g").attr("class","grid").attr("transform","translate("+t+", "+(r-50)+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||a.topAxis){let i=(0,s.F5q)(y).tickSize(-r+e+a.gridLineStartPadding).tickFormat((0,s.i$Z)(n.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));if(null!==l){const t=l[1];switch(l[2]){case"minute":i.ticks(s.Z_i.every(t));break;case"hour":i.ticks(s.WQD.every(t));break;case"day":i.ticks(s.rr1.every(t));break;case"week":i.ticks(s.NGh.every(t));break;case"month":i.ticks(s.F0B.every(t))}}g.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(i).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(u,d,0,o),function(t,i,r,o,l,c,h){g.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*i+r-2})).attr("width",(function(){return h-a.rightPadding/2})).attr("height",i).attr("class",(function(t){for(const[e,i]of f.entries())if(t.type===i)return"section section"+e%a.numberSectionStyles;return"section section0"}));const d=g.append("g").selectAll("rect").data(t).enter(),u=n.db.getLinks();d.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?y(t.startTime)+o+.5*(y(t.endTime)-y(t.startTime))-.5*l:y(t.startTime)+o})).attr("y",(function(t,e){return t.order*i+r})).attr("width",(function(t){return t.milestone?l:y(t.renderEndTime||t.endTime)-y(t.startTime)})).attr("height",l).attr("transform-origin",(function(t,e){return e=t.order,(y(t.startTime)+o+.5*(y(t.endTime)-y(t.startTime))).toString()+"px "+(e*i+r+.5*l).toString()+"px"})).attr("class",(function(t){const e="task";let i="";t.classes.length>0&&(i=t.classes.join(" "));let r=0;for(const[s,o]of f.entries())t.type===o&&(r=s%a.numberSectionStyles);let n="";return t.active?t.crit?n+=" activeCrit":n=" active":t.done?n=t.crit?" doneCrit":" done":t.crit&&(n+=" crit"),0===n.length&&(n=" task"),t.milestone&&(n=" milestone "+n),n+=r,n+=" "+i,e+n})),d.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",a.fontSize).attr("x",(function(t){let e=y(t.startTime),i=y(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(y(t.endTime)-y(t.startTime))-.5*l),t.milestone&&(i=e+l);const r=this.getBBox().width;return r>i-e?i+r+1.5*a.leftPadding>h?e+o-5:i+o+5:(i-e)/2+e+o})).attr("y",(function(t,e){return t.order*i+a.barHeight/2+(a.fontSize/2-2)+r})).attr("text-height",l).attr("class",(function(t){const e=y(t.startTime);let i=y(t.endTime);t.milestone&&(i=e+l);const r=this.getBBox().width;let n="";t.classes.length>0&&(n=t.classes.join(" "));let s=0;for(const[l,c]of f.entries())t.type===c&&(s=l%a.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+s:"activeText"+s),t.done?o=t.crit?o+" doneCritText"+s:o+" doneText"+s:t.crit&&(o=o+" critText"+s),t.milestone&&(o+=" milestoneText"),r>i-e?i+r+1.5*a.leftPadding>h?n+" taskTextOutsideLeft taskTextOutside"+s+" "+o:n+" taskTextOutsideRight taskTextOutside"+s+" "+o+" width-"+r:n+" taskText taskText"+s+" "+o+" width-"+r}));if("sandbox"===ti().securityLevel){let t;t=(0,s.Ys)("#i"+e);const i=t.nodes()[0].contentDocument;d.filter((function(t){return void 0!==u[t.id]})).each((function(t){var e=i.querySelector("#"+t.id),r=i.querySelector("#"+t.id+"-text");const n=e.parentNode;var s=i.createElement("a");s.setAttribute("xlink:href",u[t.id]),s.setAttribute("target","_top"),n.appendChild(s),s.appendChild(e),s.appendChild(r)}))}}(t,c,d,u,l,0,i),function(t,e){const i=[];let r=0;for(const[n,s]of f.entries())i[n]=[s,b(s,m)];g.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split($.lineBreakRegex),i=-(e.length-1)/2,r=h.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",i+"em");for(const[n,s]of e.entries()){const t=h.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),n>0&&t.setAttribute("dy","1em"),t.textContent=s,r.appendChild(t)}return r})).attr("x",10).attr("y",(function(n,s){if(!(s>0))return n[1]*t/2+e;for(let a=0;a<s;a++)return r+=i[s-1][1],n[1]*t/2+r*t+e})).attr("font-size",a.sectionFontSize).attr("font-size",a.sectionFontSize).attr("class",(function(t){for(const[e,i]of f.entries())if(t[0]===i)return"sectionTitle sectionTitle"+e%a.numberSectionStyles;return"sectionTitle"}))}(c,d),function(t,e,i,r){const s=n.db.getTodayMarker();if("off"===s)return;const o=g.append("g").attr("class","today"),l=new Date,c=o.append("line");c.attr("x1",y(l)+t).attr("x2",y(l)+t).attr("y1",a.titleTopMargin).attr("y2",r-a.titleTopMargin).attr("class","today"),""!==s&&c.attr("style",s.replace(/,/g,";"))}(u,0,0,o)}(u,xo,p),oi(g,p,xo,a.useMaxWidth),g.append("text").text(n.db.getDiagramTitle()).attr("x",xo/2).attr("y",a.titleTopMargin).attr("class","titleText")}};var _o=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[6,9,10],i={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,i,r,n,s,a){switch(s.length,n){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},r=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,r){switch(i){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return t}();function n(){this.yy={}}return i.lexer=r,n.prototype=i,i.Parser=n,new n}();_o.parser=_o;const Co=_o;var To="",Eo=!1;const vo={setMessage:t=>{v.debug("Setting message to: "+t),To=t},getMessage:()=>To,setInfo:t=>{Eo=t},getInfo:()=>Eo,clear:Mi},So={draw:(t,e,i)=>{try{v.debug("Rendering info diagram\n"+t);const r=ti().securityLevel;let n;"sandbox"===r&&(n=(0,s.Ys)("#i"+e));const a=("sandbox"===r?(0,s.Ys)(n.nodes()[0].contentDocument.body):(0,s.Ys)("body")).select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+i),a.attr("height",100),a.attr("width",400)}catch(r){v.error("Error while rendering info diagram"),v.error(r.message)}}},Ao=t=>null!==t.match(/^\s*info/);var wo=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,4],i=[1,5],r=[1,6],n=[1,7],s=[1,9],a=[1,11,13,15,17,19,20,26,27,28,29],o=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],c=[26,27,28],h=[2,8],d=[1,18],u=[1,19],p=[1,20],g=[1,21],y=[1,22],f=[1,23],m=[1,28],b=[6,26,27,28,29],x={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 4:r.setShowData(!0);break;case 7:this.$=s[o-1];break;case 9:r.addSection(s[o-1],r.cleanupValue(s[o]));break;case 10:this.$=s[o].trim(),r.setDiagramTitle(this.$);break;case 11:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 12:case 13:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 14:r.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 21:r.parseDirective("%%{","open_directive");break;case 22:r.parseDirective(s[o],"type_directive");break;case 23:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 24:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,21:8,26:i,27:r,28:n,29:s},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:i,27:r,28:n,29:s},{3:11,4:2,5:3,6:e,21:8,26:i,27:r,28:n,29:s},t(a,o,{7:12,8:[1,13]}),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(c,h,{21:8,9:16,10:17,5:24,1:[2,3],11:d,13:u,15:p,17:g,19:y,20:f,29:s}),t(a,o,{7:25}),{23:26,24:[1,27],32:m},t([24,32],[2,22]),t(a,[2,6]),{4:29,26:i,27:r,28:n},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(c,[2,13]),t(c,[2,14]),t(c,[2,15]),t(c,h,{21:8,9:16,10:17,5:24,1:[2,4],11:d,13:u,15:p,17:g,19:y,20:f,29:s}),t(b,[2,16]),{25:34,31:[1,35]},t(b,[2,24]),t(a,[2,7]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11]),t(c,[2,12]),{23:36,32:m},{32:[2,23]},t(b,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},k=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:case 20:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return t}();function _(){this.yy={}}return x.lexer=k,_.prototype=x,x.Parser=_,new _}();wo.parser=wo;const Bo=wo,Lo=t=>null!==t.match(/^\s*pie/)||null!==t.match(/^\s*bar/);let Io={},Do=!1;const Oo={parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},getConfig:()=>ti().pie,addSection:function(t,e){t=$.sanitizeText(t,ti()),void 0===Io[t]&&(Io[t]=e,v.debug("Added new section :",t))},getSections:()=>Io,cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Io={},Do=!1,Mi()},setAccTitle:Pi,getAccTitle:Yi,setDiagramTitle:Zi,getDiagramTitle:Wi,setShowData:function(t){Do=t},getShowData:function(){return Do},getAccDescription:ji,setAccDescription:zi};let Fo,No=ti();const $o=450,Ro={draw:(t,e,i,r)=>{try{No=ti(),v.debug("Rendering info diagram\n"+t);const i=ti().securityLevel;let f;"sandbox"===i&&(f=(0,s.Ys)("#i"+e));const m="sandbox"===i?(0,s.Ys)(f.nodes()[0].contentDocument.body):(0,s.Ys)("body"),b="sandbox"===i?f.nodes()[0].contentDocument:document;r.db.clear(),r.parser.parse(t),v.debug("Parsed info diagram");const x=b.getElementById(e);Fo=x.parentElement.offsetWidth,void 0===Fo&&(Fo=1200),void 0!==No.useWidth&&(Fo=No.useWidth),void 0!==No.pie.useWidth&&(Fo=No.pie.useWidth);const k=m.select("#"+e);oi(k,$o,Fo,No.pie.useMaxWidth),x.setAttribute("viewBox","0 0 "+Fo+" "+$o);var n=18,a=Math.min(Fo,$o)/2-40,o=k.append("g").attr("transform","translate("+Fo/2+",225)"),l=r.db.getSections(),c=0;Object.keys(l).forEach((function(t){c+=l[t]}));const _=No.themeVariables;var h=[_.pie1,_.pie2,_.pie3,_.pie4,_.pie5,_.pie6,_.pie7,_.pie8,_.pie9,_.pie10,_.pie11,_.pie12],d=(0,s.PKp)().range(h),u=Object.entries(l).map((function(t,e){return{order:e,name:t[0],value:t[1]}})),p=(0,s.ve8)().value((function(t){return t.value})).sort((function(t,e){return t.order-e.order}))(u),g=(0,s.Nb1)().innerRadius(0).outerRadius(a);o.selectAll("mySlices").data(p).enter().append("path").attr("d",g).attr("fill",(function(t){return d(t.data.name)})).attr("class","pieCircle"),o.selectAll("mySlices").data(p).enter().append("text").text((function(t){return(t.data.value/c*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+g.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),o.append("text").text(r.db.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var y=o.selectAll(".legend").data(d.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*d.domain().length/2)+")"}));y.append("rect").attr("width",n).attr("height",n).style("fill",d).style("stroke",d),y.data(p).append("text").attr("x",22).attr("y",14).text((function(t){return r.db.getShowData()||No.showData||No.pie.showData?t.data.name+" ["+t.data.value+"]":t.data.name}))}catch(f){v.error("Error while rendering info diagram"),v.error(f)}}};var Mo=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,3],i=[1,5],r=[1,6],n=[1,7],s=[1,8],a=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],c=[1,26],h=[1,27],d=[1,28],u=[1,29],p=[1,30],g=[1,31],y=[1,24],f=[1,32],m=[1,33],b=[1,36],x=[71,72],k=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],_=[1,56],C=[1,57],T=[1,58],E=[1,59],v=[1,60],S=[1,61],A=[1,62],w=[62,63],B=[1,74],L=[1,70],I=[1,71],D=[1,72],O=[1,73],F=[1,75],N=[1,79],$=[1,80],R=[1,77],M=[1,78],P=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],Y={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 6:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 7:case 8:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 9:r.parseDirective("%%{","open_directive");break;case 10:r.parseDirective(s[o],"type_directive");break;case 11:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 12:r.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:r.addRequirement(s[o-3],s[o-4]);break;case 20:r.setNewReqId(s[o-2]);break;case 21:r.setNewReqText(s[o-2]);break;case 22:r.setNewReqRisk(s[o-2]);break;case 23:r.setNewReqVerifyMethod(s[o-2]);break;case 26:this.$=r.RequirementType.REQUIREMENT;break;case 27:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=r.RiskLevel.LOW_RISK;break;case 33:this.$=r.RiskLevel.MED_RISK;break;case 34:this.$=r.RiskLevel.HIGH_RISK;break;case 35:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=r.VerifyType.VERIFY_TEST;break;case 39:r.addElement(s[o-3]);break;case 40:r.setNewElementType(s[o-2]);break;case 41:r.setNewElementDocRef(s[o-2]);break;case 44:r.addRelationship(s[o-2],s[o],s[o-4]);break;case 45:r.addRelationship(s[o-2],s[o-4],s[o]);break;case 46:this.$=r.Relationships.CONTAINS;break;case 47:this.$=r.Relationships.COPIES;break;case 48:this.$=r.Relationships.DERIVES;break;case 49:this.$=r.Relationships.SATISFIES;break;case 50:this.$=r.Relationships.VERIFIES;break;case 51:this.$=r.Relationships.REFINES;break;case 52:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:i,16:r,18:n,19:s},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:i,16:r,18:n,19:s},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(a,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:i,16:r,18:n,19:s},{1:[2,2]},{4:21,5:o,7:17,8:l,9:4,14:i,16:r,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:c,41:h,42:d,43:u,44:p,45:g,53:y,71:f,72:m},{11:34,12:[1,35],22:b},t([12,22],[2,10]),t(a,[2,6]),t(a,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:o,7:38,8:l,9:4,14:i,16:r,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:c,41:h,42:d,43:u,44:p,45:g,53:y,71:f,72:m},{4:21,5:o,7:39,8:l,9:4,14:i,16:r,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:c,41:h,42:d,43:u,44:p,45:g,53:y,71:f,72:m},{4:21,5:o,7:40,8:l,9:4,14:i,16:r,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:c,41:h,42:d,43:u,44:p,45:g,53:y,71:f,72:m},{4:21,5:o,7:41,8:l,9:4,14:i,16:r,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:c,41:h,42:d,43:u,44:p,45:g,53:y,71:f,72:m},{4:21,5:o,7:42,8:l,9:4,14:i,16:r,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:c,41:h,42:d,43:u,44:p,45:g,53:y,71:f,72:m},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(x,[2,26]),t(x,[2,27]),t(x,[2,28]),t(x,[2,29]),t(x,[2,30]),t(x,[2,31]),t(k,[2,55]),t(k,[2,56]),t(a,[2,4]),{13:51,21:[1,52]},t(a,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:_,65:C,66:T,67:E,68:v,69:S,70:A},{61:63,64:_,65:C,66:T,67:E,68:v,69:S,70:A},{11:64,22:b},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(w,[2,46]),t(w,[2,47]),t(w,[2,48]),t(w,[2,49]),t(w,[2,50]),t(w,[2,51]),t(w,[2,52]),{63:[1,68]},t(a,[2,5]),{5:B,29:69,30:L,33:I,35:D,37:O,39:F},{5:N,39:$,55:76,56:R,58:M},{32:81,71:f,72:m},{32:82,71:f,72:m},t(P,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:B,29:87,30:L,33:I,35:D,37:O,39:F},t(P,[2,25]),t(P,[2,39]),{31:[1,88]},{31:[1,89]},{5:N,39:$,55:90,56:R,58:M},t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),{32:91,71:f,72:m},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(P,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(P,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:B,29:116,30:L,33:I,35:D,37:O,39:F},{5:B,29:117,30:L,33:I,35:D,37:O,39:F},{5:B,29:118,30:L,33:I,35:D,37:O,39:F},{5:B,29:119,30:L,33:I,35:D,37:O,39:F},{5:N,39:$,55:120,56:R,58:M},{5:N,39:$,55:121,56:R,58:M},t(P,[2,20]),t(P,[2,21]),t(P,[2,22]),t(P,[2,23]),t(P,[2,40]),t(P,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},z=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 53:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 54:return"qString";case 55:return e.yytext=e.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return t}();function j(){this.yy={}}return Y.lexer=z,j.prototype=Y,Y.Parser=j,new j}();Mo.parser=Mo;const Po=Mo,Yo=t=>null!==t.match(/^\s*requirement(Diagram)?/);let zo=[],jo={},Zo={},Wo={},qo={};const Uo={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},getConfig:()=>ti().req,addRequirement:(t,e)=>(void 0===Zo[t]&&(Zo[t]={name:t,type:e,id:jo.id,text:jo.text,risk:jo.risk,verifyMethod:jo.verifyMethod}),jo={},Zo[t]),getRequirements:()=>Zo,setNewReqId:t=>{void 0!==jo&&(jo.id=t)},setNewReqText:t=>{void 0!==jo&&(jo.text=t)},setNewReqRisk:t=>{void 0!==jo&&(jo.risk=t)},setNewReqVerifyMethod:t=>{void 0!==jo&&(jo.verifyMethod=t)},setAccTitle:Pi,getAccTitle:Yi,setAccDescription:zi,getAccDescription:ji,addElement:t=>(void 0===qo[t]&&(qo[t]={name:t,type:Wo.type,docRef:Wo.docRef},v.info("Added new requirement: ",t)),Wo={},qo[t]),getElements:()=>qo,setNewElementType:t=>{void 0!==Wo&&(Wo.type=t)},setNewElementDocRef:t=>{void 0!==Wo&&(Wo.docRef=t)},addRelationship:(t,e,i)=>{zo.push({type:t,src:e,dst:i})},getRelationships:()=>zo,clear:()=>{zo=[],jo={},Zo={},Wo={},qo={},Mi()}},Vo={CONTAINS:"contains",ARROW:"arrow"},Ho=Vo,Go=(t,e)=>{let i=t.append("defs").append("marker").attr("id",Vo.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Vo.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)};let Xo={},Ko=0;const Qo=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Xo.rect_min_width+"px").attr("height",Xo.rect_min_height+"px"),Jo=(t,e,i)=>{let r=Xo.rect_min_width/2,n=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",Xo.rect_padding).attr("dominant-baseline","hanging"),s=0;i.forEach((t=>{0==s?n.append("tspan").attr("text-anchor","middle").attr("x",Xo.rect_min_width/2).attr("dy",0).text(t):n.append("tspan").attr("text-anchor","middle").attr("x",Xo.rect_min_width/2).attr("dy",.75*Xo.line_height).text(t),s++}));let a=1.5*Xo.rect_padding+s*Xo.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Xo.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:n,y:a}},tl=(t,e,i,r)=>{let n=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Xo.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),s=0;let a=[];return i.forEach((t=>{let e=t.length;for(;e>30&&s<3;){let i=t.substring(0,30);e=(t=t.substring(30,t.length)).length,a[a.length]=i,s++}if(3==s){let t=a[a.length-1];a[a.length-1]=t.substring(0,t.length-4)+"..."}else a[a.length]=t;s=0})),a.forEach((t=>{n.append("tspan").attr("x",Xo.rect_padding).attr("dy",Xo.line_height).text(t)})),n},el=function(t,e,i,r,n){const a=i.edge(il(e.src),il(e.dst)),o=(0,s.jvg)().x((function(t){return t.x})).y((function(t){return t.y})),l=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",o(a.points)).attr("fill","none");e.type==n.db.Relationships.CONTAINS?l.attr("marker-start","url("+$.getUrl(Xo.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(l.attr("stroke-dasharray","10,7"),l.attr("marker-end","url("+$.getUrl(Xo.arrowMarkerAbsolute)+"#"+Ho.ARROW+"_line_ending)")),((t,e,i,r)=>{const n=e.node().getTotalLength(),s=e.node().getPointAtLength(.5*n),a="rel"+Ko;Ko++;const o=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-o.width/2).attr("y",s.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")})(t,l,0,`<<${e.type}>>`)},il=t=>t.replace(/\s/g,"").replace(/\./g,"_"),rl={draw:(t,e,i,r)=>{Xo=ti().requirement,r.db.clear(),r.parser.parse(t);const n=Xo.securityLevel;let a;"sandbox"===n&&(a=(0,s.Ys)("#i"+e));const o=("sandbox"===n?(0,s.Ys)(a.nodes()[0].contentDocument.body):(0,s.Ys)("body")).select(`[id='${e}']`);Go(o,Xo);const l=new m.k({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Xo.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let c=r.db.getRequirements(),h=r.db.getElements(),d=r.db.getRelationships();var u,p,g;u=c,p=l,g=o,Object.keys(u).forEach((t=>{let e=u[t];t=il(t),v.info("Added new requirement: ",t);const i=g.append("g").attr("id",t),r=Qo(i,"req-"+t);let n=Jo(i,t+"_title",[`<<${e.type}>>`,`${e.name}`]);tl(i,t+"_body",[`Id: ${e.id}`,`Text: ${e.text}`,`Risk: ${e.risk}`,`Verification: ${e.verifyMethod}`],n.y);const s=r.node().getBBox();p.setNode(t,{width:s.width,height:s.height,shape:"rect",id:t})})),((t,e,i)=>{Object.keys(t).forEach((r=>{let n=t[r];const s=il(r),a=i.append("g").attr("id",s),o="element-"+s,l=Qo(a,o);let c=Jo(a,o+"_title",["<<Element>>",`${r}`]);tl(a,o+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],c.y);const h=l.node().getBBox();e.setNode(s,{width:h.width,height:h.height,shape:"rect",id:s})}))})(h,l,o),((t,e)=>{t.forEach((function(t){let i=il(t.src),r=il(t.dst);e.setEdge(i,r,{relationship:t})}))})(d,l),(0,f.bK)(l),function(t,e){e.nodes().forEach((function(i){void 0!==i&&void 0!==e.node(i)&&(t.select("#"+i),t.select("#"+i).attr("transform","translate("+(e.node(i).x-e.node(i).width/2)+","+(e.node(i).y-e.node(i).height/2)+" )"))}))}(o,l),d.forEach((function(t){el(o,t,l,e,r)}));const y=Xo.rect_padding,b=o.node().getBBox(),x=b.width+2*y,k=b.height+2*y;oi(o,k,x,Xo.useMaxWidth),o.attr("viewBox",`${b.x-y} ${b.y-y} ${x} ${k}`)}};var nl=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,2],i=[1,3],r=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,18],c=[1,19],h=[1,21],d=[1,22],u=[1,23],p=[1,29],g=[1,30],y=[1,31],f=[1,32],m=[1,33],b=[1,34],x=[1,35],k=[1,36],_=[1,37],C=[1,38],T=[1,39],E=[1,40],v=[1,43],S=[1,44],A=[1,45],w=[1,46],B=[1,47],L=[1,48],I=[1,51],D=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],O=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],F=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],N=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],$=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],R=[67,68,69],M=[1,121],P=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],Y={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,break:49,option:50,and:51,else:52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,",":63,left_of:64,right_of:65,signaltype:66,"+":67,"-":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"critical",49:"break",50:"option",51:"and",52:"else",53:"note",56:"over",58:"links",59:"link",60:"properties",61:"details",63:",",64:"left_of",65:"right_of",67:"+",68:"-",69:"ACTOR",70:"SOLID_OPEN_ARROW",71:"DOTTED_OPEN_ARROW",72:"SOLID_ARROW",73:"DOTTED_ARROW",74:"SOLID_CROSS",75:"DOTTED_CROSS",76:"SOLID_POINT",77:"DOTTED_POINT",78:"TXT",79:"open_directive",80:"type_directive",81:"arg_directive",82:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 4:return r.apply(s[o]),s[o];case 5:case 9:this.$=[];break;case 6:s[o-1].push(s[o]),this.$=s[o-1];break;case 7:case 8:case 56:this.$=s[o];break;case 12:s[o-3].type="addParticipant",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 13:s[o-1].type="addParticipant",this.$=s[o-1];break;case 14:s[o-3].type="addActor",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 15:s[o-1].type="addActor",this.$=s[o-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-2]),sequenceIndexStep:Number(s[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1]};break;case 22:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-1]};break;case 28:r.setDiagramTitle(s[o].substring(6)),this.$=s[o].substring(6);break;case 29:r.setDiagramTitle(s[o].substring(7)),this.$=s[o].substring(7);break;case 30:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 31:case 32:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 33:s[o-1].unshift({type:"loopStart",loopText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.LOOP_START}),s[o-1].push({type:"loopEnd",loopText:s[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=s[o-1];break;case 34:s[o-1].unshift({type:"rectStart",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_START}),s[o-1].push({type:"rectEnd",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=s[o-1];break;case 35:s[o-1].unshift({type:"optStart",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_START}),s[o-1].push({type:"optEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=s[o-1];break;case 36:s[o-1].unshift({type:"altStart",altText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.ALT_START}),s[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=s[o-1];break;case 37:s[o-1].unshift({type:"parStart",parText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.PAR_START}),s[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=s[o-1];break;case 38:s[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.CRITICAL_START}),s[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=s[o-1];break;case 39:s[o-1].unshift({type:"breakStart",breakText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_START}),s[o-1].push({type:"breakEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=s[o-1];break;case 42:this.$=s[o-3].concat([{type:"option",optionText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},s[o]]);break;case 44:this.$=s[o-3].concat([{type:"and",parText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.PAR_AND},s[o]]);break;case 46:this.$=s[o-3].concat([{type:"else",altText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.ALT_ELSE},s[o]]);break;case 47:this.$=[s[o-1],{type:"addNote",placement:s[o-2],actor:s[o-1].actor,text:s[o]}];break;case 48:s[o-2]=[].concat(s[o-1],s[o-1]).slice(0,2),s[o-2][0]=s[o-2][0].actor,s[o-2][1]=s[o-2][1].actor,this.$=[s[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:s[o-2].slice(0,2),text:s[o]}];break;case 49:this.$=[s[o-1],{type:"addLinks",actor:s[o-1].actor,text:s[o]}];break;case 50:this.$=[s[o-1],{type:"addALink",actor:s[o-1].actor,text:s[o]}];break;case 51:this.$=[s[o-1],{type:"addProperties",actor:s[o-1].actor,text:s[o]}];break;case 52:this.$=[s[o-1],{type:"addDetails",actor:s[o-1].actor,text:s[o]}];break;case 55:this.$=[s[o-2],s[o]];break;case 57:this.$=r.PLACEMENT.LEFTOF;break;case 58:this.$=r.PLACEMENT.RIGHTOF;break;case 59:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1]}];break;case 60:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-4]}];break;case 61:this.$=[s[o-3],s[o-1],{type:"addMessage",from:s[o-3].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o]}];break;case 62:this.$={type:"addParticipant",actor:s[o]};break;case 63:this.$=r.LINETYPE.SOLID_OPEN;break;case 64:this.$=r.LINETYPE.DOTTED_OPEN;break;case 65:this.$=r.LINETYPE.SOLID;break;case 66:this.$=r.LINETYPE.DOTTED;break;case 67:this.$=r.LINETYPE.SOLID_CROSS;break;case 68:this.$=r.LINETYPE.DOTTED_CROSS;break;case 69:this.$=r.LINETYPE.SOLID_POINT;break;case 70:this.$=r.LINETYPE.DOTTED_POINT;break;case 71:this.$=r.parseMessage(s[o].trim().substring(1));break;case 72:r.parseDirective("%%{","open_directive");break;case 73:r.parseDirective(s[o],"type_directive");break;case 74:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 75:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:i,6:4,7:r,11:6,79:n},{1:[3]},{3:8,4:e,5:i,6:4,7:r,11:6,79:n},{3:9,4:e,5:i,6:4,7:r,11:6,79:n},{3:10,4:e,5:i,6:4,7:r,11:6,79:n},t([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],s,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:c,21:20,22:h,25:d,26:u,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:f,38:m,39:b,41:x,42:k,43:_,45:C,47:T,49:E,53:v,58:S,59:A,60:w,61:B,69:L,79:n},{13:49,14:[1,50],82:I},t([14,82],[2,73]),t(D,[2,6]),{6:41,10:52,11:6,16:l,17:42,20:c,21:20,22:h,25:d,26:u,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:f,38:m,39:b,41:x,42:k,43:_,45:C,47:T,49:E,53:v,58:S,59:A,60:w,61:B,69:L,79:n},t(D,[2,8]),t(D,[2,9]),{17:53,69:L},{17:54,69:L},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:L},{17:60,69:L},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},t(D,[2,28]),t(D,[2,29]),{35:[1,66]},{37:[1,67]},t(D,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},t(D,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:L},{17:89,69:L},{17:90,69:L},{17:91,69:L},t([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},t(D,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},t(D,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},t(D,[2,20]),{5:[1,102]},{5:[1,103]},t(D,[2,23]),t(D,[2,24]),t(D,[2,25]),t(D,[2,26]),t(D,[2,27]),t(D,[2,30]),t(D,[2,31]),t(O,s,{8:104}),t(O,s,{8:105}),t(O,s,{8:106}),t(F,s,{44:107,8:108}),t(N,s,{46:109,8:110}),t($,s,{48:111,8:112}),t(O,s,{8:113}),{17:116,67:[1,114],68:[1,115],69:L},t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{17:117,69:L},{17:119,57:118,69:L},{69:[2,57]},{69:[2,58]},{55:120,78:M},{55:122,78:M},{55:123,78:M},{55:124,78:M},t(P,[2,10]),{13:125,82:I},{82:[2,74]},{19:[1,126]},t(D,[2,13]),{19:[1,127]},t(D,[2,15]),{5:[1,128]},t(D,[2,18]),t(D,[2,19]),t(D,[2,21]),t(D,[2,22]),{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:c,21:20,22:h,25:d,26:u,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:f,38:m,39:b,40:[1,129],41:x,42:k,43:_,45:C,47:T,49:E,53:v,58:S,59:A,60:w,61:B,69:L,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:c,21:20,22:h,25:d,26:u,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:f,38:m,39:b,40:[1,130],41:x,42:k,43:_,45:C,47:T,49:E,53:v,58:S,59:A,60:w,61:B,69:L,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:c,21:20,22:h,25:d,26:u,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:f,38:m,39:b,40:[1,131],41:x,42:k,43:_,45:C,47:T,49:E,53:v,58:S,59:A,60:w,61:B,69:L,79:n},{40:[1,132]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:c,21:20,22:h,25:d,26:u,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:f,38:m,39:b,40:[2,45],41:x,42:k,43:_,45:C,47:T,49:E,52:[1,133],53:v,58:S,59:A,60:w,61:B,69:L,79:n},{40:[1,134]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:c,21:20,22:h,25:d,26:u,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:f,38:m,39:b,40:[2,43],41:x,42:k,43:_,45:C,47:T,49:E,51:[1,135],53:v,58:S,59:A,60:w,61:B,69:L,79:n},{40:[1,136]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:c,21:20,22:h,25:d,26:u,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:f,38:m,39:b,40:[2,41],41:x,42:k,43:_,45:C,47:T,49:E,50:[1,137],53:v,58:S,59:A,60:w,61:B,69:L,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:c,21:20,22:h,25:d,26:u,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:f,38:m,39:b,40:[1,138],41:x,42:k,43:_,45:C,47:T,49:E,53:v,58:S,59:A,60:w,61:B,69:L,79:n},{17:139,69:L},{17:140,69:L},{55:141,78:M},{55:142,78:M},{55:143,78:M},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},t(D,[2,17]),t(D,[2,33]),t(D,[2,34]),t(D,[2,35]),t(D,[2,36]),{19:[1,148]},t(D,[2,37]),{19:[1,149]},t(D,[2,38]),{19:[1,150]},t(D,[2,39]),{55:151,78:M},{55:152,78:M},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:L},t(P,[2,11]),t(D,[2,12]),t(D,[2,14]),t(F,s,{8:108,44:154}),t(N,s,{8:110,46:155}),t($,s,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},z=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:case 52:case 65:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 53:return e.yytext=e.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 66:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}};return t}();function j(){this.yy={}}return Y.lexer=z,j.prototype=Y,Y.Parser=j,new j}();nl.parser=nl;const sl=nl,al=t=>null!==t.match(/^\s*sequenceDiagram/);let ol,ll,cl={},hl=[],dl=!1;const ul=function(t,e,i,r){const n=cl[t];n&&e===n.name&&null==i||(null!=i&&null!=i.text||(i={text:e,wrap:null,type:r}),null!=r&&null!=i.text||(i={text:e,wrap:null,type:r}),cl[t]={name:e,description:i.text,wrap:void 0===i.wrap&&yl()||!!i.wrap,prevActor:ol,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},ol&&cl[ol]&&(cl[ol].nextActor=t),ol=t)},pl=function(t,e,i={text:void 0,wrap:void 0},r){if(r===fl.ACTIVE_END){const e=(t=>{let e,i=0;for(e=0;e<hl.length;e++)hl[e].type===fl.ACTIVE_START&&hl[e].from.actor===t&&i++,hl[e].type===fl.ACTIVE_END&&hl[e].from.actor===t&&i--;return i})(t.actor);if(e<1){let e=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return hl.push({from:t,to:e,message:i.text,wrap:void 0===i.wrap&&yl()||!!i.wrap,type:r}),!0},gl=function(t){return cl[t]},yl=()=>void 0!==ll?ll:ti().sequence.wrap,fl={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},ml=function(t,e,i){i.text,void 0===i.wrap&&yl()||i.wrap;const r=[].concat(t,t);hl.push({from:r[0],to:r[1],message:i.text,wrap:void 0===i.wrap&&yl()||!!i.wrap,type:fl.NOTE,placement:e})},bl=function(t,e){const i=gl(t);try{let t=L(e.text,ti());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"=");xl(i,JSON.parse(t))}catch(r){v.error("error while parsing actor link text",r)}};function xl(t,e){if(null==t.links)t.links=e;else for(let i in e)t.links[i]=e[i]}const kl=function(t,e){const i=gl(t);try{let t=L(e.text,ti());_l(i,JSON.parse(t))}catch(r){v.error("error while parsing actor properties text",r)}};function _l(t,e){if(null==t.properties)t.properties=e;else for(let i in e)t.properties[i]=e[i]}const Cl=function(t,e){const i=gl(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&_l(i,e.properties),e.links&&xl(i,e.links)}catch(n){v.error("error while parsing actor details text",n)}},Tl=function(t){if(Array.isArray(t))t.forEach((function(t){Tl(t)}));else switch(t.type){case"sequenceIndex":hl.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":ul(t.actor,t.actor,t.description,"participant");break;case"addActor":ul(t.actor,t.actor,t.description,"actor");break;case"activeStart":case"activeEnd":pl(t.actor,void 0,void 0,t.signalType);break;case"addNote":ml(t.actor,t.placement,t.text);break;case"addLinks":bl(t.actor,t.text);break;case"addALink":!function(t,e){const i=gl(t);try{const t={};let a=L(e.text,ti());var r=a.indexOf("@");a=a.replace(/&/g,"&"),a=a.replace(/=/g,"=");var n=a.slice(0,r-1).trim(),s=a.slice(r+1).trim();t[n]=s,xl(i,t)}catch(a){v.error("error while parsing actor link text",a)}}(t.actor,t.text);break;case"addProperties":kl(t.actor,t.text);break;case"addDetails":Cl(t.actor,t.text);break;case"addMessage":pl(t.from,t.to,t.msg,t.signalType);break;case"loopStart":pl(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":pl(void 0,void 0,void 0,t.signalType);break;case"rectStart":pl(void 0,void 0,t.color,t.signalType);break;case"optStart":pl(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":pl(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":Pi(t.text);break;case"parStart":case"and":pl(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":pl(void 0,void 0,t.criticalText,t.signalType);break;case"option":pl(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":pl(void 0,void 0,t.breakText,t.signalType)}},El={addActor:ul,addMessage:function(t,e,i,r){hl.push({from:t,to:e,message:i.text,wrap:void 0===i.wrap&&yl()||!!i.wrap,answer:r})},addSignal:pl,addLinks:bl,addDetails:Cl,addProperties:kl,autoWrap:yl,setWrap:function(t){ll=t},enableSequenceNumbers:function(){dl=!0},disableSequenceNumbers:function(){dl=!1},showSequenceNumbers:()=>dl,getMessages:function(){return hl},getActors:function(){return cl},getActor:gl,getActorKeys:function(){return Object.keys(cl)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:Yi,getDiagramTitle:Wi,setDiagramTitle:Zi,parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},getConfig:()=>ti().sequence,clear:function(){cl={},hl=[],dl=!1,Mi()},parseMessage:function(t){const e=t.trim(),i={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^:?wrap:/)||null===e.match(/^:?nowrap:/)&&void 0};return v.debug("parseMessage:",i),i},LINETYPE:fl,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:ml,setAccTitle:Pi,apply:Tl,setAccDescription:zi,getAccDescription:ji};let vl=[];const Sl=()=>{vl.forEach((t=>{t()})),vl=[]},Al=function(t,e){const i=t.append("rect");return i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),void 0!==e.class&&i.attr("class",e.class),i},wl=(t,e)=>{var i;i=()=>{const i=document.querySelectorAll(t);0!==i.length&&(i[0].addEventListener("mouseover",(function(){Il("actor"+e+"_popup")})),i[0].addEventListener("mouseout",(function(){Dl("actor"+e+"_popup")})))},vl.push(i)},Bl=function(t,e,i,r){const s=t.append("image");s.attr("x",e),s.attr("y",i);var a=(0,n.N)(r);s.attr("xlink:href",a)},Ll=function(t,e,i,r){const s=t.append("use");s.attr("x",e),s.attr("y",i);var a=(0,n.N)(r);s.attr("xlink:href","#"+a)},Il=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},Dl=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},Ol=function(t,e){let i=0,r=0;const n=e.text.split($.lineBreakRegex);let s=[],a=0,o=()=>e.y;if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":o=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":o=()=>Math.round(e.y+(i+r+e.textMargin)/2);break;case"bottom":case"end":o=()=>Math.round(e.y+(i+r+2*e.textMargin)-e.textMargin)}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[l,c]of n.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(a=l*e.fontSize);const n=t.append("text");if(n.attr("x",e.x),n.attr("y",o()),void 0!==e.anchor&&n.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&n.style("font-family",e.fontFamily),void 0!==e.fontSize&&n.style("font-size",e.fontSize),void 0!==e.fontWeight&&n.style("font-weight",e.fontWeight),void 0!==e.fill&&n.attr("fill",e.fill),void 0!==e.class&&n.attr("class",e.class),void 0!==e.dy?n.attr("dy",e.dy):0!==a&&n.attr("dy",a),e.tspan){const t=n.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(c)}else n.text(c);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(n._groups||n)[0][0].getBBox().height,i=r),s.push(n)}return s},Fl=function(t,e){const i=t.append("polygon");var r,n,s,a,o;return i.attr("points",(r=e.x,n=e.y,s=e.width,a=e.height,r+","+n+" "+(r+s)+","+n+" "+(r+s)+","+(n+a-(o=7))+" "+(r+s-1.2*o)+","+(n+a)+" "+r+","+(n+a))),i.attr("class","labelBox"),e.y=e.y+e.height/2,Ol(t,e),i};let Nl=-1;const $l=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},Rl=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},Ml=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Pl=function(){function t(t,e,i,n,s,a,o){r(e.append("text").attr("x",i+s/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,i,n,s,a,o,l){const{actorFontSize:c,actorFontFamily:h,actorFontWeight:d}=l;let u=c&&c.replace?c.replace("px",""):c;const p=t.split($.lineBreakRegex);for(let g=0;g<p.length;g++){const t=g*u-u*(p.length-1)/2,l=e.append("text").attr("x",i+s/2).attr("y",n).style("text-anchor","middle").style("font-size",c).style("font-weight",d).style("font-family",h);l.append("tspan").attr("x",i+s/2).attr("dy",t).text(p[g]),l.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(l,o)}}function i(t,i,n,s,a,o,l,c){const h=i.append("switch"),d=h.append("foreignObject").attr("x",n).attr("y",s).attr("width",a).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,n,s,a,o,l,c),r(d,l)}function r(t,e){for(const i in e)e.hasOwnProperty(i)&&t.attr(i,e[i])}return function(r){return"fo"===r.textPlacement?i:"old"===r.textPlacement?t:e}}(),Yl=function(){function t(t,e,i,n,s,a,o){r(e.append("text").attr("x",i).attr("y",n).style("text-anchor","start").text(t),o)}function e(t,e,i,n,s,a,o,l){const{actorFontSize:c,actorFontFamily:h,actorFontWeight:d}=l,u=t.split($.lineBreakRegex);for(let p=0;p<u.length;p++){const t=p*c-c*(u.length-1)/2,s=e.append("text").attr("x",i).attr("y",n).style("text-anchor","start").style("font-size",c).style("font-weight",d).style("font-family",h);s.append("tspan").attr("x",i).attr("dy",t).text(u[p]),s.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(s,o)}}function i(t,i,n,s,a,o,l,c){const h=i.append("switch"),d=h.append("foreignObject").attr("x",n).attr("y",s).attr("width",a).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,n,s,0,o,l,c),r(d,l)}function r(t,e){for(const i in e)e.hasOwnProperty(i)&&t.attr(i,e[i])}return function(r){return"fo"===r.textPlacement?i:"old"===r.textPlacement?t:e}}(),zl={drawRect:Al,drawText:Ol,drawLabel:Fl,drawActor:function(t,e,i){switch(e.type){case"actor":return function(t,e,i){const r=e.x+e.width/2;0===e.y&&(Nl++,t.append("line").attr("id","actor"+Nl).attr("x1",r).attr("y1",80).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const n=t.append("g");n.attr("class","actor-man");const s=Ml();s.x=e.x,s.y=e.y,s.fill="#eaeaea",s.width=e.width,s.height=e.height,s.class="actor",s.rx=3,s.ry=3,n.append("line").attr("id","actor-man-torso"+Nl).attr("x1",r).attr("y1",e.y+25).attr("x2",r).attr("y2",e.y+45),n.append("line").attr("id","actor-man-arms"+Nl).attr("x1",r-18).attr("y1",e.y+33).attr("x2",r+18).attr("y2",e.y+33),n.append("line").attr("x1",r-18).attr("y1",e.y+60).attr("x2",r).attr("y2",e.y+45),n.append("line").attr("x1",r).attr("y1",e.y+45).attr("x2",r+16).attr("y2",e.y+60);const a=n.append("circle");a.attr("cx",e.x+e.width/2),a.attr("cy",e.y+10),a.attr("r",15),a.attr("width",e.width),a.attr("height",e.height);const o=n.node().getBBox();return e.height=o.height,Pl(i)(e.description,n,s.x,s.y+35,s.width,s.height,{class:"actor"},i),e.height}(t,e,i);case"participant":return function(t,e,i){const r=e.x+e.width/2,n=t.append("g");var s=n;0===e.y&&(Nl++,s.append("line").attr("id","actor"+Nl).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),s=n.append("g"),e.actorCnt=Nl,null!=e.links&&(s.attr("id","root-"+Nl),wl("#root-"+Nl,Nl)));const a=Ml();var o="actor";null!=e.properties&&e.properties.class?o=e.properties.class:a.fill="#eaeaea",a.x=e.x,a.y=e.y,a.width=e.width,a.height=e.height,a.class=o,a.rx=3,a.ry=3;const l=Al(s,a);if(e.rectData=a,null!=e.properties&&e.properties.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?Ll(s,a.x+a.width-20,a.y+10,t.substr(1)):Bl(s,a.x+a.width-20,a.y+10,t)}Pl(i)(e.description,s,a.x,a.y,a.width,a.height,{class:"actor"},i);let c=e.height;if(l.node){const t=l.node().getBBox();e.height=t.height,c=t.height}return c}(t,e,i)}},drawPopup:function(t,e,i,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const a=e.links,o=e.actorCnt,l=e.rectData;var c="none";s&&(c="block !important");const h=t.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",c),wl("#actor"+o+"_popup",o);var d="";void 0!==l.class&&(d=" "+l.class);let u=l.width>i?l.width:i;const p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",u),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),null!=a){var g=20;for(let t in a){var y=h.append("a"),f=(0,n.N)(a[t]);y.attr("xlink:href",f),y.attr("target","_blank"),Yl(r)(t,y,l.x+10,l.height+g,u,20,{class:"actor"},r),g+=30}}return p.attr("height",g),{height:l.height+g,width:u}},drawImage:Bl,drawEmbeddedImage:Ll,anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,i,r,n){const s=Ml(),a=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+n%3,s.width=e.stopx-e.startx,s.height=i-e.starty,Al(a,s)},drawLoop:function(t,e,i,r){const{boxMargin:n,boxTextMargin:s,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=r,d=t.append("g"),u=function(t,e,i,r){return d.append("line").attr("x1",t).attr("y1",e).attr("x2",i).attr("y2",r).attr("class","loopLine")};u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let p=Rl();p.text=i,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=a||20,p.textMargin=s,p.class="labelText",Fl(d,p),p=Rl(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+n+s,p.anchor="middle",p.valign="middle",p.textMargin=s,p.class="loopText",p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=!0;let g=Ol(d,p);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,i){if(t.message){p.text=t.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[i].y+n+s,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=e.wrap,g=Ol(d,p);let r=Math.round(g.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[i].height+=r-(n+s)}})),e.height=Math.round(e.stopy-e.starty),d},drawBackgroundRect:function(t,e){Al(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},insertArrowFilledHead:function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},insertDatabaseIcon:function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},insertComputerIcon:function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},insertClockIcon:function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},getTextObj:Rl,getNoteRect:Ml,popupMenu:function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},popdownMenu:function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},fixLifeLineHeights:$l,sanitizeUrl:n.N};let jl={};const Zl={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Gl(ti())},updateVal:function(t,e,i,r){void 0===t[e]?t[e]=i:t[e]=r(i,t[e])},updateBounds:function(t,e,i,r){const n=this;let s=0;function a(a){return function(o){s++;const l=n.sequenceItems.length-s+1;n.updateVal(o,"starty",e-l*jl.boxMargin,Math.min),n.updateVal(o,"stopy",r+l*jl.boxMargin,Math.max),n.updateVal(Zl.data,"startx",t-l*jl.boxMargin,Math.min),n.updateVal(Zl.data,"stopx",i+l*jl.boxMargin,Math.max),"activation"!==a&&(n.updateVal(o,"startx",t-l*jl.boxMargin,Math.min),n.updateVal(o,"stopx",i+l*jl.boxMargin,Math.max),n.updateVal(Zl.data,"starty",e-l*jl.boxMargin,Math.min),n.updateVal(Zl.data,"stopy",r+l*jl.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,i,r){const n=Math.min(t,i),s=Math.max(t,i),a=Math.min(e,r),o=Math.max(e,r);this.updateVal(Zl.data,"startx",n,Math.min),this.updateVal(Zl.data,"starty",a,Math.min),this.updateVal(Zl.data,"stopx",s,Math.max),this.updateVal(Zl.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},newActivation:function(t,e,i){const r=i[t.from.actor],n=Xl(t.from.actor).length||0,s=r.x+r.width/2+(n-1)*jl.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+jl.activationWidth,stopy:void 0,actor:t.from.actor,anchored:zl.anchorElement(e)})},endActivation:function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Zl.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},Wl=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),ql=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),Ul=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});const Vl=function(t,e,i,r,n,s){if(!0===n.hideUnusedParticipants){const t=new Set;s.forEach((e=>{t.add(e.from),t.add(e.to)})),i=i.filter((e=>t.has(e)))}let a=0,o=0,l=0;for(const c of i){const i=e[c];i.width=i.width||jl.width,i.height=Math.max(i.height||jl.height,jl.height),i.margin=i.margin||jl.actorMargin,i.x=a+o,i.y=r;const n=zl.drawActor(t,i,jl);l=Math.max(l,n),Zl.insert(i.x,r,i.x+i.width,i.height),a+=i.width,o+=i.margin,Zl.models.addActor(i)}Zl.bumpVerticalPos(l)},Hl=function(t,e,i,r){let n=0,s=0;for(const a of i){const i=e[a],o=Jl(i),l=zl.drawPopup(t,i,o,jl,jl.forceMenus,r);l.height>n&&(n=l.height),l.width+i.x>s&&(s=l.width+i.x)}return{maxHeight:n,maxWidth:s}},Gl=function(t){Te(jl,t),t.fontFamily&&(jl.actorFontFamily=jl.noteFontFamily=jl.messageFontFamily=t.fontFamily),t.fontSize&&(jl.actorFontSize=jl.noteFontSize=jl.messageFontSize=t.fontSize),t.fontWeight&&(jl.actorFontWeight=jl.noteFontWeight=jl.messageFontWeight=t.fontWeight)},Xl=function(t){return Zl.activations.filter((function(e){return e.actor===t}))},Kl=function(t,e){const i=e[t],r=Xl(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),i.x+i.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),i.x+i.width/2)]};function Ql(t,e,i,r,n){Zl.bumpVerticalPos(i);let s=r;if(e.id&&e.message&&t[e.id]){const i=t[e.id].width,n=Wl(jl);e.message=We.wrapLabel(`[${e.message}]`,i-2*jl.wrapPadding,n),e.width=i,e.wrap=!0;const a=We.calculateTextDimensions(e.message,n),o=Math.max(a.height,jl.labelBoxHeight);s=r+o,v.debug(`${o} - ${e.message}`)}n(e),Zl.bumpVerticalPos(s)}const Jl=function(t){let e=0;const i=Ul(jl);for(const r in t.links){const t=We.calculateTextDimensions(r,i).width+2*jl.wrapPadding+2*jl.boxMargin;e<t&&(e=t)}return e};const tc=function(t,e,i,r){const n={},s=[];let a,o,l;return t.forEach((function(t){switch(t.id=We.random({length:10}),t.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:s.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:t.message&&(a=s.pop(),n[a.id]=a,n[t.id]=a,s.push(a));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:a=s.pop(),n[a.id]=a;break;case r.db.LINETYPE.ACTIVE_START:{const i=e[t.from?t.from.actor:t.to.actor],r=Xl(t.from?t.from.actor:t.to.actor).length,n=i.x+i.width/2+(r-1)*jl.activationWidth/2,s={startx:n,stopx:n+jl.activationWidth,actor:t.from.actor,enabled:!0};Zl.activations.push(s)}break;case r.db.LINETYPE.ACTIVE_END:{const e=Zl.activations.map((t=>t.actor)).lastIndexOf(t.from.actor);delete Zl.activations.splice(e,1)[0]}}void 0!==t.placement?(o=function(t,e,i){const r=e[t.from].x,n=e[t.to].x,s=t.wrap&&t.message;let a=We.calculateTextDimensions(s?We.wrapLabel(t.message,jl.width,ql(jl)):t.message,ql(jl));const o={width:s?jl.width:Math.max(jl.width,a.width+2*jl.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===i.db.PLACEMENT.RIGHTOF?(o.width=s?Math.max(jl.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*jl.noteMargin),o.startx=r+(e[t.from].width+jl.actorMargin)/2):t.placement===i.db.PLACEMENT.LEFTOF?(o.width=s?Math.max(jl.width,a.width+2*jl.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*jl.noteMargin),o.startx=r-o.width+(e[t.from].width-jl.actorMargin)/2):t.to===t.from?(a=We.calculateTextDimensions(s?We.wrapLabel(t.message,Math.max(jl.width,e[t.from].width),ql(jl)):t.message,ql(jl)),o.width=s?Math.max(jl.width,e[t.from].width):Math.max(e[t.from].width,jl.width,a.width+2*jl.noteMargin),o.startx=r+(e[t.from].width-o.width)/2):(o.width=Math.abs(r+e[t.from].width/2-(n+e[t.to].width/2))+jl.actorMargin,o.startx=r<n?r+e[t.from].width/2-jl.actorMargin/2:n+e[t.to].width/2-jl.actorMargin/2),s&&(o.message=We.wrapLabel(t.message,o.width-2*jl.wrapPadding,ql(jl))),v.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o}(t,e,r),t.noteModel=o,s.forEach((t=>{a=t,a.from=Math.min(a.from,o.startx),a.to=Math.max(a.to,o.startx+o.width),a.width=Math.max(a.width,Math.abs(a.from-a.to))-jl.labelBoxWidth}))):(l=function(t,e,i){let r=!1;if([i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(r=!0),!r)return{};const n=Kl(t.from,e),s=Kl(t.to,e),a=n[0]<=s[0]?1:0,o=n[0]<s[0]?0:1,l=[...n,...s],c=Math.abs(s[o]-n[a]);t.wrap&&t.message&&(t.message=We.wrapLabel(t.message,Math.max(c+2*jl.wrapPadding,jl.width),Wl(jl)));const h=We.calculateTextDimensions(t.message,Wl(jl));return{width:Math.max(t.wrap?0:h.width+2*jl.wrapPadding,c+2*jl.wrapPadding,jl.width),height:0,startx:n[a],stopx:s[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}}(t,e,r),t.msgModel=l,l.startx&&l.stopx&&s.length>0&&s.forEach((i=>{if(a=i,l.startx===l.stopx){const i=e[t.from],r=e[t.to];a.from=Math.min(i.x-l.width/2,i.x-i.width/2,a.from),a.to=Math.max(r.x+l.width/2,r.x+i.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-jl.labelBoxWidth}else a.from=Math.min(l.startx,a.from),a.to=Math.max(l.stopx,a.to),a.width=Math.max(a.width,l.width)-jl.labelBoxWidth})))})),Zl.activations=[],v.debug("Loop type widths:",n),n},ec={bounds:Zl,drawActors:Vl,drawActorsPopup:Hl,setConf:Gl,draw:function(t,e,i,r){const{securityLevel:n,sequence:a}=ti();let o;jl=a,"sandbox"===n&&(o=(0,s.Ys)("#i"+e));const l="sandbox"===n?(0,s.Ys)(o.nodes()[0].contentDocument.body):(0,s.Ys)("body"),c="sandbox"===n?o.nodes()[0].contentDocument:document;Zl.init(),v.debug(r.db);const h="sandbox"===n?l.select(`[id="${e}"]`):(0,s.Ys)(`[id="${e}"]`),d=r.db.getActors(),u=r.db.getActorKeys(),p=r.db.getMessages(),g=r.db.getDiagramTitle(),y=function(t,e,i){const r={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){const n=t[e.to];if(e.placement===i.db.PLACEMENT.LEFTOF&&!n.prevActor)return;if(e.placement===i.db.PLACEMENT.RIGHTOF&&!n.nextActor)return;const s=void 0!==e.placement,a=!s,o=s?ql(jl):Wl(jl),l=e.wrap?We.wrapLabel(e.message,jl.width-2*jl.wrapPadding,o):e.message,c=We.calculateTextDimensions(l,o).width+2*jl.wrapPadding;a&&e.from===n.nextActor?r[e.to]=Math.max(r[e.to]||0,c):a&&e.from===n.prevActor?r[e.from]=Math.max(r[e.from]||0,c):a&&e.from===e.to?(r[e.from]=Math.max(r[e.from]||0,c/2),r[e.to]=Math.max(r[e.to]||0,c/2)):e.placement===i.db.PLACEMENT.RIGHTOF?r[e.from]=Math.max(r[e.from]||0,c):e.placement===i.db.PLACEMENT.LEFTOF?r[n.prevActor]=Math.max(r[n.prevActor]||0,c):e.placement===i.db.PLACEMENT.OVER&&(n.prevActor&&(r[n.prevActor]=Math.max(r[n.prevActor]||0,c/2)),n.nextActor&&(r[e.from]=Math.max(r[e.from]||0,c/2)))}})),v.debug("maxMessageWidthPerActor:",r),r}(d,p,r);jl.height=function(t,e){let i=0;Object.keys(t).forEach((e=>{const r=t[e];r.wrap&&(r.description=We.wrapLabel(r.description,jl.width-2*jl.wrapPadding,Ul(jl)));const n=We.calculateTextDimensions(r.description,Ul(jl));r.width=r.wrap?jl.width:Math.max(jl.width,n.width+2*jl.wrapPadding),r.height=r.wrap?Math.max(n.height,jl.height):jl.height,i=Math.max(i,r.height)}));for(const r in e){const i=t[r];if(!i)continue;const n=t[i.nextActor];if(!n)continue;const s=e[r]+jl.actorMargin-i.width/2-n.width/2;i.margin=Math.max(s,jl.actorMargin)}return Math.max(i,jl.height)}(d,y),zl.insertComputerIcon(h),zl.insertDatabaseIcon(h),zl.insertClockIcon(h),Vl(h,d,u,0,jl,p);const f=tc(p,d,y,r);zl.insertArrowHead(h),zl.insertArrowCrossHead(h),zl.insertArrowFilledHead(h),zl.insertSequenceNumber(h);let m=1,b=1;const x=[];p.forEach((function(t){let e,i,n;switch(t.type){case r.db.LINETYPE.NOTE:i=t.noteModel,function(t,e){Zl.bumpVerticalPos(jl.boxMargin),e.height=jl.boxMargin,e.starty=Zl.getVerticalPos();const i=zl.getNoteRect();i.x=e.startx,i.y=e.starty,i.width=e.width||jl.width,i.class="note";const r=t.append("g"),n=zl.drawRect(r,i),s=zl.getTextObj();s.x=e.startx,s.y=e.starty,s.width=i.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=jl.noteFontFamily,s.fontSize=jl.noteFontSize,s.fontWeight=jl.noteFontWeight,s.anchor=jl.noteAlign,s.textMargin=jl.noteMargin,s.valign="center";const a=Ol(r,s),o=Math.round(a.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));n.attr("height",o+2*jl.noteMargin),e.height+=o+2*jl.noteMargin,Zl.bumpVerticalPos(o+2*jl.noteMargin),e.stopy=e.starty+o+2*jl.noteMargin,e.stopx=e.startx+i.width,Zl.insert(e.startx,e.starty,e.stopx,e.stopy),Zl.models.addNote(e)}(h,i);break;case r.db.LINETYPE.ACTIVE_START:Zl.newActivation(t,h,d);break;case r.db.LINETYPE.ACTIVE_END:!function(t,e){const i=Zl.endActivation(t);i.starty+18>e&&(i.starty=e-6,e+=12),zl.drawActivation(h,i,e,jl,Xl(t.from.actor).length),Zl.insert(i.startx,e-10,i.stopx,e)}(t,Zl.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Ql(f,t,jl.boxMargin,jl.boxMargin+jl.boxTextMargin,(t=>Zl.newLoop(t)));break;case r.db.LINETYPE.LOOP_END:e=Zl.endLoop(),zl.drawLoop(h,e,"loop",jl),Zl.bumpVerticalPos(e.stopy-Zl.getVerticalPos()),Zl.models.addLoop(e);break;case r.db.LINETYPE.RECT_START:Ql(f,t,jl.boxMargin,jl.boxMargin,(t=>Zl.newLoop(void 0,t.message)));break;case r.db.LINETYPE.RECT_END:e=Zl.endLoop(),zl.drawBackgroundRect(h,e),Zl.models.addLoop(e),Zl.bumpVerticalPos(e.stopy-Zl.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Ql(f,t,jl.boxMargin,jl.boxMargin+jl.boxTextMargin,(t=>Zl.newLoop(t)));break;case r.db.LINETYPE.OPT_END:e=Zl.endLoop(),zl.drawLoop(h,e,"opt",jl),Zl.bumpVerticalPos(e.stopy-Zl.getVerticalPos()),Zl.models.addLoop(e);break;case r.db.LINETYPE.ALT_START:Ql(f,t,jl.boxMargin,jl.boxMargin+jl.boxTextMargin,(t=>Zl.newLoop(t)));break;case r.db.LINETYPE.ALT_ELSE:Ql(f,t,jl.boxMargin+jl.boxTextMargin,jl.boxMargin,(t=>Zl.addSectionToLoop(t)));break;case r.db.LINETYPE.ALT_END:e=Zl.endLoop(),zl.drawLoop(h,e,"alt",jl),Zl.bumpVerticalPos(e.stopy-Zl.getVerticalPos()),Zl.models.addLoop(e);break;case r.db.LINETYPE.PAR_START:Ql(f,t,jl.boxMargin,jl.boxMargin+jl.boxTextMargin,(t=>Zl.newLoop(t)));break;case r.db.LINETYPE.PAR_AND:Ql(f,t,jl.boxMargin+jl.boxTextMargin,jl.boxMargin,(t=>Zl.addSectionToLoop(t)));break;case r.db.LINETYPE.PAR_END:e=Zl.endLoop(),zl.drawLoop(h,e,"par",jl),Zl.bumpVerticalPos(e.stopy-Zl.getVerticalPos()),Zl.models.addLoop(e);break;case r.db.LINETYPE.AUTONUMBER:m=t.message.start||m,b=t.message.step||b,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Ql(f,t,jl.boxMargin,jl.boxMargin+jl.boxTextMargin,(t=>Zl.newLoop(t)));break;case r.db.LINETYPE.CRITICAL_OPTION:Ql(f,t,jl.boxMargin+jl.boxTextMargin,jl.boxMargin,(t=>Zl.addSectionToLoop(t)));break;case r.db.LINETYPE.CRITICAL_END:e=Zl.endLoop(),zl.drawLoop(h,e,"critical",jl),Zl.bumpVerticalPos(e.stopy-Zl.getVerticalPos()),Zl.models.addLoop(e);break;case r.db.LINETYPE.BREAK_START:Ql(f,t,jl.boxMargin,jl.boxMargin+jl.boxTextMargin,(t=>Zl.newLoop(t)));break;case r.db.LINETYPE.BREAK_END:e=Zl.endLoop(),zl.drawLoop(h,e,"break",jl),Zl.bumpVerticalPos(e.stopy-Zl.getVerticalPos()),Zl.models.addLoop(e);break;default:try{n=t.msgModel,n.starty=Zl.getVerticalPos(),n.sequenceIndex=m,n.sequenceVisible=r.db.showSequenceNumbers();const e=function(t,e){Zl.bumpVerticalPos(10);const{startx:i,stopx:r,message:n}=e,s=$.splitBreaks(n).length,a=We.calculateTextDimensions(n,Wl(jl)),o=a.height/s;let l;e.height+=o,Zl.bumpVerticalPos(o);let c=a.height-10;const h=a.width;if(i===r){l=Zl.getVerticalPos()+c,jl.rightAngles||(c+=jl.boxMargin,l=Zl.getVerticalPos()+c),c+=30;const t=Math.max(h/2,jl.width/2);Zl.insert(i-t,Zl.getVerticalPos()-10+c,r+t,Zl.getVerticalPos()+30+c)}else c+=jl.boxMargin,l=Zl.getVerticalPos()+c,Zl.insert(i,l-10,r,l);return Zl.bumpVerticalPos(c),e.height+=c,e.stopy=e.starty+e.height,Zl.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}(0,n);x.push({messageModel:n,lineStartY:e}),Zl.models.addMessage(n)}catch(s){v.error("error while drawing message",s)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(m+=b)})),x.forEach((t=>function(t,e,i,r){const{startx:n,stopx:s,starty:a,message:o,type:l,sequenceIndex:c,sequenceVisible:h}=e,d=We.calculateTextDimensions(o,Wl(jl)),u=zl.getTextObj();u.x=n,u.y=a+10,u.width=s-n,u.class="messageText",u.dy="1em",u.text=o,u.fontFamily=jl.messageFontFamily,u.fontSize=jl.messageFontSize,u.fontWeight=jl.messageFontWeight,u.anchor=jl.messageAlign,u.valign="center",u.textMargin=jl.wrapPadding,u.tspan=!1,Ol(t,u);const p=d.width;let g;n===s?g=jl.rightAngles?t.append("path").attr("d",`M ${n},${i} H ${n+Math.max(jl.width/2,p/2)} V ${i+25} H ${n}`):t.append("path").attr("d","M "+n+","+i+" C "+(n+60)+","+(i-10)+" "+(n+60)+","+(i+30)+" "+n+","+(i+20)):(g=t.append("line"),g.attr("x1",n),g.attr("y1",i),g.attr("x2",s),g.attr("y2",i)),l===r.db.LINETYPE.DOTTED||l===r.db.LINETYPE.DOTTED_CROSS||l===r.db.LINETYPE.DOTTED_POINT||l===r.db.LINETYPE.DOTTED_OPEN?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let y="";jl.arrowMarkerAbsolute&&(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,y=y.replace(/\(/g,"\\("),y=y.replace(/\)/g,"\\)")),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),l!==r.db.LINETYPE.SOLID&&l!==r.db.LINETYPE.DOTTED||g.attr("marker-end","url("+y+"#arrowhead)"),l!==r.db.LINETYPE.SOLID_POINT&&l!==r.db.LINETYPE.DOTTED_POINT||g.attr("marker-end","url("+y+"#filled-head)"),l!==r.db.LINETYPE.SOLID_CROSS&&l!==r.db.LINETYPE.DOTTED_CROSS||g.attr("marker-end","url("+y+"#crosshead)"),(h||jl.showSequenceNumbers)&&(g.attr("marker-start","url("+y+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",i+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(c))}(h,t.messageModel,t.lineStartY,r))),jl.mirrorActors&&(Zl.bumpVerticalPos(2*jl.boxMargin),Vl(h,d,u,Zl.getVerticalPos(),jl,p),Zl.bumpVerticalPos(jl.boxMargin),$l(h,Zl.getVerticalPos()));const k=Hl(h,d,u,c),{bounds:_}=Zl.getBounds();v.debug("For line height fix Querying: #"+e+" .actor-line");(0,s.td_)("#"+e+" .actor-line").attr("y2",_.stopy);let C=_.stopy-_.starty;C<k.maxHeight&&(C=k.maxHeight);let T=C+2*jl.diagramMarginY;jl.mirrorActors&&(T=T-jl.boxMargin+jl.bottomMarginAdj);let E=_.stopx-_.startx;E<k.maxWidth&&(E=k.maxWidth);const S=E+2*jl.diagramMarginX;g&&h.append("text").text(g).attr("x",(_.stopx-_.startx)/2-2*jl.diagramMarginX).attr("y",-25),oi(h,T,S,jl.useMaxWidth);const A=g?40:0;h.attr("viewBox",_.startx-jl.diagramMarginX+" -"+(jl.diagramMarginY+A)+" "+S+" "+(T+A)),v.debug("models:",Zl.models)}};var ic=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,2],i=[1,3],r=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,21],c=[1,22],h=[1,23],d=[1,24],u=[1,37],p=[1,25],g=[1,26],y=[1,27],f=[1,28],m=[1,29],b=[1,32],x=[1,33],k=[1,34],_=[1,35],C=[1,36],T=[1,39],E=[1,40],v=[1,41],S=[1,42],A=[1,38],w=[1,45],B=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],L=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],I=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],D=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],O={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 4:return r.setRootDoc(s[o]),s[o];case 5:this.$=[];break;case 6:"nl"!=s[o]&&(s[o-1].push(s[o]),this.$=s[o-1]);break;case 7:case 8:case 12:this.$=s[o];break;case 9:this.$="nl";break;case 13:const t=s[o-1];t.description=r.trimColon(s[o]),this.$=t;break;case 14:this.$={stmt:"relation",state1:s[o-2],state2:s[o]};break;case 15:const e=r.trimColon(s[o]);this.$={stmt:"relation",state1:s[o-3],state2:s[o-1],description:e};break;case 19:this.$={stmt:"state",id:s[o-3],type:"default",description:"",doc:s[o-1]};break;case 20:var l=s[o],c=s[o-2].trim();if(s[o].match(":")){var h=s[o].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:s[o-3],type:"default",description:s[o-5],doc:s[o-1]};break;case 22:this.$={stmt:"state",id:s[o],type:"fork"};break;case 23:this.$={stmt:"state",id:s[o],type:"join"};break;case 24:this.$={stmt:"state",id:s[o],type:"choice"};break;case 25:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:s[o-1].trim(),note:{position:s[o-2].trim(),text:s[o].trim()}};break;case 30:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 31:case 32:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:s[o-1].trim(),classes:s[o].trim()};break;case 35:this.$={stmt:"applyClass",id:s[o-1].trim(),styleClass:s[o].trim()};break;case 38:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:s[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:s[o-2].trim(),classes:[s[o].trim()],type:"default",description:""};break;case 50:r.parseDirective("%%{","open_directive");break;case 51:r.parseDirective(s[o],"type_directive");break;case 52:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 53:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:i,6:4,7:r,45:6,60:n},{1:[3]},{3:8,4:e,5:i,6:4,7:r,45:6,60:n},{3:9,4:e,5:i,6:4,7:r,45:6,60:n},{3:10,4:e,5:i,6:4,7:r,45:6,60:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],s,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:c,19:h,22:d,24:u,25:p,26:g,27:y,28:f,29:m,32:31,33:b,35:x,37:k,38:_,42:C,45:6,50:T,51:E,52:v,53:S,56:A,60:n},{47:43,48:[1,44],63:w},t([48,63],[2,51]),t(B,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:c,19:h,22:d,24:u,25:p,26:g,27:y,28:f,29:m,32:31,33:b,35:x,37:k,38:_,42:C,45:6,50:T,51:E,52:v,53:S,56:A,60:n},t(B,[2,8]),t(B,[2,9]),t(B,[2,10]),t(B,[2,11]),t(B,[2,12],{14:[1,47],15:[1,48]}),t(B,[2,16]),{18:[1,49]},t(B,[2,18],{20:[1,50]}),{23:[1,51]},t(B,[2,22]),t(B,[2,23]),t(B,[2,24]),t(B,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(B,[2,28]),t(B,[2,29]),{34:[1,56]},{36:[1,57]},t(B,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(L,[2,44],{57:[1,61]}),t(L,[2,45],{57:[1,62]}),t(B,[2,38]),t(B,[2,39]),t(B,[2,40]),t(B,[2,41]),t(I,[2,36]),{49:63,62:[1,64]},t(I,[2,53]),t(B,[2,7]),t(B,[2,13]),{13:65,24:u,56:A},t(B,[2,17]),t(D,s,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(B,[2,30]),t(B,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:w},{63:[2,52]},t(B,[2,14],{14:[1,76]}),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:c,19:h,21:[1,77],22:d,24:u,25:p,26:g,27:y,28:f,29:m,32:31,33:b,35:x,37:k,38:_,42:C,45:6,50:T,51:E,52:v,53:S,56:A,60:n},t(B,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(B,[2,33]),t(B,[2,34]),t(B,[2,35]),t(L,[2,46]),t(L,[2,47]),t(I,[2,37]),t(B,[2,15]),t(B,[2,19]),t(D,s,{8:81}),t(B,[2,26]),t(B,[2,27]),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:c,19:h,21:[1,82],22:d,24:u,25:p,26:g,27:y,28:f,29:m,32:31,33:b,35:x,37:k,38:_,42:C,45:6,50:T,51:E,52:v,53:S,56:A,60:n},t(B,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},F=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,r){switch(i){case 0:return 41;case 1:case 44:return 50;case 2:case 45:return 51;case 3:case 46:return 52;case 4:case 47:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:case 11:case 13:case 14:case 15:case 16:case 56:case 58:case 64:break;case 12:case 79:return 5;case 17:case 34:return this.pushState("SCALE"),17;case 18:case 35:return 18;case 19:case 25:case 36:case 51:case 54:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 37:this.pushState("STATE");break;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 40:case 43:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 48:this.begin("STATE_STRING");break;case 49:return this.popState(),this.pushState("STATE_ID"),"AS";case 50:case 66:return this.popState(),"ID";case 52:return"STATE_DESCR";case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 57:return this.popState(),21;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:return"NOTE_TEXT";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 69:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 70:case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return e.yytext=e.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};return t}();function N(){this.yy={}}return O.lexer=F,N.prototype=O,O.Parser=N,new N}();ic.parser=ic;const rc=ic,nc=(t,e)=>{var i;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.state)?void 0:i.defaultRenderer)&&null!==t.match(/^\s*stateDiagram/)},sc=(t,e)=>{var i;return null!==t.match(/^\s*stateDiagram-v2/)||!(!t.match(/^\s*stateDiagram/)||"dagre-wrapper"!==(null==(i=null==e?void 0:e.state)?void 0:i.defaultRenderer))},ac="state",oc="relation",lc="default",cc="divider",hc="[*]",dc="start",uc="color",pc="fill";let gc="LR",yc=[],fc={};let mc={root:{relations:[],states:{},documents:{}}},bc=mc.root,xc=0,kc=0;const _c=t=>JSON.parse(JSON.stringify(t)),Cc=(t,e,i)=>{if(e.stmt===oc)Cc(t,e.state1,!0),Cc(t,e.state2,!1);else if(e.stmt===ac&&"[*]"===e.id&&(e.id=i?t.id+"_start":t.id+"_end",e.start=i),e.doc){const t=[];let i,r=[];for(i=0;i<e.doc.length;i++)if(e.doc[i].type===cc){const n=_c(e.doc[i]);n.doc=_c(r),t.push(n),r=[]}else r.push(e.doc[i]);if(t.length>0&&r.length>0){const i={stmt:ac,id:De(),type:"divider",doc:_c(r)};t.push(_c(i)),e.doc=t}e.doc.forEach((t=>Cc(e,t,!0)))}},Tc=function(t,e="default",i=null,r=null,n=null,s=null,a=null,o=null){if(void 0===bc.states[t]?(v.info("Adding state ",t,r),bc.states[t]={id:t,descriptions:[],type:e,doc:i,note:n,classes:[],styles:[],textStyles:[]}):(bc.states[t].doc||(bc.states[t].doc=i),bc.states[t].type||(bc.states[t].type=e)),r&&(v.info("Setting state description",t,r),"string"===typeof r&&Bc(t,r.trim()),"object"===typeof r&&r.forEach((e=>Bc(t,e.trim())))),n&&(bc.states[t].note=n,bc.states[t].note.text=$.sanitizeText(bc.states[t].note.text,ti())),s){v.info("Setting state classes",t,s);("string"===typeof s?[s]:s).forEach((e=>Ic(t,e.trim())))}if(a){v.info("Setting state styles",t,a);("string"===typeof a?[a]:a).forEach((e=>Dc(t,e.trim())))}if(o){v.info("Setting state styles",t,a);("string"===typeof o?[o]:o).forEach((e=>Oc(t,e.trim())))}},Ec=function(t){mc={root:{relations:[],states:{},documents:{}}},bc=mc.root,xc=0,fc={},t||Mi()},vc=function(t){return bc.states[t]};function Sc(t=""){let e=t;return t===hc&&(xc++,e=`start${xc}`),e}function Ac(t="",e="default"){return t===hc?dc:e}const wc=function(t,e,i){if("object"===typeof t)!function(t,e,i){let r=Sc(t.id),n=Ac(t.id,t.type),s=Sc(e.id),a=Ac(e.id,e.type);Tc(r,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Tc(s,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),bc.relations.push({id1:r,id2:s,relationTitle:$.sanitizeText(i,ti())})}(t,e,i);else{const r=Sc(t),n=Ac(t),s=function(t=""){let e=t;return"[*]"===t&&(xc++,e=`end${xc}`),e}(e),a=function(t="",e="default"){return"[*]"===t?"end":e}(e);Tc(r,n),Tc(s,a),bc.relations.push({id1:r,id2:s,title:$.sanitizeText(i,ti())})}},Bc=function(t,e){const i=bc.states[t],r=e.startsWith(":")?e.replace(":","").trim():e;i.descriptions.push($.sanitizeText(r,ti()))},Lc=function(t,e=""){void 0===fc[t]&&(fc[t]={id:t,styles:[],textStyles:[]});const i=fc[t];void 0!==e&&null!==e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(t.match(uc)){const t=e.replace(pc,"bgFill").replace(uc,pc);i.textStyles.push(t)}i.styles.push(e)}))},Ic=function(t,e){t.split(",").forEach((function(t){let i=vc(t);if(void 0===i){const e=t.trim();Tc(e),i=vc(e)}i.classes.push(e)}))},Dc=function(t,e){const i=vc(t);void 0!==i&&i.textStyles.push(e)},Oc=function(t,e){const i=vc(t);void 0!==i&&i.textStyles.push(e)},Fc={parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},getConfig:()=>ti().state,addState:Tc,clear:Ec,getState:vc,getStates:function(){return bc.states},getRelations:function(){return bc.relations},getClasses:function(){return fc},getDirection:()=>gc,addRelation:wc,getDividerId:()=>(kc++,"divider-id-"+kc),setDirection:t=>{gc=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){v.info("Documents = ",mc)},getRootDoc:()=>yc,setRootDoc:t=>{v.info("Setting root doc",t),yc=t},getRootDocV2:()=>(Cc({id:"root"},{id:"root",doc:yc},!0),{id:"root",doc:yc}),extract:t=>{let e;e=t.doc?t.doc:t,v.info(e),Ec(!0),v.info("Extract",e),e.forEach((t=>{switch(t.stmt){case ac:Tc(t.id,t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case oc:wc(t.state1,t.state2,t.description);break;case"classDef":Lc(t.id,t.classes);break;case"applyClass":Ic(t.id,t.styleClass)}}))},trimColon:t=>t&&":"===t[0]?t.substr(1).trim():t.trim(),getAccTitle:Yi,setAccTitle:Pi,getAccDescription:ji,setAccDescription:zi,addStyleClass:Lc,setCssClass:Ic,addDescription:Bc,setDiagramTitle:Zi,getDiagramTitle:Wi},Nc={},$c=(t,e)=>{Nc[t]=e},Rc=(t,e)=>{const i=t.append("text").attr("x",2*ti().state.padding).attr("y",ti().state.textHeight+1.3*ti().state.padding).attr("font-size",ti().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=i.height,n=t.append("text").attr("x",ti().state.padding).attr("y",r+.4*ti().state.padding+ti().state.dividerMargin+ti().state.textHeight).attr("class","state-description");let s=!0,a=!0;e.descriptions.forEach((function(t){s||(!function(t,e,i){const r=t.append("tspan").attr("x",2*ti().state.padding).text(e);i||r.attr("dy",ti().state.textHeight)}(n,t,a),a=!1),s=!1}));const o=t.append("line").attr("x1",ti().state.padding).attr("y1",ti().state.padding+r+ti().state.dividerMargin/2).attr("y2",ti().state.padding+r+ti().state.dividerMargin/2).attr("class","descr-divider"),l=n.node().getBBox(),c=Math.max(l.width,i.width);return o.attr("x2",c+3*ti().state.padding),t.insert("rect",":first-child").attr("x",ti().state.padding).attr("y",ti().state.padding).attr("width",c+2*ti().state.padding).attr("height",l.height+r+2*ti().state.padding).attr("rx",ti().state.radius),t},Mc=(t,e,i)=>{const r=ti().state.padding,n=2*ti().state.padding,s=t.node().getBBox(),a=s.width,o=s.x,l=t.append("text").attr("x",0).attr("y",ti().state.titleShift).attr("font-size",ti().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+n;let h,d=Math.max(c,a);d===a&&(d+=n);const u=t.node().getBBox();e.doc,h=o-r,c>a&&(h=(a-d)/2+r),Math.abs(o-u.x)<r&&c>a&&(h=o-(c-a)/2);const p=1-ti().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",p).attr("class",i?"alt-composit":"composit").attr("width",d).attr("height",u.height+ti().state.textHeight+ti().state.titleShift+1).attr("rx","0"),l.attr("x",h+r),c<=a&&l.attr("x",o+(d-n)/2-c/2+r),t.insert("rect",":first-child").attr("x",h).attr("y",ti().state.titleShift-ti().state.textHeight-ti().state.padding).attr("width",d).attr("height",3*ti().state.textHeight).attr("rx",ti().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",ti().state.titleShift-ti().state.textHeight-ti().state.padding).attr("width",d).attr("height",u.height+3+2*ti().state.textHeight).attr("rx",ti().state.radius),t},Pc=(t,e)=>{e.attr("class","state-note");const i=e.append("rect").attr("x",0).attr("y",ti().state.padding),r=e.append("g"),{textWidth:n,textHeight:s}=((t,e,i,r)=>{let n=0;const s=r.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let a=t.replace(/\r\n/g,"<br/>");a=a.replace(/\n/g,"<br/>");const o=a.split($.lineBreakRegex);let l=1.25*ti().state.noteMargin;for(const c of o){const t=c.trim();if(t.length>0){const r=s.append("tspan");r.text(t),0===l&&(l+=r.node().getBBox().height),n+=l,r.attr("x",e+ti().state.noteMargin),r.attr("y",i+n+1.25*ti().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:n}})(t,0,0,r);return i.attr("height",s+2*ti().state.noteMargin),i.attr("width",n+2*ti().state.noteMargin),i},Yc=function(t,e){const i=e.id,r={id:i,label:e.id,width:0,height:0},n=t.append("g").attr("id",i).attr("class","stateGroup");"start"===e.type&&(t=>{t.append("circle").attr("class","start-state").attr("r",ti().state.sizeUnit).attr("cx",ti().state.padding+ti().state.sizeUnit).attr("cy",ti().state.padding+ti().state.sizeUnit)})(n),"end"===e.type&&(t=>{t.append("circle").attr("class","end-state-outer").attr("r",ti().state.sizeUnit+ti().state.miniPadding).attr("cx",ti().state.padding+ti().state.sizeUnit+ti().state.miniPadding).attr("cy",ti().state.padding+ti().state.sizeUnit+ti().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",ti().state.sizeUnit).attr("cx",ti().state.padding+ti().state.sizeUnit+2).attr("cy",ti().state.padding+ti().state.sizeUnit+2)})(n),"fork"!==e.type&&"join"!==e.type||((t,e)=>{let i=ti().state.forkWidth,r=ti().state.forkHeight;if(e.parentId){let t=i;i=r,r=t}t.append("rect").style("stroke","black").style("fill","black").attr("width",i).attr("height",r).attr("x",ti().state.padding).attr("y",ti().state.padding)})(n,e),"note"===e.type&&Pc(e.note.text,n),"divider"===e.type&&(t=>{t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",ti().state.textHeight).attr("class","divider").attr("x2",2*ti().state.textHeight).attr("y1",0).attr("y2",0)})(n),"default"===e.type&&0===e.descriptions.length&&((t,e)=>{const i=t.append("text").attr("x",2*ti().state.padding).attr("y",ti().state.textHeight+2*ti().state.padding).attr("font-size",ti().state.fontSize).attr("class","state-title").text(e.id),r=i.node().getBBox();t.insert("rect",":first-child").attr("x",ti().state.padding).attr("y",ti().state.padding).attr("width",r.width+2*ti().state.padding).attr("height",r.height+2*ti().state.padding).attr("rx",ti().state.radius)})(n,e),"default"===e.type&&e.descriptions.length>0&&Rc(n,e);const s=n.node().getBBox();return r.width=s.width+2*ti().state.padding,r.height=s.height+2*ti().state.padding,$c(i,r),r};let zc=0;let jc;const Zc={},Wc=(t,e,i,r,n,a,o)=>{const l=new m.k({compound:!0,multigraph:!0});let c,h=!0;for(c=0;c<t.length;c++)if("relation"===t[c].stmt){h=!1;break}i?l.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:jc.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):l.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:jc.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),l.setDefaultEdgeLabel((function(){return{}})),o.db.extract(t);const d=o.db.getStates(),u=o.db.getRelations(),p=Object.keys(d);for(const s of p){const t=d[s];let c;if(i&&(t.parentId=i),t.doc){let i=e.append("g").attr("id",t.id).attr("class","stateGroup");c=Wc(t.doc,i,t.id,!r,n,a,o);{i=Mc(i,t,r);let e=i.node().getBBox();c.width=e.width,c.height=e.height+jc.padding/2,Zc[t.id]={y:jc.compositTitleSize}}}else c=Yc(e,t);if(t.note){const i={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},r=Yc(e,i);"left of"===t.note.position?(l.setNode(c.id+"-note",r),l.setNode(c.id,c)):(l.setNode(c.id,c),l.setNode(c.id+"-note",r)),l.setParent(c.id,c.id+"-group"),l.setParent(c.id+"-note",c.id+"-group")}else l.setNode(c.id,c)}v.debug("Count=",l.nodeCount(),l);let g=0;u.forEach((function(t){var e;g++,v.debug("Setting edge",t),l.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*jc.fontSizeFactor:1),height:jc.labelHeight*$.getRows(t.title).length,labelpos:"c"},"id"+g)})),(0,f.bK)(l),v.debug("Graph after layout",l.nodes());const y=e.node();l.nodes().forEach((function(t){if(void 0!==t&&void 0!==l.node(t)){v.warn("Node "+t+": "+JSON.stringify(l.node(t))),n.select("#"+y.id+" #"+t).attr("transform","translate("+(l.node(t).x-l.node(t).width/2)+","+(l.node(t).y+(Zc[t]?Zc[t].y:0)-l.node(t).height/2)+" )"),n.select("#"+y.id+" #"+t).attr("data-x-shift",l.node(t).x-l.node(t).width/2);a.querySelectorAll("#"+y.id+" #"+t+" .divider").forEach((t=>{const e=t.parentElement;let i=0,r=0;e&&(e.parentElement&&(i=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",i-r-8)}))}else v.debug("No Node "+t+": "+JSON.stringify(l.node(t)))}));let b=y.getBBox();l.edges().forEach((function(t){void 0!==t&&void 0!==l.edge(t)&&(v.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(l.edge(t))),function(t,e,i){e.points=e.points.filter((t=>!Number.isNaN(t.y)));const r=e.points,n=(0,s.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.$0Z),a=t.append("path").attr("d",n(r)).attr("id","edge"+zc).attr("class","transition");let o="";if(ti().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+function(t){switch(t){case Fc.relationType.AGGREGATION:return"aggregation";case Fc.relationType.EXTENSION:return"extension";case Fc.relationType.COMPOSITION:return"composition";case Fc.relationType.DEPENDENCY:return"dependency"}}(Fc.relationType.DEPENDENCY)+"End)"),void 0!==i.title){const r=t.append("g").attr("class","stateLabel"),{x:n,y:s}=We.calcLabelPosition(e.points),a=$.getRows(i.title);let o=0;const l=[];let c=0,h=0;for(let t=0;t<=a.length;t++){const e=r.append("text").attr("text-anchor","middle").text(a[t]).attr("x",n).attr("y",s+o),i=e.node().getBBox();if(c=Math.max(c,i.width),h=Math.min(h,i.x),v.info(i.x,n,s+o),0===o){const t=e.node().getBBox();o=t.height,v.info("Title height",o,s)}l.push(e)}let d=o*a.length;if(a.length>1){const t=(a.length-1)*o*.5;l.forEach(((e,i)=>e.attr("y",s+i*o-t))),d=o*a.length}const u=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",n-c/2-ti().state.padding/2).attr("y",s-d/2-ti().state.padding/2-3.5).attr("width",c+ti().state.padding).attr("height",d+ti().state.padding),v.info(u)}zc++}(e,l.edge(t),l.edge(t).relation))})),b=y.getBBox();const x={id:i||"root",label:i||"root",width:0,height:0};return x.width=b.width+2*jc.padding,x.height=b.height+2*jc.padding,v.debug("Doc rendered",x,l),x},qc={setConf:function(){},draw:function(t,e,i,r){jc=ti().state;const n=ti().securityLevel;let a;"sandbox"===n&&(a=(0,s.Ys)("#i"+e));const o="sandbox"===n?(0,s.Ys)(a.nodes()[0].contentDocument.body):(0,s.Ys)("body"),l="sandbox"===n?a.nodes()[0].contentDocument:document;v.debug("Rendering diagram "+t);const c=o.select(`[id='${e}']`);c.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z");new m.k({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));const h=r.db.getRootDoc();Wc(h,c,void 0,!1,o,l,r);const d=jc.padding,u=c.node().getBBox(),p=u.width+2*d,g=u.height+2*d;oi(c,g,1.75*p,jc.useMaxWidth),c.attr("viewBox",`${u.x-jc.padding} ${u.y-jc.padding} `+p+" "+g)}},Uc="rect",Vc="rectWithTitle",Hc="statediagram",Gc="transition",Xc="parent",Kc="note",Qc="----parent",Jc="fill:none",th="fill: #333",eh="text",ih="normal";let rh={},nh=0;function sh(t="",e=0,i="",r="----"){return`state-${t}${null!==i&&i.length>0?`${r}${i}`:""}-${e}`}const ah=(t,e,i,r,n,s)=>{const a=i.id,o=void 0===(l=r[a])||null===l?"":l.classes?l.classes.join(" "):"";var l;if("root"!==a){let e=Uc;!0===i.start&&(e="start"),!1===i.start&&(e="end"),i.type!==lc&&(e=i.type),rh[a]||(rh[a]={id:a,shape:e,description:$.sanitizeText(a,ti()),classes:`${o} statediagram-state`});const r=rh[a];i.description&&(Array.isArray(r.description)?(r.shape=Vc,r.description.push(i.description)):r.description.length>0?(r.shape=Vc,r.description===a?r.description=[i.description]:r.description=[r.description,i.description]):(r.shape=Uc,r.description=i.description),r.description=$.sanitizeTextOrArray(r.description,ti())),1===r.description.length&&r.shape===Vc&&(r.shape=Uc),!r.type&&i.doc&&(v.info("Setting cluster for ",a,lh(i)),r.type="group",r.dir=lh(i),r.shape=i.type===cc?"divider":"roundedWithTitle",r.classes=r.classes+" statediagram-cluster "+(s?"statediagram-cluster-alt":""));const n={labelStyle:"",shape:r.shape,labelText:r.description,classes:r.classes,style:"",id:a,dir:r.dir,domId:sh(a,nh),type:r.type,padding:15};if(i.note){const e={labelStyle:"",shape:"note",labelText:i.note.text,classes:"statediagram-note",style:"",id:a+"----note-"+nh,domId:sh(a,nh,Kc),type:r.type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:i.note.text,classes:r.classes,style:"",id:a+Qc,domId:sh(a,nh,Xc),type:"group",padding:0};nh++;const o=a+Qc;t.setNode(o,s),t.setNode(e.id,e),t.setNode(a,n),t.setParent(a,o),t.setParent(e.id,o);let l=a,c=e.id;"left of"===i.note.position&&(l=e.id,c=a),t.setEdge(l,c,{arrowhead:"none",arrowType:"",style:Jc,labelStyle:"",classes:"transition note-edge",arrowheadStyle:th,labelpos:"c",labelType:eh,thickness:ih})}else t.setNode(a,n)}e&&"root"!==e.id&&(v.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),i.doc&&(v.trace("Adding nodes children "),oh(t,i,i.doc,r,n,!s))},oh=(t,e,i,r,n,s)=>{v.trace("items",i),i.forEach((i=>{switch(i.stmt){case ac:case lc:ah(t,e,i,r,n,s);break;case oc:{ah(t,e,i.state1,r,n,s),ah(t,e,i.state2,r,n,s);const a={id:"edge"+nh,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Jc,labelStyle:"",label:$.sanitizeText(i.description,ti()),arrowheadStyle:th,labelpos:"c",labelType:eh,thickness:ih,classes:Gc};t.setEdge(i.state1.id,i.state2.id,a,nh),nh++}}}))},lh=(t,e="TB")=>{let i=e;if(t.doc)for(let r=0;r<t.doc.length;r++){const e=t.doc[r];"dir"===e.stmt&&(i=e.value)}return i},ch={setConf:function(t){const e=Object.keys(t);for(const i of e)t[i]},getClasses:function(t,e){v.trace("Extracting classes"),e.db.clear();try{return e.parser.parse(t),e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}catch(i){return i}},draw:function(t,e,i,r){v.info("Drawing state diagram (v2)",e),rh={};let n=r.db.getDirection();void 0===n&&(n="LR");const{securityLevel:a,state:o}=ti(),l=o.nodeSpacing||50,c=o.rankSpacing||50;v.info(r.db.getRootDocV2()),r.db.extract(r.db.getRootDocV2()),v.info(r.db.getRootDocV2());const h=r.db.getStates(),d=new m.k({multigraph:!0,compound:!0}).setGraph({rankdir:lh(r.db.getRootDocV2()),nodesep:l,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));let u;ah(d,void 0,r.db.getRootDocV2(),h,r.db,!0),"sandbox"===a&&(u=(0,s.Ys)("#i"+e));const p="sandbox"===a?(0,s.Ys)(u.nodes()[0].contentDocument.body):(0,s.Ys)("body"),g=p.select(`[id="${e}"]`),y=p.select("#"+e+" g");Ds(y,d,["barb"],Hc,e);We.insertTitle(g,"statediagramTitleText",o.titleTopMargin,r.db.getDiagramTitle());const f=g.node().getBBox(),b=f.width+16,x=f.height+16;g.attr("class",Hc);const k=g.node().getBBox();oi(g,x,b,o.useMaxWidth);const _=`${k.x-8} ${k.y-8} ${b} ${x}`;v.debug(`viewBox ${_}`),g.attr("viewBox",_);const C=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const s of C){const t=s.getBBox(),e=document.createElementNS("http://www.w3.org/2000/svg",Uc);e.setAttribute("rx",0),e.setAttribute("ry",0),e.setAttribute("width",t.width),e.setAttribute("height",t.height),s.insertBefore(e,s.firstChild)}}};var hh=function(){var t=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},e=[1,2],i=[1,5],r=[6,9,11,17,18,20,22,23,24,26],n=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],c=[1,20],h=[1,24],d=[4,6,9,11,17,18,20,22,23,24,26],u={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,i,r,n,s,a){var o=s.length-1;switch(n){case 1:return s[o-1];case 3:case 7:case 8:this.$=[];break;case 4:s[o-1].push(s[o]),this.$=s[o-1];break;case 5:case 6:this.$=s[o];break;case 11:r.setDiagramTitle(s[o].substr(6)),this.$=s[o].substr(6);break;case 12:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 13:case 14:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 15:r.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 16:r.addTask(s[o-1],s[o]),this.$="task";break;case 18:r.parseDirective("%%{","open_directive");break;case 19:r.parseDirective(s[o],"type_directive");break;case 20:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 21:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,26:i},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:i},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:n,18:s,20:a,22:o,23:l,24:c,26:i},{1:[2,2]},{14:22,15:[1,23],29:h},t([15,29],[2,19]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:21,10:25,12:4,17:n,18:s,20:a,22:o,23:l,24:c,26:i},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),{19:[1,26]},{21:[1,27]},t(r,[2,14]),t(r,[2,15]),{25:[1,28]},t(r,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(r,[2,5]),t(r,[2,12]),t(r,[2,13]),t(r,[2,16]),t(d,[2,9]),{14:32,29:h},{29:[2,20]},{11:[1,33]},t(d,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[],n=[null],s=[],a=this.table,o="",l=0,c=0,h=2,d=1,u=s.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var m=p.options&&p.options.ranges;function b(){var t;return"number"!==typeof(t=r.pop()||p.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,_,C,T,E,v,S,A={};;){if(k=i[i.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null!==x&&"undefined"!=typeof x||(x=b()),_=a[k]&&a[k][x]),"undefined"===typeof _||!_.length||!_[0]){var w="";for(T in S=[],a[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),n.push(p.yytext),s.push(p.yylloc),i.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(E=this.productions_[_[1]][1],A.$=n[n.length-E],A._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},m&&(A._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),"undefined"!==typeof(C=this.performAction.apply(A,[o,c,l,g.yy,_[1],n,s].concat(u))))return C;E&&(i=i.slice(0,-1*E*2),n=n.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[_[1]][0]),n.push(A.$),s.push(A._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},p=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,r){switch(i){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return t}();function g(){this.yy={}}return u.lexer=p,g.prototype=u,u.Parser=g,new g}();hh.parser=hh;const dh=hh,uh=t=>null!==t.match(/^\s*journey/);let ph="";const gh=[],yh=[],fh=[],mh=function(){let t=!0;for(const[e,i]of fh.entries())fh[e].processed,t=t&&i.processed;return t},bh={parseDirective:function(t,e,i){dd.parseDirective(this,t,e,i)},getConfig:()=>ti().journey,clear:function(){gh.length=0,yh.length=0,ph="",fh.length=0,Mi()},setDiagramTitle:Zi,getDiagramTitle:Wi,setAccTitle:Pi,getAccTitle:Yi,setAccDescription:zi,getAccDescription:ji,addSection:function(t){ph=t,gh.push(t)},getSections:function(){return gh},getTasks:function(){let t=mh();let e=0;for(;!t&&e<100;)t=mh(),e++;return yh.push(...fh),yh},addTask:function(t,e){const i=e.substr(1).split(":");let r=0,n=[];1===i.length?(r=Number(i[0]),n=[]):(r=Number(i[0]),n=i[1].split(","));const s=n.map((t=>t.trim())),a={section:ph,type:ph,people:s,task:t,score:r};fh.push(a)},addTaskOrg:function(t){const e={section:ph,type:ph,description:t,task:t,classes:[]};yh.push(e)},getActors:function(){return function(){const t=[];return yh.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}()}},xh=function(t,e){const i=t.append("rect");return i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),void 0!==e.class&&i.attr("class",e.class),i},kh=function(t,e){const i=t.append("circle");return i.attr("cx",e.cx),i.attr("cy",e.cy),i.attr("class","actor-"+e.pos),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("r",e.r),void 0!==i.class&&i.attr("class",i.class),void 0!==e.title&&i.append("title").text(e.title),i},_h=function(t,e){const i=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);const n=r.append("tspan");return n.attr("x",e.x+2*e.textMargin),n.text(i),r};let Ch=-1;const Th=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},Eh=function(){function t(t,e,i,n,s,a,o,l){r(e.append("text").attr("x",i+s/2).attr("y",n+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,i,n,s,a,o,l,c){const{taskFontSize:h,taskFontFamily:d}=l,u=t.split(/<br\s*\/?>/gi);for(let p=0;p<u.length;p++){const t=p*h-h*(u.length-1)/2,l=e.append("text").attr("x",i+s/2).attr("y",n).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",d);l.append("tspan").attr("x",i+s/2).attr("dy",t).text(u[p]),l.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(l,o)}}function i(t,i,n,s,a,o,l,c){const h=i.append("switch"),d=h.append("foreignObject").attr("x",n).attr("y",s).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,n,s,a,o,l,c),r(d,l)}function r(t,e){for(const i in e)i in e&&t.attr(i,e[i])}return function(r){return"fo"===r.textPlacement?i:"old"===r.textPlacement?t:e}}(),vh=kh,Sh=function(t,e,i){const r=t.append("g"),n=Th();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=i.width,n.height=i.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,xh(r,n),Eh(i)(e.text,r,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},i,e.colour)},Ah=_h,wh=function(t,e,i){const r=e.x+i.width/2,n=t.append("g");Ch++;n.append("line").attr("id","task"+Ch).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),function(t,e){const i=15,r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",i).attr("stroke-width",2).attr("overflow","visible"),n=t.append("g");n.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.score>3?function(t){const r=(0,s.Nb1)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(i/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(n):e.score<3?function(t){const r=(0,s.Nb1)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(i/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(n):n.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(n,{cx:r,cy:300+30*(5-e.score),score:e.score});const a=Th();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width,a.height=i.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,xh(n,a);let o=e.x+14;e.people.forEach((t=>{const i=e.actors[t].color,r={cx:o,cy:e.y,r:7,fill:i,stroke:"#000",title:t,pos:e.actors[t].position};kh(n,r),o+=10})),Eh(i)(e.task,n,a.x,a.y,a.width,a.height,{class:"task"},i,e.colour)},Bh=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},Lh={};const Ih=ti().journey,Dh=Ih.leftMargin,Oh={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,i,r){void 0===t[e]?t[e]=i:t[e]=r(i,t[e])},updateBounds:function(t,e,i,r){const n=ti().journey,s=this;let a=0;var o;this.sequenceItems.forEach((function(l){a++;const c=s.sequenceItems.length-a+1;s.updateVal(l,"starty",e-c*n.boxMargin,Math.min),s.updateVal(l,"stopy",r+c*n.boxMargin,Math.max),s.updateVal(Oh.data,"startx",t-c*n.boxMargin,Math.min),s.updateVal(Oh.data,"stopx",i+c*n.boxMargin,Math.max),"activation"!==o&&(s.updateVal(l,"startx",t-c*n.boxMargin,Math.min),s.updateVal(l,"stopx",i+c*n.boxMargin,Math.max),s.updateVal(Oh.data,"starty",e-c*n.boxMargin,Math.min),s.updateVal(Oh.data,"stopy",r+c*n.boxMargin,Math.max))}))},insert:function(t,e,i,r){const n=Math.min(t,i),s=Math.max(t,i),a=Math.min(e,r),o=Math.max(e,r);this.updateVal(Oh.data,"startx",n,Math.min),this.updateVal(Oh.data,"starty",a,Math.min),this.updateVal(Oh.data,"stopx",s,Math.max),this.updateVal(Oh.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Fh=Ih.sectionFills,Nh=Ih.sectionColours,$h=function(t,e,i){const r=ti().journey;let n="";const s=i+(2*r.height+r.diagramMarginY);let a=0,o="#CCC",l="black",c=0;for(const[h,d]of e.entries()){if(n!==d.section){o=Fh[a%Fh.length],c=a%Fh.length,l=Nh[a%Nh.length];const e={x:h*r.taskMargin+h*r.width+Dh,y:50,text:d.section,fill:o,num:c,colour:l};Sh(t,e,r),n=d.section,a++}const e=d.people.reduce(((t,e)=>(Lh[e]&&(t[e]=Lh[e]),t)),{});d.x=h*r.taskMargin+h*r.width+Dh,d.y=s,d.width=r.diagramMarginX,d.height=r.diagramMarginY,d.colour=l,d.fill=o,d.num=c,d.actors=e,wh(t,d,r),Oh.insert(d.x,d.y,d.x+d.width+r.taskMargin,450)}},Rh={setConf:function(t){Object.keys(t).forEach((function(e){Ih[e]=t[e]}))},draw:function(t,e,i,r){const n=ti().journey;r.db.clear(),r.parser.parse(t+"\n");const a=ti().securityLevel;let o;"sandbox"===a&&(o=(0,s.Ys)("#i"+e));const l="sandbox"===a?(0,s.Ys)(o.nodes()[0].contentDocument.body):(0,s.Ys)("body");Oh.init();const c=l.select("#"+e);Bh(c);const h=r.db.getTasks(),d=r.db.getDiagramTitle(),u=r.db.getActors();for(const s in Lh)delete Lh[s];let p=0;u.forEach((t=>{Lh[t]={color:n.actorColours[p%n.actorColours.length],position:p},p++})),function(t){const e=ti().journey;let i=60;Object.keys(Lh).forEach((r=>{const n=Lh[r].color,s={cx:20,cy:i,r:7,fill:n,stroke:"#000",pos:Lh[r].position};vh(t,s);const a={x:40,y:i+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};Ah(t,a),i+=20}))}(c),Oh.insert(0,0,Dh,50*Object.keys(Lh).length),$h(c,h,0);const g=Oh.getBounds();d&&c.append("text").text(d).attr("x",Dh).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const y=g.stopy-g.starty+2*n.diagramMarginY,f=Dh+g.stopx+2*n.diagramMarginX;oi(c,y,f,n.useMaxWidth),c.append("line").attr("x1",Dh).attr("y1",4*n.height).attr("x2",f-Dh-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=d?70:0;c.attr("viewBox",`${g.startx} -25 ${f} ${y+m}`),c.attr("preserveAspectRatio","xMinYMin meet"),c.attr("height",y+m+25)}};let Mh={};const Ph={setConf:function(t){Mh={...Mh,...t}},draw:(t,e,i)=>{try{v.debug("Renering svg for syntax error\n");const t=(0,s.Ys)("#"+e),r=t.append("g");r.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),r.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),r.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),r.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),r.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),r.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),r.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),r.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+i),t.attr("height",100),t.attr("width",500),t.attr("viewBox","768 0 912 512")}catch(n){v.error("Error while rendering info diagram"),v.error((r=n)instanceof Error?r.message:String(r))}var r}};let Yh=!1;const zh=()=>{Yh||(Yh=!0,Bi("error",{db:{clear:()=>{}},styles:di,renderer:Ph,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},(t=>"error"===t.toLowerCase().trim())),Bi("c4",{parser:vr,db:Yr,renderer:xn,styles:ki,init:t=>{xn.setConf(t.c4)}},Sr),Bi("class",{parser:_n,db:Pn,renderer:Qn,styles:ci,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Pn.clear()}},Cn),Bi("classDiagram",{parser:_n,db:Pn,renderer:$s,styles:ci,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Pn.clear()}},Tn),Bi("er",{parser:Ms,db:Zs,renderer:ta,styles:hi},Ps),Bi("gantt",{parser:Ra,db:mo,renderer:ko,styles:pi},Ma),Bi("info",{parser:Co,db:vo,renderer:So,styles:gi},Ao),Bi("pie",{parser:Bo,db:Oo,renderer:Ro,styles:yi},Lo),Bi("requirement",{parser:Po,db:Uo,renderer:rl,styles:fi},Yo),Bi("sequence",{parser:sl,db:El,renderer:ec,styles:mi,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");El.setWrap(t.wrap),ec.setConf(t.sequence)}},al),Bi("state",{parser:rc,db:Fc,renderer:qc,styles:bi,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Fc.clear()}},nc),Bi("stateDiagram",{parser:rc,db:Fc,renderer:ch,styles:bi,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Fc.clear()}},sc),Bi("journey",{parser:dh,db:bh,renderer:Rh,styles:xi,init:t=>{Rh.setConf(t.journey),bh.clear()}},uh),Bi("flowchart",{parser:ia,db:Ba,renderer:Na,styles:ui,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ia(t.flowchart),Ba.clear(),Ba.setGen("gen-1")}},ra),Bi("flowchart-v2",{parser:ia,db:Ba,renderer:Na,styles:ui,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Je({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Na.setConf(t.flowchart),Ba.clear(),Ba.setGen("gen-2")}},na),Bi("gitGraph",{parser:Di,db:or,renderer:Cr,styles:Tr},Oi))};class jh{constructor(t,e){var i,r;T(this,"type","graph"),T(this,"parser"),T(this,"renderer"),T(this,"db"),T(this,"detectTypeFailed",!1),this.txt=t;const n=ti();this.txt=t;try{this.type=ke(t,n)}catch(o){this.handleError(o,e),this.type="error",this.detectTypeFailed=!0}const s=Li(this.type);v.debug("Type "+this.type),this.db=s.db,null==(r=(i=this.db).clear)||r.call(i),this.renderer=s.renderer,this.parser=s.parser;const a=this.parser.parse.bind(this.parser);this.parser.parse=t=>a(function(t,e){var i;const r=t.match(fe);if(r){const n=ye(r[1],{schema:ge});return(null==n?void 0:n.title)&&(null==(i=e.setDiagramTitle)||i.call(e,n.title)),t.slice(r[0].length)}return t}(t,this.db)),this.parser.parser.yy=this.db,s.init&&(s.init(n),v.debug("Initialized diagram "+this.type,n)),this.txt+="\n",this.parse(this.txt,e)}parse(t,e){var i,r;if(this.detectTypeFailed)return!1;try{return t+="\n",null==(r=(i=this.db).clear)||r.call(i),this.parser.parse(t),!0}catch(n){this.handleError(n,e)}return!1}handleError(t,e){if(void 0===e)throw t;Ze(t)?e(t.str,t.hash):e(t)}getParser(){return this.parser}getType(){return this.type}}const Zh=(t,e)=>{const i=ke(t,ti());try{Li(i)}catch(r){const n=xe[i].loader;if(!n)throw new Error(`Diagram ${i} not found.`);return n().then((({diagram:r})=>(Bi(i,r,void 0),new jh(t,e))))}return new jh(t,e)},Wh=jh;const qh=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],Uh="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Vh="sandbox",Hh="loose",Gh="http://www.w3.org/1999/xlink",Xh="http://www.w3.org/1999/xhtml",Kh=["foreignobject"],Qh=["dominant-baseline"];const Jh=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"})),e},td=function(t){let e=t;return e=e.replace(/\ufb02\xb0\xb0/g,"&#"),e=e.replace(/\ufb02\xb0/g,"&"),e=e.replace(/\xb6\xdf/g,";"),e},ed=(t,e,i=[])=>`\n.${t} ${e} { ${i.join(" !important; ")} !important; }`,id=(t,e,i,r)=>{const n=((t,e,i={})=>{var r;let n="";if(void 0!==t.themeCSS&&(n+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(n+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(n+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!(0,_.Z)(i)&&qh.includes(e)){const e=["> *","span"],s=["rect","polygon","ellipse","circle","path"],a=t.htmlLabels||(null==(r=t.flowchart)?void 0:r.htmlLabels)?e:s;for(const t in i){const e=i[t];(0,_.Z)(e.styles)||a.forEach((t=>{n+=ed(e.id,t,e.styles)})),(0,_.Z)(e.textStyles)||(n+=ed(e.id,"tspan",e.textStyles))}}return n})(t,e,i),s=Ci(e,n,t.themeVariables);return(0,g.q)((0,y.MY)(`${r}{${s}}`),g.P)},rd=(t="",e,i)=>{let r=t;return i||e||(r=r.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),r=td(r),r=r.replace(/<br>/g,"<br/>"),r},nd=(t="",e)=>`<iframe style="width:100%;height:${e?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+t+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,sd=(t,e,i,r,n)=>{const s=t.append("div");s.attr("id",i),r&&s.attr("style",r);const a=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function ad(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const od=(t,e,i,r)=>{var n,s,a;null==(n=t.getElementById(e))||n.remove(),null==(s=t.getElementById(i))||s.remove(),null==(a=t.getElementById(r))||a.remove()};let ld={};const cd=function(t,e,i){switch(v.debug(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":["config"].forEach((t=>{void 0!==e.args[t]&&("flowchart-v2"===i&&(i="flowchart"),e.args[i]=e.args[t],delete e.args[t])})),v.debug("sanitize in handleDirective",e.args),ze(e.args),v.debug("sanitize in handleDirective (done)",e.args),ii(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;case"themeCss":v.warn("themeCss encountered");break;default:v.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e)}};function hd(t,e,i,r){var n,s;n=e,s=t,(0,_.Z)(s)||n.attr("aria-roledescription",s),function(t,e,i,r){if(void 0!==t.insert&&(e||i)){if(i){const e="chart-desc-"+r;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(i)}if(e){const i="chart-title-"+r;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}(e,i,r,e.attr("id"))}const dd=Object.freeze({render:function(t,e,i,r){var n,o,l,c,h;zh(),ri();const d=We.detectInit(e);d&&(ze(d),ii(d));const u=ti();v.debug(u),e.length>(null!=(n=null==u?void 0:u.maxTextSize)?n:5e4)&&(e=Uh),e=e.replace(/\r\n?/g,"\n");const p="#"+t,g="i"+t,y="#"+g,f="d"+t,m="#"+f;let b=(0,s.Ys)("body");const x=u.securityLevel===Vh,k=u.securityLevel===Hh,_=u.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){const t=ad((0,s.Ys)(r),g);b=(0,s.Ys)(t.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=(0,s.Ys)(r);sd(b,t,f,`font-family: ${_}`,Gh)}else{if(od(document,t,f,g),x){const t=ad((0,s.Ys)("body"),g);b=(0,s.Ys)(t.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=(0,s.Ys)("body");sd(b,t,f)}let C,T;e=Jh(e);try{if(C=Zh(e),"then"in C)throw new Error("Diagram is a promise. Use renderAsync.")}catch($){C=new Wh("error"),T=$}const E=b.select(m).node(),S=C.type,A=E.firstChild,w=A.firstChild,B=qh.includes(S)?C.renderer.getClasses(e,C):{},L=id(u,S,B,p),I=document.createElement("style");I.innerHTML=L,A.insertBefore(I,w);try{C.renderer.draw(e,t,qe,C)}catch(R){throw Ph.draw(e,t,qe),R}hd(S,b.select(`${m} svg`),null==(l=(o=C.db).getAccTitle)?void 0:l.call(o),null==(h=(c=C.db).getAccDescription)?void 0:h.call(c)),b.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Xh);let D=b.select(m).node().innerHTML;if(v.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),D=rd(D,x,F(u.arrowMarkerAbsolute)),x){const t=b.select(m+" svg").node();D=nd(D,t)}else k||(D=a.sanitize(D,{ADD_TAGS:Kh,ADD_ATTR:Qh}));if(void 0!==i)switch(S){case"flowchart":case"flowchart-v2":i(D,Ba.bindFunctions);break;case"gantt":i(D,mo.bindFunctions);break;case"class":case"classDiagram":i(D,Pn.bindFunctions);break;default:i(D)}else v.debug("CB = undefined!");Sl();const O=x?y:m,N=(0,s.Ys)(O).node();if(N&&"remove"in N&&N.remove(),T)throw T;return D},renderAsync:async function(t,e,i,r){var n,o,l,c,h;zh(),ri();const d=We.detectInit(e);d&&(ze(d),ii(d));const u=ti();v.debug(u),e.length>(null!=(n=null==u?void 0:u.maxTextSize)?n:5e4)&&(e=Uh),e=e.replace(/\r\n?/g,"\n");const p="#"+t,g="i"+t,y="#"+g,f="d"+t,m="#"+f;let b=(0,s.Ys)("body");const x=u.securityLevel===Vh,k=u.securityLevel===Hh,_=u.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){const t=ad((0,s.Ys)(r),g);b=(0,s.Ys)(t.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=(0,s.Ys)(r);sd(b,t,f,`font-family: ${_}`,Gh)}else{if(od(document,t,f,g),x){const t=ad((0,s.Ys)("body"),g);b=(0,s.Ys)(t.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=(0,s.Ys)("body");sd(b,t,f)}let C,T;e=Jh(e);try{C=await Zh(e)}catch($){C=new Wh("error"),T=$}const E=b.select(m).node(),S=C.type,A=E.firstChild,w=A.firstChild,B=qh.includes(S)?C.renderer.getClasses(e,C):{},L=id(u,S,B,p),I=document.createElement("style");I.innerHTML=L,A.insertBefore(I,w);try{await C.renderer.draw(e,t,qe,C)}catch(R){throw Ph.draw(e,t,qe),R}hd(S,b.select(`${m} svg`),null==(l=(o=C.db).getAccTitle)?void 0:l.call(o),null==(h=(c=C.db).getAccDescription)?void 0:h.call(c)),b.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Xh);let D=b.select(m).node().innerHTML;if(v.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),D=rd(D,x,F(u.arrowMarkerAbsolute)),x){const t=b.select(m+" svg").node();D=nd(D,t)}else k||(D=a.sanitize(D,{ADD_TAGS:Kh,ADD_ATTR:Qh}));if(void 0!==i)switch(S){case"flowchart":case"flowchart-v2":i(D,Ba.bindFunctions);break;case"gantt":i(D,mo.bindFunctions);break;case"class":case"classDiagram":i(D,Pn.bindFunctions);break;default:i(D)}else v.debug("CB = undefined!");Sl();const O=x?y:m,N=(0,s.Ys)(O).node();if(N&&"remove"in N&&N.remove(),T)throw T;return D},parse:function(t,e){return zh(),new Wh(t,e).parse(t,e)},parseAsync:async function(t,e){return zh(),(await Zh(t,e)).parse(t,e)},parseDirective:function(t,e,i,r){try{if(void 0!==e)switch(e=e.trim(),i){case"open_directive":ld={};break;case"type_directive":if(!ld)throw new Error("currentDirective is undefined");ld.type=e.toLowerCase();break;case"arg_directive":if(!ld)throw new Error("currentDirective is undefined");ld.args=JSON.parse(e);break;case"close_directive":cd(t,ld,r),ld=void 0}}catch(n){v.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${i}`),v.error(n.message)}},initialize:function(t={}){var e;(null==t?void 0:t.fontFamily)&&!(null==(e=t.themeVariables)?void 0:e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),Ve=Te({},t),(null==t?void 0:t.theme)&&t.theme in q?t.themeVariables=q[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=q.default.getThemeVariables(t.themeVariables));const i="object"===typeof t?(t=>(He=Te({},Ue),He=Te(He,t),t.theme&&q[t.theme]&&(He.themeVariables=q[t.theme].getThemeVariables(t.themeVariables)),Ke(He,Ge),He))(t):Qe();S(i.logLevel),zh()},getConfig:ti,setConfig:Je,getSiteConfig:Qe,updateSiteConfig:t=>(He=Te(He,t),Ke(He,Ge),He),reset:()=>{ri()},globalReset:()=>{ri(Ue)},defaultConfig:Ue});S(ti().logLevel),ri(ti());let ud=!1;const pd=(t,e,i)=>{v.warn(t),Ze(t)?(i&&i(t.str,t.hash),e.push({...t,message:t.str,error:t})):(i&&i(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},gd=function(t,e,i){const r=dd.getConfig();let n;if(t&&(kd.sequenceConfig=t),v.debug((i?"":"No ")+"Callback function found"),void 0===e)n=document.querySelectorAll(".mermaid");else if("string"===typeof e)n=document.querySelectorAll(e);else if(e instanceof HTMLElement)n=[e];else{if(!(e instanceof NodeList))throw new Error("Invalid argument nodes for mermaid.init");n=e}v.debug(`Found ${n.length} diagrams`),void 0!==(null==t?void 0:t.startOnLoad)&&(v.debug("Start On Load: "+(null==t?void 0:t.startOnLoad)),dd.updateSiteConfig({startOnLoad:null==t?void 0:t.startOnLoad}));const s=new We.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const c of Array.from(n)){if(v.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const t=`mermaid-${s.next()}`;a=c.innerHTML,a=We.entityDecode(a).trim().replace(/<br\s*\/?>/gi,"<br/>");const e=We.detectInit(a);e&&v.debug("Detected early reinit: ",e);try{dd.render(t,a,((e,r)=>{c.innerHTML=e,void 0!==i&&i(t),r&&r(c)}),c)}catch(l){pd(l,o,kd.parseError)}}if(o.length>0)throw o[0]},yd=async function(t,e,i){const r=dd.getConfig();let n;if(t&&(kd.sequenceConfig=t),v.debug((i?"":"No ")+"Callback function found"),void 0===e)n=document.querySelectorAll(".mermaid");else if("string"===typeof e)n=document.querySelectorAll(e);else if(e instanceof HTMLElement)n=[e];else{if(!(e instanceof NodeList))throw new Error("Invalid argument nodes for mermaid.init");n=e}v.debug(`Found ${n.length} diagrams`),void 0!==(null==t?void 0:t.startOnLoad)&&(v.debug("Start On Load: "+(null==t?void 0:t.startOnLoad)),dd.updateSiteConfig({startOnLoad:null==t?void 0:t.startOnLoad}));const s=new We.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const c of Array.from(n)){if(v.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const t=`mermaid-${s.next()}`;a=c.innerHTML,a=We.entityDecode(a).trim().replace(/<br\s*\/?>/gi,"<br/>");const e=We.detectInit(a);e&&v.debug("Detected early reinit: ",e);try{await dd.renderAsync(t,a,((e,r)=>{c.innerHTML=e,void 0!==i&&i(t),r&&r(c)}),c)}catch(l){pd(l,o,kd.parseError)}}if(o.length>0)throw o[0]},fd=function(){if(kd.startOnLoad){const{startOnLoad:t}=dd.getConfig();t&&kd.init()}};"undefined"!==typeof document&&window.addEventListener("load",fd,!1);const md=[];let bd=!1;const xd=async()=>{if(!bd){for(bd=!0;md.length>0;){const e=md.shift();if(e)try{await e()}catch(t){v.error("Error executing queue",t)}}bd=!1}},kd={startOnLoad:!0,diagrams:{},mermaidAPI:dd,parse:t=>dd.parse(t,kd.parseError),parseAsync:t=>new Promise(((e,i)=>{md.push((()=>new Promise(((r,n)=>{dd.parseAsync(t,kd.parseError).then((t=>{r(t),e(t)}),(t=>{v.error("Error parsing",t),n(t),i(t)}))})))),xd()})),render:dd.render,renderAsync:(t,e,i,r)=>new Promise(((n,s)=>{md.push((()=>new Promise(((a,o)=>{dd.renderAsync(t,e,i,r).then((t=>{a(t),n(t)}),(t=>{v.error("Error parsing",t),o(t),s(t)}))})))),xd()})),init:async function(t,e,i){try{ud?await yd(t,e,i):gd(t,e,i)}catch(r){v.warn("Syntax Error rendering"),Ze(r)&&v.warn(r.str),kd.parseError&&kd.parseError(r)}},initThrowsErrors:gd,initThrowsErrorsAsync:yd,registerExternalDiagrams:async(t,{lazyLoad:e=!0}={})=>{e?(t=>{for(const{id:e,detector:i,loader:r}of t)_e(e,i,r)})(t):await(async t=>{v.debug(`Loading ${t.length} external diagrams`);const e=(await Promise.allSettled(t.map((async({id:t,detector:e,loader:i})=>{const{diagram:r}=await i();Bi(t,r,e)})))).filter((t=>"rejected"===t.status));if(e.length>0){v.error(`Failed to load ${e.length} external diagrams`);for(const t of e)v.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}})(t),ud=!0},initialize:function(t){dd.initialize(t)},parseError:void 0,contentLoaded:fd,setParseErrorHandler:function(t){kd.parseError=t}}}}]);
|