@crystaldesign/diva-web-planner-react 26.3.0-beta.2 → 26.3.0-beta.21
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/build/esm/{ArticleProperties-49592b90.js → ArticleProperties-6d368407.js} +1 -1
- package/build/esm/{CatalogProperties-af209421.js → CatalogProperties-c53b246d.js} +1 -1
- package/build/esm/DecisionVizualizer-56a1d888.js +284 -0
- package/build/esm/{OptionProperties-1a522185.js → OptionProperties-3659f0c4.js} +1 -1
- package/build/esm/{OptionValueProperties-018ca061.js → OptionValueProperties-a57a4928.js} +1 -1
- package/build/esm/{Planner2DGrid-fb187f29.js → Planner2DGrid-73c35d01.js} +1 -1
- package/build/esm/{Planner3DImage-ca2b2f60.js → Planner3DImage-6a3a7ef4.js} +1 -1
- package/build/esm/{index-d3c1bc55.js → index-00729065.js} +1 -1
- package/build/esm/{index-b4edf754.js → index-0110a005.js} +1 -1
- package/build/esm/{index-5f790040.js → index-0170cea9.js} +3 -3
- package/build/esm/{index-33538339.js → index-01c65e09.js} +4 -4
- package/build/esm/{index-3073cb24.js → index-01feebe7.js} +6 -6
- package/build/esm/{index-1013f0d0.js → index-02d4627c.js} +6 -6
- package/build/esm/{index-c0ec27ec.js → index-0357a651.js} +7 -7
- package/build/esm/{index-d2f9c84a.js → index-03624fb1.js} +2 -2
- package/build/esm/{index-c2a7e324.js → index-0608abbc.js} +2 -2
- package/build/esm/{index-2ede644d.js → index-081dae5f.js} +1 -1
- package/build/esm/{index-5da7e231.js → index-0844b1d6.js} +75 -76
- package/build/esm/{index-ae347057.js → index-0aaff6f5.js} +1 -1
- package/build/esm/index-0b2ea5eb.js +619 -0
- package/build/esm/{index-7ded1900.js → index-0ccd61e4.js} +5 -5
- package/build/esm/{index-2490d89f.js → index-0d10c97f.js} +15 -15
- package/build/esm/{index-8c4a0830.js → index-0de555c1.js} +105 -106
- package/build/esm/{index-cef87f79.js → index-0fd24245.js} +5 -5
- package/build/esm/{index-9d00fe76.js → index-1194e32c.js} +7 -8
- package/build/esm/{index-13f489c2.js → index-129d0098.js} +2 -2
- package/build/esm/{index-1959cee3.js → index-13568992.js} +2 -2
- package/build/esm/{index-5f628198.js → index-14e29308.js} +1 -1
- package/build/esm/{index-37eff5fa.js → index-153edab2.js} +2 -2
- package/build/esm/{index-94913e6f.js → index-18120539.js} +1 -1
- package/build/esm/{index-cf2c68f2.js → index-185c58fa.js} +79 -80
- package/build/esm/{index-3f6f913a.js → index-18c6e5d3.js} +7 -7
- package/build/esm/{index-5a894d44.js → index-19888e14.js} +2 -2
- package/build/esm/{index-fcfb5158.js → index-19f8a6f4.js} +3 -3
- package/build/esm/{index-c3e86bc3.js → index-1b75f288.js} +2 -2
- package/build/esm/{index-9c0a30d9.js → index-1c8079e0.js} +1 -1
- package/build/esm/{index-c58f9e26.js → index-1d5ed639.js} +1 -1
- package/build/esm/{index-b2a58d10.js → index-1e09fcad.js} +5 -5
- package/build/esm/{index-e1b245d2.js → index-1e65b654.js} +1 -1
- package/build/esm/{index-a8b362d9.js → index-1eae6fc2.js} +4 -4
- package/build/esm/index-1eeac6f3.js +67 -0
- package/build/esm/{index-0f3191ca.js → index-212d9b63.js} +1 -1
- package/build/esm/{index-9ec4630a.js → index-21e3eb75.js} +2 -2
- package/build/esm/{index-71b127ff.js → index-224ec2f5.js} +1 -1
- package/build/esm/{index-76425867.js → index-22bf68c3.js} +2 -2
- package/build/esm/{index-3d8cbe70.js → index-23ae2d37.js} +2 -2
- package/build/esm/{index-60ba120f.js → index-26df7b05.js} +6 -6
- package/build/esm/{index-17ffa12a.js → index-275aaf64.js} +2 -2
- package/build/esm/index-28305705.js +61 -0
- package/build/esm/{index-e68a1fbe.js → index-288cb1d8.js} +2 -2
- package/build/esm/{index-55dec981.js → index-2a51ef44.js} +71 -72
- package/build/esm/{index-fe277f14.js → index-2a9c3807.js} +1 -1
- package/build/esm/{index-61d75e95.js → index-2ab3ec97.js} +8 -8
- package/build/esm/{index-8fe33b88.js → index-2af138b1.js} +5 -5
- package/build/esm/{index-93ea5d5b.js → index-2b7194b4.js} +1 -1
- package/build/esm/{index-efb2f3ea.js → index-2f4a577a.js} +1 -1
- package/build/esm/{index-7aea7b9b.js → index-30c089fa.js} +86 -87
- package/build/esm/{index-bd01b439.js → index-30d6741c.js} +1 -1
- package/build/esm/{index-a1f629a0.js → index-31203531.js} +1 -1
- package/build/esm/{index-5e27f055.js → index-33d91566.js} +1 -1
- package/build/esm/{index-00169904.js → index-3405d0c1.js} +3 -3
- package/build/esm/{index-7f7e14cd.js → index-34a92da5.js} +1 -1
- package/build/esm/{index-b6ad0502.js → index-34e85486.js} +5 -5
- package/build/esm/{index-a5dc7730.js → index-35b6171f.js} +1 -1
- package/build/esm/{index-db2a19b2.js → index-37254806.js} +11 -11
- package/build/esm/{index-5c33b263.js → index-3898d741.js} +70 -70
- package/build/esm/{index-5b022cd3.js → index-38fcf6b0.js} +29 -29
- package/build/esm/index-39a91c29.js +175 -0
- package/build/esm/{index-092d0e45.js → index-3c44dd80.js} +5 -5
- package/build/esm/{index-46be1c1b.js → index-3c7c122d.js} +8 -8
- package/build/esm/{index-dc9d5349.js → index-3d0cc22c.js} +92 -93
- package/build/esm/index-3dbb4c10.js +192 -0
- package/build/esm/{index-f8a8e9ab.js → index-3f87e7c0.js} +5 -5
- package/build/esm/{index-e1d0f0ef.js → index-426cbc0f.js} +1 -1
- package/build/esm/{index-a99b71a8.js → index-4284dac6.js} +1 -1
- package/build/esm/{index-79b8b677.js → index-438aad37.js} +26 -26
- package/build/esm/{index-eac189ca.js → index-452536fd.js} +1 -1
- package/build/esm/{index-b7c47361.js → index-46335a52.js} +1 -1
- package/build/esm/{index-3e4b127f.js → index-46729ec9.js} +78 -76
- package/build/esm/{index-410c2e75.js → index-4715986d.js} +1 -1
- package/build/esm/{index-97da3418.js → index-4775c9b7.js} +3 -3
- package/build/esm/{index-9199a6a8.js → index-4843277a.js} +67 -67
- package/build/esm/{index-0b03f149.js → index-48794d08.js} +2 -2
- package/build/esm/{index-2564b522.js → index-4939cd1d.js} +1 -1
- package/build/esm/{index-ea8dc57a.js → index-4e108500.js} +1 -1
- package/build/esm/{index-64ae8e42.js → index-4f10109d.js} +1 -1
- package/build/esm/{index-4c059310.js → index-4f7ee853.js} +7 -7
- package/build/esm/{index-bf02b9f2.js → index-4f8a0259.js} +1 -1
- package/build/esm/{index-4817cb23.js → index-50a4595b.js} +26 -26
- package/build/esm/{index-7e5ae7ff.js → index-50caaf08.js} +2 -2
- package/build/esm/{index-7a0e88c2.js → index-55e291bd.js} +2 -2
- package/build/esm/{index-20c360ae.js → index-55f9a726.js} +1 -1
- package/build/esm/{index-d98168d1.js → index-566a8c1c.js} +1 -1
- package/build/esm/{index-4a5c92c0.js → index-56de7a59.js} +2 -2
- package/build/esm/{index-f4ff1ff1.js → index-579d017d.js} +1 -1
- package/build/esm/{index-69360ce7.js → index-5858f187.js} +2 -2
- package/build/esm/{index-e31a3c97.js → index-59814101.js} +2 -2
- package/build/esm/{index-3c213b6a.js → index-5a4a139c.js} +4 -4
- package/build/esm/{index-b5dc4d78.js → index-5ab582bc.js} +2 -2
- package/build/esm/index-5f62c915.js +543 -0
- package/build/esm/{index-387d57db.js → index-5f69fd68.js} +10 -10
- package/build/esm/{index-6e85d210.js → index-60452194.js} +2 -2
- package/build/esm/{index-99383c3e.js → index-605254d4.js} +3 -3
- package/build/esm/{index-72534942.js → index-60730f2d.js} +2 -2
- package/build/esm/{index-f42c2092.js → index-610955de.js} +3 -3
- package/build/esm/index-614e2fa9.js +94 -0
- package/build/esm/{index-0d3cf3b2.js → index-617e712e.js} +1 -1
- package/build/esm/{index-9a49c2cf.js → index-626787a7.js} +1 -1
- package/build/esm/{index-754e4393.js → index-6324b730.js} +1 -1
- package/build/esm/{index-5076e7cd.js → index-66154577.js} +69 -70
- package/build/esm/{index-2f445052.js → index-672ae9a6.js} +1 -1
- package/build/esm/{index-a584dfa2.js → index-681f07a2.js} +1 -1
- package/build/esm/{index-d0c3efbc.js → index-68d62bbb.js} +2 -2
- package/build/esm/{index-0c247d1b.js → index-69915de6.js} +7 -7
- package/build/esm/index-6a9eb63e.js +74 -0
- package/build/esm/{index-de51cd68.js → index-6ad04a3b.js} +1 -1
- package/build/esm/{index-5a715d6c.js → index-6c76ac1b.js} +1 -1
- package/build/esm/{index-da80607f.js → index-6dc9d9d1.js} +1 -1
- package/build/esm/{index-d5afc4e2.js → index-6e84e2eb.js} +8 -8
- package/build/esm/{index-6165fd55.js → index-70b757a3.js} +1 -1
- package/build/esm/{index-6f2e9a56.js → index-71271f3b.js} +6 -6
- package/build/esm/{index-2834bd37.js → index-72cc87f5.js} +5 -5
- package/build/esm/{index-52359456.js → index-72d2920d.js} +68 -68
- package/build/esm/{index-8024ae17.js → index-7368a2e0.js} +3 -3
- package/build/esm/{index-3c75a86f.js → index-74593187.js} +2 -2
- package/build/esm/{index-e5a02744.js → index-753eb563.js} +23 -23
- package/build/esm/{index-1b99c18d.js → index-75c57528.js} +2 -2
- package/build/esm/{index-6b027e51.js → index-75dd087b.js} +5 -5
- package/build/esm/{index-9b5f13f9.js → index-76ec32a8.js} +1 -1
- package/build/esm/{index-df75bab4.js → index-7951cfe7.js} +8 -8
- package/build/esm/{index-ac2c2cc6.js → index-7b963616.js} +1 -1
- package/build/esm/{index-2eec4bb7.js → index-7bb505b6.js} +1 -1
- package/build/esm/{index-9c71bf01.js → index-7f4ffa75.js} +1 -1
- package/build/esm/{index-62de59f8.js → index-7fb1bfce.js} +2 -2
- package/build/esm/{index-53233c9c.js → index-808700b1.js} +5 -4
- package/build/esm/{index-d325ca50.js → index-820e772c.js} +1 -1
- package/build/esm/{index-04395fbc.js → index-83979d9a.js} +1 -1
- package/build/esm/{index-5fd617e4.js → index-856248cd.js} +2 -2
- package/build/esm/{index-c1b6f4d6.js → index-85b5a4fe.js} +1 -1
- package/build/esm/{index-1b8e9925.js → index-895e5627.js} +90 -91
- package/build/esm/{index-4c869d0f.js → index-8975a988.js} +5 -5
- package/build/esm/index-89955166.js +363 -0
- package/build/esm/{index-d6941f3d.js → index-8a3bb056.js} +72 -73
- package/build/esm/{index-0d883c67.js → index-8a83966a.js} +1 -1
- package/build/esm/{index-36e874e1.js → index-8cd4d4bf.js} +3 -3
- package/build/esm/{index-dec305a9.js → index-8eb3131f.js} +73 -74
- package/build/esm/{index-adfe1f0d.js → index-9115ae72.js} +1 -1
- package/build/esm/{index-dd9ba127.js → index-913d8f61.js} +1 -1
- package/build/esm/{index-5001ce9d.js → index-913efaff.js} +1 -1
- package/build/esm/{index-e166e0da.js → index-929ba1e1.js} +2 -2
- package/build/esm/{index-989bfa05.js → index-9414ef2f.js} +5 -5
- package/build/esm/{index-7f544afc.js → index-943e494d.js} +2 -2
- package/build/esm/{index-2d1d8f3d.js → index-948bb390.js} +38 -25
- package/build/esm/{index-9768b783.js → index-948e598b.js} +2 -2
- package/build/esm/{index-23f6d0e5.js → index-966de012.js} +1 -1
- package/build/esm/{index-39cf1df9.js → index-968c5fe0.js} +1 -1
- package/build/esm/{index-c3f65807.js → index-96c96562.js} +4 -4
- package/build/esm/{index-baa58d21.js → index-98bbff3a.js} +1 -1
- package/build/esm/{index-3cb444da.js → index-9943b5cb.js} +1 -1
- package/build/esm/{index-683adb31.js → index-9ac6b1df.js} +1 -1
- package/build/esm/{index-57b9f468.js → index-9c826eb2.js} +3 -3
- package/build/esm/{index-67ba8dce.js → index-9e3cccb1.js} +1 -1
- package/build/esm/{index-c1ae5cc4.js → index-9e77dfd3.js} +2 -2
- package/build/esm/{index-fc240bd0.js → index-9ed3befa.js} +3 -3
- package/build/esm/{index-699421e9.js → index-9f43ea78.js} +3 -3
- package/build/esm/{index-2048ccc4.js → index-9fe0ce2e.js} +93 -94
- package/build/esm/index-a0410e76.js +292 -0
- package/build/esm/{index-c47e7270.js → index-a0ebd85f.js} +1 -1
- package/build/esm/{index-1eb644db.js → index-a119aa50.js} +92 -93
- package/build/esm/{index-0bdf2232.js → index-a34f5441.js} +1 -1
- package/build/esm/{index-5a16d5da.js → index-a3ae0905.js} +17 -17
- package/build/esm/{index-9d1bc1a9.js → index-a3c118b2.js} +3 -3
- package/build/esm/{index-40f96bb4.js → index-a48a67de.js} +2 -2
- package/build/esm/{index-ca62e322.js → index-a576d1f1.js} +1 -1
- package/build/esm/{index-758ab36c.js → index-a6d8728e.js} +1 -1
- package/build/esm/{index-beef213d.js → index-a6e79ba6.js} +1 -1
- package/build/esm/{index-9f99930d.js → index-a826d957.js} +67 -67
- package/build/esm/{index-35ff36fd.js → index-a8cd3dc1.js} +6 -6
- package/build/esm/{index-dc79d609.js → index-a90e822c.js} +1 -1
- package/build/esm/{index-64f0534c.js → index-aa229ad4.js} +20 -20
- package/build/esm/{index-0ba8c6e6.js → index-aa3ab4b6.js} +1 -1
- package/build/esm/{index-253f892a.js → index-aac5f2dd.js} +1 -1
- package/build/esm/index-ab40aeda.js +313 -0
- package/build/esm/{index-5fa5f369.js → index-abc72049.js} +2 -2
- package/build/esm/{index-252770cf.js → index-ac119671.js} +1 -1
- package/build/esm/{index-6c2e560d.js → index-ac18613e.js} +1 -1
- package/build/esm/{index-285c5697.js → index-ac27dc8b.js} +2 -2
- package/build/esm/{index-c8ec9c6a.js → index-ac61c717.js} +1 -1
- package/build/esm/{index-69d7ab1b.js → index-ae02a692.js} +2 -2
- package/build/esm/{index-bed9dbf6.js → index-ae139a8a.js} +3 -3
- package/build/esm/{index-3693957f.js → index-aebad679.js} +2 -2
- package/build/esm/{index-8b0f5611.js → index-af937e38.js} +3 -3
- package/build/esm/{index-dc99d6fb.js → index-b061f510.js} +20 -20
- package/build/esm/{index-6881bbde.js → index-b0e56499.js} +3 -3
- package/build/esm/{index-ef3da2b9.js → index-b1796ad4.js} +1 -1
- package/build/esm/{index-360f2df1.js → index-b1eedec2.js} +1 -1
- package/build/esm/{index-4f012438.js → index-b2a17738.js} +70 -71
- package/build/esm/{index-e49ca1df.js → index-b2f56ce7.js} +1 -1
- package/build/esm/{index-01138ee1.js → index-b5cc3619.js} +2 -2
- package/build/esm/{index-d6484f81.js → index-b60b516b.js} +5 -5
- package/build/esm/{index-0f662d7b.js → index-b6366bfc.js} +2 -2
- package/build/esm/{index-3209b40d.js → index-b94c45e2.js} +1 -1
- package/build/esm/{index-cd53d91d.js → index-b9d00e2e.js} +20 -20
- package/build/esm/{index-c4a2cc9b.js → index-ba612680.js} +3 -3
- package/build/esm/{index-f1b95450.js → index-bba1da29.js} +134 -141
- package/build/esm/{index-9788abaf.js → index-bc58f4dc.js} +11 -11
- package/build/esm/{index-27d7bff3.js → index-bd409924.js} +1 -1
- package/build/esm/{index-69b4574f.js → index-bd7a2502.js} +18 -18
- package/build/esm/{index-e553798a.js → index-becd79dc.js} +1 -1
- package/build/esm/{index-46e88edd.js → index-beea7e3b.js} +495 -357
- package/build/esm/{index-ea3c47ce.js → index-c0b23cd9.js} +1 -1
- package/build/esm/{index-2be9db73.js → index-c48c3d08.js} +6 -6
- package/build/esm/{index-7d973d4c.js → index-c526c758.js} +75 -76
- package/build/esm/{index-2e124672.js → index-c56d5ed1.js} +1 -1
- package/build/esm/index-c5c861fc.js +164 -0
- package/build/esm/{index-ed3d44f3.js → index-c63833ad.js} +1 -1
- package/build/esm/{index-922eb980.js → index-c702e8f6.js} +1 -1
- package/build/esm/{index-1da801fd.js → index-c72c5ee3.js} +2 -2
- package/build/esm/{index-829fae48.js → index-c7529e61.js} +5 -5
- package/build/esm/{index-4f37e067.js → index-c9255d56.js} +1 -1
- package/build/esm/{index-3aca3338.js → index-c9d2925f.js} +7 -7
- package/build/esm/{index-dbb54481.js → index-caf12cc6.js} +2 -2
- package/build/esm/{index-593eb56d.js → index-cc30fd0c.js} +1 -1
- package/build/esm/{index-207a6de1.js → index-cc77d296.js} +3 -3
- package/build/esm/{index-aa1cea63.js → index-cc98c005.js} +1 -1
- package/build/esm/{index-bffc28bf.js → index-cd115f2d.js} +1 -1
- package/build/esm/{index-f8d0a860.js → index-cd3af274.js} +1 -1
- package/build/esm/{index-037945a4.js → index-d08885a7.js} +1 -1
- package/build/esm/{index-0e322755.js → index-d106fe8d.js} +1 -1
- package/build/esm/{index-b098395c.js → index-d1684dfc.js} +1 -1
- package/build/esm/{index-653b10a5.js → index-d3b36e90.js} +1 -1
- package/build/esm/{index-a93eed17.js → index-d417db84.js} +6 -6
- package/build/esm/{index-0837815d.js → index-d505ddcd.js} +111 -139
- package/build/esm/{index-b7e75ab1.js → index-d52db8c3.js} +1 -1
- package/build/esm/{index-33e8739c.js → index-d5f2d078.js} +2 -2
- package/build/esm/{index-118c20b5.js → index-d677a98e.js} +1 -1
- package/build/esm/{index-d159e9ab.js → index-d7cdf615.js} +10 -10
- package/build/esm/{index-b3cca1c4.js → index-d8499138.js} +1 -1
- package/build/esm/{index-b43c0dcc.js → index-d93c2b1b.js} +2 -2
- package/build/esm/{index-bccc24f3.js → index-da83e9f8.js} +5 -5
- package/build/esm/{index-3b87ced7.js → index-dc55fc6c.js} +1 -1
- package/build/esm/{index-b77ed4ff.js → index-dd16f37b.js} +1 -1
- package/build/esm/{index-342040d4.js → index-dd1d6b7c.js} +72 -73
- package/build/esm/{index-c56ace0a.js → index-dd261ee1.js} +1 -1
- package/build/esm/{index-ed34fbca.js → index-de201674.js} +106 -107
- package/build/esm/{index-31f58b67.js → index-de7a6dff.js} +1 -1
- package/build/esm/{index-18dba2b3.js → index-df277946.js} +19 -19
- package/build/esm/{index-a8a66fc8.js → index-df51ed1f.js} +4 -4
- package/build/esm/{index-0c3061c1.js → index-e26eee65.js} +1 -1
- package/build/esm/{index-e83f60b1.js → index-e7a9863f.js} +1 -1
- package/build/esm/{index-fb952fec.js → index-ebb54df2.js} +2 -2
- package/build/esm/{index-478fd42c.js → index-ec216124.js} +1 -1
- package/build/esm/{index-293a4c82.js → index-edc3de12.js} +1 -1
- package/build/esm/{index-84b0f982.js → index-ede8e555.js} +2 -2
- package/build/esm/{index-effa1e75.js → index-ef47a763.js} +3 -3
- package/build/esm/{index-61c6558a.js → index-f0464002.js} +7 -7
- package/build/esm/{index-737aebaa.js → index-f0ceadd8.js} +2 -2
- package/build/esm/{index-04def368.js → index-f4138ed8.js} +1 -1
- package/build/esm/{index-14f72024.js → index-f6b946dd.js} +6 -6
- package/build/esm/{index-e865ef8c.js → index-f8821308.js} +1 -1
- package/build/esm/{index-5b71c1c0.js → index-f891f148.js} +1 -1
- package/build/esm/{index-d40dc515.js → index-f95b13a8.js} +3 -3
- package/build/esm/{index-ecd5202d.js → index-f98103db.js} +8 -8
- package/build/esm/{index-69e78ec6.js → index-facec26f.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/index.module-10ef8efd.js +18 -0
- package/build/esm/{index.module-0402c81d.js → index.module-2075c7e6.js} +1 -1
- package/build/esm/{index.module-5df4dc22.js → index.module-214b139d.js} +1 -1
- package/build/esm/{index.module-b3ab5003.js → index.module-26100ba6.js} +1 -1
- package/build/esm/{index.module-ad77c32b.js → index.module-2ba8e0a1.js} +1 -1
- package/build/esm/{index.module-0a1615dd.js → index.module-498ae038.js} +1 -1
- package/build/esm/{index.module-d26583d8.js → index.module-4a7ecdbc.js} +1 -1
- package/build/esm/{index.module-2b91f219.js → index.module-902b832a.js} +1 -1
- package/build/esm/{index.module-8a415dfc.js → index.module-997fb0a0.js} +1 -1
- package/build/esm/{index.module-f4737e56.js → index.module-9ec3692b.js} +2 -2
- package/build/esm/{index.module-c9e73073.js → index.module-a78fa49d.js} +1 -1
- package/build/esm/{index.module-3a50623b.js → index.module-e6c7cf34.js} +1 -1
- package/build/esm/{index.module-df51a3b0.js → index.module-f39a010f.js} +2 -2
- package/build/esm/{react-json-viewer-64c097c0.js → react-json-viewer-cd9bc7d1.js} +1 -1
- package/build/esm/{useCustomDimensions-c0a7b1c6.js → useCustomDimensions-f9400665.js} +1 -1
- package/build/esm/{ussIsSticky-25da915b.js → ussIsSticky-bfc91c35.js} +1 -1
- package/build/types/web-planner-react/src/components/Action/Navigation/wysiwyg/index.d.ts +13 -0
- package/build/types/web-planner-react/src/components/Action/Navigation/wysiwyg/index.d.ts.map +1 -0
- package/build/types/web-planner-react/src/components/Layout/wysiwyg/Toolbar/FloatingWindow/index.d.ts +11 -0
- package/build/types/web-planner-react/src/components/Layout/wysiwyg/Toolbar/FloatingWindow/index.d.ts.map +1 -0
- package/build/types/web-planner-react/src/components/Layout/wysiwyg/Toolbar/ToolContainer/index.d.ts +2 -2
- package/build/types/web-planner-react/src/components/Layout/wysiwyg/Toolbar/ToolContainer/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Layout/wysiwyg/Toolbar/index.d.ts +2 -2
- package/build/types/web-planner-react/src/components/Layout/wysiwyg/Toolbar/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Layout/wysiwyg/Toolbar/types.d.ts +8 -0
- package/build/types/web-planner-react/src/components/Layout/wysiwyg/Toolbar/types.d.ts.map +1 -0
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/ArticleSelector/index.d.ts +6 -2
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/ArticleSelector/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/DecisionAnalyzer/DecisionVizualizer.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/DecisionAnalyzer/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/ErrorAndWarningOverview/index.d.ts +8 -0
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/ErrorAndWarningOverview/index.d.ts.map +1 -0
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/OptionTreeTable/index.d.ts +8 -0
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/OptionTreeTable/index.d.ts.map +1 -0
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PartlistDebug/index.d.ts.map +1 -0
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PriceAnalyzer/index.d.ts +0 -1
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PriceAnalyzer/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Product/Product/catalog/index.d.ts +1 -1
- package/build/types/web-planner-react/src/components/Product/Product/catalog/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/InspectModeTables/index.d.ts +10 -0
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/InspectModeTables/index.d.ts.map +1 -0
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItemsWrapper/SettingsItemsGroup/index.d.ts +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItemsWrapper/SettingsItemsGroup/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/TabGroup/TabGroupHorizontal/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/TabGroup/TabGroupHorizontal/item/wysiwyg/index.d.ts +7 -0
- package/build/types/web-planner-react/src/components/TabGroup/TabGroupHorizontal/item/wysiwyg/index.d.ts.map +1 -0
- package/build/types/web-planner-react/src/model/DivaViewHandler.d.ts +2 -0
- package/build/types/web-planner-react/src/model/DivaViewHandler.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/States/UIState/Product/index.d.ts +5 -3
- package/build/types/web-planner-react/src/model/States/UIState/Product/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/States/UIState/WysiwygDebug/index.d.ts +19 -0
- package/build/types/web-planner-react/src/model/States/UIState/WysiwygDebug/index.d.ts.map +1 -0
- package/build/types/web-planner-react/src/model/States/UIState/index.d.ts +1 -0
- package/build/types/web-planner-react/src/model/States/UIState/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/TabGroup/ConfiguratorStructureHandler.d.ts.map +1 -1
- package/build/umd/101.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/101.diva-web-planner-react.umd.min.js.LICENSE.txt +3 -0
- package/build/umd/102.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1026.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1026.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1036.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1051.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1063.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1084.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1087.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1090.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1222.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1280.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1325.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1341.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1355.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1389.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1401.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1424.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1442.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1451.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1500.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1500.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/152.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1532.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1532.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1596.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1666.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1691.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/173.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1849.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1862.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1912.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1932.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1954.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/197.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2018.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2027.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2037.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2072.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2077.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2147.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2164.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/225.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2258.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2276.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2300.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2300.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2334.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/241.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2458.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2508.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2515.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2576.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2654.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2762.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/283.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2903.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2958.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2963.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/304.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/304.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3090.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3222.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/324.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3337.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3401.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3439.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3439.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3443.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3448.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3492.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3516.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/357.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/357.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3628.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3655.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3695.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3704.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3743.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/375.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/379.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/379.diva-web-planner-react.umd.min.js.LICENSE.txt +11 -0
- package/build/umd/3812.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3836.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3907.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/393.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3999.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4033.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4039.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4209.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4295.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4301.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4342.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4391.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4551.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4580.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4585.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4635.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4846.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4864.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4864.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4882.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4903.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4906.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4906.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4946.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4955.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5047.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5071.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/509.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5111.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5115.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5234.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5249.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5301.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5406.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5414.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5629.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5631.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5631.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5713.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5740.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5768.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5768.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5769.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5785.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/58.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/58.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5861.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5896.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5979.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6014.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/610.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6135.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6210.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6253.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6281.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6335.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6340.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6343.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6500.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/651.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6552.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6557.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6567.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6587.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6599.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6659.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6669.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6748.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6748.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6800.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/685.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/685.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6871.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6882.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6927.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6937.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6942.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6944.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6952.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6964.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6992.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7000.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/703.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/704.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7052.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/710.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7118.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7139.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7139.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7173.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7173.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7318.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7391.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7419.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7442.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7455.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7507.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7519.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7522.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7522.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7541.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7577.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7678.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7678.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7707.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7745.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7749.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7762.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7771.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7853.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7867.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7867.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7871.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7970.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7979.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8063.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8072.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8101.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8133.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8151.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8188.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8265.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8291.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/830.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8317.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8345.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8401.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8488.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8508.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8508.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8509.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8515.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/852.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8535.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8539.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8544.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/858.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8584.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/859.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8648.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8657.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8717.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8742.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8850.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8881.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8887.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8906.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8938.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8942.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8948.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/896.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8976.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/902.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9106.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9106.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9154.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9165.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9195.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9195.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/921.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9211.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9290.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9291.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9298.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9325.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9342.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9429.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9501.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9587.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9607.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9631.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9662.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9694.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9704.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9706.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9715.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9783.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9783.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9788.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9874.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9967.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9990.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +18 -8
- package/build/esm/DecisionVizualizer-fac82fbe.js +0 -279
- package/build/esm/index-02af21a0.js +0 -132
- package/build/esm/index-38e19c79.js +0 -105
- package/build/esm/index-59cb3b60.js +0 -57
- package/build/esm/index-758d7453.js +0 -195
- package/build/esm/index-8d57c2e7.js +0 -206
- package/build/esm/index-f11f8644.js +0 -179
- package/build/esm/index.module-ad53ab73.js +0 -18
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/MaskEditor/index.d.ts.map +0 -1
- package/build/umd/1645.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1645.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2210.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2210.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2602.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2602.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/325.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/325.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3460.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3460.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3756.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3756.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4074.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4074.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6547.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6547.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6916.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6916.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7415.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7415.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7446.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7446.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9689.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9689.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- /package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/{MaskEditor → PartlistDebug}/index.d.ts +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 8508.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[8508],{12793:(e,t,o)=>{o.d(t,{$4t:()=>_getGridRegisteredModules,$Yu:()=>_getRowSpanContainerClass,AS9:()=>m,DMj:()=>_getGridOption,F5b:()=>_warn,F97:()=>_combineAttributesAndGridOptions,FN9:()=>_setAriaColCount,HB1:()=>_getActiveDomElement,HGE:()=>ut,Jct:()=>hs,KxL:()=>_removeAriaSort,Nk3:()=>Ul,O3h:()=>A,OpL:()=>_observeResize,OtO:()=>_setAriaRowCount,RiB:()=>vo,TjA:()=>_getRowContainerOptions,TsN:()=>vt,UgJ:()=>_processOnChange,Z_J:()=>_toString,_P_:()=>Xt,b4l:()=>_getRowContainerClass,ea9:()=>zl,fRQ:()=>Ce,gA7:()=>dt,gCM:()=>_setAriaSort,iVQ:()=>Qt,ir9:()=>ts,j_S:()=>me,jie:()=>_isServerSideRowModel,l3s:()=>xo,qYz:()=>_isClientSideRowModel,s$r:()=>$l,tEj:()=>_findEnterpriseCoreModule,taW:()=>_removeFromParent,vA3:()=>Nn,wox:()=>So,xGN:()=>_getRowViewportClass,zmG:()=>Bn,zn:()=>yo});var i=o(25108);Object.freeze([]);function _last(e){if(e?.length)return e[e.length-1]}function _areEqual(e,t,o){if(e===t)return!0;if(!e||!t)return null==e&&null==t;const i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s]&&!o?.(e[s],t[s]))return!1;return!0}function _forAll(e,t){if(e)for(const o of e)if(t(o))return!0}function _removeFromArray(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function _moveInArray(e,t,o){for(let o=0;o<t.length;o++)_removeFromArray(e,t[o]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var _makeNull=e=>null==e||""===e?null:e;function _exists(e){return null!=e&&""!==e}function _missing(e){return!_exists(e)}var _toStringOrNull=e=>null!=e&&"function"==typeof e.toString?e.toString():null,_jsonEquals=(e,t)=>(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null),_defaultComparator=(e,t,o=!1)=>null==e?null==t?0:-1:null==t?1:("object"==typeof e&&e.toNumber&&(e=e.toNumber()),"object"==typeof t&&t.toNumber&&(t=t.toNumber()),o&&"string"==typeof e?e.localeCompare(t):e>t?1:e<t?-1:0),s=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,o){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&o&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const i=this.getListeners(e,o,!1);i&&(i.delete(t),0===i.size&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}const{frameworkOverrides:i}=this,runCallback=e=>{const o=i?()=>i.wrapIncoming(e):e;t?this.dispatchAsync(o):o()},s=this.getListeners(o,t,!1);if((s?.size??0)>0){const t=new Set(s);for(const o of t)s?.has(o)&&runCallback((()=>o(e)))}const n=this.getGlobalListeners(t);if(n.size>0){const t=new Set(n);for(const i of t)runCallback((()=>i(o,e)))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const flush=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},e=this.frameworkOverrides;e?e.wrapIncoming(flush):flush(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},n=/[&<>"']/g,r={"&":"&","<":"<",">":">",'"':""","'":"'"};function _toString(e){return e?.toString().toString()??null}function _escapeString(e){return _toString(e)?.replace(n,(e=>r[e]))??null}function _isExpressionString(e){return"string"==typeof e&&e.startsWith("=")&&e.length>1}function _getRootNode(e){return e.eRootDiv.getRootNode()}function _getActiveDomElement(e){return _getRootNode(e).activeElement}function _getDocument(e){const{gos:t,eRootDiv:o}=e;let i=null;const s=t.get("getDocument");return s&&_exists(s)?i=s():o&&(i=o.ownerDocument),i&&_exists(i)?i:document}function _isNothingFocused(e){const t=_getActiveDomElement(e);return null===t||t===_getDocument(e).body}function _getWindow(e){return _getDocument(e).defaultView||window}function _getPageBody(e){let t=null,o=null;try{t=_getDocument(e).fullscreenElement}catch(e){}finally{t||(t=_getRootNode(e));const i=t.querySelector("body");o=i||(t instanceof ShadowRoot?t:t instanceof Document?t?.documentElement:t)}return o}function _toggleAriaAttribute(e,t,o){null==o||"string"==typeof o&&""==o?_removeAriaAttribute(e,t):_setAriaAttribute(e,t,o)}function _setAriaAttribute(e,t,o){e.setAttribute(_ariaAttributeName(t),o.toString())}function _removeAriaAttribute(e,t){e.removeAttribute(_ariaAttributeName(t))}function _ariaAttributeName(e){return`aria-${e}`}function _setAriaRole(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function _setAriaLabel(e,t){_toggleAriaAttribute(e,"label",t)}function _setAriaLabelledBy(e,t){_toggleAriaAttribute(e,"labelledby",t)}function _setAriaLive(e,t){_toggleAriaAttribute(e,"live",t)}function _setAriaInvalid(e,t){_toggleAriaAttribute(e,"invalid",t)}function _setAriaHidden(e,t){_toggleAriaAttribute(e,"hidden",t)}function _setAriaExpanded(e,t){_setAriaAttribute(e,"expanded",t)}function _setAriaRowCount(e,t){_setAriaAttribute(e,"rowcount",t)}function _setAriaRowIndex(e,t){_setAriaAttribute(e,"rowindex",t)}function _setAriaColCount(e,t){_setAriaAttribute(e,"colcount",t)}function _setAriaColIndex(e,t){_setAriaAttribute(e,"colindex",t)}function _setAriaSort(e,t){_setAriaAttribute(e,"sort",t)}function _removeAriaSort(e){_removeAriaAttribute(e,"sort")}function _setAriaSelected(e,t){_toggleAriaAttribute(e,"selected",t)}function _setAriaControlsAndLabel(e,t){!function _setAriaControls(e,t){_toggleAriaAttribute(e,"controls",t)}(e,t.id),_setAriaLabelledBy(t,e.id)}function _setAriaOwns(e,t){_toggleAriaAttribute(e,"owns",t)}function _getAriaCheckboxStateName(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var a="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function _isFocusableFormField(e){if(!e)return!1;if(!e.matches("input, select, button, textarea"))return!1;return!!e.matches(a)&&_isVisible(e)}function _setDisplayed(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||_setAriaHidden(e,!t)}function _setDisabled(e,t){const o="disabled",i=t?e=>e.setAttribute(o,""):e=>e.removeAttribute(o);i(e);const s=e.querySelectorAll("input")??[];for(const e of s)i(e)}function _isElementChildOfClass(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof o){if(++i>o)break}else if(e===o)break}return!1}function _getElementSize(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:m}=window.getComputedStyle(e),f=Number.parseFloat;return{height:f(t||"0"),width:f(o||"0"),borderTopWidth:f(i||"0"),borderRightWidth:f(s||"0"),borderBottomWidth:f(n||"0"),borderLeftWidth:f(r||"0"),paddingTop:f(a||"0"),paddingRight:f(l||"0"),paddingBottom:f(d||"0"),paddingLeft:f(c||"0"),marginTop:f(u||"0"),marginRight:f(h||"0"),marginBottom:f(g||"0"),marginLeft:f(p||"0"),boxSizing:m}}function _getInnerHeight(e){const t=_getElementSize(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function _getInnerWidth(e){const t=_getElementSize(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function _getAbsoluteHeight(e){const{height:t,marginBottom:o,marginTop:i}=_getElementSize(e);return Math.floor(t+o+i)}function _getAbsoluteWidth(e){const{width:t,marginLeft:o,marginRight:i}=_getElementSize(e);return Math.floor(t+o+i)}function _getElementRectWithOffset(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:n}=_getElementSize(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function _getScrollLeft(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function _setScrollLeft(e,t,o){o&&(t*=-1),e.scrollLeft=t}function _clearElement(e){for(;e?.firstChild;)e.firstChild.remove()}function _removeFromParent(e){e?.parentNode&&e.remove()}function _isInDOM(e){return!!e.offsetParent}function _isVisible(e){if(e.checkVisibility)return e.checkVisibility({checkVisibilityCSS:!0});return!(!_isInDOM(e)||"visible"!==window.getComputedStyle(e).visibility)}function _loadTemplate(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function _isElementOverflowingCallback(e){return()=>{const t=e();return!t||(_isHorizontalScrollShowing(t)||function _isVerticalScrollShowing(e){return e.clientHeight<e.scrollHeight}(t))}}function _isHorizontalScrollShowing(e){return e.clientWidth<e.scrollWidth}function _setElementWidth(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):_setFixedWidth(e,t)}function _setFixedWidth(e,t){t=_formatSize(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function _setFixedHeight(e,t){t=_formatSize(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function _formatSize(e){return"number"==typeof e?`${e}px`:e}function _isNodeOrElement(e){return e instanceof Node||e instanceof HTMLElement}function _addOrRemoveAttribute(e,t,o){null==o||""===o?e.removeAttribute(t):e.setAttribute(t,o.toString())}function _observeResize(e,t,o){const i=_getWindow(e).ResizeObserver,s=i?new i(o):null;return s?.observe(t),()=>s?.disconnect()}function _requestAnimationFrame(e,t){const o=_getWindow(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var l,d="data-ref";function getWhitespaceNode(){return l??(l=document.createTextNode(" ")),l.cloneNode()}function _createAgElement(e){const{attrs:t,children:o,cls:i,ref:s,role:n,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute(d,s),n&&a.setAttribute("role",n),t)for(const e of Object.keys(t))a.setAttribute(e,t[e]);if(o)if("string"==typeof o)a.textContent=o;else{let e=!0;for(const t of o)t&&("string"==typeof t?(a.appendChild(document.createTextNode(t)),e=!1):"function"==typeof t?a.appendChild(t()):(e&&(a.appendChild(getWhitespaceNode()),e=!1),a.append(_createAgElement(t)),a.appendChild(getWhitespaceNode())))}return a}var c=["touchstart","touchend","touchmove","touchcancel","scroll"],u=["wheel"],h={},g=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if("boolean"==typeof h[t])return h[t];const o=document.createElement(e[t]||"div");return h[t="on"+t]=t in o}})();function _isElementInEventPath(e,t){return!(!t||!e)&&function _getEventPath(e){const t=e;if(t.path)return t.path;if(t.composedPath)return t.composedPath();return function _createEventPath(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}(t)}(t).indexOf(e)>=0}var getPassiveStateForEvent=e=>{const t=c.includes(e),o=u.includes(e);return!!t||!o&&void 0};function _areEventsNear(e,t,o){if(0===o)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=o}var _getFirstActiveTouch=(e,t)=>{const o=e.identifier;for(let e=0,i=t.length;e<i;++e){const i=t[e];if(i.identifier===o)return i}return null};function _isEventFromThisInstance(e,t){return e.gos.isElementInThisInstance(t.target)}function _anchorElementToMouseMoveEvent(e,t,o){const i=e.getBoundingClientRect().height,s=function _getBodyWidth(e){return _getPageBody(e)?.clientWidth??(window.innerWidth||-1)}(o)-2,n=function _getBodyHeight(e){return _getPageBody(e)?.clientHeight??(window.innerHeight||-1)}(o)-2;if(!e.offsetParent)return;const r=_getElementRectWithOffset(e.offsetParent),{clientY:a,clientX:l}=t;let d=a-r.top-i/2,c=l-r.left-10;const u=_getDocument(o),h=u.defaultView||window,g=h.pageYOffset||u.documentElement.scrollTop,p=h.pageXOffset||u.documentElement.scrollLeft;s>0&&c+e.clientWidth>s+p&&(c=s+p-e.clientWidth),c<0&&(c=0),n>0&&d+e.clientHeight>n+g&&(d=n+g-e.clientHeight),d<0&&(d=0),e.style.left=`${c}px`,e.style.top=`${d}px`}var addTempEventHandlers=(e,...t)=>{for(const o of t){const[t,i,s,n]=o;t.addEventListener(i,s,n),e.push(o)}},clearTempEventHandlers=e=>{if(e){for(const[t,o,i,s]of e)t.removeEventListener(o,i,s);e.length=0}},preventEventDefault=e=>{e.cancelable&&e.preventDefault()};function defaultLocaleTextFunc(e,t){return t}function _getLocaleTextFunc(e){return e?.getLocaleTextFunc()??defaultLocaleTextFunc}var p=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,o){this.localEventService||(this.localEventService=new s),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService?.removeEventListener(e,t,o)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const o=[];for(const i of Object.keys(t)){const s=t[i];s&&o.push(this._setupListener(e,i,s))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let i;if(function isAgEventEmitter(e){return void 0!==e.__addEventListener}(e))e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null);else{const s=function isEventService(e){return"global"===e.eventServiceType}(e);e instanceof HTMLElement?function _addSafePassiveEventListener(e,t,o){const i=getPassiveStateForEvent(t);let s;null!=i&&(s={passive:i}),e.addEventListener(t,o,s)}(e,t,o):s?e.addListener(t,o):e.addEventListener(t,o),i=s?()=>(e.removeListener(t,o),null):()=>(e.removeEventListener(t,o),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter((e=>e!==i)),null)}setupPropertyListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const destroyFunc=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(destroyFunc),()=>(destroyFunc(),this.destroyFunctions=this.destroyFunctions.filter((e=>e!==destroyFunc)),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const o=e.join("-")+this.propertyListenerId++,wrappedListener=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=e.changeSet.id}const i={type:"propertyChanged",changeSet:e.changeSet,source:e.source};t(i)};for(const t of e)this.setupPropertyListener(t,wrappedListener)}getLocaleTextFunc(){return _getLocaleTextFunc(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o}createBean(e,t,o){return(t||this.stubContext).createBean(e,o)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};var m=class extends p{},f=new Set,_doOnce=(e,t)=>{f.has(t)||(f.add(t),e())};_doOnce._set=f;var C={pending:!1,funcs:[]},w={pending:!1,funcs:[]};function _batchCall(e,t="setTimeout",o){const i="raf"===t?w:C;if(i.funcs.push(e),i.pending)return;i.pending=!0;const runBatch=()=>{const e=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const t of e)t()};"raf"===t?_requestAnimationFrame(o,runBatch):window.setTimeout(runBatch,0)}function _debounce(e,t,o){let i;return function(...s){const n=this;return window.clearTimeout(i),i=window.setTimeout((function(){e.isAlive()&&t.apply(n,s)}),o),i}}function _throttle(e,t){let o=0;return function(...i){const s=Date.now();s-o<t||(o=s,e.apply(this,i))}}var v=new Set(["__proto__","constructor","prototype"]);function _mergeDeep(e,t,o=!0,i=!1){_exists(t)&&function _iterateObject(e,t){if(null!=e)if(Array.isArray(e))for(let o=0;o<e.length;o++)t(o.toString(),e[o]);else for(const o of Object.keys(e).filter((e=>!v.has(e))))t(o,e[o])}(t,((t,s)=>{let n=e[t];if(n!==s){if(i){if(null==n&&null!=s){"object"==typeof s&&s.constructor===Object&&(n={},e[t]=n)}}_isNonNullObject(s)&&_isNonNullObject(n)&&!Array.isArray(n)?_mergeDeep(n,s,o,i):(o||void 0!==s)&&(e[t]=s)}}))}function _isNonNullObject(e){return"object"==typeof e&&null!==e}var b=class _GlobalGridOptions{static applyGlobalGridOptions(e){if(!_GlobalGridOptions.gridOptions)return{...e};let t={};return _mergeDeep(t,_GlobalGridOptions.gridOptions,!0,!0),"deep"===_GlobalGridOptions.mergeStrategy?_mergeDeep(t,e,!0,!0):t={...t,...e},_GlobalGridOptions.gridOptions.context&&(t.context=_GlobalGridOptions.gridOptions.context),e.context&&("deep"===_GlobalGridOptions.mergeStrategy&&t.context&&_mergeDeep(e.context,t.context,!0,!0),t.context=e.context),t}static applyGlobalGridOption(e,t){if("deep"===_GlobalGridOptions.mergeStrategy){const o=_getGlobalGridOption(e);if(o&&"object"==typeof o&&"object"==typeof t)return _GlobalGridOptions.applyGlobalGridOptions({[e]:t})[e]}return t}};b.gridOptions=void 0,b.mergeStrategy="shallow";var S=b;function _getGlobalGridOption(e){return S.gridOptions?.[e]}var y={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},R="https://www.ag-grid.com";function _logIfDebug(e,t,...o){e.get("debug")&&i.log("AG Grid: "+t,...o)}function _warnOnce(e,...t){_doOnce((()=>i.warn("AG Grid: "+e,...t)),e+t?.join(""))}function _errorOnce(e,...t){_doOnce((()=>i.error("AG Grid: "+e,...t)),e+t?.join(""))}var F,D=new Set,P={},x={},E=!1,M=!1,T=!1;function runVersionChecks(e){F||(F=e.version);const errorMsg=e=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${e} Please update all modules to the same version.`;e.version?function isValidModuleVersion(e){const[t,o]=e.version.split(".")||[],[i,s]=F.split(".")||[];return t===i&&o===s}(e)||_errorOnce(errorMsg(`'${e.moduleName}' is version ${e.version} but the other modules are version ${F}.`)):_errorOnce(errorMsg(`'${e.moduleName}' is incompatible.`));const t=e.validate?.();t&&!t.isValid&&_errorOnce(`${t.message}`)}function _registerModule(e,t,o=!1){o||(E=!0),runVersionChecks(e);const i=e.rowModels??["all"];let s;D.add(e),void 0!==t?(M=!0,void 0===x[t]&&(x[t]={}),s=x[t]):s=P;for(const t of i)void 0===s[t]&&(s[t]={}),s[t][e.moduleName]=e;if(e.dependsOn)for(const i of e.dependsOn)_registerModule(i,t,o)}function _isModuleRegistered(e,t,o){const isRegisteredForRowModel=o=>!!P[o]?.[e]||!!x[t]?.[o]?.[e];return isRegisteredForRowModel(o)||isRegisteredForRowModel("all")}function _areModulesGridScoped(){return M}function _getGridRegisteredModules(e,t){const o=x[e]??{};return[...Object.values(o.all??{}),...Object.values(o[t]??{})]}function _isUmd(){return T}var A=class{static register(e){_registerModule(e,void 0)}static registerModules(e){for(const t of e)_registerModule(t,void 0)}};function _findEnterpriseCoreModule(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const e=_findEnterpriseCoreModule(t.dependsOn);if(e)return e}}}var I="35.1.0",k="_version_",L=null,_=`${R}/javascript-data-grid`;function getErrorParts(e,t,o){return L?.(e,t)??[minifiedLog(e,t,o)]}function getMsgOrDefault(e,t,o,i,s){e(`${i?"warning":"error"} #${t}`,...getErrorParts(t,o,s))}function stringifyValue(e){let t=e;return e instanceof Error?t=e.toString():"object"==typeof e&&(t=function stringifyObject(e){if(!e)return String(e);const t={};for(const o of Object.keys(e))"object"!=typeof e[o]&&"function"!=typeof e[o]&&(t[o]=e[o]);return JSON.stringify(t)}(e)),t}function toStringWithNullUndefined(e){return void 0===e?"undefined":null===e?"null":e}function getParamsUrl(e,t){return`${e}?${t.toString()}`}function getErrorLink(e,t){const o=new URLSearchParams;if(o.append(k,I),t)for(const e of Object.keys(t))o.append(e,stringifyValue(t[e]));const i=`${_}/errors/${e}`,s=getParamsUrl(i,o);return s.length<=2e3?s:function truncateUrl(e,t,o){const i=Array.from(t.entries()).sort(((e,t)=>t[1].length-e[1].length));let s=getParamsUrl(e,t);for(const[n,r]of i){if(n===k)continue;const i=s.length-o;if(i<=0)break;const a="...",l=i+a.length,d=r.length-l>100?r.slice(0,r.length-l)+a:r.slice(0,100)+a;t.set(n,d),s=getParamsUrl(e,t)}return s}(i,o,2e3)}var minifiedLog=(e,t,o)=>{const i=`${o?o+" \n":""}Visit ${getErrorLink(e,t)}`;return _isUmd()?i:`${i}${o?"":" \n Alternatively register the ValidationModule to see the full message in the console."}`};function _warn(...e){getMsgOrDefault(_warnOnce,e[0],e[1],!0)}function _error(...e){getMsgOrDefault(_errorOnce,e[0],e[1],!1)}function _logPreInitErr(e,t,o){getMsgOrDefault(_errorOnce,e,t,!1,o)}function getErrMsg(e,t){const o=t[0];return`error #${o} `+getErrorParts(o,t[1],e).join(" ")}function _errMsg(...e){return getErrMsg(void 0,e)}function isRowModelType(e,t){return e.get("rowModelType")===t}function _isClientSideRowModel(e,t){return isRowModelType(e,"clientSide")}function _isServerSideRowModel(e,t){return isRowModelType(e,"serverSide")}function _isDomLayout(e,t){return e.get("domLayout")===t}function _isRowSelection(e){return void 0!==_getRowSelectionMode(e)}function _isGetRowHeightFunction(e){return"function"==typeof e.get("getRowHeight")}function _getRowHeightForNode(e,t,o=!1,i){const{gos:s,environment:n}=e;if(null==i&&(i=n.getDefaultRowHeight()),_isGetRowHeightFunction(s)){if(o)return{height:i,estimated:!0};const e={node:t,data:t.data},n=s.getCallback("getRowHeight")(e);if(isNumeric(n))return 0===n&&_warn(23),{height:Math.max(1,n),estimated:!1}}if(t.detail&&s.get("masterDetail"))return function getMasterDetailRowHeight(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");if(isNumeric(t))return{height:t,estimated:!1};return{height:300,estimated:!1}}(s);const r=s.get("rowHeight");return{height:r&&isNumeric(r)?r:i,estimated:!1}}function _getRowHeightAsNumber(e){const{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||_missing(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return-1!==s?s:(_warn(24),t.getDefaultRowHeight())}function isNumeric(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}function _getDomData(e,t,o){const i=t[e.getDomDataKey()];return i?i[o]:void 0}function _setDomData(e,t,o,i){const s=e.getDomDataKey();let n=t[s];_missing(n)&&(n={},t[s]=n),n[o]=i}function _isAnimateRows(e){return!e.get("ensureDomOrder")&&e.get("animateRows")}function _isGroupRowsSticky(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||_isDomLayout(e,"print"))}function _isColumnsSortingCoupledToGroup(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function _getGroupAggFiltering(e){const t=e.get("groupAggFiltering");return"function"==typeof t?e.getCallback("groupAggFiltering"):!0===t?()=>!0:void 0}function _getGrandTotalRow(e){return e.get("grandTotalRow")}function _isGroupUseEntireRow(e,t){return!t&&"groupRows"===e.get("groupDisplayType")}function _isFullWidthGroupRow(e,t,o){return!!t.group&&!t.footer&&_isGroupUseEntireRow(e,o)}function _getRowIdCallback(e){const t=e.getCallback("getRowId");return void 0===t?t:e=>{let o=t(e);return"string"!=typeof o&&(_doOnce((()=>_warn(25,{id:o})),"getRowIdString"),o=String(o)),o}}function _getCheckboxes(e){return e?.checkboxes??!0}function _getHeaderCheckbox(e){return"multiRow"===e?.mode&&(e.headerCheckbox??!0)}function _getCheckboxLocation(e){if("object"==typeof e)return e.checkboxLocation??"selectionColumn"}function _getHideDisabledCheckboxes(e){return e?.hideDisabledCheckboxes??!1}function _isCellSelectionEnabled(e){const t=e.get("cellSelection");return void 0!==t?!!t:e.get("enableRangeSelection")}function _getEnableColumnSelection(e){const t=e.get("cellSelection")??!1;return("object"==typeof t&&t.enableColumnSelection)??!1}function _getEnableClickSelection(e){const t=e.get("rowSelection")??"single";if("string"==typeof t){const t=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return(!t||!o)&&(t?"enableDeselection":!o||"enableSelection")}return("singleRow"===t.mode||"multiRow"===t.mode)&&(t.enableClickSelection??!1)}function _getIsRowSelectable(e){const t=e.get("rowSelection");return"string"==typeof t?e.get("isRowSelectable"):t?.isRowSelectable}function _getRowSelectionMode(e){const t="beanName"in e&&"gos"===e.beanName?e.get("rowSelection"):e.rowSelection;if("string"==typeof t)switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function _isMultiRowSelection(e){return"multiRow"===_getRowSelectionMode(e)}function _getGroupSelection(e){const t=e.get("rowSelection");if("string"==typeof t){const t=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return t&&o?"filteredDescendants":t?"descendants":"self"}return"multiRow"===t?.mode?t.groupSelects:void 0}function _getSelectAll(e,t=!0){const o=e.get("rowSelection");return"object"!=typeof o?t?"all":void 0:"multiRow"===o.mode?o.selectAll:"all"}function _getGroupSelectsDescendants(e){const t=_getGroupSelection(e);return"descendants"===t||"filteredDescendants"===t}function _getMasterSelects(e){const t=e.get("rowSelection");return"object"==typeof t&&t.masterSelects||"self"}function _isLegacyMenuEnabled(e){return"legacy"===e.get("columnMenu")}function _combineAttributesAndGridOptions(e,t,o){"object"!=typeof e&&(e={});const i={...e};for(const e of o){const o=t[e];void 0!==o&&(i[e]=o)}return i}function _processOnChange(e,t){if(!e)return;const o={};let i=!1;for(const t of Object.keys(e))o[t]=e[t],i=!0;if(!i)return;const s={type:"gridOptionsChanged",options:o};t.dispatchEvent(s);const n={type:"componentStateChanged",...o};t.dispatchEvent(n)}function _addGridCommonParams(e,t){return e.addCommon(t)}function _getGridOption(e,t){return e[t]??e.gridOptions?.[t]??_getGlobalGridOption(t)??y[t]}var G={resizable:!0,sortable:!0},N=0;function getNextColInstanceId(){return N++}function isColumn(e){return e instanceof H}var V=["asc","desc",null],O=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],H=class extends m{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=getNextColInstanceId(),this.autoHeaderHeight=null,this.sortDef=_getSortDefFromInput(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new s,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=_escapeString(o)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t?.initCol(this);const s=e.hide;this.visible=void 0!==s?!s:!e.initialHide,o?.initCol(this),i?.initCol(this)}setColDef(e,t,o){const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",o)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=_exists(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=_exists(o)&&o.includes(".")&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;e&&t&&this.addManagedListeners(t,{colDefChanged:t=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,t.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const o=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return _addGridCommonParams(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??G[e]}isColumnFunc(e,t){if("boolean"==typeof t)return t;if("function"==typeof t){return t(this.createColumnFunctionCallbackParams(e))}return!1}createColumnEvent(e,t){return _addGridCommonParams(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){const e=[],{sort:t,initialSort:o}=this.colDef,i=null===t?t:_normalizeSortType(t?.type),s=null===o?o:_normalizeSortType(o?.type);return i&&e.push(i),s&&e.push(s),e}getSortingOrder(){const e=this.getColDefAllowedSortTypes().includes("absolute")?O:V;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??e).map((e=>_getSortDefFromInput(e)))}getAvailableSortTypes(){const e=this.getSortingOrder().reduce(((e,t)=>(t.direction&&e.push(t.type),e)),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.getSort()}isSortDescending(){return"desc"===this.getSort()}isSortNone(){return _missing(this.getSort())}isSorting(){return _exists(this.getSort())}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return _warn(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){const o=!0===e;this.visible!==o&&(this.visible=o,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let o=!0;for(;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:o}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return _addGridCommonParams(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(_missing(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(_missing(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)}setActualWidth(e,t,o=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,null!=this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),o||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}isAllowFormula(){return!0===this.colDef.allowFormula}dispatchColEvent(e,t,o){const i=this.createColumnEvent(e,t);o&&_mergeDeep(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function _getSortDefFromInput(e){return _isSortDefValid(e)?{direction:e.direction,type:e.type}:{direction:_normalizeSortDirection(e),type:_normalizeSortType(e)}}function _isSortDirectionValid(e){return"asc"===e||"desc"===e||null===e}function _isSortTypeValid(e){return"default"===e||"absolute"===e}function _isSortDefValid(e){if(!e||"object"!=typeof e)return!1;const t=e;return _isSortTypeValid(t.type)&&_isSortDirectionValid(t.direction)}function _areSortDefsEqual(e,t){return e?t?e.type===t.type&&e.direction===t.direction:!e||null===e.direction:!t||null===t.direction}function _normalizeSortDirection(e){return _isSortDirectionValid(e)?e:null}function _normalizeSortType(e){return _isSortTypeValid(e)?e:"default"}function isProvidedColumnGroup(e){return e instanceof B}var B=class extends m{constructor(e,t,o,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=getNextColInstanceId(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some((e=>e.isVisible()))}isPadding(){return this.padding}setExpanded(e){this.expanded=void 0!==e&&e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)isColumn(t)?e(t):isProvidedColumnGroup(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)isColumn(t)?e.push(t):isProvidedColumnGroup(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1;const i=this.findChildrenRemovingPadding();for(let s=0,n=i.length;s<n;s++){const n=i[s];if(!n.isVisible())continue;const r=n.getColumnGroupShow();"open"===r?(e=!0,o=!0):"closed"===r?(t=!0,o=!0):(e=!0,t=!0)}const s=e&&t&&o;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],process=t=>{for(const o of t){isProvidedColumnGroup(o)&&o.isPadding()?process(o.children):e.push(o)}};return process(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},W={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function createMergedColGroupDef(e,t,o){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,o),i}var z="ag-Grid-AutoColumn",U="ag-Grid-SelectionColumn",$="ag-Grid-RowNumbersColumn";function _getColumnsFromTree(e){const t=[],recursiveFindColumns=e=>{for(let o=0;o<e.length;o++){const i=e[o];isColumn(i)?t.push(i):isProvidedColumnGroup(i)&&recursiveFindColumns(i.getChildren())}};return recursiveFindColumns(e),t}function getWidthOfColsInList(e){return e.reduce(((e,t)=>e+t.getActualWidth()),0)}function _destroyColumnTree(e,t,o){const i={};if(!t)return;depthFirstOriginalTreeSearch(null,t,(e=>{i[e.getInstanceId()]=e})),o&&depthFirstOriginalTreeSearch(null,o,(e=>{i[e.getInstanceId()]=null}));const s=Object.values(i).filter((e=>null!=e));e.context.destroyBeans(s)}function isColumnGroupAutoCol(e){return e.getId().startsWith(z)}function isColumnSelectionCol(e){return("string"==typeof e?e:"getColId"in e?e.getColId():e.colId)?.startsWith(U)??!1}function isRowNumberCol(e){return("string"==typeof e?e:"getColId"in e?e.getColId():e.colId)?.startsWith($)??!1}function convertColumnTypes(e){let t=[];return e instanceof Array?t=e:"string"==typeof e&&(t=e.split(",")),t}function _convertColumnEventSourceType(e){return"optionsUpdated"===e?"gridOptionsChanged":e}function _columnsMatch(e,t){return e===t||e.colId==t||e.getColDef()===t}function _getColumnStateFromColDef(e,t){const o={...e,sort:void 0,colId:t},i=_getSortDefFromColDef(e);return i&&(o.sort=i.direction,o.sortType=i.type),o}function _getSortDefFromColDef(e){const{sort:t,initialSort:o}=e,i=_isSortDefValid(t)||_isSortDirectionValid(t),s=_isSortDefValid(o)||_isSortDirectionValid(o);return i?_getSortDefFromInput(t):s?_getSortDefFromInput(o):null}var depthFirstCallback=(e,t)=>{isProvidedColumnGroup(e)&&e.setupExpandable(),e.originalParent=t};function _createColumnTree(e,t=null,o,i,s){const n=new class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=_toStringOrNull(e);let o=0;for(;;){let i=e??t;if(i?0!==o&&(i+="_"+o):i=o,!this.existingKeys[i]){const t=String(i);return e&&o>0&&_warn(273,{providedId:e,usedId:t}),this.existingKeys[t]=!0,t}o++}}},{existingCols:r,existingGroups:a,existingColKeys:l}=extractExistingTreeData(i);n.addExistingKeys(l);const d=_recursivelyCreateColumns(e,t,0,o,r,n,a,s),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return depthFirstOriginalTreeSearch(null,h,depthFirstCallback),{columnTree:h,treeDepth:u}}function extractExistingTreeData(e){const t=[],o=[],i=[];return e&&depthFirstOriginalTreeSearch(null,e,(e=>{if(isProvidedColumnGroup(e)){const t=e;o.push(t)}else{const o=e;i.push(o.getId()),t.push(o)}})),{existingCols:t,existingGroups:o,existingColKeys:i}}function _recursivelyCreateColumns(e,t,o,i,s,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];l&&isColumnGroupDef(u)?d[c]=l.createProvidedColumnGroup(i,u,o,s,n,r,a):d[c]=createColumn(e,i,u,s,n,a)}return d}function createColumn(e,t,o,i,s,n){const r=function findExistingColumn(e,t){if(!t)return;for(let o=0;o<t.length;o++){const i=t[o].getUserProvidedColDef();if(!i)continue;if(null!=e.colId){if(t[o].getId()===e.colId)return{idx:o,column:t[o]};continue}if(null!=e.field){if(i.field===e.field)return{idx:o,column:t[o]}}else if(i===e)return{idx:o,column:t[o]}}return}(o,i);r&&i?.splice(r.idx,1);let a=r?.column;if(a){const t=_addColumnDefaultAndTypes(e,o,a.getColId());a.setColDef(t,o,n),_updateColumnState(e,a,t,n)}else{const i=s.getUniqueKey(o.colId,o.field),n=_addColumnDefaultAndTypes(e,o,i);a=new H(n,o,i,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function updateSomeColumnState(e,t,o,i,s,n,r,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;void 0!==o&&t.setVisible(!o,a),l&&(l.updateColSort(t,i,a),void 0!==s&&l.setColSortIndex(t,s)),void 0!==n&&d?.setColPinned(t,n),void 0!==r&&c?.setColFlex(t,r)}function _updateColumnState(e,t,o,i){updateSomeColumnState(e,t,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,i);const s=t.getFlex();if(!(null!=s&&s>0))if(null!=o.width)t.setActualWidth(o.width,i);else{const e=t.getActualWidth();t.setActualWidth(e,i)}}function _addColumnDefaultAndTypes(e,t,o,i){const{gos:s,dataTypeSvc:n}=e,r={};_mergeDeep(r,s.get("defaultColDef"),!1,!0);const a=function updateColDefAndGetColumnType(e,t,o,i){const s=e.dataTypeSvc?.updateColDefAndGetColumnType(t,o,i),n=o.type??s??t.type;return t.type=n,n?convertColumnTypes(n):void 0}(e,r,t,o);a&&function assignColumnTypes(e,t,o){if(!t.length)return;const i=Object.assign({},W),s=e.gos.get("columnTypes")||{};for(const e of Object.keys(s)){const t=s[e];if(e in i)_warn(34,{key:e});else{t.type&&_warn(35),i[e]=t}}for(const e of t){const t=i[e.trim()];t?_mergeDeep(o,t,!1,!0):_warn(36,{t:e})}}(e,a,r);const l=r.cellDataType;_mergeDeep(r,t,!1,!0),void 0!==l&&(r.cellDataType=l);const d=s.get("autoGroupColumnDef"),c=_isColumnsSortingCoupledToGroup(s);return t.rowGroup&&d&&c&&_mergeDeep(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n?.postProcess(r),n?.validateColDef(r),s.validateColDef(r,o,i),r}function isColumnGroupDef(e){return void 0!==e.children}function depthFirstOriginalTreeSearch(e,t,o){if(t)for(let i=0;i<t.length;i++){const s=t[i];isProvidedColumnGroup(s)&&depthFirstOriginalTreeSearch(s,s.getChildren(),o),o(s,e)}}function placeLockedColumns(e,t){const o=[],i=[],s=[];e.forEach((e=>{const t=e.getColDef().lockPosition;"right"===t?s.push(e):"left"===t||!0===t?o.push(e):i.push(e)}));return t.get("enableRtl")?[...s,...i,...o]:[...o,...i,...s]}function doesMovePassMarryChildren(e,t){let o=!0;return depthFirstOriginalTreeSearch(null,t,(t=>{if(!isProvidedColumnGroup(t))return;const i=t,s=i.getColGroupDef()?.marryChildren;if(!s)return;const n=[];for(const t of i.getLeafColumns()){const o=e.indexOf(t);n.push(o)}Math.max.apply(Math,n)-Math.min.apply(Math,n)>i.getLeafColumns().length-1&&(o=!1)})),o}function getCommonValue(e,t){if(!e||0==e.length)return;const o=t(e[0]);for(let i=1;i<e.length;i++)if(o!==t(e[i]))return;return o}function dispatchColumnPinnedEvent(e,t,o){if(!t.length)return;const i=1===t.length?t[0]:null,s=getCommonValue(t,(e=>e.getPinned()));e.dispatchEvent({type:"columnPinned",pinned:null!=s?s:null,columns:t,column:i,source:o})}function dispatchColumnChangedEvent(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&1==o.length?o[0]:null,source:i})}function dispatchColumnResizedEvent(e,t,o,i,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:1===t.length?t[0]:null,flexColumns:s,finished:o,source:i})}function _applyColumnState(e,t,o){const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,m=i.getColDefCols()??[],f=a?.getColumns();if(!m.length&&!f?.length)return!1;if(t?.state&&!t.state.forEach)return _warn(32),!1;const syncColumnWithStateItem=(i,r,a,l,d)=>{if(!i)return;const c=((e,t)=>(o,i)=>{const s={value1:void 0,value2:void 0};let n=!1;return e&&(void 0!==e[o]&&(s.value1=e[o],n=!0),_exists(i)&&void 0!==e[i]&&(s.value2=e[i],n=!0)),!n&&t&&(void 0!==t[o]&&(s.value1=t[o]),_exists(i)&&void 0!==t[i]&&(s.value2=t[i])),s})(r,t.defaultState),g=c("flex").value1,p=c("sort").value1,m=c("sortType").value1,f=_isSortDirectionValid(p)||_isSortTypeValid(m),C=_normalizeSortType(m),w=_normalizeSortDirection(p),v=f?{type:C,direction:w}:void 0;if(updateSomeColumnState(e,i,c("hide").value1,v,c("sortIndex").value1,c("pinned").value1,g,o),null==g){const e=c("width").value1;if(null!=e){const t=i.getColDef().minWidth??u.getDefaultColumnMinWidth();null!=t&&e>=t&&i.setActualWidth(e,o)}}!d&&i.isPrimary()&&(h?.syncColumnWithState(i,o,c),s?.syncColumnWithState(i,o,c,a),n?.syncColumnWithState(i,o,c,l))},applyStates=(l,c,u)=>{const h=_compareColumnStatesAndDispatchEvents(e,o),m=c.slice(),f={},C={},w=[],v=[],b=[];let S=0;const y=s?.columns.slice()??[],R=n?.columns.slice()??[];for(const e of l){const t=e.colId;if(t.startsWith(z)){w.push(e),b.push(e);continue}if(isColumnSelectionCol(t)){v.push(e),b.push(e);continue}const o=u(t);o?(syncColumnWithStateItem(o,e,f,C,!1),_removeFromArray(m,o)):(b.push(e),S+=1)}const applyDefaultsFunc=e=>syncColumnWithStateItem(e,null,f,C,!1);m.forEach(applyDefaultsFunc),s?.sortColumns(comparatorByIndex.bind(s,f,y)),n?.sortColumns(comparatorByIndex.bind(n,C,R)),i.refreshCols(!1,o);const syncColStates=(e,t,o=[])=>{for(const i of t){const t=e(i.colId);_removeFromArray(o,t),syncColumnWithStateItem(t,i,null,null,!0)}o.forEach(applyDefaultsFunc)};return syncColStates((e=>r?.getColumn(e)??null),w,r?.getColumns()?.slice()),syncColStates((e=>a?.getColumn(e)??null),v,a?.getColumns()?.slice()),function orderLiveColsLikeState(e,t,o){if(!e.applyOrder||!e.state)return;const i=[];for(const t of e.state)null!=t.colId&&i.push(t.colId);!function sortColsLikeKeys(e,t,o,i){if(null==e)return;let s=[];const n={};for(const o of t){if(n[o])continue;const t=e.map[o];t&&(s.push(t),n[o]=!0)}let r=0;for(const t of e.list){const e=t.getColId();if(null!=n[e])continue;e.startsWith(z)?s.splice(r++,0,t):s.push(t)}if(s=placeLockedColumns(s,i),!doesMovePassMarryChildren(s,o.getColTree()))return void _warn(39);e.list=s}(t.cols,i,t,o)}(t,i,p),d.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),h(),{unmatchedAndAutoStates:b,unmatchedCount:S}};l?.start();let{unmatchedAndAutoStates:C,unmatchedCount:w}=applyStates(t.state||[],m,(e=>i.getColDefCol(e)));if(C.length>0||_exists(t.defaultState)){w=applyStates(C,c?.getPivotResultCols()?.list??[],(e=>c?.getPivotResultCol(e)??null)).unmatchedCount}return l?.finish(),0===w}function _compareColumnStatesAndDispatchEvents(e,t){const{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:o?.columns.slice()??[],pivotColumns:i?.columns.slice()??[],valueColumns:s?.columns.slice()??[]},d=_getColumnState(e),c={};for(const e of d)c[e.colId]=e;return()=>{const dispatchWhenListsDifferent=(e,o,i,s)=>{if(_areEqual(o.map(s),i.map(s)))return;const n=new Set(o);for(const e of i)n.delete(e)||n.add(e);const r=[...n];a.dispatchEvent({type:e,columns:r,column:1===r.length?r[0]:null,source:t})},getChangedColumns=e=>{const t=[];return n.forAllCols((o=>{const i=c[o.getColId()];i&&e(i,o)&&t.push(o)})),t},columnIdMapper=e=>e.getColId();dispatchWhenListsDifferent("columnRowGroupChanged",l.rowGroupColumns,o?.columns??[],columnIdMapper),dispatchWhenListsDifferent("columnPivotChanged",l.pivotColumns,i?.columns??[],columnIdMapper);const s=getChangedColumns(((e,t)=>{const o=null!=e.aggFunc,i=o!=t.isValueActive(),s=o&&e.aggFunc!=t.getAggFunc();return i||s}));s.length>0&&dispatchColumnChangedEvent(a,"columnValueChanged",s,t);dispatchColumnResizedEvent(a,getChangedColumns(((e,t)=>e.width!=t.getActualWidth())),!0,t);dispatchColumnPinnedEvent(a,getChangedColumns(((e,t)=>e.pinned!=t.getPinned())),t);!function dispatchColumnVisibleEvent(e,t,o){if(!t.length)return;const i=1===t.length?t[0]:null,s=getCommonValue(t,(e=>e.isVisible()));e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:o})}(a,getChangedColumns(((e,t)=>e.hide==t.isVisible())),t);const u=getChangedColumns(((e,t)=>!_areSortDefsEqual(t.getSortDef(),{type:_normalizeSortType(e.sortType),direction:_normalizeSortDirection(e.sort)})||e.sortIndex!=t.getSortIndex()));u.length>0&&r?.dispatchSortChangedEvents(t,u);const h=_getColumnState(e);!function normaliseColumnMovedEventForColumnState(e,t,o,i,s){const n={};for(const e of t)n[e.colId]=e;const r={};for(const t of e)n[t.colId]&&(r[t.colId]=!0);const a=e.filter((e=>r[e.colId])),l=t.filter((e=>r[e.colId])),d=[];if(l.forEach(((e,t)=>{const o=a?.[t];if(o&&o.colId!==e.colId){const e=i.getCol(o.colId);e&&d.push(e)}})),!d.length)return;s.dispatchEvent({type:"columnMoved",columns:d,column:1===d.length?d[0]:null,finished:!0,source:o})}(d,h,t,n,a)}}function _getColumnState(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e;if(_missing(t.getColDefCols())||!t.isAlive())return[];const s=o?.columns,n=i?.columns,r=[];t.forAllCols((e=>(e=>{const t=e.isRowGroupActive()&&s?s.indexOf(e):null,o=e.isPivotActive()&&n?n.indexOf(e):null,i=e.isValueActive()?e.getAggFunc():null,a=null!=e.getSortIndex()?e.getSortIndex():null;r.push({colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:e.getSort(),sortType:e.getSortDef()?.type,sortIndex:a,aggFunc:i,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:o,flex:e.getFlex()??null})})(e)));const a=new Map(t.getCols().map(((e,t)=>[e.getColId(),t])));return r.sort(((e,t)=>(a.has(e.colId)?a.get(e.colId):-1)-(a.has(t.colId)?a.get(t.colId):-1))),r}function getColumnStateFromColDef(e){const getValueOrNull=(e,t)=>null!=e?e:null!=t?t:null,t=e.getColDef(),o=_getSortDefFromInput(getValueOrNull(t.sort,t.initialSort)),i=o.direction,s=o.type,n=getValueOrNull(t.sortIndex,t.initialSortIndex),r=getValueOrNull(t.hide,t.initialHide),a=getValueOrNull(t.pinned,t.initialPinned),l=getValueOrNull(t.width,t.initialWidth),d=getValueOrNull(t.flex,t.initialFlex);let c=getValueOrNull(t.rowGroupIndex,t.initialRowGroupIndex),u=getValueOrNull(t.rowGroup,t.initialRowGroup);null!=c||u||(c=null,u=null);let h=getValueOrNull(t.pivotIndex,t.initialPivotIndex),g=getValueOrNull(t.pivot,t.initialPivot);null!=h||g||(h=null,g=null);const p=getValueOrNull(t.aggFunc,t.initialAggFunc);return{colId:e.getColId(),sort:i,sortType:s,sortIndex:n,hide:r,pinned:a,width:l,flex:d,rowGroup:u,rowGroupIndex:c,pivot:g,pivotIndex:h,aggFunc:p}}var comparatorByIndex=(e,t,o,i)=>{const s=e[o.getId()],n=e[i.getId()],r=null!=s,a=null!=n;if(r&&a)return s-n;if(r)return-1;if(a)return 1;const l=t.indexOf(o),d=t.indexOf(i),c=l>=0;return c&&d>=0?l-d:c?-1:1};function createUniqueColumnGroupId(e,t){return e+"_"+t}function isColumnGroup(e){return e instanceof K}var K=class extends m{constructor(e,t,o,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=_escapeString(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return createUniqueColumnGroupId(this.groupId,this.partId)}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every((e=>e.isMoving()))}checkLeft(){for(const e of this.displayedChildren)isColumnGroup(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const e=_last(this.displayedChildren).getLeft();this.setLeft(e)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])isColumn(t)?e.push(t):isColumnGroup(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])isColumn(t)?e.push(t):isColumnGroup(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return this.isPadding()&&e?.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(!!e&&e.getProvidedColumnGroup().isExpandable()))return this.displayedChildren=this.children,void this.dispatchLocalEvent({type:"displayedChildrenChanged"});for(const t of this.children??[]){if(isColumnGroup(t)&&!t.displayedChildren?.length)continue;switch(t.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(t);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(t);break;default:this.displayedChildren.push(t)}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},j="Backspace",q="Tab",Y="Enter",Q="Escape",Z=" ",J="ArrowLeft",X="ArrowUp",ee="ArrowRight",te="ArrowDown",oe="Delete",ie="F2",se="PageUp",ne="PageDown",re="Home",ae="End",le="KeyA",de="KeyC",ce="KeyD",ue="KeyV",he="KeyX",ge="KeyY",pe="KeyZ";function _normaliseQwertyAzerty(e){const{keyCode:t}=e;let o;switch(t){case 65:o=le;break;case 67:o=de;break;case 86:o=ue;break;case 68:o=ce;break;case 90:o=pe;break;case 89:o=ge;break;default:o=e.code}return o}var me=class _AgPromise{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e((e=>this.onDone(e)),(e=>this.onReject(e)))}static all(e){return e.length?new _AgPromise((t=>{let o=e.length;const i=new Array(o);e.forEach(((e,s)=>{e.then((e=>{i[s]=e,o--,0===o&&t(i)}))}))})):_AgPromise.resolve()}static resolve(e=null){return new _AgPromise((t=>t(e)))}then(e){return new _AgPromise((t=>{1===this.status?t(e(this.resolution)):this.waiters.push((o=>t(e(o))))}))}onDone(e){this.status=1,this.resolution=e;for(const t of this.waiters)t(e)}onReject(e){}},fe=null;function _isComponent(e){return"function"==typeof e?.getGui}function _createElement(e){return _createAgElement(e)}function _createIconNoSpan(e,t,o){let i=null;"smallDown"===e?_warn(262):"smallLeft"===e?_warn(263):"smallRight"===e&&_warn(264);const s=o?.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const o=t.gos.get("icons");o&&(i=o[e])}if(i){let t;if("function"==typeof i)t=i();else{if("string"!=typeof i)return void _warn(38,{iconName:e});t=i}return"string"==typeof t?_loadTemplate(t):_isNodeOrElement(t)?t:void _warn(133,{iconName:e})}{const o=t.registry.getIcon(e);return o||t.validation?.validateIcon(e),_createElement({tag:"span",cls:`ag-icon ag-icon-${o??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Ce=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.includes(" ")){const o=(e||"").split(" ");if(o.length>1){for(const e of o)this.toggleCss(e,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},we=0,ve=class extends p{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=we++,this.cssManager=new Ce((()=>this.eGui)),this.componentSelectors=new Map((t??[]).map((e=>[e.selector,e]))),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(d):null}applyElementsToComponent(e,t,o,i=null){if(void 0===t&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===fe)this[t]=i??e;else{const e=o?.[t];if(!this.suppressDataRefValidation&&!e)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const o=[];for(const t of e.childNodes??[])o.push(t);for(const i of o){if(!(i instanceof HTMLElement))continue;const o=this.createComponentFromElement(i,(e=>{const t=e.getGui();if(t)for(const e of i.attributes??[])t.setAttribute(e.name,e.value)}),t);if(o){if(o.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const e=Array.prototype.slice.call(i.children);o.addItems(e)}this.swapComponentForNode(o,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,o){const i=e.nodeName,s=this.getDataRefAttribute(e),n=0===i.indexOf("AG-"),r=n?this.componentSelectors.get(i):null;let a=null;if(r){const e=o&&s?o[s]:void 0;a=new r.component(e),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,o,a),a}swapComponentForNode(e,t,o){const i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){const o=t??this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const t of e)t.setAttribute("tabindex",o.toString())}setTemplate(e,t,o){let i;i="string"==typeof e||null==e?_loadTemplate(e):_createAgElement(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let e=0;e<t.length;e++){const o=t[e];this.componentSelectors.set(o.selector,o)}this.wireTemplate(e,o)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let o=t;return null==e?null:(o||(o=this.eGui),_isNodeOrElement(e)?{element:e,parent:o}:{element:e.getGui(),parent:o})}prependChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};o&&i&&i.prepend(o)}appendChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};o&&i&&i.appendChild(o)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:o}=t;!function _setVisible(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||_setAriaHidden(e,!t)}(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;_setDisplayed(this.eGui,e,{skipAriaHidden:o});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,o){this.eGui.addEventListener(e,t,o),this.addDestroyFunc((()=>this.eGui.removeEventListener(e,t)))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css===be?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=be}},be=Symbol(),Se=class extends ve{},ye={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},Re=class extends p{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){const o={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:t=>this.onDragStart(e,t),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(o),this.beans.dragSvc.addDragSource(o)}setDragImageCompIcon(e,t=!1){const o=this.dragImageComp;o&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,o.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:o}=this;for(let i=0,s=t.length;i<s;i++)if(t[i].dragSource===e){const e=t[i];o.dragSvc?.removeDragSource(e),t.splice(i,1);break}}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:o}=this,i=o.dragSvc;for(const t of e)i?.removeDragSource(t);e.length=0,t.length=0,this.externalDropZoneCount=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const o=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-o.left,this.dragInitialSourcePointerOffsetY=t.clientY-o.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:o}=this;if(t?.onDragStopped?.(),o){const t=this.dropTargetEvent(o,e,!1);o.onDragStop?.(t)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:o}=this;if(e?.onDragCancelled?.(),t&&o){const e=this.dropTargetEvent(t,o,!1);t.onDragCancel?.(e)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const o=this.findCurrentDropTarget(e),{lastDropTarget:i,dragSource:s,dragItem:n}=this;let r=!1;if(o!==i){if(r=!0,i){const o=this.dropTargetEvent(i,e,t);i.onDragLeave?.(o)}if(null===i||o?null===i&&o&&this.handleEnter(s,n):this.handleExit(s,n),o){const i=this.dropTargetEvent(o,e,t);o.onDragEnter?.(i)}this.lastDropTarget=o}else if(o){const i=this.dropTargetEvent(o,e,t);o.onDragging?.(i),i?.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getContainer(),o=e.getSecondaryContainers?.(),i=o?.length;if(!i)return[[t]];const s=new Array(i+1);s[0]=[t];for(let e=0;e<i;++e)s[e+1]=o[e];return s}isMouseOnDropTarget(e,t){const o=this.getAllContainersFromDropTarget(t);let i=!1;const allContainersIntersect=(e,t)=>{for(const o of t){const{width:t,height:i,left:s,right:n,top:r,bottom:a}=o.getBoundingClientRect();if(0===t||0===i)return!1;const l=e.clientX>=s&&e.clientX<n,d=e.clientY>=r&&e.clientY<a;if(!l||!d)return!1}return!0};for(const t of o)if(allContainersIntersect(e,t)){i=!0;break}const{eElement:s,type:n}=this.dragSource;return!(t.targetContainsSource&&!t.getContainer().contains(s))&&(i&&t.isInterestedIn(n,s))}findCurrentDropTarget(e){const t=[],o=this.dropTargets;for(let i=0,s=o.length;i<s;++i){const s=o[i];this.isMouseOnDropTarget(e,s)&&t.push(s)}const i=t.length;if(0===i)return null;if(1===i)return t[0];const s=_getRootNode(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let e=0,o=s.length;e<o;++e){const o=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e],s=this.getAllContainersFromDropTarget(i);let n=!1;for(let e=0,t=s.length;e<t&&!n;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++)if(t[e]===o){n=!0;break}}if(n)return i}}return null}addDropTarget(e){this.dropTargets.push(e),e.external&&this.externalDropZoneCount++}removeDropTarget(e){const t=e.getContainer(),o=this.dropTargets;let i=0;for(let e=0,s=o.length;e<s;++e){const s=o[e];s.getContainer()!==t?(i!==e&&(o[i]=s),++i):s.external&&--this.externalDropZoneCount}o.length=i}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){const t=this.dropTargets;for(let o=0,i=t.length;o<i;++o){const i=t[o];if(i.external&&i.getContainer()===e)return i}return null}dropTargetEvent(e,t,o){const{dragSource:i,dragItem:s,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,d=e.getContainer(),c=d.getBoundingClientRect(),{clientX:u,clientY:h}=t,g=u-(r?.clientX||0),p=h-(r?.clientY||0),m=this.createEvent({event:t,x:u-c.left,y:h-c.top,vDirection:p>0?"down":p<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:i,fromNudge:o,dragItem:s,dropZoneTarget:d,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=m,m}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&_anchorElementToMouseMoveEvent(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then((e=>{const o=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!o||!this.isAlive())return void this.destroyBean(e);this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const i=this.dragImageComp;i!==e&&(this.dragImageComp=e,this.removeDragImageComp(i)),e&&(this.appendDragImageComp(e),this.updateDragImageComp(),this.positionDragImageComp(o))}))}appendDragImageComp(e){const t=e.getGui(),o=t.style;o.position="absolute",o.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(o.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),o.top="20px",o.left="20px";const i=_getPageBody(this.beans);i?i.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:o,lastDraggingEvent:i,dragImageLastLabel:s}=this;if(!e)return;this.setDragImageCompIcon(o?.getIconName?.(i)??null);let n=t?.dragItemName;"function"==typeof n&&(n=n(i)),n||(n=""),s!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}};function isColumnFilterComp(e){return"object"==typeof e&&!!e.component}function _getUserCompKeys(e,t,o,i){const{name:s}=o;let n,r,a,l,d,c;if(t){const o=t,u=o[s+"Selector"],h=u?u(i):null,assignComp=t=>{if("string"==typeof t)n=t;else if(null!=t&&!0!==t){e.isFrameworkComponent(t)?a=t:r=t}};h?(assignComp(h.component),l=h.params,d=h.popup,c=h.popupPosition):assignComp(o[s])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:c}}var Fe={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},De={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Pe={name:"headerComponent",optionalMethods:["refresh"]},xe={name:"innerHeaderComponent"},Ee={name:"innerHeaderGroupComponent"},Me={name:"headerGroupComponent"},Te={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Ae={name:"loadingCellRenderer",cellRenderer:!0},Ie={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},ke={name:"tooltipComponent"},Le={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},_e={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Ge={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Ne={name:"loadingCellRenderer",cellRenderer:!0},Ve={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Oe={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function _getCellRendererDetails(e,t,o){return e.getCompDetails(t,Te,void 0,o)}function _getLoadingCellRendererDetails(e,t,o){return e.getCompDetails(t,Ae,"agSkeletonCellRenderer",o,!0)}function _getCellEditorDetails(e,t,o){return e.getCompDetails(t,Ie,"agCellEditor",o,!0)}function _getFilterCompKeys(e,t){return _getUserCompKeys(e,t,Le)}function _mergeFilterParamsWithApplicationProvidedParams(e,t,o){return e.mergeParams(t,Le,o)}var He=class extends Se{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(function getElement(e){return{tag:"div",cls:e}}(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const o=this.buttons;if(this.buttons=e,o===e)return;const i=this.getGui();let s;_clearElement(i),this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,addButton=({type:e,label:o})=>{const clickListener=t=>{this.dispatchLocalEvent({type:e,event:t})};["apply","clear","reset","cancel"].includes(e)||_warn(75);const i="apply"===e,a=_createElement({tag:"button",attrs:{type:i&&t?"submit":"button"},ref:`${e}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${i?" "+r+"-apply-button":""}`,children:o});this.activateTabIndex([a]),i&&(s=a);const keydownListener=e=>{e.key===Y&&(e.preventDefault(),clickListener(e))},l=this.listeners;a.addEventListener("click",clickListener),l.push((()=>a.removeEventListener("click",clickListener))),a.addEventListener("keydown",keydownListener),l.push((()=>a.removeEventListener("keydown",keydownListener))),n.append(a)};for(const t of e)addButton(t);this.eApply=s;const a=this.validationTooltipFeature;s&&!a?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!s&&a&&(this.validationTooltipFeature=this.destroyBean(a)),i.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const o=this.eApply;o&&(_setDisabled(o,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},Be={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function translateForFilter(e,t,o){return function _translate(e,t,o,i){const s=t[o];return e.getLocaleTextFunc()(o,"function"==typeof s?s(i):s,i)}(e,Be,t,o)}function getDebounceMs(e,t){const{debounceMs:o}=e;return _isUseApplyButton(e)?(null!=o&&_warn(71),0):o??t}function _isUseApplyButton(e){return(e.buttons?.indexOf("apply")??-1)>=0}function getPlaceholderText(e,t,o,i){let s=translateForFilter(e,o);if("function"==typeof t){s=t({filterOptionKey:i,filterOption:translateForFilter(e,i),placeholder:s})}else"string"==typeof t&&(s=t);return s}var We=class extends Se{constructor(e,t,o,i,s,n){super(),this.column=e,this.wrapper=t,this.eventParent=o,this.updateModel=i,this.isGlobalButtons=s,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,o=t,i=o.useForm,s=i?"form":"div";this.setTemplate({tag:s,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:e=>{e?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=o,this.resetButtonsPanel(o),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:e,params:t})=>{e===this.column&&this.resetButtonsPanel(t,this.params)},filterStateChanged:({column:e,state:t})=>{e===this.column&&this.eButtons?.updateValidity(!1!==t.valid)},filterAction:({column:e,action:t,event:o})=>{e===this.column&&this.afterAction(t,o)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:e})=>{if(e!==this.isGlobalButtons){this.isGlobalButtons=e;const t=this.params;this.resetButtonsPanel(t,t,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,o){const{buttons:i,readOnly:s}=t??{},{buttons:n,readOnly:r,useForm:a}=e;if(!o&&s===r&&_jsonEquals(i,n))return;const l=n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons;let d=this.eButtons;if(l){const e=n.map((e=>({type:e,label:translateForFilter(this,`${e}Filter`)})));if(this.applyActive=_isUseApplyButton(this.params),!d){d=this.createBean(new He),this.appendChild(d.getGui());const e=this.column,getListener=t=>({event:o})=>{this.updateModel(e,t,{fromButtons:!0}),this.afterAction(t,o)};d?.addManagedListeners(d,{apply:getListener("apply"),clear:getListener("clear"),reset:getListener("reset"),cancel:getListener("cancel")}),this.eButtons=d}d.updateButtons(e,a)}else this.applyActive=!1,d&&(_removeFromParent(d.getGui()),this.eButtons=this.destroyBean(d))}close(e){const t=this.hidePopup;if(!t)return;const o=e,i=o?.key;let s;i!==Y&&i!==Z||(s={keyboardEvent:o}),t(s),this.hidePopup=null}afterAction(e,t){const{params:o,applyActive:i}=this,s=o?.closeOnApply;switch(e){case"apply":t?.preventDefault(),s&&i&&this.close(t);break;case"reset":s&&i&&this.close();break;case"cancel":s&&this.close(t)}}handleKeyDown(e){!e.defaultPrevented&&e.key===Y&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},ze={tag:"div",cls:"ag-filter"},Ue=class extends Se{constructor(e,t,o){super(ze),this.column=e,this.source=t,this.enableGlobalButtonCheck=o,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return null!=this.wrapper}getFilter(){return this.wrapper?.then((e=>e.comp))??null}afterInit(){return this.wrapper?.then((()=>{}))??me.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then((t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)}))}afterGuiDetached(){this.wrapper?.then((e=>{e?.comp?.afterGuiDetached?.()}))}createFilter(e){const{column:t,source:o,beans:{colFilter:i}}=this,s=i.getFilterUiForDisplay(t)??null;this.wrapper=s,s?.then((s=>{if(!s)return;const{isHandler:n,comp:r}=s;let a;if(n){const e=!!this.enableGlobalButtonCheck,o=this.createBean(new We(t,s,i,i.updateModel.bind(i),e&&i.isGlobalButtons,e));this.comp=o,a=o.getGui()}else this.registerCSS(":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}"),a=r.getGui(),_exists(a)||_warn(69,{guiFromFilter:a});this.appendChild(a),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:o,eGui:this.getGui()}):r.afterGuiAttached?.(this.afterGuiAttachedParams)}))}onFilterDestroyed(e){const{source:t,column:o}=e;"api"!==t&&"paramsUpdated"!==t||o.getId()!==this.column.getId()||!this.beans.colModel.getColDefCol(this.column)||(_clearElement(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}};function isCombinedFilterModel(e){return!!e.operator}var $e,Ke,je,qe,Ye,Qe,Ze,Je="ag-resizer-wrapper",makeDiv=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Xe={tag:"div",cls:Je,children:[makeDiv("eTopLeft","topLeft"),makeDiv("eTop","top"),makeDiv("eTopRight","topRight"),makeDiv("eRight","right"),makeDiv("eBottomRight","bottomRight"),makeDiv("eBottom","bottom"),makeDiv("eBottomLeft","bottomLeft"),makeDiv("eLeft","left")]},et=class extends p{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:o}=this.offsetParent,i=o/2-this.getWidth()/2,s=t/2-this.getHeight()/2;this.offsetElement(i,s,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:o,minWidth:i,width:s,minHeight:n,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let d=0,c=0;const u=_isVisible(this.element);if(u){const e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(null!=t.minWidth){const o=e.offsetWidth-this.element.offsetWidth;c=Number.parseInt(t.minWidth,10)-o}if(null!=t.minHeight){const o=e.offsetHeight-this.element.offsetHeight;d=Number.parseInt(t.minHeight,10)-o}}if(this.minHeight=n||d,this.minWidth=i||c,s&&this.setWidth(s),r&&this.setHeight(r),s&&r||this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&o){let t=this.boundaryEl,o=!0;if(t||(t=this.findBoundaryElement(),o=!1),t){const i=Number.parseFloat(t.style.top),s=Number.parseFloat(t.style.left);o?this.offsetElement(Number.isNaN(s)?0:s,Number.isNaN(i)?0:i,e):this.setPosition(s,i)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(o),this.moveElementDragListener=o):(this.dragSvc?.removeDragSource(o),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(const t of Object.keys(e)){const o=!!e[t],i=this.getResizerElement(t),s={dragStartPixels:0,eElement:i,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};(o||!this.isAlive()&&!o)&&(o?(this.dragSvc?.addDragSource(s),this.resizeListeners.push(s),i.style.pointerEvents="all"):i.style.pointerEvents="none",this.resizable[t]=o)}}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,o=this.element;let i=!1;if("string"==typeof e&&e.includes("%"))_setFixedHeight(o,e),e=_getAbsoluteHeight(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?_setFixedHeight(o,e):(o.style.height=`${e}px`,o.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:o}=this.offsetParent;if(!o)return null;const i=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:i.top,r=e?0:s.top;let a=0;if(t){const e=this.element.parentElement;if(e){const{bottom:t}=e.getBoundingClientRect();a=t-i.bottom}}return o+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:o}=this.config;let i=!1;if("string"==typeof e&&e.includes("%"))_setFixedWidth(t,e),e=_getAbsoluteWidth(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:t}=this.offsetParent,i=o?this.position.x:this.element.getBoundingClientRect().left;t&&e+i>t&&(e=t-i)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?_setFixedWidth(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,o){const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:o}),this.setPosition(Number.parseFloat(s.style.left),Number.parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const applyMaxHeightToElement=()=>{const e=this.getAvailableHeight();this.element.style.setProperty("max-height",`${e}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=_observeResize(this.beans,this.popupSvc?.getPopupParent(),applyMaxHeightToElement)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:o,isTop:i,anywhereWithin:s,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!o,!!s,r)?0:r,movementY:this.shouldSkipY(t,!!i,n,a)?0:a}}shouldSkipX(e,t,o,i){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return!!l||(l=t?i<0&&e.clientX>a+n.left||i>0&&e.clientX<a+n.left:o?i<0&&e.clientX>r.right||i>0&&e.clientX<a+n.left:i<0&&e.clientX>r.right||i>0&&e.clientX<r.right,l)}shouldSkipY(e,t,o=0,i){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:s.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return!!l||(l=t?i<0&&e.clientY>a+n.top+o||i>0&&e.clientY<a+n.top:i<0&&e.clientY>r.bottom||i>0&&e.clientY<r.bottom,l)}createResizeMap(){const getElement2=e=>({element:this.element.querySelector(`[data-ref=${e}Resizer]`)});this.resizerMap={topLeft:getElement2("eTopLeft"),top:getElement2("eTop"),topRight:getElement2("eTopRight"),right:getElement2("eRight"),bottomRight:getElement2("eBottomRight"),bottom:getElement2("eBottom"),bottomLeft:getElement2("eBottomLeft"),left:getElement2("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(_createAgElement(Xe)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;this.element.querySelector(".ag-resizer-wrapper")?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:o,forcePopupParentAsOffsetParent:i}=this.config;o||i||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter((e=>!e.classList.contains("ag-hidden"))):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,o=0;for(const i of e){const e=!!i.style.flex&&"0 0 auto"!==i.style.flex;if(i===this.element)continue;let s=this.minHeight||0,n=this.minWidth||0;if(e){const e=window.getComputedStyle(i);e.minHeight&&(s=Number.parseInt(e.minHeight,10)),e.minWidth&&(n=Number.parseInt(e.minWidth,10))}else s=i.offsetHeight,n=i.offsetWidth;t+=s,o+=n}return{height:t,width:o}}applySizeToSiblings(e){let t=null;const o=this.getSiblings();if(o){for(let i=0;i<o.length;i++){const s=o[i];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=o[i+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some((e=>e))}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:i,isRight:s,isBottom:n,isLeft:r}=this.currentResizer,a=s||r,l=n||i,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:i}),u=this.position.x,h=this.position.y;let g=0,p=0;if(a&&d){const e=r?-1:1,t=this.getWidth(),o=t+d*e;let i=!1;r&&(g=t-o,(u+g<=0||o<=this.minWidth)&&(i=!0,g=0)),i||this.setWidth(o)}if(l&&c){const e=i?-1:1,t=this.getHeight(),o=t+c*e;let s=!1;i?(p=t-o,(h+p<=0||o<=this.minHeight)&&(s=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<o&&this.getMinSizeOfSiblings().height+o>this.element.parentElement.offsetHeight&&(s=!0),s||this.setHeight(o)}this.updateDragStartPosition(e.clientX,e.clientY),((t||o)&&g||p)&&this.offsetElement(u+g,h+p)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:o}=this.position;let i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:s,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+s,o+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},tt=class extends et{};function _isBrowserSafari(){return void 0===$e&&($e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),$e}function _isBrowserFirefox(){return void 0===Ke&&(Ke=/(firefox)/i.test(navigator.userAgent)),Ke}function _isMacOsUserAgent(){return void 0===je&&(je=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),je}function _isIOSUserAgent(){return void 0===qe&&(qe=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),qe}function _getTabIndex(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return-1!==t||null!==o&&(""!==o||_isBrowserFirefox())?t.toString():null}function _getScrollbarWidth(){return null==Qe&&initScrollbarWidthAndVisibility(),Qe}function initScrollbarWidthAndVisibility(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let o=t.offsetWidth-t.clientWidth;0===o&&0===t.clientWidth&&(o=null),t.parentNode&&t.remove(),null!=o&&(Qe=o,Ye=0===o)}function _isInvisibleScrollbar(){return null==Ye&&initScrollbarWidthAndVisibility(),Ye}var ot=!1,it=0;function toggleKeyboardMode(e){const t=ot,o="keydown"===e.type;o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(ot=o)}function _registerKeyboardFocusEvents(e){const t=_getDocument(e);return function addKeyboardModeEvents(e){it>0||(e.addEventListener("keydown",toggleKeyboardMode),e.addEventListener("mousedown",toggleKeyboardMode))}(t),it++,()=>{it--,function removeKeyboardModeEvents(e){it>0||(e.removeEventListener("keydown",toggleKeyboardMode),e.removeEventListener("mousedown",toggleKeyboardMode))}(t)}}function _isKeyboardMode(){return ot}function _findFocusableElements(e,t,o=!1){let i=a;t&&(i+=", "+t),o&&(i+=', [tabindex="-1"]');const s=Array.prototype.slice.apply(e.querySelectorAll("[tabindex], input, select, button, textarea, [href]")).filter((e=>_isVisible(e))),n=Array.prototype.slice.apply(e.querySelectorAll(i));if(!n.length)return s;return r=n,s.filter((e=>-1===r.indexOf(e)));var r}function _focusInto(e,t=!1,o=!1,i=!1){const s=_findFocusableElements(e,i?".ag-tab-guard":null,o),n=t?_last(s):s[0];return!!n&&(n.focus({preventScroll:!0}),!0)}function _findNextFocusableElement(e,t,o,i){const s=_findFocusableElements(t,o?':not([tabindex="-1"])':null),n=_getActiveDomElement(e);let r;r=o?s.findIndex((e=>e.contains(n))):s.indexOf(n);const a=r+(i?-1:1);return a<0||a>=s.length?null:s[a]}function _findTabbableParent(e,t=5){let o=0;for(;e&&null===_getTabIndex(e)&&++o<=t;)e=e.parentElement;return null===_getTabIndex(e)?null:e}var st=class extends p{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},o={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=o,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;const t=_findNextFocusableElement(this.beans,this.eFocusable,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())},...o}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add("ag-focus-managed"),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),o&&this.addManagedElementListeners(e,{focusout:o})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:e=>{if(e.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(e))return;const{callbacks:t}=this;t.shouldStopEventPropagation(e)?this.stopPropagationCallbacks.stopPropagation(e):e.key===q?t.onTabKeyDown(e):t.handleKeyDown&&t.handleKeyDown(e)}})}},nt="__ag_Grid_Stop_Propagation";function _stopPropagationForAgGrid(e){e[nt]=!0}function _isStopPropagationForAgGrid(e){return!0===e[nt]}var rt={isStopPropagation:_isStopPropagationForAgGrid,stopPropagation:_stopPropagationForAgGrid},at=class extends st{constructor(e,t){super(e,rt,t)}},lt=class extends Se{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new at(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new tt(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then((()=>this.updateUiVisibility()))}areStatesEqual(e,t){return e===t}refresh(e){const t=e,o=this.params;this.params=t;const{source:i,state:s,additionalEventAttributes:n}=t;"colDef"===i&&this.updateParams(t,o);const r=this.state;this.state=s;const a=n?.fromAction;return(a&&"apply"!==a||s.model!==r.model||!this.areStatesEqual(s.state,r.state))&&this.setModelIntoUi(s.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=_isUseApplyButton(e),this.setupApplyDebounced()}doesFilterPass(e){_warn(283);const{getHandler:t,model:o,column:i}=this.params;return t().doesFilterPass({...e,model:o,handlerParams:this.beans.colFilter.getHandlerParams(i)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return _warn(284),null!=this.params.model}setupApplyDebounced(){const e=getDebounceMs(this.params,this.defaultDebounceMs),t=_debounce(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return _warn(285),this.params.model}setModel(e){_warn(286);const{beans:t,params:o}=this;return t.colFilter.setModelForColumnLegacy(o.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:{valid:o=!0,model:i}}=this;if(!o)return!1;const s=!this.areModelsEqual(t.model,i);return s&&t.onAction("apply",e),s}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const o=this.getModelFromUi(),i={model:o,state:this.getState(),valid:this.canApply(o)};this.state=i;const{params:s,gos:n,eventSvc:r,applyActive:a}=this;s.onStateChange(i),s.onUiChange(this.getUiChangeEventParams()),n.get("enableFilterHandlers")||r.dispatchEvent({type:"filterModified",column:s.column,filterInstance:this}),i.valid&&(e??(e=a?void 0:"debounce"),"immediately"===e?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):"debounce"===e&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:o}=this;if(!t)return;const i="floatingFilter"===e||"columnFilter"===e;i?(t.restoreLastSize(),t.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(i)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return translateForFilter(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||null==e&&null==t||null!=e&&null!=t&&this.areNonNullModelsEqual(e,t)}};function _areCellsEqual(e,t){const o=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return o&&i&&s}function _getRowNode(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function _getCellByPosition(e,t){const o=e.spannedRowRenderer?.getCellByPosition(t);if(o)return o;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function _getRowAbove(e,t,o=!1){const{rowIndex:i,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(0===i)return"top"===s?null:"bottom"===s&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(o){return getNextStickyPosition(e,s?void 0:a.getRow(i),!0)??{rowIndex:i-1,rowPinned:s}}return{rowIndex:i-1,rowPinned:s}}function _getRowBelow(e,t,o=!1){const{rowIndex:i,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(function isLastRowInContainer(e,t){const{rowPinned:o,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:n}=e;if("top"===o){return(s?.getPinnedTopRowCount()??0)-1<=i}if("bottom"===o){return(s?.getPinnedBottomRowCount()??0)-1<=i}return n.getLastRow()<=i}(e,t))return"bottom"===s?null:"top"===s&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(o){return getNextStickyPosition(e,s?void 0:a.getRow(i))??{rowIndex:i+1,rowPinned:s}}return{rowIndex:i+1,rowPinned:s}}function getNextStickyPosition(e,t,o=!1){const{gos:i,rowRenderer:s}=e;if(!t?.sticky||!_isGroupRowsSticky(i))return;const n=s.getStickyTopRowCtrls(),r=s.getStickyBottomRowCtrls(),a=!r.some((e=>e.rowNode.rowIndex===t.rowIndex)),l=a?n:r,d=(o?-1:1)*(a?-1:1);let c;for(let e=0;e<l.length;e++)if(l[e].rowNode.rowIndex===t.rowIndex){c=l[e+d];break}return c?{rowIndex:c.rowNode.rowIndex,rowPinned:null}:void 0}function _isHeaderFocusSuppressed(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function _isCellFocusSuppressed(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function _focusNextGridCoreContainer(e,t,o=!1){const i=e.ctrlsSvc.get("gridCtrl");return!(o||!i.focusNextInnerContainer(t))||((o||!t&&!i.isDetailGrid())&&i.forceFocusOutOfContainer(t),!1)}function getFocusHeaderRowCount(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function getGroupRowsHeight(e){const t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of o){if(!i)continue;const o=i.getGroupRowCount()||0;for(let s=0;s<o;s++){const o=i.getGroupRowCtrlAtIndex(s),n=t[s];if(o){const i=getColumnGroupHeaderRowHeight(e,o);(null==n||i>n)&&(t[s]=i)}}}return t}function getColumnGroupHeaderRowHeight(e,t){let o=e.colModel.isPivotMode()?function getPivotGroupHeaderHeight(e){return e.gos.get("pivotGroupHeaderHeight")??getGroupHeaderHeight(e)}(e):getGroupHeaderHeight(e);const i=t.getHeaderCellCtrls();for(const e of i){const{column:t}=e,i=t.getAutoHeaderHeight();null!=i&&i>o&&t.isAutoHeaderHeight()&&(o=i)}return o}function getColumnHeaderRowHeight(e){let t=e.colModel.isPivotMode()?function getPivotHeaderHeight(e){return e.gos.get("pivotHeaderHeight")??getHeaderHeight(e)}(e):getHeaderHeight(e);return e.colModel.forAllCols((e=>{const o=e.getAutoHeaderHeight();null!=o&&o>t&&e.isAutoHeaderHeight()&&(t=o)})),t}function getHeaderHeight(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function getFloatingFiltersHeight(e){return e.gos.get("floatingFiltersHeight")??getHeaderHeight(e)}function getGroupHeaderHeight(e){return e.gos.get("groupHeaderHeight")??getHeaderHeight(e)}var dt=class extends m{setComp(e,t,o){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:s,touchSvc:n,ctrlsSvc:r}=i;s&&this.createManagedBean(new at(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>_requestAnimationFrame(this.beans,(()=>e())),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const o=getGroupRowsHeight(e).reduce(((e,t)=>e+t),0),i=getColumnHeaderRowHeight(e);e.filterManager?.hasFloatingFilters()&&(t+=getFloatingFiltersHeight(e)),t+=o,t+=i;const s=t+e.environment.getHeaderRowBorderWidth();if(this.headerHeightWithBorder!==s){this.headerHeightWithBorder=s;const e=`${s}px`;this.comp.setHeightAndMinHeight(e)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const t=e.visibleCols.allCols.some((e=>e.isSpanHeaderHeight()));this.comp.toggleCss("ag-header-allow-overflow",t)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:n,focusSvc:r}=s;(n.navigateHorizontally(i,!0,e)||!o&&r.focusOverlay(!1)||_focusNextGridCoreContainer(s,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case J:t="LEFT";case ee:_exists(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break;case X:t="UP";case te:_exists(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(_getActiveDomElement(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!o||!i?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;n!==this.eGui&&n!==s.getHeaderRowContainerCtrl()?.eViewport||i.showHeaderContextMenu(void 0,e,o)}},ct=class extends m{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=_isDomLayout(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,s=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;if(e)r=i+s+n;else if(r=i,this.addSpacer){0===(this.gos.get("enableRtl")?s:n)&&o.verticalScrollShowing&&(r+=o.getScrollbarWidth())}this.callback(r)}},ut=class extends m{};function setupCompBean(e,t,o){return o&&e.addDestroyFunc((()=>t.destroyBean(o))),o??e}var ht=class extends m{constructor(e,t,o,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?_last(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=_exists(this.columnOrGroup.getOldLeft());t?.isActive()&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),o=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=o,this.beans.colAnimation.executeNextVMTurn((()=>{this.actualLeft===o&&this.setLeft(o)}))}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:o,visibleCols:i}=this.beans;if(!_isDomLayout(o,"print"))return t;if("left"===e.getPinned())return t;const s=i.getColsLeftWidth();if("right"===e.getPinned()){return s+i.bodyWidth+t}return s+t}setLeft(e){if(_exists(e)&&(this.eCell.style.left=`${e}px`),isColumnGroup(this.columnOrGroup)){const e=this.columnOrGroup.getLeafColumns();if(!e.length)return;e.length>1&&function _setAriaColSpan(e,t){_setAriaAttribute(e,"colspan",t)}(this.ariaEl,e.length)}}};function _getHeaderClassesFromColDef(e,t,o,i){return _missing(e)?[]:getColumnClassesFromCollDef(e.headerClass,e,t,o,i)}function refreshFirstAndLastStyles(e,t,o){e.toggleCss("ag-column-first",o.isColAtEdge(t,"first")),e.toggleCss("ag-column-last",o.isColAtEdge(t,"last"))}function getColumnClassesFromCollDef(e,t,o,i,s){if(_missing(e))return[];let n;if("function"==typeof e){const r=function getClassParams(e,t,o,i){return _addGridCommonParams(t,{colDef:e,column:o,columnGroup:i})}(t,o,i,s);n=e(r)}else n=e;return"string"==typeof n?[n]:Array.isArray(n)?[...n]:[]}var gt=0,pt="headerCtrl",mt=class extends m{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+gt++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,o,i,s){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,o,i,s),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),s=i?.suppressHeaderKeyboardEvent;if(!_exists(s))return!1;return!!s(_addGridCommonParams(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e}))}getWrapperHasFocus(){return _getActiveDomElement(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let o;if("function"==typeof t){o=t(this.getHeaderClassParams())}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:s}=this,measureHeight=e=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:o,paddingBottom:n,borderBottomWidth:r,borderTopWidth:a}=_getElementSize(this.eGui),l=o+n+r+a,d=t.offsetHeight+l;if(e<5){const o=0==d;if(!_getDocument(s)?.contains(t)||o)return void _batchCall((()=>measureHeight(e+1)),"raf",s)}this.setColHeaderHeight(this.column,d)};let n,r=!1;const checkMeasuring=()=>{const e=this.column.isAutoHeaderHeight();e&&!r&&startMeasuring(),!e&&r&&stopMeasuring()},startMeasuring=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),measureHeight(0),n=_observeResize(this.beans,t,(()=>measureHeight(0)))},stopMeasuring=()=>{r=!1,n&&n(),this.comp.toggleCss("ag-header-cell-auto-height",!1),n=void 0};checkMeasuring(),i.addDestroyFunc((()=>stopMeasuring())),i.addManagedListeners(this.column,{widthChanged:()=>r&&measureHeight(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout((()=>measureHeight(0)))}}),o&&o(checkMeasuring)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:i}=this;e&&t&&i&&(refreshFirstAndLastStyles(e,t,o.visibleCols),_setAriaColIndex(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=_isHeaderFocusSuppressed(this.beans);this.eGui&&_addOrRemoveAttribute(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=_getActiveDomElement(this.beans),o=e.key===J||e.key===ee;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;(this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation());if((e.ctrlKey||e.metaKey)&&_normaliseQwertyAzerty(e)===de)return this.beans.clipboardSvc?.copyToClipboard();if(!o)return;const i=e.key===J!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const t=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(t,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(i)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:o}=this;let i=e.key===J!==t.get("enableRtl");const s=o.getPinned(),n=t.get("enableRtl");return s&&n!==("right"===s)&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout((()=>{this.resizeFeature?.toggleColumnResizing(!1)}),150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case ne:case se:case re:case ae:t&&e.preventDefault()}}addDomData(e){const t=pt,{eGui:o,gos:i}=this;_setDomData(i,o,t,this),e.addDestroyFunc((()=>_setDomData(i,o,t,null)))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){const i=e??t,{menuSvc:s,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&i.preventDefault(),s?.isHeaderContextMenuEnabled(o)&&s.showHeaderContextMenu(o,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",o)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:o}=this;e.isColumn?o.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):o.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},ft=class extends mt{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,o,i,s){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:d,colHover:c,rangeSvc:u}=a,h=setupCompBean(this,d,s);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:e=>this.setRefreshFunction("measuring",e),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,o,e,this)):_setDisplayed(o,!1),c?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new ht(r,t,a)),h.createManagedBean(new at(t,{shouldStopEventPropagation:e=>this.shouldStopEventPropagation(e),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],(()=>this.refresh())),h.addManagedListeners(r,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const listener=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:listener,columnRowGroupChanged:listener,columnPivotChanged:listener,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc((()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()}))}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return _addGridCommonParams(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return function _getHeaderCompDetails(e,t,o){return e.getCompDetails(t,Pe,"agColumnHeader",o)}(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return _addGridCommonParams(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!o&&(!this.openFilterEnabled||_isLegacyMenuEnabled(this.gos)),showColumnMenu:(t,o)=>{e?.showColumnMenu({column:this.column,buttonElement:t,positionBy:"button",onClosedCallback:o})},showColumnMenuAfterMouseClick:(t,o)=>{e?.showColumnMenu({column:this.column,mouseEvent:t,positionBy:"mouse",onClosedCallback:o})},showFilter:t=>{e?.showFilterMenu({column:this.column,buttonElement:t,containerType:"columnFilter",positionBy:"button"})},progressSort:e=>{t?.progressSort(this.column,!!e,"uiColumnSorted")},setSort:(e,o)=>{t?.setSortForColumn(this.column,_getSortDefFromInput(e),!!o,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(e,t)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(e,t)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",(()=>{const o=t.createSelectAllFeature(this.column);o&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(o),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!o&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))})))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===Z?this.selectAllFeature?.onSpaceKeyDown(e):e.key===Y?this.onEnterKeyDown(e):e.key===te&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){const{column:t,gos:o,sortable:i,beans:s}=this;let n=!1;(e.ctrlKey||e.metaKey)&&(n=this.showMenuOnKeyPress(e,!0)),n||(!e.altKey&&_getEnableColumnSelection(o)?s.rangeSvc?.handleColumnSelection(t,e):i&&s.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();return!!isHeaderComp(o)&&(!!o.onMenuKeyboardShortcut(t)&&(e.preventDefault(),!0))}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),_isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const refreshHeaderClasses=()=>{const e=_getHeaderClassesFromColDef(this.column.getColDef(),this.gos,this.column,null),t=this.userHeaderClasses;this.userHeaderClasses=new Set(e);for(const o of e)t.has(o)?t.delete(o):this.comp.toggleCss(o,!0);for(const e of t)this.comp.toggleCss(e,!1)};this.setRefreshFunction("headerClasses",refreshHeaderClasses),refreshHeaderClasses()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),e&&this.draggable&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;!!(null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass)&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();if(!t)return!1;if(!t.refresh)return!1;return t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const listener=()=>{const e=this.column.getActualWidth();this.comp.setWidth(`${e}px`)};e.addManagedListeners(this.column,{widthChanged:listener}),listener()}setupMovingCss(e){const listener=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:listener}),listener()}setupMenuClass(e){const listener=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:listener}),listener()}setupSortableClass(e){const updateSortableCssClass=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};updateSortableCssClass(),this.setRefreshFunction("updateSortable",updateSortableCssClass),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const listener=()=>{const e=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",e),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:listener}),listener()}setupWrapTextClass(){const listener=()=>{const e=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",e)};listener(),this.setRefreshFunction("wrapText",listener)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=0===e,o=1===e;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:o,beans:i}=this,s=getGroupRowsHeight(this.beans),n=0===s.reduce(((e,t)=>e+t),0);if(o.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight())return e.style.removeProperty("top"),e.style.removeProperty("height"),o.toggleCss("ag-header-span-height",!1),void o.toggleCss("ag-header-span-total",!1);const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",r>0);const l=getColumnHeaderRowHeight(i);if(0===r)return o.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),void e.style.setProperty("height",`${l}px`);o.toggleCss("ag-header-span-total",a);const d=(this.column.getFirstRealParent()?.getLevel()??-1)+1,c=s.length-d;let u=0;for(let e=0;e<c;e++)u+=s[s.length-1-e];e.style.setProperty("top",-u+"px"),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){let e=null;const{beans:t,column:o,comp:i,sortable:s}=this;if(s){const s=this.getLocaleTextFunc(),n=t.sortSvc?.getDisplaySortForColumn(o)??null;i.setAriaSort(function _getAriaSortState(e){const t=e?.direction;return"asc"===t?"ascending":"desc"===t?"descending":"mixed"===t?"other":"none"}(n)),e=s("ariaSortableColumn","Press ENTER to sort")}else i.setAriaSort();this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;if(this.menuEnabled){e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")}this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null;const{openFilterEnabled:t,gos:o}=this;if(t&&!_isLegacyMenuEnabled(o)){e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")}this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;if(this.column.isFilterActive()){e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")}this.setAriaDescriptionProperty("filter",e)}refreshAriaCellSelection(){let e=null;const{gos:t,column:o,beans:i}=this;if(_getEnableColumnSelection(t)){const t=this.getLocaleTextFunc(),s=i.rangeSvc?.isColumnInAnyRange(o);e=t("ariaColumnCellSelection",`Press CTRL+SPACE to ${s?"de":""}select all visible cells in this column`)}this.setAriaDescriptionProperty("cellSelection",e)}setAriaDescriptionProperty(e,t){const o=this.ariaDescriptionProperties;null!=t?o.set(e,t):o.delete(e)}announceAriaDescription(){const{beans:e,eGui:t,ariaDescriptionProperties:o}=this;if(!t.contains(_getActiveDomElement(e)))return;const i=Array.from(o.keys()).sort(((e,t)=>"filter"===e?-1:t.charCodeAt(0)-e.charCodeAt(0))).map((e=>o.get(e))).join(". ");e.ariaAnnounce?.announceValue(i,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const listener=e=>this.handleMouseOverChange("mouseenter"===e.type);e.addManagedListeners(this.eGui,{mouseenter:listener,mouseleave:listener,click:()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},contextmenu:e=>this.handleContextMenuMouseEvent(e,void 0,this.column)})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return isHeaderComp(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function isHeaderComp(e){return"function"==typeof e?.getAnchorElementForMenu&&"function"==typeof e.onMenuKeyboardShortcut}var Ct=0,wt=class extends m{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=Ct++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";"group"===o?i="ag-header-row-group":"filter"===o&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=_isDomLayout(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return!!this.comp&&this.allCtrls.every((e=>null!=e.eGui))}setComp(e,t,o=!0){this.comp=e,t=setupCompBean(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:e=>this.onVirtualColumnsChanged(e.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",(e=>this.isEnsureDomOrder=e.currentValue)),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=_isDomLayout(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;if(this.isPrintLayout){return null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null)}return e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=getGroupRowsHeight(this.beans);for(let o=0;o<t.length;o++){if(o===this.rowIndex&&"group"===this.type)return{topOffset:e,rowHeight:t[o]};e+=t[o]}const o=getColumnHeaderRowHeight(this.beans);if("column"===this.type)return{topOffset:e,rowHeight:o};e+=o;return{topOffset:e,rowHeight:getFloatingFiltersHeight(this.beans)}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),o=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,o,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const o of t)this.recycleAndCreateHeaderCtrls(o,this.ctrlsById,e);const isFocusedAndDisplayed=e=>{const{focusSvc:t,visibleCols:o}=this.beans;if(!t.isHeaderWrapperFocused(e))return!1;return o.isVisible(e.column)};if(e)for(const[t,o]of e){isFocusedAndDisplayed(o)?this.ctrlsById.set(t,o):this.destroyBean(o)}return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;const i=e.getUniqueId();let s;o&&(s=o.get(i),o.delete(i));if(s&&s.column!=e&&(this.destroyBean(s),s=void 0),null==s)switch(this.type){case"filter":s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break;case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new ft(e,this))}t.set(i,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return"group"===this.type?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const o=this.allCtrls.find((t=>t.column==e));if(!o)return!1;return o.focus(t)}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},vt=class extends m{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:o,ctrlsSvc:i,colModel:s,colMoves:n}=this.beans;this.setupCenterWidth(),o?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${"string"==typeof this.pinned?this.pinned:"center"}Header`;i.register(a,this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:o,visibleCols:i}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=this.getAllCtrls();(()=>{const t=i.headerGroupRowCount;s=t,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const o=this.groupsRowCtrls.length;if(o!==t)if(o>t){for(let e=t;e<o;e++)this.destroyBean(this.groupsRowCtrls[e]);this.groupsRowCtrls.length=t}else for(let e=o;e<t;e++){const t=this.createBean(new wt(e,this.pinned,"group"));this.groupsRowCtrls.push(t)}})(),(()=>{const t=s++;this.hidden?this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl):null!=this.columnsRowCtrl&&e?this.columnsRowCtrl.rowIndex!==t&&this.columnsRowCtrl.setRowIndex(t):(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new wt(t,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=!!o?.hasFloatingFilters()&&!this.hidden;const destroyPreviousComp=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void destroyPreviousComp();e||destroyPreviousComp();const t=s++;if(this.filtersRowCtrl){this.filtersRowCtrl.rowIndex!==t&&this.filtersRowCtrl.setRowIndex(t)}else this.filtersRowCtrl=this.createBean(new wt(t,this.pinned,"filter"))})();const a=this.getAllCtrls();this.comp.setCtrls(a),this.restoreFocusOnHeader(t,n),r.length!==a.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const findCtrl=t=>t?.getHeaderCellCtrls().find((t=>t.column===e));if(isColumn(e))return findCtrl(this.columnsRowCtrl);if(0!==this.groupsRowCtrls.length)for(let e=0;e<this.groupsRowCtrls.length;e++){const t=findCtrl(this.groupsRowCtrls[e]);if(t)return t}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,o){const i=this.getAllCtrls()[e];return!!i&&i.focusHeader(t,o)}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const o=e?.createBodyDropTarget(this.pinned,t);o&&this.createManagedBean(o)}restoreFocusOnHeader(e,t){if(!t)return;const{column:o}=t;o.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new ct((e=>this.comp.setCenterWidth(`${e}px`)),!0))}},bt=class extends ve{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent,t=e?.isAlive();t&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},St=class extends bt{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange((()=>e.validate()))}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};var yt=class extends Se{constructor(){super()}},Rt={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},Ft={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},Dt={tag:"span",cls:"ag-overlay-no-matching-rows-center"},Pt={tag:"span",cls:"ag-overlay-no-rows-center"},xt=class extends ve{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}")}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:o,labelAlignment:i,disabled:s,labelEllipsis:n}=this.config;null!=s&&this.setDisabled(s),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=o&&this.setLabelWidth(o),null!=n&&this.setLabelEllipsis(n),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;_clearElement(t),"string"==typeof e?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),""===e?(_setDisplayed(t,!1),_setAriaRole(t,"presentation")):(_setDisplayed(t,!0),_setAriaRole(t,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this}setLabelAlignment(e){const t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||_setElementWidth(this.eLabel,e),this}setDisabled(e){e=!!e;const t=this.getGui();return _setDisabled(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},Et=class extends xt{constructor(e,t,o,i){super(e,t,o),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:o,ariaLabel:i}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=o&&this.onValueChange(o),null!=i&&this.setAriaLabel(i),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),o=this.getLabel();null==o||""==o||null!==function _getAriaLabel(e){return e.getAttribute("aria-label")}(e)?_setAriaLabelledBy(e,""):_setAriaLabelledBy(e,t??"")}setAriaLabel(e){return _setAriaLabel(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return _setFixedWidth(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}};var Mt=class extends Et{constructor(e,t,o="text",i="input"){super(e,e?.template??function buildTemplate(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=fe,this.eWrapper=fe,this.eInput=fe}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:o,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),o.classList.add(`${i}-input`),this.addCss("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:n,inputPlaceholder:r,autoComplete:a,tabIndex:l}=this.config;null!=s&&this.setInputName(s),null!=n&&this.setInputWidth(n),null!=r&&this.setInputPlaceholder(r),null!=a&&this.setAutoComplete(a),this.addInputListeners(),this.activateTabIndex([o],l)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){"input"===this.displayFieldTag&&(this.inputType=e,_addOrRemoveAttribute(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return _setElementWidth(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return _addOrRemoveAttribute(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return _setAriaLabel(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return _setDisabled(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(!0===e)_addOrRemoveAttribute(this.eInput,"autocomplete",null);else{const t="string"==typeof e?e:"off";_addOrRemoveAttribute(this.eInput,"autocomplete",t)}return this}},Tt=class extends Mt{constructor(e,t="ag-checkbox",o="checkbox"){super(e,t,o),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t,name:o}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t),null!=o&&this.setName(o)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return void 0===this.selected||!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0;const o=this.eInput;o.checked=e,o.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,o){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:o});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",!0===e),t.toggle("ag-indeterminate",null==e)}},At={selector:"AG-CHECKBOX",component:Tt},It={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};function _getClientSideRowModel(e){const t=e.rowModel;return"clientSide"===t.getType()?t:void 0}function _getInfiniteRowModel(e){const t=e.rowModel;return"infinite"===t.getType()?t:void 0}var kt="row-group-",Lt="t-",_t="b-",Gt=0,Nt=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Gt++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return void 0!==e?e:this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get allLeafChildren(){const e=this._leafs;return void 0===e?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:o,eventSvc:i}=this.beans,s=this.data;this.data=e,o?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const o=this.sibling.createDataChangedEvent(e,s,t);this.sibling.__localEventService?.dispatchEvent(o)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,s,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,o){return{type:"dataChanged",node:this,oldData:t,newData:e,update:o}}getRowIndexString(){return null==this.rowIndex?(_error(13),null):"top"===this.rowPinned?Lt+this.rowIndex:"bottom"===this.rowPinned?_t+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:o}=this.beans,i=o?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));const n=this.createDataChangedEvent(e,s,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=_getRowIdCallback(this.beans.gos);if(t)if(this.data){const e=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:e.length>0?e:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(kt)&&_error(14,{groupPrefix:kt})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=null!==e;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,o){this.beans.expansionSvc?.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:i,valueSvc:s,gos:n,editSvc:r}=this.beans;if(null==e)return!1;let a=i.getCol(e)??i.getColDefCol(e);if(!a)return!1;if(!this.group){const e=a.getColDef();e.pivotValueColumn&&(a=e.pivotValueColumn)}const l=s.getValueForDisplay({column:a,node:this,from:"data"}).value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:e},data:i,rowIndex:s,rowPinned:n}=this;return e.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:s,rowPinned:n,column:a,colDef:a.colDef,data:i,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}if(r&&!r.committing){const e=r.setDataValue({rowNode:this,column:a},t,o);if(null!=e)return e}const d=s.setValue(this,a,t,o);return this.dispatchCellChangedEvent(a,t,l),d&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),d}getDataValue(e){const{colModel:t,valueSvc:o,formula:i}=this.beans;if(null==e)return;const s=t.getCol(e)??t.getColDefCol(e);if(!s)return;let n=o.getValue(s,this,"data");return i&&s.isAllowFormula()&&i.isFormula(n)&&(n=i.resolveValue(s,this)),n}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,o){const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};this.__localEventService?.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let o=0,i=t.length;o<i;++o)t[o].depthFirstSearch(e);e(this)}getAggregatedChildren(e){const t=this.beans;return t.aggStage?.getAggregatedChildren(this,t.colModel.getCol(e))??[]}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new s)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const o=this.__localEventService??(this.__localEventService=new s);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,o);const i=this.frameworkEventListenerService?.wrap(e,t)??t;o.addEventListener(e,i)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){const o=this.__localEventService;o&&(o.removeEventListener(e,t),o.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(_warn(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(-1===this.level)return[];if(null==this.key)return;const e=[];let t=this;for(;null!=t?.key;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;const t=this.pinnedSibling;if(t?.rowPinned&&!this.rowPinned&&this.beans.pinnedRowModel?.pinRow(t,null),e?this.clearRowTopAndRowIndex():(this.setRowTop(null),this.setRowIndex(null)),!this.footer){const t=this.detailNode;t&&t._destroy(e);const o=this.sibling;o&&o._destroy(e)}return!0}};function _createGlobalRowEvent(e,t,o){return _addGridCommonParams(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Vt=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),_prevOrNextDisplayedRow=(e,t,o)=>{if(!o)return;let i=o.rowIndex;if(null==i)return;i+=t;const s=e.getRowCount();for(;i>=0&&i<s;){const o=e.getRow(i);if(!o||!o.footer&&!o.detail)return o;i+=t}},Ot=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:o,order:i}=this;t.has(e)||(t.add(e),o.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),_removeFromArray(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:o,queued:i}=this;e.clear(),i.clear(),t.clear(),o.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:o}=this.beans,i=e?.getSortOptions()??[],s=this.order,n=function _removeGrandTotalRow(e){const t=e.findIndex(_isPinnedNodeGrandTotal);if(t>-1)return e.splice(t,1)?.[0]}(s);if(s.sort(((e,o)=>t?.compareRowNodes(i,e,o)||(e.pinnedSibling?.rowIndex??0)-(o.pinnedSibling?.rowIndex??0))),!n)return;const r=_getGrandTotalRow(o);"bottom"===r||"pinnedBottom"===r?this.order.push(n):this.order.unshift(n)}hide(e){const{all:t,visible:o}=this,i=o.size;return t.forEach((t=>e(t)?o.delete(t):o.add(t))),this.order=Array.from(o),this.sort(),i!=o.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function _isDisplayedAfterFilterCSRM(e){if(-1===e.level)return!0;const t=e.parent;return!!t?.childrenAfterSort?.some((t=>t==e))&&_isDisplayedAfterFilterCSRM(t)}function _shouldHidePinnedRows(e,t){const{gos:o,rowModel:i,filterManager:s}=e;return _isServerSideRowModel(o)?!i.getRowNode(t.id):s?.isAnyFilterPresent()?!_isDisplayedAfterFilterCSRM(t):!!o.get("pivotMode")&&!t.group}function _isPinnedNodeGrandTotal(e){return!!e.pinnedSibling&&function _isNodeGrandTotal(e){return!!e.footer&&-1===e.level}(e.pinnedSibling)}var Ht=class extends m{constructor(){super(...arguments),this.csrm=null}postConstruct(){const{gos:e,beans:t}=this;this.top=new Ot(t,"top"),this.bottom=new Ot(t,"bottom"),this.csrm=_getClientSideRowModel(t)??null;const shouldHide=e=>_shouldHidePinnedRows(t,e.pinnedSibling),runIsRowPinned=()=>{const o=e.get("isRowPinned");o&&e.get("enableRowPinning")&&t.rowModel.forEachNode((e=>this.pinRow(e,o(e))),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:e})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let t=!1;this.forContainers((e=>{t||(t=e.hide(shouldHide))}));const o=this.refreshRowPositions();(!e||o||t)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(removeGroupRows),this.refreshRowPositions()},rowNodeDataChanged:({node:t})=>{(e.get("isRowPinnable")?.(t)??!0)||this.pinRow(t,null)},firstDataRendered:runIsRowPinned}),this.addManagedPropertyListener("pivotMode",(()=>{this.forContainers((e=>e.hide(shouldHide))),this.dispatchRowPinnedEvents()})),this.addManagedPropertyListener("grandTotalRow",(({currentValue:e})=>{this._grandTotalPinned="pinnedBottom"===e?"bottom":"pinnedTop"===e?"top":null})),this.addManagedPropertyListener("isRowPinned",runIsRowPinned)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers((e=>{const t=[];e.forEach((e=>t.push(e))),t.forEach((e=>this.pinRow(e,null))),e.clear()})),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){if(null!=t&&e.destroyed)return;if(e.footer){const o=e.level;if(o>-1)return;if(-1===o)return this._grandTotalPinned=t,void this.csrm?.reMapRows()}const i=e.rowPinned??e.pinnedSibling?.rowPinned;if(null!=i&&null!=t&&t!=i){const i=e.rowPinned?e:e.pinnedSibling,s=e.rowPinned?e.pinnedSibling:e;return this.pinRow(i,null,o),void this.pinRow(s,t,o)}const s=o&&function getSpannedRows(e,t,o){const{rowSpanSvc:i}=e,s=(o&&i?.isCellSpanning(o,t))??!1;if(o&&s)return i?.getCellSpan(o,t)?.spannedNodes}(this.beans,e,o);if(s)s.forEach((e=>this.pinRow(e,t)));else if(null==t){const o=e.rowPinned?e:e.pinnedSibling,i=this.findPinnedRowNode(o);if(!i)return;i.delete(o);const s=o.pinnedSibling;_destroyRowNodeSibling(o),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(s)}else{const o=_createPinnedSibling(this.beans,e,t),i=this.getContainer(t);i.add(o),_shouldHidePinnedRows(this.beans,e)&&i.hide((e=>_shouldHidePinnedRows(this.beans,e.pinnedSibling))),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return 0===this.getContainer(e).size()}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const updateRowHeight=o=>{if(o.rowHeightEstimated){const i=_getRowHeightForNode(this.beans,o);o.setRowTop(t),o.setRowHeight(i.height),t+=i.height,e=!0}};return this.bottom.forEach(updateRowHeight),t=0,this.top.forEach(updateRowHeight),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return getTotalHeight(this.top)}getPinnedBottomTotalHeight(){return getTotalHeight(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const buildState=e=>{const t=[];return this.forEachPinnedRow(e,(e=>{const o=e.pinnedSibling?.id;null!=o&&t.push(o)})),t};return{top:buildState("top"),bottom:buildState("bottom")}}setPinnedState(e){this.forContainers(((t,o)=>{for(const i of e[o]){const e=this.beans.rowModel.getRowNode(i);e?this.pinRow(e,o):t.queue(i)}}))}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers(((e,t)=>{const o=new Set;e.forEachQueued((e=>{const t=this.beans.rowModel.getRowNode(e);t&&o.add(t)}));for(const i of o)e.unqueue(i.id),this.pinRow(i,t)}))}pinGrandTotalRow(){const{csrm:e,beans:t,_grandTotalPinned:o}=this;if(!e)return;const i=e.rootNode?.sibling;if(!i)return;const s=i.pinnedSibling,n=s&&this.findPinnedRowNode(s);if(o){if(n&&n.floating!==o&&(_destroyRowNodeSibling(s),n.delete(s)),!n||n.floating!==o){const e=_createPinnedSibling(t,i,o);this.getContainer(o).add(e)}}else{if(!n)return;_destroyRowNodeSibling(s),n.delete(s)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers((e=>e.forEach((e=>e.setRowHeight(e.rowHeight,!0)))))}getContainer(e){return"top"===e?this.top:this.bottom}findPinnedRowNode(e){return this.top.has(e)?this.top:this.bottom.has(e)?this.bottom:void 0}refreshRowPositions(e){const refreshAll=e=>function refreshRowPositions(e,t){let o=0,i=!1;return t.forEach(((t,s)=>{if(i||(i=t.rowTop!==o),t.setRowTop(o),t.rowHeightEstimated||null==t.rowHeight){const o=_getRowHeightForNode(e,t).height;i||(i=t.rowHeight!==o),t.setRowHeight(o)}t.setRowIndex(s),o+=t.rowHeight})),i}(this.beans,e);if(e)return refreshAll(this.getContainer(e));let t=!1;return this.forContainers((e=>{const o=refreshAll(e);t||(t=o)})),t}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function _createPinnedSibling(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;const i=((e,t)=>{const o=new Nt(t);for(const t of Object.keys(e))Vt.has(t)||(o[t]=e[t]);return o.oldRowTop=null,o})(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=o;const s="top"===o?Lt:_t;return i.id=`${s}${o}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function _destroyRowNodeSibling(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function removeGroupRows(e){const t=new Set;e.forEach((e=>{e.group&&t.add(e)})),t.forEach((t=>e.delete(t)))}function getTotalHeight(e){const t=e.size();if(0===t)return 0;const o=e.getByIndex(t-1);return void 0===o?0:o.rowTop+o.rowHeight}var Bt=class extends m{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",(e=>this.setPinnedRowData(e.currentValue,"top"))),this.addManagedPropertyListener("pinnedBottomRowData",(e=>this.setPinnedRowData(e.currentValue,"bottom"))),this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return 0===this.getCache(e).order.length}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const estimateRowHeight=e=>{e.setRowHeight(e.rowHeight,!0)};forEach(this.pinnedBottomRows,estimateRowHeight),forEach(this.pinnedTopRows,estimateRowHeight)}}ensureRowHeightsValid(){let e=!1,t=0;const updateRowHeight=o=>{if(o.rowHeightEstimated){const i=_getRowHeightForNode(this.beans,o);o.setRowTop(t),o.setRowHeight(i.height),t+=i.height,e=!0}};return forEach(this.pinnedBottomRows,updateRowHeight),t=0,forEach(this.pinnedTopRows,updateRowHeight),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const o=this.getCache(t);if(void 0===e)return o.order.length=0,void(o.cache={});const i=_getRowIdCallback(this.gos),s="top"===t?Lt:_t,n=new Set(o.order),r=[],a=new Set;let l=0,d=-1;for(const c of e){const e=i?.({data:c,level:0,rowPinned:t})??s+this.nextId++;if(a.has(e)){_warn(96,{id:e,data:c});continue}d++,a.add(e),r.push(e);const u=getById(o,e);if(void 0!==u)u.data!==c&&u.updateData(c),l+=this.setRowTopAndRowIndex(u,l,d),n.delete(e);else{const i=new Nt(this.beans);i.id=e,i.data=c,i.rowPinned=t,l+=this.setRowTopAndRowIndex(i,l,d),o.cache[e]=i,o.order.push(e)}}for(const e of n)getById(o,e)?.clearRowTopAndRowIndex(),delete o.cache[e];o.order=r}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(_getRowHeightForNode(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return getTotalHeight2(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return getTotalHeight2(this.pinnedBottomRows)}getPinnedTopRowCount(){return getSize(this.pinnedTopRows)}getPinnedBottomRowCount(){return getSize(this.pinnedBottomRows)}getPinnedTopRow(e){return getByIndex(this.pinnedTopRows,e)}getPinnedBottomRow(e){return getByIndex(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return getById(this.getCache(t),e)}forEachPinnedRow(e,t){return forEach(this.getCache(e),t)}getCache(e){return"top"===e?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function getTotalHeight2(e){const t=getSize(e);if(0===t)return 0;const o=getByIndex(e,t-1);return void 0===o?0:o.rowTop+o.rowHeight}function getById(e,t){return e.cache[t]}function getByIndex(e,t){return getById(e,e.order[t])}function forEach(e,t){e.order.forEach(((o,i)=>{const s=getById(e,o);s&&t(s,i)}))}function getSize(e){return e.order.length}var Wt,zt=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let o=this.eventSvc;if(!o){if(null===o)return;this.eventSvc=o=new s;const e=this.onTouchStart.bind(this);this.startListener=e,this.eElement.addEventListener("touchstart",e,{passive:!0})}o.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!(e=>{if(Wt){if(Wt.has(e))return!1}else Wt=new WeakSet;return Wt.add(e),!0})(e))return;const t=e.touches[0];this.touchStart=t;const o=this.handlers;if(!o.length){const e=this.eElement,t=e.ownerDocument,i=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this),n=this.onTouchCancel.bind(this),r={passive:!0},a={passive:!1};addTempEventHandlers(o,[e,"touchmove",i,r],[t,"touchcancel",n,r],[t,"touchend",s,a],[t,"contextmenu",preventEventDefault,a])}this.clearLongPress(),this.longPressTimer=window.setTimeout((()=>{this.longPressTimer=0,this.touchStart!==t||this.moved||(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))}),550)}onTouchMove(e){const{moved:t,touchStart:o}=this;if(!t&&o){const t=_getFirstActiveTouch(o,e.touches);t&&!_areEventsNear(t,o,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;t&&_getFirstActiveTouch(t,e.changedTouches)&&(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&preventEventDefault(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;t&&_getFirstActiveTouch(t,e.changedTouches)&&(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const o=this.lastTapTime;if(o){t-o>500&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null)}this.lastTapTime=t}cancel(){this.clearLongPress(),clearTempEventHandlers(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},Ut=1;function createGridApi(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var $t=Object.fromEntries(["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"].map(((e,t)=>[e,t])));function gridBeanInitComparator(e,t){return((e.beanName?$t[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER)-((t.beanName?$t[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER)}function gridBeanDestroyComparator(e,t){return"gridDestroySvc"===e?.beanName?-1:"gridDestroySvc"===t?.beanName?1:0}var Kt={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},jt=class extends m{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},o=t.autoHeight?Kt.AUTO_HEIGHT:t.print?Kt.PRINT:Kt.NORMAL;this.view.updateLayoutClasses(o,t)}},qt=class extends Se{constructor(e,t){super(),this.direction=t,this.eViewport=fe,this.eContainer=fe,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",_isMacOsUserAgent()||_isIOSUserAgent())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=_isInvisibleScrollbar(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),onActivate=()=>this.toggleCss("ag-scrollbar-active",!0),onDeactivate=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:onActivate,mousedown:onActivate,touchstart:onActivate,mouseleave:onDeactivate,touchend:onDeactivate})}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),_requestAnimationFrame(this.beans,(()=>this.setScrollVisible()))}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout((()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0}),400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;!function _waitUntil(e,t,o,i=100){const s=Date.now();let n=null,r=!1;const clearWait=()=>{null!=n&&(window.clearInterval(n),n=null)};e.addDestroyFunc(clearWait);const internalCallback=()=>{const e=Date.now()-s>i;(t()||e)&&(o(),r=!0,clearWait())};internalCallback(),r||(n=window.setInterval(internalCallback,10))}(this,(()=>_isVisible(t)),(()=>this.setScrollPosition(e)),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},Yt={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},Qt=class extends qt{constructor(){super(Yt,"horizontal"),this.eLeftSpacer=fe,this.eRightSpacer=fe,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new ct((e=>this.eContainer.style.width=`${e}px`))),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),_setFixedWidth(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),_setFixedWidth(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,s=o?0:0===i&&t?16:i,apply=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),_setFixedHeight(this.getGui(),s),_setFixedHeight(this.eViewport,s),_setFixedHeight(this.eContainer,s),s||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(apply,100):apply()}getScrollPosition(){return _getScrollLeft(this.eViewport,this.enableRtl)}setScrollPosition(e){_isVisible(this.eViewport)||this.attemptSettingScrollPosition(e),_setScrollLeft(this.eViewport,e,this.enableRtl)}},Zt=class extends m{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,o=null!=t?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},Jt={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},Xt=class extends qt{constructor(){super(Jt,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Zt(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,s=0===i&&o?16:i;this.toggleCss("ag-scrollbar-invisible",o),_setFixedWidth(this.getGui(),s),_setFixedWidth(this.eViewport,s),_setFixedWidth(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const t=e.getGridBodyCtrl().eBodyViewport,o=this.getScrollPosition(),i=t.scrollTop;o!=i&&this.setScrollPosition(i,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){t||_isVisible(this.eViewport)||this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},eo="Viewport",to="fakeVScrollComp",oo=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],io=class extends m{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=_debounce(this,(()=>this.lastScrollSource[1]=null),150),this.resetLastVScrollDebounced=_debounce(this,(()=>this.lastScrollSource[0]=null),150)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,(e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()}))}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,eo)});for(const e of oo){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),o=t?_debounce(this,this.onVScroll.bind(this,eo),100):this.onVScroll.bind(this,eo),i=t?_debounce(this,this.onVScroll.bind(this,to),100):this.onVScroll.bind(this,to);this.addManagedElementListeners(this.eBodyViewport,{scroll:o}),this.registerScrollPartner(e,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){null==this.centerRowsCtrl||(void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...oo,eo]){if(this.lastScrollSource[1]===t)continue;_setScrollLeft(this.getViewportForSource(t),e,this.enableRtl)}}getViewportForSource(e){return e===eo?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(0===t?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;const i=_getScrollLeft(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(t=e===eo?this.eBodyViewport.scrollTop:this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:o}=this;o?.setScrollTop(t),this.nextScrollTop=t,e===eo?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,o?.active?o.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout((()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})}),150)}shouldBlockScrollUpdate(e,t,o=!1){return!(o&&!_isIOSUserAgent())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){const t=_getInnerHeight(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return!!(e<0||e+t>o)}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:o}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>o}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const o of oo){if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}}t&&this.onHScroll(eo)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const o=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl?e>0?0:o:Math.min(Math.max(e,0),o)),_setScrollLeft(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:e,lastScrollTop:t}=this;return{top:t,bottom:t+e}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:o}=this.beans,i=o.getRowCount();let s=-1;for(let t=0;t<i;t++){const i=o.getRow(t);if("function"==typeof e){const o=e;if(i&&o(i)){s=t;break}}else if(e===i||e===i.data){s=t;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,o=0){if(_isDomLayout(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if("number"!=typeof e||e<0||e>=s)return void _warn(88,{index:e});this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming((()=>{const s=this.ctrlsSvc.getGridBodyCtrl(),n=i.getRow(e);let d,c,u=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:e,stickyBottomHeight:o}=s,i=n.rowTop,h=n.rowHeight,g=r.getPixelOffset(),p=n.rowTop-g,m=p+n.rowHeight,f=this.getVScrollPosition(),C=a.divStretchOffset,w=f.top+C,v=f.bottom+C,b=v-w,S=a.getScrollPositionForPixel(p),y=a.getScrollPositionForPixel(m-b),R=Math.min((S+y)/2,p),F=w+e>p,D=v-o<m;let P=null;"top"===t?P=S-e:"bottom"===t?P=y+o:"middle"===t?P=R:F?P=S-e:D&&(P=y-S>b?S-e:y+o),null!==P&&(this.setVerticalScrollPosition(P),l.redraw({afterScroll:!0})),d=i!==n.rowTop||h!==n.rowHeight,c=e!==s.stickyTopHeight||o!==s.stickyBottomHeight,u++}while((d||c)&&u<10);if(this.animationFrameSvc?.flushAllFrames(),o<10&&(n?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const s=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const e=this.getVScrollPosition().top;s!==e&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),e>=i.getRowCount()||this.ensureIndexVisible(e,t,o+1)}})}}))}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:o,frameworkOverrides:i}=this.beans,s=o.getCol(e);if(!s)return;if(s.isPinned())return;if(!this.visibleCols.isColDisplayed(s))return;const n=this.getPositionedHorizontalScroll(s,t);i.wrapIncoming((()=>{null!==n&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()}))}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?o:i)||s,l=r?i:o;"auto"!==t&&(a="start"===t,l="end"===t);const d="middle"===t;if(a||l||d){const{colLeft:t,colMiddle:o,colRight:i}=this.getColumnBounds(e);return d?o-n/2:a?r?i:t:r?t-n:i-n}return null}isColumnOutsideViewport(e){const{start:t,end:o}=this.getViewportBounds(),{colLeft:i,colRight:s}=this.getColumnBounds(e),n=this.enableRtl;return{columnBeforeStart:n?t>s:o<s,columnAfterEnd:n?o<i:t>i}}getColumnBounds(e){const t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),s=e.getLeft(),n=t?-1:1,r=t?o-s:s;return{colLeft:r,colMiddle:r+i/2*n,colRight:r+i*n}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}},so={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:"vertical"},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:"horizontal"}};function shouldShowScroll(e,t,o,i,s,n){const r=so[o],a=so[r.opposite],l=!s||_isVisible(s),d=!n||_isVisible(n),c=r.overflow(e);if(c<=0)return!1;if(!t||0===i)return!0;const u=a.overflow(t);if(u<=0)return!0;if(c<=i){if(l&&d&&function isScrollbarCausedByOppositeAxis({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:o,scrollbarWidth:i}){if(e<=0||e>i)return!1;const s=o+i;return t>o&&t<=s}({candidateOverflow:u,candidateScrollSize:a.scrollSize(t),candidateClientSize:a.clientSize(t),scrollbarWidth:i}))return!1;const o=r.clientSize(e)+i;return r.scrollSize(e)<=o}return!0}var no=class extends m{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()})),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],(()=>{this.checkViewportAndScrolls()}))}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,listener=()=>{_requestAnimationFrame(e,(()=>{this.onCenterViewportResized()}))};t.registerViewportResizeListener(listener),o.registerBodyViewportResizeListener(listener)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=_getInnerHeight(this.gridBodyCtrl.eBodyViewport);this.bodyHeight!==e&&(this.bodyHeight=e,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const{centerContainerCtrl:e,beans:t}=this,o=e.getCenterWidth(),i=e.getViewportScrollLeft();t.colViewport.setScrollPosition(o,i)}};function _isEventFromPrintableCharacter(e){if(e.altKey||e.ctrlKey||e.metaKey)return!1;return 1===e.key?.length}function _suppressCellMouseEvent(e,t,o,i){const s=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return suppressMouseEvent(e,t,o,i,s)}function suppressMouseEvent(e,t,o,i,s){return!!s&&s(_addGridCommonParams(e,{column:t,node:o,event:i}))}function _getCtrlForEventTarget(e,t,o){let i=t;for(;i;){const t=_getDomData(e,i,o);if(t)return t;i=i.parentElement}return null}var ro="cellCtrl";function _getCellCtrlForEventTarget(e,t){return _getCtrlForEventTarget(e,t,ro)}var ao="renderedRow";function _getRowCtrlForEventTarget(e,t){return _getCtrlForEventTarget(e,t,ao)}function _isUserSuppressingKeyboardEvent(e,t,o,i,s){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=_addGridCommonParams(e,{event:t,editing:s,column:i,node:o,data:o.data,colDef:i.getColDef()});if(n){if(n(r))return!0}return!1}var lo=class extends m{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";g("pointerdown")?e="pointerdown":g("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const e of t){const t=this.processMouseEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}}processMouseEvent(e,t){if(!_isEventFromThisInstance(this.beans,t)||_isStopPropagationForAgGrid(t))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);"contextmenu"===e?(o?.column&&o.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:_getCellCtrlForEventTarget(t,e),rowCtrl:_getRowCtrlForEventTarget(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){const i=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;if(!_isUserSuppressingKeyboardEvent(this.gos,o,e.rowNode,e.column,i)&&"keydown"===t){!i&&this.beans.navigation?.handlePageScrollingKey(o)||e.onKeyDown(o),this.doGridOperations(o,i),_isEventFromPrintableCharacter(o)&&e.processCharacter(o)}"keydown"===t&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){const{rowNode:i}=e,{focusSvc:s,navigation:n}=this.beans,r=s.getFocusedCell()?.column;if(!_isUserSuppressingKeyboardEvent(this.gos,o,i,r,!1)){const i=o.key;if("keydown"===t)switch(i){case re:case ae:case se:case ne:n?.handlePageScrollingKey(o,!0);break;case J:case ee:if(!this.gos.get("embedFullWidthRows"))break;case X:case te:e.onKeyboardNavigate(o);break;case q:e.onTabKeyDown(o)}}"keydown"===t&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey)return;if(t)return;if(!_isEventFromThisInstance(this.beans,e))return;const o=_normaliseQwertyAzerty(e),{clipboardSvc:i,undoRedo:s}=this.beans;return o===le?this.onCtrlAndA(e):o===de?this.onCtrlAndC(i,e):o===ce?this.onCtrlAndD(i,e):o===ue?this.onCtrlAndV(i,e):o===he?this.onCtrlAndX(i,e):o===ge?this.onCtrlAndY(s):o===pe?this.onCtrlAndZ(s,e):void 0}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:s}=this;o&&_isCellSelectionEnabled(s)&&!function _getCtrlASelectsRows(e){const t=e.get("rowSelection");return"string"!=typeof t&&"multiRow"===t?.mode&&(t.ctrlASelectsRows??!1)}(s)&&t.isRowsToRender()?function _selectAllCells(e){const{pinnedRowModel:t,rowModel:o,rangeSvc:i,visibleCols:s}=e;if(!i||0===s.allCols.length)return;const n=t?.isEmpty("top")??1?null:"top";let r,a;t?.isEmpty("bottom")??1?(r=null,a=o.getRowCount()-1):(r="bottom",a=t?.getPinnedBottomRowCount()??-1),i.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:_getSelectAll(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:o}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(o,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){this.gos.get("undoRedoCellEditing")&&e&&(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},getTopRowCtrls=e=>e.topRowCtrls,getStickyTopRowCtrls=e=>e.getStickyTopRowCtrls(),getStickyBottomRowCtrls=e=>e.getStickyBottomRowCtrls(),getBottomRowCtrls=e=>e.bottomRowCtrls,getCentreRowCtrls=e=>e.allRowCtrls,getSpannedTopRowCtrls=e=>e.getCtrls("top"),getSpannedCenterRowCtrls=e=>e.getCtrls("center"),getSpannedBottomRowCtrls=e=>e.getCtrls("bottom"),co={center:{type:"center",name:"center-cols",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:getCentreRowCtrls},topCenter:{type:"center",name:"floating-top",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:getTopRowCtrls},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:getStickyTopRowCtrls},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:getStickyTopRowCtrls},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:getStickyTopRowCtrls},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:getStickyTopRowCtrls},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:getStickyBottomRowCtrls},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:getStickyBottomRowCtrls},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:getStickyBottomRowCtrls},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:getStickyBottomRowCtrls},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:getBottomRowCtrls}};function _getRowViewportClass(e){return`ag-${_getRowContainerOptions(e).name}-viewport`}function _getRowContainerClass(e){const t=_getRowContainerOptions(e);return t.container??`ag-${t.name}-container`}function _getRowSpanContainerClass(e){return`ag-${_getRowContainerOptions(e).name}-spanned-cells-container`}function _getRowContainerOptions(e){return co[e]}var uo=["center","left","right","fullWidth"],ho=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],go=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],po=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],mo=["stickyTopCenter","stickyTopLeft","stickyTopRight"],fo=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Co=[...mo,"stickyTopFullWidth",...fo,"stickyBottomFullWidth"],wo=["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right",...mo,...fo],vo=class extends m{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=_getRowContainerOptions(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],(()=>{this.viewportSizeFeature=this.createManagedBean(new no(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})}))}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,o,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new lo(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,pinnedWidthChanged=()=>this.onPinnedWidthChanged();this.forContainers(go,(()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:pinnedWidthChanged})})),this.forContainers(po,(()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:pinnedWidthChanged})})),this.forContainers(uo,(()=>this.createManagedBean(new Zt(this.eContainer,"center"===this.name?i:void 0)))),n&&this.forContainers(wo,(()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer)))),this.forContainers(ho,(()=>this.createManagedBean(new ct((e=>this.comp.setContainerWidth(`${e}px`)))))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:e=>this.onDisplayedRowsChanged(e.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const t=this.options.getSpannedRowCtrls(e);t&&this.comp.setSpannedRowCtrls(t,!1)}})}listenOnDomOrder(){if(Co.indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);const listener=()=>{const e=this.gos.get("ensureDomOrder"),t=_isDomLayout(this.gos,"print");this.comp.setDomOrder(e||t)};this.addManagedPropertyListener("domLayout",listener),listener()}onDisplayedColumnsChanged(){this.forContainers(["center"],(()=>this.onHorizontalViewportChanged()))}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const preventScroll=t=>{e.dragging&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener("touchmove",preventScroll,{passive:!1}),this.addDestroyFunc((()=>this.eContainer.removeEventListener("touchmove",preventScroll)))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),o=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,o,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return _getInnerWidth(this.eViewport)}getCenterViewportScrollLeft(){return _getScrollLeft(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=_observeResize(this.beans,this.eViewport,e);this.addDestroyFunc((()=>t()))}isViewportInTheDOMTree(){return _isInDOM(this.eViewport)}getViewportScrollLeft(){return _getScrollLeft(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){const{beans:e,gos:t,eViewport:o}=this,i=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:s}=e,n=s.getGridBodyCtrl()?.eBodyViewport,r=s.get("fakeHScrollComp")?.getGui(),a=s.get("fakeVScrollComp")?.getGui();return i||function _shouldShowHorizontalScroll(e,t,o=_getScrollbarWidth()||0,i,s){return shouldShowScroll(e,t,"horizontal",o,i,s)}(o,n,void 0,r,a)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){_setScrollLeft(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(null!=this.options.pinnedType)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||0===t.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});const o=_isDomLayout(this.gos,"print"),i=this.gos.get("embedFullWidthRows")||o,s=t.filter((e=>{const t=e.isFullWidth();return this.options.fullWidth?!i&&t:i||!t}));this.comp.setRowCtrls({rowCtrls:s,useFlushSync:e})}},bo="ag-force-vertical-scroll",So=class extends m{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,o,i,s,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=s,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=o.querySelector(`.${_getRowViewportClass("center")}`),this.eFullWidthContainer=o.querySelector(`.${_getRowContainerClass("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",(e=>this.setCellTextSelection(e.currentValue))),this.createManagedBean(new jt(this.comp)),this.scrollFeature=this.createManagedBean(new io(o)),this.beans.rowDragSvc?.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,s,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),o=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:o,rowResizeEnded:o}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t="rowResizeStarted"===e.type;this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const o=`calc(100% + ${(t&&e.getScrollbarWidth()||0)+(_isInvisibleScrollbar()?16:0)}px)`;_requestAnimationFrame(this.beans,(()=>this.comp.setBodyViewportWidth(o))),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t,gos:o}=this;let i=o.get("treeData");if(!i){const o=t.isPivotMode();i=(e?e.columns.length:0)>=(o?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:e=>{const{target:o}=e,i=_isElementChildOfClass(o,"ag-root",t);t.classList.toggle("ag-has-focus",!i)},focusout:e=>{const{target:o,relatedTarget:i}=e,s=t.contains(i),n=_isElementChildOfClass(i,"ag-root",t);_isElementChildOfClass(o,"ag-root",t)||s&&!n||t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=-1===o?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const{gos:e,comp:t,ctrlsSvc:o}=this,i=e.get("alwaysShowVerticalScroll"),s=i?bo:null,n=_isDomLayout(e,"normal");t.setAlwaysVerticalScrollClass(s,i);const r=o.get("center")?.eViewport,a=o.get("fakeHScrollComp")?.getGui(),l=o.get("fakeVScrollComp")?.getGui();return i||n&&function _shouldShowVerticalScroll(e,t,o=_getScrollbarWidth()||0,i,s){return shouldShowScroll(e,t,"vertical",o,i,s)}(this.eBodyViewport,r,void 0,l,a)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const updateAnimationClass=()=>{const t=o&&_isAnimateRows(this.gos)&&!e.stretching,i=t?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(i,t)};updateAnimationClass(),this.addManagedEventListeners({heightScaleChanged:updateAnimationClass}),this.addManagedPropertyListener("animateRows",updateAnimationClass),this.addManagedEventListeners({stylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,updateAnimationClass())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:i,eBottom:s,beans:{popupSvc:n,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const l=this.onStickyWheel.bind(this);for(const e of[t,o,i,s])this.addManagedElementListeners(e,{wheel:l});const d=this.onHorizontalWheel.bind(this);for(const e of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(e).eContainer,{wheel:d});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&_isEventFromThisInstance(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){if(!e&&!o)return;if(this.gos.get("preventDefaultOnContextMenu")){(e||o).preventDefault()}const{target:i}=e||t;i!==this.eBodyViewport&&i!==this.ctrlsSvc.get("center").eViewport||this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,o=e?.getPinnedTopTotalHeight(),i=e?.getPinnedBottomTotalHeight(),s=t.getPinnedRowBorderWidth()-t.getRowBorderWidth(),n=o?s+o:0,r=i?s+i:0;this.comp.setTopHeight(n),this.comp.setBottomHeight(r),this.comp.setTopInvisible(n<=0),this.comp.setBottomInvisible(r<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(e){const e=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}setStickyTopOffsetTop(){const e=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),t=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let o=0;e>0&&(o+=e),t>0&&(o+=t),o>0&&(o+=1),this.comp.setStickyTopTop(`${o}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=(e?.getPinnedBottomTotalHeight()??0)+(t.horizontalScrollShowing&&t.getScrollbarWidth()||0);o.setStickyBottomBottom(`${i}px`)}};var yo={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Ro=class extends p{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:o,eTopGuard:i,eBottomGuard:s,focusTrapActive:n,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:a,focusInnerElement:l,onFocusIn:d,onFocusOut:c,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:g,isEmpty:p,eFocusableElement:m}=e;this.comp=o,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=l,this.eFocusableElement=m,this.focusTrapActive=!!n,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!a,this.providedFocusIn=d,this.providedFocusOut=c,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=g,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new st(this.eFocusableElement,this.stopPropagationCallbacks,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty){if(this.providedIsEmpty?this.providedIsEmpty():0===_findFocusableElements(this.eFocusableElement,".ag-tab-guard").length)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=_findFocusableElements(_getDocument(this.beans).body,null,!0),o=t.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===o)return;let i,s;e?(i=0,s=o):(i=o+1,s=t.length);const n=t.slice(i,s),r=this.gos.get("tabIndex");n.sort(((e,t)=>{const o=Number.parseInt(e.getAttribute("tabindex")||"0"),i=Number.parseInt(t.getAttribute("tabindex")||"0");return i===r?1:o===r?-1:0===o?1:0===i?-1:o-i})),n[e?n.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown)return void this.providedOnTabKeyDown(e);if(this.focusTrapActive)return;if(e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout((()=>this.activateTabGuards()),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=_findFocusableElements(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),!!t.length&&(t[e?t.length-1:0].focus({preventScroll:!0}),!0)}getNextFocusableElement(e){return _findNextFocusableElement(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout((()=>{this.forcingFocusOut=!1,this.activateTabGuards()}))}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},Fo=class extends p{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:o,eFocusableElement:i,stopPropagationCallbacks:s}=this,n=[t,o],r={setTabIndex:e=>{for(const t of n)null==e?t.removeAttribute("tabindex"):t.setAttribute("tabindex",e)}};this.addTabGuards(t,o);const{focusTrapActive:a=!1,onFocusIn:l,onFocusOut:d,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new Ro({comp:r,focusTrapActive:a,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:l,onFocusOut:d,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:f},s))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=_getDocument(this.beans).createElement("div"),o="top"===e?yo.TAB_GUARD_TOP:yo.TAB_GUARD_BOTTOM;return t.classList.add(yo.TAB_GUARD,o),_setAriaRole(t,"presentation"),t}addTabGuards(e,t){const o=this.eFocusableElement;o.prepend(e),o.append(t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];_clearElement(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){_isNodeOrElement(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.before(t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;_removeFromParent(e),_removeFromParent(t),super.destroy()}},Do=class extends ve{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new Fo(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},Po=class extends Do{initialiseTabGuard(e){super.initialiseTabGuard(e,rt)}},xo=class extends m{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,o){this.view=e,this.eGridHostDiv=t,this.eGui=o,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:i,ctrlsSvc:s}=this.beans;i?.registerGridDropTarget((()=>this.eGui),this),this.createManagedBean(new jt(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=_observeResize(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((()=>n())),s.register("gridCtrl",this)}isDetailGrid(){return _findTabbableParent(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;if(!1===e)t.setCursor(null);else{const o=1===e?"ew-resize":"ns-resize";t.setCursor(o)}}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e);if(i<0||i>=t.length)return!1;if(0===i){if(o>0){const{visibleCols:e,focusSvc:t}=this.beans,o=_last(e.allCols);if(t.focusGridView({column:o,backwards:!0}))return!0}return!1}return this.focusContainer(t[i],e)}focusInnerElement(e){if(this.gos.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const t=this.getFocusableContainers(),{focusSvc:o,visibleCols:i}=this.beans,s=i.allCols;if(e){if(t.length>1)return this.focusContainer(_last(t),e);const i=_last(s);if(o.focusGridView({column:i,backwards:e}))return!0}if(0===this.gos.get("headerHeight")||_isHeaderFocusSuppressed(this.beans)){if(o.focusGridView({column:s[0],backwards:e}))return!0;for(let o=1;o<t.length;o++)if(_focusInto(t[o].getGui(),e))return!0;return!1}return o.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:o}=this.getNextFocusableIndex(t,e),i=t[o];i?this.focusContainer(i):this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!_isCellFocusSuppressed(e)||!_isHeaderFocusSuppressed(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const o=_getActiveDomElement(this.beans),i=e.findIndex((e=>e.getGui().contains(o)));return{indexWithFocus:i,nextIndex:i+(t?-1:1)}}focusContainer(e,t){e.setAllowFocus?.(!0);const o=_focusInto(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),o}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},mod=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},Eo={dispatchEvent:"CommunityCore",...mod("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...mod("GridState",{getState:0,setState:0}),...mod("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...mod("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...mod("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...mod("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...mod("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...mod("ValueCache",{expireValueCache:0}),...mod("CellApi",{getCellValue:0}),...mod("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...mod("Sort",{onSortChanged:0}),...mod("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...mod("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...mod("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...mod("HighlightChanges",{flashCells:0}),...mod("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...mod("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...mod("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...mod("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...mod("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...mod("ColumnResize",{setColumnWidths:0}),...mod("ColumnHover",{isColumnHovered:0}),...mod("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...mod("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...mod("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...mod("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...mod("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...mod("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...mod("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...mod("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...mod("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...mod("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...mod("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...mod("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...mod("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...mod("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...mod("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...mod("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...mod("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...mod("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...mod("ContextMenu",{showContextMenu:0}),...mod("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...mod("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...mod("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...mod("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...mod("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...mod("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...mod("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...mod("StatusBar",{getStatusPanel:0}),...mod("AiToolkit",{getStructuredSchema:0})},Mo={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},dispatchEvent=(e,t)=>e.eventSvc.dispatchEvent(t),To=class{};Reflect.defineProperty(To,"name",{value:"GridApi"});function getGridId(e){return e.context.getId()}function updateGridOptions(e,t){e.gos.updateGridOptions({options:t})}var Ao={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}};var Io,ko,tryPointerCapture=(e,t)=>{if(null!=t&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},removeLostHandler=e=>{const{eElement:t,onLost:o}=e;t&&o&&(t.removeEventListener("lostpointercapture",o),e.onLost=null)},pointerLostHandler=(e,t)=>{removeLostHandler(e);const{eElement:o,pointerId:i}=e;o&&t.pointerId===i&&tryPointerCapture(o,i)},Lo={passive:!0},_o={passive:!1},addHandledDragEvent=e=>{if(ko){if(ko.has(e))return!1}else ko=new WeakSet;return ko.add(e),!0},Go=class extends p{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!Io?.has(_getRootNode(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!(!e||!this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)destroyDragSourceEntry(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let o=0,i=t.length;o<i;++o){const i=t[o];if(i.params===e){t.splice(o,1),destroyDragSourceEntry(i);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:o}=e,i=[];let s;if(o){const e=t.style;e&&(s=e.touchAction,e.touchAction="none")}const n={handlers:i,params:e,oldTouchAction:s};this.dragSources.push(n);addTempEventHandlers(i,[t,"pointerdown",t=>this.onPointerDown(e,t),_o],[t,"mousedown",t=>this.onMouseDown(e,t)]);const r=this.gos.get("suppressTouch");if(o&&!r){addTempEventHandlers(i,[t,"touchstart",t=>this.onTouchStart(e,t),_o])}}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return("mousemove"===t||"pointermove"===t)&&e.cancelable&&_isEventFromThisInstance(this.beans,e)&&!_isFocusableFormField(getEventTargetElement(e))}initDrag(e,...t){this.drag=e;const o=this.beans,onScroll=e=>this.onScroll(e),i=_getRootNode(o),s=_getDocument(o);addTempEventHandlers(e.handlers,[i,"contextmenu",preventEventDefault],[i,"keydown",e=>this.onKeyDown(e)],[s,"scroll",onScroll,{capture:!0}],[s.defaultView||window,"scroll",onScroll],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;Io?.get(t)===e&&Io.delete(t),this.drag=null,(e=>{if(!e)return;removeLostHandler(e);const{eElement:t,pointerId:o}=e;if(t){try{t.releasePointerCapture(o)}catch{}e.eElement=null}})(e.pointerCapture),clearTempEventHandlers(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const o=this.beans;if(ko?.has(t))return;const i=t.pointerType;if("touch"===i){if(o.gos.get("suppressTouch")||!e.includeTouch)return;if(e.stopPropagationForTouch&&t.stopPropagation(),_isFocusableFormField(getEventTargetElement(t)))return}if(!t.isPrimary)return;if("mouse"===i&&0!==t.button)return;this.destroyDrag();const s=_getRootNode(o),n=e.eElement,r=t.pointerId,a=new No(s,e,t,r);Io??(Io=new WeakMap),Io.set(s,a);const dragPreventEventDefault=e=>this.draggingPreventDefault(e);this.initDrag(a,[s,"pointerup",e=>{e.pointerId===r&&this.onMouseOrPointerUp(e)}],[s,"pointercancel",e=>{e.pointerId===r&&addHandledDragEvent(e)&&this.cancelDrag()}],[s,"pointermove",e=>{e.pointerId===r&&this.onMouseOrPointerMove(e)},_o],[s,"touchmove",dragPreventEventDefault,_o],[n,"mousemove",dragPreventEventDefault,_o]),0===e.dragStartPixels?this.onMouseOrPointerMove(t):addHandledDragEvent(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch)return;if(!addHandledDragEvent(t))return;if(_isFocusableFormField(getEventTargetElement(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer())return void(this.dragging&&preventEventDefault(t));this.destroyDrag();const o=this.beans,i=_getRootNode(o),s=new No(i,e,t.touches[0]),touchEndEvent=e=>this.onTouchUp(e),touchCancelEvent=e=>this.onTouchCancel(e),n=_getRootNode(o),r=t.target??e.eElement;this.initDrag(s,[r,"touchmove",e=>this.onTouchMove(e),Lo],[r,"touchend",touchEndEvent,Lo],[r,"touchcancel",touchCancelEvent,Lo],[n,"touchmove",e=>this.draggingPreventDefault(e),_o],[n,"touchend",touchEndEvent,_o],[n,"touchcancel",touchCancelEvent,_o]),0===e.dragStartPixels&&this.onMove(s.start)}draggingPreventDefault(e){this.dragging&&preventEventDefault(e)}onMouseDown(e,t){if(0!==t.button)return;if(ko?.has(t))return;if(this.isPointer())return;const o=this.beans;this.destroyDrag();const i=new No(_getRootNode(o),e,t),s=_getRootNode(o);this.initDrag(i,[s,"mousemove",e=>this.onMouseOrPointerMove(e)],[s,"mouseup",e=>this.onMouseOrPointerUp(e)]),0===e.dragStartPixels?this.onMouseOrPointerMove(t):addHandledDragEvent(t)}onScroll(e){if(!addHandledDragEvent(e))return;const t=this.drag,o=t?.lastDrag;o&&this.dragging&&t.params?.onDragging?.(o)}onMouseOrPointerMove(e){addHandledDragEvent(e)&&(_isBrowserSafari()&&_getDocument(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&preventEventDefault(e),this.onMove(e))}onTouchCancel(e){const t=this.drag;t&&addHandledDragEvent(e)&&_getFirstActiveTouch(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){const t=this.drag;if(!t||!addHandledDragEvent(e))return;const o=_getFirstActiveTouch(t.start,e.touches);o&&(this.onMove(o),this.draggingPreventDefault(e))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const o=t.params;if(!this.dragging){const i=t.start;if(_areEventsNear(e,i,o.dragStartPixels??4))return;if(this.dragging=!0,o.capturePointer&&(t.pointerCapture=((e,t)=>{if("undefined"==typeof PointerEvent||!(t instanceof PointerEvent))return null;const o=t.pointerId;if(!tryPointerCapture(e,o))return null;const i={eElement:e,pointerId:o,onLost(e){pointerLostHandler(i,e)}};return e.addEventListener("lostpointercapture",i.onLost),i})(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:o.eElement}),o.onDragStart?.(i),this.drag!==t)return;if(o.onDragging?.(i),this.drag!==t)return}o.onDragging?.(e)}onTouchUp(e){const t=this.drag;t&&addHandledDragEvent(e)&&this.onUp(_getFirstActiveTouch(t.start,e.changedTouches))}onMouseOrPointerUp(e){addHandledDragEvent(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop?.(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===Q&&this.cancelDrag()}},destroyDragSourceEntry=e=>{clearTempEventHandlers(e.handlers);const t=e.oldTouchAction;if(null!=t){const o=e.params.eElement.style;o&&(o.touchAction=t)}},No=class{constructor(e,t,o,i=null){this.rootEl=e,this.params=t,this.start=o,this.pointerId=i,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},getEventTargetElement=e=>{const t=e.target;return t instanceof Element?t:null},Vo={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Oo={skipAriaHidden:!0},Ho=class extends Se{constructor(e,t,o,i,s,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=o,this.customGui=i,this.dragStartPixels=s,this.alwaysVisible=n,this.dragSource=null,this.disabled=!1}isCustomGui(){return null!=this.customGui}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(Vo),this.getGui().appendChild(_createIconNoSpan("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,o=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:o}),this.addManagedListeners(t,{dataChanged:o,cellChanged:o}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:o}=this,{gos:i,dragAndDrop:s,rowDragSvc:n}=e,r=n?.visibility;let a=!("suppress"===r||"hidden"===r&&!s?.hasExternalDropZones()),l=a;if(a&&!this.isCustomGui()&&t){const e=t.getColDef().rowDrag;if(!1===e)a=!1;else{const i="function"==typeof e;l=t.isRowDrag(o),a=i||l}}a&&l&&o.footer&&i.get("rowDragManaged")&&(l=!1,a=!0),l&&(l=a),a||this.setDisplayed(a,Oo),l||this.setVisible(l,Oo),this.setDisabled(!l||"disabled"===r&&!s?.hasExternalDropZones()),a&&this.setDisplayed(a,Oo),l&&this.setVisible(l,Oo)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const t=this.beans.selectionSvc?.getSelectedNodes()??[];return-1!==t.indexOf(e)?t:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const e=g("pointerdown")?{pointerdown:preventEventDefault}:{mousedown:preventEventDefault};this.mouseDownListener=this.addManagedElementListeners(t,e)[0]}const o=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:e=>this.getDragItemName(e,o),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const o=e?.dragItem||this.getDragItem(),i=(e?.dropTarget?.rows.length??o.rowNodes?.length)||1,s=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(s)return s(o,i);if(1!==i)return`${i} ${t("rowDragRows","rows")}`;const n=this.cellValueFn();return n||`1 ${t("rowDragRow","rows")}`}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},Bo=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},_csrmFirstLeaf=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const e=t[0];if(e.sourceRowIndex>=0)return e;t=e.childrenAfterGroup}};function _getNormalisedMousePosition(e,t){const o=_isDomLayout(e.gos,"normal"),i=t;let s,n;null!=i.clientX||null!=i.clientY?(s=i.clientX,n=i.clientY):(s=i.x,n=i.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,o){const t=e.ctrlsSvc.getScrollFeature(),o=t.getVScrollPosition();s+=t.getHScrollPosition().left,n+=o.top}return{x:s,y:n}}var Wo=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:o,children:i}=e;if(i)for(let e=0;e<i.length;++e)this.depthFirstSearchChangedPath(i[e],t);t(o)}depthFirstSearchEverything(e,t,o){const i=e.childrenAfterGroup;if(i)for(let e=0,s=i.length;e<s;++e){const s=i[e];s.childrenAfterGroup?this.depthFirstSearchEverything(s,t,o):o&&t(s)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,o=!1){this.active&&!o?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,o=0;for(;!this.mapToItems[t.id];){const e={rowNode:t,children:null};this.mapToItems[t.id]=e,o++,t=t.parent}return o}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let o=e;for(;o;){this.nodeIdsToColumns[o.id]||(this.nodeIdsToColumns[o.id]={});for(const e of t)this.nodeIdsToColumns[o.id][e.getId()]=!0;o=o.parent}}linkPathItems(e,t){let o=e;for(let e=0;e<t;e++){const e=this.mapToItems[o.id],t=this.mapToItems[o.parent.id];t.children||(t.children=[]),t.children.push(e),o=o.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const o=this.createPathItems(e);this.linkPathItems(e,o),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const o=this.nodeIdsToColumns[e.id];return t.filter((e=>o[e.getId()]))}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const o=this.nodeIdsToColumns[e.id];return t.filter((e=>!o[e.getId()]))}},zo=class extends m{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,(t=>{const getScrollY=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,o=new class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=e.scrollByTick??20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return null!==this.tickingInterval}check(e,t=!1){const o=t||this.shouldSkipVerticalScroll();if(o&&this.shouldSkipHorizontalScroll())return;const i=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<i.left+s,this.tickRight=e.clientX>i.right-s,this.tickUp=e.clientY<i.top+s&&!o,this.tickDown=e.clientY>i.bottom-s&&!o,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}}({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:getScrollY,setVerticalPosition:e=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(e),onScrollCallback:()=>{const t=getScrollY();if(this.autoScrollOldV!==t)return this.autoScrollOldV=t,void(this.autoScrollChanging=!0);const o=this.autoScrollChanging;this.autoScrollChanged=o,this.autoScrollChanging=!1,o&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=o,this.clearAutoScroll()}))}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(e){return!1===e?.dropTarget?.allowed||"visible"!==this.beans.rowDragSvc.visibility?"notAllowed":"move"}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const e=this.beans.selectionSvc?.getSelectedNodes();if(e&&e.indexOf(t)>=0)return e.slice().sort(compareRowIndex)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:o,beans:i}=this;if(t){const t=this.getRowNodes(e);e.dragItem.rowNodes=t,setRowNodesDragging(t,!0)}this.lastDraggingEvent=e;const s=e.fromNudge,n=this.makeRowsDrop(o,e,s,!1);i.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const r=this.autoScroll;n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!s&&!r?.scrolling||this.autoScrollChanged)&&this.dropRows(n),r?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,o,i){const{beans:s,gos:n}=this,r=this.newRowsDrop(t,i),a=s.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:d,source:c,target:u}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const h=this.beans.groupEditSvc,g=!!h?.canSetParent(r);let p=null;if(u?.footer){const e=_prevOrNextDisplayedRow(a,-1,u)??_prevOrNextDisplayedRow(a,1,u);g&&(p=u.sibling??d),u=e??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=c!==u);let m=.5;if(u&&(m=l&&r.moved&&(p||!g)?c.rowIndex>u.rowIndex?-.5:.5:(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&l&&u&&r.moved&&_isClientSideRowModel(n)){const e=deltaDraggingTarget(a,r);e&&(m=c.rowIndex>e.rowIndex?-.5:.5,u=e,r.moved&&(r.moved=c!==u))}return r.target=u,r.newParent=p,r.pointerPos=computePointerPos(u,r.y),r.yDelta=m,h?.fixRowsDrop(r,g,o,m),this.validateRowsDrop(r,g,i),t.changed||(t.changed=rowsDropChanged(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:o,gos:i}=this,s=o.rowModel.rootNode,n=!!_isClientSideRowModel(i)&&i.get("rowDragManaged"),r=i.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:d}=e.dragItem;if(d||(d=l?[l]:[]),l||(l=d[0]),!l||!s)return null;const c=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;!n||d.length&&"visible"===o.rowDragSvc.visibility&&(!r&&a||c)||(u=!1);const h=_getNormalisedMousePosition(o,e).y,g=this.getOverNode(h);return{api:o.gridApi,context:o.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:c,treeData:!1,rootNode:s,moved:l!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,pointerPos:"none",position:"none",source:l,target:g??null,newParent:null,rows:d,allowed:u,highlight:!t&&n&&r&&(c||!a),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,o){const{source:i,target:s,yDelta:n,inside:r,moved:a,rowDragManaged:l,suppressMoveWhenRowDragging:d}=e;e.moved&&(e.moved=i!==s);const{position:c,fallbackPosition:u}=this.computeDropPosition(a,r,n);e.position=c,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,d,"initial");const h=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");h&&this.applyDropValidator(e,t,o,l,h),l&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,d,"final"),"inside"!==e.position||e.allowed&&e.newParent||(e.position=u)}computeDropPosition(e,t,o){const i=o<0?"above":"below";return e?{position:t?"inside":i,fallbackPosition:i}:{position:"none",fallbackPosition:i}}enforceSuppressMoveWhenRowDragging(e,t,o){t&&("initial"!==o?e.rows.length&&"none"!==e.position||(e.allowed=!1):e.moved||(e.allowed=!1))}applyDropValidator(e,t,o,i,s){this.beans.groupEditSvc?.clearNewSameParent(e,t);const n=s(e);if(!n)return void(e.allowed=!1);if("object"!=typeof n)return;void 0!==n.rows&&(e.rows=n.rows??[]),t&&void 0!==n.newParent&&(e.newParent=n.newParent),void 0!==n.target&&(e.target=n.target),n.position&&(e.position=n.position),void 0!==n.allowed?e.allowed=n.allowed:i||(e.allowed=!0);const r=e.draggingEvent;n.changed&&r&&(r.changed=!0),o||void 0===n.highlight||(e.highlight=n.highlight)}addRowDropZone(e){if(!e.getContainer())return void _warn(55);const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer()))return void _warn(56);const o={isInterestedIn:e=>2===e,getIconName:()=>"move",external:!0,...e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(t=>e.onDragEnter(this.rowDragEvent("rowDragEnter",t))),onDragLeave:e.onDragLeave&&(t=>e.onDragLeave(this.rowDragEvent("rowDragLeave",t))),onDragging:e.onDragging&&(t=>e.onDragging(this.rowDragEvent("rowDragMove",t))),onDragStop:e.onDragStop&&(t=>e.onDragStop(this.rowDragEvent("rowDragEnd",t))),onDragCancel:e.onDragCancel&&(t=>e.onDragCancel(this.rowDragEvent("rowDragCancel",t)))}};t.addDropTarget(o),this.addDestroyFunc((()=>t.removeDropTarget(o)))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:t=>{this.onDragEnter(t),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",t))},onDragLeave:t=>{this.onDragLeave(t),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",t))},onDragging:t=>{this.onDragging(t),e?.onDragging?.(this.rowDragEvent("rowDragMove",t))},onDragStop:t=>{this.onDragStop(t),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",t))},onDragCancel:t=>{this.onDragCancel(t),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",t))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:o}=this.beans,i=e>t.getCurrentPagePixelRange().pageLastPixel?-1:o.getRowIndexAtPixel(e);return i>=0?o.getRow(i):void 0}rowDragEvent(e,t){const o=this.beans,{dragItem:i,dropTarget:s,event:n,vDirection:r}=t,a=s?.rootNode===o.rowModel.rootNode,l=a?s.y:_getNormalisedMousePosition(o,t).y,d=a?s.overNode:this.getOverNode(l),c=a?s.overIndex:d?.rowIndex??-1;return{api:o.gridApi,context:o.gridOptions.context,type:e,event:n,node:i.rowNode,nodes:i.rowNodes,overIndex:c,overNode:d,y:l,vDirection:r,rowsDrop:s}}dispatchGridEvent(e,t){const o=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(o)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,o=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),o?.allowed&&o.rowDragManaged&&(!t?.droppedManaged||rowsDropChanged(t,o))&&this.dropRows(o),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),setRowNodesDragging(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:o}){const i=_getRowIdCallback(this.gos),s=this.beans.rowModel,n=o.filter((({data:e,rowPinned:t})=>!s.getRowNode(i?.({data:e,level:0,rowPinned:t})??e.id))).map((({data:e})=>e));if(0===n.length)return!1;let r;if(t){const o=t.sourceRowIndex>=0?t:_csrmFirstLeaf(t);o&&(r=o.sourceRowIndex+("above"===e?0:1))}return s.updateRowData({add:n,addIndex:r}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:o,sameGrid:i}=e;let s;for(let n=0,r=o.length;n<r;++n){let r=!0;const a=o[n];(!a||a.footer||i&&a.destroyed&&!a.group||!this.csrmGetLeaf(a))&&(r=!1),r&&t&&!t.canDropRow(a,e)&&(r=!1),r?s?.push(a):s??(s=o.slice(0,n))}return s??o}csrmMoveRows(e){const t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:o,newParent:i,rootNode:s}){let n=!1;const r=new Set;for(const e of o){i&&e.parent!==i&&(e.treeParent=i,n=!0);const t=this.csrmGetLeaf(e);t&&r.add(t)}if(!n&&0===r.size)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),d=l&&_getCellByPosition(this.beans,l);if(r.size&&((e,t,o,i)=>{if(!t.size||!e)return!1;let s=!1;const n=e.length??0;let r=-1;o&&(r=o.sourceRowIndex,(o=r<0?_csrmFirstLeaf(o):null)&&(r=o.sourceRowIndex)),r<0||r>=n?r=n:i||++r;let a=r,l=Math.min(r,n-1);for(const e of t){const t=e.sourceRowIndex;t<a&&(a=t),t>l&&(l=t)}let d=a;for(let o=a;o<r;++o){const i=e[o];t.has(i)||(i.sourceRowIndex!==d&&(i.sourceRowIndex=d,e[d]=i,s=!0),++d)}let c=l;for(let o=l;o>=r;--o){const i=e[o];t.has(i)||(i.sourceRowIndex!==c&&(i.sourceRowIndex=c,e[c]=i,s=!0),--c)}for(const o of t)o.sourceRowIndex!==d&&(o.sourceRowIndex=d,e[d]=o,s=!0),++d;return s})(s._leafs,r,t,"above"===e)&&(n=!0),!n)return!1;const c=this.beans.rowModel,u=new Bo;return u.reordered=!0,c.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new Wo(!1,s),changedRowNodes:u}),d?d.focusCell():a.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):_csrmFirstLeaf(e)}},rowsDropChanged=(e,t)=>!(e===t||e&&e.sameGrid===t.sameGrid&&e.allowed===t.allowed&&e.position===t.position&&e.target===t.target&&e.source===t.source&&e.newParent===t.newParent&&_areEqual(e.rows,t.rows)),compareRowIndex=({rowIndex:e},{rowIndex:t})=>null!==e&&null!==t?e-t:0,setRowNodesDragging=(e,t)=>{for(let o=0,i=e?.length||0;o<i;++o){const i=e[o];i.dragging!==t&&(i.dragging=t,i.dispatchRowEvent("draggingChanged"))}},deltaDraggingTarget=(e,t)=>{let o=null,i=t.target;if(i&&t.rows.indexOf(i)<0)return null;const s=t.source;if(!i||!s)return null;let n=i.rowIndex-s.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const a=new Set(t.rows);do{const t=_prevOrNextDisplayedRow(e,r,i);if(!t)break;a.has(t)||(o=t,--n),i=t}while(n>0);return o},computePointerPos=(e,t)=>{const o=e?.rowTop,i=e?.rowHeight??0;if(null==o||!i||i<=0)return"none";const s=t-o,n=.25*i;return s<=n?"above":s>=i-n?"below":"inside"},Uo={moduleName:"Drag",version:I,beans:[class extends Go{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}}]},$o={moduleName:"DragAndDrop",version:I,dynamicBeans:{dndSourceComp:class extends Se{constructor(e,t,o){super(Ao),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(_createIconNoSpan("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",(e=>{e.stopPropagation()})),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:o,eCell:i,gos:s}=this,n=o.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),n){n(_addGridCommonParams(s,{rowNode:t,dragEvent:e}))}else try{const e=JSON.stringify(t.data);r.setData("application/json",e),r.setData("text/plain",e)}catch(e){}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}}},icons:{rowDrag:"grip"}},Ko={moduleName:"SharedDragAndDrop",version:I,beans:[class extends Re{createEvent(e){return _addGridCommonParams(this.gos,e)}createDragImageComp(e){const{gos:t,beans:o}=this;return function _getDragAndDropImageCompDetails(e,t){return e.getCompDetailsFromGridOptions(De,"agDragAndDropImage",t,!0)}(o.userCompFactory,_addGridCommonParams(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){_warn(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:e=>1===e||0===e,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc((()=>this.removeDropTarget(o)))}}],dependsOn:[Uo],userComponents:{agDragAndDropImage:class extends Se{constructor(){super(),this.dragSource=null,this.eIcon=fe,this.eLabel=fe,this.eGhost=fe,this.registerCSS(".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}")}postConstruct(){const create=e=>function _createIcon(e,t,o){const i=_createIconNoSpan(e,t,o);if(i){const{className:e}=i;if("string"==typeof e&&e.includes("ag-icon")||"object"==typeof e&&e["ag-icon"])return i}const s=_createElement({tag:"span"});return s.appendChild(i),s}(e,this.beans,null);this.dropIconMap={pinned:create("columnMovePin"),hide:create("columnMoveHide"),move:create("columnMoveMove"),left:create("columnMoveLeft"),right:create("columnMoveRight"),group:create("columnMoveGroup"),aggregate:create("columnMoveValue"),pivot:create("columnMovePivot"),notAllowed:create("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(ye),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:o,eIcon:i,dragSource:s,dropIconMap:n,gos:r}=this;_clearElement(i);let a=null;e||(e=s?.getDefaultIconName?s.getDefaultIconName():"notAllowed"),a=n[e],o.classList.toggle("ag-dnd-ghost-not-allowed","notAllowed"===e),i.classList.toggle("ag-shake-left-to-right",t),a===n.hide&&r.get("suppressDragLeaveHidesColumns")||a&&i.appendChild(a)}setLabel(e){this.eLabel.textContent=e}}},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},jo={moduleName:"RowDrag",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;e&&null!==e?.rowIndex&&"none"!==this.position?this.set(e,this.position):this.clear(),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const o=e!==this.row,i=e.uiLevel,s=t!==this.position,n=i!==this.uiLevel;this.dragging=!1,(o||s||n)&&(o&&this.clear(),this.uiLevel=i,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:e,target:o,position:i}=t;if(e&&o&&"none"!==i)return this.set(o,i),void(this.dragging=!0)}this.dragging&&this.clear()}},class extends m{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const o=t.createManagedBean(new zo(e)),i=this.beans.dragAndDrop;i.addDropTarget(o),t.addDestroyFunc((()=>i.removeDropTarget(o))),this.rowDragFeature=o;const refreshVisibility=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],refreshVisibility),this.addManagedEventListeners({newColumnsLoaded:refreshVisibility,columnRowGroupChanged:refreshVisibility,columnPivotModeChanged:refreshVisibility,sortChanged:refreshVisibility,filterChanged:refreshVisibility}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,o,i,s,n){return new Ho(e,t,o,i,s,n)}createRowDragCompForRow(e,t){if(_isCellSelectionEnabled(this.gos))return;const o=this.getLocaleTextFunc();return this.createRowDragComp((()=>`1 ${o("rowDragRow","row")}`),e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,o,i,s,n){const r=this.gos;if(r.get("rowDragManaged")&&(!_isClientSideRowModel(r)||r.get("pagination")))return;return this.createRowDragComp(o,e,t,i,s,n)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const o=e.colModel.isPivotMode();return!o&&!e.rowGroupColsSvc?.columns?.length||t.get("refreshAfterGroupEdit")?o||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?"disabled":"visible":"hidden"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}}],apiFunctions:{addRowDropZone:function addRowDropZone(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)},removeRowDropZone:function removeRowDropZone(e,t){const o=e.dragAndDrop?.findExternalZone(t.getContainer());o&&e.dragAndDrop?.removeDropTarget(o)},getRowDropZoneParams:function getRowDropZoneParams(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)},getRowDropPositionIndicator:function getRowDropPositionIndicator(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}},setRowDropPositionIndicator:function setRowDropPositionIndicator(e,t){const o=e.rowDropHighlightSvc;if(!o)return;const i=t?.row;let s=t?.dropIndicatorPosition;"above"!==s&&"below"!==s&&"inside"!==s&&(s="none");const n=i?.rowIndex;null==n||"none"===s?o.clear():o.set(i,s)}},dependsOn:[Ko]},qo={moduleName:"HorizontalResize",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:o}=this.beans;o.addDragSource(t);return()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const o=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(o)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}}],dependsOn:[Uo]};var Yo=class extends m{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const e of t)e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?this.columnsToAggregate.push(e):e.isAllowRowGroup()?this.columnsToGroup.push(e):e.isAllowPivot()&&this.columnsToPivot.push(e)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&o?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&i?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function getBestColumnMoveIndexFromXPosition(e){const{isFromHeader:t,fromLeft:o,xPosition:i,fromEnter:s,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;t&&(u=function getColsToMove(e){const t=[...e];for(const o of e){let e=null,i=o.getParent();for(;null!=i&&1===i.getDisplayedLeafColumns().length;)e=i,i=i.getParent();if(null!=e){const o=e.getColGroupDef()?.marryChildren?e.getProvidedColumnGroup().getLeafColumns():e.getLeafColumns();for(const e of o)t.includes(e)||t.push(e)}}return t}(u));const h=u.slice();!function sortColsLikeCols(e,t){if(!t||t.length<=1)return;t.filter((t=>e.indexOf(t)<0)).length>0||t.sort(((t,o)=>e.indexOf(t)-e.indexOf(o)))}(l.getCols(),h);const g=function calculateValidMoves(e){const{movingCols:t,draggingRight:o,xPosition:i,pinned:s,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some((e=>e.getColDef().suppressMovable)))return[];const l=function getDisplayedColumns(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}(a,s),d=r.getCols(),c=l.filter((e=>t.includes(e))),u=l.filter((e=>!t.includes(e))),h=d.filter((e=>!t.includes(e)));let g,p=0,m=i;if(o){let e=0;for(const t of c)e+=t.getActualWidth();m-=e}if(m>0){for(let e=0;e<u.length;e++){if(m-=u[e].getActualWidth(),m<0)break;p++}o&&p++}if(p>0){const e=u[p-1];g=h.indexOf(e)+1}else g=h.indexOf(u[0]),-1===g&&(g=0);const f=[g],numberComparator=(e,t)=>e-t;if(o){let e=g+1;const t=d.length-1;for(;e<=t;)f.push(e),e++;f.sort(numberComparator)}else{let e=g;const t=d.length-1;let o=d[e];for(;e<=t&&l.indexOf(o)<0;)e++,f.push(e),o=d[e];e=g-1;const i=0;for(;e>=i;)f.push(e),e--;f.sort(numberComparator).reverse()}return f}({movingCols:h,draggingRight:o,xPosition:i,pinned:r,gos:a,colModel:l,visibleCols:c}),p=function calculateOldIndex(e,t){const o=t.getCols(),i=e.map((e=>o.indexOf(e))).sort(((e,t)=>e-t)),s=i[0],n=_last(i);return n-s!=i.length-1?null:s}(h,l);if(0===g.length)return;const m=g[0];if(null!==p&&(t||!s)&&!n){if(!o&&m>=p)return;if(o&&m<=p)return}const f=function getLowestFragMove(e,t,o,i){const s=i.allCols;let n=null,r=null;for(let i=0;i<e.length;i++){const a=e[i],l=o.getProposedColumnOrder(t,a);if(!o.doesOrderPassRules(l))continue;const d=l.filter((e=>s.includes(e)));if(null===r)r=d;else if(!_areEqual(d,r))break;const c=groupFragCount(l);(null===n||c<n.fragCount)&&(n={move:a,fragCount:c})}return n}(g,h,d,c);if(!f)return;const C=f.move;return C>l.getCols().length-h.length?void 0:{columns:h,toIndex:C}}function attemptMoveColumns(e){const{columns:t,toIndex:o}=getBestColumnMoveIndexFromXPosition(e)||{},{finished:i,colMoves:s}=e;return t&&null!=o?(s.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o}):null}function groupFragCount(e){function parents(e){const t=[];let o=e.getOriginalParent();for(;null!=o;)t.push(o),o=o.getOriginalParent();return t}let t=0;for(let o=0;o<e.length-1;o++){let i=parents(e[o]),s=parents(e[o+1]);[i,s]=i.length>s.length?[i,s]:[s,i];for(const e of i)-1===s.indexOf(e)&&t++}return t}function normaliseX(e){const{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let a=s.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(o&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),null!=t||r||(l+=s.get("center").getCenterViewportScrollLeft()),l):0}function setColumnsMoving(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var Qo=class extends m{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!_exists(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(e=>{this.gridBodyCon=e.gridBodyCtrl}))}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},i=o?.columns??[];for(const t of i){const i=t.getPinned();if(t.getColDef().lockPinned){if(i==e)return"move";continue}const s=o?.containerType;if(s===e||!e)return"move";if(e&&(!i||s!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,o=t.columns;if(0===e.dragSource.type)this.setColumnsVisible(o,!0,"uiColumnDragged");else{const e=t.visibleState,i=(o||[]).filter((t=>e[t.getId()]&&!t.isVisible()));this.setColumnsVisible(i,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,i=!1){const{gos:s,ctrlsSvc:n}=this.beans,r=s.get("suppressMoveWhenColumnDragging");if(i&&!r)return void this.finishColumnMoving();if(this.lastDraggingEvent=e,!e||!i&&_missing(e.hDirection))return;const a=normaliseX({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,o,a,i):this.handleColumnDragWhileAllowingMovement(e,t,o,a,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,o){if(!e?.length)return;const i=e.filter((e=>!e.getColDef().lockVisible));i.length&&this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,o,i,s){const n=this.getAllMovingColumns(e,!0);if(s){const e=this.isAttemptingToPin(n);e&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:i,xPosition:s}=this.getNormalisedXPositionInfo(n,e)||{};if(null==i||null==s)return void this.finishColumnMoving();this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:s,fromEnter:t,fakeEvent:o,fromLeft:i})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,s){const n=this.getAllMovingColumns(e),r="right"===this.normaliseDirection(e.hDirection),a=1===e.dragSource.type,l=attemptMoveColumns({...this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:o}),finished:s});l&&(this.lastMovedInfo=l)}getAllMovingColumns(e,t=!1){const o=e.dragSource.getDragItem();let i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;return i?i.filter((e=>!e.getColDef().lockPinned||e.getPinned()==this.pinned)):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:s,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:o,colModel:i}=this.beans,s=o.get("enableRtl"),n=i.getCols().filter((e=>e.isVisible()&&e.getPinned()===this.pinned));let r,a=null,l=null,d=null;for(const e of n){if(l=e.getActualWidth(),a=this.getNormalisedColumnLeft(e,0,s),null!=a){const o=a+l;if(a<=t&&o>=t){d=e;break}}a=null,l=null}if(d)-1!==e.indexOf(d)&&(d=null);else{for(let e=n.length-1;e>=0;e--){const t=n[e],o=n[e].getParent();if(!o){d=t;break}const i=o?.getDisplayedLeafColumns();if(i.length){d=_last(i);break}}if(!d)return;a=this.getNormalisedColumnLeft(d,0,s),l=d.getActualWidth()}if(null!=d&&null!=a&&null!=l){if(t-a<l/2){const e=n.indexOf(d);0===e?r=0:(r=1,d=n[e-1])}else r=1;this.lastHighlightedColumn?.column===d&&this.lastHighlightedColumn?.position===r||this.clearHighlighted(),setColumnHighlighted(d,r),this.lastHighlightedColumn={column:d,position:r}}else this.lastHighlightedColumn?.column!==d&&this.clearHighlighted()}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:i}=this.beans,s=o.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!r||null==a)return;const l=i.allCols,d=l.indexOf(n),c=l.indexOf(r),u=0===a,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=l[c+g];if(!p)return;return{fromLeft:h,xPosition:this.getNormalisedColumnLeft(p,20,s)}}getColumnMoveAndTargetInfo(e,t,o){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=function findFirstAndLastMovingColumns(e){const t=e.length;let o,i;for(let s=0;s<t;s++){if(!o){const t=e[s];null!=t.getLeft()&&(o=t)}if(!i){const o=e[t-1-s];null!=o.getLeft()&&(i=o)}if(o&&i)break}return{firstMovingCol:o,lastMovingCol:i}}(e);if(!s||!n||i.column||!t)return{firstMovingCol:s,...i};const r="left"===this.getPinDirection();return{firstMovingCol:s,position:r?1:0,column:r!==o?s:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,o){const{gos:i,ctrlsSvc:s}=this.beans,n=e.getLeft();if(null==n)return null;const r=e.getActualWidth();return normaliseX({x:o?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:o,skipScrollPadding:!0,gos:i,ctrlsSvc:s})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,o=this.failedMoveAttempts>7;return t&&o||e.some((e=>e.getPinned()!==this.pinned))}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:s,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:n,fromEnter:i,fakeEvent:s}),{columns:a,toIndex:l}=getBestColumnMoveIndexFromXPosition(r)||{};a&&null!=l&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(setColumnHighlighted(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth();let s,n;this.gos.get("enableRtl")?(s=e<o+50,n=e>i-50):(n=e<o+50,s=e>i-50),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+5*this.intervalCount,e>100&&(e=100);let t=null;const o=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:e,dragAndDrop:t,gos:o}=this.beans;if(this.failedMoveAttempts<=8||!e)return;if(t.setDragImageCompIcon("pinned"),!o.get("suppressMoveWhenColumnDragging")){const e=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(e,void 0,!0)}}}getPinDirection(){return this.needToMoveLeft||"left"===this.pinned?"left":this.needToMoveRight||"right"===this.pinned?"right":void 0}attemptToPinColumns(e,t,o=!1){const i=(e||[]).filter((e=>!e.getColDef().lockPinned));if(!i.length)return 0;o&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:n}=this.beans;return s?.setColsPinned(i,t,"uiColumnDragged"),o&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function setColumnHighlighted(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}var Zo=class extends m{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,o=this.pinned;e.whenReady(this,(e=>{let t;const i=e.gridBodyCtrl.eBodyViewport;switch(o){case"left":t=[[i,e.left.eContainer],[e.bottomLeft.eContainer],[e.topLeft.eContainer]];break;case"right":t=[[i,e.right.eContainer],[e.bottomRight.eContainer],[e.topRight.eContainer]];break;default:t=[[i,e.center.eViewport],[e.bottomCenter.eViewport],[e.topCenter.eViewport]]}this.eSecondaryContainers=t})),this.moveColumnFeature=this.createManagedBean(new Qo(o)),this.bodyDropPivotTarget=this.createManagedBean(new Yo(o)),t.addDropTarget(this),this.addDestroyFunc((()=>t.removeDropTarget(this)))}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&0===e.dragSource.type}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}};var Jo={moduleName:"ColumnMove",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){const i=this.beans.colModel.getCols();if(!i)return;const s=i[e];this.moveColumns([s],t,o)}moveColumns(e,t,o,i=!0){const{colModel:s,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=s.getCols();if(!l)return;if(t>l.length-e.length)return void _warn(30,{toIndex:t});n?.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(_moveInArray(s.getCols(),d,t),r.refresh(o),a.dispatchEvent({type:"columnMoved",columns:d,column:1===d.length?d[0]:null,toIndex:t,finished:i,source:o})),n?.finish()}doesMovePassRules(e,t){const o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){const{colModel:t,gos:o}=this.beans;if(!doesMovePassMarryChildren(e,t.getColTree()))return!1;return!!(e=>{const t=o.get("enableRtl");let i=t?1:-1,s=!0;for(const o of e){const e=(n=o.getColDef().lockPosition)?"left"===n||!0===n?-1:1:0;t?e>i&&(s=!1):e<i&&(s=!1),i=e}var n;return s})(e)}getProposedColumnOrder(e,t){const o=this.beans.colModel.getCols().slice();return _moveInArray(o,e,t),o}createBodyDropTarget(e,t){return new Zo(e,t)}moveHeader(e,t,o,i,s){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=isColumnGroup(o),g=h?c.width:o.getActualWidth(),p="left"===e!==r.get("enableRtl"),m=normaliseX({x:p?u-20:u+g+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:n}),f=d.focusedHeader;let C;if(attemptMoveColumns({allMovingColumns:h?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:"right"===e,xPosition:m,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0}),h){const e=o.getDisplayedLeafColumns();C=p?e[0]:_last(e)}else C=o;if(n.getScrollFeature().ensureColumnVisible(C,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&f){let e;if(h){const t=o.getGroupId(),i=o.getLeafColumns();if(!i.length)return;const s=i[0].getParent();if(!s)return;e=function findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return}(s,t)}else e=o;e&&d.focusHeaderPosition({headerPosition:{...f,column:e}})}}setDragSourceForHeader(e,t,o){const{gos:i,colModel:s,dragAndDrop:n,visibleCols:r}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=isColumnGroup(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],c=l?()=>function createDragItemForGroup(e,t){const o=e.getProvidedColumnGroup().getLeafColumns(),i={};for(const e of o)i[e.getId()]=e.isVisible();const s=[];for(const e of t)o.indexOf(e)>=0&&(s.push(e),_removeFromArray(o,e));for(const e of o)s.push(e);const n=[],r=e.getLeafColumns();for(const e of s)-1!==r.indexOf(e)&&n.push(e);return{columns:s,columnsInSplit:n,visibleState:i,containerType:n[0]?.pinned}}(t,r.allCols):()=>function createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}(t),u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:c,dragItemName:o,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),setColumnsMoving(d,!0)},onDragStopped:()=>setColumnsMoving(d,!1),onDragCancelled:()=>setColumnsMoving(d,!1),onGridEnter:e=>{if(a){const{columns:t=[],visibleState:o}=e??{},i=l?e=>!o||o[e.getColId()]:()=>!0,n=t.filter((e=>!e.getColDef().lockVisible&&i(e)));s.setColsVisible(n,!0,"uiColumnMoved")}},onGridExit:e=>{if(a){const t=e?.columns?.filter((e=>!e.getColDef().lockVisible))||[];s.setColsVisible(t,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}},class extends m{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(e=>this.gridBodyCtrl=e.gridBodyCtrl))}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush((()=>this.activeNext=!1),(()=>this.active=!1))}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push((()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)}))}flush(e,t){const{executeNextFuncs:o,executeLaterFuncs:i}=this;if(0===o.length&&0===i.length)return e(),void t();const runFuncs=e=>{for(;e.length;){const t=e.pop();t&&t()}};this.beans.frameworkOverrides.wrapIncoming((()=>{window.setTimeout((()=>{e(),runFuncs(o)}),0),window.setTimeout((()=>{t(),runFuncs(i)}),200)}))}}],apiFunctions:{moveColumnByIndex:function moveColumnByIndex(e,t,o){e.colMoves?.moveColumnByIndex(t,o,"api")},moveColumns:function moveColumns(e,t,o){e.colMoves?.moveColumns(t,o,"api")}},dependsOn:[Ko],css:[":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}"]},Xo={moduleName:"AutoWidth",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(e=>{this.centerRowContainerCtrl=e.center}))}getPreferredWidthForColumn(e,t){const o=this.getHeaderCellForColumn(e);if(!o)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const o=document.createElement("form");o.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;for(const t of e)this.cloneItemIntoDummy(t,o);i.appendChild(o);const s=Math.ceil(o.getBoundingClientRect().width);return o.remove(),s+(t=t??this.gos.get("autoSizePadding"))}getHeaderCellForColumn(e){let t=null;for(const o of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const i=o.getHtmlElementForColumnHeader(e);null!=i&&(t=i)}return t}cloneItemIntoDummy(e,t){const o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";const i=document.createElement("div"),s=i.classList;["ag-header-cell","ag-header-group-cell"].some((e=>o.classList.contains(e)))?(s.add("ag-header","ag-header-row"),i.style.position="static"):s.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some((e=>n.classList.contains(e)))){for(let e=0;e<n.classList.length;e++){const t=n.classList[e];"ag-row-position-absolute"!=t&&s.add(t)}break}n=n.parentElement}i.appendChild(o),t.appendChild(i)}}]};var ei=class extends m{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);const{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,(()=>this.resizeLeafColumnsToFit("uiColumnResized"))))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:s,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){const i=this.normaliseDragChange(t),s=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(s,o,e)}getInitialValues(e){const getInitialSizeOfColumns=e=>e.reduce(((e,t)=>e+t.getActualWidth()),0),getSizeRatiosOfColumns=(e,t)=>e.map((e=>e.getActualWidth()/t)),t=this.getColumnsToResize(),o=getInitialSizeOfColumns(t),i={columnsToResize:t,resizeStartWidth:o,resizeRatios:getSizeRatiosOfColumns(t,o)};let s=null;if(e&&(s=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),s){const e=s.getDisplayedLeafColumns(),t=i.groupAfterColumns=e.filter((e=>e.isResizable())),o=i.groupAfterStartWidth=getInitialSizeOfColumns(t);i.groupAfterRatios=getSizeRatiosOfColumns(t,o)}else i.groupAfterColumns=void 0,i.groupAfterStartWidth=void 0,i.groupAfterRatios=void 0;return i}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),o=this.getInitialValues();t>o.resizeStartWidth&&this.resizeColumns(o,t,e,!0)}resizeColumnsFromLocalValues(e,t,o=!0){if(!this.resizeCols||!this.resizeRatios)return;const i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,o)}resizeColumns(e,t,o,i=!0){const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];if(c.push({columns:s,ratios:r,width:t}),a){const e=t-n;c.push({columns:a,ratios:d,width:l-e})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter((e=>e.isResizable()))}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},ti=class extends m{constructor(e,t,o,i,s){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=s}postConstruct(){const e=[];let t,o;const addResize=()=>{if(_setDisplayed(this.eResize,t),!t)return;const{horizontalResizeSvc:i,colAutosize:s}=this.beans,n=i.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(n),o&&s&&e.push(s.addColumnAutosizeListeners(this.eResize,this.column))},removeResize=()=>{for(const t of e)t();e.length=0},refresh=()=>{const e=this.column.isResizable(),i=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(e!==t||i!==o)&&(t=e,o=i,removeResize(),addResize())};refresh(),this.addDestroyFunc(removeResize),this.ctrl.setRefreshFunction("resize",refresh)}onResizing(e,t){const{column:o,lastResizeAmount:i,resizeStartWidth:s,beans:n}=this,r=this.normaliseResizeAmount(t),a=[{key:o,newWidth:s+r}],{pinnedCols:l,ctrlsSvc:d,colResize:c}=n;if(this.column.getPinned()){if((l?.leftWidth??0)+(l?.rightWidth??0)+(r-i)>_getInnerWidth(d.getGridBodyCtrl().eBodyViewport)-50)return}this.lastResizeAmount=r,c?.setColumnWidths(a,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const o="left"!==this.pinned,i="right"===this.pinned;return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}};var oi={moduleName:"ColumnResize",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){const s=[],{colModel:n,gos:r,visibleCols:a}=this.beans;for(const o of e){const e=n.getColDefCol(o.key)||n.getCol(o.key);if(!e)continue;s.push({width:o.newWidth,ratios:[1],columns:[e]});if("shift"===r.get("colResizeDefault")&&(t=!t),t){const t=a.getColAfter(e);if(!t)continue;const i=e.getActualWidth()-o.newWidth,n=t.getActualWidth()+i;s.push({width:n,ratios:[1],columns:[t]})}}0!==s.length&&this.resizeColumnSets({resizeSets:s,finished:o,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every((e=>function checkMinAndMaxWidthsForSet(e){const{columns:t,width:o}=e;let i=0,s=0,n=!0;for(const e of t){i+=e.getMinWidth()||0;const t=e.getMaxWidth();t>0?s+=t:n=!1}const r=!n||o<=s;return o>=i&&r}(e))))){if(o){const e=t&&t.length>0?t[0].columns:null;dispatchColumnResizedEvent(this.eventSvc,e,o,i)}return}const s=[],n=[];for(const e of t){const{width:t,columns:o,ratios:r}=e,a={},l={};for(const e of o)n.push(e);let d=!0,c=0;for(;d;){if(c++,c>1e3){_error(31);break}d=!1;const e=[];let i=0,s=t;o.forEach(((t,o)=>{if(l[t.getId()])s-=a[t.getId()];else{e.push(t);const s=r[o];i+=s}}));const n=1/i;e.forEach(((o,i)=>{let c;i===e.length-1?c=s:(c=Math.round(r[i]*t*n),s-=c);const u=o.getMinWidth(),h=o.getMaxWidth();c<u?(c=u,l[o.getId()]=!0,d=!0):h>0&&c>h&&(c=h,l[o.getId()]=!0,d=!0),a[o.getId()]=c}))}for(const e of o){const t=a[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,i),s.push(e))}}const r=s.length>0;let a=[];if(r){const{colFlex:e,visibleCols:t,colViewport:o}=this.beans;a=e?.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0})??[],t.setLeftValues(i),t.updateBodyWidths(),o.checkViewportColumns()}const l=n.concat(a);(r||o)&&dispatchColumnResizedEvent(this.eventSvc,l,o,i,a)}resizeHeader(e,t,o){if(!e.isResizable())return;const i=e.getActualWidth(),s=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(i+t,s),n);this.setColumnWidths([{key:e,newWidth:r}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,s){return new ti(e,t,o,i,s)}createGroupResizeFeature(e,t,o,i){return new ei(e,t,o,i)}}],apiFunctions:{setColumnWidths:function setColumnWidths(e,t,o=!0,i="api"){e.colResize?.setColumnWidths(t,!1,o,i)}},dependsOn:[qo,Xo]},ii=class extends m{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push((()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)}))}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",0===e)}};var si=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let o;return o="number"!=typeof t?0:t+1,this.existingIds[e]=o,o}};function _removeAllFromUnorderedArray(e,t){for(let o=0;o<t.length;o++){const i=e.indexOf(t[o]);i>=0&&(e[i]=e[e.length-1],e.pop())}}function depthFirstAllColumnTreeSearch(e,t,o){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(isColumnGroup(s)){depthFirstAllColumnTreeSearch(t?s.getDisplayedChildren():s.getChildren(),t,o)}o(s)}}function pickDisplayedCols(e){const t=[];return depthFirstAllColumnTreeSearch(e,!0,(e=>{isColumn(e)&&t.push(e)})),t}var ni={moduleName:"ColumnGroup",version:I,dynamicBeans:{headerGroupCellCtrl:class extends mt{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,o,i,s){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,s=setupCompBean(this,a,s),this.setGui(t,s),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:i,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s,i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(s,g,t),c?.createRangeHighlightFeature(s,n,e),s.createManagedBean(new ht(n,t,r)),s.createManagedBean(new ii(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,o,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new at(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,g),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc((()=>this.clearComponent()))}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.getDefinition();return _addGridCommonParams(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,o=e.get("groupHeaderHeight");null!=o?0===o?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(o):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=_last(t)===e;if(!o&&!i)return;const s=e.getHighlighted();let n=!1,r=!1;if(!!this.rowCtrl.getHeaderCellCtrls().find((e=>e.column.isMoving()))){const e=this.beans.gos.get("enableRtl"),t=1===s,a=0===s;o&&(e?r=t:n=a),i&&(e?n=a:r=t)}this.comp.toggleCss("ag-header-highlight-before",n),this.comp.toggleCss("ag-header-highlight-after",r)}resizeHeader(e,t){const{resizeFeature:o}=this;if(!o)return;const i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:i}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),r=function _getHeaderGroupCompDetails(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,Me,"agColumnGroupHeader",t)}(t,_addGridCommonParams(o,{displayName:this.displayName,columnGroup:s,setExpanded:t=>{e.setColumnGroupOpened(n,t,"gridInitializing")},setTooltip:(e,t)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(e,t)},showColumnMenu:(e,t)=>i?.showMenuAfterButtonClick(n,e,"columnMenu",t),showColumnMenuAfterMouseClick:(e,t)=>i?.showMenuAfterMouseEvent(n,e,"columnMenu",t),eGridHeader:this.eGui}));r&&this.comp.setUserCompDetails(r)}addHeaderMouseListeners(e,t){const{column:o,comp:i,beans:{rangeSvc:s},gos:n}=this,listener=e=>this.handleMouseOverChange("mouseenter"===e.type);e.addManagedListeners(this.eGui,{mouseenter:listener,mouseleave:listener,click:()=>this.dispatchColumnMouseEvent("columnHeaderClicked",o.getProvidedColumnGroup()),contextmenu:e=>this.handleContextMenuMouseEvent(e,void 0,o.getProvidedColumnGroup())}),i.toggleCss("ag-header-group-cell-selectable",_getEnableColumnSelection(n));const r=s?.createHeaderGroupCellMouseListenerFeature(this.column,t);r&&this.createManagedBean(r)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),o=_getHeaderClassesFromColDef(t,this.gos,null,e);if(e.isPadding()){o.push("ag-header-group-cell-no-group");e.getLeafColumns().every((e=>e.isSpanHeaderHeight()))&&o.push("ag-header-span-height")}else o.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&o.push("ag-header-cell-wrap-text");for(const e of o)this.comp.toggleCss(e,!0)}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),listener=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const t of o)e.addManagedListeners(t,{movingChanged:listener});listener()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){super.handleKeyDown(e);if(!this.getWrapperHasFocus())return;const{column:t,expandable:o,gos:i,beans:s}=this,n=_getEnableColumnSelection(i);if(e.key==Y)if(n&&!e.altKey)s.rangeSvc?.handleColumnSelection(t,e);else if(o){const e=!t.isExpanded();s.colGroupSvc.setColumnGroupOpened(t.getProvidedColumnGroup(),e,"uiColumnExpanded")}}refreshAnnouncement(){let e;const{gos:t,column:o,beans:i}=this;if(_getEnableColumnSelection(t)){const t=this.getLocaleTextFunc(),s=i.rangeSvc?.isColumnInAnyRange(o);e=t("ariaColumnCellSelection",`Press CTRL+SPACE to ${s?"de":""}select all visible cells in this column group`)}this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:o}=this;o&&t.contains(_getActiveDomElement(e))&&e.ariaAnnounce?.announceValue(o,"columnHeader")}setDragSource(e){this.isAlive()&&!this.isSuppressMoving()&&(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some((e=>e.getColDef().suppressMovable||e.getColDef().lockPosition))}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}}},beans:[class extends m{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[];return depthFirstOriginalTreeSearch(null,this.beans.colModel.getColTree(),(t=>{isProvidedColumnGroup(t)&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})})),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];depthFirstOriginalTreeSearch(null,t,(e=>{if(isProvidedColumnGroup(e)){const t=e.getColGroupDef(),i={groupId:e.getGroupId(),open:t?t.openByDefault:void 0};o.push(i)}})),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){const{colModel:o,colAnimation:i,visibleCols:s,eventSvc:n}=this.beans;if(!o.getColTree().length)return;i?.start();const r=[];for(const t of e){const e=t.groupId,o=t.open,i=this.getProvidedColGroup(e);i&&(i.isExpanded()!==o&&(i.setExpanded(o),r.push(i)))}s.refresh(t,!0),r.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:1===r.length?r[0]:void 0,columnGroups:r}),i?.finish()}setColumnGroupOpened(e,t,o){let i;i=isProvidedColumnGroup(e)?e.getId():e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return depthFirstOriginalTreeSearch(null,this.beans.colModel.getColTree(),(o=>{isProvidedColumnGroup(o)&&o.getId()===e&&(t=o)})),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s="After"===t?_last(i):i[0],n=`getCol${t}`;for(;;){const t=this.beans.visibleCols[n](s);if(!t)return null;const i=this.getColGroupAtLevel(t,o);if(i!==e)return i}}getColGroupAtLevel(e,t){let o,i,s=e.getParent();for(;;){if(o=s.getProvidedColumnGroup().getLevel(),i=s.getPaddingLevel(),o+i<=t)break;s=s.getParent()}return s}updateOpenClosedVisibility(){depthFirstAllColumnTreeSearch(this.beans.visibleCols.getAllTrees(),!1,(e=>{isColumnGroup(e)&&e.calculateDisplayedColumns()}))}getColumnGroup(e,t){if(!e)return null;if(isColumnGroup(e))return e;const o=this.beans.visibleCols.getAllTrees(),i="number"==typeof t;let s=null;return depthFirstAllColumnTreeSearch(o,!1,(o=>{if(isColumnGroup(o)){const n=o;let r;r=i?e===n.getGroupId()&&t===n.getPartId():e===n.getGroupId(),r&&(s=n)}})),s}createColumnGroups(e){const{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),a=[];let l=t;for(;l.length;){const e=l;l=[];let t=0;const createGroupToIndex=s=>{const d=t;t=s;const c=e[d],u=(isColumnGroup(c)?c.getProvidedColumnGroup():c).getOriginalParent();if(null==u){for(let t=d;t<s;t++)a.push(e[t]);return}const h=this.createColumnGroup(u,o,r,i,n);for(let t=d;t<s;t++)h.addChild(e[t]);l.push(h)};for(let o=1;o<e.length;o++){const i=e[o],s=(isColumnGroup(i)?i.getProvidedColumnGroup():i).getOriginalParent(),n=e[t];s!==(isColumnGroup(n)?n.getProvidedColumnGroup():n).getOriginalParent()&&createGroupToIndex(o)}t<e.length&&createGroupToIndex(e.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,o,i,s,n,r){const a=s.getUniqueKey(t.groupId||null,null),l=createMergedColGroupDef(this.beans,t,a),d=new B(l,a,!1,o);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c?.group;u&&d.setExpanded(u.isExpanded());const h=_recursivelyCreateColumns(this.beans,l.children,o+1,e,i,s,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,o,i){const s=[];for(let n=0;n<e.length;n++){const r=e[n];if(isProvidedColumnGroup(r)){const e=r,n=this.balanceColumnTree(e.getChildren(),t+1,o,i);e.setChildren(n),s.push(e)}else{let n,a;for(let e=t;e<o;e++){const t=i.getUniqueKey(null,null),o=createMergedColGroupDef(this.beans,null,t),s=new B(o,t,!0,e);this.createBean(s),a&&a.setChildren([s]),a=s,n||(n=a)}if(n&&a){s.push(n);if(e.some((e=>isProvidedColumnGroup(e)))){a.setChildren([r]);continue}a.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,o=e;for(;o?.[0]&&isProvidedColumnGroup(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i<e.length;i++){const s=e[i];if(isProvidedColumnGroup(s)){const e=s,i=this.findMaxDepth(e.getChildren(),t+1);o<i&&(o=i)}}return o}balanceTreeForAutoCols(e,t){const o=[];for(const i of e){let e=i;for(let o=t-1;o>=0;o--){const t=new B(null,`FAKE_PATH_${i.getId()}_${o}`,!0,o);this.createBean(t),t.setChildren([e]),e.originalParent=t,e=t}0===t&&(i.originalParent=null),o.push(e)}return o}findExistingGroup(e,t){if(null!=e.groupId)for(let o=0;o<t.length;o++){const i=t[o];if(i.getColGroupDef()&&i.getId()===e.groupId)return{idx:o,group:i}}}createColumnGroup(e,t,o,i,s){const n=e.getGroupId(),r=t.getInstanceIdForKey(n);let a=o[createUniqueColumnGroupId(n,r)];return a&&a.getProvidedColumnGroup()!==e&&(a=null),_exists(a)?a.reset():(a=new K(e,n,r,i),s||this.createBean(a)),a}mapOldGroupsById(e){const t={},recursive=e=>{for(const o of e)if(isColumnGroup(o)){const e=o;t[o.getUniqueId()]=e,recursive(e.getChildren())}};return e&&recursive(e),t}setupParentsIntoCols(e,t){for(const o of e??[])if(o.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,isColumnGroup(o)){const e=o;this.setupParentsIntoCols(e.getChildren(),e)}}}],apiFunctions:{getAllDisplayedColumnGroups:function getAllDisplayedColumnGroups(e){return e.visibleCols.getAllTrees()},getCenterDisplayedColumnGroups:function getCenterDisplayedColumnGroups(e){return e.visibleCols.treeCenter},getColumnGroup:function getColumnGroup(e,t,o){return e.colGroupSvc?.getColumnGroup(t,o)??null},getColumnGroupState:function getColumnGroupState(e){return e.colGroupSvc?.getColumnGroupState()??[]},getDisplayNameForColumnGroup:function getDisplayNameForColumnGroup(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""},getLeftDisplayedColumnGroups:function getLeftDisplayedColumnGroups(e){return e.visibleCols.treeLeft},getProvidedColumnGroup:function getProvidedColumnGroup(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null},getRightDisplayedColumnGroups:function getRightDisplayedColumnGroups(e){return e.visibleCols.treeRight},resetColumnGroupState:function resetColumnGroupState(e){e.colGroupSvc?.resetColumnGroupState("api")},setColumnGroupOpened:function setColumnGroupOpened(e,t,o){e.colGroupSvc?.setColumnGroupOpened(t,o,"api")},setColumnGroupState:function setColumnGroupState(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}}},ri={tag:"div",cls:"ag-skeleton-container"},ai={moduleName:"CheckboxCellRenderer",version:I,userComponents:{agCheckboxCellRenderer:class extends Se{constructor(){super(It,[At]),this.eCheckbox=fe,this.registerCSS(".ag-checkbox-cell{height:100%}")}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),_setAriaLive(i,"polite"),this.addManagedListeners(i,{click:e=>{if(_stopPropagationForAgGrid(e),t.isDisabled())return;const o=t.getValue();this.onCheckboxChanged(o)},dblclick:e=>{_stopPropagationForAgGrid(e)}}),this.addManagedElementListeners(e.eGridCell,{keydown:i=>{if(i.key===Z&&!t.isDisabled()){e.eGridCell===_getActiveDomElement(o)&&t.toggle();const s=t.getValue();this.onCheckboxChanged(s),i.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,o=!0;const{value:i,column:s,node:n}=e;if(n.group&&s)if("boolean"==typeof i)t=i;else{const e=s.getColId();e.startsWith(z)?t=null==i||""===i?void 0:"true"===i:n.aggData&&void 0!==n.aggData[e]||n.sourceRowIndex>=0?t=i??void 0:o=!1}else t=i??void 0;const{eCheckbox:r}=this;if(!o)return void r.setDisplayed(!1);r.setValue(t);const a=e.disabled??!s?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),d=_getAriaCheckboxStateName(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){const{params:t}=this,{column:o,node:i,value:s}=t,{editSvc:n}=this.beans;if(!o)return;const r={rowNode:i,column:o};n?.dispatchCellEvent(r,null,"cellEditingStarted",{value:s});const a=i.setDataValue(o,e,"ui");n?.dispatchCellEvent(r,null,"cellEditingStopped",{oldValue:s,newValue:e,valueChanged:a}),a||this.updateCheckbox(t)}}}},li={moduleName:"SkeletonCellRenderer",version:I,userComponents:{agSkeletonCellRenderer:class extends Se{constructor(){super(ri)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc((()=>_setAriaLabelledBy(e.eParentOfValue))),_setAriaLabelledBy(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");_setAriaLabel(this.getGui(),t)}setupLoading(e){const t=_createElement({tag:"div",cls:"ag-skeleton-effect"}),o=e.node.rowIndex;if(null!=o){const e=75+25*(o%2==0?Math.sin(o):Math.cos(o));t.style.width=`${e}%`}this.getGui().appendChild(t);const i=this.getLocaleTextFunc(),s=e.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");_setAriaLabel(this.getGui(),s)}refresh(e){return!1}}}};function _deepCloneDefinition(e,t){if(!e)return;const o=e,i={};for(const e of Object.keys(o)){if(t&&t.indexOf(e)>=0||v.has(e))continue;const s=o[e],n="object"==typeof s&&null!==s&&s.constructor===Object;i[e]=n?_deepCloneDefinition(s):s}return i}var _parseBigIntOrNull=e=>{if("bigint"==typeof e)return e;let t;if("number"==typeof e)t=e;else if("string"==typeof e){if(t=e.trim(),""===t)return null;if(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))return null}if(null==t)return null;try{return BigInt(t)}catch{return null}},di=new RegExp("[T ]"),ci=new RegExp("^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}\\D?)?");function _padStartWidthZeros(e,t){return e.toString().padStart(t,"0")}function _serialiseDate(e,t=!0,o="T"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map((e=>_padStartWidthZeros(e,2))).join("-");return t&&(i+=o+[e.getHours(),e.getMinutes(),e.getSeconds()].map((e=>_padStartWidthZeros(e,2))).join(":")),i}function _getDateParts(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),_padStartWidthZeros(e.getDate(),2),_padStartWidthZeros(e.getHours(),2),`:${_padStartWidthZeros(e.getMinutes(),2)}`,`:${_padStartWidthZeros(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,_padStartWidthZeros(e.getDate(),2)].map(String):null}var calculateOrdinal=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},ui=["January","February","March","April","May","June","July","August","September","October","November","December"],hi=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function _isValidDate(e,t=!1){return!!_parseDateTimeFromString(e,t)}function _parseDateTimeFromString(e,t=!1,o){if(!e)return null;if(!o&&!ci.test(e))return null;const[i,s]=e.split(di);if(!i)return null;const n=i.split("-").map((e=>Number.parseInt(e,10)));if(3!==n.filter((e=>!isNaN(e))).length)return null;const[r,a,l]=n,d=new Date(r,a-1,l);if(d.getFullYear()!==r||d.getMonth()!==a-1||d.getDate()!==l)return null;if(!s&&t)return null;if(!s||"00:00:00"===s)return d;const[c,u,h]=s.split(":").map((e=>Number.parseInt(e,10)));if(c>=0&&c<24)d.setHours(c);else if(t)return null;if(u>=0&&u<60)d.setMinutes(u);else if(t)return null;if(h>=0&&h<60)d.setSeconds(h);else if(t)return null;return d}function _getValueUsingField(e,t,o){if(!t||!e)return;if(!o)return e[t];const i=t.split(".");let s=e;for(let e=0;e<i.length;e++){if(null==s)return;s=s[i[e]]}return s}var gi=["dateTimeString","dateString","text","number","bigint","boolean","date"];function mergeDataTypeDefinitions(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...convertColumnTypes(e.columnTypes),...convertColumnTypes(t.columnTypes)]),o}function validateDataTypeDefinition(e,t,o){return t?t.baseDataType===e.baseDataType||(_warn(46),!1):(_warn(45,{parentCellDataType:o}),!1)}function createGroupSafeValueFormatter(e,t){if(e.valueFormatter)return o=>{const{node:i,colDef:s,column:n,value:r}=o;if(i?.group){const t=(s.pivotValueColumn??n).getAggFunc();if(t){if("first"===t||"last"===t)return e.valueFormatter(o);const{baseDataType:i}=e;if(!(a=i,"number"!==a&&"bigint"!==a||"count"===t)){if((e=>"bigint"==typeof e||"number"==typeof e)(r))return e.valueFormatter(o);if(null==r)return;if("object"==typeof r){if("function"==typeof r.toNumber)return e.valueFormatter({...o,value:r.toNumber()});if("value"in r)return e.valueFormatter({...o,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&"string"==typeof o.value&&!e.dataTypeMatcher?.(o.value))return;var a;return e.valueFormatter(o)}}function bigintComparator(e,t){if(null==e)return null==t?0:-1;if(null==t)return 1;const o=_parseBigIntOrNull(e),i=_parseBigIntOrNull(t);return null!=o&&null!=i?o===i?0:o>i?1:-1:0}function bigintAbsoluteComparator(e,t){if(null==e)return null==t?0:-1;if(null==t)return 1;const o=toAbsoluteBigInt(e),i=toAbsoluteBigInt(t);return null!=o&&null!=i?o===i?0:o>i?1:-1:0}function toAbsoluteBigInt(e){const t=_parseBigIntOrNull(e);return null==t?null:t<0n?-t:t}function doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some((([o,i])=>function doesColDefPropPreventInference(e,t,o,i){if(!t[o])return!1;const s=e[o];return null===s?(t[o]=!1,!1):void 0===i?!!s:s===i}(e,t,o,i)))}function getUpdatedColumnState(e,t){const o=getColumnStateFromColDef(e);for(const e of t)delete o[e],"rowGroup"===e?delete o.rowGroupIndex:"pivot"===e&&delete o.pivotIndex;return o}var pi={moduleName:"DataType",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number:()=>({cellEditor:"agNumberCellEditor"}),bigint:({filterModuleBean:e})=>e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:bigintComparator,absolute:bigintAbsoluteComparator}},boolean:()=>({cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:o})=>t.key===Z&&o.isCellEditable(e)}),date:({formatValue:e})=>({cellEditor:"agDateCellEditor",keyCreator:e}),dateString:({formatValue:e})=>({cellEditor:"agDateStringCellEditor",keyCreator:e}),dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object:({formatValue:e,colModel:t,colId:o})=>({cellEditorParams:{useFormatter:!0},comparator:(i,s)=>{const n=t.getColDefCol(o),r=n?.getColDef();if(!n||!r)return 0;const a=null==i?"":e({column:n,node:null,value:i}),l=null==s?"":e({column:n,node:null,value:s});return a===l?0:a>l?1:-1},keyCreator:e}),text:()=>({})}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",(e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)}))}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},o={},generateFormatValueFunc=e=>t=>{const{column:o,node:i,value:s}=t;let n=o.getColDef().valueFormatter;return n===e.groupSafeValueFormatter&&(n=e.valueFormatter),this.beans.valueSvc.formatValue(o,i,s,n)};for(const i of Object.keys(e)){const s=e[i],n={...s,groupSafeValueFormatter:createGroupSafeValueFormatter(s,this.gos)};t[i]=n,o[i]=generateFormatValueFunc(n)}const i=this.gos.get("dataTypeDefinitions")??{},s={};for(const n of Object.keys(i)){const r=i[n],a=this.processDataTypeDefinition(r,i,[n],e);a&&(t[n]=a,r.dataTypeMatcher&&(s[n]=r.dataTypeMatcher),o[n]=generateFormatValueFunc(a))}const{valueParser:n,valueFormatter:r}=e.object,{valueParser:a,valueFormatter:l}=t.object;this.hasObjectValueParser=a!==n,this.hasObjectValueFormatter=l!==r,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(s,e)}sortKeysInMatchers(e,t){const o={...e};for(const i of gi)delete o[i],o[i]=e[i]??t[i].dataTypeMatcher;return o}processDataTypeDefinition(e,t,o,i){let s;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let o=i[n];const r=t[n];if(o&&r&&(o=r),!validateDataTypeDefinition(e,o,n))return;s=mergeDataTypeDefinitions(o,e)}else{if(o.includes(n))return void _warn(44);const r=t[n];if(!validateDataTypeDefinition(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...o,n],i);if(!a)return;s=mergeDataTypeDefinitions(a,e)}return{...s,groupSafeValueFormatter:createGroupSafeValueFormatter(s,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;void 0===i&&(i=e.cellDataType);const{field:s}=t;if(null!=i&&!0!==i||(i=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(s,o)),this.addFormulaCellEditorToColDef(e,t),!i)return void(e.cellDataType=!1);const n=this.dataTypeDefinitions[i];if(n)return e.cellDataType=i,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,n,o),n.columnTypes;_warn(47,{cellDataType:i})}addFormulaCellEditorToColDef(e,t){(t.allowFormula??e.allowFormula)&&!t.cellEditor&&(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const columnListener=e=>{t.add(e.key)};e.__addEventListener("columnStateUpdated",columnListener),this.columnStateUpdateListenerDestroyFuncs.push((()=>e.__removeEventListener("columnStateUpdated",columnListener)))}canInferCellDataType(e,t){const{gos:o}=this;if(!_isClientSideRowModel(o))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(doColDefPropsPreventInference(t,i))return!1;const s=null===t.type?e.type:t.type;if(s){const e=o.get("columnTypes")??{};if(convertColumnTypes(s).some((t=>{const o=e[t.trim()];return o&&doColDefPropsPreventInference(o,i)})))return!1}return!doColDefPropsPreventInference(e,i)}inferCellDataType(e,t){if(!e)return;let o;const i=this.getInitialData();if(i){const t=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");o=_getValueUsingField(i,e,t)}else this.initWaitForRowData(t);if(null==o)return;return Object.keys(this.dataTypeMatchers).find((e=>this.dataTypeMatchers[e](o)))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const e=this.beans.rowModel.rootNode?._leafs;if(e?.length)return e[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:e=>{const{firstRowData:n}=e;n&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&o?.processResizeOperations(),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const i={},s={};for(const e of Object.keys(this.columnStateUpdatesPendingInference)){const n=this.columnStateUpdatesPendingInference[e],r=this.colModel.getCol(e);if(!r)continue;const a=r.getColDef();if(!this.resetColDefIntoCol(r,"cellDataTypeInferred"))continue;const l=r.getColDef();if(t&&l.type&&l.type!==a.type){const t=getUpdatedColumnState(r,n);t.rowGroup&&null==t.rowGroupIndex&&(i[e]=t),t.pivot&&null==t.pivotIndex&&(s[e]=t),o.push(t)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,s)),o.length&&_applyColumnState(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i?.restoreColumnOrder(o,e),s?.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const i=_addColumnDefaultAndTypes(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return"dateTime"===e||"dateTimeString"===e}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(null==t)return!0;const o=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!o||(!(!e.getColDef().allowFormula||!this.beans.formula?.isFormula(t))||o(t))}validateColDef(e){const warning=e=>_warn(48,{property:e});if("object"===e.cellDataType){const{object:t}=this.dataTypeDefinitions;e.valueFormatter!==t.groupSafeValueFormatter||this.hasObjectValueFormatter||warning("Formatter"),e.editable&&e.valueParser===t.valueParser&&!this.hasObjectValueParser&&warning("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||"string"!=typeof t)return;const{dataTypeDefinitions:o,beans:i,formatValueFuncs:s}=this,n=o[t];n&&i.colFilter?.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){const s=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:i,formatValue:s,filterModuleBean:this.beans.filterManager});"agFormulaCellEditor"===e.cellEditor&&n.cellEditor!==e.cellEditor&&(n.cellEditor=e.cellEditor),Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:e=>_parseDateTimeFromString(e.newValue&&String(e.newValue)),valueFormatter:e=>null==e.value?"":e.value instanceof Date&&!isNaN(e.value.getTime())?_serialiseDate(e.value,o)??"":t("invalidDate","Invalid Date"),dataTypeMatcher:e=>e instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:e=>_parseDateTimeFromString(e)??void 0,dateFormatter:e=>_serialiseDate(e??null,t)??void 0,valueParser:e=>_isValidDate(String(e.newValue))?e.newValue:null,valueFormatter:e=>_isValidDate(String(e.value))?String(e.value):"",dataTypeMatcher:e=>"string"==typeof e&&_isValidDate(e)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:e=>""===e.newValue?.trim?.()?null:Number(e.newValue),valueFormatter:t=>null==t.value?"":"number"!=typeof t.value||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:e=>"number"==typeof e},bigint:{baseDataType:"bigint",valueParser:e=>{const{newValue:t}=e;return null==t||"string"==typeof t&&""===t.trim()?null:_parseBigIntOrNull(t)},valueFormatter:t=>null==t.value?"":"bigint"!=typeof t.value?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:e=>"bigint"==typeof e},text:{baseDataType:"text",valueParser:e=>""===e.newValue?null:_toStringOrNull(e.newValue),dataTypeMatcher:e=>"string"==typeof e},boolean:{baseDataType:"boolean",valueParser:e=>null==e.newValue?e.newValue:""===e.newValue?.trim?.()?null:"true"===String(e.newValue).toLowerCase(),valueFormatter:e=>null==e.value?"":String(e.value),dataTypeMatcher:e=>"boolean"==typeof e},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:e=>"string"==typeof e&&function _isValidDateTime(e){return _isValidDate(e,!0)}(e)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:e=>_toStringOrNull(e.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}}],dependsOn:[ai]},mi={moduleName:"ColumnFlex",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth);const o=this.flexViewportWidth,{visibleCols:i,colDelayRenderSvc:s}=this.beans,n=i.centerCols;let r=-1;if(e.resizingCols){const t=new Set(e.resizingCols);for(let e=n.length-1;e>=0;e--)if(t.has(n[e])){r=e;break}}let a=!1;const l=n.map(((e,t)=>{const o=e.getFlex(),i=null!=o&&o>0&&t>r;return a||(a=i),{col:e,isFlex:i,flex:Math.max(0,o??0),initialSize:e.getActualWidth(),min:e.getMinWidth(),max:e.getMaxWidth(),targetSize:0}}));if(a?(s?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(s),!o||!a)return[];let d=l.length,c=l.reduce(((e,t)=>e+t.flex),0),u=o;const freeze=(e,o)=>{e.frozenSize=o,e.col.setActualWidth(o,t),u-=o,c-=e.flex,d-=1},isFrozen=e=>null!=e.frozenSize;for(const e of l)e.isFlex||freeze(e,e.initialSize);for(;d>0;){const e=Math.round(c<1?u*c:u);let t,o=0,i=0;for(const s of l){if(isFrozen(s))continue;t=s,i+=e*(s.flex/c);const n=i-o,r=Math.round(n);s.targetSize=r,o+=r}t&&(t.targetSize+=e-o);let s=0;for(const e of l){if(isFrozen(e))continue;const t=e.targetSize,o=Math.min(Math.max(t,e.min),e.max);s+=o-t,e.violationType=o===t?void 0:o<t?"max":"min",e.targetSize=o}const n=0===s?"all":s>0?"min":"max";for(const e of l)isFrozen(e)||"all"!==n&&e.violationType!==n||freeze(e,e.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const h=l.filter((e=>e.isFlex&&!e.violationType)).map((e=>e.col));if(e.fireResizedEvent){const e=l.filter((e=>e.initialSize!==e.frozenSize)).map((e=>e.col)),o=l.filter((e=>e.flex)).map((e=>e.col));dispatchColumnResizedEvent(this.eventSvc,e,!0,t,o)}return this.revealColumns(s),h}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:o}=e.colDef;void 0!==t?e.flex=t:void 0!==o&&(e.flex=o)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}}]},fi={moduleName:"ColumnApi",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i,s=!1){const n=e.slice();t?n.sort(((e,t)=>o.indexOf(e)-o.indexOf(t))):(o||s)&&n.sort(((e,t)=>i.indexOf(e)-i.indexOf(t)));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,a)}buildColumnDefs(e,t=[],o=[]){const i=[],s={};for(const n of e){let e=!0,r=this.createDefFromColumn(n,t,o),a=n.getOriginalParent(),l=null;for(;a;){let t=null;if(a.isPadding()){a=a.getOriginalParent();continue}const o=s[a.getGroupId()];if(o){o.children.push(r),e=!1;break}if(t=this.createDefFromGroup(a),t&&(t.children=[r],s[t.groupId]=t,r=t,a=a.getOriginalParent()),null!=a&&l===a){e=!1;break}l=a}e&&i.push(r)}return i}createDefFromGroup(e){const t=_deepCloneDefinition(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const i=_deepCloneDefinition(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?o.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=!e.isVisible()||void 0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSortDef(),i.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,i}}],apiFunctions:{getColumnDef:function getColumnDef(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null},getDisplayNameForColumn:function getDisplayNameForColumn(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""},getColumn:function getColumn(e,t){return e.colModel.getColDefCol(t)},getColumns:function getColumns(e){return e.colModel.getColDefCols()},applyColumnState:function applyColumnState(e,t){return _applyColumnState(e,t,"api")},getColumnState:function getColumnState(e){return _getColumnState(e)},resetColumnState:function resetColumnState(e){!function _resetColumnState(e,t){const{colModel:o,autoColSvc:i,selectionColSvc:s,eventSvc:n,gos:r}=e,a=o.getColDefCols();if(!a?.length)return;const l=_getColumnsFromTree(o.getColDefColTree()),d=[];let c=1e3,u=1e3;const addColState=e=>{const t=getColumnStateFromColDef(e);_missing(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=c++),_missing(t.pivotIndex)&&t.pivot&&(t.pivotIndex=u++),d.push(t)};i?.getColumns()?.forEach(addColState),s?.getColumns()?.forEach(addColState),l?.forEach(addColState),_applyColumnState(e,{state:d},t);const h=i?.getColumns()??[];_applyColumnState(e,{state:[...s?.getColumns()??[],...h,...a].map((e=>({colId:e.colId}))),applyOrder:!0},t),n.dispatchEvent(_addGridCommonParams(r,{type:"columnsReset",source:t}))}(e,"api")},isPinning:function isPinning(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()},isPinningLeft:function isPinningLeft(e){return e.visibleCols.isPinningLeft()},isPinningRight:function isPinningRight(e){return e.visibleCols.isPinningRight()},getDisplayedColAfter:function getDisplayedColAfter(e,t){return e.visibleCols.getColAfter(t)},getDisplayedColBefore:function getDisplayedColBefore(e,t){return e.visibleCols.getColBefore(t)},setColumnsVisible:function setColumnsVisible(e,t,o){e.colModel.setColsVisible(t,o,"api")},setColumnsPinned:function setColumnsPinned(e,t,o){e.pinnedCols?.setColsPinned(t,o,"api")},getAllGridColumns:function getAllGridColumns(e){return e.colModel.getCols()},getDisplayedLeftColumns:function getDisplayedLeftColumns(e){return e.visibleCols.leftCols},getDisplayedCenterColumns:function getDisplayedCenterColumns(e){return e.visibleCols.centerCols},getDisplayedRightColumns:function getDisplayedRightColumns(e){return e.visibleCols.rightCols},getAllDisplayedColumns:function getAllDisplayedColumns(e){return e.visibleCols.allCols},getAllDisplayedVirtualColumns:function getAllDisplayedVirtualColumns(e){return e.colViewport.getViewportColumns()},getColumnDefs:function getColumnDefs(e){return e.colModel.getColumnDefs(!0)}}};var Ci={moduleName:"CellRendererFunction",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;return class Adapter{refresh(){return!1}getGui(){return this.eGui}init(e){const o=t(e),i=typeof o;this.eGui="string"!==i&&"number"!==i&&"boolean"!==i?null!=o?o:_createElement({tag:"span"}):_loadTemplate("<span>"+o+"</span>")}}}}]},wi=class extends p{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...o){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const i=this.dynamicBeans[e];if(null!=i)return new i(...o);if(t)throw new Error(this.getDynamicError(e,!1))}};var vi,bi,Si="object"!=typeof window||!window?.document?.fonts?.forEach,_injectGlobalCSS=(e,t,o,i,s,n,r=!1)=>{if(Si)return;i&&(e=`@layer ${CSS.escape(i).replaceAll("\\.",".")} { ${e} }`);let a=yi.map.get(t);if(a||(a=[],yi.map.set(t,a)),a.some((t=>t.css===e)))return;const l=document.createElement("style");n&&l.setAttribute("nonce",n),l.dataset.agGlobalCss=o,l.textContent=e;const d={css:e,el:l,priority:s,isParams:r};let c;for(const e of a){if(e.priority>s)break;c=e}if(c){c.el.after(l);const e=a.indexOf(c);a.splice(e+1,0,d)}else"STYLE"===t.nodeName?t.after(l):t.insertBefore(l,t.querySelector(":not(title, meta)")),a.push(d)},_injectCoreAndModuleCSS=(e,t,o,i)=>{_injectGlobalCSS(':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}:where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',e,"shared",t,0,o),i?.forEach(((i,s)=>i.forEach((i=>_injectGlobalCSS(i,e,s,t,0,o)))))},removeStaleParamsCss=(e,t=!1)=>{const o=new Set;for(const t of yi.grids.values())t.styleContainer===e&&o.add(t.paramsCss);const i=yi.map.get(e)??[];for(let e=i.length-1;e>=0;e--)(t||i[e].isParams&&!o.has(i[e].css))&&(i[e].el.remove(),i.splice(e,1))},yi=(vi="object"==typeof window?window:{}).agStyleInjectionState??(vi.agStyleInjectionState={map:new WeakMap,grids:new Map}),createPart=e=>new Di(e),Ri="$default",Fi=0,Di=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[Ri]:{...o.$default??{},...t??{}},...o}}use(e,t,o){let i=this._inject;if(null==i){let{css:e}=this;if(e){const t=`ag-theme-${this.feature??"part"}-${++Fi}`;"function"==typeof e&&(e=e()),e=`:where(.${t}) {\n${e}\n}\n`;for(const t of this.cssImports??[])e=`@import url(${JSON.stringify(t)});\n${e}`;i={css:e,class:t}}else i=!1;this._inject=i}return i&&e&&_injectGlobalCSS(i.css,e,i.class,t,1,o),!!i&&i.class}},paramToVariableName=e=>{return`--ag-${t=e,t.replace(/[A-Z]|\d+/g,(e=>`-${e}`)).toLowerCase()}`;var t},paramToVariableExpression=e=>`var(${paramToVariableName(e)})`,accentMix=e=>({ref:"accentColor",mix:e}),foregroundMix=e=>({ref:"foregroundColor",mix:e}),foregroundBackgroundMix=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),Pi={ref:"backgroundColor"},xi={ref:"foregroundColor"},Ei={ref:"accentColor"},Mi={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:foregroundMix(.15),chromeBackgroundColor:foregroundBackgroundMix(.02),browserColorScheme:"light"},Ti={...Mi,textColor:xi,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:accentMix(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:Pi,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:Ei,toggleButtonOffBackgroundColor:foregroundBackgroundMix(.3),toggleButtonSwitchBackgroundColor:Pi,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},panelBackgroundColor:Pi,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,dialogShadow:{ref:"popupShadow"},dialogBorder:{color:foregroundMix(.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:foregroundMix(.2)},menuBackgroundColor:foregroundBackgroundMix(.03),menuTextColor:foregroundBackgroundMix(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},Ai=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],Ii=(e=>{const t=new Map;return o=>{const i=o;return t.has(i)||t.set(i,e(o)),t.get(i)}})((e=>(e=e.toLowerCase(),Ai.find((t=>e.endsWith(t.toLowerCase())))??"length"))),literalToCSS=e=>"object"==typeof e&&e?.ref?paramToVariableExpression(e.ref):"string"==typeof e?e:"number"==typeof e&&String(e),colorValueToCss=e=>{if("string"==typeof e)return e;if("object"==typeof e&&e&&"ref"in e){const t=paramToVariableExpression(e.ref);if(null==e.mix)return t;return`color-mix(in srgb, ${e.onto?paramToVariableExpression(e.onto):"transparent"}, ${t} ${((e,t,o)=>Math.max(t,Math.min(o,e)))(100*e.mix,0,100)}%)`}return!1},lengthValueToCss=e=>{if("string"==typeof e)return e;if("number"==typeof e)return`${e}px`;if("object"==typeof e&&e&&"calc"in e){return`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,(e=>"-"===e[0]?e:" "+paramToVariableExpression(e)+" "))})`}return!("object"!=typeof e||!e||!("ref"in e))&¶mToVariableExpression(e.ref)},borderValueToCss=(e,t)=>"string"==typeof e?e:!0===e?borderValueToCss({},t):!1===e?"columnBorder"===t?borderValueToCss({color:"transparent"},t):"none":"object"==typeof e&&e&&"ref"in e?paramToVariableExpression(e.ref):ki(e.style??"solid")+" "+lengthValueToCss(e.width??{ref:"borderWidth"})+" "+colorValueToCss(e.color??{ref:"borderColor"}),shadowValueParamsToCss=e=>[lengthValueToCss(e.offsetX??0),lengthValueToCss(e.offsetY??0),lengthValueToCss(e.radius??0),lengthValueToCss(e.spread??0),colorValueToCss(e.color??{ref:"foregroundColor"}),...e.inset?["inset"]:[]].join(" "),ki=literalToCSS,fontFamilyValueToCss=e=>"string"==typeof e?e.includes(",")?e:quoteUnsafeChars(e):"object"==typeof e&&e&&"googleFont"in e?fontFamilyValueToCss(e.googleFont):"object"==typeof e&&e&&"ref"in e?paramToVariableExpression(e.ref):!!Array.isArray(e)&&e.map((e=>("object"==typeof e&&"googleFont"in e&&(e=e.googleFont),quoteUnsafeChars(e)))).join(", "),quoteUnsafeChars=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),Li=literalToCSS,imageValueToCss=e=>"string"==typeof e?e:"object"==typeof e&&e&&"url"in e?`url(${JSON.stringify(e.url)})`:"object"==typeof e&&e&&"svg"in e?imageValueToCss({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):!("object"!=typeof e||!e||!("ref"in e))&¶mToVariableExpression(e.ref),_i={color:colorValueToCss,colorScheme:literalToCSS,length:lengthValueToCss,scale:literalToCSS,border:borderValueToCss,borderStyle:ki,shadow:e=>"string"==typeof e?e:!1===e?"none":"object"==typeof e&&e&&"ref"in e?paramToVariableExpression(e.ref):Array.isArray(e)?e.map(shadowValueParamsToCss).join(", "):shadowValueParamsToCss(e),image:imageValueToCss,fontFamily:fontFamilyValueToCss,fontWeight:Li,duration:(e,t,o)=>"string"==typeof e?e:"number"==typeof e?(e>=10&&o.warn(104,{value:e,param:t}),`${e}s`):!("object"!=typeof e||!e||!("ref"in e))&¶mToVariableExpression(e.ref)},paramValueToCss=(e,t,o)=>{const i=Ii(e);return _i[i](t,e,o)},Gi=0,Ni=class _ThemeImpl{constructor(e,t=[]){this.params=e,this.parts=t}withPart(e){return"function"==typeof e&&(e=e()),e instanceof Di?new _ThemeImpl(this.params,[...this.parts,e]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:e}),this)}withoutPart(e){return this.withPart(createPart({feature:e}))}withParams(e,t="$default"){return this.withPart(createPart({modeParams:{[t]:e}}))}_startUse({styleContainer:e,cssLayer:t,nonce:o,loadThemeGoogleFonts:i,moduleCss:s}){if(Si)return;uninstallLegacyCSS(),_injectCoreAndModuleCSS(e,t,o,s);const n=getGoogleFontsUsed(this);if(n.length>0)for(const e of n)i&&loadGoogleFont(e,o);for(const i of this.parts)i.use(e,t,o)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=deduplicatePartsByFeature(this.parts).map((e=>e.use(void 0,void 0,void 0))).filter(Boolean).concat(this._getParamsClassName()).join(" "))}_getParamsClassName(){return this._paramsClassName??(this._paramsClassName="ag-theme-params-"+ ++Gi)}_getModeParams(){let e=this._paramsCache;if(!e){const t={[Ri]:{...Ti}};for(const e of deduplicatePartsByFeature(this.parts))for(const o of Object.keys(e.modeParams)){const i=e.modeParams[o];if(i){const e=t[o]??(t[o]={}),s=new Set;for(const t of Object.keys(i)){const o=i[t];void 0!==o&&(e[t]=o,s.add(t))}if(o===Ri)for(const e of Object.keys(t)){const o=t[e];if(e!==Ri)for(const e of s)delete o[e]}}}this._paramsCache=e=t}return e}_getParamsCss(){if(!this._paramsCssCache){let e="",t="";const o=this._getModeParams(),{overridePrefix:i,themeLogger:s}=this.params,n=i?`--ag-${i}-`:void 0;for(const i of Object.keys(o)){const r=o[i];if(i!==Ri){const o=`:where([data-ag-theme-mode="${"object"==typeof CSS?CSS.escape(i):i}"]) & {\n`;e+=o,t+=o}for(const o of Object.keys(r).sort()){const i=r[o],a=paramValueToCss(o,i,s);if(!1===a)s.error(107,{key:o,value:i});else{const i=paramToVariableName(o),s=n?i.replace("--ag-",n):i,r=i.replace("--ag-","--ag-inherited-");e+=`\t${i}: var(${r}, ${a});\n`,t+=`\t${r}: var(${s});\n`}}i!==Ri&&(e+="}\n",t+="}\n")}const r=`:where(.${this._getParamsClassName()})`;let a=`${r} {\n${e}}\n`;a+=`:has(> ${r}):not(${r}) {\n${t}}\n`,this._paramsCssCache=a}return this._paramsCssCache}},deduplicatePartsByFeature=e=>{const t=new Map;for(const o of e)t.set(o.feature,o);const o=[];for(const i of e)i.feature&&t.get(i.feature)!==i||o.push(i);return o},getGoogleFontsUsed=e=>{const t=new Set,visitParamValue=e=>{if(Array.isArray(e))e.forEach(visitParamValue);else{const o=e?.googleFont;"string"==typeof o&&t.add(o)}};return Object.values(e._getModeParams()).flatMap((e=>Object.values(e))).forEach(visitParamValue),Array.from(t).sort()},Vi=!1,uninstallLegacyCSS=()=>{if(!Vi){Vi=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},loadGoogleFont=async(e,t)=>{const o=`@import url('https://${Oi}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');\n`;_injectGlobalCSS(o,document.head,`googleFont:${e}`,void 0,0,t)},Oi="fonts.googleapis.com",Hi={changeKey:"listItemHeight",type:"length",defaultValue:24},Bi=class extends p{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);const o=e.get("themeStyleContainer"),i="undefined"!=typeof ShadowRoot,s=i&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=("function"==typeof o?o():o)??(s?t:document.head),o||s||!i||warnOnAttachToShadowRoot(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",(()=>this.handleThemeChange())),this.handleThemeChange(),this.getSizeEl(Hi),this.initVariables(),this.addDestroyFunc((()=>(e=>{const t=yi.grids.get(e)?.styleContainer;if(!t)return;yi.grids.delete(e),Array.from(yi.grids.values()).some((e=>e.styleContainer===t))?removeStaleParamsCss(t):(removeStaleParamsCss(t,!0),yi.map.delete(t))})(this))),this.mutationObserver=new MutationObserver((()=>{this.fireStylesChangedEvent("theme")})),this.addDestroyFunc((()=>this.mutationObserver.disconnect()))}applyThemeClasses(e,t=[]){const{theme:o}=this,i=o?o._getCssClass():this.applyLegacyThemeClasses();for(const t of Array.from(e.classList))t.startsWith("ag-theme-")&&e.classList.remove(t);if(i){const o=e.className;e.className=`${o}${o?" ":""}${i}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let o=!1;for(const i of Array.from(t.classList))i.startsWith("ag-theme-")&&(o=!0,e=e?`${e} ${i}`:i);o&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?_injectGlobalCSS(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Hi)}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(null!=t)return t;const o=this.measureSizeEl(e);return"detached"===o||"no-styles"===o?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){const t=this.getSizeEl(e);if(null==t.offsetParent)return"detached";const o=t.offsetWidth;return o===Wi?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=_createAgElement({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const o=this.getMeasurementContainer();t=_createAgElement({tag:"div"});const i=this.setSizeElStyles(t,e);o.appendChild(t),this.sizeEls.set(e,t);const{type:s,noWarn:n}=e;if("length"!==s&&"border"!==s)return t;let r=this.measureSizeEl(e);"no-styles"!==r||n||this.varError(i,e.defaultValue);const a=_observeResize(this.beans,t,(()=>{const t=this.measureSizeEl(e);"detached"!==t&&"no-styles"!==t&&(this.lastKnownValues.set(e,t),t!==r&&(r=t,this.fireStylesChangedEvent(e.changeKey)))}));return this.addDestroyFunc((()=>a())),t}setSizeElStyles(e,t){const{changeKey:o,type:i}=t;let s=paramToVariableName(o);return"border"===i?(s.endsWith("-width")&&(s=s.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${s}, solid ${Wi}px)`)):e.style.width=`var(${s}, ${Wi}px)`,s}handleThemeChange(){const{gos:e,theme:t}=this,o=e.get("theme");let i;if("legacy"===o)i=void 0;else{const e=o??this.getDefaultTheme();e instanceof Ni?i=e:this.themeError(e)}i!==t&&this.handleNewTheme(i),this.postProcessThemeChange(i,o)}handleNewTheme(e){const{gos:t,eRootDiv:o,globalCSS:i}=this,s=this.getAdditionalCss();if(e){_injectCoreAndModuleCSS(this.eStyleContainer,this.cssLayer,this.styleNonce,s);for(const[e,t]of i)_injectGlobalCSS(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce);i.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:s}),((e,t,o,i,s,n)=>{if(Si)return;const r=yi.grids.get(e);r?r.paramsCss=t:yi.grids.set(e,{styleContainer:i,paramsCss:t}),removeStaleParamsCss(i),t&&o&&_injectGlobalCSS(t,i,o,s,2,n,!0)})(this,e?._getParamsCss()??null,e?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(o),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},Wi=15538,warnOnAttachToShadowRoot=(e,t,o)=>{let i=60;const s=setInterval((()=>{"undefined"!=typeof ShadowRoot&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(s)),(_isInDOM(e)||--i<0)&&clearInterval(s)}),1e3);o((()=>clearInterval(s)))},zi={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:Pi,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Ei,rangeSelectionBackgroundColor:accentMix(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:accentMix(.5),rangeHeaderHighlightColor:(bi=.08,{ref:"foregroundColor",mix:bi,onto:"headerBackgroundColor"}),rowNumbersSelectedColor:accentMix(.5),rowHoverColor:accentMix(.08),columnHoverColor:accentMix(.05),selectedRowBackgroundColor:accentMix(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:Pi,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:foregroundMix(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:foregroundMix(.1),iconButtonActiveColor:Ei,iconButtonActiveBackgroundColor:accentMix(.28),iconButtonActiveIndicatorColor:Ei,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:foregroundMix(.8),cellEditingBorder:{color:Ei},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:foregroundMix(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:foregroundMix(.13)},selectCellBackgroundColor:foregroundMix(.07),selectCellBorder:{color:foregroundMix(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:Pi,filterPanelApplyButtonBackgroundColor:Ei,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:xi,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:xi,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:foregroundMix(.15),statusBarLabelColor:xi,statusBarLabelFontWeight:500,statusBarValueColor:xi,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},Ui={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},$i={...Ui,cellBatchEditTextColor:"#f3d0b3"},Ki=(()=>createPart({feature:"batchEditStyle",params:Ui,css:".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}"}))(),ji=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",qi={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},Yi=(()=>createPart({feature:"buttonStyle",params:{...qi,buttonBackgroundColor:Pi,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Ei}},css:ji}))(),Qi=(()=>createPart({feature:"columnDropStyle",css:".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}"}))(),Zi={formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}},Ji=(()=>createPart({feature:"formulaStyle",params:Zi}))(),Xi={warn:(...e)=>{_warn(e[0],e[1])},error:(...e)=>{_error(e[0],e[1])},preInitErr:(...e)=>{_logPreInitErr(e[0],e[2],e[1])}},createTheme=()=>{return(e=Xi,new Ni({themeLogger:e,overridePrefix:t})).withParams(zi).withPart(Yi).withPart(Qi).withPart(Ki).withPart(Ji);var e,t},es=(()=>createPart({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:Pi,checkboxUncheckedBorderColor:foregroundBackgroundMix(.3),checkboxCheckedBackgroundColor:Ei,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:Pi,checkboxIndeterminateBackgroundColor:foregroundBackgroundMix(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:Pi,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:'.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}'}))(),darkParams=()=>({...Mi,...$i,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:foregroundBackgroundMix(.05),rowHoverColor:accentMix(.15),selectedRowBackgroundColor:accentMix(.2),menuBackgroundColor:foregroundBackgroundMix(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:xi,findMatchColor:Pi,findActiveMatchColor:Pi,checkboxUncheckedBorderColor:foregroundBackgroundMix(.4),toggleButtonOffBackgroundColor:foregroundBackgroundMix(.4),rowBatchEditBackgroundColor:foregroundBackgroundMix(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"}),darkBlueParams=()=>({...darkParams(),backgroundColor:"#1f2836"}),ts=(()=>createPart({feature:"colorScheme",params:darkBlueParams()}))(),os=(()=>createPart({feature:"colorScheme",params:Mi,modeParams:{light:Mi,dark:darkParams(),"dark-blue":darkBlueParams()}}))(),is={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>'},ss={aasc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>',adesc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>'},quartzIconSvg=(e,t=1.5)=>{const o=ss[e];if(o)return o;const i=is[e];if(!i)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},iconSetQuartz=(e={})=>createPart({feature:"iconSet",css:()=>((e={})=>{let t="";for(const o of[...Object.keys(is),...Object.keys(ss)]){const i=quartzIconSvg(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }\n`}return t})(e)}),ns=iconSetQuartz(),rs=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',as={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},ls=(()=>createPart({feature:"inputStyle",params:{...as,inputBackgroundColor:Pi,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:Ei},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:foregroundBackgroundMix(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>rs+".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}"}))(),ds='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}',cs={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},us=(()=>createPart({feature:"tabStyle",params:{...cs,tabBarBorder:!0,tabBarBackgroundColor:foregroundMix(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Pi},css:ds}))(),hs=(()=>createTheme().withPart(es).withPart(os).withPart(ns).withPart(us).withPart(ls).withPart(Qi).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}))(),cssVariable=(e,t,o,i,s)=>({changeKey:e,type:t,defaultValue:o,noWarn:i,cacheDefault:s}),gs=cssVariable("cellHorizontalPadding","length",16),ps=cssVariable("indentationLevel","length",0,!0,!0),ms=cssVariable("rowGroupIndentSize","length",0),fs=cssVariable("rowHeight","length",42),Cs=cssVariable("headerHeight","length",48),ws=cssVariable("rowBorderWidth","border",1),vs=cssVariable("pinnedRowBorderWidth","border",1),bs=cssVariable("headerRowBorderWidth","border",1);var Ss=class extends p{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new s}addListener(e,t,o){this.globalSvc.addEventListener(e,t,o)}removeListener(e,t,o){this.globalSvc.removeEventListener(e,t,o)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}};function getHeaderIndexToFocus(e,t,o){const i=e.visibleCols.headerGroupRowCount;if(o>=i)return{column:t,headerRowIndex:o};let s=t.getParent();for(;s&&s.getProvidedColumnGroup().getLevel()>o;)s=s.getParent();const n=t.isSpanHeaderHeight();return!s||n&&s.isPadding()?{column:t,headerRowIndex:i}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var ys=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],Rs=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Fs=ys.reduce(((e,t)=>(e[t]=function _getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}(t),e)),{}),Ds={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function quote(e){return`"${e}"`}var Ps={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,...o})=>{const i=o.groupRowEditable;return!!t||!!i?"string"==typeof e?Ds[e]??"CustomEditor":"CustomEditor":null},cellRenderer:({cellRenderer:e})=>"string"!=typeof e?null:Ds[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&"string"!=typeof e&&"boolean"!=typeof e?"CustomFilter":"string"==typeof e?Ds[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some((e=>t.includes(e)))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},xs={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},Es=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],Ms=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],Ts=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],As=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],Is=["theme","rowSelection"],ks=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],Ls=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],_s=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"];function toConstrainedNum(e,t,o){return"number"==typeof t||null==t?null==t||t>=o?null:`${e}: value should be greater than or equal to ${o}`:`${e}: value should be a number`}var Gs={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},GRID_OPTION_VALIDATIONS=()=>{const e={autoSizePadding:{validate:({autoSizePadding:e})=>toConstrainedNum("autoSizePadding",e,0)},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate:({cacheBlockSize:e})=>toConstrainedNum("cacheBlockSize",e,1)},cacheOverflowSize:{validate:({cacheOverflowSize:e})=>toConstrainedNum("cacheOverflowSize",e,1)},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:e=>{const t=e.domLayout,o=["autoHeight","normal","print"];return t&&!o.includes(t)?`domLayout must be one of [${o.join()}], currently it's ${t}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate:({enableRowPinning:e,pinnedTopRowData:t,pinnedBottomRowData:o})=>e&&(t||o)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null},isRowPinnable:{supportedRowModels:["clientSide"],validate:({enableRowPinning:e,isRowPinnable:t,pinnedTopRowData:o,pinnedBottomRowData:i})=>t&&(o||i)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!e&&t?"`isRowPinnable` requires `enableRowPinning` to be set.":null},isRowPinned:{supportedRowModels:["clientSide"],validate:({enableRowPinning:e,isRowPinned:t,pinnedTopRowData:o,pinnedBottomRowData:i})=>t&&(o||i)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!e&&t?"`isRowPinned` requires `enableRowPinning` to be set.":null},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:e={}},t,o){for(const t of Object.keys(e))o.validation?.validateColDef(e[t]);return null}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return _errMsg(262);if(e.smallLeft)return _errMsg(263);if(e.smallRight)return _errMsg(264)}return null}},infiniteInitialRowCount:{validate:({infiniteInitialRowCount:e})=>toConstrainedNum("infiniteInitialRowCount",e,1)},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:e=>{if("boolean"==typeof e.ssrmExpandAllAffectsAllRows){if("serverSide"!==e.rowModelType)return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(e.ssrmExpandAllAffectsAllRows&&"function"!=typeof e.getRowId)return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate:({keepDetailRowsCount:e})=>toConstrainedNum("keepDetailRowsCount",e,1)},paginationPageSize:{validate:({paginationPageSize:e})=>toConstrainedNum("paginationPageSize",e,1)},paginationPageSizeSelector:{validate:e=>{const t=e.paginationPageSizeSelector;return"boolean"==typeof t||null==t||t.length?null:"'paginationPageSizeSelector' cannot be an empty array.\n If you want to hide the page size selector, set paginationPageSizeSelector to false."}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate:({rowBuffer:e})=>toConstrainedNum("rowBuffer",e,0)},rowClass:{validate:e=>"function"==typeof e.rowClass?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate:({rowSelection:e})=>e&&"string"==typeof e?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':e&&"object"!=typeof e?"Expected `RowSelectionOptions` object for the `rowSelection` property.":e&&"multiRow"!==e.mode&&"singleRow"!==e.mode?`Selection mode "${e.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},rowStyle:{validate:e=>{const t=e.rowStyle;return t&&"function"==typeof t?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate:({serverSideInitialRowCount:e})=>toConstrainedNum("serverSideInitialRowCount",e,1)},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:e=>{const t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){const e=t.filter((e=>!_getSortDefFromInput(e)));if(e.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${e.map((e=>"string"==typeof e||null==e?toStringWithNullUndefined(e):JSON.stringify(e)))}]`}else if(!Array.isArray(t)||!t.length)return`sortingOrder must be an array with at least one element, currently it's ${t}`;return null}},tooltipHideDelay:{validate:e=>e.tooltipHideDelay&&e.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:e=>e.tooltipShowDelay&&e.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:e=>e.tooltipSwitchShowDelay&&e.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:e=>{const t=e.rowModelType??"clientSide";switch(t){case"clientSide":{const{treeDataChildrenField:t,treeDataParentIdField:o,getDataPath:i,getRowId:s}=e;if(!t&&!o&&!i)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(t){if(i)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(o)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(o){if(!s)return"getRowId callback not provided, tree data with parent id cannot be built.";if(i)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const o=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${t} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:o}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate:({viewportRowModelBufferSize:e})=>toConstrainedNum("viewportRowModelBufferSize",e,0)},viewportRowModelPageSize:{validate:({viewportRowModelPageSize:e})=>toConstrainedNum("viewportRowModelPageSize",e,1)},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate:({autoGroupColumnDef:e,showOpenedGroup:t})=>e?.field&&t?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":e?.valueGetter&&t?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null},renderingMode:{validate:e=>{const t=e.renderingMode,o=["default","legacy"];return t&&!o.includes(t)?`renderingMode must be one of [${o.join()}], currently it's ${t}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:e})=>{if(!e)return null;const t=["fitCellContents","fitGridWidth","fitProvidedWidth"],o=e.type;return"fitCellContents"!==o&&"fitGridWidth"!==o&&"fitProvidedWidth"!==o?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${t.map((e=>'"'+e+'"')).join(", ")}, currently it's ${o}`:"fitProvidedWidth"===o&&"number"!=typeof e.width?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${e.width}`:null}}},t={};for(const e of Ls)t[e]={expectedType:"boolean"};for(const e of As)t[e]={expectedType:"number"};return _mergeDeep(t,e),t},Ns=0,Vs=0,Os="__ag_grid_instance";var Hs=class extends m{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){const{sortSvc:t,rangeSvc:o,gos:i}=this.beans;if(!_getEnableColumnSelection(i)||e.altKey){if(this.column.isSortable()){const o=this.column.isMoving(),i=Date.now()-this.lastMovingChanged<50;o||i||t?.progressSortFromEvent(this.column,e)}}else o?.handleColumnSelection(this.column,e)}};var Bs=class extends m{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){const{columnGroup:e,beans:t}=this,{ctrlsSvc:o}=t;o.whenReady(this,(()=>{const t=this.refreshPosition.bind(this);null==e.getPinned()&&this.addManagedEventListeners({bodyScroll:e=>{"horizontal"===e.direction&&this.updateSticky(e.left)}}),this.addManagedListeners(e,{leftChanged:t,displayedChildrenChanged:t}),this.addManagedEventListeners({columnResized:t}),this.refreshPosition()}))}refreshPosition(){const{columnGroup:e,beans:t}=this,o=e.getLeft(),i=e.getActualWidth();if(null==o||0===i)return this.left=null,this.right=null,void this.setSticky(!1);this.left=o,this.right=o+i;const s=t.colViewport.getScrollPosition();null!=s&&this.updateSticky(s)}updateSticky(e){const{beans:t,left:o,right:i}=this;if(null==o||null==i)return void this.setSticky(!1);const{gos:s,visibleCols:n}=t,r=s.get("enableRtl")?n.bodyWidth-e:e;this.setSticky(o<r&&i>r)}setSticky(e){const{isSticky:t,eLabel:o}=this;t!==e&&(this.isSticky=e,o.classList.toggle("ag-sticky-label",e))}},Ws={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},zs={moduleName:"ColumnHeaderComp",version:I,userComponents:{agColumnHeader:class extends Se{constructor(){super(...arguments),this.eFilter=fe,this.eFilterButton=fe,this.eSortIndicator=fe,this.eMenu=fe,this.eLabel=fe,this.eText=fe,this.eColRef=fe,this.eSortOrder=fe,this.eSortAsc=fe,this.eSortDesc=fe,this.eSortMixed=fe,this.eSortNone=fe,this.eSortAbsoluteAsc=fe,this.eSortAbsoluteDesc=fe,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||null!=this.currentSuppressMenuHide&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const t={...e};_mergeDeep(t,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(t)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const{formula:o}=this.beans,i=e.template;return i?i?.trim?i.trim():i:function getHeaderCompElementParams(e,t){const o={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:o},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:o},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:o},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}(!!o?.active,t)}init(e){this.params=e;const{sortSvc:t,touchSvc:o,rowNumbersSvc:i,userCompFactory:s}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new Hs(e.column,this.eLabel)))),o?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),i?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const o=function _getInnerHeaderCompDetails(e,t,o){return e.getCompDetails(t,xe,void 0,o)}(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then((e=>{this.isLoadingInnerComponent=!1,e&&(this.isAlive()?(this.innerHeaderComponent=e,this.eText&&this.eText.appendChild(e.getGui())):this.destroyBean(e))})))}setDisplayName(e){const{displayName:t}=e,o=this.currentDisplayName;this.currentDisplayName=t,!this.eText||o===t||this.innerHeaderComponent||this.isLoadingInnerComponent||(this.eText.textContent=_toString(t))}addInIcon(e,t,o){const i=_createIconNoSpan(e,this.beans,o);i&&t.appendChild(i)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu)return _removeFromParent(this.eMenu),void(this.eMenu=void 0);const{gos:e,eMenu:t,params:o}=this,i=_isLegacyMenuEnabled(e);this.addInIcon(i?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!i);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,(()=>{t||this.toggleMenuAlwaysShow(!1)}))}onMenuKeyboardShortcut(e){const{params:t,gos:o,beans:i,eMenu:s,eFilterButton:n}=this,r=t.column,a=_isLegacyMenuEnabled(o);if(e&&!a){if(i.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:t,eSortOrder:o,eSortAsc:i,eSortDesc:s,eSortMixed:n,eSortNone:r,eSortAbsoluteAsc:a,eSortAbsoluteDesc:l}=this;t.attachCustomElements(o,i,s,n,r,a,l)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o)}setupColumnRefIndicator(){const{eColRef:e,beans:{editModelSvc:t},params:o}=this;e&&(this.currentRef=o.column.formulaRef,e.textContent=this.currentRef,_setDisplayed(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{const o=t?.getEditPositions(),i=!!this.currentRef&&!!o?.some((e=>e.column.isAllowFormula()));_setDisplayed(e,i)},cellEditingStopped:()=>{_setDisplayed(e,!1)}}))}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterIcon,e,(()=>{const o=t.column.isFilterActive();_setDisplayed(e,o,{skipAriaHidden:!0})}),"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,o,i){if(!e)return _removeFromParent(t),!1;const s=this.params.column;return this.addInIcon(i,t,s),this.addManagedListeners(s,{filterChanged:o}),o(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:o}=this;return e?t??o??this.getGui():o??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}}},icons:{menu:"menu",menuAlt:"menu-alt"}},Us={moduleName:"ColumnGroupHeaderComp",version:I,userComponents:{agColumnGroupHeader:class extends Se{constructor(){super(Ws),this.agOpened=fe,this.agClosed=fe,this.agLabel=fe,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:o}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),o?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&_warn(89)}workOutInnerHeaderGroupComponent(e,t){const o=function _getInnerHeaderGroupCompDetails(e,t,o){return e.getCompDetails(t,Ee,void 0,o)}(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then((e=>{this.isLoadingInnerComponent=!1,e&&(this.isAlive()?(this.innerHeaderGroupComponent=e,this.agLabel.appendChild(e.getGui())):this.destroyBean(e))})))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:o},beans:{colGroupSvc:i}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const expandAction=e=>{if(_isStopPropagationForAgGrid(e))return;const t=!o.isExpanded();i.setColumnGroupOpened(o.getProvidedColumnGroup(),t,"uiColumnExpanded")};this.addTouchAndClickListeners(t,expandAction),this.addTouchAndClickListeners(e,expandAction);const stopPropagationAction=e=>{_stopPropagationForAgGrid(e)};this.addManagedElementListeners(t,{dblclick:stopPropagationAction}),this.addManagedElementListeners(e,{dblclick:stopPropagationAction}),this.addManagedElementListeners(this.getGui(),{dblclick:expandAction}),this.updateIconVisibility();const s=o.getProvidedColumnGroup(),n=this.updateIconVisibility.bind(this);this.addManagedListeners(s,{expandedChanged:n,expandableChanged:n})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){const i=o.isExpanded();_setDisplayed(e,i),_setDisplayed(t,!i)}else _setDisplayed(e,!1),_setDisplayed(t,!1)}addInIcon(e,t){const o=_createIconNoSpan(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:e,agClosed:t}=this;_setDisplayed(e,!1),_setDisplayed(t,!1)}}setupLabel(e){const{displayName:t,columnGroup:o}=e,{innerHeaderGroupComponent:i,isLoadingInnerComponent:s}=this,n=i||s;_exists(t)&&!n&&(this.agLabel.textContent=_toString(t)),o.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new Bs(this.getGui(),o))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}}},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},$s={moduleName:"AnimationFrame",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,0===e&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){!1===this.active&&_warn(92)}createTask(e,t,o,i,s=!1){this.verify();let n=o;i&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[n],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort(((e,o)=>e.deferred!==o.deferred?e.deferred?-1:1:e.index!==o.index?t*(o.index-e.index):o.createOrder-e.createOrder)),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:o,f1:i,destroyTasks:s,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,d=o.list,c=i.list,u=Date.now();let h=0;const g=e<=0,p=r.getScrollFeature();for(;g||h<e;){if(!p.scrollGridIfNeeded()){let n;if(l.length)this.sortTaskList(t),n=l.pop().task;else if(d.length)this.sortTaskList(o),n=d.pop().task;else if(c.length)a.wrapOutgoing((()=>{for(;g||h<e;){if(p.scrollGridIfNeeded())break;if(!c.length)break;this.sortTaskList(i),n=c.pop().task,n(),h=Date.now()-u}})),n=()=>{};else{if(!s.length)break;n=s.pop()}n()}h=Date.now()-u}l.length||d.length||c.length||s.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);_requestAnimationFrame(this.beans,e)}isQueueEmpty(){return!this.ticking}}]},Ks={moduleName:"Touch",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!_isIOSUserAgent())return;this.mockContextMenu(e,e.element,((t,o,i)=>{const{rowCtrl:s,cellCtrl:n}=e.getControlsForEventTarget(i?.target??null);n?.column&&n.dispatchCellContextMenuEvent(i??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,i,s,n)}))}handleCellDoubleClick(e,t){return!!(()=>{if(!_isIOSUserAgent()||g("dblclick"))return!1;const t=Date.now(),o=t-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=t,o})()&&(e.onCellDoubleClicked(t),t.preventDefault(),!0)}setupForHeader(e){const{gos:t,sortSvc:o,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:n,eFilterButton:r}=e,a=new zt(e.getGui(),!0);e.addDestroyFunc((()=>a.destroy()));const l=e.shouldSuppressMenuHide(),d=l&&_exists(n)&&s.enableMenu;let c=a;if(d&&(c=new zt(n,!0),e.addDestroyFunc((()=>c.destroy()))),s.enableMenu||i?.isHeaderContextMenuEnabled(s.column)){const t=d?"tap":"longTap",showMenuFn=e=>s.showColumnMenuAfterMouseClick(e.touchStart);e.addManagedListeners(c,{[t]:showMenuFn}),e.addManagedListeners(a,{longTap:showMenuFn})}if(s.enableSorting){const tapListener=e=>{const t=e.touchStart.target;l&&(n?.contains(t)||r?.contains(t))||o?.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:tapListener})}if(s.enableFilterButton&&r){const t=new zt(r,!0);e.addManagedListeners(t,{tap:()=>s.showFilter(r)}),e.addDestroyFunc((()=>t.destroy()))}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const o=new zt(t.eGridHeader,!0),showMenuFn=e=>t.showColumnMenuAfterMouseClick(e.touchStart);e.addManagedListeners(o,{longTap:showMenuFn}),e.addDestroyFunc((()=>o.destroy()))}}setupForHeaderGroupElement(e,t,o){const i=new zt(t,!0);e.addManagedListeners(i,{tap:o}),e.addDestroyFunc((()=>i.destroy()))}mockContextMenu(e,t,o){if(!_isIOSUserAgent())return;const i=new zt(t);e.addManagedListeners(i,{longTap:e=>{_isEventFromThisInstance(this.beans,e.touchEvent)&&o(void 0,e.touchStart,e.touchEvent)}}),e.addDestroyFunc((()=>i.destroy()))}}]};function _unwrapUserComp(e){const t=e;return null!=t?.getFrameworkComponentInstance?t.getFrameworkComponentInstance():e}var js=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:o}=e||{};return this.cellValidations?.get(t)?.get(o)}hasCellValidation(e){return e?.rowNode&&e.column?!!this.getCellValidation(e):this.cellValidations.size>0}setCellValidation(e,t){const{rowNode:o,column:i}=e;this.cellValidations.has(o)||this.cellValidations.set(o,new Map),this.cellValidations.get(o).set(i,t)}clearCellValidation(e){const{rowNode:t,column:o}=e;this.cellValidations.get(t)?.delete(o)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},qs=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function _getRowCtrl(e,t={}){const{rowIndex:o,rowId:i,rowCtrl:s,rowPinned:n}=t;if(s)return s;const{rowModel:r,rowRenderer:a}=e;let{rowNode:l}=t;return l||(i?l=function _getRowById(e,t,o){const{rowModel:i,pinnedRowModel:s}=e;let n;return n??(n=i?.getRowNode(t)),o?n??(n=s?.getPinnedRowById(t,o)):(n??(n=s?.getPinnedRowById(t,"top")),n??(n=s?.getPinnedRowById(t,"bottom"))),n}(e,i,n):null!=o&&(l=r.getRow(o))),a.getRowCtrls(l?[l]:[])?.[0]}function _getCellCtrl(e,t={}){const{cellCtrl:o,colId:i,columnId:s,column:n}=t;if(o)return o;const r=e.colModel.getCol(i??s??_getColId(n)),a=t.rowCtrl??_getRowCtrl(e,t),l=a?.getCellCtrl(r)??void 0;if(l)return l;const d=t.rowNode??a?.rowNode;return d?e.rowRenderer.getCellCtrls([d],[r])?.[0]:void 0}function _stopEditing(e){const{editSvc:t}=e;t?.isBatchEditing()?(_syncFromEditors(e,{persist:!0}),_destroyEditors(e)):t?.stopEditing(void 0,{source:"api"})}function _getColId(e){if(e)return"string"==typeof e?e:e.getColId()}var Ys=Symbol("unedited");function _sourceAndPendingDiffer({pendingValue:e,sourceValue:t}){return e===Ys&&(e=t),e!==t}function _setupEditor(e,t,o){const{key:i,event:s,cellStartedEdit:n,silent:r}=o??{},{editModelSvc:a,editSvc:l,gos:d,userCompFactory:c}=e,u=_getCellCtrl(e,t),h=u?.comp?.getCellEditor(),g=_createEditorParams(e,t,i,n&&!r),p=a?.getEdit(t),m=g.value??p?.sourceValue;if(h)return a?.setEdit(t,{editorValue:getNormalisedFormula(e,m,!0,t.column),state:"editing"}),void h.refresh?.(g);const f=t.column.getColDef(),C=_getCellEditorDetails(c,f,g);if(!C)return;const{popupFromSelector:w,popupPositionFromSelector:v}=C,b=w??!!f.cellEditorPopup,S=v??f.cellEditorPopupPosition;if(checkAndPreventDefault(C.params,s),!u)return;const{rangeFeature:y,rowCtrl:R,comp:F,onEditorAttachedFuncs:D}=u;a?.setEdit(t,{editorValue:getNormalisedFormula(e,m,!0,t.column),state:"editing"}),u.editCompDetails=C,D.push((()=>y?.unsetComp())),F?.setEditDetails(C,b,S,d.get("reactiveCustomComponents")),R?.refreshRow({suppressFlash:!0});const P=a?.getEdit(t);r||P?.editorState?.cellStartedEditing||(l?.dispatchCellEvent(t,s,"cellEditingStarted",{value:m}),a?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function _valueFromEditor(e,t,o){const i={editorValueExists:!1};if(_hasValidationRules(e)){const e=t.getValidationErrors?.();if((e?.length??0)>0)return i}if(o?.isCancelling)return i;if(o?.isStopping){const e=t?.isCancelAfterEnd?.();if(e)return{...i,isCancelAfterEnd:e}}return{editorValue:t.getValue(),editorValueExists:!0}}function _createEditorParams(e,t,o,i){const{valueSvc:s,gos:n,editSvc:r}=e,a=e.gos.get("enableGroupEdit"),l=_getCellCtrl(e,t),d=t.rowNode?.rowIndex??void 0,c=r?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:h,column:g}=t,p=l.comp?.getCellEditor(),m=r?.getCellDataValue(t),f=void 0===m?p?_valueFromEditor(e,p)?.editorValue:void 0:m,C=f===Ys?s.getValueForDisplay({column:u,node:h,from:"edit"})?.value:f;let w=a?f:C;return g.isAllowFormula()&&e.formula?.isFormula(w)&&(w=e.formula?.normaliseFormula(w,!0)??w),_addGridCommonParams(n,{value:w,eventKey:o??null,column:g,colDef:g.getColDef(),rowIndex:d,node:h,data:h.data,cellStartedEdit:!!i,onKeyDown:l?.onKeyDown.bind(l),stopEditing:o=>{r.stopEditing(t,{source:c?"ui":"api",suppressNavigateAfterEdit:o}),_destroyEditor(e,t,{})},eGridCell:l?.eGui,parseValue:e=>s.parseValue(u,h,e,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{r?.validateEdit()}})}function _purgeUnchangedEdits(e,t){const{editModelSvc:o}=e;o?.getEditMap().forEach(((e,i)=>{e.forEach(((e,s)=>{(t||"editing"!==e.state&&e.pendingValue!==Ys)&&(_sourceAndPendingDiffer(e)||"editing"===e.state&&!t||o?.removeEdits({rowNode:i,column:s}))}))}))}function checkAndPreventDefault(e,t){return t instanceof KeyboardEvent&&"agNumberCellEditor"===e.column.getColDef().cellEditor?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function _syncFromEditors(e,t){for(const o of e.editModelSvc?.getEditPositions()??[]){const i=_getCellCtrl(e,o);if(!i)continue;const s=i.comp?.getCellEditor();if(!s)continue;const{editorValue:n,editorValueExists:r,isCancelAfterEnd:a}=_valueFromEditor(e,s,t);a&&e.editModelSvc?.setEdit(o,{editorState:{isCancelAfterEnd:a}}),_syncFromEditor(e,o,n,void 0,!r,t)}}function _syncFromEditor(e,t,o,i,s,n){const{editModelSvc:r,valueSvc:a}=e;if(!r)return;const{rowNode:l,column:d}=t;if(!l||!d)return;let c=r.getEdit(t);if(void 0===c?.sourceValue){const o=c?getNormalisedFormula(e,c.editorValue,!1,d):Ys,i={sourceValue:a.getValue(d,l,"data"),pendingValue:o};n?.persist&&(i.state="changed"),c=r.setEdit(t,i)}r.setEdit(t,{editorValue:s?getNormalisedFormula(e,c.sourceValue,!0,d):o}),n?.persist&&function _persistEditorValue(e,t){const{editModelSvc:o}=e,i=o?.getEdit(t),s={pendingValue:getNormalisedFormula(e,i?.editorValue,!1,t.column)};i?.editorState?.cellStoppedEditing||"editing"===i?.state||(s.state="changed");o?.setEdit(t,s)}(e,t)}function getNormalisedFormula(e,t,o,i){const{formula:s}=e;return i.isAllowFormula()&&s?.isFormula(t)?s?.normaliseFormula(t,o)??t:t}function _destroyEditors(e,t,o={}){if(t||(t=e.editModelSvc?.getEditPositions()),t)for(const i of t)_destroyEditor(e,i,o)}function _destroyEditor(e,t,o,i=_getCellCtrl(e,t)){const s=e.editModelSvc,n=s?.getEdit(t);let r;if(r=n&&"editing"!==n.state&&n.editorState?.cellStoppedEditing?n.state:"changed",!i)return void(n&&s?.setEdit(t,{state:r}));const a=i.comp,l=a?.getCellEditor();if(a&&!l){if(i?.refreshCell(),n){s?.setEdit(t,{state:r});const i=e.gos.get("enableGroupEdit")?_enabledGroupEditStoppedArgs(n,o?.cancel):{valueChanged:!1,newValue:void 0,oldValue:n.sourceValue};dispatchEditingStopped(e,t,i,o)}return}if(_hasValidationRules(e)){const e=n&&l?.getValidationErrors?.(),o=s?.getCellValidationModel();e?.length?o?.setCellValidation(t,{errorMessages:e}):o?.clearCellValidation(t)}n&&s?.setEdit(t,{state:r}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),i?.refreshCell({force:!0,suppressFlash:!0});const d=s?.getEdit(t);if(d&&"editing"!==d.state){const i=o?.cancel,s=e.gos.get("enableGroupEdit")?_enabledGroupEditStoppedArgs(d,i):function _cellEditStoppedArgs(e,t,o){if(o||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let i=e.editorValue;null!=i&&i!==Ys||(i=t?.pendingValue);i===Ys&&(i=void 0);return{valueChanged:_sourceAndPendingDiffer(e),newValue:i,oldValue:e.sourceValue}}(d,n,i);dispatchEditingStopped(e,t,s,o)}}function _enabledGroupEditStoppedArgs(e,t){const{sourceValue:o,pendingValue:i}=e;let s;return t||i===Ys||(s=i),{valueChanged:!t&&_sourceAndPendingDiffer(e),newValue:s,oldValue:o,value:o}}function dispatchEditingStopped(e,t,o,{silent:i,event:s}={}){const{editSvc:n,editModelSvc:r}=e,a=r?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:d}=l||{};i||d||(n?.dispatchCellEvent(t,s,"cellEditingStopped",o),r?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function _hasValidationRules(e){return!!e.gos.get("getFullRowEditValidationErrors")||function _columnDefsRequireValidation(e){if(!e)return!1;for(let t=0,o=e.length;t<o;++t){const o=e[t],i=o.cellEditorParams;if(i&&(o.editable||o.groupRowEditable)&&(void 0!==i.minLength||void 0!==i.maxLength||void 0!==i.getValidationErrors||void 0!==i.min||void 0!==i.max))return!0}return!1}(e.colModel.getColumnDefs())||function _editorsRequireValidation(e){const t=e.rowRenderer.getCellCtrls();for(let e=0,o=t.length;e<o;++e){const o=t[e].comp?.getCellEditor();if(o){const e=_unwrapUserComp(o);if(e.getValidationElement||e.getValidationErrors)return!0}}return!1}(e)}function _populateModelValidationErrors(e,t){if(!t&&!_hasValidationRules(e))return;const o=new js,{ariaAnnounce:i,localeSvc:s,editModelSvc:n,gos:r}=e,a="fullRow"===r.get("editType"),l=_getLocaleTextFunc(s)("ariaValidationErrorPrefix","Cell Editor Validation"),d=new Set;for(const t of e.rowRenderer.getCellCtrls()){const e=t.comp?.getCellEditor();if(!e)continue;const s=_unwrapUserComp(e),{rowNode:n,column:r}=t,a=s.getValidationErrors?.()??[],c=s.getValidationElement?.(!1)||!s.isPopup?.()&&t.eGui;if(c){const e=null!=a&&a.length>0,t=e?a.join(". "):"";_setAriaInvalid(c,e),e&&i.announceValue(`${l} ${a}`,"editorValidation"),c instanceof HTMLInputElement?c.setCustomValidity(t):c.classList.toggle("invalid",e)}a?.length>0&&o.setCellValidation({rowNode:n,column:r},{errorMessages:a}),d.add(t.rowCtrl)}if(_syncFromEditors(e,{persist:!1}),n?.setCellValidationModel(o),a){const t=_generateRowValidationErrors(e);n?.setRowValidationModel(t)}for(const e of d.values()){e.rowEditStyleFeature?.applyRowStyles();for(const t of e.getAllCellCtrls())t.tooltipFeature?.refreshTooltip(!0),t.editorTooltipFeature?.refreshTooltip(!0),t.editStyleFeature?.applyCellStyles?.()}}var _generateRowValidationErrors=e=>{const t=new qs,o=e.gos.get("getFullRowEditValidationErrors"),i=e.editModelSvc?.getEditMap();if(!i)return t;for(const e of i.keys()){const s=i.get(e);if(!s)continue;const n=[],{rowIndex:r,rowPinned:a}=e;for(const e of s.keys()){const t=s.get(e);if(!t)continue;const{editorValue:o,pendingValue:i,sourceValue:l}=t,d=o??(i===Ys?void 0:i)??l;n.push({column:e,colId:e.getColId(),rowIndex:r,rowPinned:a,oldValue:l,newValue:d})}const l=o?.({editorsState:n})??[];l.length>0&&t.setRowValidation({rowNode:e},{errorMessages:l})}return t};function _isManualPinnedRow(e){return!(!e.rowPinned||!e.pinnedSibling)}function _getNodesInRangeForSelection(e,t,o,i){const s="top"===t;if(!o)return _getNodesInRangeForSelection(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const i=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return _getNodesInRangeForSelection(e,t,o,s?e.getPinnedTopRow(i-1):e.getPinnedBottomRow(i-1))}let n=!1,r=!1;const a=[];return e.forEachPinnedRow(t,(e=>e!==o||n?n&&e===i?(r=!0,void a.push(e)):void(n&&!r&&a.push(e)):(n=!0,void a.push(e)))),a}var Qs=class extends m{constructor(e,t,o,i){super(),this.cellCtrl=e,this.rowNode=o,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case Y:this.onEnterKeyDown(e);break;case ie:this.onF2KeyDown(e);break;case Q:this.onEscapeKeyDown(e);break;case q:this.onTabKeyDown(e);break;case j:case oe:this.onBackspaceOrDeleteKeyDown(t,e);break;case te:case X:case ee:case J:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){const{cellCtrl:o,beans:i}=this;if(!i.editSvc?.isEditing(o,{withOpenEditor:!0})){if(e.shiftKey&&o.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const s=o.getFocusedCellPosition();i.navigation?.navigateToNextCell(e,t,s,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:o}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&(e.key===J||e.key===ee?o?.ensureColumnVisible(i.column):o?.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:o,beans:i,rowNode:s}=this,{gos:n,rangeSvc:r,eventSvc:a,editSvc:l}=i;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),function _isDeleteKey(e,t=!1){return e===oe||!t&&e===j&&_isMacOsUserAgent()}(e,n.get("enableCellEditingOnBackspace"))&&!l?.isEditing(o,{withOpenEditor:!0})){if(r&&_isCellSelectionEnabled(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){const e=i.valueSvc.getDeleteValue(o.column,s);s.setDataValue(o.column,e,"cellClear")}}else l?.isEditing(o,{withOpenEditor:!0})||i.editSvc?.startEditing(o,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:o}=this,{editSvc:i,navigation:s}=o,n=i?.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,a=i?.isRowEditing(r,{withOpenEditor:!0}),startEditingAction=t=>{const o=i?.startEditing(t,{startedEdit:!0,event:e,source:"edit"});o&&e.preventDefault()};if(n||a){if(this.isCtrlEnter(e))return void i?.applyBulkEdit(t,o?.rangeSvc?.getCellRanges()||[]);if(_populateModelValidationErrors(o),"block-stop"===i?.checkNavWithValidation(void 0,e))return;i?.isEditing(t,{withOpenEditor:!0})?i?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?i?.stopEditing({rowNode:r},{event:e,source:"edit"}):startEditingAction(t)}else if(o.gos.get("enterNavigatesVertically")){const o=e.shiftKey?X:te;s?.navigateToNextCell(null,o,t.cellPosition,!1)}else{if(i?.hasValidationErrors())return;i?.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),startEditingAction(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===Y}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this,i=o?.isEditing();i&&(_populateModelValidationErrors(this.beans),"block-stop"===o?.checkNavWithValidation(void 0,e))||o?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;"block-stop"===o?.checkNavWithValidation(t,e)&&o.revertSingleCellEdit(t),setTimeout((()=>{o?.stopEditing(t,{event:e,cancel:!0})}))}processCharacter(e){const t=e.target!==this.eGui,{beans:{editSvc:o},cellCtrl:i}=this;if(t)return;if(o?.isEditing(i,{withOpenEditor:!0}))return;if(e.key===Z)this.onSpaceKeyDown(e);else if(o?.isCellEditable(i,"ui")){if(o?.hasValidationErrors()&&!o?.hasValidationErrors(i))return;o?.startEditing(i,{startedEdit:!0,event:e,source:"api",editable:!0});!i.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:o}=this.beans,{rowNode:i}=this.cellCtrl;!o?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&_isRowSelection(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,i,"spaceKey"),e.preventDefault()}},Zs=class extends m{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!_isStopPropagationForAgGrid(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:o,editSvc:i,editModelSvc:s,frameworkOverrides:n,gos:r}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:d,cellPosition:c,rowNode:u}=l,h=_suppressCellMouseEvent(r,d,u,e);o&&a&&!h&&o.getCellRangeCount(c)>1&&o.intersectLastRange(!0);const g=l.createEvent(e,"cellClicked");g.isEventHandlingSuppressed=h,t.dispatchEvent(g);const p=d.getColDef();if(p.onCellClicked&&window.setTimeout((()=>{n.wrapOutgoing((()=>{p.onCellClicked(g)}))}),0),!h&&"editing"!==s?.getState(l)){const t=i?.isEditing(),o=i?.isRangeSelectionEnabledWhileEditing(),n=s?.getCellValidationModel().getCellValidationMap().size??0,r=s?.getRowValidationModel().getRowValidationMap().size??0;if(t&&(o||n>0||r>0))return;i?.shouldStartEditing(l,e)?i?.startEditing(l,{event:e}):i?.shouldStopEditing(l,e)&&("fullRow"===this.beans.gos.get("editType")?i?.stopEditing(l,{event:e,source:"edit"}):i?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:o,cellCtrl:i}=this,{eventSvc:s,frameworkOverrides:n,editSvc:r,editModelSvc:a,gos:l}=o,d=_suppressCellMouseEvent(l,i.column,i.rowNode,e),c=t.getColDef(),u=i.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=d,s.dispatchEvent(u),"function"==typeof c.onCellDoubleClicked&&window.setTimeout((()=>{n.wrapOutgoing((()=>{c.onCellDoubleClicked(u)}))}),0),!d&&r?.shouldStartEditing(i,e)&&"editing"!==a?.getState(i)){const t=r?.isEditing(),o=r?.isRangeSelectionEnabledWhileEditing(),s=a?.getCellValidationModel().getCellValidationMap().size??0,n=a?.getRowValidationModel().getRowValidationMap().size??0;if(t&&(o||s>0||n>0))return;r?.startEditing(i,{event:e})}}onMouseDown(e){const{shiftKey:t}=e,o=e.target,{cellCtrl:i,beans:s}=this,{eventSvc:n,rangeSvc:r,rowNumbersSvc:a,focusSvc:l,gos:d,editSvc:c}=s,{column:u,rowNode:h,cellPosition:g}=i,p=_suppressCellMouseEvent(d,u,h,e),fireMouseDownEvent=()=>{const t=i.createEvent(e,"cellMouseDown");t.isEventHandlingSuppressed=p,n.dispatchEvent(t)};if(p)return void fireMouseDownEvent();if(this.isRightClickInExistingRange(e))return;const m=r&&!r.isEmpty(),f=this.containsWidget(o),C=isRowNumberCol(u);if(!a||!C||a.handleMouseDownOnCell(g,e)){if(!t||!m){const t=c?.isEditing(i),s=d.get("enableCellTextSelection")&&e.defaultPrevented,n=(_isBrowserSafari()||s)&&!t&&!_isFocusableFormField(o)&&!f;i.focusCell(n,e)}if(t&&m&&!l.isCellFocused(g)){e.preventDefault();const t=l.getFocusedCell();if(t){const{column:o,rowIndex:i,rowPinned:s}=t,n=!!c?.isRangeSelectionEnabledWhileEditing?.();c?.isEditing(t)&&!n&&c?.stopEditing(t),n||l.setFocusedCell({column:o,rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}f||(r?.handleCellMouseDown(e,g),fireMouseDownEvent())}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=function _interpretAsRightClick({gos:e},t){return 2===t.button||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}(this.beans,e);if(o&&i)return!0}return!1}containsWidget(e){return _isElementChildOfClass(e,"ag-selection-checkbox",3)||_isElementChildOfClass(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,o=t.contains(e.target),i=t.contains(e.relatedTarget);return o&&i}},Js=class extends m{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();null!=t&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();_areEqual(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce(((e,t)=>e+t.getActualWidth()),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,o=e.getColSpan(t),i=[];if(1===o)i.push(e);else{let t=e;const s=e.getPinned();for(let e=0;t&&e<o&&(i.push(t),t=this.beans.visibleCols.getColAfter(t),t&&!_missing(t))&&s===t.getPinned();e++);}return i}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return e=this.beans.gos.get("enableRtl")&&this.colsSpanning?_last(this.colsSpanning):this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||"left"===this.column.getPinned())return e;const{visibleCols:t}=this.beans,o=t.getColsLeftWidth();if("right"===this.column.getPinned()){return o+t.bodyWidth+(e||0)}return o+(e||0)}_legacyApplyRowSpan(e){if(1===this.rowSpan&&!e)return;const t=_getRowHeightAsNumber(this.beans)*this.rowSpan;this.eContent.style.height=`${t}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},Xs=0,en=class extends m{constructor(e,t,o,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=o,this.gos=o.gos,this.editSvc=o.editSvc,this.hasEdit=!!o.editSvc;const{colId:s}=e;this.instanceId=s+"-"+Xs++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new Js(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this),this.mouseListener=new Zs(this,e,this.column),this.keyboardListener=new Qs(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&_isCellSelectionEnabled(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(this)),isRowNumberCol(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),_populateModelValidationErrors(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,o,i,s,n,r){this.comp=e,this.eGui=t,this.printLayout=s,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc((()=>this.removeFeatures())),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,r),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer();const a=n?this.isCellEditable():void 0,l=!a&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(a||l?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:a}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const e of this.onCompAttachedFuncs)e();this.onCompAttachedFuncs=[]}}checkFormulaError(){const e=!!this.beans.formula?.getFormulaError(this.column,this.rowNode);this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:o,ctrlsSvc:i,eventSvc:s}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const a=_getLoadingCellRendererDetails(o,n,r);if(i.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let e;const t=new me((t=>{e=t})),[o]=this.addManagedListeners(s,{bodyScrollEnd:()=>{e(),o()}});return{loadingComp:a,onReady:t}}return{loadingComp:a,onReady:me.resolve()}}showValue(e,t){const{beans:o,column:i,rowNode:s,rangeFeature:n}=this,{userCompFactory:r}=o;let a,l=this.getValueToDisplay();const d=s.stub&&null==s.groupData?.[i.getId()],c=i.getColDef();if(d||this.isCellRenderer()){const e=this.createCellRendererParams();a=!d||isRowNumberCol(i)?_getCellRendererDetails(r,c,e):_getLoadingCellRendererDetails(r,c,e)}if(!a&&!d&&o.findSvc?.isMatch(s,i)){const e=this.createCellRendererParams();a=_getCellRendererDetails(r,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},e)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const e=this.editSvc.prepDetailsDuringBatch(this,{compDetails:a,valueToDisplay:l});e&&(e.compDetails?a=e.compDetails:e.valueToDisplay&&(l=e.valueToDisplay))}this.comp.setRenderDetails(a,l,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&_requestAnimationFrame(o,(()=>n?.refreshRangeStyleAndHandle())),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){let e="";return"agCheckboxCellRenderer"===this.column.getColDef().cellRenderer&&(e=" ag-allow-overflow"),`ag-cell-value${e}`}isIncludeControl(e,t=!1){return(null==this.rowNode.rowPinned||t&&_isManualPinnedRow(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=_getCheckboxLocation(t),s=isColumnSelectionCol(this.column);return("custom"!==o||"selectionColumn"===i||!s)&&(e.checkboxSelection||s&&"object"==typeof t&&_getCheckboxes(t))}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||o||i||s}onPopupEditorClosed(){const{editSvc:e}=this.beans;e?.isEditing(this,{withOpenEditor:!0})&&e?.stopEditing(this,{source:e?.isBatchEditing()?"ui":"api"})}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:o,rowNode:i,comp:s,eGui:n,beans:{valueSvc:r,gos:a,editSvc:l}}=this;return _addGridCommonParams(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay({column:o,node:i,from:"edit"}).value,setValue:e=>l?.setDataValue({rowNode:i,column:o},e)||i.setDataValue(o,e),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:s.getParentOfValue(),registerRowDragger:(e,t,o,i)=>this.registerRowDragger(e,t,i),setTooltip:(e,t)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(e,t),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:e,comp:t}=this;!t?.getCellEditor()&&e.isEditing(this,{withOpenEditor:!0})&&e.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:e,suppressFlash:t,newData:o}={}){const{editStyleFeature:i,customStyleFeature:s,rowCtrl:{rowEditStyleFeature:n},beans:{cellFlashSvc:r,filterManager:a},column:l,comp:d,suppressRefreshCell:c,tooltipFeature:u}=this;if(c)return;const{field:h,valueGetter:g,showRowGroup:p,enableCellChangeFlash:m}=l.getColDef(),f=e||null==h&&null==g&&null==p||o,C=!!d,w=this.updateAndFormatValue(C);if(C){if(f||w){this.showValue(!!o,!1);const e=a?.isSuppressFlashingCellsBecauseFiltering();!t&&!e&&m&&r?.flashCell(this),i?.applyCellStyles?.(),s?.applyUserStyles(),s?.applyClassesFromColDef(),n?.applyRowStyles(),this.checkFormulaError()}u?.refreshTooltip(),s?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,o=this.valueFormatted,{value:i,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=i,this.valueFormatted=s,!e||(!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o)}valuesAreEqual(e,t){const o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){const t=this.eGui;_setDomData(this.beans.gos,t,ro,this),e.addDestroyFunc((()=>_setDomData(this.beans.gos,t,ro,null)))}createEvent(e,t){const{rowNode:o,column:i,value:s,beans:n}=this;return function _createCellEvent(e,t,o,{rowNode:i,column:s},n){return _addGridCommonParams(e.gos,{type:o,node:i,data:i.data,value:n,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}(n,e,t,{rowNode:o,column:i},s)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:o}=this;refreshFirstAndLastStyles(e,t,o.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);_setAriaColIndex(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return null!=this.rangeFeature}focusCell(e=!1,t){const o=this.editSvc?.allowedFocusTargetOnValidation(this);o&&o!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:o},comp:i}=this;if(!i||t?.isEditing(this)||!this.isCellFocused()||!o.shouldTakeFocus())return;const focus=()=>{if(!this.isAlive())return;const e=i.getFocusableElement();this.isCellFocused()&&e.focus({preventScroll:!0})};e?setTimeout(focus,0):focus()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(isRowNumberCol(this.column)&&(e=!0),_addOrRemoveAttribute(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss("ag-cell-last-left-pinned",e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(_isCellFocusSuppressed(t))return;if(!this.comp)return void(e&&(this.focusEventWhileNotReady=e));const o=this.isCellFocused(),i=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss("ag-cell-focus",o),o&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let o=this.comp.getFocusableElement();if(i){const e=_findFocusableElements(o,null,!0);e.length&&(o=e[0])}const s=!e||e.preventScrollOnBrowserFocus;o.focus({preventScroll:s}),function _placeCaretAtEnd(e,t){if(!t.isContentEditable)return;const o=_getWindow(e).getSelection();if(!o)return;const i=_getDocument(e).createRange();i.selectNodeContents(t),i.collapse(!1),o.removeAllRanges(),o.addRange(i)}(t,o)}o&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),o&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:_makeNull(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss("ag-cell",!0),e.toggleCss("ag-cell-not-inline-editing",!0);const t=1==this.column.isAutoHeight();e.toggleCss("ag-cell-auto-height",t),e.toggleCss("ag-cell-normal-height",!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=1==this.column.getColDef().wrapText;this.comp.toggleCss("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),o=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout((()=>{i.frameworkOverrides.wrapOutgoing((()=>{t.onCellContextMenu(o)}))}),0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(_getActiveDomElement(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,o){if(this.customRowDragComp)return void this.customRowDragComp.setDragElement(e,t);const i=this.createRowDragComp(e,t,o);i&&(this.customRowDragComp=i,this.addDestroyFunc((()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null})),i.refreshVisibility())}createRowDragComp(e,t,o){const i=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,(()=>this.value),e,t,o);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function processClassRules(e,t,o,i,s,n){if(null==o&&null==t)return;const r={},a={},forEachSingleClass=(e,t)=>{for(const o of e.split(" "))""!=o.trim()&&t(o)};if(o){const t=Object.keys(o);for(let s=0;s<t.length;s++){const n=t[s],l=o[n];let d;"string"==typeof l?d=!e||e.evaluate(l,i):"function"==typeof l&&(d=l(i)),forEachSingleClass(n,(e=>{d?r[e]=!0:a[e]=!0}))}}if(t&&n)for(const e of Object.keys(t))forEachSingleClass(e,(e=>{r[e]||(a[e]=!0)}));n&&Object.keys(a).forEach(n),Object.keys(r).forEach(s)}function calculateRowLevel(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var tn=0,on=class extends m{constructor(e,t,o,i,s){super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=s,this.focusEventWhileNotReady=null,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+tn++,this.rowId=_escapeString(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=_escapeString(e)}updateGui(e,t){"left"===e?this.leftGui=t:"right"===e?this.rightGui=t:"fullWidth"===e?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,i){const{context:s,rowRenderer:n}=this.beans,r={rowComp:e,element:t,containerType:o,compBean:i=setupCompBean(this,s,i)};this.allRowGuis.push(r),this.updateGui(o,r),this.initialiseRowComp(r);const a=this.rowNode,l="FullWidthLoading"===this.rowType||a.stub,d=!a.data&&"infinite"===this.beans.rowModel.getType();l||d||a.rowPinned||n.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter((t=>t.containerType!==e)),this.updateGui(e,void 0)}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const e of this.allRowGuis)e.element.style.display=t}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),_isRowSelection(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=e.rowComp,i=this.getInitialRowClasses(e.containerType);for(const e of i)o.toggleCss(e,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&_setAriaExpanded(e.element,1==this.rowNode.expanded),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),_setDomData(t,e.element,ao,this),e.compBean.addDestroyFunc((()=>_setDomData(t,e.element,ao,null))),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask((()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)})),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){null!=this.businessKey&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=_escapeString(this.rowNode.id);this.rowId=t,null!=t&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(_batchCall((()=>{this.onTopChanged()})),this.slideInAnimation[t]=!1);this.fadeInAnimation[t]&&(_batchCall((()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)})),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc((()=>{this.rowDragComps=this.rowDragComps.filter((e=>e!==o)),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(o,this.beans.context)}))}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map((e=>e?.rowComp?.getFullWidthCellRenderer())):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;e({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:i}}=this,s=!!e||!i.isPinningLeft(),n=!!t,r=!!o||!i.isPinningRight();return s&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this.rowNode})}setRowType(){const{rowNode:e,gos:t,beans:{colModel:o}}=this,i=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),s=this.isNodeFullWidthCell(),n=t.get("masterDetail")&&e.detail,r=_isFullWidthGroupRow(t,e,o.isPivotMode());this.rowType=i?"FullWidthLoading":n?"FullWidthDetail":s?"FullWidth":r?"FullWidthGroup":"Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:o}=this.beans;!o?.active||e||this.printLayout?this.updateColumnListsImpl(t):this.updateColumnListsPending||(o.createTask((()=>{this.active&&this.updateColumnListsImpl(!0)}),this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode);if(!t)return new en(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,o=null){const i={list:[],map:{}},addCell=(e,t,o)=>{null!=o?i.list.splice(o,0,t):i.list.push(t),i.map[e]=t},s=[];for(const o of t){const t=o.getInstanceId();let i=e.map[t];i&&!this.isCorrectCtrlForSpan(i)&&(i.destroy(),i=void 0),i||(i=this.getNewCellCtrl(o)),i&&addCell(t,i)}for(const t of e.list){const e=t.column.getInstanceId();if(null!=i.map[e])continue;!this.isCellEligibleToBeRemoved(t,o)?s.push([e,t]):t.destroy()}if(s.length)for(const[e,t]of s){const o=i.list.findIndex((e=>e.column.getLeft()>t.column.getLeft())),s=-1===o?void 0:Math.max(o-1,0);addCell(e,t,s)}const{focusSvc:n,visibleCols:r}=this.beans,a=n.getFocusedCell();if(a&&a.column.getPinned()==o){const e=a.column.getInstanceId();if(!i.map[e]&&r.allCols.includes(a.column)){const t=this.createFocusedCellCtrl();if(t){const o=i.list.findIndex((e=>e.column.getLeft()>t.column.getLeft())),s=-1===o?void 0:Math.max(o-1,0);addCell(e,t,s)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;const i=t?.getCellSpan(o.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(o))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(o.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const o=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(o,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const o=!0,{column:i}=e;if(i.getPinned()!=t)return o;if(!this.isCorrectCtrlForSpan(e))return o;const{visibleCols:s,editSvc:n}=this.beans,r=n?.isEditing(e),a=e.isCellFocused();if(r||a){return!(s.allCols.indexOf(i)>=0)&&o}return o}getDomOrder(){return this.gos.get("ensureDomOrder")||_isDomLayout(this.gos,"print")}listenOnDomOrder(e){e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],(()=>{e.rowComp.setDomOrder(this.getDomOrder())}))}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=_exists(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,i=o.isPinningLeft(),s=o.isPinningRight();if(t){const{slideInAnimation:e}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(e.fullWidth=!0);e.center=!0,e.left=i,e.right=s}else{const{fadeInAnimation:e}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(e.fullWidth=!0);e.center=!0,e.left=i,e.right=s}}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){const tryRefresh=(e,t)=>!e||e.rowComp.refreshFullWidth((()=>this.createFullWidthCompDetails(e.element,t).params)),e=tryRefresh(this.fullWidthGui,null),t=tryRefresh(this.centerGui,null),o=tryRefresh(this.leftGui,"left"),i=tryRefresh(this.rightGui,"right");return e&&t&&o&&i}addListeners(){const{beans:e,gos:t,rowNode:o}=this,{expansionSvc:i,eventSvc:s,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...i?.getRowExpandedListeners(this)??{}}),o.detail&&this.addManagedListeners(o.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(o,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:e})=>{e&&!o.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc((()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)})),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",(()=>{if(t.get("rowDragEntireRow"))for(const e of this.allRowGuis)this.addRowDraggerToRow(e);else this.rowDragComps=this.destroyBeans(this.rowDragComps,n)})),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell())this.beans.rowRenderer.redrawRow(this.rowNode);else if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode)}else{for(const t of this.getAllCellCtrls())t.refreshCell(e);for(const e of this.allRowGuis)this.setRowCompRowId(e.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(e.rowComp);this.onRowSelected(),this.postProcessCss()}}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",o="above"===t,i="inside"===t,s="below"===t,n="none"!==t,r=o||s,a=this.rowNode.uiLevel,l=r&&a>0,d=l?a.toString():"0";for(const e of this.allRowGuis){const t=e.rowComp;t.toggleCss("ag-row-highlight-above",o),t.toggleCss("ag-row-highlight-inside",i),t.toggleCss("ag-row-highlight-below",s),t.toggleCss("ag-row-highlight-indent",l),n?e.element.style.setProperty("--ag-row-highlight-level",d):e.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:_makeNull(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:o,column:i}=t;if(!(o.element===e.target))return;const s=this.rowNode,{focusSvc:n,navigation:r}=this.beans,a=n.getFocusedCell(),l={rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:a?.column??i};r?.navigateToNextCell(e,e.key,l,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||_isStopPropagationForAgGrid(e))return;const t=this.allRowGuis.find((t=>t.element.contains(e.target))),o=t?t.element:null,i=o===e.target,s=_getActiveDomElement(this.beans);let n=!1;o&&s&&(n=o.contains(s)&&s.classList.contains("ag-cell"));let r=null;i||n||(r=_findNextFocusableElement(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find((e=>_isVisible(e.element)))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const e of this.allRowGuis)_addOrRemoveAttribute(e.element,"tabindex",t)}setupFocus(){this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0))}restoreFullWidthFocus(e=!1){const{focusSvc:t,editSvc:o}=this.beans;if(o?.isEditing(this))return;if(!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;const i=this.getFullWidthRowGuiForFocus();if(!i)return;const focus=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&i.element.focus({preventScroll:!0})};e?setTimeout(focus,0):focus()}getFullWidthRowGuiForFocus(e){if(this.fullWidthGui)return this.fullWidthGui;const t=this.beans.focusSvc.getFocusedCell(),o=this.beans.colModel.getCol(e?.column??t?.column);if(!o)return;const i=o?.pinned;return"right"===i?this.rightGui:"left"===i?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,(o=>{o.element.classList.toggle("ag-full-width-focus",t&&o===e)}))}onFullWidthRowFocused(e){const{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)))return void this.setFullWidthRowFocusedClass(void 0,!1);const o=this.getFullWidthRowGuiForFocus(e);if(!o)return e&&(this.focusEventWhileNotReady=e),void this.setFullWidthRowFocusedClass(void 0,!1);this.setFullWidthRowFocusedClass(o,!0),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&o.element.focus({preventScroll:!0})}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const o={list:[],map:{}};for(const i of e.list)i!==t&&(o.list.push(i),o.map[i.column.getInstanceId()]=i);return o}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t)}}createRowEvent(e,t){const{rowNode:o}=this;return _addGridCommonParams(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){const o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){if(_isStopPropagationForAgGrid(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);return t&&o?{rowGui:t,column:o}:void 0}findFullWidthRowGui(e){return this.allRowGuis.find((t=>t.element.contains(e)))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=_isElementChildOfClass(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:o}=this.beans;t?.removeAllCellRanges();const i=this.findFullWidthInfoForEvent(e);if(!i)return;const{rowGui:s,column:n}=i,r=s.element,a=e.target,l=this.rowNode;let d=e.defaultPrevented||_isBrowserSafari();r&&r.contains(a)&&_isFocusableFormField(a)&&(d=!1),o.setFocusedCell({rowIndex:l.rowIndex,column:n,rowPinned:l.rowPinned,forceBrowserFocus:d})}isSuppressMouseEvent(e){const{gos:t,rowNode:o}=this;if(this.isFullWidth()){return function _suppressFullWidthMouseEvent(e,t,o,i){const s=t?.suppressMouseEventHandling;return suppressMouseEvent(e,void 0,o,i,s)}(t,this.findFullWidthRowGui(e.target)?.rowComp.getFullWidthCellRendererParams(),o,e)}const i=_getCellCtrlForEventTarget(t,e.target);return null!=i&&_suppressCellMouseEvent(t,i.column,o,e)}onRowClick(e){if(_isStopPropagationForAgGrid(e)||this.lastMouseDownOnDragger)return;const t=this.isSuppressMouseEvent(e),{eventSvc:o,selectionSvc:i}=this.beans,s=this.createRowEventWithSource("rowClicked",e);s.isEventHandlingSuppressed=t,o.dispatchEvent(s),t||i?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){"FullWidthDetail"===this.rowType&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:o,rowNode:i}=this,s=_addGridCommonParams(o,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(e,t,o,i)=>this.addFullWidthRowDragging(e,t,o,i),setTooltip:(e,t)=>{o.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(e,t)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return function _getFullWidthDetailCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(Oe,"agDetailCellRenderer",t,!0)}(n,s);case"FullWidthGroup":{const{value:e,valueFormatted:t}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return s.value=e,s.valueFormatted=t,function _getFullWidthGroupCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(Ve,"agGroupRowRenderer",t,!0)}(n,s)}case"FullWidthLoading":return function _getFullWidthLoadingCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(Ne,"agLoadingCellRenderer",t,!0)}(n,s);default:return function _getFullWidthCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(Ge,void 0,t,!0)}(n,s)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",i){const{rowDragSvc:s,context:n}=this.beans;if(!s||!this.isFullWidth())return;const r=s.createRowDragComp((()=>o),this.rowNode,void 0,e,t,i);this.createBean(r,n),this.addDestroyFunc((()=>{this.destroyBean(r,n)}))}onUiLevelChanged(){const e=calculateRowLevel(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;for(const e of this.allRowGuis)e.rowComp.toggleCss(t,!0),e.rowComp.toggleCss(o,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){if(0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length)return this.centerCellCtrls.list;return[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length)for(const t of e)for(const e of this.allRowGuis)e.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,(e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)}),(e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)}))}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,(e=>e.rowComp.setUserStyles(this.rowStyles)))}getPinnedForContainer(e){return"left"===e||"right"===e?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:i,beans:s}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(i.rowIndex%2==0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&(n.push("ag-row-pinned"),s.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&n.push("ag-row-pinned-source"),i.isSelected()&&n.push("ag-row-selected"),i.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),i.stub&&n.push("ag-row-loading"),o&&n.push("ag-full-width-row"),s.expansionSvc?.addExpandedCss(n,i),i.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=s;return r&&(r.processClassesFromGridOptions(n,i),r.preProcessRowClassRules(n,i)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),o&&("left"===t&&n.push("ag-cell-last-left-pinned"),"right"===t&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,(e=>{e!==this.centerGui&&e!==this.fullWidthGui||this.announceDescription()}),e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:o}=e,{rowNode:i,beans:s,gos:n}=this;o.addManagedListeners(t,{pointerenter:e=>{"mouse"===e.pointerType&&i.dispatchRowEvent("mouseEnter")},pointerleave:e=>{"mouse"===e.pointerType&&i.dispatchRowEvent("mouseLeave")}}),o.addManagedListeners(i,{mouseEnter:()=>{s.dragSvc?.dragging||n.get("suppressRowHoverHighlight")||(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map((e=>e.element));for(const e of t)e.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),i)}forEachGui(e,t){if(e)t(e);else for(const e of this.allRowGuis)t(e)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;const t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),i=_isGetRowHeightFunction(this.gos)?_getRowHeightForNode(this.beans,this.rowNode).height:void 0,s=i?Math.min(o,i)-2+"px":void 0;this.forEachGui(e,(e=>{e.element.style.height=`${t}px`,s&&e.element.style.setProperty("--ag-line-height",s)}))}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&_isAnimateRows(this.gos)&&!t.sticky){if(null!=t.rowTop){const e=this.roundRowTopToBounds(t.rowTop);this.setRowTop(e)}else for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-opacity-zero",!0)}this.fullWidthGui?.element.contains(_getActiveDomElement(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const destroyCellCtrls=e=>{for(const t of e.list)t.destroy();return{list:[],map:{}}};this.centerCellCtrls=destroyCellCtrls(this.centerCellCtrls),this.leftCellCtrls=destroyCellCtrls(this.leftCellCtrls),this.rightCellCtrls=destroyCellCtrls(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,(e=>{e.rowComp.toggleCss("ag-row-focus",this.rowFocused),e.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)}))}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;return e+this.beans.pageBounds.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&_exists(e)){const t=this.applyPaginationOffset(e),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(o)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let o;if(t.sticky)o=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(i);o=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return o+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let o=null;for(const t of this.getAllCellCtrls())t.column==e&&(o=t);if(null!=o||t)return o;for(const t of this.getAllCellCtrls())t?.getColSpanningList().indexOf(e)>=0&&(o=t);return o}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(null===t)return;const o=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),i=this.rowNode.rowIndex%2==0,s=o+this.rowNode.rowIndex+1;this.forEachGui(e,(e=>{e.rowComp.setRowIndex(t),e.rowComp.toggleCss("ag-row-even",i),e.rowComp.toggleCss("ag-row-odd",!i),_setAriaRowIndex(e.element,s)}))}};function getVScroll(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var sn={moduleName:"KeyboardNavigation",version:I,beans:[class extends m{constructor(){super(),this.beanName="navigation",this.onPageDown=_throttle(this.onPageDown,100),this.onPageUp=_throttle(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(e=>{this.gridBodyCon=e.gridBodyCtrl}))}handlePageScrollingKey(e,t=!1){const o=e.key,i=e.altKey,s=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=function _getCellPositionForEvent(e,t){return _getCellCtrlForEventTarget(e,t.target)?.getFocusedCellPosition()??null}(this.gos,e);let a=!1;switch(o){case re:case ae:s||i||(this.onHomeOrEndKey(o),a=!0);break;case J:case ee:case X:case te:if(!r)return!1;!s||i||n||(this.onCtrlUpDownLeftRight(o,r),a=!0);break;case ne:case se:s||i||(a=this.handlePageUpDown(o,r,t))}return a&&e.preventDefault(),a}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),!!t&&(e===se?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:o,focusIndex:i,focusColumn:s,isAsync:n,rowPinned:r}){const{scrollFeature:a}=this.gridBodyCon;_exists(o)&&!o.isPinned()&&a.ensureColumnVisible(o),_exists(e)&&a.ensureIndexVisible(e,t),n||a.ensureIndexVisible(i);const{focusSvc:l,rangeSvc:d}=this.beans;l.setFocusedCell({rowIndex:i,column:s,rowPinned:r,forceBrowserFocus:!0}),d?.setRangeToCell({rowIndex:i,rowPinned:r,column:s})}onPageDown(e){const t=this.beans,o=getVScroll(t),i=this.getViewportHeight(),{pageBounds:s,rowModel:n,rowAutoHeight:r}=t,a=s.getPixelOffset(),l=o.top+i,d=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,o=getVScroll(t),{pageBounds:i,rowModel:s,rowAutoHeight:n}=t,r=i.getPixelOffset(),a=o.top,l=s.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,o=!1){const{pageBounds:i,rowModel:s}=this.beans,n=this.getViewportHeight(),r=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),d=s.getRow(e.rowIndex),c=o?d?.rowHeight-n-l:n-l,u=d?.rowTop+c;let h,g=s.getRowIndexAtPixel(u+l);if(g===e.rowIndex){const i=o?-1:1;t=g=e.rowIndex+i}o?(h="bottom",g<r&&(g=r),t<r&&(t=r)):(h="top",g>a&&(g=a),t>a&&(t=a)),this.isRowTallerThanView(s.getRow(g))&&(t=g,h="top"),this.navigateTo({scrollIndex:t,scrollType:h,scrollColumn:null,focusIndex:g,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout((()=>{const i=this.getNextFocusIndexForAutoHeight(e,o);this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})}),50)}getNextFocusIndexForAutoHeight(e,t=!1){const o=t?-1:1,i=this.getViewportHeight(),{pageBounds:s,rowModel:n}=this.beans,r=s.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const e=n.getRow(l);if(e){const t=e.rowHeight??0;if(a+t>i)break;a+=t}l+=o}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=getVScroll(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=o),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return"number"==typeof t&&t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),i=this.getNormalisedPosition(o),{rowIndex:s,rowPinned:n,column:r}=i??o,a=r;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:a,focusIndex:s,focusColumn:a,rowPinned:n})}onHomeOrEndKey(e){const t=e===re,{visibleCols:o,pageBounds:i,rowModel:s}=this.beans,n=o.allCols,r=t?i.getFirstRow():i.getLastRow(),a=s.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find((e=>!e.isSuppressNavigable(a)));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const o=t.shiftKey,i=this.tabToNextCellCommon(e,o,t),s=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=s;if(!1===i)if(o){const{rowIndex:o,rowPinned:i}=e.getRowPosition();(i?0===o:o===r.getFirstRow())&&(0===l.get("headerHeight")||_isHeaderFocusSuppressed(s)?_focusNextGridCoreContainer(s,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof en&&e.focusCell(!0),(a.focusOverlay(!1)||_focusNextGridCoreContainer(s,o))&&t.preventDefault();else i?t.preventDefault():null===i&&n.get("gridCtrl").allowFocusForNextCoreContainer(o)}tabToNextCell(e,t){const o=this.beans,{focusSvc:i,rowRenderer:s}=o,n=i.getFocusedCell();if(!n)return!1;let r=_getCellByPosition(o,n);return!(!r&&(r=s.getRowByPosition(n),!r?.isFullWidth()))&&!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,o,i="ui"){const{editSvc:s,focusSvc:n}=this.beans;let r;const a=e instanceof en?e:e.getAllCellCtrls()?.[0];return r=s?.isEditing()?s?.moveToNextCell(a,t,o,i):this.moveToNextCellNotEditing(e,t,o),null===r?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,o){const i=this.beans.visibleCols.allCols;let s;if(e instanceof on){if(s={...e.getRowPosition(),column:t?i[0]:_last(i)},this.gos.get("embedFullWidthRows")&&o){const t=e.findFullWidthInfoForEvent(o);t&&(s.column=t.column)}}else s=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(s,{backwards:t,startEditing:!1});if(!1===n)return null;if(n instanceof en)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return _exists(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:o,skipToNextEditableCell:i}){let s=e;const n=this.beans,{cellNavigation:r,gos:a,focusSvc:l,rowRenderer:d,rangeSvc:c}=n;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=r.getNextTabbedCell(s,t);const u=a.getCallback("tabToNextCell");if(_exists(u)){const i=u({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:s||null});if(!0===i)s=e;else{if(!1===i)return!1;s={rowIndex:i.rowIndex,column:i.column,rowPinned:i.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const e=getFocusHeaderRowCount(n);return l.focusHeaderPosition({headerPosition:{headerRowIndex:e+s.rowIndex,column:s.column},fromCell:!0}),null}const h="fullRow"===a.get("editType");if(o&&(!h||i)){if(!this.isCellEditable(s))continue}this.ensureCellVisible(s);const g=_getCellByPosition(n,s);if(!g){const e=d.getRowByPosition(s);if(!e||!e.isFullWidth()||o)continue;return{...e.getRowPosition(),column:s?.column}}if(!r.isSuppressNavigable(g.column,g.rowNode))return g.setFocusedCellPosition(s),c?.setRangeToCell(s),g}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:o,rowModel:i}=this.beans;return"top"===t?o?.getPinnedTopRow(e):"bottom"===t?o?.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,o,i){let s=o,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=r;for(;s&&(s===o||!this.isValidNavigateCell(s));)d.get("enableRtl")?t===J&&(s=this.getLastCellOfColSpan(s)):t===ee&&(s=this.getLastCellOfColSpan(s)),s=a.getNextCellToFocus(t,s),n=_missing(s);if(n&&e&&e.key===X&&(s={rowIndex:-1,rowPinned:null,column:o.column}),i){const i=d.getCallback("navigateToNextCell");if(_exists(i)){const n=i({key:t,previousCellPosition:o,nextCellPosition:s||null,event:e});s=_exists(n)?{rowPinned:n.rowPinned,rowIndex:n.rowIndex,column:n.column}:null}}if(!s)return;if(s.rowIndex<0){const t=getFocusHeaderRowCount(r);return void l.focusHeaderPosition({headerPosition:{headerRowIndex:t+s.rowIndex,column:o.column},event:e||void 0,fromCell:!0})}const c=this.getNormalisedPosition(s);c?this.focusPosition(c):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const t=_getCellByPosition(this.beans,e);return t?(e=t.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:o,rowRenderer:i,focusSvc:s,eventSvc:n}=this.beans,r=o.allCols;if(!i.getRowByPosition(e)?.isFullWidth())return!1;const a=s.getFocusedCell(),l={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?_last(r):r[0])};this.focusPosition(l);const d=null==t?null!=a&&function _isRowBefore(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(_exists(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}(l,a):t;return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:l.rowIndex,rowPinned:l.rowPinned,column:l.column,isFullWidthCell:!0,fromBelow:d}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:o}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),o?.setRangeToCell(e)}isValidNavigateCell(e){return!!_getRowNode(this.beans,e)}getLastCellOfColSpan(e){const t=_getCellByPosition(this.beans,e);if(!t)return e;const o=t.getColSpanningList();return 1===o.length?e:{rowIndex:e.rowIndex,column:_last(o),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=_isGroupRowsSticky(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),i=t&&o?.sticky,{scrollFeature:s}=this.gridBodyCon;!i&&_missing(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}},class extends m{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,o=!1){return o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const o=e===X,i=e===te,s=e===J;let n,r;const{pageBounds:a,gos:l,visibleCols:d,pinnedRowModel:c}=this.beans,{rowPinned:u}=t;if(o||i)r=u&&c?o?0:"top"===u?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:o?a.getFirstRow():a.getLastRow(),n=t.column;else{const e=l.get("enableRtl");r=t.rowIndex;n=(s!==e?d.allCols:[...d.allCols].reverse()).find((e=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:e})))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,i=!1;for(;!i;){switch(e){case X:o=this.getCellAbove(o);break;case te:o=this.getCellBelow(o);break;case ee:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case J:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,_warn(8,{key:e})}i=!o||this.isCellGoodToFocusOn(o)}return o}isCellGoodToFocusOn(e){const t=e.column;let o;const{pinnedRowModel:i,rowModel:s}=this.beans;switch(e.rowPinned){case"top":o=i?.getPinnedTopRow(e.rowIndex);break;case"bottom":o=i?.getPinnedBottomRow(e.rowIndex);break;default:o=s.getRow(e.rowIndex)}if(!o)return!1;return!this.isSuppressNavigable(t,o)}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,o=_getRowBelow(this.beans,t,!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,o=_getRowAbove(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:o}=this.beans,i=t.allCols;let s=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=i[0];const t=_getRowBelow(this.beans,e,!0);if(_missing(t))return null;if(!t.rowPinned&&!(o?.isRowInPage(t.rowIndex)??1))return null;s=t?t.rowIndex:null,n=t?t.rowPinned:null}return{rowIndex:s,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:o,pagination:i}=t,s=o.allCols;let n=e.rowIndex,r=e.rowPinned,a=o.getColBefore(e.column);if(!a){a=_last(s);const o=_getRowAbove(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(_missing(o))return null;if(!o.rowPinned&&!(i?.isRowInPage(o.rowIndex)??1))return null;n=o?o.rowIndex:null,r=o?o.rowPinned:null}return{rowIndex:n,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:o}=e.colDef;if("boolean"==typeof o)return o;if("function"==typeof o){return o(e.createColumnFunctionCallbackParams(t))}return!1}},class extends m{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,(e=>{this.gridBodyCon=e.gridBodyCtrl}));const t=_getDocument(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let o;const{colModel:i,colGroupSvc:s,ctrlsSvc:n}=this.beans;if("string"==typeof e?(o=i.getCol(e),o||(o=s?.getColumnGroup(e)??null)):o=e,!o)return null;const r=n.getHeaderRowContainerCtrl()?.getAllCtrls(),a="filter"===_last(r||[]).type,l=getFocusHeaderRowCount(this.beans)-1;let d=-1,c=o;for(;c;)d++,c=c.getParent();let u=d;return t&&a&&u===l-1&&u++,-1===u?null:{headerRowIndex:u,column:o}}navigateVertically(e,t){const{focusSvc:o,visibleCols:i}=this.beans,{focusedHeader:s}=o;if(!s)return!1;const{headerRowIndex:n}=s,r=s.column,a=getFocusHeaderRowCount(this.beans),l=this.getHeaderRowType(n),d=i.headerGroupRowCount;let{headerRowIndex:c,column:u,headerRowIndexWithoutSpan:h}="UP"===e?function getColumnVisibleParent(e,t,o){const i=o-1;if("filter"!==e){const e=t instanceof H&&t.isSpanHeaderHeight();let o=t.getParent();for(;o&&(o.getProvidedColumnGroup().getLevel()>i||e&&o.isPadding());)o=o.getParent();if(o)return e?{column:o,headerRowIndex:o.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:i}:{column:o,headerRowIndex:i,headerRowIndexWithoutSpan:i}}return{column:t,headerRowIndex:i,headerRowIndexWithoutSpan:i}}(l,r,n):function getColumnVisibleChild(e,t,o){const i=t+1,s={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof K){if(i>=o)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:o,headerRowIndexWithoutSpan:i};let t=e.getDisplayedChildren()[0];if(t instanceof K&&t.isPadding()){const e=t.getDisplayedLeafColumns()[0];e.isSpanHeaderHeight()&&(t=e)}s.column=t;t instanceof H&&t.isSpanHeaderHeight()&&(s.headerRowIndex=o,s.headerRowIndexWithoutSpan=i)}return s}(r,n,d),g=!1;return c<0&&(c=0,u=r,g=!0),c>=a?(c=-1,this.currentHeaderRowWithoutSpan=-1):void 0!==h&&(this.currentHeaderRowWithoutSpan=h),!(!g&&!u)&&o.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,o){const{focusSvc:i,gos:s}=this.beans,n={...i.focusedHeader};let r,a;-1!==this.currentHeaderRowWithoutSpan?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,"LEFT"===e!==s.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=s.getCallback("tabToNextHeader");if(t&&l){const e=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(e){const{headerRowIndex:e}=i.focusedHeader||{};null!=e&&e!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=e)}return e}return r||!t?i.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(n,a,o)}focusNextHeaderRow(e,t,o){const i=this.beans,s=e.headerRowIndex;let n,r=null;const a=getFocusHeaderRowCount(i),l=this.beans.visibleCols.allCols;if("Before"===t){if(s<=0)return!1;r=_last(l),n=s-1,this.currentHeaderRowWithoutSpan-=1}else r=l[0],n=s+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:d,headerRowIndex:c}=getHeaderIndexToFocus(this.beans,r,n);return c>=a&&(c=-1),i.focusSvc.focusHeaderPosition({headerPosition:{column:d,headerRowIndex:c},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(isColumnGroup(e)){const i=e.getDisplayedLeafColumns();o="Before"===t?_last(i):i[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){const{colGroupSvc:o,visibleCols:i}=this.beans;let s=e.column;if(s instanceof K){const e=s.getDisplayedLeafColumns();s="Before"===t?e[0]:e[e.length-1]}const n="Before"===t?i.getColBefore(s):i.getColAfter(s);if(!n)return;const r=i.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:n};const a=o?.getColGroupAtLevel(n,e.headerRowIndex);if(!a){return{headerRowIndex:n instanceof H&&n.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:n}}return a.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:a??n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}}],apiFunctions:{getFocusedCell:function getFocusedCell(e){return e.focusSvc.getFocusedCell()},clearFocusedCell:function clearFocusedCell(e){return e.focusSvc.clearFocusedCell()},setFocusedCell:function setFocusedCell(e,t,o,i){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:i,forceBrowserFocus:!0})},setFocusedHeader:function setFocusedHeader(e,t,o=!1){const i=e.headerNavigation?.getHeaderPositionForColumn(t,o);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})},tabToNextCell:function tabToNextCell(e,t){return e.navigation?.tabToNextCell(!1,t)??!1},tabToPreviousCell:function tabToPreviousCell(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}}},nn=class extends m{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[(this.isLeft?"left":"right")+"PinnedWidthChanged"]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const o of this.elements)o&&(_setDisplayed(o,t),_setFixedWidth(o,e))}},rn={moduleName:"PinnedColumn",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(e=>{this.gridBodyCtrl=e.gridBodyCtrl}));const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:o}=this.beans,i=_isDomLayout(e,"print"),s=i?0:t.getColsLeftWidth(),n=i?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,o.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=_getInnerWidth(this.gridBodyCtrl.eBodyViewport);if(e<=50)return;const t=this.getPinnedColumnsOverflowingViewport(e-50),o=this.gos.getCallback("processUnpinnedColumns"),{columns:i,hasLockedPinned:s}=t;let n=i;if(n.length||s){if(o){n=o({columns:n,viewportWidth:e})}n?.length&&(n=n.filter((e=>!isRowNumberCol(e))),this.setColsPinned(n,null,"viewportSizeFeature"))}}createPinnedWidthFeature(e,...t){return new nn(e,t)}setColsPinned(e,t,o){const{colModel:i,colAnimation:s,visibleCols:n,gos:r}=this.beans;if(!i.cols)return;if(!e?.length)return;if(_isDomLayout(r,"print"))return void _warn(37);let a;s?.start(),a=!0===t||"left"===t?"left":"right"===t?"right":null;const l=[];for(const t of e){if(!t)continue;const e=i.getCol(t);e&&(e.getPinned()!==a&&(this.setColPinned(e,a),l.push(e)))}l.length&&(n.refresh(o),dispatchColumnPinnedEvent(this.eventSvc,l,o)),s?.finish()}initCol(e){const{pinned:t,initialPinned:o}=e.colDef;void 0!==t?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){e.pinned=!0===t||"left"===t?"left":"right"===t?"right":null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(null==e.pinned)return;const o="left"===e.pinned,i="right"===e.pinned;e.hidden=!0;const listener=()=>{const s=o?this.leftWidth:this.rightWidth;if(null==s)return;const n=0==s,r=e.hidden!==n,a=this.gos.get("enableRtl"),l=t.getScrollbarWidth(),d=t.verticalScrollShowing&&(a&&o||!a&&i)?s+l:s;e.comp.setPinnedContainerWidth(`${d}px`),e.comp.setDisplayed(!n),r&&(e.hidden=n,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:listener,rightPinnedWidthChanged:listener,scrollVisibilityChanged:listener,scrollbarWidthChanged:listener})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:t,rightWidth:o}=this,i=_getInnerWidth(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(t+o+e>i){if(!(i>t+o))return 0;e=i-t-o}}return e}getPinnedColumnsOverflowingViewport(e){const t=(this.rightWidth??0)+(this.leftWidth??0);let o=!1;if(t<e)return{columns:[],hasLockedPinned:o};const{visibleCols:i}=this.beans,s=[...i.leftCols],n=[...i.rightCols];let r=0,a=0;const l=[];let d=t-0-e;for(;(a<s.length||r<n.length)&&d>0;){if(r<n.length){const e=n[r++];if(e.colDef.lockPinned){o=!0;continue}d-=e.getActualWidth(),l.push(e)}if(a<s.length&&d>0){const e=s[a++];if(e.colDef.lockPinned){o=!0;continue}d-=e.getActualWidth(),l.push(e)}}return{columns:l,hasLockedPinned:o}}}],css:[".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}"]},an=class extends p{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=_debounce(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=_getDocument(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),_setAriaLive(o,"polite"),function _setAriaRelevant(e,t){_toggleAriaAttribute(e,"relevant",t)}(o,"additions text"),function _setAriaAtomic(e,t){_toggleAriaAttribute(e,"atomic",t)}(o,!0),e.eRootDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout((()=>{this.handleAnnouncementUpdate(e)}),50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;null!=t&&""!=t.replace(/[ .]/g,"")?(this.lastAnnouncement===t&&(t=`${t}`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t):this.lastAnnouncement=""}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(_clearElement(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},ln={moduleName:"Aria",version:I,beans:[class extends an{}]},dn="ag-delay-render",cn={moduleName:"ColumnDelayRender",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,(e=>{e.gridBodyCtrl.eGridBody.classList.add(dn)})),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive())return;if(this.requesters.delete(e),this.requesters.size>0)return;const{renderStatus:t,ctrlsSvc:o}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5)return this.timesRetried++,void setTimeout((()=>this.revealColumns(e)));this.timesRetried=0}o.getGridBodyCtrl().eGridBody.classList.remove(dn),this.alreadyRevealed=!0}}],css:[":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}"]};var un={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},hn=class extends Se{constructor(){super(un),this.eOverlayWrapper=fe,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}")}handleKeyDown(e){if(e.key!==q||e.defaultPrevented||_isStopPropagationForAgGrid(e))return;const{beans:t,eOverlayWrapper:o}=this;if(o&&_findNextFocusableElement(t,o,!1,e.shiftKey))return;let i=!1;i=e.shiftKey?t.focusSvc.focusGridView({column:_last(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):_focusNextGridCoreContainer(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const o=this.eOverlayWrapper;if(!o)return;const i=o.classList,{AUTO_HEIGHT:s,NORMAL:n,PRINT:r}=Kt;i.toggle(s,t.autoHeight),i.toggle(n,t.normal),i.toggle(r,t.print)}postConstruct(){this.createManagedBean(new jt(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper?.classList;t?(this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)):this.activeCssClass=null}showOverlay(e,t,o){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=o,!e)return this.refreshWrapperPadding(),me.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),o&&this.isGridFocused()){const e=_getActiveDomElement(this.beans);e&&!_isNothingFocused(this.beans)&&(this.elToFocusAfter=e)}return e.then((t=>{const i=this.eOverlayWrapper;i?this.activePromise===e?(this.activePromise=null,t&&(this.activeOverlay!==t&&(i.appendChild(t.getGui()),this.activeOverlay=t),o&&this.isGridFocused()&&_focusInto(i))):this.activeOverlay!==t&&(this.destroyBean(t),t=null):this.destroyBean(t)})),e}refreshWrapperPadding(){if(!this.eOverlayWrapper)return void(this.oldWrapperPadding=null);let e=0;(!!this.activeOverlay||!!this.activePromise)&&!this.overlayExclusive&&(e=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),e!==this.oldWrapperPadding&&(this.oldWrapperPadding=e,this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`))}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return this.overlayExclusive=!1,this.elToFocusAfter=null,void this.refreshWrapperPadding();let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);const o=this.eOverlayWrapper;o&&_clearElement(o),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=_getActiveDomElement(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},gn={selector:"AG-OVERLAY-WRAPPER",component:hn},pn=["refresh"],overlayCompType=e=>({name:e,optionalMethods:pn}),mn={id:"agLoadingOverlay",overlayType:"loading",comp:overlayCompType("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{const t=e.get("loading");return!1===t||!0===e.get("suppressLoadingOverlay")&&!0!==t}},fn={id:"agNoRowsOverlay",overlayType:"noRows",comp:overlayCompType("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},Cn={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:overlayCompType("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},wn={id:"agExportingOverlay",overlayType:"exporting",comp:overlayCompType("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},vn={id:"activeOverlay",comp:overlayCompType("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},bn={moduleName:"Overlay",version:I,userComponents:{agLoadingOverlay:class extends yt{constructor(){super(...arguments),this.eLoadingIcon=fe,this.eLoadingText=fe}init(e){const{beans:t,gos:o}=this,i=_makeNull(o.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(i??Ft),!i){const o=_createIconNoSpan("overlayLoading",t,null);o&&this.eLoadingIcon.appendChild(o);const i=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}}},agNoRowsOverlay:class extends yt{init(e){const{beans:t,gos:o}=this,i=_makeNull(o.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(i??Pt),!i){const o=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}}},agNoMatchingRowsOverlay:class extends yt{init(e){const{beans:t}=this;this.setTemplate(Dt);const o=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}},agExportingOverlay:class extends yt{constructor(){super(...arguments),this.eExportingIcon=fe,this.eExportingText=fe}init(e){const{beans:t}=this;this.setTemplate(Rt);const o=_createIconNoSpan("overlayExporting",t,null);o&&this.eExportingIcon.appendChild(o);const i=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}}},apiFunctions:{showLoadingOverlay:function showLoadingOverlay(e){e.overlays?.showLoadingOverlay()},showNoRowsOverlay:function showNoRowsOverlay(e){e.overlays?.showNoRowsOverlay()},hideOverlay:function hideOverlay(e){e.overlays?.hideOverlay()}},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[class extends m{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){const e=this.gos;this.showInitialOverlay=_isClientSideRowModel(e);const updateOverlayVisibility=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[t,o,i,s]=this.addManagedEventListeners({newColumnsLoaded:updateOverlayVisibility,rowCountReady:()=>{this.disableInitialOverlay(),updateOverlayVisibility(),o()},rowDataUpdated:updateOverlayVisibility,modelUpdated:updateOverlayVisibility});this.newColumnsLoadedCleanup=t,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],(e=>this.onPropChange(new Set(e.changeSet?.properties))))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos;if(!this.eWrapper||e.get("activeOverlay"))return;if(this.isDisabled(mn))return;const t=e.get("loading");(t||void 0===t)&&this.doShowOverlay(mn)}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(fn)||(this.userForcedNoRows=!0,this.doShowOverlay(fn))}async showExportOverlay(e){const{gos:t,beans:o}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(wn)||this.userForcedNoRows&&this.currentDef===fn)return void e();const i=this.getDesiredDefWithOverride(wn);if(!i)return void e();this.exportsInProgress++,this.focusedCell=o.focusSvc.getFocusedCell(),await this.doShowOverlay(i),await new Promise((e=>setTimeout((()=>e()))));const s=Date.now();try{e()}finally{const e=Date.now()-s,t=Math.max(0,300-e),clearExportOverlay=()=>{this.exportsInProgress--,0===this.exportsInProgress&&(this.updateOverlay(!1),function _attemptToRestoreCellFocus(e,t){const o=e.focusSvc,i=o.getFocusedCell();if(i&&t&&_areCellsEqual(i,t)){const{rowIndex:i,rowPinned:s,column:n}=t;_isNothingFocused(e)&&o.setFocusedCell({rowIndex:i,column:n,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!_isKeyboardMode()})}}(o,this.focusedCell),this.focusedCell=null)};t>0?setTimeout((()=>clearExportOverlay()),t):clearExportOverlay()}}hideOverlay(){const e=this.gos;this.showInitialOverlay=!1;const t=this.userForcedNoRows;this.userForcedNoRows=!1,e.get("loading")?_warn(99):e.get("activeOverlay")?_warn(296):this.currentDef!==Cn?(this.doHideOverlay(),t&&this.getOverlayDef()!==fn&&this.updateOverlay(!1)):_warn(297)}getOverlayWrapperSelector(){return gn}getOverlayWrapperCompClass(){return hn}onPropChange(e){const t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;const o=this.currentDef,i=this.eWrapper?.activeOverlay;if(i&&o){const t=e.has("activeOverlayParams");if(o===vn)t&&i.refresh?.(this.makeCompParams(!0));else{const t=o.paramsKey;(e.has("overlayComponentParams")||t&&e.has(t))&&i.refresh?.(this.makeCompParams(!1,t,o.overlayType))}}}updateOverlay(e){const t=this.eWrapper;if(!t)return this.currentDef=null,!1;const o=this.getDesiredDefWithOverride(),i=this.currentDef,s=o===vn&&e;return o!==i?o?(this.doShowOverlay(o),!0):(this.disableInitialOverlay(),this.doHideOverlay()):s&&o?(t.hideOverlay(),this.doShowOverlay(o),!0):(o||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){const{gos:t}=this;let o=(i=t.get("activeOverlay"))?{agLoadingOverlay:mn,agNoRowsOverlay:fn,agNoMatchingRowsOverlay:Cn,agExportingOverlay:wn}[i]??vn:null;var i;return o||(o=e??this.getOverlayDef(),o&&this.isDisabled(o)&&(o=null)),o}getOverlayDef(){const{gos:e,beans:t}=this,{rowModel:o}=t,i=e.get("loading");if(void 0!==i){if(this.disableInitialOverlay(),i)return mn}else if(this.showInitialOverlay){if(!(this.isDisabled(mn)||e.get("columnDefs")&&e.get("rowData")))return mn;this.disableInitialOverlay()}else this.disableInitialOverlay();return(e=>e?{loading:mn,noRows:fn,noMatchingRows:Cn,exporting:wn}[e]:null)(o.getOverlayType())}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){const{gos:t,beans:o}=this,{userCompFactory:i}=o;this.currentDef=e;const s=e!==vn,n=!!e.exclusive;let r,a;this.exclusive=n,(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(r=e.paramsKey),s&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(a=i.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),a??(a=i.getCompDetailsFromGridOptions(e.comp,s?e.id:void 0,this.makeCompParams(!s,r,e.overlayType),!1));const l=a?.newAgStackInstance()??null,d=this.eWrapper?this.eWrapper.showOverlay(l,e.wrapperCls,n):me.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(n),d}makeCompParams(e,t,o){const{gos:i}=this,s=e?i.get("activeOverlayParams"):{...i.get("overlayComponentParams"),...t&&i.get(t)||null,overlayType:o};return _addGridCommonParams(i,s??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;const t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){const{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||!0===e.isSuppressed?.(t)}}]},Sn=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(e){if(null==e?.id)return null;const t=this.entriesMap[e.id];if(!t)return null;this.removeFromCache(t),t.setCached(!1);return t.rowNode!=e?null:t}has(e){return null!=this.entriesMap[e.id]}removeRow(e){const t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],_removeFromArray(this.entriesList,o)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],_removeFromArray(this.entriesList,e)}getEntries(){return this.entriesList}};function mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const o of e){const e=o.id;switch(o.rowPinned){case"top":t.top[e]=o;break;case"bottom":t.bottom[e]=o;break;default:t.normal[e]=o}}return t}function isRowInMap(e,t){const o=e.id;switch(e.rowPinned){case"top":return null!=t.top[o];case"bottom":return null!=t.bottom[o];default:return null!=t.normal[o]}}var defaultGetLeaf=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){const e=t[0];if(e.data)return e;t=e.childrenAfterGroup}},absoluteValueTransformer=e=>{if(!e)return e;if("bigint"==typeof e)return e<0n?-e:e;const t=Number(e);return isNaN(t)?e:Math.abs(t)};var makeIconParams=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),yn={tag:"span",cls:"ag-sort-indicator-container",children:[makeIconParams("Order","order"),makeIconParams("Asc","ascending-icon"),makeIconParams("Desc","descending-icon"),makeIconParams("Mixed","mixed-icon"),makeIconParams("AbsoluteAsc","absolute-ascending-icon"),makeIconParams("AbsoluteDesc","absolute-descending-icon"),makeIconParams("None","none-icon")]},Rn=class extends Se{constructor(e){super(),this.eSortOrder=fe,this.eSortAsc=fe,this.eSortDesc=fe,this.eSortMixed=fe,this.eSortNone=fe,this.eSortAbsoluteAsc=fe,this.eSortAbsoluteDesc=fe,e||this.setTemplate(yn)}attachCustomElements(e,t,o,i,s,n,r){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=s,this.eSortAbsoluteAsc=n,this.eSortAbsoluteDesc=r}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);const o=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",o),this.addManagedEventListeners({newColumnsLoaded:o,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,o){if(null==t)return;const i=_createIconNoSpan(e,this.beans,o);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:o,eSortAbsoluteDesc:i,eSortNone:s,column:n,gos:r,beans:a}=this,{isDefaultSortAllowed:l,isAbsoluteSortAllowed:d,isAbsoluteSort:c,isDefaultSort:u,isAscending:h,isDescending:g,direction:p}=function _getDisplaySortForColumn(e,t){const o=t.sortSvc.getDisplaySortForColumn(e),i=_normalizeSortType(o?.type),s=_normalizeSortDirection(o?.direction),n=e.getAvailableSortTypes();return{isDefaultSortAllowed:n.has("default"),isAbsoluteSortAllowed:n.has("absolute"),isAbsoluteSort:"absolute"===i,isDefaultSort:"default"===i,isAscending:"asc"===s,isDescending:"desc"===s,direction:s}}(n,a);if(e&&_setDisplayed(e,h&&u&&l,{skipAriaHidden:!0}),t&&_setDisplayed(t,g&&u&&l,{skipAriaHidden:!0}),s){_setDisplayed(s,!(!n.getColDef().unSortIcon&&!r.get("unSortIcon"))&&!p,{skipAriaHidden:!0})}o&&_setDisplayed(o,h&&c&&d,{skipAriaHidden:!0}),i&&_setDisplayed(i,g&&c&&d,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;_isColumnsSortingCoupledToGroup(o)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:o}=this;if(e){_setDisplayed(e,"mixed"===t.sortSvc.getDisplaySortForColumn(o)?.direction,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;const i=o.getColumnsWithSortingOrdered(),s=o.getDisplaySortIndexForColumn(t)??-1,n=i.some((e=>o.getDisplaySortIndexForColumn(e)??!1));_setDisplayed(e,s>=0&&n,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():_clearElement(e)}},Fn={selector:"AG-SORT-INDICATOR",component:Rn},Dn={moduleName:"Sort",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,o)}progressSortFromEvent(e,t){const o="ctrl"===this.gos.get("multiSortKey")?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,o,"uiColumnSorted")}setSortForColumn(e,t,o,i){const{gos:s,showRowGroupCols:n}=this.beans;let r=[e];if(_isColumnsSortingCoupledToGroup(s)&&e.getColDef().showRowGroup){const t=n?.getSourceColumnsForGroupColumn?.(e),o=t?.filter((e=>e.isSortable()));o&&(r=[e,...o])}for(const e of r)this.setColSort(e,t,i);const a=[];if(!((o||s.get("alwaysMultiSort"))&&!s.get("suppressMultiSort"))){const e=this.clearSortBarTheseColumns(r,i);a.push(...e)}this.updateSortIndex(e),a.push(...r),this.dispatchSortChangedEvents(i,a)}updateSortIndex(e){const{gos:t,colModel:o,showRowGroupCols:i}=this.beans,s=_isColumnsSortingCoupledToGroup(t),n=i?.getShowRowGroupCol(e.getId()),r=s&&n||e,a=this.getColumnsWithSortingOrdered();o.forAllCols((e=>this.setColSortIndex(e,null)));const l=a.filter((e=>(!s||!e.getColDef().showRowGroup)&&e!==r));(r.getSortDef()?[...l,r]:l).forEach(((e,t)=>this.setColSortIndex(e,t)))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols((t=>{if(t.getSortDef())return e=!0,!0})),e}dispatchSortChangedEvents(e,t){const o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){const o=[];return this.beans.colModel.forAllCols((i=>{e.includes(i)||(i.getSortDef()&&o.push(i),this.setColSort(i,void 0,t))})),o}getNextSortDirection(e){const t=e.getSortingOrder(),o=e.getSortDef();let i=t.findIndex((e=>_areSortDefsEqual(e,o)))+1;return i>=t.length&&(i=0),_getSortDefFromInput(t[i])}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:i}=this.beans;let s=[];if(t.forAllCols((e=>{e.getSortDef()&&s.push(e)})),t.isPivotMode()){const t=_isColumnsSortingCoupledToGroup(e);s=s.filter((e=>{const i=!!e.getAggFunc(),s=!e.isPrimary(),n=t?o?.getShowRowGroupCol(e.getId()):e.getColDef().showRowGroup;return i||s||n}))}const n=i?.columns.filter((e=>!!e.getSortDef()))??[],r={};s.forEach(((e,t)=>r[e.getId()]=t)),s.sort(((e,t)=>{const o=e.getSortIndex(),i=t.getSortIndex();if(null!=o&&null!=i)return o-i;if(null==o&&null==i){return r[e.getId()]>r[t.getId()]?1:-1}return null==i?-1:1}));const a=_isColumnsSortingCoupledToGroup(e)&&!!n.length;a&&(s=[...new Set(s.map((e=>o?.getShowRowGroupCol(e.getId())??e)))]);const l=new Map;if(s.forEach(((e,t)=>l.set(e,t))),a)for(const e of n){const t=o.getShowRowGroupCol(e.getId());l.set(e,l.get(t))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort((([,e],[,t])=>e-t)).map((([e])=>e))}collectSortItems(e=!1){const t=[],o=this.getColumnsWithSortingOrdered();for(const i of o){const o=i.getSortDef()?.direction;if(!o)continue;const s={sort:o,type:_normalizeSortType(i.getSortDef()?.type)};e?s.colId=i.getId():s.column=i,t.push(s)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){const t=_isColumnsSortingCoupledToGroup(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSortDef();const o=null!=e.getColDef().field||!!e.getColDef().valueGetter?[e,...t]:t,i=o[0].getSortDef();return o.every((e=>_areSortDefsEqual(e.getSortDef(),i)))?i:{type:_normalizeSortType(e.getSortDef()?.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){const refreshStyles=()=>{const{type:o,direction:i}=_getSortDefFromInput(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc","asc"===i),e.toggleCss("ag-header-cell-sorted-desc","desc"===i),e.toggleCss("ag-header-cell-sorted-abs-asc","absolute"===o&&"asc"===i),e.toggleCss("ag-header-cell-sorted-abs-desc","absolute"===o&&"desc"===i),e.toggleCss("ag-header-cell-sorted-none",!i),t.getColDef().showRowGroup){const o=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t),s=o?.every((e=>i==e.getSortDef()?.direction)),n=!s;e.toggleCss("ag-header-cell-sorted-mixed",n)}};e.addManagedEventListeners({sortChanged:refreshStyles,columnPinned:refreshStyles,columnRowGroupChanged:refreshStyles,displayedColumnsChanged:refreshStyles})}initCol(e){const{sortIndex:t,initialSortIndex:o}=e.colDef,i=_getSortDefFromColDef(e.colDef);i&&e.setSortDef(i,!0),void 0!==t?null!==t&&(e.sortIndex=t):null!==o&&(e.sortIndex=o)}updateColSort(e,t,o){void 0!==t&&this.setColSort(e,_getSortDefFromInput(t),o)}setColSort(e,t,o){_areSortDefsEqual(e.getSortDef(),t)||(e.setSortDef(_getSortDefFromInput(t),void 0===t),e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Rn(e)}getSortIndicatorSelector(){return Fn}},class extends m{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=_isClientSideRowModel(this.gos)?_csrmFirstLeaf:defaultGetLeaf,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));const e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=_isColumnsSortingCoupledToGroup(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort(((e,o)=>this.compareRowNodes(t,e,o)))}compareRowNodes(e,t,o){if(t===o)return 0;const i=this.accentedSort;for(let s=0,n=e.length;s<n;++s){const n=e[s],r="desc"===n.sort;let a,l=this.getValue(t,n.column),d=this.getValue(o,n.column);const c=this.getComparator(n,t);if(c?a=c(l,d,t,o,r):("absolute"===n.type&&(l=absoluteValueTransformer(l),d=absoluteValueTransformer(d)),a=_defaultComparator(l,d,i)),a)return"asc"===n.sort?a:-a}return 0}getComparator(e,t){const o=e.column.getColDef(),i=this.getComparatorFromColDef(o,e);if(i)return i;if(!o.showRowGroup)return;const s=!t.group&&o.field;if(!s)return;const n=this.beans.colModel.getColDefCol(s);return n?this.getComparatorFromColDef(n.getColDef(),e):void 0}getComparatorFromColDef(e,t){const o=e.comparator;if(null!=o)return"object"==typeof o?o[_normalizeSortType(t.type)]:o}getValue(e,t){const o=this.beans;if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.getColDef().showRowGroup)return}const i=o.valueSvc.getValue(t,e,"data");if(t.isAllowFormula()){const s=o.formula;if(s?.isFormula(i))return s.resolveValue(t,e)}return i}getGroupDataValue(e,t){if(_isGroupUseEntireRow(this.gos,this.pivotActive)){const o=this.firstLeaf(e);return o&&this.beans.valueSvc.getValue(t,o,"data")}const o=this.beans.showRowGroupCols?.getShowRowGroupCol(t.getId());return o?e.groupData?.[o.getId()]:void 0}}],apiFunctions:{onSortChanged:function onSortChanged(e){e.sortSvc?.onSortChanged("api")}},userComponents:{agSortIndicator:Rn},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},Pn={moduleName:"ValueCache",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,o){if(this.active){const i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=o}}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}}],apiFunctions:{expireValueCache:function expireValueCache(e){e.valueCache?.expire()}}},xn={moduleName:"Expression",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);_error(15,{expression:e})}evaluateExpression(e,t){try{const o=this.createExpressionFunction(e);return o(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(o){return _error(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const o=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",o);return t[e]=i,i}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}}]},En={moduleName:"ChangeDetection",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;_isClientSideRowModel(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:o}=this.beans;if("paste"===e.source||t.get("suppressChangeDetection"))return;const i=e.node,s=[i],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!i.isRowPinned()){const o=t.get("aggregateOnlyChangedColumns"),a=new Wo(o,r);a.addParentNode(i.parent,[e.column]),n.doAggregate(a),a.forEachChangedNodeDepthFirst((e=>{s.push(e),e.sibling&&s.push(e.sibling)}))}o.refreshCells({rowNodes:s})}}]},Mn={moduleName:"CellApi",version:I,apiFunctions:{getCellValue:function getCellValue(e,t){const{colKey:o,rowNode:i,useFormatter:s,from:n="edit"}=t,r=e.colModel.getColDefCol(o)??e.colModel.getCol(o);if(!r)return null;const a=e.valueSvc.getValueForDisplay({column:r,node:i,includeValueFormatted:s,from:n});return s?a.valueFormatted??_toString(a.value):a.value}}},Tn={moduleName:"CommunityCore",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),o.destroy(),super.destroy()}},class extends m{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new To,this.fns={...Mo,dispatchEvent},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Eo))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:o,beans:i}=this;o!==Mo&&(o[e]=i?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:o,preDestroyLink:i}=this;if(t){const t=Eo[e];o.assertModuleRegistered(t,`api.${e}`)&&_warn(27,{fnName:e,module:t})}else _warn(26,{fnName:e,preDestroyLink:i})}destroy(){super.destroy(),this.fns=Mo,this.beans=null}},class extends wi{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(null!=e)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:o,dynamicBeans:i,selectors:s}=e;if(o){const registerUserComponent=(e,t,o,i)=>{this.agGridDefaults[e]=t,(o||i)&&(this.agGridDefaultOverrides[e]={params:o,processParams:i})};for(const e of Object.keys(o)){let t=o[e];if("object"==typeof(n=t)&&n.getComp&&(t=t.getComp(this.beans)),"object"==typeof t){const{classImp:o,params:i,processParams:s}=t;registerUserComponent(e,o,i,s)}else registerUserComponent(e,t)}}var n;this.registerDynamicBeans(i);for(const e of s??[])this.selectors[e.selector]=e;if(t)for(const e of Object.keys(t))this.icons[e]=t[e]}getUserComponent(e,t){const createResult=(e,t,o,i)=>({componentFromFramework:t,component:e,params:o,processParams:i}),{frameworkOverrides:o}=this.beans,i=o.frameworkComponent(t,this.gos.get("components"));if(null!=i)return createResult(i,!0);const s=this.jsComps[t];if(s){return createResult(s,o.isFrameworkComponent(s))}const n=this.agGridDefaults[t];if(n){const e=this.agGridDefaultOverrides[t];return createResult(n,!1,e?.params,e?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?_errMsg(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??_errMsg(256)}},class extends m{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,o,i=!1){return this.getCompDetails(this.gridOptions,e,t,o,i)}getCompDetails(e,t,o,i,s=!1){const{name:n,cellRenderer:r}=t;let a,l,{compName:d,jsComp:c,fwComp:u,paramsFromSelector:h,popupFromSelector:g,popupPositionFromSelector:p}=_getUserCompKeys(this.beans.frameworkOverrides,e,t,i);const lookupFromRegistry=e=>{const t=this.registry.getUserComponent(n,e);t&&(c=t.componentFromFramework?void 0:t.component,u=t.componentFromFramework?t.component:void 0,a=t.params,l=t.processParams)};if(null!=d&&lookupFromRegistry(d),null==c&&null==u&&null!=o&&lookupFromRegistry(o),c&&r&&!function doesImplementIComponent(e){return!!e&&e.prototype&&"getGui"in e.prototype}(c)&&(c=this.agCompUtils?.adaptFunction(t,c)),!c&&!u){const{validation:e}=this.beans;return void(!s||d===o&&o?o&&!e&&_error(146,{comp:o}):d?e?.isProvidedUserComp(d)||_error(50,{compName:d}):o?e||_error(260,{...this.gos.getModuleErrorParams(),propName:n,compName:o}):_error(216,{name:n}))}const m=this.mergeParams(e,t,i,h,a,l),f=null==c,C=c??u;return{componentFromFramework:f,componentClass:C,params:m,type:t,popupFromSelector:g,popupPositionFromSelector:p,newAgStackInstance:()=>this.newAgStackInstance(C,f,m,t)}}newAgStackInstance(e,t,o,i){let s;s=!t?new e:this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(s);const n=s.init?.(o);return null==n?me.resolve(s):n.then((()=>s))}mergeParams(e,t,o,i=null,s,n){const r={...o,...s},a=e?.[t.name+"Params"];if("function"==typeof a){_mergeDeep(r,a(o))}else"object"==typeof a&&_mergeDeep(r,a);return _mergeDeep(r,i),n?n(r):r}},class extends m{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=function _getMaxDivHeight(){if(void 0!==Ze)return Ze;if(!document.body)return-1;let e=1e6;const t=_isBrowserFirefox()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){const i=2*e;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return o.remove(),Ze=e,e}(),_logIfDebug(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;_logIfDebug(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=e/(this.modelHeight-this.getUiBodyHeight());return this.maxScrollY*t}},class extends m{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:o,colModel:i,colGroupSvc:s,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(i,s),s?.updateOpenClosedVisibility(),this.leftCols=pickDisplayedCols(this.treeLeft),this.centerCols=pickDisplayedCols(this.treeCenter),this.rightCols=pickDisplayedCols(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter((e=>e.isAutoHeight())),o?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){const t=o.getProvidedColumnGroup().getLevel()+1;t>e&&(e=t);break}o=o.getParent()}}return e}updateBodyWidths(){const e=getWidthOfColsInList(this.centerCols),t=getWidthOfColsInList(this.leftCols),o=getWidthOfColsInList(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e;(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,i){let s,n;this.gos.get("enableRtl")?(s=t?t[0]:null,n=o?_last(o):null):(s=t?_last(t):null,n=o?o[0]:null);for(const t of e.getCols())t.setLastLeftPinned(t===s,i),t.setFirstRightPinned(t===n,i)}buildTrees(e,t){const o=e.getColsToShow(),i=o.filter((e=>"left"==e.getPinned())),s=o.filter((e=>"right"==e.getPinned())),n=o.filter((e=>"left"!=e.getPinned()&&"right"!=e.getPinned())),r=new si,createGroups=e=>t?t.createColumnGroups(e):e.columns;this.treeLeft=createGroups({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=createGroups({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=createGroups({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),o=[],i=[],s=[];for(const e of t){const t=e.getPinned();t?!0===t||"left"===t?o.push(e):s.push(e):i.push(e)}this.ariaOrderColumns=o.concat(i).concat(s)}getAriaColIndex(e){let t;return t=isColumnGroup(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)if(isColumnGroup(t)){t.checkLeft()}}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const o=t.getCols().slice(0),i=this.gos.get("enableRtl");for(const t of[this.leftCols,this.rightCols,this.centerCols]){if(i){let o=getWidthOfColsInList(t);for(const i of t)o-=i.getActualWidth(),i.setLeft(o,e)}else{let o=0;for(const i of t)i.setLeft(o,e),o+=i.getActualWidth()}_removeAllFromUnorderedArray(o,t)}for(const t of o)t.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){const s=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,d=Math.min(a.getColSpan(e),l),c=[a];if(d>1){const e=d-1;for(let o=1;o<=e;o++)c.push(t[r+o]);r+=e}let u;if(o){u=!1;for(const e of c)o(e)&&(u=!0)}else u=!0;if(u){if(0===s.length&&n){!!i&&i(a)&&s.push(n)}s.push(a)}n=a}return s}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,o=t.indexOf(e);return o>0?t[o-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const func=e=>{this.colsAndGroupsMap[e.getUniqueId()]=e};depthFirstAllColumnTreeSearch(this.treeCenter,!1,func),depthFirstAllColumnTreeSearch(this.treeLeft,!1,func),depthFirstAllColumnTreeSearch(this.treeRight,!1,func)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o<t.length;o++){const i=this[t[o]];if(i.length)return e?_last(i):i[0]}return null}getColAfter(e){const t=this.allCols,o=t.indexOf(e);return o<t.length-1?t[o+1]:null}getColsLeftWidth(){return getWidthOfColsInList(this.leftCols)}getDisplayedColumnsRightWidth(){return getWidthOfColsInList(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const i="first"===t;let s;if(isColumnGroup(e)){const t=e.getDisplayedLeafColumns();if(!t.length)return!1;s=i?t[0]:_last(t)}else s=e;return(i?o[0]:_last(o))===s}},class extends Ss{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}},class extends m{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=Vs++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new s,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;const i=Rs.has(t);if(i&&!e||!i&&e)return;if(!function isPublicEventHandler(e){return!!Fs[e]}(t))return;const fireEvent=(e,t)=>{const o=Fs[e],i=this.gridOptions[o];"function"==typeof i&&this.beans.frameworkOverrides.wrapOutgoing((()=>i(t)))};if(this.gridReadyFired)fireEvent(t,o);else if("gridReady"===t){fireEvent(t,o),this.gridReadyFired=!0;for(const e of this.queueEvents)fireEvent(e.eventName,e.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:o})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??y[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return _exists(this.gridOptions[e])}mergeGridCommonParams(e){if(e){return t=>e(this.addCommon(t))}return e}updateGridOptions({options:e,force:t,source:o="api"}){const i={id:Ns++,properties:[]},s=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=S.applyGlobalGridOption(a,e[a]);r?.warnOnInitialPropertyUpdate(o,a);const d=t||"object"==typeof l&&"api"===o,c=n[a];if(d||c!==l){n[a]=l;const e={type:a,currentValue:l,previousValue:c,changeSet:i,source:o};s.push(e)}}this.validateGridOptions(this.gridOptions),i.properties=s.map((e=>e.type));for(const e of s)_logIfDebug(this,`Updated property ${e.type} from`,e.previousValue," to ",e.currentValue),this.propEventSvc.dispatchEvent(e)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const o of Object.keys(e)){const i=e[o];if(null==i||!1===i)continue;let s=t[o];"function"==typeof s&&(s=s(e,this.gridOptions,this.beans)),s&&this.assertModuleRegistered(s,o)}}validateGridOptions(e){this.validateOptions(e,Gs),this.validation?.processGridOptions(e)}validateColDef(e,t,o){!o&&this.beans.dataTypeSvc?.isColPendingInference(t)||(this.validateOptions(e,Ps),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const o=Array.isArray(e)?e.some((e=>this.isModuleRegistered(e))):this.isModuleRegistered(e);return o||_error(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:_areModulesGridScoped(),rowModelType:this.get("rowModelType"),isUmd:_isUmd()}}isModuleRegistered(e){return _isModuleRegistered(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[Os]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const e=t[Os];if(_exists(e)){return e===this.instanceId}t=t.parentElement}return!1}},class extends m{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],(e=>this.refreshAll(_convertColumnEventSourceType(e.source)))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",(e=>this.setPivotMode(this.gos.get("pivotMode"),_convertColumnEventSourceType(e.source))))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:d}=t,c=this.colDefs?_compareColumnStatesAndDispatchEvents(t,e):void 0;o?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=_createColumnTree(t,this.colDefs,!0,h,e);_destroyColumnTree(t,this.colDefCols?.tree,g.columnTree);const p=g.columnTree,m=g.treeDepth,f=_getColumnsFromTree(p),C={};for(const e of f)C[e.getId()]=e;this.colDefCols={tree:p,treeDepth:m,list:f,map:C},this.createColumnsForService([d],this.colDefCols,e),s?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),"gridInitializing"===e&&i?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const o=this.cols?.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:n,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:d,visibleCols:c,colViewport:u,eventSvc:h,formula:g}=this.beans,p=this.selectCols(a,this.colDefCols);g?.setFormulasActive(p),this.createColumnsForService([i,s,n],p,t);const m=function _shouldMaintainColumnOrder(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}(this.gos,this.showingPivotResult);e&&!m||this.restoreColOrder(p),this.positionLockedCols(p),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),d?.setAutoHeightActive(p),c.clear(),u.clear(),_areEqual(o,this.cols.tree)||h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,o){for(const i of e)i&&(i.createColumns(t,(e=>{this.lastOrder=e(this.lastOrder),this.lastPivotOrder=e(this.lastPivotOrder)}),o),i.addColumns(t))}selectCols(e,t){const o=e?.getPivotResultCols()??null;this.showingPivotResult=null!=o;const{map:i,list:s,tree:n,treeDepth:r}=o??t;if(this.cols={list:s.slice(),map:{...i},tree:n.slice(),treeDepth:r},o){o.list.some((e=>void 0!==this.cols?.map[e.getColId()]))||(this.lastPivotOrder=null)}return this.cols}getColsToShow(){if(!this.cols)return[];const{beans:e,showingPivotResult:t,cols:o}=this,{valueColsSvc:i,selectionColSvc:s}=e,n=this.isPivotMode()&&!t,r=s?.isSelectionColumnEnabled(),a=function _isRowNumbers({gos:e,formula:t}){const o=e.get("rowNumbers");return o||!!t?.active&&!1!==o}(e),l=i?.columns;return o.list.filter((e=>{const t=isColumnGroupAutoCol(e);if(n){const o=l?.includes(e);return t||o||r&&isColumnSelectionCol(e)||a&&isRowNumberCol(e)}return t||e.isVisible()}))}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){_applyColumnState(this.beans,{state:e.map((e=>({colId:"string"==typeof e?e:e.getColId(),hide:!t})))},o)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const o=t.filter((t=>null!=e.map[t.getId()]));if(0===o.length)return;if(o.length===e.list.length)return void(e.list=o);const hasSiblings=e=>{const t=e.getOriginalParent();if(!t)return!1;return t.getChildren().length>1||hasSiblings(t)};if(!o.some((e=>hasSiblings(e)))){const t=new Set(o);for(const i of e.list)t.has(i)||o.push(i);return void(e.list=o)}const i=new Map;for(let e=0;e<o.length;e++){const t=o[e];i.set(t,e)}const s=e.list.filter((e=>!i.has(e)));if(0===s.length)return void(e.list=o);const getPreviousSibling=(e,t)=>{const o=t?t.getOriginalParent():e.getOriginalParent();if(!o)return null;let s=null,n=null;for(const r of o.getChildren())if(r!==t&&r!==e)if(r instanceof H){const e=i.get(r);if(null==e)continue;(null==s||s<e)&&(s=e,n=r)}else r.forEachLeafColumn((e=>{const t=i.get(e);null!=t&&(null==s||s<t)&&(s=t,n=e)}));return null==n?getPreviousSibling(e,o):n},n=[],r=new Map;for(const e of s){const t=getPreviousSibling(e,null);if(null==t){n.push(e);continue}const o=r.get(t);void 0===o?r.set(t,e):Array.isArray(o)?o.push(e):r.set(t,[o,e])}const a=new Array(e.list.length);let l=a.length-1;for(let e=n.length-1;e>=0;e--)a[l--]=n[e];for(let e=o.length-1;e>=0;e--){const t=o[e],i=r.get(t);if(i)if(Array.isArray(i))for(let e=i.length-1;e>=0;e--){const t=i[e];a[l--]=t}else a[l--]=i;a[l--]=t}e.list=a}positionLockedCols(e){e.list=placeLockedColumns(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some((e=>null!=e.getColDef().colSpan))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode)return;if(this.pivotMode=e,!this.ready)return;this.refreshCols(!1,t);const{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=_convertColumnEventSourceType(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){_destroyColumnTree(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:o,selectionColSvc:i,groupHierarchyColSvc:s}=this.beans;_forAll(this.colDefCols?.list,e)||_forAll(o?.columns?.list,e)||_forAll(i?.columns?.list,e)||_forAll(s?.columns?.list,e)||_forAll(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map((e=>this.getCol(e))).filter((e=>null!=e)):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return null==e?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(null==t)return null;const{map:o,list:i}=t;if("string"==typeof e&&o[e])return o[e];for(let t=0;t<i.length;t++)if(_columnsMatch(i[t],e))return i[t];const{autoColSvc:s,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return s?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},class extends m{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return e&&t?Math.max(t.rowTop+t.rowHeight-e.rowTop,0):0}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this;return{pageFirstPixel:e?.rowTop??0,pageLastPixel:t?t.rowTop+t.rowHeight:0}}calculateBounds(e,t){const{rowModel:o}=this.beans,i=o.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const s=o.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},class extends m{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},class extends m{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const onCellSelectionChanged=()=>{for(const e of this.getAllCellCtrls())e.onCellSelectionChanged()},onColumnMovedPinnedVisible=()=>{for(const e of this.getAllCellCtrls())e.updateRangeBordersIfRangeCount()},addCellSelectionListeners=()=>{this.eventSvc.addListener("cellSelectionChanged",onCellSelectionChanged),this.eventSvc.addListener("columnMoved",onColumnMovedPinnedVisible),this.eventSvc.addListener("columnPinned",onColumnMovedPinnedVisible),this.eventSvc.addListener("columnVisible",onColumnMovedPinnedVisible)},removeCellSelectionListeners=()=>{this.eventSvc.removeListener("cellSelectionChanged",onCellSelectionChanged),this.eventSvc.removeListener("columnMoved",onColumnMovedPinnedVisible),this.eventSvc.removeListener("columnPinned",onColumnMovedPinnedVisible),this.eventSvc.removeListener("columnVisible",onColumnMovedPinnedVisible)};this.addDestroyFunc((()=>removeCellSelectionListeners())),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],(()=>{_isCellSelectionEnabled(this.gos)?addCellSelectionListeners():removeCellSelectionListeners()}));_isCellSelectionEnabled(this.gos)&&addCellSelectionListeners()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()}))}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],(()=>this.onDomLayoutChanged())),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],(()=>this.redraw())),this.addManagedPropertyListener("suppressCellFocus",(e=>this.onSuppressCellFocusChanged(e.currentValue))),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],(()=>this.redrawRows())),this.addManagedPropertyListener("cellSelection",(({currentValue:e,previousValue:t})=>{(!t&&e||t&&!e)&&this.redrawRows()}));const{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",(()=>{const e=o.columns;e.length&&this.refreshCells({columns:e,force:!0})})),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const e=this.gridBodyCtrl;e.setStickyTopHeight(0),e.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=_isDomLayout(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=null!=e?e:3;this.cachedRowCtrls=new Sn(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=this.cachedRowCtrls?.getEntries()??[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){const o=this.rowCtrlsByRowIndex[e];if(!t||!o)return!!o;if(o.isFullWidth())return!0;const i=this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null});return!!i||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(null!=e?.rowIndex&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const o of this.getAllCellCtrls())t.onFlashCells(o,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const forEachCellWithThisCol=e=>{for(const o of this.getAllCellCtrls())o.column===t&&e(o)},leftChangedListener=()=>{forEachCellWithThisCol((e=>e.onLeftChanged()))},widthChangedListener=()=>{forEachCellWithThisCol((e=>e.onWidthChanged()))},firstRightPinnedChangedListener=()=>{forEachCellWithThisCol((e=>e.onFirstRightPinnedChanged()))},lastLeftPinnedChangedListener=()=>{forEachCellWithThisCol((e=>e.onLastLeftPinnedChanged()))},colDefChangedListener=()=>{forEachCellWithThisCol((e=>e.onColDefChanged()))};t.__addEventListener("leftChanged",leftChangedListener),t.__addEventListener("widthChanged",widthChangedListener),t.__addEventListener("firstRightPinnedChanged",firstRightPinnedChangedListener),t.__addEventListener("lastLeftPinnedChanged",lastLeftPinnedChangedListener),t.__addEventListener("colDefChanged",colDefChangedListener),this.destroyFuncsForColumnListeners.push((()=>{t.__removeEventListener("leftChanged",leftChangedListener),t.__removeEventListener("widthChanged",widthChangedListener),t.__removeEventListener("firstRightPinnedChanged",firstRightPinnedChangedListener),t.__removeEventListener("lastLeftPinnedChanged",lastLeftPinnedChangedListener),t.__removeEventListener("colDefChanged",colDefChangedListener)}))}}onDomLayoutChanged(){const e=_isDomLayout(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const o of this.getAllRowCtrls()){const i=o.getCellCtrl(e,!0)?.eGui;i&&t.push(i)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,o){const{pinnedRowModel:i,beans:s,printLayout:n}=this,r=Object.fromEntries(e.map((e=>[e.rowNode.id,e])));i?.forEachPinnedRow(t,((a,l)=>{const d=e[l];d&&void 0===i.getPinnedRowById(d.rowNode.id,t)&&(d.destroyFirstPass(),d.destroySecondPass()),a.id in r&&o?(e[l]=r[a.id],delete r[a.id]):e[l]=new on(a,s,!1,!1,n)}));const a=("top"===t?i?.getPinnedTopRowCount():i?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else{if(this.cachedRowCtrls?.has(e))return void this.cachedRowCtrls.removeRow(e);{const destroyAndRecreateCtrl=t=>{const o=t[e.rowIndex];o&&o.rowNode===e&&(o.destroyFirstPass(),o.destroySecondPass(),t[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":destroyAndRecreateCtrl(this.topRowCtrls);break;case"bottom":destroyAndRecreateCtrl(this.bottomRowCtrls);break;default:destroyAndRecreateCtrl(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"}));if(null!=e){for(const t of e??[])this.redrawRow(t,!0);this.dispatchDisplayedRowsChanged(!1)}else this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const o=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&_isAnimateRows(this.gos),s=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const e=n.extraTopHeight+n.extraBottomHeight;e&&this.updateContainerHeights(e)}this.recycleRows(s,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?o:void 0),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout)return void t.setModelHeight(null);let o=this.pageBounds.getCurrentPageHeight();0===o&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(_errMsg(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,o=this.findPositionToFocus(e);o?e.rowIndex===o.rowIndex&&e.rowPinned==o.rowPinned?t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(_addGridCommonParams(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"})):t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0}):t.focusHeaderPosition({headerPosition:{headerRowIndex:getFocusHeaderRowCount(this.beans)-1,column:e.column}})}findPositionToFocus(e){const{pagination:t,pageBounds:o}=this.beans;let i=e;for(null==i.rowPinned&&t&&o&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:o.getFirstRow()});i;){if(null==i.rowPinned&&o)if(i.rowIndex<o.getFirstRow()){if(i=_getRowAbove(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>o.getLastRow()&&(i={rowPinned:null,rowIndex:o.getLastRow()});const t=this.getRowByPosition(i);if(t?.isAlive())return{...t.getRowPosition(),column:e.column};i=_getRowAbove(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),o=t.length;for(let i=0;i<o;i++){const o=t[i].getAllCellCtrls(),s=o.length;for(let t=0;t<s;t++)e.push(o[t])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),o=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...o,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,o){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,o)}refreshCells({rowNodes:e,columns:t,force:o,suppressFlash:i}={}){const s={force:o,newData:!1,suppressFlash:i};for(const o of this.getCellCtrls(e,t))o.refreshOrDestroyCell(s);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const o of this.getRowCtrls(e)){if(!o.isFullWidth())continue;o.refreshFullWidth()||(t=!0,this.redrawRow(o.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=mapRowNodes(e),o=this.getAllRowCtrls();return e&&t?o.filter((e=>isRowInMap(e.rowNode,t))):o}getCellCtrls(e,t){let o;_exists(t)&&(o={},t.forEach((e=>{const t=this.colModel.getCol(e);_exists(t)&&(o[t.getId()]=!0)})));const i=[];for(const t of this.getRowCtrls(e))for(const e of t.getAllCellCtrls()){const t=e.column.getId();o&&!o[t]||i.push(e)}return i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const t of Object.keys(this.rowCtrlsByRowIndex)){null==this.rowCtrlsByRowIndex[t].rowNode.id&&e.push(t)}this.removeRowCtrls(e);const t={};for(const e of Object.values(this.rowCtrlsByRowIndex)){t[e.rowNode.id]=e}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const o of e){const e=this.rowCtrlsByRowIndex[o];e&&(e.destroyFirstPass(t),e.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]}}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:i}=e;let s;const n=this.stickyRowFeature;n&&(s=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const e=n.extraTopHeight+n.extraBottomHeight;e&&this.updateContainerHeights(e)}const d=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if((!i||l||d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),null!=s)){const e=t?.getFocusCellToUseAfterRefresh();null!=s&&null==e&&(o?.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const o={};for(const t of e)o[t]=!0;const i=Object.keys(this.rowCtrlsByRowIndex).filter((e=>!o[e]));this.removeRowCtrls(i,t)}calculateIndexesToDraw(e){const t=[];for(let e=this.firstRenderedRow;e<=this.lastRenderedRow;e++)t.push(e);const o=this.beans.pagination,i=this.beans.focusSvc?.getFocusedCell()?.rowIndex;null!=i&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!o||o.isRowInPage(i))&&i<this.rowModel.getRowCount()&&t.push(i);const checkRowToDraw=e=>{const o=e.rowNode.rowIndex;null!=o&&o!==i&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(e)&&t.push(o)};for(const e of Object.values(this.rowCtrlsByRowIndex))checkRowToDraw(e);if(e)for(const t of Object.values(e))checkRowToDraw(t);t.sort(((e,t)=>e-t));const s=[];for(let e=0;e<t.length;e++){const o=t[e],i=this.rowModel.getRow(o);i&&!i.sticky&&s.push(o)}return s}recycleRows(e,t=!1,o=!1){const i=this.calculateIndexesToDraw(e);(this.printLayout||o)&&(t=!1),this.removeRowCompsNotToDraw(i,!t);for(const s of i)this.createOrUpdateRowCtrl(s,e,t,o);if(e){const{animationFrameSvc:i}=this.beans;i?.active&&o&&!this.printLayout?i.addDestroyTask((()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),o=e.isPinningRight();(this.pinningLeft!==t||o!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=o,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const o=t.rowNode.rowIndex;e.push(o.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=mapRowNodes(e);return this.getAllRowCtrls().filter((e=>{if(!e.isFullWidth())return!1;const o=e.rowNode;return!(null!=t&&!isRowInMap(o,t))}))}createOrUpdateRowCtrl(e,t,o,i){let s,n=this.rowCtrlsByRowIndex[e];n||(s=this.rowModel.getRow(e),_exists(s)&&_exists(t)&&t[s.id]&&s.alreadyRendered&&(n=t[s.id],t[s.id]=null));if(!n){if(s||(s=this.rowModel.getRow(e)),!_exists(s))return;n=this.createRowCon(s,o,i)}s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n}destroyRowCtrls(e,t){const o=[];if(e)for(const i of Object.values(e))if(i)if(this.cachedRowCtrls&&i.isCacheable())this.cachedRowCtrls.addRow(i);else if(i.destroyFirstPass(!t),t){const e=i.instanceId;this.zombieRowCtrls[e]=i,o.push((()=>{i.destroySecondPass(),delete this.zombieRowCtrls[e]}))}else i.destroySecondPass();t&&(o.push((()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())})),window.setTimeout((()=>{for(const e of o)e()}),400))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*_getRowHeightAsNumber(this.beans)}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;let i,s;if(e.updateOffset(),o.isRowsToRender())if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),s=t.getLastRow();else{const n=this.getRowBufferInPixels(),r=this.ctrlsSvc.getScrollFeature(),a=this.gos.get("suppressRowVirtualisation");let l,d,c=!1;do{const o=t.getPixelOffset(),{pageFirstPixel:i,pageLastPixel:s}=t.getCurrentPagePixelRange(),u=e.divStretchOffset,h=r.getVScrollPosition(),g=h.top,p=h.bottom;a?(l=i+u,d=s+u):(l=Math.max(g+o-n,i)+u,d=Math.min(p+o+n,s)+u),this.firstVisibleVPixel=Math.max(g+o,i)+u,this.lastVisibleVPixel=Math.min(p+o,s)+u,c=this.ensureAllRowsInRangeHaveHeightsCalculated(l,d)}while(c);let u=o.getRowIndexAtPixel(l),h=o.getRowIndexAtPixel(d);const g=t.getFirstRow(),p=t.getLastRow();u<g&&(u=g),h>p&&(h=p),i=u,s=h}else i=0,s=-1;const n=_isDomLayout(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&s-i>a&&(s=i+a);const l=i!==this.firstRenderedRow,d=s!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=i,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,_requestAnimationFrame(this.beans,(()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})})))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const o=this.pinnedRowModel?.ensureRowHeightsValid(),i=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:s,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(r||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),!!(i||r||o)&&(this.updateContainerHeights(),!0)}doNotUnVirtualiseRow(e){const t=e.rowNode,o=this.focusSvc.isRowFocused(t.rowIndex,t.rowPinned),i=this.editSvc?.isEditing(e),s=t.detail;if(!(o||i||s))return false;return!!this.isRowPresent(t)}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&(this.beans.pagination?.isRowInPage(e.rowIndex)??!0)}createRowCon(e,t,o){const i=this.cachedRowCtrls?.getRow(e)??null;if(i)return i;const s=o&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new on(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map((e=>e.rowNode));return[...this.getStickyTopRowCtrls().map((e=>e.rowNode)),...e,...this.getStickyBottomRowCtrls().map((e=>e.rowNode))]}getRowByPosition(e){let t;const{rowIndex:o}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[o];break;case"bottom":t=this.bottomRowCtrls[o];break;default:t=this.rowCtrlsByRowIndex[o],t||(t=this.getStickyTopRowCtrls().find((e=>e.rowNode.rowIndex===o))||null,t||(t=this.getStickyBottomRowCtrls().find((e=>e.rowNode.rowIndex===o))||null))}return t}isRangeInRenderedViewport(e,t){if(null==e||null==t)return!1;const o=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!o}},class extends m{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc}postConstruct(){this.initialised||this.init()}init(){const{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=_isServerSideRowModel(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;const listener=e=>this.callColumnCellValueChangedHandler(e);this.eventSvc.addListener("cellValueChanged",listener,!0),this.addDestroyFunc((()=>this.eventSvc.removeListener("cellValueChanged",listener,!0))),this.addManagedPropertyListener("treeData",(e=>this.isTreeData=e.currentValue))}getValueForDisplay(e){const t=this.beans,o=e.column,i=e.node,s=t.showRowGroupColValueSvc,n=!o&&i.group,r=o?.colDef.showRowGroup,a=!this.isTreeData||i.footer;if(s&&a&&(n||r)){const t=s.getGroupValue(i,o,this.displayIgnoresAggData(i));return null==t?{value:null,valueFormatted:null}:{value:t.value,valueFormatted:e.includeValueFormatted?s.formatAndPrefixGroupColValue(t,o,e.exporting):null}}if(!o)return{value:i.key,valueFormatted:null};let l=this.getValue(o,i,e.from,this.displayIgnoresAggData(i)),d=l;const c=t.formula;o.isAllowFormula()&&c?.isFormula(l)&&(e.useRawFormula?(l=c.normaliseFormula(l,!0),d=c.resolveValue(o,i)):(l=c.resolveValue(o,i),d=l));return{value:l,valueFormatted:e.includeValueFormatted&&!(e.exporting&&!1===o.colDef.useValueFormatterForExport)?this.formatValue(o,i,d):null}}getValue(e,t,o,i=!1){if(this.initialised||this.init(),!t)return;const s=e.getColDef();if(!t.group){const t=s.pivotValueColumn;t&&(e=t)}const n=this.editSvc?.getPendingEditValue(t,e,o);if(void 0!==n)return n;const r=s.showRowGroup;if("string"==typeof r){if((this.beans.rowGroupColsSvc?.getColumnIndex(r)??-1)>t.level)return null}let a=this.resolveValue(e,t,i);if(this.cellExpressions&&_isExpressionString(a)){const o=a.substring(1);a=this.executeValueGetter(o,t.data,e,t)}return a}getFormulaFromDataSource(e,t){const o=this.formulaDataSvc;if(!o?.hasDataSource()||!e.isAllowFormula())return;const i=o.getFormula({column:e,rowNode:t});return _isExpressionString(i)?i:void 0}displayIgnoresAggData(e){return!(!e.group||!e.expanded||e.footer)&&((!e.leafGroup||!this.colModel.isPivotMode())&&(!!e.sibling&&!this.gos.get("groupSuppressBlankHeader")))}resolveValue(e,t,o){const i=e.getColDef(),s=e.getColId(),n=this.isTreeData,r=this.getFormulaFromDataSource(e,t);if(void 0!==r)return r;const a=!o&&t.aggData&&void 0!==t.aggData[s];if(n&&a)return t.aggData[s];const l=t.data,d=i.field;if(n&&i.valueGetter)return this.executeValueGetter(i.valueGetter,l,e,t);if(n&&d&&l)return _getValueUsingField(l,d,e.isFieldContainsDots());const c=t.groupData;if(c&&s in c)return t.groupData[s];if(a)return t.aggData[s];const u=i.showRowGroup,h="string"!=typeof u||!t.group,g=this.isSsrm&&o&&!!i.aggFunc,p=this.isSsrm&&t.footer&&t.field&&(!0===u||u===t.field);if(i.valueGetter&&!g){if(!h)return;return this.executeValueGetter(i.valueGetter,l,e,t)}if(p)return _getValueUsingField(l,t.field,e.isFieldContainsDots());if(d&&l&&!g){if(!h)return;return _getValueUsingField(l,d,e.isFieldContainsDots())}}parseValue(e,t,o,i){const s=e.getColDef();if(s.allowFormula&&this.beans.formula?.isFormula(o))return o;const n=s.valueParser;if(_exists(n)){const r=_addGridCommonParams(this.gos,{node:t,data:t?.data,oldValue:i,newValue:o,colDef:s,column:e});return"function"==typeof n?n(r):this.expressionSvc?.evaluate(n,r)}return o}getDeleteValue(e,t){return _exists(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value)??null:null}formatValue(e,t,o,i,s=!0){const{expressionSvc:n}=this.beans;let r,a=null;const l=e.getColDef();if(i?r=i:s&&(r=l.valueFormatter),r){const i=t?t.data:null,s=_addGridCommonParams(this.gos,{value:o,node:t,data:i,colDef:l,column:e});a="function"==typeof r?r(s):n?n.evaluate(r,s):null}else if(l.refData)return l.refData[o]||"";return null==a&&Array.isArray(o)&&(a=o.join(", ")),a}setValue(e,t,o,i){const s=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,s)&&(e.data={}),!this.isSetValueSupported({column:t,newValue:o,colDef:s}))return!1;const n=this.getValue(t,e,"data"),r=_addGridCommonParams(this.gos,{node:e,data:e.data,oldValue:n,newValue:o,colDef:s,column:t}),a=e.group?s.groupRowValueSetter:void 0;let l=!1,d=!1;if(e.data){const n=this.handleExternalFormulaChange({column:t,eventSource:i,newValue:o,setterParams:r,rowNode:e});if(null!==n)return n;l=this.computeValueChange({column:t,rowNode:e,newValue:o,params:r,rowData:e.data,valueSetter:s.valueSetter,field:s.field})??!0}if(a){d=a(_addGridCommonParams(this.gos,{node:e,data:e.data,oldValue:n,newValue:o,colDef:s,column:t,eventSource:i,valueChanged:l||o!==n,aggregatedChildren:this.beans.aggStage?.getAggregatedChildren(e,t)??[]}))??!0}return!(!l&&!d)&&this.finishValueChange(e,t,r,i)}canCreateRowNodeData(e,t){return!e.group||null==t.groupRowValueSetter&&null==t.groupRowEditable&&!t.pivotValueColumn}finishValueChange(e,t,o,i){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const s=this.getValue(t,e,"data");return this.dispatchCellValueChangedEvent(e,o,s,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,o,s,i),!0}isSetValueSupported(e){const{column:t,newValue:o,colDef:i}=e,{field:s,valueSetter:n}=i,r=this.beans.formula,a=t.isAllowFormula()&&r?.isFormula(o),l=!!this.formulaDataSvc?.hasDataSource();return!_missing(s)||!_missing(n)||l&&a?!(this.dataTypeSvc&&!this.dataTypeSvc.checkType(t,o))||(_warn(135),!1):(_warn(17),!1)}handleExternalFormulaChange(e){const{column:t,rowNode:o,newValue:i,eventSource:s,setterParams:n}=e,r=this.beans.formula,a=this.formulaDataSvc;if(!a?.hasDataSource()||!t.isAllowFormula())return null;const l=r?.isFormula(i),d=a.getFormula({column:t,rowNode:o});if(l){if(!(d!==i))return!1;a.setFormula({column:t,rowNode:o,formula:i});const e=r?.resolveValue(t,o),l=t.getColDef();if(_exists(l.valueSetter)||!_missing(l.field)){const i={...n,newValue:e};this.computeValueChange({column:t,rowNode:o,newValue:e,params:i,rowData:o.data,valueSetter:l.valueSetter,field:l.field})}return this.finishValueChange(o,t,n,s)}return void 0!==d&&a.setFormula({column:t,rowNode:o,formula:void 0}),null}computeValueChange(e){const{valueSetter:t,params:o,rowData:i,field:s,column:n,newValue:r}=e;return _exists(t)?"function"==typeof t?t(o):this.expressionSvc?.evaluate(t,o):!!i&&this.setValueUsingField(i,s,r,n.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,o,i){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:o,value:o,source:i})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;"function"==typeof t&&this.beans.frameworkOverrides.wrapOutgoing((()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})}))}setValueUsingField(e,t,o,i){if(!t)return!1;let s=!1;if(i){const i=t.split(".");let n=e;for(;i.length>0&&n;){const e=i.shift();0===i.length?(s=n[e]===o,s||(n[e]=o)):n=n[e]}}else s=e[t]===o,s||(e[t]=o);return!s}executeValueGetterWithValueCache(e,t,o,i){const s=o.getColId(),n=this.valueCache.getValue(i,s);if(void 0!==n)return n;const r=this.executeValueGetterWithoutValueCache(e,t,o,i);return this.valueCache.setValue(i,s,r),r}executeValueGetterWithoutValueCache(e,t,o,i){const s=_addGridCommonParams(this.gos,{data:t,node:i,column:o,colDef:o.getColDef(),getValue:e=>this.getValueCallback(i,e)});let n;return n="function"==typeof e?e(s):this.expressionSvc?.evaluate(e,s),n}getValueCallback(e,t){const o=this.colModel.getColDefCol(t);return o?this.getValue(o,e,"data"):null}getKeyForNode(e,t){const o=this.getValue(e,t,"data"),i=e.getColDef().keyCreator;let s=o;if(i){s=i(_addGridCommonParams(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data}))}return"string"==typeof s||null==s||(s=String(s),"[object Object]"===s&&_warn(121)),s}},class extends m{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(_registerKeyboardFocusEvents(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,null!=this.focusFallbackTimeout&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,null!=this.focusFallbackTimeout&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t?null:this.doesRowOrCellHaveBrowserFocus()?t:null}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader?null:this.isDomDataPresentInHierarchy(_getActiveDomElement(this.beans),pt)?this.focusedHeader:null}doesRowOrCellHaveBrowserFocus(){const e=_getActiveDomElement(this.beans);return!!this.isDomDataPresentInHierarchy(e,ro,!0)||this.isDomDataPresentInHierarchy(e,ao,!0)}isDomDataPresentInHierarchy(e,t,o){let i=e;for(;i;){const e=_getDomData(this.gos,i,t);if(e)return!e.destroyed||!o||(this.attemptToRecoverFocus(),!1);i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:o,column:i}=e,s={rowIndex:t,rowPinned:o,column:i,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return n&&(s.isFullWidthCell=n.isFullWidth()),s}clearFocusedCell(){if(null==this.focusedCell)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:o,rowPinned:i,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:r}=e,a=this.colModel.getCol(t);if(!a)return void(this.focusedCell=null);this.focusedCell={rowIndex:o,rowPinned:_makeNull(i),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:s,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=l}isCellFocused(e){return null!=this.focusedCell&&_areCellsEqual(e,this.focusedCell)}isHeaderWrapperFocused(e){if(null==this.focusedHeader)return!1;const{column:t,rowCtrl:{rowIndex:o,pinned:i}}=e,{column:s,headerRowIndex:n}=this.focusedHeader;return t===s&&o===n&&i==s.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),_isHeaderFocusSuppressed(this.beans))return!1;const{direction:t,fromTab:o,allowUserOverride:i,event:s,fromCell:n,rowWithoutSpanValue:r,scroll:a=!0}=e;let{headerPosition:l}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(i){const e=this.focusedHeader,i=getFocusHeaderRowCount(this.beans);if(o){const o=this.gos.getCallback("tabToNextHeader");o&&(l=this.getHeaderPositionFromUserFunc({userFunc:o,direction:t,currentPosition:e,headerPosition:l,headerRowCount:i}))}else{const t=this.gos.getCallback("navigateToNextHeader");if(t&&s){l=t({key:s.key,previousHeaderPosition:e,nextHeaderPosition:l,headerRowCount:i,event:s})}}}return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:s,fromCell:n,rowWithoutSpanValue:r,scroll:a})}focusHeaderPositionFromUserFunc(e){if(_isHeaderFocusSuppressed(this.beans))return!1;const{userFunc:t,headerPosition:o,direction:i,event:s}=e,n=this.focusedHeader,r=getFocusHeaderRowCount(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:n,headerPosition:o,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:o,currentPosition:i,headerPosition:s,headerRowCount:n}=e,r=t({backwards:"Before"===o,previousHeaderPosition:i,nextHeaderPosition:s,headerRowCount:n});return!0===r?i:!1===r?null:r}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:o,fromCell:i,rowWithoutSpanValue:s,event:n,scroll:r=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:d,ctrlsSvc:c,headerNavigation:u}=this.beans;if(this.focusedHeader&&function isHeaderPositionEqual(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}(e.headerPosition,this.focusedHeader))return!1;if(-1===l)return d?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:n});r&&u?.scrollToColumn(a,o);const h=c.getHeaderRowContainerCtrl(a.getPinned())?.focusHeader(t.headerRowIndex,a,n)||!1;return u&&h&&(null!=s||i)&&(u.currentHeaderRowWithoutSpan=s??-1),h}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=getHeaderIndexToFocus(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;const t=getFocusHeaderRowCount(this.beans)-1,o=_last(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return null!=this.focusedCell&&(this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===_makeNull(t))}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&_focusInto(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:o=!0,event:i}=e;if(this.overlays?.exclusive)return o&&this.focusOverlay(t);if(_isCellFocusSuppressed(this.beans))return t&&!_isHeaderFocusSuppressed(this.beans)?this.focusLastHeader():!(!o||!this.focusOverlay(t))||!t&&_focusNextGridCoreContainer(this.beans,t);const s=t?function _getLastRow(e){let t,o=null;const{pinnedRowModel:i,pageBounds:s}=e,n=i?.getPinnedBottomRowCount(),r=i?.getPinnedTopRowCount();return n?(o="bottom",t=n-1):e.rowModel.getRowCount()?t=s.getLastRow():r&&(o="top",t=r-1),void 0===t?null:{rowIndex:t,rowPinned:o}}(this.beans):function _getFirstRow(e){let t,o=0;const{pinnedRowModel:i,rowModel:s,pageBounds:n}=e;return i?.getPinnedTopRowCount()?t="top":s.getRowCount()?(t=null,o=n.getFirstRow()):i?.getPinnedBottomRowCount()&&(t="bottom"),void 0===t?null:{rowIndex:o,rowPinned:t}}(this.beans);if(s){const o=e.column??this.focusedHeader?.column,{rowIndex:n,rowPinned:r}=s,a=_getRowNode(this.beans,s);if(!o||!a||null==n)return!1;if(o.isSuppressNavigable(a)){const e=this.gos.get("enableRtl");let t;return t=i&&i.key!==q?i.key:e?J:ee,this.beans.navigation?.navigateToNextCell(null,t,{rowIndex:n,column:o,rowPinned:r||null},!0),!0}if(this.navigation?.ensureCellVisible({rowIndex:n,column:o,rowPinned:r}),t){if(this.rowRenderer.getRowByPosition(s)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(s,t))return!0}return this.setFocusedCell({rowIndex:n,column:o,rowPinned:_makeNull(r),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:n,rowPinned:r,column:o}),!0}return!(!o||!this.focusOverlay(t))||!(!t||!this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const o=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:getFocusHeaderRowCount(this.beans)-1}}):this.focusGridView({column:o})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},class extends Bi{initVariables(){this.addManagedPropertyListener("rowHeight",(()=>this.refreshRowHeightVariable())),this.getSizeEl(fs),this.getSizeEl(Cs),this.getSizeEl(ws),this.getSizeEl(vs),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(vs)}getRowBorderWidth(){return this.getCSSVariablePixelValue(ws)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(bs)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(fs)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Cs)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(gs)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(ps);return e-1+this.getCSSVariablePixelValue(ms)*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(null==o||isNaN(o)||!isFinite(o))return null!==t&&e.style.setProperty("--ag-line-height",null),-1;const i=`${o}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),o):""!=t?Number.parseFloat(t):-1}fireStylesChangedEvent(e){"rowBorderWidth"===e&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(ws);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&_error(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",['.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}']),function _addAdditionalCss(e,t){for(const o of t.sort(((e,t)=>e.moduleName.localeCompare(t.moduleName)))){const t=o.css;t&&e.set(`module-${o.moduleName}`,t)}}(e,Array.from(function _getAllRegisteredModules(){return new Set(D)}())),e}getDefaultTheme(){return hs}varError(e,t){_warn(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){_error(240,{theme:e})}shadowRootError(){_error(293)}},class extends m{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){const{gos:e}=this;this.horizontalScrollShowing=!0===e.get("alwaysShowHorizontalScroll"),this.verticalScrollShowing=!0===e.get("alwaysShowVerticalScroll"),this.getScrollbarWidth();const t=this.updateScrollVisible.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,newColumnsLoaded:t})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn((()=>{e.executeLaterVMTurn((()=>this.updateScrollVisibleImpl()))})):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),o=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==o)&&(this.horizontalScrollGap=t,this.verticalScrollGap=o,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(null==this.scrollbarWidth){const e=this.gos.get("scrollbarWidth"),t="number"==typeof e&&e>=0?e:_getScrollbarWidth();null!=t&&(this.scrollbarWidth=t,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},class extends m{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",(()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}}),this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=23===e.length&&e.every((e=>e?.isAlive()??!1))}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc((()=>{const e=this.readyCallbacks.indexOf(t);e>=0&&this.readyCallbacks.splice(e,1)}))}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc((()=>{this.updateReady()}))}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},class extends m{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",(e=>this.setColumnDefs(e)))}start(){this.beans.ctrlsSvc.whenReady(this,(()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()}))}setColumnsAndData(e){const{colModel:t,rowModel:o}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),o.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),_logIfDebug(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t)return this.waitingForColumns?(this.waitingForColumns=!1,void this.setColumnsAndData(t)):void this.beans.colModel.setColumnDefs(t,_convertColumnEventSourceType(e.source))}},class extends m{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return o&&s?s.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){const i=t?.getColGroupDef();return i?this.getHeaderName(i,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,i,s){const n=e.headerValueGetter;if(n){const r=_addGridCommonParams(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:s});return"function"==typeof n?n(r):"string"==typeof n?this.beans.expressionSvc?.evaluate(n,r)??null:""}return null!=e.headerName?e.headerName:e.field?function _camelCaseToHumanText(e){return e&&null!=e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map((e=>e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):""))).join(" "):null}(e.field):""}},class extends m{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,o=!1){const{visibleCols:i}=this,s=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const o=i.bodyWidth;this.viewportLeft=o-t-e,this.viewportRight=o-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(o)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let o;switch(e){case"left":o=this.rowsOfHeadersToRenderLeft[t];break;case"right":o=this.rowsOfHeadersToRenderRight[t];break;default:o=this.rowsOfHeadersToRenderCenter[t]}return o??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return!(!e.isAutoHeaderHeight()&&!function isAnyParentAutoHeaderHeight(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}(e))||this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200;return!(t<i&&o<i)&&!(t>s&&o>s)}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:o}=this,i=o.centerCols;return o.getColsForRow(e,i,t,(e=>{const t=e.getLeft();return _exists(t)&&t>this.viewportLeft}))}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const workOutGroupsToRender=e=>{const t=new Set,o={};for(const i of e){let e=i.getParent();const s=i.isSpanHeaderHeight();for(;e&&!t.has(e);){if(s&&e.isPadding()){e=e.getParent();continue}const i=e.getProvidedColumnGroup().getLevel();o[i]??(o[i]=[]),o[i].push(e),t.add(e),e=e.getParent()}}return o};this.rowsOfHeadersToRenderLeft=workOutGroupsToRender(e),this.rowsOfHeadersToRenderRight=workOutGroupsToRender(t),this.rowsOfHeadersToRenderCenter=workOutGroupsToRender(this.headerColsWithinViewport)}extractViewport(){this.extractViewportColumns();const e=this.getViewportColumns().map((e=>`${e.getId()}-${e.getPinned()||"normal"}`)).join("#"),t=this.colsWithinViewportHash!==e;return t&&(this.colsWithinViewportHash=e,this.calculateHeaderRows()),t}},class extends m{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return _createIconNoSpan(e,this.beans,t?.column)}}],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId,destroy:function destroy(e){e.gridDestroySvc.destroy()},isDestroyed:function isDestroyed(e){return e.gridDestroySvc.destroyCalled},getGridOption:function getGridOption(e,t){return e.gos.get(t)},setGridOption:function setGridOption(e,t,o){updateGridOptions(e,{[t]:o})},updateGridOptions,isModuleRegistered:function isModuleRegistered(e,t){const o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}},dependsOn:[pi,Jo,oi,Dn,zs,ni,Us,bn,En,$s,sn,rn,ln,Ks,Ci,mi,xn,li,cn]};function _fuzzySuggestions(e){const{inputValue:t,allSuggestions:o,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let n=(o??[]).map(((e,o)=>({value:e,relevance:_getLevenshteinSimilarityDistance(t,e),idx:o})));if(n.sort(((e,t)=>e.relevance-t.relevance)),i&&(n=n.filter((e=>e.relevance<Math.max(e.value.length,t.length)))),n.length>0&&s&&s>0){const e=n[0].relevance*s;n=n.filter((t=>e-t.relevance<0))}const r=[],a=[];for(const e of n)r.push(e.value),a.push(e.idx);return{values:r,indices:a}}function _getLevenshteinSimilarityDistance(e,t){const o=e.length,i=t.length;if(0===i)return o||0;let s,n=e.toLocaleLowerCase(),r=t.toLocaleLowerCase();e.length<t.length&&(s=r,r=n,n=s,s=t,t=e,e=s);let a=new Uint16Array(i+1),l=new Uint16Array(i+1);for(let e=0;e<=i;e++)a[e]=e;let d=0;const c=o/2-10;for(let u=1;u<=o;u++){const o=e[u-1],h=n[u-1];l[0]=u;for(let s=1;s<=i;s++){const i=t[s-1];if(h===r[s-1]){if(d++,o===i&&d++,u>1&&s>1){const o=e[u-2],i=n[u-2],a=t[s-2];i===r[s-2]&&(d++,o===a&&d++)}u<c&&d++,l[s]=a[s-1]}else{const e=l[s-1],t=a[s],o=a[s-1];let i=e<t?e:t;o<i&&(i=o),l[s]=i+1|0}}s=a,a=l,l=s}return a[i]/(d+1)}var An={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1,Formula:1},In=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],kn={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:In,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...In,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...In,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},Ln={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function convertToUserModuleName(e,t=!1){return!t||"IntegratedCharts"!==e&&"Sparklines"!==e?`${e}Module`:`${e}Module.with(AgChartsEnterpriseModule)`}function missingRowModelTypeError({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var missingModule=({reasonOrId:e,moduleName:t,gridScoped:o,gridId:i,rowModelType:s,additionalText:n,isUmd:r})=>{const a=function resolveModuleNames(e,t){const o=[];for(const i of Array.isArray(e)?e:[e]){const e=kn[i];if(e)for(const i of e){const e=Ln[i];e&&e!==t||o.push(i)}else o.push(i)}return o}(t,s),l="string"==typeof e?e:Gn[e];if(r)return function umdMissingModule(e,t){const o=t.filter((e=>"IntegratedCharts"===e||"Sparklines"===e));let i="";const s=globalThis?.agCharts;return!s&&o.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.\n`:t.some((e=>An[e]))&&(i+=`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.\n`),i}(l,a);const d=a.filter((e=>"IntegratedCharts"===e||"Sparklines"===e)),c=d.length>0?`${d.map((e=>convertToUserModuleName(e))).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map((e=>convertToUserModuleName(e))).join(", "):convertToUserModuleName(a[0])} is not registered${o?" for gridId: "+i:""}. ${c} Check if you have registered the module:\n`}\n${(e=>{const t=e.map((e=>`import { ${convertToUserModuleName(e)} } from '${An[e]?"ag-grid-enterprise":"ag-grid-community"}';`));if(e.some((e=>"IntegratedCharts"===e||"Sparklines"===e))){const e="import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';";t.push(e)}return`import { ModuleRegistry } from 'ag-grid-community'; \n${t.join(" \n")} \n\nModuleRegistry.registerModules([ ${e.map((e=>convertToUserModuleName(e,!0))).join(", ")} ]); \n\nFor more info see: ${_}/modules/`})(a)}`+(n?` \n\n${n}`:"")},missingChartsWithModule=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.\n\nimport { AgChartsEnterpriseModule } from 'ag-charts-enterprise';\nimport { ModuleRegistry } from 'ag-grid-community';\nimport { ${e} } from 'ag-grid-enterprise';\n \nModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);\n `,_n={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:o})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",o],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>'You may want to configure via a callback to avoid setup race conditions:\n "alignedGrids: () => [linkedGrid]"',21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.\n Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}\n${(e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`)(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>"Grid option quickFilterText only supports string inputs, received: "+typeof e,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:o,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${o?"":" the default"} paginationPageSizeSelector=[${i?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})=>{const s=[],n=_fuzzySuggestions({inputValue:t,allSuggestions:[...Object.keys(o??[]).filter((e=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e))),...Object.keys(i??[]).filter((e=>!!i[e]))],hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return s.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.\n`),n.length>0&&s.push(` Did you mean: [${n.slice(0,3)}]?\n`),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${_}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const o=_fuzzySuggestions({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,o.length>0?` Did you mean: [${o.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join("\n")},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.\n Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:o})=>["duplicate group keys for row data, keys should be unique",e,t,...o??[]],187:({rowId:e,firstData:t,secondData:o})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",o],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:missingModule,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${_}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>"Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. \nPlease rebuild the selection state and reapply it.",248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>"cannot get grid to draw rows when it is in the middle of drawing rows. \nYour code probably called a grid API method while the grid was in the render stage. \nTo overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). \nTo see what part of your code that caused the refresh check this stacktrace.",253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>missingChartsWithModule("IntegratedChartsModule"),258:()=>missingChartsWithModule("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:o,gridId:i,rowModelType:s})=>missingModule({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Ds[t],gridId:i,gridScoped:o,rowModelType:s}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${_}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>"No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:\n \n import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';\n \n ModuleRegistry.registerModules([ AllCommunityModule ]);\n ",273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children."}return t},275:missingRowModelTypeError,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.'};function getError(e,t){const o=_n[e];if(!o)return[`Missing error text for error id ${e}!`];const i=o(t),s=`\nSee ${getErrorLink(e,t)}`;return Array.isArray(i)?i.concat(s):[i,s]}var Gn={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Nn=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e(),this.baseDocLink=`${R}/${this.frameworkName}-data-grid`,function setValidationDocLink(e){_=e}(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},Vn=new WeakMap,On=new WeakMap;var Hn=1,Bn=class{create(e,t,o,s,n,r){const a=S.applyGlobalGridOptions(t),l=a.gridId??String(Hn++),d=this.getRegisteredModules(n,l,a.rowModelType),c=this.createBeansList(a.rowModelType,d,l),u=this.createProvidedBeans(e,a,n);if(!c)return;const h={providedBeanInstances:u,beanClasses:c,id:l,beanInitComparator:gridBeanInitComparator,beanDestroyComparator:gridBeanDestroyComparator,derivedBeans:[createGridApi],destroyCallback:()=>{On.delete(p),Vn.delete(e),function _unRegisterGridModules(e){delete x[e]}(l),r?.()}},g=new class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=Ut++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const e=new t;e.beanName?this.beans[e.beanName]=e:i.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(e)}for(const t of e.derivedBeans??[]){const{beanName:e,bean:o}=t(this);this.beans[e]=o,this.createdBeans.push(o)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const o=this.beans;for(const t of e)t.preWireBeans?.(o),t.wireBeans?.(o);for(const t of e)t.preConstruct?.();t&&e.forEach(t);for(const t of e)t.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}}(h);this.registerModuleFeatures(g,d),o(g),g.getBean("syncSvc").start(),s?.(g);const p=g.getBean("gridApi");return Vn.set(e,p),On.set(p,e),p}getRegisteredModules(e,t,o){return _registerModule(Tn,void 0,!0),e?.modules?.forEach((e=>_registerModule(e,t))),function _getRegisteredModules(e,t){const o=x[e]??{};return[...Object.values(P.all??{}),...Object.values(o.all??{}),...Object.values(P[t]??{}),...Object.values(o[t]??{})]}(t,getDefaultRowModelType(o))}registerModuleFeatures(e,t){const o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");for(const e of t){o.registerModule(e);const t=e.apiFunctions;if(t){const e=Object.keys(t);for(const o of e)i?.addFunction(o,t[o])}}}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;_missing(i)&&(i=new Nn);const s={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i};return o?.providedBeanInstances&&Object.assign(s,o.providedBeanInstances),s}createBeansList(e,t,o){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=getDefaultRowModelType(e),n=i[s];if(!n)return void _logPreInitErr(201,{rowModelType:s},`Unknown rowModelType ${s}.`);if(!function _hasUserRegistered(){return E}())return void _logPreInitErr(272,void 0,"No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:\n \n import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';\n \n ModuleRegistry.registerModules([ AllCommunityModule ]);\n ");if(!e){const e=Object.entries(i).filter((([e,t])=>_isModuleRegistered(t,o,e)));if(1==e.length){const[t,o]=e[0];if(t!==s){const e={moduleName:o,rowModelType:t};return void _logPreInitErr(275,e,missingRowModelTypeError(e))}}}if(!_isModuleRegistered(n,o,s)){const e=_isUmd(),t=`rowModelType = '${s}'`,i=e?`Unable to use ${t} as that requires the ag-grid-enterprise script to be included.\n`:`Missing module ${n}Module for rowModelType ${s}.`;return void _logPreInitErr(200,{reasonOrId:t,moduleName:n,gridScoped:_areModulesGridScoped(),gridId:o,rowModelType:s,isUmd:e},i)}const r=new Set;for(const e of t)for(const t of e.beans??[])r.add(t);return Array.from(r)}};function getDefaultRowModelType(e){return e??"clientSide"}function _removeEmptyValues(e){return e.filter((e=>null!=e))}function _convertColumnGroupState(e){const t=[];for(const{groupId:o,open:i}of e)i&&t.push(o);return t.length?{openColumnGroupIds:t}:void 0}var Wn={moduleName:"AlignedGrids",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t="function"==typeof e;"function"==typeof e&&(e=e());return e.map((e=>{if(!e)return _error(18),void(t||_error(20));if(this.isGridApi(e))return e;const o=e;return"current"in o?o.current?.api:(o.api||_error(19),o.api)})).filter((e=>!!e&&!e.isDestroyed()))}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:e})=>this.onColumnEvent(e),alignedGridScroll:({event:e})=>this.onScrollEvent(e)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){"horizontal"===e.direction&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent((()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)}))}extractDataFromEvent(e,t){const o=[];return e.columns?e.columns.forEach((e=>{o.push(t(e))})):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,(e=>e))}getColumnIds(e){return this.extractDataFromEvent(e,(e=>e.getColId()))}onColumnEvent(e){this.onEvent((()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":this.processColumnEvent(e);break;case"columnGroupOpened":this.processGroupOpenedEvent(e);break;case"columnPivotChanged":_warn(21)}}))}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const o of e.columnGroups){let e=null;o&&(e=t.getProvidedColGroup(o.getGroupId())),o&&!e||t.setColumnGroupOpened(e,o.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let o=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=i;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":_applyColumnState(i,{state:e.api.getColumnState().map((e=>({colId:e.colId}))),applyOrder:!0},"alignedGridChanged");break;case"columnVisible":_applyColumnState(i,{state:e.api.getColumnState().map((e=>({colId:e.colId,hide:e.hide})))},"alignedGridChanged");break;case"columnPinned":_applyColumnState(i,{state:e.api.getColumnState().map((e=>({colId:e.colId,pinned:e.pinned})))},"alignedGridChanged");break;case"columnResized":{const t=e,o={};for(const e of a)o[e.getId()]={key:e.getColId(),newWidth:e.getActualWidth()};for(const e of t.flexColumns??[])o[e.getId()]&&delete o[e.getId()];s?.setColumnWidths(Object.values(o),!1,t.finished,"alignedGridChanged");break}}const l=n.getGridBodyCtrl().isVerticalScrollShowing();for(const e of this.getAlignedGridApis())e.setGridOption("alwaysShowVerticalScroll",l)}}],dependsOn:[fi]};function ensureColumnVisible(e,t,o="auto"){e.frameworkOverrides.wrapIncoming((()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o)),"ensureVisible")}function ensureIndexVisible(e,t,o){e.frameworkOverrides.wrapIncoming((()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o)),"ensureVisible")}var zn={moduleName:"RowApi",version:I,apiFunctions:{redrawRows:function redrawRows(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming((()=>e.rowRenderer.redrawRows(o)))},setRowNodeExpanded:function setRowNodeExpanded(e,t,o,i,s){t&&(i&&t.parent&&-1!==t.parent.level&&setRowNodeExpanded(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))},getRowNode:function getRowNode(e,t){return e.rowModel.getRowNode(t)},addRenderedRowListener:function addRenderedRowListener(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)},getRenderedNodes:function getRenderedNodes(e){return e.rowRenderer.getRenderedNodes()},forEachNode:function forEachNode(e,t,o){e.rowModel.forEachNode(t,o)},getFirstDisplayedRowIndex:function getFirstDisplayedRowIndex(e){return e.rowRenderer.firstRenderedRow},getLastDisplayedRowIndex:function getLastDisplayedRowIndex(e){return e.rowRenderer.lastRenderedRow},getDisplayedRowAtIndex:function getDisplayedRowAtIndex(e,t){return e.rowModel.getRow(t)},getDisplayedRowCount:function getDisplayedRowCount(e){return e.rowModel.getRowCount()}}},Un={moduleName:"ScrollApi",version:I,apiFunctions:{getVerticalPixelRange:function getVerticalPixelRange(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()},getHorizontalPixelRange:function getHorizontalPixelRange(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()},ensureColumnVisible,ensureIndexVisible,ensureNodeVisible:function ensureNodeVisible(e,t,o=null){e.frameworkOverrides.wrapIncoming((()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o)),"ensureVisible")}}};function onRowHeightChanged(e){e.rowModel?.onRowHeightChanged()}function resetRowHeights(e){e.rowAutoHeight?.active?_warn(3):e.rowModel?.resetRowHeights()}var $n={moduleName:"CsrmSsrmSharedApi",version:I,apiFunctions:{expandAll:function expandAll(e){e.expansionSvc?.expandAll(!0)},collapseAll:function collapseAll(e){e.expansionSvc?.expandAll(!1)}}},Kn={moduleName:"RowModelSharedApi",version:I,apiFunctions:{onRowHeightChanged,resetRowHeights}},jn={moduleName:"SsrmInfiniteSharedApi",version:I,apiFunctions:{setRowCount:function setRowCount(e,t,o){const i=function _getServerSideRowModel(e){const t=e.rowModel;return"serverSide"===t.getType()?t:void 0}(e);if(i)return 0===e.rowGroupColsSvc?.columns.length?t<0?void _error(238):void i.setRowCount(t,o):void _error(28);_getInfiniteRowModel(e)?.setRowCount(t,o)},getCacheBlockState:function getCacheBlockState(e){if(_isServerSideRowModel(e.gos)){return e.rowModel.getBlockStates()}return e.rowNodeBlockLoader?.getBlockState()??{}},isLastRowIndexKnown:function isLastRowIndexKnown(e){return e.rowModel.isLastRowIndexKnown()}}},qn=class extends m{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},initRootNode(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();const t=initRootNode(this.rootNode),o=new Array(e.length);t._leafs=o;let i=0;const s=this.beans.groupStage?.getNestedDataGetter(),n=s?new Set:null,processChildren=(e,t)=>{const r=e.level+1;for(let a=0,l=t.length;a<l;++a){const l=t[a];if(!l)continue;const d=this.createRowNode(l,r,i);if(o[i++]=d,n&&!n.has(l)){n.add(l),d.treeParent=e;const t=s(l);t&&processChildren(d,t)}}};processChildren(t,e),o.length=i}destroyAllNodes(){const{selectionSvc:e,pinnedRowModel:t,groupStage:o}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),o?.clearNonLeafs();const i=this.rootNode._leafs;if(i)for(let e=0,t=i.length;e<t;++e)i[e]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){const{rootNode:o,gos:i}=this;this.dispatchRowDataUpdateStarted(t);const s=_getRowIdCallback(i),n=e.changedRowNodes,{adds:r,updates:a}=n,l=new Set,d=[],c=this.beans.groupStage?.getNestedDataGetter();let u=!!i.get("suppressMaintainUnsortedOrder")&&void 0,h=-1,g=!1;const updateNode=(e,t)=>{if(!u&&void 0!==u){const t=e.sourceRowIndex;u=t<=h,h=t}e.data!==t&&(e.updateData(t),r.has(e)||a.add(e),!e.selectable&&e.isSelected()&&d.push(e))},processChildren=(e,t,o)=>{for(let i=0,n=t.length;i<n;++i){const n=t[i];if(!n)continue;let a=this.getRowNode(s({data:n,level:o}));if(a?(updateNode(a,n),g||(g=!!c&&a.treeParent!==e)):(a=this.createRowNode(n,o),r.add(a)),!c||l.has(a)){l.add(a);continue}l.add(a),a.treeParent=e;const d=c(n);d&&processChildren(a,d,o+1)}};processChildren(o,t,0);const p=this.deleteUnusedNodes(l,n,d,!!e.animate)||u||r.size>0;if(p){const e=o._leafs??(o._leafs=[]);void 0===u?updateRootLeafsKeepOrder(e,l,n):updateRootLeafsOrdered(e,l)&&(n.reordered=!0)}(p||g||a.size)&&(e.rowDataUpdated=!0,this.deselect(d))}deleteUnusedNodes(e,{removals:t},o,i){const s=this.rootNode._leafs;for(let n=0,r=s.length;n<r;n++){const r=s[n];e.has(r)||this.destroyNode(r,i)&&(t.push(r),r.isSelected()&&o.push(r))}return t.length>0}updateRowData(e,t,o){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return _warn(268),{remove:[],update:[],add:[]};const i=[],s=_getRowIdCallback(this.gos),n=this.executeRemove(s,e,t,i,o),r=this.executeUpdate(s,e,t,i),a=this.executeAdd(e,t);return this.deselect(i),{remove:n,update:r,add:a}}executeRemove(e,{remove:t},{adds:o,updates:i,removals:s},n,r){const a=this.rootNode._leafs,l=a?.length,d=t?.length;if(!d||!l)return[];let c=0,u=l,h=0;const g=new Array(d);for(let a=0;a<d;++a){const l=this.lookupNode(e,t[a]);if(!l)continue;const d=l.sourceRowIndex;d<u&&(u=d),d>h&&(h=d),g[c++]=l,this.destroyNode(l,r)&&(l.isSelected()&&n.push(l),o.delete(l)||(i.delete(l),s.push(l)))}return g.length=c,c&&filterRemovedRowNodes(a,u,h),g}executeUpdate(e,{update:t},{adds:o,updates:i},s){const n=t?.length;if(!n)return[];const r=new Array(n);let a=0;for(let l=0;l<n;l++){const n=t[l],d=this.lookupNode(e,n);d&&(d.updateData(n),!d.selectable&&d.isSelected()&&s.push(d),r[a++]=d,o.has(d)||i.add(d))}return r.length=a,r}executeAdd(e,t){var o;const i=(o=this.rootNode)._leafs??(o._leafs=[]),s=i.length,n=e.add,r=n?.length;if(!r)return[];const a=s+r;let l=this.sanitizeAddIndex(i,e.addIndex);if(l<s){for(let e=s-1,t=a-1;e>=l;--e){const o=i[e];o.sourceRowIndex=t,i[t--]=o}t.reordered=!0}i.length=a;const d=new Array(r),c=t.adds;for(let e=0;e<r;e++){const t=this.createRowNode(n[e],0,l);c.add(t),i[l]=t,d[e]=t,l++}return d}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",o=this.beans.selectionSvc;e.length&&o?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),o?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:o?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t,o){const i=new Nt(this.beans);i.parent=this.rootNode,i.level=t,i.group=!1,i.expanded=!1,null!=o&&(i.sourceRowIndex=o),i.setDataAndId(e,String(this.nextId++));const s=i.id,n=this.allNodesMap;return n[s]&&_warn(2,{nodeId:s}),n[s]=i,i}destroyNode(e,t){if(!e._destroy(t))return!1;const o=e.id,i=this.allNodesMap;return i[o]===e&&delete i[o],!0}lookupNode(e,t){if(!e)return lookupNodeByData(this.rootNode._leafs,t);const o=e({data:t,level:0}),i=this.allNodesMap[o];return i||(_error(4,{id:o}),null)}sanitizeAddIndex(e,t){const o=e.length;if("number"!=typeof t)return o;if(t<0||t>=o||Number.isNaN(t))return o;t=Math.ceil(t);const i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=adjustAddIndexForDataPath(e,t)),t}},adjustAddIndexForDataPath=(e,t)=>{for(let o=0,i=e.length;o<i;o++){if(e[o]?.rowIndex==t-1)return o+1}return t},initRootNode=e=>{e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",0!==e._leafs?.length&&(e._leafs=[]);const t=[],o=[],i=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=o,e.childrenAfterAggFilter=i,e.childrenAfterFilter=s;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=o,n.childrenAfterAggFilter=i,n.childrenAfterFilter=s,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},lookupNodeByData=(e,t)=>{if(e)for(let o=0,i=e.length;o<i;o++){const i=e[o];if(i.data===t)return i}return _error(5,{data:t}),null},filterRemovedRowNodes=(e,t,o)=>{for(let i=t=Math.max(0,t),s=e.length;i<s;++i){const s=e[i];i<=o&&s.destroyed||(s.sourceRowIndex=t,e[t++]=s)}e.length=t},updateRootLeafsOrdered=(e,t)=>{const o=t.size;e.length=o;let i=0,s=!1,n=!1;for(const o of t){const t=o.sourceRowIndex;t===i?n||(n=s):(t>=0?n=!0:s=!0,o.sourceRowIndex=i,e[i]=o),++i}return n},updateRootLeafsKeepOrder=(e,t,{adds:o})=>{const i=e.length,s=t.size;s>i&&(e.length=s);let n=0;for(let t=0;t<i;++t){const o=e[t];o.destroyed||(n!==t&&(o.sourceRowIndex=n,e[n]=o),++n)}for(const t of o)t.sourceRowIndex<0&&(t.sourceRowIndex=n,e[n++]=t);e.length=n};function updateRowNodeAfterFilter(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var mergeDeltaSortedArrays=(e,t,o,i,s,n)=>{const r=new Array(n);let a,l=0,d=o[l],c=-1,u=0,h=0;const g=o.length,p=i.length;for(;;){if(c<0){if(u>=p)break;if(a=i[u++],c=s.get(a)??-1,c<0)continue}if((e.compareRowNodes(t,d,a)||~s.get(d)-c)<0){if(r[h++]=d,++l>=g)break;d=o[l]}else r[h++]=a,c=-1}for(;l<g;)r[h++]=o[l++];if(c<0)return r;for(r[h++]=a;u<p;){const e=i[u++];s.get(e)>=0&&(r[h++]=e)}return r},filterRemovedNodes=(e,t,o)=>{let i=0;o.length=t.size;for(let s=0,n=e.length;s<n;++s){const n=e[s];t.has(n)&&(o[i++]=n)}return o.length=i,o},updateRowNodeAfterSort=e=>{const t=e.childrenAfterSort,o=e.sibling;if(o&&(o.childrenAfterSort=t),t)for(let e=0,o=t.length-1;e<=o;e++){const i=t[e],s=0===e,n=e===o;i.firstChild!==s&&(i.firstChild=s,i.dispatchRowEvent("firstChildChanged")),i.lastChild!==n&&(i.lastChild=n,i.dispatchRowEvent("lastChildChanged")),i.childIndex!==e&&(i.childIndex=e,i.dispatchRowEvent("childIndexChanged"))}},preserveGroupOrder=e=>{const t=e.childrenAfterSort,o=e.childrenAfterAggFilter,i=t?.length,s=o?.length;if(!i||!s)return null;const n=new Array(s),r=new Set;for(let e=0;e<s;++e)r.add(o[e]);let a=0;for(let e=0;e<i;++e){const o=t[e];r.delete(o)&&(n[a++]=o)}if(0===r.size&&a===i)return t;for(const e of r)n[a++]=e;return n.length=a,n},addAllLeafs=(e,t)=>{const o=t.childrenAfterGroup;if(o)for(let t=0,i=o.length;t<i;++t){const i=o[t];i.data&&e.push(i),i.group&&addAllLeafs(e,i)}};var Yn={moduleName:"ClientSideRowModel",version:I,rowModels:["clientSide"],beans:[class extends m{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=_debounce(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new Nt(e);this.rootNode=t,this.nodeManager=this.createBean(new qn(t));const onColumnsChanged=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:onColumnsChanged,columnRowGroupChanged:onColumnsChanged,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,o=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter((e=>!!e));this.stages=o;for(let e=o.length-1;e>=0;--e){const i=o[e];for(const o of i.refreshProps)t.set(o,e)}this.addManagedPropertyListeners([...t.keys(),"rowData"],(e=>{const t=e.changeSet?.properties;t&&this.onPropChange(t)})),this.addManagedPropertyListener("rowHeight",(()=>this.resetRowHeights()))}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,o,i){let s,n=!1;do{s=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,o),d=Math.min(a,i);for(let e=l;e<=d;e++){const t=this.getRow(e);if(t.rowHeightEstimated){const e=_getRowHeightForNode(this.beans,t);t.setRowHeight(e.height),s=!0,n=!0}}s&&this.setRowTopAndRowIndex()}while(s);return n}onPropChange(e){const{nodeManager:t,gos:o,beans:i}=this,s=i.groupStage;if(!t)return;const n=new Set(e),r=s?.onPropChange(n);let a;n.has("rowData")?a=o.get("rowData"):r&&(a=s?.extractData()),a&&!Array.isArray(a)&&(a=null,_warn(1));const l={step:"nothing",changedProps:n};if(a){const e=!r&&!this.isEmpty()&&a.length>0&&o.exists("getRowId")&&!o.get("resetRowDataOnUpdate");this.refreshingData=!0,e?(l.keepRenderedRows=!0,l.animate=!o.get("suppressAnimationFrame"),l.changedRowNodes=new Bo,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0)}const d=l.rowDataUpdated?"group":this.getRefreshedStage(e);d&&(l.step=d,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:o}=this;if(!t)return null;const i=t.length;let s=i;for(let t=0,i=e.length;t<i&&s;++t)s=Math.min(s,o.get(e[t])??s);return s<i?t[s].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:o}=this,i=t.environment.getDefaultRowHeight();let s=0;const n=_isDomLayout(this.gos,"normal");for(let r=0,a=o.length;r<a;++r){const a=o[r],l=a.id;if(null!=l&&e?.add(l),null==a.rowHeight){const e=_getRowHeightForNode(t,a,n,i);a.setRowHeight(e.height,e.estimated)}a.setRowTop(s),a.setRowIndex(r),s+=a.rowHeight}if(this.beans.formula?.active){const e=this.formulaRows;for(let t=0,o=e.length;t<o;++t){e[t].formulaRowIndex=t}}}clearRowTopAndRowIndex(e,t){const o=e.active,clearIfNotDisplayed=e=>{null==e?.id||t.has(e.id)||e.clearRowTopAndRowIndex()},recurse=e=>{clearIfNotDisplayed(e),clearIfNotDisplayed(e.detailNode),clearIfNotDisplayed(e.sibling);const t=e.childrenAfterGroup;if(!e.hasChildren()||!t)return;const i=-1==e.level;if(!(o&&!i&&!e.expanded))for(let e=0,o=t.length;e<o;++e)recurse(t[e])},i=this.rootNode;i&&recurse(i)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+o}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:o,rowsToDisplay:i}=this;if(!o||!i.length||i[0]===o)return e;const s=o.childrenAfterSort,getDefaultIndex=e=>{let t=s[e];if(this.gos.get("groupHideOpenParents"))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex},n=t.footerSvc;return n?n?.getTopDisplayIndex(i,e,s,getDefaultIndex):getDefaultIndex(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;let i=this.getRow(e);i.footer&&(i=i.sibling);let s=i.parent;for(;s&&s!==t;)i=s,s=i.parent;const n=t.childrenAfterSort?.indexOf(i)??-1;return n>=0?n:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:_isAnimateRows(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const e=0===t.length||t.some((e=>e.isPrimary()))?"filter":"filter_aggregates";this.refreshModel({step:e,keepRenderedRows:!0,animate:_isAnimateRows(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:_isAnimateRows(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new Wo(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:o,rowDataUpdated:i}=e;return!(!t||o||!i)&&(!t.removals.length&&!t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData)return this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,void(this.noAnimate=!0);this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){const{nodeManager:t,eventSvc:o,started:i}=this;if(!t)return;const s=!!e.rowDataUpdated,n=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&s));if(i&&s&&o.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e))return this.setPendingRefreshFlags(e),void(this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s));this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let r=!1;this.refreshingModel=!0;try{this.executeRefresh(e,n,s),r=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,r||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t,o){const{beans:i}=this;switch(i.masterDetailSvc?.refreshModel(e),o&&"group"!==e.step&&i.colFilter?.refreshModel(),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(t);case"pivot":this.doPivot(t);case"aggregate":this.doAggregate(t);case"filter_aggregates":this.doFilterAggregates(t);case"sort":this.doSort(t,e.changedRowNodes);case"map":this.doRowsToDisplay()}const s=new Set;this.setRowTopAndRowIndex(s),this.clearRowTopAndRowIndex(t,s),this.updateRefreshParams(e)}deferRefresh(e){return!!this.refreshingModel||(!!this.beans.colModel.changeEventsDispatching||(this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started))}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&0===this.getRowCount())return"noMatchingRows"}else if(this.rowCountReady||0==(t.get("rowData")?.length??0))return"noRows";return null}getNodesInRangeForSelection(e,t){let o=!1,i=!1;const s=[],n=_getGroupSelectsDescendants(this.gos);return this.forEachNodeAfterFilterAndSort((r=>{if(i)return;if(o&&(r===t||r===e)&&(i=!0,n&&r.group))return void addAllLeafs(s,r);if(!o){if(r!==t&&r!==e)return;o=!0,t===e&&(i=!0)}(!r.group||!n)&&s.push(r)})),s}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,o=t.length;if(this.isEmpty()||0===o)return-1;let i=0,s=o-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let n=-1,r=-1;for(;;){const o=Math.floor((i+s)/2),a=t[o];if(this.isRowInPixel(a,e))return o;a.rowTop<e?i=o+1:a.rowTop>e&&(s=o-1);if(n===i&&r===s)return o;n=i,r=s}}isRowInPixel(e,t){const o=e.rowTop,i=o+e.rowHeight;return o<=t&&i>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let o=0,i=t.length;o<i;++o)e(t[o],o)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let o=0,i=t.length;o<i;++o)e(t[o],o)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,(e=>e.childrenAfterAggFilter))}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,(e=>e.childrenAfterSort))}forEachPivotNode(e,t,o){const{colModel:i,rowGroupColsSvc:s}=this.beans;if(!i.isPivotMode())return;if(!s?.columns.length)return void e(this.rootNode,0);const n=o?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,(e=>e.leafGroup?null:e[n]))}depthFirstSearchRowNodes(e,t=!1,o=(e=>e.childrenAfterGroup),i=this.rootNode,s=0){let n=s;if(!i)return n;const r=i===this.rootNode;if(r||e(i,n++),i.hasChildren()&&!i.footer){const s=o(i);if(s){const a=this.beans.footerSvc;n=a?.addTotalRows(n,i,e,t,r,"top")??n;for(const i of s)n=this.depthFirstSearchRowNodes(e,t,o,i,n);return a?.addTotalRows(n,i,e,t,r,"bottom")??n}}return n}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){const t=this.rootNode,o=this.beans.filterAggStage;o?o.execute(e):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const o=this.beans.sortStage;o?o.execute(e,t):e.forEachChangedNodeDepthFirst((e=>{e.childrenAfterSort=e.childrenAfterAggFilter.slice(0),updateRowNodeAfterSort(e)}))}doGrouping(e){const t=this.rootNode;if(!t)return;const o=this.beans.groupStage?.execute(e);if(void 0===o){const e=t._leafs;t.childrenAfterGroup=e,t.updateHasChildren();const o=t.sibling;o&&(o.childrenAfterGroup=e)}(o||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;t?t.execute(e):e.forEachChangedNodeDepthFirst((e=>{e.childrenAfterFilter=e.childrenAfterGroup,updateRowNodeAfterFilter(e)}),!0)}doPivot(e){this.beans.pivotStage?.execute(e)}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return"object"==typeof t?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const e=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout((()=>this.executeBatchUpdateRowData()),e)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:o,asyncTransactions:i}=this;if(!e)return;t.valueCache?.onDataChanged();const s=[],n=[],r=new Bo,a=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:t,callback:o}of i??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const i=e.updateRowData(t,r,a);s.push(i),o&&n.push(o.bind(null,i))}this.commitTransactions(r,a),n.length>0&&setTimeout((()=>{for(let e=0,t=n.length;e<t;e++)n[e]()}),0),s.length>0&&o.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const o=new Bo,i=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const s=t.updateRowData(e,o,i);return this.commitTransactions(o,i),s}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{rootNode:e,beans:t}=this;if(t.formula?.active){const t=e?.childrenAfterSort??[];this.formulaRows=t,this.rowsToDisplay=t.filter((e=>!e.softFiltered));for(const e of this.rowsToDisplay)e.setUiLevel(0);return}const o=t.flattenStage;if(o)return void(this.rowsToDisplay=o.execute());const i=this.rootNode.childrenAfterSort??[];for(const e of i)e.setUiLevel(0);this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const o=e.sibling;o?.setRowHeight(o.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode((t=>{t.setRowHeight(t.rowHeight,!0);const o=t.detailNode;o?.setRowHeight(o.rowHeight,!0);const i=t.sibling;i?.setRowHeight(i.rowHeight,!0),e=!0})),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},class extends m{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){const o=this.beans.sortSvc.getSortOptions(),i=o.length>0&&!!t&&this.gos.get("deltaSort"),{gos:s,colModel:n,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:d}=this.beans,c=s.get("groupMaintainOrder"),u=n.getCols().some((e=>e.isRowGroupActive())),h=r?.columns,g=n.isPivotMode(),p=s.getCallback("postSortRows");let m,f=!1;if(e?.forEachChangedNodeDepthFirst((s=>{const n=g&&s.leafGroup;let r=c&&u&&!s.leafGroup;r&&(m??(m=this.shouldSortContainsGroupCols(o)),r&&(r=!m));let l=null;if(r){let e=!1;if(h){const t=s.level+1;t<h.length&&(e=h[t].wasSortExplicitlyRemoved)}e||(l=preserveGroupOrder(s))}else!o.length||n||(l=i&&t?((e,t,o,i,s)=>{const n=t.childrenAfterSort,r=t.childrenAfterAggFilter;if(!r)return n&&n.length>0?n:[];const a=r.length;if(a<=1)return n?.length!==a||0!==a&&n[0]!==r[0]?r.slice():n;if(!n||a<=4)return e.doFullSortInPlace(r.slice(),s);const l=new Map,{updates:d,adds:c}=o,u=[];for(let e=0;e<a;++e){const t=r[e];d.has(t)||c.has(t)||!i.canSkip(t)?(l.set(t,~e),u.push(t)):l.set(t,e)}const h=u.length;return 0===h?a===n.length?n:filterRemovedNodes(n,l,u):(u.sort(((t,o)=>e.compareRowNodes(s,t,o)||~l.get(t)-~l.get(o))),h===a?u:mergeDeltaSortedArrays(e,s,u,n,l,a))})(a,s,t,e,o):a.doFullSortInPlace(s.childrenAfterAggFilter.slice(),o));if(l||(l=s.childrenAfterAggFilter?.slice()??[]),f||(f=s.childrenAfterSort?.[0]!==l[0]),s.childrenAfterSort=l,updateRowNodeAfterSort(s),p){const e={nodes:s.childrenAfterSort};p(e)}})),f&&s.get("groupHideOpenParents")){const e=d?.columns;e?.length&&l.refreshCells({columns:e,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(_isColumnsSortingCoupledToGroup(this.gos)){for(let o=0;o<t;++o){const t=e[o].column;if(t.isPrimary()&&t.isRowGroupActive())return!0}return!1}for(let o=0;o<t;++o)if(e[o].column.getColDef().showRowGroup)return!0;return!1}}],dependsOn:[Dn]},Qn={moduleName:"ClientSideRowModelApi",version:I,apiFunctions:{onGroupExpandedOrCollapsed:function onGroupExpandedOrCollapsed(e){e.expansionSvc?.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function refreshClientSideRowModel(e,t){const o=_getClientSideRowModel(e);o&&(t&&"everything"!==t||(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))},isRowDataEmpty:function isRowDataEmpty(e){return _getClientSideRowModel(e)?.isEmpty()??!0},forEachLeafNode:function forEachLeafNode(e,t){_getClientSideRowModel(e)?.forEachLeafNode(t)},forEachNodeAfterFilter:function forEachNodeAfterFilter(e,t){_getClientSideRowModel(e)?.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function forEachNodeAfterFilterAndSort(e,t){_getClientSideRowModel(e)?.forEachNodeAfterFilterAndSort(t)},applyTransaction:function applyTransaction(e,t){return e.frameworkOverrides.wrapIncoming((()=>_getClientSideRowModel(e)?.updateRowData(t)))},applyTransactionAsync:function applyTransactionAsync(e,t,o){e.frameworkOverrides.wrapIncoming((()=>_getClientSideRowModel(e)?.batchUpdateRowData(t,o)))},flushAsyncTransactions:function flushAsyncTransactions(e){e.frameworkOverrides.wrapIncoming((()=>_getClientSideRowModel(e)?.flushAsyncTransactions()))},getBestCostNodeSelection:function getBestCostNodeSelection(e){return e.selectionSvc?.getBestCostNodeSelection()},resetRowHeights,onRowHeightChanged},dependsOn:[$n,Kn]};function autoSizeColumns({colAutosize:e,visibleCols:t},o,i){Array.isArray(o)?e?.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e?.autoSizeCols({...o,colKeys:o.colIds??t.allCols,source:"api"})}function normaliseColumnWidth(e,t,o={}){const i=o.minWidth??e.getMinWidth();t<i&&(t=i);const s=o.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function getAvailableWidth({ctrlsSvc:e,scrollVisibleSvc:t}){const o=e.getGridBodyCtrl(),i=o.isVerticalScrollShowing()?t.getScrollbarWidth():0;return _getInnerWidth(o.eGridBody)-i}var Zn="ag-animate-autosize";function setWidthAnimation({ctrlsSvc:e,gos:t},o){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;const i=e.getGridBodyCtrl().eGridBody.classList;o?i.add(Zn):i.remove(Zn)}var Jn={moduleName:"ColumnAutoSize",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let o=!1;const i=t.type;if("fitGridWidth"===i||"fitProvidedWidth"===i)o=!0;else if("fitCellContents"===i){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const i=e.get("rowData");o=null!=i&&i.length>0&&_isClientSideRowModel(e)}o&&this.beans.colDelayRenderSvc?.hideColumns(i)}}autoSizeCols(e){const{eventSvc:t,visibleCols:o,colModel:i}=this.beans;setWidthAnimation(this.beans,!0),this.innerAutoSizeCols(e).then((s=>{const dispatch=e=>dispatchColumnResizedEvent(t,Array.from(e),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return setWidthAnimation(this.beans,!1),dispatch(s);const n=getAvailableWidth(this.beans),r=e.colKeys.filter((e=>!i.getCol(e)?.getColDef().suppressAutoSize&&!isRowNumberCol(e)&&!(e=>o.leftCols.some((t=>_columnsMatch(t,e))))(e)&&!(e=>o.rightCols.some((t=>_columnsMatch(t,e))))(e)));this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map((e=>({...e,key:e.colId}))),colKeys:r,onlyScaleUp:!0,animate:!1}),setWidthAnimation(this.beans,!1),dispatch(s)}))}innerAutoSizeCols(e){return new Promise(((t,o)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation((()=>this.innerAutoSizeCols(e).then(t,o)));const{colKeys:i,skipHeader:s,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:d=[],source:c="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:g,autoWidthCalc:p,visibleCols:m}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered()))return this.timesDelayed++,void setTimeout((()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,o)}));this.timesDelayed=0;const f=new Set;let C=-1;const w=Object.fromEntries(d.map((({colId:e,...t})=>[e,t]))),v=s??this.gos.get("skipHeaderOnAutoSize"),b=n??v;for(;0!==C;){C=0;const e=[];for(const t of i){if(!t||(isColumnSelectionCol(S=t)||isRowNumberCol(S)))continue;const o=g.getCol(t);if(!o||f.has(o)||o.getColDef().suppressAutoSize)continue;const i=p.getPreferredWidthForColumn(o,v);if(i>0){const e=w[o.colId]??{};e.minWidth??(e.minWidth=l),e.maxWidth??(e.maxWidth=a);const t=normaliseColumnWidth(o,i,e);o.setActualWidth(t,c),f.add(o),C++}e.push(o)}e.length&&m.refresh(c)}var S;b||this.autoSizeColumnGroupsByColumns(i,c,r),t(f)}))}autoSizeColumn(e,t,o){this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set,r=i.getColsForKeys(e);for(const e of r){let t=e.getParent();for(;t&&t!=o;)t.isPadding()||n.add(t),t=t.getParent()}let a;for(const e of n){for(const t of s.getHeaderRowContainerCtrls())if(a=t.getHeaderCtrlForColumn(e),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){this.shouldQueueResizeOperations?this.pushResizeOperation((()=>this.autoSizeAllColumns(e))):this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),autoSizeColListener=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",autoSizeColListener);const i=new zt(e);return i.addEventListener("doubleTap",autoSizeColListener),()=>{e.removeEventListener("dblclick",autoSizeColListener),i.destroy()}}addColumnGroupResize(e,t,o){const i=this.gos.get("skipHeaderOnAutoSize"),listener=()=>{const e=[],s=t.getDisplayedLeafColumns();for(const t of s)t.getColDef().suppressAutoSize||e.push(t.getColId());e.length>0&&this.autoSizeCols({colKeys:e,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",listener),()=>e.removeEventListener("dblclick",listener)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const o=getAvailableWidth(this.beans);o>0?this.sizeColumnsToFit(o,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout((()=>{this.sizeColumnsToFitGridBody(e,100)}),0):100===t?window.setTimeout((()=>{this.sizeColumnsToFitGridBody(e,500)}),100):500===t?window.setTimeout((()=>{this.sizeColumnsToFitGridBody(e,-1)}),500):_warn(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){if(this.shouldQueueResizeOperations)return void this.pushResizeOperation((()=>this.sizeColumnsToFit(e,t,o,i)));const{beans:s}=this,n=i?.animate??!0;n&&setWidthAnimation(s,!0);const r={};for(const{key:e,...t}of i?.columnLimits??[])r["string"==typeof e?e:e.getColId()]=t;const a=s.visibleCols.allCols;if(e<=0||!a.length)return;const l=getWidthOfColsInList(a);if(i?.onlyScaleUp&&l>e)return;if(e===l){if(a.every((e=>{if(e.colDef.suppressSizeToFit)return!0;const t=r?.[e.getId()],o=t?.minWidth??i?.defaultMinWidth,s=t?.maxWidth??i?.defaultMaxWidth,n=e.getActualWidth();return(null==o||n>=o)&&(null==s||n<=s)})))return}const d=[],c=[];for(const e of a){const t=i?.colKeys?.some((t=>_columnsMatch(e,t)))??!0;e.getColDef().suppressSizeToFit||!t?c.push(e):d.push(e)}const u=d.slice(0);let h=!1;const moveToNotSpread=e=>{_removeFromArray(d,e),c.push(e)},g={};for(const e of d){i?.onlyScaleUp&&(g[e.getColId()]=e.getActualWidth()),e.resetActualWidth(t);const o=r?.[e.getId()],s=o?.minWidth??i?.defaultMinWidth??-1/0,n=o?.maxWidth??i?.defaultMaxWidth??1/0,a=e.getActualWidth(),l=Math.max(Math.min(a,n),s);l!=a&&e.setActualWidth(l,t,!0)}for(;!h;){h=!0;const o=e-getWidthOfColsInList(c);if(o<=0)for(const e of d){const o=r?.[e.getId()]?.minWidth??i?.defaultMinWidth??e.minWidth;e.setActualWidth(o,t,!0)}else{const e=o/getWidthOfColsInList(d);let s=o;for(let o=d.length-1;o>=0;o--){const n=d[o],a=n.getColId(),l=g[a],c=r?.[a],u=c?.minWidth??i?.defaultMinWidth??l,p=c?.maxWidth??i?.defaultMaxWidth,m=Math.max(u??-1/0,n.getMinWidth()),f=Math.min(p??1/0,n.getMaxWidth());let C=Math.round(n.getActualWidth()*e);C<m?(C=m,moveToNotSpread(n),h=!1):C>f?(C=f,moveToNotSpread(n),h=!1):0===o&&(C=s),n.setActualWidth(C,t,!0),s-=C}}}for(const e of u)e.fireColumnWidthChangedEvent(t);const p=s.visibleCols;p.setLeftValues(t),p.updateBodyWidths(),o||(dispatchColumnResizedEvent(this.eventSvc,u,!0,t),n&&setWidthAnimation(s,!1))}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,o=e.get("autoSizeStrategy");"fitGridWidth"!==o?.type&&"fitProvidedWidth"!==o?.type||setTimeout((()=>{if(!this.isAlive())return;const e=o.type;if("fitGridWidth"===e){const{columnLimits:e,defaultMinWidth:t,defaultMaxWidth:i}=o,s=e?.map((({colId:e,minWidth:t,maxWidth:o})=>({key:e,minWidth:t,maxWidth:o})));this.sizeColumnsToFitGridBody({defaultMinWidth:t,defaultMaxWidth:i,columnLimits:s})}else"fitProvidedWidth"===e&&this.sizeColumnsToFit(o.width,"sizeColumnsToFit");t?.revealColumns(e)}))}onFirstDataRendered({colIds:e,...t}){setTimeout((()=>{if(!this.isAlive())return;const o="autosizeColumns";e?this.autoSizeCols({...t,source:o,colKeys:e}):this.autoSizeAllColumns({...t,source:o}),this.beans.colDelayRenderSvc?.revealColumns(t.type)}))}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}}],apiFunctions:{sizeColumnsToFit:function sizeColumnsToFit(e,t){"number"==typeof t?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)},autoSizeColumns,autoSizeAllColumns:function autoSizeAllColumns(e,t){t&&"object"==typeof t?autoSizeColumns(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}},dependsOn:[Xo],css:[":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}"]};var Xn=class extends m{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=e=>{const{beans:t,gos:o,element:i,columns:s}=this,n=t.colHover;if(e??!!o.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(i,{mouseover:n.setMouseOver.bind(n,s),mouseout:n.clearMouseOver.bind(n)});else{for(const e of this.destroyManagedListeners)e();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",(({currentValue:e})=>{this.enableFeature(e)})),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},er={moduleName:"ColumnHover",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",(({currentValue:e})=>{e||this.clearMouseOver()}))}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,o){const listener=()=>{const e=this.isHovered(o);t.toggleCss("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:listener}),listener()}onCellColumnHover(e,t){if(!t)return;const o=this.isHovered(e);t.toggleCss("ag-column-hover",o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);const listener=()=>{const e=this.isHovered(o);t.toggleCss("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:listener}),listener()}createHoverFeature(e,t,o){e.createManagedBean(new Xn(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}}],apiFunctions:{isColumnHovered:function isColumnHovered(e,t){return!!e.colHover?.isHovered(t)}}},tr={moduleName:"SharedExport",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:o,columnKeys:i,skipRowGroups:s,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:o,skipRowGroups:s,columnKeys:i,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce(((e,t)=>t(e)),e).parse()}processRow(e,t,o,i){const s=t.shouldRowBeSkipped||(()=>!1),n=null!=t.rowPositions||!!t.onlySelected,r=this.gos.get("groupHideOpenParents")&&!n,a=this.colModel.isPivotMode()?i.leafGroup:!i.group,l=!!i.footer,d=1===i.allChildrenCount&&1===i.childrenAfterGroup?.length&&function _canSkipShowingRowGroup(e,t){const o=e.get("groupHideParentOfSingleChild");return!0===o||!("leafGroupsOnly"!==o||!t.leafGroup)||!!e.get("groupRemoveSingleChildren")||!(!e.get("groupRemoveLowestSingleChildren")||!t.leafGroup)}(this.gos,i);if(!a&&!l&&(t.skipRowGroups||d||r)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&"top"===i.rowPinned||t.skipPinnedBottom&&"bottom"===i.rowPinned||i.stub)return;if(-1===i.level&&!a&&!l)return;if(s(_addGridCommonParams(this.gos,{node:i})))return;const c=e.onNewBodyRow(i);if(o.forEach(((e,t)=>{c.onColumn(e,t,i)})),t.getCustomContentBelowRow){const o=t.getCustomContentBelowRow(_addGridCommonParams(this.gos,{node:i}));o&&e.addCustomContent(o)}}appendContent(e){return t=>{const o=e.appendContent;return o&&t.addCustomContent(o),t}}prependContent(e){return t=>{const o=e.prependContent;return o&&t.addCustomContent(o),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return o=>{if(!e.skipColumnGroupHeaders){const i=new si,{colGroupSvc:s}=this.beans,n=s?s.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,o,e.processGroupHeaderCallback)}return o}}exportHeaders(e,t){return o=>{if(!e.skipColumnHeaders){const e=o.onNewHeaderRow();t.forEach(((t,o)=>{e.onColumn(t,o,void 0)}))}return o}}processPinnedTopRows(e,t){return o=>{const i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter((e=>"top"===e.rowPinned)).sort(((e,t)=>e.rowIndex-t.rowIndex)).map((e=>this.pinnedRowModel?.getPinnedTopRow(e.rowIndex))).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",i),o}}processRows(e,t){return o=>{const i=this.rowModel,s=_isClientSideRowModel(this.gos),n=_isServerSideRowModel(this.gos),r=!s&&e.onlySelected,a=this.processRow.bind(this,o,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter((e=>null==e.rowPinned)).sort(((e,t)=>e.rowIndex-t.rowIndex)).map((e=>i.getRow(e.rowIndex))).forEach(a);else if(this.colModel.isPivotMode())s?i.forEachPivotNode(a,!0,"filteredAndSorted"===l):n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);else if(e.onlySelectedAllPages||r){const e=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(e),e.forEach(a)}else"all"===l?i.forEachNode(a):s||n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return o}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:o}=this.beans;if(!t||!o)return;const i=t.getSortOptions(),compareNodes=(e,t)=>null!=e.rowIndex&&null!=t.rowIndex?e.rowIndex-t.rowIndex:e.level===t.level?e.parent?.id===t.parent?.id?o.compareRowNodes(i,e,t)||(e.rowIndex??-1)-(t.rowIndex??-1):compareNodes(e.parent,t.parent):e.level>t.level?compareNodes(e.parent,t):compareNodes(e,t.parent);e.sort(compareNodes)}processPinnedBottomRows(e,t){return o=>{const i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter((e=>"bottom"===e.rowPinned)).sort(((e,t)=>e.rowIndex-t.rowIndex)).map((e=>this.pinnedRowModel?.getPinnedBottomRow(e.rowIndex))).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",i),o}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:o=!1,exportRowNumbers:i=!1,columnKeys:s}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),filterSpecialColumns=e=>!isColumnSelectionCol(e)&&(!isRowNumberCol(e)||i);if(s?.length)return n.getColsForKeys(s).filter(filterSpecialColumns);const d=r.get("treeData");let c=[];return c=t&&!l?n.getCols():a.allCols,c=c.filter((e=>filterSpecialColumns(e)&&(!(o&&!d)||!isColumnGroupAutoCol(e)))),c}recursivelyAddHeaderGroups(e,t,o){const i=[];for(const t of e){const e=t;if(e.getChildren)for(const t of e.getChildren()??[])i.push(t)}e.length>0&&isColumnGroup(e[0])&&this.doAddHeaderHeader(t,e,o),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,o)}doAddHeaderHeader(e,t,o){const i=e.onNewHeaderGroupingRow();let s=0;for(const e of t){const t=e;let n;n=o?o(_addGridCommonParams(this.gos,{columnGroup:t})):this.beans.colNames.getDisplayNameForColumnGroup(t,"header");const r=(t.isExpandable()?t.getLeafColumns():[]).reduce(((e,t,o,i)=>{let s=_last(e);return"open"===t.getColumnGroupShow()?s&&null==s[1]||(s=[o],e.push(s)):s&&null==s[1]&&(s[1]=o-1),o===i.length-1&&s&&null==s[1]&&(s[1]=o),e}),[]);i.onColumn(t,n||"",s++,t.getLeafColumns().length-1,r)}}}]},or=class extends m{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};var ir,sr={moduleName:"CsvExport",version:I,beans:[class extends or{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return void _warn(51);const exportFunc=()=>{const t=this.getMergedParams(e),o=this.getData(t),i=new Blob(["\ufeff",o],{type:"text/plain"}),s=t.fileName,n="function"==typeof s?s(_addGridCommonParams(this.gos,{})):s;!function _downloadFile(e,t){const o=document.defaultView||window;if(!o)return void _warn(52);const i=document.createElement("a"),s=o.URL.createObjectURL(t);i.setAttribute("href",s),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),i.remove(),o.setTimeout((()=>{o.URL.revokeObjectURL(s)}),0)}(this.getFileName(n),i)},{overlays:t}=this.beans;t?t.showExportOverlay(exportFunc):exportFunc()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:o,rowGroupColsSvc:i,valueSvc:s,gos:n}=this.beans,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d,suppressQuotes:c,columnSeparator:u,valueFrom:h}=e;return new class extends class{constructor(e){this.valueFrom="data";const{colModel:t,rowGroupColsSvc:o,colNames:i,valueSvc:s,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d,valueFrom:c}=e;this.colModel=t,this.rowGroupColsSvc=o,this.colNames=i,this.valueSvc=s,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=d,c&&(this.valueFrom=c)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e){const{column:t,node:o,currentColumnIndex:i,accumulatedRowIndex:s,type:n,useRawFormula:r}=e,a=0===i&&_isFullWidthGroupRow(this.gos,o,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||o.group)&&(t.isRowGroupDisplayed(o.rowGroupColumn?.getColId()??"")||a))return{value:this.processRowGroupCallback(_addGridCommonParams(this.gos,{column:t,node:o}))??""};if(this.processCellCallback)return{value:this.processCellCallback(_addGridCommonParams(this.gos,{accumulatedRowIndex:s,column:t,node:o,value:this.valueSvc.getValueForDisplay({column:t,node:o,from:this.valueFrom}).value,type:n,parseValue:e=>this.valueSvc.parseValue(t,o,e,this.valueSvc.getValue(t,o,this.valueFrom)),formatValue:e=>this.valueSvc.formatValue(t,o,e)??e}))??""};const l=this.gos.get("treeData"),d=this.valueSvc,c=-1===o.level&&o.footer,u=!0===t.colDef.showRowGroup&&(o.group||l);if(!c&&(a||u)){let e="",i=o;for(;i&&-1!==i.level;){const{value:o,valueFormatted:s}=d.getValueForDisplay({column:a?void 0:t,node:i,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});e=` -> ${s??o??""}${e}`,i=i.parent}return{value:e,valueFormatted:e}}const{value:h,valueFormatted:g}=d.getValueForDisplay({column:t,node:o,includeValueFormatted:!0,exporting:!0,useRawFormula:r,from:this.valueFrom});return{value:h??"",valueFormatted:g}}getHeaderName(e,t){return e?e(_addGridCommonParams(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}}{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:o}=e;this.suppressQuotes=t,this.columnSeparator=o}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach((e=>{this.beginNewLine(),e.forEach(((e,t)=>{0!==t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||""),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)}))})))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,o,i){0!=o&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,o){0!=t&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue({column:e,node:o,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(null==e)return'""';let t;return"string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(_warn(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}}({colModel:t,colNames:o,valueSvc:s,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:d||void 0,suppressQuotes:c||!1,columnSeparator:u||",",rowGroupColsSvc:i,valueFrom:h})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}}],apiFunctions:{getDataAsCsv:function getDataAsCsv(e,t){return e.csvCreator?.getDataAsCsv(t)},exportDataAsCsv:function exportDataAsCsv(e,t){e.csvCreator?.exportDataAsCsv(t)}},dependsOn:[tr]},nr=class extends p{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const o="title",i=this.ctrl.getGui();i&&(null==e||""==e&&!t?i.removeAttribute(o):i.setAttribute(o,e))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(null==this.tooltipManager){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,(()=>this.tooltip));e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},rr=!1,ar=class extends p{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();0===this.tooltipTrigger&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),1===this.tooltipTrigger&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return e&&"hover"!==e?1:0}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),_isIOSUserAgent()||(rr?this.showTooltipTimeoutId=window.setTimeout((()=>{this.prepareToShowTooltip(e)}),100):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(0!=this.state||rr)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-ir<1e3}setToDoNothing(e){e||2!==this.state||this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!_exists(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip())return void this.setToDoNothing();const o=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(o,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),ir=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e)return void this.destroyBean(t);const o=t.getGui();this.tooltipComp=t,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&o.classList.add("ag-tooltip-animate"),this.interactionEnabled&&o.classList.add("ag-tooltip-interactive");const i=this.getLocaleTextFunc(),s=this.popupSvc?.addPopup({eChild:o,ariaLabel:i("ariaLabelTooltip","Tooltip")});if(s&&(this.tooltipPopupDestroyFunc=s.hideFunc),this.positionTooltip(),1===this.tooltipTrigger){const listener=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:listener}),this.setEventHandlers(listener)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(o,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(_getDocument(this.beans),{keydown:e=>{o.contains(e?.target)||this.onKeyDown()}}),1===this.tooltipTrigger&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(o,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:o,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=_getActiveDomElement(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=0===this.tooltipTrigger?1e3:0;window.setTimeout((()=>{e(),this.destroyBean(t)}),o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){rr=!0,this.interactiveTooltipTimeoutId=window.setTimeout((()=>{this.unlockService(),this.setToDoNothing()}),100)}unlockService(){rr=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("Hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},lr=0,dr=class extends p{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:a="over",type:l}=e,d=n.getBoundingClientRect(),c=this.getParentRect();this.setAlignedTo(n,t);this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:()=>{let o,s=d.left-c.left;if("right"===r&&(s-=t.offsetWidth-d.width),"over"===a)o=d.top-c.top,this.setAlignedStyles(t,"over");else{this.setAlignedStyles(t,"under");o="under"===this.shouldRenderUnderOrAbove(t,d,c,e.nudgeY||0)?d.top-c.top+d.height:d.top-t.offsetHeight-2*(i||0)-c.top}return{x:s,y:o}},postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,n,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:o,event:i}=e,s=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,o);let r=!1;this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:()=>{const e=this.keepXYWithinBounds(o,s.top-n.top,0),t=o.clientWidth>0?o.clientWidth:200;r||(o.style.minWidth=`${t}px`,r=!0);const i=n.right-n.left-t;let a;return this.gos.get("enableRtl")?(a=xLeftPosition(),a<0&&(a=xRightPosition(),this.setAlignedStyles(o,"left")),a>i&&(a=0,this.setAlignedStyles(o,"right"))):(a=xRightPosition(),a>i&&(a=xLeftPosition(),this.setAlignedStyles(o,"right")),a<0&&(a=0,this.setAlignedStyles(o,"left"))),{x:a,y:e};function xRightPosition(){return s.right-n.left-2}function xLeftPosition(){return s.left-n.left-t}},postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",o,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(-1===o)return;const i=this.popupList[o],{alignedToElement:s}=i;if(!s)return;const n=["right","left","over","above","under"];for(const t of n)s.classList.remove(`ag-has-popup-positioned-${t}`),e.classList.remove(`ag-popup-positioned-${t}`);t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(-1!==o){this.popupList[o].alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},updatePopupPosition=(n=!1)=>{let{x:l,y:d}=r();n&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(l+=i),s&&(d+=s),o&&(l=this.keepXYWithinBounds(t,l,1),d=this.keepXYWithinBounds(t,d,0)),t.style.left=`${l}px`,t.style.top=`${d}px`,e.postProcessCallback&&e.postProcessCallback())};if(updatePopupPosition(),!n){const e=_observeResize(this.beans,t,(()=>updatePopupPosition(!0)));setTimeout((()=>e()),200)}}getParentRect(){const e=_getDocument(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),_getElementRectWithOffset(t)}keepXYWithinBounds(e,t,o){const i=0===o,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=_getDocument(this.beans),d=l.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),p=c===l.body,m=Math.ceil(u[r]);let f=p?(i?_getAbsoluteHeight:_getAbsoluteWidth)(d)+d[a]:c[s];p&&(f-=Math.abs(g[n]-h[n]));const C=f-m;return Math.min(Math.max(t,0),Math.max(C,0))}addPopup(e){const{eChild:t,ariaLabel:o,ariaOwns:i,alwaysOnTop:s,positionCallback:n,anchorToElement:r}=e,a=this.getPopupIndex(t);if(-1!==a){return{hideFunc:this.popupList[a].hideFunc}}this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!s,o,i),d=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(t,l,d,r),{hideFunc:d}}initialisePopupPosition(e){const t=this.getPopupParent().getBoundingClientRect();_exists(e.style.top)||(e.style.top=-1*t.top+"px"),_exists(e.style.left)||(e.style.left=-1*t.left+"px")}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,a=_createAgElement({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||_setAriaRole(e,"dialog"),o?_setAriaLabel(e,o):i&&(e.id||(e.id=`popup-component-${lr}`),_setAriaOwns(i,e.id)),a.appendChild(e),s.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,o=_getDocument(t),{wrapperEl:i,eChild:s,closedCallback:n,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:d}=e;let c=!1;const hidePopupOnKeyboardEvent=e=>{if(!i.contains(_getActiveDomElement(t)))return;e.key!==Q||this.isStopPropagation(e)||removeListeners({keyboardEvent:e})},hidePopupOnMouseEvent=e=>removeListeners({mouseEvent:e}),hidePopupOnTouchEvent=e=>removeListeners({touchEvent:e}),removeListeners=(e={})=>{const{mouseEvent:t,touchEvent:r,keyboardEvent:a,forceHide:l}=e;(l||!this.isEventFromCurrentPopup({mouseEvent:t,touchEvent:r},s)&&!c)&&(c=!0,i.remove(),o.removeEventListener("keydown",hidePopupOnKeyboardEvent),o.removeEventListener("mousedown",hidePopupOnMouseEvent),o.removeEventListener("touchstart",hidePopupOnTouchEvent),o.removeEventListener("contextmenu",hidePopupOnMouseEvent),this.eventSvc.removeListener("dragStarted",hidePopupOnMouseEvent),n&&n(t||r||a),this.removePopupFromPopupList(s,d))};return r&&r({hidePopup:removeListeners}),window.setTimeout((()=>{a&&o.addEventListener("keydown",hidePopupOnKeyboardEvent),l&&(o.addEventListener("mousedown",hidePopupOnMouseEvent),this.eventSvc.addListener("dragStarted",hidePopupOnMouseEvent),o.addEventListener("touchstart",hidePopupOnTouchEvent),o.addEventListener("contextmenu",hidePopupOnMouseEvent))}),0),removeListeners}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:lr,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),lr+=1}getPopupIndex(e){return this.popupList.findIndex((t=>t.element===e))}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(-1===o)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then((e=>e&&e())),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&_setAriaOwns(t,null),this.popupList=this.popupList.filter((t=>t.element!==e))}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),extractFromPixelValue=e=>Number.parseInt(e.substring(0,e.length-1),10),createPosition=(e,t)=>{const i=o[e]-n[e],r=extractFromPixelValue(s.style[e]);return{initialDiff:i,lastDiff:i,initial:r,last:r,direction:t}},r=createPosition("top",0),a=createPosition("left",1),l=this.beans.frameworkOverrides;return new me((o=>{l.wrapIncoming((()=>{(function _wrapInterval(e,t){return new me((o=>{o(window.setInterval(e,t))}))})((()=>{const o=t.getBoundingClientRect(),n=i.getBoundingClientRect();if(0==n.top&&0==n.left&&0==n.height&&0==n.width)return void e.hidePopup();const calculateNewPosition=(e,t)=>{const i=extractFromPixelValue(s.style[t]);e.last!==i&&(e.initial=i,e.last=i);const r=o[t]-n[t];if(r!=e.lastDiff){const o=this.keepXYWithinBounds(s,e.initial+e.initialDiff-r,e.direction);s.style[t]=`${o}px`,e.last=o}e.lastDiff=r};calculateNewPosition(r,"top"),calculateNewPosition(a,"left")}),200).then((e=>{o((()=>{null!=e&&window.clearInterval(e)}))}))}),"popupPositioning")}))}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(-1===n)return!1;for(let e=n;e<this.popupList.length;e++){if(_isElementInEventPath(this.popupList[e].element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=_getDocument(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const e of o)e!==s&&(e.classList.contains("ag-always-on-top")?r.push(e):n.push(e));const a=[],l=r.length,d=s.classList.contains("ag-always-on-top")||!l?[...n,...r,s]:[...n,s,...r];for(let e=0;e<=i;e++){const i=d[e];if(o[e]===d[e]||i===s)continue;const n=i.querySelectorAll("div");for(const e of n)0!==e.scrollTop&&a.push([e,e.scrollTop]);0===e?t.prepend(i):d[e-1].after(i)}for(;a.length;){const e=a.pop();e[0].scrollTop=e[1]}}handleThemeChange(e){if(e.themeChanged){const e=this.beans.environment;for(const t of this.popupList)e.applyThemeClasses(t.wrapper)}}},cr={moduleName:"Popup",version:I,beans:[class extends dr{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,o,i,s){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:a}=e??{};n({column:r,rowNode:a,ePopup:o,type:t,eventSource:i,mouseEvent:s})}}getActivePopups(){return this.popupList.map((e=>e.element))}hasAnchoredPopup(){return this.popupList.some((e=>e.isAnchored))}isStopPropagation(e){return _isStopPropagationForAgGrid(e)}}]};function _isShowTooltipWhenTruncated(e){return"whenTruncated"===e.get("tooltipShowMode")}var getErrorTooltipMessage=(e,t)=>{const o=e;return"function"==typeof o.getTranslatedMessage?o.getTranslatedMessage(t):e.message},getEditErrorsForPosition=(e,t,o)=>{const{editModelSvc:i}=e,s=i?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=i?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=s||n;return r?.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},buildCellTooltipDisplayFunctions=(e,t,o)=>{const{editSvc:i}=e,{column:s}=t,n=((e,t)=>{if(_isShowTooltipWhenTruncated(e.gos)){if(t.isCellRenderer()){const e=t.column.getColDef();if(!e.showRowGroup&&"agGroupCellRenderer"!==e.cellRenderer)return;return _isElementOverflowingCallback((()=>{const e=t.eGui;return e.querySelector(".ag-group-value")||e.querySelector(".ag-cell-value")||e}))}return _isElementOverflowingCallback((()=>{const e=t.eGui;return 0===e.children.length?e:e.querySelector(".ag-cell-value")}))}})(e,t),shouldDisplayCellTooltip=()=>!i?.isEditing(t)&&(!n||!!s.isTooltipEnabled()&&n());return{shouldDisplayDefault:shouldDisplayCellTooltip,shouldDisplayColumnTooltip:shouldDisplayCellTooltip,shouldDisplayCustomTooltip:o??shouldDisplayCellTooltip}},ur={moduleName:"Tooltip",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=this.gos,n=_isShowTooltipWhenTruncated(s),{column:r,eGui:a}=t,l=r.getColDef();i||!n||l.headerComponent||(i=_isElementOverflowingCallback((()=>a.querySelector(".ag-header-cell-text"))));const d="header",c=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),u=o??c,h={getGui:()=>a,getLocation:()=>d,getTooltipValue:()=>o??l?.headerTooltipValueGetter?.(_addGridCommonParams(s,{location:d,colDef:l,column:r,value:u,valueFormatted:c}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let g=this.createTooltipFeature(h);return g&&(g=t.createBean(g),t.setRefreshFunction("tooltip",(()=>g.refreshTooltip()))),g}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=this.gos,n=_isShowTooltipWhenTruncated(s),{column:r,eGui:a}=t,l=r.getColGroupDef();i||!n||l?.headerGroupComponent||(i=_isElementOverflowingCallback((()=>a.querySelector(".ag-header-group-text"))));const d="headerGroup",c=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),u=o??c,h={getGui:()=>a,getLocation:()=>d,getTooltipValue:()=>o??l?.headerTooltipValueGetter?.(_addGridCommonParams(s,{location:d,colDef:l,column:r,value:u,valueFormatted:c}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>{const e={column:r};return l&&(e.colDef=l),e}},g=this.createTooltipFeature(h);return g?t.createBean(g):g}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{column:s,rowNode:n}=e,r=buildCellTooltipDisplayFunctions(i,e,o),a=this.getLocaleTextFunc();let l=null;const resolveAndStore=()=>(l=(({beans:e,ctrl:t,value:o,displayFunctions:i,translate:s})=>{const{editSvc:n,formula:r,gos:a}=e,{column:l,rowNode:d}=t;if(r?.active&&l.isAllowFormula()){const e=r.getFormulaError(l,d);if(e)return{value:getErrorTooltipMessage(e,s),location:"cellFormula",shouldDisplay:()=>!!r?.getFormulaError(l,d)}}if(!n?.isEditing(t)){const o=getEditErrorsForPosition(e,t,s);if(o)return{value:o,location:"cellEditor",shouldDisplay:()=>!n?.isEditing(t)&&!!getEditErrorsForPosition(e,t,s)}}const{shouldDisplayCustomTooltip:c,shouldDisplayColumnTooltip:u}=i;if(null!=o)return{value:o,location:"cell",shouldDisplay:c};const h=l.getColDef(),g=d.data;if(h.tooltipField&&_exists(g))return{value:_getValueUsingField(g,h.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:u};const p=h.tooltipValueGetter;return p?{value:p(_addGridCommonParams(a,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:d,data:d.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:u}:null})({beans:i,ctrl:e,value:t,displayFunctions:r,translate:a}),l),d={getGui:()=>e.eGui,getLocation:()=>l?.location??"cell",getTooltipValue:()=>resolveAndStore()?.value,shouldDisplayTooltip:()=>{const e=l??resolveAndStore();return!!e&&(!e.shouldDisplay||e.shouldDisplay())},getAdditionalParams:()=>({column:s,colDef:s.getColDef(),rowIndex:e.cellPosition.rowIndex,node:n,data:n.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(d,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(s,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:o}=this,{context:i}=o,s=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>getEditErrorsForPosition(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:e}=o,t=e?.getRowValidationModel()?.getRowValidationMap(),i=e?.getCellValidationModel()?.getCellValidationMap(),s=!!t&&t.size>0,n=!!i&&i.size>0;return s||n}},r=this.createTooltipFeature(n,o);return r?e.createBean(r,i):void 0}initCol(e){const{colDef:t}=e;e.tooltipEnabled=_exists(t.tooltipField)||_exists(t.tooltipValueGetter)||_exists(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}}],dynamicBeans:{tooltipFeature:nr,highlightTooltipFeature:class extends nr{constructor(e,t,o){super(e,o),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",(({currentValue:e})=>{this.setTooltipMode(e)})),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){1===this.tooltipMode&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode="focus"===e?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},tooltipStateManager:class extends ar{createTooltipComp(e,t){const o=function _getTooltipCompDetails(e,t){return e.getCompDetails(t.colDef,ke,"agTooltipComponent",t,!0)}(this.beans.userCompFactory,e);o?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}}},userComponents:{agTooltipComponent:class extends bt{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,o=this.getGui();o.textContent=_toString(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}}},dependsOn:[cr],css:[".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip),&:where(.ag-cell-formula-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}"]},hr=class{constructor(e){this.cellValueChanges=e}},gr=class extends hr{constructor(e,t,o,i){super(e),this.initialRange=t,this.finalRange=o,this.ranges=i}},pr=class{constructor(e){this.actionStack=[],this.maxStackSize=e||10,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},mr={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},fr=class extends Mt{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const o=this.eInput;return o.value!==e&&(o.value=_exists(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,o=e.length>0;t.setCustomValidity(e),o&&t.reportValidity(),_setAriaInvalid(t,o)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:t=>{_isEventFromPrintableCharacter(t)&&t.key&&!e.test(t.key)&&t.preventDefault()},paste:t=>{const o=t.clipboardData?.getData("text");o?.split("").some((t=>!e.test(t)))&&t.preventDefault()}})}},Cr={selector:"AG-INPUT-TEXT-FIELD",component:fr},wr={selector:"AG-INPUT-DATE-FIELD",component:class extends fr{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=_isBrowserSafari();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){_getActiveDomElement(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?_serialiseDate(e??null,!!this.includeTime)??void 0:e;return this.min===t||(this.min=t,_addOrRemoveAttribute(this.eInput,"min",t)),this}setMax(e){const t=e instanceof Date?_serialiseDate(e??null,!!this.includeTime)??void 0:e;return this.max===t||(this.max=t,_addOrRemoveAttribute(this.eInput,"max",t)),this}setStep(e){return this.step===e||(this.step=e,_addOrRemoveAttribute(this.eInput,"step",e)),this}setIncludeTime(e){return this.includeTime===e||(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1)),this}getDate(){if(this.eInput.validity.valid)return _parseDateTimeFromString(this.getValue())??void 0}setDate(e,t){this.setValue(_serialiseDate(e??null,this.includeTime),t)}}},vr=class extends St{constructor(e){super(),this.cellEditorInput=e,this.eEditor=fe}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;let r;o.getInputElement().setAttribute("title",""),t.init(o,e);let a=!0;i?(this.focusAfterAttached=!0,s===j||s===oe?r="":s&&1===s.length?n?a=!1:r=s:(r=t.getStartValue(),s!==ie&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&null!=r&&o.setStartValue(r),this.addGuiEventListener("keydown",(e=>{const{key:t}=e;t!==se&&t!==ne||e.preventDefault()}))}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;_isBrowserSafari()||t.getFocusableElement().focus();const o=t.getInputElement();this.highlightAllOnFocus?o.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},br={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Sr={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},yr={selector:"AG-INPUT-TEXT-AREA",component:class extends Mt{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const o=super.setValue(e,t);return this.eInput.value=e,o}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}}},Rr={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},Fr=class extends fr{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const t=Number.parseFloat(e.value),o=isNaN(t)?"":this.normalizeValue(t.toString());this.value!==o&&this.setValue(o)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:o,max:i,step:s}=this.config;"number"==typeof t&&this.setPrecision(t),"number"==typeof o&&this.setMin(o),"number"==typeof i&&this.setMax(i),"number"==typeof s&&this.setStep(s)}onWheel(e){_getActiveDomElement(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return""===e?"":(null!=this.precision&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const o=this.precision;if(null==o)return e;if(t){const t=Number.parseFloat(e).toFixed(o);return Number.parseFloat(t).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=o)return e;if(o>0)return`${i[0]}.${i[1].slice(0,o)}`}return i[0]}setMin(e){return this.min===e||(this.min=e,_addOrRemoveAttribute(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,_addOrRemoveAttribute(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,_addOrRemoveAttribute(this.eInput,"step",e)),this}setValue(e,t){return this.setValueOrInputValue((e=>super.setValue(e,t)),(()=>this),e)}setStartValue(e){return this.setValueOrInputValue((e=>super.setValue(e,!0)),(e=>{this.eInput.value=e}),e)}setValueOrInputValue(e,t,o){if(_exists(o)){let i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){i=(o=this.adjustPrecision(o))!=this.normalizeValue(o)}if(i)return t(o)}return e(o)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const o=t.value;return this.isScientificNotation(o)?this.adjustPrecision(o,!0):super.getValue()}isScientificNotation(e){return"string"==typeof e&&e.includes("e")}},Dr={selector:"AG-INPUT-NUMBER-FIELD",component:Fr},Pr={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},xr=class extends ve{constructor(e,t,o){super(((e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}))(e,t)),this.label=t,this.value=o,this.eText=fe}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle("ag-active-item",e),_setAriaSelected(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const o=this.getGui();!function _setAriaPosInSet(e,t){_setAriaAttribute(e,"posinset",t)}(o,e),function _setAriaSetSize(e,t){_setAriaAttribute(e,"setsize",t)}(o,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>_isHorizontalScrollShowing(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",(()=>{e.highlightItem(this)})),this.addGuiEventListener("mousedown",(t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)})))}},Er=class extends ve{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}")}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case Y:if(this.highlightedItem){const e=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(e)}else this.setValue(this.getValue());break;case te:case X:e.preventDefault(),this.navigate(t);break;case ne:case se:case re:case ae:e.preventDefault(),this.navigateToPage(t)}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:o}=e,i=o??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();_clearElement(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;const o=this.options.findIndex((t=>t.value===e));if(-1!==o){const e=this.options[o];this.value=e.value,this.displayValue=e.text,this.highlightItem(this.listItems[o]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex((e=>e.value===this.value));-1!==e&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!_isVisible(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const o=this.getGui(),{scrollTop:i,clientHeight:s}=o,{offsetTop:n,offsetHeight:r}=t;(n+r>i+s||n<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const o=new xr(this.cssIdentifier,t,e);o.setParentComponent(this);const i=this.createManagedBean(o);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===te;let o;const{listItems:i,highlightedItem:s}=this;if(s){let e=i.indexOf(s)+(t?1:-1);e=Math.min(Math.max(e,0),i.length-1),o=i[e]}else o=t?i[0]:_last(i);this.highlightItem(o)}navigateToPage(e){const{listItems:t,highlightedItem:o}=this;if(!o||0===t.length)return;const i=t.indexOf(o),s=this.options.length-1,n=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===re?a=0:e===ae?a=s:e===ne?a=Math.min(i+r,s):e===se&&(a=Math.max(i-r,0)),-1!==a&&this.highlightItem(t[a])}refreshAriaRole(){_setAriaRole(this.getGui(),0===this.options.length?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach(((e,o)=>{e.setIndex(o+1,t)}))}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Mr={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},Tr=class extends Et{constructor(e){if(super(e,e?.template||Mr,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=fe,this.eWrapper=fe,this.eDisplayField=fe,this.eIcon=fe,this.registerCSS(".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}.ag-picker-field-wrapper:disabled{opacity:.5}"),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:s,maxPickerWidth:n}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!i,null!=o&&this.setPickerMaxHeight(o),null!=s&&this.setPickerMinWidth(s),null!=n&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:o,inputWidth:i}=this.config;if(o){const e=this.beans.iconSvc.createIconNoSpan(o);e&&this.eIcon.appendChild(e)}null!=i&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),_setAriaExpanded(e,!1),this.ariaRole&&_setAriaRole(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case X:case te:case Y:case Z:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Q:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:o,pickerAriaLabelValue:i,modalPicker:s=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const e=_isNothingFocused(d);this.beforeHidePicker(),e&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=_formatSize(_getAbsoluteWidth(c)),a&&(e.style.maxWidth=a)):_setElementWidth(e,a??_getAbsoluteWidth(c));const p=n??`${_getInnerHeight(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:o,gos:i},eWrapper:s,pickerComponent:n}=this,r=i.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:s,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;_setAriaExpanded(this.getAriaElement(),e);const t=this.eWrapper.classList;t.toggle("ag-picker-expanded",e),t.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return _setElementWidth(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=null==e?void 0:e,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=null==e?void 0:e,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=null==e?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}},Ar=class extends Tr{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:_isElementOverflowingCallback((()=>this.eDisplayField)),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:o}=this.config;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),o&&null==t&&(this.eDisplayField.textContent=o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new Er("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),_setAriaControlsAndLabel(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:e=>{e?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===q&&this.hidePicker(),t){case Y:case X:case te:case se:case ne:case re:case ae:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case Q:super.onKeyDown(e);break;case Z:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e)}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,o){const{listComponent:i,config:{placeholder:s},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!i)return this;o||i.setValue(e,!0);if(i.getValue()===this.getValue())return this;let a=i.getDisplayValue();return null==a&&s&&(a=s),n.textContent=a,r?.setTooltipAndRefresh(a??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Ir={selector:"AG-SELECT",component:Ar},kr={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},Lr={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},_r=class extends vr{constructor(){super(new class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Lr}getAgComponents(){return[Cr]}init(e,t){this.eEditor=e,this.params=t;const o=t.maxLength;null!=o&&e.setMaxLength(o)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),s=this.getLocaleTextFunc();let n=[];return null!=t&&"string"==typeof i&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return _exists(o)||_exists(t.value)?t.parseValue(o):t.value}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){_isBrowserSafari()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),o=_exists(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}}((()=>this.getLocaleTextFunc())))}};var Gr={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},Nr=class extends bt{constructor(e){super(Gr),this.params=e}postConstruct(){_setDomData(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params;this.addManagedElementListeners(e,{keydown:e=>{_isUserSuppressingKeyboardEvent(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)}})}};function existingEditing(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function isCellEditable(e,t){const o=t.column,i=t.rowNode,s=o.getColDef();if(!i)return existingEditing(e,t);const n=s.editable;if(i.group){const n=s.groupRowEditable;if(null!=n)return!!o.isColumnFunc(i,n)||existingEditing(e,t)}return!!o.isColumnFunc(i,n)||existingEditing(e,t)}var editHighlightFn=(e,t=!1)=>{if(void 0!==e)return _sourceAndPendingDiffer(e)||t&&"editing"===e.state};function _hasEdits(e,t,o=!1){return editHighlightFn(e.editModelSvc?.getEdit(t),o)}var nodeHasLeafEdit=(e,t,o)=>{if(e)for(let i=0,s=e.length;i<s;++i){const s=e[i];if(s.data){if(editHighlightFn(t?.getEdit({rowNode:s,column:o}))||editHighlightFn(t?.getEdit({rowNode:s.pinnedSibling,column:o})))return!0}if(nodeHasLeafEdit(s.childrenAfterGroup,t,o))return!0}};function _hasLeafEdits(e,t){const{column:o,rowNode:i}=t;return!(e.gos.get("groupTotalRow")&&!i?.footer)&&nodeHasLeafEdit(i?.childrenAfterGroup,e.editModelSvc,o)}function _hasPinnedEdits(e,{rowNode:t,column:o}){if(t=t.pinnedSibling)return editHighlightFn(e.editModelSvc?.getEdit({rowNode:t,column:o}))}var Vr=class extends m{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:o}=this;if(t?.isBatchEditing()&&t.isEditing()){const t=_hasEdits(o,e)||_hasLeafEdits(o,e)||_hasPinnedEdits(o,e);this.applyBatchingStyle(t)}else this.applyBatchingStyle(!1);const i=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},Or=class extends m{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t?.getEditRow(i);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t?.getEditRow(i)),s){const e=Array.from(s.keys()).some((e=>{const t={rowNode:i,column:e};return _hasEdits(o,t,!0)||_hasLeafEdits(o,t)||_hasPinnedEdits(o,t)}));this.applyStyle(n,e)}else this.applyStyle(n)}applyStyle(e=!1,t=!1){const o=!!this.editSvc?.isBatchEditing(),i="fullRow"===this.gos.get("editType");this.rowCtrl?.forEachGui(void 0,(({rowComp:s})=>{s.toggleCss("ag-row-editing",i&&t),s.toggleCss("ag-row-batch-edit",i&&t&&o),s.toggleCss("ag-row-inline-editing",t),s.toggleCss("ag-row-not-inline-editing",!t),s.toggleCss("ag-row-editing-invalid",i&&t&&e)}))}},_refreshEditCells=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());(({editModelSvc:e},t,o)=>{for(const i of t)e?.getEditRow(i)?.forEach(((t,s)=>!o.has(s)&&e.removeEdits({rowNode:i,column:s})))})(e,(({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;e.forEachNode((e=>i.has(e)&&s.add(e))),t?.forEachPinnedRow("top",(e=>i.has(e)&&s.add(e))),t?.forEachPinnedRow("bottom",(e=>i.has(e)&&s.add(e)));for(const e of i)s.has(e)||o.removeEdits({rowNode:e});return s})(e,i),t)},Hr=new Set(["undo","redo","paste","bulk","rangeSvc"]),Br=new Set(["ui","api"]),Wr={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},zr=new Set(Object.keys(Wr)),Ur=new Set(["paste","rangeSvc","cellClear","redo","undo"]),$r={cancel:!0,source:"api"},Kr={cancel:!1,source:"api"},jr={checkSiblings:!0},qr={force:!0,suppressFlash:!0};function getRowColumnsFromMap(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap((e=>Array.from(e.keys()))))]:void 0}}function getEditType(e,t){return t??e.get("editType")??"singleCell"}var Yr=class extends m{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const o=e.previousParams,{editSvc:i,beans:s}=this,n="cellFocused"===e.type?e.sourceEvent:null;o&&(t=_getCellCtrl(s,o));const{gos:r,editModelSvc:a}=s,l="cellFocusCleared"===e.type;if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:t,rowIndex:d,rowPinned:c}=e,u={column:t,rowNode:_getRowNode(s,{rowIndex:d,rowPinned:c})},h="block"===r.get("invalidEditValueMode");if(h)return;const g=!h,p=!!a?.getCellValidationModel().hasCellValidation(u),m=g&&p;!o&&!l||i.stopEditing(void 0,{cancel:m,source:l&&g?"api":void 0,event:n})||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const e of this.model.getEditPositions())_destroyEditor(this.beans,e,{cancel:!0},_getCellCtrl(this.beans,e)),this.model.stop(e,t,!0);return!0}stopCommitted(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const e of o)i.all.push(e),(this.model.getCellValidationModel().getCellValidation(e)?.errorMessages?.length??0)>0?i.fail.push(e):i.pass.push(e);const s=this.processValidationResults(i),n=this.editSvc.isBatchEditing()&&!t;for(const t of s.destroy)_destroyEditor(this.beans,t,{event:e},_getCellCtrl(this.beans,t)),this.model.stop(t,n,!1);for(const e of s.keep){const t=_getCellCtrl(this.beans,e);!this.editSvc.cellEditingInvalidCommitBlocks()&&t&&this.editSvc.revertSingleCellEdit(t)}return!0}cleanupEditors({rowNode:e}={},t){_syncFromEditors(this.beans,{persist:!1});const o=this.model.getEditPositions(),i=[];if(e)for(const t of o)t.rowNode!==e&&i.push(t);else for(const e of o)i.push(e);_destroyEditors(this.beans,i),_purgeUnchangedEdits(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,o=t?.getCellEditor();if(o?.focusIn)o.focusIn();else{const o="fullRow"===this.beans.gos.get("editType");e.focusCell(o),e.onEditorAttachedFuncs.push((()=>t?.getCellEditor()?.focusIn?.()))}}setupEditors(e){const{event:t,ignoreEventKey:o=!1,startedEdit:i,position:s,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!o&&t.key||void 0;!function _setupEditors(e,t,o,i,s,n){0===t.length&&o?.rowNode&&o?.column&&_setupEditor(e,o,{key:i,event:s,cellStartedEdit:n});const{valueSvc:r,editSvc:a,editModelSvc:l}=e,{rowNode:d,column:c}=o??{};for(const u of t){const{rowNode:t,column:h}=u,g=_getCellCtrl(e,u);if(!g){if(t&&h){const s=r.getValue(h,t,"data"),n=(o?.rowNode===t&&o?.column===h&&i||void 0)??a?.getCellDataValue(u)??r.getValueForDisplay({column:h,node:t,from:"edit"})?.value??s??Ys;l?.setEdit(u,{pendingValue:getNormalisedFormula(e,n,!1,h),sourceValue:s,state:"editing"})}continue}const p=n&&d===g.rowNode&&g.column===c;_setupEditor(e,{rowNode:d,column:g.column},{key:p?i:null,event:p?s:null,cellStartedEdit:p&&n})}}(this.beans,n,s,r,t,i)}dispatchCellEvent(e,t,o,i){const s=_getCellCtrl(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t,o){if(o)return;const i=_getRowCtrl(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!(!i||"api"!==o)||(!i||"ui"!==o&&"edit"!==o)&&("api"===o||(t instanceof KeyboardEvent&&!i?t.key===Y:null))}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();if(t instanceof KeyboardEvent&&!i){if(t.key===Q)return!0}return!(!i||"api"!==o)||"api"===o}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach(((e,t)=>{e.forEach(((e,i)=>{"editing"===e.state&&o.push({...e,rowNode:t,column:i})}))})),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),o.length>0){const e=o.at(-1),t=e.pendingValue===Ys?void 0:e.pendingValue;this.start({position:e,event:new KeyboardEvent("keydown",{key:t}),source:"api"});const i=_getCellCtrl(this.beans,e);i&&this.setFocusInOnEditor(i)}}destroy(){this.cleanupEditors(),super.destroy()}},Qr={moduleName:"EditCore",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new js,this.rowValidations=new qs,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const o=this.getEditRow(e);t?o.delete(t):o.clear(),0===o.size&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits)return;if(0===this.edits.size)return;const o=e&&this.edits.get(e);if(o)return o;if(t.checkSiblings){const t=e.pinnedSibling;if(t)return this.getEditRow(t)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||0===this.edits.size)return;const o=this.getEditRow(e),i=e.pinnedSibling,s=t&&i&&this.getEditRow(i);if(!o&&!s)return;const n={...e.data},applyEdits=(e,t)=>e.forEach((({pendingValue:e},o)=>{e!==Ys&&(t[o.getColId()]=e)}));return o&&applyEdits(o,n),s&&applyEdits(s,n),n}getEdit(e={},t){const{rowNode:o,column:i}=e,s=this.edits;if(this.suspendEdits||0===s.size||!o||!i)return;const n=s.get(o)?.get(i);if(n)return n;if(t?.checkSiblings){const e=o.pinnedSibling;if(e)return s.get(e)?.get(i)}}getEditMap(e=!0){if(this.suspendEdits||0===this.edits.size)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach(((e,o)=>{const i=new Map;e.forEach((({editorState:e,...t},o)=>i.set(o,{...t}))),t.set(o,i)})),t}setEditMap(e){this.edits.clear(),e.forEach(((e,t)=>{const o=new Map;e.forEach(((e,t)=>o.set(t,{...e}))),this.edits.set(t,o)}))}setEdit(e,t){const o=this.edits;0!==o.size&&o.has(e.rowNode)||o.set(e.rowNode,new Map);const i={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...this.getEdit(e),...t};return this.getEditRow(e.rowNode).set(e.column,i),i}clearEditValue(e){const{rowNode:t,column:o}=e;if(!t)return;const update=e=>{e.editorValue=void 0,e.pendingValue=e.sourceValue,e.state="changed"};if(!o)return void this.getEditRow(t)?.forEach(update);const i=this.getEdit(e);i&&update(i)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||0===(e??this.edits).size)return[];const t=[];return(e??this.edits).forEach(((e,o)=>{for(const i of e.keys()){const{editorState:s,...n}=e.get(i);t.push({rowNode:o,column:i,...n})}})),t}hasRowEdits(e,t){if(this.suspendEdits)return!1;if(0===this.edits.size)return!1;return!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits)return!1;if(0===this.edits.size)return!1;const{rowNode:o,column:i}=e,{withOpenEditor:s}=t;if(o){const n=this.getEditRow(o,t);return!!n&&(i?s?"editing"===this.getEdit(e)?.state:n.has(i):0!==n.size&&(!s||Array.from(n.values()).some((({state:e})=>"editing"===e))))}return s?this.getEditPositions().some((({state:e})=>"editing"===e)):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:o,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:Ys,sourceValue:this.beans.valueSvc.getValue(i,o,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(o,t)}stop(e,t,o){if(this.hasEdits(e))if(t){const t=this.getEditRow(e.rowNode)?.get(e.column);!t||t.pendingValue!==Ys&&t.pendingValue!==t.sourceValue?t&&o&&(t.editorValue=void 0):this.removeEdits(e)}else this.removeEdits(e)}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},class extends m{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",(({currentValue:e})=>{this.stopEditing(void 0,$r),this.createStrategy(e)}));const t=_refreshEditCells(e),stopInvalidEdits=()=>{const t=this.model.getCellValidationModel().getCellValidationMap().size>0,o=this.model.getRowValidationModel().getRowValidationMap().size>0;return t||o?this.stopEditing(void 0,$r):this.isEditing()&&(this.batch?_destroyEditors(e,this.model.getEditPositions()):this.stopEditing(void 0,Kr)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:stopInvalidEdits,filterChanged:stopInvalidEdits,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,$r))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){this.batch&&!this.batchStartDispatched&&(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:o,strategy:i}=this,s=getEditType(o,e);if(i){if(i.beanName===s)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,i="ui"){const s=function shouldStartEditing(e,{column:t},o,i,s="ui"){if(o instanceof KeyboardEvent&&(o.key===q||o.key===Y||o.key===ie||o.key===j&&i))return!0;if(o?.shiftKey&&0!=e.rangeSvc?.getCellRanges().length)return!1;const n=t?.getColDef(),r=function deriveClickCount(e,t){return!0===e.get("suppressClickEdit")?0:!0===e.get("singleClickEdit")||t?.singleClickEdit?1:2}(e.gos,n),a=o?.type;return"click"===a&&1===o?.detail&&1===r||"dblclick"===a&&2===o?.detail&&2===r||"api"===s&&!!i}(this.beans,e,t,o,i);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,o="ui"){return this.strategy?.shouldStop(e,t,o)??null}shouldCancelEditing(e,t,o="ui"){return this.strategy?.shouldCancel(e,t,o)??null}validateEdit(){return function _validateEdit(e){_populateModelValidationErrors(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const o=[];return t.forEach(((e,t)=>{e.forEach((({errorMessages:e},i)=>{o.push({column:i,rowIndex:t.rowIndex,rowPinned:t.rowPinned,messages:e??null})}))})),o}(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??jr)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1,silent:r}=t;this.strategy??(this.strategy=this.createStrategy());if(!(t.editable??this.isCellEditable(e,"api")))return;const a=_getCellCtrl(this.beans,e);if(a&&!a.comp)return t.editable=void 0,void a.onCompAttachedFuncs.push((()=>this.startEditing(e,t)));const l=this.shouldStartEditing(e,i,o,s);!1!==l||"api"===s?(this.batch||!this.shouldStopEditing(e,void 0,s)||t.continueEditing||this.stopEditing(void 0,{source:s}),l&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:s,ignoreEventKey:n,startedEdit:o,silent:r})):this.isEditing(e)&&this.stopEditing()}stopEditing(e,t){const o=this.prepareStopContext(e,t);if(!o)return!1;this.stopping=!0;let i=!1,{edits:s}=o;try{const n=this.processStopRequest(o);return i||(i=n.res),s=n.edits,this.finishStopEditing({...o,edits:s,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:o=null,cancel:i=!1,source:s="ui",forceCancel:n=!1,forceStop:r=!1,commit:a=!1}=t||{};if(zr.has(s)&&this.batch)return this.bulkRefresh(e),null;const l=this.committing?Wr[s]:s;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,jr))||!this.strategy||this.stopping)return null;const d=_getCellCtrl(this.beans,e);d&&(d.onEditorAttachedFuncs=[]);const c=!i&&(!!this.shouldStopEditing(e,o,l)||(this.committing||"paste"===s)&&!this.batch)||r,u=i&&!!this.shouldCancelEditing(e,o,l)||n;return{cancel:i,cellCtrl:d,edits:this.model.getEditMap(!0),event:o??null,forceCancel:n,forceStop:r,commit:a,position:e,source:s,treatAsSource:l,willCancel:u,willStop:c}}processStopRequest(e){const{event:t,position:o,willCancel:i,willStop:s}=e;return s||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,o)?{res:!1,edits:this.handleMidBatchKey(t,o,e)}:(_syncFromEditors(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(o),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:o}=this,{cancel:i,commit:s,edits:n,event:r,source:a,willCancel:l,willStop:d}=e;_syncFromEditors(t,{persist:!this.batch||!l,isCancelling:l||i,isStopping:d});const c=o.getEditMap(),u=!l&&(!this.batch||s)?this.processEdits(c,a):[];i?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(r,s),this.clearValidationIfNoOpenEditors();for(const e of u)o.clearEditValue(e);this.bulkRefresh(void 0,n);for(const e of o.getEditPositions(c)){const o=_getCellCtrl(t,e),i=_sourceAndPendingDiffer(e);o?.refreshCell({force:!0,suppressFlash:!i})}return{res:d,edits:c}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,o){const{beans:i,model:s}=this,{cellCtrl:n,edits:r}=o,{key:a}=e,l=a===Y,d=a===Q,c=a===q;if(l||c||d){if(l||c)_syncFromEditors(i,{persist:!0});else if(d&&n){const{rowNode:e,column:t}=n;if(this.batch&&e&&t){const o={rowNode:e,column:t};_destroyEditors(i,[o],{silent:!0}),this.model.stop(o,!0,!0),_getCellCtrl(i,o)?.refreshCell(qr)}else this.revertSingleCellEdit(n)}return this.batch?this.strategy?.cleanupEditors():_destroyEditors(i,s.getEditPositions(),{event:e,cancel:d}),e.preventDefault(),this.bulkRefresh(t,r,{suppressFlash:!0}),s.getEditMap()}return r}finishStopEditing({cellCtrl:e,edits:t,params:o,position:i,res:s,commit:n,forceCancel:r,willCancel:a,willStop:l}){const d=this.beans;s&&i&&(this.batch&&!n||this.model.removeEdits(i)),this.navigateAfterEdit(o,e?.cellPosition),_purgeUnchangedEdits(d),this.clearValidationIfNoOpenEditors(),this.bulkRefresh();const{rowRenderer:c,formula:u}=d;if(a&&c.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){u?u.refreshFormulas(!0):c.refreshRows({suppressFlash:!0,force:!0});const e=l&&n,o=a&&r;(e||o)&&this.dispatchBatchStopped(t,e)}}dispatchBatchStopped(e,t){let o;t&&(o=function _filterChangedEdits(e){const t=new Map;for(const[o,i]of e){const e=new Map;for(const[t,o]of i)_sourceAndPendingDiffer(o)&&e.set(t,o);e.size>0&&t.set(o,e)}return t}(e),o.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",o??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:o,suppressNavigateAfterEdit:i}=e;if(!(o instanceof KeyboardEvent)||i)return;const{key:s,shiftKey:n}=o,r=this.gos.get("enterNavigatesVerticallyAfterEdit");if(s!==Y||!r)return;const a=n?X:te;this.beans.navigation?.navigateToNextCell(null,a,t,!1)}processEdits(e,t){const o=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,s=[];for(const n of o){const o=e.get(n);for(const e of o.keys()){const r=o.get(e),a={rowNode:n,column:e};if(_sourceAndPendingDiffer(r)&&!i){const o=_getCellCtrl(this.beans,a);this.setNodeDataValue(n,e,r.pendingValue,o,t)||s.push(a)}}}return s}setNodeDataValue(e,t,o,i,s="edit"){const n=Br.has(s)?"edit":s;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,o,n)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const o=this.model.getEdit(e);o&&"editing"!==o.state&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:this.valueSvc.getValue(e.column,e.rowNode,"data")}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefresh();let o=qr;t?.forceRefreshOfEditCellsOnly&&(o={...getRowColumnsFromMap(e),...qr}),this.beans.rowRenderer.refreshCells(o)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;_isClientSideRowModel(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&n?.getEditMap(!1)?.forEach(((e,t)=>{for(const i of e.keys())this.refCell({rowNode:t,column:i},e.get(i),o)})))}refCell({rowNode:e,column:t},o,i={}){const{beans:s,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const d=e.sibling;d&&a.add(d);let c=e.parent;for(;c;)c.sibling?.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?a.add(c.sibling):a.add(c),c=c.parent;for(const e of r)this.dispatchEditValuesChanged({rowNode:e,column:t},o);for(const e of r)_getCellCtrl(s,{rowNode:e,column:t})?.refreshCell(i);for(const e of a)_getCellCtrl(s,{rowNode:e,column:t})?.refreshCell(i)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:o,beans:i}=this,s=e.rowNode,n=e.column.getColDef();if(s.group&&null==n.groupRowEditable)if(o.get("treeData")){if(!s.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1;const r="fullRow"===getEditType(o)?function isFullRowCellEditable(e,t,o="ui"){const i=isCellEditable(e,t);if(i||"ui"===o)return i;const{rowNode:s,column:n}=t;for(const t of e.colModel.getCols())if(t!==n&&isCellEditable(e,{rowNode:s,column:t}))return!0;return!1}(i,e,t):isCellEditable(i,e);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}cellEditingInvalidCommitBlocks(){return"block"===this.gos.get("invalidEditValueMode")}checkNavWithValidation(e,t,o=!0){if(this.hasValidationErrors(e)){const i=_getCellCtrl(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),o&&(i&&!i.hasBrowserFocus()&&i.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(i&&this.revertSingleCellEdit(i),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const o=_getCellCtrl(this.beans,e);o?.comp?.getCellEditor()&&(_destroyEditors(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),_setupEditor(this.beans,e,{silent:!0}),_populateModelValidationErrors(this.beans),o?.refreshCell(qr),t&&(o?.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){_populateModelValidationErrors(this.beans);const t=_getCellCtrl(this.beans,e);t&&(t.refreshCell(qr),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let o=!1;return e?.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){let s;const n=this.isEditing(),r=n&&"block-stop"===this.checkNavWithValidation(void 0,o);return e instanceof en&&n&&(s=this.strategy?.moveToNextEditingCell(e,t,o,i,r)),null===s||(s=s||!!this.beans.focusSvc.focusedHeader,!1!==s||r||this.stopEditing()),s}getPendingEditValue(e,t,o){if("data"===o)return;if("batch"===o&&!this.batch)return;const i=this.model.getEdit({rowNode:e,column:t},jr);if(!i)return;if(this.stopping&&!this.batch&&!i.editorState?.cellStartedEditing)return;if("edit"===o){const e=i.editorValue;if(null!=e&&e!==Ys)return e}const s=i.pendingValue;return s!==Ys?s:void 0}getCellDataValue(e){const t=this.model.getEdit(e,jr);if(t){const e=t.pendingValue;if(e!==Ys)return e;const o=t.sourceValue;if(null!=o)return o}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){!function _addStopEditingWhenGridLosesFocus(e,t,o){const{gos:i,popupSvc:s}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const focusOutListener=e=>{const n=e.relatedTarget;if(null===_getTabIndex(n))return void _stopEditing(t);let r=o.some((e=>e.contains(n)))&&i.isElementInThisInstance(n);r||(r=!!s&&(s.getActivePopups().some((e=>e.contains(n)))||s.isElementWithinCustomPopup(n))),r||_stopEditing(t)};for(const t of o)e.addManagedElementListeners(t,{focusout:focusOutListener})}(this,this.beans,e)}createPopupEditorWrapper(e){return new Nr(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:o,sourceValue:i,state:s}=t;return o!==i&&("editing"!==s&&(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),this.beans.editModelSvc?.removeEdits(e),this.bulkRefresh(e),!0))}setDataValue(e,t,o){try{const i=this.batch,s=this.isEditing(i?void 0:e);if((!s||this.committing)&&!Ur.has(o))return;if(!s&&!i&&"paste"===o)return;const n=this.beans;let r;if(this.strategy??(this.strategy=this.createStrategy()),r=i?"ui":this.committing?o??"api":"api",!o||Hr.has(o))return this.applyDirectValue(e,t,o);const a=this.applyExistingEdit(e,t,o,r);return void 0!==a?a:(_syncFromEditor(n,e,t,0,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,o,i){const s=this.model.getEdit(e);if(s)return s.pendingValue!==t&&(s.sourceValue!==t?(_syncFromEditor(this.beans,e,t,0,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...s,pendingValue:t}),!0))}applyDirectValue(e,t,o){const i=this.beans;if(this.batch)return _syncFromEditor(i,e,t,0,void 0,{persist:!0}),this.cleanupEditors(),_purgeUnchangedEdits(i),this.ensureBatchStarted(),this.bulkRefresh(),!0;_syncFromEditor(i,e,t,0,void 0,{persist:!0});const s=_getCellCtrl(i,e),n=this.setNodeDataValue(e.rowNode,e.column,t,s,o);return this.syncEditAfterCommit(e,n),_getCellCtrl(i,e)?.refreshCell(qr),n}handleColDefChanged(e){!function _refreshEditorOnColDefChanged(e,t){const o=t.comp?.getCellEditor();if(!o?.refresh)return;const{eventKey:i,cellStartedEdit:s}=t.editCompDetails.params,{column:n}=t,r=_createEditorParams(e,t,i,s),a=n.getColDef(),l=_getCellEditorDetails(e.userCompFactory,a,r);o.refresh(checkAndPreventDefault(l.params,i))}(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:o}=this;if(!this.batch)return;if(!o.hasRowEdits(e.rowNode,jr))return;const{rowNode:i}=e,{compDetails:s,valueToDisplay:n}=t;if(s){const{params:e}=s;return e.data=o.getEditRowDataValue(i,jr),{compDetails:s}}return{valueToDisplay:n}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,o,i){this.strategy?.dispatchCellEvent(e,t,o,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return _addGridCommonParams(this.gos,{type:e,..."batchEditingStopped"===e?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map((e=>({rowIndex:e.rowNode.rowIndex,rowPinned:e.rowNode.rowPinned,columnId:e.column.getColId(),newValue:e.pendingValue,oldValue:e.sourceValue})))}applyBulkEdit({rowNode:e,column:t},o){if(!o||0===o.length)return;const{beans:i,rangeSvc:s,valueSvc:n}=this,{formula:r}=i;_syncFromEditors(i,{persist:!0});const a=this.model.getEditMap(!0);let l=a.get(e)?.get(t)?.pendingValue,d=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),d=!0);const c=r?.isFormula(l)??!1;o.forEach((e=>{const t=e.columns.some((e=>e?.isAllowFormula()));if(s?.forEachRowInRange(e,(o=>{const s=_getRowNode(i,o);if(void 0===s)return;const d=a.get(s)??new Map;let u=l;for(const t of e.columns){if(!t)continue;const e=!!c&&t.isAllowFormula();if(this.isCellEditable({rowNode:s,column:t},"api")){const e=n.getValue(t,s,"data",!0);let o=n.parseValue(t,s??null,u,e);Number.isNaN(o)&&(o=null),d.set(t,{editorValue:void 0,pendingValue:o,sourceValue:e,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}e&&(u=r?.updateFormulaByOffset({value:u,columnDelta:1}))}d.size>0&&a.set(s,d),c&&t&&(l=r?.updateFormulaByOffset({value:l,rowDelta:1}))})),this.setEditMap(a),this.batch)return this.cleanupEditors(),_purgeUnchangedEdits(i),this.ensureBatchStarted(),void this.bulkRefresh();this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,d&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(a)})}})),this.bulkRefresh();const u=_getCellCtrl(i,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new Vr(e,this.beans)}createRowStyleFeature(e){return new Or(e,this.beans)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:d,rowPinned:c,newValue:u,state:h}of e){const e=r?i.getCol(r):l?i.getCol(l):a;if(!e)continue;const g=_getRowNode(o,{rowIndex:d,rowPinned:c});if(!g)continue;const p=s.getValue(e,g,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!_sourceAndPendingDiffer({pendingValue:u,sourceValue:p})&&"editing"!==h)continue;let m=n.get(g);m||(m=new Map,n.set(g,m)),void 0===u&&(u=Ys),m.set(e,{editorValue:void 0,pendingValue:u,sourceValue:p,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=_getCellCtrl(this.beans,e);if(!t||!this.isEditing(t,jr))return;const o=this.model.getEdit(t);if(!o||!_sourceAndPendingDiffer(o))return;const i=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(i,"pendingChange")}allowedFocusTargetOnValidation(e){return _getCellCtrl(this.beans,e)}}],apiFunctions:{getEditingCells:function getEditingCells(e){const t=e.editModelSvc?.getEditMap(),o=[];return t?.forEach(((e,t)=>{const{rowIndex:i,rowPinned:s}=t;e.forEach(((e,t)=>{const{editorValue:n,pendingValue:r,sourceValue:a,state:l}=e,d=_sourceAndPendingDiffer(e);let c=n??r;c===Ys&&(c=void 0);const u={newValue:c,oldValue:a,state:l,column:t,colId:t.getColId(),colKey:t.getColId(),rowIndex:i,rowPinned:s},h="editing"===l;(h||!h&&d)&&o.push(u)}))})),o},getEditRowValues:function getEditRowValues(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})},getCellEditorInstances:(e,t={})=>{const o=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),i=new Array(o.length);let s=0;for(let e=0,t=o.length;e<t;++e){const t=o[e].comp?.getCellEditor();t&&(i[s++]=_unwrapUserComp(t))}return i.length=s,i},startEditingCell:function startEditingCell(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(i);if(!l)return void _warn(12,{colKey:i});const d=_getRowNode(e,{rowIndex:s,rowPinned:n||null,column:l});if(!d)return void _warn(290,{rowIndex:s,rowPinned:n});if(!r?.isCellEditable({rowNode:d,column:l},"api"))return;null==n&&ensureIndexVisible(e,s),ensureColumnVisible(e,i),r?.startEditing({rowNode:d,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api",editable:!0})},stopEditing:function stopEditing(e,t=!1){const{editSvc:o}=e;if(o?.isBatchEditing()){if(t)for(const t of e.editModelSvc?.getEditPositions()??[])"editing"===t.state&&o.revertSingleCellEdit(t);else _syncFromEditors(e,{persist:!0});_destroyEditors(e,void 0,{cancel:t})}else o?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})},isEditing:function isEditing(e,t){const o=_getCellCtrl(e,t);return!!e.editSvc?.isEditing(o)},validateEdit:function validateEdit(e){return e.editSvc?.validateEdit()||null}},dynamicBeans:{singleCell:class extends Yr{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const i=super.shouldStop(e,t,o);if(null!==i)return i;const s=e?.rowNode,n=e?.column,r=this.rowNode,a=this.column;return r&&a||!s||!n?r!==s||a!==n||!r&&!a&&this.model.hasEdits(void 0,{withOpenEditor:!0}):null}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:o,event:i,ignoreEventKey:s}=e;this.rowNode===t.rowNode&&this.column===t.column||super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:o,event:i,ignoreEventKey:s})}dispatchRowEvent(e,t,o){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:s,rowPinned:n}=e,r=_getRowNode(this.beans,{rowIndex:i,rowPinned:n}),a=_getColId(s),l=t.getCol(a),d=e.previousParams;if(d){const e=_getColId(d.column);if(d?.rowIndex===i&&e===a&&d?.rowPinned===n)return}"cellFocused"==e.type&&(o?.isRangeSelectionEnabledWhileEditing()||o?.isEditing({rowNode:r,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=_getCellByPosition(this.beans,n)??e);const r=e.cellPosition;let a;const l="fullRow"===this.beans.gos.get("editType");l&&this.model.suspend(!0),s||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:o}));try{a=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(!1===a)return null;if(null==a)return!1;const d=a.cellPosition,c=e.isCellEditable(),u=a.isCellEditable(),h=d&&r.rowIndex===d.rowIndex&&r.rowPinned===d.rowPinned;c&&!s&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");if(h||s||(super.cleanupEditors(a,!0),g?a.focusCell(!0,o):this.editSvc.startEditing(a,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:u})),u&&!s){if(a.focusCell(!1,o),g)a.focusCell(!0,o);else if(!a.comp?.getCellEditor()){const e=this.editSvc?.isEditing(a,{withOpenEditor:!0});_setupEditor(this.beans,a,{event:o,cellStartedEdit:!0,silent:e}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&s&&this.setFocusInOnEditor(a),a.focusCell(!0,o);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},fullRow:class extends Yr{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,o="ui"){const{rowNode:i}=e||{};if(!_getRowCtrl(this.beans,{rowNode:this.rowNode}))return!0;const s=super.shouldStop({rowNode:this.rowNode},t,o);return null!==s?s:!!this.rowNode&&i!==this.rowNode}midBatchInputsAllowed({rowNode:e}){return!!e&&this.model.hasEdits({rowNode:e})}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:o,startedEdit:i,event:s,ignoreEventKey:n}=e,{rowNode:r}=t;this.rowNode!==r&&super.cleanupEditors(t);const a=this.beans.visibleCols.allCols,l=[],d=[];for(const e of a)e.isCellEditable(r)&&d.push(e);if(0!=d.length){this.dispatchRowEvent({rowNode:r},"rowEditingStarted",o),this.startedRows.push(r);for(const e of d){const t={rowNode:r,column:e};l.push(t),this.model.hasEdits(t)||this.model.start(t)}this.rowNode=r,this.setupEditors({cells:l,position:t,startedEdit:i,event:s,ignoreEventKey:n})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t}=this;return!(t&&!this.model.hasRowEdits(t))&&(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:o}=this;if(o&&!this.model.hasRowEdits(o))return!1;const i=[];if(this.model.getEditMap().forEach(((e,t)=>{if(e&&0!==e.size)for(const o of e.values())if(_sourceAndPendingDiffer(o)){i.push(t);break}})),_populateModelValidationErrors(this.beans),"block-stop"===this.editSvc.checkNavWithValidation({rowNode:o}))return!1;if(super.stopCommitted(e,t),t||!this.editSvc.isBatchEditing())for(const e of i)this.dispatchRowEvent({rowNode:e},"rowValueChanged");return this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,o=e.previousParams;if(o?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;if(this.beans.editSvc?.isRangeSelectionEnabledWhileEditing())return;const i=_getCellCtrl(this.beans,o);"block"===this.gos.get("invalidEditValueMode")&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const e of this.startedRows)this.dispatchRowEvent({rowNode:e},"rowEditingStopped"),this.destroyEditorsForRow(e);this.startedRows.length=0}destroyEditorsForRow(e){const t=_getRowCtrl(this.beans,{rowNode:e});if(!t)return;const o={};for(const e of t.getAllCellCtrls())e.comp?.getCellEditor()&&_destroyEditor(this.beans,e,o,e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){const n=e.cellPosition;let r;this.model.suspend(!0);try{r=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(!1===r)return null;if(null==r)return!1;const a=r.cellPosition,l=e.isCellEditable(),d=r.isCellEditable(),c=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,o):(r.comp?.getCellEditor()||_setupEditor(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,o)):(d&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),c||s||(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:o,forceStop:!0}),this.editSvc?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(r,!0),u?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:d||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach(((e,t)=>e.forEach((({state:e},o)=>{if("editing"!==e)return;const i=_getCellCtrl(this.beans,{rowNode:t,column:o});i&&!i.comp?.getCellEditor()&&_setupEditor(this.beans,i,{silent:!0})}))))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}}},dependsOn:[cr,ur],css:[".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}"]},Zr={moduleName:"UndoRedoEdit",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},o=null!==this.activeCellEdit&&_areCellsEqual(this.activeCellEdit,t),i=null!==this.activeRowEdit&&function _isSameRow(e,t){return!e&&!t||!(!e||!t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}(this.activeRowEdit,t);if(!(o||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:s,rowIndex:n,column:r,oldValue:a,value:l}=e,d={rowPinned:s,rowIndex:n,columnId:r.getColId(),newValue:l,oldValue:a};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const o=e.get("undoRedoCellEditingLimit");if(o<=0)return;this.undoStack=new pr(o),this.redoStack=new pr(o),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:e=>{e.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,(e=>{this.gridBodyCtrl=e.gridBodyCtrl}))}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(o,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(i,o,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,o,i,s){if(!e)return!1;const n=e.pop();return!!n?.cellValueChanges&&(this.processAction(n,(e=>e[i]),s),n instanceof gr?this.processRange(n.ranges||[n[o]]):this.processCell(n.cellValueChanges),t.push(n),!0)}processAction(e,t,o){for(const i of e.cellValueChanges){const{rowIndex:e,rowPinned:s,columnId:n}=i,r={rowIndex:e,rowPinned:s},a=_getRowNode(this.beans,r);a.displayed&&a.setDataValue(n,t(i),o)}}processRange(e){let t;const o=this.beans.rangeSvc;o.removeAllCellRanges(!0),e.forEach(((i,s)=>{if(!i)return;const n=i.startRow,r=i.endRow;s===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:i.startColumn,columns:i.columns};o.addCellRange(a)}))}processCell(e){const t=e[0],{rowIndex:o,rowPinned:i}=t,s={rowIndex:o,rowPinned:i},n=_getRowNode(this.beans,s),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:o,rowPinned:i}=e,{colModel:s,focusSvc:n,rangeSvc:r}=this.beans,a=s.getCol(o);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const d={rowIndex:t,column:a,rowPinned:i};n.setFocusedCell({...d,forceBrowserFocus:!0}),r?.setRangeToCell(d)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new hr(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{this.activeCellEdit=null;if(e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const e=new hr(this.cellValueChanges);this.pushActionsToUndoStack(e)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new hr(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new gr(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:o}=this.beans;e=t&&_isCellSelectionEnabled(o)?new gr(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):new hr(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){"bulkEditing"===e?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if("bulkEditing"===e&&!this.bulkEditing||"batchEditing"===e&&!this.batchEditing)return;if(this.updateBigChange(e,!1),0===t?.length)return;const o=new hr(t??[]);this.pushActionsToUndoStack(o),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}}],apiFunctions:{undoCellEditing:function undoCellEditing(e){e.undoRedo?.undo("api")},redoCellEditing:function redoCellEditing(e){e.undoRedo?.redo("api")},getCurrentUndoSize:function getCurrentUndoSize(e){return e.undoRedo?.getCurrentUndoStackSize()??0},getCurrentRedoSize:function getCurrentRedoSize(e){return e.undoRedo?.getCurrentRedoStackSize()??0}},dependsOn:[Qr]},Jr={moduleName:"TextEditor",version:I,userComponents:{agCellEditor:_r,agTextCellEditor:_r},dependsOn:[Qr]},Xr={moduleName:"NumberEditor",version:I,userComponents:{agNumberCellEditor:{classImp:class extends vr{constructor(){super(new class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Pr}getAgComponents(){return[Dr]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;null!=o&&e.setMax(o),null!=i&&e.setMin(i),null!=s&&e.setPrecision(s),null!=n&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,s=this.eEditor.getInputElement().valueAsNumber,n=this.getLocaleTextFunc();let r=[];return"number"==typeof s&&(null!=t&&s<t&&r.push(n("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),null!=o&&s>o&&r.push(n("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),r.length||(r=null),i?i({value:s,cellEditorParams:e,internalErrors:r}):r}preventStepping(e){e.key!==X&&e.key!==te||e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!_exists(o)&&!_exists(t.value))return t.value;let i=t.parseValue(o);if(null==i)return i;if("string"==typeof i){if(""===i)return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){_isBrowserSafari()&&this.eEditor.getInputElement().focus({preventScroll:!0})}}((()=>this.getLocaleTextFunc())))}}}},dependsOn:[Qr]},ea={moduleName:"DateEditor",version:I,userComponents:{agDateCellEditor:class extends vr{constructor(){super(new class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return br}getAgComponents(){return[wr]}init(e,t){this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;null!=o&&e.setMin(o),null!=i&&e.setMax(i),null!=s&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),null!=this.includeTime&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const e=this.eEditor.getInputElement().valueAsDate,{params:t}=this,{min:o,max:i,getValidationErrors:s}=t;let n=[];const r=this.getLocaleTextFunc();if(e instanceof Date&&!isNaN(e.getTime())){if(o){const t=o instanceof Date?o:new Date(o);if(e<t){const e=t.toLocaleDateString();n.push(r("minDateValidation",`Date must be after ${e}`,[e]))}}if(i){const t=i instanceof Date?i:new Date(i);if(e>t){const e=t.toLocaleDateString();n.push(r("maxDateValidation",`Date must be before ${e}`,[e]))}}}return n.length||(n=null),s?s({value:e,cellEditorParams:t,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return _exists(o)||_exists(t.value)?o??null:t.value}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return _serialiseDate(e,this.includeTime??!1)}}((()=>this.beans.dataTypeSvc),(()=>this.getLocaleTextFunc())))}},agDateStringCellEditor:class extends vr{constructor(){super(new class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Sr}getAgComponents(){return[wr]}init(e,t){this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;null!=o&&e.setMin(o),null!=i&&e.setMax(i),null!=s&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),null!=this.includeTime&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let a=[];if(i){const e=new Date(i),t=this.getLocaleTextFunc();if(s){const o=new Date(s);if(e<o){const e=o.toLocaleDateString();a.push(t("minDateValidation",`Date must be after ${e}`,[e]))}}if(n){const o=new Date(n);if(e>o){const e=o.toLocaleDateString();a.push(t("maxDateValidation",`Date must be before ${e}`,[e]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return _exists(o)||_exists(e.value)?e.parseValue(o??""):e.value}getStartValue(){return _serialiseDate(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):_parseDateTimeFromString(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):_serialiseDate(e??null,this.includeTime??!1)??void 0}}((()=>this.beans.dataTypeSvc),(()=>this.getLocaleTextFunc())))}}},dependsOn:[Qr]},ta={moduleName:"CheckboxEditor",version:I,userComponents:{agCheckboxCellEditor:class extends St{constructor(){super(mr,[At]),this.eEditor=fe}initialiseEditor(e){const t=e.value??void 0,o=this.eEditor;o.setValue(t);o.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(o,{fieldValueChanged:e=>this.setAriaLabel(e.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=_getAriaCheckboxStateName(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}}},dependsOn:[Qr]},oa={moduleName:"SelectEditor",version:I,userComponents:{agSelectCellEditor:class extends St{constructor(){super(kr,[Ir]),this.eEditor=fe,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if(_missing(s))return void _warn(58);this.startedByEnter=null!=r&&r===Y;let a=!1;s.forEach((i=>{const s={value:i},r=o.formatValue(e.column,null,i),l=null!=r;s.text=l?r:i,t.addOption(s),a=a||n===i})),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:d,valueListMaxHeight:c}=e;null!=l&&t.setPickerGap(l),null!=c&&t.setPickerMaxHeight(c),null!=d&&t.setPickerMaxWidth(d),"fullRow"!==i.get("editType")&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout((()=>{this.isAlive()&&this.eEditor.showPicker()}))}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const e=this.getLocaleTextFunc();s.push(e("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}}},dependsOn:[Qr]},ia={moduleName:"LargeTextEditor",version:I,userComponents:{agLargeTextCellEditor:class extends St{constructor(){super(Rr,[yr]),this.eEditor=fe}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,maxLength:s,cols:n,rows:r}=e;let a;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(s||200).setCols(n||60).setRows(r||10),o?(this.focusAfterAttached=!0,i===j||i===oe?a="":i&&1===i.length?a=i:(a=this.getStartValue(e),i!==ie&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),null!=a&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}onKeyDown(e){const t=e.key;(t===J||t===X||t===ee||t===te||e.shiftKey&&t===Y)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return _exists(i)||_exists(o)?t.parseValue(i):o}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),s=this.getValue();let n=[];return"string"==typeof s&&null!=t&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,internalErrors:n,cellEditorParams:e}):n}}},dependsOn:[Qr]},sa={moduleName:"CustomEditor",version:I,dependsOn:[Qr]},na={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},ra=new Set(Object.values(na));function getFilterUiFromWrapper(e,t){const o=e.filterUi;if(!o)return null;if(o.created)return o.promise;if(t)return null;const i=o.create(o.refreshed),s=o;return s.created=!0,s.promise=i,i}function _refreshFilterUi(e,t,o,i,s,n){e?.refresh?.({...t,model:o,state:i,source:s,additionalEventAttributes:n})}function getAndRefreshFilterUi(e,t,o,i){const s=e();s?.created&&s.promise.then((e=>{const n=t();_refreshFilterUi(e,s.filterParams,n,o()??{model:n},"ui",i)}))}function _updateFilterModel(e){let t,o,i=!1;const{action:s,filterParams:n,getFilterUi:r,getModel:a,getState:l,updateState:d,updateModel:c,processModelToApply:u}=e;switch(s){case"apply":{const e=l();o=e?.model??null,u&&(o=u(o)),t={state:e?.state,model:o},i=!0;break}case"clear":t={model:null},n?.buttons?.includes("apply")||(i=!0,o=null);break;case"reset":t={model:null},i=!0,o=null;break;case"cancel":t={model:a()}}d(t),i?c(o):getAndRefreshFilterUi(r,a,l,{fromAction:s})}function _getFilterModel(e,t){return e[t]??null}function _setColMenuVisible(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}function getFilterMenuFactory(e){const{enterpriseMenuFactory:t,filterMenuFactory:o,gos:i}=e;return t&&_isLegacyMenuEnabled(i)?t:o}var aa={moduleName:"SharedMenu",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(getFilterMenuFactory(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,o){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,o)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){getFilterMenuFactory(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(_isLegacyMenuEnabled(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&isColumn(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&"new"===this.gos.get("columnMenu")}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(_isIOSUserAgent()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!_isLegacyMenuEnabled(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!(!this.beans.filterManager?.isFilterAllowed(e)||_isLegacyMenuEnabled(this.gos)||this.isFilterMenuInHeaderEnabled(e)||this.isFloatingFilterButtonDisplayed(e))}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return _isLegacyMenuEnabled(e)?!!e.exists("suppressMenuHide")&&t:t}showColumnMenuCommon(e,t,o,i){const{positionBy:s,onClosedCallback:n}=t,r=t.column;if("button"===s){const{buttonElement:s}=t;e?.showMenuAfterButtonClick(r,s,o,n,i)}else if("mouse"===s){const{mouseEvent:s}=t;e?.showMenuAfterMouseEvent(r,s,o,n,i)}else if(r){const t=this.beans,s=t.ctrlsSvc;s.getScrollFeature().ensureColumnVisible(r,"auto"),_requestAnimationFrame(t,(()=>{const t=s.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);t&&e?.showMenuAfterButtonClick(r,t.getAnchorElementForMenu(i),o,n,i)}))}}}],apiFunctions:{showColumnMenu:function showColumnMenu(e,t){const o=e.colModel.getCol(t);o?e.menuSvc?.showColumnMenu({column:o,positionBy:"auto"}):_error(12,{colKey:t})},hidePopupMenu:function hidePopupMenu(e){e.menuSvc?.hidePopupMenu()}}};var la={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},da=["january","february","march","april","may","june","july","august","september","october","november","december"];function setFilterNumberComparator(e,t){return null==e?-1:null==t?1:Number.parseFloat(e)-Number.parseFloat(t)}function setFilterBigIntComparator(e,t){if(null==e)return-1;if(null==t)return 1;const o=_parseBigIntOrNull(e),i=_parseBigIntOrNull(t);return null!=o&&null!=i?o===i?0:o>i?1:-1:String(e).localeCompare(String(t))}function isValidDate(e){return e instanceof Date&&!isNaN(e.getTime())}var ca={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]}),date:()=>({isValidDate}),dateString:({dataTypeDefinition:e})=>({comparator:(t,o)=>{const i=e.dateParser(o);return null==o||i<t?-1:i>t?1:0},isValidDate:t=>"string"==typeof t&&isValidDate(e.dateParser(t))}),dateTime:e=>ca.date(e),dateTimeString:e=>ca.dateString(e),object:()=>{},text:()=>{}},ua={number:()=>({comparator:setFilterNumberComparator}),bigint:()=>({comparator:setFilterBigIntComparator}),boolean:({t:e})=>({valueFormatter:t=>_exists(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:o=>{const i=e(o);return _exists(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(e,o)=>{if("NaN"===e)return t("invalidDate","Invalid Date");if(1===o&&null!=e){const o=da[Number(e)-1];return t(o,la[o])}return e??t("blanks","(Blanks)")},treeListPathGetter:e=>_getDateParts(e,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:o})=>({valueFormatter:t=>{const i=e(t);return _exists(i)?i:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:e=>_getDateParts(t.dateParser(e??void 0),!1),treeListFormatter:(e,t)=>{if(1===t&&null!=e){const t=da[Number(e)-1];return o(t,la[t])}return e??o("blanks","(Blanks)")}}),dateTime:e=>{const t=ua.date(e);return t.treeListPathGetter=_getDateParts,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,o=ua.dateString(e);return o.treeListPathGetter=e=>_getDateParts(t(e??void 0)),o},object:({formatValue:e,t})=>({valueFormatter:o=>{const i=e(o);return _exists(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};var ha={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},ga={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};var pa={filterHandler:()=>({doesFilterPass:()=>!0})};function isAggFilter(e,t,o,i){if(!e.isPrimary())return!0;const s=!o;return!(!e.isValueActive()||!s)&&(!!t||i)}var ma={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},fa=class extends Tt{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},Ca=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const o=e.filterOptions??t;this.filterOptions!==o&&(this.filterOptions=o,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if("string"==typeof t)continue;[["displayKey"],["displayName"],["predicate","test"]].every((e=>!!e.some((e=>null!=t[e]))||(_warn(72,{keys:e}),!1)))?this.customFilterOptions[t.displayKey]=t:this.filterOptions=e.filter((e=>e===t))||[]}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const e=t[0];if("string"==typeof e)return e;if(e.displayKey)return e.displayKey;_warn(73)}else _warn(74)}getCustomOption(e){return this.customFilterOptions[e]}};function removeItems(e,t,o){return null==o?e.splice(t):e.splice(t,o)}function isBlank(e){return null==e||"string"==typeof e&&0===e.trim().length}var wa=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function getNumberOfInputs(e,t){const o=t.getCustomOption(e);if(o){const{numberOfInputs:e}=o;return null!=e?e:1}return e&&wa.has(e)?0:"inRange"===e?2:1}var va=class extends lt{constructor(e,t,o){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=o,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new Ca;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=function getDefaultJoinOperator(e){return"AND"===e||"OR"===e?e:"AND"}(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),_addOrRemoveAttribute(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach(((t,o)=>{const i=0===o?e:this.optionsFactory.defaultOption;t.setValue(i,!0)}))}getModelFromUi(){const e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map((e=>e.getValue()))}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return 0===e.length?t:!0===e[0].getValue()?"OR":"AND"}areNonNullModelsEqual(e,t){const o=!e.operator,i=!t.operator;if(!o&&i||o&&!i)return!1;let s;if(o){const o=e,i=t;s=this.areSimpleModelsEqual(o,i)}else{const o=e,i=t;s=o.operator===i.operator&&_areEqual(o.conditions,i.conditions,((e,t)=>this.areSimpleModelsEqual(e,t)))}return s}setModelIntoUi(e,t){if(null==e)return this.resetUiToDefaults(t),me.resolve();if(e.operator){const t=e;let o=t.conditions;null==o&&(o=[],_warn(77));const i=function validateAndUpdateConditions(e,t){let o=e.length;return o>t&&(e.splice(t),_warn(78),o=t),o}(o,this.maxNumConditions),s=this.getNumConditions();if(i<s)this.removeConditionsAndOperators(i);else if(i>s)for(let e=s;e<i;e++)this.createJoinOperatorPanel(),this.createOption();const n="OR"===t.operator;this.eJoinAnds.forEach((e=>e.setValue(!n,!0))),this.eJoinOrs.forEach((e=>e.setValue(n,!0))),o.forEach(((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)}))}else{const t=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(t.type,!0),this.setConditionIntoUi(t,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),me.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(_warn(79),t=1),this.maxNumConditions=t;let o=e.numAlwaysVisibleConditions??1;o<1&&(_warn(80),o=1),o>t&&(_warn(81),o=t),this.numAlwaysVisibleConditions=o}createOption(){const e=this.getGui(),t=this.createManagedBean(new Ar);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const o=this.createEValue();this.eConditionBodies.push(o),e.appendChild(o),this.putOptionsIntoDropdown(t),this.resetType(t);const i=this.getNumConditions()-1;this.forEachPositionInput(i,(e=>this.resetInput(e))),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=_createElement({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),o=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const i=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,s),this.resetJoinOperatorOr(o,i,s),this.isReadOnly()||(t.onValueChange(this.listener),o.onValueChange(this.listener))}createJoinOperator(e,t,o){const i=this.createManagedBean(new fa);e.push(i);const s="ag-filter-condition-operator";return i.addCss(s),i.addCss(`${s}-${o}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map((e=>"string"==typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e)))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const o of t)e.addOption(o);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,o=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:o?this.getLocaleTextFunc()(o.displayKey,o.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let o=0;o<this.getNumConditions();o++)this.isConditionUiComplete(o)?e=o:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const t=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<t){this.removeConditionsAndOperators(t+1);const o=e+1,i=t-o;i>0&&this.removeConditionsAndOperators(o,i),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach(((t,o)=>{const i=this.isConditionDisabled(o,e);t.setDisabled(i||this.filterListOptions.length<=1),1===o&&(_setDisabled(this.eJoinPanels[0],i),this.eJoinAnds[0].setDisabled(i),this.eJoinOrs[0].setDisabled(i))})),this.eConditionBodies.forEach(((e,t)=>{_setDisplayed(e,this.isConditionBodyVisible(t))}));const o="OR"===(t??this.getJoinOperator());for(const e of this.eJoinAnds)e.setValue(!o,!0);for(const e of this.eJoinOrs)e.setValue(o,!0);this.forEachInput(((t,o,i,s)=>{this.setElementDisplayed(t,o<s),this.setElementDisabled(t,this.isConditionDisabled(i,e))})),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:o,eConditionBodies:i,eJoinPanels:s,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(o,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(s,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,o){const i=removeItems(e,t,o);for(const e of i)_removeFromParent(e)}removeComponents(e,t,o){const i=removeItems(e,t,o);for(const e of i)_removeFromParent(e.getGui()),this.destroyBean(e)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let e;if(!this.isReadOnly()){const t=this.getInputs(0)[0];e=t instanceof Mt&&this.isConditionBodyVisible(0)?t.getInputElement():this.eTypes[0]?.getFocusableElement()}(e??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,o=-1,i=!1;const s=this.getJoinOperator();for(let e=this.getNumConditions()-1;e>=0;e--)if(this.isConditionUiComplete(e))-1===t&&(t=e,o=e);else{const s=e<t;(e>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(e-1)||s)&&(this.removeConditionsAndOperators(e,1),i=!0,s&&o--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(o===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(o,s),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=o}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:o}=this;this.forEachInput(((i,s,n,r)=>{if(!(i instanceof Mt))return;const a=0===s&&r>1?"inRangeStart":0===s?"filterOoo":"inRangeEnd",l=0===s&&r>1?e("ariaFilterFromValue","Filter from value"):0===s?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),d=o[n].getValue(),c=getPlaceholderText(this,t,a,d);i.setInputPlaceholder(c),i.setInputAriaLabel(l)}))}setElementValue(e,t,o){e instanceof Mt&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){_isComponent(e)&&_setDisplayed(e.getGui(),t)}setElementDisabled(e,t){_isComponent(e)&&_setDisabled(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Mt&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach(((t,o)=>{this.forEachPositionTypeInput(o,t,e)}))}forEachPositionInput(e,t){const o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,t)}forEachPositionTypeInput(e,t,o){const i=getNumberOfInputs(t,this.optionsFactory),s=this.getInputs(e);for(let t=0;t<s.length;t++){const n=s[t];null!=n&&o(n,t,e,i)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){return getNumberOfInputs(this.getConditionType(e),this.optionsFactory)>0}isConditionUiComplete(e){if(e>=this.getNumConditions())return!1;return"empty"!==this.getConditionType(e)&&(!this.getValues(e).some((e=>null==e))&&!this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach((e=>this.resetType(e))),this.eJoinAnds.forEach(((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t))),this.eJoinOrs.forEach(((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t))),this.joinOperatorId++,this.forEachInput((e=>this.resetInput(e))),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const t=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,o){this.resetJoinOperator(e,t,"AND"===this.defaultJoinOperator,this.translate("andCondition"),o)}resetJoinOperatorOr(e,t,o){this.resetJoinOperator(e,t,"OR"===this.defaultJoinOperator,this.translate("orCondition"),o)}resetJoinOperator(e,t,o,i,s){this.updateJoinOperatorDisabled(e.setValue(o,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const updater=(e,t)=>this.updateJoinOperatorDisabled(e,t);this.eJoinAnds.forEach(updater),this.eJoinOrs.forEach(updater)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const o=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput(((e,i,s)=>{s===t&&this.setElementValue(e,null!=o[i]?o[i]:null)}))}setValueFromFloatingFilter(e){this.forEachInput(((t,o,i)=>{this.setElementValue(t,0===o&&0===i?e:null,!0)}))}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,(e=>{this.attachElementOnChange(e,this.listener)})))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},ba=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function getAllowedCharPattern(e){return e?.allowedCharPattern??null}function mapValuesFromBigIntFilterModel(e,t){const{filter:o,filterTo:i,type:s}=e||{};return[_parseBigIntOrNull(o),_parseBigIntOrNull(i)].slice(0,getNumberOfInputs(s,t))}var Sa=class extends m{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,o=new Ca;this.optionsFactory=o,o.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(o,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if("colDef"===e.source){const t=e.filterParams,o=this.optionsFactory;o.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:o,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(null==t)return!0;const{operator:o}=t,i=[];if(o){const e=t;i.push(...e.conditions??[])}else i.push(t);const s=o&&"OR"===o?"some":"every",n=this.params.getValue(e.node);return i[s]((t=>this.individualConditionPasses(e,t,n)))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:o,maxNumConditions:i}}=e;if(null==t)return;let s=isCombinedFilterModel(t)?t.conditions:[t];const n=o?.map((e=>"string"==typeof e?e:e.displayKey))??this.defaultOptions;if(!(!s||s.every((e=>void 0!==n.find((t=>t===e.type))))))return this.params={...e,model:null},void e.onModelChange(null);let r=!1;const a=this.filterType;if((s&&!s.every((e=>e.filterType===a))||t.filterType!==a)&&(s=s.map((e=>({...e,filterType:a}))),r=!0),"number"==typeof i&&s&&s.length>i&&(s=s.slice(0,i),r=!0),r){const o=s.length>1?{...t,filterType:a,conditions:s}:{...s[0],filterType:a};this.params={...e,model:o},e.onModelChange(o)}}individualConditionPasses(e,t,o){const i=this.optionsFactory,s=this.mapValuesFromModel(t,i),n=function evaluateCustomFilter(e,t,o){if(null==e)return;const{predicate:i}=e;return null==i||t.some((e=>null==e))?void 0:i(t,o)}(i.getCustomOption(t.type),s,o);return null!=n?n:null==o?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,o,t,e)}},ya=class extends Sa{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:o,includeBlanksInGreaterThan:i,includeBlanksInLessThan:s,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(o)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,o){const i=o.type;if(!this.isValid(t))return"notEqual"===i||"notBlank"===i;const s=this.comparator(),n=null!=e[0]?s(e[0],t):0;switch(i){case"equals":return 0===n;case"notEqual":return 0!==n;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const o=s(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&o<=0:n>0&&o<0}case"blank":return isBlank(t);case"notBlank":return!isBlank(t);default:return _warn(76,{filterModelType:i}),!0}}},Ra={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},Fa={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Da=class extends m{constructor(e,t,o){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=o}getModelAsString(e,t){const o=this.getLocaleTextFunc(),i="filterToolPanel"===t;if(!e)return i?translateForFilter(this,"filterSummaryInactive"):null;if(null!=e.operator){const o=e,i=(o.conditions??[]).map((e=>this.getModelAsString(e,t))),s="AND"===o.operator?"andCondition":"orCondition";return i.join(` ${translateForFilter(this,s)} `)}if("blank"===e.type||"notBlank"===e.type)return i?translateForFilter(this,"blank"===e.type?"filterSummaryBlank":"filterSummaryNotBlank"):o(e.type,e.type);{const t=e,s=this.optionsFactory.getCustomOption(t.type),{displayKey:n,displayName:r,numberOfInputs:a}=s||{};return n&&r&&0===a?o(n,r):this.conditionToString(t,i,"inRange"===t.type||2===a,n,r)}}updateParams(e){const{optionsFactory:t,filterParams:o}=e;this.optionsFactory=t,this.filterParams=o}conditionForToolPanel(e,t,o,i,s,n){let r;const a=this.getTypeKey(e);return a&&(r=translateForFilter(this,a)),s&&n&&(r=this.getLocaleTextFunc()(s,n)),null!=r?t?`${r} ${translateForFilter(this,"filterSummaryInRangeValues",[o(),i()])}`:`${r} ${o()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},Pa=class extends Da{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=Ra}conditionToString(e,t,o,i,s){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this),d=_parseBigIntOrNull(n),c=_parseBigIntOrNull(r);if(t){const e=this.conditionForToolPanel(a,o,(()=>l(d)),(()=>l(c)),i,s);if(null!=e)return e}return o?`${l(d)}-${l(c)}`:null!=n?l(d):`${a}`}},xa=class extends m{constructor(e){super(),this.params=e,this.eInput=fe,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new fr(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const listener=e=>this.onValueChanged(e);this.addManagedListeners(t,{input:listener,keydown:listener})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t,placeholder:o}){const{eInput:i}=this;i.setInputAriaLabel(e),void 0!==t&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!o),i.setInputPlaceholder(o)}};function trimInputForFilter(e){const t=e?.trim();return""===t?e:t}function mapValuesFromTextFilterModel(e,t){const{filter:o,filterTo:i,type:s}=e||{};return[o||null,i||null].slice(0,getNumberOfInputs(s,t))}var Ea=class extends Se{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e)return void(this.lastType=this.optionsFactory.defaultOption);let t;if(e.operator){t=e.conditions[0]}else t=e;this.lastType=t.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const t=e;return this.isTypeEditable(t.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const t=e;this.onModelUpdated(t.model)}}setParams(e){const t=new Ca;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const o=this.optionsFactory.defaultOption;t||(this.lastType=o),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(o);this.setEditable(i)}refresh(e){this.params=e;const t=e,o=this.reactive;if(o&&"colDef"!==t.source||this.updateParams(e),o){const{source:e,model:o}=t;if("dataChanged"===e||"ui"===e)return;this.onModelUpdated(o)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&1===getNumberOfInputs(e,this.optionsFactory)}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},Ma={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},Ta=class extends Ea{constructor(){super(...arguments),this.eFloatingFilterInputContainer=fe,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Ma)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const{inputSvc:t,defaultDebounceMs:o,readOnly:i}=this,{filterPlaceholder:s,column:n,browserAutoComplete:r,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,d=e.filterParams.filterPlaceholder,c=!0===s?getPlaceholderText(this,d,"filterOoo",l):s||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(n),autoComplete:r??!1,placeholder:c}),this.applyActive=_isUseApplyButton(a),!i){const e=getDebounceMs(a,o);t.setValueChangedListener(_debounce(this,this.syncUpWithParentFilter.bind(this),e))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,o=t.getValue();_clearElement(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(o,!0)}syncUpWithParentFilter(e){const t=e.key===Y,o=this.reactive;if(o){this.params.onUiChange()}if(this.applyActive&&!t)return;const{inputSvc:i,params:s,lastType:n}=this;let r=i.getValue();if(s.filterParams.trimInput&&(r=trimInputForFilter(r),i.setValue(r,!0)),o){const e=s,t=e.model,o=this.convertValue(r),i=null==o?null:{...t??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:o};e.onModelChange(i,{afterFloatingFilter:!0})}else s.parentFilterInstance((e=>{e?.onFloatingFilterChanged(n||null,r||null)}))}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},Aa=".ag-input-field-input",Ia=class{constructor(e,t,o,i,s,n){this.context=e,this.eParent=s,this.alive=!0,this.debouncedReport=_debounce({isAlive:()=>this.alive},reportValidity,500),this.timeoutHandle=null;const r=function _getDateCompDetails(e,t,o){return e.getCompDetails(t,Fe,"agDateInput",o,!0)}(t,o,i);r?.newAgStackInstance().then((t=>{if(!this.alive)return void e.destroyBean(t);if(this.dateComp=t,!t)return;s.appendChild(t.getGui()),t?.afterGuiAttached?.();const{tempValue:o,disabled:i}=this;o&&t.setDate(o),null!=i&&t.setDisabled?.(i),n?.(this)}))}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){_setDisplayed(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t=!1){const o=this.dateComp?.getGui().querySelector(Aa);if(o&&"setCustomValidity"in o){const i=e.length>0;o.setCustomValidity(e),i?t?this.timeoutHandle=this.debouncedReport(o):reportValidity(o):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),_setAriaInvalid(o,i)}}getValidity(){return this.dateComp?.getGui().querySelector(Aa)?.validity}};function reportValidity(e){e.reportValidity()}var ka=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function mapValuesFromDateFilterModel(e,t){const{dateFrom:o,dateTo:i,type:s}=e||{};return[o&&_parseDateTimeFromString(o,void 0,!0)||null,i&&_parseDateTimeFromString(i,void 0,!0)||null].slice(0,getNumberOfInputs(s,t))}var La=1/0;var _a=class extends Da{constructor(e,t){super(e,t,(e=>{const{dataTypeSvc:o,valueSvc:i}=this.beans,s=t.column,n=o?.getDateFormatterFunction(s),r=n?n(e??void 0):e;return i.formatValue(s,null,r)})),this.filterTypeKeys=Ra}conditionToString(e,t,o,i,s){const{type:n}=e,r=_parseDateTimeFromString(e.dateFrom),a=_parseDateTimeFromString(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,d=t?this.formatValue.bind(this):e=>function _dateToFormattedString(e,t){if(null==t)return _serialiseDate(e,!1);const o=_padStartWidthZeros(e.getFullYear(),4),i={YYYY:()=>o.slice(o.length-4,o.length),YY:()=>o.slice(o.length-2,o.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>ui[e.getMonth()],MMM:()=>ui[e.getMonth()].slice(0,3),MM:()=>_padStartWidthZeros(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${calculateOrdinal(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${calculateOrdinal(e.getDate())}`,DD:()=>_padStartWidthZeros(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>hi[e.getDay()],ddd:()=>hi[e.getDay()].slice(0,3),dd:()=>hi[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${calculateOrdinal(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(i).join("|"),"g");return t.replace(s,(e=>e in i?i[e]():e))}(e,l),formattedFrom=()=>null!==r?d(r):"null",formattedTo=()=>null!==a?d(a):"null";if(null==r&&null==a)return translateForFilter(this,n);if(t){const e=this.conditionForToolPanel(n,o,formattedFrom,formattedTo,i,s);if(null!=e)return e}return o?`${formattedFrom()}-${formattedTo()}`:null!=r?d(r):`${n}`}};function defaultDateComparator(e,t){return t<e?-1:t>e?1:0}var Ga=null,setStartOfDay=e=>(e.setHours(0,0,0,0),e),setStartOfWeek=e=>{const t=(e.getDay()-(()=>{if(null!=Ga)return Ga;let e;const t="undefined"==typeof navigator?void 0:navigator.languages?.[0]??navigator.language;if(t&&"undefined"!=typeof Intl&&"function"==typeof Intl.Locale)try{const o=new Intl.Locale(t).getWeekInfo?.();e=o?.firstDay}catch{e=void 0}return Ga=null==e?1:e%7})()+7)%7;return e.setDate(e.getDate()-t),setStartOfDay(e)},setPreviousNDay=(e,t=1)=>(e.setDate(e.getDate()-t),e),setStartOfNextDay=e=>(e.setDate(e.getDate()+1),setStartOfDay(e)),setStartOfNextWeek=e=>(setStartOfWeek(e),e.setDate(e.getDate()+6),setStartOfNextDay(e)),setStartOfMonth=e=>(e.setDate(1),setStartOfDay(e)),setStartOfNextMonth=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),setStartOfDay(e)),setStartOfQuarter=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(3*t),setStartOfMonth(e)},setStartOfNextQuarter=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(3*t+2),setStartOfNextMonth(e)},setStartOfYear=e=>(e.setMonth(0,1),setStartOfDay(e)),setStartOfNextYear=e=>(e.setMonth(12,0),setStartOfNextDay(e)),setPreviousDay=e=>setPreviousNDay(e),setPreviousWeek=e=>setPreviousDay(setStartOfWeek(e)),setPreviousMonth=e=>setPreviousDay(setStartOfMonth(e)),setPreviousQuarter=e=>setPreviousDay(setStartOfQuarter(e)),today=(e,t)=>[setStartOfDay(e),setStartOfNextDay(t)],thisWeek=(e,t)=>[setStartOfWeek(e),setStartOfNextWeek(t)],thisMonth=(e,t)=>[setStartOfMonth(e),setStartOfNextMonth(t)],thisQuarter=(e,t)=>[setStartOfQuarter(e),setStartOfNextQuarter(t)],thisYear=(e,t)=>[setStartOfYear(e),setStartOfNextYear(t)],Na={today,yesterday:(e,t)=>today(setPreviousDay(e),setPreviousDay(t)),tomorrow:(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),today(e,t)),thisWeek,lastWeek:(e,t)=>thisWeek(setPreviousWeek(e),setPreviousWeek(t)),nextWeek:(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),thisWeek(e,t)),thisMonth,lastMonth:(e,t)=>thisMonth(setPreviousMonth(e),setPreviousMonth(t)),nextMonth:(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),thisMonth(e,t)),thisQuarter,lastQuarter:(e,t)=>thisQuarter(setPreviousQuarter(e),setPreviousQuarter(t)),nextQuarter:(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),thisQuarter(e,t)),thisYear,lastYear:(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),thisYear(e,t)),nextYear:(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),thisYear(e,t)),yearToDate:(e,t)=>[setStartOfYear(e),setStartOfNextDay(t)],last7Days:(e,t)=>[setStartOfDay(setPreviousNDay(e,7)),setStartOfNextDay(t)],last30Days:(e,t)=>[setStartOfDay(setPreviousNDay(e,30)),setStartOfNextDay(t)],last90Days:(e,t)=>[setStartOfDay(setPreviousNDay(e,90)),setStartOfNextDay(t)],last6Months:(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[setStartOfDay(e),setStartOfNextDay(t)]),last12Months:(e,t)=>(e.setFullYear(e.getFullYear()-1),[setStartOfDay(e),setStartOfNextDay(t)]),last24Months:(e,t)=>(e.setFullYear(e.getFullYear()-2),[setStartOfDay(e),setStartOfNextDay(t)]),setStartOfDay,setStartOfWeek,setStartOfNextDay,setStartOfNextWeek,setStartOfMonth,setStartOfNextMonth,setStartOfQuarter,setStartOfNextQuarter,setStartOfYear,setStartOfNextYear,setPreviousDay,setPreviousWeek,setPreviousMonth,setPreviousQuarter},Va={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},Oa={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]};function parseOrConstructDate(e,t,o){return e&&t&&_warn(o?85:86),e instanceof Date?e:e?_parseDateTimeFromString(e):t?_parseDateTimeFromString(`${t}-${o?"01-01":"12-31"}`):null}var Ha=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function getAllowedCharPattern2(e){return e?.allowedCharPattern??null}function processNumberFilterValue(e){return null==e||isNaN(e)?null:e}function mapValuesFromNumberFilterModel(e,t){const{filter:o,filterTo:i,type:s}=e||{};return[processNumberFilterValue(o),processNumberFilterValue(i)].slice(0,getNumberOfInputs(s,t))}function stringToFloat(e,t){if("number"==typeof t)return t;let o=_makeNull(t);return null!=o&&""===o.trim()&&(o=null),e?e(o):null==o||"-"===o.trim()?null:Number.parseFloat(o)}function getNormalisedValue(e,t){return processNumberFilterValue(stringToFloat(e,t.getValue(!0)))}var Ba=class extends Da{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=Ra}conditionToString(e,t,o,i,s){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const e=this.conditionForToolPanel(a,o,(()=>l(n)),(()=>l(r)),i,s);if(null!=e)return e}return o?`${l(n)}-${l(r)}`:null!=n?l(n):`${a}`}},Wa=class extends m{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new Fr),this.eTextInput=this.createManagedBean(new fr),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),o=this.eTextInput.getGui();e.appendChild(t),e.appendChild(o),this.setupListeners(t,(e=>this.onValueChanged(e))),this.setupListeners(o,(e=>this.onValueChanged(e)))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:o}){this.setAriaLabel(e),void 0!==t&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,o),this.setPlaceholder(this.eTextInput,o)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},za=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],Ua=class extends Da{constructor(){super(...arguments),this.filterTypeKeys=Fa}conditionToString(e,t,o,i,s){const{filter:n,filterTo:r,type:a}=e;if(t){const getValueFunc=e=>()=>translateForFilter(this,"filterSummaryTextQuote",[e]),e=this.conditionForToolPanel(a,o,getValueFunc(n),getValueFunc(r),i,s);if(null!=e)return e}return o?`${n}-${r}`:null!=n?`${n}`:`${a}`}},defaultMatcher=({filterOption:e,value:t,filterText:o})=>{if(null==o)return!1;switch(e){case"contains":return t.includes(o);case"notContains":return!t.includes(o);case"equals":return t===o;case"notEqual":return t!=o;case"startsWith":return 0===t.indexOf(o);case"endsWith":{const e=t.lastIndexOf(o);return e>=0&&e===t.length-o.length}default:return!1}},defaultFormatter=e=>e,defaultLowercaseFormatter=e=>null==e?null:e.toString().toLowerCase();var $a={moduleName:"ClientSideRowModelFilter",version:I,rowModels:["clientSide"],beans:[class extends m{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){const filterCallback=(t,o)=>{t.hasChildren()?t.childrenAfterFilter=e&&!o?t.childrenAfterGroup.filter((e=>{const t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,o=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||o})):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,updateRowNodeAfterFilter(t)};if(this.doingTreeDataFiltering()){const treeDataDepthFirstFilter=(e,t)=>{if(e.childrenAfterGroup)for(let o=0;o<e.childrenAfterGroup.length;o++){const i=e.childrenAfterGroup[o],s=t||this.filterManager.doesRowPassFilter({rowNode:i});i.childrenAfterGroup?treeDataDepthFirstFilter(e.childrenAfterGroup[o],s):filterCallback(i,s)}filterCallback(e,t)},treeDataFilterCallback=e=>treeDataDepthFirstFilter(e,!1);t.executeFromRootNode(treeDataFilterCallback)}else{const defaultFilterCallback=e=>filterCallback(e,!1);t.forEachChangedNodeDepthFirst(defaultFilterCallback,!0)}}softFilter(e,t){t.forEachChangedNodeDepthFirst((t=>{if(t.childrenAfterFilter=t.childrenAfterGroup,t.hasChildren())for(const o of t.childrenAfterGroup)o.softFiltered=e&&!(o.data&&this.filterManager.doesRowPassFilter({rowNode:o}));updateRowNodeAfterFilter(t)}),!0)}doingTreeDataFiltering(){const{gos:e}=this;return e.get("treeData")&&!e.get("excludeChildrenWhenTreeDataFiltering")}}]},Ka={moduleName:"FilterCore",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:e})=>this.onAdvFilterEnabledChanged(e),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],(()=>{this.onFilterChanged({source:"api"})})),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",(()=>{this.updateAggFiltering(),this.onFilterChanged()})),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:o}=this;this.alwaysPassFilter=o.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",(()=>{this.alwaysPassFilter=o.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})}))}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e)}setFilterState(e,t,o="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,o)}setFilterModel(e,t="api",o){this.isAdvFilterEnabled()?o||this.warnAdvFilters():this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){_getGroupAggFiltering(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:o,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):me.resolve()).then((()=>{const e={source:t,type:"filterChanged",columns:i};o&&_mergeDeep(e,o),this.eventSvc.dispatchEvent(e),this.colFilter?.updateAfterFilterChanged()}))}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!_getGroupAggFiltering(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return!!this.alwaysPassFilter?.(t)||!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t))&&!(this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return!!this.alwaysPassFilter?.(t)||!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t))&&(!(this.externalFilterPresent&&!this.doesExternalFilterPass(t))&&(!(this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip))&&!(this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))))}isFilterAllowed(e){return!this.isAdvFilterEnabled()&&!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){this.isAdvFilterEnabled()&&(this.beans.dataTypeSvc?.isPendingInference?this.advFilterModelUpdateQueue.push(e):(this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})))}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvFilterEnabled()&&!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){_warn(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}}],apiFunctions:{isAnyFilterPresent:function isAnyFilterPresent(e){return!!e.filterManager?.isAnyFilterPresent()},onFilterChanged:function onFilterChanged(e,t="api"){e.filterManager?.onFilterChanged({source:t})}},css:[".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}"],dependsOn:[$a]},ja={moduleName:"FilterValue",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,o){if(!t)return;const i=e.getColDef(),{selectableFilter:s,valueSvc:n,formula:r}=this.beans,a=o??s?.getFilterValueGetter(e.getColId())??i.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,i);const l=n.getValue(e,t,"data");return e.isAllowFormula()&&r?.isFormula(l)?r.resolveValue(e,t):l}executeFilterValueGetter(e,t,o,i,s){const{expressionSvc:n,valueSvc:r}=this.beans,a=_addGridCommonParams(this.gos,{data:t,node:i,column:o,colDef:s,getValue:r.getValueCallback.bind(r,i)});return"function"==typeof e?e(a):n?.evaluate(e,a)}}]},qa={moduleName:"ColumnFilter",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...na},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",o){const{colModel:i,dataTypeSvc:s,filterManager:n}=this.beans;if(s?.isPendingInference)return void this.modelUpdates.push({model:e,source:t});const r=[],a=this.getModel(!0);if(e){const t=new Set(Object.keys(e));this.allColumnFilters.forEach(((o,i)=>{const s=e[i];r.push(this.setModelOnFilterWrapper(o,s)),t.delete(i)})),t.forEach((t=>{const o=i.getColDefCol(t)||i.getCol(t);if(!o)return void _warn(62,{colId:t});if(!o.isFilterAllowed())return void _warn(63,{colId:t});const s=this.getOrCreateFilterWrapper(o,!0);s?r.push(this.setModelOnFilterWrapper(s,e[t],!0)):_warn(64,{colId:t})}))}else this.model={},this.allColumnFilters.forEach((e=>{r.push(this.setModelOnFilterWrapper(e,null))}));me.all(r).then((()=>{const e=this.getModel(!0),i=[];this.allColumnFilters.forEach(((t,o)=>{const s=a?a[o]:null,n=e?e[o]:null;_jsonEquals(s,n)||i.push(t.column)})),i.length>0?n?.onFilterChanged({columns:i,source:t}):o&&this.updateActive("filterChanged")}))}getModel(e){const t={},{allColumnFilters:o,initialModel:i,beans:{colModel:s}}=this;if(o.forEach(((e,o)=>{const i=this.getModelFromFilterWrapper(e);_exists(i)&&(t[o]=i)})),!e)for(const e of Object.keys(i)){const n=i[e];_exists(n)&&!o.has(e)&&s.getCol(e)?.isFilterAllowed()&&(t[e]=n)}return t}setState(e,t,o="api"){if(this.state.clear(),t)for(const e of Object.keys(t)){const o=t[e];this.state.set(e,{model:_getFilterModel(this.model,e),state:o})}this.setModel(e,o,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let o=!1;return e.forEach(((e,i)=>{const s=e.state;null!=s&&(o=!0,t[i]=s)})),o?t:void 0}getModelFromFilterWrapper(e){const t=e.column.getColId();if(e.isHandler)return _getFilterModel(this.model,t);const o=e.filter;return o?"function"!=typeof o.getModel?(_warn(66),null):o.getModel():_getFilterModel(this.initialModel,t)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return!!e.size&&(e.forEach((e=>this.disposeFilterWrapper(e,"advancedFilterEnabled"))),!0)}updateActiveFilters(){const{colModel:e,gos:t}=this.beans,o=!!_getGroupAggFiltering(t),i=[],s=[],addFilter=(t,n,r)=>{n&&(isAggFilter(t,e.isPivotMode(),e.isPivotActive(),o)?i.push(r):s.push(r))},n=[];return this.allColumnFilters.forEach((e=>{const t=e.column,o=t.getColId();if(e.isHandler)n.push(me.resolve().then((()=>{addFilter(t,this.isHandlerActive(t),{colId:o,isHandler:!0,handler:e.handler,handlerParams:e.handlerParams})})));else{const i=getFilterUiFromWrapper(e);i&&n.push(i.then((e=>{addFilter(t,(e=>!!e&&(e.isFilterActive?e.isFilterActive():(_warn(67),!1)))(e),{colId:o,isHandler:!1,comp:e})})))}})),me.all(n).then((()=>{this.activeAggregateFilters=i,this.activeColumnFilters=s}))}updateFilterFlagInColumns(e,t){const o=[];return this.allColumnFilters.forEach((i=>{const s=i.column;if(i.isHandler)o.push(me.resolve().then((()=>{this.setColFilterActive(s,this.isHandlerActive(s),e,t)})));else{const n=getFilterUiFromWrapper(i);n&&o.push(n.then((o=>{this.setColFilterActive(s,o.isFilterActive(),e,t)})))}})),this.beans.groupFilter?.updateFilterFlags(e,t),me.all(o)}doFiltersPass(e,t,o){const{data:i,aggData:s}=e,n=o?this.activeAggregateFilters:this.activeColumnFilters,r=o?s:i,a=this.model;for(let o=0;o<n.length;o++){const i=n[o],{colId:s,isHandler:l}=i;if(s!==t)if(l){const{handler:t,handlerParams:o}=i;if(!t.doesFilterPass({node:e,data:r,model:_getFilterModel(a,s),handlerParams:o}))return!1}else{const t=i.comp;if("function"!=typeof t.doesFilterPass){_error(91);continue}if(!t.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:o}=this.beans,action=()=>{this.isAlive()&&o?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(action,0):action()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:o}=e,i=t?.getColId();return this.updateActiveFilters().then((()=>this.updateFilterFlagInColumns("filterChanged",o).then((()=>{this.allColumnFilters.forEach((e=>{const{column:t,isHandler:o}=e;i!==t.getColId()&&(o&&e.handler.onAnyFilterChanged?.(),getFilterUiFromWrapper(e,o)?.then((e=>{"function"==typeof e?.onAnyFilterChanged&&e.onAnyFilterChanged()})))})),this.processingFilterChange=!0}))))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach((e=>{const o=e.isHandler;o&&e.handler.onNewRowsLoaded?.();const i=getFilterUiFromWrapper(e,o);i&&t.push(i.then((e=>{e.onNewRowsLoaded?.()})))})),me.all(t).then((()=>this.updateActive(e,{afterDataChange:!0})))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then((()=>this.updateActiveFilters()))}createGetValue(e,t){const{filterValueSvc:o,colModel:i}=this.beans;return(s,n)=>{const r=n?i.getCol(n):e;return r?o.getValue(r,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const o=t?.filter;return o?o.isFilterActive():null!=_getFilterModel(this.initialModel,e.getColId())}isHandlerActive(e){const t=_exists(_getFilterModel(this.model,e.getColId()));if(t)return t;const o=this.beans.groupFilter;return!!o?.isGroupFilter(e)&&o.isFilterActive(e)}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?getFilterUiFromWrapper(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const o=getFilterUiFromWrapper(t);return o?o.then((e=>({comp:e,params:t.filterUi.filterParams,isHandler:t.isHandler}))):null}getHandler(e,t){const o=this.getOrCreateFilterWrapper(e,t);return o?.isHandler?o.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let o=this.cachedFilter(e);return!o&&t&&(o=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,o)),o}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType((()=>this.beans.dataTypeSvc?.getBaseDataType(e)),t)}getDefaultFilterFromDataType(e,t=!1){return function _isSetFilterByDefault(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":function _getDefaultSimpleFilter(e,t=!1){return(t?ga:ha)[e??"text"]}(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,o,i,s,n){const createFilterCompDetails=()=>{const r=this.createFilterCompParams(e,s,n),a=i(r,s);return function _getFilterDetails(e,t,o,i){const s=t.filter;return isColumnFilterComp(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,Le,i,o,!0)}(this.beans.userCompFactory,t,a,o)},r=createFilterCompDetails();if(!r)return null;return{compDetails:r,createFilterUi:e=>(e?createFilterCompDetails():r).newAgStackInstance()}}createFilterInstance(e,t,o,i){const s=this.beans.selectableFilter;s?.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,o)??{},l=this.createFilterComp(e,t,o,i,!!n,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:a,handlerParams:r};const{compDetails:d,createFilterUi:c}=l;if(this.isGlobalButtons){!!d.params?.buttons?.length||_warn(281,{colId:e.getColId()})}return{compDetails:d,handler:n,handlerGenerator:a,handlerParams:r,createFilterUi:c}}createBaseFilterParams(e,t){const{filterManager:o,rowModel:i}=this.beans;return _addGridCommonParams(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:t=>o?.doesRowPassOtherFilters(e.getColId(),t)??!0,rowModel:i})}createFilterCompParams(e,t,o,i){const s=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,i);if(n.filterChangedCallback=s,n.filterModifiedCallback=i?()=>{}:t=>this.filterModified(e,t),t){const t=n,i=e.getColId(),r=_getFilterModel(this.model,i);t.model=r,t.state=this.state.get(i)??{model:r},t.onModelChange=(t,o)=>{this.updateStoredModel(i,t),this.refreshHandlerAndUi(e,t,"ui",!1,o).then((()=>{s({...o,source:"columnFilter"})}))},t.onStateChange=t=>{this.updateState(e,t),this.updateOrRefreshFilterUi(e)},t.onAction=(t,o,i)=>{this.updateModel(e,t,o),this.dispatchLocalEvent({type:"filterAction",column:e,action:t,event:i})},t.getHandler=()=>this.getHandler(e,!0),t.onUiChange=t=>this.filterUiChanged(e,t),t.source=o}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,o){const i=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(o),s}createFilterWrapper(e){const{compDetails:t,handler:o,handlerGenerator:i,handlerParams:s,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),(e=>e)),r=e.getColId();if(o)return delete this.initialModel[r],o.init?.({...s,source:"init",model:_getFilterModel(this.model,r)}),{column:e,isHandler:!0,handler:o,handlerGenerator:i,handlerParams:s,filterUi:this.createFilterUiForHandler(t,n)};if(n){const o={column:e,filterUi:null,isHandler:!1};return o.filterUi=this.createFilterUiLegacy(t,n,(e=>{o.filter=e??void 0})),o}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,o){const{gos:i,frameworkOverrides:s,registry:n}=this.beans;let r;const a=i.get("enableFilterHandlers"),l=a?(e=>{const t=e.filter;if(isColumnFilterComp(t)){const e=t.handler;return e||(r=t.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return"string"==typeof t?t:void 0})(t):void 0,resolveProvidedFilterHandler=e=>()=>this.createBean(n.createDynamicBean(e,!0));let d,c;if("string"==typeof l){const e=i.get("filterHandlers")?.[l];null!=e?d=e:ra.has(l)&&(d=resolveProvidedFilterHandler(l),c=l)}else d=l;if(!d){let e;const{compName:i,jsComp:n,fwComp:r}=_getFilterCompKeys(s,t);if(i)e=i;else{null==n&&null==r&&!0===t.filter&&(e=o)}c=this.handlerMap[e],c&&(d=resolveProvidedFilterHandler(c))}if(!d){if(!a)return;return _isClientSideRowModel(i)&&_warn(277,{colId:e.getColId()}),pa}return{filterHandler:d,handlerNameOrCallback:r??c}}createHandler(e,t,o){const i=this.createHandlerFunc(e,t,o);if(!i)return;const s=_mergeFilterParamsWithApplicationProvidedParams(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,s);return{handler:a,handlerParams:l,handlerGenerator:n??r}}createHandlerFromFunc(e,t,o){const i=e.getColDef();return{handler:t(_addGridCommonParams(this.gos,{column:e,colDef:i})),handlerParams:this.createHandlerParams(e,o)}}createHandlerParams(e,t){const o=e.getColDef(),i=e.getColId(),s=this.filterChangedCallbackFactory(e);return _addGridCommonParams(this.gos,{colDef:o,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:e=>this.beans.filterManager?.doesRowPassOtherFilters(i,e)??!0,onModelChange:(t,o)=>{this.updateStoredModel(i,t),this.refreshHandlerAndUi(e,t,"handler",!1,o).then((()=>{s({...o,source:"columnFilter"})}))},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:o,groupFilter:i}=this.beans;this.allColumnFilters.forEach(((o,i)=>{let s;s=o.column.isPrimary()?t.getColDefCol(i):t.getCol(i),s&&s===o.column||(e.push(o.column),this.disposeFilterWrapper(o,"columnChanged"),this.disposeColumnListener(i))}));const s=i&&e.every((e=>i.isGroupFilter(e)));e.length>0&&!s&&o?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const t=this.beans.groupFilter;return!t?.isGroupFilter(e)||t.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){const{userCompFactory:o,frameworkOverrides:i,selectableFilter:s,gos:n}=this.beans,r=e.getColDef(),a=s?.isSelectable(r)?s.getFilterDef(e,r):r,l=function _getDefaultFloatingFilterType(e,t,o){if(null==t)return null;let i=null;const{compName:s,jsComp:n,fwComp:r}=_getFilterCompKeys(e,t);s?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:null==n&&null==r&&!0===t.filter&&(i=o());return i}(i,a,(()=>this.getDefaultFloatingFilter(e)))??"agReadOnlyFloatingFilter",d=n.get("enableFilterHandlers"),c=_mergeFilterParamsWithApplicationProvidedParams(o,a,this.createFilterCompParams(e,d,"init",!0)),u=_addGridCommonParams(n,{column:e,filterParams:c,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:t=>{this.getOrCreateFilterUi(e)?.then((e=>{t(_unwrapUserComp(e))}))},showParentFilter:t});if(d){const t=u,o=e.getColId(),i=this.filterChangedCallbackFactory(e);t.onUiChange=t=>this.floatingFilterUiChanged(e,t),t.model=_getFilterModel(this.model,o),t.onModelChange=(t,s)=>{this.updateStoredModel(o,t),this.refreshHandlerAndUi(e,t,"floating",!0,s).then((()=>{i({...s,source:"columnFilter"})}))},t.getHandler=()=>this.getHandler(e,!0),t.source="init"}return function _getFloatingFilterCompDetails(e,t,o,i){return e.getCompDetails(t,_e,i,o)}(o,r,u,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,o,i){const s="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,a=this.createFilterUiForHandler(o,i);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then((e=>{this.destroyBean(e),l.dispatchEvent({type:"filterDestroyed",source:s,column:t})})):l.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const o=e.getColId(),i=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialModel[o],i&&this.disposeFilterWrapper(i,t).then((t=>{t&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})}))}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let o=!1;const{column:i,isHandler:s,filterUi:n}=e,r=i.getColId();s&&(o=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const removeFilter=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(n){if(n.created)return n.promise.then((e=>(o=s?o:!!e?.isFilterActive(),this.destroyBean(e),removeFilter(),o)));removeFilter()}return me.resolve(o)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const o=this.allColumnFilters.get(e);if(!o)return;const i=this.beans,s=o.column,n=s.getColDef(),r=s.isFilterAllowed(),a=this.getDefaultFilter(s),l=i.selectableFilter,d=l?.isSelectable(n)?l.getFilterDef(s,n):n,c=r?this.createHandlerFunc(s,d,this.getDefaultFilter(s)):void 0,u=!!c,h=o.isHandler;if(h!=u)return void this.destroyFilter(s,"paramsUpdated");const{compDetails:g,createFilterUi:p}=(r?this.createFilterComp(s,d,a,(e=>e),u,"colDef"):null)??{compDetails:null,createFilterUi:null},m=g?.params??_mergeFilterParamsWithApplicationProvidedParams(i.userCompFactory,d,this.createFilterCompParams(s,u,"colDef"));if(h){const i=c?.handlerNameOrCallback??c?.filterHandler,n=_getFilterModel(this.model,e);if(o.handlerGenerator!=i){const r=o.handler,{handler:a,handlerParams:l}=this.createHandlerFromFunc(s,c.filterHandler,m);o.handler=a,o.handlerParams=l,o.handlerGenerator=i,delete this.model[e],a.init?.({...l,source:"init",model:null}),this.destroyBean(r),null!=n&&this.beans.filterManager?.onFilterChanged({columns:[s],source:t})}else{const e=this.createHandlerParams(s,g?.params);o.handlerParams=e,o.handler.refresh?.({...e,source:"colDef",model:n})}}!this.areFilterCompsDifferent(o.filterUi?.compDetails??null,g)&&o.filterUi&&g?(o.filterUi.filterParams=m,getFilterUiFromWrapper(o,h)?.then((e=>{!1===(!e?.refresh||e.refresh(m))?this.destroyFilterUi(o,s,g,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:m})}))):this.destroyFilterUi(o,s,g,p)}refreshHandlerAndUi(e,t,o,i,s){const n=this.cachedFilter(e);if(!n)return i&&this.getOrCreateFilterWrapper(e,!0),me.resolve();if(!n.isHandler)return me.resolve();const{filterUi:r,handler:a,handlerParams:l}=n;return function _refreshHandlerAndUi(e,t,o,i,s,n,r){return t.refresh?.({...o,model:i,source:n,additionalEventAttributes:r}),e().then((e=>{if(e){const{filter:t,filterParams:o}=e;_refreshFilterUi(t,o,i,s,n,r)}}))}((()=>{if(r){const{created:e,filterParams:t}=r;if(e)return r.promise.then((e=>e?{filter:e,filterParams:t}:void 0));r.refreshed=!0}return me.resolve(void 0)}),a,l,t,this.state.get(e.getColId())??{model:t},o,s)}setColumnFilterWrapper(e,t){const o=e.getColId();this.allColumnFilters.set(o,t),this.allColumnListeners.set(o,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(o)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:o}=e,{componentClass:i}=t;return!(o===i||o?.render&&i?.render&&o.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some((e=>e.getColDef().floatingFilter))}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const o=this.getOrCreateFilterUi(t);return o?new Promise((e=>{o.then((t=>{e(_unwrapUserComp(t))}))})):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach((({model:e,source:t})=>this.setModel(e,t))),this.modelUpdates=[],this.columnModelUpdates.forEach((({key:e,model:t,resolve:o})=>{this.setModelForColumn(e,t).then((()=>o()))})),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:t,model:o}=this,i=e.getColId(),s=t.get(i);return s?s.model??null:_getFilterModel(o,i)}const o=this.cachedFilter(e);return o?this.getModelFromFilterWrapper(o):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let resolve=()=>{};const o=new Promise((e=>{resolve=e}));return this.columnModelUpdates.push({key:e,model:t,resolve}),o}return new Promise((o=>{this.setModelForColumnLegacy(e,t).then((e=>o(e)))}))}getStateForColumn(e){return this.state.get(e)??{model:_getFilterModel(this.model,e)}}setModelForColumnLegacy(e,t){const o=this.beans.colModel.getColDefCol(e),i=o?this.getOrCreateFilterWrapper(o,!0):null;return i?this.setModelOnFilterWrapper(i,t):me.resolve()}setColDefPropsForDataType(e,t,o){const i=e.filter,s=!0===i?this.getDefaultFilterFromDataType((()=>t.baseDataType)):i;if("string"!=typeof s)return;let n,r;const a=this.beans,{filterParams:l,filterValueGetter:d}=e;({filterParams:n,filterValueGetter:r}="agMultiColumnFilter"===s?a.multiFilter?.getParamsForDataType(l,d,t,o)??{}:function _getFilterParamsForDataType(e,t,o,i,s,n,r){let a=t,l=o;const d="agSetColumnFilter"===e;l||"object"!==i.baseDataType||d||(l=({column:e,node:t})=>s({column:e,node:t,value:n.valueSvc.getValue(e,t,"data")}));const c=(0,(d?ua:ca)[i.baseDataType])({dataTypeDefinition:i,formatValue:s,t:r});return a="object"==typeof t?{...c,...t}:c,{filterParams:a,filterValueGetter:l}}(s,l,d,t,o,a,this.getLocaleTextFunc())),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,o,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",o)),e.dispatchColEvent("filterChanged",o,i)}setModelOnFilterWrapper(e,t,o){return new me((i=>{if(e.isHandler){const s=e.column,n=s.getColId(),r=this.model[n];return this.updateStoredModel(n,t),o&&t===r?void i():void this.refreshHandlerAndUi(s,t,"api").then((()=>i()))}const s=getFilterUiFromWrapper(e);s?s.then((e=>{if("function"!=typeof e?.setModel)return _warn(65),void i();(e.setModel(t)||me.resolve()).then((()=>i()))})):i()}))}updateStoredModel(e,t){_exists(t)?this.model[e]=t:delete this.model[e];const o={model:t,state:this.state.get(e)?.state};this.state.set(e,o)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then((o=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:o,...t})}))}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,o){const i=e.getColId(),s=this.cachedFilter(e),getFilterUi=()=>s?.filterUi;_updateFilterModel({action:t,filterParams:s?.filterUi?.filterParams,getFilterUi,getModel:()=>_getFilterModel(this.model,i),getState:()=>this.state.get(i),updateState:t=>this.updateState(e,t),updateModel:e=>getFilterUi()?.filterParams?.onModelChange(e,{...o,fromAction:t}),processModelToApply:s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0})}updateAllModels(e,t){const o=[];this.allColumnFilters.forEach(((t,i)=>{const s=this.beans.colModel.getColDefCol(i);s&&_updateFilterModel({action:e,filterParams:t.filterUi?.filterParams,getFilterUi:()=>t.filterUi,getModel:()=>_getFilterModel(this.model,i),getState:()=>this.state.get(i),updateState:e=>this.updateState(s,e),updateModel:t=>{this.updateStoredModel(i,t),this.dispatchLocalEvent({type:"filterAction",column:s,action:e}),o.push(this.refreshHandlerAndUi(s,t,"ui"))},processModelToApply:t?.isHandler?t.handler.processModelToApply?.bind(t.handler):void 0})})),o.length&&me.all(o).then((()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})}))}updateOrRefreshFilterUi(e){const t=e.getColId();getAndRefreshFilterUi((()=>this.cachedFilter(e)?.filterUi),(()=>_getFilterModel(this.model,t)),(()=>this.state.get(t)))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:o}=this;for(const e of o)if("COLUMN_MENU"===e.source)return!1;let i=!1;for(const o of e.keys()){const s=e.get(o);if(!1===s.valid)return!1;(s.model??null)!==_getFilterModel(t,o)&&(i=!0)}return i}hasUnappliedModel(e){const{model:t,state:o}=this;return(o.get(e)?.model??null)!==_getFilterModel(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if("newFiltersToolPanel"===t)return!0;const o=this.beans.filterPanelSvc;return!!o?.isActive&&!!o.getState(e.getColId())}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:o}=this.beans,i=!!_getGroupAggFiltering(this.gos),s=e.currentValue,n=s?this.activeColumnFilters:this.activeAggregateFilters,r=s?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const e of n){const n=t.getColById(e.colId),l=s&&!!o?.columns.length;n&&s===isAggFilter(n,s,l,i)&&(r.push(e),a.push(e))}!function _removeAllFromArray(e,t){let o=0,i=0;for(;o<e.length;o++)t.includes(e[o])||(e[i]=e[o],i++);for(;i<e.length;)e.pop()}(n,a)}destroy(){super.destroy(),this.allColumnFilters.forEach((e=>this.disposeFilterWrapper(e,"gridDestroyed"))),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}},class extends m{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,o,i){e&&!e.isColumn||this.showPopup(e,(i=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:o,mouseEvent:t,ePopup:i})}),o,t.target,_isLegacyMenuEnabled(this.gos),i)}showMenuAfterButtonClick(e,t,o,i){if(e&&!e.isColumn)return;let s=-1,n="left";const r=_isLegacyMenuEnabled(this.gos);!r&&this.gos.get("enableRtl")&&(s=1,n="right");const a=r?void 0:4*s,l=r?void 0:4;this.showPopup(e,(i=>{this.popupSvc?.positionPopupByComponent({type:o,eventSource:t,ePopup:i,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})}),o,t,r,i)}showPopup(e,t,o,i,s,n){const r=e?this.createBean(new Ue(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e)return void _error(57);const a=_createElement({tag:"div",cls:"ag-menu"+(s?"":" ag-filter-menu"),role:"presentation"});let l;[this.tabListener]=this.addManagedElementListeners(a,{keydown:e=>this.trapFocusWithin(e,a)}),a.appendChild(r?.getGui());const d=function _isColumnMenuAnchoringEnabled(e){return!_isLegacyMenuEnabled(e)}(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,c=this.getLocaleTextFunc(),u=s&&"columnFilter"!==o?c("ariaLabelColumnMenu","Column Menu"):c("ariaLabelColumnFilter","Column Filter"),h=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:t=>{_setColMenuVisible(e,!1,"contextMenu");const s=t instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),s&&i&&_isVisible(i)){_findTabbableParent(i)?.focus({preventScroll:!0})}r?.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),n?.()},positionCallback:()=>t(a),anchorToElement:d,ariaLabel:u});h&&(this.hidePopup=l=h.hideFunc),r.afterInit().then((()=>{t(a),r.afterGuiAttached({container:o,hidePopup:l})})),_setColMenuVisible(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,o,e)}trapFocusWithin(e,t){e.key!==q||e.defaultPrevented||_findNextFocusableElement(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),_focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,o){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:o??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}}],dynamicBeans:{headerFilterCellCtrl:class extends mt{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,o,i,s){this.comp=e;const n=setupCompBean(this,this.beans.context,s);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const colDefChanged=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged}),n.addManagedEventListeners({filterSwitched:({column:e})=>{e===this.column&&colDefChanged()}}),n.addDestroyFunc((()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()}))}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return _addGridCommonParams(t.gos,{colDef:o,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,o=!!e.floatingFilter;this.active=t&&o}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=_createIconNoSpan("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new at(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();_setAriaLabel(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(_getActiveDomElement(t)===this.eGui)return;const o=_findNextFocusableElement(t,this.eGui,null,e.shiftKey);if(o)return t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),void o.focus();const i=this.findNextColumnWithFloatingFilter(e.shiftKey);i&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:i},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let o=this.column;do{if(o=e?t.getColBefore(o):t.getColAfter(o),!o)break}while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case X:case te:case J:case ee:if(t)return;_stopPropagationForAgGrid(e);case Y:t&&_focusInto(this.eGui)&&e.preventDefault();break;case Q:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&_isElementChildOfClass(e.relatedTarget,"ag-floating-filter");if(t&&o&&e.target===this.eGui){const e=this.lastFocusEvent,t=!(!e||e.key!==q);if(e&&t){const t=e.shiftKey;_focusInto(this.eGui,t)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new ht(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!_isLegacyMenuEnabled(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,(()=>this.showParentFilter()));e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:o,gos:i}=this,syncWithFilter=e=>{if(!("filterDestroyed"!==e?.source||this.isAlive()&&t?.isAlive()))return;const s=this.comp.getFloatingFilterComp();s&&s.then((s=>{if(s){if(i.get("enableFilterHandlers")){const t=e;let o="filter";return t?.afterFloatingFilter?o="ui":t?.afterDataChange?o="dataChanged":"api"===e?.source&&(o="api"),void this.updateFloatingFilterParams(this.userCompDetails,o)}const n=t?.getCurrentFloatingFilterParentModel(o),r=e?{...e,columns:e.columns??[],source:"api"===e.source?"api":"columnFilter"}:null;s.onParentModelChanged(n,r)}}))};[this.destroySyncListener]=e.addManagedListeners(o,{filterChanged:syncWithFilter}),t?.isFilterActive(o)&&syncWithFilter(null)}setupWidth(e){const listener=()=>{const e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};e.addManagedListeners(this.column,{widthChanged:listener}),listener()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const o=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.beans.colFilter,s=this.active?i?.getFloatingFilterCompDetails(this.column,(()=>this.showParentFilter())):null,n=this.comp.getFloatingFilterComp();n&&s?n.then((t=>{!t||i?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,o):this.updateFloatingFilterParams(s,"colDef")})):this.updateCompDetails(e,s,o)}updateCompDetails(e,t,o){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),o&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let o=e.params;this.comp.getFloatingFilterComp()?.then((e=>{"function"==typeof e?.refresh&&(this.gos.get("enableFilterHandlers")&&(o={...o,model:_getFilterModel(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),e.refresh(o))}))}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}}},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:function isColumnFilterPresent(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()},getColumnFilterInstance:function getColumnFilterInstance(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)},destroyFilter:function destroyFilter(e,t){const o=e.colModel.getColDefCol(t);if(o)return e.colFilter?.destroyFilter(o,"api")},setFilterModel:function setFilterModel(e,t){e.frameworkOverrides.wrapIncoming((()=>e.filterManager?.setFilterModel(t)))},getFilterModel:function getFilterModel(e){return e.filterManager?.getFilterModel()??{}},getColumnFilterModel:function getColumnFilterModel(e,t,o){const{gos:i,colModel:s,colFilter:n}=e;o&&!i.get("enableFilterHandlers")&&(_warn(288),o=!1);const r=s.getColDefCol(t);return r?n?.getModelForColumn(r,o)??null:null},setColumnFilterModel:function setColumnFilterModel(e,t,o){return e.filterManager?.setColumnFilterModel(t,o)??Promise.resolve()},showColumnFilter:function showColumnFilter(e,t){const o=e.colModel.getCol(t);o?e.menuSvc?.showFilterMenu({column:o,containerType:"columnFilter",positionBy:"auto"}):_error(12,{colKey:t})},hideColumnFilter:function hideColumnFilter(e){e.menuSvc?.hideFilterMenu()},getColumnFilterHandler:function getColumnFilterHandler(e,t){const o=e.colModel.getCol(t);if(o)return e.colFilter?.getHandler(o,!0);_error(12,{colKey:t})},doFilterAction:function doFilterAction(e,t){const{colModel:o,colFilter:i,gos:s}=e;if(!s.get("enableFilterHandlers"))return void _warn(287);const{colId:n,action:r}=t;if(n){const e=o.getColById(n);e&&i?.updateModel(e,r)}else i?.updateAllModels(r)}},dependsOn:[Ka,cr,ja,aa]},Ya={moduleName:"CustomFilter",version:I,userComponents:{agReadOnlyFloatingFilter:class extends Se{constructor(){super(ma,[Cr]),this.eFloatingFilterText=fe}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const t=e,o=t.getHandler();if(o.getModelAsString){const e=o.getModelAsString(t.model);this.eFloatingFilterText.setValue(e)}}}onParentModelChanged(e){null!=e?this.params.parentFilterInstance((t=>{if(t.getModelAsString){const o=t.getModelAsString(e);this.eFloatingFilterText.setValue(o)}})):this.eFloatingFilterText.setValue("")}refresh(e){this.init(e)}}},dependsOn:[qa]},Qa={moduleName:"TextFilter",version:I,dependsOn:[qa],userComponents:{agTextColumnFilter:{classImp:class extends va{constructor(){super("textFilter",mapValuesFromTextFilterModel,za),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,((e,o,i,s)=>{o<s&&t.push(_makeNull(e.getValue()))})),t}createEValue(){const e=_createElement({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:o}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,o,"to"),e}createFromToElement(e,t,o){const i=this.createManagedBean(new fr);i.addCss(`ag-filter-${o}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const removeComps=o=>this.removeComponents(o,e,t),{eValuesFrom:o,eValuesTo:i}=this;removeComps(o),removeComps(i)}},params:{useForm:!0}},agTextColumnFloatingFilter:class extends Ta{constructor(){super(...arguments),this.FilterModelFormatterClass=Ua,this.filterType="text",this.defaultOptions=za}createFloatingFilterInputService(){return this.createManagedBean(new xa)}}},dynamicBeans:{agTextColumnFilterHandler:class extends Sa{constructor(){super(mapValuesFromTextFilterModel,za),this.filterType="text",this.FilterModelFormatterClass=Ua}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??defaultMatcher,this.formatter=t.textFormatter??(t.caseSensitive?defaultFormatter:defaultLowercaseFormatter)}evaluateNullValue(e){return!!e&&["notEqual","notContains","blank"].indexOf(e)>=0}evaluateNonNullValue(e,t,o,i){const s=e.map((e=>this.formatter(e)))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:d,filterParams:{textFormatter:c}}=this.params;if("blank"===o.type)return isBlank(t);if("notBlank"===o.type)return!isBlank(t);const u={api:r,colDef:a,column:l,context:d,node:i.node,data:i.data,filterOption:o.type,value:n,textFormatter:c};return s.some((e=>this.matcher({...u,filterText:e})))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const processCondition=e=>{const t={...e},{filter:o,filterTo:i}=e;return o&&(t.filter=trimInputForFilter(o)??null),i&&(t.filterTo=trimInputForFilter(i)??null),t};return isCombinedFilterModel(e)?{...e,conditions:e.conditions.map(processCondition)}:processCondition(e)}return e}}}},Za={moduleName:"NumberFilter",version:I,dependsOn:[qa],userComponents:{agNumberColumnFilter:{classImp:class extends va{constructor(){super("numberFilter",mapValuesFromNumberFilterModel,Ha),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!_isBrowserFirefox()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],o=this.eValuesTo[e];this.refreshInputPairValidation(t,o)}}refreshInputPairValidation(e,t,o=!1){const i=this.params.numberParser,s=getNormalisedValue(i,e),n=getNormalisedValue(i,t),r=function getValidityMessageKey3(e,t,o){if(!(null!=e&&null!=t&&e>=t))return null;return`strict${o?"Max":"Min"}ValueValidation`}(s,n,o),a=r?this.translate(r,[String(o?n:s)]):"";(o?e:t).setCustomValidity(a),(o?t:e).setCustomValidity(""),a.length>0&&this.beans.ariaAnnounce.announceValue(a,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,s=this.state,n=i?.fromAction;return!(n&&"apply"!=n)&&o.model===s.model&&this.areStatesEqual(o.state,s.state)||this.refreshInputValidation(),t}setElementValue(e,t,o){const{numberFormatter:i}=this.params,s=!o&&i?i(t??null):t;super.setElementValue(e,s),null===s&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:o}=this,i=getAllowedCharPattern2(e),s=_createElement({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(s,t,"from",i),r=this.createFromToElement(s,o,"to",i),getFieldChangedListener=(e,t,o)=>()=>this.refreshInputPairValidation(e,t,o),a=getFieldChangedListener(n,r,!0);n.onValueChange(a),n.addGuiEventListener("focusin",a);const l=getFieldChangedListener(n,r,!1);return r.onValueChange(l),r.addGuiEventListener("focusin",l),s}createFromToElement(e,t,o,i){const s=this.createManagedBean(i?new fr({allowedCharPattern:i}):new Fr);return s.addCss(`ag-filter-${o}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui()),s}removeEValues(e,t){const removeComps=o=>this.removeComponents(o,e,t);removeComps(this.eValuesFrom),removeComps(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,((e,o,i,s)=>{o<s&&t.push(processNumberFilterValue(stringToFloat(this.params.numberParser,e.getValue())))})),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput((t=>e||(e=!t.getInputElement().validity.valid))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,(e=>t||(t=!e.getInputElement().validity.valid))),t}canApply(e){return!this.hasInvalidInputs()}},params:{useForm:!0}},agNumberColumnFloatingFilter:class extends Ta{constructor(){super(...arguments),this.FilterModelFormatterClass=Ba,this.filterType="number",this.defaultOptions=Ha}updateParams(e){getAllowedCharPattern2(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=getAllowedCharPattern2(e.filterParams),this.allowedCharPattern?this.createManagedBean(new xa({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Wa)}convertValue(e){return e?Number(e):null}}},dynamicBeans:{agNumberColumnFilterHandler:class extends ya{constructor(){super(mapValuesFromNumberFilterModel,Ha),this.filterType="number",this.FilterModelFormatterClass=Ba}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}}}},Ja={moduleName:"BigIntFilter",version:I,dependsOn:[qa],userComponents:{agBigIntColumnFilter:{classImp:class extends va{constructor(){super("bigintFilter",mapValuesFromBigIntFilterModel,ba),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!_isBrowserFirefox()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],o=this.eValuesTo[e];this.refreshInputPairValidation(t,o)}}refreshInputPairValidation(e,t,o=!1){const{bigintParser:i}=this.params,s=this.getParsedValue(e,i),n=this.getParsedValue(t,i),r=this.isInvalidValue(e,s),a=this.isInvalidValue(t,n),l=o?e:t,d=o?t:e,c=o?a:r;let u="";if(o?r:a){u=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt")}else if(!r&&!a){const i=function getValidityMessageKey(e,t,o){if(!(null!=e&&null!=t&&e>=t))return null;return`strict${o?"Max":"Min"}ValueValidation`}(s,n,o);i&&(u=this.translate(i,[String(o?t.getValue():e.getValue())]))}l.setCustomValidity(u),c||d.setCustomValidity(""),u.length>0&&this.beans.ariaAnnounce.announceValue(u,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,s=this.state,n=i?.fromAction;return!(n&&"apply"!=n)&&o.model===s.model&&this.areStatesEqual(o.state,s.state)||this.refreshInputValidation(),t}setElementValue(e,t,o){super.setElementValue(e,t,o),null===t&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:o}=this,i=getAllowedCharPattern(e),s=_createElement({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(s,t,"from",i),r=this.createFromToElement(s,o,"to",i),getFieldChangedListener=(e,t,o)=>()=>this.refreshInputPairValidation(e,t,o),a=getFieldChangedListener(n,r,!0);n.onValueChange(a),n.addGuiEventListener("focusin",a);const l=getFieldChangedListener(n,r,!1);return r.onValueChange(l),r.addGuiEventListener("focusin",l),s}createFromToElement(e,t,o,i){const s=this.createManagedBean(i?new fr({allowedCharPattern:i}):new fr);return s.addCss(`ag-filter-${o}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui()),s}removeEValues(e,t){const removeComps=o=>this.removeComponents(o,e,t);removeComps(this.eValuesFrom),removeComps(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,((e,o,i,s)=>{o<s&&t.push(_parseBigIntOrNull(e.getValue()??null))})),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(o.filter=String(i[0])),i.length>1&&(o.filterTo=String(i[1])),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput((t=>e||(e=!t.getInputElement().validity.valid))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,(e=>t||(t=!e.getInputElement().validity.valid))),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const o=e.getValue();return null==o||"string"==typeof o&&""===o.trim()?null:t?t(o):_parseBigIntOrNull(o)}isInvalidValue(e,t){const o=e.getValue();return null!=o&&""!==String(o).trim()&&null===t}},params:{useForm:!0}},agBigIntColumnFloatingFilter:class extends Ta{constructor(){super(...arguments),this.FilterModelFormatterClass=Pa,this.filterType="bigint",this.defaultOptions=ba}updateParams(e){const t=e.filterParams;getAllowedCharPattern(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=getAllowedCharPattern(t),this.bigintParser=t?.bigintParser;const o=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new xa({config:o}))}convertValue(e){return null==e||""===e?null:this.bigintParser?this.bigintParser(e):_parseBigIntOrNull(e)}}},dynamicBeans:{agBigIntColumnFilterHandler:class extends ya{constructor(){super(mapValuesFromBigIntFilterModel,ba),this.filterType="bigint",this.FilterModelFormatterClass=Pa}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return null!==_parseBigIntOrNull(e)}}}},Xa={moduleName:"DateFilter",version:I,dependsOn:[qa],userComponents:{agDateColumnFilter:{classImp:class extends va{constructor(){super("dateFilter",mapValuesFromDateFilterModel,ka),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=La,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!_isBrowserFirefox()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const yearParser=(t,o)=>{const i=e[t];if(null!=i){if(!isNaN(i))return null==i?o:Number(i);_warn(82,{param:t})}return o},t=yearParser("minValidYear",1e3),o=yearParser("maxValidYear",La);this.minValidYear=t,this.maxValidYear=o,t>o&&_warn(83);const{minValidDate:i,maxValidDate:s}=e,n=i instanceof Date?i:_parseDateTimeFromString(i);this.minValidDate=n;const r=s instanceof Date?s:_parseDateTimeFromString(s);this.maxValidDate=r,n&&r&&n>r&&_warn(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,o=!1){const{dateConditionFromComps:i,dateConditionToComps:s,beans:n}=this,r=i[e],a=s[e],l=r.getDate(),d=a.getDate(),c=function getValidityMessageKey2(e,t,o){if(!(null!=e&&null!=t&&e>=t))return null;return(o?"max":"min")+"DateValidation"}(l,d,t),u=c?this.translate(c,[String(t?d:l)]):"",h=!_isBrowserFirefox()&&!o;(t?r:a).setCustomValidity(u,h),(t?a:r).setCustomValidity("",h),u.length>0&&n.ariaAnnounce.announceValue(u,"dateFilter")}createDateCompWrapper(e,t,o){const{beans:{userCompFactory:i,context:s,gos:n},params:r}=this,a="from"===o,l=new Ia(s,i,r.colDef,_addGridCommonParams(n,{onDateChanged:()=>{this.refreshInputPairValidation(t,a),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,a),filterParams:r,location:"filter"}),e);return this.addDestroyFunc((()=>l.destroy())),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=_createElement({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,o,i){const s=_createElement({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(s),e.appendChild(s),o.push(this.createDateCompWrapper(s,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),removeItems(this.eConditionPanelsFrom,e,t),removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,o){const i=removeItems(e,t,o);for(const e of i)e.destroy()}isValidDateValue(e){if(null===e)return!1;const{minValidDate:t,maxValidDate:o,minValidYear:i,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(o){if(e>o)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput((t=>e||(e=null!=t.getDate()&&!(t.getValidity()?.valid??1)))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,(e=>t||(t=!(e.getValidity()?.valid??1)))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,((e,o,i,s)=>{!t||o>=s||t&&(t=this.isValidDateValue(e.getDate()))})),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),o={},{params:i,filterType:s}=this,n=this.getValues(e),r=i.useIsoSeparator?"T":" ";return n.length>0&&(o.dateFrom=_serialiseDate(n[0],!0,r)),n.length>1&&(o.dateTo=_serialiseDate(n[1],!0,r)),{dateFrom:null,dateTo:null,filterType:s,type:t,...o}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput((e=>{e.setInputPlaceholder(t),e.setInputAriaLabel(o)}))}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,((e,o,i,s)=>{o<s&&t.push(e.getDate())})),t}translate(e,t){let o=e;return"lessThan"===e?o="before":"greaterThan"===e&&(o="after"),super.translate(o,t)}},params:{useForm:!0}},agDateInput:class extends Se{constructor(){super(Oa,[Cr]),this.eDateInput=fe,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled())return this.isApply?(this.applyOnFocusOut=!e,void(e&&this.params.onDateChanged())):void(e||this.params.onDateChanged())}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),o=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=o&&_isBrowserSafari();const{minValidYear:i,maxValidYear:s,minValidDate:n,maxValidDate:r,buttons:a,includeTime:l,colDef:d}=e.filterParams||{},c=this.beans.dataTypeSvc,u=l??c?.getDateIncludesTimeFlag?.(d.cellDataType)??!1;o?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const h=parseOrConstructDate(n,i,!0),g=parseOrConstructDate(r,s,!1);h&&g&&h.getTime()>g.getTime()&&_warn(87),h&&(t.min=_serialiseDate(h,u)),g&&(t.max=_serialiseDate(g,u)),this.isApply="floatingFilter"===e.location&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return _parseDateTimeFromString(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,o=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(_serialiseDate(e,o))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}},agDateColumnFloatingFilter:class extends Ea{constructor(){super(Va,[Cr]),this.eReadOnlyText=fe,this.eDateWrapper=fe,this.FilterModelFormatterClass=_a,this.filterType="date",this.defaultOptions=ka}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const t=e?_parseDateTimeFromString(e.dateFrom):null;this.dateComp.setDate(t),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){_setDisplayed(this.eDateWrapper,e),_setDisplayed(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const o=t.model,i=_serialiseDate(e),s=null==i?null:{...o??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance((t=>{t?.onFloatingFilterChanged(this.lastType||null,e)}))}getDateComponentParams(){const{filterParams:e}=this.params,t=getDebounceMs(e,this.defaultDebounceMs);return _addGridCommonParams(this.gos,{onDateChanged:_debounce(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:o,params:{column:i}}=this;this.dateComp=new Ia(e,t,i.getColDef(),this.getDateComponentParams(),o,(e=>{e.setInputAriaLabel(this.getAriaLabel(i))})),this.addDestroyFunc((()=>this.dateComp.destroy()))}}},dynamicBeans:{agDateColumnFilterHandler:class extends ya{constructor(){super(mapValuesFromDateFilterModel,ka),this.filterType="date",this.FilterModelFormatterClass=_a,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:o}=this,i=Date.now();let s=o.get(e);if(s&&s.expires<i&&(s=void 0),!s){const[n,r]=t(new Date(i),new Date(i));s={from:n,to:r,expires:setStartOfNextDay(new Date(i)).getTime()-i},o.set(e,s)}return s}comparator(){return this.params.filterParams.comparator??defaultDateComparator}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,o){const i=o.type,s=this.comparator();if(!this.isValid(t))return"notEqual"===i||"notBlank"===i;const n=i,r=Na[n];if(r){const{from:e,to:o}=this.getOrRefreshRangeCacheItem(n,r);return s(e,t)>=0&&s(o,t)<0}return super.evaluateNonNullValue(e,t,o)}}}},el={moduleName:"QuickFilter",version:I,apiFunctions:{isQuickFilterPresent:function isQuickFilterPresent(e){return!!e.quickFilter?.isFilterPresent()},getQuickFilter:function getQuickFilter(e){return e.quickFilter?.getText()},resetQuickFilter:function resetQuickFilter(e){e.quickFilter?.resetCache()}},dependsOn:[{moduleName:"QuickFilterCore",version:I,rowModels:["clientSide"],beans:[class extends m{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",(e=>this.setFilter(e.currentValue))),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],(()=>this.onColumnConfigChanged())),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],(()=>this.setParserAndMatcher()))}refreshCols(){const{autoColSvc:e,colModel:t,gos:o,pivotResultCols:i}=this.beans,s=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(s&&!o.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=o.get("includeHiddenColumnsInQuickFilter")?a:a.filter((e=>e.isVisible()||e.isRowGroupActive()))}isFilterPresent(){return null!==this.quickFilter}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every((o=>t?this.doesRowPassCache(e,o):this.doesRowPassNoCache(e,o)))}resetCache(){this.beans.rowModel.forEachNode((e=>e.quickFilterAggregateText=null))}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;this.quickFilterParts=e?t?t(e):e.split(" "):null}parseFilter(e){return _exists(e)?e.toUpperCase():null}setFilter(e){if(null!=e&&"string"!=typeof e)return void _warn(70,{newFilter:e});const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),o=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,o&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some((o=>{const i=this.getTextForColumn(o,e);return _exists(i)&&i.includes(t)}))}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let o;e?(this.checkGenerateAggText(t),o=t.quickFilterAggregateText):o=this.getAggText(t);const{quickFilterParts:i,matcher:s}=this;return s(i,o)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let o=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const s=_addGridCommonParams(this.gos,{value:o,node:t,data:t.data,column:e,colDef:i});o=i.getQuickFilterText(s)}return _exists(o)?o.toString().toUpperCase():null}getAggText(e){const t=[];for(const o of this.colsToUse){const i=this.getTextForColumn(o,e);_exists(i)&&t.push(i)}return t.join("\n")}}],dependsOn:[Ka,ja]}]},tl={moduleName:"ExternalFilter",version:I,dependsOn:[Ka]},ol=class extends m{constructor(e,t,o){super(),this.id=e,this.parentCache=t,this.params=o,this.state="needsLoading",this.version=0,this.startRow=e*o.blockSize,this.endRow=this.startRow+o.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,o){this.successCommon(e,{rowData:t,rowCount:o})}isRequestMostRecentAndLive(e){const t=e===this.version,o=this.isAlive();return t&&o}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"});this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:o,beans:i,rowNodes:s}=this;for(let n=0;n<e;n++){const e=o+n,r=new Nt(i);r.setRowHeight(t),r.uiLevel=0,r.setRowIndex(e),r.setRowTop(t*e),s.push(r)}}getBlockStateJson(){const{id:e,startRow:t,endRow:o,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:o,pageStatus:i}}}setDataAndId(e,t,o){_exists(t)?e.setDataAndId(t,o.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();_missing(this.params.datasource.getRows)?_warn(90):window.setTimeout((()=>{this.params.datasource.getRows(e)}),0)}createLoadParams(){const{startRow:e,endRow:t,version:o,params:{sortModel:i,filterModel:s},gos:n}=this;return _addGridCommonParams(n,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,o),failCallback:this.pageLoadFailed.bind(this,o),sortModel:i,filterModel:s})}forEachNode(e,t,o){this.rowNodes.forEach(((i,s)=>{this.startRow+s<o&&e(i,t.value++)}))}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const o=e-this.startRow;return this.rowNodes[o]}processServerResult(e){const{rowNodes:t,beans:o}=this;t.forEach(((i,s)=>{const n=e.rowData?e.rowData[s]:void 0;!i.id&&i.alreadyRendered&&n&&(t[s]=new Nt(o),t[s].setRowIndex(i.rowIndex),t[s].setRowTop(i.rowTop),t[s].setRowHeight(i.rowHeight),i._destroy(!0)),this.setDataAndId(t[s],n,this.startRow+s)}));const i=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){const e=this.rowNodes;for(let t=0,o=e.length;t<o;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},il=class extends m{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const o=Math.floor(e/this.params.blockSize);let i=this.blocks[o];if(!i){if(t)return;i=this.createBlock(o)}return i.getRow(e)}createBlock(e){const t=this.params,o=this.createBean(new ol(e,this,t));return this.blocks[o.id]=o,this.blockCount++,this.purgeBlocksIfNeeded(o),t.rowNodeBlockLoader.addBlock(o),o}refreshCache(){if(0==this.blockCount)this.purgeCache();else{for(const e of this.getBlocksInOrder())e.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(_logIfDebug(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter((t=>t!=e));t.sort(((e,t)=>t.lastAccessed-e.lastAccessed));const o=this.params.maxBlocksInCache>0,i=o?this.params.maxBlocksInCache-1:null;t.forEach(((e,t)=>{if("needsLoading"===e.state&&t>=1||!!o&&t>=i){if(this.isBlockCurrentlyDisplayed(e))return;if(this.isBlockFocused(e))return;this.removeBlockFromCache(e)}}))}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;const{startRow:o,endRow:i}=e;return t.rowIndex>=o&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:o}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,o-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:t,overflowSize:o}=this.params,i=(e.id+1)*t+o;this.rowCount<i&&(this.rowCount=i)}}setRowCount(e,t){this.rowCount=e,_exists(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize==0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const o of this.getBlocksInOrder())o.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){return Object.values(this.blocks).sort(((e,t)=>e.id-t.id))}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder()){t.id*this.params.blockSize>=this.rowCount&&e.push(t)}if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const o=[];let i=-1,s=!1;const n={value:0};let r=!1;for(const a of this.getBlocksInOrder())r||(s&&i+1!==a.id?r=!0:(i=a.id,a.forEachNode((i=>{const n=i===e||i===t;(s||n)&&o.push(i),n&&(s=!s)}),n,this.rowCount)));return r||s?[]:o}};var sl={moduleName:"InfiniteRowModel",version:I,apiFunctions:{refreshInfiniteCache:function refreshInfiniteCache(e){_getInfiniteRowModel(e)?.refreshCache()},purgeInfiniteCache:function purgeInfiniteCache(e){_getInfiniteRowModel(e)?.purgeCache()},getInfiniteRowCount:function getInfiniteRowCount(e){return _getInfiniteRowModel(e)?.getRowCount()}},dependsOn:[{moduleName:"InfiniteRowModelCore",version:I,rowModels:["infinite"],beans:[class extends m{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if("infinite"!==this.gos.get("rowModelType"))return;const e=this.beans,t=new Nt(e);this.rootNode=t,t.level=-1,this.rowHeight=_getRowHeightAsNumber(e),this.addEventListeners(),this.addDestroyFunc((()=>this.destroyCache()))}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",(()=>this.setDatasource(this.gos.get("datasource")))),this.addManagedPropertyListener("cacheBlockSize",(()=>this.resetCache())),this.addManagedPropertyListener("rowHeight",(()=>{this.rowHeight=_getRowHeightAsNumber(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()}))}onColumnEverything(){let e;e=!this.cacheParams||!_jsonEquals(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]),e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return 0===this.infiniteCache?.getRowCount()?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;null!=_getRowIdCallback(this.gos)||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:o,rowNodeBlockLoader:i,eventSvc:s,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:o?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:_getRowHeightAsNumber(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new il(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode((e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)})),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode((o=>{o.id===e&&(t=o)})),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){const t=Math.floor(e/this.rowHeight),o=this.getRowCount()-1;return t>o?o:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}},class extends m{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=function _getMaxConcurrentDatasourceRequests(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=_debounce(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){_removeFromArray(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void _logIfDebug(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");const e=null!=this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter((e=>"needsLoading"===e.state)).slice(0,e);this.activeBlockLoadsCount+=t.length;for(const e of t)e.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach((t=>{const{id:o,state:i}=t.getBlockStateJson();e[o]=i})),e}printCacheStatus(){_logIfDebug(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}}]},jn]};var nl={moduleName:"EventApi",version:I,apiFunctions:{addEventListener:function addEventListener(e,t,o){e.apiEventSvc?.addListener(t,o)},addGlobalListener:function addGlobalListener(e,t){e.apiEventSvc?.addGlobalListener(t)},removeEventListener:function removeEventListener(e,t,o){e.apiEventSvc?.removeListener(t,o)},removeGlobalListener:function removeGlobalListener(e,t){e.apiEventSvc?.removeGlobalListener(t)}},beans:[class extends m{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const o=this.wrapSvc?.wrap(e,t)??t,i=!Rs.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(o),this.eventSvc.addListener(e,o,i)}removeListener(e,t){const o=this.wrapSvc?.unwrap(e,t)??t,i=!!this.asyncListeners.get(e)?.delete(o);i||this.syncListeners.get(e)?.delete(o),this.eventSvc.removeListener(e,o,i)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,syncListener=(e,o)=>{Rs.has(e)&&t(e,o)},asyncListener=(e,o)=>{Rs.has(e)||t(e,o)};this.globalListenerPairs.set(e,{syncListener,asyncListener});const o=this.eventSvc;o.addGlobalListener(syncListener,!1),o.addGlobalListener(asyncListener,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=o?.unwrapGlobal(e)??e;if(i.has(s)){const{syncListener:o,asyncListener:n}=i.get(s);t.removeGlobalListener(o,!1),t.removeGlobalListener(n,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach(((e,o)=>{e.forEach((e=>this.eventSvc.removeListener(o,e,t))),e.clear()})),e.clear()}destroyGlobalListeners(e,t){for(const o of e)this.eventSvc.removeGlobalListener(o,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach((({syncListener:e,asyncListener:o})=>{t.removeGlobalListener(e,!1),t.removeGlobalListener(o,!0)})),e.clear()}}]},rl={moduleName:"Locale",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?function _getLocaleTextFromFunc(e){return(t,o,i)=>e({key:t,defaultValue:o,variableValues:i})}(t):function _getLocaleTextFromMap(e){return(t,o,i)=>{let s=e?.[t];if(s&&i?.length){let e=0;for(;!(e>=i.length)&&-1!==s.indexOf("${variable}");)s=s.replace("${variable}",i[e++])}return s??o}}(e.get("localeText"))}}]};function migrateGridStateModel(e){return(e={...e}).version||(e.version="32.1.0"),"32.1.0"===e.version&&(e=function migrateV32_1(e){return e.cellSelection=function jsonGet(e,t){if(e&&"object"==typeof e)return e[t]}(e,"rangeSelection"),e}(e)),e.version=I,e}var al={moduleName:"GridState",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=_debounce(this,(()=>this.dispatchQueuedStateUpdateEvents()),0),this.onRowGroupOpenedDebounced=_debounce(this,(()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))}),0),this.onRowSelectedDebounced=_debounce(this,(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())}),0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:o}=this.beans;this.isClientSideRowModel=_isClientSideRowModel(e);const i=migrateGridStateModel(e.get("initialState")??{}),s=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,(()=>n((()=>this.setupStateOnGridReady(i))))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&o?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:e})=>{"gridInitializing"===e&&(r(),n((()=>{this.setupStateOnColumnsInitialised(i,!!s),o?.revealColumns("columnState")})))},rowCountReady:()=>{a?.(),n((()=>this.setupStateOnRowCountReady(i)))},firstDataRendered:()=>{l?.(),n((()=>this.setupStateOnFirstDataRendered(i)))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const o=migrateGridStateModel(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!!s,s),this.setRowCountState(o,i,s),setTimeout((()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)}))}setGridReadyState(e,t,o){"api"!==t||o?.has("sideBar")||this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const stateUpdater=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:stateUpdater,sideBarUpdated:stateUpdater})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const onUpdate=e=>()=>this.updateColumnState([e]);this.addManagedEventListeners({columnValueChanged:onUpdate("aggregation"),columnMoved:onUpdate("columnOrder"),columnPinned:onUpdate("columnPinning"),columnResized:onUpdate("columnSizing"),columnVisible:onUpdate("columnVisibility"),columnPivotChanged:onUpdate("pivot"),columnPivotModeChanged:onUpdate("pivot"),columnRowGroupChanged:onUpdate("rowGroup"),sortChanged:onUpdate("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a,rowPinning:l}=e,shouldSetState=(e,i)=>!o?.has(e)&&(i||"api"===t);shouldSetState("filter",i)&&this.setFilterState(i),shouldSetState("rowGroupExpansion",s)&&this.setRowGroupExpansionState(n,s,t),shouldSetState("rowSelection",r)&&this.setRowSelectionState(r,t),shouldSetState("pagination",a)&&this.setPaginationState(a,t),shouldSetState("rowPinning",l)&&this.setRowPinningState(l);const d=this.updateCachedState.bind(this);d("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(d("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),d("rowGroupExpansion",void 0)):(d("rowGroupExpansion",this.getRowGroupExpansionState()),d("ssrmRowGroupExpansion",void 0)),d("rowSelection",this.getRowSelectionState()),d("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),updateRowGroupExpansionState=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},updateFilterState=()=>t("filter",this.getFilterState()),{gos:o,colFilter:i,selectableFilter:s}=this.beans;this.addManagedEventListeners({filterChanged:updateFilterState,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:updateRowGroupExpansionState,columnRowGroupChanged:updateRowGroupExpansionState,rowDataUpdated:()=>{(0!==o.get("groupDefaultExpanded")||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(updateRowGroupExpansionState)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:e=>{(e.newPage||e.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),i&&this.addManagedListeners(i,{filterStateChanged:updateFilterState}),s&&this.addManagedListeners(s,{selectedFilterChanged:updateFilterState})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r}=e,shouldSetState=(e,i)=>!o?.has(e)&&(i||"api"===t);shouldSetState("focusedCell",n)&&this.setFocusedCellState(n),shouldSetState("cellSelection",s)&&this.setCellSelectionState(s),shouldSetState("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!r?.orderedColIds,t);const a=this.updateCachedState.bind(this);a("sideBar",this.getSideBarState()),a("focusedCell",this.getFocusedCellState());const l=this.getRangeSelectionState();a("rangeSelection",l),a("cellSelection",l),a("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),updateFocusState=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:updateFocusState,cellFocusCleared:updateFocusState,cellSelectionChanged:e=>{if(e.finished){const e=this.getRangeSelectionState();t("rangeSelection",e),t("cellSelection",e)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return function convertColumnState(e,t=!1){const o=[],i=[],s=[],n=[],r=[],a=[],l=[],d=[],c=[];let u=0;for(let t=0;t<e.length;t++){const{colId:h,sort:g,sortType:p,sortIndex:m,rowGroup:f,rowGroupIndex:C,aggFunc:w,pivot:v,pivotIndex:b,pinned:S,hide:y,width:R,flex:F}=e[t];c.push(h),g&&(o[m??u++]={colId:h,sort:g,type:p}),f&&(i[C??0]=h),"string"==typeof w&&s.push({colId:h,aggFunc:w}),v&&(n[b??0]=h),S&&("right"===S?a:r).push(h),y&&l.push(h),(null!=F||R)&&d.push({colId:h,flex:F??void 0,width:null===R?void 0:R})}return{sort:o.length?{sortModel:_removeEmptyValues(o)}:void 0,rowGroup:i.length?{groupColIds:_removeEmptyValues(i)}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:_removeEmptyValues(n)}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}(_getColumnState(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:d,columnSizing:c,columnOrder:u}=e;let h=!1;const shouldSetState=(e,o)=>{const s=!(i?.has(e)||!o&&"api"!==t);return h||(h=s),s},g={},getColumnState2=e=>{let t=g[e];return t||(t={colId:e},g[e]=t,t)},p={},m=shouldSetState("sort",s);m&&s?.sortModel.forEach((({colId:e,sort:t},o)=>{const i=getColumnState2(e);i.sort=t,i.sortIndex=o})),!m&&o||(p.sort=null,p.sortIndex=null);const f=shouldSetState("rowGroup",n);f&&n?.groupColIds.forEach(((e,t)=>{const o=getColumnState2(e);o.rowGroup=!0,o.rowGroupIndex=t})),!f&&o||(p.rowGroup=null,p.rowGroupIndex=null);const C=shouldSetState("aggregation",r);C&&r?.aggregationModel.forEach((({colId:e,aggFunc:t})=>{getColumnState2(e).aggFunc=t})),!C&&o||(p.aggFunc=null);const w=shouldSetState("pivot",a);w&&(a?.pivotColIds.forEach(((e,t)=>{const o=getColumnState2(e);o.pivot=!0,o.pivotIndex=t})),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),!w&&o||(p.pivot=null,p.pivotIndex=null);const v=shouldSetState("columnPinning",l);if(v){for(const e of l?.leftColIds??[])getColumnState2(e).pinned="left";for(const e of l?.rightColIds??[])getColumnState2(e).pinned="right"}!v&&o||(p.pinned=null);const b=shouldSetState("columnVisibility",d);if(b)for(const e of d?.hiddenColIds??[])getColumnState2(e).hide=!0;!b&&o||(p.hide=null);const S=shouldSetState("columnSizing",c);if(S)for(const{colId:e,flex:t,width:o}of c?.columnSizingModel??[]){const i=getColumnState2(e);i.flex=t??null,i.width=o}!S&&o||(p.flex=null);const y=u?.orderedColIds,R=!!y?.length&&!i?.has("columnOrder"),F=R?y.map((e=>getColumnState2(e))):Object.values(g);(F.length||h)&&(this.columnStates=F,_applyColumnState(this.beans,{state:F,applyOrder:R,defaultState:p},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n?.isPivotResultColsPresent()){if(o){const i=[];for(const e of o)n.getPivotResultCol(e.colId)&&i.push(e);_applyColumnState(s,{state:i,applyOrder:e},t)}i&&r?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;return _convertColumnGroupState(e.getColumnGroupState())}setColumnGroupState(e,t,o){const i=this.beans.colGroupSvc;if(!i||o?.has("columnGroup")||"api"!==t&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set(e.columnGroup?.openColumnGroupIds),n=i.getColumnGroupState().map((({groupId:e})=>{const t=s.has(e);return t&&s.delete(e),{groupId:e,open:t}}));for(const e of s)n.push({groupId:e,open:!0});n.length&&(this.columnGroupStates=n),i.setColumnGroupState(n,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let o=e?.getFilterModel();o&&0===Object.keys(o).length&&(o=void 0);const i=e?.getFilterState(),s=e?.getAdvFilterModel()??void 0,n=t?.getState();return o||s||i||n?{filterModel:o,columnFilterState:i,advancedFilterModel:s,selectableFilters:n}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:o}=this.beans,{filterModel:i,columnFilterState:s,advancedFilterModel:n,selectableFilters:r}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};void 0!==r&&o?.setState(r??{}),void 0===i&&void 0===s||t?.setFilterState(i??null,s??null,"columnFilter"),void 0!==n&&t?.setAdvFilterModel(n??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map((e=>{const{id:t,type:o,startRow:i,endRow:s,columns:n,startColumn:r}=e;return{id:t,type:o,startRow:i,endRow:s,colIds:n.map((e=>e.getColId())),startColId:r.getColId()}}));return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!_isCellSelectionEnabled(t)||!o)return;const n=[];for(const t of e?.cellRanges??[]){const e=[];for(const o of t.colIds){const t=i.getCol(o);t&&e.push(t)}if(!e.length)continue;let o=i.getCol(t.startColId);if(!o){const t=s.allCols,i=new Set(e);o=t.find((e=>i.has(e)))}n.push({...t,columns:e,startColumn:o})}o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:o}=e?.getVScrollPosition()??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming((()=>{r.get("center").setCenterViewportScrollLeft(o),r.getScrollFeature()?.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n?.flushAllFrames()}))}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e)return void t.clearFocusedCell();const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();return o||i?{page:o,pageSize:i}:void 0}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r="gridInitializing"===t;s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),"number"==typeof n&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(!1===t.selectAll||!1===t.selectAllChildren)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,"api"===t)}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,o){const i=this.beans.expansionSvc;if(!i)return;const s=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};i.setExpansionState(s,o)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const e of Object.keys(t)){const s=t[e];_jsonEquals(s,i[e])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),_jsonEquals(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)"rowSelection"===t&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout((()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))}))}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}}],apiFunctions:{getState:function getState(e){return e.stateSvc?.getState()??{}},setState:function setState(e,t,o){return e.stateSvc?.setState(t,o)}}};var ll="paginationPageSizeSelector",dl={tag:"span",cls:"ag-paging-page-size"},cl={selector:"AG-PAGE-SIZE-SELECTOR",component:class extends Se{constructor(){super(dl),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(ll,(()=>{this.onPageSizeSelectorValuesChange()})),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){_clearElement(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get(ll)}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){const o=this.gos.exists("paginationPageSize"),i=!0!==this.gos.get(ll);_warn(94,{pageSizeSet:o,pageSizesSet:i,pageSizeOptions:e,paginationPageSizeOption:t}),i||_warn(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ll}),e.unshift("")}const i=String(o?"":t);this.selectPageSizeComp?(_areEqual(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=o}createPageSizeSelectOptions(e){return e.map((e=>({value:String(e)})))}createPageSizeSelectorComp(e,t){const o=this.getLocaleTextFunc(),i=o("pageSizeSelectorLabel","Page Size:"),s=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Ar).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(i).onValueChange((()=>this.handlePageSizeItemSelected())),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ll);return Array.isArray(t)&&t?.length?[...t].sort(((e,t)=>e-t)):e}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},ul={selector:"AG-PAGINATION",component:class extends Po{constructor(){super(),this.btFirst=fe,this.btPrevious=fe,this.btNext=fe,this.btLast=fe,this.lbRecordCount=fe,this.lbFirstRowOnPage=fe,this.lbLastRowOnPage=fe,this.lbCurrent=fe,this.lbTotal=fe,this.pageSizeComp=fe,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-paging-description{line-height:0}")}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[cl]);const{btFirst:t,btPrevious:o,btNext:i,btLast:s}=this;this.activateTabIndex([t,o,i,s]),t.insertAdjacentElement("afterbegin",_createIconNoSpan(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",_createIconNoSpan(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",_createIconNoSpan(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",_createIconNoSpan(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],(()=>this.onPageSizeRelatedOptionsChange())),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:e=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(e):function _focusGridInnerElement(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}(this.beans,e),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const e=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:o}=e;this.addManagedListeners(t,{click:o,keydown:e=>{e.key!==Y&&e.key!==Z||(e.preventDefault(),o())}})}!function _addFocusableContainerListener(e,t,o){t.addManagedElementListeners(o,{keydown:t=>{if(!t.defaultPrevented&&t.key===q){const i=t.shiftKey;_findNextFocusableElement(e,o,!1,i)||_focusNextGridCoreContainer(e,i)&&t.preventDefault()}}})}(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");if(t){return t({value:e})}return function _formatNumberCommas(e,t){if("number"!=typeof e)return"";const o=t(),i=o("thousandSeparator",","),s=o("decimalSeparator",".");return e.toString().replace(".",s).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),o=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),s=e===o-1;this.nextButtonDisabled=s||i,this.lastButtonDisabled=!t||i||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){!function _setAriaDisabled(e,t){_toggleAriaAttribute(e,"disabled",t)}(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&0===t}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),o=this.pagination.getMasterRowCount(),i=e?o:null,s=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*s+1,a=r+n-1,e&&a>i&&(a=i));const l=!e&&o<r+n-1,d=this.formatNumber(r);let c;this.lbFirstRowOnPage.textContent=d;const u=this.getLocaleTextFunc();c=l?u("pageLastRowUnknown","?"):this.formatNumber(a),this.lbLastRowOnPage.textContent=c;const h=t>0?s+1:0,g=this.formatNumber(h);let p,m;if(this.lbCurrent.textContent=g,e)p=this.formatNumber(t),m=this.formatNumber(i);else{const e=u("more","more");p=e,m=e}this.lbTotal.textContent=p,this.lbRecordCount.textContent=m,this.announceAriaStatus(d,c,m,g,p)}announceAriaStatus(e,t,o,i,s){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),d=`${e} ${a} ${t} ${l} ${o}`,c=`${r} ${i} ${l} ${s}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnounce?.announceValue(c,"paginationPage"))}}},hl={moduleName:"Pagination",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return ul}isPaginateChildRows(){const e=this.gos;return!!(e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren"))||e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||"number"!=typeof t)return;const{editSvc:o}=this.beans;o?.isEditing()&&(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return!this.active||e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return _exists(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:_exists(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:_exists(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:_exists(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:100}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const o=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}o!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0)return void this.setZeroRows();const o=this.pageSize,i=t-1;this.totalPages=Math.floor(i/o)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,n=o*s;let r=o*(s+1)-1;if(r>i&&(r=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const t=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=t-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,0===e)return void this.setZeroRows();const{pageSize:t,currentPage:o}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:o=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:o,newPageSize:i,keepRenderedRows:t})}},class extends m{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()}))}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,update=()=>{const o=Math.max(_getRowHeightAsNumber(t),1),i=Math.floor(e/o);t.pagination.setPageSize(i,"autoCalculated")};this.isBodyRendered?_debounce(this,update,50)():(update(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}}],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:function paginationIsLastPageFound(e){return e.rowModel.isLastRowIndexKnown()},paginationGetPageSize:function paginationGetPageSize(e){return e.pagination?.getPageSize()??100},paginationGetCurrentPage:function paginationGetCurrentPage(e){return e.pagination?.getCurrentPage()??0},paginationGetTotalPages:function paginationGetTotalPages(e){return e.pagination?.getTotalPages()??1},paginationGetRowCount:function paginationGetRowCount(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()},paginationGoToNextPage:function paginationGoToNextPage(e){e.pagination?.goToNextPage()},paginationGoToPreviousPage:function paginationGoToPreviousPage(e){e.pagination?.goToPreviousPage()},paginationGoToFirstPage:function paginationGoToFirstPage(e){e.pagination?.goToFirstPage()},paginationGoToLastPage:function paginationGoToLastPage(e){e.pagination?.goToLastPage()},paginationGoToPage:function paginationGoToPage(e,t){e.pagination?.goToPage(t)}},dependsOn:[cr]};var gl={moduleName:"PinnedRow",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,initialiseRowModel=()=>{const t=e.get("enableRowPinning"),o=_getGrandTotalRow(e),i=!!t||("pinnedBottom"===o||"pinnedTop"===o),s=i?this.inner instanceof Bt:this.inner instanceof Ht;this.inner&&s&&this.destroyBean(this.inner),!s&&this.inner||(this.inner=this.createManagedBean(i?new Ht:new Bt))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],initialiseRowModel),initialiseRowModel()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,o){return this.inner.pinRow(e,t,o)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}}],css:[".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}"],apiFunctions:{getPinnedTopRowCount:function getPinnedTopRowCount(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0},getPinnedBottomRowCount:function getPinnedBottomRowCount(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0},getPinnedTopRow:function getPinnedTopRow(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)},getPinnedBottomRow:function getPinnedBottomRow(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)},forEachPinnedRow:function forEachPinnedRow(e,t,o){return e.pinnedRowModel?.forEachPinnedRow(t,o)}},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},pl={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},ml={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]};var fl={moduleName:"HighlightChanges",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,a={phase:"flash",flashEndTime:r,fadeEndTime:n+o+i};s.set(e,a);const l=`ag-cell-${t}`,d=`${l}-animation`,{comp:c,eGui:{style:u}}=e;c.toggleCss(l,!0),c.toggleCss(d,!1),u.removeProperty("transition"),u.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming((()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)})),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[o,r]of i){if(!o.isAlive()||!o.comp){i.delete(o);continue}const{phase:a,flashEndTime:l,fadeEndTime:d}=r,c="flash"===a?l:d;if(!(e+15>=c)){t=Math.min(c,t??1/0);continue}const{comp:u,eGui:{style:h}}=o;switch(a){case"flash":u.toggleCss(s,!1),u.toggleCss(n,!0),h.transition=`background-color ${d-l}ms`,h.transitionDelay=l-e+"ms",t=Math.min(d,t??1/0),r.phase="fade";break;case"fade":u.toggleCss(s,!1),u.toggleCss(n,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),i.delete(o)}}}null==t?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const o=function _createCellId(e){const{rowIndex:t,rowPinned:o,column:i}=e;return`${t}.${null==o?"null":o}.${i.getId()}`}(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations)){this.animations[e].clear()}}}],userComponents:{agAnimateShowChangeCellRenderer:class extends Se{constructor(){super(pl),this.eValue=fe,this.eDelta=fe,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=_exists(i)?i:o,n=t>=0,r=this.eDelta;r.textContent=n?"↑"+s:"↓"+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming((()=>{window.setTimeout((()=>{e===this.refreshCount&&this.hideDeltaValue()}),2e3)}))}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),_clearElement(this.eDelta)}refresh(e,t=!1){const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n)return!1;if(_exists(i)?s.textContent=i:_exists(o)?s.textContent=o:_clearElement(s),r.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;const a=o&&"object"==typeof o&&"toNumber"in o?o.toNumber():o,l=n&&"object"==typeof n&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if("number"==typeof a&&"number"==typeof l){const t=a-l;this.showDelta(e,t)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},agAnimateSlideCellRenderer:class extends Se{constructor(){super(ml),this.eCurrent=fe,this.refreshCount=0,this.registerCSS(".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}")}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:o}=this,i=_createElement({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming((()=>{window.setTimeout((()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")}),50),window.setTimeout((()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)}),3e3)}))}refresh(e,t=!1){let o=e.value;if(_missing(o)&&(o=""),o===this.lastValue)return!1;if(this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;const i=this.eCurrent;return _exists(e.valueFormatted)?i.textContent=e.valueFormatted:_exists(e.value)?i.textContent=o:_clearElement(i),!0}}},apiFunctions:{flashCells:function flashCells(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming((()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))o.flashCell(i,t)}))}}};var Cl={moduleName:"RenderApi",version:I,apiFunctions:{setGridAriaProperty:function setGridAriaProperty(e,t,o){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;null===o?i.removeAttribute(s):i.setAttribute(s,o)},refreshCells:function refreshCells(e,t={}){e.frameworkOverrides.wrapIncoming((()=>e.rowRenderer.refreshCells(t)))},refreshHeader:function refreshHeader(e){e.frameworkOverrides.wrapIncoming((()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()}))},isAnimationFrameQueueEmpty:function isAnimationFrameQueueEmpty(e){return e.animationFrameSvc?.isQueueEmpty()??!0},flushAllAnimationFrames:function flushAllAnimationFrames(e){e.animationFrameSvc?.flushAllFrames()},getSizesForCurrentTheme:function getSizesForCurrentTheme(e){return{rowHeight:_getRowHeightAsNumber(e),headerHeight:getHeaderHeight(e)}},getCellRendererInstances:function getCellRendererInstances(e,t={}){const o=[];for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const e=i.getCellRenderer();null!=e&&o.push(_unwrapUserComp(e))}if(t.columns?.length)return o;const i=[],s=mapRowNodes(t.rowNodes);for(const t of e.rowRenderer.getAllRowCtrls()){if(s&&!isRowInMap(t.rowNode,s))continue;if(!t.isFullWidth())continue;const e=t.getFullWidthCellRenderers();for(let t=0;t<e.length;t++){const o=e[t];null!=o&&i.push(_unwrapUserComp(o))}}return[...i,...o]}}},wl={moduleName:"RowAutoHeight",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=_debounce(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const updateDisplayedRowHeights=e=>{const t=e.__autoHeights;let i=_getRowHeightForNode(this.beans,e).height;for(const n of s){let s=t?.[n.getColId()];const r=o?.getCellSpan(n,e);if(r){if(r.getLastNode()!==e)continue;if(s=o?.getCellSpan(n,e)?.getLastNodeAutoHeight(),!s)return}if(null==s){if(this.colSpanSkipCell(n,e))continue;return}i=Math.max(s,i)}i!==e.rowHeight&&(e.setRowHeight(i),n=!0)};i?.forEachPinnedRow?.("top",updateDisplayedRowHeights),i?.forEachPinnedRow?.("bottom",updateDisplayedRowHeights),t.forEachDisplayedNode?.(updateDisplayedRowHeights),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),null==t)return void delete e.__autoHeights[o.getId()];const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t)}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,measureHeight=a=>{if(this.beans.editSvc?.isEditing(e))return;if(!e.isAlive()||!o.isAlive())return;const{paddingTop:l,paddingBottom:d,borderBottomWidth:c,borderTopWidth:u}=_getElementSize(i),h=l+d+c+u,g=t.offsetHeight+h;if(a<5){const e=0==g;if(!_getDocument(r)?.contains(t)||e)return void window.setTimeout((()=>measureHeight(a+1)),0)}this.setRowAutoHeight(s,g,n)},listener=()=>measureHeight(0);listener();const a=_observeResize(r,t,listener);return o.addDestroyFunc((()=>{a(),this.setRowAutoHeight(s,void 0,n)})),!0}setAutoHeightActive(e){this.active=e.list.some((e=>e.isVisible()&&e.isAutoHeight()))}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e){if(!t||this.beans.colModel.colSpanActive){t=this.beans.colViewport.getColsWithinViewport(o).filter((e=>e.isAutoHeight()))}if(0!==t.length){if(!o.__autoHeights)return!1;for(const e of t){const t=o.__autoHeights[e.getColId()];if(!t||o.rowHeight<t)return!1}}}return!0}}]},vl=class extends m{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),d=new Map,c=o.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,g="function"==typeof h;let p,m=null,f=null;const setNewHead=(e,t)=>{m=e,f=null,p=t},checkNodeForCache=e=>{const i=!(e.isExpandable()||e.group||e.detail||c&&c({rowNode:e}));if(null==e.rowIndex||!i)return void setNewHead(null,null);if(null==m||e.level!==m.level||e.footer||f&&e.rowIndex-1!==f?.getLastNode().rowIndex)return void setNewHead(e,n.getValue(t,e,"data"));const s=n.getValue(t,e,"data");if(g){const i=_addGridCommonParams(o,{valueA:p,nodeA:m,valueB:s,nodeB:e,column:t,colDef:a});if(!h(i))return void setNewHead(e,s)}else if(u?!u(p,s):p!==s)return void setNewHead(e,s);if(!f){const e=l?.get(m);e?.firstNode===m?(e.reset(),f=e):f=new class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column===this.col&&e.rowPinned==this.firstNode.rowPinned&&this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(null==e)return;let t=0;for(const e of this.spannedNodes)e!==this.lastNode&&(t+=e.rowHeight);return e-t}}(t,m),d.set(m,f)}f.addSpannedNode(e),d.set(e,f)};switch(e){case"center":s.forEachDisplayedNode?.((e=>{(!r||r.isRowInPage(e.rowIndex))&&checkNodeForCache(e)})),this.centerValueNodeMap=d;break;case"top":i?.forEachPinnedRow("top",checkNodeForCache),this.topValueNodeMap=d;break;case"bottom":i?.forEachPinnedRow("bottom",checkNodeForCache),this.bottomValueNodeMap=d}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},bl=class extends en{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,s,n,r){this.eWrapper=o,super.setComp(e,t,o,i,s,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;e&&null!=t.rowIndex&&_setAriaRowIndex(e,t.rowIndex)}setAriaRowSpan(){!function _setAriaRowSpan(e,t){_setAriaAttribute(e,"rowspan",t)}(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(_isCellFocusSuppressed(t))return void(this.focusedCellPosition=void 0);const o=this.isCellFocused();o||(this.focusedCellPosition=void 0),e&&o&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},Sl=class extends on{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!t)return;return t.firstNode!==this.rowNode?void 0:new bl(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);if(!t)return!1;return!(t.firstNode!==this.rowNode)&&e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},yl={moduleName:"CellSpan",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=_debounce(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=_debounce(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan"))return;if(this.spanningColumns.has(e))return;const o=this.createManagedBean(new vl(e));this.spanningColumns.set(e,o),o.buildCache("top"),o.buildCache("bottom"),o.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(null!=this.pinnedTimeout)return;this.pinnedTimeout=window.setTimeout((()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")}),0)}else null==this.modelTimeout&&(this.modelTimeout=window.setTimeout((()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")}),0))}buildModelCaches(){null!=this.modelTimeout&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach((e=>e.buildCache("center"))),this.debounceModelEvent()}buildPinnedCaches(){null!=this.pinnedTimeout&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach((e=>{e.buildCache("top"),e.buildCache("bottom")})),this.debouncePinnedEvent()}isCellSpanning(e,t){const o=this.spanningColumns.get(e);return!!o&&o.isCellSpanning(t)}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,s=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(s);break;case"bottom":r=t?.getPinnedBottomRow(s);break;default:r=o.getRow(s)}return r?n.getCellSpan(r):void 0}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){t(o,i.getCellSpan(e))}}destroy(){super.destroy(),this.spanningColumns.clear()}},class extends m{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,o=this.getCtrlsMap(e),i=o.size,s=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const e of s)e.isAlive()&&t?.forEachSpannedColumn(e.rowNode,((e,t)=>{if(n.has(t.firstNode))return;const i=o.get(t.firstNode);if(i)return n.set(t.firstNode,i),void o.delete(t.firstNode);r=!0;const s=new Sl(t.firstNode,this.beans,!1,!1,!1);n.set(t.firstNode,s)}));this.setCtrlsMap(e,n);const a=n.size===i;if(r||!a){for(const e of o.values())e.destroyFirstPass(!0),e.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,o=t?.getCellSpanByPosition(e);if(!o)return;const i=this.getCtrlsMap(e.rowPinned).get(o.firstNode);return i?i.getAllCellCtrls().find((t=>t.column===e.column)):void 0}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}}]};var Rl={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Fl=class extends Se{constructor(){super(Rl,[At]),this.eCheckbox=fe}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:o}=this,i=t.isSelected(),s=_getAriaCheckboxStateName(e,i),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);o.setValue(i,!0),o.setInputAriaLabel(`${a} (${s})`)}init(e){this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:_stopPropagationForAgGrid,click:e=>{_stopPropagationForAgGrid(e),this.eCheckbox.isDisabled()||this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",(({currentValue:e,previousValue:t})=>{("object"==typeof e?_getHideDisabledCheckboxes(e):void 0)!==("object"==typeof t?_getHideDisabledCheckboxes(t):void 0)&&this.onSelectableChanged()}));if(_getIsRowSelectable(this.gos)||"function"==typeof this.getIsVisible()){const e=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:o,gos:i}=this,s=t.selectable,n=this.getIsVisible();let r;if("function"==typeof n){const i=o?.callbackParams;if(e){const o=e.createColumnFunctionCallbackParams(t);r=n({...i,...o})}else r=n({...i,node:t,data:t.data})}else r=n??!1;const a=s&&!r||!s&&r,l=s||r,d=i.get("rowSelection"),c=d&&"string"!=typeof d?!_getHideDisabledCheckboxes(d):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(!a||c)),this.setDisplayed(l&&(!a||c)),l&&this.eCheckbox.setDisabled(a),o?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&"string"!=typeof t?_getCheckboxes(t):this.column?.getColDef()?.checkboxSelection}},Dl=class extends m{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(_getActiveDomElement(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Tt);this.cbSelectAll=t,t.addCss("ag-header-select-all"),_setAriaRole(t.getGui(),"presentation"),this.showOrHideSelectAll();const o=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:o,paginationChanged:o,modelUpdated:o}),this.addManagedPropertyListener("rowSelection",(({currentValue:e,previousValue:t})=>{const getSelectAll=e=>"string"!=typeof e&&e&&"singleRow"!==e.mode?e.selectAll:void 0;getSelectAll(e)!==getSelectAll(t)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()})),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll("uiColumnMoved"===e.source)}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,o=this.cbSelectAll,i=t.getSelectAllState(e);o.setValue(i);const s=t.hasNodesToSelect(e);o.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:i,cbSelectAllVisible:s}=this,n=_getAriaCheckboxStateName(t,i.getValue()),r=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",s?`${r} (${n})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return!!_isMultiRowSelection(this.gos)||(_warn(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:o}=this.beans;return!(!_isClientSideRowModel(t)&&!_isServerSideRowModel(t))||(_warn(129,{feature:e,rowModel:o.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox)return;if(!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let o="uiSelectAll";"currentPage"===t?o="uiSelectAllCurrentPage":"filtered"===t&&(o="uiSelectAllFiltered");const i={source:o,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(i):s.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:o}=this,i="object"==typeof t.get("rowSelection")?"headerCheckbox":"headerCheckboxSelection";return isCheckboxSelection(o,e)&&this.checkRightRowModelType(i)&&this.checkSelectionType(i)}getSelectAllMode(){const e=_getSelectAll(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:o}=this.column.getColDef();return t?"currentPage":o?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function isCheckboxSelection({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if("object"==typeof i){const e=isColumnSelectionCol(o),s=isColumnGroupAutoCol(o);("autoGroupColumn"===_getCheckboxLocation(i)&&s||e&&t?.isSelectionColumnEnabled())&&(r=_getHeaderCheckbox(i))}else r="function"==typeof n?n(_addGridCommonParams(e,{column:o,colDef:s})):!!n;return r}var Pl=class extends m{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(0===this.cachedRange.length){const e=this.getRoot(),t=this.getEnd();if(null==e||null==t)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return null!==this.rootId&&this.getRange().some((t=>t.id===e.id))}getRoot(e){return this.rootId?this.getRowNode(this.rootId):e?(this.setRoot(e),e):void 0}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:o,pinnedRowModel:i}=this;return t??(t=o.getRowNode(e)),i?.isManual()&&(t??(t=i.getPinnedRowById(e,"top")),t??(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(0===t.length)return{keep:[],discard:[]};const o=t[0].id===this.rootId,i=t.findIndex((t=>t.id===e.id));if(i>-1){const s=t.slice(0,i),n=t.slice(i+1);return this.setEndRange(e),o?{keep:s,discard:n}:{keep:n,discard:s}}return{keep:t,discard:[]}}extend(e,t=!1){const o=this.getRoot();if(null==o){const o=this.getRange().slice();return t&&e.depthFirstSearch((e=>!e.group&&o.push(e))),o.push(e),this.setRoot(e),{keep:o,discard:[]}}const i=this.getNodesInRange(o,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find((e=>e.id===this.endId)))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const t=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:t}}}getNodesInRange(e,t){const{pinnedRowModel:o,rowModel:i}=this;if(!o?.isManual())return i.getNodesInRangeForSelection(e,t);if("top"===e.rowPinned&&!t.rowPinned)return _getNodesInRangeForSelection(o,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if("bottom"===e.rowPinned&&!t.rowPinned){const s=_getNodesInRangeForSelection(o,"bottom",void 0,e),n=i.getRowCount(),r=i.getRow(n-1);return(i.getNodesInRangeForSelection(t,r)??[]).concat(s)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if("top"===e.rowPinned&&"top"===t.rowPinned)return _getNodesInRangeForSelection(o,"top",e,t);if("bottom"===e.rowPinned&&"top"===t.rowPinned){const s=_getNodesInRangeForSelection(o,"top",t,void 0),n=_getNodesInRangeForSelection(o,"bottom",void 0,e),r=i.getRow(0),a=i.getRow(i.getRowCount()-1);return s.concat(i.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(!e.rowPinned&&"top"===t.rowPinned)return _getNodesInRangeForSelection(o,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if("top"===e.rowPinned&&"bottom"===t.rowPinned){const s=_getNodesInRangeForSelection(o,"top",e,void 0),n=_getNodesInRangeForSelection(o,"bottom",void 0,t),r=i.getRow(0),a=i.getRow(i.getRowCount()-1);return s.concat(i.getNodesInRangeForSelection(r,a)??[]).concat(n)}if("bottom"===e.rowPinned&&"bottom"===t.rowPinned)return _getNodesInRangeForSelection(o,"bottom",e,t);if(!e.rowPinned&&"bottom"===t.rowPinned){const s=_getNodesInRangeForSelection(o,"bottom",void 0,t),n=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,n)??[]).concat(s)}return null}}(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],(()=>{const t=_getIsRowSelectable(e);t!==this.isRowSelectable&&(this.isRowSelectable=t,this.updateSelectable())})),this.isRowSelectable=_getIsRowSelectable(e),this.addManagedEventListeners({cellValueChanged:e=>this.updateRowSelectable(e.node),rowNodeDataChanged:e=>this.updateRowSelectable(e.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new Fl}createSelectAllFeature(e){if(isCheckboxSelection(this.beans,e))return new Dl(e)}isMultiSelect(){return _isMultiRowSelection(this.gos)}onRowCtrlSelected(e,t,o){const i=!!e.rowNode.isSelected();e.forEachGui(o,(e=>{e.rowComp.toggleCss("ag-row-selected",i);const o=e.element;_setAriaSelected(o,i);o.contains(_getActiveDomElement(this.beans))&&t(e)}))}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),o=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||o)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!_isManualPinnedRow(e)||!_isRowSelection(this.gos)}updateRowSelectable(e,t){const o=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,o,t),o}setRowSelectable(e,t,o){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),o)return;if(_getGroupSelectsDescendants(this.gos)){const t=this.calculateSelectedFromChildren(e);return void this.setNodesSelected({nodes:[e],newValue:t??!1,source:"selectableChanged"})}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,o=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const s=e.childrenAfterGroup[i];let n=s.isSelected();if(!s.selectable){const e=this.calculateSelectedFromChildren(s);if(null===e)continue;n=e}switch(n){case!0:t=!0;break;case!1:o=!0;break;default:return}}return t&&o?void 0:!!t||!o&&(e.selectable?e.__selected:null)}selectRowNode(e,t,o,i="api"){if(t&&e.destroyed)return!1;const s=!e.selectable&&t,n=e.__selected===t;if(s||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({..._createGlobalRowEvent(e,this.gos,"rowSelected"),event:o||null,source:i}),!0}isCellCheckboxSelection(e,t){const o=this.gos.get("rowSelection");if(o&&"string"!=typeof o){const i=isColumnSelectionCol(e)&&_getCheckboxes(o);return e.isColumnFunc(t,i)}return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,o,i){const{gos:s,selectionCtx:n}=this,r=e.isSelected(),a=_getGroupSelectsDescendants(s),l=function _getEnableSelection(e){const t=_getEnableClickSelection(e);return!0===t||"enableSelection"===t}(s),d=function _getEnableDeselection(e){const t=_getEnableClickSelection(e);return!0===t||"enableDeselection"===t}(s),c=this.isMultiSelect(),u="rowClicked"===i;if(u&&!l&&!d)return null;if(t&&o&&c){const t=n.getRoot();if(t){if(t.isSelected()){const t=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:t.discard,select:t.keep,reset:!1}}return{select:[],deselect:n.extend(e,a).keep,reset:!1}}return null}if(t&&c){const t=n.selectAll?this.beans.rowModel.getRow(0):void 0,o=n.getRoot(t),i=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:i.keep,deselect:i.discard,reset:n.selectAll||!(!o||o.isSelected())}}if(o){if(u){const t=!r,o=!t&&!d;return t&&!l||o?null:(n.setRoot(e),{node:e,newValue:t,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!r,clearSelection:!c}}{n.setRoot(e);const t=function _getEnableSelectionWithoutKeys(e){const t=e.get("rowSelection");return"string"==typeof t?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}(s),o="filteredDescendants"===_getGroupSelection(s),i=u&&(!t||!l);if(o&&void 0===r&&_isClientSideRowModel(s))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!c||i};if(u){const o=r?!t:l,s=o&&!l,n=!o&&!d;return o===r&&!i||s||n?null:{node:e,newValue:o,clearSelection:!c||i,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!c||i}}}};function _normaliseSiblingRef(e){return _isManualPinnedRow(e)?e.pinnedSibling:e.footer?e.sibling:e}function _calculateSelectAllState(e,t){return(0!==e||0!==t)&&(e>0&&t>0?void 0:e>0)}function recursiveCanNodesBeSelected(e){const t=!1===e.isSelected(),o=e.childrenAfterFilter?.some(recursiveCanNodesBeSelected)??!1;return t||o}var xl={moduleName:"SharedRowSelection",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",(e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,_convertColumnEventSourceType(e.source))})),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;null!=t&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),function _updateColsMap(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}(e))}createColumns(e,t){const o=e.treeDepth,i=(this.columns?.treeDepth??-1)==o,s=this.generateSelectionCols();if(function _areColIdsEqual(e,t){return _areEqual(e,t,((e,t)=>e.getColId()===t.getColId()))}(s,this.columns?.list??[])&&i)return;(()=>{_destroyColumnTree(this.beans,this.columns?.tree),this.columns=null})();const{colGroupSvc:n}=this.beans,r=n?.findDepth(e.tree)??0,a=n?.balanceTreeForAutoCols(s,r)??[];this.columns={list:s,tree:a,treeDepth:r,map:{}};t((e=>{if(!e)return null;const t=e.filter((e=>!isColumnSelectionCol(e)));return[...s,...t]}))}updateColumns(e){const t=_convertColumnEventSourceType(e.source),{beans:o}=this;for(const i of this.columns?.list??[]){const s=this.createSelectionColDef(e.currentValue);i.setColDef(s,null,t),_applyColumnState(o,{state:[_getColumnStateFromColDef(s,i.colId)]},t)}}getColumn(e){return this.columns?.list.find((t=>_columnsMatch(t,e)))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,o=e.get("rowSelection");if("object"!=typeof o||!_isRowSelection(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if("autoGroupColumn"===o.checkboxLocation&&i)return!1;const s=!!_getCheckboxes(o),n=_getHeaderCheckbox(o);return s||n}createSelectionColDef(e){const{gos:t}=this,o=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:s,spanRows:n,...r}=o??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(e,t,o,i){const s=o.isSelected();return s===i.isSelected()?0:s?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...r,colId:U,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const o=new H(e,null,t,!1);return this.createBean(o),[o]}onSelectionOptionsChanged(e,t,o){const i=(t&&"string"!=typeof t?_getCheckboxes(t):void 0)!==(e&&"string"!=typeof e?_getCheckboxes(e):void 0),s=(t&&"string"!=typeof t?_getHeaderCheckbox(t):void 0)!==(e&&"string"!=typeof e?_getHeaderCheckbox(e):void 0),n=_getCheckboxLocation(e),r=_getCheckboxLocation(t);(i||s||n!==r)&&this.beans.colModel.refreshAll(o)}destroy(){_destroyColumnTree(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,o){if(!this.columns?.list.length)return;const i=e.length+t.length+o.length;if(0===i)return;const s=this.columns.list[0];if(!s.isVisible())return;const n=this.beans.rowNumbersSvc?.getColumn($);(n?2:1)===i&&(()=>{let i;switch(s.pinned){case"left":case!0:i=e;break;case"right":i=o;break;default:i=t}i&&_removeFromArray(i,s)})()}}],css:[':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}'],apiFunctions:{setNodesSelected:function setNodesSelected(e,t){if(!t.nodes.every((e=>e.rowPinned&&!_isManualPinnedRow(e)?(_warn(59),!1):void 0!==e.id||(_warn(60),!1))))return;const{nodes:o,source:i,newValue:s}=t;e.selectionSvc?.setNodesSelected({nodes:o,source:i??"api",newValue:s})},selectAll:function selectAll(e,t,o="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:o,selectAll:t})},deselectAll:function deselectAll(e,t,o="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:o,selectAll:t})},selectAllFiltered:function selectAllFiltered(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})},deselectAllFiltered:function deselectAllFiltered(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})},selectAllOnCurrentPage:function selectAllOnCurrentPage(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})},deselectAllOnCurrentPage:function deselectAllOnCurrentPage(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})},getSelectedNodes:function getSelectedNodes(e){return e.selectionSvc?.getSelectedNodes()??[]},getSelectedRows:function getSelectedRows(e){return e.selectionSvc?.getSelectedRows()??[]}}},El={moduleName:"RowSelection",version:I,rowModels:["clientSide","infinite","viewport"],beans:[class extends Pl{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=_getRowSelectionMode(e),this.groupSelectsDescendants=_getGroupSelectsDescendants(e),this.groupSelectsFiltered="filteredDescendants"===_getGroupSelection(e),this.masterSelectsDetail="detail"===_getMasterSelects(e),this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],(()=>{const t=_getGroupSelectsDescendants(e),o=_getRowSelectionMode(e),i="filteredDescendants"===_getGroupSelection(e);this.masterSelectsDetail="detail"===_getMasterSelects(e),t===this.groupSelectsDescendants&&i===this.groupSelectsFiltered&&o===this.mode||(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=o)})),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,o){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);if(null==i)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,o),this.selectRange(i.select,!0,o);{const t=i.checkFilteredNodes?recursiveCanNodesBeSelected(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:t,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:o})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:o,nodes:i,event:s,source:n,keepDescendants:r=!1}){if(0===i.length)return 0;const{gos:a}=this;if(!_isRowSelection(a)&&e)return _warn(132),0;if(i.length>1&&!this.isMultiSelect())return _warn(130),0;let l=0;for(let t=0;t<i.length;t++){const o=i[t],r=_normaliseSiblingRef(o);if(r.rowPinned&&!_isManualPinnedRow(r)){_warn(59);continue}if(void 0===r.id){_warn(60);continue}if(e&&o.destroyed)continue;if(!(this.groupSelectsFiltered&&r.group&&!a.get("treeData"))){this.selectRowNode(r,e,s,n)&&(this.detailSelection.delete(r.id),l++)}this.groupSelectsDescendants&&r.childrenAfterGroup?.length&&(l+=this.selectChildren(r,e,n))}if(!o){1===i.length&&"api"===n&&this.selectionCtx.setRoot(_normaliseSiblingRef(i[0]));e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(_normaliseSiblingRef(i[0]),r,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))}return l}selectRange(e,t,o){let i=0;return e.forEach((e=>{const s=_normaliseSiblingRef(e);if(s.group&&this.groupSelectsDescendants)return;this.selectRowNode(s,t,void 0,o)&&i++})),i>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o)),i}selectChildren(e,t,o){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:o,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach((t=>t.data&&e.push(t.data))),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach(((o,i)=>{e(o)&&t.set(i,o)})),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:o,rowModel:i}=this.beans;if(!_isClientSideRowModel(o))return!1;const s=i.rootNode;if(!s)return!1;t||((t=new Wo(!0,s)).active=!1);let n=!1;return t.forEachChangedNodeDepthFirst((t=>{if(t!==s){const o=this.calculateSelectedFromChildren(t);n=this.selectRowNode(t,null!==o&&o,void 0,e)||n}})),n}clearOtherNodes(e,t,o){const i=new Map;let s=0;return this.selectedNodes.forEach((n=>{const r=n.id==e.id;if((!t||!function isDescendantOf(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}(e,n))&&!r){const e=this.selectedNodes.get(n.id);s+=this.setNodesSelected({nodes:[e],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:o}),this.groupSelectsDescendants&&n.parent&&i.set(n.parent.id,n.parent)}})),i.forEach((e=>{const t=this.calculateSelectedFromChildren(e);this.selectRowNode(e,null!==t&&t,void 0,o)})),s}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new Nt(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){if(t&&e.id!==t.id){this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach((e=>{this.selectRowNode(e,!1)})),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!_isClientSideRowModel(e))return;const o=t.getTopLevelNodes();if(null===o)return;const i=[];return function traverse(e){for(let t=0,o=e.length;t<o;t++){const o=e[t];o.isSelected()?i.push(o):o.group&&o.childrenAfterGroup&&traverse(o.childrenAfterGroup)}}(o),i}isEmpty(){return 0===this.getSelectionCount()}deselectAllRowNodes({source:e,selectAll:t}){const o=_isClientSideRowModel(this.gos);let i=!1;const callback=t=>{const o=this.selectRowNode(_normaliseSiblingRef(t),!1,void 0,e);i||(i=o)};if("currentPage"===t||"filtered"===t){if(!o)return void _error(102);this.getNodesToSelect(t).forEach(callback)}else this.selectedNodes.forEach(callback),this.reset(e);if(this.selectionCtx.selectAll=!1,o&&this.groupSelectsDescendants){const t=this.updateGroupsFromChildrenSelections(e);i||(i=t)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,o=0;return this.getNodesToSelect(e).forEach((e=>{this.groupSelectsDescendants&&e.group||(e.isSelected()?t++:e.selectable&&o++)})),{selectedCount:t,notSelectedCount:o}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:o}=this.getSelectedCounts(e);return _calculateSelectAllState(t,o)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter((e=>e.selectable)).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],addToResult=e=>t.push(e);if("currentPage"===e)return this.forEachNodeOnPage((e=>{if(e.group)if(e.expanded||e.footer)this.groupSelectsDescendants||addToResult(e);else{const recursivelyAddChildren=e=>{addToResult(e),e.childrenAfterFilter?.forEach(recursivelyAddChildren)};recursivelyAddChildren(e)}else addToResult(e)})),t;const o=this.beans.rowModel;return"filtered"===e?(o.forEachNodeAfterFilter(addToResult),t):(o.forEachNode(addToResult),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:o}=this.beans,i=t.getFirstRow(),s=t.getLastRow();for(let t=i;t<=s;t++){const i=o.getRow(t);i&&e(i)}}selectAllRowNodes(e){const{gos:t,selectionCtx:o}=this;if(!_isRowSelection(t))return void _warn(132);if(function _isUsingNewRowSelectionAPI(e){return"string"!=typeof e.get("rowSelection")}(t)&&!_isMultiRowSelection(t))return void _warn(130);if(!this.canSelectAll())return;const{source:i,selectAll:s}=e;let n=!1;if(this.getNodesToSelect(s).forEach((e=>{const t=this.selectRowNode(_normaliseSiblingRef(e),!0,void 0,i);n||(n=t)})),o.selectAll=!0,_isClientSideRowModel(t)&&this.groupSelectsDescendants){const e=this.updateGroupsFromChildrenSelections(i);n||(n=e)}n&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,o){if(e||(e=[]),!Array.isArray(e))return void _error(103);const i=new Set(e),s=[];this.beans.rowModel.forEachNode((e=>{i.has(e.id)&&s.push(e)})),o&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){return _isClientSideRowModel(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:o}=this.beans;if(!_isRowSelection(t))return;const i="selectableChanged",s=void 0!==e,n=_isClientSideRowModel(t)&&this.groupSelectsDescendants,r=[],nodeCallback=e=>{if(s&&!e.group)return;if(n&&e.group){const t=e.childrenAfterGroup?.some((e=>e.selectable))??!1;return void this.setRowSelectable(e,t,!0)}!this.updateRowSelectable(e,!0)&&e.isSelected()&&r.push(e)};if(n){if(void 0===e){const t=o.rootNode;e=t?new Wo(!1,t):void 0}e?.forEachChangedNodeDepthFirst(nodeCallback,!s,!s)}else o.forEachNode(nodeCallback);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:i}),!s&&n&&this.updateGroupsFromChildrenSelections?.(i)}updateSelectableAfterGrouping(e){if(this.updateSelectable(e),this.groupSelectsDescendants){const t=this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e);t&&this.dispatchSelectionChanged("rowGroupChanged")}}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const o=e.detailNode?.detailGridInfo?.api;if(!o)return;const i=function _isAllSelected(e){let t=0,o=0;return e.forEachNode((e=>{e.isSelected()?t++:e.selectable&&o++})),_calculateSelectAllState(t,o)}(o);if(e.isSelected()!==i){this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail")}i||this.detailSelection.set(e.id,new Set(o.getSelectedNodes().map((e=>e.id))))}setDetailSelectionState(e,t,o){if(this.masterSelectsDetail)if(_isMultiRowSelection(t))switch(e.isSelected()){case!0:o.selectAll();break;case!1:o.deselectAll();break;case void 0:{const t=this.detailSelection.get(e.id);if(t){const e=[];for(const i of t){const t=o.getRowNode(i);t&&e.push(t)}o.setNodesSelected({nodes:e,newValue:!0,source:"masterDetail"})}break}}else _warn(269)}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}],dependsOn:[xl]},Ml=class extends m{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,s=this.getCellClassParams(e,o);processClassRules(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,s,(e=>t.toggleCss(e,!0)),(e=>t.toggleCss(e,!1))),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if("function"==typeof o){i=o(this.getCellClassParams(e,t))}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);for(const e of this.staticClasses)t.toggleCss(e,!1);const s=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=s;for(const e of s)t.toggleCss(e,!0)}getCellClassParams(e,t){const{value:o,rowNode:i}=this.cellCtrl;return _addGridCommonParams(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},Tl={moduleName:"CellStyle",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){processClassRules(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let i;if("function"==typeof o){i=o(t)}else i=o;return"string"==typeof i&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new Ml(e,this.beans)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach((e=>{o(e)}))}}]},Al={moduleName:"RowStyle",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const o=this.gos,process=t=>{if("string"==typeof t)e.push(t);else if(Array.isArray(t))for(const o of t)e.push(o)},i=o.get("rowClass");i&&process(i);const s=o.getCallback("getRowClass");if(s){process(s({data:t.data,node:t,rowIndex:t.rowIndex}))}}preProcessRowClassRules(e,t){this.processRowClassRules(t,(t=>{e.push(t)}),(()=>{}))}processRowClassRules(e,t,o){const{gos:i,expressionSvc:s}=this.beans,n=_addGridCommonParams(i,{data:e.data,node:e,rowIndex:e.rowIndex});processClassRules(s,void 0,i.get("rowClassRules"),n,t,o)}processStylesFromGridOptions(e){const t=this.gos,o=t.get("rowStyle"),i=t.getCallback("getRowStyle");let s;if(i){s=i({data:e.data,node:e,rowIndex:e.rowIndex})}if(s||o)return Object.assign({},o,s)}}]},Il={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,overlayComponent:!0,suppressOverlays:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},kl="clientSide",Ll="serverSide",_l="infinite",Gl={onGroupExpandedOrCollapsed:[kl],refreshClientSideRowModel:[kl],isRowDataEmpty:[kl],forEachLeafNode:[kl],forEachNodeAfterFilter:[kl],forEachNodeAfterFilterAndSort:[kl],resetRowHeights:[kl,Ll],applyTransaction:[kl],applyTransactionAsync:[kl],flushAsyncTransactions:[kl],getBestCostNodeSelection:[kl],getServerSideSelectionState:[Ll],setServerSideSelectionState:[Ll],applyServerSideTransaction:[Ll],applyServerSideTransactionAsync:[Ll],applyServerSideRowData:[Ll],retryServerSideLoads:[Ll],flushServerSideAsyncTransactions:[Ll],refreshServerSide:[Ll],getServerSideGroupLevelState:[Ll],refreshInfiniteCache:[_l],purgeInfiniteCache:[_l],getInfiniteRowCount:[_l],isLastRowIndexKnown:[_l,Ll],expandAll:[kl,Ll],collapseAll:[kl,Ll],onRowHeightChanged:[kl,Ll],setRowCount:[_l,Ll],getCacheBlockState:[_l,Ll]},Nl={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};var Vl={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},Ol={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,aasc:1,adesc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},Hl={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",overlayLoading:"Overlay",overlayExporting:"Overlay",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},Bl=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]);var Wl=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),zl={moduleName:"AllCommunity",version:I,dependsOn:[Yn,sr,sl,{moduleName:"Validation",version:I,beans:[class extends m{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,function provideValidationServiceLogger(e){L=e}(getError)}warnOnInitialPropertyUpdate(e,t){"api"===e&&Il[t]&&_warn(22,{key:t})}processGridOptions(e){this.processOptions(e,{objectName:"gridOptions",allProperties:[...Ts,...Ms,...Es,...As,..._s,...Ls,...ks,...Is,...Object.values(Fs)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:{suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}},validations:GRID_OPTION_VALIDATIONS()})}validateApiFunction(e,t){return function validateApiFunction(e,t,o){const i=Nl[e];if(i){const{version:o,new:s,old:n,message:r}=i,a=n??e;return(...e)=>(_warnOnce(`Since ${o} api.${a} is deprecated. ${s?`Please use ${s} instead. `:""}${r??""}`),t.apply(t,e))}const s=Gl[e];return s?(...i)=>{const n=o.rowModel.getType();if(s.includes(n))return t.apply(t,i);_errorOnce(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`)}:t}(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=Ds[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):_warn(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){const t=Vl[e];return t?_errMsg(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){Wl.has(e)&&_warn(10,{eventType:e})}validateIcon(e){if(Bl.has(e)&&_warn(43,{iconName:e}),Ol[e])return;const t=Hl[e];t?_error(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:_areModulesGridScoped(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."}):_warn(134,{iconName:e})}isProvidedUserComp(e){return!!Ds[e]}validateColDef(e){this.processOptions(e,{objectName:"colDef",allProperties:Object.keys(xs),docsUrl:"column-properties/",deprecations:{checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}},validations:{autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(e,{paginationAutoPageSize:t})=>t?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:e=>null==e.rowGroup&&null==e.rowGroupIndex&&"agGroupCellRenderer"!==e.cellRenderer||!("checkbox"in e.cellRendererParams)?null:'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.'},flex:{validate:(e,t)=>t.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:e=>{const t=e.headerValueGetter;return"function"==typeof t||"string"==typeof t?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return _errMsg(262);if(e.smallLeft)return _errMsg(263);if(e.smallRight)return _errMsg(264)}return null}},sort:{validate:e=>_isSortDefValid(e.sort)||_isSortDirectionValid(e.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${"object"==typeof e.sort?JSON.stringify(e.sort):toStringWithNullUndefined(e.sort)}`},initialSort:{validate:e=>_isSortDefValid(e.initialSort)||_isSortDirectionValid(e.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${"object"==typeof e.initialSort?JSON.stringify(e.initialSort):toStringWithNullUndefined(e.initialSort)}`},sortingOrder:{validate:e=>{const t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){const e=t.filter((e=>!(_isSortDefValid(e)||_isSortDirectionValid(e))));if(e.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${e.map((e=>"string"==typeof e||null==e?toStringWithNullUndefined(e):JSON.stringify(e))).join(", ")}]`}else if(!Array.isArray(t)||!t.length)return`sortingOrder must be an array with at least one element, currently it is [${t}]`;return null}},type:{validate:e=>{const t=e.type;return t instanceof Array?t.some((e=>"string"!=typeof e))?"if colDef.type is supplied an array it should be of type 'string[]'":null:"string"==typeof t?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(e,{suppressRowTransform:t})=>t?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(e,{rowSelection:t,cellSelection:o,suppressRowTransform:i,enableCellSpan:s,rowDragEntireRow:n,enableCellTextSelection:r})=>"object"==typeof t&&"singleRow"===t?.mode&&t?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":i?"colDef.spanRows is not supported with suppressRowTransform.":s?n?"colDef.spanRows is not supported with rowDragEntireRow.":r?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(e,{groupHierarchyConfig:t={}},o){const i=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),s=[];for(const n of e.groupHierarchy??[])"object"!=typeof n?i.has(n)||n in t||s.push(quote(n)):o.validation?.validateColDef(n);return s.length>0?`The following parts of colDef.groupHierarchy are not recognised: ${s.join(", ")}.\nChoose one of ${[...i].map(quote).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`:null}}}})}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:a}=t;s&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,r,a);const l=new Set;if(Object.keys(e).forEach((t=>{const s=i[t];if(s){const{message:e,version:o}=s;l.add(`As of v${o}, ${String(t)} is deprecated. ${e??""}`)}const n=e[t];if(null==n||!1===n)return;const r=o[t];if(!r)return;const{dependencies:a,validate:d,supportedRowModels:c,expectedType:u}=r;if(u){const e=typeof n;if(e!==u)return void l.add(`${String(t)} should be of type '${u}' but received '${e}' (${n}).`)}if(c){const e=this.gridOptions.rowModelType??"clientSide";if(!c.includes(e))return void l.add(`${String(t)} is not supported with the '${e}' row model. It is only valid with: ${c.join(", ")}.`)}if(a){const o=this.checkForRequiredDependencies(t,a,e);if(o)return void l.add(o)}if(d){const t=d(e,this.gridOptions,this.beans);if(t)return void l.add(t)}})),l.size>0)for(const e of l)_warnOnce(e)}checkForRequiredDependencies(e,t,o){const i=Object.entries(t).filter((([e,t])=>{const i=o[e];return!t.required.includes(i)}));return 0===i.length?null:i.map((([t,o])=>`'${String(e)}' requires '${t}' to be one of [${o.required.map((e=>null===e?"null":void 0===e?"undefined":e)).join(", ")}]. ${o.reason??""}`)).join("\n ")}checkProperties(e,t,o,i,s){const n=function _fuzzyCheckStrings(e,t,o){const i={},s=e.filter((e=>!t.some((t=>t===e))));if(s.length>0)for(const e of s)i[e]=_fuzzySuggestions({inputValue:e,allSuggestions:o}).values;return i}(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...o],o),r=Object.keys(n);for(const e of r){let t=`invalid ${i} property '${e}' did you mean any of these: ${n[e].slice(0,8).join(", ")}.`;o.includes("context")&&(t+=`\nIf you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),_warnOnce(t)}if(r.length>0&&s){_warnOnce(`to see all the valid ${i} properties please check: ${this.beans.frameworkOverrides.getDocLink(s)}`)}}}]},Jr,Xr,ea,ta,oa,ia,sa,Zr,Qa,Za,Ja,Xa,Ya,el,tl,al,Wn,hl,fi,zn,Un,Cl,Jn,jo,gl,El,Pn,Tl,er,Al,nl,Mn,fl,ur,rl,wl,$o,Qn,yl]};var Ul=class{wrap(e,t,o,i){const s=this.createWrapper(e,i);for(const e of t??[])this.createMethod(s,e,!0);for(const e of o??[])this.createMethod(s,e,!1);return s}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&_warn(49,{methodName:t}),null)}}},$l=class extends Ro{constructor(e){super(e,rt)}}},78508:(e,t,o)=>{o.d(t,{s:()=>oe});var i=o(87363),s=o(12793),n=o(61533),r=i.createContext({}),a=i.createContext("default"),showJsComp=(e,t,o,i)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const s=e.newAgStackInstance();let n,r,a=!1;return s.then((e=>{a?t.destroyBean(e):(n=e,r=n.getGui(),o.appendChild(r),setRef(i,n))})),()=>{a=!0,n&&(r?.remove(),t.destroyBean(n),i&&setRef(i,void 0))}},setRef=(e,t)=>{if(e)if(e instanceof Function){e(t)}else{e.current=t}},classesList=(...e)=>e.filter((e=>null!=e&&""!==e)).join(" "),l=class _CssClasses{constructor(...e){this.classesMap={};for(const t of e)this.classesMap[t]=!0}setClass(e,t){if(!!this.classesMap[e]==t)return this;const o=new _CssClasses;return o.classesMap={...this.classesMap},o.classesMap[e]=t,o}toString(){return Object.keys(this.classesMap).filter((e=>this.classesMap[e])).join(" ")}},isComponentStateless=e=>"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===("function"==typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115),d=i.version?.split(".")[0],c="16"===d||"17"===d;var u=!1;var agFlushSync=(e,t)=>{c||!e||u?t():n.flushSync(t)};function getNextValueIfDifferent(e,t,o){if(null==t||null==e)return t;if(e===t||0===t.length&&0===e.length)return e;if(o||0===e.length&&t.length>0||e.length>0&&0===t.length)return t;const i=[],s=[],n=new Map,r=new Map;for(let e=0;e<t.length;e++){const o=t[e];r.set(o.instanceId,o)}for(let t=0;t<e.length;t++){const o=e[t];n.set(o.instanceId,o),r.has(o.instanceId)&&i.push(o)}for(let e=0;e<t.length;e++){const o=t[e],i=o.instanceId;n.has(i)||s.push(o)}return i.length===e.length&&0===s.length?e:0===i.length&&s.length===t.length?t:0===i.length?s:0===s.length?i:[...i,...s]}var h=(0,i.forwardRef)(((e,t)=>{const{registry:o,context:n}=(0,i.useContext)(r),a=(0,i.useRef)(null),d=(0,i.useRef)(null),c=(0,i.useRef)(null),u=(0,i.useRef)(null),g=(0,i.useRef)(null),p=(0,i.useRef)(),[m,f]=(0,i.useState)(),[C,w]=(0,i.useState)(),[v,b]=(0,i.useState)(),[S,y]=(0,i.useState)((()=>new l)),[R,F]=(0,i.useState)((()=>new l("ag-hidden"))),[D,P]=(0,i.useState)((()=>new l("ag-hidden"))),[x,E]=(0,i.useState)((()=>new l("ag-invisible")));(0,i.useImperativeHandle)(t,(()=>({refresh:()=>!1}))),(0,i.useLayoutEffect)((()=>showJsComp(m,n,d.current)),[m]);const M=(0,i.useCallback)((t=>{if(a.current=t,!t||n.isDestroyed())return void(p.current=n.destroyBean(p.current));const i={setInnerRenderer:(e,t)=>{f(e),b(t)},setChildCount:e=>w(e),toggleCss:(e,t)=>y((o=>o.setClass(e,t))),setContractedDisplayed:e=>P((t=>t.setClass("ag-hidden",!e))),setExpandedDisplayed:e=>F((t=>t.setClass("ag-hidden",!e))),setCheckboxVisible:e=>E((t=>t.setClass("ag-invisible",!e))),setCheckboxSpacing:e=>E((t=>t.setClass("ag-group-checkbox-spacing",e)))},s=o.createDynamicBean("groupCellRendererCtrl",!0);s&&(p.current=n.createBean(s),p.current.init(i,t,c.current,u.current,g.current,h,e))}),[]),T=(0,i.useMemo)((()=>`ag-cell-wrapper ${S.toString()}`),[S]),A=(0,i.useMemo)((()=>`ag-group-expanded ${R.toString()}`),[R]),I=(0,i.useMemo)((()=>`ag-group-contracted ${D.toString()}`),[D]),k=(0,i.useMemo)((()=>`ag-group-checkbox ${x.toString()}`),[x]),L=m?.componentFromFramework,_=L?m.componentClass:void 0,G=null==m&&null!=v,N=(0,s.Z_J)(v);return i.createElement("span",{className:T,ref:M,...e.colDef?{}:{role:p.current?.getCellAriaRole()}},i.createElement("span",{className:A,ref:u}),i.createElement("span",{className:I,ref:g}),i.createElement("span",{className:k,ref:c}),i.createElement("span",{className:"ag-group-value",ref:d},G?N:L?i.createElement(_,{...m.params}):null),i.createElement("span",{className:"ag-group-child-count"},C))})),g=h,p=(0,i.createContext)({setMethods:()=>{}}),m=(0,i.memo)((e=>{const{initialProps:t,addUpdateCallback:o,CustomComponentClass:s,setMethods:n}=e,[{key:r,...a},l]=(0,i.useState)(t);return(0,i.useEffect)((()=>{o((e=>l(e)))}),[]),i.createElement(p.Provider,{value:{setMethods:n}},i.createElement(s,{key:r,...a}))})),f=0;function generateNewKey(){return"agPortalKey_"+ ++f}var C=class{constructor(e,t,o,i){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=o,this.suppressFallbackMethods=!!i,this.statelessComponent=this.isStateless(this.reactComponent),this.key=generateNewKey(),this.portalKey=generateNewKey(),this.instanceCreated=this.isStatelessComponent()?s.j_S.resolve(!1):new s.j_S((e=>{this.resolveInstanceCreated=e}))}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&"function"==typeof this.componentInstance.destroy&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),o=document.createElement(t||"div");return o.classList.add("ag-react-container"),e.reactContainer=o,o}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return"function"==typeof Symbol&&Symbol.for}isStateless(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&null!=t[e]||this.fallbackMethodAvailable(e)}callMethod(e,t){const o=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!o)return void setTimeout((()=>this.callMethod(e,t)));const i=o[e];return i?i.apply(o,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new s.j_S((e=>this.createReactComponent(e)))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=e=>{this.componentInstance=e,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=(0,n.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return(0,i.createElement)(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const o=this[`${e}Component`];if(!this.suppressFallbackMethods&&o)return o.bind(this)(t)}fallbackMethodAvailable(e){if(this.suppressFallbackMethods)return!1;return!!this[`${e}Component`]}};function addOptionalMethods(e,t,o){for(const i of e){const e=t[i];e&&(o[i]=e)}}var w=class extends C{constructor(){super(...arguments),this.awaitUpdateCallback=new s.j_S((e=>{this.resolveUpdateCallback=e})),this.wrapperComponent=m}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then((()=>this.componentInstance))}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:e=>this.setMethods(e),addUpdateCallback:e=>{this.updateCallback=()=>(e(this.getProps()),new s.j_S((e=>{setTimeout((()=>{e()}))}))),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,addOptionalMethods(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new s.j_S((e=>this.awaitUpdateCallback.then((()=>{this.updateCallback().then((()=>e()))}))))}},v=class extends w{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},b=class extends w{refresh(e){this.sourceParams=e,this.refreshProps()}},S=class extends w{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},y=class extends w{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:o,shake:i}=this;return e.label=t,e.icon=o,e.shake=i,e}},R=class extends w{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new s.j_S((e=>{this.resolveSetMethodsCallback=e}))}isFilterActive(){return null!=this.model}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then((()=>this.providedMethods?.afterGuiAttached?.(e)))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){!1===this.expectingNewMethods&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout((()=>{this.sourceParams.filterChangedCallback()})),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();const t=new s.j_S((e=>{this.resolveFilterPassCallback=e}));this.setModel(e).then((()=>{t.then((()=>{this.sourceParams.filterChangedCallback()}))}))}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},F=class extends w{constructor(){super(...arguments),this.awaitSetMethodsCallback=new s.j_S((e=>{this.resolveSetMethodsCallback=e}))}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then((()=>this.providedMethods?.afterGuiAttached?.(e)))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function updateFloatingFilterParent(e,t){e.parentFilterInstance((o=>{(o.setModel(t)||s.j_S.resolve()).then((()=>{e.filterParams.filterChangedCallback()}))}))}var D=class extends w{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),updateFloatingFilterParent(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},P=class extends w{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},x=class extends w{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},E=class extends w{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then((()=>this.sourceParams.onItemActivated()))}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},M=class extends w{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},T=class extends w{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function warnReactiveCustomComponents(){(0,s.F5b)(231)}var A=i.createContext([]),I=i.createContext(void 0);var k=(0,i.memo)((({ctrl:e})=>{const t=e.isAlive(),{context:o}=(0,i.useContext)(r),[n,a]=(0,i.useState)(),[l,d]=(0,i.useState)(),c=(0,i.useRef)(),u=(0,i.useRef)(null),h=(0,i.useRef)(null),g=(0,i.useRef)(null),p=(0,i.useRef)(),m=(0,i.useRef)();t&&!m.current&&(m.current=new s.fRQ((()=>u.current)));const f=(0,i.useCallback)((t=>{if(u.current=t,!t||!e.isAlive()||o.isDestroyed())return void(c.current=o.destroyBean(c.current));c.current=o.createBean(new s.HGE);const refreshSelectAllGui=()=>{const t=e.getSelectAllGui();t&&(h.current?.insertAdjacentElement("afterend",t),c.current.addDestroyFunc((()=>t.remove())))},i={setWidth:e=>{u.current&&(u.current.style.width=e)},toggleCss:(e,t)=>m.current.toggleCss(e,t),setUserStyles:e=>d(e),setAriaSort:e=>{u.current&&(e?(0,s.gCM)(u.current,e):(0,s.KxL)(u.current))},setUserCompDetails:e=>a(e),getUserCompInstance:()=>p.current||void 0,refreshSelectAllGui,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(i,t,h.current,g.current,c.current),refreshSelectAllGui()}),[]);(0,i.useLayoutEffect)((()=>showJsComp(n,o,g.current,p)),[n]),(0,i.useEffect)((()=>{e.setDragSource(u.current)}),[n]);const C=(0,i.useMemo)((()=>!!(n?.componentFromFramework&&isComponentStateless(n.componentClass))),[n]),w=n?.componentFromFramework,v=n?.componentClass;return i.createElement("div",{ref:f,style:l,className:"ag-header-cell",role:"columnheader"},i.createElement("div",{ref:h,className:"ag-header-cell-resize",role:"presentation"}),i.createElement("div",{ref:g,className:"ag-header-cell-comp-wrapper",role:"presentation"},w?C?i.createElement(v,{...n.params}):i.createElement(v,{...n.params,ref:p}):null))})),L=(0,i.memo)((({ctrl:e})=>{const{context:t,gos:o}=(0,i.useContext)(r),[n,a]=(0,i.useState)(),[d,c]=(0,i.useState)((()=>new l("ag-header-cell","ag-floating-filter"))),[u,h]=(0,i.useState)((()=>new l)),[g,m]=(0,i.useState)((()=>new l("ag-floating-filter-button","ag-hidden"))),[f,C]=(0,i.useState)("false"),[w,v]=(0,i.useState)(),[,b]=(0,i.useState)(1),S=(0,i.useRef)(),y=(0,i.useRef)(null),R=(0,i.useRef)(null),F=(0,i.useRef)(null),D=(0,i.useRef)(null),P=(0,i.useRef)(),x=(0,i.useRef)(),userCompRef=e=>{null!=e&&P.current?.(e)},E=(0,i.useCallback)((o=>{if(y.current=o,!o||!e.isAlive()||t.isDestroyed())return void(S.current=t.destroyBean(S.current));S.current=t.createBean(new s.HGE),x.current=new s.j_S((e=>{P.current=e}));const i={toggleCss:(e,t)=>c((o=>o.setClass(e,t))),setUserStyles:e=>a(e),addOrRemoveBodyCssClass:(e,t)=>h((o=>o.setClass(e,t))),setButtonWrapperDisplayed:e=>{m((t=>t.setClass("ag-hidden",!e))),C(e?"false":"true")},setWidth:e=>{y.current&&(y.current.style.width=e)},setCompDetails:e=>v(e),getFloatingFilterComp:()=>x.current?x.current:null,setMenuIcon:e=>D.current?.appendChild(e)};e.setComp(i,o,D.current,R.current,S.current)}),[]);(0,i.useLayoutEffect)((()=>showJsComp(w,t,R.current,userCompRef)),[w]);const M=(0,i.useMemo)((()=>d.toString()),[d]),T=(0,i.useMemo)((()=>u.toString()),[u]),A=(0,i.useMemo)((()=>g.toString()),[g]),I=(0,i.useMemo)((()=>!!(w&&w.componentFromFramework&&isComponentStateless(w.componentClass))),[w]),k=(0,i.useMemo)((()=>o.get("reactiveCustomComponents")),[]),L=(0,i.useMemo)((()=>o.get("enableFilterHandlers")),[]),[_,G]=(0,i.useState)();(0,i.useEffect)((()=>{if(w?.componentFromFramework)if(k){const e=new(L?class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){addOptionalMethods(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}}:class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=e=>this.updateModel(e)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){addOptionalMethods(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),updateFloatingFilterParent(this.floatingFilterParams,e)}})(w.params,(()=>b((e=>e+1))));userCompRef(e),G(e)}else warnReactiveCustomComponents()}),[w]);const N=_?.getProps(),V=w?.componentFromFramework,O=w?.componentClass;return i.createElement("div",{ref:E,style:n,className:M,role:"gridcell"},i.createElement("div",{ref:R,className:T,role:"presentation"},V?k?N&&i.createElement(p.Provider,{value:{setMethods:e=>_.setMethods(e)}},i.createElement(O,{...N})):i.createElement(O,{...w.params,ref:I?()=>{}:userCompRef}):null),i.createElement("div",{ref:F,"aria-hidden":f,className:A,role:"presentation"},i.createElement("button",{ref:D,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))})),_=(0,i.memo)((({ctrl:e})=>{const{context:t}=(0,i.useContext)(r),[o,n]=(0,i.useState)(),[a,d]=(0,i.useState)((()=>new l)),[c,u]=(0,i.useState)((()=>new l)),[h,g]=(0,i.useState)("false"),[p,m]=(0,i.useState)(),[f,C]=(0,i.useState)(),w=(0,i.useRef)(),v=(0,i.useRef)(null),b=(0,i.useRef)(null),S=(0,i.useRef)(null),y=(0,i.useRef)(),R=(0,i.useCallback)((o=>{if(v.current=o,!o||!e.isAlive()||t.isDestroyed())return void(w.current=t.destroyBean(w.current));w.current=t.createBean(new s.HGE);const i={setWidth:e=>{v.current&&(v.current.style.width=e)},toggleCss:(e,t)=>d((o=>o.setClass(e,t))),setUserStyles:e=>n(e),setHeaderWrapperHidden:e=>{const t=S.current;t&&(e?t.style.setProperty("display","none"):t.style.removeProperty("display"))},setHeaderWrapperMaxHeight:e=>{const t=S.current;t&&(null!=e?t.style.setProperty("max-height",`${e}px`):t.style.removeProperty("max-height"),t.classList.toggle("ag-header-cell-comp-wrapper-limited-height",null!=e))},setUserCompDetails:e=>C(e),setResizableDisplayed:e=>{u((t=>t.setClass("ag-hidden",!e))),g(e?"false":"true")},setAriaExpanded:e=>m(e),getUserCompInstance:()=>y.current||void 0};e.setComp(i,o,b.current,S.current,w.current)}),[]);(0,i.useLayoutEffect)((()=>showJsComp(f,t,S.current)),[f]),(0,i.useEffect)((()=>{v.current&&e.setDragSource(v.current)}),[f]);const F=(0,i.useMemo)((()=>!!(f?.componentFromFramework&&isComponentStateless(f.componentClass))),[f]),D=(0,i.useMemo)((()=>"ag-header-group-cell "+a.toString()),[a]),P=(0,i.useMemo)((()=>"ag-header-cell-resize "+c.toString()),[c]),x=f?.componentFromFramework,E=f?.componentClass;return i.createElement("div",{ref:R,style:o,className:D,role:"columnheader","aria-expanded":p},i.createElement("div",{ref:S,className:"ag-header-cell-comp-wrapper",role:"presentation"},x?F?i.createElement(E,{...f.params}):i.createElement(E,{...f.params,ref:y}):null),i.createElement("div",{ref:b,"aria-hidden":h,className:P}))})),G=(0,i.memo)((({ctrl:e})=>{const{gos:t,context:o}=(0,i.useContext)(r),{topOffset:n,rowHeight:a}=(0,i.useMemo)((()=>e.getTopAndHeight()),[]),l=(0,i.useMemo)((()=>t.get("tabIndex")),[]),[d,c]=(0,i.useState)((()=>e.getAriaRowIndex())),u=e.headerRowClass,[h,g]=(0,i.useState)((()=>a+"px")),[p,m]=(0,i.useState)((()=>n+"px")),f=(0,i.useRef)(null),[C,w]=(0,i.useState)((()=>e.getUpdatedHeaderCtrls())),v=(0,i.useRef)(),b=(0,i.useRef)(null),S=(0,i.useCallback)((t=>{if(b.current=t,!t||!e.isAlive()||o.isDestroyed())return void(v.current=o.destroyBean(v.current));v.current=o.createBean(new s.HGE);const i={setHeight:e=>g(e),setTop:e=>m(e),setHeaderCtrls:(e,t,o)=>{const i=f.current,s=getNextValueIfDifferent(i,e,t);s!==i&&(f.current=s,agFlushSync(o,(()=>w(s))))},setWidth:e=>{b.current&&(b.current.style.width=e)},setRowIndex:e=>{c(e)}};e.setComp(i,v.current,!1)}),[]),y=(0,i.useMemo)((()=>({height:h,top:p})),[h,p]),R=(0,i.useCallback)((t=>{switch(e.type){case"group":return i.createElement(_,{ctrl:t,key:t.instanceId});case"filter":return i.createElement(L,{ctrl:t,key:t.instanceId});default:return i.createElement(k,{ctrl:t,key:t.instanceId})}}),[]);return i.createElement("div",{ref:S,className:u,role:"row",style:y,tabIndex:l,"aria-rowindex":d},C.map(R))})),N=(0,i.memo)((({pinned:e})=>{const[t,o]=(0,i.useState)(!0),[n,a]=(0,i.useState)([]),{context:l}=(0,i.useContext)(r),d=(0,i.useRef)(null),c=(0,i.useRef)(null),u=(0,i.useRef)(),h="left"===e,g="right"===e,p=!h&&!g,m=(0,i.useCallback)((t=>{if(d.current=t,!t||l.isDestroyed())return void(u.current=l.destroyBean(u.current));u.current=l.createBean(new s.TsN(e));const i={setDisplayed:o,setCtrls:e=>a(e),setCenterWidth:e=>{c.current&&(c.current.style.width=e)},setViewportScrollLeft:e=>{d.current&&(d.current.scrollLeft=e)},setPinnedContainerWidth:e=>{d.current&&(d.current.style.width=e,d.current.style.minWidth=e,d.current.style.maxWidth=e)}};u.current.setComp(i,d.current)}),[]),f=t?"":"ag-hidden",insertRowsJsx=()=>n.map((e=>i.createElement(G,{ctrl:e,key:e.instanceId})));return h?i.createElement("div",{ref:m,className:"ag-pinned-left-header "+f,"aria-hidden":!t,role:"rowgroup"},insertRowsJsx()):g?i.createElement("div",{ref:m,className:"ag-pinned-right-header "+f,"aria-hidden":!t,role:"rowgroup"},insertRowsJsx()):p?i.createElement("div",{ref:m,className:"ag-header-viewport "+f,role:"rowgroup",tabIndex:-1},i.createElement("div",{ref:c,className:"ag-header-container",role:"presentation"},insertRowsJsx())):null})),V=(0,i.memo)((()=>{const[e,t]=(0,i.useState)((()=>new l)),[o,n]=(0,i.useState)(),{context:a}=(0,i.useContext)(r),d=(0,i.useRef)(null),c=(0,i.useRef)(),u=(0,i.useCallback)((e=>{if(d.current=e,!e||a.isDestroyed())return void(c.current=a.destroyBean(c.current));c.current=a.createBean(new s.gA7);const o={toggleCss:(e,o)=>t((t=>t.setClass(e,o))),setHeightAndMinHeight:e=>n(e)};c.current.setComp(o,e,e)}),[]),h=(0,i.useMemo)((()=>"ag-header "+e.toString()),[e]),g=(0,i.useMemo)((()=>({height:o,minHeight:o})),[o]);return i.createElement("div",{ref:u,className:h,style:g,role:"presentation"},i.createElement(N,{pinned:"left"}),i.createElement(N,{pinned:null}),i.createElement(N,{pinned:"right"}))})),reactComment_default=(e,t)=>{(0,i.useEffect)((()=>{const o=t.current;if(o){const t=o.parentElement;if(t){const i=document.createComment(e);return t.insertBefore(i,o),()=>{i.remove()}}}}),[e])},O=(0,i.memo)((e=>{const[t,o]=(0,i.useState)(),a=(0,i.useContext)(r),{context:l,popupSvc:d,gos:c,editSvc:u}=a,{editDetails:h,cellCtrl:g,eParentCell:p}=e;return(e=>{const t=(0,i.useRef)(e),o=(0,i.useRef)(),s=(0,i.useRef)(!1),n=(0,i.useRef)(!1),[,r]=(0,i.useState)(0);s.current&&(n.current=!0),(0,i.useEffect)((()=>(s.current||(o.current=t.current(),s.current=!0),r((e=>e+1)),()=>{n.current&&o.current?.()})),[])})((()=>{const{compDetails:t}=h,i=c.get("stopEditingWhenCellsLoseFocus");let s,n;if(!l.isDestroyed()){n=l.createBean(u.createPopupEditorWrapper(t.params));const r=n.getGui();if(e.jsChildComp){const t=e.jsChildComp.getGui();t&&r.appendChild(t)}const{column:a,rowNode:c}=g,m={column:a,rowNode:c,type:"popupCellEditor",eventSource:p,ePopup:r,position:h.popupPosition,keepWithinBounds:!0},f=d?.positionPopupByComponent.bind(d,m),C=d?.addPopup({modal:i,eChild:r,closeOnEsc:!0,closedCallback:()=>{g.onPopupEditorClosed()},anchorToElement:p,positionCallback:f,ariaOwns:p});s=C?C.hideFunc:void 0,o(n),e.jsChildComp?.afterGuiAttached?.()}return()=>{s?.(),l.destroyBean(n)}})),(0,i.useLayoutEffect)((()=>()=>{g.isCellFocused()&&t?.getGui().contains((0,s.HB1)(a))&&p.focus({preventScroll:!0})}),[t]),t&&e.wrappedContent?(0,n.createPortal)(e.wrappedContent,t.getGui()):null})),jsxEditor=(e,t,o)=>e.compProxy?((e,t,o)=>{const{compProxy:s}=e;o(s);const n=s.getProps(),r=isComponentStateless(t);return i.createElement(p.Provider,{value:{setMethods:e=>s.setMethods(e)}},r?i.createElement(t,{...n}):i.createElement(t,{...n,ref:e=>s.setRef(e)}))})(e,t,o):i.createElement(t,{...e.compDetails.params,ref:o}),showJsRenderer_default=(e,t,o,s,n,a,l=!1)=>{const{context:d}=(0,i.useContext)(r),c=(0,i.useCallback)((()=>{const e=n.current;if(!e)return;const t=e.getGui();t&&t.parentElement&&t.remove(),d.destroyBean(e),n.current=void 0}),[]);(0,i.useEffect)((()=>{const i=null!=e&&!l,s=e?.compDetails&&!e.compDetails.componentFromFramework;if(!(i&&s&&!(t&&null==o)))return void c();const r=e.compDetails;if(n.current){const t=n.current,o=!!(null!=t.refresh&&0==e.force)&&t.refresh(r.params);if(!0===o||void 0===o)return;c()}r.newAgStackInstance().then((e=>{if(!e)return;const i=e.getGui();if(!i)return;(t?o:a.current).appendChild(i),n.current=e}))}),[e,t,s,l]),(0,i.useEffect)((()=>c),[])},SkeletonCellRenderer=({cellCtrl:e,parent:t})=>{const o=(0,i.useRef)(),s=(0,i.useMemo)((()=>{const{loadingComp:t}=e.getDeferLoadingCellRenderer();return t?{value:void 0,compDetails:t,force:!1}:void 0}),[e]);if(showJsRenderer_default(s,!1,void 0,1,o,t),s?.compDetails?.componentFromFramework){const e=s.compDetails.componentClass;return i.createElement(e,{...s.compDetails.params})}return i.createElement(i.Fragment,null)},H=(0,i.memo)((({cellCtrl:e,printLayout:t,editingCell:o})=>{const n=(0,i.useContext)(r),{context:a}=n,{column:{colIdSanitised:l},instanceId:d}=e,u=(0,i.useRef)(),[h,g]=(0,i.useState)((()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1})),[p,m]=(0,i.useState)(),[f,C]=(0,i.useState)(1),[w,v]=(0,i.useState)(),[b,S]=(0,i.useState)(!1),[y,R]=(0,i.useState)(!1),[F,D]=(0,i.useState)(!1),[P,x]=(0,i.useState)(),E=(0,i.useMemo)((()=>e.isForceWrapper()),[e]),M=(0,i.useMemo)((()=>e.getCellAriaRole()),[e]),T=(0,i.useRef)(null),A=(0,i.useRef)(null),I=(0,i.useRef)(null),k=(0,i.useRef)(),L=(0,i.useRef)(),_=(0,i.useRef)(),G=(0,i.useRef)([]),N=(0,i.useRef)(),V=(0,i.useRef)(),[H,B]=(0,i.useState)(0),W=(0,i.useCallback)((e=>{V.current=e,B((e=>e+1))}),[]),z=null!=h&&(b||F||y)&&(null==p||!!p.popup),U=E||z,$=(0,i.useMemo)((()=>e.getCellValueClass()),[e]),K=(0,i.useCallback)((t=>{if(L.current=t,t){const o=t.isCancelBeforeStart&&t.isCancelBeforeStart();setTimeout((()=>{o?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(t))}))}}),[e]),j=(0,i.useRef)();j.current||(j.current=new s.fRQ((()=>T.current)));const q=!!p&&!p.popup;showJsRenderer_default(h,U,V.current,H,k,T,q);const Y=(0,i.useRef)();(0,i.useLayoutEffect)((()=>{const e=Y.current,t=h;if(Y.current=h,null==e||null==e.compDetails||null==t||null==t.compDetails)return;N.current?.refreshVisibility();const o=e.compDetails,i=t.compDetails;if(o.componentClass!=i.componentClass)return;if(null==I.current?.refresh)return;1!=I.current.refresh(i.params)&&C((e=>e+1))}),[h]),(0,i.useLayoutEffect)((()=>{if(!(p&&!p.compDetails.componentFromFramework)||a.isDestroyed())return;const t=p.compDetails,o=!0===p.popup,i=t.newAgStackInstance();return i.then((e=>{if(!e)return;const t=e.getGui();if(K(e),!o){(E?_:T).current?.appendChild(t),e.afterGuiAttached?.()}x(e)})),()=>{i.then((t=>{const o=t.getGui();e.disableEditorTooltipFeature(),a.destroyBean(t),K(void 0),x(void 0),o?.remove()}))}}),[p]);const Q=(0,i.useCallback)((t=>{if(_.current=t,!t||a.isDestroyed()||!e.isAlive()){const e=G.current;G.current=[];for(const t of e)t();return}let o;const addComp=e=>{e&&(t.insertAdjacentElement("afterbegin",e.getGui()),G.current.push((()=>{(0,s.taW)(e.getGui()),a.destroyBean(e),N.current===o&&(N.current=void 0)})))};b&&addComp(e.createSelectionCheckbox()),F&&addComp(e.createDndSource()),y&&(o=e.createRowDragComp(),N.current=o,o&&(addComp(o),o.refreshVisibility()))}),[e,a,F,y,b]),Z=(0,i.useCallback)((()=>{const n=!e.isCellSpanning()||A.current,r=T.current;if(!r||!n||!e||!e.isAlive()||a.isDestroyed())return void(u.current=a.destroyBean(u.current));u.current=a.createBean(new s.HGE);const l={toggleCss:(e,t)=>j.current.toggleCss(e,t),setUserStyles:e=>v(e),getFocusableElement:()=>T.current,setIncludeSelection:e=>S(e),setIncludeRowDrag:e=>R(e),setIncludeDndSource:e=>D(e),getCellEditor:()=>L.current??null,getCellRenderer:()=>I.current??k.current,getParentOfValue:()=>V.current??_.current??T.current,setRenderDetails:(t,o,s)=>{const setDetails=()=>{g((e=>e?.compDetails!==t||e?.value!==o||e?.force!==s?{value:o,compDetails:t,force:s}:e))};if(t?.params?.deferRender&&!e.rowNode.group){const{loadingComp:t,onReady:o}=e.getDeferLoadingCellRenderer();if(t)return g({value:void 0,compDetails:t,force:!1}),void o.then((()=>{return e=setDetails,void(c?e():i.startTransition(e));var e}))}setDetails()},setEditDetails:(t,o,i,n)=>{if(t){let e;t.componentFromFramework&&(n?e=new class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new s.j_S((e=>{this.resolveInstanceCreated=e})),this.onValueChange=e=>this.updateValue(e),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){addOptionalMethods(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then((()=>this.componentInstance))}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}}(t.params,(()=>C((e=>e+1)))):warnReactiveCustomComponents()),m({compDetails:t,popup:o,popupPosition:i,compProxy:e}),o||g(void 0)}else{e.hasBrowserFocus()&&l.getFocusableElement().focus({preventScroll:!0}),L.current=void 0,m(void 0)}},refreshEditStyles:(e,t)=>{if(!T.current)return;const{current:o}=j;o.toggleCss("ag-cell-value",!U),o.toggleCss("ag-cell-inline-editing",!!e&&!t),o.toggleCss("ag-cell-popup-editing",!!e&&!!t),o.toggleCss("ag-cell-not-inline-editing",!e||!!t)}},d=_.current||void 0;e.setComp(l,r,A.current??void 0,d,t,o,u.current)}),[]),J=(0,i.useCallback)((e=>{T.current=e,Z()}),[]),X=(0,i.useCallback)((e=>{A.current=e,Z()}),[]),ee=(0,i.useMemo)((()=>!!(h?.compDetails?.componentFromFramework&&isComponentStateless(h.compDetails.componentClass))),[h]);(0,i.useLayoutEffect)((()=>{if(!T.current)return;const{current:e}=j;e.toggleCss("ag-cell-value",!U),e.toggleCss("ag-cell-inline-editing",!!p&&!p.popup),e.toggleCss("ag-cell-popup-editing",!!p&&!!p.popup),e.toggleCss("ag-cell-not-inline-editing",!p||!!p.popup)}));const valueOrCellComp=()=>{const{compDetails:t,value:o}=h;if(!t)return o?.toString?.()??o;if(t.componentFromFramework){const o=t.componentClass;return i.createElement(i.Suspense,{fallback:i.createElement(SkeletonCellRenderer,{cellCtrl:e,parent:T})},ee?i.createElement(o,{...t.params,key:f}):i.createElement(o,{...t.params,key:f,ref:I}))}},showCellOrEditor=()=>{const showCellValue=()=>null==h?null:U?i.createElement("span",{role:"presentation",id:`cell-${d}`,className:$,ref:W},valueOrCellComp()):valueOrCellComp(),showEditValue=t=>((e,t,o,s,n)=>{const r=e.compDetails,a=r.componentClass,l=r.componentFromFramework&&!e.popup,d=r.componentFromFramework&&e.popup,c=!r.componentFromFramework&&e.popup;return l?jsxEditor(e,a,t):d?i.createElement(O,{editDetails:e,cellCtrl:s,eParentCell:o,wrappedContent:jsxEditor(e,a,t)}):c&&n?i.createElement(O,{editDetails:e,cellCtrl:s,eParentCell:o,jsChildComp:n}):null})(t,K,T.current,e,P);return null!=p?p.popup?i.createElement(i.Fragment,null,showCellValue(),showEditValue(p)):showEditValue(p):showCellValue()},renderCell=()=>i.createElement("div",{ref:J,style:w,role:M,"col-id":l},U?i.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:Q},showCellOrEditor()):showCellOrEditor());return e.isCellSpanning()?i.createElement("div",{ref:X,className:"ag-spanned-cell-wrapper",role:"presentation"},renderCell()):renderCell()})),B=(0,i.memo)((({rowCtrl:e,containerType:t})=>{const{context:o,gos:n,editSvc:l}=(0,i.useContext)(r),d="default"===(0,i.useContext)(a),c=(0,i.useRef)(),u=(0,i.useRef)(e.getDomOrder()),h=e.isFullWidth(),g=e.rowNode.displayed,[p,m]=(0,i.useState)((()=>g?e.rowNode.getRowIndexString():null)),[f,C]=(0,i.useState)((()=>e.rowId)),[w,v]=(0,i.useState)((()=>e.businessKey)),[b,S]=(0,i.useState)((()=>e.rowStyles)),y=(0,i.useRef)(null),[R,F]=(0,i.useState)((()=>null)),[D,P]=(0,i.useState)(),[x,E]=(0,i.useState)((()=>g?e.getInitialRowTop(t):void 0)),[M,T]=(0,i.useState)((()=>g?e.getInitialTransform(t):void 0)),A=(0,i.useRef)(null),I=(0,i.useRef)(),k=(0,i.useRef)(),L=(0,i.useRef)(!1),[_,G]=(0,i.useState)(0);(0,i.useEffect)((()=>{if(L.current||!D||_>10)return;const t=A.current?.firstChild;t?(e.setupDetailRowAutoHeight(t),L.current=!0):G((e=>e+1))}),[D,_]);const N=(0,i.useRef)();N.current||(N.current=new s.fRQ((()=>A.current)));const V=(0,i.useRef)((()=>{})),O=function agUseSyncExternalStore(e,t,o){return i.useSyncExternalStore?i.useSyncExternalStore(e,t):o}((0,i.useCallback)((e=>(V.current=e,()=>{V.current=()=>{}})),[]),(()=>y.current),[]),B=d?O:R,W=(0,i.useCallback)((i=>{if(A.current=i,c.current=i?o.createBean(new s.HGE):o.destroyBean(c.current),!i)return void e.unsetComp(t);if(!e.isAlive()||o.isDestroyed())return;const n={setTop:E,setTransform:T,toggleCss:(e,t)=>N.current.toggleCss(e,t),setDomOrder:e=>u.current=e,setRowIndex:m,setRowId:C,setRowBusinessKey:v,setUserStyles:S,setCellCtrls:(e,t)=>{const o=y.current,i=getNextValueIfDifferent(o,e,u.current);i!==o&&(y.current=i,d?V.current():agFlushSync(t,(()=>F(i))))},showFullWidth:e=>{k.current=e.params,P(e)},getFullWidthCellRenderer:()=>I.current,getFullWidthCellRendererParams:()=>k.current,refreshFullWidth:e=>{const t=e();return k.current=t,j.current?(P((e=>({...e,params:t}))),!0):!(!I.current||!I.current.refresh)&&I.current.refresh(t)}};e.setComp(n,i,t,c.current)}),[]);(0,i.useLayoutEffect)((()=>showJsComp(D,o,A.current,I)),[D]);const z=(0,i.useMemo)((()=>{const e={top:x,transform:M};return Object.assign(e,b),e}),[x,M,b]),U=h&&D?.componentFromFramework,$=!h&&null!=B,K=(0,i.useMemo)((()=>!!(D?.componentFromFramework&&isComponentStateless(D.componentClass))),[D]),j=(0,i.useRef)(!1);(0,i.useEffect)((()=>{j.current=K&&!!D&&!!n.get("reactiveCustomComponents")}),[K,D]);return i.createElement("div",{ref:W,role:"row",style:z,"row-index":p,"row-id":f,"row-business-key":w},$?B?.map((t=>i.createElement(H,{cellCtrl:t,editingCell:l?.isEditing(t,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:t.instanceId}))):U?(()=>{const e=D.componentClass;return K?i.createElement(e,{...D.params}):i.createElement(e,{...D.params,ref:I})})():null)})),W=(0,i.memo)((({name:e})=>{const{context:t,gos:o}=(0,i.useContext)(r),n=(0,i.useMemo)((()=>(0,s.TjA)(e)),[e]),a=(0,i.useRef)(null),l=(0,i.useRef)(null),d=(0,i.useRef)(null),c=(0,i.useRef)([]),u=(0,i.useRef)([]),[h,g]=(0,i.useState)((()=>[])),p=!!o.get("enableCellSpan")&&!!n.getSpannedRowCtrls,m=(0,i.useRef)([]),f=(0,i.useRef)([]),[C,w]=(0,i.useState)((()=>[])),v=(0,i.useRef)(!1),b=(0,i.useRef)(),S=(0,i.useMemo)((()=>classesList("ag-viewport",(0,s.xGN)(e))),[e]),y=(0,i.useMemo)((()=>classesList((0,s.b4l)(e))),[e]),R=(0,i.useMemo)((()=>classesList("ag-spanning-container",(0,s.$Yu)(e))),[e]),F="center"===n.type||p;reactComment_default(" AG Row Container "+e+" ",F?a:l);const D=(0,i.useCallback)((()=>{const e=!F||null!=a.current,t=null!=l.current,o=!p||null!=d.current;return e&&t&&o}),[]),P=(0,i.useCallback)((()=>null==a.current&&null==l.current&&null==d.current),[]),x=(0,i.useCallback)((()=>{if(P()&&(b.current=t.destroyBean(b.current)),!t.isDestroyed()&&D()){const updateRowCtrlsOrdered=e=>{const t=getNextValueIfDifferent(u.current,c.current,v.current);t!==u.current&&(u.current=t,agFlushSync(e,(()=>g(t))))},updateSpannedRowCtrlsOrdered=e=>{const t=getNextValueIfDifferent(f.current,m.current,v.current);t!==f.current&&(f.current=t,agFlushSync(e,(()=>w(t))))},o={setHorizontalScroll:e=>{a.current&&(a.current.scrollLeft=e)},setViewportHeight:e=>{a.current&&(a.current.style.height=e)},setRowCtrls:({rowCtrls:e,useFlushSync:t})=>{const o=!!t&&c.current.length>0&&e.length>0;c.current=e,updateRowCtrlsOrdered(o)},setSpannedRowCtrls:(e,t)=>{const o=!!t&&m.current.length>0&&e.length>0;m.current=e,updateSpannedRowCtrlsOrdered(o)},setDomOrder:e=>{v.current!=e&&(v.current=e,updateRowCtrlsOrdered(!1))},setContainerWidth:e=>{l.current&&(l.current.style.width=e)},setOffsetTop:e=>{l.current&&(l.current.style.transform=`translateY(${e})`)}};b.current=t.createBean(new s.RiB(e)),b.current.setComp(o,l.current,d.current??void 0,a.current)}}),[D,P]),E=(0,i.useCallback)((e=>{l.current=e,x()}),[x]),M=(0,i.useCallback)((e=>{d.current=e,x()}),[x]),T=(0,i.useCallback)((e=>{a.current=e,x()}),[x]),buildContainer=()=>i.createElement("div",{className:y,ref:E,role:F?"presentation":"rowgroup"},h.map((e=>i.createElement(B,{rowCtrl:e,containerType:n.type,key:e.instanceId}))));if(!F)return buildContainer();return i.createElement("div",{className:S,ref:T,role:"rowgroup"},buildContainer(),p?i.createElement("div",{className:R,ref:M,role:"presentation"},C.map((e=>i.createElement(B,{rowCtrl:e,containerType:n.type,key:e.instanceId})))):null)})),z=(0,i.memo)((()=>{const e=(0,i.useContext)(r),{context:t,overlays:o}=e,[n,a]=(0,i.useState)(""),[l,d]=(0,i.useState)(0),[c,u]=(0,i.useState)(0),[h,g]=(0,i.useState)("0px"),[p,m]=(0,i.useState)("0px"),[f,C]=(0,i.useState)("100%"),[w,v]=(0,i.useState)("0px"),[b,S]=(0,i.useState)("0px"),[y,R]=(0,i.useState)("100%"),[F,D]=(0,i.useState)(!0),[P,x]=(0,i.useState)(!0),[E,M]=(0,i.useState)(null),[T,A]=(0,i.useState)(""),[I,k]=(0,i.useState)(null),[L,_]=(0,i.useState)("ag-layout-normal"),G=(0,i.useRef)();G.current||(G.current=new s.fRQ((()=>N.current)));const N=(0,i.useRef)(null),O=(0,i.useRef)(null),H=(0,i.useRef)(null),B=(0,i.useRef)(null),z=(0,i.useRef)(null),U=(0,i.useRef)(null),$=(0,i.useRef)(null),K=(0,i.useRef)([]),j=(0,i.useRef)([]);reactComment_default(" AG Grid Body ",N),reactComment_default(" AG Pinned Top ",O),reactComment_default(" AG Sticky Top ",H),reactComment_default(" AG Middle ",U),reactComment_default(" AG Pinned Bottom ",$);const q=(0,i.useCallback)((i=>{if(N.current=i,!i||t.isDestroyed()){K.current=t.destroyBeans(K.current);for(const e of j.current)e();return void(j.current=[])}const attachToDom=(e,t)=>{e.appendChild(t),j.current.push((()=>t.remove()))},addComp=(e,o,i)=>{attachToDom(e,document.createComment(i)),attachToDom(e,(e=>{const o=t.createBean(new e);return K.current.push(o),o})(o).getGui())};addComp(i,s.iVQ," AG Fake Horizontal Scroll ");const n=o?.getOverlayWrapperCompClass();n&&addComp(i,n," AG Overlay Wrapper "),z.current&&addComp(z.current,s._P_," AG Fake Vertical Scroll ");const r={setRowAnimationCssOnBodyViewport:a,setColumnCount:e=>{N.current&&(0,s.FN9)(N.current,e)},setRowCount:e=>{N.current&&(0,s.OtO)(N.current,e)},setTopHeight:d,setBottomHeight:u,setStickyTopHeight:g,setStickyTopTop:m,setStickyTopWidth:C,setTopInvisible:D,setBottomInvisible:x,setColumnMovingCss:(e,t)=>G.current.toggleCss(e,t),updateLayoutClasses:_,setAlwaysVerticalScrollClass:M,setPinnedTopBottomOverflowY:A,setCellSelectableCss:(e,t)=>k(t?e:null),setBodyViewportWidth:e=>{U.current&&(U.current.style.width=e)},registerBodyViewportResizeListener:t=>{if(U.current){const o=(0,s.OpL)(e,U.current,t);j.current.push((()=>o()))}},setStickyBottomHeight:v,setStickyBottomBottom:S,setStickyBottomWidth:R,setGridRootRole:e=>i.setAttribute("role",e)},l=t.createBean(new s.wox);K.current.push(l),l.setComp(r,i,U.current,O.current,$.current,H.current,B.current)}),[]),Y=(0,i.useMemo)((()=>classesList("ag-root","ag-unselectable",L)),[L]),Q=(0,i.useMemo)((()=>classesList("ag-body-viewport",n,L,E,I)),[n,L,E,I]),Z=(0,i.useMemo)((()=>classesList("ag-body",L)),[L]),J=(0,i.useMemo)((()=>classesList("ag-floating-top",F?"ag-invisible":null,I)),[I,F]),X=(0,i.useMemo)((()=>classesList("ag-sticky-top",I)),[I]),ee=(0,i.useMemo)((()=>classesList("ag-sticky-bottom","0px"===w?"ag-invisible":null,I)),[I,w]),te=(0,i.useMemo)((()=>classesList("ag-floating-bottom",P?"ag-invisible":null,I)),[I,P]),oe=(0,i.useMemo)((()=>({height:l,minHeight:l,overflowY:T})),[l,T]),ie=(0,i.useMemo)((()=>({height:h,top:p,width:f})),[h,p,f]),se=(0,i.useMemo)((()=>({height:w,bottom:b,width:y})),[w,b,y]),ne=(0,i.useMemo)((()=>({height:c,minHeight:c,overflowY:T})),[c,T]),createRowContainer=e=>i.createElement(W,{name:e,key:`${e}-container`}),createSection=({section:e,children:t,className:o,style:s})=>i.createElement("div",{ref:e,className:o,role:"presentation",style:s},t.map(createRowContainer));return i.createElement("div",{ref:q,className:Y},i.createElement(V,null),createSection({section:O,className:J,style:oe,children:["topLeft","topCenter","topRight","topFullWidth"]}),i.createElement("div",{className:Z,ref:z,role:"presentation"},createSection({section:U,className:Q,children:["left","center","right","fullWidth"]})),createSection({section:H,className:X,style:ie,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),createSection({section:B,className:ee,style:se,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),createSection({section:$,className:te,style:ne,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))})),U=(0,i.forwardRef)(((e,t)=>{const{children:o,eFocusableElement:n,onTabKeyDown:a,gridCtrl:l,forceFocusOutWhenTabGuardsAreEmpty:d,isEmpty:c}=e,{context:u}=(0,i.useContext)(r),h=(0,i.useRef)(null),g=(0,i.useRef)(null),p=(0,i.useRef)(),setTabIndex=e=>{const t=null==e?void 0:parseInt(e,10).toString();for(const e of[h,g])void 0===t?e.current?.removeAttribute("tabindex"):e.current?.setAttribute("tabindex",t)};(0,i.useImperativeHandle)(t,(()=>({forceFocusOutOfContainer(e){p.current?.forceFocusOutOfContainer(e)}})));const m=(0,i.useCallback)((()=>{const e=h.current,t=g.current;if(!e&&!t||u.isDestroyed())p.current=u.destroyBean(p.current);else if(e&&t){const o={setTabIndex};p.current=u.createBean(new s.s$r({comp:o,eTopGuard:e,eBottomGuard:t,eFocusableElement:n,onTabKeyDown:a,forceFocusOutWhenTabGuardsAreEmpty:d,focusInnerElement:e=>l.focusInnerElement(e),isEmpty:c}))}}),[]),f=(0,i.useCallback)((e=>{h.current=e,m()}),[m]),C=(0,i.useCallback)((e=>{g.current=e,m()}),[m]),createTabGuard=e=>{const t="top"===e?s.zn.TAB_GUARD_TOP:s.zn.TAB_GUARD_BOTTOM;return i.createElement("div",{className:`${s.zn.TAB_GUARD} ${t}`,role:"presentation",ref:"top"===e?f:C})};return i.createElement(i.Fragment,null,createTabGuard("top"),o,createTabGuard("bottom"))})),$=(0,i.memo)(U),K=(0,i.memo)((({context:e})=>{const[t,o]=(0,i.useState)(""),[n,a]=(0,i.useState)(""),[l,d]=(0,i.useState)(null),[c,u]=(0,i.useState)(null),[h,g]=(0,i.useState)(!1),[p,m]=(0,i.useState)(),f=(0,i.useRef)(),C=(0,i.useRef)(null),w=(0,i.useRef)(),[v,b]=(0,i.useState)(null),S=(0,i.useRef)((()=>{})),y=(0,i.useRef)(),R=(0,i.useRef)([]),F=(0,i.useCallback)((()=>{}),[]);reactComment_default(" AG Grid ",C);const D=(0,i.useCallback)((t=>{if(C.current=t,f.current=t?e.createBean(new s.l3s):e.destroyBean(f.current),!t||e.isDestroyed())return;const i=f.current;S.current=i.focusInnerElement.bind(i);const n={destroyGridUi:()=>{},setRtlClass:o,forceFocusOutOfContainer:e=>{e||!y.current?.isDisplayed()?w.current?.forceFocusOutOfContainer(e):y.current.forceFocusOutOfContainer(e)},updateLayoutClasses:a,getFocusableContainers:()=>{const e=[],t=C.current?.querySelector(".ag-root");t&&e.push({getGui:()=>t});for(const t of R.current)t.isDisplayed()&&e.push(t);return e},setCursor:d,setUserSelect:u};i.setComp(n,t,t),g(!0)}),[]);(0,i.useEffect)((()=>{const t=f.current,o=C.current;if(!p||!t||!v||!o||e.isDestroyed())return;const i=[],{watermarkSelector:s,paginationSelector:n,sideBarSelector:r,statusBarSelector:a,gridHeaderDropZonesSelector:l}=t.getOptionalSelectors(),d=[];if(l){const t=e.createBean(new l.component),s=t.getGui();o.insertAdjacentElement("afterbegin",s),d.push(s),i.push(t)}if(r){const t=e.createBean(new r.component),o=t.getGui(),s=v.querySelector(".ag-tab-guard-bottom");s&&(s.insertAdjacentElement("beforebegin",o),d.push(o)),i.push(t),R.current.push(t)}const addComponentToDom=t=>{const s=e.createBean(new t),n=s.getGui();return o.insertAdjacentElement("beforeend",n),d.push(n),i.push(s),s};if(a&&addComponentToDom(a.component),n){const e=addComponentToDom(n.component);y.current=e,R.current.push(e)}return s&&addComponentToDom(s.component),()=>{e.destroyBeans(i);for(const e of d)e.remove()}}),[p,v,e]);const P=(0,i.useMemo)((()=>classesList("ag-root-wrapper",t,n)),[t,n]),x=(0,i.useMemo)((()=>classesList("ag-root-wrapper-body","ag-focus-managed",n)),[n]),E=(0,i.useMemo)((()=>({userSelect:null!=c?c:"",WebkitUserSelect:null!=c?c:"",cursor:null!=l?l:""})),[c,l]),M=(0,i.useCallback)((e=>{w.current=e,m(null!==e)}),[]),T=(0,i.useCallback)((()=>!f.current?.isFocusable()),[]);return i.createElement("div",{ref:D,className:P,style:E,role:"presentation"},i.createElement("div",{className:x,ref:b,role:"presentation"},h&&v&&!e.isDestroyed()&&i.createElement(r.Provider,{value:e.getBeans()},i.createElement($,{ref:M,eFocusableElement:v,onTabKeyDown:F,gridCtrl:f.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:T},i.createElement(z,null)))))})),j=class extends s.AS9{postConstruct(){if(this.beans.colAutosize){const e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){const e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout((()=>{e.processResizeOperations()}),0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every((e=>e.getAllCtrls().every((e=>e.areCellsRendered()))))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every((e=>e.isRowRendered()&&e.getAllCellCtrls().every((e=>!!e.eGui))))}},q="undefined"==typeof window?i.useEffect:i.useLayoutEffect,Y={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},Q={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...Y},Z=new Set(Object.keys(Q)),J=new Set(Object.keys(Y)),AgGridReactUi=e=>{const t=(0,i.useContext)(A),o=(0,i.useContext)(I),n=(0,i.useRef)(),r=(0,i.useRef)(null),l=(0,i.useRef)(null),d=(0,i.useRef)([]),c=(0,i.useRef)([]),u=(0,i.useRef)(e),h=(0,i.useRef)(),g=(0,i.useRef)(),p=(0,i.useRef)(!1),[m,f]=(0,i.useState)(void 0),[,C]=(0,i.useState)(0),w=(0,i.useRef)(),updateClassName=e=>{const t=r.current?.classList,splitClasses=(e="")=>e.trim().split(/\s+/g).filter(Boolean);if(w.current!==e){for(const e of splitClasses(w.current))t?.contains(e)&&t.remove(e);for(const o of splitClasses(e))t?.contains(o)||t?.add(o);w.current=e}};q((()=>{updateClassName(e.className)}),[e.className]);const v=(0,i.useCallback)((i=>{if(r.current=i,updateClassName(e.className),!i){for(const e of d.current)e();return void(d.current.length=0)}const a=[...e.modules??[],...t??[]];o&&(0,s.tEj)(a)?.setLicenseKey(o),l.current||(l.current=new class{constructor(e,t,o){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=o||1e3}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter((t=>t!==e)),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,o){this.portals=[...this.portals,e],this.waitForInstance(t,o),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout((()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)})),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,o=Date.now()){if(this.destroyed)t(null);else if(e.rendered())t(e);else{if(Date.now()-o>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return agFlushSync(!0,(()=>this.refresher())),void(e.rendered()&&t(e));window.setTimeout((()=>{this.waitForInstance(e,t,o)}))}}}((()=>C((e=>e+1))),e.componentWrappingElement,e.maxComponentCreationTimeMs),d.current.push((()=>{l.current?.destroy(),l.current=null})));const u=(0,s.F97)(e.gridOptions,e,Object.keys(e).filter((e=>!Z.has(e)))),m=new te((()=>{if(p.current){const getFn=()=>h.current?.shouldQueueUpdates()?void 0:c.current.shift();let e=getFn();for(;e;)e(),e=getFn()}}));h.current=m;const w=new j,v={providedBeanInstances:{frameworkCompWrapper:new X(l.current,u),renderStatus:w},modules:a,frameworkOverrides:m,setThemeOnGridDiv:!0},b=new s.zmG;u.gridId??(u.gridId=g.current),n.current=b.create(i,u,(t=>{f(t),t.createBean(w),d.current.push((()=>{t.destroy()})),t.getBean("ctrlsSvc").whenReady({addDestroyFunc:e=>{d.current.push(e)}},(()=>{if(t.isDestroyed())return;const o=n.current;o&&e.passGridApi?.(o)}))}),(e=>{e.getBean("ctrlsSvc").whenReady({addDestroyFunc:e=>{d.current.push(e)}},(()=>{for(const e of c.current)e();c.current.length=0,p.current=!0}))}),v),d.current.push((()=>{n.current=void 0})),n.current&&(g.current=n.current.getGridId())}),[]),b=(0,i.useMemo)((()=>({height:"100%",...e.containerStyle||{}})),[e.containerStyle]),S=(0,i.useCallback)((e=>{p.current&&!h.current?.shouldQueueUpdates()?e():c.current.push(e)}),[]);(0,i.useEffect)((()=>{const t=function extractGridPropertyChanges(e,t){const o={};for(const i of Object.keys(t)){if(Z.has(i)){J.has(i)&&(0,s.F5b)(274,{prop:i});continue}const n=t[i];e[i]!==n&&(o[i]=n)}return o}(u.current,e);u.current=e,S((()=>{n.current&&(0,s.UgJ)(t,n.current)}))}),[e]);const y=i.useSyncExternalStore&&"legacy"!==(0,s.DMj)(e,"renderingMode")?"default":"legacy";return i.createElement("div",{style:b,ref:v},i.createElement(a.Provider,{value:y},m&&!m.isDestroyed()?i.createElement(K,{key:m.instanceId,context:m}):null,l.current?.getPortals()??null))};var X=class extends s.Nk3{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const o=this.gridOptions;if((0,s.DMj)(o,"reactiveCustomComponents")){const i=(e=>{switch(e){case"filter":return(0,s.DMj)(o,"enableFilterHandlers")?F:R;case"floatingFilterComponent":return(0,s.DMj)(o,"enableFilterHandlers")?P:D;case"dateComponent":return S;case"dragAndDropImageComponent":return y;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return b;case"statusPanel":return M;case"toolPanel":return T;case"menuItem":return E;case"cellRenderer":return v;case"innerHeaderComponent":return x}})(t.name);if(i)return new i(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":warnReactiveCustomComponents()}const i=!t.cellRenderer&&"toolPanel"!==t.name;return new C(e,this.parent,t,i)}},ee=(0,i.forwardRef)(((e,t)=>{const o=(0,i.useContext)(r),{registry:n,context:a,gos:d,rowModel:c}=o,[u,h]=(0,i.useState)((()=>new l)),[g,p]=(0,i.useState)((()=>new l)),[m,f]=(0,i.useState)(),[C,w]=(0,i.useState)(),v=(0,i.useRef)(),b=(0,i.useRef)(null),S=(0,i.useRef)(),y=(0,i.useMemo)((()=>(0,s.$4t)(e.api.getGridId(),m?.rowModelType??"clientSide")),[e]),R=(0,i.useMemo)((()=>u.toString()+" ag-details-row"),[u]),F=(0,i.useMemo)((()=>g.toString()+" ag-details-grid"),[g]);t&&(0,i.useImperativeHandle)(t,(()=>({refresh:()=>v.current?.refresh()??!1}))),e.template&&(0,s.F5b)(230);const D=(0,i.useCallback)((t=>{if(b.current=t,!t||a.isDestroyed())return v.current=a.destroyBean(v.current),void S.current?.();const i={toggleCss:(e,t)=>h((o=>o.setClass(e,t))),toggleDetailGridCss:(e,t)=>p((o=>o.setClass(e,t))),setDetailGrid:e=>f(e),setRowData:e=>w(e),getGui:()=>b.current},r=n.createDynamicBean("detailCellRendererCtrl",!0);if(r&&(a.createBean(r),r.init(i,e),v.current=r,d.get("detailRowAutoHeight"))){const checkRowSizeFunc=()=>{if(null==b.current)return;const t=b.current.clientHeight;if(null!=t&&t>0){setTimeout((()=>{e.node.setRowHeight(t),((0,s.qYz)(d,c)||(0,s.jie)(d,c))&&c.onRowHeightChanged()}),0)}};S.current=(0,s.OpL)(o,t,checkRowSizeFunc),checkRowSizeFunc()}}),[]),P=(0,i.useCallback)((e=>{v.current?.registerDetailWithMaster(e)}),[]);return i.createElement("div",{className:R,ref:D},m&&i.createElement(AgGridReactUi,{className:F,...m,modules:y,rowData:C,passGridApi:P}))})),te=class extends s.vA3{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:g,agGroupRowRenderer:g,agDetailCellRenderer:ee},this.wrapIncoming=(e,t)=>"ensureVisible"===t?function runWithoutFlushSync(e){return u||setTimeout((()=>u=!1),0),u=!0,e()}(e):e()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return function isReact19(){return"19"===d}()}},oe=class extends i.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(const t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return i.createElement(AgGridReactUi,{...this.props,passGridApi:this.setGridApi})}}}}]);
|